From cd76893f23964944d7f46d2c821e3fdf33c1d65b Mon Sep 17 00:00:00 2001 From: Paolo Pedercini Date: Mon, 31 Aug 2020 11:59:00 -0400 Subject: [PATCH] removed modules --- node_modules/.bin/json2yaml | 1 - node_modules/.bin/mime | 1 - node_modules/.bin/yaml2json | 1 - node_modules/accepts/HISTORY.md | 236 - node_modules/accepts/LICENSE | 23 - node_modules/accepts/README.md | 142 - node_modules/accepts/index.js | 238 - node_modules/accepts/package.json | 86 - node_modules/after/.npmignore | 2 - node_modules/after/.travis.yml | 12 - node_modules/after/LICENCE | 19 - node_modules/after/README.md | 115 - node_modules/after/index.js | 28 - node_modules/after/package.json | 63 - node_modules/after/test/after-test.js | 120 - node_modules/argparse/CHANGELOG.md | 185 - node_modules/argparse/LICENSE | 21 - node_modules/argparse/README.md | 257 - node_modules/argparse/index.js | 3 - node_modules/argparse/lib/action.js | 146 - node_modules/argparse/lib/action/append.js | 53 - .../argparse/lib/action/append/constant.js | 47 - node_modules/argparse/lib/action/count.js | 40 - node_modules/argparse/lib/action/help.js | 47 - node_modules/argparse/lib/action/store.js | 50 - .../argparse/lib/action/store/constant.js | 43 - .../argparse/lib/action/store/false.js | 27 - .../argparse/lib/action/store/true.js | 26 - .../argparse/lib/action/subparsers.js | 149 - node_modules/argparse/lib/action/version.js | 47 - node_modules/argparse/lib/action_container.js | 482 - node_modules/argparse/lib/argparse.js | 14 - node_modules/argparse/lib/argument/error.js | 50 - .../argparse/lib/argument/exclusive.js | 54 - node_modules/argparse/lib/argument/group.js | 75 - node_modules/argparse/lib/argument_parser.js | 1161 --- node_modules/argparse/lib/const.js | 21 - .../argparse/lib/help/added_formatters.js | 87 - node_modules/argparse/lib/help/formatter.js | 795 -- node_modules/argparse/lib/namespace.js | 76 - node_modules/argparse/lib/utils.js | 57 - node_modules/argparse/package.json | 70 - 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 | 64 - node_modules/arraybuffer.slice/.npmignore | 17 - node_modules/arraybuffer.slice/LICENCE | 18 - node_modules/arraybuffer.slice/Makefile | 8 - node_modules/arraybuffer.slice/README.md | 17 - node_modules/arraybuffer.slice/index.js | 29 - node_modules/arraybuffer.slice/package.json | 44 - .../arraybuffer.slice/test/slice-buffer.js | 227 - node_modules/async-limiter/.eslintignore | 2 - node_modules/async-limiter/.nycrc | 10 - node_modules/async-limiter/.travis.yml | 9 - node_modules/async-limiter/LICENSE | 8 - node_modules/async-limiter/index.js | 67 - node_modules/async-limiter/package.json | 69 - node_modules/async-limiter/readme.md | 132 - node_modules/backo2/.npmignore | 1 - node_modules/backo2/History.md | 12 - node_modules/backo2/Makefile | 8 - node_modules/backo2/Readme.md | 34 - node_modules/backo2/component.json | 11 - node_modules/backo2/index.js | 85 - node_modules/backo2/package.json | 47 - node_modules/backo2/test/index.js | 18 - node_modules/bad-words/.travis.yml | 4 - node_modules/bad-words/CHANGELOG.md | 121 - node_modules/bad-words/LICENSE | 20 - node_modules/bad-words/Makefile | 4 - node_modules/bad-words/README.md | 175 - node_modules/bad-words/dist/badwords.js | 108 - node_modules/bad-words/lib/badwords.js | 86 - node_modules/bad-words/lib/lang.json | 457 - node_modules/bad-words/package.json | 68 - node_modules/bad-words/test/addWords.js | 28 - node_modules/bad-words/test/filter.js | 47 - node_modules/bad-words/test/isProfane.js | 44 - node_modules/bad-words/test/removeWords.js | 21 - node_modules/bad-words/test/replaceWord.js | 12 - node_modules/badwords-list/.npmignore | 15 - node_modules/badwords-list/LICENSE | 20 - node_modules/badwords-list/Makefile | 4 - node_modules/badwords-list/README.md | 57 - node_modules/badwords-list/lib/array.js | 1 - node_modules/badwords-list/lib/index.js | 5 - node_modules/badwords-list/lib/object.js | 1 - node_modules/badwords-list/lib/regexp.js | 1 - node_modules/badwords-list/package.json | 62 - node_modules/badwords-list/test/exports.js | 18 - node_modules/balanced-match/.npmignore | 5 - node_modules/balanced-match/LICENSE.md | 21 - node_modules/balanced-match/README.md | 91 - node_modules/balanced-match/index.js | 59 - node_modules/balanced-match/package.json | 77 - node_modules/base64-arraybuffer/.npmignore | 3 - node_modules/base64-arraybuffer/.travis.yml | 19 - node_modules/base64-arraybuffer/LICENSE-MIT | 22 - node_modules/base64-arraybuffer/README.md | 20 - .../lib/base64-arraybuffer.js | 67 - node_modules/base64-arraybuffer/package.json | 65 - node_modules/base64id/CHANGELOG.md | 16 - node_modules/base64id/LICENSE | 22 - node_modules/base64id/README.md | 18 - node_modules/base64id/lib/base64id.js | 103 - node_modules/base64id/package.json | 47 - node_modules/better-assert/.npmignore | 4 - node_modules/better-assert/History.md | 15 - node_modules/better-assert/Makefile | 5 - node_modules/better-assert/Readme.md | 61 - node_modules/better-assert/example.js | 10 - node_modules/better-assert/index.js | 38 - node_modules/better-assert/package.json | 65 - node_modules/blob/.idea/blob.iml | 12 - .../inspectionProfiles/profiles_settings.xml | 5 - .../blob/.idea/markdown-navigator.xml | 78 - .../markdown-navigator/profiles_settings.xml | 3 - node_modules/blob/.idea/modules.xml | 8 - node_modules/blob/.idea/vcs.xml | 6 - node_modules/blob/.idea/workspace.xml | 390 - node_modules/blob/.zuul.yml | 14 - node_modules/blob/LICENSE | 21 - node_modules/blob/Makefile | 14 - node_modules/blob/README.md | 21 - node_modules/blob/component.json | 11 - node_modules/blob/index.js | 100 - node_modules/blob/package.json | 49 - node_modules/blob/test/index.js | 100 - node_modules/body-parser/HISTORY.md | 609 -- node_modules/body-parser/LICENSE | 23 - node_modules/body-parser/README.md | 443 - node_modules/body-parser/index.js | 157 - node_modules/body-parser/lib/read.js | 181 - node_modules/body-parser/lib/types/json.js | 230 - node_modules/body-parser/lib/types/raw.js | 101 - node_modules/body-parser/lib/types/text.js | 121 - .../body-parser/lib/types/urlencoded.js | 284 - node_modules/body-parser/package.json | 91 - node_modules/brace-expansion/LICENSE | 21 - node_modules/brace-expansion/README.md | 129 - node_modules/brace-expansion/index.js | 201 - node_modules/brace-expansion/package.json | 75 - node_modules/bytes/History.md | 87 - node_modules/bytes/LICENSE | 23 - node_modules/bytes/Readme.md | 126 - node_modules/bytes/index.js | 162 - node_modules/bytes/package.json | 84 - node_modules/callsite/.npmignore | 4 - node_modules/callsite/History.md | 10 - node_modules/callsite/Makefile | 6 - node_modules/callsite/Readme.md | 44 - node_modules/callsite/index.js | 10 - node_modules/callsite/package.json | 48 - node_modules/component-bind/.npmignore | 4 - node_modules/component-bind/History.md | 13 - node_modules/component-bind/Makefile | 7 - node_modules/component-bind/Readme.md | 64 - node_modules/component-bind/component.json | 13 - node_modules/component-bind/index.js | 23 - node_modules/component-bind/package.json | 51 - node_modules/component-emitter/History.md | 68 - node_modules/component-emitter/LICENSE | 24 - node_modules/component-emitter/Readme.md | 74 - node_modules/component-emitter/index.js | 163 - node_modules/component-emitter/package.json | 59 - node_modules/component-inherit/.npmignore | 3 - node_modules/component-inherit/History.md | 5 - node_modules/component-inherit/Makefile | 16 - node_modules/component-inherit/Readme.md | 24 - node_modules/component-inherit/component.json | 10 - node_modules/component-inherit/index.js | 7 - node_modules/component-inherit/package.json | 48 - .../component-inherit/test/inherit.js | 21 - 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 | 88 - node_modules/concat-map/test/map.js | 39 - node_modules/content-disposition/HISTORY.md | 55 - node_modules/content-disposition/LICENSE | 22 - node_modules/content-disposition/README.md | 148 - node_modules/content-disposition/index.js | 458 - node_modules/content-disposition/package.json | 79 - node_modules/content-type/HISTORY.md | 24 - node_modules/content-type/LICENSE | 22 - node_modules/content-type/README.md | 92 - node_modules/content-type/index.js | 222 - node_modules/content-type/package.json | 76 - 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 | 57 - node_modules/cookie/HISTORY.md | 123 - node_modules/cookie/LICENSE | 24 - node_modules/cookie/README.md | 253 - node_modules/cookie/index.js | 198 - node_modules/cookie/package.json | 78 - node_modules/debug/.coveralls.yml | 1 - node_modules/debug/.eslintrc | 11 - node_modules/debug/.npmignore | 9 - node_modules/debug/.travis.yml | 14 - node_modules/debug/CHANGELOG.md | 362 - node_modules/debug/LICENSE | 19 - node_modules/debug/Makefile | 50 - node_modules/debug/README.md | 312 - node_modules/debug/component.json | 19 - node_modules/debug/karma.conf.js | 70 - node_modules/debug/node.js | 1 - node_modules/debug/package.json | 91 - node_modules/debug/src/browser.js | 185 - node_modules/debug/src/debug.js | 202 - node_modules/debug/src/index.js | 10 - node_modules/debug/src/inspector-log.js | 15 - node_modules/debug/src/node.js | 248 - node_modules/depd/History.md | 96 - node_modules/depd/LICENSE | 22 - node_modules/depd/Readme.md | 280 - node_modules/depd/index.js | 522 -- node_modules/depd/lib/browser/index.js | 77 - .../depd/lib/compat/callsite-tostring.js | 103 - .../depd/lib/compat/event-listener-count.js | 22 - node_modules/depd/lib/compat/index.js | 79 - node_modules/depd/package.json | 79 - node_modules/destroy/LICENSE | 22 - node_modules/destroy/README.md | 60 - node_modules/destroy/index.js | 75 - node_modules/destroy/package.json | 71 - node_modules/dotenv/CHANGELOG.md | 155 - node_modules/dotenv/LICENSE | 23 - node_modules/dotenv/README.md | 271 - node_modules/dotenv/config.js | 11 - node_modules/dotenv/lib/cli-options.js | 13 - node_modules/dotenv/lib/env-options.js | 18 - node_modules/dotenv/lib/main.js | 113 - node_modules/dotenv/package.json | 80 - node_modules/dotenv/types/index.d.ts | 59 - node_modules/dotenv/types/test.ts | 19 - node_modules/dotenv/types/tsconfig.json | 15 - node_modules/dotenv/types/tslint.json | 6 - 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 | 63 - node_modules/encodeurl/HISTORY.md | 14 - node_modules/encodeurl/LICENSE | 22 - node_modules/encodeurl/README.md | 128 - node_modules/encodeurl/index.js | 60 - node_modules/encodeurl/package.json | 78 - node_modules/engine.io-client/LICENSE | 22 - node_modules/engine.io-client/README.md | 300 - node_modules/engine.io-client/engine.io.js | 4709 ---------- node_modules/engine.io-client/lib/index.js | 10 - node_modules/engine.io-client/lib/socket.js | 748 -- .../engine.io-client/lib/transport.js | 161 - .../engine.io-client/lib/transports/index.js | 53 - .../lib/transports/polling-jsonp.js | 239 - .../lib/transports/polling-xhr.js | 417 - .../lib/transports/polling.js | 245 - .../lib/transports/websocket.js | 295 - .../engine.io-client/lib/xmlhttprequest.js | 37 - .../node_modules/debug/CHANGELOG.md | 395 - .../node_modules/debug/LICENSE | 19 - .../node_modules/debug/README.md | 455 - .../node_modules/debug/dist/debug.js | 912 -- .../node_modules/debug/package.json | 102 - .../node_modules/debug/src/browser.js | 264 - .../node_modules/debug/src/common.js | 266 - .../node_modules/debug/src/index.js | 10 - .../node_modules/debug/src/node.js | 257 - .../engine.io-client/node_modules/ms/index.js | 162 - .../node_modules/ms/license.md | 21 - .../node_modules/ms/package.json | 69 - .../node_modules/ms/readme.md | 60 - .../engine.io-client/node_modules/ws/LICENSE | 21 - .../node_modules/ws/README.md | 449 - .../node_modules/ws/browser.js | 8 - .../engine.io-client/node_modules/ws/index.js | 9 - .../node_modules/ws/lib/buffer-util.js | 72 - .../node_modules/ws/lib/constants.js | 10 - .../node_modules/ws/lib/event-target.js | 170 - .../node_modules/ws/lib/extension.js | 222 - .../node_modules/ws/lib/permessage-deflate.js | 502 - .../node_modules/ws/lib/receiver.js | 515 -- .../node_modules/ws/lib/sender.js | 416 - .../node_modules/ws/lib/validation.js | 30 - .../node_modules/ws/lib/websocket-server.js | 389 - .../node_modules/ws/lib/websocket.js | 852 -- .../node_modules/ws/package.json | 79 - node_modules/engine.io-client/package.json | 113 - node_modules/engine.io-parser/LICENSE | 22 - node_modules/engine.io-parser/Readme.md | 202 - node_modules/engine.io-parser/lib/browser.js | 605 -- node_modules/engine.io-parser/lib/index.js | 473 - node_modules/engine.io-parser/lib/keys.js | 19 - node_modules/engine.io-parser/lib/utf8.js | 210 - node_modules/engine.io-parser/package.json | 63 - node_modules/engine.io/LICENSE | 19 - node_modules/engine.io/README.md | 564 -- node_modules/engine.io/lib/engine.io.js | 126 - node_modules/engine.io/lib/server.js | 587 -- node_modules/engine.io/lib/socket.js | 486 - node_modules/engine.io/lib/transport.js | 128 - .../engine.io/lib/transports/index.js | 36 - .../engine.io/lib/transports/polling-jsonp.js | 75 - .../engine.io/lib/transports/polling-xhr.js | 69 - .../engine.io/lib/transports/polling.js | 407 - .../engine.io/lib/transports/websocket.js | 134 - .../engine.io/node_modules/cookie/HISTORY.md | 118 - .../engine.io/node_modules/cookie/LICENSE | 24 - .../engine.io/node_modules/cookie/README.md | 220 - .../engine.io/node_modules/cookie/index.js | 195 - .../node_modules/cookie/package.json | 71 - .../engine.io/node_modules/debug/CHANGELOG.md | 395 - .../engine.io/node_modules/debug/LICENSE | 19 - .../engine.io/node_modules/debug/README.md | 455 - .../node_modules/debug/dist/debug.js | 912 -- .../engine.io/node_modules/debug/package.json | 102 - .../node_modules/debug/src/browser.js | 264 - .../node_modules/debug/src/common.js | 266 - .../engine.io/node_modules/debug/src/index.js | 10 - .../engine.io/node_modules/debug/src/node.js | 257 - .../engine.io/node_modules/ms/index.js | 162 - .../engine.io/node_modules/ms/license.md | 21 - .../engine.io/node_modules/ms/package.json | 69 - .../engine.io/node_modules/ms/readme.md | 60 - node_modules/engine.io/package.json | 93 - 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 | 59 - node_modules/etag/HISTORY.md | 83 - node_modules/etag/LICENSE | 22 - node_modules/etag/README.md | 159 - node_modules/etag/index.js | 131 - node_modules/etag/package.json | 86 - node_modules/express/History.md | 3477 ------- node_modules/express/LICENSE | 24 - node_modules/express/Readme.md | 155 - node_modules/express/index.js | 11 - node_modules/express/lib/application.js | 644 -- node_modules/express/lib/express.js | 116 - node_modules/express/lib/middleware/init.js | 43 - node_modules/express/lib/middleware/query.js | 47 - node_modules/express/lib/request.js | 525 -- node_modules/express/lib/response.js | 1142 --- node_modules/express/lib/router/index.js | 662 -- node_modules/express/lib/router/layer.js | 181 - node_modules/express/lib/router/route.js | 216 - node_modules/express/lib/utils.js | 306 - node_modules/express/lib/view.js | 182 - node_modules/express/package.json | 154 - node_modules/finalhandler/HISTORY.md | 187 - node_modules/finalhandler/LICENSE | 22 - node_modules/finalhandler/README.md | 148 - node_modules/finalhandler/index.js | 331 - node_modules/finalhandler/package.json | 80 - node_modules/forwarded/HISTORY.md | 16 - node_modules/forwarded/LICENSE | 22 - node_modules/forwarded/README.md | 57 - node_modules/forwarded/index.js | 76 - node_modules/forwarded/package.json | 78 - node_modules/fresh/HISTORY.md | 70 - node_modules/fresh/LICENSE | 23 - node_modules/fresh/README.md | 119 - node_modules/fresh/index.js | 137 - node_modules/fresh/package.json | 90 - node_modules/fs.realpath/LICENSE | 43 - node_modules/fs.realpath/README.md | 33 - node_modules/fs.realpath/index.js | 66 - node_modules/fs.realpath/old.js | 303 - node_modules/fs.realpath/package.json | 59 - node_modules/glob/LICENSE | 21 - node_modules/glob/README.md | 375 - node_modules/glob/changelog.md | 67 - node_modules/glob/common.js | 240 - node_modules/glob/glob.js | 790 -- node_modules/glob/package.json | 79 - node_modules/glob/sync.js | 486 - node_modules/has-binary2/History.md | 57 - node_modules/has-binary2/LICENSE | 20 - node_modules/has-binary2/README.md | 4 - node_modules/has-binary2/index.js | 64 - node_modules/has-binary2/package.json | 51 - node_modules/has-cors/.npmignore | 3 - node_modules/has-cors/History.md | 21 - node_modules/has-cors/Makefile | 11 - node_modules/has-cors/Readme.md | 24 - node_modules/has-cors/component.json | 13 - node_modules/has-cors/index.js | 17 - node_modules/has-cors/package.json | 66 - node_modules/has-cors/test.js | 24 - node_modules/http-errors/HISTORY.md | 149 - node_modules/http-errors/LICENSE | 23 - node_modules/http-errors/README.md | 163 - node_modules/http-errors/index.js | 266 - node_modules/http-errors/package.json | 93 - node_modules/iconv-lite/Changelog.md | 162 - node_modules/iconv-lite/LICENSE | 21 - node_modules/iconv-lite/README.md | 156 - .../iconv-lite/encodings/dbcs-codec.js | 555 -- .../iconv-lite/encodings/dbcs-data.js | 176 - node_modules/iconv-lite/encodings/index.js | 22 - node_modules/iconv-lite/encodings/internal.js | 188 - .../iconv-lite/encodings/sbcs-codec.js | 72 - .../encodings/sbcs-data-generated.js | 451 - .../iconv-lite/encodings/sbcs-data.js | 174 - .../encodings/tables/big5-added.json | 122 - .../iconv-lite/encodings/tables/cp936.json | 264 - .../iconv-lite/encodings/tables/cp949.json | 273 - .../iconv-lite/encodings/tables/cp950.json | 177 - .../iconv-lite/encodings/tables/eucjp.json | 182 - .../encodings/tables/gb18030-ranges.json | 1 - .../encodings/tables/gbk-added.json | 55 - .../iconv-lite/encodings/tables/shiftjis.json | 125 - node_modules/iconv-lite/encodings/utf16.js | 177 - node_modules/iconv-lite/encodings/utf7.js | 290 - node_modules/iconv-lite/lib/bom-handling.js | 52 - node_modules/iconv-lite/lib/extend-node.js | 217 - node_modules/iconv-lite/lib/index.d.ts | 24 - node_modules/iconv-lite/lib/index.js | 153 - node_modules/iconv-lite/lib/streams.js | 121 - node_modules/iconv-lite/package.json | 77 - node_modules/indexof/.npmignore | 2 - node_modules/indexof/Makefile | 11 - node_modules/indexof/Readme.md | 15 - node_modules/indexof/component.json | 10 - node_modules/indexof/index.js | 10 - node_modules/indexof/package.json | 42 - node_modules/inflight/LICENSE | 15 - node_modules/inflight/README.md | 37 - node_modules/inflight/inflight.js | 54 - node_modules/inflight/package.json | 58 - node_modules/inherits/LICENSE | 16 - node_modules/inherits/README.md | 42 - node_modules/inherits/inherits.js | 7 - node_modules/inherits/inherits_browser.js | 23 - node_modules/inherits/package.json | 61 - node_modules/ipaddr.js/LICENSE | 19 - node_modules/ipaddr.js/README.md | 233 - node_modules/ipaddr.js/ipaddr.min.js | 1 - node_modules/ipaddr.js/lib/ipaddr.js | 673 -- node_modules/ipaddr.js/lib/ipaddr.js.d.ts | 68 - node_modules/ipaddr.js/package.json | 70 - node_modules/isarray/README.md | 54 - node_modules/isarray/index.js | 5 - node_modules/isarray/package.json | 78 - 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 | 61 - 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 | 69 - 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 | 79 - node_modules/mime-db/HISTORY.md | 439 - node_modules/mime-db/LICENSE | 22 - node_modules/mime-db/README.md | 100 - node_modules/mime-db/db.json | 8060 ----------------- node_modules/mime-db/index.js | 11 - node_modules/mime-db/package.json | 101 - node_modules/mime-types/HISTORY.md | 325 - node_modules/mime-types/LICENSE | 23 - node_modules/mime-types/README.md | 113 - node_modules/mime-types/index.js | 188 - node_modules/mime-types/package.json | 87 - node_modules/mime/.npmignore | 0 node_modules/mime/CHANGELOG.md | 164 - node_modules/mime/LICENSE | 21 - node_modules/mime/README.md | 90 - node_modules/mime/cli.js | 8 - node_modules/mime/mime.js | 108 - node_modules/mime/package.json | 73 - node_modules/mime/src/build.js | 53 - node_modules/mime/src/test.js | 60 - node_modules/mime/types.json | 1 - node_modules/minimatch/LICENSE | 15 - node_modules/minimatch/README.md | 209 - node_modules/minimatch/minimatch.js | 923 -- node_modules/minimatch/package.json | 63 - node_modules/ms/index.js | 152 - node_modules/ms/license.md | 21 - node_modules/ms/package.json | 69 - node_modules/ms/readme.md | 51 - node_modules/negotiator/HISTORY.md | 103 - node_modules/negotiator/LICENSE | 24 - node_modules/negotiator/README.md | 203 - node_modules/negotiator/index.js | 124 - node_modules/negotiator/lib/charset.js | 169 - node_modules/negotiator/lib/encoding.js | 184 - node_modules/negotiator/lib/language.js | 179 - node_modules/negotiator/lib/mediaType.js | 294 - node_modules/negotiator/package.json | 84 - node_modules/object-component/.npmignore | 3 - node_modules/object-component/History.md | 10 - node_modules/object-component/Makefile | 16 - node_modules/object-component/Readme.md | 31 - node_modules/object-component/component.json | 10 - node_modules/object-component/index.js | 84 - node_modules/object-component/package.json | 39 - node_modules/object-component/test/object.js | 48 - 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 | 73 - node_modules/once/LICENSE | 15 - node_modules/once/README.md | 79 - node_modules/once/once.js | 42 - node_modules/once/package.json | 67 - node_modules/parseqs/.npmignore | 3 - node_modules/parseqs/LICENSE | 21 - node_modules/parseqs/Makefile | 3 - node_modules/parseqs/README.md | 1 - node_modules/parseqs/index.js | 37 - node_modules/parseqs/package.json | 53 - node_modules/parseqs/test.js | 27 - node_modules/parseuri/.npmignore | 2 - node_modules/parseuri/History.md | 5 - node_modules/parseuri/LICENSE | 21 - node_modules/parseuri/Makefile | 3 - node_modules/parseuri/README.md | 2 - node_modules/parseuri/index.js | 39 - node_modules/parseuri/package.json | 51 - node_modules/parseuri/test.js | 51 - node_modules/parseurl/HISTORY.md | 58 - node_modules/parseurl/LICENSE | 24 - node_modules/parseurl/README.md | 133 - node_modules/parseurl/index.js | 158 - node_modules/parseurl/package.json | 81 - node_modules/path-is-absolute/index.js | 20 - node_modules/path-is-absolute/license | 21 - node_modules/path-is-absolute/package.json | 75 - node_modules/path-is-absolute/readme.md | 59 - 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 | 59 - node_modules/proxy-addr/HISTORY.md | 155 - node_modules/proxy-addr/LICENSE | 22 - node_modules/proxy-addr/README.md | 155 - node_modules/proxy-addr/index.js | 327 - node_modules/proxy-addr/package.json | 82 - node_modules/qs/.editorconfig | 30 - node_modules/qs/.eslintignore | 1 - node_modules/qs/.eslintrc | 21 - node_modules/qs/CHANGELOG.md | 256 - node_modules/qs/LICENSE | 28 - node_modules/qs/README.md | 570 -- node_modules/qs/dist/qs.js | 782 -- node_modules/qs/lib/formats.js | 18 - node_modules/qs/lib/index.js | 11 - node_modules/qs/lib/parse.js | 242 - node_modules/qs/lib/stringify.js | 269 - node_modules/qs/lib/utils.js | 230 - node_modules/qs/package.json | 87 - node_modules/qs/test/.eslintrc | 17 - node_modules/qs/test/index.js | 7 - node_modules/qs/test/parse.js | 676 -- node_modules/qs/test/stringify.js | 679 -- node_modules/qs/test/utils.js | 136 - node_modules/range-parser/HISTORY.md | 56 - node_modules/range-parser/LICENSE | 23 - node_modules/range-parser/README.md | 84 - node_modules/range-parser/index.js | 162 - node_modules/range-parser/package.json | 91 - node_modules/raw-body/HISTORY.md | 270 - node_modules/raw-body/LICENSE | 22 - node_modules/raw-body/README.md | 219 - node_modules/raw-body/index.d.ts | 87 - node_modules/raw-body/index.js | 286 - node_modules/raw-body/package.json | 90 - node_modules/rita/LICENSE | 675 -- node_modules/rita/README.md | 84 - node_modules/rita/gulpfile.js | 398 - node_modules/rita/lib/rita-tiny.js | 6 - node_modules/rita/lib/rita.js | 37 - node_modules/rita/package.json | 84 - node_modules/rita/test/LibStructure-tests.js | 162 - node_modules/rita/test/RiGrammar-tests.js | 1026 --- node_modules/rita/test/RiMarkov-tests.js | 701 -- node_modules/rita/test/RiString-tests.js | 1437 --- node_modules/rita/test/RiTa-tests.js | 1861 ---- node_modules/rita/test/UrlLoading-tests.js | 491 - .../rita/test/html/data/haikuGrammar.json | 10 - .../rita/test/html/data/haikuGrammar.yaml | 9 - .../rita/test/html/data/haikuGrammar2.json | 122 - .../rita/test/html/data/haikuGrammar2.yaml | 120 - node_modules/rita/test/html/data/kafka.txt | 2196 ----- .../rita/test/html/data/sentence1.json | 8 - .../rita/test/html/data/sentence1.yaml | 8 - .../rita/test/html/data/sentence2.json | 17 - .../rita/test/html/data/sentence2.yaml | 14 - node_modules/rita/test/html/data/tate.txt | 1 - .../rita/test/html/data/wittgenstein.txt | 2238 ----- node_modules/rita/test/qunit-helpers.js | 90 - node_modules/rita/tonic.js | 6 - node_modules/safe-buffer/LICENSE | 21 - node_modules/safe-buffer/README.md | 584 -- node_modules/safe-buffer/index.d.ts | 187 - node_modules/safe-buffer/index.js | 62 - node_modules/safe-buffer/package.json | 63 - node_modules/safer-buffer/LICENSE | 21 - node_modules/safer-buffer/Porting-Buffer.md | 268 - node_modules/safer-buffer/Readme.md | 156 - node_modules/safer-buffer/dangerous.js | 58 - node_modules/safer-buffer/package.json | 60 - node_modules/safer-buffer/safer.js | 77 - node_modules/safer-buffer/tests.js | 406 - node_modules/send/HISTORY.md | 496 - node_modules/send/LICENSE | 23 - node_modules/send/README.md | 329 - node_modules/send/index.js | 1129 --- node_modules/send/node_modules/ms/index.js | 162 - node_modules/send/node_modules/ms/license.md | 21 - .../send/node_modules/ms/package.json | 69 - node_modules/send/node_modules/ms/readme.md | 60 - node_modules/send/package.json | 106 - node_modules/serve-static/HISTORY.md | 451 - node_modules/serve-static/LICENSE | 25 - node_modules/serve-static/README.md | 259 - node_modules/serve-static/index.js | 210 - node_modules/serve-static/package.json | 77 - node_modules/setprototypeof/LICENSE | 13 - node_modules/setprototypeof/README.md | 31 - node_modules/setprototypeof/index.d.ts | 2 - node_modules/setprototypeof/index.js | 17 - node_modules/setprototypeof/package.json | 64 - node_modules/setprototypeof/test/index.js | 24 - .../socket.io-adapter/.idea/$CACHE_FILE$ | 25 - .../inspectionProfiles/profiles_settings.xml | 5 - node_modules/socket.io-adapter/.idea/misc.xml | 6 - .../socket.io-adapter/.idea/modules.xml | 8 - .../.idea/socket.io-adapter.iml | 12 - node_modules/socket.io-adapter/.idea/vcs.xml | 6 - .../socket.io-adapter/.idea/workspace.xml | 71 - node_modules/socket.io-adapter/LICENSE | 20 - node_modules/socket.io-adapter/Readme.md | 16 - node_modules/socket.io-adapter/index.js | 263 - node_modules/socket.io-adapter/package.json | 39 - node_modules/socket.io-client/LICENSE | 22 - node_modules/socket.io-client/README.md | 57 - .../socket.io-client/dist/socket.io.dev.js | 7254 --------------- .../dist/socket.io.dev.js.map | 1 - .../socket.io-client/dist/socket.io.js | 9 - .../socket.io-client/dist/socket.io.js.map | 1 - .../dist/socket.io.slim.dev.js | 5853 ------------ .../dist/socket.io.slim.dev.js.map | 1 - .../socket.io-client/dist/socket.io.slim.js | 9 - .../dist/socket.io.slim.js.map | 1 - node_modules/socket.io-client/lib/index.js | 94 - node_modules/socket.io-client/lib/manager.js | 573 -- node_modules/socket.io-client/lib/on.js | 24 - node_modules/socket.io-client/lib/socket.js | 438 - node_modules/socket.io-client/lib/url.js | 75 - .../node_modules/debug/CHANGELOG.md | 395 - .../node_modules/debug/LICENSE | 19 - .../node_modules/debug/README.md | 455 - .../node_modules/debug/dist/debug.js | 912 -- .../node_modules/debug/package.json | 102 - .../node_modules/debug/src/browser.js | 264 - .../node_modules/debug/src/common.js | 266 - .../node_modules/debug/src/index.js | 10 - .../node_modules/debug/src/node.js | 257 - .../socket.io-client/node_modules/ms/index.js | 162 - .../node_modules/ms/license.md | 21 - .../node_modules/ms/package.json | 69 - .../node_modules/ms/readme.md | 60 - .../node_modules/socket.io-parser/LICENSE | 20 - .../node_modules/socket.io-parser/Readme.md | 73 - .../node_modules/socket.io-parser/binary.js | 141 - .../node_modules/socket.io-parser/index.js | 415 - .../socket.io-parser/is-buffer.js | 20 - .../node_modules/debug/.coveralls.yml | 1 - .../node_modules/debug/.eslintrc | 14 - .../node_modules/debug/.npmignore | 9 - .../node_modules/debug/.travis.yml | 20 - .../node_modules/debug/CHANGELOG.md | 395 - .../node_modules/debug/LICENSE | 19 - .../node_modules/debug/Makefile | 58 - .../node_modules/debug/README.md | 368 - .../node_modules/debug/karma.conf.js | 70 - .../node_modules/debug/node.js | 1 - .../node_modules/debug/package.json | 82 - .../node_modules/debug/src/browser.js | 195 - .../node_modules/debug/src/debug.js | 225 - .../node_modules/debug/src/index.js | 10 - .../node_modules/debug/src/node.js | 186 - .../socket.io-parser/node_modules/ms/index.js | 152 - .../node_modules/ms/license.md | 21 - .../node_modules/ms/package.json | 69 - .../node_modules/ms/readme.md | 51 - .../socket.io-parser/package.json | 60 - node_modules/socket.io-client/package.json | 121 - node_modules/socket.io-parser/LICENSE | 20 - node_modules/socket.io-parser/Readme.md | 73 - node_modules/socket.io-parser/binary.js | 141 - node_modules/socket.io-parser/index.js | 415 - node_modules/socket.io-parser/is-buffer.js | 20 - .../node_modules/debug/CHANGELOG.md | 395 - .../node_modules/debug/LICENSE | 19 - .../node_modules/debug/README.md | 455 - .../node_modules/debug/dist/debug.js | 912 -- .../node_modules/debug/package.json | 102 - .../node_modules/debug/src/browser.js | 264 - .../node_modules/debug/src/common.js | 266 - .../node_modules/debug/src/index.js | 10 - .../node_modules/debug/src/node.js | 257 - .../socket.io-parser/node_modules/ms/index.js | 162 - .../node_modules/ms/license.md | 21 - .../node_modules/ms/package.json | 69 - .../node_modules/ms/readme.md | 60 - node_modules/socket.io-parser/package.json | 60 - node_modules/socket.io/LICENSE | 22 - node_modules/socket.io/Readme.md | 243 - node_modules/socket.io/lib/client.js | 273 - node_modules/socket.io/lib/index.js | 523 -- node_modules/socket.io/lib/namespace.js | 299 - .../socket.io/lib/parent-namespace.js | 39 - node_modules/socket.io/lib/socket.js | 572 -- .../socket.io/node_modules/debug/CHANGELOG.md | 395 - .../socket.io/node_modules/debug/LICENSE | 19 - .../socket.io/node_modules/debug/README.md | 455 - .../node_modules/debug/dist/debug.js | 912 -- .../socket.io/node_modules/debug/package.json | 102 - .../node_modules/debug/src/browser.js | 264 - .../node_modules/debug/src/common.js | 266 - .../socket.io/node_modules/debug/src/index.js | 10 - .../socket.io/node_modules/debug/src/node.js | 257 - .../socket.io/node_modules/ms/index.js | 162 - .../socket.io/node_modules/ms/license.md | 21 - .../socket.io/node_modules/ms/package.json | 69 - .../socket.io/node_modules/ms/readme.md | 60 - node_modules/socket.io/package.json | 89 - node_modules/sprintf-js/.npmignore | 1 - node_modules/sprintf-js/LICENSE | 24 - node_modules/sprintf-js/README.md | 88 - node_modules/sprintf-js/bower.json | 14 - node_modules/sprintf-js/demo/angular.html | 20 - .../sprintf-js/dist/angular-sprintf.min.js | 4 - .../dist/angular-sprintf.min.js.map | 1 - .../sprintf-js/dist/angular-sprintf.min.map | 1 - node_modules/sprintf-js/dist/sprintf.min.js | 4 - .../sprintf-js/dist/sprintf.min.js.map | 1 - node_modules/sprintf-js/dist/sprintf.min.map | 1 - node_modules/sprintf-js/gruntfile.js | 36 - node_modules/sprintf-js/package.json | 54 - .../sprintf-js/src/angular-sprintf.js | 18 - node_modules/sprintf-js/src/sprintf.js | 208 - node_modules/sprintf-js/test/test.js | 82 - node_modules/statuses/HISTORY.md | 65 - node_modules/statuses/LICENSE | 23 - node_modules/statuses/README.md | 127 - node_modules/statuses/codes.json | 66 - node_modules/statuses/index.js | 113 - node_modules/statuses/package.json | 90 - node_modules/to-array/.npmignore | 3 - node_modules/to-array/LICENCE | 19 - node_modules/to-array/README.md | 22 - node_modules/to-array/index.js | 13 - node_modules/to-array/package.json | 68 - node_modules/toidentifier/LICENSE | 21 - node_modules/toidentifier/README.md | 61 - node_modules/toidentifier/index.js | 30 - node_modules/toidentifier/package.json | 76 - node_modules/type-is/HISTORY.md | 259 - node_modules/type-is/LICENSE | 23 - node_modules/type-is/README.md | 170 - node_modules/type-is/index.js | 266 - node_modules/type-is/package.json | 85 - 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 | 63 - node_modules/utils-merge/.npmignore | 9 - 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 | 66 - node_modules/vary/HISTORY.md | 39 - node_modules/vary/LICENSE | 22 - node_modules/vary/README.md | 101 - node_modules/vary/index.js | 149 - node_modules/vary/package.json | 78 - node_modules/wrappy/LICENSE | 15 - node_modules/wrappy/README.md | 36 - node_modules/wrappy/package.json | 59 - node_modules/wrappy/wrappy.js | 33 - node_modules/ws/LICENSE | 21 - node_modules/ws/README.md | 494 - node_modules/ws/browser.js | 8 - node_modules/ws/index.js | 10 - node_modules/ws/lib/buffer-util.js | 146 - node_modules/ws/lib/constants.js | 10 - node_modules/ws/lib/event-target.js | 170 - node_modules/ws/lib/extension.js | 223 - node_modules/ws/lib/limiter.js | 54 - node_modules/ws/lib/permessage-deflate.js | 512 -- node_modules/ws/lib/receiver.js | 506 -- node_modules/ws/lib/sender.js | 390 - node_modules/ws/lib/stream.js | 164 - node_modules/ws/lib/validation.js | 30 - node_modules/ws/lib/websocket-server.js | 406 - node_modules/ws/lib/websocket.js | 909 -- node_modules/ws/package.json | 97 - node_modules/xmlhttprequest-ssl/LICENSE | 22 - node_modules/xmlhttprequest-ssl/README.md | 63 - .../xmlhttprequest-ssl/autotest.watchr | 8 - .../xmlhttprequest-ssl/example/demo.js | 16 - .../xmlhttprequest-ssl/lib/XMLHttpRequest.js | 651 -- node_modules/xmlhttprequest-ssl/package.json | 63 - .../tests/test-constants.js | 13 - .../xmlhttprequest-ssl/tests/test-events.js | 50 - .../tests/test-exceptions.js | 59 - .../xmlhttprequest-ssl/tests/test-headers.js | 76 - .../tests/test-redirect-302.js | 41 - .../tests/test-redirect-303.js | 41 - .../tests/test-redirect-307.js | 43 - .../tests/test-request-methods.js | 62 - .../tests/test-request-protocols.js | 32 - .../xmlhttprequest-ssl/tests/testdata.txt | 1 - node_modules/yamljs/.npmignore | 5 - node_modules/yamljs/.travis.yml | 7 - node_modules/yamljs/Cakefile | 117 - node_modules/yamljs/LICENSE | 19 - node_modules/yamljs/README.md | 154 - node_modules/yamljs/bin/json2yaml | 186 - node_modules/yamljs/bin/yaml2json | 200 - node_modules/yamljs/bower.json | 19 - node_modules/yamljs/cli/json2yaml.js | 185 - node_modules/yamljs/cli/yaml2json.js | 199 - node_modules/yamljs/demo/demo.html | 114 - node_modules/yamljs/dist/yaml.debug.js | 1905 ---- node_modules/yamljs/dist/yaml.js | 1904 ---- node_modules/yamljs/dist/yaml.legacy.js | 2087 ----- node_modules/yamljs/dist/yaml.min.js | 1 - node_modules/yamljs/index.js | 3 - node_modules/yamljs/lib/Dumper.js | 53 - node_modules/yamljs/lib/Escaper.js | 56 - .../yamljs/lib/Exception/DumpException.js | 27 - .../yamljs/lib/Exception/ParseException.js | 27 - .../yamljs/lib/Exception/ParseMore.js | 27 - node_modules/yamljs/lib/Inline.js | 485 - node_modules/yamljs/lib/Parser.js | 603 -- node_modules/yamljs/lib/Pattern.js | 119 - node_modules/yamljs/lib/Unescaper.js | 83 - node_modules/yamljs/lib/Utils.js | 297 - node_modules/yamljs/lib/Yaml.js | 104 - node_modules/yamljs/package.json | 66 - node_modules/yamljs/src/Dumper.coffee | 56 - node_modules/yamljs/src/Escaper.coffee | 80 - .../yamljs/src/Exception/DumpException.coffee | 12 - .../src/Exception/ParseException.coffee | 12 - .../yamljs/src/Exception/ParseMore.coffee | 12 - node_modules/yamljs/src/Inline.coffee | 488 - node_modules/yamljs/src/Parser.coffee | 651 -- node_modules/yamljs/src/Pattern.coffee | 144 - node_modules/yamljs/src/Unescaper.coffee | 96 - node_modules/yamljs/src/Utils.coffee | 349 - node_modules/yamljs/src/Yaml.coffee | 118 - node_modules/yamljs/test/SpecRunner.html | 24 - .../yamljs/test/lib/jasmine-2.0.0/MIT.LICENSE | 20 - .../yamljs/test/lib/jasmine-2.0.0/boot.js | 181 - .../yamljs/test/lib/jasmine-2.0.0/console.js | 160 - .../test/lib/jasmine-2.0.0/jasmine-html.js | 359 - .../yamljs/test/lib/jasmine-2.0.0/jasmine.css | 55 - .../yamljs/test/lib/jasmine-2.0.0/jasmine.js | 2402 ----- .../lib/jasmine-2.0.0/jasmine_favicon.png | Bin 2057 -> 0 bytes node_modules/yamljs/test/spec/YamlSpec.coffee | 1474 --- node_modules/yamljs/test/spec/YamlSpec.js | 764 -- node_modules/yamljs/test/spec/example.yml | 4 - node_modules/yeast/LICENSE | 22 - node_modules/yeast/README.md | 82 - node_modules/yeast/index.js | 68 - node_modules/yeast/package.json | 64 - 888 files changed, 155803 deletions(-) delete mode 120000 node_modules/.bin/json2yaml delete mode 120000 node_modules/.bin/mime delete mode 120000 node_modules/.bin/yaml2json delete mode 100644 node_modules/accepts/HISTORY.md delete mode 100644 node_modules/accepts/LICENSE delete mode 100644 node_modules/accepts/README.md delete mode 100644 node_modules/accepts/index.js delete mode 100644 node_modules/accepts/package.json delete mode 100644 node_modules/after/.npmignore delete mode 100644 node_modules/after/.travis.yml delete mode 100644 node_modules/after/LICENCE delete mode 100644 node_modules/after/README.md delete mode 100644 node_modules/after/index.js delete mode 100644 node_modules/after/package.json delete mode 100644 node_modules/after/test/after-test.js delete mode 100644 node_modules/argparse/CHANGELOG.md delete mode 100644 node_modules/argparse/LICENSE delete mode 100644 node_modules/argparse/README.md delete mode 100644 node_modules/argparse/index.js delete mode 100644 node_modules/argparse/lib/action.js delete mode 100644 node_modules/argparse/lib/action/append.js delete mode 100644 node_modules/argparse/lib/action/append/constant.js delete mode 100644 node_modules/argparse/lib/action/count.js delete mode 100644 node_modules/argparse/lib/action/help.js delete mode 100644 node_modules/argparse/lib/action/store.js delete mode 100644 node_modules/argparse/lib/action/store/constant.js delete mode 100644 node_modules/argparse/lib/action/store/false.js delete mode 100644 node_modules/argparse/lib/action/store/true.js delete mode 100644 node_modules/argparse/lib/action/subparsers.js delete mode 100644 node_modules/argparse/lib/action/version.js delete mode 100644 node_modules/argparse/lib/action_container.js delete mode 100644 node_modules/argparse/lib/argparse.js delete mode 100644 node_modules/argparse/lib/argument/error.js delete mode 100644 node_modules/argparse/lib/argument/exclusive.js delete mode 100644 node_modules/argparse/lib/argument/group.js delete mode 100644 node_modules/argparse/lib/argument_parser.js delete mode 100644 node_modules/argparse/lib/const.js delete mode 100644 node_modules/argparse/lib/help/added_formatters.js delete mode 100644 node_modules/argparse/lib/help/formatter.js delete mode 100644 node_modules/argparse/lib/namespace.js delete mode 100644 node_modules/argparse/lib/utils.js delete mode 100644 node_modules/argparse/package.json delete mode 100644 node_modules/array-flatten/LICENSE delete mode 100644 node_modules/array-flatten/README.md delete mode 100644 node_modules/array-flatten/array-flatten.js delete mode 100644 node_modules/array-flatten/package.json delete mode 100644 node_modules/arraybuffer.slice/.npmignore delete mode 100644 node_modules/arraybuffer.slice/LICENCE delete mode 100644 node_modules/arraybuffer.slice/Makefile delete mode 100644 node_modules/arraybuffer.slice/README.md delete mode 100644 node_modules/arraybuffer.slice/index.js delete mode 100644 node_modules/arraybuffer.slice/package.json delete mode 100644 node_modules/arraybuffer.slice/test/slice-buffer.js delete mode 100644 node_modules/async-limiter/.eslintignore delete mode 100644 node_modules/async-limiter/.nycrc delete mode 100644 node_modules/async-limiter/.travis.yml delete mode 100644 node_modules/async-limiter/LICENSE delete mode 100644 node_modules/async-limiter/index.js delete mode 100644 node_modules/async-limiter/package.json delete mode 100644 node_modules/async-limiter/readme.md delete mode 100644 node_modules/backo2/.npmignore delete mode 100644 node_modules/backo2/History.md delete mode 100644 node_modules/backo2/Makefile delete mode 100644 node_modules/backo2/Readme.md delete mode 100644 node_modules/backo2/component.json delete mode 100644 node_modules/backo2/index.js delete mode 100644 node_modules/backo2/package.json delete mode 100644 node_modules/backo2/test/index.js delete mode 100644 node_modules/bad-words/.travis.yml delete mode 100644 node_modules/bad-words/CHANGELOG.md delete mode 100644 node_modules/bad-words/LICENSE delete mode 100644 node_modules/bad-words/Makefile delete mode 100644 node_modules/bad-words/README.md delete mode 100644 node_modules/bad-words/dist/badwords.js delete mode 100644 node_modules/bad-words/lib/badwords.js delete mode 100644 node_modules/bad-words/lib/lang.json delete mode 100644 node_modules/bad-words/package.json delete mode 100644 node_modules/bad-words/test/addWords.js delete mode 100644 node_modules/bad-words/test/filter.js delete mode 100644 node_modules/bad-words/test/isProfane.js delete mode 100644 node_modules/bad-words/test/removeWords.js delete mode 100644 node_modules/bad-words/test/replaceWord.js delete mode 100644 node_modules/badwords-list/.npmignore delete mode 100644 node_modules/badwords-list/LICENSE delete mode 100644 node_modules/badwords-list/Makefile delete mode 100644 node_modules/badwords-list/README.md delete mode 100644 node_modules/badwords-list/lib/array.js delete mode 100644 node_modules/badwords-list/lib/index.js delete mode 100644 node_modules/badwords-list/lib/object.js delete mode 100644 node_modules/badwords-list/lib/regexp.js delete mode 100644 node_modules/badwords-list/package.json delete mode 100644 node_modules/badwords-list/test/exports.js delete mode 100644 node_modules/balanced-match/.npmignore delete mode 100644 node_modules/balanced-match/LICENSE.md delete mode 100644 node_modules/balanced-match/README.md delete mode 100644 node_modules/balanced-match/index.js delete mode 100644 node_modules/balanced-match/package.json delete mode 100644 node_modules/base64-arraybuffer/.npmignore delete mode 100644 node_modules/base64-arraybuffer/.travis.yml delete mode 100644 node_modules/base64-arraybuffer/LICENSE-MIT delete mode 100644 node_modules/base64-arraybuffer/README.md delete mode 100644 node_modules/base64-arraybuffer/lib/base64-arraybuffer.js delete mode 100644 node_modules/base64-arraybuffer/package.json delete mode 100644 node_modules/base64id/CHANGELOG.md delete mode 100644 node_modules/base64id/LICENSE delete mode 100644 node_modules/base64id/README.md delete mode 100644 node_modules/base64id/lib/base64id.js delete mode 100644 node_modules/base64id/package.json delete mode 100644 node_modules/better-assert/.npmignore delete mode 100644 node_modules/better-assert/History.md delete mode 100644 node_modules/better-assert/Makefile delete mode 100644 node_modules/better-assert/Readme.md delete mode 100644 node_modules/better-assert/example.js delete mode 100644 node_modules/better-assert/index.js delete mode 100644 node_modules/better-assert/package.json delete mode 100644 node_modules/blob/.idea/blob.iml delete mode 100644 node_modules/blob/.idea/inspectionProfiles/profiles_settings.xml delete mode 100644 node_modules/blob/.idea/markdown-navigator.xml delete mode 100644 node_modules/blob/.idea/markdown-navigator/profiles_settings.xml delete mode 100644 node_modules/blob/.idea/modules.xml delete mode 100644 node_modules/blob/.idea/vcs.xml delete mode 100644 node_modules/blob/.idea/workspace.xml delete mode 100644 node_modules/blob/.zuul.yml delete mode 100644 node_modules/blob/LICENSE delete mode 100644 node_modules/blob/Makefile delete mode 100644 node_modules/blob/README.md delete mode 100644 node_modules/blob/component.json delete mode 100644 node_modules/blob/index.js delete mode 100644 node_modules/blob/package.json delete mode 100644 node_modules/blob/test/index.js delete mode 100644 node_modules/body-parser/HISTORY.md delete mode 100644 node_modules/body-parser/LICENSE delete mode 100644 node_modules/body-parser/README.md delete mode 100644 node_modules/body-parser/index.js delete mode 100644 node_modules/body-parser/lib/read.js delete mode 100644 node_modules/body-parser/lib/types/json.js delete mode 100644 node_modules/body-parser/lib/types/raw.js delete mode 100644 node_modules/body-parser/lib/types/text.js delete mode 100644 node_modules/body-parser/lib/types/urlencoded.js delete mode 100644 node_modules/body-parser/package.json delete mode 100644 node_modules/brace-expansion/LICENSE delete mode 100644 node_modules/brace-expansion/README.md delete mode 100644 node_modules/brace-expansion/index.js delete mode 100644 node_modules/brace-expansion/package.json delete mode 100644 node_modules/bytes/History.md delete mode 100644 node_modules/bytes/LICENSE delete mode 100644 node_modules/bytes/Readme.md delete mode 100644 node_modules/bytes/index.js delete mode 100644 node_modules/bytes/package.json delete mode 100644 node_modules/callsite/.npmignore delete mode 100644 node_modules/callsite/History.md delete mode 100644 node_modules/callsite/Makefile delete mode 100644 node_modules/callsite/Readme.md delete mode 100644 node_modules/callsite/index.js delete mode 100644 node_modules/callsite/package.json delete mode 100644 node_modules/component-bind/.npmignore delete mode 100644 node_modules/component-bind/History.md delete mode 100644 node_modules/component-bind/Makefile delete mode 100644 node_modules/component-bind/Readme.md delete mode 100644 node_modules/component-bind/component.json delete mode 100644 node_modules/component-bind/index.js delete mode 100644 node_modules/component-bind/package.json delete mode 100644 node_modules/component-emitter/History.md delete mode 100644 node_modules/component-emitter/LICENSE delete mode 100644 node_modules/component-emitter/Readme.md delete mode 100644 node_modules/component-emitter/index.js delete mode 100644 node_modules/component-emitter/package.json delete mode 100644 node_modules/component-inherit/.npmignore delete mode 100644 node_modules/component-inherit/History.md delete mode 100644 node_modules/component-inherit/Makefile delete mode 100644 node_modules/component-inherit/Readme.md delete mode 100644 node_modules/component-inherit/component.json delete mode 100644 node_modules/component-inherit/index.js delete mode 100644 node_modules/component-inherit/package.json delete mode 100644 node_modules/component-inherit/test/inherit.js delete mode 100644 node_modules/concat-map/.travis.yml delete mode 100644 node_modules/concat-map/LICENSE delete mode 100644 node_modules/concat-map/README.markdown delete mode 100644 node_modules/concat-map/example/map.js delete mode 100644 node_modules/concat-map/index.js delete mode 100644 node_modules/concat-map/package.json delete mode 100644 node_modules/concat-map/test/map.js delete mode 100644 node_modules/content-disposition/HISTORY.md delete mode 100644 node_modules/content-disposition/LICENSE delete mode 100644 node_modules/content-disposition/README.md delete mode 100644 node_modules/content-disposition/index.js delete mode 100644 node_modules/content-disposition/package.json delete mode 100644 node_modules/content-type/HISTORY.md delete mode 100644 node_modules/content-type/LICENSE delete mode 100644 node_modules/content-type/README.md delete mode 100644 node_modules/content-type/index.js delete mode 100644 node_modules/content-type/package.json delete mode 100644 node_modules/cookie-signature/.npmignore delete mode 100644 node_modules/cookie-signature/History.md delete mode 100644 node_modules/cookie-signature/Readme.md delete mode 100644 node_modules/cookie-signature/index.js delete mode 100644 node_modules/cookie-signature/package.json delete mode 100644 node_modules/cookie/HISTORY.md delete mode 100644 node_modules/cookie/LICENSE delete mode 100644 node_modules/cookie/README.md delete mode 100644 node_modules/cookie/index.js delete mode 100644 node_modules/cookie/package.json delete mode 100644 node_modules/debug/.coveralls.yml delete mode 100644 node_modules/debug/.eslintrc delete mode 100644 node_modules/debug/.npmignore delete mode 100644 node_modules/debug/.travis.yml delete mode 100644 node_modules/debug/CHANGELOG.md delete mode 100644 node_modules/debug/LICENSE delete mode 100644 node_modules/debug/Makefile delete mode 100644 node_modules/debug/README.md delete mode 100644 node_modules/debug/component.json delete mode 100644 node_modules/debug/karma.conf.js delete mode 100644 node_modules/debug/node.js delete mode 100644 node_modules/debug/package.json delete mode 100644 node_modules/debug/src/browser.js delete mode 100644 node_modules/debug/src/debug.js delete mode 100644 node_modules/debug/src/index.js delete mode 100644 node_modules/debug/src/inspector-log.js delete mode 100644 node_modules/debug/src/node.js delete mode 100644 node_modules/depd/History.md delete mode 100644 node_modules/depd/LICENSE delete mode 100644 node_modules/depd/Readme.md delete mode 100644 node_modules/depd/index.js delete mode 100644 node_modules/depd/lib/browser/index.js delete mode 100644 node_modules/depd/lib/compat/callsite-tostring.js delete mode 100644 node_modules/depd/lib/compat/event-listener-count.js delete mode 100644 node_modules/depd/lib/compat/index.js delete mode 100644 node_modules/depd/package.json delete mode 100644 node_modules/destroy/LICENSE delete mode 100644 node_modules/destroy/README.md delete mode 100644 node_modules/destroy/index.js delete mode 100644 node_modules/destroy/package.json delete mode 100644 node_modules/dotenv/CHANGELOG.md delete mode 100644 node_modules/dotenv/LICENSE delete mode 100644 node_modules/dotenv/README.md delete mode 100644 node_modules/dotenv/config.js delete mode 100644 node_modules/dotenv/lib/cli-options.js delete mode 100644 node_modules/dotenv/lib/env-options.js delete mode 100644 node_modules/dotenv/lib/main.js delete mode 100644 node_modules/dotenv/package.json delete mode 100644 node_modules/dotenv/types/index.d.ts delete mode 100644 node_modules/dotenv/types/test.ts delete mode 100644 node_modules/dotenv/types/tsconfig.json delete mode 100644 node_modules/dotenv/types/tslint.json delete mode 100644 node_modules/ee-first/LICENSE delete mode 100644 node_modules/ee-first/README.md delete mode 100644 node_modules/ee-first/index.js delete mode 100644 node_modules/ee-first/package.json delete mode 100644 node_modules/encodeurl/HISTORY.md delete mode 100644 node_modules/encodeurl/LICENSE delete mode 100644 node_modules/encodeurl/README.md delete mode 100644 node_modules/encodeurl/index.js delete mode 100644 node_modules/encodeurl/package.json delete mode 100644 node_modules/engine.io-client/LICENSE delete mode 100644 node_modules/engine.io-client/README.md delete mode 100644 node_modules/engine.io-client/engine.io.js delete mode 100644 node_modules/engine.io-client/lib/index.js delete mode 100644 node_modules/engine.io-client/lib/socket.js delete mode 100644 node_modules/engine.io-client/lib/transport.js delete mode 100755 node_modules/engine.io-client/lib/transports/index.js delete mode 100644 node_modules/engine.io-client/lib/transports/polling-jsonp.js delete mode 100755 node_modules/engine.io-client/lib/transports/polling-xhr.js delete mode 100644 node_modules/engine.io-client/lib/transports/polling.js delete mode 100644 node_modules/engine.io-client/lib/transports/websocket.js delete mode 100644 node_modules/engine.io-client/lib/xmlhttprequest.js delete mode 100644 node_modules/engine.io-client/node_modules/debug/CHANGELOG.md delete mode 100644 node_modules/engine.io-client/node_modules/debug/LICENSE delete mode 100644 node_modules/engine.io-client/node_modules/debug/README.md delete mode 100644 node_modules/engine.io-client/node_modules/debug/dist/debug.js delete mode 100644 node_modules/engine.io-client/node_modules/debug/package.json delete mode 100644 node_modules/engine.io-client/node_modules/debug/src/browser.js delete mode 100644 node_modules/engine.io-client/node_modules/debug/src/common.js delete mode 100644 node_modules/engine.io-client/node_modules/debug/src/index.js delete mode 100644 node_modules/engine.io-client/node_modules/debug/src/node.js delete mode 100644 node_modules/engine.io-client/node_modules/ms/index.js delete mode 100644 node_modules/engine.io-client/node_modules/ms/license.md delete mode 100644 node_modules/engine.io-client/node_modules/ms/package.json delete mode 100644 node_modules/engine.io-client/node_modules/ms/readme.md delete mode 100644 node_modules/engine.io-client/node_modules/ws/LICENSE delete mode 100644 node_modules/engine.io-client/node_modules/ws/README.md delete mode 100644 node_modules/engine.io-client/node_modules/ws/browser.js delete mode 100644 node_modules/engine.io-client/node_modules/ws/index.js delete mode 100644 node_modules/engine.io-client/node_modules/ws/lib/buffer-util.js delete mode 100644 node_modules/engine.io-client/node_modules/ws/lib/constants.js delete mode 100644 node_modules/engine.io-client/node_modules/ws/lib/event-target.js delete mode 100644 node_modules/engine.io-client/node_modules/ws/lib/extension.js delete mode 100644 node_modules/engine.io-client/node_modules/ws/lib/permessage-deflate.js delete mode 100644 node_modules/engine.io-client/node_modules/ws/lib/receiver.js delete mode 100644 node_modules/engine.io-client/node_modules/ws/lib/sender.js delete mode 100644 node_modules/engine.io-client/node_modules/ws/lib/validation.js delete mode 100644 node_modules/engine.io-client/node_modules/ws/lib/websocket-server.js delete mode 100644 node_modules/engine.io-client/node_modules/ws/lib/websocket.js delete mode 100644 node_modules/engine.io-client/node_modules/ws/package.json delete mode 100644 node_modules/engine.io-client/package.json delete mode 100644 node_modules/engine.io-parser/LICENSE delete mode 100644 node_modules/engine.io-parser/Readme.md delete mode 100644 node_modules/engine.io-parser/lib/browser.js delete mode 100644 node_modules/engine.io-parser/lib/index.js delete mode 100644 node_modules/engine.io-parser/lib/keys.js delete mode 100644 node_modules/engine.io-parser/lib/utf8.js delete mode 100644 node_modules/engine.io-parser/package.json delete mode 100644 node_modules/engine.io/LICENSE delete mode 100644 node_modules/engine.io/README.md delete mode 100644 node_modules/engine.io/lib/engine.io.js delete mode 100644 node_modules/engine.io/lib/server.js delete mode 100644 node_modules/engine.io/lib/socket.js delete mode 100644 node_modules/engine.io/lib/transport.js delete mode 100644 node_modules/engine.io/lib/transports/index.js delete mode 100644 node_modules/engine.io/lib/transports/polling-jsonp.js delete mode 100644 node_modules/engine.io/lib/transports/polling-xhr.js delete mode 100644 node_modules/engine.io/lib/transports/polling.js delete mode 100644 node_modules/engine.io/lib/transports/websocket.js delete mode 100644 node_modules/engine.io/node_modules/cookie/HISTORY.md delete mode 100644 node_modules/engine.io/node_modules/cookie/LICENSE delete mode 100644 node_modules/engine.io/node_modules/cookie/README.md delete mode 100644 node_modules/engine.io/node_modules/cookie/index.js delete mode 100644 node_modules/engine.io/node_modules/cookie/package.json delete mode 100644 node_modules/engine.io/node_modules/debug/CHANGELOG.md delete mode 100644 node_modules/engine.io/node_modules/debug/LICENSE delete mode 100644 node_modules/engine.io/node_modules/debug/README.md delete mode 100644 node_modules/engine.io/node_modules/debug/dist/debug.js delete mode 100644 node_modules/engine.io/node_modules/debug/package.json delete mode 100644 node_modules/engine.io/node_modules/debug/src/browser.js delete mode 100644 node_modules/engine.io/node_modules/debug/src/common.js delete mode 100644 node_modules/engine.io/node_modules/debug/src/index.js delete mode 100644 node_modules/engine.io/node_modules/debug/src/node.js delete mode 100644 node_modules/engine.io/node_modules/ms/index.js delete mode 100644 node_modules/engine.io/node_modules/ms/license.md delete mode 100644 node_modules/engine.io/node_modules/ms/package.json delete mode 100644 node_modules/engine.io/node_modules/ms/readme.md delete mode 100644 node_modules/engine.io/package.json delete mode 100644 node_modules/escape-html/LICENSE delete mode 100644 node_modules/escape-html/Readme.md delete mode 100644 node_modules/escape-html/index.js delete mode 100644 node_modules/escape-html/package.json delete mode 100644 node_modules/etag/HISTORY.md delete mode 100644 node_modules/etag/LICENSE delete mode 100644 node_modules/etag/README.md delete mode 100644 node_modules/etag/index.js delete mode 100644 node_modules/etag/package.json delete mode 100644 node_modules/express/History.md delete mode 100644 node_modules/express/LICENSE delete mode 100644 node_modules/express/Readme.md delete mode 100644 node_modules/express/index.js delete mode 100644 node_modules/express/lib/application.js delete mode 100644 node_modules/express/lib/express.js delete mode 100644 node_modules/express/lib/middleware/init.js delete mode 100644 node_modules/express/lib/middleware/query.js delete mode 100644 node_modules/express/lib/request.js delete mode 100644 node_modules/express/lib/response.js delete mode 100644 node_modules/express/lib/router/index.js delete mode 100644 node_modules/express/lib/router/layer.js delete mode 100644 node_modules/express/lib/router/route.js delete mode 100644 node_modules/express/lib/utils.js delete mode 100644 node_modules/express/lib/view.js delete mode 100644 node_modules/express/package.json delete mode 100644 node_modules/finalhandler/HISTORY.md delete mode 100644 node_modules/finalhandler/LICENSE delete mode 100644 node_modules/finalhandler/README.md delete mode 100644 node_modules/finalhandler/index.js delete mode 100644 node_modules/finalhandler/package.json delete mode 100644 node_modules/forwarded/HISTORY.md delete mode 100644 node_modules/forwarded/LICENSE delete mode 100644 node_modules/forwarded/README.md delete mode 100644 node_modules/forwarded/index.js delete mode 100644 node_modules/forwarded/package.json delete mode 100644 node_modules/fresh/HISTORY.md delete mode 100644 node_modules/fresh/LICENSE delete mode 100644 node_modules/fresh/README.md delete mode 100644 node_modules/fresh/index.js delete mode 100644 node_modules/fresh/package.json delete mode 100644 node_modules/fs.realpath/LICENSE delete mode 100644 node_modules/fs.realpath/README.md delete mode 100644 node_modules/fs.realpath/index.js delete mode 100644 node_modules/fs.realpath/old.js delete mode 100644 node_modules/fs.realpath/package.json delete mode 100644 node_modules/glob/LICENSE delete mode 100644 node_modules/glob/README.md delete mode 100644 node_modules/glob/changelog.md delete mode 100644 node_modules/glob/common.js delete mode 100644 node_modules/glob/glob.js delete mode 100644 node_modules/glob/package.json delete mode 100644 node_modules/glob/sync.js delete mode 100644 node_modules/has-binary2/History.md delete mode 100644 node_modules/has-binary2/LICENSE delete mode 100644 node_modules/has-binary2/README.md delete mode 100644 node_modules/has-binary2/index.js delete mode 100644 node_modules/has-binary2/package.json delete mode 100644 node_modules/has-cors/.npmignore delete mode 100644 node_modules/has-cors/History.md delete mode 100644 node_modules/has-cors/Makefile delete mode 100644 node_modules/has-cors/Readme.md delete mode 100644 node_modules/has-cors/component.json delete mode 100644 node_modules/has-cors/index.js delete mode 100644 node_modules/has-cors/package.json delete mode 100644 node_modules/has-cors/test.js delete mode 100644 node_modules/http-errors/HISTORY.md delete mode 100644 node_modules/http-errors/LICENSE delete mode 100644 node_modules/http-errors/README.md delete mode 100644 node_modules/http-errors/index.js delete mode 100644 node_modules/http-errors/package.json delete mode 100644 node_modules/iconv-lite/Changelog.md delete mode 100644 node_modules/iconv-lite/LICENSE delete mode 100644 node_modules/iconv-lite/README.md delete mode 100644 node_modules/iconv-lite/encodings/dbcs-codec.js delete mode 100644 node_modules/iconv-lite/encodings/dbcs-data.js delete mode 100644 node_modules/iconv-lite/encodings/index.js delete mode 100644 node_modules/iconv-lite/encodings/internal.js delete mode 100644 node_modules/iconv-lite/encodings/sbcs-codec.js delete mode 100644 node_modules/iconv-lite/encodings/sbcs-data-generated.js delete mode 100644 node_modules/iconv-lite/encodings/sbcs-data.js delete mode 100644 node_modules/iconv-lite/encodings/tables/big5-added.json delete mode 100644 node_modules/iconv-lite/encodings/tables/cp936.json delete mode 100644 node_modules/iconv-lite/encodings/tables/cp949.json delete mode 100644 node_modules/iconv-lite/encodings/tables/cp950.json delete mode 100644 node_modules/iconv-lite/encodings/tables/eucjp.json delete mode 100644 node_modules/iconv-lite/encodings/tables/gb18030-ranges.json delete mode 100644 node_modules/iconv-lite/encodings/tables/gbk-added.json delete mode 100644 node_modules/iconv-lite/encodings/tables/shiftjis.json delete mode 100644 node_modules/iconv-lite/encodings/utf16.js delete mode 100644 node_modules/iconv-lite/encodings/utf7.js delete mode 100644 node_modules/iconv-lite/lib/bom-handling.js delete mode 100644 node_modules/iconv-lite/lib/extend-node.js delete mode 100644 node_modules/iconv-lite/lib/index.d.ts delete mode 100644 node_modules/iconv-lite/lib/index.js delete mode 100644 node_modules/iconv-lite/lib/streams.js delete mode 100644 node_modules/iconv-lite/package.json delete mode 100644 node_modules/indexof/.npmignore delete mode 100644 node_modules/indexof/Makefile delete mode 100644 node_modules/indexof/Readme.md delete mode 100644 node_modules/indexof/component.json delete mode 100644 node_modules/indexof/index.js delete mode 100644 node_modules/indexof/package.json delete mode 100644 node_modules/inflight/LICENSE delete mode 100644 node_modules/inflight/README.md delete mode 100644 node_modules/inflight/inflight.js delete mode 100644 node_modules/inflight/package.json delete mode 100644 node_modules/inherits/LICENSE delete mode 100644 node_modules/inherits/README.md delete mode 100644 node_modules/inherits/inherits.js delete mode 100644 node_modules/inherits/inherits_browser.js delete mode 100644 node_modules/inherits/package.json delete mode 100644 node_modules/ipaddr.js/LICENSE delete mode 100644 node_modules/ipaddr.js/README.md delete mode 100644 node_modules/ipaddr.js/ipaddr.min.js delete mode 100644 node_modules/ipaddr.js/lib/ipaddr.js delete mode 100644 node_modules/ipaddr.js/lib/ipaddr.js.d.ts delete mode 100644 node_modules/ipaddr.js/package.json delete mode 100644 node_modules/isarray/README.md delete mode 100644 node_modules/isarray/index.js delete mode 100644 node_modules/isarray/package.json delete mode 100644 node_modules/media-typer/HISTORY.md delete mode 100644 node_modules/media-typer/LICENSE delete mode 100644 node_modules/media-typer/README.md delete mode 100644 node_modules/media-typer/index.js delete mode 100644 node_modules/media-typer/package.json delete mode 100644 node_modules/merge-descriptors/HISTORY.md delete mode 100644 node_modules/merge-descriptors/LICENSE delete mode 100644 node_modules/merge-descriptors/README.md delete mode 100644 node_modules/merge-descriptors/index.js delete mode 100644 node_modules/merge-descriptors/package.json delete mode 100644 node_modules/methods/HISTORY.md delete mode 100644 node_modules/methods/LICENSE delete mode 100644 node_modules/methods/README.md delete mode 100644 node_modules/methods/index.js delete mode 100644 node_modules/methods/package.json delete mode 100644 node_modules/mime-db/HISTORY.md delete mode 100644 node_modules/mime-db/LICENSE delete mode 100644 node_modules/mime-db/README.md delete mode 100644 node_modules/mime-db/db.json delete mode 100644 node_modules/mime-db/index.js delete mode 100644 node_modules/mime-db/package.json delete mode 100644 node_modules/mime-types/HISTORY.md delete mode 100644 node_modules/mime-types/LICENSE delete mode 100644 node_modules/mime-types/README.md delete mode 100644 node_modules/mime-types/index.js delete mode 100644 node_modules/mime-types/package.json delete mode 100644 node_modules/mime/.npmignore delete mode 100644 node_modules/mime/CHANGELOG.md delete mode 100644 node_modules/mime/LICENSE delete mode 100644 node_modules/mime/README.md delete mode 100755 node_modules/mime/cli.js delete mode 100644 node_modules/mime/mime.js delete mode 100644 node_modules/mime/package.json delete mode 100755 node_modules/mime/src/build.js delete mode 100644 node_modules/mime/src/test.js delete mode 100644 node_modules/mime/types.json delete mode 100644 node_modules/minimatch/LICENSE delete mode 100644 node_modules/minimatch/README.md delete mode 100644 node_modules/minimatch/minimatch.js delete mode 100644 node_modules/minimatch/package.json delete mode 100644 node_modules/ms/index.js delete mode 100644 node_modules/ms/license.md delete mode 100644 node_modules/ms/package.json delete mode 100644 node_modules/ms/readme.md delete mode 100644 node_modules/negotiator/HISTORY.md delete mode 100644 node_modules/negotiator/LICENSE delete mode 100644 node_modules/negotiator/README.md delete mode 100644 node_modules/negotiator/index.js delete mode 100644 node_modules/negotiator/lib/charset.js delete mode 100644 node_modules/negotiator/lib/encoding.js delete mode 100644 node_modules/negotiator/lib/language.js delete mode 100644 node_modules/negotiator/lib/mediaType.js delete mode 100644 node_modules/negotiator/package.json delete mode 100644 node_modules/object-component/.npmignore delete mode 100644 node_modules/object-component/History.md delete mode 100644 node_modules/object-component/Makefile delete mode 100644 node_modules/object-component/Readme.md delete mode 100644 node_modules/object-component/component.json delete mode 100644 node_modules/object-component/index.js delete mode 100644 node_modules/object-component/package.json delete mode 100644 node_modules/object-component/test/object.js delete mode 100644 node_modules/on-finished/HISTORY.md delete mode 100644 node_modules/on-finished/LICENSE delete mode 100644 node_modules/on-finished/README.md delete mode 100644 node_modules/on-finished/index.js delete mode 100644 node_modules/on-finished/package.json delete mode 100644 node_modules/once/LICENSE delete mode 100644 node_modules/once/README.md delete mode 100644 node_modules/once/once.js delete mode 100644 node_modules/once/package.json delete mode 100644 node_modules/parseqs/.npmignore delete mode 100644 node_modules/parseqs/LICENSE delete mode 100644 node_modules/parseqs/Makefile delete mode 100644 node_modules/parseqs/README.md delete mode 100644 node_modules/parseqs/index.js delete mode 100644 node_modules/parseqs/package.json delete mode 100644 node_modules/parseqs/test.js delete mode 100644 node_modules/parseuri/.npmignore delete mode 100644 node_modules/parseuri/History.md delete mode 100644 node_modules/parseuri/LICENSE delete mode 100644 node_modules/parseuri/Makefile delete mode 100644 node_modules/parseuri/README.md delete mode 100644 node_modules/parseuri/index.js delete mode 100644 node_modules/parseuri/package.json delete mode 100644 node_modules/parseuri/test.js delete mode 100644 node_modules/parseurl/HISTORY.md delete mode 100644 node_modules/parseurl/LICENSE delete mode 100644 node_modules/parseurl/README.md delete mode 100644 node_modules/parseurl/index.js delete mode 100644 node_modules/parseurl/package.json delete mode 100644 node_modules/path-is-absolute/index.js delete mode 100644 node_modules/path-is-absolute/license delete mode 100644 node_modules/path-is-absolute/package.json delete mode 100644 node_modules/path-is-absolute/readme.md delete mode 100644 node_modules/path-to-regexp/History.md delete mode 100644 node_modules/path-to-regexp/LICENSE delete mode 100644 node_modules/path-to-regexp/Readme.md delete mode 100644 node_modules/path-to-regexp/index.js delete mode 100644 node_modules/path-to-regexp/package.json delete mode 100644 node_modules/proxy-addr/HISTORY.md delete mode 100644 node_modules/proxy-addr/LICENSE delete mode 100644 node_modules/proxy-addr/README.md delete mode 100644 node_modules/proxy-addr/index.js delete mode 100644 node_modules/proxy-addr/package.json delete mode 100644 node_modules/qs/.editorconfig delete mode 100644 node_modules/qs/.eslintignore delete mode 100644 node_modules/qs/.eslintrc delete mode 100644 node_modules/qs/CHANGELOG.md delete mode 100644 node_modules/qs/LICENSE delete mode 100644 node_modules/qs/README.md delete mode 100644 node_modules/qs/dist/qs.js delete mode 100644 node_modules/qs/lib/formats.js delete mode 100644 node_modules/qs/lib/index.js delete mode 100644 node_modules/qs/lib/parse.js delete mode 100644 node_modules/qs/lib/stringify.js delete mode 100644 node_modules/qs/lib/utils.js delete mode 100644 node_modules/qs/package.json delete mode 100644 node_modules/qs/test/.eslintrc delete mode 100644 node_modules/qs/test/index.js delete mode 100644 node_modules/qs/test/parse.js delete mode 100644 node_modules/qs/test/stringify.js delete mode 100644 node_modules/qs/test/utils.js delete mode 100644 node_modules/range-parser/HISTORY.md delete mode 100644 node_modules/range-parser/LICENSE delete mode 100644 node_modules/range-parser/README.md delete mode 100644 node_modules/range-parser/index.js delete mode 100644 node_modules/range-parser/package.json delete mode 100644 node_modules/raw-body/HISTORY.md delete mode 100644 node_modules/raw-body/LICENSE delete mode 100644 node_modules/raw-body/README.md delete mode 100644 node_modules/raw-body/index.d.ts delete mode 100644 node_modules/raw-body/index.js delete mode 100644 node_modules/raw-body/package.json delete mode 100755 node_modules/rita/LICENSE delete mode 100644 node_modules/rita/README.md delete mode 100644 node_modules/rita/gulpfile.js delete mode 100644 node_modules/rita/lib/rita-tiny.js delete mode 100644 node_modules/rita/lib/rita.js delete mode 100644 node_modules/rita/package.json delete mode 100644 node_modules/rita/test/LibStructure-tests.js delete mode 100644 node_modules/rita/test/RiGrammar-tests.js delete mode 100644 node_modules/rita/test/RiMarkov-tests.js delete mode 100644 node_modules/rita/test/RiString-tests.js delete mode 100644 node_modules/rita/test/RiTa-tests.js delete mode 100644 node_modules/rita/test/UrlLoading-tests.js delete mode 100644 node_modules/rita/test/html/data/haikuGrammar.json delete mode 100644 node_modules/rita/test/html/data/haikuGrammar.yaml delete mode 100644 node_modules/rita/test/html/data/haikuGrammar2.json delete mode 100644 node_modules/rita/test/html/data/haikuGrammar2.yaml delete mode 100644 node_modules/rita/test/html/data/kafka.txt delete mode 100644 node_modules/rita/test/html/data/sentence1.json delete mode 100644 node_modules/rita/test/html/data/sentence1.yaml delete mode 100644 node_modules/rita/test/html/data/sentence2.json delete mode 100644 node_modules/rita/test/html/data/sentence2.yaml delete mode 100644 node_modules/rita/test/html/data/tate.txt delete mode 100644 node_modules/rita/test/html/data/wittgenstein.txt delete mode 100644 node_modules/rita/test/qunit-helpers.js delete mode 100755 node_modules/rita/tonic.js delete mode 100644 node_modules/safe-buffer/LICENSE delete mode 100644 node_modules/safe-buffer/README.md delete mode 100644 node_modules/safe-buffer/index.d.ts delete mode 100644 node_modules/safe-buffer/index.js delete mode 100644 node_modules/safe-buffer/package.json delete mode 100644 node_modules/safer-buffer/LICENSE delete mode 100644 node_modules/safer-buffer/Porting-Buffer.md delete mode 100644 node_modules/safer-buffer/Readme.md delete mode 100644 node_modules/safer-buffer/dangerous.js delete mode 100644 node_modules/safer-buffer/package.json delete mode 100644 node_modules/safer-buffer/safer.js delete mode 100644 node_modules/safer-buffer/tests.js delete mode 100644 node_modules/send/HISTORY.md delete mode 100644 node_modules/send/LICENSE delete mode 100644 node_modules/send/README.md delete mode 100644 node_modules/send/index.js delete mode 100644 node_modules/send/node_modules/ms/index.js delete mode 100644 node_modules/send/node_modules/ms/license.md delete mode 100644 node_modules/send/node_modules/ms/package.json delete mode 100644 node_modules/send/node_modules/ms/readme.md delete mode 100644 node_modules/send/package.json delete mode 100644 node_modules/serve-static/HISTORY.md delete mode 100644 node_modules/serve-static/LICENSE delete mode 100644 node_modules/serve-static/README.md delete mode 100644 node_modules/serve-static/index.js delete mode 100644 node_modules/serve-static/package.json delete mode 100644 node_modules/setprototypeof/LICENSE delete mode 100644 node_modules/setprototypeof/README.md delete mode 100644 node_modules/setprototypeof/index.d.ts delete mode 100644 node_modules/setprototypeof/index.js delete mode 100644 node_modules/setprototypeof/package.json delete mode 100644 node_modules/setprototypeof/test/index.js delete mode 100644 node_modules/socket.io-adapter/.idea/$CACHE_FILE$ delete mode 100644 node_modules/socket.io-adapter/.idea/inspectionProfiles/profiles_settings.xml delete mode 100644 node_modules/socket.io-adapter/.idea/misc.xml delete mode 100644 node_modules/socket.io-adapter/.idea/modules.xml delete mode 100644 node_modules/socket.io-adapter/.idea/socket.io-adapter.iml delete mode 100644 node_modules/socket.io-adapter/.idea/vcs.xml delete mode 100644 node_modules/socket.io-adapter/.idea/workspace.xml delete mode 100644 node_modules/socket.io-adapter/LICENSE delete mode 100644 node_modules/socket.io-adapter/Readme.md delete mode 100644 node_modules/socket.io-adapter/index.js delete mode 100644 node_modules/socket.io-adapter/package.json delete mode 100644 node_modules/socket.io-client/LICENSE delete mode 100644 node_modules/socket.io-client/README.md delete mode 100644 node_modules/socket.io-client/dist/socket.io.dev.js delete mode 100644 node_modules/socket.io-client/dist/socket.io.dev.js.map delete mode 100644 node_modules/socket.io-client/dist/socket.io.js delete mode 100644 node_modules/socket.io-client/dist/socket.io.js.map delete mode 100644 node_modules/socket.io-client/dist/socket.io.slim.dev.js delete mode 100644 node_modules/socket.io-client/dist/socket.io.slim.dev.js.map delete mode 100644 node_modules/socket.io-client/dist/socket.io.slim.js delete mode 100644 node_modules/socket.io-client/dist/socket.io.slim.js.map delete mode 100644 node_modules/socket.io-client/lib/index.js delete mode 100644 node_modules/socket.io-client/lib/manager.js delete mode 100644 node_modules/socket.io-client/lib/on.js delete mode 100644 node_modules/socket.io-client/lib/socket.js delete mode 100644 node_modules/socket.io-client/lib/url.js delete mode 100644 node_modules/socket.io-client/node_modules/debug/CHANGELOG.md delete mode 100644 node_modules/socket.io-client/node_modules/debug/LICENSE delete mode 100644 node_modules/socket.io-client/node_modules/debug/README.md delete mode 100644 node_modules/socket.io-client/node_modules/debug/dist/debug.js delete mode 100644 node_modules/socket.io-client/node_modules/debug/package.json delete mode 100644 node_modules/socket.io-client/node_modules/debug/src/browser.js delete mode 100644 node_modules/socket.io-client/node_modules/debug/src/common.js delete mode 100644 node_modules/socket.io-client/node_modules/debug/src/index.js delete mode 100644 node_modules/socket.io-client/node_modules/debug/src/node.js delete mode 100644 node_modules/socket.io-client/node_modules/ms/index.js delete mode 100644 node_modules/socket.io-client/node_modules/ms/license.md delete mode 100644 node_modules/socket.io-client/node_modules/ms/package.json delete mode 100644 node_modules/socket.io-client/node_modules/ms/readme.md delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/LICENSE delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/Readme.md delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/binary.js delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/index.js delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/is-buffer.js delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/node_modules/debug/.coveralls.yml delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/node_modules/debug/.eslintrc delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/node_modules/debug/.npmignore delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/node_modules/debug/.travis.yml delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/node_modules/debug/CHANGELOG.md delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/node_modules/debug/LICENSE delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/node_modules/debug/Makefile delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/node_modules/debug/README.md delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/node_modules/debug/karma.conf.js delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/node_modules/debug/node.js delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/node_modules/debug/package.json delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/node_modules/debug/src/browser.js delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/node_modules/debug/src/debug.js delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/node_modules/debug/src/index.js delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/node_modules/debug/src/node.js delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/node_modules/ms/index.js delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/node_modules/ms/license.md delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/node_modules/ms/package.json delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/node_modules/ms/readme.md delete mode 100644 node_modules/socket.io-client/node_modules/socket.io-parser/package.json delete mode 100644 node_modules/socket.io-client/package.json delete mode 100644 node_modules/socket.io-parser/LICENSE delete mode 100644 node_modules/socket.io-parser/Readme.md delete mode 100644 node_modules/socket.io-parser/binary.js delete mode 100644 node_modules/socket.io-parser/index.js delete mode 100644 node_modules/socket.io-parser/is-buffer.js delete mode 100644 node_modules/socket.io-parser/node_modules/debug/CHANGELOG.md delete mode 100644 node_modules/socket.io-parser/node_modules/debug/LICENSE delete mode 100644 node_modules/socket.io-parser/node_modules/debug/README.md delete mode 100644 node_modules/socket.io-parser/node_modules/debug/dist/debug.js delete mode 100644 node_modules/socket.io-parser/node_modules/debug/package.json delete mode 100644 node_modules/socket.io-parser/node_modules/debug/src/browser.js delete mode 100644 node_modules/socket.io-parser/node_modules/debug/src/common.js delete mode 100644 node_modules/socket.io-parser/node_modules/debug/src/index.js delete mode 100644 node_modules/socket.io-parser/node_modules/debug/src/node.js delete mode 100644 node_modules/socket.io-parser/node_modules/ms/index.js delete mode 100644 node_modules/socket.io-parser/node_modules/ms/license.md delete mode 100644 node_modules/socket.io-parser/node_modules/ms/package.json delete mode 100644 node_modules/socket.io-parser/node_modules/ms/readme.md delete mode 100644 node_modules/socket.io-parser/package.json delete mode 100644 node_modules/socket.io/LICENSE delete mode 100644 node_modules/socket.io/Readme.md delete mode 100644 node_modules/socket.io/lib/client.js delete mode 100644 node_modules/socket.io/lib/index.js delete mode 100644 node_modules/socket.io/lib/namespace.js delete mode 100644 node_modules/socket.io/lib/parent-namespace.js delete mode 100644 node_modules/socket.io/lib/socket.js delete mode 100644 node_modules/socket.io/node_modules/debug/CHANGELOG.md delete mode 100644 node_modules/socket.io/node_modules/debug/LICENSE delete mode 100644 node_modules/socket.io/node_modules/debug/README.md delete mode 100644 node_modules/socket.io/node_modules/debug/dist/debug.js delete mode 100644 node_modules/socket.io/node_modules/debug/package.json delete mode 100644 node_modules/socket.io/node_modules/debug/src/browser.js delete mode 100644 node_modules/socket.io/node_modules/debug/src/common.js delete mode 100644 node_modules/socket.io/node_modules/debug/src/index.js delete mode 100644 node_modules/socket.io/node_modules/debug/src/node.js delete mode 100644 node_modules/socket.io/node_modules/ms/index.js delete mode 100644 node_modules/socket.io/node_modules/ms/license.md delete mode 100644 node_modules/socket.io/node_modules/ms/package.json delete mode 100644 node_modules/socket.io/node_modules/ms/readme.md delete mode 100644 node_modules/socket.io/package.json delete mode 100644 node_modules/sprintf-js/.npmignore delete mode 100644 node_modules/sprintf-js/LICENSE delete mode 100644 node_modules/sprintf-js/README.md delete mode 100644 node_modules/sprintf-js/bower.json delete mode 100644 node_modules/sprintf-js/demo/angular.html delete mode 100644 node_modules/sprintf-js/dist/angular-sprintf.min.js delete mode 100644 node_modules/sprintf-js/dist/angular-sprintf.min.js.map delete mode 100644 node_modules/sprintf-js/dist/angular-sprintf.min.map delete mode 100644 node_modules/sprintf-js/dist/sprintf.min.js delete mode 100644 node_modules/sprintf-js/dist/sprintf.min.js.map delete mode 100644 node_modules/sprintf-js/dist/sprintf.min.map delete mode 100644 node_modules/sprintf-js/gruntfile.js delete mode 100644 node_modules/sprintf-js/package.json delete mode 100644 node_modules/sprintf-js/src/angular-sprintf.js delete mode 100644 node_modules/sprintf-js/src/sprintf.js delete mode 100644 node_modules/sprintf-js/test/test.js delete mode 100644 node_modules/statuses/HISTORY.md delete mode 100644 node_modules/statuses/LICENSE delete mode 100644 node_modules/statuses/README.md delete mode 100644 node_modules/statuses/codes.json delete mode 100644 node_modules/statuses/index.js delete mode 100644 node_modules/statuses/package.json delete mode 100644 node_modules/to-array/.npmignore delete mode 100644 node_modules/to-array/LICENCE delete mode 100644 node_modules/to-array/README.md delete mode 100644 node_modules/to-array/index.js delete mode 100644 node_modules/to-array/package.json delete mode 100644 node_modules/toidentifier/LICENSE delete mode 100644 node_modules/toidentifier/README.md delete mode 100644 node_modules/toidentifier/index.js delete mode 100644 node_modules/toidentifier/package.json delete mode 100644 node_modules/type-is/HISTORY.md delete mode 100644 node_modules/type-is/LICENSE delete mode 100644 node_modules/type-is/README.md delete mode 100644 node_modules/type-is/index.js delete mode 100644 node_modules/type-is/package.json delete mode 100644 node_modules/unpipe/HISTORY.md delete mode 100644 node_modules/unpipe/LICENSE delete mode 100644 node_modules/unpipe/README.md delete mode 100644 node_modules/unpipe/index.js delete mode 100644 node_modules/unpipe/package.json delete mode 100644 node_modules/utils-merge/.npmignore delete mode 100644 node_modules/utils-merge/LICENSE delete mode 100644 node_modules/utils-merge/README.md delete mode 100644 node_modules/utils-merge/index.js delete mode 100644 node_modules/utils-merge/package.json delete mode 100644 node_modules/vary/HISTORY.md delete mode 100644 node_modules/vary/LICENSE delete mode 100644 node_modules/vary/README.md delete mode 100644 node_modules/vary/index.js delete mode 100644 node_modules/vary/package.json delete mode 100644 node_modules/wrappy/LICENSE delete mode 100644 node_modules/wrappy/README.md delete mode 100644 node_modules/wrappy/package.json delete mode 100644 node_modules/wrappy/wrappy.js delete mode 100644 node_modules/ws/LICENSE delete mode 100644 node_modules/ws/README.md delete mode 100644 node_modules/ws/browser.js delete mode 100644 node_modules/ws/index.js delete mode 100644 node_modules/ws/lib/buffer-util.js delete mode 100644 node_modules/ws/lib/constants.js delete mode 100644 node_modules/ws/lib/event-target.js delete mode 100644 node_modules/ws/lib/extension.js delete mode 100644 node_modules/ws/lib/limiter.js delete mode 100644 node_modules/ws/lib/permessage-deflate.js delete mode 100644 node_modules/ws/lib/receiver.js delete mode 100644 node_modules/ws/lib/sender.js delete mode 100644 node_modules/ws/lib/stream.js delete mode 100644 node_modules/ws/lib/validation.js delete mode 100644 node_modules/ws/lib/websocket-server.js delete mode 100644 node_modules/ws/lib/websocket.js delete mode 100644 node_modules/ws/package.json delete mode 100644 node_modules/xmlhttprequest-ssl/LICENSE delete mode 100644 node_modules/xmlhttprequest-ssl/README.md delete mode 100644 node_modules/xmlhttprequest-ssl/autotest.watchr delete mode 100644 node_modules/xmlhttprequest-ssl/example/demo.js delete mode 100644 node_modules/xmlhttprequest-ssl/lib/XMLHttpRequest.js delete mode 100644 node_modules/xmlhttprequest-ssl/package.json delete mode 100644 node_modules/xmlhttprequest-ssl/tests/test-constants.js delete mode 100644 node_modules/xmlhttprequest-ssl/tests/test-events.js delete mode 100644 node_modules/xmlhttprequest-ssl/tests/test-exceptions.js delete mode 100644 node_modules/xmlhttprequest-ssl/tests/test-headers.js delete mode 100644 node_modules/xmlhttprequest-ssl/tests/test-redirect-302.js delete mode 100644 node_modules/xmlhttprequest-ssl/tests/test-redirect-303.js delete mode 100644 node_modules/xmlhttprequest-ssl/tests/test-redirect-307.js delete mode 100644 node_modules/xmlhttprequest-ssl/tests/test-request-methods.js delete mode 100644 node_modules/xmlhttprequest-ssl/tests/test-request-protocols.js delete mode 100644 node_modules/xmlhttprequest-ssl/tests/testdata.txt delete mode 100644 node_modules/yamljs/.npmignore delete mode 100644 node_modules/yamljs/.travis.yml delete mode 100644 node_modules/yamljs/Cakefile delete mode 100644 node_modules/yamljs/LICENSE delete mode 100644 node_modules/yamljs/README.md delete mode 100755 node_modules/yamljs/bin/json2yaml delete mode 100755 node_modules/yamljs/bin/yaml2json delete mode 100644 node_modules/yamljs/bower.json delete mode 100644 node_modules/yamljs/cli/json2yaml.js delete mode 100644 node_modules/yamljs/cli/yaml2json.js delete mode 100644 node_modules/yamljs/demo/demo.html delete mode 100644 node_modules/yamljs/dist/yaml.debug.js delete mode 100644 node_modules/yamljs/dist/yaml.js delete mode 100644 node_modules/yamljs/dist/yaml.legacy.js delete mode 100644 node_modules/yamljs/dist/yaml.min.js delete mode 100644 node_modules/yamljs/index.js delete mode 100644 node_modules/yamljs/lib/Dumper.js delete mode 100644 node_modules/yamljs/lib/Escaper.js delete mode 100644 node_modules/yamljs/lib/Exception/DumpException.js delete mode 100644 node_modules/yamljs/lib/Exception/ParseException.js delete mode 100644 node_modules/yamljs/lib/Exception/ParseMore.js delete mode 100644 node_modules/yamljs/lib/Inline.js delete mode 100644 node_modules/yamljs/lib/Parser.js delete mode 100644 node_modules/yamljs/lib/Pattern.js delete mode 100644 node_modules/yamljs/lib/Unescaper.js delete mode 100644 node_modules/yamljs/lib/Utils.js delete mode 100644 node_modules/yamljs/lib/Yaml.js delete mode 100644 node_modules/yamljs/package.json delete mode 100644 node_modules/yamljs/src/Dumper.coffee delete mode 100644 node_modules/yamljs/src/Escaper.coffee delete mode 100644 node_modules/yamljs/src/Exception/DumpException.coffee delete mode 100644 node_modules/yamljs/src/Exception/ParseException.coffee delete mode 100644 node_modules/yamljs/src/Exception/ParseMore.coffee delete mode 100644 node_modules/yamljs/src/Inline.coffee delete mode 100644 node_modules/yamljs/src/Parser.coffee delete mode 100644 node_modules/yamljs/src/Pattern.coffee delete mode 100644 node_modules/yamljs/src/Unescaper.coffee delete mode 100644 node_modules/yamljs/src/Utils.coffee delete mode 100644 node_modules/yamljs/src/Yaml.coffee delete mode 100755 node_modules/yamljs/test/SpecRunner.html delete mode 100755 node_modules/yamljs/test/lib/jasmine-2.0.0/MIT.LICENSE delete mode 100755 node_modules/yamljs/test/lib/jasmine-2.0.0/boot.js delete mode 100755 node_modules/yamljs/test/lib/jasmine-2.0.0/console.js delete mode 100755 node_modules/yamljs/test/lib/jasmine-2.0.0/jasmine-html.js delete mode 100755 node_modules/yamljs/test/lib/jasmine-2.0.0/jasmine.css delete mode 100755 node_modules/yamljs/test/lib/jasmine-2.0.0/jasmine.js delete mode 100755 node_modules/yamljs/test/lib/jasmine-2.0.0/jasmine_favicon.png delete mode 100644 node_modules/yamljs/test/spec/YamlSpec.coffee delete mode 100644 node_modules/yamljs/test/spec/YamlSpec.js delete mode 100644 node_modules/yamljs/test/spec/example.yml delete mode 100644 node_modules/yeast/LICENSE delete mode 100644 node_modules/yeast/README.md delete mode 100644 node_modules/yeast/index.js delete mode 100644 node_modules/yeast/package.json diff --git a/node_modules/.bin/json2yaml b/node_modules/.bin/json2yaml deleted file mode 120000 index 62480dd..0000000 --- a/node_modules/.bin/json2yaml +++ /dev/null @@ -1 +0,0 @@ -../yamljs/bin/json2yaml \ No newline at end of file diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime deleted file mode 120000 index fbb7ee0..0000000 --- a/node_modules/.bin/mime +++ /dev/null @@ -1 +0,0 @@ -../mime/cli.js \ No newline at end of file diff --git a/node_modules/.bin/yaml2json b/node_modules/.bin/yaml2json deleted file mode 120000 index b4423c4..0000000 --- a/node_modules/.bin/yaml2json +++ /dev/null @@ -1 +0,0 @@ -../yamljs/bin/yaml2json \ No newline at end of file diff --git a/node_modules/accepts/HISTORY.md b/node_modules/accepts/HISTORY.md deleted file mode 100644 index 0bf0417..0000000 --- a/node_modules/accepts/HISTORY.md +++ /dev/null @@ -1,236 +0,0 @@ -1.3.7 / 2019-04-29 -================== - - * deps: negotiator@0.6.2 - - Fix sorting charset, encoding, and language with extra parameters - -1.3.6 / 2019-04-28 -================== - - * deps: mime-types@~2.1.24 - - deps: mime-db@~1.40.0 - -1.3.5 / 2018-02-28 -================== - - * deps: mime-types@~2.1.18 - - deps: mime-db@~1.33.0 - -1.3.4 / 2017-08-22 -================== - - * deps: mime-types@~2.1.16 - - deps: mime-db@~1.29.0 - -1.3.3 / 2016-05-02 -================== - - * deps: mime-types@~2.1.11 - - deps: mime-db@~1.23.0 - * deps: negotiator@0.6.1 - - perf: improve `Accept` parsing speed - - perf: improve `Accept-Charset` parsing speed - - perf: improve `Accept-Encoding` parsing speed - - perf: improve `Accept-Language` parsing speed - -1.3.2 / 2016-03-08 -================== - - * deps: mime-types@~2.1.10 - - Fix extension of `application/dash+xml` - - Update primary extension for `audio/mp4` - - deps: mime-db@~1.22.0 - -1.3.1 / 2016-01-19 -================== - - * deps: mime-types@~2.1.9 - - deps: mime-db@~1.21.0 - -1.3.0 / 2015-09-29 -================== - - * deps: mime-types@~2.1.7 - - deps: mime-db@~1.19.0 - * deps: negotiator@0.6.0 - - Fix including type extensions in parameters in `Accept` parsing - - Fix parsing `Accept` parameters with quoted equals - - Fix parsing `Accept` parameters with quoted semicolons - - Lazy-load modules from main entry point - - perf: delay type concatenation until needed - - perf: enable strict mode - - perf: hoist regular expressions - - perf: remove closures getting spec properties - - perf: remove a closure from media type parsing - - perf: remove property delete from media type parsing - -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 deleted file mode 100644 index 0616607..0000000 --- a/node_modules/accepts/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(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 deleted file mode 100644 index 66a2f54..0000000 --- a/node_modules/accepts/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# accepts - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-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 - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```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) - -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master -[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master -[node-version-image]: https://badgen.net/npm/node/accepts -[node-version-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/accepts -[npm-url]: https://npmjs.org/package/accepts -[npm-version-image]: https://badgen.net/npm/v/accepts -[travis-image]: https://badgen.net/travis/jshttp/accepts/master -[travis-url]: https://travis-ci.org/jshttp/accepts diff --git a/node_modules/accepts/index.js b/node_modules/accepts/index.js deleted file mode 100644 index e9b2f63..0000000 --- a/node_modules/accepts/index.js +++ /dev/null @@ -1,238 +0,0 @@ -/*! - * 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() - } - - // no accept header, return first given type - if (!this.headers.accept) { - return types[0] - } - - var mimes = types.map(extToMime) - var accepts = this.negotiator.mediaTypes(mimes.filter(validMime)) - var first = accepts[0] - - return first - ? types[mimes.indexOf(first)] - : false -} - -/** - * 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 deleted file mode 100644 index 42a726b..0000000 --- a/node_modules/accepts/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "_from": "accepts@~1.3.7", - "_id": "accepts@1.3.7", - "_inBundle": false, - "_integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "_location": "/accepts", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "accepts@~1.3.7", - "name": "accepts", - "escapedName": "accepts", - "rawSpec": "~1.3.7", - "saveSpec": null, - "fetchSpec": "~1.3.7" - }, - "_requiredBy": [ - "/express" - ], - "_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "_shasum": "531bc726517a3b2b41f850021c6cc15eaab507cd", - "_spec": "accepts@~1.3.7", - "_where": "/Users/paolo/Desktop/multiplayer games/tutorials/hellosocket/node_modules/express", - "bugs": { - "url": "https://github.com/jshttp/accepts/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - } - ], - "dependencies": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - }, - "deprecated": false, - "description": "Higher-level content negotiation", - "devDependencies": { - "deep-equal": "1.0.1", - "eslint": "5.16.0", - "eslint-config-standard": "12.0.0", - "eslint-plugin-import": "2.17.2", - "eslint-plugin-markdown": "1.0.0", - "eslint-plugin-node": "8.0.1", - "eslint-plugin-promise": "4.1.1", - "eslint-plugin-standard": "4.0.0", - "mocha": "6.1.4", - "nyc": "14.0.0" - }, - "engines": { - "node": ">= 0.6" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "index.js" - ], - "homepage": "https://github.com/jshttp/accepts#readme", - "keywords": [ - "content", - "negotiation", - "accept", - "accepts" - ], - "license": "MIT", - "name": "accepts", - "repository": { - "type": "git", - "url": "git+https://github.com/jshttp/accepts.git" - }, - "scripts": { - "lint": "eslint --plugin markdown --ext js,md .", - "test": "mocha --reporter spec --check-leaks --bail test/", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "test-travis": "nyc --reporter=text npm test" - }, - "version": "1.3.7" -} diff --git a/node_modules/after/.npmignore b/node_modules/after/.npmignore deleted file mode 100644 index 6c78602..0000000 --- a/node_modules/after/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.monitor diff --git a/node_modules/after/.travis.yml b/node_modules/after/.travis.yml deleted file mode 100644 index afd72d0..0000000 --- a/node_modules/after/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - 0.9 - - 0.10 - - 0.12 - - 4.2.4 - - 5.4.1 - - iojs-1 - - iojs-2 - - iojs-3 diff --git a/node_modules/after/LICENCE b/node_modules/after/LICENCE deleted file mode 100644 index 7c35130..0000000 --- a/node_modules/after/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Raynos. - -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/after/README.md b/node_modules/after/README.md deleted file mode 100644 index fc69096..0000000 --- a/node_modules/after/README.md +++ /dev/null @@ -1,115 +0,0 @@ -# After [![Build Status][1]][2] - -Invoke callback after n calls - -## Status: production ready - -## Example - -```js -var after = require("after") -var db = require("./db") // some db. - -var updateUser = function (req, res) { - // use after to run two tasks in parallel, - // namely get request body and get session - // then run updateUser with the results - var next = after(2, updateUser) - var results = {} - - getJSONBody(req, res, function (err, body) { - if (err) return next(err) - - results.body = body - next(null, results) - }) - - getSessionUser(req, res, function (err, user) { - if (err) return next(err) - - results.user = user - next(null, results) - }) - - // now do the thing! - function updateUser(err, result) { - if (err) { - res.statusCode = 500 - return res.end("Unexpected Error") - } - - if (!result.user || result.user.role !== "admin") { - res.statusCode = 403 - return res.end("Permission Denied") - } - - db.put("users:" + req.params.userId, result.body, function (err) { - if (err) { - res.statusCode = 500 - return res.end("Unexpected Error") - } - - res.statusCode = 200 - res.end("Ok") - }) - } -} -``` - -## Naive Example - -```js -var after = require("after") - , next = after(3, logItWorks) - -next() -next() -next() // it works - -function logItWorks() { - console.log("it works!") -} -``` - -## Example with error handling - -```js -var after = require("after") - , next = after(3, logError) - -next() -next(new Error("oops")) // logs oops -next() // does nothing - -// This callback is only called once. -// If there is an error the callback gets called immediately -// this avoids the situation where errors get lost. -function logError(err) { - console.log(err) -} -``` - -## Installation - -`npm install after` - -## Tests - -`npm test` - -## Contributors - - - Raynos - - defunctzombie - -## MIT Licenced - - [1]: https://secure.travis-ci.org/Raynos/after.png - [2]: http://travis-ci.org/Raynos/after - [3]: http://raynos.org/blog/2/Flow-control-in-node.js - [4]: http://stackoverflow.com/questions/6852059/determining-the-end-of-asynchronous-operations-javascript/6852307#6852307 - [5]: http://stackoverflow.com/questions/6869872/in-javascript-what-are-best-practices-for-executing-multiple-asynchronous-functi/6870031#6870031 - [6]: http://stackoverflow.com/questions/6864397/javascript-performance-long-running-tasks/6889419#6889419 - [7]: http://stackoverflow.com/questions/6597493/synchronous-database-queries-with-node-js/6620091#6620091 - [8]: http://github.com/Raynos/iterators - [9]: http://github.com/Raynos/composite diff --git a/node_modules/after/index.js b/node_modules/after/index.js deleted file mode 100644 index ec24879..0000000 --- a/node_modules/after/index.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = after - -function after(count, callback, err_cb) { - var bail = false - err_cb = err_cb || noop - proxy.count = count - - return (count === 0) ? callback() : proxy - - function proxy(err, result) { - if (proxy.count <= 0) { - throw new Error('after called too many times') - } - --proxy.count - - // after first error, rest are passed to err_cb - if (err) { - bail = true - callback(err) - // future error callbacks will go to error handler - callback = err_cb - } else if (proxy.count === 0 && !bail) { - callback(null, result) - } - } -} - -function noop() {} diff --git a/node_modules/after/package.json b/node_modules/after/package.json deleted file mode 100644 index 2208d00..0000000 --- a/node_modules/after/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "after@0.8.2", - "_id": "after@0.8.2", - "_inBundle": false, - "_integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", - "_location": "/after", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "after@0.8.2", - "name": "after", - "escapedName": "after", - "rawSpec": "0.8.2", - "saveSpec": null, - "fetchSpec": "0.8.2" - }, - "_requiredBy": [ - "/engine.io-parser" - ], - "_resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", - "_shasum": "fedb394f9f0e02aa9768e702bda23b505fae7e1f", - "_spec": "after@0.8.2", - "_where": "/Users/paolo/Desktop/multiplayer games/tutorials/hellosocket/node_modules/engine.io-parser", - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "bugs": { - "url": "https://github.com/Raynos/after/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Raynos", - "email": "raynos2@gmail.com", - "url": "http://raynos.org" - } - ], - "deprecated": false, - "description": "after - tiny flow control", - "devDependencies": { - "mocha": "~1.8.1" - }, - "homepage": "https://github.com/Raynos/after#readme", - "keywords": [ - "flowcontrol", - "after", - "flow", - "control", - "arch" - ], - "license": "MIT", - "name": "after", - "repository": { - "type": "git", - "url": "git://github.com/Raynos/after.git" - }, - "scripts": { - "test": "mocha --ui tdd --reporter spec test/*.js" - }, - "version": "0.8.2" -} diff --git a/node_modules/after/test/after-test.js b/node_modules/after/test/after-test.js deleted file mode 100644 index 0d63f4c..0000000 --- a/node_modules/after/test/after-test.js +++ /dev/null @@ -1,120 +0,0 @@ -/*global suite, test*/ - -var assert = require("assert") - , after = require("../") - -test("exists", function () { - assert(typeof after === "function", "after is not a function") -}) - -test("after when called with 0 invokes", function (done) { - after(0, done) -}); - -test("after 1", function (done) { - var next = after(1, done) - next() -}) - -test("after 5", function (done) { - var next = after(5, done) - , i = 5 - - while (i--) { - next() - } -}) - -test("manipulate count", function (done) { - var next = after(1, done) - , i = 5 - - next.count = i - while (i--) { - next() - } -}) - -test("after terminates on error", function (done) { - var next = after(2, function(err) { - assert.equal(err.message, 'test'); - done(); - }) - next(new Error('test')) - next(new Error('test2')) -}) - -test('gee', function(done) { - done = after(2, done) - - function cb(err) { - assert.equal(err.message, 1); - done() - } - - var next = after(3, cb, function(err) { - assert.equal(err.message, 2) - done() - }); - - next() - next(new Error(1)) - next(new Error(2)) -}) - -test('eee', function(done) { - done = after(3, done) - - function cb(err) { - assert.equal(err.message, 1); - done() - } - - var next = after(3, cb, function(err) { - assert.equal(err.message, 2) - done() - }); - - next(new Error(1)) - next(new Error(2)) - next(new Error(2)) -}) - -test('gge', function(done) { - function cb(err) { - assert.equal(err.message, 1); - done() - } - - var next = after(3, cb, function(err) { - // should not happen - assert.ok(false); - }); - - next() - next() - next(new Error(1)) -}) - -test('egg', function(done) { - function cb(err) { - assert.equal(err.message, 1); - done() - } - - var next = after(3, cb, function(err) { - // should not happen - assert.ok(false); - }); - - next(new Error(1)) - next() - next() -}) - -test('throws on too many calls', function(done) { - var next = after(1, done); - next() - assert.throws(next, /after called too many times/); -}); - diff --git a/node_modules/argparse/CHANGELOG.md b/node_modules/argparse/CHANGELOG.md deleted file mode 100644 index a43c628..0000000 --- a/node_modules/argparse/CHANGELOG.md +++ /dev/null @@ -1,185 +0,0 @@ -1.0.10 / 2018-02-15 ------------------- - -- Use .concat instead of + for arrays, #122. - - -1.0.9 / 2016-09-29 ------------------- - -- Rerelease after 1.0.8 - deps cleanup. - - -1.0.8 / 2016-09-29 ------------------- - -- Maintenance (deps bump, fix node 6.5+ tests, coverage report). - - -1.0.7 / 2016-03-17 ------------------- - -- Teach `addArgument` to accept string arg names. #97, @tomxtobin. - - -1.0.6 / 2016-02-06 ------------------- - -- Maintenance: moved to eslint & updated CS. - - -1.0.5 / 2016-02-05 ------------------- - -- Removed lodash dependency to significantly reduce install size. - Thanks to @mourner. - - -1.0.4 / 2016-01-17 ------------------- - -- Maintenance: lodash update to 4.0.0. - - -1.0.3 / 2015-10-27 ------------------- - -- Fix parse `=` in args: `--examplepath="C:\myfolder\env=x64"`. #84, @CatWithApple. - - -1.0.2 / 2015-03-22 ------------------- - -- Relaxed lodash version dependency. - - -1.0.1 / 2015-02-20 ------------------- - -- Changed dependencies to be compatible with ancient nodejs. - - -1.0.0 / 2015-02-19 ------------------- - -- Maintenance release. -- Replaced `underscore` with `lodash`. -- Bumped version to 1.0.0 to better reflect semver meaning. -- HISTORY.md -> CHANGELOG.md - - -0.1.16 / 2013-12-01 -------------------- - -- Maintenance release. Updated dependencies and docs. - - -0.1.15 / 2013-05-13 -------------------- - -- Fixed #55, @trebor89 - - -0.1.14 / 2013-05-12 -------------------- - -- Fixed #62, @maxtaco - - -0.1.13 / 2013-04-08 -------------------- - -- Added `.npmignore` to reduce package size - - -0.1.12 / 2013-02-10 -------------------- - -- Fixed conflictHandler (#46), @hpaulj - - -0.1.11 / 2013-02-07 -------------------- - -- Multiple bugfixes, @hpaulj -- Added 70+ tests (ported from python), @hpaulj -- Added conflictHandler, @applepicke -- Added fromfilePrefixChar, @hpaulj - - -0.1.10 / 2012-12-30 -------------------- - -- Added [mutual exclusion](http://docs.python.org/dev/library/argparse.html#mutual-exclusion) - support, thanks to @hpaulj -- Fixed options check for `storeConst` & `appendConst` actions, thanks to @hpaulj - - -0.1.9 / 2012-12-27 ------------------- - -- Fixed option dest interferens with other options (issue #23), thanks to @hpaulj -- Fixed default value behavior with `*` positionals, thanks to @hpaulj -- Improve `getDefault()` behavior, thanks to @hpaulj -- Imrove negative argument parsing, thanks to @hpaulj - - -0.1.8 / 2012-12-01 ------------------- - -- Fixed parser parents (issue #19), thanks to @hpaulj -- Fixed negative argument parse (issue #20), thanks to @hpaulj - - -0.1.7 / 2012-10-14 ------------------- - -- Fixed 'choices' argument parse (issue #16) -- Fixed stderr output (issue #15) - - -0.1.6 / 2012-09-09 ------------------- - -- Fixed check for conflict of options (thanks to @tomxtobin) - - -0.1.5 / 2012-09-03 ------------------- - -- Fix parser #setDefaults method (thanks to @tomxtobin) - - -0.1.4 / 2012-07-30 ------------------- - -- Fixed pseudo-argument support (thanks to @CGamesPlay) -- Fixed addHelp default (should be true), if not set (thanks to @benblank) - - -0.1.3 / 2012-06-27 ------------------- - -- Fixed formatter api name: Formatter -> HelpFormatter - - -0.1.2 / 2012-05-29 ------------------- - -- Added basic tests -- Removed excess whitespace in help -- Fixed error reporting, when parcer with subcommands - called with empty arguments - - -0.1.1 / 2012-05-23 ------------------- - -- Fixed line wrapping in help formatter -- Added better error reporting on invalid arguments - - -0.1.0 / 2012-05-16 ------------------- - -- First release. diff --git a/node_modules/argparse/LICENSE b/node_modules/argparse/LICENSE deleted file mode 100644 index 1afdae5..0000000 --- a/node_modules/argparse/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -(The MIT License) - -Copyright (C) 2012 by Vitaly Puzrin - -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/argparse/README.md b/node_modules/argparse/README.md deleted file mode 100644 index 7fa6c40..0000000 --- a/node_modules/argparse/README.md +++ /dev/null @@ -1,257 +0,0 @@ -argparse -======== - -[![Build Status](https://secure.travis-ci.org/nodeca/argparse.svg?branch=master)](http://travis-ci.org/nodeca/argparse) -[![NPM version](https://img.shields.io/npm/v/argparse.svg)](https://www.npmjs.org/package/argparse) - -CLI arguments parser for node.js. Javascript port of python's -[argparse](http://docs.python.org/dev/library/argparse.html) module -(original version 3.2). That's a full port, except some very rare options, -recorded in issue tracker. - -**NB. Difference with original.** - -- Method names changed to camelCase. See [generated docs](http://nodeca.github.com/argparse/). -- Use `defaultValue` instead of `default`. -- Use `argparse.Const.REMAINDER` instead of `argparse.REMAINDER`, and - similarly for constant values `OPTIONAL`, `ZERO_OR_MORE`, and `ONE_OR_MORE` - (aliases for `nargs` values `'?'`, `'*'`, `'+'`, respectively), and - `SUPPRESS`. - - -Example -======= - -test.js file: - -```javascript -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp:true, - description: 'Argparse example' -}); -parser.addArgument( - [ '-f', '--foo' ], - { - help: 'foo bar' - } -); -parser.addArgument( - [ '-b', '--bar' ], - { - help: 'bar foo' - } -); -parser.addArgument( - '--baz', - { - help: 'baz bar' - } -); -var args = parser.parseArgs(); -console.dir(args); -``` - -Display help: - -``` -$ ./test.js -h -usage: example.js [-h] [-v] [-f FOO] [-b BAR] [--baz BAZ] - -Argparse example - -Optional arguments: - -h, --help Show this help message and exit. - -v, --version Show program's version number and exit. - -f FOO, --foo FOO foo bar - -b BAR, --bar BAR bar foo - --baz BAZ baz bar -``` - -Parse arguments: - -``` -$ ./test.js -f=3 --bar=4 --baz 5 -{ foo: '3', bar: '4', baz: '5' } -``` - -More [examples](https://github.com/nodeca/argparse/tree/master/examples). - - -ArgumentParser objects -====================== - -``` -new ArgumentParser({parameters hash}); -``` - -Creates a new ArgumentParser object. - -**Supported params:** - -- ```description``` - Text to display before the argument help. -- ```epilog``` - Text to display after the argument help. -- ```addHelp``` - Add a -h/–help option to the parser. (default: true) -- ```argumentDefault``` - Set the global default value for arguments. (default: null) -- ```parents``` - A list of ArgumentParser objects whose arguments should also be included. -- ```prefixChars``` - The set of characters that prefix optional arguments. (default: ‘-‘) -- ```formatterClass``` - A class for customizing the help output. -- ```prog``` - The name of the program (default: `path.basename(process.argv[1])`) -- ```usage``` - The string describing the program usage (default: generated) -- ```conflictHandler``` - Usually unnecessary, defines strategy for resolving conflicting optionals. - -**Not supported yet** - -- ```fromfilePrefixChars``` - The set of characters that prefix files from which additional arguments should be read. - - -Details in [original ArgumentParser guide](http://docs.python.org/dev/library/argparse.html#argumentparser-objects) - - -addArgument() method -==================== - -``` -ArgumentParser.addArgument(name or flag or [name] or [flags...], {options}) -``` - -Defines how a single command-line argument should be parsed. - -- ```name or flag or [name] or [flags...]``` - Either a positional name - (e.g., `'foo'`), a single option (e.g., `'-f'` or `'--foo'`), an array - of a single positional name (e.g., `['foo']`), or an array of options - (e.g., `['-f', '--foo']`). - -Options: - -- ```action``` - The basic type of action to be taken when this argument is encountered at the command line. -- ```nargs```- The number of command-line arguments that should be consumed. -- ```constant``` - A constant value required by some action and nargs selections. -- ```defaultValue``` - The value produced if the argument is absent from the command line. -- ```type``` - The type to which the command-line argument should be converted. -- ```choices``` - A container of the allowable values for the argument. -- ```required``` - Whether or not the command-line option may be omitted (optionals only). -- ```help``` - A brief description of what the argument does. -- ```metavar``` - A name for the argument in usage messages. -- ```dest``` - The name of the attribute to be added to the object returned by parseArgs(). - -Details in [original add_argument guide](http://docs.python.org/dev/library/argparse.html#the-add-argument-method) - - -Action (some details) -================ - -ArgumentParser objects associate command-line arguments with actions. -These actions can do just about anything with the command-line arguments associated -with them, though most actions simply add an attribute to the object returned by -parseArgs(). The action keyword argument specifies how the command-line arguments -should be handled. The supported actions are: - -- ```store``` - Just stores the argument’s value. This is the default action. -- ```storeConst``` - Stores value, specified by the const keyword argument. - (Note that the const keyword argument defaults to the rather unhelpful None.) - The 'storeConst' action is most commonly used with optional arguments, that - specify some sort of flag. -- ```storeTrue``` and ```storeFalse``` - Stores values True and False - respectively. These are special cases of 'storeConst'. -- ```append``` - Stores a list, and appends each argument value to the list. - This is useful to allow an option to be specified multiple times. -- ```appendConst``` - Stores a list, and appends value, specified by the - const keyword argument to the list. (Note, that the const keyword argument defaults - is None.) The 'appendConst' action is typically used when multiple arguments need - to store constants to the same list. -- ```count``` - Counts the number of times a keyword argument occurs. For example, - used for increasing verbosity levels. -- ```help``` - Prints a complete help message for all the options in the current - parser and then exits. By default a help action is automatically added to the parser. - See ArgumentParser for details of how the output is created. -- ```version``` - Prints version information and exit. Expects a `version=` - keyword argument in the addArgument() call. - -Details in [original action guide](http://docs.python.org/dev/library/argparse.html#action) - - -Sub-commands -============ - -ArgumentParser.addSubparsers() - -Many programs split their functionality into a number of sub-commands, for -example, the svn program can invoke sub-commands like `svn checkout`, `svn update`, -and `svn commit`. Splitting up functionality this way can be a particularly good -idea when a program performs several different functions which require different -kinds of command-line arguments. `ArgumentParser` supports creation of such -sub-commands with `addSubparsers()` method. The `addSubparsers()` method is -normally called with no arguments and returns an special action object. -This object has a single method `addParser()`, which takes a command name and -any `ArgumentParser` constructor arguments, and returns an `ArgumentParser` object -that can be modified as usual. - -Example: - -sub_commands.js -```javascript -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp:true, - description: 'Argparse examples: sub-commands', -}); - -var subparsers = parser.addSubparsers({ - title:'subcommands', - dest:"subcommand_name" -}); - -var bar = subparsers.addParser('c1', {addHelp:true}); -bar.addArgument( - [ '-f', '--foo' ], - { - action: 'store', - help: 'foo3 bar3' - } -); -var bar = subparsers.addParser( - 'c2', - {aliases:['co'], addHelp:true} -); -bar.addArgument( - [ '-b', '--bar' ], - { - action: 'store', - type: 'int', - help: 'foo3 bar3' - } -); - -var args = parser.parseArgs(); -console.dir(args); - -``` - -Details in [original sub-commands guide](http://docs.python.org/dev/library/argparse.html#sub-commands) - - -Contributors -============ - -- [Eugene Shkuropat](https://github.com/shkuropat) -- [Paul Jacobson](https://github.com/hpaulj) - -[others](https://github.com/nodeca/argparse/graphs/contributors) - -License -======= - -Copyright (c) 2012 [Vitaly Puzrin](https://github.com/puzrin). -Released under the MIT license. See -[LICENSE](https://github.com/nodeca/argparse/blob/master/LICENSE) for details. - - diff --git a/node_modules/argparse/index.js b/node_modules/argparse/index.js deleted file mode 100644 index 3bbc143..0000000 --- a/node_modules/argparse/index.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./lib/argparse'); diff --git a/node_modules/argparse/lib/action.js b/node_modules/argparse/lib/action.js deleted file mode 100644 index 1483c79..0000000 --- a/node_modules/argparse/lib/action.js +++ /dev/null @@ -1,146 +0,0 @@ -/** - * class Action - * - * Base class for all actions - * Do not call in your code, use this class only for inherits your own action - * - * Information about how to convert command line strings to Javascript objects. - * Action objects are used by an ArgumentParser to represent the information - * needed to parse a single argument from one or more strings from the command - * line. The keyword arguments to the Action constructor are also all attributes - * of Action instances. - * - * ##### Allowed keywords: - * - * - `store` - * - `storeConstant` - * - `storeTrue` - * - `storeFalse` - * - `append` - * - `appendConstant` - * - `count` - * - `help` - * - `version` - * - * Information about action options see [[Action.new]] - * - * See also [original guide](http://docs.python.org/dev/library/argparse.html#action) - * - **/ - -'use strict'; - - -// Constants -var c = require('./const'); - - -/** - * new Action(options) - * - * Base class for all actions. Used only for inherits - * - * - * ##### Options: - * - * - `optionStrings` A list of command-line option strings for the action. - * - `dest` Attribute to hold the created object(s) - * - `nargs` The number of command-line arguments that should be consumed. - * By default, one argument will be consumed and a single value will be - * produced. - * - `constant` Default value for an action with no value. - * - `defaultValue` The value to be produced if the option is not specified. - * - `type` Cast to 'string'|'int'|'float'|'complex'|function (string). If - * None, 'string'. - * - `choices` The choices available. - * - `required` True if the action must always be specified at the command - * line. - * - `help` The help describing the argument. - * - `metavar` The name to be used for the option's argument with the help - * string. If None, the 'dest' value will be used as the name. - * - * ##### nargs supported values: - * - * - `N` (an integer) consumes N arguments (and produces a list) - * - `?` consumes zero or one arguments - * - `*` consumes zero or more arguments (and produces a list) - * - `+` consumes one or more arguments (and produces a list) - * - * Note: that the difference between the default and nargs=1 is that with the - * default, a single value will be produced, while with nargs=1, a list - * containing a single value will be produced. - **/ -var Action = module.exports = function Action(options) { - options = options || {}; - this.optionStrings = options.optionStrings || []; - this.dest = options.dest; - this.nargs = typeof options.nargs !== 'undefined' ? options.nargs : null; - this.constant = typeof options.constant !== 'undefined' ? options.constant : null; - this.defaultValue = options.defaultValue; - this.type = typeof options.type !== 'undefined' ? options.type : null; - this.choices = typeof options.choices !== 'undefined' ? options.choices : null; - this.required = typeof options.required !== 'undefined' ? options.required : false; - this.help = typeof options.help !== 'undefined' ? options.help : null; - this.metavar = typeof options.metavar !== 'undefined' ? options.metavar : null; - - if (!(this.optionStrings instanceof Array)) { - throw new Error('optionStrings should be an array'); - } - if (typeof this.required !== 'undefined' && typeof this.required !== 'boolean') { - throw new Error('required should be a boolean'); - } -}; - -/** - * Action#getName -> String - * - * Tells action name - **/ -Action.prototype.getName = function () { - if (this.optionStrings.length > 0) { - return this.optionStrings.join('/'); - } else if (this.metavar !== null && this.metavar !== c.SUPPRESS) { - return this.metavar; - } else if (typeof this.dest !== 'undefined' && this.dest !== c.SUPPRESS) { - return this.dest; - } - return null; -}; - -/** - * Action#isOptional -> Boolean - * - * Return true if optional - **/ -Action.prototype.isOptional = function () { - return !this.isPositional(); -}; - -/** - * Action#isPositional -> Boolean - * - * Return true if positional - **/ -Action.prototype.isPositional = function () { - return (this.optionStrings.length === 0); -}; - -/** - * Action#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Should be implemented in inherited classes - * - * ##### Example - * - * ActionCount.prototype.call = function (parser, namespace, values, optionString) { - * namespace.set(this.dest, (namespace[this.dest] || 0) + 1); - * }; - * - **/ -Action.prototype.call = function () { - throw new Error('.call() not defined');// Not Implemented error -}; diff --git a/node_modules/argparse/lib/action/append.js b/node_modules/argparse/lib/action/append.js deleted file mode 100644 index b5da0de..0000000 --- a/node_modules/argparse/lib/action/append.js +++ /dev/null @@ -1,53 +0,0 @@ -/*:nodoc:* - * class ActionAppend - * - * This action stores a list, and appends each argument value to the list. - * This is useful to allow an option to be specified multiple times. - * This class inherided from [[Action]] - * - **/ - -'use strict'; - -var util = require('util'); - -var Action = require('../action'); - -// Constants -var c = require('../const'); - -/*:nodoc:* - * new ActionAppend(options) - * - options (object): options hash see [[Action.new]] - * - * Note: options.nargs should be optional for constants - * and more then zero for other - **/ -var ActionAppend = module.exports = function ActionAppend(options) { - options = options || {}; - if (this.nargs <= 0) { - throw new Error('nargs for append actions must be > 0; if arg ' + - 'strings are not supplying the value to append, ' + - 'the append const action may be more appropriate'); - } - if (!!this.constant && this.nargs !== c.OPTIONAL) { - throw new Error('nargs must be OPTIONAL to supply const'); - } - Action.call(this, options); -}; -util.inherits(ActionAppend, Action); - -/*:nodoc:* - * ActionAppend#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Save result in namespace object - **/ -ActionAppend.prototype.call = function (parser, namespace, values) { - var items = (namespace[this.dest] || []).slice(); - items.push(values); - namespace.set(this.dest, items); -}; diff --git a/node_modules/argparse/lib/action/append/constant.js b/node_modules/argparse/lib/action/append/constant.js deleted file mode 100644 index 313f5d2..0000000 --- a/node_modules/argparse/lib/action/append/constant.js +++ /dev/null @@ -1,47 +0,0 @@ -/*:nodoc:* - * class ActionAppendConstant - * - * This stores a list, and appends the value specified by - * the const keyword argument to the list. - * (Note that the const keyword argument defaults to null.) - * The 'appendConst' action is typically useful when multiple - * arguments need to store constants to the same list. - * - * This class inherited from [[Action]] - **/ - -'use strict'; - -var util = require('util'); - -var Action = require('../../action'); - -/*:nodoc:* - * new ActionAppendConstant(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionAppendConstant = module.exports = function ActionAppendConstant(options) { - options = options || {}; - options.nargs = 0; - if (typeof options.constant === 'undefined') { - throw new Error('constant option is required for appendAction'); - } - Action.call(this, options); -}; -util.inherits(ActionAppendConstant, Action); - -/*:nodoc:* - * ActionAppendConstant#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Save result in namespace object - **/ -ActionAppendConstant.prototype.call = function (parser, namespace) { - var items = [].concat(namespace[this.dest] || []); - items.push(this.constant); - namespace.set(this.dest, items); -}; diff --git a/node_modules/argparse/lib/action/count.js b/node_modules/argparse/lib/action/count.js deleted file mode 100644 index d6a5899..0000000 --- a/node_modules/argparse/lib/action/count.js +++ /dev/null @@ -1,40 +0,0 @@ -/*:nodoc:* - * class ActionCount - * - * This counts the number of times a keyword argument occurs. - * For example, this is useful for increasing verbosity levels - * - * This class inherided from [[Action]] - * - **/ -'use strict'; - -var util = require('util'); - -var Action = require('../action'); - -/*:nodoc:* - * new ActionCount(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionCount = module.exports = function ActionCount(options) { - options = options || {}; - options.nargs = 0; - - Action.call(this, options); -}; -util.inherits(ActionCount, Action); - -/*:nodoc:* - * ActionCount#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Save result in namespace object - **/ -ActionCount.prototype.call = function (parser, namespace) { - namespace.set(this.dest, (namespace[this.dest] || 0) + 1); -}; diff --git a/node_modules/argparse/lib/action/help.js b/node_modules/argparse/lib/action/help.js deleted file mode 100644 index b40e05a..0000000 --- a/node_modules/argparse/lib/action/help.js +++ /dev/null @@ -1,47 +0,0 @@ -/*:nodoc:* - * class ActionHelp - * - * Support action for printing help - * This class inherided from [[Action]] - **/ -'use strict'; - -var util = require('util'); - -var Action = require('../action'); - -// Constants -var c = require('../const'); - -/*:nodoc:* - * new ActionHelp(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionHelp = module.exports = function ActionHelp(options) { - options = options || {}; - if (options.defaultValue !== null) { - options.defaultValue = options.defaultValue; - } else { - options.defaultValue = c.SUPPRESS; - } - options.dest = (options.dest !== null ? options.dest : c.SUPPRESS); - options.nargs = 0; - Action.call(this, options); - -}; -util.inherits(ActionHelp, Action); - -/*:nodoc:* - * ActionHelp#call(parser, namespace, values, optionString) - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Print help and exit - **/ -ActionHelp.prototype.call = function (parser) { - parser.printHelp(); - parser.exit(); -}; diff --git a/node_modules/argparse/lib/action/store.js b/node_modules/argparse/lib/action/store.js deleted file mode 100644 index 283b860..0000000 --- a/node_modules/argparse/lib/action/store.js +++ /dev/null @@ -1,50 +0,0 @@ -/*:nodoc:* - * class ActionStore - * - * This action just stores the argument’s value. This is the default action. - * - * This class inherited from [[Action]] - * - **/ -'use strict'; - -var util = require('util'); - -var Action = require('../action'); - -// Constants -var c = require('../const'); - - -/*:nodoc:* - * new ActionStore(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionStore = module.exports = function ActionStore(options) { - options = options || {}; - if (this.nargs <= 0) { - throw new Error('nargs for store actions must be > 0; if you ' + - 'have nothing to store, actions such as store ' + - 'true or store const may be more appropriate'); - - } - if (typeof this.constant !== 'undefined' && this.nargs !== c.OPTIONAL) { - throw new Error('nargs must be OPTIONAL to supply const'); - } - Action.call(this, options); -}; -util.inherits(ActionStore, Action); - -/*:nodoc:* - * ActionStore#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Save result in namespace object - **/ -ActionStore.prototype.call = function (parser, namespace, values) { - namespace.set(this.dest, values); -}; diff --git a/node_modules/argparse/lib/action/store/constant.js b/node_modules/argparse/lib/action/store/constant.js deleted file mode 100644 index 23caa89..0000000 --- a/node_modules/argparse/lib/action/store/constant.js +++ /dev/null @@ -1,43 +0,0 @@ -/*:nodoc:* - * class ActionStoreConstant - * - * This action stores the value specified by the const keyword argument. - * (Note that the const keyword argument defaults to the rather unhelpful null.) - * The 'store_const' action is most commonly used with optional - * arguments that specify some sort of flag. - * - * This class inherited from [[Action]] - **/ -'use strict'; - -var util = require('util'); - -var Action = require('../../action'); - -/*:nodoc:* - * new ActionStoreConstant(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionStoreConstant = module.exports = function ActionStoreConstant(options) { - options = options || {}; - options.nargs = 0; - if (typeof options.constant === 'undefined') { - throw new Error('constant option is required for storeAction'); - } - Action.call(this, options); -}; -util.inherits(ActionStoreConstant, Action); - -/*:nodoc:* - * ActionStoreConstant#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Save result in namespace object - **/ -ActionStoreConstant.prototype.call = function (parser, namespace) { - namespace.set(this.dest, this.constant); -}; diff --git a/node_modules/argparse/lib/action/store/false.js b/node_modules/argparse/lib/action/store/false.js deleted file mode 100644 index 9924f46..0000000 --- a/node_modules/argparse/lib/action/store/false.js +++ /dev/null @@ -1,27 +0,0 @@ -/*:nodoc:* - * class ActionStoreFalse - * - * This action store the values False respectively. - * This is special cases of 'storeConst' - * - * This class inherited from [[Action]] - **/ - -'use strict'; - -var util = require('util'); - -var ActionStoreConstant = require('./constant'); - -/*:nodoc:* - * new ActionStoreFalse(options) - * - options (object): hash of options see [[Action.new]] - * - **/ -var ActionStoreFalse = module.exports = function ActionStoreFalse(options) { - options = options || {}; - options.constant = false; - options.defaultValue = options.defaultValue !== null ? options.defaultValue : true; - ActionStoreConstant.call(this, options); -}; -util.inherits(ActionStoreFalse, ActionStoreConstant); diff --git a/node_modules/argparse/lib/action/store/true.js b/node_modules/argparse/lib/action/store/true.js deleted file mode 100644 index 9e22f7d..0000000 --- a/node_modules/argparse/lib/action/store/true.js +++ /dev/null @@ -1,26 +0,0 @@ -/*:nodoc:* - * class ActionStoreTrue - * - * This action store the values True respectively. - * This isspecial cases of 'storeConst' - * - * This class inherited from [[Action]] - **/ -'use strict'; - -var util = require('util'); - -var ActionStoreConstant = require('./constant'); - -/*:nodoc:* - * new ActionStoreTrue(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionStoreTrue = module.exports = function ActionStoreTrue(options) { - options = options || {}; - options.constant = true; - options.defaultValue = options.defaultValue !== null ? options.defaultValue : false; - ActionStoreConstant.call(this, options); -}; -util.inherits(ActionStoreTrue, ActionStoreConstant); diff --git a/node_modules/argparse/lib/action/subparsers.js b/node_modules/argparse/lib/action/subparsers.js deleted file mode 100644 index 99dfedd..0000000 --- a/node_modules/argparse/lib/action/subparsers.js +++ /dev/null @@ -1,149 +0,0 @@ -/** internal - * class ActionSubparsers - * - * Support the creation of such sub-commands with the addSubparsers() - * - * This class inherited from [[Action]] - **/ -'use strict'; - -var util = require('util'); -var format = require('util').format; - - -var Action = require('../action'); - -// Constants -var c = require('../const'); - -// Errors -var argumentErrorHelper = require('../argument/error'); - - -/*:nodoc:* - * new ChoicesPseudoAction(name, help) - * - * Create pseudo action for correct help text - * - **/ -function ChoicesPseudoAction(name, help) { - var options = { - optionStrings: [], - dest: name, - help: help - }; - - Action.call(this, options); -} - -util.inherits(ChoicesPseudoAction, Action); - -/** - * new ActionSubparsers(options) - * - options (object): options hash see [[Action.new]] - * - **/ -function ActionSubparsers(options) { - options = options || {}; - options.dest = options.dest || c.SUPPRESS; - options.nargs = c.PARSER; - - this.debug = (options.debug === true); - - this._progPrefix = options.prog; - this._parserClass = options.parserClass; - this._nameParserMap = {}; - this._choicesActions = []; - - options.choices = this._nameParserMap; - Action.call(this, options); -} - -util.inherits(ActionSubparsers, Action); - -/*:nodoc:* - * ActionSubparsers#addParser(name, options) -> ArgumentParser - * - name (string): sub-command name - * - options (object): see [[ArgumentParser.new]] - * - * Note: - * addParser supports an additional aliases option, - * which allows multiple strings to refer to the same subparser. - * This example, like svn, aliases co as a shorthand for checkout - * - **/ -ActionSubparsers.prototype.addParser = function (name, options) { - var parser; - - var self = this; - - options = options || {}; - - options.debug = (this.debug === true); - - // set program from the existing prefix - if (!options.prog) { - options.prog = this._progPrefix + ' ' + name; - } - - var aliases = options.aliases || []; - - // create a pseudo-action to hold the choice help - if (!!options.help || typeof options.help === 'string') { - var help = options.help; - delete options.help; - - var choiceAction = new ChoicesPseudoAction(name, help); - this._choicesActions.push(choiceAction); - } - - // create the parser and add it to the map - parser = new this._parserClass(options); - this._nameParserMap[name] = parser; - - // make parser available under aliases also - aliases.forEach(function (alias) { - self._nameParserMap[alias] = parser; - }); - - return parser; -}; - -ActionSubparsers.prototype._getSubactions = function () { - return this._choicesActions; -}; - -/*:nodoc:* - * ActionSubparsers#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Parse input aguments - **/ -ActionSubparsers.prototype.call = function (parser, namespace, values) { - var parserName = values[0]; - var argStrings = values.slice(1); - - // set the parser name if requested - if (this.dest !== c.SUPPRESS) { - namespace[this.dest] = parserName; - } - - // select the parser - if (this._nameParserMap[parserName]) { - parser = this._nameParserMap[parserName]; - } else { - throw argumentErrorHelper(format( - 'Unknown parser "%s" (choices: [%s]).', - parserName, - Object.keys(this._nameParserMap).join(', ') - )); - } - - // parse all the remaining options into the namespace - parser.parseArgs(argStrings, namespace); -}; - -module.exports = ActionSubparsers; diff --git a/node_modules/argparse/lib/action/version.js b/node_modules/argparse/lib/action/version.js deleted file mode 100644 index 8053328..0000000 --- a/node_modules/argparse/lib/action/version.js +++ /dev/null @@ -1,47 +0,0 @@ -/*:nodoc:* - * class ActionVersion - * - * Support action for printing program version - * This class inherited from [[Action]] - **/ -'use strict'; - -var util = require('util'); - -var Action = require('../action'); - -// -// Constants -// -var c = require('../const'); - -/*:nodoc:* - * new ActionVersion(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionVersion = module.exports = function ActionVersion(options) { - options = options || {}; - options.defaultValue = (options.defaultValue ? options.defaultValue : c.SUPPRESS); - options.dest = (options.dest || c.SUPPRESS); - options.nargs = 0; - this.version = options.version; - Action.call(this, options); -}; -util.inherits(ActionVersion, Action); - -/*:nodoc:* - * ActionVersion#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Print version and exit - **/ -ActionVersion.prototype.call = function (parser) { - var version = this.version || parser.version; - var formatter = parser._getFormatter(); - formatter.addText(version); - parser.exit(0, formatter.formatHelp()); -}; diff --git a/node_modules/argparse/lib/action_container.js b/node_modules/argparse/lib/action_container.js deleted file mode 100644 index 6f1237b..0000000 --- a/node_modules/argparse/lib/action_container.js +++ /dev/null @@ -1,482 +0,0 @@ -/** internal - * class ActionContainer - * - * Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]] - **/ - -'use strict'; - -var format = require('util').format; - -// Constants -var c = require('./const'); - -var $$ = require('./utils'); - -//Actions -var ActionHelp = require('./action/help'); -var ActionAppend = require('./action/append'); -var ActionAppendConstant = require('./action/append/constant'); -var ActionCount = require('./action/count'); -var ActionStore = require('./action/store'); -var ActionStoreConstant = require('./action/store/constant'); -var ActionStoreTrue = require('./action/store/true'); -var ActionStoreFalse = require('./action/store/false'); -var ActionVersion = require('./action/version'); -var ActionSubparsers = require('./action/subparsers'); - -// Errors -var argumentErrorHelper = require('./argument/error'); - -/** - * new ActionContainer(options) - * - * Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]] - * - * ##### Options: - * - * - `description` -- A description of what the program does - * - `prefixChars` -- Characters that prefix optional arguments - * - `argumentDefault` -- The default value for all arguments - * - `conflictHandler` -- The conflict handler to use for duplicate arguments - **/ -var ActionContainer = module.exports = function ActionContainer(options) { - options = options || {}; - - this.description = options.description; - this.argumentDefault = options.argumentDefault; - this.prefixChars = options.prefixChars || ''; - this.conflictHandler = options.conflictHandler; - - // set up registries - this._registries = {}; - - // register actions - this.register('action', null, ActionStore); - this.register('action', 'store', ActionStore); - this.register('action', 'storeConst', ActionStoreConstant); - this.register('action', 'storeTrue', ActionStoreTrue); - this.register('action', 'storeFalse', ActionStoreFalse); - this.register('action', 'append', ActionAppend); - this.register('action', 'appendConst', ActionAppendConstant); - this.register('action', 'count', ActionCount); - this.register('action', 'help', ActionHelp); - this.register('action', 'version', ActionVersion); - this.register('action', 'parsers', ActionSubparsers); - - // raise an exception if the conflict handler is invalid - this._getHandler(); - - // action storage - this._actions = []; - this._optionStringActions = {}; - - // groups - this._actionGroups = []; - this._mutuallyExclusiveGroups = []; - - // defaults storage - this._defaults = {}; - - // determines whether an "option" looks like a negative number - // -1, -1.5 -5e+4 - this._regexpNegativeNumber = new RegExp('^[-]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?$'); - - // whether or not there are any optionals that look like negative - // numbers -- uses a list so it can be shared and edited - this._hasNegativeNumberOptionals = []; -}; - -// Groups must be required, then ActionContainer already defined -var ArgumentGroup = require('./argument/group'); -var MutuallyExclusiveGroup = require('./argument/exclusive'); - -// -// Registration methods -// - -/** - * ActionContainer#register(registryName, value, object) -> Void - * - registryName (String) : object type action|type - * - value (string) : keyword - * - object (Object|Function) : handler - * - * Register handlers - **/ -ActionContainer.prototype.register = function (registryName, value, object) { - this._registries[registryName] = this._registries[registryName] || {}; - this._registries[registryName][value] = object; -}; - -ActionContainer.prototype._registryGet = function (registryName, value, defaultValue) { - if (arguments.length < 3) { - defaultValue = null; - } - return this._registries[registryName][value] || defaultValue; -}; - -// -// Namespace default accessor methods -// - -/** - * ActionContainer#setDefaults(options) -> Void - * - options (object):hash of options see [[Action.new]] - * - * Set defaults - **/ -ActionContainer.prototype.setDefaults = function (options) { - options = options || {}; - for (var property in options) { - if ($$.has(options, property)) { - this._defaults[property] = options[property]; - } - } - - // if these defaults match any existing arguments, replace the previous - // default on the object with the new one - this._actions.forEach(function (action) { - if ($$.has(options, action.dest)) { - action.defaultValue = options[action.dest]; - } - }); -}; - -/** - * ActionContainer#getDefault(dest) -> Mixed - * - dest (string): action destination - * - * Return action default value - **/ -ActionContainer.prototype.getDefault = function (dest) { - var result = $$.has(this._defaults, dest) ? this._defaults[dest] : null; - - this._actions.forEach(function (action) { - if (action.dest === dest && $$.has(action, 'defaultValue')) { - result = action.defaultValue; - } - }); - - return result; -}; -// -// Adding argument actions -// - -/** - * ActionContainer#addArgument(args, options) -> Object - * - args (String|Array): argument key, or array of argument keys - * - options (Object): action objects see [[Action.new]] - * - * #### Examples - * - addArgument([ '-f', '--foo' ], { action: 'store', defaultValue: 1, ... }) - * - addArgument([ 'bar' ], { action: 'store', nargs: 1, ... }) - * - addArgument('--baz', { action: 'store', nargs: 1, ... }) - **/ -ActionContainer.prototype.addArgument = function (args, options) { - args = args; - options = options || {}; - - if (typeof args === 'string') { - args = [ args ]; - } - if (!Array.isArray(args)) { - throw new TypeError('addArgument first argument should be a string or an array'); - } - if (typeof options !== 'object' || Array.isArray(options)) { - throw new TypeError('addArgument second argument should be a hash'); - } - - // if no positional args are supplied or only one is supplied and - // it doesn't look like an option string, parse a positional argument - if (!args || args.length === 1 && this.prefixChars.indexOf(args[0][0]) < 0) { - if (args && !!options.dest) { - throw new Error('dest supplied twice for positional argument'); - } - options = this._getPositional(args, options); - - // otherwise, we're adding an optional argument - } else { - options = this._getOptional(args, options); - } - - // if no default was supplied, use the parser-level default - if (typeof options.defaultValue === 'undefined') { - var dest = options.dest; - if ($$.has(this._defaults, dest)) { - options.defaultValue = this._defaults[dest]; - } else if (typeof this.argumentDefault !== 'undefined') { - options.defaultValue = this.argumentDefault; - } - } - - // create the action object, and add it to the parser - var ActionClass = this._popActionClass(options); - if (typeof ActionClass !== 'function') { - throw new Error(format('Unknown action "%s".', ActionClass)); - } - var action = new ActionClass(options); - - // throw an error if the action type is not callable - var typeFunction = this._registryGet('type', action.type, action.type); - if (typeof typeFunction !== 'function') { - throw new Error(format('"%s" is not callable', typeFunction)); - } - - return this._addAction(action); -}; - -/** - * ActionContainer#addArgumentGroup(options) -> ArgumentGroup - * - options (Object): hash of options see [[ArgumentGroup.new]] - * - * Create new arguments groups - **/ -ActionContainer.prototype.addArgumentGroup = function (options) { - var group = new ArgumentGroup(this, options); - this._actionGroups.push(group); - return group; -}; - -/** - * ActionContainer#addMutuallyExclusiveGroup(options) -> ArgumentGroup - * - options (Object): {required: false} - * - * Create new mutual exclusive groups - **/ -ActionContainer.prototype.addMutuallyExclusiveGroup = function (options) { - var group = new MutuallyExclusiveGroup(this, options); - this._mutuallyExclusiveGroups.push(group); - return group; -}; - -ActionContainer.prototype._addAction = function (action) { - var self = this; - - // resolve any conflicts - this._checkConflict(action); - - // add to actions list - this._actions.push(action); - action.container = this; - - // index the action by any option strings it has - action.optionStrings.forEach(function (optionString) { - self._optionStringActions[optionString] = action; - }); - - // set the flag if any option strings look like negative numbers - action.optionStrings.forEach(function (optionString) { - if (optionString.match(self._regexpNegativeNumber)) { - if (!self._hasNegativeNumberOptionals.some(Boolean)) { - self._hasNegativeNumberOptionals.push(true); - } - } - }); - - // return the created action - return action; -}; - -ActionContainer.prototype._removeAction = function (action) { - var actionIndex = this._actions.indexOf(action); - if (actionIndex >= 0) { - this._actions.splice(actionIndex, 1); - } -}; - -ActionContainer.prototype._addContainerActions = function (container) { - // collect groups by titles - var titleGroupMap = {}; - this._actionGroups.forEach(function (group) { - if (titleGroupMap[group.title]) { - throw new Error(format('Cannot merge actions - two groups are named "%s".', group.title)); - } - titleGroupMap[group.title] = group; - }); - - // map each action to its group - var groupMap = {}; - function actionHash(action) { - // unique (hopefully?) string suitable as dictionary key - return action.getName(); - } - container._actionGroups.forEach(function (group) { - // if a group with the title exists, use that, otherwise - // create a new group matching the container's group - if (!titleGroupMap[group.title]) { - titleGroupMap[group.title] = this.addArgumentGroup({ - title: group.title, - description: group.description - }); - } - - // map the actions to their new group - group._groupActions.forEach(function (action) { - groupMap[actionHash(action)] = titleGroupMap[group.title]; - }); - }, this); - - // add container's mutually exclusive groups - // NOTE: if add_mutually_exclusive_group ever gains title= and - // description= then this code will need to be expanded as above - var mutexGroup; - container._mutuallyExclusiveGroups.forEach(function (group) { - mutexGroup = this.addMutuallyExclusiveGroup({ - required: group.required - }); - // map the actions to their new mutex group - group._groupActions.forEach(function (action) { - groupMap[actionHash(action)] = mutexGroup; - }); - }, this); // forEach takes a 'this' argument - - // add all actions to this container or their group - container._actions.forEach(function (action) { - var key = actionHash(action); - if (groupMap[key]) { - groupMap[key]._addAction(action); - } else { - this._addAction(action); - } - }); -}; - -ActionContainer.prototype._getPositional = function (dest, options) { - if (Array.isArray(dest)) { - dest = dest[0]; - } - // make sure required is not specified - if (options.required) { - throw new Error('"required" is an invalid argument for positionals.'); - } - - // mark positional arguments as required if at least one is - // always required - if (options.nargs !== c.OPTIONAL && options.nargs !== c.ZERO_OR_MORE) { - options.required = true; - } - if (options.nargs === c.ZERO_OR_MORE && typeof options.defaultValue === 'undefined') { - options.required = true; - } - - // return the keyword arguments with no option strings - options.dest = dest; - options.optionStrings = []; - return options; -}; - -ActionContainer.prototype._getOptional = function (args, options) { - var prefixChars = this.prefixChars; - var optionStrings = []; - var optionStringsLong = []; - - // determine short and long option strings - args.forEach(function (optionString) { - // error on strings that don't start with an appropriate prefix - if (prefixChars.indexOf(optionString[0]) < 0) { - throw new Error(format('Invalid option string "%s": must start with a "%s".', - optionString, - prefixChars - )); - } - - // strings starting with two prefix characters are long options - optionStrings.push(optionString); - if (optionString.length > 1 && prefixChars.indexOf(optionString[1]) >= 0) { - optionStringsLong.push(optionString); - } - }); - - // infer dest, '--foo-bar' -> 'foo_bar' and '-x' -> 'x' - var dest = options.dest || null; - delete options.dest; - - if (!dest) { - var optionStringDest = optionStringsLong.length ? optionStringsLong[0] : optionStrings[0]; - dest = $$.trimChars(optionStringDest, this.prefixChars); - - if (dest.length === 0) { - throw new Error( - format('dest= is required for options like "%s"', optionStrings.join(', ')) - ); - } - dest = dest.replace(/-/g, '_'); - } - - // return the updated keyword arguments - options.dest = dest; - options.optionStrings = optionStrings; - - return options; -}; - -ActionContainer.prototype._popActionClass = function (options, defaultValue) { - defaultValue = defaultValue || null; - - var action = (options.action || defaultValue); - delete options.action; - - var actionClass = this._registryGet('action', action, action); - return actionClass; -}; - -ActionContainer.prototype._getHandler = function () { - var handlerString = this.conflictHandler; - var handlerFuncName = '_handleConflict' + $$.capitalize(handlerString); - var func = this[handlerFuncName]; - if (typeof func === 'undefined') { - var msg = 'invalid conflict resolution value: ' + handlerString; - throw new Error(msg); - } else { - return func; - } -}; - -ActionContainer.prototype._checkConflict = function (action) { - var optionStringActions = this._optionStringActions; - var conflictOptionals = []; - - // find all options that conflict with this option - // collect pairs, the string, and an existing action that it conflicts with - action.optionStrings.forEach(function (optionString) { - var conflOptional = optionStringActions[optionString]; - if (typeof conflOptional !== 'undefined') { - conflictOptionals.push([ optionString, conflOptional ]); - } - }); - - if (conflictOptionals.length > 0) { - var conflictHandler = this._getHandler(); - conflictHandler.call(this, action, conflictOptionals); - } -}; - -ActionContainer.prototype._handleConflictError = function (action, conflOptionals) { - var conflicts = conflOptionals.map(function (pair) { return pair[0]; }); - conflicts = conflicts.join(', '); - throw argumentErrorHelper( - action, - format('Conflicting option string(s): %s', conflicts) - ); -}; - -ActionContainer.prototype._handleConflictResolve = function (action, conflOptionals) { - // remove all conflicting options - var self = this; - conflOptionals.forEach(function (pair) { - var optionString = pair[0]; - var conflictingAction = pair[1]; - // remove the conflicting option string - var i = conflictingAction.optionStrings.indexOf(optionString); - if (i >= 0) { - conflictingAction.optionStrings.splice(i, 1); - } - delete self._optionStringActions[optionString]; - // if the option now has no option string, remove it from the - // container holding it - if (conflictingAction.optionStrings.length === 0) { - conflictingAction.container._removeAction(conflictingAction); - } - }); -}; diff --git a/node_modules/argparse/lib/argparse.js b/node_modules/argparse/lib/argparse.js deleted file mode 100644 index f2a2c51..0000000 --- a/node_modules/argparse/lib/argparse.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -module.exports.ArgumentParser = require('./argument_parser.js'); -module.exports.Namespace = require('./namespace'); -module.exports.Action = require('./action'); -module.exports.HelpFormatter = require('./help/formatter.js'); -module.exports.Const = require('./const.js'); - -module.exports.ArgumentDefaultsHelpFormatter = - require('./help/added_formatters.js').ArgumentDefaultsHelpFormatter; -module.exports.RawDescriptionHelpFormatter = - require('./help/added_formatters.js').RawDescriptionHelpFormatter; -module.exports.RawTextHelpFormatter = - require('./help/added_formatters.js').RawTextHelpFormatter; diff --git a/node_modules/argparse/lib/argument/error.js b/node_modules/argparse/lib/argument/error.js deleted file mode 100644 index c8a02a0..0000000 --- a/node_modules/argparse/lib/argument/error.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - - -var format = require('util').format; - - -var ERR_CODE = 'ARGError'; - -/*:nodoc:* - * argumentError(argument, message) -> TypeError - * - argument (Object): action with broken argument - * - message (String): error message - * - * Error format helper. An error from creating or using an argument - * (optional or positional). The string value of this exception - * is the message, augmented with information - * about the argument that caused it. - * - * #####Example - * - * var argumentErrorHelper = require('./argument/error'); - * if (conflictOptionals.length > 0) { - * throw argumentErrorHelper( - * action, - * format('Conflicting option string(s): %s', conflictOptionals.join(', ')) - * ); - * } - * - **/ -module.exports = function (argument, message) { - var argumentName = null; - var errMessage; - var err; - - if (argument.getName) { - argumentName = argument.getName(); - } else { - argumentName = '' + argument; - } - - if (!argumentName) { - errMessage = message; - } else { - errMessage = format('argument "%s": %s', argumentName, message); - } - - err = new TypeError(errMessage); - err.code = ERR_CODE; - return err; -}; diff --git a/node_modules/argparse/lib/argument/exclusive.js b/node_modules/argparse/lib/argument/exclusive.js deleted file mode 100644 index 8287e00..0000000 --- a/node_modules/argparse/lib/argument/exclusive.js +++ /dev/null @@ -1,54 +0,0 @@ -/** internal - * class MutuallyExclusiveGroup - * - * Group arguments. - * By default, ArgumentParser groups command-line arguments - * into “positional arguments” and “optional arguments” - * when displaying help messages. When there is a better - * conceptual grouping of arguments than this default one, - * appropriate groups can be created using the addArgumentGroup() method - * - * This class inherited from [[ArgumentContainer]] - **/ -'use strict'; - -var util = require('util'); - -var ArgumentGroup = require('./group'); - -/** - * new MutuallyExclusiveGroup(container, options) - * - container (object): main container - * - options (object): options.required -> true/false - * - * `required` could be an argument itself, but making it a property of - * the options argument is more consistent with the JS adaptation of the Python) - **/ -var MutuallyExclusiveGroup = module.exports = function MutuallyExclusiveGroup(container, options) { - var required; - options = options || {}; - required = options.required || false; - ArgumentGroup.call(this, container); - this.required = required; - -}; -util.inherits(MutuallyExclusiveGroup, ArgumentGroup); - - -MutuallyExclusiveGroup.prototype._addAction = function (action) { - var msg; - if (action.required) { - msg = 'mutually exclusive arguments must be optional'; - throw new Error(msg); - } - action = this._container._addAction(action); - this._groupActions.push(action); - return action; -}; - - -MutuallyExclusiveGroup.prototype._removeAction = function (action) { - this._container._removeAction(action); - this._groupActions.remove(action); -}; - diff --git a/node_modules/argparse/lib/argument/group.js b/node_modules/argparse/lib/argument/group.js deleted file mode 100644 index 58b271f..0000000 --- a/node_modules/argparse/lib/argument/group.js +++ /dev/null @@ -1,75 +0,0 @@ -/** internal - * class ArgumentGroup - * - * Group arguments. - * By default, ArgumentParser groups command-line arguments - * into “positional arguments” and “optional arguments” - * when displaying help messages. When there is a better - * conceptual grouping of arguments than this default one, - * appropriate groups can be created using the addArgumentGroup() method - * - * This class inherited from [[ArgumentContainer]] - **/ -'use strict'; - -var util = require('util'); - -var ActionContainer = require('../action_container'); - - -/** - * new ArgumentGroup(container, options) - * - container (object): main container - * - options (object): hash of group options - * - * #### options - * - **prefixChars** group name prefix - * - **argumentDefault** default argument value - * - **title** group title - * - **description** group description - * - **/ -var ArgumentGroup = module.exports = function ArgumentGroup(container, options) { - - options = options || {}; - - // add any missing keyword arguments by checking the container - options.conflictHandler = (options.conflictHandler || container.conflictHandler); - options.prefixChars = (options.prefixChars || container.prefixChars); - options.argumentDefault = (options.argumentDefault || container.argumentDefault); - - ActionContainer.call(this, options); - - // group attributes - this.title = options.title; - this._groupActions = []; - - // share most attributes with the container - this._container = container; - this._registries = container._registries; - this._actions = container._actions; - this._optionStringActions = container._optionStringActions; - this._defaults = container._defaults; - this._hasNegativeNumberOptionals = container._hasNegativeNumberOptionals; - this._mutuallyExclusiveGroups = container._mutuallyExclusiveGroups; -}; -util.inherits(ArgumentGroup, ActionContainer); - - -ArgumentGroup.prototype._addAction = function (action) { - // Parent add action - action = ActionContainer.prototype._addAction.call(this, action); - this._groupActions.push(action); - return action; -}; - - -ArgumentGroup.prototype._removeAction = function (action) { - // Parent remove action - ActionContainer.prototype._removeAction.call(this, action); - var actionIndex = this._groupActions.indexOf(action); - if (actionIndex >= 0) { - this._groupActions.splice(actionIndex, 1); - } -}; - diff --git a/node_modules/argparse/lib/argument_parser.js b/node_modules/argparse/lib/argument_parser.js deleted file mode 100644 index bd9a59a..0000000 --- a/node_modules/argparse/lib/argument_parser.js +++ /dev/null @@ -1,1161 +0,0 @@ -/** - * class ArgumentParser - * - * Object for parsing command line strings into js objects. - * - * Inherited from [[ActionContainer]] - **/ -'use strict'; - -var util = require('util'); -var format = require('util').format; -var Path = require('path'); -var sprintf = require('sprintf-js').sprintf; - -// Constants -var c = require('./const'); - -var $$ = require('./utils'); - -var ActionContainer = require('./action_container'); - -// Errors -var argumentErrorHelper = require('./argument/error'); - -var HelpFormatter = require('./help/formatter'); - -var Namespace = require('./namespace'); - - -/** - * new ArgumentParser(options) - * - * Create a new ArgumentParser object. - * - * ##### Options: - * - `prog` The name of the program (default: Path.basename(process.argv[1])) - * - `usage` A usage message (default: auto-generated from arguments) - * - `description` A description of what the program does - * - `epilog` Text following the argument descriptions - * - `parents` Parsers whose arguments should be copied into this one - * - `formatterClass` HelpFormatter class for printing help messages - * - `prefixChars` Characters that prefix optional arguments - * - `fromfilePrefixChars` Characters that prefix files containing additional arguments - * - `argumentDefault` The default value for all arguments - * - `addHelp` Add a -h/-help option - * - `conflictHandler` Specifies how to handle conflicting argument names - * - `debug` Enable debug mode. Argument errors throw exception in - * debug mode and process.exit in normal. Used for development and - * testing (default: false) - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#argumentparser-objects - **/ -function ArgumentParser(options) { - if (!(this instanceof ArgumentParser)) { - return new ArgumentParser(options); - } - var self = this; - options = options || {}; - - options.description = (options.description || null); - options.argumentDefault = (options.argumentDefault || null); - options.prefixChars = (options.prefixChars || '-'); - options.conflictHandler = (options.conflictHandler || 'error'); - ActionContainer.call(this, options); - - options.addHelp = typeof options.addHelp === 'undefined' || !!options.addHelp; - options.parents = options.parents || []; - // default program name - options.prog = (options.prog || Path.basename(process.argv[1])); - this.prog = options.prog; - this.usage = options.usage; - this.epilog = options.epilog; - this.version = options.version; - - this.debug = (options.debug === true); - - this.formatterClass = (options.formatterClass || HelpFormatter); - this.fromfilePrefixChars = options.fromfilePrefixChars || null; - this._positionals = this.addArgumentGroup({ title: 'Positional arguments' }); - this._optionals = this.addArgumentGroup({ title: 'Optional arguments' }); - this._subparsers = null; - - // register types - function FUNCTION_IDENTITY(o) { - return o; - } - this.register('type', 'auto', FUNCTION_IDENTITY); - this.register('type', null, FUNCTION_IDENTITY); - this.register('type', 'int', function (x) { - var result = parseInt(x, 10); - if (isNaN(result)) { - throw new Error(x + ' is not a valid integer.'); - } - return result; - }); - this.register('type', 'float', function (x) { - var result = parseFloat(x); - if (isNaN(result)) { - throw new Error(x + ' is not a valid float.'); - } - return result; - }); - this.register('type', 'string', function (x) { - return '' + x; - }); - - // add help and version arguments if necessary - var defaultPrefix = (this.prefixChars.indexOf('-') > -1) ? '-' : this.prefixChars[0]; - if (options.addHelp) { - this.addArgument( - [ defaultPrefix + 'h', defaultPrefix + defaultPrefix + 'help' ], - { - action: 'help', - defaultValue: c.SUPPRESS, - help: 'Show this help message and exit.' - } - ); - } - if (typeof this.version !== 'undefined') { - this.addArgument( - [ defaultPrefix + 'v', defaultPrefix + defaultPrefix + 'version' ], - { - action: 'version', - version: this.version, - defaultValue: c.SUPPRESS, - help: "Show program's version number and exit." - } - ); - } - - // add parent arguments and defaults - options.parents.forEach(function (parent) { - self._addContainerActions(parent); - if (typeof parent._defaults !== 'undefined') { - for (var defaultKey in parent._defaults) { - if (parent._defaults.hasOwnProperty(defaultKey)) { - self._defaults[defaultKey] = parent._defaults[defaultKey]; - } - } - } - }); -} - -util.inherits(ArgumentParser, ActionContainer); - -/** - * ArgumentParser#addSubparsers(options) -> [[ActionSubparsers]] - * - options (object): hash of options see [[ActionSubparsers.new]] - * - * See also [subcommands][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#sub-commands - **/ -ArgumentParser.prototype.addSubparsers = function (options) { - if (this._subparsers) { - this.error('Cannot have multiple subparser arguments.'); - } - - options = options || {}; - options.debug = (this.debug === true); - options.optionStrings = []; - options.parserClass = (options.parserClass || ArgumentParser); - - - if (!!options.title || !!options.description) { - - this._subparsers = this.addArgumentGroup({ - title: (options.title || 'subcommands'), - description: options.description - }); - delete options.title; - delete options.description; - - } else { - this._subparsers = this._positionals; - } - - // prog defaults to the usage message of this parser, skipping - // optional arguments and with no "usage:" prefix - if (!options.prog) { - var formatter = this._getFormatter(); - var positionals = this._getPositionalActions(); - var groups = this._mutuallyExclusiveGroups; - formatter.addUsage(this.usage, positionals, groups, ''); - options.prog = formatter.formatHelp().trim(); - } - - // create the parsers action and add it to the positionals list - var ParsersClass = this._popActionClass(options, 'parsers'); - var action = new ParsersClass(options); - this._subparsers._addAction(action); - - // return the created parsers action - return action; -}; - -ArgumentParser.prototype._addAction = function (action) { - if (action.isOptional()) { - this._optionals._addAction(action); - } else { - this._positionals._addAction(action); - } - return action; -}; - -ArgumentParser.prototype._getOptionalActions = function () { - return this._actions.filter(function (action) { - return action.isOptional(); - }); -}; - -ArgumentParser.prototype._getPositionalActions = function () { - return this._actions.filter(function (action) { - return action.isPositional(); - }); -}; - - -/** - * ArgumentParser#parseArgs(args, namespace) -> Namespace|Object - * - args (array): input elements - * - namespace (Namespace|Object): result object - * - * Parsed args and throws error if some arguments are not recognized - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#the-parse-args-method - **/ -ArgumentParser.prototype.parseArgs = function (args, namespace) { - var argv; - var result = this.parseKnownArgs(args, namespace); - - args = result[0]; - argv = result[1]; - if (argv && argv.length > 0) { - this.error( - format('Unrecognized arguments: %s.', argv.join(' ')) - ); - } - return args; -}; - -/** - * ArgumentParser#parseKnownArgs(args, namespace) -> array - * - args (array): input options - * - namespace (Namespace|Object): result object - * - * Parse known arguments and return tuple of result object - * and unknown args - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#partial-parsing - **/ -ArgumentParser.prototype.parseKnownArgs = function (args, namespace) { - var self = this; - - // args default to the system args - args = args || process.argv.slice(2); - - // default Namespace built from parser defaults - namespace = namespace || new Namespace(); - - self._actions.forEach(function (action) { - if (action.dest !== c.SUPPRESS) { - if (!$$.has(namespace, action.dest)) { - if (action.defaultValue !== c.SUPPRESS) { - var defaultValue = action.defaultValue; - if (typeof action.defaultValue === 'string') { - defaultValue = self._getValue(action, defaultValue); - } - namespace[action.dest] = defaultValue; - } - } - } - }); - - Object.keys(self._defaults).forEach(function (dest) { - namespace[dest] = self._defaults[dest]; - }); - - // parse the arguments and exit if there are any errors - try { - var res = this._parseKnownArgs(args, namespace); - - namespace = res[0]; - args = res[1]; - if ($$.has(namespace, c._UNRECOGNIZED_ARGS_ATTR)) { - args = $$.arrayUnion(args, namespace[c._UNRECOGNIZED_ARGS_ATTR]); - delete namespace[c._UNRECOGNIZED_ARGS_ATTR]; - } - return [ namespace, args ]; - } catch (e) { - this.error(e); - } -}; - -ArgumentParser.prototype._parseKnownArgs = function (argStrings, namespace) { - var self = this; - - var extras = []; - - // replace arg strings that are file references - if (this.fromfilePrefixChars !== null) { - argStrings = this._readArgsFromFiles(argStrings); - } - // map all mutually exclusive arguments to the other arguments - // they can't occur with - // Python has 'conflicts = action_conflicts.setdefault(mutex_action, [])' - // though I can't conceive of a way in which an action could be a member - // of two different mutually exclusive groups. - - function actionHash(action) { - // some sort of hashable key for this action - // action itself cannot be a key in actionConflicts - // I think getName() (join of optionStrings) is unique enough - return action.getName(); - } - - var conflicts, key; - var actionConflicts = {}; - - this._mutuallyExclusiveGroups.forEach(function (mutexGroup) { - mutexGroup._groupActions.forEach(function (mutexAction, i, groupActions) { - key = actionHash(mutexAction); - if (!$$.has(actionConflicts, key)) { - actionConflicts[key] = []; - } - conflicts = actionConflicts[key]; - conflicts.push.apply(conflicts, groupActions.slice(0, i)); - conflicts.push.apply(conflicts, groupActions.slice(i + 1)); - }); - }); - - // find all option indices, and determine the arg_string_pattern - // which has an 'O' if there is an option at an index, - // an 'A' if there is an argument, or a '-' if there is a '--' - var optionStringIndices = {}; - - var argStringPatternParts = []; - - argStrings.forEach(function (argString, argStringIndex) { - if (argString === '--') { - argStringPatternParts.push('-'); - while (argStringIndex < argStrings.length) { - argStringPatternParts.push('A'); - argStringIndex++; - } - } else { - // otherwise, add the arg to the arg strings - // and note the index if it was an option - var pattern; - var optionTuple = self._parseOptional(argString); - if (!optionTuple) { - pattern = 'A'; - } else { - optionStringIndices[argStringIndex] = optionTuple; - pattern = 'O'; - } - argStringPatternParts.push(pattern); - } - }); - var argStringsPattern = argStringPatternParts.join(''); - - var seenActions = []; - var seenNonDefaultActions = []; - - - function takeAction(action, argumentStrings, optionString) { - seenActions.push(action); - var argumentValues = self._getValues(action, argumentStrings); - - // error if this argument is not allowed with other previously - // seen arguments, assuming that actions that use the default - // value don't really count as "present" - if (argumentValues !== action.defaultValue) { - seenNonDefaultActions.push(action); - if (actionConflicts[actionHash(action)]) { - actionConflicts[actionHash(action)].forEach(function (actionConflict) { - if (seenNonDefaultActions.indexOf(actionConflict) >= 0) { - throw argumentErrorHelper( - action, - format('Not allowed with argument "%s".', actionConflict.getName()) - ); - } - }); - } - } - - if (argumentValues !== c.SUPPRESS) { - action.call(self, namespace, argumentValues, optionString); - } - } - - function consumeOptional(startIndex) { - // get the optional identified at this index - var optionTuple = optionStringIndices[startIndex]; - var action = optionTuple[0]; - var optionString = optionTuple[1]; - var explicitArg = optionTuple[2]; - - // identify additional optionals in the same arg string - // (e.g. -xyz is the same as -x -y -z if no args are required) - var actionTuples = []; - - var args, argCount, start, stop; - - for (;;) { - if (!action) { - extras.push(argStrings[startIndex]); - return startIndex + 1; - } - if (explicitArg) { - argCount = self._matchArgument(action, 'A'); - - // if the action is a single-dash option and takes no - // arguments, try to parse more single-dash options out - // of the tail of the option string - var chars = self.prefixChars; - if (argCount === 0 && chars.indexOf(optionString[1]) < 0) { - actionTuples.push([ action, [], optionString ]); - optionString = optionString[0] + explicitArg[0]; - var newExplicitArg = explicitArg.slice(1) || null; - var optionalsMap = self._optionStringActions; - - if (Object.keys(optionalsMap).indexOf(optionString) >= 0) { - action = optionalsMap[optionString]; - explicitArg = newExplicitArg; - } else { - throw argumentErrorHelper(action, sprintf('ignored explicit argument %r', explicitArg)); - } - } else if (argCount === 1) { - // if the action expect exactly one argument, we've - // successfully matched the option; exit the loop - stop = startIndex + 1; - args = [ explicitArg ]; - actionTuples.push([ action, args, optionString ]); - break; - } else { - // error if a double-dash option did not use the - // explicit argument - throw argumentErrorHelper(action, sprintf('ignored explicit argument %r', explicitArg)); - } - } else { - // if there is no explicit argument, try to match the - // optional's string arguments with the following strings - // if successful, exit the loop - - start = startIndex + 1; - var selectedPatterns = argStringsPattern.substr(start); - - argCount = self._matchArgument(action, selectedPatterns); - stop = start + argCount; - - - args = argStrings.slice(start, stop); - - actionTuples.push([ action, args, optionString ]); - break; - } - - } - - // add the Optional to the list and return the index at which - // the Optional's string args stopped - if (actionTuples.length < 1) { - throw new Error('length should be > 0'); - } - for (var i = 0; i < actionTuples.length; i++) { - takeAction.apply(self, actionTuples[i]); - } - return stop; - } - - // the list of Positionals left to be parsed; this is modified - // by consume_positionals() - var positionals = self._getPositionalActions(); - - function consumePositionals(startIndex) { - // match as many Positionals as possible - var selectedPattern = argStringsPattern.substr(startIndex); - var argCounts = self._matchArgumentsPartial(positionals, selectedPattern); - - // slice off the appropriate arg strings for each Positional - // and add the Positional and its args to the list - for (var i = 0; i < positionals.length; i++) { - var action = positionals[i]; - var argCount = argCounts[i]; - if (typeof argCount === 'undefined') { - continue; - } - var args = argStrings.slice(startIndex, startIndex + argCount); - - startIndex += argCount; - takeAction(action, args); - } - - // slice off the Positionals that we just parsed and return the - // index at which the Positionals' string args stopped - positionals = positionals.slice(argCounts.length); - return startIndex; - } - - // consume Positionals and Optionals alternately, until we have - // passed the last option string - var startIndex = 0; - var position; - - var maxOptionStringIndex = -1; - - Object.keys(optionStringIndices).forEach(function (position) { - maxOptionStringIndex = Math.max(maxOptionStringIndex, parseInt(position, 10)); - }); - - var positionalsEndIndex, nextOptionStringIndex; - - while (startIndex <= maxOptionStringIndex) { - // consume any Positionals preceding the next option - nextOptionStringIndex = null; - for (position in optionStringIndices) { - if (!optionStringIndices.hasOwnProperty(position)) { continue; } - - position = parseInt(position, 10); - if (position >= startIndex) { - if (nextOptionStringIndex !== null) { - nextOptionStringIndex = Math.min(nextOptionStringIndex, position); - } else { - nextOptionStringIndex = position; - } - } - } - - if (startIndex !== nextOptionStringIndex) { - positionalsEndIndex = consumePositionals(startIndex); - // only try to parse the next optional if we didn't consume - // the option string during the positionals parsing - if (positionalsEndIndex > startIndex) { - startIndex = positionalsEndIndex; - continue; - } else { - startIndex = positionalsEndIndex; - } - } - - // if we consumed all the positionals we could and we're not - // at the index of an option string, there were extra arguments - if (!optionStringIndices[startIndex]) { - var strings = argStrings.slice(startIndex, nextOptionStringIndex); - extras = extras.concat(strings); - startIndex = nextOptionStringIndex; - } - // consume the next optional and any arguments for it - startIndex = consumeOptional(startIndex); - } - - // consume any positionals following the last Optional - var stopIndex = consumePositionals(startIndex); - - // if we didn't consume all the argument strings, there were extras - extras = extras.concat(argStrings.slice(stopIndex)); - - // if we didn't use all the Positional objects, there were too few - // arg strings supplied. - if (positionals.length > 0) { - self.error('too few arguments'); - } - - // make sure all required actions were present - self._actions.forEach(function (action) { - if (action.required) { - if (seenActions.indexOf(action) < 0) { - self.error(format('Argument "%s" is required', action.getName())); - } - } - }); - - // make sure all required groups have one option present - var actionUsed = false; - self._mutuallyExclusiveGroups.forEach(function (group) { - if (group.required) { - actionUsed = group._groupActions.some(function (action) { - return seenNonDefaultActions.indexOf(action) !== -1; - }); - - // if no actions were used, report the error - if (!actionUsed) { - var names = []; - group._groupActions.forEach(function (action) { - if (action.help !== c.SUPPRESS) { - names.push(action.getName()); - } - }); - names = names.join(' '); - var msg = 'one of the arguments ' + names + ' is required'; - self.error(msg); - } - } - }); - - // return the updated namespace and the extra arguments - return [ namespace, extras ]; -}; - -ArgumentParser.prototype._readArgsFromFiles = function (argStrings) { - // expand arguments referencing files - var self = this; - var fs = require('fs'); - var newArgStrings = []; - argStrings.forEach(function (argString) { - if (self.fromfilePrefixChars.indexOf(argString[0]) < 0) { - // for regular arguments, just add them back into the list - newArgStrings.push(argString); - } else { - // replace arguments referencing files with the file content - try { - var argstrs = []; - var filename = argString.slice(1); - var content = fs.readFileSync(filename, 'utf8'); - content = content.trim().split('\n'); - content.forEach(function (argLine) { - self.convertArgLineToArgs(argLine).forEach(function (arg) { - argstrs.push(arg); - }); - argstrs = self._readArgsFromFiles(argstrs); - }); - newArgStrings.push.apply(newArgStrings, argstrs); - } catch (error) { - return self.error(error.message); - } - } - }); - return newArgStrings; -}; - -ArgumentParser.prototype.convertArgLineToArgs = function (argLine) { - return [ argLine ]; -}; - -ArgumentParser.prototype._matchArgument = function (action, regexpArgStrings) { - - // match the pattern for this action to the arg strings - var regexpNargs = new RegExp('^' + this._getNargsPattern(action)); - var matches = regexpArgStrings.match(regexpNargs); - var message; - - // throw an exception if we weren't able to find a match - if (!matches) { - switch (action.nargs) { - /*eslint-disable no-undefined*/ - case undefined: - case null: - message = 'Expected one argument.'; - break; - case c.OPTIONAL: - message = 'Expected at most one argument.'; - break; - case c.ONE_OR_MORE: - message = 'Expected at least one argument.'; - break; - default: - message = 'Expected %s argument(s)'; - } - - throw argumentErrorHelper( - action, - format(message, action.nargs) - ); - } - // return the number of arguments matched - return matches[1].length; -}; - -ArgumentParser.prototype._matchArgumentsPartial = function (actions, regexpArgStrings) { - // progressively shorten the actions list by slicing off the - // final actions until we find a match - var self = this; - var result = []; - var actionSlice, pattern, matches; - var i, j; - - function getLength(string) { - return string.length; - } - - for (i = actions.length; i > 0; i--) { - pattern = ''; - actionSlice = actions.slice(0, i); - for (j = 0; j < actionSlice.length; j++) { - pattern += self._getNargsPattern(actionSlice[j]); - } - - pattern = new RegExp('^' + pattern); - matches = regexpArgStrings.match(pattern); - - if (matches && matches.length > 0) { - // need only groups - matches = matches.splice(1); - result = result.concat(matches.map(getLength)); - break; - } - } - - // return the list of arg string counts - return result; -}; - -ArgumentParser.prototype._parseOptional = function (argString) { - var action, optionString, argExplicit, optionTuples; - - // if it's an empty string, it was meant to be a positional - if (!argString) { - return null; - } - - // if it doesn't start with a prefix, it was meant to be positional - if (this.prefixChars.indexOf(argString[0]) < 0) { - return null; - } - - // if the option string is present in the parser, return the action - if (this._optionStringActions[argString]) { - return [ this._optionStringActions[argString], argString, null ]; - } - - // if it's just a single character, it was meant to be positional - if (argString.length === 1) { - return null; - } - - // if the option string before the "=" is present, return the action - if (argString.indexOf('=') >= 0) { - optionString = argString.split('=', 1)[0]; - argExplicit = argString.slice(optionString.length + 1); - - if (this._optionStringActions[optionString]) { - action = this._optionStringActions[optionString]; - return [ action, optionString, argExplicit ]; - } - } - - // search through all possible prefixes of the option string - // and all actions in the parser for possible interpretations - optionTuples = this._getOptionTuples(argString); - - // if multiple actions match, the option string was ambiguous - if (optionTuples.length > 1) { - var optionStrings = optionTuples.map(function (optionTuple) { - return optionTuple[1]; - }); - this.error(format( - 'Ambiguous option: "%s" could match %s.', - argString, optionStrings.join(', ') - )); - // if exactly one action matched, this segmentation is good, - // so return the parsed action - } else if (optionTuples.length === 1) { - return optionTuples[0]; - } - - // if it was not found as an option, but it looks like a negative - // number, it was meant to be positional - // unless there are negative-number-like options - if (argString.match(this._regexpNegativeNumber)) { - if (!this._hasNegativeNumberOptionals.some(Boolean)) { - return null; - } - } - // if it contains a space, it was meant to be a positional - if (argString.search(' ') >= 0) { - return null; - } - - // it was meant to be an optional but there is no such option - // in this parser (though it might be a valid option in a subparser) - return [ null, argString, null ]; -}; - -ArgumentParser.prototype._getOptionTuples = function (optionString) { - var result = []; - var chars = this.prefixChars; - var optionPrefix; - var argExplicit; - var action; - var actionOptionString; - - // option strings starting with two prefix characters are only split at - // the '=' - if (chars.indexOf(optionString[0]) >= 0 && chars.indexOf(optionString[1]) >= 0) { - if (optionString.indexOf('=') >= 0) { - var optionStringSplit = optionString.split('=', 1); - - optionPrefix = optionStringSplit[0]; - argExplicit = optionStringSplit[1]; - } else { - optionPrefix = optionString; - argExplicit = null; - } - - for (actionOptionString in this._optionStringActions) { - if (actionOptionString.substr(0, optionPrefix.length) === optionPrefix) { - action = this._optionStringActions[actionOptionString]; - result.push([ action, actionOptionString, argExplicit ]); - } - } - - // single character options can be concatenated with their arguments - // but multiple character options always have to have their argument - // separate - } else if (chars.indexOf(optionString[0]) >= 0 && chars.indexOf(optionString[1]) < 0) { - optionPrefix = optionString; - argExplicit = null; - var optionPrefixShort = optionString.substr(0, 2); - var argExplicitShort = optionString.substr(2); - - for (actionOptionString in this._optionStringActions) { - if (!$$.has(this._optionStringActions, actionOptionString)) continue; - - action = this._optionStringActions[actionOptionString]; - if (actionOptionString === optionPrefixShort) { - result.push([ action, actionOptionString, argExplicitShort ]); - } else if (actionOptionString.substr(0, optionPrefix.length) === optionPrefix) { - result.push([ action, actionOptionString, argExplicit ]); - } - } - - // shouldn't ever get here - } else { - throw new Error(format('Unexpected option string: %s.', optionString)); - } - // return the collected option tuples - return result; -}; - -ArgumentParser.prototype._getNargsPattern = function (action) { - // in all examples below, we have to allow for '--' args - // which are represented as '-' in the pattern - var regexpNargs; - - switch (action.nargs) { - // the default (null) is assumed to be a single argument - case undefined: - case null: - regexpNargs = '(-*A-*)'; - break; - // allow zero or more arguments - case c.OPTIONAL: - regexpNargs = '(-*A?-*)'; - break; - // allow zero or more arguments - case c.ZERO_OR_MORE: - regexpNargs = '(-*[A-]*)'; - break; - // allow one or more arguments - case c.ONE_OR_MORE: - regexpNargs = '(-*A[A-]*)'; - break; - // allow any number of options or arguments - case c.REMAINDER: - regexpNargs = '([-AO]*)'; - break; - // allow one argument followed by any number of options or arguments - case c.PARSER: - regexpNargs = '(-*A[-AO]*)'; - break; - // all others should be integers - default: - regexpNargs = '(-*' + $$.repeat('-*A', action.nargs) + '-*)'; - } - - // if this is an optional action, -- is not allowed - if (action.isOptional()) { - regexpNargs = regexpNargs.replace(/-\*/g, ''); - regexpNargs = regexpNargs.replace(/-/g, ''); - } - - // return the pattern - return regexpNargs; -}; - -// -// Value conversion methods -// - -ArgumentParser.prototype._getValues = function (action, argStrings) { - var self = this; - - // for everything but PARSER args, strip out '--' - if (action.nargs !== c.PARSER && action.nargs !== c.REMAINDER) { - argStrings = argStrings.filter(function (arrayElement) { - return arrayElement !== '--'; - }); - } - - var value, argString; - - // optional argument produces a default when not present - if (argStrings.length === 0 && action.nargs === c.OPTIONAL) { - - value = (action.isOptional()) ? action.constant : action.defaultValue; - - if (typeof (value) === 'string') { - value = this._getValue(action, value); - this._checkValue(action, value); - } - - // when nargs='*' on a positional, if there were no command-line - // args, use the default if it is anything other than None - } else if (argStrings.length === 0 && action.nargs === c.ZERO_OR_MORE && - action.optionStrings.length === 0) { - - value = (action.defaultValue || argStrings); - this._checkValue(action, value); - - // single argument or optional argument produces a single value - } else if (argStrings.length === 1 && - (!action.nargs || action.nargs === c.OPTIONAL)) { - - argString = argStrings[0]; - value = this._getValue(action, argString); - this._checkValue(action, value); - - // REMAINDER arguments convert all values, checking none - } else if (action.nargs === c.REMAINDER) { - value = argStrings.map(function (v) { - return self._getValue(action, v); - }); - - // PARSER arguments convert all values, but check only the first - } else if (action.nargs === c.PARSER) { - value = argStrings.map(function (v) { - return self._getValue(action, v); - }); - this._checkValue(action, value[0]); - - // all other types of nargs produce a list - } else { - value = argStrings.map(function (v) { - return self._getValue(action, v); - }); - value.forEach(function (v) { - self._checkValue(action, v); - }); - } - - // return the converted value - return value; -}; - -ArgumentParser.prototype._getValue = function (action, argString) { - var result; - - var typeFunction = this._registryGet('type', action.type, action.type); - if (typeof typeFunction !== 'function') { - var message = format('%s is not callable', typeFunction); - throw argumentErrorHelper(action, message); - } - - // convert the value to the appropriate type - try { - result = typeFunction(argString); - - // ArgumentTypeErrors indicate errors - // If action.type is not a registered string, it is a function - // Try to deduce its name for inclusion in the error message - // Failing that, include the error message it raised. - } catch (e) { - var name = null; - if (typeof action.type === 'string') { - name = action.type; - } else { - name = action.type.name || action.type.displayName || ''; - } - var msg = format('Invalid %s value: %s', name, argString); - if (name === '') { msg += '\n' + e.message; } - throw argumentErrorHelper(action, msg); - } - // return the converted value - return result; -}; - -ArgumentParser.prototype._checkValue = function (action, value) { - // converted value must be one of the choices (if specified) - var choices = action.choices; - if (choices) { - // choise for argument can by array or string - if ((typeof choices === 'string' || Array.isArray(choices)) && - choices.indexOf(value) !== -1) { - return; - } - // choise for subparsers can by only hash - if (typeof choices === 'object' && !Array.isArray(choices) && choices[value]) { - return; - } - - if (typeof choices === 'string') { - choices = choices.split('').join(', '); - } else if (Array.isArray(choices)) { - choices = choices.join(', '); - } else { - choices = Object.keys(choices).join(', '); - } - var message = format('Invalid choice: %s (choose from [%s])', value, choices); - throw argumentErrorHelper(action, message); - } -}; - -// -// Help formatting methods -// - -/** - * ArgumentParser#formatUsage -> string - * - * Return usage string - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#printing-help - **/ -ArgumentParser.prototype.formatUsage = function () { - var formatter = this._getFormatter(); - formatter.addUsage(this.usage, this._actions, this._mutuallyExclusiveGroups); - return formatter.formatHelp(); -}; - -/** - * ArgumentParser#formatHelp -> string - * - * Return help - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#printing-help - **/ -ArgumentParser.prototype.formatHelp = function () { - var formatter = this._getFormatter(); - - // usage - formatter.addUsage(this.usage, this._actions, this._mutuallyExclusiveGroups); - - // description - formatter.addText(this.description); - - // positionals, optionals and user-defined groups - this._actionGroups.forEach(function (actionGroup) { - formatter.startSection(actionGroup.title); - formatter.addText(actionGroup.description); - formatter.addArguments(actionGroup._groupActions); - formatter.endSection(); - }); - - // epilog - formatter.addText(this.epilog); - - // determine help from format above - return formatter.formatHelp(); -}; - -ArgumentParser.prototype._getFormatter = function () { - var FormatterClass = this.formatterClass; - var formatter = new FormatterClass({ prog: this.prog }); - return formatter; -}; - -// -// Print functions -// - -/** - * ArgumentParser#printUsage() -> Void - * - * Print usage - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#printing-help - **/ -ArgumentParser.prototype.printUsage = function () { - this._printMessage(this.formatUsage()); -}; - -/** - * ArgumentParser#printHelp() -> Void - * - * Print help - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#printing-help - **/ -ArgumentParser.prototype.printHelp = function () { - this._printMessage(this.formatHelp()); -}; - -ArgumentParser.prototype._printMessage = function (message, stream) { - if (!stream) { - stream = process.stdout; - } - if (message) { - stream.write('' + message); - } -}; - -// -// Exit functions -// - -/** - * ArgumentParser#exit(status=0, message) -> Void - * - status (int): exit status - * - message (string): message - * - * Print message in stderr/stdout and exit program - **/ -ArgumentParser.prototype.exit = function (status, message) { - if (message) { - if (status === 0) { - this._printMessage(message); - } else { - this._printMessage(message, process.stderr); - } - } - - process.exit(status); -}; - -/** - * ArgumentParser#error(message) -> Void - * - err (Error|string): message - * - * Error method Prints a usage message incorporating the message to stderr and - * exits. If you override this in a subclass, - * it should not return -- it should - * either exit or throw an exception. - * - **/ -ArgumentParser.prototype.error = function (err) { - var message; - if (err instanceof Error) { - if (this.debug === true) { - throw err; - } - message = err.message; - } else { - message = err; - } - var msg = format('%s: error: %s', this.prog, message) + c.EOL; - - if (this.debug === true) { - throw new Error(msg); - } - - this.printUsage(process.stderr); - - return this.exit(2, msg); -}; - -module.exports = ArgumentParser; diff --git a/node_modules/argparse/lib/const.js b/node_modules/argparse/lib/const.js deleted file mode 100644 index b1fd4ce..0000000 --- a/node_modules/argparse/lib/const.js +++ /dev/null @@ -1,21 +0,0 @@ -// -// Constants -// - -'use strict'; - -module.exports.EOL = '\n'; - -module.exports.SUPPRESS = '==SUPPRESS=='; - -module.exports.OPTIONAL = '?'; - -module.exports.ZERO_OR_MORE = '*'; - -module.exports.ONE_OR_MORE = '+'; - -module.exports.PARSER = 'A...'; - -module.exports.REMAINDER = '...'; - -module.exports._UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args'; diff --git a/node_modules/argparse/lib/help/added_formatters.js b/node_modules/argparse/lib/help/added_formatters.js deleted file mode 100644 index f8e4299..0000000 --- a/node_modules/argparse/lib/help/added_formatters.js +++ /dev/null @@ -1,87 +0,0 @@ -'use strict'; - -var util = require('util'); - -// Constants -var c = require('../const'); - -var $$ = require('../utils'); -var HelpFormatter = require('./formatter.js'); - -/** - * new RawDescriptionHelpFormatter(options) - * new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...}) - * - * Help message formatter which adds default values to argument help. - * - * Only the name of this class is considered a public API. All the methods - * provided by the class are considered an implementation detail. - **/ - -function ArgumentDefaultsHelpFormatter(options) { - HelpFormatter.call(this, options); -} - -util.inherits(ArgumentDefaultsHelpFormatter, HelpFormatter); - -ArgumentDefaultsHelpFormatter.prototype._getHelpString = function (action) { - var help = action.help; - if (action.help.indexOf('%(defaultValue)s') === -1) { - if (action.defaultValue !== c.SUPPRESS) { - var defaulting_nargs = [ c.OPTIONAL, c.ZERO_OR_MORE ]; - if (action.isOptional() || (defaulting_nargs.indexOf(action.nargs) >= 0)) { - help += ' (default: %(defaultValue)s)'; - } - } - } - return help; -}; - -module.exports.ArgumentDefaultsHelpFormatter = ArgumentDefaultsHelpFormatter; - -/** - * new RawDescriptionHelpFormatter(options) - * new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...}) - * - * Help message formatter which retains any formatting in descriptions. - * - * Only the name of this class is considered a public API. All the methods - * provided by the class are considered an implementation detail. - **/ - -function RawDescriptionHelpFormatter(options) { - HelpFormatter.call(this, options); -} - -util.inherits(RawDescriptionHelpFormatter, HelpFormatter); - -RawDescriptionHelpFormatter.prototype._fillText = function (text, width, indent) { - var lines = text.split('\n'); - lines = lines.map(function (line) { - return $$.trimEnd(indent + line); - }); - return lines.join('\n'); -}; -module.exports.RawDescriptionHelpFormatter = RawDescriptionHelpFormatter; - -/** - * new RawTextHelpFormatter(options) - * new ArgumentParser({formatterClass: argparse.RawTextHelpFormatter, ...}) - * - * Help message formatter which retains formatting of all help text. - * - * Only the name of this class is considered a public API. All the methods - * provided by the class are considered an implementation detail. - **/ - -function RawTextHelpFormatter(options) { - RawDescriptionHelpFormatter.call(this, options); -} - -util.inherits(RawTextHelpFormatter, RawDescriptionHelpFormatter); - -RawTextHelpFormatter.prototype._splitLines = function (text) { - return text.split('\n'); -}; - -module.exports.RawTextHelpFormatter = RawTextHelpFormatter; diff --git a/node_modules/argparse/lib/help/formatter.js b/node_modules/argparse/lib/help/formatter.js deleted file mode 100644 index 29036c1..0000000 --- a/node_modules/argparse/lib/help/formatter.js +++ /dev/null @@ -1,795 +0,0 @@ -/** - * class HelpFormatter - * - * Formatter for generating usage messages and argument help strings. Only the - * name of this class is considered a public API. All the methods provided by - * the class are considered an implementation detail. - * - * Do not call in your code, use this class only for inherits your own forvatter - * - * ToDo add [additonal formatters][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#formatter-class - **/ -'use strict'; - -var sprintf = require('sprintf-js').sprintf; - -// Constants -var c = require('../const'); - -var $$ = require('../utils'); - - -/*:nodoc:* internal - * new Support(parent, heding) - * - parent (object): parent section - * - heading (string): header string - * - **/ -function Section(parent, heading) { - this._parent = parent; - this._heading = heading; - this._items = []; -} - -/*:nodoc:* internal - * Section#addItem(callback) -> Void - * - callback (array): tuple with function and args - * - * Add function for single element - **/ -Section.prototype.addItem = function (callback) { - this._items.push(callback); -}; - -/*:nodoc:* internal - * Section#formatHelp(formatter) -> string - * - formatter (HelpFormatter): current formatter - * - * Form help section string - * - **/ -Section.prototype.formatHelp = function (formatter) { - var itemHelp, heading; - - // format the indented section - if (this._parent) { - formatter._indent(); - } - - itemHelp = this._items.map(function (item) { - var obj, func, args; - - obj = formatter; - func = item[0]; - args = item[1]; - return func.apply(obj, args); - }); - itemHelp = formatter._joinParts(itemHelp); - - if (this._parent) { - formatter._dedent(); - } - - // return nothing if the section was empty - if (!itemHelp) { - return ''; - } - - // add the heading if the section was non-empty - heading = ''; - if (this._heading && this._heading !== c.SUPPRESS) { - var currentIndent = formatter.currentIndent; - heading = $$.repeat(' ', currentIndent) + this._heading + ':' + c.EOL; - } - - // join the section-initialize newline, the heading and the help - return formatter._joinParts([ c.EOL, heading, itemHelp, c.EOL ]); -}; - -/** - * new HelpFormatter(options) - * - * #### Options: - * - `prog`: program name - * - `indentIncriment`: indent step, default value 2 - * - `maxHelpPosition`: max help position, default value = 24 - * - `width`: line width - * - **/ -var HelpFormatter = module.exports = function HelpFormatter(options) { - options = options || {}; - - this._prog = options.prog; - - this._maxHelpPosition = options.maxHelpPosition || 24; - this._width = (options.width || ((process.env.COLUMNS || 80) - 2)); - - this._currentIndent = 0; - this._indentIncriment = options.indentIncriment || 2; - this._level = 0; - this._actionMaxLength = 0; - - this._rootSection = new Section(null); - this._currentSection = this._rootSection; - - this._whitespaceMatcher = new RegExp('\\s+', 'g'); - this._longBreakMatcher = new RegExp(c.EOL + c.EOL + c.EOL + '+', 'g'); -}; - -HelpFormatter.prototype._indent = function () { - this._currentIndent += this._indentIncriment; - this._level += 1; -}; - -HelpFormatter.prototype._dedent = function () { - this._currentIndent -= this._indentIncriment; - this._level -= 1; - if (this._currentIndent < 0) { - throw new Error('Indent decreased below 0.'); - } -}; - -HelpFormatter.prototype._addItem = function (func, args) { - this._currentSection.addItem([ func, args ]); -}; - -// -// Message building methods -// - -/** - * HelpFormatter#startSection(heading) -> Void - * - heading (string): header string - * - * Start new help section - * - * See alse [code example][1] - * - * ##### Example - * - * formatter.startSection(actionGroup.title); - * formatter.addText(actionGroup.description); - * formatter.addArguments(actionGroup._groupActions); - * formatter.endSection(); - * - **/ -HelpFormatter.prototype.startSection = function (heading) { - this._indent(); - var section = new Section(this._currentSection, heading); - var func = section.formatHelp.bind(section); - this._addItem(func, [ this ]); - this._currentSection = section; -}; - -/** - * HelpFormatter#endSection -> Void - * - * End help section - * - * ##### Example - * - * formatter.startSection(actionGroup.title); - * formatter.addText(actionGroup.description); - * formatter.addArguments(actionGroup._groupActions); - * formatter.endSection(); - **/ -HelpFormatter.prototype.endSection = function () { - this._currentSection = this._currentSection._parent; - this._dedent(); -}; - -/** - * HelpFormatter#addText(text) -> Void - * - text (string): plain text - * - * Add plain text into current section - * - * ##### Example - * - * formatter.startSection(actionGroup.title); - * formatter.addText(actionGroup.description); - * formatter.addArguments(actionGroup._groupActions); - * formatter.endSection(); - * - **/ -HelpFormatter.prototype.addText = function (text) { - if (text && text !== c.SUPPRESS) { - this._addItem(this._formatText, [ text ]); - } -}; - -/** - * HelpFormatter#addUsage(usage, actions, groups, prefix) -> Void - * - usage (string): usage text - * - actions (array): actions list - * - groups (array): groups list - * - prefix (string): usage prefix - * - * Add usage data into current section - * - * ##### Example - * - * formatter.addUsage(this.usage, this._actions, []); - * return formatter.formatHelp(); - * - **/ -HelpFormatter.prototype.addUsage = function (usage, actions, groups, prefix) { - if (usage !== c.SUPPRESS) { - this._addItem(this._formatUsage, [ usage, actions, groups, prefix ]); - } -}; - -/** - * HelpFormatter#addArgument(action) -> Void - * - action (object): action - * - * Add argument into current section - * - * Single variant of [[HelpFormatter#addArguments]] - **/ -HelpFormatter.prototype.addArgument = function (action) { - if (action.help !== c.SUPPRESS) { - var self = this; - - // find all invocations - var invocations = [ this._formatActionInvocation(action) ]; - var invocationLength = invocations[0].length; - - var actionLength; - - if (action._getSubactions) { - this._indent(); - action._getSubactions().forEach(function (subaction) { - - var invocationNew = self._formatActionInvocation(subaction); - invocations.push(invocationNew); - invocationLength = Math.max(invocationLength, invocationNew.length); - - }); - this._dedent(); - } - - // update the maximum item length - actionLength = invocationLength + this._currentIndent; - this._actionMaxLength = Math.max(this._actionMaxLength, actionLength); - - // add the item to the list - this._addItem(this._formatAction, [ action ]); - } -}; - -/** - * HelpFormatter#addArguments(actions) -> Void - * - actions (array): actions list - * - * Mass add arguments into current section - * - * ##### Example - * - * formatter.startSection(actionGroup.title); - * formatter.addText(actionGroup.description); - * formatter.addArguments(actionGroup._groupActions); - * formatter.endSection(); - * - **/ -HelpFormatter.prototype.addArguments = function (actions) { - var self = this; - actions.forEach(function (action) { - self.addArgument(action); - }); -}; - -// -// Help-formatting methods -// - -/** - * HelpFormatter#formatHelp -> string - * - * Format help - * - * ##### Example - * - * formatter.addText(this.epilog); - * return formatter.formatHelp(); - * - **/ -HelpFormatter.prototype.formatHelp = function () { - var help = this._rootSection.formatHelp(this); - if (help) { - help = help.replace(this._longBreakMatcher, c.EOL + c.EOL); - help = $$.trimChars(help, c.EOL) + c.EOL; - } - return help; -}; - -HelpFormatter.prototype._joinParts = function (partStrings) { - return partStrings.filter(function (part) { - return (part && part !== c.SUPPRESS); - }).join(''); -}; - -HelpFormatter.prototype._formatUsage = function (usage, actions, groups, prefix) { - if (!prefix && typeof prefix !== 'string') { - prefix = 'usage: '; - } - - actions = actions || []; - groups = groups || []; - - - // if usage is specified, use that - if (usage) { - usage = sprintf(usage, { prog: this._prog }); - - // if no optionals or positionals are available, usage is just prog - } else if (!usage && actions.length === 0) { - usage = this._prog; - - // if optionals and positionals are available, calculate usage - } else if (!usage) { - var prog = this._prog; - var optionals = []; - var positionals = []; - var actionUsage; - var textWidth; - - // split optionals from positionals - actions.forEach(function (action) { - if (action.isOptional()) { - optionals.push(action); - } else { - positionals.push(action); - } - }); - - // build full usage string - actionUsage = this._formatActionsUsage([].concat(optionals, positionals), groups); - usage = [ prog, actionUsage ].join(' '); - - // wrap the usage parts if it's too long - textWidth = this._width - this._currentIndent; - if ((prefix.length + usage.length) > textWidth) { - - // break usage into wrappable parts - var regexpPart = new RegExp('\\(.*?\\)+|\\[.*?\\]+|\\S+', 'g'); - var optionalUsage = this._formatActionsUsage(optionals, groups); - var positionalUsage = this._formatActionsUsage(positionals, groups); - - - var optionalParts = optionalUsage.match(regexpPart); - var positionalParts = positionalUsage.match(regexpPart) || []; - - if (optionalParts.join(' ') !== optionalUsage) { - throw new Error('assert "optionalParts.join(\' \') === optionalUsage"'); - } - if (positionalParts.join(' ') !== positionalUsage) { - throw new Error('assert "positionalParts.join(\' \') === positionalUsage"'); - } - - // helper for wrapping lines - /*eslint-disable func-style*/ // node 0.10 compat - var _getLines = function (parts, indent, prefix) { - var lines = []; - var line = []; - - var lineLength = prefix ? prefix.length - 1 : indent.length - 1; - - parts.forEach(function (part) { - if (lineLength + 1 + part.length > textWidth) { - lines.push(indent + line.join(' ')); - line = []; - lineLength = indent.length - 1; - } - line.push(part); - lineLength += part.length + 1; - }); - - if (line) { - lines.push(indent + line.join(' ')); - } - if (prefix) { - lines[0] = lines[0].substr(indent.length); - } - return lines; - }; - - var lines, indent, parts; - // if prog is short, follow it with optionals or positionals - if (prefix.length + prog.length <= 0.75 * textWidth) { - indent = $$.repeat(' ', (prefix.length + prog.length + 1)); - if (optionalParts) { - lines = [].concat( - _getLines([ prog ].concat(optionalParts), indent, prefix), - _getLines(positionalParts, indent) - ); - } else if (positionalParts) { - lines = _getLines([ prog ].concat(positionalParts), indent, prefix); - } else { - lines = [ prog ]; - } - - // if prog is long, put it on its own line - } else { - indent = $$.repeat(' ', prefix.length); - parts = optionalParts.concat(positionalParts); - lines = _getLines(parts, indent); - if (lines.length > 1) { - lines = [].concat( - _getLines(optionalParts, indent), - _getLines(positionalParts, indent) - ); - } - lines = [ prog ].concat(lines); - } - // join lines into usage - usage = lines.join(c.EOL); - } - } - - // prefix with 'usage:' - return prefix + usage + c.EOL + c.EOL; -}; - -HelpFormatter.prototype._formatActionsUsage = function (actions, groups) { - // find group indices and identify actions in groups - var groupActions = []; - var inserts = []; - var self = this; - - groups.forEach(function (group) { - var end; - var i; - - var start = actions.indexOf(group._groupActions[0]); - if (start >= 0) { - end = start + group._groupActions.length; - - //if (actions.slice(start, end) === group._groupActions) { - if ($$.arrayEqual(actions.slice(start, end), group._groupActions)) { - group._groupActions.forEach(function (action) { - groupActions.push(action); - }); - - if (!group.required) { - if (inserts[start]) { - inserts[start] += ' ['; - } else { - inserts[start] = '['; - } - inserts[end] = ']'; - } else { - if (inserts[start]) { - inserts[start] += ' ('; - } else { - inserts[start] = '('; - } - inserts[end] = ')'; - } - for (i = start + 1; i < end; i += 1) { - inserts[i] = '|'; - } - } - } - }); - - // collect all actions format strings - var parts = []; - - actions.forEach(function (action, actionIndex) { - var part; - var optionString; - var argsDefault; - var argsString; - - // suppressed arguments are marked with None - // remove | separators for suppressed arguments - if (action.help === c.SUPPRESS) { - parts.push(null); - if (inserts[actionIndex] === '|') { - inserts.splice(actionIndex, actionIndex); - } else if (inserts[actionIndex + 1] === '|') { - inserts.splice(actionIndex + 1, actionIndex + 1); - } - - // produce all arg strings - } else if (!action.isOptional()) { - part = self._formatArgs(action, action.dest); - - // if it's in a group, strip the outer [] - if (groupActions.indexOf(action) >= 0) { - if (part[0] === '[' && part[part.length - 1] === ']') { - part = part.slice(1, -1); - } - } - // add the action string to the list - parts.push(part); - - // produce the first way to invoke the option in brackets - } else { - optionString = action.optionStrings[0]; - - // if the Optional doesn't take a value, format is: -s or --long - if (action.nargs === 0) { - part = '' + optionString; - - // if the Optional takes a value, format is: -s ARGS or --long ARGS - } else { - argsDefault = action.dest.toUpperCase(); - argsString = self._formatArgs(action, argsDefault); - part = optionString + ' ' + argsString; - } - // make it look optional if it's not required or in a group - if (!action.required && groupActions.indexOf(action) < 0) { - part = '[' + part + ']'; - } - // add the action string to the list - parts.push(part); - } - }); - - // insert things at the necessary indices - for (var i = inserts.length - 1; i >= 0; --i) { - if (inserts[i] !== null) { - parts.splice(i, 0, inserts[i]); - } - } - - // join all the action items with spaces - var text = parts.filter(function (part) { - return !!part; - }).join(' '); - - // clean up separators for mutually exclusive groups - text = text.replace(/([\[(]) /g, '$1'); // remove spaces - text = text.replace(/ ([\])])/g, '$1'); - text = text.replace(/\[ *\]/g, ''); // remove empty groups - text = text.replace(/\( *\)/g, ''); - text = text.replace(/\(([^|]*)\)/g, '$1'); // remove () from single action groups - - text = text.trim(); - - // return the text - return text; -}; - -HelpFormatter.prototype._formatText = function (text) { - text = sprintf(text, { prog: this._prog }); - var textWidth = this._width - this._currentIndent; - var indentIncriment = $$.repeat(' ', this._currentIndent); - return this._fillText(text, textWidth, indentIncriment) + c.EOL + c.EOL; -}; - -HelpFormatter.prototype._formatAction = function (action) { - var self = this; - - var helpText; - var helpLines; - var parts; - var indentFirst; - - // determine the required width and the entry label - var helpPosition = Math.min(this._actionMaxLength + 2, this._maxHelpPosition); - var helpWidth = this._width - helpPosition; - var actionWidth = helpPosition - this._currentIndent - 2; - var actionHeader = this._formatActionInvocation(action); - - // no help; start on same line and add a final newline - if (!action.help) { - actionHeader = $$.repeat(' ', this._currentIndent) + actionHeader + c.EOL; - - // short action name; start on the same line and pad two spaces - } else if (actionHeader.length <= actionWidth) { - actionHeader = $$.repeat(' ', this._currentIndent) + - actionHeader + - ' ' + - $$.repeat(' ', actionWidth - actionHeader.length); - indentFirst = 0; - - // long action name; start on the next line - } else { - actionHeader = $$.repeat(' ', this._currentIndent) + actionHeader + c.EOL; - indentFirst = helpPosition; - } - - // collect the pieces of the action help - parts = [ actionHeader ]; - - // if there was help for the action, add lines of help text - if (action.help) { - helpText = this._expandHelp(action); - helpLines = this._splitLines(helpText, helpWidth); - parts.push($$.repeat(' ', indentFirst) + helpLines[0] + c.EOL); - helpLines.slice(1).forEach(function (line) { - parts.push($$.repeat(' ', helpPosition) + line + c.EOL); - }); - - // or add a newline if the description doesn't end with one - } else if (actionHeader.charAt(actionHeader.length - 1) !== c.EOL) { - parts.push(c.EOL); - } - // if there are any sub-actions, add their help as well - if (action._getSubactions) { - this._indent(); - action._getSubactions().forEach(function (subaction) { - parts.push(self._formatAction(subaction)); - }); - this._dedent(); - } - // return a single string - return this._joinParts(parts); -}; - -HelpFormatter.prototype._formatActionInvocation = function (action) { - if (!action.isOptional()) { - var format_func = this._metavarFormatter(action, action.dest); - var metavars = format_func(1); - return metavars[0]; - } - - var parts = []; - var argsDefault; - var argsString; - - // if the Optional doesn't take a value, format is: -s, --long - if (action.nargs === 0) { - parts = parts.concat(action.optionStrings); - - // if the Optional takes a value, format is: -s ARGS, --long ARGS - } else { - argsDefault = action.dest.toUpperCase(); - argsString = this._formatArgs(action, argsDefault); - action.optionStrings.forEach(function (optionString) { - parts.push(optionString + ' ' + argsString); - }); - } - return parts.join(', '); -}; - -HelpFormatter.prototype._metavarFormatter = function (action, metavarDefault) { - var result; - - if (action.metavar || action.metavar === '') { - result = action.metavar; - } else if (action.choices) { - var choices = action.choices; - - if (typeof choices === 'string') { - choices = choices.split('').join(', '); - } else if (Array.isArray(choices)) { - choices = choices.join(','); - } else { - choices = Object.keys(choices).join(','); - } - result = '{' + choices + '}'; - } else { - result = metavarDefault; - } - - return function (size) { - if (Array.isArray(result)) { - return result; - } - - var metavars = []; - for (var i = 0; i < size; i += 1) { - metavars.push(result); - } - return metavars; - }; -}; - -HelpFormatter.prototype._formatArgs = function (action, metavarDefault) { - var result; - var metavars; - - var buildMetavar = this._metavarFormatter(action, metavarDefault); - - switch (action.nargs) { - /*eslint-disable no-undefined*/ - case undefined: - case null: - metavars = buildMetavar(1); - result = '' + metavars[0]; - break; - case c.OPTIONAL: - metavars = buildMetavar(1); - result = '[' + metavars[0] + ']'; - break; - case c.ZERO_OR_MORE: - metavars = buildMetavar(2); - result = '[' + metavars[0] + ' [' + metavars[1] + ' ...]]'; - break; - case c.ONE_OR_MORE: - metavars = buildMetavar(2); - result = '' + metavars[0] + ' [' + metavars[1] + ' ...]'; - break; - case c.REMAINDER: - result = '...'; - break; - case c.PARSER: - metavars = buildMetavar(1); - result = metavars[0] + ' ...'; - break; - default: - metavars = buildMetavar(action.nargs); - result = metavars.join(' '); - } - return result; -}; - -HelpFormatter.prototype._expandHelp = function (action) { - var params = { prog: this._prog }; - - Object.keys(action).forEach(function (actionProperty) { - var actionValue = action[actionProperty]; - - if (actionValue !== c.SUPPRESS) { - params[actionProperty] = actionValue; - } - }); - - if (params.choices) { - if (typeof params.choices === 'string') { - params.choices = params.choices.split('').join(', '); - } else if (Array.isArray(params.choices)) { - params.choices = params.choices.join(', '); - } else { - params.choices = Object.keys(params.choices).join(', '); - } - } - - return sprintf(this._getHelpString(action), params); -}; - -HelpFormatter.prototype._splitLines = function (text, width) { - var lines = []; - var delimiters = [ ' ', '.', ',', '!', '?' ]; - var re = new RegExp('[' + delimiters.join('') + '][^' + delimiters.join('') + ']*$'); - - text = text.replace(/[\n\|\t]/g, ' '); - - text = text.trim(); - text = text.replace(this._whitespaceMatcher, ' '); - - // Wraps the single paragraph in text (a string) so every line - // is at most width characters long. - text.split(c.EOL).forEach(function (line) { - if (width >= line.length) { - lines.push(line); - return; - } - - var wrapStart = 0; - var wrapEnd = width; - var delimiterIndex = 0; - while (wrapEnd <= line.length) { - if (wrapEnd !== line.length && delimiters.indexOf(line[wrapEnd] < -1)) { - delimiterIndex = (re.exec(line.substring(wrapStart, wrapEnd)) || {}).index; - wrapEnd = wrapStart + delimiterIndex + 1; - } - lines.push(line.substring(wrapStart, wrapEnd)); - wrapStart = wrapEnd; - wrapEnd += width; - } - if (wrapStart < line.length) { - lines.push(line.substring(wrapStart, wrapEnd)); - } - }); - - return lines; -}; - -HelpFormatter.prototype._fillText = function (text, width, indent) { - var lines = this._splitLines(text, width); - lines = lines.map(function (line) { - return indent + line; - }); - return lines.join(c.EOL); -}; - -HelpFormatter.prototype._getHelpString = function (action) { - return action.help; -}; diff --git a/node_modules/argparse/lib/namespace.js b/node_modules/argparse/lib/namespace.js deleted file mode 100644 index a860de9..0000000 --- a/node_modules/argparse/lib/namespace.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * class Namespace - * - * Simple object for storing attributes. Implements equality by attribute names - * and values, and provides a simple string representation. - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#the-namespace-object - **/ -'use strict'; - -var $$ = require('./utils'); - -/** - * new Namespace(options) - * - options(object): predefined propertis for result object - * - **/ -var Namespace = module.exports = function Namespace(options) { - $$.extend(this, options); -}; - -/** - * Namespace#isset(key) -> Boolean - * - key (string|number): property name - * - * Tells whenever `namespace` contains given `key` or not. - **/ -Namespace.prototype.isset = function (key) { - return $$.has(this, key); -}; - -/** - * Namespace#set(key, value) -> self - * -key (string|number|object): propery name - * -value (mixed): new property value - * - * Set the property named key with value. - * If key object then set all key properties to namespace object - **/ -Namespace.prototype.set = function (key, value) { - if (typeof (key) === 'object') { - $$.extend(this, key); - } else { - this[key] = value; - } - return this; -}; - -/** - * Namespace#get(key, defaultValue) -> mixed - * - key (string|number): property name - * - defaultValue (mixed): default value - * - * Return the property key or defaulValue if not set - **/ -Namespace.prototype.get = function (key, defaultValue) { - return !this[key] ? defaultValue : this[key]; -}; - -/** - * Namespace#unset(key, defaultValue) -> mixed - * - key (string|number): property name - * - defaultValue (mixed): default value - * - * Return data[key](and delete it) or defaultValue - **/ -Namespace.prototype.unset = function (key, defaultValue) { - var value = this[key]; - if (value !== null) { - delete this[key]; - return value; - } - return defaultValue; -}; diff --git a/node_modules/argparse/lib/utils.js b/node_modules/argparse/lib/utils.js deleted file mode 100644 index 4a9cf3e..0000000 --- a/node_modules/argparse/lib/utils.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict'; - -exports.repeat = function (str, num) { - var result = ''; - for (var i = 0; i < num; i++) { result += str; } - return result; -}; - -exports.arrayEqual = function (a, b) { - if (a.length !== b.length) { return false; } - for (var i = 0; i < a.length; i++) { - if (a[i] !== b[i]) { return false; } - } - return true; -}; - -exports.trimChars = function (str, chars) { - var start = 0; - var end = str.length - 1; - while (chars.indexOf(str.charAt(start)) >= 0) { start++; } - while (chars.indexOf(str.charAt(end)) >= 0) { end--; } - return str.slice(start, end + 1); -}; - -exports.capitalize = function (str) { - return str.charAt(0).toUpperCase() + str.slice(1); -}; - -exports.arrayUnion = function () { - var result = []; - for (var i = 0, values = {}; i < arguments.length; i++) { - var arr = arguments[i]; - for (var j = 0; j < arr.length; j++) { - if (!values[arr[j]]) { - values[arr[j]] = true; - result.push(arr[j]); - } - } - } - return result; -}; - -function has(obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); -} - -exports.has = has; - -exports.extend = function (dest, src) { - for (var i in src) { - if (has(src, i)) { dest[i] = src[i]; } - } -}; - -exports.trimEnd = function (str) { - return str.replace(/\s+$/g, ''); -}; diff --git a/node_modules/argparse/package.json b/node_modules/argparse/package.json deleted file mode 100644 index b8b5d75..0000000 --- a/node_modules/argparse/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_from": "argparse@^1.0.7", - "_id": "argparse@1.0.10", - "_inBundle": false, - "_integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "_location": "/argparse", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "argparse@^1.0.7", - "name": "argparse", - "escapedName": "argparse", - "rawSpec": "^1.0.7", - "saveSpec": null, - "fetchSpec": "^1.0.7" - }, - "_requiredBy": [ - "/yamljs" - ], - "_resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "_shasum": "bcd6791ea5ae09725e17e5ad988134cd40b3d911", - "_spec": "argparse@^1.0.7", - "_where": "/Users/paolo/Desktop/multiplayer games/likelike-online/node_modules/yamljs", - "bugs": { - "url": "https://github.com/nodeca/argparse/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Eugene Shkuropat" - }, - { - "name": "Paul Jacobson" - } - ], - "dependencies": { - "sprintf-js": "~1.0.2" - }, - "deprecated": false, - "description": "Very powerful CLI arguments parser. Native port of argparse - python's options parsing library", - "devDependencies": { - "eslint": "^2.13.1", - "istanbul": "^0.4.5", - "mocha": "^3.1.0", - "ndoc": "^5.0.1" - }, - "files": [ - "index.js", - "lib/" - ], - "homepage": "https://github.com/nodeca/argparse#readme", - "keywords": [ - "cli", - "parser", - "argparse", - "option", - "args" - ], - "license": "MIT", - "name": "argparse", - "repository": { - "type": "git", - "url": "git+https://github.com/nodeca/argparse.git" - }, - "scripts": { - "test": "make test" - }, - "version": "1.0.10" -} diff --git a/node_modules/array-flatten/LICENSE b/node_modules/array-flatten/LICENSE deleted file mode 100644 index 983fbe8..0000000 --- a/node_modules/array-flatten/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Blake Embrey (hello@blakeembrey.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/array-flatten/README.md b/node_modules/array-flatten/README.md deleted file mode 100644 index 91fa5b6..0000000 --- a/node_modules/array-flatten/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# Array Flatten - -[![NPM version][npm-image]][npm-url] -[![NPM downloads][downloads-image]][downloads-url] -[![Build status][travis-image]][travis-url] -[![Test coverage][coveralls-image]][coveralls-url] - -> Flatten an array of nested arrays into a single flat array. Accepts an optional depth. - -## Installation - -``` -npm install array-flatten --save -``` - -## Usage - -```javascript -var flatten = require('array-flatten') - -flatten([1, [2, [3, [4, [5], 6], 7], 8], 9]) -//=> [1, 2, 3, 4, 5, 6, 7, 8, 9] - -flatten([1, [2, [3, [4, [5], 6], 7], 8], 9], 2) -//=> [1, 2, 3, [4, [5], 6], 7, 8, 9] - -(function () { - flatten(arguments) //=> [1, 2, 3] -})(1, [2, 3]) -``` - -## License - -MIT - -[npm-image]: https://img.shields.io/npm/v/array-flatten.svg?style=flat -[npm-url]: https://npmjs.org/package/array-flatten -[downloads-image]: https://img.shields.io/npm/dm/array-flatten.svg?style=flat -[downloads-url]: https://npmjs.org/package/array-flatten -[travis-image]: https://img.shields.io/travis/blakeembrey/array-flatten.svg?style=flat -[travis-url]: https://travis-ci.org/blakeembrey/array-flatten -[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/array-flatten.svg?style=flat -[coveralls-url]: https://coveralls.io/r/blakeembrey/array-flatten?branch=master diff --git a/node_modules/array-flatten/array-flatten.js b/node_modules/array-flatten/array-flatten.js deleted file mode 100644 index 089117b..0000000 --- a/node_modules/array-flatten/array-flatten.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict' - -/** - * Expose `arrayFlatten`. - */ -module.exports = arrayFlatten - -/** - * Recursive flatten function with depth. - * - * @param {Array} array - * @param {Array} result - * @param {Number} depth - * @return {Array} - */ -function flattenWithDepth (array, result, depth) { - for (var i = 0; i < array.length; i++) { - var value = array[i] - - if (depth > 0 && Array.isArray(value)) { - flattenWithDepth(value, result, depth - 1) - } else { - result.push(value) - } - } - - return result -} - -/** - * Recursive flatten function. Omitting depth is slightly faster. - * - * @param {Array} array - * @param {Array} result - * @return {Array} - */ -function flattenForever (array, result) { - for (var i = 0; i < array.length; i++) { - var value = array[i] - - if (Array.isArray(value)) { - flattenForever(value, result) - } else { - result.push(value) - } - } - - return result -} - -/** - * Flatten an array, with the ability to define a depth. - * - * @param {Array} array - * @param {Number} depth - * @return {Array} - */ -function arrayFlatten (array, depth) { - if (depth == null) { - return flattenForever(array, []) - } - - return flattenWithDepth(array, [], depth) -} diff --git a/node_modules/array-flatten/package.json b/node_modules/array-flatten/package.json deleted file mode 100644 index af1caab..0000000 --- a/node_modules/array-flatten/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_from": "array-flatten@1.1.1", - "_id": "array-flatten@1.1.1", - "_inBundle": false, - "_integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "_location": "/array-flatten", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "array-flatten@1.1.1", - "name": "array-flatten", - "escapedName": "array-flatten", - "rawSpec": "1.1.1", - "saveSpec": null, - "fetchSpec": "1.1.1" - }, - "_requiredBy": [ - "/express" - ], - "_resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "_shasum": "9a5f699051b1e7073328f2a008968b64ea2955d2", - "_spec": "array-flatten@1.1.1", - "_where": "/Users/paolo/Desktop/multiplayer games/tutorials/hellosocket/node_modules/express", - "author": { - "name": "Blake Embrey", - "email": "hello@blakeembrey.com", - "url": "http://blakeembrey.me" - }, - "bugs": { - "url": "https://github.com/blakeembrey/array-flatten/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Flatten an array of nested arrays into a single flat array", - "devDependencies": { - "istanbul": "^0.3.13", - "mocha": "^2.2.4", - "pre-commit": "^1.0.7", - "standard": "^3.7.3" - }, - "files": [ - "array-flatten.js", - "LICENSE" - ], - "homepage": "https://github.com/blakeembrey/array-flatten", - "keywords": [ - "array", - "flatten", - "arguments", - "depth" - ], - "license": "MIT", - "main": "array-flatten.js", - "name": "array-flatten", - "repository": { - "type": "git", - "url": "git://github.com/blakeembrey/array-flatten.git" - }, - "scripts": { - "test": "istanbul cover _mocha -- -R spec" - }, - "version": "1.1.1" -} diff --git a/node_modules/arraybuffer.slice/.npmignore b/node_modules/arraybuffer.slice/.npmignore deleted file mode 100644 index cfbee8d..0000000 --- a/node_modules/arraybuffer.slice/.npmignore +++ /dev/null @@ -1,17 +0,0 @@ -lib-cov -lcov.info -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results -build -.grunt - -node_modules diff --git a/node_modules/arraybuffer.slice/LICENCE b/node_modules/arraybuffer.slice/LICENCE deleted file mode 100644 index 35fa375..0000000 --- a/node_modules/arraybuffer.slice/LICENCE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (C) 2013 Rase- - -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/arraybuffer.slice/Makefile b/node_modules/arraybuffer.slice/Makefile deleted file mode 100644 index 849887f..0000000 --- a/node_modules/arraybuffer.slice/Makefile +++ /dev/null @@ -1,8 +0,0 @@ - -REPORTER = dot - -test: - @./node_modules/.bin/mocha \ - --reporter $(REPORTER) - -.PHONY: test diff --git a/node_modules/arraybuffer.slice/README.md b/node_modules/arraybuffer.slice/README.md deleted file mode 100644 index 15e465e..0000000 --- a/node_modules/arraybuffer.slice/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# How to -```javascript -var sliceBuffer = require('arraybuffer.slice'); -var ab = (new Int8Array(5)).buffer; -var sliced = sliceBuffer(ab, 1, 3); -sliced = sliceBuffer(ab, 1); -``` - -# Licence (MIT) -Copyright (C) 2013 Rase- - - -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/arraybuffer.slice/index.js b/node_modules/arraybuffer.slice/index.js deleted file mode 100644 index 11ac556..0000000 --- a/node_modules/arraybuffer.slice/index.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * An abstraction for slicing an arraybuffer even when - * ArrayBuffer.prototype.slice is not supported - * - * @api public - */ - -module.exports = function(arraybuffer, start, end) { - var bytes = arraybuffer.byteLength; - start = start || 0; - end = end || bytes; - - if (arraybuffer.slice) { return arraybuffer.slice(start, end); } - - if (start < 0) { start += bytes; } - if (end < 0) { end += bytes; } - if (end > bytes) { end = bytes; } - - if (start >= bytes || start >= end || bytes === 0) { - return new ArrayBuffer(0); - } - - var abv = new Uint8Array(arraybuffer); - var result = new Uint8Array(end - start); - for (var i = start, ii = 0; i < end; i++, ii++) { - result[ii] = abv[i]; - } - return result.buffer; -}; diff --git a/node_modules/arraybuffer.slice/package.json b/node_modules/arraybuffer.slice/package.json deleted file mode 100644 index 3dbb2c9..0000000 --- a/node_modules/arraybuffer.slice/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "_from": "arraybuffer.slice@~0.0.7", - "_id": "arraybuffer.slice@0.0.7", - "_inBundle": false, - "_integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", - "_location": "/arraybuffer.slice", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "arraybuffer.slice@~0.0.7", - "name": "arraybuffer.slice", - "escapedName": "arraybuffer.slice", - "rawSpec": "~0.0.7", - "saveSpec": null, - "fetchSpec": "~0.0.7" - }, - "_requiredBy": [ - "/engine.io-parser" - ], - "_resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", - "_shasum": "3bbc4275dd584cc1b10809b89d4e8b63a69e7675", - "_spec": "arraybuffer.slice@~0.0.7", - "_where": "/Users/paolo/Desktop/multiplayer games/tutorials/hellosocket/node_modules/engine.io-parser", - "bugs": { - "url": "https://github.com/rase-/arraybuffer.slice/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Exports a function for slicing ArrayBuffers (no polyfilling)", - "devDependencies": { - "expect.js": "0.2.0", - "mocha": "1.17.1" - }, - "homepage": "https://github.com/rase-/arraybuffer.slice", - "license": "MIT", - "name": "arraybuffer.slice", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/rase-/arraybuffer.slice.git" - }, - "version": "0.0.7" -} diff --git a/node_modules/arraybuffer.slice/test/slice-buffer.js b/node_modules/arraybuffer.slice/test/slice-buffer.js deleted file mode 100644 index 4778da6..0000000 --- a/node_modules/arraybuffer.slice/test/slice-buffer.js +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Test dependencies - */ - -var sliceBuffer = require('../index.js'); -var expect = require('expect.js'); - -/** - * Tests - */ - -describe('sliceBuffer', function() { - describe('using standard slice', function() { - it('should slice correctly with only start provided', function() { - var abv = new Uint8Array(10); - for (var i = 0; i < abv.length; i++) { - abv[i] = i; - } - - var sliced = sliceBuffer(abv.buffer, 3); - var sabv = new Uint8Array(sliced); - for (var i = 3, ii = 0; i < abv.length; i++, ii++) { - expect(abv[i]).to.equal(sabv[ii]); - } - }); - - it('should slice correctly with start and end provided', function() { - var abv = new Uint8Array(10); - for (var i = 0; i < abv.length; i++) { - abv[i] = i; - } - - var sliced = sliceBuffer(abv.buffer, 3, 8); - var sabv = new Uint8Array(sliced); - for (var i = 3, ii = 0; i < 8; i++, ii++) { - expect(abv[i]).to.equal(sabv[ii]); - } - }); - - it('should slice correctly with negative start', function() { - var abv = new Uint8Array(10); - for (var i = 0; i < abv.length; i++) { - abv[i] = i; - } - - var sliced = sliceBuffer(abv.buffer, -3); - var sabv = new Uint8Array(sliced); - for (var i = abv.length - 3, ii = 0; i < abv.length; i++, ii++) { - expect(abv[i]).to.equal(sabv[ii]); - } - }); - - it('should slice correctly with negative end', function() { - var abv = new Uint8Array(10); - for (var i = 0; i < abv.length; i++) { - abv[i] = i; - } - - var sliced = sliceBuffer(abv.buffer, 0, -3); - var sabv = new Uint8Array(sliced); - for (var i = 0, ii = 0; i < abv.length - 3; i++, ii++) { - expect(abv[i]).to.equal(sabv[ii]); - } - }); - - it('should slice correctly with negative start and end', function() { - var abv = new Uint8Array(10); - for (var i = 0; i < abv.length; i++) { - abv[i] = i; - } - - var sliced = sliceBuffer(abv.buffer, -6, -3); - var sabv = new Uint8Array(sliced); - for (var i = abv.length - 6, ii = 0; i < abv.length - 3; i++, ii++) { - expect(abv[i]).to.equal(sabv[ii]); - } - }); - - it('should slice correctly with equal start and end', function() { - var abv = new Uint8Array(10); - for (var i = 0; i < abv.length; i++) { - abv[i] = i; - } - - var sliced = sliceBuffer(abv.buffer, 1, 1); - expect(sliced.byteLength).to.equal(0); - }); - - it('should slice correctly when end larger than buffer', function() { - var abv = new Uint8Array(10); - for (var i = 0; i < abv.length; i++) { - abv[i] = i; - } - - var sliced = sliceBuffer(abv.buffer, 0, 100); - expect(new Uint8Array(sliced)).to.eql(abv); - }); - - it('shoud slice correctly when start larger than end', function() { - var abv = new Uint8Array(10); - for (var i = 0; i < abv.length; i++) { - abv[i] = i; - } - - var sliced = sliceBuffer(abv.buffer, 6, 5); - expect(sliced.byteLength).to.equal(0); - }); - }); - - describe('using fallback', function() { - it('should slice correctly with only start provided', function() { - var abv = new Uint8Array(10); - for (var i = 0; i < abv.length; i++) { - abv[i] = i; - } - var ab = abv.buffer; - ab.slice = undefined; - - var sliced = sliceBuffer(ab, 3); - var sabv = new Uint8Array(sliced); - for (var i = 3, ii = 0; i < abv.length; i++, ii++) { - expect(abv[i]).to.equal(sabv[ii]); - } - }); - - it('should slice correctly with start and end provided', function() { - var abv = new Uint8Array(10); - for (var i = 0; i < abv.length; i++) { - abv[i] = i; - } - var ab = abv.buffer; - ab.slice = undefined; - - - var sliced = sliceBuffer(ab, 3, 8); - var sabv = new Uint8Array(sliced); - for (var i = 3, ii = 0; i < 8; i++, ii++) { - expect(abv[i]).to.equal(sabv[ii]); - } - }); - - it('should slice correctly with negative start', function() { - var abv = new Uint8Array(10); - for (var i = 0; i < abv.length; i++) { - abv[i] = i; - } - var ab = abv.buffer; - ab.slice = undefined; - - - var sliced = sliceBuffer(ab, -3); - var sabv = new Uint8Array(sliced); - for (var i = abv.length - 3, ii = 0; i < abv.length; i++, ii++) { - expect(abv[i]).to.equal(sabv[ii]); - } - }); - - it('should slice correctly with negative end', function() { - var abv = new Uint8Array(10); - for (var i = 0; i < abv.length; i++) { - abv[i] = i; - } - var ab = abv.buffer; - ab.slice = undefined; - - var sliced = sliceBuffer(ab, 0, -3); - var sabv = new Uint8Array(sliced); - for (var i = 0, ii = 0; i < abv.length - 3; i++, ii++) { - expect(abv[i]).to.equal(sabv[ii]); - } - }); - - it('should slice correctly with negative start and end', function() { - var abv = new Uint8Array(10); - for (var i = 0; i < abv.length; i++) { - abv[i] = i; - } - var ab = abv.buffer; - ab.slice = undefined; - - var sliced = sliceBuffer(ab, -6, -3); - var sabv = new Uint8Array(sliced); - for (var i = abv.length - 6, ii = 0; i < abv.length - 3; i++, ii++) { - expect(abv[i]).to.equal(sabv[ii]); - } - }); - - it('should slice correctly with equal start and end', function() { - var abv = new Uint8Array(10); - for (var i = 0; i < abv.length; i++) { - abv[i] = i; - } - var ab = abv.buffer; - ab.slice = undefined; - - var sliced = sliceBuffer(ab, 1, 1); - expect(sliced.byteLength).to.equal(0); - }); - - it('should slice correctly when end larger than buffer', function() { - var abv = new Uint8Array(10); - for (var i = 0; i < abv.length; i++) { - abv[i] = i; - } - var ab = abv.buffer; - ab.slice = undefined; - - var sliced = sliceBuffer(ab, 0, 100); - var sabv = new Uint8Array(sliced); - for (var i = 0; i < abv.length; i++) { - expect(abv[i]).to.equal(sabv[i]); - } - }); - - it('shoud slice correctly when start larger than end', function() { - var abv = new Uint8Array(10); - for (var i = 0; i < abv.length; i++) { - abv[i] = i; - } - var ab = abv.buffer; - ab.slice = undefined; - - var sliced = sliceBuffer(ab, 6, 5); - expect(sliced.byteLength).to.equal(0); - }); - }); -}); diff --git a/node_modules/async-limiter/.eslintignore b/node_modules/async-limiter/.eslintignore deleted file mode 100644 index e1661e5..0000000 --- a/node_modules/async-limiter/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -coverage -.nyc_output \ No newline at end of file diff --git a/node_modules/async-limiter/.nycrc b/node_modules/async-limiter/.nycrc deleted file mode 100644 index 874c1de..0000000 --- a/node_modules/async-limiter/.nycrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "check-coverage": false, - "lines": 99, - "statements": 99, - "functions": 99, - "branches": 99, - "include": [ - "index.js" - ] -} \ No newline at end of file diff --git a/node_modules/async-limiter/.travis.yml b/node_modules/async-limiter/.travis.yml deleted file mode 100644 index 37026e2..0000000 --- a/node_modules/async-limiter/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -node_js: - - "6" - - "8" - - "10" - - "node" -script: npm run travis -cache: - yarn: true diff --git a/node_modules/async-limiter/LICENSE b/node_modules/async-limiter/LICENSE deleted file mode 100644 index 9c91fb2..0000000 --- a/node_modules/async-limiter/LICENSE +++ /dev/null @@ -1,8 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2017 Samuel Reed - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/async-limiter/index.js b/node_modules/async-limiter/index.js deleted file mode 100644 index c9bd2f9..0000000 --- a/node_modules/async-limiter/index.js +++ /dev/null @@ -1,67 +0,0 @@ -'use strict'; - -function Queue(options) { - if (!(this instanceof Queue)) { - return new Queue(options); - } - - options = options || {}; - this.concurrency = options.concurrency || Infinity; - this.pending = 0; - this.jobs = []; - this.cbs = []; - this._done = done.bind(this); -} - -var arrayAddMethods = [ - 'push', - 'unshift', - 'splice' -]; - -arrayAddMethods.forEach(function(method) { - Queue.prototype[method] = function() { - var methodResult = Array.prototype[method].apply(this.jobs, arguments); - this._run(); - return methodResult; - }; -}); - -Object.defineProperty(Queue.prototype, 'length', { - get: function() { - return this.pending + this.jobs.length; - } -}); - -Queue.prototype._run = function() { - if (this.pending === this.concurrency) { - return; - } - if (this.jobs.length) { - var job = this.jobs.shift(); - this.pending++; - job(this._done); - this._run(); - } - - if (this.pending === 0) { - while (this.cbs.length !== 0) { - var cb = this.cbs.pop(); - process.nextTick(cb); - } - } -}; - -Queue.prototype.onDone = function(cb) { - if (typeof cb === 'function') { - this.cbs.push(cb); - this._run(); - } -}; - -function done() { - this.pending--; - this._run(); -} - -module.exports = Queue; diff --git a/node_modules/async-limiter/package.json b/node_modules/async-limiter/package.json deleted file mode 100644 index 8e1fcad..0000000 --- a/node_modules/async-limiter/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_from": "async-limiter@~1.0.0", - "_id": "async-limiter@1.0.1", - "_inBundle": false, - "_integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", - "_location": "/async-limiter", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "async-limiter@~1.0.0", - "name": "async-limiter", - "escapedName": "async-limiter", - "rawSpec": "~1.0.0", - "saveSpec": null, - "fetchSpec": "~1.0.0" - }, - "_requiredBy": [ - "/engine.io-client/ws" - ], - "_resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "_shasum": "dd379e94f0db8310b08291f9d64c3209766617fd", - "_spec": "async-limiter@~1.0.0", - "_where": "/Users/paolo/Desktop/multiplayer games/tutorials/hellosocket/node_modules/engine.io-client/node_modules/ws", - "author": { - "name": "Samuel Reed" - }, - "bugs": { - "url": "https://github.com/strml/async-limiter/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "asynchronous function queue with adjustable concurrency", - "devDependencies": { - "coveralls": "^3.0.3", - "eslint": "^5.16.0", - "eslint-plugin-mocha": "^5.3.0", - "intelli-espower-loader": "^1.0.1", - "mocha": "^6.1.4", - "nyc": "^14.1.1", - "power-assert": "^1.6.1" - }, - "homepage": "https://github.com/strml/async-limiter#readme", - "keywords": [ - "throttle", - "async", - "limiter", - "asynchronous", - "job", - "task", - "concurrency", - "concurrent" - ], - "license": "MIT", - "name": "async-limiter", - "repository": { - "type": "git", - "url": "git+https://github.com/strml/async-limiter.git" - }, - "scripts": { - "coverage": "nyc npm test && nyc report --reporter=text-lcov | coveralls", - "example": "node example", - "lint": "eslint .", - "test": "mocha --require intelli-espower-loader test/", - "travis": "npm run lint && npm run test" - }, - "version": "1.0.1" -} diff --git a/node_modules/async-limiter/readme.md b/node_modules/async-limiter/readme.md deleted file mode 100644 index fcaa22f..0000000 --- a/node_modules/async-limiter/readme.md +++ /dev/null @@ -1,132 +0,0 @@ -# Async-Limiter - -A module for limiting concurrent asynchronous actions in flight. Forked from [queue](https://github.com/jessetane/queue). - -[![npm](http://img.shields.io/npm/v/async-limiter.svg?style=flat-square)](http://www.npmjs.org/async-limiter) -[![tests](https://img.shields.io/travis/STRML/async-limiter.svg?style=flat-square&branch=master)](https://travis-ci.org/STRML/async-limiter) -[![coverage](https://img.shields.io/coveralls/STRML/async-limiter.svg?style=flat-square&branch=master)](https://coveralls.io/r/STRML/async-limiter) - -This module exports a class `Limiter` that implements some of the `Array` API. -Pass async functions (ones that accept a callback or return a promise) to an instance's additive array methods. - -## Motivation - -Certain functions, like `zlib`, have [undesirable behavior](https://github.com/nodejs/node/issues/8871#issuecomment-250915913) when -run at infinite concurrency. - -In this case, it is actually faster, and takes far less memory, to limit concurrency. - -This module should do the absolute minimum work necessary to queue up functions. PRs are welcome that would -make this module faster or lighter, but new functionality is not desired. - -Style should confirm to nodejs/node style. - -## Example - -``` javascript -var Limiter = require('async-limiter') - -var t = new Limiter({concurrency: 2}); -var results = [] - -// add jobs using the familiar Array API -t.push(function (cb) { - results.push('two') - cb() -}) - -t.push( - function (cb) { - results.push('four') - cb() - }, - function (cb) { - results.push('five') - cb() - } -) - -t.unshift(function (cb) { - results.push('one') - cb() -}) - -t.splice(2, 0, function (cb) { - results.push('three') - cb() -}) - -// Jobs run automatically. If you want a callback when all are done, -// call 'onDone()'. -t.onDone(function () { - console.log('all done:', results) -}) -``` - -## Zlib Example - -```js -const zlib = require('zlib'); -const Limiter = require('async-limiter'); - -const message = {some: "data"}; -const payload = new Buffer(JSON.stringify(message)); - -// Try with different concurrency values to see how this actually -// slows significantly with higher concurrency! -// -// 5: 1398.607ms -// 10: 1375.668ms -// Infinity: 4423.300ms -// -const t = new Limiter({concurrency: 5}); -function deflate(payload, cb) { - t.push(function(done) { - zlib.deflate(payload, function(err, buffer) { - done(); - cb(err, buffer); - }); - }); -} - -console.time('deflate'); -for(let i = 0; i < 30000; ++i) { - deflate(payload, function (err, buffer) {}); -} -t.onDone(function() { - console.timeEnd('deflate'); -}); -``` - -## Install - -`npm install async-limiter` - -## Test - -`npm test` - -## API - -### `var t = new Limiter([opts])` -Constructor. `opts` may contain inital values for: -* `t.concurrency` - -## Instance methods - -### `t.onDone(fn)` -`fn` will be called once and only once, when the queue is empty. - -## Instance methods mixed in from `Array` -Mozilla has docs on how these methods work [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array). -### `t.push(element1, ..., elementN)` -### `t.unshift(element1, ..., elementN)` -### `t.splice(index , howMany[, element1[, ...[, elementN]]])` - -## Properties -### `t.concurrency` -Max number of jobs the queue should process concurrently, defaults to `Infinity`. - -### `t.length` -Jobs pending + jobs to process (readonly). - diff --git a/node_modules/backo2/.npmignore b/node_modules/backo2/.npmignore deleted file mode 100644 index c2658d7..0000000 --- a/node_modules/backo2/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/node_modules/backo2/History.md b/node_modules/backo2/History.md deleted file mode 100644 index 8eb28b8..0000000 --- a/node_modules/backo2/History.md +++ /dev/null @@ -1,12 +0,0 @@ - -1.0.1 / 2014-02-17 -================== - - * go away decimal point - * history - -1.0.0 / 2014-02-17 -================== - - * add jitter option - * Initial commit diff --git a/node_modules/backo2/Makefile b/node_modules/backo2/Makefile deleted file mode 100644 index 9987df8..0000000 --- a/node_modules/backo2/Makefile +++ /dev/null @@ -1,8 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --require should \ - --reporter dot \ - --bail - -.PHONY: test \ No newline at end of file diff --git a/node_modules/backo2/Readme.md b/node_modules/backo2/Readme.md deleted file mode 100644 index 0df2a39..0000000 --- a/node_modules/backo2/Readme.md +++ /dev/null @@ -1,34 +0,0 @@ -# backo - - Simple exponential backoff because the others seem to have weird abstractions. - -## Installation - -``` -$ npm install backo -``` - -## Options - - - `min` initial timeout in milliseconds [100] - - `max` max timeout [10000] - - `jitter` [0] - - `factor` [2] - -## Example - -```js -var Backoff = require('backo'); -var backoff = new Backoff({ min: 100, max: 20000 }); - -setTimeout(function(){ - something.reconnect(); -}, backoff.duration()); - -// later when something works -backoff.reset() -``` - -# License - - MIT diff --git a/node_modules/backo2/component.json b/node_modules/backo2/component.json deleted file mode 100644 index 994845a..0000000 --- a/node_modules/backo2/component.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "backo", - "repo": "segmentio/backo", - "dependencies": {}, - "version": "1.0.1", - "description": "simple backoff without the weird abstractions", - "keywords": ["backoff"], - "license": "MIT", - "scripts": ["index.js"], - "main": "index.js" -} diff --git a/node_modules/backo2/index.js b/node_modules/backo2/index.js deleted file mode 100644 index fac4429..0000000 --- a/node_modules/backo2/index.js +++ /dev/null @@ -1,85 +0,0 @@ - -/** - * Expose `Backoff`. - */ - -module.exports = Backoff; - -/** - * Initialize backoff timer with `opts`. - * - * - `min` initial timeout in milliseconds [100] - * - `max` max timeout [10000] - * - `jitter` [0] - * - `factor` [2] - * - * @param {Object} opts - * @api public - */ - -function Backoff(opts) { - opts = opts || {}; - this.ms = opts.min || 100; - this.max = opts.max || 10000; - this.factor = opts.factor || 2; - this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0; - this.attempts = 0; -} - -/** - * Return the backoff duration. - * - * @return {Number} - * @api public - */ - -Backoff.prototype.duration = function(){ - var ms = this.ms * Math.pow(this.factor, this.attempts++); - if (this.jitter) { - var rand = Math.random(); - var deviation = Math.floor(rand * this.jitter * ms); - ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation; - } - return Math.min(ms, this.max) | 0; -}; - -/** - * Reset the number of attempts. - * - * @api public - */ - -Backoff.prototype.reset = function(){ - this.attempts = 0; -}; - -/** - * Set the minimum duration - * - * @api public - */ - -Backoff.prototype.setMin = function(min){ - this.ms = min; -}; - -/** - * Set the maximum duration - * - * @api public - */ - -Backoff.prototype.setMax = function(max){ - this.max = max; -}; - -/** - * Set the jitter - * - * @api public - */ - -Backoff.prototype.setJitter = function(jitter){ - this.jitter = jitter; -}; - diff --git a/node_modules/backo2/package.json b/node_modules/backo2/package.json deleted file mode 100644 index d690427..0000000 --- a/node_modules/backo2/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "_from": "backo2@1.0.2", - "_id": "backo2@1.0.2", - "_inBundle": false, - "_integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", - "_location": "/backo2", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "backo2@1.0.2", - "name": "backo2", - "escapedName": "backo2", - "rawSpec": "1.0.2", - "saveSpec": null, - "fetchSpec": "1.0.2" - }, - "_requiredBy": [ - "/socket.io-client" - ], - "_resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", - "_shasum": "31ab1ac8b129363463e35b3ebb69f4dfcfba7947", - "_spec": "backo2@1.0.2", - "_where": "/Users/paolo/Desktop/multiplayer games/tutorials/hellosocket/node_modules/socket.io-client", - "bugs": { - "url": "https://github.com/mokesmokes/backo/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "simple backoff based on segmentio/backo", - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "homepage": "https://github.com/mokesmokes/backo#readme", - "keywords": [ - "backoff" - ], - "license": "MIT", - "name": "backo2", - "repository": { - "type": "git", - "url": "git+https://github.com/mokesmokes/backo.git" - }, - "version": "1.0.2" -} diff --git a/node_modules/backo2/test/index.js b/node_modules/backo2/test/index.js deleted file mode 100644 index ea1f6de..0000000 --- a/node_modules/backo2/test/index.js +++ /dev/null @@ -1,18 +0,0 @@ - -var Backoff = require('..'); -var assert = require('assert'); - -describe('.duration()', function(){ - it('should increase the backoff', function(){ - var b = new Backoff; - - assert(100 == b.duration()); - assert(200 == b.duration()); - assert(400 == b.duration()); - assert(800 == b.duration()); - - b.reset(); - assert(100 == b.duration()); - assert(200 == b.duration()); - }) -}) \ No newline at end of file diff --git a/node_modules/bad-words/.travis.yml b/node_modules/bad-words/.travis.yml deleted file mode 100644 index 3d4b9a5..0000000 --- a/node_modules/bad-words/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "8" -script: npm test \ No newline at end of file diff --git a/node_modules/bad-words/CHANGELOG.md b/node_modules/bad-words/CHANGELOG.md deleted file mode 100644 index 3beac4e..0000000 --- a/node_modules/bad-words/CHANGELOG.md +++ /dev/null @@ -1,121 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -## [3.0.3](https://github.com/web-mech/badwords/compare/v3.0.2...v3.0.3) (2019-07-25) - - - - -## [3.0.2](https://github.com/web-mech/badwords/compare/v3.0.1...v3.0.2) (2019-03-14) - - -### Bug Fixes - -* **lang.json:** remove gay from badwords ([88d1aed](https://github.com/web-mech/badwords/commit/88d1aed)) - - - - -## [3.0.1](https://github.com/web-mech/badwords/compare/v3.0.0...v3.0.1) (2019-02-19) - - -### Bug Fixes - -* update removeWords functionality to be case-insensitive ([235121d](https://github.com/web-mech/badwords/commit/235121d)) - - - - -# [3.0.0](https://github.com/web-mech/badwords/compare/v2.0.0...v3.0.0) (2018-10-23) - - -### Code Refactoring - -* utilize es6 spread in addWords/removeWords ([656b87c](https://github.com/web-mech/badwords/commit/656b87c)) - - -### BREAKING CHANGES - -* changes the way addWords is used, no longer accepts a single array as a parameter unless used with the spread operator - - - - -# [2.0.0](https://github.com/web-mech/badwords/compare/v1.6.5...v2.0.0) (2018-10-23) - - -### Documentation - -* update documentation. add requirements for using lib moving forward ([9b2831d](https://github.com/web-mech/badwords/commit/9b2831d)) - - -### Features - -* **profane:** support profane phrases and well as words ([995ea1e](https://github.com/web-mech/badwords/commit/995ea1e)) - - -### BREAKING CHANGES - -* moving into es2016+ language features - - - - -## [1.6.5](https://github.com/web-mech/badwords/compare/v1.6.4...v1.6.5) (2018-10-23) - - - - -## [1.6.4](https://github.com/web-mech/badwords/compare/v1.6.3...v1.6.4) (2018-09-21) - - -### Bug Fixes - -* **isProfane:** Adding regex word boundary for isProfane ([3908f3c](https://github.com/web-mech/badwords/commit/3908f3c)) - - - - -## [1.6.3](https://github.com/web-mech/badwords/compare/v1.6.2...v1.6.3) (2018-08-02) - - - - -## [1.6.2](https://github.com/web-mech/badwords/compare/v1.6.1...v1.6.2) (2018-08-02) - - -### Bug Fixes - -* **isProfaneLike:** abort trying to match every instance of profane words. ([31126d6](https://github.com/web-mech/badwords/commit/31126d6)) - - - - -## [1.6.1](https://github.com/web-mech/badwords/compare/v1.6.0...v1.6.1) (2017-10-25) - - -### Bug Fixes - -* **isProfaneLike:** fix case sensitive checks within list ([bfa05ce](https://github.com/web-mech/badwords/commit/bfa05ce)) - - - - -# [1.6.0](https://github.com/web-mech/badwords/compare/v1.5.2...v1.6.0) (2017-10-16) - - -### Features - -* fixes and updates ([8049222](https://github.com/web-mech/badwords/commit/8049222)) - - - - -## [1.5.2](https://github.com/web-mech/badwords/compare/v1.5.1...v1.5.2) (2017-10-16) - - -### Bug Fixes - -* support for better filtering ([7c8d0e2](https://github.com/web-mech/badwords/commit/7c8d0e2)) diff --git a/node_modules/bad-words/LICENSE b/node_modules/bad-words/LICENSE deleted file mode 100644 index da6e7d2..0000000 --- a/node_modules/bad-words/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Michael Price - -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/bad-words/Makefile b/node_modules/bad-words/Makefile deleted file mode 100644 index 3f8a1d5..0000000 --- a/node_modules/bad-words/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -test: - @./node_modules/mocha/bin/_mocha -R $(REPORTER) - -.PHONY: test \ No newline at end of file diff --git a/node_modules/bad-words/README.md b/node_modules/bad-words/README.md deleted file mode 100644 index 13a0a1e..0000000 --- a/node_modules/bad-words/README.md +++ /dev/null @@ -1,175 +0,0 @@ -# bad-words - -A javascript filter for badwords - -[![Build Status](https://travis-ci.org/web-mech/badwords.svg?branch=master)](https://travis-ci.org/web-mech/badwords) -[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) -[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release) - -## Requirements - -As of version 2, requires you either have an environment that understands ES2016 and beyond or a transpiler like Babel. - -## Installation - - npm install bad-words --save - -## Usage - -```js -var Filter = require('bad-words'), - filter = new Filter(); - -console.log(filter.clean("Don't be an ash0le")); //Don't be an ****** -``` - -### Placeholder Overrides - -```js -var Filter = require('bad-words'); -var customFilter = new Filter({ placeHolder: 'x'}); - -customFilter.clean("Don't be an ash0le"); //Don't be an xxxxxx -``` - -### Regex Overrides - -```js -var filter = new Filter({ regex: /\*|\.|$/gi }); - -var filter = new Filter({ replaceRegex: /[A-Za-z0-9가-힣_]/g }); -//multilingual support for word filtering -``` - -### Add words to the blacklist - -```js -var filter = new Filter(); - -filter.addWords('some', 'bad', 'word'); - -filter.clean("some bad word!") //**** *** ****! - -//or use an array using the spread operator - -var newBadWords = ['some', 'bad', 'word']; - -filter.addWords(...newBadWords); - -filter.clean("some bad word!") //**** *** ****! - -//or - -var filter = new Filter({ list: ['some', 'bad', 'word'] }); - -filter.clean("some bad word!") //**** *** ****! -``` - -### Instantiate with an empty list - -```js -var filter = new Filter({ emptyList: true }); -filter.clean('hell this wont clean anything'); //hell this wont clean anything -``` - -### Remove words from the blacklist - -```js -let filter = new Filter(); - -filter.removeWords('hells', 'sadist'); - -filter.clean("some hells word!"); //some hells word! - -//or use an array using the spread operator - -let removeWords = ['hells', 'sadist']; - -filter.removeWords(...removeWords); - -filter.clean("some sadist hells word!"); //some sadist hells word! -``` - -### API - - - -#### constructor - -Filter constructor. - -**Parameters** - -- `options` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Filter instance options (optional, default `{}`) - - `options.emptyList` **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Instantiate filter with no blacklist - - `options.list` **[array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** Instantiate filter with custom list - - `options.placeHolder` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Character used to replace profane words. - - `options.regex` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Regular expression used to sanitize words before comparing them to blacklist. - - `options.replaceRegex` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Regular expression used to replace profane words with placeHolder. - -#### isProfane - -Determine if a string contains profane language. - -**Parameters** - -- `string` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** String to evaluate for profanity. - -#### replaceWord - -Replace a word with placeHolder characters; - -**Parameters** - -- `string` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** String to replace. - -#### clean - -Evaluate a string for profanity and return an edited version. - -**Parameters** - -- `string` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Sentence to filter. - -#### addWords - -Add word(s) to blacklist filter / remove words from whitelist filter - -**Parameters** - -- `word` **...[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Word(s) to add to blacklist - -#### removeWords - -Add words to whitelist filter - -**Parameters** - -- `word` **...[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Word(s) to add to whitelist. - -## Testing - - npm test - -## License - -The MIT License (MIT) - -Copyright (c) 2013 Michael Price - -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/bad-words/dist/badwords.js b/node_modules/bad-words/dist/badwords.js deleted file mode 100644 index 1d67c86..0000000 --- a/node_modules/bad-words/dist/badwords.js +++ /dev/null @@ -1,108 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.badwords = f()}})(function(){var define,module,exports;module={exports:(exports={})}; -var localList = require('./lang.json').words; -var baseList = require('badwords-list').array; -var Filter = (function() { - /** - * Filter constructor. - * @constructor - * @param {object} options - Filter instance options - * @param {boolean} options.emptyList - Instantiate filter with no blacklist - * @param {array} options.list - Instantiate filter with custom list - * @param {string} options.placeHolder - Character used to replace profane words. - * @param {string} options.regex - Regular expression used to sanitize words before comparing them to blacklist. - * @param {string} options.replaceRegex - Regular expression used to replace profane words with placeHolder. - */ - function Filter(options) { - options = options || {}; - this.list = options.emptyList && [] || Array.prototype.concat.apply(localList, [baseList, options.list || []]); - this.exclude = options.exclude || []; - this.placeHolder = options.placeHolder || '*'; - this.regex = options.regex || /[^a-zA-Z0-9|\$|\@]|\^/g; - this.replaceRegex = options.replaceRegex || /\w/g; - } - - /** - * Determine if a string contains profane language. - * @param {string} string - String to evaluate for profanity. - */ - Filter.prototype.isProfane = function isProfane(string) { - return string - .split(/\b/) - .map(function(w) { - return w.toLowerCase().replace(this.regex, ''); - }, this) - .filter(this.isProfaneLike, this) - .shift() || false; - }; - - /** - * Determine if a single word is profane or looks profane. - * @param {string} word - String to evaluate for profanity. - */ - Filter.prototype.isProfaneLike = function profaneLike(word) { - if (!!~this.exclude.indexOf(word)) { - return false; - } - - if (!!~this.list.indexOf(word)) { - return true; - } - - return this.list - .map(function(w) { - return new RegExp('^' + w.replace(/(\W)/g, '\\$1') + '$', 'gi'); - }, this) - .reduce(function(outcome, wordExp) { - return outcome || wordExp.test(word); - }, false); - }; - - /** - * Replace a word with placeHolder characters; - * @param {string} string - String to replace. - */ - Filter.prototype.replaceWord = function replaceWord(string) { - return string.replace(this.regex, '').replace(this.replaceRegex, this.placeHolder); - }; - - /** - * Evaluate a string for profanity and return an edited version. - * @param {string} string - Sentence to filter. - */ - Filter.prototype.clean = function clean(string) { - return string.split(/\b/).map(function(word) { - return this.isProfane(word) ? this.replaceWord(word) : word; - }.bind(this)).join(''); - }; - - /** - * Add words to blacklist filter / remove words from whitelist filter - * @param {(string|string[])} - */ - Filter.prototype.addWords = function addWords(words) { - words = (words instanceof Array) ? words : [words]; - this.list = this.list.concat(words); - - words.forEach(function(word) { - if(!!~this.exclude.indexOf(word)) { - this.exclude.splice(this.exclude.indexOf(word), 1); - } - }, this); - }; - - /** - * Add words to whitelist filter - * @param {...string} word - Word to add to whitelist. - */ - Filter.prototype.removeWords = function removeWords() { - var words = Array.prototype.slice.call(arguments); - this.exclude.push.apply(this.exclude, words); - }; - - return Filter; -})(); - -module.exports = Filter; - -return module.exports;}); - diff --git a/node_modules/bad-words/lib/badwords.js b/node_modules/bad-words/lib/badwords.js deleted file mode 100644 index 9091708..0000000 --- a/node_modules/bad-words/lib/badwords.js +++ /dev/null @@ -1,86 +0,0 @@ -const localList = require('./lang.json').words; -const baseList = require('badwords-list').array; - -class Filter { - - /** - * Filter constructor. - * @constructor - * @param {object} options - Filter instance options - * @param {boolean} options.emptyList - Instantiate filter with no blacklist - * @param {array} options.list - Instantiate filter with custom list - * @param {string} options.placeHolder - Character used to replace profane words. - * @param {string} options.regex - Regular expression used to sanitize words before comparing them to blacklist. - * @param {string} options.replaceRegex - Regular expression used to replace profane words with placeHolder. - */ - constructor(options = {}) { - Object.assign(this, { - list: options.emptyList && [] || Array.prototype.concat.apply(localList, [baseList, options.list || []]), - exclude: options.exclude || [], - placeHolder: options.placeHolder || '*', - regex: options.regex || /[^a-zA-Z0-9|\$|\@]|\^/g, - replaceRegex: options.replaceRegex || /\w/g - }) - } - - /** - * Determine if a string contains profane language. - * @param {string} string - String to evaluate for profanity. - */ - isProfane(string) { - return this.list - .filter((word) => { - const wordExp = new RegExp(`\\b${word.replace(/(\W)/g, '\\$1')}\\b`, 'gi'); - return !this.exclude.includes(word.toLowerCase()) && wordExp.test(string); - }) - .length > 0 || false; - } - - /** - * Replace a word with placeHolder characters; - * @param {string} string - String to replace. - */ - replaceWord(string) { - return string - .replace(this.regex, '') - .replace(this.replaceRegex, this.placeHolder); - } - - /** - * Evaluate a string for profanity and return an edited version. - * @param {string} string - Sentence to filter. - */ - clean(string) { - return string.split(/\b/).map((word) => { - return this.isProfane(word) ? this.replaceWord(word) : word; - }).join(''); - } - - /** - * Add word(s) to blacklist filter / remove words from whitelist filter - * @param {...string} word - Word(s) to add to blacklist - */ - addWords() { - let words = Array.from(arguments); - - this.list.push(...words); - - words - .map(word => word.toLowerCase()) - .forEach((word) => { - if (this.exclude.includes(word)) { - this.exclude.splice(this.exclude.indexOf(word), 1); - } - }); - } - - /** - * Add words to whitelist filter - * @param {...string} word - Word(s) to add to whitelist. - */ - removeWords() { - this.exclude.push(...Array.from(arguments).map(word => word.toLowerCase())); - } -} - -module.exports = Filter; \ No newline at end of file diff --git a/node_modules/bad-words/lib/lang.json b/node_modules/bad-words/lib/lang.json deleted file mode 100644 index bb3f2ee..0000000 --- a/node_modules/bad-words/lib/lang.json +++ /dev/null @@ -1,457 +0,0 @@ -{ - "words":[ - "ahole", - "anus", - "ash0le", - "ash0les", - "asholes", - "ass", - "Ass Monkey", - "Assface", - "assh0le", - "assh0lez", - "asshole", - "assholes", - "assholz", - "asswipe", - "azzhole", - "bassterds", - "bastard", - "bastards", - "bastardz", - "basterds", - "basterdz", - "Biatch", - "bitch", - "bitches", - "Blow Job", - "boffing", - "butthole", - "buttwipe", - "c0ck", - "c0cks", - "c0k", - "Carpet Muncher", - "cawk", - "cawks", - "Clit", - "cnts", - "cntz", - "cock", - "cockhead", - "cock-head", - "cocks", - "CockSucker", - "cock-sucker", - "crap", - "cum", - "cunt", - "cunts", - "cuntz", - "dick", - "dild0", - "dild0s", - "dildo", - "dildos", - "dilld0", - "dilld0s", - "dominatricks", - "dominatrics", - "dominatrix", - "dyke", - "enema", - "f u c k", - "f u c k e r", - "fag", - "fag1t", - "faget", - "fagg1t", - "faggit", - "faggot", - "fagg0t", - "fagit", - "fags", - "fagz", - "faig", - "faigs", - "fart", - "flipping the bird", - "fuck", - "fucker", - "fuckin", - "fucking", - "fucks", - "Fudge Packer", - "fuk", - "Fukah", - "Fuken", - "fuker", - "Fukin", - "Fukk", - "Fukkah", - "Fukken", - "Fukker", - "Fukkin", - "g00k", - "God-damned", - "h00r", - "h0ar", - "h0re", - "hells", - "hoar", - "hoor", - "hoore", - "jackoff", - "jap", - "japs", - "jerk-off", - "jisim", - "jiss", - "jizm", - "jizz", - "knob", - "knobs", - "knobz", - "kunt", - "kunts", - "kuntz", - "Lezzian", - "Lipshits", - "Lipshitz", - "masochist", - "masokist", - "massterbait", - "masstrbait", - "masstrbate", - "masterbaiter", - "masterbate", - "masterbates", - "Motha Fucker", - "Motha Fuker", - "Motha Fukkah", - "Motha Fukker", - "Mother Fucker", - "Mother Fukah", - "Mother Fuker", - "Mother Fukkah", - "Mother Fukker", - "mother-fucker", - "Mutha Fucker", - "Mutha Fukah", - "Mutha Fuker", - "Mutha Fukkah", - "Mutha Fukker", - "n1gr", - "nastt", - "nigger;", - "nigur;", - "niiger;", - "niigr;", - "orafis", - "orgasim;", - "orgasm", - "orgasum", - "oriface", - "orifice", - "orifiss", - "packi", - "packie", - "packy", - "paki", - "pakie", - "paky", - "pecker", - "peeenus", - "peeenusss", - "peenus", - "peinus", - "pen1s", - "penas", - "penis", - "penis-breath", - "penus", - "penuus", - "Phuc", - "Phuck", - "Phuk", - "Phuker", - "Phukker", - "polac", - "polack", - "polak", - "Poonani", - "pr1c", - "pr1ck", - "pr1k", - "pusse", - "pussee", - "pussy", - "puuke", - "puuker", - "queer", - "queers", - "queerz", - "qweers", - "qweerz", - "qweir", - "recktum", - "rectum", - "retard", - "sadist", - "scank", - "schlong", - "screwing", - "semen", - "sex", - "sexy", - "Sh!t", - "sh1t", - "sh1ter", - "sh1ts", - "sh1tter", - "sh1tz", - "shit", - "shits", - "shitter", - "Shitty", - "Shity", - "shitz", - "Shyt", - "Shyte", - "Shytty", - "Shyty", - "skanck", - "skank", - "skankee", - "skankey", - "skanks", - "Skanky", - "slag", - "slut", - "sluts", - "Slutty", - "slutz", - "son-of-a-bitch", - "tit", - "turd", - "va1jina", - "vag1na", - "vagiina", - "vagina", - "vaj1na", - "vajina", - "vullva", - "vulva", - "w0p", - "wh00r", - "wh0re", - "whore", - "xrated", - "xxx", - "b!+ch", - "bitch", - "blowjob", - "clit", - "arschloch", - "fuck", - "shit", - "ass", - "asshole", - "b!tch", - "b17ch", - "b1tch", - "bastard", - "bi+ch", - "boiolas", - "buceta", - "c0ck", - "cawk", - "chink", - "cipa", - "clits", - "cock", - "cum", - "cunt", - "dildo", - "dirsa", - "ejakulate", - "fatass", - "fcuk", - "fuk", - "fux0r", - "hoer", - "hore", - "jism", - "kawk", - "l3itch", - "l3i+ch", - "lesbian", - "masturbate", - "masterbat*", - "masterbat3", - "motherfucker", - "s.o.b.", - "mofo", - "nazi", - "nigga", - "nigger", - "nutsack", - "phuck", - "pimpis", - "pusse", - "pussy", - "scrotum", - "sh!t", - "shemale", - "shi+", - "sh!+", - "slut", - "smut", - "teets", - "tits", - "boobs", - "b00bs", - "teez", - "testical", - "testicle", - "titt", - "w00se", - "jackoff", - "wank", - "whoar", - "whore", - "*damn", - "*dyke", - "*fuck*", - "*shit*", - "@$$", - "amcik", - "andskota", - "arse*", - "assrammer", - "ayir", - "bi7ch", - "bitch*", - "bollock*", - "breasts", - "butt-pirate", - "cabron", - "cazzo", - "chraa", - "chuj", - "Cock*", - "cunt*", - "d4mn", - "daygo", - "dego", - "dick*", - "dike*", - "dupa", - "dziwka", - "ejackulate", - "Ekrem*", - "Ekto", - "enculer", - "faen", - "fag*", - "fanculo", - "fanny", - "feces", - "feg", - "Felcher", - "ficken", - "fitt*", - "Flikker", - "foreskin", - "Fotze", - "Fu(*", - "fuk*", - "futkretzn", - "gook", - "guiena", - "h0r", - "h4x0r", - "hell", - "helvete", - "hoer*", - "honkey", - "Huevon", - "hui", - "injun", - "jizz", - "kanker*", - "kike", - "klootzak", - "kraut", - "knulle", - "kuk", - "kuksuger", - "Kurac", - "kurwa", - "kusi*", - "kyrpa*", - "lesbo", - "mamhoon", - "masturbat*", - "merd*", - "mibun", - "monkleigh", - "mouliewop", - "muie", - "mulkku", - "muschi", - "nazis", - "nepesaurio", - "nigger*", - "orospu", - "paska*", - "perse", - "picka", - "pierdol*", - "pillu*", - "pimmel", - "piss*", - "pizda", - "poontsee", - "poop", - "porn", - "p0rn", - "pr0n", - "preteen", - "pula", - "pule", - "puta", - "puto", - "qahbeh", - "queef*", - "rautenberg", - "schaffer", - "scheiss*", - "schlampe", - "schmuck", - "screw", - "sh!t*", - "sharmuta", - "sharmute", - "shipal", - "shiz", - "skribz", - "skurwysyn", - "sphencter", - "spic", - "spierdalaj", - "splooge", - "suka", - "b00b*", - "testicle*", - "titt*", - "twat", - "vittu", - "wank*", - "wetback*", - "wichser", - "wop*", - "yed", - "zabourah" - ] -} diff --git a/node_modules/bad-words/package.json b/node_modules/bad-words/package.json deleted file mode 100644 index 979ece6..0000000 --- a/node_modules/bad-words/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "_from": "bad-words@^3.0.3", - "_id": "bad-words@3.0.3", - "_inBundle": false, - "_integrity": "sha512-To+nGz+U8SpEQieZ2kSadY/1hVO88UXAslCJuTgLjDOuGrs/tNW2BYwl0fctxcRLooe0nzYN1pGzgvRIrd0BeA==", - "_location": "/bad-words", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "bad-words@^3.0.3", - "name": "bad-words", - "escapedName": "bad-words", - "rawSpec": "^3.0.3", - "saveSpec": null, - "fetchSpec": "^3.0.3" - }, - "_requiredBy": [ - "#USER", - "/" - ], - "_resolved": "https://registry.npmjs.org/bad-words/-/bad-words-3.0.3.tgz", - "_shasum": "fa6fe18ffce3101a415193ebd8647c289b58b554", - "_spec": "bad-words@^3.0.3", - "_where": "/Users/paolo/Desktop/multiplayer games/tutorials/chat3", - "author": { - "name": "Mike P." - }, - "bugs": { - "url": "https://github.com/web-mech/badwords/issues" - }, - "bundleDependencies": false, - "dependencies": { - "badwords-list": "^1.0.0" - }, - "deprecated": false, - "description": "A javascript filter for bad words", - "devDependencies": { - "better-assert": "1.0.0", - "documentation": "^5.3.3", - "mocha": "^5.2.0" - }, - "directories": { - "test": "test" - }, - "engines": { - "node": ">=8.0.0" - }, - "homepage": "https://github.com/web-mech/badwords#readme", - "keywords": [ - "curse", - "words", - "profanity", - "filter" - ], - "license": "MIT", - "main": "./lib/badwords", - "name": "bad-words", - "repository": { - "type": "git", - "url": "git://github.com/web-mech/badwords.git" - }, - "scripts": { - "docs": "documentation readme --section API ./lib/badwords.js", - "test": "mocha -R spec" - }, - "version": "3.0.3" -} diff --git a/node_modules/bad-words/test/addWords.js b/node_modules/bad-words/test/addWords.js deleted file mode 100644 index 8267de8..0000000 --- a/node_modules/bad-words/test/addWords.js +++ /dev/null @@ -1,28 +0,0 @@ -require('assert'); -var Filter = require('../lib/badwords.js'), - filter = new Filter(), - assert = require('better-assert'); - -describe('filter', function(){ - describe('addWords',function(){ - it('Should append words to the filter list.', function(){ - filter.addWords('dog', 'go'); - assert(filter.clean('Go dog go') === '** *** **'); - }); - - it('Should append words to the filter using an array', () => { - let addWords = ['go', 'dog']; - filter = new Filter() - filter.addWords(...addWords); - assert(filter.clean('Go dog go') === '** *** **'); - }); - - it('Should allow a list to be passed to the constructor', function() { - filter = new Filter({ - list: ['dog'] - }); - - assert(filter.clean('Go dog go') === 'Go *** go'); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/bad-words/test/filter.js b/node_modules/bad-words/test/filter.js deleted file mode 100644 index 813d86d..0000000 --- a/node_modules/bad-words/test/filter.js +++ /dev/null @@ -1,47 +0,0 @@ -require('assert'); -var Filter = require('../lib/badwords.js'), - filter = new Filter(), - assert = require('better-assert'); - -describe('filter', function(){ - describe('clean',function(){ - it('Should replace a bad word within a sentence asterisks (******)',function(){ - console.log(filter.clean('Don\'t be an ash0le')); - assert(filter.clean('Don\'t be an ash0le') === 'Don\'t be an ******'); - - }); - - it('Should replace multiple instances of any bad words within a sentence asterisks (******)',function(){ - assert(filter.clean('cnts ash0le knob xxx') === '**** ****** **** ***'); - }); - - it('Should not replace anything within a sentence if there are no bad words',function(){ - assert(filter.clean('The cat ran fast') === 'The cat ran fast'); - }); - - it('Should replace a string with proper placeholder when overridden', function(){ - var customFilter = new Filter({ placeHolder: 'x'}); - assert(customFilter.clean('This is a hells good test') === 'This is a xxxxx good test'); - }); - - it('Should allow an instance of filter with an empty blacklist', function() { - var customFilter = new Filter({ - emptyList: true - }); - assert(customFilter.clean('This is a hells good test') === 'This is a hells good test'); - }); - - it('Should tokenize words according to regex word boundaries',function(){ - assert(filter.clean('what a bitch...fuck you') === 'what a *****...**** you'); - assert(filter.clean('

Don\'t be an asshole

') === '

Don\'t be an *******

'); - }); - - xit('Should filter words that are derivatives of words from the filter blacklist', function() { - assert(filter.clean('shitshit') === '********'); - }); - - it('Shouldn\'t filter words that aren\'t profane.', function() { - assert(filter.clean('hello there') === 'hello there'); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/bad-words/test/isProfane.js b/node_modules/bad-words/test/isProfane.js deleted file mode 100644 index 208b961..0000000 --- a/node_modules/bad-words/test/isProfane.js +++ /dev/null @@ -1,44 +0,0 @@ -require('assert'); -var Filter = require('../lib/badwords.js'), - filter = new Filter(), - assert = require('better-assert'); - -describe('filter', function(){ - describe('isProfane',function(){ - it("Should detect a bad word and return a boolean value",function(){ - assert(filter.isProfane("ash0le")); - }); - - it("Should return false when no bad word is detected",function(){ - assert(filter.isProfane("wife") === false); - }); - - it("Should be able to detect a bad word in a sentence",function(){ - assert(filter.isProfane("that person is an ash0le")); - }); - - it('Filters out special characters appropriately', function() { - assert(filter.isProfane("You're an asshole^ you are")); - }); - - it('Should detect filtered words from badwords-list', function(){ - assert(filter.isProfane('willies')); - }); - - it('Should detect filtered words regardless of type case', function() { - var filter = new Filter({ - list: ['Test'] - }); - assert(filter.isProfane('test')); - }); - - it('Should tokenize words according to regex word boundaries', function() { - assert(filter.isProfane("that person is an\nasshole")); - }); - - it('Should detect bad word phrases', function () { - filter.addWords('oh no'); - assert(filter.isProfane("oh no! this is profane!")); - }); - }); -}); diff --git a/node_modules/bad-words/test/removeWords.js b/node_modules/bad-words/test/removeWords.js deleted file mode 100644 index e21220c..0000000 --- a/node_modules/bad-words/test/removeWords.js +++ /dev/null @@ -1,21 +0,0 @@ -require('assert'); -var Filter = require('../lib/badwords.js'), - filter = new Filter(), - assert = require('better-assert'); - -describe('filter', () => { - describe('removeWords',() => { - it('Should allow you to remove words from the filter blacklist and no longer filter them (case-insensitive)', () => { - filter.removeWords('Hells'); - assert(filter.clean('This is a hells good test') === 'This is a hells good test'); - }); - - it ('Should allow you to remove an array of words from the filter blacklist and no longer filter them', () => { - let removingWords = ['hells', 'sadist']; - - filter = new Filter(); - filter.removeWords(...removingWords); - assert(filter.clean('This is a hells sadist test') === 'This is a hells sadist test'); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/bad-words/test/replaceWord.js b/node_modules/bad-words/test/replaceWord.js deleted file mode 100644 index 00874d6..0000000 --- a/node_modules/bad-words/test/replaceWord.js +++ /dev/null @@ -1,12 +0,0 @@ -require('assert'); -var Filter = require('../lib/badwords.js'), - filter = new Filter(), - assert = require('better-assert'); - -describe('filter', function(){ - describe('replaceWord',function(){ - it("Should replace a bad word with asterisks (******)",function(){ - assert(filter.replaceWord("ash0le") == '******'); - }); - }); -}); \ No newline at end of file diff --git a/node_modules/badwords-list/.npmignore b/node_modules/badwords-list/.npmignore deleted file mode 100644 index 278d773..0000000 --- a/node_modules/badwords-list/.npmignore +++ /dev/null @@ -1,15 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -npm-debug.log -node_modules/ \ No newline at end of file diff --git a/node_modules/badwords-list/LICENSE b/node_modules/badwords-list/LICENSE deleted file mode 100644 index 8ce8431..0000000 --- a/node_modules/badwords-list/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Maurice Butler - -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/badwords-list/Makefile b/node_modules/badwords-list/Makefile deleted file mode 100644 index 3f8a1d5..0000000 --- a/node_modules/badwords-list/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -test: - @./node_modules/mocha/bin/_mocha -R $(REPORTER) - -.PHONY: test \ No newline at end of file diff --git a/node_modules/badwords-list/README.md b/node_modules/badwords-list/README.md deleted file mode 100644 index 1b4ae85..0000000 --- a/node_modules/badwords-list/README.md +++ /dev/null @@ -1,57 +0,0 @@ -badwords-list v1.0.0 -======== - -A highly consumable list of bad (profanity) english words based on the nice short and simple list found in [Google's "what do you love" project](http://www.wdyl.com/) made accessable by [Jamie Wilkinson](https://gist.github.com/jamiew) [here](https://gist.github.com/jamiew/1112488) - -Inspired by [badwords](https://github.com/MauriceButler/badwords) - -This data has been exposed as an object that contains - - - an array - - an object - - a regular expression - -depending on what is required for your purposes. - - -Install -======= - - npm install badwords-list - -Usage -===== - -``` -var list = require('badwords-list'), - array = list.array, - object = list.object, - regex = list.regex; -``` - -Testing -======= - -####Requires -- Mocha -- better-assert - - -``` -npm test -``` - -**or** - -``` -REPORTER=spec make -``` - -**or** - -``` -mocha -``` - - - diff --git a/node_modules/badwords-list/lib/array.js b/node_modules/badwords-list/lib/array.js deleted file mode 100644 index 267a521..0000000 --- a/node_modules/badwords-list/lib/array.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = ["4r5e", "5h1t", "5hit", "a55", "anal", "anus", "ar5e", "arrse", "arse", "ass", "ass-fucker", "asses", "assfucker", "assfukka", "asshole", "assholes", "asswhole", "a_s_s", "b!tch", "b00bs", "b17ch", "b1tch", "ballbag", "balls", "ballsack", "bastard", "beastial", "beastiality", "bellend", "bestial", "bestiality", "bi+ch", "biatch", "bitch", "bitcher", "bitchers", "bitches", "bitchin", "bitching", "bloody", "blow job", "blowjob", "blowjobs", "boiolas", "bollock", "bollok", "boner", "boob", "boobs", "booobs", "boooobs", "booooobs", "booooooobs", "breasts", "buceta", "bugger", "bum", "bunny fucker", "butt", "butthole", "buttmuch", "buttplug", "c0ck", "c0cksucker", "carpet muncher", "cawk", "chink", "cipa", "cl1t", "clit", "clitoris", "clits", "cnut", "cock", "cock-sucker", "cockface", "cockhead", "cockmunch", "cockmuncher", "cocks", "cocksuck", "cocksucked", "cocksucker", "cocksucking", "cocksucks", "cocksuka", "cocksukka", "cok", "cokmuncher", "coksucka", "coon", "cox", "crap", "cum", "cummer", "cumming", "cums", "cumshot", "cunilingus", "cunillingus", "cunnilingus", "cunt", "cuntlick", "cuntlicker", "cuntlicking", "cunts", "cyalis", "cyberfuc", "cyberfuck", "cyberfucked", "cyberfucker", "cyberfuckers", "cyberfucking", "d1ck", "damn", "dick", "dickhead", "dildo", "dildos", "dink", "dinks", "dirsa", "dlck", "dog-fucker", "doggin", "dogging", "donkeyribber", "doosh", "duche", "dyke", "ejaculate", "ejaculated", "ejaculates", "ejaculating", "ejaculatings", "ejaculation", "ejakulate", "f u c k", "f u c k e r", "f4nny", "fag", "fagging", "faggitt", "faggot", "faggs", "fagot", "fagots", "fags", "fanny", "fannyflaps", "fannyfucker", "fanyy", "fatass", "fcuk", "fcuker", "fcuking", "feck", "fecker", "felching", "fellate", "fellatio", "fingerfuck", "fingerfucked", "fingerfucker", "fingerfuckers", "fingerfucking", "fingerfucks", "fistfuck", "fistfucked", "fistfucker", "fistfuckers", "fistfucking", "fistfuckings", "fistfucks", "flange", "fook", "fooker", "fuck", "fucka", "fucked", "fucker", "fuckers", "fuckhead", "fuckheads", "fuckin", "fucking", "fuckings", "fuckingshitmotherfucker", "fuckme", "fucks", "fuckwhit", "fuckwit", "fudge packer", "fudgepacker", "fuk", "fuker", "fukker", "fukkin", "fuks", "fukwhit", "fukwit", "fux", "fux0r", "f_u_c_k", "gangbang", "gangbanged", "gangbangs", "gaylord", "gaysex", "goatse", "God", "god-dam", "god-damned", "goddamn", "goddamned", "hardcoresex", "hell", "heshe", "hoar", "hoare", "hoer", "homo", "hore", "horniest", "horny", "hotsex", "jack-off", "jackoff", "jap", "jerk-off", "jism", "jiz", "jizm", "jizz", "kawk", "knob", "knobead", "knobed", "knobend", "knobhead", "knobjocky", "knobjokey", "kock", "kondum", "kondums", "kum", "kummer", "kumming", "kums", "kunilingus", "l3i+ch", "l3itch", "labia", "lust", "lusting", "m0f0", "m0fo", "m45terbate", "ma5terb8", "ma5terbate", "masochist", "master-bate", "masterb8", "masterbat*", "masterbat3", "masterbate", "masterbation", "masterbations", "masturbate", "mo-fo", "mof0", "mofo", "mothafuck", "mothafucka", "mothafuckas", "mothafuckaz", "mothafucked", "mothafucker", "mothafuckers", "mothafuckin", "mothafucking", "mothafuckings", "mothafucks", "mother fucker", "motherfuck", "motherfucked", "motherfucker", "motherfuckers", "motherfuckin", "motherfucking", "motherfuckings", "motherfuckka", "motherfucks", "muff", "mutha", "muthafecker", "muthafuckker", "muther", "mutherfucker", "n1gga", "n1gger", "nazi", "nigg3r", "nigg4h", "nigga", "niggah", "niggas", "niggaz", "nigger", "niggers", "nob", "nob jokey", "nobhead", "nobjocky", "nobjokey", "numbnuts", "nutsack", "orgasim", "orgasims", "orgasm", "orgasms", "p0rn", "pawn", "pecker", "penis", "penisfucker", "phonesex", "phuck", "phuk", "phuked", "phuking", "phukked", "phukking", "phuks", "phuq", "pigfucker", "pimpis", "piss", "pissed", "pisser", "pissers", "pisses", "pissflaps", "pissin", "pissing", "pissoff", "poop", "porn", "porno", "pornography", "pornos", "prick", "pricks", "pron", "pube", "pusse", "pussi", "pussies", "pussy", "pussys", "rectum", "retard", "rimjaw", "rimming", "s hit", "s.o.b.", "sadist", "schlong", "screwing", "scroat", "scrote", "scrotum", "semen", "sex", "sh!+", "sh!t", "sh1t", "shag", "shagger", "shaggin", "shagging", "shemale", "shi+", "shit", "shitdick", "shite", "shited", "shitey", "shitfuck", "shitfull", "shithead", "shiting", "shitings", "shits", "shitted", "shitter", "shitters", "shitting", "shittings", "shitty", "skank", "slut", "sluts", "smegma", "smut", "snatch", "son-of-a-bitch", "spac", "spunk", "s_h_i_t", "t1tt1e5", "t1tties", "teets", "teez", "testical", "testicle", "tit", "titfuck", "tits", "titt", "tittie5", "tittiefucker", "titties", "tittyfuck", "tittywank", "titwank", "tosser", "turd", "tw4t", "twat", "twathead", "twatty", "twunt", "twunter", "v14gra", "v1gra", "vagina", "viagra", "vulva", "w00se", "wang", "wank", "wanker", "wanky", "whoar", "whore", "willies", "willy", "xrated", "xxx"]; \ No newline at end of file diff --git a/node_modules/badwords-list/lib/index.js b/node_modules/badwords-list/lib/index.js deleted file mode 100644 index e684671..0000000 --- a/node_modules/badwords-list/lib/index.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - object: require('./object'), - array: require('./array'), - regex: require('./regexp') -}; \ No newline at end of file diff --git a/node_modules/badwords-list/lib/object.js b/node_modules/badwords-list/lib/object.js deleted file mode 100644 index 5a3d7ad..0000000 --- a/node_modules/badwords-list/lib/object.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = {"4r5e": 1, "5h1t": 1, "5hit": 1, "a55": 1, "anal": 1, "anus": 1, "ar5e": 1, "arrse": 1, "arse": 1, "ass": 1, "ass-fucker": 1, "asses": 1, "assfucker": 1, "assfukka": 1, "asshole": 1, "assholes": 1, "asswhole": 1, "a_s_s": 1, "b!tch": 1, "b00bs": 1, "b17ch": 1, "b1tch": 1, "ballbag": 1, "balls": 1, "ballsack": 1, "bastard": 1, "beastial": 1, "beastiality": 1, "bellend": 1, "bestial": 1, "bestiality": 1, "bi+ch": 1, "biatch": 1, "bitch": 1, "bitcher": 1, "bitchers": 1, "bitches": 1, "bitchin": 1, "bitching": 1, "bloody": 1, "blow job": 1, "blowjob": 1, "blowjobs": 1, "boiolas": 1, "bollock": 1, "bollok": 1, "boner": 1, "boob": 1, "boobs": 1, "booobs": 1, "boooobs": 1, "booooobs": 1, "booooooobs": 1, "breasts": 1, "buceta": 1, "bugger": 1, "bum": 1, "bunny fucker": 1, "butt": 1, "butthole": 1, "buttmuch": 1, "buttplug": 1, "c0ck": 1, "c0cksucker": 1, "carpet muncher": 1, "cawk": 1, "chink": 1, "cipa": 1, "cl1t": 1, "clit": 1, "clitoris": 1, "clits": 1, "cnut": 1, "cock": 1, "cock-sucker": 1, "cockface": 1, "cockhead": 1, "cockmunch": 1, "cockmuncher": 1, "cocks": 1, "cocksuck": 1, "cocksucked": 1, "cocksucker": 1, "cocksucking": 1, "cocksucks": 1, "cocksuka": 1, "cocksukka": 1, "cok": 1, "cokmuncher": 1, "coksucka": 1, "coon": 1, "cox": 1, "crap": 1, "cum": 1, "cummer": 1, "cumming": 1, "cums": 1, "cumshot": 1, "cunilingus": 1, "cunillingus": 1, "cunnilingus": 1, "cunt": 1, "cuntlick": 1, "cuntlicker": 1, "cuntlicking": 1, "cunts": 1, "cyalis": 1, "cyberfuc": 1, "cyberfuck": 1, "cyberfucked": 1, "cyberfucker": 1, "cyberfuckers": 1, "cyberfucking": 1, "d1ck": 1, "damn": 1, "dick": 1, "dickhead": 1, "dildo": 1, "dildos": 1, "dink": 1, "dinks": 1, "dirsa": 1, "dlck": 1, "dog-fucker": 1, "doggin": 1, "dogging": 1, "donkeyribber": 1, "doosh": 1, "duche": 1, "dyke": 1, "ejaculate": 1, "ejaculated": 1, "ejaculates": 1, "ejaculating": 1, "ejaculatings": 1, "ejaculation": 1, "ejakulate": 1, "f u c k": 1, "f u c k e r": 1, "f4nny": 1, "fag": 1, "fagging": 1, "faggitt": 1, "faggot": 1, "faggs": 1, "fagot": 1, "fagots": 1, "fags": 1, "fanny": 1, "fannyflaps": 1, "fannyfucker": 1, "fanyy": 1, "fatass": 1, "fcuk": 1, "fcuker": 1, "fcuking": 1, "feck": 1, "fecker": 1, "felching": 1, "fellate": 1, "fellatio": 1, "fingerfuck": 1, "fingerfucked": 1, "fingerfucker": 1, "fingerfuckers": 1, "fingerfucking": 1, "fingerfucks": 1, "fistfuck": 1, "fistfucked": 1, "fistfucker": 1, "fistfuckers": 1, "fistfucking": 1, "fistfuckings": 1, "fistfucks": 1, "flange": 1, "fook": 1, "fooker": 1, "fuck": 1, "fucka": 1, "fucked": 1, "fucker": 1, "fuckers": 1, "fuckhead": 1, "fuckheads": 1, "fuckin": 1, "fucking": 1, "fuckings": 1, "fuckingshitmotherfucker": 1, "fuckme": 1, "fucks": 1, "fuckwhit": 1, "fuckwit": 1, "fudge packer": 1, "fudgepacker": 1, "fuk": 1, "fuker": 1, "fukker": 1, "fukkin": 1, "fuks": 1, "fukwhit": 1, "fukwit": 1, "fux": 1, "fux0r": 1, "f_u_c_k": 1, "gangbang": 1, "gangbanged": 1, "gangbangs": 1, "gaylord": 1, "gaysex": 1, "goatse": 1, "God": 1, "god-dam": 1, "god-damned": 1, "goddamn": 1, "goddamned": 1, "hardcoresex": 1, "hell": 1, "heshe": 1, "hoar": 1, "hoare": 1, "hoer": 1, "homo": 1, "hore": 1, "horniest": 1, "horny": 1, "hotsex": 1, "jack-off": 1, "jackoff": 1, "jap": 1, "jerk-off": 1, "jism": 1, "jiz": 1, "jizm": 1, "jizz": 1, "kawk": 1, "knob": 1, "knobead": 1, "knobed": 1, "knobend": 1, "knobhead": 1, "knobjocky": 1, "knobjokey": 1, "kock": 1, "kondum": 1, "kondums": 1, "kum": 1, "kummer": 1, "kumming": 1, "kums": 1, "kunilingus": 1, "l3i+ch": 1, "l3itch": 1, "labia": 1, "lust": 1, "lusting": 1, "m0f0": 1, "m0fo": 1, "m45terbate": 1, "ma5terb8": 1, "ma5terbate": 1, "masochist": 1, "master-bate": 1, "masterb8": 1, "masterbat*": 1, "masterbat3": 1, "masterbate": 1, "masterbation": 1, "masterbations": 1, "masturbate": 1, "mo-fo": 1, "mof0": 1, "mofo": 1, "mothafuck": 1, "mothafucka": 1, "mothafuckas": 1, "mothafuckaz": 1, "mothafucked": 1, "mothafucker": 1, "mothafuckers": 1, "mothafuckin": 1, "mothafucking": 1, "mothafuckings": 1, "mothafucks": 1, "mother fucker": 1, "motherfuck": 1, "motherfucked": 1, "motherfucker": 1, "motherfuckers": 1, "motherfuckin": 1, "motherfucking": 1, "motherfuckings": 1, "motherfuckka": 1, "motherfucks": 1, "muff": 1, "mutha": 1, "muthafecker": 1, "muthafuckker": 1, "muther": 1, "mutherfucker": 1, "n1gga": 1, "n1gger": 1, "nazi": 1, "nigg3r": 1, "nigg4h": 1, "nigga": 1, "niggah": 1, "niggas": 1, "niggaz": 1, "nigger": 1, "niggers": 1, "nob": 1, "nob jokey": 1, "nobhead": 1, "nobjocky": 1, "nobjokey": 1, "numbnuts": 1, "nutsack": 1, "orgasim": 1, "orgasims": 1, "orgasm": 1, "orgasms": 1, "p0rn": 1, "pawn": 1, "pecker": 1, "penis": 1, "penisfucker": 1, "phonesex": 1, "phuck": 1, "phuk": 1, "phuked": 1, "phuking": 1, "phukked": 1, "phukking": 1, "phuks": 1, "phuq": 1, "pigfucker": 1, "pimpis": 1, "piss": 1, "pissed": 1, "pisser": 1, "pissers": 1, "pisses": 1, "pissflaps": 1, "pissin": 1, "pissing": 1, "pissoff": 1, "poop": 1, "porn": 1, "porno": 1, "pornography": 1, "pornos": 1, "prick": 1, "pricks": 1, "pron": 1, "pube": 1, "pusse": 1, "pussi": 1, "pussies": 1, "pussy": 1, "pussys": 1, "rectum": 1, "retard": 1, "rimjaw": 1, "rimming": 1, "s hit": 1, "s.o.b.": 1, "sadist": 1, "schlong": 1, "screwing": 1, "scroat": 1, "scrote": 1, "scrotum": 1, "semen": 1, "sex": 1, "sh!+": 1, "sh!t": 1, "sh1t": 1, "shag": 1, "shagger": 1, "shaggin": 1, "shagging": 1, "shemale": 1, "shi+": 1, "shit": 1, "shitdick": 1, "shite": 1, "shited": 1, "shitey": 1, "shitfuck": 1, "shitfull": 1, "shithead": 1, "shiting": 1, "shitings": 1, "shits": 1, "shitted": 1, "shitter": 1, "shitters": 1, "shitting": 1, "shittings": 1, "shitty": 1, "skank": 1, "slut": 1, "sluts": 1, "smegma": 1, "smut": 1, "snatch": 1, "son-of-a-bitch": 1, "spac": 1, "spunk": 1, "s_h_i_t": 1, "t1tt1e5": 1, "t1tties": 1, "teets": 1, "teez": 1, "testical": 1, "testicle": 1, "tit": 1, "titfuck": 1, "tits": 1, "titt": 1, "tittie5": 1, "tittiefucker": 1, "titties": 1, "tittyfuck": 1, "tittywank": 1, "titwank": 1, "tosser": 1, "turd": 1, "tw4t": 1, "twat": 1, "twathead": 1, "twatty": 1, "twunt": 1, "twunter": 1, "v14gra": 1, "v1gra": 1, "vagina": 1, "viagra": 1, "vulva": 1, "w00se": 1, "wang": 1, "wank": 1, "wanker": 1, "wanky": 1, "whoar": 1, "whore": 1, "willies": 1, "willy": 1, "xrated": 1, "xxx": 1}; \ No newline at end of file diff --git a/node_modules/badwords-list/lib/regexp.js b/node_modules/badwords-list/lib/regexp.js deleted file mode 100644 index 3d61c38..0000000 --- a/node_modules/badwords-list/lib/regexp.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = /\b(4r5e|5h1t|5hit|a55|anal|anus|ar5e|arrse|arse|ass|ass-fucker|asses|assfucker|assfukka|asshole|assholes|asswhole|a_s_s|b!tch|b00bs|b17ch|b1tch|ballbag|balls|ballsack|bastard|beastial|beastiality|bellend|bestial|bestiality|bi\+ch|biatch|bitch|bitcher|bitchers|bitches|bitchin|bitching|bloody|blow job|blowjob|blowjobs|boiolas|bollock|bollok|boner|boob|boobs|booobs|boooobs|booooobs|booooooobs|breasts|buceta|bugger|bum|bunny fucker|butt|butthole|buttmuch|buttplug|c0ck|c0cksucker|carpet muncher|cawk|chink|cipa|cl1t|clit|clitoris|clits|cnut|cock|cock-sucker|cockface|cockhead|cockmunch|cockmuncher|cocks|cocksuck|cocksucked|cocksucker|cocksucking|cocksucks|cocksuka|cocksukka|cok|cokmuncher|coksucka|coon|cox|crap|cum|cummer|cumming|cums|cumshot|cunilingus|cunillingus|cunnilingus|cunt|cuntlick|cuntlicker|cuntlicking|cunts|cyalis|cyberfuc|cyberfuck|cyberfucked|cyberfucker|cyberfuckers|cyberfucking|d1ck|damn|dick|dickhead|dildo|dildos|dink|dinks|dirsa|dlck|dog-fucker|doggin|dogging|donkeyribber|doosh|duche|dyke|ejaculate|ejaculated|ejaculates|ejaculating|ejaculatings|ejaculation|ejakulate|f u c k|f u c k e r|f4nny|fag|fagging|faggitt|faggot|faggs|fagot|fagots|fags|fanny|fannyflaps|fannyfucker|fanyy|fatass|fcuk|fcuker|fcuking|feck|fecker|felching|fellate|fellatio|fingerfuck|fingerfucked|fingerfucker|fingerfuckers|fingerfucking|fingerfucks|fistfuck|fistfucked|fistfucker|fistfuckers|fistfucking|fistfuckings|fistfucks|flange|fook|fooker|fuck|fucka|fucked|fucker|fuckers|fuckhead|fuckheads|fuckin|fucking|fuckings|fuckingshitmotherfucker|fuckme|fucks|fuckwhit|fuckwit|fudge packer|fudgepacker|fuk|fuker|fukker|fukkin|fuks|fukwhit|fukwit|fux|fux0r|f_u_c_k|gangbang|gangbanged|gangbangs|gaylord|gaysex|goatse|God|god-dam|god-damned|goddamn|goddamned|hardcoresex|hell|heshe|hoar|hoare|hoer|homo|hore|horniest|horny|hotsex|jack-off|jackoff|jap|jerk-off|jism|jiz|jizm|jizz|kawk|knob|knobead|knobed|knobend|knobhead|knobjocky|knobjokey|kock|kondum|kondums|kum|kummer|kumming|kums|kunilingus|l3i\+ch|l3itch|labia|lust|lusting|m0f0|m0fo|m45terbate|ma5terb8|ma5terbate|masochist|master-bate|masterb8|masterbat*|masterbat3|masterbate|masterbation|masterbations|masturbate|mo-fo|mof0|mofo|mothafuck|mothafucka|mothafuckas|mothafuckaz|mothafucked|mothafucker|mothafuckers|mothafuckin|mothafucking|mothafuckings|mothafucks|mother fucker|motherfuck|motherfucked|motherfucker|motherfuckers|motherfuckin|motherfucking|motherfuckings|motherfuckka|motherfucks|muff|mutha|muthafecker|muthafuckker|muther|mutherfucker|n1gga|n1gger|nazi|nigg3r|nigg4h|nigga|niggah|niggas|niggaz|nigger|niggers|nob|nob jokey|nobhead|nobjocky|nobjokey|numbnuts|nutsack|orgasim|orgasims|orgasm|orgasms|p0rn|pawn|pecker|penis|penisfucker|phonesex|phuck|phuk|phuked|phuking|phukked|phukking|phuks|phuq|pigfucker|pimpis|piss|pissed|pisser|pissers|pisses|pissflaps|pissin|pissing|pissoff|poop|porn|porno|pornography|pornos|prick|pricks|pron|pube|pusse|pussi|pussies|pussy|pussys|rectum|retard|rimjaw|rimming|s hit|s.o.b.|sadist|schlong|screwing|scroat|scrote|scrotum|semen|sex|sh!\+|sh!t|sh1t|shag|shagger|shaggin|shagging|shemale|shi\+|shit|shitdick|shite|shited|shitey|shitfuck|shitfull|shithead|shiting|shitings|shits|shitted|shitter|shitters|shitting|shittings|shitty|skank|slut|sluts|smegma|smut|snatch|son-of-a-bitch|spac|spunk|s_h_i_t|t1tt1e5|t1tties|teets|teez|testical|testicle|tit|titfuck|tits|titt|tittie5|tittiefucker|titties|tittyfuck|tittywank|titwank|tosser|turd|tw4t|twat|twathead|twatty|twunt|twunter|v14gra|v1gra|vagina|viagra|vulva|w00se|wang|wank|wanker|wanky|whoar|whore|willies|willy|xrated|xxx)\b/gi; \ No newline at end of file diff --git a/node_modules/badwords-list/package.json b/node_modules/badwords-list/package.json deleted file mode 100644 index 9a44537..0000000 --- a/node_modules/badwords-list/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_from": "badwords-list@^1.0.0", - "_id": "badwords-list@1.0.0", - "_inBundle": false, - "_integrity": "sha1-XphW2/E0gqKVw7CzBK+51M/FxXk=", - "_location": "/badwords-list", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "badwords-list@^1.0.0", - "name": "badwords-list", - "escapedName": "badwords-list", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/bad-words" - ], - "_resolved": "https://registry.npmjs.org/badwords-list/-/badwords-list-1.0.0.tgz", - "_shasum": "5e9856dbf13482a295c3b0b304afb9d4cfc5c579", - "_spec": "badwords-list@^1.0.0", - "_where": "/Users/paolo/Desktop/multiplayer games/tutorials/chat3/node_modules/bad-words", - "author": { - "name": "Michael Price", - "email": "webmech@gmail.com" - }, - "bugs": { - "url": "https://github.com/web-mech/badwords-list/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A highly consumable list of bad (profanity) english words (forked from badwords)", - "devDependencies": { - "better-assert": "1.0.0", - "mocha": "1.14.0" - }, - "homepage": "https://github.com/web-mech/badwords-list#readme", - "keywords": [ - "bad", - "word", - "words", - "profanity", - "filter", - "blacklist", - "black", - "list", - "swear" - ], - "license": "MIT", - "main": "./lib/index", - "name": "badwords-list", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/web-mech/badwords-list.git" - }, - "scripts": { - "test": "mocha -R nyan" - }, - "version": "1.0.0" -} diff --git a/node_modules/badwords-list/test/exports.js b/node_modules/badwords-list/test/exports.js deleted file mode 100644 index 4830c6a..0000000 --- a/node_modules/badwords-list/test/exports.js +++ /dev/null @@ -1,18 +0,0 @@ -var assert = require('better-assert'); - -describe('filter', function(){ - it('Should contain property object', function(){ - var list = require('../lib/index'); - assert(list.hasOwnProperty('object')); - }); - - it('Should contain property array', function(){ - var list = require('../lib/index'); - assert(list.hasOwnProperty('array')); - }); - - it('Should contain property regex', function(){ - var list = require('../lib/index'); - assert(list.hasOwnProperty('regex')); - }); -}); \ No newline at end of file diff --git a/node_modules/balanced-match/.npmignore b/node_modules/balanced-match/.npmignore deleted file mode 100644 index ae5d8c3..0000000 --- a/node_modules/balanced-match/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -test -.gitignore -.travis.yml -Makefile -example.js diff --git a/node_modules/balanced-match/LICENSE.md b/node_modules/balanced-match/LICENSE.md deleted file mode 100644 index 2cdc8e4..0000000 --- a/node_modules/balanced-match/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -(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/balanced-match/README.md b/node_modules/balanced-match/README.md deleted file mode 100644 index 08e918c..0000000 --- a/node_modules/balanced-match/README.md +++ /dev/null @@ -1,91 +0,0 @@ -# balanced-match - -Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! - -[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) -[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) - -[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) - -## Example - -Get the first matching pair of braces: - -```js -var balanced = require('balanced-match'); - -console.log(balanced('{', '}', 'pre{in{nested}}post')); -console.log(balanced('{', '}', 'pre{first}between{second}post')); -console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); -``` - -The matches are: - -```bash -$ node example.js -{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } -{ start: 3, - end: 9, - pre: 'pre', - body: 'first', - post: 'between{second}post' } -{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } -``` - -## API - -### var m = balanced(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -object with those keys: - -* **start** the index of the first match of `a` -* **end** the index of the matching `b` -* **pre** the preamble, `a` and `b` not included -* **body** the match, `a` and `b` not included -* **post** the postscript, `a` and `b` not included - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. - -### var r = balanced.range(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -array with indexes: `[ , ]`. - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install balanced-match -``` - -## 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/balanced-match/index.js b/node_modules/balanced-match/index.js deleted file mode 100644 index 1685a76..0000000 --- a/node_modules/balanced-match/index.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); - - var r = range(a, b, str); - - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; -} - -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} - -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; - - if (ai >= 0 && bi > 0) { - begs = []; - left = str.length; - - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - - bi = str.indexOf(b, i + 1); - } - - i = ai < bi && ai >= 0 ? ai : bi; - } - - if (begs.length) { - result = [ left, right ]; - } - } - - return result; -} diff --git a/node_modules/balanced-match/package.json b/node_modules/balanced-match/package.json deleted file mode 100644 index 5e7e46c..0000000 --- a/node_modules/balanced-match/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_from": "balanced-match@^1.0.0", - "_id": "balanced-match@1.0.0", - "_inBundle": false, - "_integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "_location": "/balanced-match", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "balanced-match@^1.0.0", - "name": "balanced-match", - "escapedName": "balanced-match", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/brace-expansion" - ], - "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767", - "_spec": "balanced-match@^1.0.0", - "_where": "/Users/paolo/Desktop/multiplayer games/likelike-online/node_modules/brace-expansion", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/balanced-match/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Match balanced character pairs, like \"{\" and \"}\"", - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "homepage": "https://github.com/juliangruber/balanced-match", - "keywords": [ - "match", - "regexp", - "test", - "balanced", - "parse" - ], - "license": "MIT", - "main": "index.js", - "name": "balanced-match", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/balanced-match.git" - }, - "scripts": { - "bench": "make bench", - "test": "make test" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.0.0" -} diff --git a/node_modules/base64-arraybuffer/.npmignore b/node_modules/base64-arraybuffer/.npmignore deleted file mode 100644 index 332ee5a..0000000 --- a/node_modules/base64-arraybuffer/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -/node_modules/ -Gruntfile.js -/test/ diff --git a/node_modules/base64-arraybuffer/.travis.yml b/node_modules/base64-arraybuffer/.travis.yml deleted file mode 100644 index 19259a5..0000000 --- a/node_modules/base64-arraybuffer/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: node_js -node_js: -- '0.12' -- iojs-1 -- iojs-2 -- iojs-3 -- '4.1' -before_script: -- npm install -before_install: npm install -g npm@'>=2.13.5' -deploy: - provider: npm - email: niklasvh@gmail.com - api_key: - secure: oHV9ArprTj5WOk7MP1UF7QMJ70huXw+y7xXb5wF4+V2H8Hyfa5TfE0DiOmqrube1WXTeH1FLgq54shp/sJWi47Hkg/GyeoB5NnsPhYEaJkaON9UG5blML+ODiNVsEnq/1kNBQ8e0+0JItMPLGySKyFmuZ3yflulXKS8O88mfINo= - on: - tags: true - branch: master - repo: niklasvh/base64-arraybuffer diff --git a/node_modules/base64-arraybuffer/LICENSE-MIT b/node_modules/base64-arraybuffer/LICENSE-MIT deleted file mode 100644 index ed27b41..0000000 --- a/node_modules/base64-arraybuffer/LICENSE-MIT +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2012 Niklas von Hertzen - -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/base64-arraybuffer/README.md b/node_modules/base64-arraybuffer/README.md deleted file mode 100644 index 50009e4..0000000 --- a/node_modules/base64-arraybuffer/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# base64-arraybuffer - -[![Build Status](https://travis-ci.org/niklasvh/base64-arraybuffer.png)](https://travis-ci.org/niklasvh/base64-arraybuffer) -[![NPM Downloads](https://img.shields.io/npm/dm/base64-arraybuffer.svg)](https://www.npmjs.org/package/base64-arraybuffer) -[![NPM Version](https://img.shields.io/npm/v/base64-arraybuffer.svg)](https://www.npmjs.org/package/base64-arraybuffer) - -Encode/decode base64 data into ArrayBuffers - -## Getting Started -Install the module with: `npm install base64-arraybuffer` - -## API -The library encodes and decodes base64 to and from ArrayBuffers - - - __encode(buffer)__ - Encodes `ArrayBuffer` into base64 string - - __decode(str)__ - Decodes base64 string to `ArrayBuffer` - -## License -Copyright (c) 2012 Niklas von Hertzen -Licensed under the MIT license. diff --git a/node_modules/base64-arraybuffer/lib/base64-arraybuffer.js b/node_modules/base64-arraybuffer/lib/base64-arraybuffer.js deleted file mode 100644 index e6b6306..0000000 --- a/node_modules/base64-arraybuffer/lib/base64-arraybuffer.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - * base64-arraybuffer - * https://github.com/niklasvh/base64-arraybuffer - * - * Copyright (c) 2012 Niklas von Hertzen - * Licensed under the MIT license. - */ -(function(){ - "use strict"; - - var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - - // Use a lookup table to find the index. - var lookup = new Uint8Array(256); - for (var i = 0; i < chars.length; i++) { - lookup[chars.charCodeAt(i)] = i; - } - - exports.encode = function(arraybuffer) { - var bytes = new Uint8Array(arraybuffer), - i, len = bytes.length, base64 = ""; - - for (i = 0; i < len; i+=3) { - base64 += chars[bytes[i] >> 2]; - base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)]; - base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)]; - base64 += chars[bytes[i + 2] & 63]; - } - - if ((len % 3) === 2) { - base64 = base64.substring(0, base64.length - 1) + "="; - } else if (len % 3 === 1) { - base64 = base64.substring(0, base64.length - 2) + "=="; - } - - return base64; - }; - - exports.decode = function(base64) { - var bufferLength = base64.length * 0.75, - len = base64.length, i, p = 0, - encoded1, encoded2, encoded3, encoded4; - - if (base64[base64.length - 1] === "=") { - bufferLength--; - if (base64[base64.length - 2] === "=") { - bufferLength--; - } - } - - var arraybuffer = new ArrayBuffer(bufferLength), - bytes = new Uint8Array(arraybuffer); - - for (i = 0; i < len; i+=4) { - encoded1 = lookup[base64.charCodeAt(i)]; - encoded2 = lookup[base64.charCodeAt(i+1)]; - encoded3 = lookup[base64.charCodeAt(i+2)]; - encoded4 = lookup[base64.charCodeAt(i+3)]; - - bytes[p++] = (encoded1 << 2) | (encoded2 >> 4); - bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2); - bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63); - } - - return arraybuffer; - }; -})(); diff --git a/node_modules/base64-arraybuffer/package.json b/node_modules/base64-arraybuffer/package.json deleted file mode 100644 index ecb4264..0000000 --- a/node_modules/base64-arraybuffer/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "base64-arraybuffer@0.1.5", - "_id": "base64-arraybuffer@0.1.5", - "_inBundle": false, - "_integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", - "_location": "/base64-arraybuffer", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "base64-arraybuffer@0.1.5", - "name": "base64-arraybuffer", - "escapedName": "base64-arraybuffer", - "rawSpec": "0.1.5", - "saveSpec": null, - "fetchSpec": "0.1.5" - }, - "_requiredBy": [ - "/engine.io-parser", - "/socket.io-client" - ], - "_resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", - "_shasum": "73926771923b5a19747ad666aa5cd4bf9c6e9ce8", - "_spec": "base64-arraybuffer@0.1.5", - "_where": "/Users/paolo/Desktop/multiplayer games/tutorials/hellosocket/node_modules/engine.io-parser", - "author": { - "name": "Niklas von Hertzen", - "email": "niklasvh@gmail.com", - "url": "http://hertzen.com" - }, - "bugs": { - "url": "https://github.com/niklasvh/base64-arraybuffer/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Encode/decode base64 data into ArrayBuffers", - "devDependencies": { - "grunt": "^0.4.5", - "grunt-cli": "^0.1.13", - "grunt-contrib-jshint": "^0.11.2", - "grunt-contrib-nodeunit": "^0.4.1", - "grunt-contrib-watch": "^0.6.1" - }, - "engines": { - "node": ">= 0.6.0" - }, - "homepage": "https://github.com/niklasvh/base64-arraybuffer", - "keywords": [], - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/niklasvh/base64-arraybuffer/blob/master/LICENSE-MIT" - } - ], - "main": "lib/base64-arraybuffer", - "name": "base64-arraybuffer", - "repository": { - "type": "git", - "url": "git+https://github.com/niklasvh/base64-arraybuffer.git" - }, - "scripts": { - "test": "grunt nodeunit" - }, - "version": "0.1.5" -} diff --git a/node_modules/base64id/CHANGELOG.md b/node_modules/base64id/CHANGELOG.md deleted file mode 100644 index b2b8332..0000000 --- a/node_modules/base64id/CHANGELOG.md +++ /dev/null @@ -1,16 +0,0 @@ -# [2.0.0](https://github.com/faeldt/base64id/compare/1.0.0...2.0.0) (2019-05-27) - - -### Code Refactoring - -* **buffer:** replace deprecated Buffer constructor usage ([#11](https://github.com/faeldt/base64id/issues/11)) ([ccfba54](https://github.com/faeldt/base64id/commit/ccfba54)) - - -### BREAKING CHANGES - -* **buffer:** drop support for Node.js ≤ 4.4.x and 5.0.0 - 5.9.x - -See: https://nodejs.org/en/docs/guides/buffer-constructor-deprecation/ - - - diff --git a/node_modules/base64id/LICENSE b/node_modules/base64id/LICENSE deleted file mode 100644 index 0d03c83..0000000 --- a/node_modules/base64id/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2012-2016 Kristian Faeldt - -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/base64id/README.md b/node_modules/base64id/README.md deleted file mode 100644 index 17689e6..0000000 --- a/node_modules/base64id/README.md +++ /dev/null @@ -1,18 +0,0 @@ -base64id -======== - -Node.js module that generates a base64 id. - -Uses crypto.randomBytes when available, falls back to unsafe methods for node.js <= 0.4. - -To increase performance, random bytes are buffered to minimize the number of synchronous calls to crypto.randomBytes. - -## Installation - - $ npm install base64id - -## Usage - - var base64id = require('base64id'); - - var id = base64id.generateId(); diff --git a/node_modules/base64id/lib/base64id.js b/node_modules/base64id/lib/base64id.js deleted file mode 100644 index 15afe74..0000000 --- a/node_modules/base64id/lib/base64id.js +++ /dev/null @@ -1,103 +0,0 @@ -/*! - * base64id v0.1.0 - */ - -/** - * Module dependencies - */ - -var crypto = require('crypto'); - -/** - * Constructor - */ - -var Base64Id = function() { }; - -/** - * Get random bytes - * - * Uses a buffer if available, falls back to crypto.randomBytes - */ - -Base64Id.prototype.getRandomBytes = function(bytes) { - - var BUFFER_SIZE = 4096 - var self = this; - - bytes = bytes || 12; - - if (bytes > BUFFER_SIZE) { - return crypto.randomBytes(bytes); - } - - var bytesInBuffer = parseInt(BUFFER_SIZE/bytes); - var threshold = parseInt(bytesInBuffer*0.85); - - if (!threshold) { - return crypto.randomBytes(bytes); - } - - if (this.bytesBufferIndex == null) { - this.bytesBufferIndex = -1; - } - - if (this.bytesBufferIndex == bytesInBuffer) { - this.bytesBuffer = null; - this.bytesBufferIndex = -1; - } - - // No buffered bytes available or index above threshold - if (this.bytesBufferIndex == -1 || this.bytesBufferIndex > threshold) { - - if (!this.isGeneratingBytes) { - this.isGeneratingBytes = true; - crypto.randomBytes(BUFFER_SIZE, function(err, bytes) { - self.bytesBuffer = bytes; - self.bytesBufferIndex = 0; - self.isGeneratingBytes = false; - }); - } - - // Fall back to sync call when no buffered bytes are available - if (this.bytesBufferIndex == -1) { - return crypto.randomBytes(bytes); - } - } - - var result = this.bytesBuffer.slice(bytes*this.bytesBufferIndex, bytes*(this.bytesBufferIndex+1)); - this.bytesBufferIndex++; - - return result; -} - -/** - * Generates a base64 id - * - * (Original version from socket.io ) - */ - -Base64Id.prototype.generateId = function () { - var rand = Buffer.alloc(15); // multiple of 3 for base64 - if (!rand.writeInt32BE) { - return Math.abs(Math.random() * Math.random() * Date.now() | 0).toString() - + Math.abs(Math.random() * Math.random() * Date.now() | 0).toString(); - } - this.sequenceNumber = (this.sequenceNumber + 1) | 0; - rand.writeInt32BE(this.sequenceNumber, 11); - if (crypto.randomBytes) { - this.getRandomBytes(12).copy(rand); - } else { - // not secure for node 0.4 - [0, 4, 8].forEach(function(i) { - rand.writeInt32BE(Math.random() * Math.pow(2, 32) | 0, i); - }); - } - return rand.toString('base64').replace(/\//g, '_').replace(/\+/g, '-'); -}; - -/** - * Export - */ - -exports = module.exports = new Base64Id(); diff --git a/node_modules/base64id/package.json b/node_modules/base64id/package.json deleted file mode 100644 index d7295fc..0000000 --- a/node_modules/base64id/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "_from": "base64id@2.0.0", - "_id": "base64id@2.0.0", - "_inBundle": false, - "_integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", - "_location": "/base64id", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "base64id@2.0.0", - "name": "base64id", - "escapedName": "base64id", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/engine.io" - ], - "_resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", - "_shasum": "2770ac6bc47d312af97a8bf9a634342e0cd25cb6", - "_spec": "base64id@2.0.0", - "_where": "/Users/paolo/Desktop/multiplayer games/tutorials/hellosocket/node_modules/engine.io", - "author": { - "name": "Kristian Faeldt", - "email": "faeldt_kristian@cyberagent.co.jp" - }, - "bugs": { - "url": "https://github.com/faeldt/base64id/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Generates a base64 id", - "engines": { - "node": "^4.5.0 || >= 5.9" - }, - "homepage": "https://github.com/faeldt/base64id#readme", - "license": "MIT", - "main": "./lib/base64id.js", - "name": "base64id", - "repository": { - "type": "git", - "url": "git+https://github.com/faeldt/base64id.git" - }, - "version": "2.0.0" -} diff --git a/node_modules/better-assert/.npmignore b/node_modules/better-assert/.npmignore deleted file mode 100644 index f1250e5..0000000 --- a/node_modules/better-assert/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/node_modules/better-assert/History.md b/node_modules/better-assert/History.md deleted file mode 100644 index cbb579b..0000000 --- a/node_modules/better-assert/History.md +++ /dev/null @@ -1,15 +0,0 @@ - -1.0.0 / 2013-02-03 -================== - - * Stop using the removed magic __stack global getter - -0.1.0 / 2012-10-04 -================== - - * add throwing of AssertionError for test frameworks etc - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/better-assert/Makefile b/node_modules/better-assert/Makefile deleted file mode 100644 index 36a3ed7..0000000 --- a/node_modules/better-assert/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -test: - @echo "populate me" - -.PHONY: test \ No newline at end of file diff --git a/node_modules/better-assert/Readme.md b/node_modules/better-assert/Readme.md deleted file mode 100644 index d8d3a63..0000000 --- a/node_modules/better-assert/Readme.md +++ /dev/null @@ -1,61 +0,0 @@ - -# better-assert - - Better c-style assertions using [callsite](https://github.com/visionmedia/callsite) for - self-documenting failure messages. - -## Installation - - $ npm install better-assert - -## Example - - By default assertions are enabled, however the __NO_ASSERT__ environment variable - will deactivate them when truthy. - -```js -var assert = require('better-assert'); - -test(); - -function test() { - var user = { name: 'tobi' }; - assert('tobi' == user.name); - assert('number' == typeof user.age); -} - -AssertionError: 'number' == typeof user.age - at test (/Users/tj/projects/better-assert/example.js:9:3) - at Object. (/Users/tj/projects/better-assert/example.js:4:1) - at Module._compile (module.js:449:26) - at Object.Module._extensions..js (module.js:467:10) - at Module.load (module.js:356:32) - at Function.Module._load (module.js:312:12) - at Module.runMain (module.js:492:10) - at process.startup.processNextTick.process._tickCallback (node.js:244:9) -``` - -## License - -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> - -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/better-assert/example.js b/node_modules/better-assert/example.js deleted file mode 100644 index 688c29e..0000000 --- a/node_modules/better-assert/example.js +++ /dev/null @@ -1,10 +0,0 @@ - -var assert = require('./'); - -test(); - -function test() { - var user = { name: 'tobi' }; - assert('tobi' == user.name); - assert('number' == typeof user.age); -} \ No newline at end of file diff --git a/node_modules/better-assert/index.js b/node_modules/better-assert/index.js deleted file mode 100644 index fd1c9b7..0000000 --- a/node_modules/better-assert/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Module dependencies. - */ - -var AssertionError = require('assert').AssertionError - , callsite = require('callsite') - , fs = require('fs') - -/** - * Expose `assert`. - */ - -module.exports = process.env.NO_ASSERT - ? function(){} - : assert; - -/** - * Assert the given `expr`. - */ - -function assert(expr) { - if (expr) return; - - var stack = callsite(); - var call = stack[1]; - var file = call.getFileName(); - var lineno = call.getLineNumber(); - var src = fs.readFileSync(file, 'utf8'); - var line = src.split('\n')[lineno-1]; - var src = line.match(/assert\((.*)\)/)[1]; - - var err = new AssertionError({ - message: src, - stackStartFunction: stack[0].getFunction() - }); - - throw err; -} diff --git a/node_modules/better-assert/package.json b/node_modules/better-assert/package.json deleted file mode 100644 index f954e56..0000000 --- a/node_modules/better-assert/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "better-assert@~1.0.0", - "_id": "better-assert@1.0.2", - "_inBundle": false, - "_integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", - "_location": "/better-assert", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "better-assert@~1.0.0", - "name": "better-assert", - "escapedName": "better-assert", - "rawSpec": "~1.0.0", - "saveSpec": null, - "fetchSpec": "~1.0.0" - }, - "_requiredBy": [ - "/parseqs", - "/parseuri" - ], - "_resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", - "_shasum": "40866b9e1b9e0b55b481894311e68faffaebc522", - "_spec": "better-assert@~1.0.0", - "_where": "/Users/paolo/Desktop/multiplayer games/tutorials/hellosocket/node_modules/parseqs", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "bugs": { - "url": "https://github.com/visionmedia/better-assert/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "TonyHe", - "email": "coolhzb@163.com" - }, - { - "name": "ForbesLindesay" - } - ], - "dependencies": { - "callsite": "1.0.0" - }, - "deprecated": false, - "description": "Better assertions for node, reporting the expr, filename, lineno etc", - "engines": { - "node": "*" - }, - "homepage": "https://github.com/visionmedia/better-assert#readme", - "keywords": [ - "assert", - "stack", - "trace", - "debug" - ], - "main": "index", - "name": "better-assert", - "repository": { - "type": "git", - "url": "git+https://github.com/visionmedia/better-assert.git" - }, - "version": "1.0.2" -} diff --git a/node_modules/blob/.idea/blob.iml b/node_modules/blob/.idea/blob.iml deleted file mode 100644 index 24643cc..0000000 --- a/node_modules/blob/.idea/blob.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/node_modules/blob/.idea/inspectionProfiles/profiles_settings.xml b/node_modules/blob/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 0eefe32..0000000 --- a/node_modules/blob/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/node_modules/blob/.idea/markdown-navigator.xml b/node_modules/blob/.idea/markdown-navigator.xml deleted file mode 100644 index 7753d6d..0000000 --- a/node_modules/blob/.idea/markdown-navigator.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/node_modules/blob/.idea/markdown-navigator/profiles_settings.xml b/node_modules/blob/.idea/markdown-navigator/profiles_settings.xml deleted file mode 100644 index 57927c5..0000000 --- a/node_modules/blob/.idea/markdown-navigator/profiles_settings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/node_modules/blob/.idea/modules.xml b/node_modules/blob/.idea/modules.xml deleted file mode 100644 index 7905a56..0000000 --- a/node_modules/blob/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/node_modules/blob/.idea/vcs.xml b/node_modules/blob/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/node_modules/blob/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/node_modules/blob/.idea/workspace.xml b/node_modules/blob/.idea/workspace.xml deleted file mode 100644 index 31e803b..0000000 --- a/node_modules/blob/.idea/workspace.xml +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - esprima-six - - - - - - - - - - - - - - true - DEFINITION_ORDER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - \ No newline at end of file diff --git a/node_modules/yamljs/dist/yaml.debug.js b/node_modules/yamljs/dist/yaml.debug.js deleted file mode 100644 index ae7d818..0000000 --- a/node_modules/yamljs/dist/yaml.debug.js +++ /dev/null @@ -1,1905 +0,0 @@ -(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 ref; i = 0 <= ref ? ++j : --j) { - mapping[Escaper.LIST_ESCAPEES[i]] = Escaper.LIST_ESCAPED[i]; - } - return mapping; - })(); - - Escaper.PATTERN_CHARACTERS_TO_ESCAPE = new Pattern('[\\x00-\\x1f]|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9'); - - Escaper.PATTERN_MAPPING_ESCAPEES = new Pattern(Escaper.LIST_ESCAPEES.join('|').split('\\').join('\\\\')); - - Escaper.PATTERN_SINGLE_QUOTING = new Pattern('[\\s\'":{}[\\],&*#?]|^[-?|<>=!%@`]'); - - Escaper.requiresDoubleQuoting = function(value) { - return this.PATTERN_CHARACTERS_TO_ESCAPE.test(value); - }; - - Escaper.escapeWithDoubleQuotes = function(value) { - var result; - result = this.PATTERN_MAPPING_ESCAPEES.replace(value, (function(_this) { - return function(str) { - return _this.MAPPING_ESCAPEES_TO_ESCAPED[str]; - }; - })(this)); - return '"' + result + '"'; - }; - - Escaper.requiresSingleQuoting = function(value) { - return this.PATTERN_SINGLE_QUOTING.test(value); - }; - - Escaper.escapeWithSingleQuotes = function(value) { - return "'" + value.replace(/'/g, "''") + "'"; - }; - - return Escaper; - -})(); - -module.exports = Escaper; - - -},{"./Pattern":8}],3:[function(require,module,exports){ -var DumpException, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - -DumpException = (function(superClass) { - extend(DumpException, superClass); - - function DumpException(message, parsedLine, snippet) { - this.message = message; - this.parsedLine = parsedLine; - this.snippet = snippet; - } - - DumpException.prototype.toString = function() { - if ((this.parsedLine != null) && (this.snippet != null)) { - return ' ' + this.message + ' (line ' + this.parsedLine + ': \'' + this.snippet + '\')'; - } else { - return ' ' + this.message; - } - }; - - return DumpException; - -})(Error); - -module.exports = DumpException; - - -},{}],4:[function(require,module,exports){ -var ParseException, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - -ParseException = (function(superClass) { - extend(ParseException, superClass); - - function ParseException(message, parsedLine, snippet) { - this.message = message; - this.parsedLine = parsedLine; - this.snippet = snippet; - } - - ParseException.prototype.toString = function() { - if ((this.parsedLine != null) && (this.snippet != null)) { - return ' ' + this.message + ' (line ' + this.parsedLine + ': \'' + this.snippet + '\')'; - } else { - return ' ' + this.message; - } - }; - - return ParseException; - -})(Error); - -module.exports = ParseException; - - -},{}],5:[function(require,module,exports){ -var ParseMore, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - -ParseMore = (function(superClass) { - extend(ParseMore, superClass); - - function ParseMore(message, parsedLine, snippet) { - this.message = message; - this.parsedLine = parsedLine; - this.snippet = snippet; - } - - ParseMore.prototype.toString = function() { - if ((this.parsedLine != null) && (this.snippet != null)) { - return ' ' + this.message + ' (line ' + this.parsedLine + ': \'' + this.snippet + '\')'; - } else { - return ' ' + this.message; - } - }; - - return ParseMore; - -})(Error); - -module.exports = ParseMore; - - -},{}],6:[function(require,module,exports){ -var DumpException, Escaper, Inline, ParseException, ParseMore, Pattern, Unescaper, Utils, - indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - -Pattern = require('./Pattern'); - -Unescaper = require('./Unescaper'); - -Escaper = require('./Escaper'); - -Utils = require('./Utils'); - -ParseException = require('./Exception/ParseException'); - -ParseMore = require('./Exception/ParseMore'); - -DumpException = require('./Exception/DumpException'); - -Inline = (function() { - function Inline() {} - - Inline.REGEX_QUOTED_STRING = '(?:"(?:[^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'(?:[^\']*(?:\'\'[^\']*)*)\')'; - - Inline.PATTERN_TRAILING_COMMENTS = new Pattern('^\\s*#.*$'); - - Inline.PATTERN_QUOTED_SCALAR = new Pattern('^' + Inline.REGEX_QUOTED_STRING); - - Inline.PATTERN_THOUSAND_NUMERIC_SCALAR = new Pattern('^(-|\\+)?[0-9,]+(\\.[0-9]+)?$'); - - Inline.PATTERN_SCALAR_BY_DELIMITERS = {}; - - Inline.settings = {}; - - Inline.configure = function(exceptionOnInvalidType, objectDecoder) { - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = null; - } - if (objectDecoder == null) { - objectDecoder = null; - } - this.settings.exceptionOnInvalidType = exceptionOnInvalidType; - this.settings.objectDecoder = objectDecoder; - }; - - Inline.parse = function(value, exceptionOnInvalidType, objectDecoder) { - var context, result; - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = false; - } - if (objectDecoder == null) { - objectDecoder = null; - } - this.settings.exceptionOnInvalidType = exceptionOnInvalidType; - this.settings.objectDecoder = objectDecoder; - if (value == null) { - return ''; - } - value = Utils.trim(value); - if (0 === value.length) { - return ''; - } - context = { - exceptionOnInvalidType: exceptionOnInvalidType, - objectDecoder: objectDecoder, - i: 0 - }; - switch (value.charAt(0)) { - case '[': - result = this.parseSequence(value, context); - ++context.i; - break; - case '{': - result = this.parseMapping(value, context); - ++context.i; - break; - default: - result = this.parseScalar(value, null, ['"', "'"], context); - } - if (this.PATTERN_TRAILING_COMMENTS.replace(value.slice(context.i), '') !== '') { - throw new ParseException('Unexpected characters near "' + value.slice(context.i) + '".'); - } - return result; - }; - - Inline.dump = function(value, exceptionOnInvalidType, objectEncoder) { - var ref, result, type; - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = false; - } - if (objectEncoder == null) { - objectEncoder = null; - } - if (value == null) { - return 'null'; - } - type = typeof value; - if (type === 'object') { - if (value instanceof Date) { - return value.toISOString(); - } else if (objectEncoder != null) { - result = objectEncoder(value); - if (typeof result === 'string' || (result != null)) { - return result; - } - } - return this.dumpObject(value); - } - if (type === 'boolean') { - return (value ? 'true' : 'false'); - } - if (Utils.isDigits(value)) { - return (type === 'string' ? "'" + value + "'" : String(parseInt(value))); - } - if (Utils.isNumeric(value)) { - return (type === 'string' ? "'" + value + "'" : String(parseFloat(value))); - } - if (type === 'number') { - return (value === Infinity ? '.Inf' : (value === -Infinity ? '-.Inf' : (isNaN(value) ? '.NaN' : value))); - } - if (Escaper.requiresDoubleQuoting(value)) { - return Escaper.escapeWithDoubleQuotes(value); - } - if (Escaper.requiresSingleQuoting(value)) { - return Escaper.escapeWithSingleQuotes(value); - } - if ('' === value) { - return '""'; - } - if (Utils.PATTERN_DATE.test(value)) { - return "'" + value + "'"; - } - if ((ref = value.toLowerCase()) === 'null' || ref === '~' || ref === 'true' || ref === 'false') { - return "'" + value + "'"; - } - return value; - }; - - Inline.dumpObject = function(value, exceptionOnInvalidType, objectSupport) { - var j, key, len1, output, val; - if (objectSupport == null) { - objectSupport = null; - } - if (value instanceof Array) { - output = []; - for (j = 0, len1 = value.length; j < len1; j++) { - val = value[j]; - output.push(this.dump(val)); - } - return '[' + output.join(', ') + ']'; - } else { - output = []; - for (key in value) { - val = value[key]; - output.push(this.dump(key) + ': ' + this.dump(val)); - } - return '{' + output.join(', ') + '}'; - } - }; - - Inline.parseScalar = function(scalar, delimiters, stringDelimiters, context, evaluate) { - var i, joinedDelimiters, match, output, pattern, ref, ref1, strpos, tmp; - if (delimiters == null) { - delimiters = null; - } - if (stringDelimiters == null) { - stringDelimiters = ['"', "'"]; - } - if (context == null) { - context = null; - } - if (evaluate == null) { - evaluate = true; - } - if (context == null) { - context = { - exceptionOnInvalidType: this.settings.exceptionOnInvalidType, - objectDecoder: this.settings.objectDecoder, - i: 0 - }; - } - i = context.i; - if (ref = scalar.charAt(i), indexOf.call(stringDelimiters, ref) >= 0) { - output = this.parseQuotedScalar(scalar, context); - i = context.i; - if (delimiters != null) { - tmp = Utils.ltrim(scalar.slice(i), ' '); - if (!(ref1 = tmp.charAt(0), indexOf.call(delimiters, ref1) >= 0)) { - throw new ParseException('Unexpected characters (' + scalar.slice(i) + ').'); - } - } - } else { - if (!delimiters) { - output = scalar.slice(i); - i += output.length; - strpos = output.indexOf(' #'); - if (strpos !== -1) { - output = Utils.rtrim(output.slice(0, strpos)); - } - } else { - joinedDelimiters = delimiters.join('|'); - pattern = this.PATTERN_SCALAR_BY_DELIMITERS[joinedDelimiters]; - if (pattern == null) { - pattern = new Pattern('^(.+?)(' + joinedDelimiters + ')'); - this.PATTERN_SCALAR_BY_DELIMITERS[joinedDelimiters] = pattern; - } - if (match = pattern.exec(scalar.slice(i))) { - output = match[1]; - i += output.length; - } else { - throw new ParseException('Malformed inline YAML string (' + scalar + ').'); - } - } - if (evaluate) { - output = this.evaluateScalar(output, context); - } - } - context.i = i; - return output; - }; - - Inline.parseQuotedScalar = function(scalar, context) { - var i, match, output; - i = context.i; - if (!(match = this.PATTERN_QUOTED_SCALAR.exec(scalar.slice(i)))) { - throw new ParseMore('Malformed inline YAML string (' + scalar.slice(i) + ').'); - } - output = match[0].substr(1, match[0].length - 2); - if ('"' === scalar.charAt(i)) { - output = Unescaper.unescapeDoubleQuotedString(output); - } else { - output = Unescaper.unescapeSingleQuotedString(output); - } - i += match[0].length; - context.i = i; - return output; - }; - - Inline.parseSequence = function(sequence, context) { - var e, error, i, isQuoted, len, output, ref, value; - output = []; - len = sequence.length; - i = context.i; - i += 1; - while (i < len) { - context.i = i; - switch (sequence.charAt(i)) { - case '[': - output.push(this.parseSequence(sequence, context)); - i = context.i; - break; - case '{': - output.push(this.parseMapping(sequence, context)); - i = context.i; - break; - case ']': - return output; - case ',': - case ' ': - case "\n": - break; - default: - isQuoted = ((ref = sequence.charAt(i)) === '"' || ref === "'"); - value = this.parseScalar(sequence, [',', ']'], ['"', "'"], context); - i = context.i; - if (!isQuoted && typeof value === 'string' && (value.indexOf(': ') !== -1 || value.indexOf(":\n") !== -1)) { - try { - value = this.parseMapping('{' + value + '}'); - } catch (error) { - e = error; - } - } - output.push(value); - --i; - } - ++i; - } - throw new ParseMore('Malformed inline YAML string ' + sequence); - }; - - Inline.parseMapping = function(mapping, context) { - var done, i, key, len, output, shouldContinueWhileLoop, value; - output = {}; - len = mapping.length; - i = context.i; - i += 1; - shouldContinueWhileLoop = false; - while (i < len) { - context.i = i; - switch (mapping.charAt(i)) { - case ' ': - case ',': - case "\n": - ++i; - context.i = i; - shouldContinueWhileLoop = true; - break; - case '}': - return output; - } - if (shouldContinueWhileLoop) { - shouldContinueWhileLoop = false; - continue; - } - key = this.parseScalar(mapping, [':', ' ', "\n"], ['"', "'"], context, false); - i = context.i; - done = false; - while (i < len) { - context.i = i; - switch (mapping.charAt(i)) { - case '[': - value = this.parseSequence(mapping, context); - i = context.i; - if (output[key] === void 0) { - output[key] = value; - } - done = true; - break; - case '{': - value = this.parseMapping(mapping, context); - i = context.i; - if (output[key] === void 0) { - output[key] = value; - } - done = true; - break; - case ':': - case ' ': - case "\n": - break; - default: - value = this.parseScalar(mapping, [',', '}'], ['"', "'"], context); - i = context.i; - if (output[key] === void 0) { - output[key] = value; - } - done = true; - --i; - } - ++i; - if (done) { - break; - } - } - } - throw new ParseMore('Malformed inline YAML string ' + mapping); - }; - - Inline.evaluateScalar = function(scalar, context) { - var cast, date, exceptionOnInvalidType, firstChar, firstSpace, firstWord, objectDecoder, raw, scalarLower, subValue, trimmedScalar; - scalar = Utils.trim(scalar); - scalarLower = scalar.toLowerCase(); - switch (scalarLower) { - case 'null': - case '': - case '~': - return null; - case 'true': - return true; - case 'false': - return false; - case '.inf': - return Infinity; - case '.nan': - return NaN; - case '-.inf': - return Infinity; - default: - firstChar = scalarLower.charAt(0); - switch (firstChar) { - case '!': - firstSpace = scalar.indexOf(' '); - if (firstSpace === -1) { - firstWord = scalarLower; - } else { - firstWord = scalarLower.slice(0, firstSpace); - } - switch (firstWord) { - case '!': - if (firstSpace !== -1) { - return parseInt(this.parseScalar(scalar.slice(2))); - } - return null; - case '!str': - return Utils.ltrim(scalar.slice(4)); - case '!!str': - return Utils.ltrim(scalar.slice(5)); - case '!!int': - return parseInt(this.parseScalar(scalar.slice(5))); - case '!!bool': - return Utils.parseBoolean(this.parseScalar(scalar.slice(6)), false); - case '!!float': - return parseFloat(this.parseScalar(scalar.slice(7))); - case '!!timestamp': - return Utils.stringToDate(Utils.ltrim(scalar.slice(11))); - default: - if (context == null) { - context = { - exceptionOnInvalidType: this.settings.exceptionOnInvalidType, - objectDecoder: this.settings.objectDecoder, - i: 0 - }; - } - objectDecoder = context.objectDecoder, exceptionOnInvalidType = context.exceptionOnInvalidType; - if (objectDecoder) { - trimmedScalar = Utils.rtrim(scalar); - firstSpace = trimmedScalar.indexOf(' '); - if (firstSpace === -1) { - return objectDecoder(trimmedScalar, null); - } else { - subValue = Utils.ltrim(trimmedScalar.slice(firstSpace + 1)); - if (!(subValue.length > 0)) { - subValue = null; - } - return objectDecoder(trimmedScalar.slice(0, firstSpace), subValue); - } - } - if (exceptionOnInvalidType) { - throw new ParseException('Custom object support when parsing a YAML file has been disabled.'); - } - return null; - } - break; - case '0': - if ('0x' === scalar.slice(0, 2)) { - return Utils.hexDec(scalar); - } else if (Utils.isDigits(scalar)) { - return Utils.octDec(scalar); - } else if (Utils.isNumeric(scalar)) { - return parseFloat(scalar); - } else { - return scalar; - } - break; - case '+': - if (Utils.isDigits(scalar)) { - raw = scalar; - cast = parseInt(raw); - if (raw === String(cast)) { - return cast; - } else { - return raw; - } - } else if (Utils.isNumeric(scalar)) { - return parseFloat(scalar); - } else if (this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(scalar)) { - return parseFloat(scalar.replace(',', '')); - } - return scalar; - case '-': - if (Utils.isDigits(scalar.slice(1))) { - if ('0' === scalar.charAt(1)) { - return -Utils.octDec(scalar.slice(1)); - } else { - raw = scalar.slice(1); - cast = parseInt(raw); - if (raw === String(cast)) { - return -cast; - } else { - return -raw; - } - } - } else if (Utils.isNumeric(scalar)) { - return parseFloat(scalar); - } else if (this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(scalar)) { - return parseFloat(scalar.replace(',', '')); - } - return scalar; - default: - if (date = Utils.stringToDate(scalar)) { - return date; - } else if (Utils.isNumeric(scalar)) { - return parseFloat(scalar); - } else if (this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(scalar)) { - return parseFloat(scalar.replace(',', '')); - } - return scalar; - } - } - }; - - return Inline; - -})(); - -module.exports = Inline; - - -},{"./Escaper":2,"./Exception/DumpException":3,"./Exception/ParseException":4,"./Exception/ParseMore":5,"./Pattern":8,"./Unescaper":9,"./Utils":10}],7:[function(require,module,exports){ -var Inline, ParseException, ParseMore, Parser, Pattern, Utils; - -Inline = require('./Inline'); - -Pattern = require('./Pattern'); - -Utils = require('./Utils'); - -ParseException = require('./Exception/ParseException'); - -ParseMore = require('./Exception/ParseMore'); - -Parser = (function() { - Parser.prototype.PATTERN_FOLDED_SCALAR_ALL = new Pattern('^(?:(?![^\\|>]*)\\s+)?(?\\||>)(?\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(? +#.*)?$'); - - Parser.prototype.PATTERN_FOLDED_SCALAR_END = new Pattern('(?\\||>)(?\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(? +#.*)?$'); - - Parser.prototype.PATTERN_SEQUENCE_ITEM = new Pattern('^\\-((?\\s+)(?.+?))?\\s*$'); - - Parser.prototype.PATTERN_ANCHOR_VALUE = new Pattern('^&(?[^ ]+) *(?.*)'); - - Parser.prototype.PATTERN_COMPACT_NOTATION = new Pattern('^(?' + Inline.REGEX_QUOTED_STRING + '|[^ \'"\\{\\[].*?) *\\:(\\s+(?.+?))?\\s*$'); - - Parser.prototype.PATTERN_MAPPING_ITEM = new Pattern('^(?' + Inline.REGEX_QUOTED_STRING + '|[^ \'"\\[\\{].*?) *\\:(\\s+(?.+?))?\\s*$'); - - Parser.prototype.PATTERN_DECIMAL = new Pattern('\\d+'); - - Parser.prototype.PATTERN_INDENT_SPACES = new Pattern('^ +'); - - Parser.prototype.PATTERN_TRAILING_LINES = new Pattern('(\n*)$'); - - Parser.prototype.PATTERN_YAML_HEADER = new Pattern('^\\%YAML[: ][\\d\\.]+.*\n', 'm'); - - Parser.prototype.PATTERN_LEADING_COMMENTS = new Pattern('^(\\#.*?\n)+', 'm'); - - Parser.prototype.PATTERN_DOCUMENT_MARKER_START = new Pattern('^\\-\\-\\-.*?\n', 'm'); - - Parser.prototype.PATTERN_DOCUMENT_MARKER_END = new Pattern('^\\.\\.\\.\\s*$', 'm'); - - Parser.prototype.PATTERN_FOLDED_SCALAR_BY_INDENTATION = {}; - - Parser.prototype.CONTEXT_NONE = 0; - - Parser.prototype.CONTEXT_SEQUENCE = 1; - - Parser.prototype.CONTEXT_MAPPING = 2; - - function Parser(offset) { - this.offset = offset != null ? offset : 0; - this.lines = []; - this.currentLineNb = -1; - this.currentLine = ''; - this.refs = {}; - } - - Parser.prototype.parse = function(value, exceptionOnInvalidType, objectDecoder) { - var alias, allowOverwrite, block, c, context, data, e, error, error1, error2, first, i, indent, isRef, j, k, key, l, lastKey, len, len1, len2, len3, lineCount, m, matches, mergeNode, n, name, parsed, parsedItem, parser, ref, ref1, ref2, refName, refValue, val, values; - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = false; - } - if (objectDecoder == null) { - objectDecoder = null; - } - this.currentLineNb = -1; - this.currentLine = ''; - this.lines = this.cleanup(value).split("\n"); - data = null; - context = this.CONTEXT_NONE; - allowOverwrite = false; - while (this.moveToNextLine()) { - if (this.isCurrentLineEmpty()) { - continue; - } - if ("\t" === this.currentLine[0]) { - throw new ParseException('A YAML file cannot contain tabs as indentation.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - isRef = mergeNode = false; - if (values = this.PATTERN_SEQUENCE_ITEM.exec(this.currentLine)) { - if (this.CONTEXT_MAPPING === context) { - throw new ParseException('You cannot define a sequence item when in a mapping'); - } - context = this.CONTEXT_SEQUENCE; - if (data == null) { - data = []; - } - if ((values.value != null) && (matches = this.PATTERN_ANCHOR_VALUE.exec(values.value))) { - isRef = matches.ref; - values.value = matches.value; - } - if (!(values.value != null) || '' === Utils.trim(values.value, ' ') || Utils.ltrim(values.value, ' ').indexOf('#') === 0) { - if (this.currentLineNb < this.lines.length - 1 && !this.isNextLineUnIndentedCollection()) { - c = this.getRealCurrentLineNb() + 1; - parser = new Parser(c); - parser.refs = this.refs; - data.push(parser.parse(this.getNextEmbedBlock(null, true), exceptionOnInvalidType, objectDecoder)); - } else { - data.push(null); - } - } else { - if (((ref = values.leadspaces) != null ? ref.length : void 0) && (matches = this.PATTERN_COMPACT_NOTATION.exec(values.value))) { - c = this.getRealCurrentLineNb(); - parser = new Parser(c); - parser.refs = this.refs; - block = values.value; - indent = this.getCurrentLineIndentation(); - if (this.isNextLineIndented(false)) { - block += "\n" + this.getNextEmbedBlock(indent + values.leadspaces.length + 1, true); - } - data.push(parser.parse(block, exceptionOnInvalidType, objectDecoder)); - } else { - data.push(this.parseValue(values.value, exceptionOnInvalidType, objectDecoder)); - } - } - } else if ((values = this.PATTERN_MAPPING_ITEM.exec(this.currentLine)) && values.key.indexOf(' #') === -1) { - if (this.CONTEXT_SEQUENCE === context) { - throw new ParseException('You cannot define a mapping item when in a sequence'); - } - context = this.CONTEXT_MAPPING; - if (data == null) { - data = {}; - } - Inline.configure(exceptionOnInvalidType, objectDecoder); - try { - key = Inline.parseScalar(values.key); - } catch (error) { - e = error; - e.parsedLine = this.getRealCurrentLineNb() + 1; - e.snippet = this.currentLine; - throw e; - } - if ('<<' === key) { - mergeNode = true; - allowOverwrite = true; - if (((ref1 = values.value) != null ? ref1.indexOf('*') : void 0) === 0) { - refName = values.value.slice(1); - if (this.refs[refName] == null) { - throw new ParseException('Reference "' + refName + '" does not exist.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - refValue = this.refs[refName]; - if (typeof refValue !== 'object') { - throw new ParseException('YAML merge keys used with a scalar value instead of an object.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - if (refValue instanceof Array) { - for (i = j = 0, len = refValue.length; j < len; i = ++j) { - value = refValue[i]; - if (data[name = String(i)] == null) { - data[name] = value; - } - } - } else { - for (key in refValue) { - value = refValue[key]; - if (data[key] == null) { - data[key] = value; - } - } - } - } else { - if ((values.value != null) && values.value !== '') { - value = values.value; - } else { - value = this.getNextEmbedBlock(); - } - c = this.getRealCurrentLineNb() + 1; - parser = new Parser(c); - parser.refs = this.refs; - parsed = parser.parse(value, exceptionOnInvalidType); - if (typeof parsed !== 'object') { - throw new ParseException('YAML merge keys used with a scalar value instead of an object.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - if (parsed instanceof Array) { - for (l = 0, len1 = parsed.length; l < len1; l++) { - parsedItem = parsed[l]; - if (typeof parsedItem !== 'object') { - throw new ParseException('Merge items must be objects.', this.getRealCurrentLineNb() + 1, parsedItem); - } - if (parsedItem instanceof Array) { - for (i = m = 0, len2 = parsedItem.length; m < len2; i = ++m) { - value = parsedItem[i]; - k = String(i); - if (!data.hasOwnProperty(k)) { - data[k] = value; - } - } - } else { - for (key in parsedItem) { - value = parsedItem[key]; - if (!data.hasOwnProperty(key)) { - data[key] = value; - } - } - } - } - } else { - for (key in parsed) { - value = parsed[key]; - if (!data.hasOwnProperty(key)) { - data[key] = value; - } - } - } - } - } else if ((values.value != null) && (matches = this.PATTERN_ANCHOR_VALUE.exec(values.value))) { - isRef = matches.ref; - values.value = matches.value; - } - if (mergeNode) { - - } else if (!(values.value != null) || '' === Utils.trim(values.value, ' ') || Utils.ltrim(values.value, ' ').indexOf('#') === 0) { - if (!(this.isNextLineIndented()) && !(this.isNextLineUnIndentedCollection())) { - if (allowOverwrite || data[key] === void 0) { - data[key] = null; - } - } else { - c = this.getRealCurrentLineNb() + 1; - parser = new Parser(c); - parser.refs = this.refs; - val = parser.parse(this.getNextEmbedBlock(), exceptionOnInvalidType, objectDecoder); - if (allowOverwrite || data[key] === void 0) { - data[key] = val; - } - } - } else { - val = this.parseValue(values.value, exceptionOnInvalidType, objectDecoder); - if (allowOverwrite || data[key] === void 0) { - data[key] = val; - } - } - } else { - lineCount = this.lines.length; - if (1 === lineCount || (2 === lineCount && Utils.isEmpty(this.lines[1]))) { - try { - value = Inline.parse(this.lines[0], exceptionOnInvalidType, objectDecoder); - } catch (error1) { - e = error1; - e.parsedLine = this.getRealCurrentLineNb() + 1; - e.snippet = this.currentLine; - throw e; - } - if (typeof value === 'object') { - if (value instanceof Array) { - first = value[0]; - } else { - for (key in value) { - first = value[key]; - break; - } - } - if (typeof first === 'string' && first.indexOf('*') === 0) { - data = []; - for (n = 0, len3 = value.length; n < len3; n++) { - alias = value[n]; - data.push(this.refs[alias.slice(1)]); - } - value = data; - } - } - return value; - } else if ((ref2 = Utils.ltrim(value).charAt(0)) === '[' || ref2 === '{') { - try { - return Inline.parse(value, exceptionOnInvalidType, objectDecoder); - } catch (error2) { - e = error2; - e.parsedLine = this.getRealCurrentLineNb() + 1; - e.snippet = this.currentLine; - throw e; - } - } - throw new ParseException('Unable to parse.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - if (isRef) { - if (data instanceof Array) { - this.refs[isRef] = data[data.length - 1]; - } else { - lastKey = null; - for (key in data) { - lastKey = key; - } - this.refs[isRef] = data[lastKey]; - } - } - } - if (Utils.isEmpty(data)) { - return null; - } else { - return data; - } - }; - - Parser.prototype.getRealCurrentLineNb = function() { - return this.currentLineNb + this.offset; - }; - - Parser.prototype.getCurrentLineIndentation = function() { - return this.currentLine.length - Utils.ltrim(this.currentLine, ' ').length; - }; - - Parser.prototype.getNextEmbedBlock = function(indentation, includeUnindentedCollection) { - var data, indent, isItUnindentedCollection, newIndent, removeComments, removeCommentsPattern, unindentedEmbedBlock; - if (indentation == null) { - indentation = null; - } - if (includeUnindentedCollection == null) { - includeUnindentedCollection = false; - } - this.moveToNextLine(); - if (indentation == null) { - newIndent = this.getCurrentLineIndentation(); - unindentedEmbedBlock = this.isStringUnIndentedCollectionItem(this.currentLine); - if (!(this.isCurrentLineEmpty()) && 0 === newIndent && !unindentedEmbedBlock) { - throw new ParseException('Indentation problem.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - } else { - newIndent = indentation; - } - data = [this.currentLine.slice(newIndent)]; - if (!includeUnindentedCollection) { - isItUnindentedCollection = this.isStringUnIndentedCollectionItem(this.currentLine); - } - removeCommentsPattern = this.PATTERN_FOLDED_SCALAR_END; - removeComments = !removeCommentsPattern.test(this.currentLine); - while (this.moveToNextLine()) { - indent = this.getCurrentLineIndentation(); - if (indent === newIndent) { - removeComments = !removeCommentsPattern.test(this.currentLine); - } - if (removeComments && this.isCurrentLineComment()) { - continue; - } - if (this.isCurrentLineBlank()) { - data.push(this.currentLine.slice(newIndent)); - continue; - } - if (isItUnindentedCollection && !this.isStringUnIndentedCollectionItem(this.currentLine) && indent === newIndent) { - this.moveToPreviousLine(); - break; - } - if (indent >= newIndent) { - data.push(this.currentLine.slice(newIndent)); - } else if (Utils.ltrim(this.currentLine).charAt(0) === '#') { - - } else if (0 === indent) { - this.moveToPreviousLine(); - break; - } else { - throw new ParseException('Indentation problem.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - } - return data.join("\n"); - }; - - Parser.prototype.moveToNextLine = function() { - if (this.currentLineNb >= this.lines.length - 1) { - return false; - } - this.currentLine = this.lines[++this.currentLineNb]; - return true; - }; - - Parser.prototype.moveToPreviousLine = function() { - this.currentLine = this.lines[--this.currentLineNb]; - }; - - Parser.prototype.parseValue = function(value, exceptionOnInvalidType, objectDecoder) { - var e, error, foldedIndent, matches, modifiers, pos, ref, ref1, val; - if (0 === value.indexOf('*')) { - pos = value.indexOf('#'); - if (pos !== -1) { - value = value.substr(1, pos - 2); - } else { - value = value.slice(1); - } - if (this.refs[value] === void 0) { - throw new ParseException('Reference "' + value + '" does not exist.', this.currentLine); - } - return this.refs[value]; - } - if (matches = this.PATTERN_FOLDED_SCALAR_ALL.exec(value)) { - modifiers = (ref = matches.modifiers) != null ? ref : ''; - foldedIndent = Math.abs(parseInt(modifiers)); - if (isNaN(foldedIndent)) { - foldedIndent = 0; - } - val = this.parseFoldedScalar(matches.separator, this.PATTERN_DECIMAL.replace(modifiers, ''), foldedIndent); - if (matches.type != null) { - Inline.configure(exceptionOnInvalidType, objectDecoder); - return Inline.parseScalar(matches.type + ' ' + val); - } else { - return val; - } - } - if ((ref1 = value.charAt(0)) === '[' || ref1 === '{' || ref1 === '"' || ref1 === "'") { - while (true) { - try { - return Inline.parse(value, exceptionOnInvalidType, objectDecoder); - } catch (error) { - e = error; - if (e instanceof ParseMore && this.moveToNextLine()) { - value += "\n" + Utils.trim(this.currentLine, ' '); - } else { - e.parsedLine = this.getRealCurrentLineNb() + 1; - e.snippet = this.currentLine; - throw e; - } - } - } - } else { - if (this.isNextLineIndented()) { - value += "\n" + this.getNextEmbedBlock(); - } - return Inline.parse(value, exceptionOnInvalidType, objectDecoder); - } - }; - - Parser.prototype.parseFoldedScalar = function(separator, indicator, indentation) { - var isCurrentLineBlank, j, len, line, matches, newText, notEOF, pattern, ref, text; - if (indicator == null) { - indicator = ''; - } - if (indentation == null) { - indentation = 0; - } - notEOF = this.moveToNextLine(); - if (!notEOF) { - return ''; - } - isCurrentLineBlank = this.isCurrentLineBlank(); - text = ''; - while (notEOF && isCurrentLineBlank) { - if (notEOF = this.moveToNextLine()) { - text += "\n"; - isCurrentLineBlank = this.isCurrentLineBlank(); - } - } - if (0 === indentation) { - if (matches = this.PATTERN_INDENT_SPACES.exec(this.currentLine)) { - indentation = matches[0].length; - } - } - if (indentation > 0) { - pattern = this.PATTERN_FOLDED_SCALAR_BY_INDENTATION[indentation]; - if (pattern == null) { - pattern = new Pattern('^ {' + indentation + '}(.*)$'); - Parser.prototype.PATTERN_FOLDED_SCALAR_BY_INDENTATION[indentation] = pattern; - } - while (notEOF && (isCurrentLineBlank || (matches = pattern.exec(this.currentLine)))) { - if (isCurrentLineBlank) { - text += this.currentLine.slice(indentation); - } else { - text += matches[1]; - } - if (notEOF = this.moveToNextLine()) { - text += "\n"; - isCurrentLineBlank = this.isCurrentLineBlank(); - } - } - } else if (notEOF) { - text += "\n"; - } - if (notEOF) { - this.moveToPreviousLine(); - } - if ('>' === separator) { - newText = ''; - ref = text.split("\n"); - for (j = 0, len = ref.length; j < len; j++) { - line = ref[j]; - if (line.length === 0 || line.charAt(0) === ' ') { - newText = Utils.rtrim(newText, ' ') + line + "\n"; - } else { - newText += line + ' '; - } - } - text = newText; - } - if ('+' !== indicator) { - text = Utils.rtrim(text); - } - if ('' === indicator) { - text = this.PATTERN_TRAILING_LINES.replace(text, "\n"); - } else if ('-' === indicator) { - text = this.PATTERN_TRAILING_LINES.replace(text, ''); - } - return text; - }; - - Parser.prototype.isNextLineIndented = function(ignoreComments) { - var EOF, currentIndentation, ret; - if (ignoreComments == null) { - ignoreComments = true; - } - currentIndentation = this.getCurrentLineIndentation(); - EOF = !this.moveToNextLine(); - if (ignoreComments) { - while (!EOF && this.isCurrentLineEmpty()) { - EOF = !this.moveToNextLine(); - } - } else { - while (!EOF && this.isCurrentLineBlank()) { - EOF = !this.moveToNextLine(); - } - } - if (EOF) { - return false; - } - ret = false; - if (this.getCurrentLineIndentation() > currentIndentation) { - ret = true; - } - this.moveToPreviousLine(); - return ret; - }; - - Parser.prototype.isCurrentLineEmpty = function() { - var trimmedLine; - trimmedLine = Utils.trim(this.currentLine, ' '); - return trimmedLine.length === 0 || trimmedLine.charAt(0) === '#'; - }; - - Parser.prototype.isCurrentLineBlank = function() { - return '' === Utils.trim(this.currentLine, ' '); - }; - - Parser.prototype.isCurrentLineComment = function() { - var ltrimmedLine; - ltrimmedLine = Utils.ltrim(this.currentLine, ' '); - return ltrimmedLine.charAt(0) === '#'; - }; - - Parser.prototype.cleanup = function(value) { - var count, i, indent, j, l, len, len1, line, lines, ref, ref1, ref2, smallestIndent, trimmedValue; - if (value.indexOf("\r") !== -1) { - value = value.split("\r\n").join("\n").split("\r").join("\n"); - } - count = 0; - ref = this.PATTERN_YAML_HEADER.replaceAll(value, ''), value = ref[0], count = ref[1]; - this.offset += count; - ref1 = this.PATTERN_LEADING_COMMENTS.replaceAll(value, '', 1), trimmedValue = ref1[0], count = ref1[1]; - if (count === 1) { - this.offset += Utils.subStrCount(value, "\n") - Utils.subStrCount(trimmedValue, "\n"); - value = trimmedValue; - } - ref2 = this.PATTERN_DOCUMENT_MARKER_START.replaceAll(value, '', 1), trimmedValue = ref2[0], count = ref2[1]; - if (count === 1) { - this.offset += Utils.subStrCount(value, "\n") - Utils.subStrCount(trimmedValue, "\n"); - value = trimmedValue; - value = this.PATTERN_DOCUMENT_MARKER_END.replace(value, ''); - } - lines = value.split("\n"); - smallestIndent = -1; - for (j = 0, len = lines.length; j < len; j++) { - line = lines[j]; - if (Utils.trim(line, ' ').length === 0) { - continue; - } - indent = line.length - Utils.ltrim(line).length; - if (smallestIndent === -1 || indent < smallestIndent) { - smallestIndent = indent; - } - } - if (smallestIndent > 0) { - for (i = l = 0, len1 = lines.length; l < len1; i = ++l) { - line = lines[i]; - lines[i] = line.slice(smallestIndent); - } - value = lines.join("\n"); - } - return value; - }; - - Parser.prototype.isNextLineUnIndentedCollection = function(currentIndentation) { - var notEOF, ret; - if (currentIndentation == null) { - currentIndentation = null; - } - if (currentIndentation == null) { - currentIndentation = this.getCurrentLineIndentation(); - } - notEOF = this.moveToNextLine(); - while (notEOF && this.isCurrentLineEmpty()) { - notEOF = this.moveToNextLine(); - } - if (false === notEOF) { - return false; - } - ret = false; - if (this.getCurrentLineIndentation() === currentIndentation && this.isStringUnIndentedCollectionItem(this.currentLine)) { - ret = true; - } - this.moveToPreviousLine(); - return ret; - }; - - Parser.prototype.isStringUnIndentedCollectionItem = function() { - return this.currentLine === '-' || this.currentLine.slice(0, 2) === '- '; - }; - - return Parser; - -})(); - -module.exports = Parser; - - -},{"./Exception/ParseException":4,"./Exception/ParseMore":5,"./Inline":6,"./Pattern":8,"./Utils":10}],8:[function(require,module,exports){ -var Pattern; - -Pattern = (function() { - Pattern.prototype.regex = null; - - Pattern.prototype.rawRegex = null; - - Pattern.prototype.cleanedRegex = null; - - Pattern.prototype.mapping = null; - - function Pattern(rawRegex, modifiers) { - var _char, capturingBracketNumber, cleanedRegex, i, len, mapping, name, part, subChar; - if (modifiers == null) { - modifiers = ''; - } - cleanedRegex = ''; - len = rawRegex.length; - mapping = null; - capturingBracketNumber = 0; - i = 0; - while (i < len) { - _char = rawRegex.charAt(i); - if (_char === '\\') { - cleanedRegex += rawRegex.slice(i, +(i + 1) + 1 || 9e9); - i++; - } else if (_char === '(') { - if (i < len - 2) { - part = rawRegex.slice(i, +(i + 2) + 1 || 9e9); - if (part === '(?:') { - i += 2; - cleanedRegex += part; - } else if (part === '(?<') { - capturingBracketNumber++; - i += 2; - name = ''; - while (i + 1 < len) { - subChar = rawRegex.charAt(i + 1); - if (subChar === '>') { - cleanedRegex += '('; - i++; - if (name.length > 0) { - if (mapping == null) { - mapping = {}; - } - mapping[name] = capturingBracketNumber; - } - break; - } else { - name += subChar; - } - i++; - } - } else { - cleanedRegex += _char; - capturingBracketNumber++; - } - } else { - cleanedRegex += _char; - } - } else { - cleanedRegex += _char; - } - i++; - } - this.rawRegex = rawRegex; - this.cleanedRegex = cleanedRegex; - this.regex = new RegExp(this.cleanedRegex, 'g' + modifiers.replace('g', '')); - this.mapping = mapping; - } - - Pattern.prototype.exec = function(str) { - var index, matches, name, ref; - this.regex.lastIndex = 0; - matches = this.regex.exec(str); - if (matches == null) { - return null; - } - if (this.mapping != null) { - ref = this.mapping; - for (name in ref) { - index = ref[name]; - matches[name] = matches[index]; - } - } - return matches; - }; - - Pattern.prototype.test = function(str) { - this.regex.lastIndex = 0; - return this.regex.test(str); - }; - - Pattern.prototype.replace = function(str, replacement) { - this.regex.lastIndex = 0; - return str.replace(this.regex, replacement); - }; - - Pattern.prototype.replaceAll = function(str, replacement, limit) { - var count; - if (limit == null) { - limit = 0; - } - this.regex.lastIndex = 0; - count = 0; - while (this.regex.test(str) && (limit === 0 || count < limit)) { - this.regex.lastIndex = 0; - str = str.replace(this.regex, replacement); - count++; - } - return [str, count]; - }; - - return Pattern; - -})(); - -module.exports = Pattern; - - -},{}],9:[function(require,module,exports){ -var Pattern, Unescaper, Utils; - -Utils = require('./Utils'); - -Pattern = require('./Pattern'); - -Unescaper = (function() { - function Unescaper() {} - - Unescaper.PATTERN_ESCAPED_CHARACTER = new Pattern('\\\\([0abt\tnvfre "\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})'); - - Unescaper.unescapeSingleQuotedString = function(value) { - return value.replace(/\'\'/g, '\''); - }; - - Unescaper.unescapeDoubleQuotedString = function(value) { - if (this._unescapeCallback == null) { - this._unescapeCallback = (function(_this) { - return function(str) { - return _this.unescapeCharacter(str); - }; - })(this); - } - return this.PATTERN_ESCAPED_CHARACTER.replace(value, this._unescapeCallback); - }; - - Unescaper.unescapeCharacter = function(value) { - var ch; - ch = String.fromCharCode; - switch (value.charAt(1)) { - case '0': - return ch(0); - case 'a': - return ch(7); - case 'b': - return ch(8); - case 't': - return "\t"; - case "\t": - return "\t"; - case 'n': - return "\n"; - case 'v': - return ch(11); - case 'f': - return ch(12); - case 'r': - return ch(13); - case 'e': - return ch(27); - case ' ': - return ' '; - case '"': - return '"'; - case '/': - return '/'; - case '\\': - return '\\'; - case 'N': - return ch(0x0085); - case '_': - return ch(0x00A0); - case 'L': - return ch(0x2028); - case 'P': - return ch(0x2029); - case 'x': - return Utils.utf8chr(Utils.hexDec(value.substr(2, 2))); - case 'u': - return Utils.utf8chr(Utils.hexDec(value.substr(2, 4))); - case 'U': - return Utils.utf8chr(Utils.hexDec(value.substr(2, 8))); - default: - return ''; - } - }; - - return Unescaper; - -})(); - -module.exports = Unescaper; - - -},{"./Pattern":8,"./Utils":10}],10:[function(require,module,exports){ -var Pattern, Utils, - hasProp = {}.hasOwnProperty; - -Pattern = require('./Pattern'); - -Utils = (function() { - function Utils() {} - - Utils.REGEX_LEFT_TRIM_BY_CHAR = {}; - - Utils.REGEX_RIGHT_TRIM_BY_CHAR = {}; - - Utils.REGEX_SPACES = /\s+/g; - - Utils.REGEX_DIGITS = /^\d+$/; - - Utils.REGEX_OCTAL = /[^0-7]/gi; - - Utils.REGEX_HEXADECIMAL = /[^a-f0-9]/gi; - - Utils.PATTERN_DATE = new Pattern('^' + '(?[0-9][0-9][0-9][0-9])' + '-(?[0-9][0-9]?)' + '-(?[0-9][0-9]?)' + '(?:(?:[Tt]|[ \t]+)' + '(?[0-9][0-9]?)' + ':(?[0-9][0-9])' + ':(?[0-9][0-9])' + '(?:\.(?[0-9]*))?' + '(?:[ \t]*(?Z|(?[-+])(?[0-9][0-9]?)' + '(?::(?[0-9][0-9]))?))?)?' + '$', 'i'); - - Utils.LOCAL_TIMEZONE_OFFSET = new Date().getTimezoneOffset() * 60 * 1000; - - Utils.trim = function(str, _char) { - var regexLeft, regexRight; - if (_char == null) { - _char = '\\s'; - } - regexLeft = this.REGEX_LEFT_TRIM_BY_CHAR[_char]; - if (regexLeft == null) { - this.REGEX_LEFT_TRIM_BY_CHAR[_char] = regexLeft = new RegExp('^' + _char + '' + _char + '*'); - } - regexLeft.lastIndex = 0; - regexRight = this.REGEX_RIGHT_TRIM_BY_CHAR[_char]; - if (regexRight == null) { - this.REGEX_RIGHT_TRIM_BY_CHAR[_char] = regexRight = new RegExp(_char + '' + _char + '*$'); - } - regexRight.lastIndex = 0; - return str.replace(regexLeft, '').replace(regexRight, ''); - }; - - Utils.ltrim = function(str, _char) { - var regexLeft; - if (_char == null) { - _char = '\\s'; - } - regexLeft = this.REGEX_LEFT_TRIM_BY_CHAR[_char]; - if (regexLeft == null) { - this.REGEX_LEFT_TRIM_BY_CHAR[_char] = regexLeft = new RegExp('^' + _char + '' + _char + '*'); - } - regexLeft.lastIndex = 0; - return str.replace(regexLeft, ''); - }; - - Utils.rtrim = function(str, _char) { - var regexRight; - if (_char == null) { - _char = '\\s'; - } - regexRight = this.REGEX_RIGHT_TRIM_BY_CHAR[_char]; - if (regexRight == null) { - this.REGEX_RIGHT_TRIM_BY_CHAR[_char] = regexRight = new RegExp(_char + '' + _char + '*$'); - } - regexRight.lastIndex = 0; - return str.replace(regexRight, ''); - }; - - Utils.isEmpty = function(value) { - return !value || value === '' || value === '0' || (value instanceof Array && value.length === 0) || this.isEmptyObject(value); - }; - - Utils.isEmptyObject = function(value) { - var k; - return value instanceof Object && ((function() { - var results; - results = []; - for (k in value) { - if (!hasProp.call(value, k)) continue; - results.push(k); - } - return results; - })()).length === 0; - }; - - Utils.subStrCount = function(string, subString, start, length) { - var c, i, j, len, ref, sublen; - c = 0; - string = '' + string; - subString = '' + subString; - if (start != null) { - string = string.slice(start); - } - if (length != null) { - string = string.slice(0, length); - } - len = string.length; - sublen = subString.length; - for (i = j = 0, ref = len; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) { - if (subString === string.slice(i, sublen)) { - c++; - i += sublen - 1; - } - } - return c; - }; - - Utils.isDigits = function(input) { - this.REGEX_DIGITS.lastIndex = 0; - return this.REGEX_DIGITS.test(input); - }; - - Utils.octDec = function(input) { - this.REGEX_OCTAL.lastIndex = 0; - return parseInt((input + '').replace(this.REGEX_OCTAL, ''), 8); - }; - - Utils.hexDec = function(input) { - this.REGEX_HEXADECIMAL.lastIndex = 0; - input = this.trim(input); - if ((input + '').slice(0, 2) === '0x') { - input = (input + '').slice(2); - } - return parseInt((input + '').replace(this.REGEX_HEXADECIMAL, ''), 16); - }; - - Utils.utf8chr = function(c) { - var ch; - ch = String.fromCharCode; - if (0x80 > (c %= 0x200000)) { - return ch(c); - } - if (0x800 > c) { - return ch(0xC0 | c >> 6) + ch(0x80 | c & 0x3F); - } - if (0x10000 > c) { - return ch(0xE0 | c >> 12) + ch(0x80 | c >> 6 & 0x3F) + ch(0x80 | c & 0x3F); - } - return ch(0xF0 | c >> 18) + ch(0x80 | c >> 12 & 0x3F) + ch(0x80 | c >> 6 & 0x3F) + ch(0x80 | c & 0x3F); - }; - - Utils.parseBoolean = function(input, strict) { - var lowerInput; - if (strict == null) { - strict = true; - } - if (typeof input === 'string') { - lowerInput = input.toLowerCase(); - if (!strict) { - if (lowerInput === 'no') { - return false; - } - } - if (lowerInput === '0') { - return false; - } - if (lowerInput === 'false') { - return false; - } - if (lowerInput === '') { - return false; - } - return true; - } - return !!input; - }; - - Utils.isNumeric = function(input) { - this.REGEX_SPACES.lastIndex = 0; - return typeof input === 'number' || typeof input === 'string' && !isNaN(input) && input.replace(this.REGEX_SPACES, '') !== ''; - }; - - Utils.stringToDate = function(str) { - var date, day, fraction, hour, info, minute, month, second, tz_hour, tz_minute, tz_offset, year; - if (!(str != null ? str.length : void 0)) { - return null; - } - info = this.PATTERN_DATE.exec(str); - if (!info) { - return null; - } - year = parseInt(info.year, 10); - month = parseInt(info.month, 10) - 1; - day = parseInt(info.day, 10); - if (info.hour == null) { - date = new Date(Date.UTC(year, month, day)); - return date; - } - hour = parseInt(info.hour, 10); - minute = parseInt(info.minute, 10); - second = parseInt(info.second, 10); - if (info.fraction != null) { - fraction = info.fraction.slice(0, 3); - while (fraction.length < 3) { - fraction += '0'; - } - fraction = parseInt(fraction, 10); - } else { - fraction = 0; - } - if (info.tz != null) { - tz_hour = parseInt(info.tz_hour, 10); - if (info.tz_minute != null) { - tz_minute = parseInt(info.tz_minute, 10); - } else { - tz_minute = 0; - } - tz_offset = (tz_hour * 60 + tz_minute) * 60000; - if ('-' === info.tz_sign) { - tz_offset *= -1; - } - } - date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - if (tz_offset) { - date.setTime(date.getTime() - tz_offset); - } - return date; - }; - - Utils.strRepeat = function(str, number) { - var i, res; - res = ''; - i = 0; - while (i < number) { - res += str; - i++; - } - return res; - }; - - Utils.getStringFromFile = function(path, callback) { - var data, fs, j, len1, name, ref, req, xhr; - if (callback == null) { - callback = null; - } - xhr = null; - if (typeof window !== "undefined" && window !== null) { - if (window.XMLHttpRequest) { - xhr = new XMLHttpRequest(); - } else if (window.ActiveXObject) { - ref = ["Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.3.0", "Msxml2.XMLHTTP", "Microsoft.XMLHTTP"]; - for (j = 0, len1 = ref.length; j < len1; j++) { - name = ref[j]; - try { - xhr = new ActiveXObject(name); - } catch (undefined) {} - } - } - } - if (xhr != null) { - if (callback != null) { - xhr.onreadystatechange = function() { - if (xhr.readyState === 4) { - if (xhr.status === 200 || xhr.status === 0) { - return callback(xhr.responseText); - } else { - return callback(null); - } - } - }; - xhr.open('GET', path, true); - return xhr.send(null); - } else { - xhr.open('GET', path, false); - xhr.send(null); - if (xhr.status === 200 || xhr.status === 0) { - return xhr.responseText; - } - return null; - } - } else { - req = require; - fs = req('fs'); - if (callback != null) { - return fs.readFile(path, function(err, data) { - if (err) { - return callback(null); - } else { - return callback(String(data)); - } - }); - } else { - data = fs.readFileSync(path); - if (data != null) { - return String(data); - } - return null; - } - } - }; - - return Utils; - -})(); - -module.exports = Utils; - - -},{"./Pattern":8}],11:[function(require,module,exports){ -var Dumper, Parser, Utils, Yaml; - -Parser = require('./Parser'); - -Dumper = require('./Dumper'); - -Utils = require('./Utils'); - -Yaml = (function() { - function Yaml() {} - - Yaml.parse = function(input, exceptionOnInvalidType, objectDecoder) { - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = false; - } - if (objectDecoder == null) { - objectDecoder = null; - } - return new Parser().parse(input, exceptionOnInvalidType, objectDecoder); - }; - - Yaml.parseFile = function(path, callback, exceptionOnInvalidType, objectDecoder) { - var input; - if (callback == null) { - callback = null; - } - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = false; - } - if (objectDecoder == null) { - objectDecoder = null; - } - if (callback != null) { - return Utils.getStringFromFile(path, (function(_this) { - return function(input) { - var result; - result = null; - if (input != null) { - result = _this.parse(input, exceptionOnInvalidType, objectDecoder); - } - callback(result); - }; - })(this)); - } else { - input = Utils.getStringFromFile(path); - if (input != null) { - return this.parse(input, exceptionOnInvalidType, objectDecoder); - } - return null; - } - }; - - Yaml.dump = function(input, inline, indent, exceptionOnInvalidType, objectEncoder) { - var yaml; - if (inline == null) { - inline = 2; - } - if (indent == null) { - indent = 4; - } - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = false; - } - if (objectEncoder == null) { - objectEncoder = null; - } - yaml = new Dumper(); - yaml.indentation = indent; - return yaml.dump(input, inline, 0, exceptionOnInvalidType, objectEncoder); - }; - - Yaml.register = function() { - var require_handler; - require_handler = function(module, filename) { - return module.exports = YAML.parseFile(filename); - }; - if ((typeof require !== "undefined" && require !== null ? require.extensions : void 0) != null) { - require.extensions['.yml'] = require_handler; - return require.extensions['.yaml'] = require_handler; - } - }; - - Yaml.stringify = function(input, inline, indent, exceptionOnInvalidType, objectEncoder) { - return this.dump(input, inline, indent, exceptionOnInvalidType, objectEncoder); - }; - - Yaml.load = function(path, callback, exceptionOnInvalidType, objectDecoder) { - return this.parseFile(path, callback, exceptionOnInvalidType, objectDecoder); - }; - - return Yaml; - -})(); - -if (typeof window !== "undefined" && window !== null) { - window.YAML = Yaml; -} - -if (typeof window === "undefined" || window === null) { - this.YAML = Yaml; -} - -module.exports = Yaml; - - -},{"./Dumper":1,"./Parser":7,"./Utils":10}]},{},[11]) -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Vzci9sb2NhbC9saWIvbm9kZV9tb2R1bGVzL2Jyb3dzZXJpZnkvbm9kZV9tb2R1bGVzL2Jyb3dzZXItcGFjay9fcHJlbHVkZS5qcyIsInNyYy9EdW1wZXIuY29mZmVlIiwic3JjL0VzY2FwZXIuY29mZmVlIiwic3JjL0V4Y2VwdGlvbi9EdW1wRXhjZXB0aW9uLmNvZmZlZSIsInNyYy9FeGNlcHRpb24vUGFyc2VFeGNlcHRpb24uY29mZmVlIiwic3JjL0V4Y2VwdGlvbi9QYXJzZU1vcmUuY29mZmVlIiwic3JjL0lubGluZS5jb2ZmZWUiLCJzcmMvUGFyc2VyLmNvZmZlZSIsInNyYy9QYXR0ZXJuLmNvZmZlZSIsInNyYy9VbmVzY2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gICAgIG91dHB1dCArPVxuICAgICAgICAgICAgICAgICAgICAgICAgcHJlZml4ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICctJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAoaWYgd2lsbEJlSW5saW5lZCB0aGVuICcgJyBlbHNlIFwiXFxuXCIpICtcbiAgICAgICAgICAgICAgICAgICAgICAgIEBkdW1wKHZhbHVlLCBpbmxpbmUgLSAxLCAoaWYgd2lsbEJlSW5saW5lZCB0aGVuIDAgZWxzZSBpbmRlbnQgKyBAaW5kZW50YXRpb24pLCBleGNlcHRpb25PbkludmFsaWRUeXBlLCBvYmplY3RFbmNvZGVyKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAoaWYgd2lsbEJlSW5saW5lZCB0aGVuIFwiXFxuXCIgZWxzZSAnJylcblxuICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgIGZvciBrZXksIHZhbHVlIG9mIGlucHV0XG4gICAgICAgICAgICAgICAgICAgIHdpbGxCZUlubGluZWQgPSAoaW5saW5lIC0gMSA8PSAwIG9yIHR5cGVvZih2YWx1ZSkgaXNudCAnb2JqZWN0JyBvciBVdGlscy5pc0VtcHR5KHZhbHVlKSlcblxuICAgICAgICAgICAgICAgICAgICBvdXRwdXQgKz1cbiAgICAgICAgICAgICAgICAgICAgICAgIHByZWZpeCArXG4gICAgICAgICAgICAgICAgICAgICAgICBJbmxpbmUuZHVtcChrZXksIGV4Y2VwdGlvbk9uSW52YWxpZFR5cGUsIG9iamVjdEVuY29kZXIpICsgJzonICtcbiAgICAgICAgICAgICAgICAgICAgICAgIChpZiB3aWxsQmVJbmxpbmVkIHRoZW4gJyAnIGVsc2UgXCJcXG5cIikgK1xuICAgICAgICAgICAgICAgICAgICAgICAgQGR1bXAodmFsdWUsIGlubGluZSAtIDEsIChpZiB3aWxsQmVJbmxpbmVkIHRoZW4gMCBlbHNlIGluZGVudCArIEBpbmRlbnRhdGlvbiksIGV4Y2VwdGlvbk9uSW52YWxp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NjcmlwdCByZXNvdXJjZSBvciBvYmplY3QpLCBmYWxzZSBvdGhlcndpc2VcbiAgICAjIEBwYXJhbSBbRnVuY3Rpb25dIG9iamVjdEVuY29kZXIgICAgICAgICAgIEEgZnVuY3Rpb24gdG8gc2VyaWFsaXplIGN1c3RvbSBvYmplY3RzLCBudWxsIG90aGVyd2lzZVxuICAgICNcbiAgICAjIEByZXR1cm4gW1N0cmluZ10gIFRoZSBZQU1MIHN0cmluZyByZXByZXNlbnRpbmcgdGhlIEphdmFTY3JpcHQgb2JqZWN0XG4gICAgI1xuICAgICMgQHRocm93IFtEdW1wRXhjZXB0aW9uXVxuICAgICNcbiAgICBAZHVtcDogKHZhbHVlLCBleGNlcHRpb25PbkludmFsaWRUeXBlID0gZmFsc2UsIG9iamVjdEVuY29kZXIgPSBudWxsKSAtPlxuICAgICAgICBpZiBub3QgdmFsdWU/XG4gICAgICAgICAgICByZXR1cm4gJ251bGwnXG4gICAgICAgIHR5cGUgPSB0eXBlb2YgdmFsdWVcbiAgICAgICAgaWYgdHlwZSBpcyAnb2JqZWN0J1xuICAgICAgICAgICAgaWYgdmFsdWUgaW5zdGFuY2VvZiBEYXRlXG4gICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlLnRvSVNPU3RyaW5nKClcbiAgICAgICAgICAgIGVsc2UgaWYgb2JqZWN0RW5jb2Rlcj9cbiAgICAgICAgICAgICAgICByZXN1bHQgPSBvYmplY3RFbmNvZGVyIHZhbHVlXG4gICAgICAgICAgICAgICAgaWYgdHlwZW9mIHJlc3VsdCBpcyAnc3RyaW5nJyBvciByZXN1bHQ/XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHRcbiAgICAgICAgICAgIHJldHVybiBAZHVtcE9iamVjdCB2YWx1ZVxuICAgICAgICBpZiB0eXBlIGlzICdib29sZWFuJ1xuICAgICAgICAgICAgcmV0dXJuIChpZiB2YWx1ZSB0aGVuICd0cnVlJyBlbHNlICdmYWxzZScpXG4gICAgICAgI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B7aX0gPSBjb250ZXh0XG5cbiAgICAgICAgaWYgc2NhbGFyLmNoYXJBdChpKSBpbiBzdHJpbmdEZWxpbWl0ZXJzXG4gICAgICAgICAgICAjIFF1b3RlZCBzY2FsYXJcbiAgICAgICAgICAgIG91dHB1dCA9IEBwYXJzZVF1b3RlZFNjYWxhciBzY2FsYXIsIGNvbnRleHRcbiAgICAgICAgICAgIHtpfSA9IGNvbnRleHRcblxuICAgICAgICAgICAgaWYgZGVsaW1pdGVycz9cbiAgICAgICAgICAgICAgICB0bXAgPSBVdGlscy5sdHJpbSBzY2FsYXJbaS4uXSwgJyAnXG4gICAgICAgICAgICAgICAgaWYgbm90KHRtcC5jaGFyQXQoMCkgaW4gZGVsaW1pdGVycylcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IFBhcnNlRXhjZXB0aW9uICdVbmV4cGVjdGVkIGNoYXJhY3RlcnMgKCcrc2NhbGFyW2kuLl0rJykuJ1xuXG4gICAgICAgIGVsc2VcbiAgICAgICAgICAgICMgXCJub3JtYWxcIiBzdHJpbmdcbiAgICAgICAgICAgIGlmIG5vdCBkZWxpbWl0ZXJzXG4gICAgICAgICAgICAgICAgb3V0cHV0ID0gc2NhbGFyW2kuLl1cbiAgICAgICAgICAgICAgICBpICs9IG91dHB1dC5sZW5ndGhcblxuICAgICAgICAgICAgICAgICMgUmVtb3ZlIGNvbW1lbnRzXG4gICAgICAgICAgICAgICAgc3RycG9zID0gb3V0cHV0LmluZGV4T2YgJyAjJ1xuICAgICAgICAgICAgICAgIGlmIHN0cnBvcyBpc250IC0xXG4gICAgICAgICAgICAgICAgICAgIG91dHB1dCA9IFV0aWxzLnJ0cmltIG91dHB1dFswLi4uc3RycG9zXVxuXG4gICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgam9pbmVkRGVsaW1pdGVycyA9IGRlbGltaXRlcnMuam9pbignfCcpXG4gICAgICAgICAgICAgICAgcGF0dGVybiA9IEBQQVRURVJOX1NDQUxBUl9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jZSwgY29udGV4dCkgLT5cbiAgICAgICAgb3V0cHV0ID0gW11cbiAgICAgICAgbGVuID0gc2VxdWVuY2UubGVuZ3RoXG4gICAgICAgIHtpfSA9IGNvbnRleHRcbiAgICAgICAgaSArPSAxXG5cbiAgICAgICAgIyBbZm9vLCBiYXIsIC4uLl1cbiAgICAgICAgd2hpbGUgaSA8IGxlblxuICAgICAgICAgICAgY29udGV4dC5pID0gaVxuICAgICAgICAgICAgc3dpdGNoIHNlcXVlbmNlLmNoYXJBdChpKVxuICAgICAgICAgICAgICAgIHdoZW4gJ1snXG4gICAgICAgICAgICAgICAgICAgICMgTmVzdGVkIHNlcXVlbmNlXG4gICAgICAgICAgICAgICAgICAgIG91dHB1dC5wdXNoIEBwYXJzZVNlcXVlbmNlIHNlcXVlbmNlLCBjb250ZXh0XG4gICAgICAgICAgICAgICAgICAgIHtpfSA9IGNvbnRleHRcbiAgICAgICAgICAgICAgICB3aGVuICd7J1xuICAgICAgICAgICAgICAgICAgICAjIE5lc3RlZCBtYXBwaW5nXG4gICAgICAgICAgICAgICAgICAgIG91dHB1dC5wdXNoIEBwYXJzZU1hcHBpbmcgc2VxdWVuY2UsIGNvbnRleHRcbiAgICAgICAgICAgICAgICAgICAge2l9ID0gY29udGV4dFxuICAgICAgICAgICAgICAgIHdoZW4gJ10nXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBvdXRwdXRcbiAgICAgICAgICAgICAgICB3aGVuICcsJywgJyAnLCBcIlxcblwiXG4gICAgICAgICAgICAgICAgICAgICMgRG8gbm90aGluZ1xuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgaXNRdW90ZWQgPSAoc2VxdWVuY2UuY2hhckF0KGkpIGluIFsnXCInLCBcIidcIl0pXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gQHBhcnNlU2NhbGFyIHNlcXVlbmNlLCBbJywnLCAnXSddLCBbJ1wiJywgXCInXCJdLCBjb250ZXh0XG4gICAgICAgICAgICAgICAgICAgIHtpfSA9IGNvbnRleHRcblxuICAgICAgICAgICAgICAgICAgICBpZiBub3QoaXNRdW90ZWQpIGFuZCB0eXBlb2YodmFsdWUpIGlzICdzdHJpbmcnIGFuZCAodmFsdWUuaW5kZXhPZignOiAnKSBpc250IC0xIG9yIHZhbHVlLmluZGV4T2YoXCI6XFxuXCIpIGlzbnQgLTEpXG4gICAgICAgICAgICAgICAgICAgICAgICAjIEVtYmVkZGVkIG1hcHBpbmc/XG4gICAgICAgICAgICAgICAgICAgICAgICB0cnlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IEBwYXJzZU1hcHBpbmcgJ3snK3ZhbHVlKyd9J1xuICAgICAgICAgICAgICAgICAgICAgICAgY2F0Y2ggZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICMgTm8sIGl0J3Mgbm90XG5cblxuICAgICAgICAgICAgICAgICAgICBvdXRwdXQucHVzaCB2YWx1ZVxuXG4gICAgICAgICAgICAgICAgICAgIC0taVxuXG4gICAgICAgICAgICArK2lcblxuICAgICAgICB0aHJvdyBuZXcgUGFyc2VNb3JlICdNYWxmb3JtZWQgaW5saW5lIFlBTUwgc3RyaW5nICcrc2VxdWVuY2VcblxuXG4gICAgIyBQYXJzZXMgYSBtYXBwaW5nIHRvIGEgWUFNTCBzdHJpbmcuXG4gICAgI1xuICAgICMgQHBhcmFtIFtTdHJpbmddICAgbWFwcGluZ1xuICAgICMgQHBhcmFtIFtPYmplY3RdICAgY29udGV4dFxuICAgICNcbiAgICAjIEByZXR1cm4gW1N0cmluZ10gIEEgWUFNTCBzdHJpbmdcbiAgICAjXG4gICAgIyBAdGhyb3cgW1BhcnNlTW9yZV0gV2hlbiBtYWxmb3JtZWQgaW5saW5lIFlBTUwgc3RyaW5nIGlzIHBhcnNlZFxuICAgICNcbiAgICBAcGFyc2VNYXBwaW5nOiAobWFwcGluZywgY29udGV4dCkgLT5cbiAgICAgICAgb3V0cHV0ID0ge31cbiAgICAgICAgbGVuID0gbWFwcGluZy5sZW5ndGhcbiAgICAgICAge2l9ID0gY29udGV4dFxuICAgICAgICBpICs9IDFcblxuICAgICAgICAjIHtmb286IGJhciwgYmFyOmZvbywgLi4ufVxuICAgICAgICBzaG91bGRDb250aW51ZVdoaWxlTG9vcCA9IGZhbHNlXG4gICAgICAgIHdoaWxlIGkgPCBsZW5cbiAgICAgICAgICAgIGNvbnRleHQuaSA9IGlcbiAgICAgICAgICAgIHN3aXRjaCBtYXBwaW5nLmNoYXJBdChpKVxuICAgICAgICAgICAgICAgIHdoZW4gJyAnLCAnLCcsIFwiXFxuXCJcbiAgICAgICAgICAgICAgICAgICAgKytpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRleHQuaSA9IGlcbiAgICAgICAgICAgICAgICAgICAgc2hvdWxkQ29udGludWVXaGlsZUxvb3AgPSB0cnVlXG4gICAgICAgICAgICAgICAgd2hlbiAnfSdcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG91dHB1dFxuXG4gICAgICAgICAgICBpZiBzaG91bGRDb250aW51ZVdoaWxlTG9vcFxuICAgICAgICAgICAgICAgIHNob3VsZENvbnRpbnVlV2hpbGVMb29wID0gZmFsc2VcbiAgICAgICAgICAgICAgICBjb250aW51ZVxuXG4gICAgICAgICAgICAjIEtleVxuICAgICAgICAgICAga2V5ID0gQHBhcnNlU2NhbGFyIG1hcHBpbmcsIFsnOicsICcgJywgXCJcXG5cIl0sIFsnXCInLCBcIidcIl0sIGNvbnRleHQsIGZhbHNlXG4gICAgICAgICAgICB7aX0gPSBjb250ZXh0XG5cbiAgICAgICAgICAgICMgVmFsdWVcbiAgICAgICAgICAgIGRvbmUgPSBmYWxzZVxuXG4gICAgICAgICAgICB3aGlsZSBpIDwgbGVuXG4gICAgICAgICAgICAgICAgY29udGV4dC5pID0gaVxuICAgICAgICAgICAgICAgIHN3aXRjaCBtYXBwaW5nLmNoYXJBdChpKVxuICAgICAgICAgICAgICAgICAgICB3aGVuICdbJ1xuICAgICAgICAgICAgICAgICAgICAgICAgIyBOZXN0ZWQgc2VxdWVuY2VcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlID0gQHBhcnNlU2VxdWVuY2UgbWFwcGluZywgY29udGV4dFxuICAgICAgICAgICAgICAgICAgICAgICAge2l9ID0gY29udGV4dFxuICAgICAgICAgICAgICAgICAgICAgICAgIyBTcGVjOiBLZXlzIE1VU1QgYmUgdW5pcXVlOyBmaXJzdCBvbmUgd2lucy5cbiAgICAgICAgICAgICAgICAgICAgICAgICMgUGFyc2VyIGNhbm5vdCBhYm9ydCB0aGlzIG1hcHBpbmcgZWFybGllciwgc2luY2UgbGluZXNcbiAgICAgICAgICAgICAgICAgICAgICAgICMgYXJlIHByb2Nlc3NlZCBzZXF1ZW50aWFsbHkuXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiBvdXRwdXRba2V5XSA9PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXRba2V5XSA9IHZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICBkb25lID0gdHJ1ZVxuICAgICAgICAgICAgICAgICAgICB3aGVuICd7J1xuICAgICAgICAgICAgICAgICAgICAgICAgIyBOZXN0ZWQgbWFwcGluZ1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBAcGFyc2VNYXBwaW5nIG1hcHBpbmcsIGNvbnRleHRcbiAgICAgICAgICAgICAgICAgICAgICAgIHtpfSA9IGNvbnRleHRcbiAgICAgICAgICAgICAgICAgICAgICAgICMgU3BlYzogS2V5cyBNVVNUIGJlIHVuaXF1ZTsgZmlyc3Qgb25lIHdpbnMuXG4gICAgICAgICAgICAgICAgICAgICAgICAjIFBhcnNlciBjYW5ub3QgYWJvcnQgdGhpcyBtYXBwaW5nIGVhcmxpZXIsIHNpbmNlIGxpbmVzXG4gICAgICAgICAgICAgICAgICAgICAgICAjIGFyZSBwcm9jZXNzZWQgc2VxdWVudGlhbGx5LlxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgb3V0cHV0W2tleV0gPT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0cHV0W2tleV0gPSB2YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSA9IHRydWVcbiAgICAgICAgICAgICAgICAgICAgd2hlbiAnOicsICcgJywgXCJcXG5cIlxuICAgICAgICAgICAgICAgICAgICAgICAgIyBEbyBub3RoaW5nXG4gICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlID0gQHBhcnNlU2NhbGFyIG1hcHBpbmcsIFsnLCcsICd9J10sIFsnXCInLCBcIidcIl0sIGNvbnRleHRcbiAgICAgICAgICAgICAgICAgICAgICAgIHtpfSA9IGNvbnRleHRcbiAgICAgICAgICAgICAgICAgICAgICAgICMgU3BlYzogS2V5cyBNVVNUIGJlIHVuaXF1ZTsgZmlyc3Qgb25lIHdpbnMuXG4gICAgICAgICAgICAgICAgICAgICAgICAjIFBhcnNlciBjYW5ub3QgYWJvcnQgdGhpcyBtYXBwaW5nIGVhcmxpZXIsIHNpbmNlIGxpbmVzXG4gICAgICAgICAgICAgICAgICAgICAgICAjIGFyZSBwcm9jZXNzZWQgc2VxdWVudGlhbGx5LlxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgb3V0cHV0W2tleV0gPT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0cHV0W2tleV0gPSB2YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSA9IHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgIC0taVxuXG4gICAgICAgICAgICAgICAgKytpXG5cbiAgICAgICAgICAgICAgICBpZiBkb25lXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrXG5cbiAgICAgICAgdGhyb3cgbmV3IFBhcnNlTW9yZSAnTWFsZm9ybWVkIGlubGluZSBZQU1MIHN0cmluZyAnK21hcHBpbmdcblxuXG4gICAgIyBFdmFsdWF0ZXMgc2NhbGFycyBhbmQgcmVwbGFjZXMgbWFnaWMgdmFsdWVzLlxuICAgICNcbiAgICAjIEBwYXJhbSBbU3RyaW5nXSAgIHNjYWxhclxuICAgICNcbiAgICAjIEByZXR1cm4gW1N0cmluZ10gIEEgWUFNTCBzdHJpbmdcbiAgICAjXG4gICAgQGV2YWx1YXRlU2NhbGFyOiAoc2NhbGFyLCBjb250ZXh0KSAtPlxuICAgICAgICBzY2FsYXIgPSBVdGlscy50cmltKHNjYWxhcilcbiAgICAgICAgc2NhbGFyTG93ZXIgPSBzY2FsYXIudG9Mb3dlckNhc2UoKVxuXG4gICAgICAgIHN3aXRjaCBzY2FsYXJMb3dlclxuICAgICAgICAgICAgd2hlbiAnbnVsbCcsICcnLCAnfidcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbFxuICAgICAgICAgICAgd2hlbiAndHJ1ZSdcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZVxuICAgICAgICAgICAgd2hlbiAnZmFsc2UnXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlXG4gICAgICAgICAgICB3aGVuICcuaW5mJ1xuICAgICAgICAgICAgICAgIHJldHVybiBJbmZpbml0eVxuICAgICAgICAgICAgd2hlbiAnLm5hbidcbiAgICAgICAgICAgICAgICByZXR1cm4gTmFOXG4gICAgICAgICAgICB3aGVuICctLmluZidcbiAgICAgICAgICAgICAgICByZXR1cm4gSW5maW5pdHlcbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICBmaXJzdENoYXIgPSBzY2FsYXJMb3dlci5jaGFyQXQoMClcbiAgICAgICAgICAgICAgICBzd2l0Y2ggZmlyc3RDaGFyXG4gICAgICAgICAgICAgICAgICAgIHdoZW4gJyEnXG4gICAgICAgICAgICAgICAgICAgICAgICBmaXJzdFNwYWNlID0gc2NhbGFyLmluZGV4T2YoJyAnKVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgZmlyc3RTcGFjZSBpcyAtMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpcnN0V29yZCA9IHNjYWxhckxvd2VyXG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlyc3RXb3JkID0gc2NhbGFyTG93ZXJbMC4uLmZpcnN0U3BhY2VdXG4gICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggZmlyc3RXb3JkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hlbiAnISdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgZmlyc3RTcGFjZSBpc250IC0xXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VJbnQgQHBhcnNlU2NhbGFyKHNjYWxhclsyLi5dKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoZW4gJyFzdHInXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBVdGlscy5sdHJpbSBzY2FsYXJbNC4uXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoZW4gJyEhc3RyJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gVXRpbHMubHRyaW0gc2NhbGFyWzUuLl1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGVuICchIWludCdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlSW50KEBwYXJzZVNjYWxhcihzY2FsYXJbNS4uXSkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hlbiAnISFib29sJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gVXRpbHMucGFyc2VCb29sZWFuKEBwYXJzZVNjYWxhcihzY2FsYXJbNi4uXSksIGZhbHNlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoZW4gJyEhZmxvYXQnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZUZsb2F0KEBwYXJzZVNjYWxhcihzY2FsYXJbNy4uXSkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hlbiAnISF0aW1lc3RhbXAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBVdGlscy5zdHJpbmdUb0RhdGUoVXRpbHMubHRyaW0oc2NhbGFyWzExLi5dKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVubGVzcyBjb250ZXh0P1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGV4dCA9IGV4Y2VwdGlvbk9uSW52YWxpZFR5cGU6IEBzZXR0aW5ncy5leGNlcHRpb25PbkludmFsaWRUeXBlLCBvYmplY3REZWNvZGVyOiBAc2V0dGluZ3Mub2JqZWN0RGVjb2RlciwgaTogMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7b2JqZWN0RGVjb2RlciwgZXhjZXB0aW9uT25JbnZhbGlkVHlwZX0gPSBjb250ZXh0XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgb2JqZWN0RGVjb2RlclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyBJZiBvYmplY3REZWNvZGVyIGZ1bmN0aW9uIGlzIGdpdmVuLCB3ZSBjYW4gZG8gY3VzdG9tIGRlY29kaW5nIG9mIGN1c3RvbSB0eXBlc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJpbW1lZFNjYWxhciA9IFV0aWxzLnJ0cmltIHNjYWxhclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlyc3RTcGFjZSA9IHRyaW1tZWRTY2FsYXIuaW5kZXhPZignICcpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiBmaXJzdFNwYWNlIGlzIC0xXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9iamVjdERlY29kZXIgdHJpbW1lZFNjYWxhciwgbnVsbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1YlZhbHVlID0gVXRpbHMubHRyaW0gdHJpbW1lZFNjYWxhcltmaXJzdFNwYWNlKzEuLl1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bmxlc3Mgc3ViVmFsdWUubGVuZ3RoID4gMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdWJWYWx1ZSA9IG51bGxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb2JqZWN0RGVjb2RlciB0cmltbWVkU2NhbGFyWzAuLi5maXJzdFNwYWNlXSwgc3ViVmFsdWVcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiBleGNlcHRpb25PbkludmFsaWRUeXBlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgUGFyc2VFeGNlcHRpb24gJ0N1c3RvbSBvYmplY3Qgc3VwcG9ydCB3aGVuIHBhcnNpbmcgYSBZQU1MIGZpbGUgaGFzIGJlZW4gZGlzYWJsZWQuJ1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsXG4gICAgICAgICAgICAgICAgICAgIHdoZW4gJzAnXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAnMHgnIGlzIHNjYWxhclswLi4uMl1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gVXRpbHMuaGV4RGVjIHNjYWxhclxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiBVdGlscy5pc0RpZ2l0cyBzY2FsYXJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gVXRpbHMub2N0RGVjIHNjYWxhclxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiBVdGlscy5pc051bWVyaWMgc2NhbGFyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlRmxvYXQgc2NhbGFyXG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNjYWxhclxuICAgICAgICAgICAgICAgICAgICB3aGVuICcrJ1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgVXRpbHMuaXNEaWdpdHMgc2NhbGFyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmF3ID0gc2NhbGFyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzdCA9IHBhcnNlSW50KHJhdylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiByYXcgaXMgU3RyaW5nKGNhc3QpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjYXN0XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmF3XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIFV0aWxzLmlzTnVtZXJpYyBzY2FsYXJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VGbG9hdCBzY2FsYXJcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgQFBBVFRFUk5fVEhPVVNBTkRfTlVNRVJJQ19TQ0FMQVIudGVzdCBzY2FsYXJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VGbG9hdChzY2FsYXIucmVwbGFjZSgnLCcsICcnKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzY2FsYXJcbiAgICAgICAgICAgICAgICAgICAgd2hlbiAnLSdcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIFV0aWxzLmlzRGlnaXRzKHNjYWxhclsxLi5dKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICcwJyBpcyBzY2FsYXIuY2hhckF0KDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtVXRpbHMub2N0RGVjKHNjYWxhclsxLi5dKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmF3ID0gc2NhbGFyWzEuLl1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzdCA9IHBhcnNlSW50KHJhdylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgcmF3IGlzIFN0cmluZyhjYXN0KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1jYXN0XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtcmF3XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIFV0aWxzLmlzTnVtZXJpYyBzY2FsYXJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VGbG9hdCBzY2FsYXJcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgQFBBVFRFUk5fVEhPVVNBTkRfTlVNRVJJQ19TQ0FMQVIudGVzdCBzY2FsYXJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VGbG9hdChzY2FsYXIucmVwbGFjZSgnLCcsICcnKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzY2FsYXJcbiAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgZGF0ZSA9IFV0aWxzLnN0cmluZ1RvRGF0ZShzY2FsYXIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRhdGVcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgVXRpbHMuaXNOdW1lcmljKHNjYWxhcilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VGbG9hdCBzY2FsYXJcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgQFBBVFRFUk5fVEhPVVNBTkRfTlVNRVJJQ19TQ0FMQVIudGVzdCBzY2FsYXJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VGbG9hdChzY2FsYXIucmVwbGFjZSgnLCcsICcnKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzY2FsYXJcblxubW9kdWxlLmV4cG9ydHMgPSBJbmxpbmVcbiIsIlxuSW5saW5lICAgICAgICAgID0gcmVxdWlyZSAnLi9JbmxpbmUnXG5QYXR0ZXJuICAgICAgICAgPSByZXF1aXJlICcuL1BhdHRlcm4nXG5VdGlscyAgICAgICAgICAgPSByZXF1aXJlICcuL1V0aWxzJ1xuUGFyc2VFeGNlcHRpb24gID0gcmVxdWlyZSAnLi9FeGNlcHRpb24vUGFyc2VFeGNlcHRpb24nXG5QYXJzZU1vcmUgICAgICAgPSByZXF1aXJlICcuL0V4Y2VwdGlvbi9QYXJzZU1vcmUnXG5cbiMgUGFyc2VyIHBhcnNlcyBZQU1MIHN0cmluZ3MgdG8gY29udmVydCB0aGVtIHRvIEphdmFTY3JpcHQgb2JqZWN0cy5cbiNcbmNsYXNzIFBhcnNlclxuXG4gICAgIyBQcmUtY29tcGlsZWQgcGF0dGVybnNcbiAgICAjXG4gICAgUEFUVEVSTl9GT0xERURfU0NBTEFSX0FMTDogICAgICAgICAgICAgIG5ldyBQYXR0ZXJuICdeKD86KD88dHlwZT4hW15cXF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gICAgICBAbGluZXMgPSBAY2xlYW51cCh2YWx1ZSkuc3BsaXQgXCJcXG5cIlxuXG4gICAgICAgIGRhdGEgPSBudWxsXG4gICAgICAgIGNvbnRleHQgPSBAQ09OVEVYVF9OT05FXG4gICAgICAgIGFsbG93T3ZlcndyaXRlID0gZmFsc2VcbiAgICAgICAgd2hpbGUgQG1vdmVUb05leHRMaW5lKClcbiAgICAgICAgICAgIGlmIEBpc0N1cnJlbnRMaW5lRW1wdHkoKVxuICAgICAgICAgICAgICAgIGNvbnRpbnVlXG5cbiAgICAgICAgICAgICMgVGFiP1xuICAgICAgICAgICAgaWYgXCJcXHRcIiBpcyBAY3VycmVudExpbmVbMF1cbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgUGFyc2VFeGNlcHRpb24gJ0EgWUFNTCBmaWxlIGNhbm5vdCBjb250YWluIHRhYnMgYXMgaW5kZW50YXRpb24uJywgQGdldFJlYWxDdXJyZW50TGluZU5iKCkgKyAxLCBAY3VycmVudExpbmVcblxuICAgICAgICAgICAgaXNSZWYgPSBtZXJnZU5vZGUgPSBmYWxzZVxuICAgICAgICAgICAgaWYgdmFsdWVzID0gQFBBVFRFUk5fU0VRVUVOQ0VfSVRFTS5leGVjIEBjdXJyZW50TGluZVxuICAgICAgICAgICAgICAgIGlmIEBDT05URVhUX01BUFBJTkcgaXMgY29udGV4dFxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgUGFyc2VFeGNlcHRpb24gJ1lvdSBjYW5ub3QgZGVmaW5lIGEgc2VxdWVuY2UgaXRlbSB3aGVuIGluIGEgbWFwcGluZydcbiAgICAgICAgICAgICAgICBjb250ZXh0ID0gQENPTlRFWFRfU0VRVUVOQ0VcbiAgICAgICAgICAgICAgICBkYXRhID89IFtdXG5cbiAgICAgICAgICAgICAgICBpZiB2YWx1ZXMudmFsdWU/IGFuZCBtYXRjaGVzID0gQFBBVFRFUk5fQU5DSE9SX1ZBTFVFLmV4ZWMgdmFsdWVzLnZhbHVlXG4gICAgICAgICAgICAgICAgICAgIGlzUmVmID0gbWF0Y2hlcy5yZWZcbiAgICAgICAgICAgICAgICAgICAgdmFsdWVzLnZhbHVlID0gbWF0Y2hlcy52YWx1ZVxuXG4gICAgICAgICAgICAgICAgIyBBcnJheVxuICAgICAgICAgICAgICAgIGlmIG5vdCh2YWx1ZXMudmFsdWU/KSBvciAnJyBpcyBVdGlscy50cmltKHZhbHVlcy52YWx1ZSwgJyAnKSBvciBVdGlscy5sdHJpbSh2YWx1ZXMudmFsdWUsICcgJykuaW5kZXhPZignIycpIGlzIDBcbiAgICAgICAgICAgICAgICAgICAgaWYgQGN1cnJlbnRMaW5lTmIgPCBAbGluZXMubGVuZ3RoIC0gMSBhbmQgbm90IEBpc05leHRMaW5lVW5JbmRlbnRlZENvbGxlY3Rpb24oKVxuICAgICAgICAgICAgICAgICAgICAgICAgYyA9IEBnZXRSZWFsQ3VycmVudExpbmVOYigpICsgMVxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VyID0gbmV3IFBhcnNlciBjXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXIucmVmcyA9IEByZWZzXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnB1c2ggcGFyc2VyLnBhcnNlKEBnZXROZXh0RW1iZWRCbG9jayhudWxsLCB0cnVlKSwgZXhjZXB0aW9uT25JbnZhbGlkVHlwZSwgb2JqZWN0RGVjb2RlcilcbiAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5wdXNoIG51bGxcblxuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgaWYgdmFsdWVzLmxlYWRzcGFjZXM/Lmxlbmd0aCBhbmQgbWF0Y2hlcyA9IEBQQVRURVJOX0NPTVBBQ1RfTk9UQVRJT04uZXhlYyB2YWx1ZXMudmFsdWVcblxuICAgICAgICAgICAgICAgICAgICAgICAgIyBUaGlzIGlzIGEgY29tcGFjdCBub3RhdGlvbiBlbGVtZW50LCBhZGQgdG8gbmV4dCBibG9jayBhbmQgcGFyc2VcbiAgICAgICAgICAgICAgICAgICAgICAgIGMgPSBAZ2V0UmVhbEN1cnJlbnRMaW5lTmIoKVxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VyID0gbmV3IFBhcnNlciBjXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXIucmVmcyA9IEByZWZzXG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGJsb2NrID0gdmFsdWVzLnZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICBpbmRlbnQgPSBAZ2V0Q3VycmVudExpbmVJbmRlbnRhdGlvbigpXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiBAaXNOZXh0TGluZUluZGVudGVkKGZhbHNlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsb2NrICs9IFwiXFxuXCIrQGdldE5leHRFbWJlZEJsb2NrKGluZGVudCArIHZhbHVlcy5sZWFkc3BhY2VzLmxlbmd0aCArIDEsIHRydWUpXG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEucHVzaCBwYXJzZXIucGFyc2UgYmxvY2ssIGV4Y2VwdGlvbk9uSW52YWxpZFR5cGUsIG9iamVjdERlY29kZXJcblxuICAgICAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnB1c2ggQHBhcnNlVmFsdWUgdmFsdWVzLnZhbHVlLCBleGNlcHRpb25PbkludmFsaWRUeXBlLCBvYmplY3REZWNvZGVyXG5cbiAgICAgICAgICAgIGVsc2UgaWYgKHZhbHVlcyA9IEBQQVRURVJOX01BUFBJTkdfSVRFTS5leGVjIEBjdXJyZW50TGluZSkgYW5kIHZhbHVlcy5rZXkuaW5kZXhPZignICMnKSBpcyAtMVxuICAgICAgICAgICAgICAgIGlmIEBDT05URVhUX1NFUVVFTkNFIGlzIGNvbnRleHRcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IFBhcnNlRXhjZXB0aW9uICdZb3UgY2Fubm90IGRlZmluZSBhIG1hcHBpbmcgaXRlbSB3aGVuIGluIGEgc2VxdWVuY2UnXG4gICAgICAgICAgICAgICAgY29udGV4dCA9IEBDT05URVhUX01BUFBJTkdcbiAgICAgICAgICAgICAgICBkYXRhID89IHt9XG5cbiAgICAgICAgICAgICAgICAjIEZvcmNlIGNvcnJlY3Qgc2V0dGluZ3NcbiAgICAgICAgICAgICAgICBJbmxpbmUuY29uZmlndXJlIGV4Y2VwdGlvbk9uSW52YWxpZFR5cGUsIG9iamVjdERlY29kZXJcbiAgICAgICAgICAgICAgICB0cnlcbiAgICAgICAgICAgICAgICAgICAga2V5ID0gSW5saW5lLnBhcnNlU2NhbGFyIHZhbHVlcy5rZXlcbiAgICAgICAgICAgICAgICBjYXRjaCBlXG4gICAgICAgICAgICAgICAgICAgIGUucGFyc2VkTGluZSA9IEBnZXRSZWFsQ3VycmVudExpbmVOYigpICsgMVxuICAgICAgICAgICAgICAgICAgICBlLnNuaXBwZXQgPSBAY3VycmVudExpbmVcblxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBlXG5cbiAgICAgICAgICAgICAgICBpZiAnPDwnIGlzIGtleVxuICAgICAgICAgICAgICAgICAgICBtZXJnZU5vZGUgPSB0cnVlXG4gICAgICAgICAgICAgICAgICAgIGFsbG93T3ZlcndyaXRlID0gdHJ1ZVxuICAgICAgICAgICAgICAgICAgICBpZiB2YWx1ZXMudmFsdWU/LmluZGV4T2YoJyonKSBpcyAwXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZOYW1lID0gdmFsdWVzLnZhbHVlWzEuLl1cbiAgICAgICAgICAgICAgICAgICAgICAgIHVubGVzcyBAcmVmc1tyZWZOYW1lXT9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgUGFyc2VFeGNlcHRpb24gJ1JlZmVyZW5jZSBcIicrcmVmTmFtZSsnXCIgZG9lcyBub3QgZXhpc3QuJywgQGdldFJlYWxDdXJyZW50TGluZU5iKCkgKyAxLCBAY3VycmVudExpbmVcblxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmVmFsdWUgPSBAcmVmc1tyZWZOYW1lXVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiB0eXBlb2YgcmVmVmFsdWUgaXNudCAnb2JqZWN0J1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBQYXJzZUV4Y2VwdGlvbiAnWUFNTCBtZXJnZSBrZXlzIHVzZWQgd2l0aCBhIHNjYWxhciB2YWx1ZSBpbnN0ZWFkIG9mIGFuIG9iamVjdC4nLCBAZ2V0UmVhbEN1cnJlbnRMaW5lTmIoKSArIDEsIEBjdXJyZW50TGluZVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiByZWZWYWx1ZSBpbnN0YW5jZW9mIEFycmF5XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIyBNZXJnZSBhcnJheSB3aXRoIG9iamVjdFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciB2YWx1ZSwgaSBpbiByZWZWYWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhW1N0cmluZyhpKV0gPz0gdmFsdWVcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAjIE1lcmdlIG9iamVjdHNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3Iga2V5LCB2YWx1ZSBvZiByZWZWYWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhW2tleV0gPz0gdmFsdWVcblxuICAgICAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiB2YWx1ZXMudmFsdWU/IGFuZCB2YWx1ZXMudmFsdWUgaXNudCAnJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlID0gdmFsdWVzLnZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBAZ2V0TmV4dEVtYmVkQmxvY2soKVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBjID0gQGdldFJlYWxDdXJyZW50TGluZU5iKCkgKyAxXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXIgPSBuZXcgUGFyc2VyIGNcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlci5yZWZzID0gQHJlZnNcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlZCA9IHBhcnNlci5wYXJzZSB2YWx1ZSwgZXhjZXB0aW9uT25JbnZhbGlkVHlwZVxuXG4gICAgICAgICAgICAgICAgICAgICAgICB1bmxlc3MgdHlwZW9mIHBhcnNlZCBpcyAnb2JqZWN0J1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBQYXJzZUV4Y2VwdGlvbiAnWUFNTCBtZXJnZSBrZXlzIHVzZWQgd2l0aCBhIHNjYWxhciB2YWx1ZSBpbnN0ZWFkIG9mIGFuIG9iamVjdC4nLCBAZ2V0UmVhbEN1cnJlbnRMaW5lTmIoKSArIDEsIEBjdXJyZW50TGluZVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiBwYXJzZWQgaW5zdGFuY2VvZiBBcnJheVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICMgSWYgdGhlIHZhbHVlIGFzc29jaWF0ZWQgd2l0aCB0aGUgbWVyZ2Uga2V5IGlzIGEgc2VxdWVuY2UsIHRoZW4gdGhpcyBzZXF1ZW5jZSBpcyBleHBlY3RlZCB0byBjb250YWluIG1hcHBpbmcgbm9kZXNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAjIGFuZCBlYWNoIG9mIHRoZXNlIG5vZGVzIGlzIG1lcmdlZCBpbiB0dXJuIGFjY29yZGluZyB0byBpdHMgb3JkZXIgaW4gdGhlIHNlcXVlbmNlLiBLZXlzIGluIG1hcHBpbmcgbm9kZXMgZWFybGllclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICMgaW4gdGhlIHNlcXVlbmNlIG92ZXJyaWRlIGtleXMgc3BlY2lmaWVkIGluIGxhdGVyIG1hcHBpbmcgbm9kZXMuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIHBhcnNlZEl0ZW0gaW4gcGFyc2VkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVubGVzcyB0eXBlb2YgcGFyc2VkSXRlbSBpcyAnb2JqZWN0J1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IFBhcnNlRXhjZXB0aW9uICdNZXJnZSBpdGVtcyBtdXN0IGJlIG9iamVjdHMuJywgQGdldFJlYWxDdXJyZW50TGluZU5iKCkgKyAxLCBwYXJzZWRJdGVtXG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgcGFyc2VkSXRlbSBpbnN0YW5jZW9mIEFycmF5XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjIE1lcmdlIGFycmF5IHdpdGggb2JqZWN0XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgdmFsdWUsIGkgaW4gcGFyc2VkSXRlbVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGsgPSBTdHJpbmcoaSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bmxlc3MgZGF0YS5oYXNPd25Qcm9wZXJ0eShrKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhW2tdID0gdmFsdWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyBNZXJnZSBvYmplY3RzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3Iga2V5LCB2YWx1ZSBvZiBwYXJzZWRJdGVtXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5sZXNzIGRhdGEuaGFzT3duUHJvcGVydHkoa2V5KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhW2tleV0gPSB2YWx1ZVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIyBJZiB0aGUgdmFsdWUgYXNzb2NpYXRlZCB3aXRoIHRoZSBrZXkgaXMgYSBzaW5nbGUgbWFwcGluZyBub2RlLCBlYWNoIG9mIGl0cyBrZXkvdmFsdWUgcGFpcnMgaXMgaW5zZXJ0ZWQgaW50byB0aGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAjIGN1cnJlbnQgbWFwcGluZywgdW5sZXNzIHRoZSBrZXkgYWxyZWFkeSBleGlzdHMgaW4gaXQuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIGtleSwgdmFsdWUgb2YgcGFyc2VkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVubGVzcyBkYXRhLmhhc093blByb3BlcnR5KGtleSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFba2V5XSA9IHZhbHVlXG5cbiAgICAgICAgICAgICAgICBlbHNlIGlmIHZhbHVlcy52YWx1ZT8gYW5kIG1hdGNoZXMgPSBAUEFUVEVSTl9BTkNIT1JfVkFMVUUuZXhlYyB2YWx1ZXMudmFsdWVcbiAgICAgICAgICAgICAgICAgICAgaXNSZWYgPSBtYXRjaGVzLnJlZlxuICAgICAgICAgICAgICAgICAgICB2YWx1ZXMudmFsdWUgPSBtYXRjaGVzLnZhbHVlXG5cblxuICAgICAgICAgICAgICAgIGlmIG1lcmdlTm9kZVxuICAgICAgICAgICAgICAgICAgICAjIE1lcmdlIGtleXNcbiAgICAgICAgICAgICAgICBlbHNlIGlmIG5vdCh2YWx1ZXMudmFsdWU/KSBvciAnJyBpcyBVdGlscy50cmltKHZhbHVlcy52YWx1ZSwgJyAnKSBvciBVdGlscy5sdHJpbSh2YWx1ZXMudmFsdWUsICcgJykuaW5kZXhPZignIycpIGlzIDBcbiAgICAgICAgICAgICAgICAgICAgIyBIYXNoXG4gICAgICAgICAgICAgICAgICAgICMgaWYgbmV4dCBsaW5lIGlzIGxlc3MgaW5kZW50ZWQgb3IgZXF1YWwsIHRoZW4gaXQgbWVhbnMgdGhhdCB0aGUgY3VycmVudCB2YWx1ZSBpcyBudWxsXG4gICAgICAgICAgICAgICAgICAgIGlmIG5vdChAaXNOZXh0TGluZUluZGVudGVkKCkpIGFuZCBub3QoQGlzTmV4dExpbmVVbkluZGVudGVkQ29sbGVjdGlvbigpKVxuICAgICAgICAgICAgICAgICAgICAgICAgIyBTcGVjOiBLZXlzIE1VU1QgYmUgdW5pcXVlOyBmaXJzdCBvbmUgd2lucy5cbiAgICAgICAgICAgICAgICAgICAgICAgICMgQnV0IG92ZXJ3cml0aW5nIGlzIGFsbG93ZWQgd2hlbiBhIG1lcmdlIG5vZGUgaXMgdXNlZCBpbiBjdXJyZW50IGJsb2NrLlxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgYWxsb3dPdmVyd3JpdGUgb3IgZGF0YVtrZXldIGlzIHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFba2V5XSA9IG51bGxcblxuICAgICAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICBjID0gQGdldFJlYWxDdXJyZW50TGluZU5iKCkgKyAxXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXIgPSBuZXcgUGFyc2VyIGNcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlci5yZWZzID0gQHJlZnNcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbCA9IHBhcnNlci5wYXJzZSBAZ2V0TmV4dEVtYmVkQmxvY2soKSwgZXhjZXB0aW9uT25JbnZhbGlkVHlwZSwgb2JqZWN0RGVjb2RlclxuXG4gICAgICAgICAgICAgICAgICAgICAgICAjIFNwZWM6IEtleXMgTVVTVCBiZSB1bmlxdWU7IGZpcnN0IG9uZSB3aW5zLlxuICAgICAgICAgICAgICAgICAgICAgICAgIyBCdXQgb3ZlcndyaXRpbmcgaXMgYWxsb3dlZCB3aGVuIGEgbWVyZ2Ugbm9kZSBpcyB1c2VkIGluIGN1cnJlbnQgYmxvY2suXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiBhbGxvd092ZXJ3cml0ZSBvciBkYXRhW2tleV0gaXMgdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVtrZXldID0gdmFsXG5cbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgIHZhbCA9IEBwYXJzZVZhbHVlIHZhbHVlcy52YWx1ZSwgZXhjZXB0aW9uT25JbnZhbGlkVHlwZSwgb2JqZWN0RGVjb2RlclxuXG4gICAgICAgICAgICAgICAgICAgICMgU3BlYzogS2V5cyBNVVNUIGJlIHVuaXF1ZTsgZmlyc3Qgb25lIHdpbnMuXG4gICAgICAgICAgICAgICAgICAgICMgQnV0IG92ZXJ3cml0aW5nIGlzIGFsbG93ZWQgd2hlbiBhIG1lcmdlIG5vZGUgaXMgdXNlZCBpbiBjdXJyZW50IGJsb2NrLlxuICAgICAgICAgICAgICAgICAgICBpZiBhbGxvd092ZXJ3cml0ZSBvciBkYXRhW2tleV0gaXMgdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhW2tleV0gPSB2YWxcblxuICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICMgMS1saW5lciBvcHRpb25hbGx5IGZvbGxvd2VkIGJ5IG5ld2xpbmVcbiAgICAgICAgICAgICAgICBsaW5lQ291bnQgPSBAbGluZXMubGVuZ3RoXG4gICAgICAgICAgICAgICAgaWYgMSBpcyBsaW5lQ291bnQgb3IgKDIgaXMgbGluZUNvdW50IGFuZCBVdGlscy5pc0VtcHR5KEBsaW5lc1sxXSkpXG4gICAgICAgICAgICAgICAgICAgIHRyeVxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBJbmxpbmUucGFyc2UgQGxpbmVzWzBdLCBleGNlcHRpb25PbkludmFsaWRUeXBlLCBvYmplY3REZWNvZGVyXG4gICAgICAgICAgICAgICAgICAgIGNhdGNoIGVcbiAgICAgICAgICAgICAgICAgICAgICAgIGUucGFyc2VkTGluZSA9IEBnZXRSZWFsQ3VycmVudExpbmVOYigpICsgMVxuICAgICAgICAgICAgICAgICAgICAgICAgZS5zbmlwcGV0ID0gQGN1cnJlbnRMaW5lXG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IGVcblxuICAgICAgICAgICAgICAgICAgICBpZiB0eXBlb2YgdmFsdWUgaXMgJ29iamVjdCdcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIHZhbHVlIGluc3RhbmNlb2YgQXJyYXlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaXJzdCA9IHZhbHVlWzBdXG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIGtleSBvZiB2YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaXJzdCA9IHZhbHVlW2tleV1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcblxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgdHlwZW9mIGZpcnN0IGlzICdzdHJpbmcnIGFuZCBmaXJzdC5pbmRleE9mKCcqJykgaXMgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEgPSBbXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciBhbGlhcyBpbiB2YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnB1c2ggQHJlZnNbYWxpYXNbMS4uXV1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IGRhdGFcblxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdmFsdWVcblxuICAgICAgICAgICAgICAgIGVsc2UgaWYgVXRpbHMubHRyaW0odmFsdWUpLmNoYXJBdCgwKSBpbiBbJ1snLCAneyddXG4gICAgICAgICAgICAgICAgICAgIHRyeVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIElubGluZS5wYXJzZSB2YWx1ZSwgZXhjZXB0aW9uT25JbnZhbGlkVHlwZSwgb2JqZWN0RGVjb2RlclxuICAgICAgICAgICAgICAgICAgICBjYXRjaCBlXG4gICAgICAgICAgICAgICAgICAgICAgICBlLnBhcnNlZExpbmUgPSBAZ2V0UmVhbEN1cnJlbnRMaW5lTmIoKSArIDFcbiAgICAgICAgICAgICAgICAgICAgICAgIGUuc25pcHBldCA9IEBjdXJyZW50TGluZVxuXG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBlXG5cbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgUGFyc2VFeGNlcHRpb24gJ1VuYWJsZSB0byBwYXJzZS4nLCBAZ2V0UmVhbEN1cnJlbnRMaW5lTmIoKSArIDEsIEBjdXJyZW50TGluZVxuXG4gICAgICAgICAgICBpZiBpc1JlZlxuICAgICAgICAgICAgICAgIGlmIGRhdGEgaW5zdGFuY2VvZiBBcnJheVxuICAgICAgICAgICAgICAgICAgICBAcmVmc1tpc1JlZl0gPSBkYXRhW2RhdGEubGVuZ3RoLTFdXG4gICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICBsYXN0S2V5ID0gbnVsbFxuICAgICAgICAgICAgICAgICAgICBmb3Iga2V5IG9mIGRhdGFcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RLZXkgPSBrZXlcbiAgICAgICAgICAgICAgICAgICAgQHJlZnNbaXNSZWZdID0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pbmcgd2l0aCBcInxcIilcbiAgICAgICAgIyBUaGV5IG11c3Qgbm90IGJlIHJlbW92ZWQgaW5zaWRlIGEgc3ViLWVtYmVkZGVkIGJsb2NrIGFzIHdlbGxcbiAgICAgICAgcmVtb3ZlQ29tbWVudHNQYXR0ZXJuID0gQFBBVFRFUk5fRk9MREVEX1NDQUxBUl9FTkRcbiAgICAgICAgcmVtb3ZlQ29tbWVudHMgPSBub3QgcmVtb3ZlQ29tbWVudHNQYXR0ZXJuLnRlc3QgQGN1cnJlbnRMaW5lXG5cbiAgICAgICAgd2hpbGUgQG1vdmVUb05leHRMaW5lKClcbiAgICAgICAgICAgIGluZGVudCA9IEBnZXRDdXJyZW50TGluZUluZGVudGF0aW9uKClcblxuICAgICAgICAgICAgaWYgaW5kZW50IGlzIG5ld0luZGVudFxuICAgICAgICAgICAgICAgIHJlbW92ZUNvbW1lbnRzID0gbm90IHJlbW92ZUNvbW1lbnRzUGF0dGVybi50ZXN0IEBjdXJyZW50TGluZVxuXG4gICAgICAgICAgICBpZiByZW1vdmVDb21tZW50cyBhbmQgQGlzQ3VycmVudExpbmVDb21tZW50KClcbiAgICAgICAgICAgICAgICBjb250aW51ZVxuXG4gICAgICAgICAgICBpZiBAaXNDdXJyZW50TGluZUJsYW5rKClcbiAgICAgICAgICAgICAgICBkYXRhLnB1c2ggQGN1cnJlbnRMaW5lW25ld0luZGVudC4uXVxuICAgICAgICAgICAgICAgIGNvbnRpbnVlXG5cbiAgICAgICAgICAgIGlmIGlzSXRVbmluZGVudGVkQ29sbGVjdGlvbiBhbmQgbm90IEBpc1N0cmluZ1VuSW5kZW50ZWRDb2xsZWN0aW9uSXRlbShAY3VycmVudExpbmUpIGFuZCBpbmRlbnQgaXMgbmV3SW5kZW50XG4gICAgICAgICAgICAgICAgQG1vdmVUb1ByZXZpb3VzTGluZSgpXG4gICAgICAgICAgICAgICAgYnJlYWtcblxuICAgICAgICAgICAgaWYgaW5kZW50ID49IG5ld0luZGVudFxuICAgICAgICAgICAgICAgIGRhdGEucHVzaCBAY3VycmVudExpbmVbbmV3SW5kZW50Li5dXG4gICAgICAgICAgICBlbHNlIGlmIFV0aWxzLmx0cmltKEBjdXJyZW50TGluZSkuY2hhckF0KDApIGlzICcjJ1xuICAgICAgICAgICAgICAgICMgRG9uJ3QgYWRkIGxpbmUgd2l0aCBjb21tZW50c1xuICAgICAgICAgICAgZWxzZSBpZiAwIGlzIGluZGVudFxuICAgICAgICAgICAgICAgIEBtb3ZlVG9QcmV2aW91c0xpbmUoKVxuICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFBhcnNlRXhjZXB0aW9uICdJbmRlbnRhdGlvbiBwcm9ibGVtLicsIEBnZXRSZWFsQ3VycmVudExpbmVOYigpICsgMSwgQGN1cnJlbnRMaW5lXG5cblxuICAgICAgICByZXR1cm4gZGF0YS5qb2luIFwiXFxuXCJcblxuXG4gICAgIyBNb3ZlcyB0aGUgcGFyc2VyIHRvIHRoZSBuZXh0IGxpbmUuXG4gICAgI1xuICAgICMgQHJldHVybiBbQm9vbGVhbl1cbiAgICAjXG4gICAgbW92ZVRvTmV4dExpbmU6IC0+XG4gICAgICAgIGlmIEBjdXJyZW50TGluZU5iID49IEBsaW5lcy5sZW5ndGggLSAxXG4gICAgICAgICAgICByZXR1cm4gZmFsc2VcblxuICAgICAgICBAY3VycmVudExpbmUgPSBAbGluZXNbKytAY3VycmVudExpbmVOYl07XG5cbiAgICAgICAgcmV0dXJuIHRydWVcblxuXG4gICAgIyBNb3ZlcyB0aGUgcGFyc2VyIHRvIHRoZSBwcmV2aW91cyBsaW5lLlxuICAgICNcbiAgICBtb3ZlVG9QcmV2aW91c0xpbmU6IC0+XG4gICAgICAgIEBjdXJyZW50TGluZSA9IEBsaW5lc1stLUBjdXJyZW50TGluZU5iXVxuICAgICAgICByZXR1cm5cblxuXG4gICAgIyBQYXJzZXMgYSBZQU1MIHZhbH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nRMaW5lXG5cbiAgICAgICAgICAgIHJldHVybiBAcmVmc1t2YWx1ZV1cblxuXG4gICAgICAgIGlmIG1hdGNoZXMgPSBAUEFUVEVSTl9GT0xERURfU0NBTEFSX0FMTC5leGVjIHZhbHVlXG4gICAgICAgICAgICBtb2RpZmllcnMgPSBtYXRjaGVzLm1vZGlmaWVycyA/ICcnXG5cbiAgICAgICAgICAgIGZvbGRlZEluZGVudCA9IE1hdGguYWJzKHBhcnNlSW50KG1vZGlmaWVycykpXG4gICAgICAgICAgICBpZiBpc05hTihmb2xkZWRJbmRlbnQpIHRoZW4gZm9sZGVkSW5kZW50ID0gMFxuICAgICAgICAgICAgdmFsID0gQHBhcnNlRm9sZGVkU2NhbGFyIG1hdGNoZXMuc2VwYXJhdG9yLCBAUEFUVEVSTl9ERUNJTUFMLnJlcGxhY2UobW9kaWZpZXJzLCAnJyksIGZvbGRlZEluZGVudFxuICAgICAgICAgICAgaWYgbWF0Y2hlcy50eXBlP1xuICAgICAgICAgICAgICAgICMgRm9yY2UgY29ycmVjdCBzZXR0aW5nc1xuICAgICAgICAgICAgICAgIElubGluZS5jb25maWd1cmUgZXhjZXB0aW9uT25JbnZhbGlkVHlwZSwgb2JqZWN0RGVjb2RlclxuICAgICAgICAgICAgICAgIHJldHVybiBJbmxpbmUucGFyc2VTY2FsYXIgbWF0Y2hlcy50eXBlKycgJyt2YWxcbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICByZXR1cm4gdmFsXG5cbiAgICAgICAgIyBWYWx1ZSBjYW4gYmUgbXVsdGlsaW5lIGNvbXBhY3Qgc2VxdWVuY2Ugb3IgbWFwcGluZyBvciBzdHJpbmdcbiAgICAgICAgaWYgdmFsdWUuY2hhckF0KDApIGluIFsnWycsICd7JywgJ1wiJywgXCInXCJdXG4gICAgICAgICAgICB3aGlsZSB0cnVlXG4gICAgICAgICAgICAgICAgdHJ5XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBJbmxpbmUucGFyc2UgdmFsdWUsIGV4Y2VwdGlvbk9uSW52YWxpZFR5cGUsIG9iamVjdERlY29kZXJcbiAgICAgICAgICAgICAgICBjYXRjaCBlXG4gICAgICAgICAgICAgICAgICAgIGlmIGUgaW5zdGFuY2VvZiBQYXJzZU1vcmUgYW5kIEBtb3ZlVG9OZXh0TGluZSgpXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSArPSBcIlxcblwiICsgVXRpbHMudHJpbShAY3VycmVudExpbmUsICcgJylcbiAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgZS5wYXJzZWRMaW5lID0gQGdldFJlYWxDdXJyZW50TGluZU5iKCkgKyAxXG4gICAgICAgICAgICAgICAgICAgICAgICBlLnNuaXBwZXQgPSBAY3VycmVudExpbmVcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IGVcbiAgICAgICAgZWxzZVxuICAgICAgICAgICAgaWYgQGlzTmV4dExpbmVJbmRlbnRlZCgpXG4gICAgICAgICAgICAgICAgdmFsdWUgKz0gXCJcXG5cIiArIEBnZXROZXh0RW1iZWRCbG9jaygpXG4gICAgICAgICAgICByZXR1cm4gSW5saW5lLnBhcnNlIHZhbHVlLCBleGNlcHRpb25PbkludmFsaWRUeXBlLCBvYmplY3REZWNvZGVyXG5cbiAgICAgICAgcmV0dXJuXG5cblxuICAgICMgUGFyc2VzIGEgZm9sZGVkIHNjYWxhci5cbiAgICAjXG4gICAgIyBAcGFyYW0gW1N0cmluZ10gICAgICAgc2VwYXJhdG9yICAgVGhlIHNlcGFyYXRvciB0aGF0IHdhcyB1c2VkIHRvIGJlZ2luIHRoaXMgZm9sZGVkIHNjYWxhciAofCBvciA+KVxuICAgICMgQHBhcmFtIFtTdHJpbmddICAgICAgIGluZGljYXRvciAgIFRoZSBpbmRpY2F0b3IgdGhhdCB3YXMgdXNlZCB0byBiZWdpbiB0aGlzIGZvbGRlZCBzY2FsYXIgKCsgb3IgLSlcbiAgICAjIEBw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bmRlbnRhdGlvbiA9IG1hdGNoZXNbMF0ubGVuZ3RoXG5cblxuICAgICAgICBpZiBpbmRlbnRhdGlvbiA+IDBcbiAgICAgICAgICAgIHBhdHRlcm4gPSBAUEFUVEVSTl9GT0xERURfU0NBTEFSX0JZX0lOREVOVEFUSU9OW2luZGVudGF0aW9uXVxuICAgICAgICAgICAgdW5sZXNzIHBhdHRlcm4/XG4gICAgICAgICAgICAgICAgcGF0dGVybiA9IG5ldyBQYXR0ZXJuICdeIHsnK2luZGVudGF0aW9uKyd9KC4qKSQnXG4gICAgICAgICAgICAgICAgUGFyc2VyOjpQQVRURVJOX0ZPTERFRF9TQ0FMQVJfQllfSU5ERU5UQVRJT05baW5kZW50YXRpb25dID0gcGF0dGVyblxuXG4gICAgICAgICAgICB3aGlsZSBub3RFT0YgYW5kIChpc0N1cnJlbnRMaW5lQmxhbmsgb3IgbWF0Y2hlcyA9IHBhdHRlcm4uZXhlYyBAY3VycmVudExpbmUpXG4gICAgICAgICAgICAgICAgaWYgaXNDdXJyZW50TGluZUJsYW5rXG4gICAgICAgICAgICAgICAgICAgIHRleHQgKz0gQGN1cnJlbnRMaW5lW2luZGVudGF0aW9uLi5dXG4gICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICB0ZXh0ICs9IG1hdGNoZXNbMV1cblxuICAgICAgICAgICAgICAgICMgbmV3bGluZSBvbmx5IGlmIG5vdCBFT0ZcbiAgICAgICAgICAgICAgICBpZiBub3RFT0YgPSBAbW92ZVRvTmV4dExpbmUoKVxuICAgICAgICAgICAgICAgICAgICB0ZXh0ICs9IFwiXFxuXCJcbiAgICAgICAgICAgICAgICAgICAgaXNDdXJyZW50TGluZUJsYW5rID0gQGlzQ3VycmVudExpbmVCbGFuaygpXG5cbiAgICAgICAgZWxzZSBpZiBub3RFT0ZcbiAgICAgICAgICAgIHRleHQgKz0gXCJcXG5cIlxuXG5cbiAgICAgICAgaWYgbm90RU9GXG4gICAgICAgICAgICBAbW92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xsZXN0SW5kZW50IGlzIC0xIG9yIGluZGVudCA8IHNtYWxsZXN0SW5kZW50XG4gICAgICAgICAgICAgICAgc21hbGxlc3RJbmRlbnQgPSBpbmRlbnRcbiAgICAgICAgaWYgc21hbGxlc3RJbmRlbnQgPiAwXG4gICAgICAgICAgICBmb3IgbGluZSwgaSBpbiBsaW5lc1xuICAgICAgICAgICAgICAgIGxpbmVzW2ldID0gbGluZVtzbWFsbGVzdEluZGVudC4uXVxuICAgICAgICAgICAgdmFsdWUgPSBsaW5lcy5qb2luKFwiXFxuXCIpXG5cbiAgICAgICAgcmV0dXJuIHZhbHVlXG5cblxuICAgICMgUmV0dXJucyB0cnVlIGlmIHRoZSBuZXh0IGxpbmUgc3RhcnRzIHVuaW5kZW50ZWQgY29sbGVjdGlvblxuICAgICNcbiAgICAjIEByZXR1cm4gW0Jvb2xlYW5dICAgICBSZXR1cm5zIHRydWUgaWYgdGhlIG5leHQgbGluZSBzdGFydHMgdW5pbmRlbnRlZCBjb2xsZWN0aW9uLCBmYWxzZSBvdGhlcndpc2VcbiAgICAjXG4gICAgaXNOZXh0TGluZVVuSW5kZW50ZWRDb2xsZWN0aW9uOiAoY3VycmVudEluZGVudGF0aW9uID0gbnVsbCkgLT5cbiAgICAgICAgY3VycmVudEluZGVudGF0aW9uID89IEBnZXRDdXJyZW50TGluZUluZGVudGF0aW9uKClcbiAgICAgICAgbm90RU9GID0gQG1vdmVUb05leHRMaW5lKClcblxuICAgICAgICB3aGlsZSBub3RFT0YgYW5kIEBpc0N1cnJlbnRMaW5lRW1wdHkoKVxuICAgICAgICAgICAgbm90RU9GID0gQG1vdmVUb05leHRMaW5lKClcblxuICAgICAgICBpZiBmYWxzZSBpcyBub3RFT0ZcbiAgICAgICAgICAgIHJldHVybiBmYWxzZVxuXG4gICAgICAgIHJldCA9IGZhbHNlXG4gICAgICAgIGlmIEBnZXRDdXJyZW50TGluZUluZGVudGF0aW9uKCkgaXMgY3VycmVudEluZGVudGF0aW9uIGFu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cbiAgICAgICAgICAgICAgICAgICAgcGFydCA9IHJhd1JlZ2V4W2kuLmkrMl1cbiAgICAgICAgICAgICAgICAgICAgaWYgcGFydCBpcyAnKD86J1xuICAgICAgICAgICAgICAgICAgICAgICAgIyBOb24tY2FwdHVyaW5nIGJyYWNrZXRcbiAgICAgICAgICAgICAgICAgICAgICAgIGkgKz0gMlxuICAgICAgICAgICAgICAgICAgICAgICAgY2xlYW5lZFJlZ2V4ICs9IHBhcnRcbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiBwYXJ0IGlzICcoPzwnXG4gICAgICAgICAgICAgICAgICAgICAgICAjIENhcHR1cmluZyBicmFja2V0IHdpdGggcG9zc2libHkgYSBuYW1lXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXB0dXJpbmdCcmFja2V0TnVtYmVyKytcbiAgICAgICAgICAgICAgICAgICAgICAgIGkgKz0gMlxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZSA9ICcnXG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSBpICsgMSA8IGxlblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1YkNoYXIgPSByYXdSZWdleC5jaGFyQXQoaSArIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgc3ViQ2hhciBpcyAnPidcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYW5lZFJlZ2V4ICs9ICcoJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpKytcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgbmFtZS5sZW5ndGggPiAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjIEFzc29jaWF0ZSBhIG5hbWUgd2l0aCBhIGNhcHR1cmluZyBicmFja2V0IG51bWJlclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZyA/PSB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZ1tuYW1lXSA9IGNhcHR1cmluZ0JyYWNrZXROdW1iZXJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWUgKz0gc3ViQ2hhclxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaSsrXG4gICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFuZWRSZWdleCArPSBfY2hhclxuICAgICAgICAgICAgICAgICAgICAgICAgY2FwdHVyaW5nQnJhY2tldE51bWJlcisrXG4gICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICBjbGVhbmVkUmVnZXggKz0gX2NoYXJcbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICBjbGVhbmVkUmVnZXggKz0gX2NoYXJcblxuICAgICAgICAgICAgaSsrXG5cbiAgICAgICAgQHJhd1JlZ2V4ID0gcmF3UmVnZXhcbiAgICAgICAgQGNsZWFuZWRSZWdleCA9IGNsZWFuZWRSZWdleFxuICAgICAgICBAcmVnZXggPSBuZXcgUmVnRXhwIEBjbGVhbmVkUmVnZXgsICdnJyttb2RpZmllcnMucmVwbGFjZSgnZycsICcnKVxuICAgICAgICBAbWFwcGluZyA9IG1hcHBpbmdcblxuXG4gICAgIyBFeGVjdXRlcyB0aGUgcGF0dGVybidzIHJlZ2V4IGFuZCByZXR1cm5zIHRoZSBtYXRjaGluZyB2YWx1ZXNcbiAgICAjXG4gICAgIyBAcGFyYW0gW1N0cmluZ10gc3RyIFRoZSBzdHJpbmcgdG8gdXNlIHRvIGV4ZWN1dGUgdGhlIHBhdHRlcm5cbiAgICAjXG4gICAgIyBAcmV0dXJuIFtBcnJheV0gVGhlIG1hdGNoaW5nIHZhbHVlcyBleHRyYWN0ZWQgZnJvbSBjYXB0dXJpbmcgYnJhY2tld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SAtPlxuICAgICAgICBjaCA9IFN0cmluZy5mcm9tQ2hhckNvZGVcbiAgICAgICAgc3dpdGNoIHZhbHVlLmNoYXJBdCgxKVxuICAgICAgICAgICAgd2hlbiAnMCdcbiAgICAgICAgICAgICAgICByZXR1cm4gY2goMClcbiAgICAgICAgICAgIHdoZW4gJ2EnXG4gICAgICAgICAgICAgICAgcmV0dXJuIGNoKDcpXG4gICAgICAgICAgICB3aGVuICdiJ1xuICAgICAgICAgICAgICAgIHJldHVybiBjaCg4KVxuICAgICAgICAgICAgd2hlbiAndCdcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJcXHRcIlxuICAgICAgICAgICAgd2hlbiBcIlxcdFwiXG4gICAgICAgICAgICAgICAgcmV0dXJuIFwiXFx0XCJcbiAgICAgICAgICAgIHdoZW4gJ24nXG4gICAgICAgICAgICAgICAgcmV0dXJuIFwiXFxuXCJcbiAgICAgICAgICAgIHdoZW4gJ3YnXG4gICAgICAgICAgICAgICAgcmV0dXJuIGNoKDExKVxuICAgICAgICAgICAgd2hlbiAnZidcbiAgICAgICAgICAgICAgICByZXR1cm4gY2goMTIpXG4gICAgICAgICAgICB3aGVuICdyJ1xuICAgICAgICAgICAgICAgIHJldHVybiBjaCgxMylcbiAgICAgICAgICAgIHdoZW4gJ2UnXG4gICAgICAgICAgICAgICAgcmV0dXJuIGNoKDI3KVxuICAgICAgICAgICAgd2hlbiAnICdcbiAgICAgICAgICAgICAgICByZXR1cm4gJyAnXG4gICAgICAgICAgICB3aGVuICdcIidcbiAgICAgICAgICAgICAgICByZXR1cm4gJ1wiJ1xuICAgICAgICAgICAgd2hlbiAnLydcbiAgICAgICAgICAgICAgICByZXR1cm4gJy8nXG4gICAgICAgICAgICB3aGVuICdcXFxcJ1xuICAgICAgICAgICAgICAgIHJldHVybiAnXFxcXCdcbiAgICAgICAgICAgIHdoZW4gJ04nXG4gICAgICAgICAgICAgICAgIyBVKzAwODUgTkVYVCBMSU5FXG4gICAgICAgICAgICAgICAgc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X1NQQUNFUzogICAgICAgICAgICAgIC9cXHMrL2dcbiAgICBAUkVHRVhfRElHSVRTOiAgICAgICAgICAgICAgL15cXGQrJC9cbiAgICBAUkVHRVhfT0NUQUw6ICAgICAgICAgICAgICAgL1teMC03XS9naVxuICAgIEBSRUdFWF9IRVhBREVDSU1BTDogICAgICAgICAvW15hLWYwLTldL2dpXG5cbiAgICAjIFByZWNvbXBpbGVkIGRhdGUgcGF0dGVyblxuICAgIEBQQVRURVJOX0RBVEU6ICAgICAgICAgICAgICBuZXcgUGF0dGVybiAnXicrXG4gICAgICAgICAgICAnKD88eWVhcj5bMC05XVswLTldWzAtOV1bMC05XSknK1xuICAgICAgICAgICAgJy0oPzxtb250aD5bMC05XVswLTldPyknK1xuICAgICAgICAgICAgJy0oPzxkYXk+WzAtOV1bMC05XT8pJytcbiAgICAgICAgICAgICcoPzooPzpbVHRdfFsgXFx0XSspJytcbiAgICAgICAgICAgICcoPzxob3VyPlswLTldWzAtOV0/KScrXG4gICAgICAgICAgICAnOig/PG1pbnV0ZT5bMC05XVswLTldKScrXG4gICAgICAgICAgICAnOig/PHNlY29uZD5bMC05XVswLTldKScrXG4gICAgICAgICAgICAnKD86XFwuKD88ZnJhY3Rpb24+WzAtOV0qKSk/JytcbiAgICAgICAgICAgICcoPzpbIFxcdF0qKD88dHo+WnwoPzx0el9zaWduPlstK10pKD88dHpfaG91cj5bMC05XVswLTldPyknK1xuICAgICAgICAgICAgJyg/OjooPzx0el9taW51dGU+WzAtOV1bMC05XSkpPykpPyk/JytcbiAgICAgICAgICAgICckJywgJ2knXG5cbiAgICAjIExvY2FsIHRpbWV6b25lIG9mZnNldCBpbiBtc1xuICAgIEBMT0NBTF9USU1FWk9ORV9PRkZTRVQ6ICAgICBuZXcgRGF0ZSgpLmdldFRpbWV6b25lT2Zmc2V0KCkgKiA2MCAqIDEwMDBcblxuICAgICMgVHJpbXMgdGhlIGdpdmVuIHN0cmluZyBvbiBib3RoIHNpZGVzXG4gICAgI1xu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zIGdpdmVuLCByZXR1cm4gYSBkYXRlIHdpdGggZGF5IHByZWNpc2lvblxuICAgICAgICB1bmxlc3MgaW5mby5ob3VyP1xuICAgICAgICAgICAgZGF0ZSA9IG5ldyBEYXRlIERhdGUuVVRDKHllYXIsIG1vbnRoLCBkYXkpXG4gICAgICAgICAgICByZXR1cm4gZGF0ZVxuXG4gICAgICAgICMgRXh0cmFjdCBob3VyLCBtaW51dGUsIHNlY29uZFxuICAgICAgICBob3VyID0gcGFyc2VJbnQgaW5mby5ob3VyLCAxMFxuICAgICAgICBtaW51dGUgPSBwYXJzZUludCBpbmZvLm1pbnV0ZSwgMTBcbiAgICAgICAgc2Vjb25kID0gcGFyc2VJbnQgaW5mby5zZWNvbmQsIDEwXG5cbiAgICAgICAgIyBFeHRyYWN0IGZyYWN0aW9uLCBpZiBnaXZlblxuICAgICAgICBpZiBpbmZvLmZyYWN0aW9uP1xuICAgICAgICAgICAgZnJhY3Rpb24gPSBpbmZvLmZyYWN0aW9uWzAuLi4zXVxuICAgICAgICAgICAgd2hpbGUgZnJhY3Rpb24ubGVuZ3RoIDwgM1xuICAgICAgICAgICAgICAgIGZyYWN0aW9uICs9ICcwJ1xuICAgICAgICAgICAgZnJhY3Rpb24gPSBwYXJzZUludCBmcmFjdGlvbiwgMTBcbiAgICAgICAgZWxzZVxuICAgICAgICAgICAgZnJhY3Rpb24gPSAwXG5cbiAgICAgICAgIyBDb21wdXRlIHRpbWV6b25lIG9mZnNldCBpZiBnaXZlblxuICAgICAgICBpZiBpbmZvLnR6P1xuICAgICAgICAgICAgdHpfaG91ciA9IHBhcnNlSW50IGluZm8udHpfaG91ciwgMTBcbiAgICAgICAgICAgIGlmIGluZm8udHpfbWludXRlP1xuICAgICAgICAgICAgICAgIHR6X21pbnV0ZSA9IHBhcnNlSW50IGluZm8udHpfbWludXRlLCAxMFxuICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgIHR6X21pbnV0ZSA9IDBcblxuICAgICAgICAgICAg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dWx0IGFzIHN0cmluZ1xuICAgICNcbiAgICAjIEBwYXJhbSBbU3RyaW5nXSAgIHBhdGggICAgICAgIFRoZSBwYXRoIHRvIHRoZSBmaWxlXG4gICAgIyBAcGFyYW0gW0Z1bmN0aW9uXSBjYWxsYmFjayAgICBBIGNhbGxiYWNrIHRvIHJlYWQgZmlsZSBhc3luY2hyb25vdXNseSAob3B0aW9uYWwpXG4gICAgI1xuICAgICMgQHJldHVybiBbU3RyaW5nXSAgVGhlIHJlc3VsdGluZyBkYXRhIGFzIHN0cmluZ1xuICAgICNcbiAgICBAZ2V0U3RyaW5nRnJvbUZpbGU6IChwYXRoLCBjYWxsYmFjayA9IG51bGwpIC0+XG4gICAgICAgIHhociA9IG51bGxcbiAgICAgICAgaWYgd2luZG93P1xuICAgICAgICAgICAgaWYgd2luZG93LlhNTEh0dHBSZXF1ZXN0XG4gICAgICAgICAgICAgICAgeGhyID0gbmV3IFhNTEh0dHBSZXF1ZXN0KClcbiAgICAgICAgICAgIGVsc2UgaWYgd2luZG93LkFjdGl2ZVhPYmplY3RcbiAgICAgICAgICAgICAgICBmb3IgbmFtZSBpbiBbXCJNc3htbDIuWE1MSFRUUC42LjBcIiwgXCJNc3htbDIuWE1MSFRUUC4zLjBcIiwgXCJNc3htbDIuWE1MSFRUUFwiLCBcIk1pY3Jvc29mdC5YTUxIVFRQXCJdXG4gICAgICAgICAgICAgICAgICAgIHRyeVxuICAgICAgICAgICAgICAgICAgICAgICAgeGhyID0gbmV3IEFjdGl2ZVhPYmplY3QobmFtZSlcblxuICAgICAgICBpZiB4aHI/XG4gICAgICAgICAgICAjIEJyb3dzZXJcbiAgICAgICAgICAgIGlmIGNhbGxiYWNrP1xuICAgICAgICAgICAgICAgICMgQXN5bmNcbiAgICAgICAgICAgICAgICB4aHIub25yZWFkeXN0YXRlY2hhbmdlID0gLT5cbiAgICAgICAgICAgICAgICAgICAgaWYgeGhyLnJlYWR5U3RhdGUgaXMgNFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgeGhyLnN0YXR1cyBpcyAyMDAgb3IgeGhyLnN0YXR1cyBpcyAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2soeGhyLnJlc3BvbnNlVGV4dClcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFjayhudWxsKVxuICAgICAgICAgICAgICAgIHhoci5vcGVuICdHRVQnLCBwYXRoLCB0cnVlXG4gICAgICAgICAgICAgICAgeGhyLnNlbmQgbnVsbFxuXG4gICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgIyBTeW5jXG4gICAgICAgICAgICAgICAgeGhyLm9wZW4gJ0dFVCcsIHBhdGgsIGZhbHNlXG4gICAgICAgICAgICAgICAgeGhyLnNlbmQgbnVsbFxuXG4gICAgICAgICAgICAgICAgaWYgeGhyLnN0YXR1cyBpcyAyMDAgb3IgeGhyLnN0YXR1cyA9PSAwXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB4aHIucmVzcG9uc2VUZXh0XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbFxuICAgICAgICBlbHNlXG4gICAgICAgICAgICAjIE5vZGUuanMtbGlrZVxuICAgICAgICAgICAgcmVxID0gcmVxdWlyZVxuICAgICAgICAgICAgZnMgPSByZXEoJ2ZzJykgIyBQcmV2ZW50IGJyb3dzZXJpZnkgZnJvbSB0cnlpbmcgdG8gbG9hZCAnZnMnIG1vZHVsZVxuICAgICAgICAgICAgaWYgY2FsbGJhY2s/XG4gICAgICAgICAgICAgICAgIyBBc3luY1xuICAgICAgICAgICAgICAgIGZzLnJlYWRGaWxlIHBhdGgsIChlcnIsIGRhdGEpIC0+XG4gICAgICAgICAgICAgICAgICAgIGlmIGVyclxuICAgICAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2sgbnVsbFxuICAgICAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgIC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ZS5leHRlbnNpb25zWycueW1sJ10gPSByZXF1aXJlX2hhbmRsZXJcbiAgICAgICAgICAgIHJlcXVpcmUuZXh0ZW5zaW9uc1snLnlhbWwnXSA9IHJlcXVpcmVfaGFuZGxlclxuXG5cbiAgICAjIEFsaWFzIG9mIGR1bXAoKSBtZXRob2QgZm9yIGNvbXBhdGliaWxpdHkgcmVhc29ucy5cbiAgICAjXG4gICAgQHN0cmluZ2lmeTogKGlucHV0LCBpbmxpbmUsIGluZGVudCwgZXhjZXB0aW9uT25JbnZhbGlkVHlwZSwgb2JqZWN0RW5jb2RlcikgLT5cbiAgICAgICAgcmV0dXJuIEBkdW1wIGlucHV0LCBpbmxpbmUsIGluZGVudCwgZXhjZXB0aW9uT25JbnZhbGlkVHlwZSwgb2JqZWN0RW5jb2RlclxuXG5cbiAgICAjIEFsaWFzIG9mIHBhcnNlRmlsZSgpIG1ldGhvZCBmb3IgY29tcGF0aWJpbGl0eSByZWFzb25zLlxuICAgICNcbiAgICBAbG9hZDogKHBhdGgsIGNhbGxiYWNrLCBleGNlcHRpb25PbkludmFsaWRUeXBlLCBvYmplY3REZWNvZGVyKSAtPlxuICAgICAgICByZXR1cm4gQHBhcnNlRmlsZSBwYXRoLCBjYWxsYmFjaywgZXhjZXB0aW9uT25JbnZhbGlkVHlwZSwgb2JqZWN0RGVjb2RlclxuXG5cbiMgRXhwb3NlIFlBTUwgbmFtZXNwYWNlIHRvIGJyb3dzZXJcbndpbmRvdz8uWUFNTCA9IFlhbWxcblxuIyBOb3QgaW4gdGhlIGJyb3dzZXI/XG51bmxlc3Mgd2luZG93P1xuICAgIEBZQU1MID0gWWFtbFxuXG5tb2R1bGUuZXhwb3J0cyA9IFlhbWxcbiJdfQ== diff --git a/node_modules/yamljs/dist/yaml.js b/node_modules/yamljs/dist/yaml.js deleted file mode 100644 index 5e07c9e..0000000 --- a/node_modules/yamljs/dist/yaml.js +++ /dev/null @@ -1,1904 +0,0 @@ -(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 ref; i = 0 <= ref ? ++j : --j) { - mapping[Escaper.LIST_ESCAPEES[i]] = Escaper.LIST_ESCAPED[i]; - } - return mapping; - })(); - - Escaper.PATTERN_CHARACTERS_TO_ESCAPE = new Pattern('[\\x00-\\x1f]|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9'); - - Escaper.PATTERN_MAPPING_ESCAPEES = new Pattern(Escaper.LIST_ESCAPEES.join('|').split('\\').join('\\\\')); - - Escaper.PATTERN_SINGLE_QUOTING = new Pattern('[\\s\'":{}[\\],&*#?]|^[-?|<>=!%@`]'); - - Escaper.requiresDoubleQuoting = function(value) { - return this.PATTERN_CHARACTERS_TO_ESCAPE.test(value); - }; - - Escaper.escapeWithDoubleQuotes = function(value) { - var result; - result = this.PATTERN_MAPPING_ESCAPEES.replace(value, (function(_this) { - return function(str) { - return _this.MAPPING_ESCAPEES_TO_ESCAPED[str]; - }; - })(this)); - return '"' + result + '"'; - }; - - Escaper.requiresSingleQuoting = function(value) { - return this.PATTERN_SINGLE_QUOTING.test(value); - }; - - Escaper.escapeWithSingleQuotes = function(value) { - return "'" + value.replace(/'/g, "''") + "'"; - }; - - return Escaper; - -})(); - -module.exports = Escaper; - - -},{"./Pattern":8}],3:[function(require,module,exports){ -var DumpException, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - -DumpException = (function(superClass) { - extend(DumpException, superClass); - - function DumpException(message, parsedLine, snippet) { - this.message = message; - this.parsedLine = parsedLine; - this.snippet = snippet; - } - - DumpException.prototype.toString = function() { - if ((this.parsedLine != null) && (this.snippet != null)) { - return ' ' + this.message + ' (line ' + this.parsedLine + ': \'' + this.snippet + '\')'; - } else { - return ' ' + this.message; - } - }; - - return DumpException; - -})(Error); - -module.exports = DumpException; - - -},{}],4:[function(require,module,exports){ -var ParseException, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - -ParseException = (function(superClass) { - extend(ParseException, superClass); - - function ParseException(message, parsedLine, snippet) { - this.message = message; - this.parsedLine = parsedLine; - this.snippet = snippet; - } - - ParseException.prototype.toString = function() { - if ((this.parsedLine != null) && (this.snippet != null)) { - return ' ' + this.message + ' (line ' + this.parsedLine + ': \'' + this.snippet + '\')'; - } else { - return ' ' + this.message; - } - }; - - return ParseException; - -})(Error); - -module.exports = ParseException; - - -},{}],5:[function(require,module,exports){ -var ParseMore, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - -ParseMore = (function(superClass) { - extend(ParseMore, superClass); - - function ParseMore(message, parsedLine, snippet) { - this.message = message; - this.parsedLine = parsedLine; - this.snippet = snippet; - } - - ParseMore.prototype.toString = function() { - if ((this.parsedLine != null) && (this.snippet != null)) { - return ' ' + this.message + ' (line ' + this.parsedLine + ': \'' + this.snippet + '\')'; - } else { - return ' ' + this.message; - } - }; - - return ParseMore; - -})(Error); - -module.exports = ParseMore; - - -},{}],6:[function(require,module,exports){ -var DumpException, Escaper, Inline, ParseException, ParseMore, Pattern, Unescaper, Utils, - indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - -Pattern = require('./Pattern'); - -Unescaper = require('./Unescaper'); - -Escaper = require('./Escaper'); - -Utils = require('./Utils'); - -ParseException = require('./Exception/ParseException'); - -ParseMore = require('./Exception/ParseMore'); - -DumpException = require('./Exception/DumpException'); - -Inline = (function() { - function Inline() {} - - Inline.REGEX_QUOTED_STRING = '(?:"(?:[^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'(?:[^\']*(?:\'\'[^\']*)*)\')'; - - Inline.PATTERN_TRAILING_COMMENTS = new Pattern('^\\s*#.*$'); - - Inline.PATTERN_QUOTED_SCALAR = new Pattern('^' + Inline.REGEX_QUOTED_STRING); - - Inline.PATTERN_THOUSAND_NUMERIC_SCALAR = new Pattern('^(-|\\+)?[0-9,]+(\\.[0-9]+)?$'); - - Inline.PATTERN_SCALAR_BY_DELIMITERS = {}; - - Inline.settings = {}; - - Inline.configure = function(exceptionOnInvalidType, objectDecoder) { - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = null; - } - if (objectDecoder == null) { - objectDecoder = null; - } - this.settings.exceptionOnInvalidType = exceptionOnInvalidType; - this.settings.objectDecoder = objectDecoder; - }; - - Inline.parse = function(value, exceptionOnInvalidType, objectDecoder) { - var context, result; - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = false; - } - if (objectDecoder == null) { - objectDecoder = null; - } - this.settings.exceptionOnInvalidType = exceptionOnInvalidType; - this.settings.objectDecoder = objectDecoder; - if (value == null) { - return ''; - } - value = Utils.trim(value); - if (0 === value.length) { - return ''; - } - context = { - exceptionOnInvalidType: exceptionOnInvalidType, - objectDecoder: objectDecoder, - i: 0 - }; - switch (value.charAt(0)) { - case '[': - result = this.parseSequence(value, context); - ++context.i; - break; - case '{': - result = this.parseMapping(value, context); - ++context.i; - break; - default: - result = this.parseScalar(value, null, ['"', "'"], context); - } - if (this.PATTERN_TRAILING_COMMENTS.replace(value.slice(context.i), '') !== '') { - throw new ParseException('Unexpected characters near "' + value.slice(context.i) + '".'); - } - return result; - }; - - Inline.dump = function(value, exceptionOnInvalidType, objectEncoder) { - var ref, result, type; - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = false; - } - if (objectEncoder == null) { - objectEncoder = null; - } - if (value == null) { - return 'null'; - } - type = typeof value; - if (type === 'object') { - if (value instanceof Date) { - return value.toISOString(); - } else if (objectEncoder != null) { - result = objectEncoder(value); - if (typeof result === 'string' || (result != null)) { - return result; - } - } - return this.dumpObject(value); - } - if (type === 'boolean') { - return (value ? 'true' : 'false'); - } - if (Utils.isDigits(value)) { - return (type === 'string' ? "'" + value + "'" : String(parseInt(value))); - } - if (Utils.isNumeric(value)) { - return (type === 'string' ? "'" + value + "'" : String(parseFloat(value))); - } - if (type === 'number') { - return (value === Infinity ? '.Inf' : (value === -Infinity ? '-.Inf' : (isNaN(value) ? '.NaN' : value))); - } - if (Escaper.requiresDoubleQuoting(value)) { - return Escaper.escapeWithDoubleQuotes(value); - } - if (Escaper.requiresSingleQuoting(value)) { - return Escaper.escapeWithSingleQuotes(value); - } - if ('' === value) { - return '""'; - } - if (Utils.PATTERN_DATE.test(value)) { - return "'" + value + "'"; - } - if ((ref = value.toLowerCase()) === 'null' || ref === '~' || ref === 'true' || ref === 'false') { - return "'" + value + "'"; - } - return value; - }; - - Inline.dumpObject = function(value, exceptionOnInvalidType, objectSupport) { - var j, key, len1, output, val; - if (objectSupport == null) { - objectSupport = null; - } - if (value instanceof Array) { - output = []; - for (j = 0, len1 = value.length; j < len1; j++) { - val = value[j]; - output.push(this.dump(val)); - } - return '[' + output.join(', ') + ']'; - } else { - output = []; - for (key in value) { - val = value[key]; - output.push(this.dump(key) + ': ' + this.dump(val)); - } - return '{' + output.join(', ') + '}'; - } - }; - - Inline.parseScalar = function(scalar, delimiters, stringDelimiters, context, evaluate) { - var i, joinedDelimiters, match, output, pattern, ref, ref1, strpos, tmp; - if (delimiters == null) { - delimiters = null; - } - if (stringDelimiters == null) { - stringDelimiters = ['"', "'"]; - } - if (context == null) { - context = null; - } - if (evaluate == null) { - evaluate = true; - } - if (context == null) { - context = { - exceptionOnInvalidType: this.settings.exceptionOnInvalidType, - objectDecoder: this.settings.objectDecoder, - i: 0 - }; - } - i = context.i; - if (ref = scalar.charAt(i), indexOf.call(stringDelimiters, ref) >= 0) { - output = this.parseQuotedScalar(scalar, context); - i = context.i; - if (delimiters != null) { - tmp = Utils.ltrim(scalar.slice(i), ' '); - if (!(ref1 = tmp.charAt(0), indexOf.call(delimiters, ref1) >= 0)) { - throw new ParseException('Unexpected characters (' + scalar.slice(i) + ').'); - } - } - } else { - if (!delimiters) { - output = scalar.slice(i); - i += output.length; - strpos = output.indexOf(' #'); - if (strpos !== -1) { - output = Utils.rtrim(output.slice(0, strpos)); - } - } else { - joinedDelimiters = delimiters.join('|'); - pattern = this.PATTERN_SCALAR_BY_DELIMITERS[joinedDelimiters]; - if (pattern == null) { - pattern = new Pattern('^(.+?)(' + joinedDelimiters + ')'); - this.PATTERN_SCALAR_BY_DELIMITERS[joinedDelimiters] = pattern; - } - if (match = pattern.exec(scalar.slice(i))) { - output = match[1]; - i += output.length; - } else { - throw new ParseException('Malformed inline YAML string (' + scalar + ').'); - } - } - if (evaluate) { - output = this.evaluateScalar(output, context); - } - } - context.i = i; - return output; - }; - - Inline.parseQuotedScalar = function(scalar, context) { - var i, match, output; - i = context.i; - if (!(match = this.PATTERN_QUOTED_SCALAR.exec(scalar.slice(i)))) { - throw new ParseMore('Malformed inline YAML string (' + scalar.slice(i) + ').'); - } - output = match[0].substr(1, match[0].length - 2); - if ('"' === scalar.charAt(i)) { - output = Unescaper.unescapeDoubleQuotedString(output); - } else { - output = Unescaper.unescapeSingleQuotedString(output); - } - i += match[0].length; - context.i = i; - return output; - }; - - Inline.parseSequence = function(sequence, context) { - var e, error, i, isQuoted, len, output, ref, value; - output = []; - len = sequence.length; - i = context.i; - i += 1; - while (i < len) { - context.i = i; - switch (sequence.charAt(i)) { - case '[': - output.push(this.parseSequence(sequence, context)); - i = context.i; - break; - case '{': - output.push(this.parseMapping(sequence, context)); - i = context.i; - break; - case ']': - return output; - case ',': - case ' ': - case "\n": - break; - default: - isQuoted = ((ref = sequence.charAt(i)) === '"' || ref === "'"); - value = this.parseScalar(sequence, [',', ']'], ['"', "'"], context); - i = context.i; - if (!isQuoted && typeof value === 'string' && (value.indexOf(': ') !== -1 || value.indexOf(":\n") !== -1)) { - try { - value = this.parseMapping('{' + value + '}'); - } catch (error) { - e = error; - } - } - output.push(value); - --i; - } - ++i; - } - throw new ParseMore('Malformed inline YAML string ' + sequence); - }; - - Inline.parseMapping = function(mapping, context) { - var done, i, key, len, output, shouldContinueWhileLoop, value; - output = {}; - len = mapping.length; - i = context.i; - i += 1; - shouldContinueWhileLoop = false; - while (i < len) { - context.i = i; - switch (mapping.charAt(i)) { - case ' ': - case ',': - case "\n": - ++i; - context.i = i; - shouldContinueWhileLoop = true; - break; - case '}': - return output; - } - if (shouldContinueWhileLoop) { - shouldContinueWhileLoop = false; - continue; - } - key = this.parseScalar(mapping, [':', ' ', "\n"], ['"', "'"], context, false); - i = context.i; - done = false; - while (i < len) { - context.i = i; - switch (mapping.charAt(i)) { - case '[': - value = this.parseSequence(mapping, context); - i = context.i; - if (output[key] === void 0) { - output[key] = value; - } - done = true; - break; - case '{': - value = this.parseMapping(mapping, context); - i = context.i; - if (output[key] === void 0) { - output[key] = value; - } - done = true; - break; - case ':': - case ' ': - case "\n": - break; - default: - value = this.parseScalar(mapping, [',', '}'], ['"', "'"], context); - i = context.i; - if (output[key] === void 0) { - output[key] = value; - } - done = true; - --i; - } - ++i; - if (done) { - break; - } - } - } - throw new ParseMore('Malformed inline YAML string ' + mapping); - }; - - Inline.evaluateScalar = function(scalar, context) { - var cast, date, exceptionOnInvalidType, firstChar, firstSpace, firstWord, objectDecoder, raw, scalarLower, subValue, trimmedScalar; - scalar = Utils.trim(scalar); - scalarLower = scalar.toLowerCase(); - switch (scalarLower) { - case 'null': - case '': - case '~': - return null; - case 'true': - return true; - case 'false': - return false; - case '.inf': - return Infinity; - case '.nan': - return NaN; - case '-.inf': - return Infinity; - default: - firstChar = scalarLower.charAt(0); - switch (firstChar) { - case '!': - firstSpace = scalar.indexOf(' '); - if (firstSpace === -1) { - firstWord = scalarLower; - } else { - firstWord = scalarLower.slice(0, firstSpace); - } - switch (firstWord) { - case '!': - if (firstSpace !== -1) { - return parseInt(this.parseScalar(scalar.slice(2))); - } - return null; - case '!str': - return Utils.ltrim(scalar.slice(4)); - case '!!str': - return Utils.ltrim(scalar.slice(5)); - case '!!int': - return parseInt(this.parseScalar(scalar.slice(5))); - case '!!bool': - return Utils.parseBoolean(this.parseScalar(scalar.slice(6)), false); - case '!!float': - return parseFloat(this.parseScalar(scalar.slice(7))); - case '!!timestamp': - return Utils.stringToDate(Utils.ltrim(scalar.slice(11))); - default: - if (context == null) { - context = { - exceptionOnInvalidType: this.settings.exceptionOnInvalidType, - objectDecoder: this.settings.objectDecoder, - i: 0 - }; - } - objectDecoder = context.objectDecoder, exceptionOnInvalidType = context.exceptionOnInvalidType; - if (objectDecoder) { - trimmedScalar = Utils.rtrim(scalar); - firstSpace = trimmedScalar.indexOf(' '); - if (firstSpace === -1) { - return objectDecoder(trimmedScalar, null); - } else { - subValue = Utils.ltrim(trimmedScalar.slice(firstSpace + 1)); - if (!(subValue.length > 0)) { - subValue = null; - } - return objectDecoder(trimmedScalar.slice(0, firstSpace), subValue); - } - } - if (exceptionOnInvalidType) { - throw new ParseException('Custom object support when parsing a YAML file has been disabled.'); - } - return null; - } - break; - case '0': - if ('0x' === scalar.slice(0, 2)) { - return Utils.hexDec(scalar); - } else if (Utils.isDigits(scalar)) { - return Utils.octDec(scalar); - } else if (Utils.isNumeric(scalar)) { - return parseFloat(scalar); - } else { - return scalar; - } - break; - case '+': - if (Utils.isDigits(scalar)) { - raw = scalar; - cast = parseInt(raw); - if (raw === String(cast)) { - return cast; - } else { - return raw; - } - } else if (Utils.isNumeric(scalar)) { - return parseFloat(scalar); - } else if (this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(scalar)) { - return parseFloat(scalar.replace(',', '')); - } - return scalar; - case '-': - if (Utils.isDigits(scalar.slice(1))) { - if ('0' === scalar.charAt(1)) { - return -Utils.octDec(scalar.slice(1)); - } else { - raw = scalar.slice(1); - cast = parseInt(raw); - if (raw === String(cast)) { - return -cast; - } else { - return -raw; - } - } - } else if (Utils.isNumeric(scalar)) { - return parseFloat(scalar); - } else if (this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(scalar)) { - return parseFloat(scalar.replace(',', '')); - } - return scalar; - default: - if (date = Utils.stringToDate(scalar)) { - return date; - } else if (Utils.isNumeric(scalar)) { - return parseFloat(scalar); - } else if (this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(scalar)) { - return parseFloat(scalar.replace(',', '')); - } - return scalar; - } - } - }; - - return Inline; - -})(); - -module.exports = Inline; - - -},{"./Escaper":2,"./Exception/DumpException":3,"./Exception/ParseException":4,"./Exception/ParseMore":5,"./Pattern":8,"./Unescaper":9,"./Utils":10}],7:[function(require,module,exports){ -var Inline, ParseException, ParseMore, Parser, Pattern, Utils; - -Inline = require('./Inline'); - -Pattern = require('./Pattern'); - -Utils = require('./Utils'); - -ParseException = require('./Exception/ParseException'); - -ParseMore = require('./Exception/ParseMore'); - -Parser = (function() { - Parser.prototype.PATTERN_FOLDED_SCALAR_ALL = new Pattern('^(?:(?![^\\|>]*)\\s+)?(?\\||>)(?\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(? +#.*)?$'); - - Parser.prototype.PATTERN_FOLDED_SCALAR_END = new Pattern('(?\\||>)(?\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(? +#.*)?$'); - - Parser.prototype.PATTERN_SEQUENCE_ITEM = new Pattern('^\\-((?\\s+)(?.+?))?\\s*$'); - - Parser.prototype.PATTERN_ANCHOR_VALUE = new Pattern('^&(?[^ ]+) *(?.*)'); - - Parser.prototype.PATTERN_COMPACT_NOTATION = new Pattern('^(?' + Inline.REGEX_QUOTED_STRING + '|[^ \'"\\{\\[].*?) *\\:(\\s+(?.+?))?\\s*$'); - - Parser.prototype.PATTERN_MAPPING_ITEM = new Pattern('^(?' + Inline.REGEX_QUOTED_STRING + '|[^ \'"\\[\\{].*?) *\\:(\\s+(?.+?))?\\s*$'); - - Parser.prototype.PATTERN_DECIMAL = new Pattern('\\d+'); - - Parser.prototype.PATTERN_INDENT_SPACES = new Pattern('^ +'); - - Parser.prototype.PATTERN_TRAILING_LINES = new Pattern('(\n*)$'); - - Parser.prototype.PATTERN_YAML_HEADER = new Pattern('^\\%YAML[: ][\\d\\.]+.*\n', 'm'); - - Parser.prototype.PATTERN_LEADING_COMMENTS = new Pattern('^(\\#.*?\n)+', 'm'); - - Parser.prototype.PATTERN_DOCUMENT_MARKER_START = new Pattern('^\\-\\-\\-.*?\n', 'm'); - - Parser.prototype.PATTERN_DOCUMENT_MARKER_END = new Pattern('^\\.\\.\\.\\s*$', 'm'); - - Parser.prototype.PATTERN_FOLDED_SCALAR_BY_INDENTATION = {}; - - Parser.prototype.CONTEXT_NONE = 0; - - Parser.prototype.CONTEXT_SEQUENCE = 1; - - Parser.prototype.CONTEXT_MAPPING = 2; - - function Parser(offset) { - this.offset = offset != null ? offset : 0; - this.lines = []; - this.currentLineNb = -1; - this.currentLine = ''; - this.refs = {}; - } - - Parser.prototype.parse = function(value, exceptionOnInvalidType, objectDecoder) { - var alias, allowOverwrite, block, c, context, data, e, error, error1, error2, first, i, indent, isRef, j, k, key, l, lastKey, len, len1, len2, len3, lineCount, m, matches, mergeNode, n, name, parsed, parsedItem, parser, ref, ref1, ref2, refName, refValue, val, values; - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = false; - } - if (objectDecoder == null) { - objectDecoder = null; - } - this.currentLineNb = -1; - this.currentLine = ''; - this.lines = this.cleanup(value).split("\n"); - data = null; - context = this.CONTEXT_NONE; - allowOverwrite = false; - while (this.moveToNextLine()) { - if (this.isCurrentLineEmpty()) { - continue; - } - if ("\t" === this.currentLine[0]) { - throw new ParseException('A YAML file cannot contain tabs as indentation.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - isRef = mergeNode = false; - if (values = this.PATTERN_SEQUENCE_ITEM.exec(this.currentLine)) { - if (this.CONTEXT_MAPPING === context) { - throw new ParseException('You cannot define a sequence item when in a mapping'); - } - context = this.CONTEXT_SEQUENCE; - if (data == null) { - data = []; - } - if ((values.value != null) && (matches = this.PATTERN_ANCHOR_VALUE.exec(values.value))) { - isRef = matches.ref; - values.value = matches.value; - } - if (!(values.value != null) || '' === Utils.trim(values.value, ' ') || Utils.ltrim(values.value, ' ').indexOf('#') === 0) { - if (this.currentLineNb < this.lines.length - 1 && !this.isNextLineUnIndentedCollection()) { - c = this.getRealCurrentLineNb() + 1; - parser = new Parser(c); - parser.refs = this.refs; - data.push(parser.parse(this.getNextEmbedBlock(null, true), exceptionOnInvalidType, objectDecoder)); - } else { - data.push(null); - } - } else { - if (((ref = values.leadspaces) != null ? ref.length : void 0) && (matches = this.PATTERN_COMPACT_NOTATION.exec(values.value))) { - c = this.getRealCurrentLineNb(); - parser = new Parser(c); - parser.refs = this.refs; - block = values.value; - indent = this.getCurrentLineIndentation(); - if (this.isNextLineIndented(false)) { - block += "\n" + this.getNextEmbedBlock(indent + values.leadspaces.length + 1, true); - } - data.push(parser.parse(block, exceptionOnInvalidType, objectDecoder)); - } else { - data.push(this.parseValue(values.value, exceptionOnInvalidType, objectDecoder)); - } - } - } else if ((values = this.PATTERN_MAPPING_ITEM.exec(this.currentLine)) && values.key.indexOf(' #') === -1) { - if (this.CONTEXT_SEQUENCE === context) { - throw new ParseException('You cannot define a mapping item when in a sequence'); - } - context = this.CONTEXT_MAPPING; - if (data == null) { - data = {}; - } - Inline.configure(exceptionOnInvalidType, objectDecoder); - try { - key = Inline.parseScalar(values.key); - } catch (error) { - e = error; - e.parsedLine = this.getRealCurrentLineNb() + 1; - e.snippet = this.currentLine; - throw e; - } - if ('<<' === key) { - mergeNode = true; - allowOverwrite = true; - if (((ref1 = values.value) != null ? ref1.indexOf('*') : void 0) === 0) { - refName = values.value.slice(1); - if (this.refs[refName] == null) { - throw new ParseException('Reference "' + refName + '" does not exist.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - refValue = this.refs[refName]; - if (typeof refValue !== 'object') { - throw new ParseException('YAML merge keys used with a scalar value instead of an object.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - if (refValue instanceof Array) { - for (i = j = 0, len = refValue.length; j < len; i = ++j) { - value = refValue[i]; - if (data[name = String(i)] == null) { - data[name] = value; - } - } - } else { - for (key in refValue) { - value = refValue[key]; - if (data[key] == null) { - data[key] = value; - } - } - } - } else { - if ((values.value != null) && values.value !== '') { - value = values.value; - } else { - value = this.getNextEmbedBlock(); - } - c = this.getRealCurrentLineNb() + 1; - parser = new Parser(c); - parser.refs = this.refs; - parsed = parser.parse(value, exceptionOnInvalidType); - if (typeof parsed !== 'object') { - throw new ParseException('YAML merge keys used with a scalar value instead of an object.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - if (parsed instanceof Array) { - for (l = 0, len1 = parsed.length; l < len1; l++) { - parsedItem = parsed[l]; - if (typeof parsedItem !== 'object') { - throw new ParseException('Merge items must be objects.', this.getRealCurrentLineNb() + 1, parsedItem); - } - if (parsedItem instanceof Array) { - for (i = m = 0, len2 = parsedItem.length; m < len2; i = ++m) { - value = parsedItem[i]; - k = String(i); - if (!data.hasOwnProperty(k)) { - data[k] = value; - } - } - } else { - for (key in parsedItem) { - value = parsedItem[key]; - if (!data.hasOwnProperty(key)) { - data[key] = value; - } - } - } - } - } else { - for (key in parsed) { - value = parsed[key]; - if (!data.hasOwnProperty(key)) { - data[key] = value; - } - } - } - } - } else if ((values.value != null) && (matches = this.PATTERN_ANCHOR_VALUE.exec(values.value))) { - isRef = matches.ref; - values.value = matches.value; - } - if (mergeNode) { - - } else if (!(values.value != null) || '' === Utils.trim(values.value, ' ') || Utils.ltrim(values.value, ' ').indexOf('#') === 0) { - if (!(this.isNextLineIndented()) && !(this.isNextLineUnIndentedCollection())) { - if (allowOverwrite || data[key] === void 0) { - data[key] = null; - } - } else { - c = this.getRealCurrentLineNb() + 1; - parser = new Parser(c); - parser.refs = this.refs; - val = parser.parse(this.getNextEmbedBlock(), exceptionOnInvalidType, objectDecoder); - if (allowOverwrite || data[key] === void 0) { - data[key] = val; - } - } - } else { - val = this.parseValue(values.value, exceptionOnInvalidType, objectDecoder); - if (allowOverwrite || data[key] === void 0) { - data[key] = val; - } - } - } else { - lineCount = this.lines.length; - if (1 === lineCount || (2 === lineCount && Utils.isEmpty(this.lines[1]))) { - try { - value = Inline.parse(this.lines[0], exceptionOnInvalidType, objectDecoder); - } catch (error1) { - e = error1; - e.parsedLine = this.getRealCurrentLineNb() + 1; - e.snippet = this.currentLine; - throw e; - } - if (typeof value === 'object') { - if (value instanceof Array) { - first = value[0]; - } else { - for (key in value) { - first = value[key]; - break; - } - } - if (typeof first === 'string' && first.indexOf('*') === 0) { - data = []; - for (n = 0, len3 = value.length; n < len3; n++) { - alias = value[n]; - data.push(this.refs[alias.slice(1)]); - } - value = data; - } - } - return value; - } else if ((ref2 = Utils.ltrim(value).charAt(0)) === '[' || ref2 === '{') { - try { - return Inline.parse(value, exceptionOnInvalidType, objectDecoder); - } catch (error2) { - e = error2; - e.parsedLine = this.getRealCurrentLineNb() + 1; - e.snippet = this.currentLine; - throw e; - } - } - throw new ParseException('Unable to parse.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - if (isRef) { - if (data instanceof Array) { - this.refs[isRef] = data[data.length - 1]; - } else { - lastKey = null; - for (key in data) { - lastKey = key; - } - this.refs[isRef] = data[lastKey]; - } - } - } - if (Utils.isEmpty(data)) { - return null; - } else { - return data; - } - }; - - Parser.prototype.getRealCurrentLineNb = function() { - return this.currentLineNb + this.offset; - }; - - Parser.prototype.getCurrentLineIndentation = function() { - return this.currentLine.length - Utils.ltrim(this.currentLine, ' ').length; - }; - - Parser.prototype.getNextEmbedBlock = function(indentation, includeUnindentedCollection) { - var data, indent, isItUnindentedCollection, newIndent, removeComments, removeCommentsPattern, unindentedEmbedBlock; - if (indentation == null) { - indentation = null; - } - if (includeUnindentedCollection == null) { - includeUnindentedCollection = false; - } - this.moveToNextLine(); - if (indentation == null) { - newIndent = this.getCurrentLineIndentation(); - unindentedEmbedBlock = this.isStringUnIndentedCollectionItem(this.currentLine); - if (!(this.isCurrentLineEmpty()) && 0 === newIndent && !unindentedEmbedBlock) { - throw new ParseException('Indentation problem.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - } else { - newIndent = indentation; - } - data = [this.currentLine.slice(newIndent)]; - if (!includeUnindentedCollection) { - isItUnindentedCollection = this.isStringUnIndentedCollectionItem(this.currentLine); - } - removeCommentsPattern = this.PATTERN_FOLDED_SCALAR_END; - removeComments = !removeCommentsPattern.test(this.currentLine); - while (this.moveToNextLine()) { - indent = this.getCurrentLineIndentation(); - if (indent === newIndent) { - removeComments = !removeCommentsPattern.test(this.currentLine); - } - if (removeComments && this.isCurrentLineComment()) { - continue; - } - if (this.isCurrentLineBlank()) { - data.push(this.currentLine.slice(newIndent)); - continue; - } - if (isItUnindentedCollection && !this.isStringUnIndentedCollectionItem(this.currentLine) && indent === newIndent) { - this.moveToPreviousLine(); - break; - } - if (indent >= newIndent) { - data.push(this.currentLine.slice(newIndent)); - } else if (Utils.ltrim(this.currentLine).charAt(0) === '#') { - - } else if (0 === indent) { - this.moveToPreviousLine(); - break; - } else { - throw new ParseException('Indentation problem.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - } - return data.join("\n"); - }; - - Parser.prototype.moveToNextLine = function() { - if (this.currentLineNb >= this.lines.length - 1) { - return false; - } - this.currentLine = this.lines[++this.currentLineNb]; - return true; - }; - - Parser.prototype.moveToPreviousLine = function() { - this.currentLine = this.lines[--this.currentLineNb]; - }; - - Parser.prototype.parseValue = function(value, exceptionOnInvalidType, objectDecoder) { - var e, error, foldedIndent, matches, modifiers, pos, ref, ref1, val; - if (0 === value.indexOf('*')) { - pos = value.indexOf('#'); - if (pos !== -1) { - value = value.substr(1, pos - 2); - } else { - value = value.slice(1); - } - if (this.refs[value] === void 0) { - throw new ParseException('Reference "' + value + '" does not exist.', this.currentLine); - } - return this.refs[value]; - } - if (matches = this.PATTERN_FOLDED_SCALAR_ALL.exec(value)) { - modifiers = (ref = matches.modifiers) != null ? ref : ''; - foldedIndent = Math.abs(parseInt(modifiers)); - if (isNaN(foldedIndent)) { - foldedIndent = 0; - } - val = this.parseFoldedScalar(matches.separator, this.PATTERN_DECIMAL.replace(modifiers, ''), foldedIndent); - if (matches.type != null) { - Inline.configure(exceptionOnInvalidType, objectDecoder); - return Inline.parseScalar(matches.type + ' ' + val); - } else { - return val; - } - } - if ((ref1 = value.charAt(0)) === '[' || ref1 === '{' || ref1 === '"' || ref1 === "'") { - while (true) { - try { - return Inline.parse(value, exceptionOnInvalidType, objectDecoder); - } catch (error) { - e = error; - if (e instanceof ParseMore && this.moveToNextLine()) { - value += "\n" + Utils.trim(this.currentLine, ' '); - } else { - e.parsedLine = this.getRealCurrentLineNb() + 1; - e.snippet = this.currentLine; - throw e; - } - } - } - } else { - if (this.isNextLineIndented()) { - value += "\n" + this.getNextEmbedBlock(); - } - return Inline.parse(value, exceptionOnInvalidType, objectDecoder); - } - }; - - Parser.prototype.parseFoldedScalar = function(separator, indicator, indentation) { - var isCurrentLineBlank, j, len, line, matches, newText, notEOF, pattern, ref, text; - if (indicator == null) { - indicator = ''; - } - if (indentation == null) { - indentation = 0; - } - notEOF = this.moveToNextLine(); - if (!notEOF) { - return ''; - } - isCurrentLineBlank = this.isCurrentLineBlank(); - text = ''; - while (notEOF && isCurrentLineBlank) { - if (notEOF = this.moveToNextLine()) { - text += "\n"; - isCurrentLineBlank = this.isCurrentLineBlank(); - } - } - if (0 === indentation) { - if (matches = this.PATTERN_INDENT_SPACES.exec(this.currentLine)) { - indentation = matches[0].length; - } - } - if (indentation > 0) { - pattern = this.PATTERN_FOLDED_SCALAR_BY_INDENTATION[indentation]; - if (pattern == null) { - pattern = new Pattern('^ {' + indentation + '}(.*)$'); - Parser.prototype.PATTERN_FOLDED_SCALAR_BY_INDENTATION[indentation] = pattern; - } - while (notEOF && (isCurrentLineBlank || (matches = pattern.exec(this.currentLine)))) { - if (isCurrentLineBlank) { - text += this.currentLine.slice(indentation); - } else { - text += matches[1]; - } - if (notEOF = this.moveToNextLine()) { - text += "\n"; - isCurrentLineBlank = this.isCurrentLineBlank(); - } - } - } else if (notEOF) { - text += "\n"; - } - if (notEOF) { - this.moveToPreviousLine(); - } - if ('>' === separator) { - newText = ''; - ref = text.split("\n"); - for (j = 0, len = ref.length; j < len; j++) { - line = ref[j]; - if (line.length === 0 || line.charAt(0) === ' ') { - newText = Utils.rtrim(newText, ' ') + line + "\n"; - } else { - newText += line + ' '; - } - } - text = newText; - } - if ('+' !== indicator) { - text = Utils.rtrim(text); - } - if ('' === indicator) { - text = this.PATTERN_TRAILING_LINES.replace(text, "\n"); - } else if ('-' === indicator) { - text = this.PATTERN_TRAILING_LINES.replace(text, ''); - } - return text; - }; - - Parser.prototype.isNextLineIndented = function(ignoreComments) { - var EOF, currentIndentation, ret; - if (ignoreComments == null) { - ignoreComments = true; - } - currentIndentation = this.getCurrentLineIndentation(); - EOF = !this.moveToNextLine(); - if (ignoreComments) { - while (!EOF && this.isCurrentLineEmpty()) { - EOF = !this.moveToNextLine(); - } - } else { - while (!EOF && this.isCurrentLineBlank()) { - EOF = !this.moveToNextLine(); - } - } - if (EOF) { - return false; - } - ret = false; - if (this.getCurrentLineIndentation() > currentIndentation) { - ret = true; - } - this.moveToPreviousLine(); - return ret; - }; - - Parser.prototype.isCurrentLineEmpty = function() { - var trimmedLine; - trimmedLine = Utils.trim(this.currentLine, ' '); - return trimmedLine.length === 0 || trimmedLine.charAt(0) === '#'; - }; - - Parser.prototype.isCurrentLineBlank = function() { - return '' === Utils.trim(this.currentLine, ' '); - }; - - Parser.prototype.isCurrentLineComment = function() { - var ltrimmedLine; - ltrimmedLine = Utils.ltrim(this.currentLine, ' '); - return ltrimmedLine.charAt(0) === '#'; - }; - - Parser.prototype.cleanup = function(value) { - var count, i, indent, j, l, len, len1, line, lines, ref, ref1, ref2, smallestIndent, trimmedValue; - if (value.indexOf("\r") !== -1) { - value = value.split("\r\n").join("\n").split("\r").join("\n"); - } - count = 0; - ref = this.PATTERN_YAML_HEADER.replaceAll(value, ''), value = ref[0], count = ref[1]; - this.offset += count; - ref1 = this.PATTERN_LEADING_COMMENTS.replaceAll(value, '', 1), trimmedValue = ref1[0], count = ref1[1]; - if (count === 1) { - this.offset += Utils.subStrCount(value, "\n") - Utils.subStrCount(trimmedValue, "\n"); - value = trimmedValue; - } - ref2 = this.PATTERN_DOCUMENT_MARKER_START.replaceAll(value, '', 1), trimmedValue = ref2[0], count = ref2[1]; - if (count === 1) { - this.offset += Utils.subStrCount(value, "\n") - Utils.subStrCount(trimmedValue, "\n"); - value = trimmedValue; - value = this.PATTERN_DOCUMENT_MARKER_END.replace(value, ''); - } - lines = value.split("\n"); - smallestIndent = -1; - for (j = 0, len = lines.length; j < len; j++) { - line = lines[j]; - if (Utils.trim(line, ' ').length === 0) { - continue; - } - indent = line.length - Utils.ltrim(line).length; - if (smallestIndent === -1 || indent < smallestIndent) { - smallestIndent = indent; - } - } - if (smallestIndent > 0) { - for (i = l = 0, len1 = lines.length; l < len1; i = ++l) { - line = lines[i]; - lines[i] = line.slice(smallestIndent); - } - value = lines.join("\n"); - } - return value; - }; - - Parser.prototype.isNextLineUnIndentedCollection = function(currentIndentation) { - var notEOF, ret; - if (currentIndentation == null) { - currentIndentation = null; - } - if (currentIndentation == null) { - currentIndentation = this.getCurrentLineIndentation(); - } - notEOF = this.moveToNextLine(); - while (notEOF && this.isCurrentLineEmpty()) { - notEOF = this.moveToNextLine(); - } - if (false === notEOF) { - return false; - } - ret = false; - if (this.getCurrentLineIndentation() === currentIndentation && this.isStringUnIndentedCollectionItem(this.currentLine)) { - ret = true; - } - this.moveToPreviousLine(); - return ret; - }; - - Parser.prototype.isStringUnIndentedCollectionItem = function() { - return this.currentLine === '-' || this.currentLine.slice(0, 2) === '- '; - }; - - return Parser; - -})(); - -module.exports = Parser; - - -},{"./Exception/ParseException":4,"./Exception/ParseMore":5,"./Inline":6,"./Pattern":8,"./Utils":10}],8:[function(require,module,exports){ -var Pattern; - -Pattern = (function() { - Pattern.prototype.regex = null; - - Pattern.prototype.rawRegex = null; - - Pattern.prototype.cleanedRegex = null; - - Pattern.prototype.mapping = null; - - function Pattern(rawRegex, modifiers) { - var _char, capturingBracketNumber, cleanedRegex, i, len, mapping, name, part, subChar; - if (modifiers == null) { - modifiers = ''; - } - cleanedRegex = ''; - len = rawRegex.length; - mapping = null; - capturingBracketNumber = 0; - i = 0; - while (i < len) { - _char = rawRegex.charAt(i); - if (_char === '\\') { - cleanedRegex += rawRegex.slice(i, +(i + 1) + 1 || 9e9); - i++; - } else if (_char === '(') { - if (i < len - 2) { - part = rawRegex.slice(i, +(i + 2) + 1 || 9e9); - if (part === '(?:') { - i += 2; - cleanedRegex += part; - } else if (part === '(?<') { - capturingBracketNumber++; - i += 2; - name = ''; - while (i + 1 < len) { - subChar = rawRegex.charAt(i + 1); - if (subChar === '>') { - cleanedRegex += '('; - i++; - if (name.length > 0) { - if (mapping == null) { - mapping = {}; - } - mapping[name] = capturingBracketNumber; - } - break; - } else { - name += subChar; - } - i++; - } - } else { - cleanedRegex += _char; - capturingBracketNumber++; - } - } else { - cleanedRegex += _char; - } - } else { - cleanedRegex += _char; - } - i++; - } - this.rawRegex = rawRegex; - this.cleanedRegex = cleanedRegex; - this.regex = new RegExp(this.cleanedRegex, 'g' + modifiers.replace('g', '')); - this.mapping = mapping; - } - - Pattern.prototype.exec = function(str) { - var index, matches, name, ref; - this.regex.lastIndex = 0; - matches = this.regex.exec(str); - if (matches == null) { - return null; - } - if (this.mapping != null) { - ref = this.mapping; - for (name in ref) { - index = ref[name]; - matches[name] = matches[index]; - } - } - return matches; - }; - - Pattern.prototype.test = function(str) { - this.regex.lastIndex = 0; - return this.regex.test(str); - }; - - Pattern.prototype.replace = function(str, replacement) { - this.regex.lastIndex = 0; - return str.replace(this.regex, replacement); - }; - - Pattern.prototype.replaceAll = function(str, replacement, limit) { - var count; - if (limit == null) { - limit = 0; - } - this.regex.lastIndex = 0; - count = 0; - while (this.regex.test(str) && (limit === 0 || count < limit)) { - this.regex.lastIndex = 0; - str = str.replace(this.regex, replacement); - count++; - } - return [str, count]; - }; - - return Pattern; - -})(); - -module.exports = Pattern; - - -},{}],9:[function(require,module,exports){ -var Pattern, Unescaper, Utils; - -Utils = require('./Utils'); - -Pattern = require('./Pattern'); - -Unescaper = (function() { - function Unescaper() {} - - Unescaper.PATTERN_ESCAPED_CHARACTER = new Pattern('\\\\([0abt\tnvfre "\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})'); - - Unescaper.unescapeSingleQuotedString = function(value) { - return value.replace(/\'\'/g, '\''); - }; - - Unescaper.unescapeDoubleQuotedString = function(value) { - if (this._unescapeCallback == null) { - this._unescapeCallback = (function(_this) { - return function(str) { - return _this.unescapeCharacter(str); - }; - })(this); - } - return this.PATTERN_ESCAPED_CHARACTER.replace(value, this._unescapeCallback); - }; - - Unescaper.unescapeCharacter = function(value) { - var ch; - ch = String.fromCharCode; - switch (value.charAt(1)) { - case '0': - return ch(0); - case 'a': - return ch(7); - case 'b': - return ch(8); - case 't': - return "\t"; - case "\t": - return "\t"; - case 'n': - return "\n"; - case 'v': - return ch(11); - case 'f': - return ch(12); - case 'r': - return ch(13); - case 'e': - return ch(27); - case ' ': - return ' '; - case '"': - return '"'; - case '/': - return '/'; - case '\\': - return '\\'; - case 'N': - return ch(0x0085); - case '_': - return ch(0x00A0); - case 'L': - return ch(0x2028); - case 'P': - return ch(0x2029); - case 'x': - return Utils.utf8chr(Utils.hexDec(value.substr(2, 2))); - case 'u': - return Utils.utf8chr(Utils.hexDec(value.substr(2, 4))); - case 'U': - return Utils.utf8chr(Utils.hexDec(value.substr(2, 8))); - default: - return ''; - } - }; - - return Unescaper; - -})(); - -module.exports = Unescaper; - - -},{"./Pattern":8,"./Utils":10}],10:[function(require,module,exports){ -var Pattern, Utils, - hasProp = {}.hasOwnProperty; - -Pattern = require('./Pattern'); - -Utils = (function() { - function Utils() {} - - Utils.REGEX_LEFT_TRIM_BY_CHAR = {}; - - Utils.REGEX_RIGHT_TRIM_BY_CHAR = {}; - - Utils.REGEX_SPACES = /\s+/g; - - Utils.REGEX_DIGITS = /^\d+$/; - - Utils.REGEX_OCTAL = /[^0-7]/gi; - - Utils.REGEX_HEXADECIMAL = /[^a-f0-9]/gi; - - Utils.PATTERN_DATE = new Pattern('^' + '(?[0-9][0-9][0-9][0-9])' + '-(?[0-9][0-9]?)' + '-(?[0-9][0-9]?)' + '(?:(?:[Tt]|[ \t]+)' + '(?[0-9][0-9]?)' + ':(?[0-9][0-9])' + ':(?[0-9][0-9])' + '(?:\.(?[0-9]*))?' + '(?:[ \t]*(?Z|(?[-+])(?[0-9][0-9]?)' + '(?::(?[0-9][0-9]))?))?)?' + '$', 'i'); - - Utils.LOCAL_TIMEZONE_OFFSET = new Date().getTimezoneOffset() * 60 * 1000; - - Utils.trim = function(str, _char) { - var regexLeft, regexRight; - if (_char == null) { - _char = '\\s'; - } - regexLeft = this.REGEX_LEFT_TRIM_BY_CHAR[_char]; - if (regexLeft == null) { - this.REGEX_LEFT_TRIM_BY_CHAR[_char] = regexLeft = new RegExp('^' + _char + '' + _char + '*'); - } - regexLeft.lastIndex = 0; - regexRight = this.REGEX_RIGHT_TRIM_BY_CHAR[_char]; - if (regexRight == null) { - this.REGEX_RIGHT_TRIM_BY_CHAR[_char] = regexRight = new RegExp(_char + '' + _char + '*$'); - } - regexRight.lastIndex = 0; - return str.replace(regexLeft, '').replace(regexRight, ''); - }; - - Utils.ltrim = function(str, _char) { - var regexLeft; - if (_char == null) { - _char = '\\s'; - } - regexLeft = this.REGEX_LEFT_TRIM_BY_CHAR[_char]; - if (regexLeft == null) { - this.REGEX_LEFT_TRIM_BY_CHAR[_char] = regexLeft = new RegExp('^' + _char + '' + _char + '*'); - } - regexLeft.lastIndex = 0; - return str.replace(regexLeft, ''); - }; - - Utils.rtrim = function(str, _char) { - var regexRight; - if (_char == null) { - _char = '\\s'; - } - regexRight = this.REGEX_RIGHT_TRIM_BY_CHAR[_char]; - if (regexRight == null) { - this.REGEX_RIGHT_TRIM_BY_CHAR[_char] = regexRight = new RegExp(_char + '' + _char + '*$'); - } - regexRight.lastIndex = 0; - return str.replace(regexRight, ''); - }; - - Utils.isEmpty = function(value) { - return !value || value === '' || value === '0' || (value instanceof Array && value.length === 0) || this.isEmptyObject(value); - }; - - Utils.isEmptyObject = function(value) { - var k; - return value instanceof Object && ((function() { - var results; - results = []; - for (k in value) { - if (!hasProp.call(value, k)) continue; - results.push(k); - } - return results; - })()).length === 0; - }; - - Utils.subStrCount = function(string, subString, start, length) { - var c, i, j, len, ref, sublen; - c = 0; - string = '' + string; - subString = '' + subString; - if (start != null) { - string = string.slice(start); - } - if (length != null) { - string = string.slice(0, length); - } - len = string.length; - sublen = subString.length; - for (i = j = 0, ref = len; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) { - if (subString === string.slice(i, sublen)) { - c++; - i += sublen - 1; - } - } - return c; - }; - - Utils.isDigits = function(input) { - this.REGEX_DIGITS.lastIndex = 0; - return this.REGEX_DIGITS.test(input); - }; - - Utils.octDec = function(input) { - this.REGEX_OCTAL.lastIndex = 0; - return parseInt((input + '').replace(this.REGEX_OCTAL, ''), 8); - }; - - Utils.hexDec = function(input) { - this.REGEX_HEXADECIMAL.lastIndex = 0; - input = this.trim(input); - if ((input + '').slice(0, 2) === '0x') { - input = (input + '').slice(2); - } - return parseInt((input + '').replace(this.REGEX_HEXADECIMAL, ''), 16); - }; - - Utils.utf8chr = function(c) { - var ch; - ch = String.fromCharCode; - if (0x80 > (c %= 0x200000)) { - return ch(c); - } - if (0x800 > c) { - return ch(0xC0 | c >> 6) + ch(0x80 | c & 0x3F); - } - if (0x10000 > c) { - return ch(0xE0 | c >> 12) + ch(0x80 | c >> 6 & 0x3F) + ch(0x80 | c & 0x3F); - } - return ch(0xF0 | c >> 18) + ch(0x80 | c >> 12 & 0x3F) + ch(0x80 | c >> 6 & 0x3F) + ch(0x80 | c & 0x3F); - }; - - Utils.parseBoolean = function(input, strict) { - var lowerInput; - if (strict == null) { - strict = true; - } - if (typeof input === 'string') { - lowerInput = input.toLowerCase(); - if (!strict) { - if (lowerInput === 'no') { - return false; - } - } - if (lowerInput === '0') { - return false; - } - if (lowerInput === 'false') { - return false; - } - if (lowerInput === '') { - return false; - } - return true; - } - return !!input; - }; - - Utils.isNumeric = function(input) { - this.REGEX_SPACES.lastIndex = 0; - return typeof input === 'number' || typeof input === 'string' && !isNaN(input) && input.replace(this.REGEX_SPACES, '') !== ''; - }; - - Utils.stringToDate = function(str) { - var date, day, fraction, hour, info, minute, month, second, tz_hour, tz_minute, tz_offset, year; - if (!(str != null ? str.length : void 0)) { - return null; - } - info = this.PATTERN_DATE.exec(str); - if (!info) { - return null; - } - year = parseInt(info.year, 10); - month = parseInt(info.month, 10) - 1; - day = parseInt(info.day, 10); - if (info.hour == null) { - date = new Date(Date.UTC(year, month, day)); - return date; - } - hour = parseInt(info.hour, 10); - minute = parseInt(info.minute, 10); - second = parseInt(info.second, 10); - if (info.fraction != null) { - fraction = info.fraction.slice(0, 3); - while (fraction.length < 3) { - fraction += '0'; - } - fraction = parseInt(fraction, 10); - } else { - fraction = 0; - } - if (info.tz != null) { - tz_hour = parseInt(info.tz_hour, 10); - if (info.tz_minute != null) { - tz_minute = parseInt(info.tz_minute, 10); - } else { - tz_minute = 0; - } - tz_offset = (tz_hour * 60 + tz_minute) * 60000; - if ('-' === info.tz_sign) { - tz_offset *= -1; - } - } - date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - if (tz_offset) { - date.setTime(date.getTime() - tz_offset); - } - return date; - }; - - Utils.strRepeat = function(str, number) { - var i, res; - res = ''; - i = 0; - while (i < number) { - res += str; - i++; - } - return res; - }; - - Utils.getStringFromFile = function(path, callback) { - var data, fs, j, len1, name, ref, req, xhr; - if (callback == null) { - callback = null; - } - xhr = null; - if (typeof window !== "undefined" && window !== null) { - if (window.XMLHttpRequest) { - xhr = new XMLHttpRequest(); - } else if (window.ActiveXObject) { - ref = ["Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.3.0", "Msxml2.XMLHTTP", "Microsoft.XMLHTTP"]; - for (j = 0, len1 = ref.length; j < len1; j++) { - name = ref[j]; - try { - xhr = new ActiveXObject(name); - } catch (undefined) {} - } - } - } - if (xhr != null) { - if (callback != null) { - xhr.onreadystatechange = function() { - if (xhr.readyState === 4) { - if (xhr.status === 200 || xhr.status === 0) { - return callback(xhr.responseText); - } else { - return callback(null); - } - } - }; - xhr.open('GET', path, true); - return xhr.send(null); - } else { - xhr.open('GET', path, false); - xhr.send(null); - if (xhr.status === 200 || xhr.status === 0) { - return xhr.responseText; - } - return null; - } - } else { - req = require; - fs = req('fs'); - if (callback != null) { - return fs.readFile(path, function(err, data) { - if (err) { - return callback(null); - } else { - return callback(String(data)); - } - }); - } else { - data = fs.readFileSync(path); - if (data != null) { - return String(data); - } - return null; - } - } - }; - - return Utils; - -})(); - -module.exports = Utils; - - -},{"./Pattern":8}],11:[function(require,module,exports){ -var Dumper, Parser, Utils, Yaml; - -Parser = require('./Parser'); - -Dumper = require('./Dumper'); - -Utils = require('./Utils'); - -Yaml = (function() { - function Yaml() {} - - Yaml.parse = function(input, exceptionOnInvalidType, objectDecoder) { - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = false; - } - if (objectDecoder == null) { - objectDecoder = null; - } - return new Parser().parse(input, exceptionOnInvalidType, objectDecoder); - }; - - Yaml.parseFile = function(path, callback, exceptionOnInvalidType, objectDecoder) { - var input; - if (callback == null) { - callback = null; - } - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = false; - } - if (objectDecoder == null) { - objectDecoder = null; - } - if (callback != null) { - return Utils.getStringFromFile(path, (function(_this) { - return function(input) { - var result; - result = null; - if (input != null) { - result = _this.parse(input, exceptionOnInvalidType, objectDecoder); - } - callback(result); - }; - })(this)); - } else { - input = Utils.getStringFromFile(path); - if (input != null) { - return this.parse(input, exceptionOnInvalidType, objectDecoder); - } - return null; - } - }; - - Yaml.dump = function(input, inline, indent, exceptionOnInvalidType, objectEncoder) { - var yaml; - if (inline == null) { - inline = 2; - } - if (indent == null) { - indent = 4; - } - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = false; - } - if (objectEncoder == null) { - objectEncoder = null; - } - yaml = new Dumper(); - yaml.indentation = indent; - return yaml.dump(input, inline, 0, exceptionOnInvalidType, objectEncoder); - }; - - Yaml.register = function() { - var require_handler; - require_handler = function(module, filename) { - return module.exports = YAML.parseFile(filename); - }; - if ((typeof require !== "undefined" && require !== null ? require.extensions : void 0) != null) { - require.extensions['.yml'] = require_handler; - return require.extensions['.yaml'] = require_handler; - } - }; - - Yaml.stringify = function(input, inline, indent, exceptionOnInvalidType, objectEncoder) { - return this.dump(input, inline, indent, exceptionOnInvalidType, objectEncoder); - }; - - Yaml.load = function(path, callback, exceptionOnInvalidType, objectDecoder) { - return this.parseFile(path, callback, exceptionOnInvalidType, objectDecoder); - }; - - return Yaml; - -})(); - -if (typeof window !== "undefined" && window !== null) { - window.YAML = Yaml; -} - -if (typeof window === "undefined" || window === null) { - this.YAML = Yaml; -} - -module.exports = Yaml; - - -},{"./Dumper":1,"./Parser":7,"./Utils":10}]},{},[11]); diff --git a/node_modules/yamljs/dist/yaml.legacy.js b/node_modules/yamljs/dist/yaml.legacy.js deleted file mode 100644 index 88c1a28..0000000 --- a/node_modules/yamljs/dist/yaml.legacy.js +++ /dev/null @@ -1,2087 +0,0 @@ -/* -Copyright (c) 2010 Jeremy Faivre - -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. -*/ -(function(){ -/** - * Exception class thrown when an error occurs during parsing. - * - * @author Fabien Potencier - * - * @api - */ - -/** - * Constructor. - * - * @param string message The error message - * @param integer parsedLine The line where the error occurred - * @param integer snippet The snippet of code near the problem - * @param string parsedFile The file name where the error occurred - */ - -var YamlParseException = function(message, parsedLine, snippet, parsedFile){ - - this.rawMessage = message; - this.parsedLine = (parsedLine !== undefined) ? parsedLine : -1; - this.snippet = (snippet !== undefined) ? snippet : null; - this.parsedFile = (parsedFile !== undefined) ? parsedFile : null; - - this.updateRepr(); - - this.message = message; - -}; -YamlParseException.prototype = -{ - - name: 'YamlParseException', - message: null, - - parsedFile: null, - parsedLine: -1, - snippet: null, - rawMessage: null, - - isDefined: function(input) - { - return input != undefined && input != null; - }, - - /** - * Gets the snippet of code near the error. - * - * @return string The snippet of code - */ - getSnippet: function() - { - return this.snippet; - }, - - /** - * Sets the snippet of code near the error. - * - * @param string snippet The code snippet - */ - setSnippet: function(snippet) - { - this.snippet = snippet; - - this.updateRepr(); - }, - - /** - * Gets the filename where the error occurred. - * - * This method returns null if a string is parsed. - * - * @return string The filename - */ - getParsedFile: function() - { - return this.parsedFile; - }, - - /** - * Sets the filename where the error occurred. - * - * @param string parsedFile The filename - */ - setParsedFile: function(parsedFile) - { - this.parsedFile = parsedFile; - - this.updateRepr(); - }, - - /** - * Gets the line where the error occurred. - * - * @return integer The file line - */ - getParsedLine: function() - { - return this.parsedLine; - }, - - /** - * Sets the line where the error occurred. - * - * @param integer parsedLine The file line - */ - setParsedLine: function(parsedLine) - { - this.parsedLine = parsedLine; - - this.updateRepr(); - }, - - updateRepr: function() - { - this.message = this.rawMessage; - - var dot = false; - if ('.' === this.message.charAt(this.message.length - 1)) { - this.message = this.message.substring(0, this.message.length - 1); - dot = true; - } - - if (null !== this.parsedFile) { - this.message += ' in ' + JSON.stringify(this.parsedFile); - } - - if (this.parsedLine >= 0) { - this.message += ' at line ' + this.parsedLine; - } - - if (this.snippet) { - this.message += ' (near "' + this.snippet + '")'; - } - - if (dot) { - this.message += '.'; - } - } -} -/** - * Yaml offers convenience methods to parse and dump YAML. - * - * @author Fabien Potencier - * - * @api - */ - -var YamlRunningUnderNode = false; -var Yaml = function(){}; -Yaml.prototype = -{ - - /** - * Parses YAML into a JS representation. - * - * The parse method, when supplied with a YAML stream (file), - * will do its best to convert YAML in a file into a JS representation. - * - * Usage: - * - * obj = yaml.parseFile('config.yml'); - * - * - * @param string input Path of YAML file - * - * @return array The YAML converted to a JS representation - * - * @throws YamlParseException If the YAML is not valid - */ - parseFile: function(file /* String */, callback /* Function */) - { - if ( callback == null ) - { - var input = this.getFileContents(file); - var ret = null; - try - { - ret = this.parse(input); - } - catch ( e ) - { - if ( e instanceof YamlParseException ) { - e.setParsedFile(file); - } - throw e; - } - return ret; - } - - this.getFileContents(file, function(data) - { - callback(new Yaml().parse(data)); - }); - }, - - /** - * Parses YAML into a JS representation. - * - * The parse method, when supplied with a YAML stream (string), - * will do its best to convert YAML into a JS representation. - * - * Usage: - * - * obj = yaml.parse(...); - * - * - * @param string input string containing YAML - * - * @return array The YAML converted to a JS representation - * - * @throws YamlParseException If the YAML is not valid - */ - parse: function(input /* String */) - { - var yaml = new YamlParser(); - - return yaml.parse(input); - }, - - /** - * Dumps a JS representation to a YAML string. - * - * The dump method, when supplied with an array, will do its best - * to convert the array into friendly YAML. - * - * @param array array JS representation - * @param integer inline The level where you switch to inline YAML - * - * @return string A YAML string representing the original JS representation - * - * @api - */ - dump: function(array, inline, spaces) - { - if ( inline == null ) inline = 2; - - var yaml = new YamlDumper(); - if (spaces) { - yaml.numSpacesForIndentation = spaces; - } - - return yaml.dump(array, inline); - }, - - getXHR: function() - { - if ( window.XMLHttpRequest ) - return new XMLHttpRequest(); - - if ( window.ActiveXObject ) - { - var names = [ - "Msxml2.XMLHTTP.6.0", - "Msxml2.XMLHTTP.3.0", - "Msxml2.XMLHTTP", - "Microsoft.XMLHTTP" - ]; - - for ( var i = 0; i < 4; i++ ) - { - try{ return new ActiveXObject(names[i]); } - catch(e){} - } - } - return null; - }, - - getFileContents: function(file, callback) - { - if ( YamlRunningUnderNode ) - { - var fs = require('fs'); - if ( callback == null ) - { - var data = fs.readFileSync(file); - if (data == null) return null; - return ''+data; - } - else - { - fs.readFile(file, function(err, data) - { - if (err) - callback(null); - else - callback(data); - }); - } - } - else - { - var request = this.getXHR(); - - // Sync - if ( callback == null ) - { - request.open('GET', file, false); - request.send(null); - - if ( request.status == 200 || request.status == 0 ) - return request.responseText; - - return null; - } - - // Async - request.onreadystatechange = function() - { - if ( request.readyState == 4 ) - if ( request.status == 200 || request.status == 0 ) - callback(request.responseText); - else - callback(null); - }; - request.open('GET', file, true); - request.send(null); - } - } -}; - -var YAML = -{ - /* - * @param integer inline The level where you switch to inline YAML - */ - - stringify: function(input, inline, spaces) - { - return new Yaml().dump(input, inline, spaces); - }, - - parse: function(input) - { - return new Yaml().parse(input); - }, - - load: function(file, callback) - { - return new Yaml().parseFile(file, callback); - } -}; - -// Handle node.js case -if (typeof exports !== 'undefined') { - if (typeof module !== 'undefined' && module.exports) { - exports = module.exports = YAML; - YamlRunningUnderNode = true; - - // Add require handler - (function () { - var require_handler = function (module, filename) { - // fill in result - module.exports = YAML.load(filename); - }; - - // register require extensions only if we're on node.js - // hack for browserify - if ( undefined !== require.extensions ) { - require.extensions['.yml'] = require_handler; - require.extensions['.yaml'] = require_handler; - } - }()); - } -} - -// Handle browser case -if ( typeof(window) != "undefined" ) -{ - window.YAML = YAML; -} - -/** - * YamlInline implements a YAML parser/dumper for the YAML inline syntax. - */ -var YamlInline = function(){}; -YamlInline.prototype = -{ - i: null, - - /** - * Convert a YAML string to a JS object. - * - * @param string value A YAML string - * - * @return object A JS object representing the YAML string - */ - parse: function(value) - { - var result = null; - value = this.trim(value); - - if ( 0 == value.length ) - { - return ''; - } - - switch ( value.charAt(0) ) - { - case '[': - result = this.parseSequence(value); - break; - case '{': - result = this.parseMapping(value); - break; - default: - result = this.parseScalar(value); - } - - // some comment can end the scalar - if ( value.substr(this.i+1).replace(/^\s*#.*$/, '') != '' ) { - console.log("oups "+value.substr(this.i+1)); - throw new YamlParseException('Unexpected characters near "'+value.substr(this.i)+'".'); - } - - return result; - }, - - /** - * Dumps a given JS variable to a YAML string. - * - * @param mixed value The JS variable to convert - * - * @return string The YAML string representing the JS object - */ - dump: function(value) - { - if ( undefined == value || null == value ) - return 'null'; - if ( value instanceof Date) - return value.toISOString(); - if ( typeof(value) == 'object') - return this.dumpObject(value); - if ( typeof(value) == 'boolean' ) - return value ? 'true' : 'false'; - if ( /^\d+$/.test(value) ) - return typeof(value) == 'string' ? "'"+value+"'" : parseInt(value); - if ( this.isNumeric(value) ) - return typeof(value) == 'string' ? "'"+value+"'" : parseFloat(value); - if ( typeof(value) == 'number' ) - return value == Infinity ? '.Inf' : ( value == -Infinity ? '-.Inf' : ( isNaN(value) ? '.NAN' : value ) ); - var yaml = new YamlEscaper(); - if ( yaml.requiresDoubleQuoting(value) ) - return yaml.escapeWithDoubleQuotes(value); - if ( yaml.requiresSingleQuoting(value) ) - return yaml.escapeWithSingleQuotes(value); - if ( '' == value ) - return '""'; - if ( this.getTimestampRegex().test(value) ) - return "'"+value+"'"; - if ( this.inArray(value.toLowerCase(), ['null','~','true','false']) ) - return "'"+value+"'"; - // default - return value; - }, - - /** - * Dumps a JS object to a YAML string. - * - * @param object value The JS array to dump - * - * @return string The YAML string representing the JS object - */ - dumpObject: function(value) - { - var keys = this.getKeys(value); - var output = null; - var i; - var len = keys.length; - - // array - if ( value instanceof Array ) - /*( 1 == len && '0' == keys[0] ) - || - ( len > 1 && this.reduceArray(keys, function(v,w){return Math.floor(v+w);}, 0) == len * (len - 1) / 2) )*/ - { - output = []; - for ( i = 0; i < len; i++ ) - { - output.push(this.dump(value[keys[i]])); - } - - return '['+output.join(', ')+']'; - } - - // mapping - output = []; - for ( i = 0; i < len; i++ ) - { - output.push(this.dump(keys[i])+': '+this.dump(value[keys[i]])); - } - - return '{ '+output.join(', ')+' }'; - }, - - /** - * Parses a scalar to a YAML string. - * - * @param scalar scalar - * @param string delimiters - * @param object stringDelimiters - * @param integer i - * @param boolean evaluate - * - * @return string A YAML string - * - * @throws YamlParseException When malformed inline YAML string is parsed - */ - parseScalar: function(scalar, delimiters, stringDelimiters, i, evaluate) - { - if ( delimiters == undefined ) delimiters = null; - if ( stringDelimiters == undefined ) stringDelimiters = ['"', "'"]; - if ( i == undefined ) i = 0; - if ( evaluate == undefined ) evaluate = true; - - var output = null; - var pos = null; - var matches = null; - - if ( this.inArray(scalar[i], stringDelimiters) ) - { - // quoted scalar - output = this.parseQuotedScalar(scalar, i); - i = this.i; - if (null !== delimiters) { - var tmp = scalar.substr(i).replace(/^\s+/, ''); - if (!this.inArray(tmp.charAt(0), delimiters)) { - throw new YamlParseException('Unexpected characters ('+scalar.substr(i)+').'); - } - } - } - else - { - // "normal" string - if ( !delimiters ) - { - output = (scalar+'').substring(i); - - i += output.length; - - // remove comments - pos = output.indexOf(' #'); - if ( pos != -1 ) - { - output = output.substr(0, pos).replace(/\s+$/g,''); - } - } - else if ( matches = new RegExp('^(.+?)('+delimiters.join('|')+')').exec((scalar+'').substring(i)) ) - { - output = matches[1]; - i += output.length; - } - else - { - throw new YamlParseException('Malformed inline YAML string ('+scalar+').'); - } - output = evaluate ? this.evaluateScalar(output) : output; - } - - this.i = i; - - return output; - }, - - /** - * Parses a quoted scalar to YAML. - * - * @param string scalar - * @param integer i - * - * @return string A YAML string - * - * @throws YamlParseException When malformed inline YAML string is parsed - */ - parseQuotedScalar: function(scalar, i) - { - var matches = null; - //var item = /^(.*?)['"]\s*(?:[,:]|[}\]]\s*,)/.exec((scalar+'').substring(i))[1]; - - if ( !(matches = new RegExp('^'+YamlInline.REGEX_QUOTED_STRING).exec((scalar+'').substring(i))) ) - { - throw new YamlParseException('Malformed inline YAML string ('+(scalar+'').substring(i)+').'); - } - - var output = matches[0].substr(1, matches[0].length - 2); - - var unescaper = new YamlUnescaper(); - - if ( '"' == (scalar+'').charAt(i) ) - { - output = unescaper.unescapeDoubleQuotedString(output); - } - else - { - output = unescaper.unescapeSingleQuotedString(output); - } - - i += matches[0].length; - - this.i = i; - return output; - }, - - /** - * Parses a sequence to a YAML string. - * - * @param string sequence - * @param integer i - * - * @return string A YAML string - * - * @throws YamlParseException When malformed inline YAML string is parsed - */ - parseSequence: function(sequence, i) - { - if ( i == undefined ) i = 0; - - var output = []; - var len = sequence.length; - i += 1; - - // [foo, bar, ...] - while ( i < len ) - { - switch ( sequence.charAt(i) ) - { - case '[': - // nested sequence - output.push(this.parseSequence(sequence, i)); - i = this.i; - break; - case '{': - // nested mapping - output.push(this.parseMapping(sequence, i)); - i = this.i; - break; - case ']': - this.i = i; - return output; - case ',': - case ' ': - break; - default: - var isQuoted = this.inArray(sequence.charAt(i), ['"', "'"]); - var value = this.parseScalar(sequence, [',', ']'], ['"', "'"], i); - i = this.i; - - if ( !isQuoted && (value+'').indexOf(': ') != -1 ) - { - // embedded mapping? - try - { - value = this.parseMapping('{'+value+'}'); - } - catch ( e ) - { - if ( !(e instanceof YamlParseException ) ) throw e; - // no, it's not - } - } - - output.push(value); - - i--; - } - - i++; - } - - throw new YamlParseException('Malformed inline YAML string "'+sequence+'"'); - }, - - /** - * Parses a mapping to a YAML string. - * - * @param string mapping - * @param integer i - * - * @return string A YAML string - * - * @throws YamlParseException When malformed inline YAML string is parsed - */ - parseMapping: function(mapping, i) - { - if ( i == undefined ) i = 0; - var output = {}; - var len = mapping.length; - i += 1; - var done = false; - var doContinue = false; - - // {foo: bar, bar:foo, ...} - while ( i < len ) - { - doContinue = false; - - switch ( mapping.charAt(i) ) - { - case ' ': - case ',': - i++; - doContinue = true; - break; - case '}': - this.i = i; - return output; - } - - if ( doContinue ) continue; - - // key - var key = this.parseScalar(mapping, [':', ' '], ['"', "'"], i, false); - i = this.i; - - // value - done = false; - while ( i < len ) - { - switch ( mapping.charAt(i) ) - { - case '[': - // nested sequence - output[key] = this.parseSequence(mapping, i); - i = this.i; - done = true; - break; - case '{': - // nested mapping - output[key] = this.parseMapping(mapping, i); - i = this.i; - done = true; - break; - case ':': - case ' ': - break; - default: - output[key] = this.parseScalar(mapping, [',', '}'], ['"', "'"], i); - i = this.i; - done = true; - i--; - } - - ++i; - - if ( done ) - { - doContinue = true; - break; - } - } - - if ( doContinue ) continue; - } - - throw new YamlParseException('Malformed inline YAML string "'+mapping+'"'); - }, - - /** - * Evaluates scalars and replaces magic values. - * - * @param string scalar - * - * @return string A YAML string - */ - evaluateScalar: function(scalar) - { - scalar = this.trim(scalar); - - var raw = null; - var cast = null; - - if ( ( 'null' == scalar.toLowerCase() ) || - ( '' == scalar ) || - ( '~' == scalar ) ) - return null; - if ( (scalar+'').indexOf('!str ') == 0 ) - return (''+scalar).substring(5); - if ( (scalar+'').indexOf('! ') == 0 ) - return parseInt(this.parseScalar((scalar+'').substr(2))); - if ( /^\d+$/.test(scalar) ) - { - raw = scalar; - cast = parseInt(scalar); - return '0' == scalar.charAt(0) ? this.octdec(scalar) : (( ''+raw == ''+cast ) ? cast : raw); - } - if ( 'true' == (scalar+'').toLowerCase() ) - return true; - if ( 'false' == (scalar+'').toLowerCase() ) - return false; - if ( this.isNumeric(scalar) ) - return '0x' == (scalar+'').substr(0, 2) ? this.hexdec(scalar) : parseFloat(scalar); - if ( scalar.toLowerCase() == '.inf' ) - return Infinity; - if ( scalar.toLowerCase() == '.nan' ) - return NaN; - if ( scalar.toLowerCase() == '-.inf' ) - return -Infinity; - if ( /^(-|\+)?[0-9,]+(\.[0-9]+)?$/.test(scalar) ) - return parseFloat(scalar.split(',').join('')); - if ( this.getTimestampRegex().test(scalar) ) - return new Date(this.strtotime(scalar)); - //else - return ''+scalar; - }, - - /** - * Gets a regex that matches an unix timestamp - * - * @return string The regular expression - */ - getTimestampRegex: function() - { - return new RegExp('^'+ - '([0-9][0-9][0-9][0-9])'+ - '-([0-9][0-9]?)'+ - '-([0-9][0-9]?)'+ - '(?:(?:[Tt]|[ \t]+)'+ - '([0-9][0-9]?)'+ - ':([0-9][0-9])'+ - ':([0-9][0-9])'+ - '(?:\.([0-9]*))?'+ - '(?:[ \t]*(Z|([-+])([0-9][0-9]?)'+ - '(?::([0-9][0-9]))?))?)?'+ - '$','gi'); - }, - - trim: function(str /* String */) - { - return (str+'').replace(/^\s+/,'').replace(/\s+$/,''); - }, - - isNumeric: function(input) - { - return (input - 0) == input && input.length > 0 && input.replace(/\s+/g,'') != ''; - }, - - inArray: function(key, tab) - { - var i; - var len = tab.length; - for ( i = 0; i < len; i++ ) - { - if ( key == tab[i] ) return true; - } - return false; - }, - - getKeys: function(tab) - { - var ret = []; - - for ( var name in tab ) - { - if ( tab.hasOwnProperty(name) ) - { - ret.push(name); - } - } - - return ret; - }, - - /*reduceArray: function(tab, fun) - { - var len = tab.length; - if (typeof fun != "function") - throw new YamlParseException("fun is not a function"); - - // no value to return if no initial value and an empty array - if (len == 0 && arguments.length == 1) - throw new YamlParseException("empty array"); - - var i = 0; - if (arguments.length >= 2) - { - var rv = arguments[1]; - } - else - { - do - { - if (i in tab) - { - rv = tab[i++]; - break; - } - - // if array contains no values, no initial value to return - if (++i >= len) - throw new YamlParseException("no initial value to return"); - } - while (true); - } - - for (; i < len; i++) - { - if (i in tab) - rv = fun.call(null, rv, tab[i], i, tab); - } - - return rv; - },*/ - - octdec: function(input) - { - return parseInt((input+'').replace(/[^0-7]/gi, ''), 8); - }, - - hexdec: function(input) - { - input = this.trim(input); - if ( (input+'').substr(0, 2) == '0x' ) input = (input+'').substring(2); - return parseInt((input+'').replace(/[^a-f0-9]/gi, ''), 16); - }, - - /** - * @see http://phpjs.org/functions/strtotime - * @note we need timestamp with msecs so /1000 removed - * @note original contained binary | 0 (wtf?!) everywhere, which messes everything up - */ - strtotime: function (h,b){var f,c,g,k,d="";h=(h+"").replace(/\s{2,}|^\s|\s$/g," ").replace(/[\t\r\n]/g,"");if(h==="now"){return b===null||isNaN(b)?new Date().getTime()||0:b||0}else{if(!isNaN(d=Date.parse(h))){return d||0}else{if(b){b=new Date(b)}else{b=new Date()}}}h=h.toLowerCase();var e={day:{sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},mon:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"]};var a=function(i){var o=(i[2]&&i[2]==="ago");var n=(n=i[0]==="last"?-1:1)*(o?-1:1);switch(i[0]){case"last":case"next":switch(i[1].substring(0,3)){case"yea":b.setFullYear(b.getFullYear()+n);break;case"wee":b.setDate(b.getDate()+(n*7));break;case"day":b.setDate(b.getDate()+n);break;case"hou":b.setHours(b.getHours()+n);break;case"min":b.setMinutes(b.getMinutes()+n);break;case"sec":b.setSeconds(b.getSeconds()+n);break;case"mon":if(i[1]==="month"){b.setMonth(b.getMonth()+n);break}default:var l=e.day[i[1].substring(0,3)];if(typeof l!=="undefined"){var p=l-b.getDay();if(p===0){p=7*n}else{if(p>0){if(i[0]==="last"){p-=7}}else{if(i[0]==="next"){p+=7}}}b.setDate(b.getDate()+p);b.setHours(0,0,0,0)}}break;default:if(/\d+/.test(i[0])){n*=parseInt(i[0],10);switch(i[1].substring(0,3)){case"yea":b.setFullYear(b.getFullYear()+n);break;case"mon":b.setMonth(b.getMonth()+n);break;case"wee":b.setDate(b.getDate()+(n*7));break;case"day":b.setDate(b.getDate()+n);break;case"hou":b.setHours(b.getHours()+n);break;case"min":b.setMinutes(b.getMinutes()+n);break;case"sec":b.setSeconds(b.getSeconds()+n);break}}else{return false}break}return true};g=h.match(/^(\d{2,4}-\d{2}-\d{2})(?:\s(\d{1,2}:\d{2}(:\d{2})?)?(?:\.(\d+))?)?$/);if(g!==null){if(!g[2]){g[2]="00:00:00"}else{if(!g[3]){g[2]+=":00"}}k=g[1].split(/-/g);k[1]=e.mon[k[1]-1]||k[1];k[0]=+k[0];k[0]=(k[0]>=0&&k[0]<=69)?"20"+(k[0]<10?"0"+k[0]:k[0]+""):(k[0]>=70&&k[0]<=99)?"19"+k[0]:k[0]+"";return parseInt(this.strtotime(k[2]+" "+k[1]+" "+k[0]+" "+g[2])+(g[4]?g[4]:""),10)}var j="([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday)|(last|next)\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday))(\\sago)?";g=h.match(new RegExp(j,"gi"));if(g===null){return false}for(f=0,c=g.length;f= newIndent ) - { - data.push(this.currentLine.substr(newIndent)); - } - else if ( 0 == indent ) - { - this.moveToPreviousLine(); - - break; - } - else - { - throw new YamlParseException('Indentation problem B', this.getRealCurrentLineNb() + 1, this.currentLine); - } - } - - return data.join("\n"); - }, - - /** - * Moves the parser to the next line. - * - * @return Boolean - */ - moveToNextLine: function() - { - if ( this.currentLineNb >= this.lines.length - 1 ) - { - return false; - } - - this.currentLineNb++; - this.currentLine = this.lines[this.currentLineNb]; - - return true; - }, - - /** - * Moves the parser to the previous line. - */ - moveToPreviousLine: function() - { - this.currentLineNb--; - this.currentLine = this.lines[this.currentLineNb]; - }, - - /** - * Parses a YAML value. - * - * @param string value A YAML value - * - * @return mixed A JS value - * - * @throws YamlParseException When reference does not exist - */ - parseValue: function(value) - { - if ( '*' == (value+'').charAt(0) ) - { - if ( this.trim(value).charAt(0) == '#' ) - { - value = (value+'').substr(1, value.indexOf('#') - 2); - } - else - { - value = (value+'').substr(1); - } - - if ( this.refs[value] == undefined ) - { - throw new YamlParseException('Reference "'+value+'" does not exist', this.getRealCurrentLineNb() + 1, this.currentLine); - } - return this.refs[value]; - } - - var matches = null; - if ( matches = /^(\||>)(\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?( +#.*)?$/.exec(value) ) - { - matches = {separator: matches[1], modifiers: matches[2], comments: matches[3]}; - var modifiers = this.isDefined(matches.modifiers) ? matches.modifiers : ''; - - return this.parseFoldedScalar(matches.separator, modifiers.replace(/\d+/g, ''), Math.abs(parseInt(modifiers))); - } - try { - return new YamlInline().parse(value); - } catch (e) { - if ( e instanceof YamlParseException ) { - e.setParsedLine(this.getRealCurrentLineNb() + 1); - e.setSnippet(this.currentLine); - } - throw e; - } - }, - - /** - * Parses a folded scalar. - * - * @param string separator The separator that was used to begin this folded scalar (| or >) - * @param string indicator The indicator that was used to begin this folded scalar (+ or -) - * @param integer indentation The indentation that was used to begin this folded scalar - * - * @return string The text value - */ - parseFoldedScalar: function(separator, indicator, indentation) - { - if ( indicator == undefined ) indicator = ''; - if ( indentation == undefined ) indentation = 0; - - separator = '|' == separator ? "\n" : ' '; - var text = ''; - var diff = null; - - var notEOF = this.moveToNextLine(); - - while ( notEOF && this.isCurrentLineBlank() ) - { - text += "\n"; - - notEOF = this.moveToNextLine(); - } - - if ( !notEOF ) - { - return ''; - } - - var matches = null; - if ( !(matches = new RegExp('^('+(indentation ? this.strRepeat(' ', indentation) : ' +')+')(.*)$').exec(this.currentLine)) ) - { - this.moveToPreviousLine(); - - return ''; - } - - matches = {indent: matches[1], text: matches[2]}; - - var textIndent = matches.indent; - var previousIndent = 0; - - text += matches.text + separator; - while ( this.currentLineNb + 1 < this.lines.length ) - { - this.moveToNextLine(); - - if ( matches = new RegExp('^( {'+textIndent.length+',})(.+)$').exec(this.currentLine) ) - { - matches = {indent: matches[1], text: matches[2]}; - - if ( ' ' == separator && previousIndent != matches.indent ) - { - text = text.substr(0, text.length - 1)+"\n"; - } - - previousIndent = matches.indent; - - diff = matches.indent.length - textIndent.length; - text += this.strRepeat(' ', diff) + matches.text + (diff != 0 ? "\n" : separator); - } - else if ( matches = /^( *)$/.exec(this.currentLine) ) - { - text += matches[1].replace(new RegExp('^ {1,'+textIndent.length+'}','g'), '')+"\n"; - } - else - { - this.moveToPreviousLine(); - - break; - } - } - - if ( ' ' == separator ) - { - // replace last separator by a newline - text = text.replace(/ (\n*)$/g, "\n$1"); - } - - switch ( indicator ) - { - case '': - text = text.replace(/\n+$/g, "\n"); - break; - case '+': - break; - case '-': - text = text.replace(/\n+$/g, ''); - break; - } - - return text; - }, - - /** - * Returns true if the next line is indented. - * - * @return Boolean Returns true if the next line is indented, false otherwise - */ - isNextLineIndented: function() - { - var currentIndentation = this.getCurrentLineIndentation(); - var notEOF = this.moveToNextLine(); - - while ( notEOF && this.isCurrentLineEmpty() ) - { - notEOF = this.moveToNextLine(); - } - - if ( false == notEOF ) - { - return false; - } - - var ret = false; - if ( this.getCurrentLineIndentation() <= currentIndentation ) - { - ret = true; - } - - this.moveToPreviousLine(); - - return ret; - }, - - /** - * Returns true if the current line is blank or if it is a comment line. - * - * @return Boolean Returns true if the current line is empty or if it is a comment line, false otherwise - */ - isCurrentLineEmpty: function() - { - return this.isCurrentLineBlank() || this.isCurrentLineComment(); - }, - - /** - * Returns true if the current line is blank. - * - * @return Boolean Returns true if the current line is blank, false otherwise - */ - isCurrentLineBlank: function() - { - return '' == this.trim(this.currentLine); - }, - - /** - * Returns true if the current line is a comment line. - * - * @return Boolean Returns true if the current line is a comment line, false otherwise - */ - isCurrentLineComment: function() - { - //checking explicitly the first char of the trim is faster than loops or strpos - var ltrimmedLine = this.currentLine.replace(/^ +/g, ''); - return ltrimmedLine.charAt(0) == '#'; - }, - - /** - * Cleanups a YAML string to be parsed. - * - * @param string value The input YAML string - * - * @return string A cleaned up YAML string - */ - cleanup: function(value) - { - value = value.split("\r\n").join("\n").split("\r").join("\n"); - - if ( !/\n$/.test(value) ) - { - value += "\n"; - } - - // strip YAML header - var count = 0; - var regex = /^\%YAML[: ][\d\.]+.*\n/; - while ( regex.test(value) ) - { - value = value.replace(regex, ''); - count++; - } - this.offset += count; - - // remove leading comments - regex = /^(#.*?\n)+/; - if ( regex.test(value) ) - { - var trimmedValue = value.replace(regex, ''); - - // items have been removed, update the offset - this.offset += this.subStrCount(value, "\n") - this.subStrCount(trimmedValue, "\n"); - value = trimmedValue; - } - - // remove start of the document marker (---) - regex = /^\-\-\-.*?\n/; - if ( regex.test(value) ) - { - trimmedValue = value.replace(regex, ''); - - // items have been removed, update the offset - this.offset += this.subStrCount(value, "\n") - this.subStrCount(trimmedValue, "\n"); - value = trimmedValue; - - // remove end of the document marker (...) - value = value.replace(/\.\.\.\s*$/g, ''); - } - - return value; - }, - - /** - * Returns true if the next line starts unindented collection - * - * @return Boolean Returns true if the next line starts unindented collection, false otherwise - */ - isNextLineUnIndentedCollection: function() - { - var currentIndentation = this.getCurrentLineIndentation(); - var notEOF = this.moveToNextLine(); - - while (notEOF && this.isCurrentLineEmpty()) { - notEOF = this.moveToNextLine(); - } - - if (false === notEOF) { - return false; - } - - var ret = false; - if ( - this.getCurrentLineIndentation() == currentIndentation - && - this.isStringUnIndentedCollectionItem(this.currentLine) - ) { - ret = true; - } - - this.moveToPreviousLine(); - - return ret; - }, - - /** - * Returns true if the string is unindented collection item - * - * @return Boolean Returns true if the string is unindented collection item, false otherwise - */ - isStringUnIndentedCollectionItem: function(string) - { - return (0 === this.currentLine.indexOf('- ')); - }, - - isObject: function(input) - { - return typeof(input) == 'object' && this.isDefined(input); - }, - - isEmpty: function(input) - { - return input == undefined || input == null || input == '' || input == 0 || input == "0" || input == false; - }, - - isDefined: function(input) - { - return input != undefined && input != null; - }, - - reverseArray: function(input /* Array */) - { - var result = []; - var len = input.length; - for ( var i = len-1; i >= 0; i-- ) - { - result.push(input[i]); - } - - return result; - }, - - merge: function(a /* Object */, b /* Object */) - { - var c = {}; - var i; - - for ( i in a ) - { - if ( a.hasOwnProperty(i) ) - if ( /^\d+$/.test(i) ) c.push(a); - else c[i] = a[i]; - } - for ( i in b ) - { - if ( b.hasOwnProperty(i) ) - if ( /^\d+$/.test(i) ) c.push(b); - else c[i] = b[i]; - } - - return c; - }, - - strRepeat: function(str /* String */, count /* Integer */) - { - var i; - var result = ''; - for ( i = 0; i < count; i++ ) result += str; - return result; - }, - - subStrCount: function(string, subString, start, length) - { - var c = 0; - - string = '' + string; - subString = '' + subString; - - if ( start != undefined ) string = string.substr(start); - if ( length != undefined ) string = string.substr(0, length); - - var len = string.length; - var sublen = subString.length; - for ( var i = 0; i < len; i++ ) - { - if ( subString == string.substr(i, sublen) ) - c++; - i += sublen - 1; - } - - return c; - }, - - trim: function(str /* String */) - { - return (str+'').replace(/^ +/,'').replace(/ +$/,''); - } -}; -/** - * YamlEscaper encapsulates escaping rules for single and double-quoted - * YAML strings. - * - * @author Matthew Lewinski - */ -YamlEscaper = function(){}; -YamlEscaper.prototype = -{ - /** - * Determines if a JS value would require double quoting in YAML. - * - * @param string value A JS value - * - * @return Boolean True if the value would require double quotes. - */ - requiresDoubleQuoting: function(value) - { - return new RegExp(YamlEscaper.REGEX_CHARACTER_TO_ESCAPE).test(value); - }, - - /** - * Escapes and surrounds a JS value with double quotes. - * - * @param string value A JS value - * - * @return string The quoted, escaped string - */ - escapeWithDoubleQuotes: function(value) - { - value = value + ''; - var len = YamlEscaper.escapees.length; - var maxlen = YamlEscaper.escaped.length; - var esc = YamlEscaper.escaped; - for (var i = 0; i < len; ++i) - if ( i >= maxlen ) esc.push(''); - - var ret = ''; - ret = value.replace(new RegExp(YamlEscaper.escapees.join('|'),'g'), function(str){ - for(var i = 0; i < len; ++i){ - if( str == YamlEscaper.escapees[i] ) - return esc[i]; - } - }); - return '"' + ret + '"'; - }, - - /** - * Determines if a JS value would require single quoting in YAML. - * - * @param string value A JS value - * - * @return Boolean True if the value would require single quotes. - */ - requiresSingleQuoting: function(value) - { - return /[\s'":{}[\],&*#?]|^[-?|<>=!%@`]/.test(value); - }, - - /** - * Escapes and surrounds a JS value with single quotes. - * - * @param string value A JS value - * - * @return string The quoted, escaped string - */ - escapeWithSingleQuotes : function(value) - { - return "'" + value.replace(/'/g, "''") + "'"; - } -}; - -// Characters that would cause a dumped string to require double quoting. -YamlEscaper.REGEX_CHARACTER_TO_ESCAPE = "[\\x00-\\x1f]|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9"; - -// Mapping arrays for escaping a double quoted string. The backslash is -// first to ensure proper escaping. -YamlEscaper.escapees = ['\\\\', '\\"', '"', - "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", - "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f", - "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", - "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", - "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9"]; -YamlEscaper.escaped = ['\\"', '\\\\', '\\"', - "\\0", "\\x01", "\\x02", "\\x03", "\\x04", "\\x05", "\\x06", "\\a", - "\\b", "\\t", "\\n", "\\v", "\\f", "\\r", "\\x0e", "\\x0f", - "\\x10", "\\x11", "\\x12", "\\x13", "\\x14", "\\x15", "\\x16", "\\x17", - "\\x18", "\\x19", "\\x1a", "\\e", "\\x1c", "\\x1d", "\\x1e", "\\x1f", - "\\N", "\\_", "\\L", "\\P"]; -/** - * YamlUnescaper encapsulates unescaping rules for single and double-quoted - * YAML strings. - * - * @author Matthew Lewinski - */ -var YamlUnescaper = function(){}; -YamlUnescaper.prototype = -{ - /** - * Unescapes a single quoted string. - * - * @param string value A single quoted string. - * - * @return string The unescaped string. - */ - unescapeSingleQuotedString: function(value) - { - return value.replace(/''/g, "'"); - }, - - /** - * Unescapes a double quoted string. - * - * @param string value A double quoted string. - * - * @return string The unescaped string. - */ - unescapeDoubleQuotedString: function(value) - { - var callback = function(m) { - return new YamlUnescaper().unescapeCharacter(m); - }; - - // evaluate the string - return value.replace(new RegExp(YamlUnescaper.REGEX_ESCAPED_CHARACTER, 'g'), callback); - }, - - /** - * Unescapes a character that was found in a double-quoted string - * - * @param string value An escaped character - * - * @return string The unescaped character - */ - unescapeCharacter: function(value) - { - switch (value.charAt(1)) { - case '0': - return String.fromCharCode(0); - case 'a': - return String.fromCharCode(7); - case 'b': - return String.fromCharCode(8); - case 't': - return "\t"; - case "\t": - return "\t"; - case 'n': - return "\n"; - case 'v': - return String.fromCharCode(11); - case 'f': - return String.fromCharCode(12); - case 'r': - return String.fromCharCode(13); - case 'e': - return "\x1b"; - case ' ': - return ' '; - case '"': - return '"'; - case '/': - return '/'; - case '\\': - return '\\'; - case 'N': - // U+0085 NEXT LINE - return "\x00\x85"; - case '_': - // U+00A0 NO-BREAK SPACE - return "\x00\xA0"; - case 'L': - // U+2028 LINE SEPARATOR - return "\x20\x28"; - case 'P': - // U+2029 PARAGRAPH SEPARATOR - return "\x20\x29"; - case 'x': - return this.pack('n', new YamlInline().hexdec(value.substr(2, 2))); - case 'u': - return this.pack('n', new YamlInline().hexdec(value.substr(2, 4))); - case 'U': - return this.pack('N', new YamlInline().hexdec(value.substr(2, 8))); - } - }, - - /** - * @see http://phpjs.org/functions/pack - * @warning only modes used above copied - */ - pack: function(B){var g=0,o=1,m="",l="",z=0,p=[],E,s,C,I,h,c;var d,b,x,H,u,e,A,q,D,t,w,a,G,F,y,v,f;while(g(arguments.length-o)){throw new Error("Warning: pack() Type "+E+": too few arguments")}for(z=0;z>8&255);m+=String.fromCharCode(arguments[o]&255);o++}break;case"N":if(s==="*"){s=arguments.length-o}if(s>(arguments.length-o)){throw new Error("Warning: pack() Type "+E+": too few arguments")}for(z=0;z>24&255);m+=String.fromCharCode(arguments[o]>>16&255);m+=String.fromCharCode(arguments[o]>>8&255);m+=String.fromCharCode(arguments[o]&255);o++}break;default:throw new Error("Warning: pack() Type "+E+": unknown format code")}}if(o - */ -var YamlDumper = function(){}; -YamlDumper.prototype = -{ - /** - * Dumps a JS value to YAML. - * - * @param mixed input The JS value - * @param integer inline The level where you switch to inline YAML - * @param integer indent The level o indentation indentation (used internally) - * - * @return string The YAML representation of the JS value - */ - dump: function(input, inline, indent) - { - if ( inline == null ) inline = 0; - if ( indent == null ) indent = 0; - var output = ''; - var prefix = indent ? this.strRepeat(' ', indent) : ''; - var yaml; - if (!this.numSpacesForIndentation) this.numSpacesForIndentation = 2; - - if ( inline <= 0 || !this.isObject(input) || this.isEmpty(input) ) - { - yaml = new YamlInline(); - output += prefix + yaml.dump(input); - } - else - { - var isAHash = !this.arrayEquals(this.getKeys(input), this.range(0,input.length - 1)); - var willBeInlined; - - for ( var key in input ) - { - if ( input.hasOwnProperty(key) ) - { - willBeInlined = inline - 1 <= 0 || !this.isObject(input[key]) || this.isEmpty(input[key]); - - if ( isAHash ) yaml = new YamlInline(); - - output += - prefix + '' + - (isAHash ? yaml.dump(key)+':' : '-') + '' + - (willBeInlined ? ' ' : "\n") + '' + - this.dump(input[key], inline - 1, (willBeInlined ? 0 : indent + this.numSpacesForIndentation)) + '' + - (willBeInlined ? "\n" : ''); - } - } - } - - return output; - }, - - strRepeat: function(str /* String */, count /* Integer */) - { - var i; - var result = ''; - for ( i = 0; i < count; i++ ) result += str; - return result; - }, - - isObject: function(input) - { - return this.isDefined(input) && typeof(input) == 'object'; - }, - - isEmpty: function(input) - { - var ret = input == undefined || input == null || input == '' || input == 0 || input == "0" || input == false; - if ( !ret && typeof(input) == "object" && !(input instanceof Array)){ - var propCount = 0; - for ( var key in input ) - if ( input.hasOwnProperty(key) ) propCount++; - ret = !propCount; - } - return ret; - }, - - isDefined: function(input) - { - return input != undefined && input != null; - }, - - getKeys: function(tab) - { - var ret = []; - - for ( var name in tab ) - { - if ( tab.hasOwnProperty(name) ) - { - ret.push(name); - } - } - - return ret; - }, - - range: function(start, end) - { - if ( start > end ) return []; - - var ret = []; - - for ( var i = start; i <= end; i++ ) - { - ret.push(i); - } - - return ret; - }, - - arrayEquals: function(a,b) - { - if ( a.length != b.length ) return false; - - var len = a.length; - - for ( var i = 0; i < len; i++ ) - { - if ( a[i] != b[i] ) return false; - } - - return true; - } -}; -})(); diff --git a/node_modules/yamljs/dist/yaml.min.js b/node_modules/yamljs/dist/yaml.min.js deleted file mode 100644 index 96f484f..0000000 --- a/node_modules/yamljs/dist/yaml.min.js +++ /dev/null @@ -1 +0,0 @@ -(function e(t,n,i){function r(l,u){if(!n[l]){if(!t[l]){var a=typeof require=="function"&&require;if(!u&&a)return a(l,!0);if(s)return s(l,!0);var o=new Error("Cannot find module '"+l+"'");throw o.code="MODULE_NOT_FOUND",o}var f=n[l]={exports:{}};t[l][0].call(f.exports,function(e){var n=t[l][1][e];return r(n?n:e)},f,f.exports,e,t,n,i)}return n[l].exports}var s=typeof require=="function"&&require;for(var l=0;lr;e=0<=r?++n:--n){i[t.LIST_ESCAPEES[e]]=t.LIST_ESCAPED[e]}return i}();t.PATTERN_CHARACTERS_TO_ESCAPE=new r("[\\x00-\\x1f]|…| |
|
");t.PATTERN_MAPPING_ESCAPEES=new r(t.LIST_ESCAPEES.join("|").split("\\").join("\\\\"));t.PATTERN_SINGLE_QUOTING=new r("[\\s'\":{}[\\],&*#?]|^[-?|<>=!%@`]");t.requiresDoubleQuoting=function(e){return this.PATTERN_CHARACTERS_TO_ESCAPE.test(e)};t.escapeWithDoubleQuotes=function(e){var t;t=this.PATTERN_MAPPING_ESCAPEES.replace(e,function(e){return function(t){return e.MAPPING_ESCAPEES_TO_ESCAPED[t]}}(this));return'"'+t+'"'};t.requiresSingleQuoting=function(e){return this.PATTERN_SINGLE_QUOTING.test(e)};t.escapeWithSingleQuotes=function(e){return"'"+e.replace(/'/g,"''")+"'"};return t}();t.exports=i},{"./Pattern":8}],3:[function(e,t,n){var i,r=function(e,t){for(var n in t){if(s.call(t,n))e[n]=t[n]}function i(){this.constructor=e}i.prototype=t.prototype;e.prototype=new i;e.__super__=t.prototype;return e},s={}.hasOwnProperty;i=function(e){r(t,e);function t(e,t,n){this.message=e;this.parsedLine=t;this.snippet=n}t.prototype.toString=function(){if(this.parsedLine!=null&&this.snippet!=null){return" "+this.message+" (line "+this.parsedLine+": '"+this.snippet+"')"}else{return" "+this.message}};return t}(Error);t.exports=i},{}],4:[function(e,t,n){var i,r=function(e,t){for(var n in t){if(s.call(t,n))e[n]=t[n]}function i(){this.constructor=e}i.prototype=t.prototype;e.prototype=new i;e.__super__=t.prototype;return e},s={}.hasOwnProperty;i=function(e){r(t,e);function t(e,t,n){this.message=e;this.parsedLine=t;this.snippet=n}t.prototype.toString=function(){if(this.parsedLine!=null&&this.snippet!=null){return" "+this.message+" (line "+this.parsedLine+": '"+this.snippet+"')"}else{return" "+this.message}};return t}(Error);t.exports=i},{}],5:[function(e,t,n){var i,r=function(e,t){for(var n in t){if(s.call(t,n))e[n]=t[n]}function i(){this.constructor=e}i.prototype=t.prototype;e.prototype=new i;e.__super__=t.prototype;return e},s={}.hasOwnProperty;i=function(e){r(t,e);function t(e,t,n){this.message=e;this.parsedLine=t;this.snippet=n}t.prototype.toString=function(){if(this.parsedLine!=null&&this.snippet!=null){return" "+this.message+" (line "+this.parsedLine+": '"+this.snippet+"')"}else{return" "+this.message}};return t}(Error);t.exports=i},{}],6:[function(e,t,n){var i,r,s,l,u,a,o,f,c=[].indexOf||function(e){for(var t=0,n=this.length;t=0){p=this.parseQuotedScalar(e,i);s=i.i;if(t!=null){_=f.ltrim(e.slice(s)," ");if(!(T=_.charAt(0),c.call(t,T)>=0)){throw new l("Unexpected characters ("+e.slice(s)+").")}}}else{if(!t){p=e.slice(s);s+=p.length;A=p.indexOf(" #");if(A!==-1){p=f.rtrim(p.slice(0,A))}}else{u=t.join("|");h=this.PATTERN_SCALAR_BY_DELIMITERS[u];if(h==null){h=new a("^(.+?)("+u+")");this.PATTERN_SCALAR_BY_DELIMITERS[u]=h}if(o=h.exec(e.slice(s))){p=o[1];s+=p.length}else{throw new l("Malformed inline YAML string ("+e+").")}}if(r){p=this.evaluateScalar(p,i)}}i.i=s;return p};e.parseQuotedScalar=function(e,t){var n,i,r;n=t.i;if(!(i=this.PATTERN_QUOTED_SCALAR.exec(e.slice(n)))){throw new u("Malformed inline YAML string ("+e.slice(n)+").")}r=i[0].substr(1,i[0].length-2);if('"'===e.charAt(n)){r=o.unescapeDoubleQuotedString(r)}else{r=o.unescapeSingleQuotedString(r)}n+=i[0].length;t.i=n;return r};e.parseSequence=function(e,t){var n,i,r,s,l,a,o,f;a=[];l=e.length;r=t.i;r+=1;while(r0)){h=null}return o(E.slice(0,u),h)}}if(r){throw new l("Custom object support when parsing a YAML file has been disabled.")}return null}break;case"0":if("0x"===e.slice(0,2)){return f.hexDec(e)}else if(f.isDigits(e)){return f.octDec(e)}else if(f.isNumeric(e)){return parseFloat(e)}else{return e}break;case"+":if(f.isDigits(e)){c=e;n=parseInt(c);if(c===String(n)){return n}else{return c}}else if(f.isNumeric(e)){return parseFloat(e)}else if(this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(e)){return parseFloat(e.replace(",",""))}return e;case"-":if(f.isDigits(e.slice(1))){if("0"===e.charAt(1)){return-f.octDec(e.slice(1))}else{c=e.slice(1);n=parseInt(c);if(c===String(n)){return-n}else{return-c}}}else if(f.isNumeric(e)){return parseFloat(e)}else if(this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(e)){return parseFloat(e.replace(",",""))}return e;default:if(i=f.stringToDate(e)){return i}else if(f.isNumeric(e)){return parseFloat(e)}else if(this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(e)){return parseFloat(e.replace(",",""))}return e}}};return e}();t.exports=s},{"./Escaper":2,"./Exception/DumpException":3,"./Exception/ParseException":4,"./Exception/ParseMore":5,"./Pattern":8,"./Unescaper":9,"./Utils":10}],7:[function(e,t,n){var i,r,s,l,u,a;i=e("./Inline");u=e("./Pattern");a=e("./Utils");r=e("./Exception/ParseException");s=e("./Exception/ParseMore");l=function(){e.prototype.PATTERN_FOLDED_SCALAR_ALL=new u("^(?:(?![^\\|>]*)\\s+)?(?\\||>)(?\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(? +#.*)?$");e.prototype.PATTERN_FOLDED_SCALAR_END=new u("(?\\||>)(?\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(? +#.*)?$");e.prototype.PATTERN_SEQUENCE_ITEM=new u("^\\-((?\\s+)(?.+?))?\\s*$");e.prototype.PATTERN_ANCHOR_VALUE=new u("^&(?[^ ]+) *(?.*)");e.prototype.PATTERN_COMPACT_NOTATION=new u("^(?"+i.REGEX_QUOTED_STRING+"|[^ '\"\\{\\[].*?) *\\:(\\s+(?.+?))?\\s*$");e.prototype.PATTERN_MAPPING_ITEM=new u("^(?"+i.REGEX_QUOTED_STRING+"|[^ '\"\\[\\{].*?) *\\:(\\s+(?.+?))?\\s*$");e.prototype.PATTERN_DECIMAL=new u("\\d+");e.prototype.PATTERN_INDENT_SPACES=new u("^ +");e.prototype.PATTERN_TRAILING_LINES=new u("(\n*)$");e.prototype.PATTERN_YAML_HEADER=new u("^\\%YAML[: ][\\d\\.]+.*\n","m");e.prototype.PATTERN_LEADING_COMMENTS=new u("^(\\#.*?\n)+","m");e.prototype.PATTERN_DOCUMENT_MARKER_START=new u("^\\-\\-\\-.*?\n","m");e.prototype.PATTERN_DOCUMENT_MARKER_END=new u("^\\.\\.\\.\\s*$","m");e.prototype.PATTERN_FOLDED_SCALAR_BY_INDENTATION={};e.prototype.CONTEXT_NONE=0;e.prototype.CONTEXT_SEQUENCE=1;e.prototype.CONTEXT_MAPPING=2;function e(e){this.offset=e!=null?e:0;this.lines=[];this.currentLineNb=-1;this.currentLine="";this.refs={}}e.prototype.parse=function(t,n,s){var l,u,o,f,c,p,h,E,T,A,_,L,d,N,g,R,x,C,m,I,S,w,v,y,P,b,D,O,M,G,U,X,F,k,H,j,Y,B,Q;if(n==null){n=false}if(s==null){s=null}this.currentLineNb=-1;this.currentLine="";this.lines=this.cleanup(t).split("\n");p=null;c=this.CONTEXT_NONE;u=false;while(this.moveToNextLine()){if(this.isCurrentLineEmpty()){continue}if("\t"===this.currentLine[0]){throw new r("A YAML file cannot contain tabs as indentation.",this.getRealCurrentLineNb()+1,this.currentLine)}N=D=false;if(Q=this.PATTERN_SEQUENCE_ITEM.exec(this.currentLine)){if(this.CONTEXT_MAPPING===c){throw new r("You cannot define a sequence item when in a mapping")}c=this.CONTEXT_SEQUENCE;if(p==null){p=[]}if(Q.value!=null&&(b=this.PATTERN_ANCHOR_VALUE.exec(Q.value))){N=b.ref;Q.value=b.value}if(!(Q.value!=null)||""===a.trim(Q.value," ")||a.ltrim(Q.value," ").indexOf("#")===0){if(this.currentLineNb=l){n.push(this.currentLine.slice(l))}else if(a.ltrim(this.currentLine).charAt(0)==="#"){}else if(0===i){this.moveToPreviousLine();break}else{throw new r("Indentation problem.",this.getRealCurrentLineNb()+1,this.currentLine)}}return n.join("\n")};e.prototype.moveToNextLine=function(){if(this.currentLineNb>=this.lines.length-1){return false}this.currentLine=this.lines[++this.currentLineNb];return true};e.prototype.moveToPreviousLine=function(){this.currentLine=this.lines[--this.currentLineNb]};e.prototype.parseValue=function(e,t,n){var l,u,o,f,c,p,h,E,T;if(0===e.indexOf("*")){p=e.indexOf("#");if(p!==-1){e=e.substr(1,p-2)}else{e=e.slice(1)}if(this.refs[e]===void 0){throw new r('Reference "'+e+'" does not exist.',this.currentLine)}return this.refs[e]}if(f=this.PATTERN_FOLDED_SCALAR_ALL.exec(e)){c=(h=f.modifiers)!=null?h:"";o=Math.abs(parseInt(c));if(isNaN(o)){o=0}T=this.parseFoldedScalar(f.separator,this.PATTERN_DECIMAL.replace(c,""),o);if(f.type!=null){i.configure(t,n);return i.parseScalar(f.type+" "+T)}else{return T}}if((E=e.charAt(0))==="["||E==="{"||E==='"'||E==="'"){while(true){try{return i.parse(e,t,n)}catch(u){l=u;if(l instanceof s&&this.moveToNextLine()){e+="\n"+a.trim(this.currentLine," ")}else{l.parsedLine=this.getRealCurrentLineNb()+1;l.snippet=this.currentLine;throw l}}}}else{if(this.isNextLineIndented()){e+="\n"+this.getNextEmbedBlock()}return i.parse(e,t,n)}};e.prototype.parseFoldedScalar=function(t,n,i){var r,s,l,o,f,c,p,h,E,T;if(n==null){n=""}if(i==null){i=0}p=this.moveToNextLine();if(!p){return""}r=this.isCurrentLineBlank();T="";while(p&&r){if(p=this.moveToNextLine()){T+="\n";r=this.isCurrentLineBlank()}}if(0===i){if(f=this.PATTERN_INDENT_SPACES.exec(this.currentLine)){i=f[0].length}}if(i>0){h=this.PATTERN_FOLDED_SCALAR_BY_INDENTATION[i];if(h==null){h=new u("^ {"+i+"}(.*)$");e.prototype.PATTERN_FOLDED_SCALAR_BY_INDENTATION[i]=h}while(p&&(r||(f=h.exec(this.currentLine)))){if(r){T+=this.currentLine.slice(i)}else{T+=f[1]}if(p=this.moveToNextLine()){T+="\n";r=this.isCurrentLineBlank()}}}else if(p){T+="\n"}if(p){this.moveToPreviousLine()}if(">"===t){c="";E=T.split("\n");for(s=0,l=E.length;sn){i=true}this.moveToPreviousLine();return i};e.prototype.isCurrentLineEmpty=function(){var e;e=a.trim(this.currentLine," ");return e.length===0||e.charAt(0)==="#"};e.prototype.isCurrentLineBlank=function(){return""===a.trim(this.currentLine," ")};e.prototype.isCurrentLineComment=function(){var e;e=a.ltrim(this.currentLine," ");return e.charAt(0)==="#"};e.prototype.cleanup=function(e){var t,n,i,r,s,l,u,o,f,c,p,h,E,T;if(e.indexOf("\r")!==-1){e=e.split("\r\n").join("\n").split("\r").join("\n")}t=0;c=this.PATTERN_YAML_HEADER.replaceAll(e,""),e=c[0],t=c[1];this.offset+=t;p=this.PATTERN_LEADING_COMMENTS.replaceAll(e,"",1),T=p[0],t=p[1];if(t===1){this.offset+=a.subStrCount(e,"\n")-a.subStrCount(T,"\n");e=T}h=this.PATTERN_DOCUMENT_MARKER_START.replaceAll(e,"",1),T=h[0],t=h[1];if(t===1){this.offset+=a.subStrCount(e,"\n")-a.subStrCount(T,"\n");e=T;e=this.PATTERN_DOCUMENT_MARKER_END.replace(e,"")}f=e.split("\n");E=-1;for(r=0,l=f.length;r0){for(n=s=0,u=f.length;s"){r+="(";s++;if(a.length>0){if(u==null){u={}}u[a]=i}break}else{a+=f}s++}}else{r+=n;i++}}else{r+=n}}else{r+=n}s++}this.rawRegex=e;this.cleanedRegex=r;this.regex=new RegExp(this.cleanedRegex,"g"+t.replace("g",""));this.mapping=u}e.prototype.exec=function(e){var t,n,i,r;this.regex.lastIndex=0;n=this.regex.exec(e);if(n==null){return null}if(this.mapping!=null){r=this.mapping;for(i in r){t=r[i];n[i]=n[t]}}return n};e.prototype.test=function(e){this.regex.lastIndex=0;return this.regex.test(e)};e.prototype.replace=function(e,t){this.regex.lastIndex=0;return e.replace(this.regex,t)};e.prototype.replaceAll=function(e,t,n){var i;if(n==null){n=0}this.regex.lastIndex=0;i=0;while(this.regex.test(e)&&(n===0||i[0-9][0-9][0-9][0-9])"+"-(?[0-9][0-9]?)"+"-(?[0-9][0-9]?)"+"(?:(?:[Tt]|[ \t]+)"+"(?[0-9][0-9]?)"+":(?[0-9][0-9])"+":(?[0-9][0-9])"+"(?:.(?[0-9]*))?"+"(?:[ \t]*(?Z|(?[-+])(?[0-9][0-9]?)"+"(?::(?[0-9][0-9]))?))?)?"+"$","i");t.LOCAL_TIMEZONE_OFFSET=(new Date).getTimezoneOffset()*60*1e3;t.trim=function(e,t){var n,i;if(t==null){t="\\s"}n=this.REGEX_LEFT_TRIM_BY_CHAR[t];if(n==null){this.REGEX_LEFT_TRIM_BY_CHAR[t]=n=new RegExp("^"+t+""+t+"*")}n.lastIndex=0;i=this.REGEX_RIGHT_TRIM_BY_CHAR[t];if(i==null){this.REGEX_RIGHT_TRIM_BY_CHAR[t]=i=new RegExp(t+""+t+"*$")}i.lastIndex=0;return e.replace(n,"").replace(i,"")};t.ltrim=function(e,t){var n;if(t==null){t="\\s"}n=this.REGEX_LEFT_TRIM_BY_CHAR[t];if(n==null){this.REGEX_LEFT_TRIM_BY_CHAR[t]=n=new RegExp("^"+t+""+t+"*")}n.lastIndex=0;return e.replace(n,"")};t.rtrim=function(e,t){var n;if(t==null){t="\\s"}n=this.REGEX_RIGHT_TRIM_BY_CHAR[t];if(n==null){this.REGEX_RIGHT_TRIM_BY_CHAR[t]=n=new RegExp(t+""+t+"*$")}n.lastIndex=0;return e.replace(n,"")};t.isEmpty=function(e){return!e||e===""||e==="0"||e instanceof Array&&e.length===0||this.isEmptyObject(e)};t.isEmptyObject=function(e){var t;return e instanceof Object&&function(){var n;n=[];for(t in e){if(!s.call(e,t))continue;n.push(t)}return n}().length===0};t.subStrCount=function(e,t,n,i){var r,s,l,u,a,o;r=0;e=""+e;t=""+t;if(n!=null){e=e.slice(n)}if(i!=null){e=e.slice(0,i)}u=e.length;o=t.length;for(s=l=0,a=u;0<=a?la;s=0<=a?++l:--l){if(t===e.slice(s,o)){r++;s+=o-1}}return r};t.isDigits=function(e){this.REGEX_DIGITS.lastIndex=0;return this.REGEX_DIGITS.test(e)};t.octDec=function(e){this.REGEX_OCTAL.lastIndex=0;return parseInt((e+"").replace(this.REGEX_OCTAL,""),8)};t.hexDec=function(e){this.REGEX_HEXADECIMAL.lastIndex=0;e=this.trim(e);if((e+"").slice(0,2)==="0x"){e=(e+"").slice(2)}return parseInt((e+"").replace(this.REGEX_HEXADECIMAL,""),16)};t.utf8chr=function(e){var t;t=String.fromCharCode;if(128>(e%=2097152)){return t(e)}if(2048>e){return t(192|e>>6)+t(128|e&63)}if(65536>e){return t(224|e>>12)+t(128|e>>6&63)+t(128|e&63)}return t(240|e>>18)+t(128|e>>12&63)+t(128|e>>6&63)+t(128|e&63)};t.parseBoolean=function(e,t){var n;if(t==null){t=true}if(typeof e==="string"){n=e.toLowerCase();if(!t){if(n==="no"){return false}}if(n==="0"){return false}if(n==="false"){return false}if(n===""){return false}return true}return!!e};t.isNumeric=function(e){this.REGEX_SPACES.lastIndex=0;return typeof e==="number"||typeof e==="string"&&!isNaN(e)&&e.replace(this.REGEX_SPACES,"")!==""};t.stringToDate=function(e){var t,n,i,r,s,l,u,a,o,f,c,p;if(!(e!=null?e.length:void 0)){return null}s=this.PATTERN_DATE.exec(e);if(!s){return null}p=parseInt(s.year,10);u=parseInt(s.month,10)-1;n=parseInt(s.day,10);if(s.hour==null){t=new Date(Date.UTC(p,u,n));return t}r=parseInt(s.hour,10);l=parseInt(s.minute,10);a=parseInt(s.second,10);if(s.fraction!=null){i=s.fraction.slice(0,3);while(i.length<3){i+="0"}i=parseInt(i,10)}else{i=0}if(s.tz!=null){o=parseInt(s.tz_hour,10);if(s.tz_minute!=null){f=parseInt(s.tz_minute,10)}else{f=0}c=(o*60+f)*6e4;if("-"===s.tz_sign){c*=-1}}t=new Date(Date.UTC(p,u,n,r,l,a,i));if(c){t.setTime(t.getTime()-c)}return t};t.strRepeat=function(e,t){var n,i;i="";n=0;while(n ref; i = 0 <= ref ? ++j : --j) { - mapping[Escaper.LIST_ESCAPEES[i]] = Escaper.LIST_ESCAPED[i]; - } - return mapping; - })(); - - Escaper.PATTERN_CHARACTERS_TO_ESCAPE = new Pattern('[\\x00-\\x1f]|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9'); - - Escaper.PATTERN_MAPPING_ESCAPEES = new Pattern(Escaper.LIST_ESCAPEES.join('|').split('\\').join('\\\\')); - - Escaper.PATTERN_SINGLE_QUOTING = new Pattern('[\\s\'":{}[\\],&*#?]|^[-?|<>=!%@`]'); - - Escaper.requiresDoubleQuoting = function(value) { - return this.PATTERN_CHARACTERS_TO_ESCAPE.test(value); - }; - - Escaper.escapeWithDoubleQuotes = function(value) { - var result; - result = this.PATTERN_MAPPING_ESCAPEES.replace(value, (function(_this) { - return function(str) { - return _this.MAPPING_ESCAPEES_TO_ESCAPED[str]; - }; - })(this)); - return '"' + result + '"'; - }; - - Escaper.requiresSingleQuoting = function(value) { - return this.PATTERN_SINGLE_QUOTING.test(value); - }; - - Escaper.escapeWithSingleQuotes = function(value) { - return "'" + value.replace(/'/g, "''") + "'"; - }; - - return Escaper; - -})(); - -module.exports = Escaper; diff --git a/node_modules/yamljs/lib/Exception/DumpException.js b/node_modules/yamljs/lib/Exception/DumpException.js deleted file mode 100644 index 80f61ac..0000000 --- a/node_modules/yamljs/lib/Exception/DumpException.js +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by CoffeeScript 1.12.4 -var DumpException, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - -DumpException = (function(superClass) { - extend(DumpException, superClass); - - function DumpException(message, parsedLine, snippet) { - this.message = message; - this.parsedLine = parsedLine; - this.snippet = snippet; - } - - DumpException.prototype.toString = function() { - if ((this.parsedLine != null) && (this.snippet != null)) { - return ' ' + this.message + ' (line ' + this.parsedLine + ': \'' + this.snippet + '\')'; - } else { - return ' ' + this.message; - } - }; - - return DumpException; - -})(Error); - -module.exports = DumpException; diff --git a/node_modules/yamljs/lib/Exception/ParseException.js b/node_modules/yamljs/lib/Exception/ParseException.js deleted file mode 100644 index a50ffc5..0000000 --- a/node_modules/yamljs/lib/Exception/ParseException.js +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by CoffeeScript 1.12.4 -var ParseException, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - -ParseException = (function(superClass) { - extend(ParseException, superClass); - - function ParseException(message, parsedLine, snippet) { - this.message = message; - this.parsedLine = parsedLine; - this.snippet = snippet; - } - - ParseException.prototype.toString = function() { - if ((this.parsedLine != null) && (this.snippet != null)) { - return ' ' + this.message + ' (line ' + this.parsedLine + ': \'' + this.snippet + '\')'; - } else { - return ' ' + this.message; - } - }; - - return ParseException; - -})(Error); - -module.exports = ParseException; diff --git a/node_modules/yamljs/lib/Exception/ParseMore.js b/node_modules/yamljs/lib/Exception/ParseMore.js deleted file mode 100644 index 88c8776..0000000 --- a/node_modules/yamljs/lib/Exception/ParseMore.js +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by CoffeeScript 1.12.4 -var ParseMore, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - -ParseMore = (function(superClass) { - extend(ParseMore, superClass); - - function ParseMore(message, parsedLine, snippet) { - this.message = message; - this.parsedLine = parsedLine; - this.snippet = snippet; - } - - ParseMore.prototype.toString = function() { - if ((this.parsedLine != null) && (this.snippet != null)) { - return ' ' + this.message + ' (line ' + this.parsedLine + ': \'' + this.snippet + '\')'; - } else { - return ' ' + this.message; - } - }; - - return ParseMore; - -})(Error); - -module.exports = ParseMore; diff --git a/node_modules/yamljs/lib/Inline.js b/node_modules/yamljs/lib/Inline.js deleted file mode 100644 index aaf980b..0000000 --- a/node_modules/yamljs/lib/Inline.js +++ /dev/null @@ -1,485 +0,0 @@ -// Generated by CoffeeScript 1.12.4 -var DumpException, Escaper, Inline, ParseException, ParseMore, Pattern, Unescaper, Utils, - indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - -Pattern = require('./Pattern'); - -Unescaper = require('./Unescaper'); - -Escaper = require('./Escaper'); - -Utils = require('./Utils'); - -ParseException = require('./Exception/ParseException'); - -ParseMore = require('./Exception/ParseMore'); - -DumpException = require('./Exception/DumpException'); - -Inline = (function() { - function Inline() {} - - Inline.REGEX_QUOTED_STRING = '(?:"(?:[^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'(?:[^\']*(?:\'\'[^\']*)*)\')'; - - Inline.PATTERN_TRAILING_COMMENTS = new Pattern('^\\s*#.*$'); - - Inline.PATTERN_QUOTED_SCALAR = new Pattern('^' + Inline.REGEX_QUOTED_STRING); - - Inline.PATTERN_THOUSAND_NUMERIC_SCALAR = new Pattern('^(-|\\+)?[0-9,]+(\\.[0-9]+)?$'); - - Inline.PATTERN_SCALAR_BY_DELIMITERS = {}; - - Inline.settings = {}; - - Inline.configure = function(exceptionOnInvalidType, objectDecoder) { - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = null; - } - if (objectDecoder == null) { - objectDecoder = null; - } - this.settings.exceptionOnInvalidType = exceptionOnInvalidType; - this.settings.objectDecoder = objectDecoder; - }; - - Inline.parse = function(value, exceptionOnInvalidType, objectDecoder) { - var context, result; - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = false; - } - if (objectDecoder == null) { - objectDecoder = null; - } - this.settings.exceptionOnInvalidType = exceptionOnInvalidType; - this.settings.objectDecoder = objectDecoder; - if (value == null) { - return ''; - } - value = Utils.trim(value); - if (0 === value.length) { - return ''; - } - context = { - exceptionOnInvalidType: exceptionOnInvalidType, - objectDecoder: objectDecoder, - i: 0 - }; - switch (value.charAt(0)) { - case '[': - result = this.parseSequence(value, context); - ++context.i; - break; - case '{': - result = this.parseMapping(value, context); - ++context.i; - break; - default: - result = this.parseScalar(value, null, ['"', "'"], context); - } - if (this.PATTERN_TRAILING_COMMENTS.replace(value.slice(context.i), '') !== '') { - throw new ParseException('Unexpected characters near "' + value.slice(context.i) + '".'); - } - return result; - }; - - Inline.dump = function(value, exceptionOnInvalidType, objectEncoder) { - var ref, result, type; - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = false; - } - if (objectEncoder == null) { - objectEncoder = null; - } - if (value == null) { - return 'null'; - } - type = typeof value; - if (type === 'object') { - if (value instanceof Date) { - return value.toISOString(); - } else if (objectEncoder != null) { - result = objectEncoder(value); - if (typeof result === 'string' || (result != null)) { - return result; - } - } - return this.dumpObject(value); - } - if (type === 'boolean') { - return (value ? 'true' : 'false'); - } - if (Utils.isDigits(value)) { - return (type === 'string' ? "'" + value + "'" : String(parseInt(value))); - } - if (Utils.isNumeric(value)) { - return (type === 'string' ? "'" + value + "'" : String(parseFloat(value))); - } - if (type === 'number') { - return (value === 2e308 ? '.Inf' : (value === -2e308 ? '-.Inf' : (isNaN(value) ? '.NaN' : value))); - } - if (Escaper.requiresDoubleQuoting(value)) { - return Escaper.escapeWithDoubleQuotes(value); - } - if (Escaper.requiresSingleQuoting(value)) { - return Escaper.escapeWithSingleQuotes(value); - } - if ('' === value) { - return '""'; - } - if (Utils.PATTERN_DATE.test(value)) { - return "'" + value + "'"; - } - if ((ref = value.toLowerCase()) === 'null' || ref === '~' || ref === 'true' || ref === 'false') { - return "'" + value + "'"; - } - return value; - }; - - Inline.dumpObject = function(value, exceptionOnInvalidType, objectSupport) { - var j, key, len1, output, val; - if (objectSupport == null) { - objectSupport = null; - } - if (value instanceof Array) { - output = []; - for (j = 0, len1 = value.length; j < len1; j++) { - val = value[j]; - output.push(this.dump(val)); - } - return '[' + output.join(', ') + ']'; - } else { - output = []; - for (key in value) { - val = value[key]; - output.push(this.dump(key) + ': ' + this.dump(val)); - } - return '{' + output.join(', ') + '}'; - } - }; - - Inline.parseScalar = function(scalar, delimiters, stringDelimiters, context, evaluate) { - var i, joinedDelimiters, match, output, pattern, ref, ref1, strpos, tmp; - if (delimiters == null) { - delimiters = null; - } - if (stringDelimiters == null) { - stringDelimiters = ['"', "'"]; - } - if (context == null) { - context = null; - } - if (evaluate == null) { - evaluate = true; - } - if (context == null) { - context = { - exceptionOnInvalidType: this.settings.exceptionOnInvalidType, - objectDecoder: this.settings.objectDecoder, - i: 0 - }; - } - i = context.i; - if (ref = scalar.charAt(i), indexOf.call(stringDelimiters, ref) >= 0) { - output = this.parseQuotedScalar(scalar, context); - i = context.i; - if (delimiters != null) { - tmp = Utils.ltrim(scalar.slice(i), ' '); - if (!(ref1 = tmp.charAt(0), indexOf.call(delimiters, ref1) >= 0)) { - throw new ParseException('Unexpected characters (' + scalar.slice(i) + ').'); - } - } - } else { - if (!delimiters) { - output = scalar.slice(i); - i += output.length; - strpos = output.indexOf(' #'); - if (strpos !== -1) { - output = Utils.rtrim(output.slice(0, strpos)); - } - } else { - joinedDelimiters = delimiters.join('|'); - pattern = this.PATTERN_SCALAR_BY_DELIMITERS[joinedDelimiters]; - if (pattern == null) { - pattern = new Pattern('^(.+?)(' + joinedDelimiters + ')'); - this.PATTERN_SCALAR_BY_DELIMITERS[joinedDelimiters] = pattern; - } - if (match = pattern.exec(scalar.slice(i))) { - output = match[1]; - i += output.length; - } else { - throw new ParseException('Malformed inline YAML string (' + scalar + ').'); - } - } - if (evaluate) { - output = this.evaluateScalar(output, context); - } - } - context.i = i; - return output; - }; - - Inline.parseQuotedScalar = function(scalar, context) { - var i, match, output; - i = context.i; - if (!(match = this.PATTERN_QUOTED_SCALAR.exec(scalar.slice(i)))) { - throw new ParseMore('Malformed inline YAML string (' + scalar.slice(i) + ').'); - } - output = match[0].substr(1, match[0].length - 2); - if ('"' === scalar.charAt(i)) { - output = Unescaper.unescapeDoubleQuotedString(output); - } else { - output = Unescaper.unescapeSingleQuotedString(output); - } - i += match[0].length; - context.i = i; - return output; - }; - - Inline.parseSequence = function(sequence, context) { - var e, i, isQuoted, len, output, ref, value; - output = []; - len = sequence.length; - i = context.i; - i += 1; - while (i < len) { - context.i = i; - switch (sequence.charAt(i)) { - case '[': - output.push(this.parseSequence(sequence, context)); - i = context.i; - break; - case '{': - output.push(this.parseMapping(sequence, context)); - i = context.i; - break; - case ']': - return output; - case ',': - case ' ': - case "\n": - break; - default: - isQuoted = ((ref = sequence.charAt(i)) === '"' || ref === "'"); - value = this.parseScalar(sequence, [',', ']'], ['"', "'"], context); - i = context.i; - if (!isQuoted && typeof value === 'string' && (value.indexOf(': ') !== -1 || value.indexOf(":\n") !== -1)) { - try { - value = this.parseMapping('{' + value + '}'); - } catch (error) { - e = error; - } - } - output.push(value); - --i; - } - ++i; - } - throw new ParseMore('Malformed inline YAML string ' + sequence); - }; - - Inline.parseMapping = function(mapping, context) { - var done, i, key, len, output, shouldContinueWhileLoop, value; - output = {}; - len = mapping.length; - i = context.i; - i += 1; - shouldContinueWhileLoop = false; - while (i < len) { - context.i = i; - switch (mapping.charAt(i)) { - case ' ': - case ',': - case "\n": - ++i; - context.i = i; - shouldContinueWhileLoop = true; - break; - case '}': - return output; - } - if (shouldContinueWhileLoop) { - shouldContinueWhileLoop = false; - continue; - } - key = this.parseScalar(mapping, [':', ' ', "\n"], ['"', "'"], context, false); - i = context.i; - done = false; - while (i < len) { - context.i = i; - switch (mapping.charAt(i)) { - case '[': - value = this.parseSequence(mapping, context); - i = context.i; - if (output[key] === void 0) { - output[key] = value; - } - done = true; - break; - case '{': - value = this.parseMapping(mapping, context); - i = context.i; - if (output[key] === void 0) { - output[key] = value; - } - done = true; - break; - case ':': - case ' ': - case "\n": - break; - default: - value = this.parseScalar(mapping, [',', '}'], ['"', "'"], context); - i = context.i; - if (output[key] === void 0) { - output[key] = value; - } - done = true; - --i; - } - ++i; - if (done) { - break; - } - } - } - throw new ParseMore('Malformed inline YAML string ' + mapping); - }; - - Inline.evaluateScalar = function(scalar, context) { - var cast, date, exceptionOnInvalidType, firstChar, firstSpace, firstWord, objectDecoder, raw, scalarLower, subValue, trimmedScalar; - scalar = Utils.trim(scalar); - scalarLower = scalar.toLowerCase(); - switch (scalarLower) { - case 'null': - case '': - case '~': - return null; - case 'true': - return true; - case 'false': - return false; - case '.inf': - return 2e308; - case '.nan': - return 0/0; - case '-.inf': - return 2e308; - default: - firstChar = scalarLower.charAt(0); - switch (firstChar) { - case '!': - firstSpace = scalar.indexOf(' '); - if (firstSpace === -1) { - firstWord = scalarLower; - } else { - firstWord = scalarLower.slice(0, firstSpace); - } - switch (firstWord) { - case '!': - if (firstSpace !== -1) { - return parseInt(this.parseScalar(scalar.slice(2))); - } - return null; - case '!str': - return Utils.ltrim(scalar.slice(4)); - case '!!str': - return Utils.ltrim(scalar.slice(5)); - case '!!int': - return parseInt(this.parseScalar(scalar.slice(5))); - case '!!bool': - return Utils.parseBoolean(this.parseScalar(scalar.slice(6)), false); - case '!!float': - return parseFloat(this.parseScalar(scalar.slice(7))); - case '!!timestamp': - return Utils.stringToDate(Utils.ltrim(scalar.slice(11))); - default: - if (context == null) { - context = { - exceptionOnInvalidType: this.settings.exceptionOnInvalidType, - objectDecoder: this.settings.objectDecoder, - i: 0 - }; - } - objectDecoder = context.objectDecoder, exceptionOnInvalidType = context.exceptionOnInvalidType; - if (objectDecoder) { - trimmedScalar = Utils.rtrim(scalar); - firstSpace = trimmedScalar.indexOf(' '); - if (firstSpace === -1) { - return objectDecoder(trimmedScalar, null); - } else { - subValue = Utils.ltrim(trimmedScalar.slice(firstSpace + 1)); - if (!(subValue.length > 0)) { - subValue = null; - } - return objectDecoder(trimmedScalar.slice(0, firstSpace), subValue); - } - } - if (exceptionOnInvalidType) { - throw new ParseException('Custom object support when parsing a YAML file has been disabled.'); - } - return null; - } - break; - case '0': - if ('0x' === scalar.slice(0, 2)) { - return Utils.hexDec(scalar); - } else if (Utils.isDigits(scalar)) { - return Utils.octDec(scalar); - } else if (Utils.isNumeric(scalar)) { - return parseFloat(scalar); - } else { - return scalar; - } - break; - case '+': - if (Utils.isDigits(scalar)) { - raw = scalar; - cast = parseInt(raw); - if (raw === String(cast)) { - return cast; - } else { - return raw; - } - } else if (Utils.isNumeric(scalar)) { - return parseFloat(scalar); - } else if (this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(scalar)) { - return parseFloat(scalar.replace(',', '')); - } - return scalar; - case '-': - if (Utils.isDigits(scalar.slice(1))) { - if ('0' === scalar.charAt(1)) { - return -Utils.octDec(scalar.slice(1)); - } else { - raw = scalar.slice(1); - cast = parseInt(raw); - if (raw === String(cast)) { - return -cast; - } else { - return -raw; - } - } - } else if (Utils.isNumeric(scalar)) { - return parseFloat(scalar); - } else if (this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(scalar)) { - return parseFloat(scalar.replace(',', '')); - } - return scalar; - default: - if (date = Utils.stringToDate(scalar)) { - return date; - } else if (Utils.isNumeric(scalar)) { - return parseFloat(scalar); - } else if (this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(scalar)) { - return parseFloat(scalar.replace(',', '')); - } - return scalar; - } - } - }; - - return Inline; - -})(); - -module.exports = Inline; diff --git a/node_modules/yamljs/lib/Parser.js b/node_modules/yamljs/lib/Parser.js deleted file mode 100644 index 93237bf..0000000 --- a/node_modules/yamljs/lib/Parser.js +++ /dev/null @@ -1,603 +0,0 @@ -// Generated by CoffeeScript 1.12.4 -var Inline, ParseException, ParseMore, Parser, Pattern, Utils; - -Inline = require('./Inline'); - -Pattern = require('./Pattern'); - -Utils = require('./Utils'); - -ParseException = require('./Exception/ParseException'); - -ParseMore = require('./Exception/ParseMore'); - -Parser = (function() { - Parser.prototype.PATTERN_FOLDED_SCALAR_ALL = new Pattern('^(?:(?![^\\|>]*)\\s+)?(?\\||>)(?\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(? +#.*)?$'); - - Parser.prototype.PATTERN_FOLDED_SCALAR_END = new Pattern('(?\\||>)(?\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(? +#.*)?$'); - - Parser.prototype.PATTERN_SEQUENCE_ITEM = new Pattern('^\\-((?\\s+)(?.+?))?\\s*$'); - - Parser.prototype.PATTERN_ANCHOR_VALUE = new Pattern('^&(?[^ ]+) *(?.*)'); - - Parser.prototype.PATTERN_COMPACT_NOTATION = new Pattern('^(?' + Inline.REGEX_QUOTED_STRING + '|[^ \'"\\{\\[].*?) *\\:(\\s+(?.+?))?\\s*$'); - - Parser.prototype.PATTERN_MAPPING_ITEM = new Pattern('^(?' + Inline.REGEX_QUOTED_STRING + '|[^ \'"\\[\\{].*?) *\\:(\\s+(?.+?))?\\s*$'); - - Parser.prototype.PATTERN_DECIMAL = new Pattern('\\d+'); - - Parser.prototype.PATTERN_INDENT_SPACES = new Pattern('^ +'); - - Parser.prototype.PATTERN_TRAILING_LINES = new Pattern('(\n*)$'); - - Parser.prototype.PATTERN_YAML_HEADER = new Pattern('^\\%YAML[: ][\\d\\.]+.*\n', 'm'); - - Parser.prototype.PATTERN_LEADING_COMMENTS = new Pattern('^(\\#.*?\n)+', 'm'); - - Parser.prototype.PATTERN_DOCUMENT_MARKER_START = new Pattern('^\\-\\-\\-.*?\n', 'm'); - - Parser.prototype.PATTERN_DOCUMENT_MARKER_END = new Pattern('^\\.\\.\\.\\s*$', 'm'); - - Parser.prototype.PATTERN_FOLDED_SCALAR_BY_INDENTATION = {}; - - Parser.prototype.CONTEXT_NONE = 0; - - Parser.prototype.CONTEXT_SEQUENCE = 1; - - Parser.prototype.CONTEXT_MAPPING = 2; - - function Parser(offset) { - this.offset = offset != null ? offset : 0; - this.lines = []; - this.currentLineNb = -1; - this.currentLine = ''; - this.refs = {}; - } - - Parser.prototype.parse = function(value, exceptionOnInvalidType, objectDecoder) { - var alias, allowOverwrite, block, c, context, data, e, first, i, indent, isRef, j, k, key, l, lastKey, len, len1, len2, len3, lineCount, m, matches, mergeNode, n, name, parsed, parsedItem, parser, ref, ref1, ref2, refName, refValue, val, values; - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = false; - } - if (objectDecoder == null) { - objectDecoder = null; - } - this.currentLineNb = -1; - this.currentLine = ''; - this.lines = this.cleanup(value).split("\n"); - data = null; - context = this.CONTEXT_NONE; - allowOverwrite = false; - while (this.moveToNextLine()) { - if (this.isCurrentLineEmpty()) { - continue; - } - if ("\t" === this.currentLine[0]) { - throw new ParseException('A YAML file cannot contain tabs as indentation.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - isRef = mergeNode = false; - if (values = this.PATTERN_SEQUENCE_ITEM.exec(this.currentLine)) { - if (this.CONTEXT_MAPPING === context) { - throw new ParseException('You cannot define a sequence item when in a mapping'); - } - context = this.CONTEXT_SEQUENCE; - if (data == null) { - data = []; - } - if ((values.value != null) && (matches = this.PATTERN_ANCHOR_VALUE.exec(values.value))) { - isRef = matches.ref; - values.value = matches.value; - } - if (!(values.value != null) || '' === Utils.trim(values.value, ' ') || Utils.ltrim(values.value, ' ').indexOf('#') === 0) { - if (this.currentLineNb < this.lines.length - 1 && !this.isNextLineUnIndentedCollection()) { - c = this.getRealCurrentLineNb() + 1; - parser = new Parser(c); - parser.refs = this.refs; - data.push(parser.parse(this.getNextEmbedBlock(null, true), exceptionOnInvalidType, objectDecoder)); - } else { - data.push(null); - } - } else { - if (((ref = values.leadspaces) != null ? ref.length : void 0) && (matches = this.PATTERN_COMPACT_NOTATION.exec(values.value))) { - c = this.getRealCurrentLineNb(); - parser = new Parser(c); - parser.refs = this.refs; - block = values.value; - indent = this.getCurrentLineIndentation(); - if (this.isNextLineIndented(false)) { - block += "\n" + this.getNextEmbedBlock(indent + values.leadspaces.length + 1, true); - } - data.push(parser.parse(block, exceptionOnInvalidType, objectDecoder)); - } else { - data.push(this.parseValue(values.value, exceptionOnInvalidType, objectDecoder)); - } - } - } else if ((values = this.PATTERN_MAPPING_ITEM.exec(this.currentLine)) && values.key.indexOf(' #') === -1) { - if (this.CONTEXT_SEQUENCE === context) { - throw new ParseException('You cannot define a mapping item when in a sequence'); - } - context = this.CONTEXT_MAPPING; - if (data == null) { - data = {}; - } - Inline.configure(exceptionOnInvalidType, objectDecoder); - try { - key = Inline.parseScalar(values.key); - } catch (error) { - e = error; - e.parsedLine = this.getRealCurrentLineNb() + 1; - e.snippet = this.currentLine; - throw e; - } - if ('<<' === key) { - mergeNode = true; - allowOverwrite = true; - if (((ref1 = values.value) != null ? ref1.indexOf('*') : void 0) === 0) { - refName = values.value.slice(1); - if (this.refs[refName] == null) { - throw new ParseException('Reference "' + refName + '" does not exist.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - refValue = this.refs[refName]; - if (typeof refValue !== 'object') { - throw new ParseException('YAML merge keys used with a scalar value instead of an object.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - if (refValue instanceof Array) { - for (i = j = 0, len = refValue.length; j < len; i = ++j) { - value = refValue[i]; - if (data[name = String(i)] == null) { - data[name] = value; - } - } - } else { - for (key in refValue) { - value = refValue[key]; - if (data[key] == null) { - data[key] = value; - } - } - } - } else { - if ((values.value != null) && values.value !== '') { - value = values.value; - } else { - value = this.getNextEmbedBlock(); - } - c = this.getRealCurrentLineNb() + 1; - parser = new Parser(c); - parser.refs = this.refs; - parsed = parser.parse(value, exceptionOnInvalidType); - if (typeof parsed !== 'object') { - throw new ParseException('YAML merge keys used with a scalar value instead of an object.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - if (parsed instanceof Array) { - for (l = 0, len1 = parsed.length; l < len1; l++) { - parsedItem = parsed[l]; - if (typeof parsedItem !== 'object') { - throw new ParseException('Merge items must be objects.', this.getRealCurrentLineNb() + 1, parsedItem); - } - if (parsedItem instanceof Array) { - for (i = m = 0, len2 = parsedItem.length; m < len2; i = ++m) { - value = parsedItem[i]; - k = String(i); - if (!data.hasOwnProperty(k)) { - data[k] = value; - } - } - } else { - for (key in parsedItem) { - value = parsedItem[key]; - if (!data.hasOwnProperty(key)) { - data[key] = value; - } - } - } - } - } else { - for (key in parsed) { - value = parsed[key]; - if (!data.hasOwnProperty(key)) { - data[key] = value; - } - } - } - } - } else if ((values.value != null) && (matches = this.PATTERN_ANCHOR_VALUE.exec(values.value))) { - isRef = matches.ref; - values.value = matches.value; - } - if (mergeNode) { - - } else if (!(values.value != null) || '' === Utils.trim(values.value, ' ') || Utils.ltrim(values.value, ' ').indexOf('#') === 0) { - if (!(this.isNextLineIndented()) && !(this.isNextLineUnIndentedCollection())) { - if (allowOverwrite || data[key] === void 0) { - data[key] = null; - } - } else { - c = this.getRealCurrentLineNb() + 1; - parser = new Parser(c); - parser.refs = this.refs; - val = parser.parse(this.getNextEmbedBlock(), exceptionOnInvalidType, objectDecoder); - if (allowOverwrite || data[key] === void 0) { - data[key] = val; - } - } - } else { - val = this.parseValue(values.value, exceptionOnInvalidType, objectDecoder); - if (allowOverwrite || data[key] === void 0) { - data[key] = val; - } - } - } else { - lineCount = this.lines.length; - if (1 === lineCount || (2 === lineCount && Utils.isEmpty(this.lines[1]))) { - try { - value = Inline.parse(this.lines[0], exceptionOnInvalidType, objectDecoder); - } catch (error) { - e = error; - e.parsedLine = this.getRealCurrentLineNb() + 1; - e.snippet = this.currentLine; - throw e; - } - if (typeof value === 'object') { - if (value instanceof Array) { - first = value[0]; - } else { - for (key in value) { - first = value[key]; - break; - } - } - if (typeof first === 'string' && first.indexOf('*') === 0) { - data = []; - for (n = 0, len3 = value.length; n < len3; n++) { - alias = value[n]; - data.push(this.refs[alias.slice(1)]); - } - value = data; - } - } - return value; - } else if ((ref2 = Utils.ltrim(value).charAt(0)) === '[' || ref2 === '{') { - try { - return Inline.parse(value, exceptionOnInvalidType, objectDecoder); - } catch (error) { - e = error; - e.parsedLine = this.getRealCurrentLineNb() + 1; - e.snippet = this.currentLine; - throw e; - } - } - throw new ParseException('Unable to parse.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - if (isRef) { - if (data instanceof Array) { - this.refs[isRef] = data[data.length - 1]; - } else { - lastKey = null; - for (key in data) { - lastKey = key; - } - this.refs[isRef] = data[lastKey]; - } - } - } - if (Utils.isEmpty(data)) { - return null; - } else { - return data; - } - }; - - Parser.prototype.getRealCurrentLineNb = function() { - return this.currentLineNb + this.offset; - }; - - Parser.prototype.getCurrentLineIndentation = function() { - return this.currentLine.length - Utils.ltrim(this.currentLine, ' ').length; - }; - - Parser.prototype.getNextEmbedBlock = function(indentation, includeUnindentedCollection) { - var data, indent, isItUnindentedCollection, newIndent, removeComments, removeCommentsPattern, unindentedEmbedBlock; - if (indentation == null) { - indentation = null; - } - if (includeUnindentedCollection == null) { - includeUnindentedCollection = false; - } - this.moveToNextLine(); - if (indentation == null) { - newIndent = this.getCurrentLineIndentation(); - unindentedEmbedBlock = this.isStringUnIndentedCollectionItem(this.currentLine); - if (!(this.isCurrentLineEmpty()) && 0 === newIndent && !unindentedEmbedBlock) { - throw new ParseException('Indentation problem.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - } else { - newIndent = indentation; - } - data = [this.currentLine.slice(newIndent)]; - if (!includeUnindentedCollection) { - isItUnindentedCollection = this.isStringUnIndentedCollectionItem(this.currentLine); - } - removeCommentsPattern = this.PATTERN_FOLDED_SCALAR_END; - removeComments = !removeCommentsPattern.test(this.currentLine); - while (this.moveToNextLine()) { - indent = this.getCurrentLineIndentation(); - if (indent === newIndent) { - removeComments = !removeCommentsPattern.test(this.currentLine); - } - if (removeComments && this.isCurrentLineComment()) { - continue; - } - if (this.isCurrentLineBlank()) { - data.push(this.currentLine.slice(newIndent)); - continue; - } - if (isItUnindentedCollection && !this.isStringUnIndentedCollectionItem(this.currentLine) && indent === newIndent) { - this.moveToPreviousLine(); - break; - } - if (indent >= newIndent) { - data.push(this.currentLine.slice(newIndent)); - } else if (Utils.ltrim(this.currentLine).charAt(0) === '#') { - - } else if (0 === indent) { - this.moveToPreviousLine(); - break; - } else { - throw new ParseException('Indentation problem.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - } - return data.join("\n"); - }; - - Parser.prototype.moveToNextLine = function() { - if (this.currentLineNb >= this.lines.length - 1) { - return false; - } - this.currentLine = this.lines[++this.currentLineNb]; - return true; - }; - - Parser.prototype.moveToPreviousLine = function() { - this.currentLine = this.lines[--this.currentLineNb]; - }; - - Parser.prototype.parseValue = function(value, exceptionOnInvalidType, objectDecoder) { - var e, foldedIndent, matches, modifiers, pos, ref, ref1, val; - if (0 === value.indexOf('*')) { - pos = value.indexOf('#'); - if (pos !== -1) { - value = value.substr(1, pos - 2); - } else { - value = value.slice(1); - } - if (this.refs[value] === void 0) { - throw new ParseException('Reference "' + value + '" does not exist.', this.currentLine); - } - return this.refs[value]; - } - if (matches = this.PATTERN_FOLDED_SCALAR_ALL.exec(value)) { - modifiers = (ref = matches.modifiers) != null ? ref : ''; - foldedIndent = Math.abs(parseInt(modifiers)); - if (isNaN(foldedIndent)) { - foldedIndent = 0; - } - val = this.parseFoldedScalar(matches.separator, this.PATTERN_DECIMAL.replace(modifiers, ''), foldedIndent); - if (matches.type != null) { - Inline.configure(exceptionOnInvalidType, objectDecoder); - return Inline.parseScalar(matches.type + ' ' + val); - } else { - return val; - } - } - if ((ref1 = value.charAt(0)) === '[' || ref1 === '{' || ref1 === '"' || ref1 === "'") { - while (true) { - try { - return Inline.parse(value, exceptionOnInvalidType, objectDecoder); - } catch (error) { - e = error; - if (e instanceof ParseMore && this.moveToNextLine()) { - value += "\n" + Utils.trim(this.currentLine, ' '); - } else { - e.parsedLine = this.getRealCurrentLineNb() + 1; - e.snippet = this.currentLine; - throw e; - } - } - } - } else { - if (this.isNextLineIndented()) { - value += "\n" + this.getNextEmbedBlock(); - } - return Inline.parse(value, exceptionOnInvalidType, objectDecoder); - } - }; - - Parser.prototype.parseFoldedScalar = function(separator, indicator, indentation) { - var isCurrentLineBlank, j, len, line, matches, newText, notEOF, pattern, ref, text; - if (indicator == null) { - indicator = ''; - } - if (indentation == null) { - indentation = 0; - } - notEOF = this.moveToNextLine(); - if (!notEOF) { - return ''; - } - isCurrentLineBlank = this.isCurrentLineBlank(); - text = ''; - while (notEOF && isCurrentLineBlank) { - if (notEOF = this.moveToNextLine()) { - text += "\n"; - isCurrentLineBlank = this.isCurrentLineBlank(); - } - } - if (0 === indentation) { - if (matches = this.PATTERN_INDENT_SPACES.exec(this.currentLine)) { - indentation = matches[0].length; - } - } - if (indentation > 0) { - pattern = this.PATTERN_FOLDED_SCALAR_BY_INDENTATION[indentation]; - if (pattern == null) { - pattern = new Pattern('^ {' + indentation + '}(.*)$'); - Parser.prototype.PATTERN_FOLDED_SCALAR_BY_INDENTATION[indentation] = pattern; - } - while (notEOF && (isCurrentLineBlank || (matches = pattern.exec(this.currentLine)))) { - if (isCurrentLineBlank) { - text += this.currentLine.slice(indentation); - } else { - text += matches[1]; - } - if (notEOF = this.moveToNextLine()) { - text += "\n"; - isCurrentLineBlank = this.isCurrentLineBlank(); - } - } - } else if (notEOF) { - text += "\n"; - } - if (notEOF) { - this.moveToPreviousLine(); - } - if ('>' === separator) { - newText = ''; - ref = text.split("\n"); - for (j = 0, len = ref.length; j < len; j++) { - line = ref[j]; - if (line.length === 0 || line.charAt(0) === ' ') { - newText = Utils.rtrim(newText, ' ') + line + "\n"; - } else { - newText += line + ' '; - } - } - text = newText; - } - if ('+' !== indicator) { - text = Utils.rtrim(text); - } - if ('' === indicator) { - text = this.PATTERN_TRAILING_LINES.replace(text, "\n"); - } else if ('-' === indicator) { - text = this.PATTERN_TRAILING_LINES.replace(text, ''); - } - return text; - }; - - Parser.prototype.isNextLineIndented = function(ignoreComments) { - var EOF, currentIndentation, ret; - if (ignoreComments == null) { - ignoreComments = true; - } - currentIndentation = this.getCurrentLineIndentation(); - EOF = !this.moveToNextLine(); - if (ignoreComments) { - while (!EOF && this.isCurrentLineEmpty()) { - EOF = !this.moveToNextLine(); - } - } else { - while (!EOF && this.isCurrentLineBlank()) { - EOF = !this.moveToNextLine(); - } - } - if (EOF) { - return false; - } - ret = false; - if (this.getCurrentLineIndentation() > currentIndentation) { - ret = true; - } - this.moveToPreviousLine(); - return ret; - }; - - Parser.prototype.isCurrentLineEmpty = function() { - var trimmedLine; - trimmedLine = Utils.trim(this.currentLine, ' '); - return trimmedLine.length === 0 || trimmedLine.charAt(0) === '#'; - }; - - Parser.prototype.isCurrentLineBlank = function() { - return '' === Utils.trim(this.currentLine, ' '); - }; - - Parser.prototype.isCurrentLineComment = function() { - var ltrimmedLine; - ltrimmedLine = Utils.ltrim(this.currentLine, ' '); - return ltrimmedLine.charAt(0) === '#'; - }; - - Parser.prototype.cleanup = function(value) { - var count, i, indent, j, l, len, len1, line, lines, ref, ref1, ref2, smallestIndent, trimmedValue; - if (value.indexOf("\r") !== -1) { - value = value.split("\r\n").join("\n").split("\r").join("\n"); - } - count = 0; - ref = this.PATTERN_YAML_HEADER.replaceAll(value, ''), value = ref[0], count = ref[1]; - this.offset += count; - ref1 = this.PATTERN_LEADING_COMMENTS.replaceAll(value, '', 1), trimmedValue = ref1[0], count = ref1[1]; - if (count === 1) { - this.offset += Utils.subStrCount(value, "\n") - Utils.subStrCount(trimmedValue, "\n"); - value = trimmedValue; - } - ref2 = this.PATTERN_DOCUMENT_MARKER_START.replaceAll(value, '', 1), trimmedValue = ref2[0], count = ref2[1]; - if (count === 1) { - this.offset += Utils.subStrCount(value, "\n") - Utils.subStrCount(trimmedValue, "\n"); - value = trimmedValue; - value = this.PATTERN_DOCUMENT_MARKER_END.replace(value, ''); - } - lines = value.split("\n"); - smallestIndent = -1; - for (j = 0, len = lines.length; j < len; j++) { - line = lines[j]; - if (Utils.trim(line, ' ').length === 0) { - continue; - } - indent = line.length - Utils.ltrim(line).length; - if (smallestIndent === -1 || indent < smallestIndent) { - smallestIndent = indent; - } - } - if (smallestIndent > 0) { - for (i = l = 0, len1 = lines.length; l < len1; i = ++l) { - line = lines[i]; - lines[i] = line.slice(smallestIndent); - } - value = lines.join("\n"); - } - return value; - }; - - Parser.prototype.isNextLineUnIndentedCollection = function(currentIndentation) { - var notEOF, ret; - if (currentIndentation == null) { - currentIndentation = null; - } - if (currentIndentation == null) { - currentIndentation = this.getCurrentLineIndentation(); - } - notEOF = this.moveToNextLine(); - while (notEOF && this.isCurrentLineEmpty()) { - notEOF = this.moveToNextLine(); - } - if (false === notEOF) { - return false; - } - ret = false; - if (this.getCurrentLineIndentation() === currentIndentation && this.isStringUnIndentedCollectionItem(this.currentLine)) { - ret = true; - } - this.moveToPreviousLine(); - return ret; - }; - - Parser.prototype.isStringUnIndentedCollectionItem = function() { - return this.currentLine === '-' || this.currentLine.slice(0, 2) === '- '; - }; - - return Parser; - -})(); - -module.exports = Parser; diff --git a/node_modules/yamljs/lib/Pattern.js b/node_modules/yamljs/lib/Pattern.js deleted file mode 100644 index 3cca4d3..0000000 --- a/node_modules/yamljs/lib/Pattern.js +++ /dev/null @@ -1,119 +0,0 @@ -// Generated by CoffeeScript 1.12.4 -var Pattern; - -Pattern = (function() { - Pattern.prototype.regex = null; - - Pattern.prototype.rawRegex = null; - - Pattern.prototype.cleanedRegex = null; - - Pattern.prototype.mapping = null; - - function Pattern(rawRegex, modifiers) { - var _char, capturingBracketNumber, cleanedRegex, i, len, mapping, name, part, subChar; - if (modifiers == null) { - modifiers = ''; - } - cleanedRegex = ''; - len = rawRegex.length; - mapping = null; - capturingBracketNumber = 0; - i = 0; - while (i < len) { - _char = rawRegex.charAt(i); - if (_char === '\\') { - cleanedRegex += rawRegex.slice(i, +(i + 1) + 1 || 9e9); - i++; - } else if (_char === '(') { - if (i < len - 2) { - part = rawRegex.slice(i, +(i + 2) + 1 || 9e9); - if (part === '(?:') { - i += 2; - cleanedRegex += part; - } else if (part === '(?<') { - capturingBracketNumber++; - i += 2; - name = ''; - while (i + 1 < len) { - subChar = rawRegex.charAt(i + 1); - if (subChar === '>') { - cleanedRegex += '('; - i++; - if (name.length > 0) { - if (mapping == null) { - mapping = {}; - } - mapping[name] = capturingBracketNumber; - } - break; - } else { - name += subChar; - } - i++; - } - } else { - cleanedRegex += _char; - capturingBracketNumber++; - } - } else { - cleanedRegex += _char; - } - } else { - cleanedRegex += _char; - } - i++; - } - this.rawRegex = rawRegex; - this.cleanedRegex = cleanedRegex; - this.regex = new RegExp(this.cleanedRegex, 'g' + modifiers.replace('g', '')); - this.mapping = mapping; - } - - Pattern.prototype.exec = function(str) { - var index, matches, name, ref; - this.regex.lastIndex = 0; - matches = this.regex.exec(str); - if (matches == null) { - return null; - } - if (this.mapping != null) { - ref = this.mapping; - for (name in ref) { - index = ref[name]; - matches[name] = matches[index]; - } - } - return matches; - }; - - Pattern.prototype.test = function(str) { - this.regex.lastIndex = 0; - return this.regex.test(str); - }; - - Pattern.prototype.replace = function(str, replacement) { - this.regex.lastIndex = 0; - return str.replace(this.regex, replacement); - }; - - Pattern.prototype.replaceAll = function(str, replacement, limit) { - var count; - if (limit == null) { - limit = 0; - } - this.regex.lastIndex = 0; - count = 0; - while (this.regex.test(str) && (limit === 0 || count < limit)) { - this.regex.lastIndex = 0; - str = str.replace(this.regex, replacement); - count++; - } - return [str, count]; - }; - - return Pattern; - -})(); - -module.exports = Pattern; diff --git a/node_modules/yamljs/lib/Unescaper.js b/node_modules/yamljs/lib/Unescaper.js deleted file mode 100644 index c4a707a..0000000 --- a/node_modules/yamljs/lib/Unescaper.js +++ /dev/null @@ -1,83 +0,0 @@ -// Generated by CoffeeScript 1.12.4 -var Pattern, Unescaper, Utils; - -Utils = require('./Utils'); - -Pattern = require('./Pattern'); - -Unescaper = (function() { - function Unescaper() {} - - Unescaper.PATTERN_ESCAPED_CHARACTER = new Pattern('\\\\([0abt\tnvfre "\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})'); - - Unescaper.unescapeSingleQuotedString = function(value) { - return value.replace(/\'\'/g, '\''); - }; - - Unescaper.unescapeDoubleQuotedString = function(value) { - if (this._unescapeCallback == null) { - this._unescapeCallback = (function(_this) { - return function(str) { - return _this.unescapeCharacter(str); - }; - })(this); - } - return this.PATTERN_ESCAPED_CHARACTER.replace(value, this._unescapeCallback); - }; - - Unescaper.unescapeCharacter = function(value) { - var ch; - ch = String.fromCharCode; - switch (value.charAt(1)) { - case '0': - return ch(0); - case 'a': - return ch(7); - case 'b': - return ch(8); - case 't': - return "\t"; - case "\t": - return "\t"; - case 'n': - return "\n"; - case 'v': - return ch(11); - case 'f': - return ch(12); - case 'r': - return ch(13); - case 'e': - return ch(27); - case ' ': - return ' '; - case '"': - return '"'; - case '/': - return '/'; - case '\\': - return '\\'; - case 'N': - return ch(0x0085); - case '_': - return ch(0x00A0); - case 'L': - return ch(0x2028); - case 'P': - return ch(0x2029); - case 'x': - return Utils.utf8chr(Utils.hexDec(value.substr(2, 2))); - case 'u': - return Utils.utf8chr(Utils.hexDec(value.substr(2, 4))); - case 'U': - return Utils.utf8chr(Utils.hexDec(value.substr(2, 8))); - default: - return ''; - } - }; - - return Unescaper; - -})(); - -module.exports = Unescaper; diff --git a/node_modules/yamljs/lib/Utils.js b/node_modules/yamljs/lib/Utils.js deleted file mode 100644 index 5d54d2d..0000000 --- a/node_modules/yamljs/lib/Utils.js +++ /dev/null @@ -1,297 +0,0 @@ -// Generated by CoffeeScript 1.12.4 -var Pattern, Utils, - hasProp = {}.hasOwnProperty; - -Pattern = require('./Pattern'); - -Utils = (function() { - function Utils() {} - - Utils.REGEX_LEFT_TRIM_BY_CHAR = {}; - - Utils.REGEX_RIGHT_TRIM_BY_CHAR = {}; - - Utils.REGEX_SPACES = /\s+/g; - - Utils.REGEX_DIGITS = /^\d+$/; - - Utils.REGEX_OCTAL = /[^0-7]/gi; - - Utils.REGEX_HEXADECIMAL = /[^a-f0-9]/gi; - - Utils.PATTERN_DATE = new Pattern('^' + '(?[0-9][0-9][0-9][0-9])' + '-(?[0-9][0-9]?)' + '-(?[0-9][0-9]?)' + '(?:(?:[Tt]|[ \t]+)' + '(?[0-9][0-9]?)' + ':(?[0-9][0-9])' + ':(?[0-9][0-9])' + '(?:\.(?[0-9]*))?' + '(?:[ \t]*(?Z|(?[-+])(?[0-9][0-9]?)' + '(?::(?[0-9][0-9]))?))?)?' + '$', 'i'); - - Utils.LOCAL_TIMEZONE_OFFSET = new Date().getTimezoneOffset() * 60 * 1000; - - Utils.trim = function(str, _char) { - var regexLeft, regexRight; - if (_char == null) { - _char = '\\s'; - } - regexLeft = this.REGEX_LEFT_TRIM_BY_CHAR[_char]; - if (regexLeft == null) { - this.REGEX_LEFT_TRIM_BY_CHAR[_char] = regexLeft = new RegExp('^' + _char + '' + _char + '*'); - } - regexLeft.lastIndex = 0; - regexRight = this.REGEX_RIGHT_TRIM_BY_CHAR[_char]; - if (regexRight == null) { - this.REGEX_RIGHT_TRIM_BY_CHAR[_char] = regexRight = new RegExp(_char + '' + _char + '*$'); - } - regexRight.lastIndex = 0; - return str.replace(regexLeft, '').replace(regexRight, ''); - }; - - Utils.ltrim = function(str, _char) { - var regexLeft; - if (_char == null) { - _char = '\\s'; - } - regexLeft = this.REGEX_LEFT_TRIM_BY_CHAR[_char]; - if (regexLeft == null) { - this.REGEX_LEFT_TRIM_BY_CHAR[_char] = regexLeft = new RegExp('^' + _char + '' + _char + '*'); - } - regexLeft.lastIndex = 0; - return str.replace(regexLeft, ''); - }; - - Utils.rtrim = function(str, _char) { - var regexRight; - if (_char == null) { - _char = '\\s'; - } - regexRight = this.REGEX_RIGHT_TRIM_BY_CHAR[_char]; - if (regexRight == null) { - this.REGEX_RIGHT_TRIM_BY_CHAR[_char] = regexRight = new RegExp(_char + '' + _char + '*$'); - } - regexRight.lastIndex = 0; - return str.replace(regexRight, ''); - }; - - Utils.isEmpty = function(value) { - return !value || value === '' || value === '0' || (value instanceof Array && value.length === 0) || this.isEmptyObject(value); - }; - - Utils.isEmptyObject = function(value) { - var k; - return value instanceof Object && ((function() { - var results; - results = []; - for (k in value) { - if (!hasProp.call(value, k)) continue; - results.push(k); - } - return results; - })()).length === 0; - }; - - Utils.subStrCount = function(string, subString, start, length) { - var c, i, j, len, ref, sublen; - c = 0; - string = '' + string; - subString = '' + subString; - if (start != null) { - string = string.slice(start); - } - if (length != null) { - string = string.slice(0, length); - } - len = string.length; - sublen = subString.length; - for (i = j = 0, ref = len; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) { - if (subString === string.slice(i, sublen)) { - c++; - i += sublen - 1; - } - } - return c; - }; - - Utils.isDigits = function(input) { - this.REGEX_DIGITS.lastIndex = 0; - return this.REGEX_DIGITS.test(input); - }; - - Utils.octDec = function(input) { - this.REGEX_OCTAL.lastIndex = 0; - return parseInt((input + '').replace(this.REGEX_OCTAL, ''), 8); - }; - - Utils.hexDec = function(input) { - this.REGEX_HEXADECIMAL.lastIndex = 0; - input = this.trim(input); - if ((input + '').slice(0, 2) === '0x') { - input = (input + '').slice(2); - } - return parseInt((input + '').replace(this.REGEX_HEXADECIMAL, ''), 16); - }; - - Utils.utf8chr = function(c) { - var ch; - ch = String.fromCharCode; - if (0x80 > (c %= 0x200000)) { - return ch(c); - } - if (0x800 > c) { - return ch(0xC0 | c >> 6) + ch(0x80 | c & 0x3F); - } - if (0x10000 > c) { - return ch(0xE0 | c >> 12) + ch(0x80 | c >> 6 & 0x3F) + ch(0x80 | c & 0x3F); - } - return ch(0xF0 | c >> 18) + ch(0x80 | c >> 12 & 0x3F) + ch(0x80 | c >> 6 & 0x3F) + ch(0x80 | c & 0x3F); - }; - - Utils.parseBoolean = function(input, strict) { - var lowerInput; - if (strict == null) { - strict = true; - } - if (typeof input === 'string') { - lowerInput = input.toLowerCase(); - if (!strict) { - if (lowerInput === 'no') { - return false; - } - } - if (lowerInput === '0') { - return false; - } - if (lowerInput === 'false') { - return false; - } - if (lowerInput === '') { - return false; - } - return true; - } - return !!input; - }; - - Utils.isNumeric = function(input) { - this.REGEX_SPACES.lastIndex = 0; - return typeof input === 'number' || typeof input === 'string' && !isNaN(input) && input.replace(this.REGEX_SPACES, '') !== ''; - }; - - Utils.stringToDate = function(str) { - var date, day, fraction, hour, info, minute, month, second, tz_hour, tz_minute, tz_offset, year; - if (!(str != null ? str.length : void 0)) { - return null; - } - info = this.PATTERN_DATE.exec(str); - if (!info) { - return null; - } - year = parseInt(info.year, 10); - month = parseInt(info.month, 10) - 1; - day = parseInt(info.day, 10); - if (info.hour == null) { - date = new Date(Date.UTC(year, month, day)); - return date; - } - hour = parseInt(info.hour, 10); - minute = parseInt(info.minute, 10); - second = parseInt(info.second, 10); - if (info.fraction != null) { - fraction = info.fraction.slice(0, 3); - while (fraction.length < 3) { - fraction += '0'; - } - fraction = parseInt(fraction, 10); - } else { - fraction = 0; - } - if (info.tz != null) { - tz_hour = parseInt(info.tz_hour, 10); - if (info.tz_minute != null) { - tz_minute = parseInt(info.tz_minute, 10); - } else { - tz_minute = 0; - } - tz_offset = (tz_hour * 60 + tz_minute) * 60000; - if ('-' === info.tz_sign) { - tz_offset *= -1; - } - } - date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - if (tz_offset) { - date.setTime(date.getTime() - tz_offset); - } - return date; - }; - - Utils.strRepeat = function(str, number) { - var i, res; - res = ''; - i = 0; - while (i < number) { - res += str; - i++; - } - return res; - }; - - Utils.getStringFromFile = function(path, callback) { - var data, fs, j, len1, name, ref, req, xhr; - if (callback == null) { - callback = null; - } - xhr = null; - if (typeof window !== "undefined" && window !== null) { - if (window.XMLHttpRequest) { - xhr = new XMLHttpRequest(); - } else if (window.ActiveXObject) { - ref = ["Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.3.0", "Msxml2.XMLHTTP", "Microsoft.XMLHTTP"]; - for (j = 0, len1 = ref.length; j < len1; j++) { - name = ref[j]; - try { - xhr = new ActiveXObject(name); - } catch (error) {} - } - } - } - if (xhr != null) { - if (callback != null) { - xhr.onreadystatechange = function() { - if (xhr.readyState === 4) { - if (xhr.status === 200 || xhr.status === 0) { - return callback(xhr.responseText); - } else { - return callback(null); - } - } - }; - xhr.open('GET', path, true); - return xhr.send(null); - } else { - xhr.open('GET', path, false); - xhr.send(null); - if (xhr.status === 200 || xhr.status === 0) { - return xhr.responseText; - } - return null; - } - } else { - req = require; - fs = req('fs'); - if (callback != null) { - return fs.readFile(path, function(err, data) { - if (err) { - return callback(null); - } else { - return callback(String(data)); - } - }); - } else { - data = fs.readFileSync(path); - if (data != null) { - return String(data); - } - return null; - } - } - }; - - return Utils; - -})(); - -module.exports = Utils; diff --git a/node_modules/yamljs/lib/Yaml.js b/node_modules/yamljs/lib/Yaml.js deleted file mode 100644 index aa72c77..0000000 --- a/node_modules/yamljs/lib/Yaml.js +++ /dev/null @@ -1,104 +0,0 @@ -// Generated by CoffeeScript 1.12.4 -var Dumper, Parser, Utils, Yaml; - -Parser = require('./Parser'); - -Dumper = require('./Dumper'); - -Utils = require('./Utils'); - -Yaml = (function() { - function Yaml() {} - - Yaml.parse = function(input, exceptionOnInvalidType, objectDecoder) { - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = false; - } - if (objectDecoder == null) { - objectDecoder = null; - } - return new Parser().parse(input, exceptionOnInvalidType, objectDecoder); - }; - - Yaml.parseFile = function(path, callback, exceptionOnInvalidType, objectDecoder) { - var input; - if (callback == null) { - callback = null; - } - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = false; - } - if (objectDecoder == null) { - objectDecoder = null; - } - if (callback != null) { - return Utils.getStringFromFile(path, (function(_this) { - return function(input) { - var result; - result = null; - if (input != null) { - result = _this.parse(input, exceptionOnInvalidType, objectDecoder); - } - callback(result); - }; - })(this)); - } else { - input = Utils.getStringFromFile(path); - if (input != null) { - return this.parse(input, exceptionOnInvalidType, objectDecoder); - } - return null; - } - }; - - Yaml.dump = function(input, inline, indent, exceptionOnInvalidType, objectEncoder) { - var yaml; - if (inline == null) { - inline = 2; - } - if (indent == null) { - indent = 4; - } - if (exceptionOnInvalidType == null) { - exceptionOnInvalidType = false; - } - if (objectEncoder == null) { - objectEncoder = null; - } - yaml = new Dumper(); - yaml.indentation = indent; - return yaml.dump(input, inline, 0, exceptionOnInvalidType, objectEncoder); - }; - - Yaml.register = function() { - var require_handler; - require_handler = function(module, filename) { - return module.exports = YAML.parseFile(filename); - }; - if ((typeof require !== "undefined" && require !== null ? require.extensions : void 0) != null) { - require.extensions['.yml'] = require_handler; - return require.extensions['.yaml'] = require_handler; - } - }; - - Yaml.stringify = function(input, inline, indent, exceptionOnInvalidType, objectEncoder) { - return this.dump(input, inline, indent, exceptionOnInvalidType, objectEncoder); - }; - - Yaml.load = function(path, callback, exceptionOnInvalidType, objectDecoder) { - return this.parseFile(path, callback, exceptionOnInvalidType, objectDecoder); - }; - - return Yaml; - -})(); - -if (typeof window !== "undefined" && window !== null) { - window.YAML = Yaml; -} - -if (typeof window === "undefined" || window === null) { - this.YAML = Yaml; -} - -module.exports = Yaml; diff --git a/node_modules/yamljs/package.json b/node_modules/yamljs/package.json deleted file mode 100644 index 8cf0a2c..0000000 --- a/node_modules/yamljs/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_from": "yamljs@^0.2.10", - "_id": "yamljs@0.2.10", - "_inBundle": false, - "_integrity": "sha1-SBzHwlynOvWfWR8MluPOVsdXpA8=", - "_location": "/yamljs", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "yamljs@^0.2.10", - "name": "yamljs", - "escapedName": "yamljs", - "rawSpec": "^0.2.10", - "saveSpec": null, - "fetchSpec": "^0.2.10" - }, - "_requiredBy": [ - "/rita" - ], - "_resolved": "https://registry.npmjs.org/yamljs/-/yamljs-0.2.10.tgz", - "_shasum": "481cc7c25ca73af59f591f0c96e3ce56c757a40f", - "_spec": "yamljs@^0.2.10", - "_where": "/Users/paolo/Desktop/multiplayer games/likelike-online/node_modules/rita", - "author": { - "name": "Jeremy Faivre", - "email": "contact@jeremyfa.com" - }, - "bin": { - "yaml2json": "bin/yaml2json", - "json2yaml": "bin/json2yaml" - }, - "bugs": { - "url": "https://github.com/jeremyfa/yaml.js/issues" - }, - "bundleDependencies": false, - "dependencies": { - "argparse": "^1.0.7", - "glob": "^7.0.5" - }, - "deprecated": false, - "description": "Standalone JavaScript YAML 1.2 Parser & Encoder. Works under node.js and all major browsers. Also brings command line YAML/JSON conversion tools.", - "devDependencies": { - "benchmark": "^2.1.0", - "coffeeify": "^2.0.1", - "jasmine-node": "^1.14.5" - }, - "homepage": "https://github.com/jeremyfa/yaml.js#readme", - "keywords": [ - "yaml", - "json", - "yaml2json", - "json2yaml" - ], - "license": "MIT", - "main": "./lib/Yaml.js", - "name": "yamljs", - "repository": { - "type": "git", - "url": "git://github.com/jeremyfa/yaml.js.git" - }, - "scripts": { - "test": "cake build; cake test" - }, - "version": "0.2.10" -} diff --git a/node_modules/yamljs/src/Dumper.coffee b/node_modules/yamljs/src/Dumper.coffee deleted file mode 100644 index 0338212..0000000 --- a/node_modules/yamljs/src/Dumper.coffee +++ /dev/null @@ -1,56 +0,0 @@ - -Utils = require './Utils' -Inline = require './Inline' - -# Dumper dumps JavaScript variables to YAML strings. -# -class Dumper - - # The amount of spaces to use for indentation of nested nodes. - @indentation: 4 - - - # Dumps a JavaScript value to YAML. - # - # @param [Object] input The JavaScript value - # @param [Integer] inline The level where you switch to inline YAML - # @param [Integer] indent The level of indentation (used internally) - # @param [Boolean] exceptionOnInvalidType true if an exception must be thrown on invalid types (a JavaScript resource or object), false otherwise - # @param [Function] objectEncoder A function to serialize custom objects, null otherwise - # - # @return [String] The YAML representation of the JavaScript value - # - dump: (input, inline = 0, indent = 0, exceptionOnInvalidType = false, objectEncoder = null) -> - output = '' - prefix = (if indent then Utils.strRepeat(' ', indent) else '') - - if inline <= 0 or typeof(input) isnt 'object' or input instanceof Date or Utils.isEmpty(input) - output += prefix + Inline.dump(input, exceptionOnInvalidType, objectEncoder) - - else - if input instanceof Array - for value in input - willBeInlined = (inline - 1 <= 0 or typeof(value) isnt 'object' or Utils.isEmpty(value)) - - output += - prefix + - '-' + - (if willBeInlined then ' ' else "\n") + - @dump(value, inline - 1, (if willBeInlined then 0 else indent + @indentation), exceptionOnInvalidType, objectEncoder) + - (if willBeInlined then "\n" else '') - - else - for key, value of input - willBeInlined = (inline - 1 <= 0 or typeof(value) isnt 'object' or Utils.isEmpty(value)) - - output += - prefix + - Inline.dump(key, exceptionOnInvalidType, objectEncoder) + ':' + - (if willBeInlined then ' ' else "\n") + - @dump(value, inline - 1, (if willBeInlined then 0 else indent + @indentation), exceptionOnInvalidType, objectEncoder) + - (if willBeInlined then "\n" else '') - - return output - - -module.exports = Dumper diff --git a/node_modules/yamljs/src/Escaper.coffee b/node_modules/yamljs/src/Escaper.coffee deleted file mode 100644 index 0eefec7..0000000 --- a/node_modules/yamljs/src/Escaper.coffee +++ /dev/null @@ -1,80 +0,0 @@ - -Pattern = require './Pattern' - -# Escaper encapsulates escaping rules for single -# and double-quoted YAML strings. -class Escaper - - # Mapping arrays for escaping a double quoted string. The backslash is - # first to ensure proper escaping. - @LIST_ESCAPEES: ['\\', '\\\\', '\\"', '"', - "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", - "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f", - "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", - "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", - (ch = String.fromCharCode)(0x0085), ch(0x00A0), ch(0x2028), ch(0x2029)] - @LIST_ESCAPED: ['\\\\', '\\"', '\\"', '\\"', - "\\0", "\\x01", "\\x02", "\\x03", "\\x04", "\\x05", "\\x06", "\\a", - "\\b", "\\t", "\\n", "\\v", "\\f", "\\r", "\\x0e", "\\x0f", - "\\x10", "\\x11", "\\x12", "\\x13", "\\x14", "\\x15", "\\x16", "\\x17", - "\\x18", "\\x19", "\\x1a", "\\e", "\\x1c", "\\x1d", "\\x1e", "\\x1f", - "\\N", "\\_", "\\L", "\\P"] - - @MAPPING_ESCAPEES_TO_ESCAPED: do => - mapping = {} - for i in [0...@LIST_ESCAPEES.length] - mapping[@LIST_ESCAPEES[i]] = @LIST_ESCAPED[i] - return mapping - - # Characters that would cause a dumped string to require double quoting. - @PATTERN_CHARACTERS_TO_ESCAPE: new Pattern '[\\x00-\\x1f]|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9' - - # Other precompiled patterns - @PATTERN_MAPPING_ESCAPEES: new Pattern @LIST_ESCAPEES.join('|').split('\\').join('\\\\') - @PATTERN_SINGLE_QUOTING: new Pattern '[\\s\'":{}[\\],&*#?]|^[-?|<>=!%@`]' - - - - # Determines if a JavaScript value would require double quoting in YAML. - # - # @param [String] value A JavaScript value value - # - # @return [Boolean] true if the value would require double quotes. - # - @requiresDoubleQuoting: (value) -> - return @PATTERN_CHARACTERS_TO_ESCAPE.test value - - - # Escapes and surrounds a JavaScript value with double quotes. - # - # @param [String] value A JavaScript value - # - # @return [String] The quoted, escaped string - # - @escapeWithDoubleQuotes: (value) -> - result = @PATTERN_MAPPING_ESCAPEES.replace value, (str) => - return @MAPPING_ESCAPEES_TO_ESCAPED[str] - return '"'+result+'"' - - - # Determines if a JavaScript value would require single quoting in YAML. - # - # @param [String] value A JavaScript value - # - # @return [Boolean] true if the value would require single quotes. - # - @requiresSingleQuoting: (value) -> - return @PATTERN_SINGLE_QUOTING.test value - - - # Escapes and surrounds a JavaScript value with single quotes. - # - # @param [String] value A JavaScript value - # - # @return [String] The quoted, escaped string - # - @escapeWithSingleQuotes: (value) -> - return "'"+value.replace(/'/g, "''")+"'" - - -module.exports = Escaper diff --git a/node_modules/yamljs/src/Exception/DumpException.coffee b/node_modules/yamljs/src/Exception/DumpException.coffee deleted file mode 100644 index 9cc6c27..0000000 --- a/node_modules/yamljs/src/Exception/DumpException.coffee +++ /dev/null @@ -1,12 +0,0 @@ - -class DumpException extends Error - - constructor: (@message, @parsedLine, @snippet) -> - - toString: -> - if @parsedLine? and @snippet? - return ' ' + @message + ' (line ' + @parsedLine + ': \'' + @snippet + '\')' - else - return ' ' + @message - -module.exports = DumpException diff --git a/node_modules/yamljs/src/Exception/ParseException.coffee b/node_modules/yamljs/src/Exception/ParseException.coffee deleted file mode 100644 index a6a0785..0000000 --- a/node_modules/yamljs/src/Exception/ParseException.coffee +++ /dev/null @@ -1,12 +0,0 @@ - -class ParseException extends Error - - constructor: (@message, @parsedLine, @snippet) -> - - toString: -> - if @parsedLine? and @snippet? - return ' ' + @message + ' (line ' + @parsedLine + ': \'' + @snippet + '\')' - else - return ' ' + @message - -module.exports = ParseException diff --git a/node_modules/yamljs/src/Exception/ParseMore.coffee b/node_modules/yamljs/src/Exception/ParseMore.coffee deleted file mode 100644 index faeb946..0000000 --- a/node_modules/yamljs/src/Exception/ParseMore.coffee +++ /dev/null @@ -1,12 +0,0 @@ - -class ParseMore extends Error - - constructor: (@message, @parsedLine, @snippet) -> - - toString: -> - if @parsedLine? and @snippet? - return ' ' + @message + ' (line ' + @parsedLine + ': \'' + @snippet + '\')' - else - return ' ' + @message - -module.exports = ParseMore diff --git a/node_modules/yamljs/src/Inline.coffee b/node_modules/yamljs/src/Inline.coffee deleted file mode 100644 index 4620e3f..0000000 --- a/node_modules/yamljs/src/Inline.coffee +++ /dev/null @@ -1,488 +0,0 @@ - -Pattern = require './Pattern' -Unescaper = require './Unescaper' -Escaper = require './Escaper' -Utils = require './Utils' -ParseException = require './Exception/ParseException' -ParseMore = require './Exception/ParseMore' -DumpException = require './Exception/DumpException' - -# Inline YAML parsing and dumping -class Inline - - # Quoted string regular expression - @REGEX_QUOTED_STRING: '(?:"(?:[^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'(?:[^\']*(?:\'\'[^\']*)*)\')' - - # Pre-compiled patterns - # - @PATTERN_TRAILING_COMMENTS: new Pattern '^\\s*#.*$' - @PATTERN_QUOTED_SCALAR: new Pattern '^'+@REGEX_QUOTED_STRING - @PATTERN_THOUSAND_NUMERIC_SCALAR: new Pattern '^(-|\\+)?[0-9,]+(\\.[0-9]+)?$' - @PATTERN_SCALAR_BY_DELIMITERS: {} - - # Settings - @settings: {} - - - # Configure YAML inline. - # - # @param [Boolean] exceptionOnInvalidType true if an exception must be thrown on invalid types (a JavaScript resource or object), false otherwise - # @param [Function] objectDecoder A function to deserialize custom objects, null otherwise - # - @configure: (exceptionOnInvalidType = null, objectDecoder = null) -> - # Update settings - @settings.exceptionOnInvalidType = exceptionOnInvalidType - @settings.objectDecoder = objectDecoder - return - - - # Converts a YAML string to a JavaScript object. - # - # @param [String] value A YAML string - # @param [Boolean] exceptionOnInvalidType true if an exception must be thrown on invalid types (a JavaScript resource or object), false otherwise - # @param [Function] objectDecoder A function to deserialize custom objects, null otherwise - # - # @return [Object] A JavaScript object representing the YAML string - # - # @throw [ParseException] - # - @parse: (value, exceptionOnInvalidType = false, objectDecoder = null) -> - # Update settings from last call of Inline.parse() - @settings.exceptionOnInvalidType = exceptionOnInvalidType - @settings.objectDecoder = objectDecoder - - if not value? - return '' - - value = Utils.trim value - - if 0 is value.length - return '' - - # Keep a context object to pass through static methods - context = {exceptionOnInvalidType, objectDecoder, i: 0} - - switch value.charAt(0) - when '[' - result = @parseSequence value, context - ++context.i - when '{' - result = @parseMapping value, context - ++context.i - else - result = @parseScalar value, null, ['"', "'"], context - - # Some comments are allowed at the end - if @PATTERN_TRAILING_COMMENTS.replace(value[context.i..], '') isnt '' - throw new ParseException 'Unexpected characters near "'+value[context.i..]+'".' - - return result - - - # Dumps a given JavaScript variable to a YAML string. - # - # @param [Object] value The JavaScript variable to convert - # @param [Boolean] exceptionOnInvalidType true if an exception must be thrown on invalid types (a JavaScript resource or object), false otherwise - # @param [Function] objectEncoder A function to serialize custom objects, null otherwise - # - # @return [String] The YAML string representing the JavaScript object - # - # @throw [DumpException] - # - @dump: (value, exceptionOnInvalidType = false, objectEncoder = null) -> - if not value? - return 'null' - type = typeof value - if type is 'object' - if value instanceof Date - return value.toISOString() - else if objectEncoder? - result = objectEncoder value - if typeof result is 'string' or result? - return result - return @dumpObject value - if type is 'boolean' - return (if value then 'true' else 'false') - if Utils.isDigits(value) - return (if type is 'string' then "'"+value+"'" else String(parseInt(value))) - if Utils.isNumeric(value) - return (if type is 'string' then "'"+value+"'" else String(parseFloat(value))) - if type is 'number' - return (if value is Infinity then '.Inf' else (if value is -Infinity then '-.Inf' else (if isNaN(value) then '.NaN' else value))) - if Escaper.requiresDoubleQuoting value - return Escaper.escapeWithDoubleQuotes value - if Escaper.requiresSingleQuoting value - return Escaper.escapeWithSingleQuotes value - if '' is value - return '""' - if Utils.PATTERN_DATE.test value - return "'"+value+"'"; - if value.toLowerCase() in ['null','~','true','false'] - return "'"+value+"'" - # Default - return value; - - - # Dumps a JavaScript object to a YAML string. - # - # @param [Object] value The JavaScript object to dump - # @param [Boolean] exceptionOnInvalidType true if an exception must be thrown on invalid types (a JavaScript resource or object), false otherwise - # @param [Function] objectEncoder A function do serialize custom objects, null otherwise - # - # @return string The YAML string representing the JavaScript object - # - @dumpObject: (value, exceptionOnInvalidType, objectSupport = null) -> - # Array - if value instanceof Array - output = [] - for val in value - output.push @dump val - return '['+output.join(', ')+']' - - # Mapping - else - output = [] - for key, val of value - output.push @dump(key)+': '+@dump(val) - return '{'+output.join(', ')+'}' - - - # Parses a scalar to a YAML string. - # - # @param [Object] scalar - # @param [Array] delimiters - # @param [Array] stringDelimiters - # @param [Object] context - # @param [Boolean] evaluate - # - # @return [String] A YAML string - # - # @throw [ParseException] When malformed inline YAML string is parsed - # - @parseScalar: (scalar, delimiters = null, stringDelimiters = ['"', "'"], context = null, evaluate = true) -> - unless context? - context = exceptionOnInvalidType: @settings.exceptionOnInvalidType, objectDecoder: @settings.objectDecoder, i: 0 - {i} = context - - if scalar.charAt(i) in stringDelimiters - # Quoted scalar - output = @parseQuotedScalar scalar, context - {i} = context - - if delimiters? - tmp = Utils.ltrim scalar[i..], ' ' - if not(tmp.charAt(0) in delimiters) - throw new ParseException 'Unexpected characters ('+scalar[i..]+').' - - else - # "normal" string - if not delimiters - output = scalar[i..] - i += output.length - - # Remove comments - strpos = output.indexOf ' #' - if strpos isnt -1 - output = Utils.rtrim output[0...strpos] - - else - joinedDelimiters = delimiters.join('|') - pattern = @PATTERN_SCALAR_BY_DELIMITERS[joinedDelimiters] - unless pattern? - pattern = new Pattern '^(.+?)('+joinedDelimiters+')' - @PATTERN_SCALAR_BY_DELIMITERS[joinedDelimiters] = pattern - if match = pattern.exec scalar[i..] - output = match[1] - i += output.length - else - throw new ParseException 'Malformed inline YAML string ('+scalar+').' - - - if evaluate - output = @evaluateScalar output, context - - context.i = i - return output - - - # Parses a quoted scalar to YAML. - # - # @param [String] scalar - # @param [Object] context - # - # @return [String] A YAML string - # - # @throw [ParseMore] When malformed inline YAML string is parsed - # - @parseQuotedScalar: (scalar, context) -> - {i} = context - - unless match = @PATTERN_QUOTED_SCALAR.exec scalar[i..] - throw new ParseMore 'Malformed inline YAML string ('+scalar[i..]+').' - - output = match[0].substr(1, match[0].length - 2) - - if '"' is scalar.charAt(i) - output = Unescaper.unescapeDoubleQuotedString output - else - output = Unescaper.unescapeSingleQuotedString output - - i += match[0].length - - context.i = i - return output - - - # Parses a sequence to a YAML string. - # - # @param [String] sequence - # @param [Object] context - # - # @return [String] A YAML string - # - # @throw [ParseMore] When malformed inline YAML string is parsed - # - @parseSequence: (sequence, context) -> - output = [] - len = sequence.length - {i} = context - i += 1 - - # [foo, bar, ...] - while i < len - context.i = i - switch sequence.charAt(i) - when '[' - # Nested sequence - output.push @parseSequence sequence, context - {i} = context - when '{' - # Nested mapping - output.push @parseMapping sequence, context - {i} = context - when ']' - return output - when ',', ' ', "\n" - # Do nothing - else - isQuoted = (sequence.charAt(i) in ['"', "'"]) - value = @parseScalar sequence, [',', ']'], ['"', "'"], context - {i} = context - - if not(isQuoted) and typeof(value) is 'string' and (value.indexOf(': ') isnt -1 or value.indexOf(":\n") isnt -1) - # Embedded mapping? - try - value = @parseMapping '{'+value+'}' - catch e - # No, it's not - - - output.push value - - --i - - ++i - - throw new ParseMore 'Malformed inline YAML string '+sequence - - - # Parses a mapping to a YAML string. - # - # @param [String] mapping - # @param [Object] context - # - # @return [String] A YAML string - # - # @throw [ParseMore] When malformed inline YAML string is parsed - # - @parseMapping: (mapping, context) -> - output = {} - len = mapping.length - {i} = context - i += 1 - - # {foo: bar, bar:foo, ...} - shouldContinueWhileLoop = false - while i < len - context.i = i - switch mapping.charAt(i) - when ' ', ',', "\n" - ++i - context.i = i - shouldContinueWhileLoop = true - when '}' - return output - - if shouldContinueWhileLoop - shouldContinueWhileLoop = false - continue - - # Key - key = @parseScalar mapping, [':', ' ', "\n"], ['"', "'"], context, false - {i} = context - - # Value - done = false - - while i < len - context.i = i - switch mapping.charAt(i) - when '[' - # Nested sequence - value = @parseSequence mapping, context - {i} = context - # Spec: Keys MUST be unique; first one wins. - # Parser cannot abort this mapping earlier, since lines - # are processed sequentially. - if output[key] == undefined - output[key] = value - done = true - when '{' - # Nested mapping - value = @parseMapping mapping, context - {i} = context - # Spec: Keys MUST be unique; first one wins. - # Parser cannot abort this mapping earlier, since lines - # are processed sequentially. - if output[key] == undefined - output[key] = value - done = true - when ':', ' ', "\n" - # Do nothing - else - value = @parseScalar mapping, [',', '}'], ['"', "'"], context - {i} = context - # Spec: Keys MUST be unique; first one wins. - # Parser cannot abort this mapping earlier, since lines - # are processed sequentially. - if output[key] == undefined - output[key] = value - done = true - --i - - ++i - - if done - break - - throw new ParseMore 'Malformed inline YAML string '+mapping - - - # Evaluates scalars and replaces magic values. - # - # @param [String] scalar - # - # @return [String] A YAML string - # - @evaluateScalar: (scalar, context) -> - scalar = Utils.trim(scalar) - scalarLower = scalar.toLowerCase() - - switch scalarLower - when 'null', '', '~' - return null - when 'true' - return true - when 'false' - return false - when '.inf' - return Infinity - when '.nan' - return NaN - when '-.inf' - return Infinity - else - firstChar = scalarLower.charAt(0) - switch firstChar - when '!' - firstSpace = scalar.indexOf(' ') - if firstSpace is -1 - firstWord = scalarLower - else - firstWord = scalarLower[0...firstSpace] - switch firstWord - when '!' - if firstSpace isnt -1 - return parseInt @parseScalar(scalar[2..]) - return null - when '!str' - return Utils.ltrim scalar[4..] - when '!!str' - return Utils.ltrim scalar[5..] - when '!!int' - return parseInt(@parseScalar(scalar[5..])) - when '!!bool' - return Utils.parseBoolean(@parseScalar(scalar[6..]), false) - when '!!float' - return parseFloat(@parseScalar(scalar[7..])) - when '!!timestamp' - return Utils.stringToDate(Utils.ltrim(scalar[11..])) - else - unless context? - context = exceptionOnInvalidType: @settings.exceptionOnInvalidType, objectDecoder: @settings.objectDecoder, i: 0 - {objectDecoder, exceptionOnInvalidType} = context - - if objectDecoder - # If objectDecoder function is given, we can do custom decoding of custom types - trimmedScalar = Utils.rtrim scalar - firstSpace = trimmedScalar.indexOf(' ') - if firstSpace is -1 - return objectDecoder trimmedScalar, null - else - subValue = Utils.ltrim trimmedScalar[firstSpace+1..] - unless subValue.length > 0 - subValue = null - return objectDecoder trimmedScalar[0...firstSpace], subValue - - if exceptionOnInvalidType - throw new ParseException 'Custom object support when parsing a YAML file has been disabled.' - - return null - when '0' - if '0x' is scalar[0...2] - return Utils.hexDec scalar - else if Utils.isDigits scalar - return Utils.octDec scalar - else if Utils.isNumeric scalar - return parseFloat scalar - else - return scalar - when '+' - if Utils.isDigits scalar - raw = scalar - cast = parseInt(raw) - if raw is String(cast) - return cast - else - return raw - else if Utils.isNumeric scalar - return parseFloat scalar - else if @PATTERN_THOUSAND_NUMERIC_SCALAR.test scalar - return parseFloat(scalar.replace(',', '')) - return scalar - when '-' - if Utils.isDigits(scalar[1..]) - if '0' is scalar.charAt(1) - return -Utils.octDec(scalar[1..]) - else - raw = scalar[1..] - cast = parseInt(raw) - if raw is String(cast) - return -cast - else - return -raw - else if Utils.isNumeric scalar - return parseFloat scalar - else if @PATTERN_THOUSAND_NUMERIC_SCALAR.test scalar - return parseFloat(scalar.replace(',', '')) - return scalar - else - if date = Utils.stringToDate(scalar) - return date - else if Utils.isNumeric(scalar) - return parseFloat scalar - else if @PATTERN_THOUSAND_NUMERIC_SCALAR.test scalar - return parseFloat(scalar.replace(',', '')) - return scalar - -module.exports = Inline diff --git a/node_modules/yamljs/src/Parser.coffee b/node_modules/yamljs/src/Parser.coffee deleted file mode 100644 index 812d23f..0000000 --- a/node_modules/yamljs/src/Parser.coffee +++ /dev/null @@ -1,651 +0,0 @@ - -Inline = require './Inline' -Pattern = require './Pattern' -Utils = require './Utils' -ParseException = require './Exception/ParseException' -ParseMore = require './Exception/ParseMore' - -# Parser parses YAML strings to convert them to JavaScript objects. -# -class Parser - - # Pre-compiled patterns - # - PATTERN_FOLDED_SCALAR_ALL: new Pattern '^(?:(?![^\\|>]*)\\s+)?(?\\||>)(?\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(? +#.*)?$' - PATTERN_FOLDED_SCALAR_END: new Pattern '(?\\||>)(?\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(? +#.*)?$' - PATTERN_SEQUENCE_ITEM: new Pattern '^\\-((?\\s+)(?.+?))?\\s*$' - PATTERN_ANCHOR_VALUE: new Pattern '^&(?[^ ]+) *(?.*)' - PATTERN_COMPACT_NOTATION: new Pattern '^(?'+Inline.REGEX_QUOTED_STRING+'|[^ \'"\\{\\[].*?) *\\:(\\s+(?.+?))?\\s*$' - PATTERN_MAPPING_ITEM: new Pattern '^(?'+Inline.REGEX_QUOTED_STRING+'|[^ \'"\\[\\{].*?) *\\:(\\s+(?.+?))?\\s*$' - PATTERN_DECIMAL: new Pattern '\\d+' - PATTERN_INDENT_SPACES: new Pattern '^ +' - PATTERN_TRAILING_LINES: new Pattern '(\n*)$' - PATTERN_YAML_HEADER: new Pattern '^\\%YAML[: ][\\d\\.]+.*\n', 'm' - PATTERN_LEADING_COMMENTS: new Pattern '^(\\#.*?\n)+', 'm' - PATTERN_DOCUMENT_MARKER_START: new Pattern '^\\-\\-\\-.*?\n', 'm' - PATTERN_DOCUMENT_MARKER_END: new Pattern '^\\.\\.\\.\\s*$', 'm' - PATTERN_FOLDED_SCALAR_BY_INDENTATION: {} - - # Context types - # - CONTEXT_NONE: 0 - CONTEXT_SEQUENCE: 1 - CONTEXT_MAPPING: 2 - - - # Constructor - # - # @param [Integer] offset The offset of YAML document (used for line numbers in error messages) - # - constructor: (@offset = 0) -> - @lines = [] - @currentLineNb = -1 - @currentLine = '' - @refs = {} - - - # Parses a YAML string to a JavaScript value. - # - # @param [String] value A YAML string - # @param [Boolean] exceptionOnInvalidType true if an exception must be thrown on invalid types (a JavaScript resource or object), false otherwise - # @param [Function] objectDecoder A function to deserialize custom objects, null otherwise - # - # @return [Object] A JavaScript value - # - # @throw [ParseException] If the YAML is not valid - # - parse: (value, exceptionOnInvalidType = false, objectDecoder = null) -> - @currentLineNb = -1 - @currentLine = '' - @lines = @cleanup(value).split "\n" - - data = null - context = @CONTEXT_NONE - allowOverwrite = false - while @moveToNextLine() - if @isCurrentLineEmpty() - continue - - # Tab? - if "\t" is @currentLine[0] - throw new ParseException 'A YAML file cannot contain tabs as indentation.', @getRealCurrentLineNb() + 1, @currentLine - - isRef = mergeNode = false - if values = @PATTERN_SEQUENCE_ITEM.exec @currentLine - if @CONTEXT_MAPPING is context - throw new ParseException 'You cannot define a sequence item when in a mapping' - context = @CONTEXT_SEQUENCE - data ?= [] - - if values.value? and matches = @PATTERN_ANCHOR_VALUE.exec values.value - isRef = matches.ref - values.value = matches.value - - # Array - if not(values.value?) or '' is Utils.trim(values.value, ' ') or Utils.ltrim(values.value, ' ').indexOf('#') is 0 - if @currentLineNb < @lines.length - 1 and not @isNextLineUnIndentedCollection() - c = @getRealCurrentLineNb() + 1 - parser = new Parser c - parser.refs = @refs - data.push parser.parse(@getNextEmbedBlock(null, true), exceptionOnInvalidType, objectDecoder) - else - data.push null - - else - if values.leadspaces?.length and matches = @PATTERN_COMPACT_NOTATION.exec values.value - - # This is a compact notation element, add to next block and parse - c = @getRealCurrentLineNb() - parser = new Parser c - parser.refs = @refs - - block = values.value - indent = @getCurrentLineIndentation() - if @isNextLineIndented(false) - block += "\n"+@getNextEmbedBlock(indent + values.leadspaces.length + 1, true) - - data.push parser.parse block, exceptionOnInvalidType, objectDecoder - - else - data.push @parseValue values.value, exceptionOnInvalidType, objectDecoder - - else if (values = @PATTERN_MAPPING_ITEM.exec @currentLine) and values.key.indexOf(' #') is -1 - if @CONTEXT_SEQUENCE is context - throw new ParseException 'You cannot define a mapping item when in a sequence' - context = @CONTEXT_MAPPING - data ?= {} - - # Force correct settings - Inline.configure exceptionOnInvalidType, objectDecoder - try - key = Inline.parseScalar values.key - catch e - e.parsedLine = @getRealCurrentLineNb() + 1 - e.snippet = @currentLine - - throw e - - if '<<' is key - mergeNode = true - allowOverwrite = true - if values.value?.indexOf('*') is 0 - refName = values.value[1..] - unless @refs[refName]? - throw new ParseException 'Reference "'+refName+'" does not exist.', @getRealCurrentLineNb() + 1, @currentLine - - refValue = @refs[refName] - - if typeof refValue isnt 'object' - throw new ParseException 'YAML merge keys used with a scalar value instead of an object.', @getRealCurrentLineNb() + 1, @currentLine - - if refValue instanceof Array - # Merge array with object - for value, i in refValue - data[String(i)] ?= value - else - # Merge objects - for key, value of refValue - data[key] ?= value - - else - if values.value? and values.value isnt '' - value = values.value - else - value = @getNextEmbedBlock() - - c = @getRealCurrentLineNb() + 1 - parser = new Parser c - parser.refs = @refs - parsed = parser.parse value, exceptionOnInvalidType - - unless typeof parsed is 'object' - throw new ParseException 'YAML merge keys used with a scalar value instead of an object.', @getRealCurrentLineNb() + 1, @currentLine - - if parsed instanceof Array - # If the value associated with the merge key is a sequence, then this sequence is expected to contain mapping nodes - # and each of these nodes is merged in turn according to its order in the sequence. Keys in mapping nodes earlier - # in the sequence override keys specified in later mapping nodes. - for parsedItem in parsed - unless typeof parsedItem is 'object' - throw new ParseException 'Merge items must be objects.', @getRealCurrentLineNb() + 1, parsedItem - - if parsedItem instanceof Array - # Merge array with object - for value, i in parsedItem - k = String(i) - unless data.hasOwnProperty(k) - data[k] = value - else - # Merge objects - for key, value of parsedItem - unless data.hasOwnProperty(key) - data[key] = value - - else - # If the value associated with the key is a single mapping node, each of its key/value pairs is inserted into the - # current mapping, unless the key already exists in it. - for key, value of parsed - unless data.hasOwnProperty(key) - data[key] = value - - else if values.value? and matches = @PATTERN_ANCHOR_VALUE.exec values.value - isRef = matches.ref - values.value = matches.value - - - if mergeNode - # Merge keys - else if not(values.value?) or '' is Utils.trim(values.value, ' ') or Utils.ltrim(values.value, ' ').indexOf('#') is 0 - # Hash - # if next line is less indented or equal, then it means that the current value is null - if not(@isNextLineIndented()) and not(@isNextLineUnIndentedCollection()) - # Spec: Keys MUST be unique; first one wins. - # But overwriting is allowed when a merge node is used in current block. - if allowOverwrite or data[key] is undefined - data[key] = null - - else - c = @getRealCurrentLineNb() + 1 - parser = new Parser c - parser.refs = @refs - val = parser.parse @getNextEmbedBlock(), exceptionOnInvalidType, objectDecoder - - # Spec: Keys MUST be unique; first one wins. - # But overwriting is allowed when a merge node is used in current block. - if allowOverwrite or data[key] is undefined - data[key] = val - - else - val = @parseValue values.value, exceptionOnInvalidType, objectDecoder - - # Spec: Keys MUST be unique; first one wins. - # But overwriting is allowed when a merge node is used in current block. - if allowOverwrite or data[key] is undefined - data[key] = val - - else - # 1-liner optionally followed by newline - lineCount = @lines.length - if 1 is lineCount or (2 is lineCount and Utils.isEmpty(@lines[1])) - try - value = Inline.parse @lines[0], exceptionOnInvalidType, objectDecoder - catch e - e.parsedLine = @getRealCurrentLineNb() + 1 - e.snippet = @currentLine - - throw e - - if typeof value is 'object' - if value instanceof Array - first = value[0] - else - for key of value - first = value[key] - break - - if typeof first is 'string' and first.indexOf('*') is 0 - data = [] - for alias in value - data.push @refs[alias[1..]] - value = data - - return value - - else if Utils.ltrim(value).charAt(0) in ['[', '{'] - try - return Inline.parse value, exceptionOnInvalidType, objectDecoder - catch e - e.parsedLine = @getRealCurrentLineNb() + 1 - e.snippet = @currentLine - - throw e - - throw new ParseException 'Unable to parse.', @getRealCurrentLineNb() + 1, @currentLine - - if isRef - if data instanceof Array - @refs[isRef] = data[data.length-1] - else - lastKey = null - for key of data - lastKey = key - @refs[isRef] = data[lastKey] - - - if Utils.isEmpty(data) - return null - else - return data - - - - # Returns the current line number (takes the offset into account). - # - # @return [Integer] The current line number - # - getRealCurrentLineNb: -> - return @currentLineNb + @offset - - - # Returns the current line indentation. - # - # @return [Integer] The current line indentation - # - getCurrentLineIndentation: -> - return @currentLine.length - Utils.ltrim(@currentLine, ' ').length - - - # Returns the next embed block of YAML. - # - # @param [Integer] indentation The indent level at which the block is to be read, or null for default - # - # @return [String] A YAML string - # - # @throw [ParseException] When indentation problem are detected - # - getNextEmbedBlock: (indentation = null, includeUnindentedCollection = false) -> - @moveToNextLine() - - if not indentation? - newIndent = @getCurrentLineIndentation() - - unindentedEmbedBlock = @isStringUnIndentedCollectionItem @currentLine - - if not(@isCurrentLineEmpty()) and 0 is newIndent and not(unindentedEmbedBlock) - throw new ParseException 'Indentation problem.', @getRealCurrentLineNb() + 1, @currentLine - - else - newIndent = indentation - - - data = [@currentLine[newIndent..]] - - unless includeUnindentedCollection - isItUnindentedCollection = @isStringUnIndentedCollectionItem @currentLine - - # Comments must not be removed inside a string block (ie. after a line ending with "|") - # They must not be removed inside a sub-embedded block as well - removeCommentsPattern = @PATTERN_FOLDED_SCALAR_END - removeComments = not removeCommentsPattern.test @currentLine - - while @moveToNextLine() - indent = @getCurrentLineIndentation() - - if indent is newIndent - removeComments = not removeCommentsPattern.test @currentLine - - if removeComments and @isCurrentLineComment() - continue - - if @isCurrentLineBlank() - data.push @currentLine[newIndent..] - continue - - if isItUnindentedCollection and not @isStringUnIndentedCollectionItem(@currentLine) and indent is newIndent - @moveToPreviousLine() - break - - if indent >= newIndent - data.push @currentLine[newIndent..] - else if Utils.ltrim(@currentLine).charAt(0) is '#' - # Don't add line with comments - else if 0 is indent - @moveToPreviousLine() - break - else - throw new ParseException 'Indentation problem.', @getRealCurrentLineNb() + 1, @currentLine - - - return data.join "\n" - - - # Moves the parser to the next line. - # - # @return [Boolean] - # - moveToNextLine: -> - if @currentLineNb >= @lines.length - 1 - return false - - @currentLine = @lines[++@currentLineNb]; - - return true - - - # Moves the parser to the previous line. - # - moveToPreviousLine: -> - @currentLine = @lines[--@currentLineNb] - return - - - # Parses a YAML value. - # - # @param [String] value A YAML value - # @param [Boolean] exceptionOnInvalidType true if an exception must be thrown on invalid types false otherwise - # @param [Function] objectDecoder A function to deserialize custom objects, null otherwise - # - # @return [Object] A JavaScript value - # - # @throw [ParseException] When reference does not exist - # - parseValue: (value, exceptionOnInvalidType, objectDecoder) -> - if 0 is value.indexOf('*') - pos = value.indexOf '#' - if pos isnt -1 - value = value.substr(1, pos-2) - else - value = value[1..] - - if @refs[value] is undefined - throw new ParseException 'Reference "'+value+'" does not exist.', @currentLine - - return @refs[value] - - - if matches = @PATTERN_FOLDED_SCALAR_ALL.exec value - modifiers = matches.modifiers ? '' - - foldedIndent = Math.abs(parseInt(modifiers)) - if isNaN(foldedIndent) then foldedIndent = 0 - val = @parseFoldedScalar matches.separator, @PATTERN_DECIMAL.replace(modifiers, ''), foldedIndent - if matches.type? - # Force correct settings - Inline.configure exceptionOnInvalidType, objectDecoder - return Inline.parseScalar matches.type+' '+val - else - return val - - # Value can be multiline compact sequence or mapping or string - if value.charAt(0) in ['[', '{', '"', "'"] - while true - try - return Inline.parse value, exceptionOnInvalidType, objectDecoder - catch e - if e instanceof ParseMore and @moveToNextLine() - value += "\n" + Utils.trim(@currentLine, ' ') - else - e.parsedLine = @getRealCurrentLineNb() + 1 - e.snippet = @currentLine - throw e - else - if @isNextLineIndented() - value += "\n" + @getNextEmbedBlock() - return Inline.parse value, exceptionOnInvalidType, objectDecoder - - return - - - # Parses a folded scalar. - # - # @param [String] separator The separator that was used to begin this folded scalar (| or >) - # @param [String] indicator The indicator that was used to begin this folded scalar (+ or -) - # @param [Integer] indentation The indentation that was used to begin this folded scalar - # - # @return [String] The text value - # - parseFoldedScalar: (separator, indicator = '', indentation = 0) -> - notEOF = @moveToNextLine() - if not notEOF - return '' - - isCurrentLineBlank = @isCurrentLineBlank() - text = '' - - # Leading blank lines are consumed before determining indentation - while notEOF and isCurrentLineBlank - # newline only if not EOF - if notEOF = @moveToNextLine() - text += "\n" - isCurrentLineBlank = @isCurrentLineBlank() - - - # Determine indentation if not specified - if 0 is indentation - if matches = @PATTERN_INDENT_SPACES.exec @currentLine - indentation = matches[0].length - - - if indentation > 0 - pattern = @PATTERN_FOLDED_SCALAR_BY_INDENTATION[indentation] - unless pattern? - pattern = new Pattern '^ {'+indentation+'}(.*)$' - Parser::PATTERN_FOLDED_SCALAR_BY_INDENTATION[indentation] = pattern - - while notEOF and (isCurrentLineBlank or matches = pattern.exec @currentLine) - if isCurrentLineBlank - text += @currentLine[indentation..] - else - text += matches[1] - - # newline only if not EOF - if notEOF = @moveToNextLine() - text += "\n" - isCurrentLineBlank = @isCurrentLineBlank() - - else if notEOF - text += "\n" - - - if notEOF - @moveToPreviousLine() - - - # Remove line breaks of each lines except the empty and more indented ones - if '>' is separator - newText = '' - for line in text.split "\n" - if line.length is 0 or line.charAt(0) is ' ' - newText = Utils.rtrim(newText, ' ') + line + "\n" - else - newText += line + ' ' - text = newText - - if '+' isnt indicator - # Remove any extra space or new line as we are adding them after - text = Utils.rtrim(text) - - # Deal with trailing newlines as indicated - if '' is indicator - text = @PATTERN_TRAILING_LINES.replace text, "\n" - else if '-' is indicator - text = @PATTERN_TRAILING_LINES.replace text, '' - - return text - - - # Returns true if the next line is indented. - # - # @return [Boolean] Returns true if the next line is indented, false otherwise - # - isNextLineIndented: (ignoreComments = true) -> - currentIndentation = @getCurrentLineIndentation() - EOF = not @moveToNextLine() - - if ignoreComments - while not(EOF) and @isCurrentLineEmpty() - EOF = not @moveToNextLine() - else - while not(EOF) and @isCurrentLineBlank() - EOF = not @moveToNextLine() - - if EOF - return false - - ret = false - if @getCurrentLineIndentation() > currentIndentation - ret = true - - @moveToPreviousLine() - - return ret - - - # Returns true if the current line is blank or if it is a comment line. - # - # @return [Boolean] Returns true if the current line is empty or if it is a comment line, false otherwise - # - isCurrentLineEmpty: -> - trimmedLine = Utils.trim(@currentLine, ' ') - return trimmedLine.length is 0 or trimmedLine.charAt(0) is '#' - - - # Returns true if the current line is blank. - # - # @return [Boolean] Returns true if the current line is blank, false otherwise - # - isCurrentLineBlank: -> - return '' is Utils.trim(@currentLine, ' ') - - - # Returns true if the current line is a comment line. - # - # @return [Boolean] Returns true if the current line is a comment line, false otherwise - # - isCurrentLineComment: -> - # Checking explicitly the first char of the trim is faster than loops or strpos - ltrimmedLine = Utils.ltrim(@currentLine, ' ') - - return ltrimmedLine.charAt(0) is '#' - - - # Cleanups a YAML string to be parsed. - # - # @param [String] value The input YAML string - # - # @return [String] A cleaned up YAML string - # - cleanup: (value) -> - if value.indexOf("\r") isnt -1 - value = value.split("\r\n").join("\n").split("\r").join("\n") - - # Strip YAML header - count = 0 - [value, count] = @PATTERN_YAML_HEADER.replaceAll value, '' - @offset += count - - # Remove leading comments - [trimmedValue, count] = @PATTERN_LEADING_COMMENTS.replaceAll value, '', 1 - if count is 1 - # Items have been removed, update the offset - @offset += Utils.subStrCount(value, "\n") - Utils.subStrCount(trimmedValue, "\n") - value = trimmedValue - - # Remove start of the document marker (---) - [trimmedValue, count] = @PATTERN_DOCUMENT_MARKER_START.replaceAll value, '', 1 - if count is 1 - # Items have been removed, update the offset - @offset += Utils.subStrCount(value, "\n") - Utils.subStrCount(trimmedValue, "\n") - value = trimmedValue - - # Remove end of the document marker (...) - value = @PATTERN_DOCUMENT_MARKER_END.replace value, '' - - # Ensure the block is not indented - lines = value.split("\n") - smallestIndent = -1 - for line in lines - continue if Utils.trim(line, ' ').length == 0 - indent = line.length - Utils.ltrim(line).length - if smallestIndent is -1 or indent < smallestIndent - smallestIndent = indent - if smallestIndent > 0 - for line, i in lines - lines[i] = line[smallestIndent..] - value = lines.join("\n") - - return value - - - # Returns true if the next line starts unindented collection - # - # @return [Boolean] Returns true if the next line starts unindented collection, false otherwise - # - isNextLineUnIndentedCollection: (currentIndentation = null) -> - currentIndentation ?= @getCurrentLineIndentation() - notEOF = @moveToNextLine() - - while notEOF and @isCurrentLineEmpty() - notEOF = @moveToNextLine() - - if false is notEOF - return false - - ret = false - if @getCurrentLineIndentation() is currentIndentation and @isStringUnIndentedCollectionItem(@currentLine) - ret = true - - @moveToPreviousLine() - - return ret - - - # Returns true if the string is un-indented collection item - # - # @return [Boolean] Returns true if the string is un-indented collection item, false otherwise - # - isStringUnIndentedCollectionItem: -> - return @currentLine is '-' or @currentLine[0...2] is '- ' - - -module.exports = Parser diff --git a/node_modules/yamljs/src/Pattern.coffee b/node_modules/yamljs/src/Pattern.coffee deleted file mode 100644 index 82f96e7..0000000 --- a/node_modules/yamljs/src/Pattern.coffee +++ /dev/null @@ -1,144 +0,0 @@ - -# Pattern is a zero-conflict wrapper extending RegExp features -# in order to make YAML parsing regex more expressive. -# -class Pattern - - # @property [RegExp] The RegExp instance - regex: null - - # @property [String] The raw regex string - rawRegex: null - - # @property [String] The cleaned regex string (used to create the RegExp instance) - cleanedRegex: null - - # @property [Object] The dictionary mapping names to capturing bracket numbers - mapping: null - - # Constructor - # - # @param [String] rawRegex The raw regex string defining the pattern - # - constructor: (rawRegex, modifiers = '') -> - cleanedRegex = '' - len = rawRegex.length - mapping = null - - # Cleanup raw regex and compute mapping - capturingBracketNumber = 0 - i = 0 - while i < len - _char = rawRegex.charAt(i) - if _char is '\\' - # Ignore next character - cleanedRegex += rawRegex[i..i+1] - i++ - else if _char is '(' - # Increase bracket number, only if it is capturing - if i < len - 2 - part = rawRegex[i..i+2] - if part is '(?:' - # Non-capturing bracket - i += 2 - cleanedRegex += part - else if part is '(?<' - # Capturing bracket with possibly a name - capturingBracketNumber++ - i += 2 - name = '' - while i + 1 < len - subChar = rawRegex.charAt(i + 1) - if subChar is '>' - cleanedRegex += '(' - i++ - if name.length > 0 - # Associate a name with a capturing bracket number - mapping ?= {} - mapping[name] = capturingBracketNumber - break - else - name += subChar - - i++ - else - cleanedRegex += _char - capturingBracketNumber++ - else - cleanedRegex += _char - else - cleanedRegex += _char - - i++ - - @rawRegex = rawRegex - @cleanedRegex = cleanedRegex - @regex = new RegExp @cleanedRegex, 'g'+modifiers.replace('g', '') - @mapping = mapping - - - # Executes the pattern's regex and returns the matching values - # - # @param [String] str The string to use to execute the pattern - # - # @return [Array] The matching values extracted from capturing brackets or null if nothing matched - # - exec: (str) -> - @regex.lastIndex = 0 - matches = @regex.exec str - - if not matches? - return null - - if @mapping? - for name, index of @mapping - matches[name] = matches[index] - - return matches - - - # Tests the pattern's regex - # - # @param [String] str The string to use to test the pattern - # - # @return [Boolean] true if the string matched - # - test: (str) -> - @regex.lastIndex = 0 - return @regex.test str - - - # Replaces occurences matching with the pattern's regex with replacement - # - # @param [String] str The source string to perform replacements - # @param [String] replacement The string to use in place of each replaced occurence. - # - # @return [String] The replaced string - # - replace: (str, replacement) -> - @regex.lastIndex = 0 - return str.replace @regex, replacement - - - # Replaces occurences matching with the pattern's regex with replacement and - # get both the replaced string and the number of replaced occurences in the string. - # - # @param [String] str The source string to perform replacements - # @param [String] replacement The string to use in place of each replaced occurence. - # @param [Integer] limit The maximum number of occurences to replace (0 means infinite number of occurences) - # - # @return [Array] A destructurable array containing the replaced string and the number of replaced occurences. For instance: ["my replaced string", 2] - # - replaceAll: (str, replacement, limit = 0) -> - @regex.lastIndex = 0 - count = 0 - while @regex.test(str) and (limit is 0 or count < limit) - @regex.lastIndex = 0 - str = str.replace @regex, replacement - count++ - - return [str, count] - - -module.exports = Pattern - diff --git a/node_modules/yamljs/src/Unescaper.coffee b/node_modules/yamljs/src/Unescaper.coffee deleted file mode 100644 index 8e1527a..0000000 --- a/node_modules/yamljs/src/Unescaper.coffee +++ /dev/null @@ -1,96 +0,0 @@ - -Utils = require './Utils' -Pattern = require './Pattern' - -# Unescaper encapsulates unescaping rules for single and double-quoted YAML strings. -# -class Unescaper - - # Regex fragment that matches an escaped character in - # a double quoted string. - @PATTERN_ESCAPED_CHARACTER: new Pattern '\\\\([0abt\tnvfre "\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})'; - - - # Unescapes a single quoted string. - # - # @param [String] value A single quoted string. - # - # @return [String] The unescaped string. - # - @unescapeSingleQuotedString: (value) -> - return value.replace(/\'\'/g, '\'') - - - # Unescapes a double quoted string. - # - # @param [String] value A double quoted string. - # - # @return [String] The unescaped string. - # - @unescapeDoubleQuotedString: (value) -> - @_unescapeCallback ?= (str) => - return @unescapeCharacter(str) - - # Evaluate the string - return @PATTERN_ESCAPED_CHARACTER.replace value, @_unescapeCallback - - - # Unescapes a character that was found in a double-quoted string - # - # @param [String] value An escaped character - # - # @return [String] The unescaped character - # - @unescapeCharacter: (value) -> - ch = String.fromCharCode - switch value.charAt(1) - when '0' - return ch(0) - when 'a' - return ch(7) - when 'b' - return ch(8) - when 't' - return "\t" - when "\t" - return "\t" - when 'n' - return "\n" - when 'v' - return ch(11) - when 'f' - return ch(12) - when 'r' - return ch(13) - when 'e' - return ch(27) - when ' ' - return ' ' - when '"' - return '"' - when '/' - return '/' - when '\\' - return '\\' - when 'N' - # U+0085 NEXT LINE - return ch(0x0085) - when '_' - # U+00A0 NO-BREAK SPACE - return ch(0x00A0) - when 'L' - # U+2028 LINE SEPARATOR - return ch(0x2028) - when 'P' - # U+2029 PARAGRAPH SEPARATOR - return ch(0x2029) - when 'x' - return Utils.utf8chr(Utils.hexDec(value.substr(2, 2))) - when 'u' - return Utils.utf8chr(Utils.hexDec(value.substr(2, 4))) - when 'U' - return Utils.utf8chr(Utils.hexDec(value.substr(2, 8))) - else - return '' - -module.exports = Unescaper diff --git a/node_modules/yamljs/src/Utils.coffee b/node_modules/yamljs/src/Utils.coffee deleted file mode 100644 index aade0de..0000000 --- a/node_modules/yamljs/src/Utils.coffee +++ /dev/null @@ -1,349 +0,0 @@ - -Pattern = require './Pattern' - -# A bunch of utility methods -# -class Utils - - @REGEX_LEFT_TRIM_BY_CHAR: {} - @REGEX_RIGHT_TRIM_BY_CHAR: {} - @REGEX_SPACES: /\s+/g - @REGEX_DIGITS: /^\d+$/ - @REGEX_OCTAL: /[^0-7]/gi - @REGEX_HEXADECIMAL: /[^a-f0-9]/gi - - # Precompiled date pattern - @PATTERN_DATE: new Pattern '^'+ - '(?[0-9][0-9][0-9][0-9])'+ - '-(?[0-9][0-9]?)'+ - '-(?[0-9][0-9]?)'+ - '(?:(?:[Tt]|[ \t]+)'+ - '(?[0-9][0-9]?)'+ - ':(?[0-9][0-9])'+ - ':(?[0-9][0-9])'+ - '(?:\.(?[0-9]*))?'+ - '(?:[ \t]*(?Z|(?[-+])(?[0-9][0-9]?)'+ - '(?::(?[0-9][0-9]))?))?)?'+ - '$', 'i' - - # Local timezone offset in ms - @LOCAL_TIMEZONE_OFFSET: new Date().getTimezoneOffset() * 60 * 1000 - - # Trims the given string on both sides - # - # @param [String] str The string to trim - # @param [String] _char The character to use for trimming (default: '\\s') - # - # @return [String] A trimmed string - # - @trim: (str, _char = '\\s') -> - regexLeft = @REGEX_LEFT_TRIM_BY_CHAR[_char] - unless regexLeft? - @REGEX_LEFT_TRIM_BY_CHAR[_char] = regexLeft = new RegExp '^'+_char+''+_char+'*' - regexLeft.lastIndex = 0 - regexRight = @REGEX_RIGHT_TRIM_BY_CHAR[_char] - unless regexRight? - @REGEX_RIGHT_TRIM_BY_CHAR[_char] = regexRight = new RegExp _char+''+_char+'*$' - regexRight.lastIndex = 0 - return str.replace(regexLeft, '').replace(regexRight, '') - - - # Trims the given string on the left side - # - # @param [String] str The string to trim - # @param [String] _char The character to use for trimming (default: '\\s') - # - # @return [String] A trimmed string - # - @ltrim: (str, _char = '\\s') -> - regexLeft = @REGEX_LEFT_TRIM_BY_CHAR[_char] - unless regexLeft? - @REGEX_LEFT_TRIM_BY_CHAR[_char] = regexLeft = new RegExp '^'+_char+''+_char+'*' - regexLeft.lastIndex = 0 - return str.replace(regexLeft, '') - - - # Trims the given string on the right side - # - # @param [String] str The string to trim - # @param [String] _char The character to use for trimming (default: '\\s') - # - # @return [String] A trimmed string - # - @rtrim: (str, _char = '\\s') -> - regexRight = @REGEX_RIGHT_TRIM_BY_CHAR[_char] - unless regexRight? - @REGEX_RIGHT_TRIM_BY_CHAR[_char] = regexRight = new RegExp _char+''+_char+'*$' - regexRight.lastIndex = 0 - return str.replace(regexRight, '') - - - # Checks if the given value is empty (null, undefined, empty string, string '0', empty Array, empty Object) - # - # @param [Object] value The value to check - # - # @return [Boolean] true if the value is empty - # - @isEmpty: (value) -> - return not(value) or value is '' or value is '0' or (value instanceof Array and value.length is 0) or @isEmptyObject(value) - - # Checks if the given value is an empty object - # - # @param [Object] value The value to check - # - # @return [Boolean] true if the value is empty and is an object - # - @isEmptyObject: (value) -> - return value instanceof Object and (k for own k of value).length is 0 - - # Counts the number of occurences of subString inside string - # - # @param [String] string The string where to count occurences - # @param [String] subString The subString to count - # @param [Integer] start The start index - # @param [Integer] length The string length until where to count - # - # @return [Integer] The number of occurences - # - @subStrCount: (string, subString, start, length) -> - c = 0 - - string = '' + string - subString = '' + subString - - if start? - string = string[start..] - if length? - string = string[0...length] - - len = string.length - sublen = subString.length - for i in [0...len] - if subString is string[i...sublen] - c++ - i += sublen - 1 - - return c - - - # Returns true if input is only composed of digits - # - # @param [Object] input The value to test - # - # @return [Boolean] true if input is only composed of digits - # - @isDigits: (input) -> - @REGEX_DIGITS.lastIndex = 0 - return @REGEX_DIGITS.test input - - - # Decode octal value - # - # @param [String] input The value to decode - # - # @return [Integer] The decoded value - # - @octDec: (input) -> - @REGEX_OCTAL.lastIndex = 0 - return parseInt((input+'').replace(@REGEX_OCTAL, ''), 8) - - - # Decode hexadecimal value - # - # @param [String] input The value to decode - # - # @return [Integer] The decoded value - # - @hexDec: (input) -> - @REGEX_HEXADECIMAL.lastIndex = 0 - input = @trim(input) - if (input+'')[0...2] is '0x' then input = (input+'')[2..] - return parseInt((input+'').replace(@REGEX_HEXADECIMAL, ''), 16) - - - # Get the UTF-8 character for the given code point. - # - # @param [Integer] c The unicode code point - # - # @return [String] The corresponding UTF-8 character - # - @utf8chr: (c) -> - ch = String.fromCharCode - if 0x80 > (c %= 0x200000) - return ch(c) - if 0x800 > c - return ch(0xC0 | c>>6) + ch(0x80 | c & 0x3F) - if 0x10000 > c - return ch(0xE0 | c>>12) + ch(0x80 | c>>6 & 0x3F) + ch(0x80 | c & 0x3F) - - return ch(0xF0 | c>>18) + ch(0x80 | c>>12 & 0x3F) + ch(0x80 | c>>6 & 0x3F) + ch(0x80 | c & 0x3F) - - - # Returns the boolean value equivalent to the given input - # - # @param [String|Object] input The input value - # @param [Boolean] strict If set to false, accept 'yes' and 'no' as boolean values - # - # @return [Boolean] the boolean value - # - @parseBoolean: (input, strict = true) -> - if typeof(input) is 'string' - lowerInput = input.toLowerCase() - if not strict - if lowerInput is 'no' then return false - if lowerInput is '0' then return false - if lowerInput is 'false' then return false - if lowerInput is '' then return false - return true - return !!input - - - - # Returns true if input is numeric - # - # @param [Object] input The value to test - # - # @return [Boolean] true if input is numeric - # - @isNumeric: (input) -> - @REGEX_SPACES.lastIndex = 0 - return typeof(input) is 'number' or typeof(input) is 'string' and !isNaN(input) and input.replace(@REGEX_SPACES, '') isnt '' - - - # Returns a parsed date from the given string - # - # @param [String] str The date string to parse - # - # @return [Date] The parsed date or null if parsing failed - # - @stringToDate: (str) -> - unless str?.length - return null - - # Perform regular expression pattern - info = @PATTERN_DATE.exec str - unless info - return null - - # Extract year, month, day - year = parseInt info.year, 10 - month = parseInt(info.month, 10) - 1 # In javascript, january is 0, february 1, etc... - day = parseInt info.day, 10 - - # If no hour is given, return a date with day precision - unless info.hour? - date = new Date Date.UTC(year, month, day) - return date - - # Extract hour, minute, second - hour = parseInt info.hour, 10 - minute = parseInt info.minute, 10 - second = parseInt info.second, 10 - - # Extract fraction, if given - if info.fraction? - fraction = info.fraction[0...3] - while fraction.length < 3 - fraction += '0' - fraction = parseInt fraction, 10 - else - fraction = 0 - - # Compute timezone offset if given - if info.tz? - tz_hour = parseInt info.tz_hour, 10 - if info.tz_minute? - tz_minute = parseInt info.tz_minute, 10 - else - tz_minute = 0 - - # Compute timezone delta in ms - tz_offset = (tz_hour * 60 + tz_minute) * 60000 - if '-' is info.tz_sign - tz_offset *= -1 - - # Compute date - date = new Date Date.UTC(year, month, day, hour, minute, second, fraction) - if tz_offset - date.setTime date.getTime() - tz_offset - - return date - - - # Repeats the given string a number of times - # - # @param [String] str The string to repeat - # @param [Integer] number The number of times to repeat the string - # - # @return [String] The repeated string - # - @strRepeat: (str, number) -> - res = '' - i = 0 - while i < number - res += str - i++ - return res - - - # Reads the data from the given file path and returns the result as string - # - # @param [String] path The path to the file - # @param [Function] callback A callback to read file asynchronously (optional) - # - # @return [String] The resulting data as string - # - @getStringFromFile: (path, callback = null) -> - xhr = null - if window? - if window.XMLHttpRequest - xhr = new XMLHttpRequest() - else if window.ActiveXObject - for name in ["Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.3.0", "Msxml2.XMLHTTP", "Microsoft.XMLHTTP"] - try - xhr = new ActiveXObject(name) - - if xhr? - # Browser - if callback? - # Async - xhr.onreadystatechange = -> - if xhr.readyState is 4 - if xhr.status is 200 or xhr.status is 0 - callback(xhr.responseText) - else - callback(null) - xhr.open 'GET', path, true - xhr.send null - - else - # Sync - xhr.open 'GET', path, false - xhr.send null - - if xhr.status is 200 or xhr.status == 0 - return xhr.responseText - - return null - else - # Node.js-like - req = require - fs = req('fs') # Prevent browserify from trying to load 'fs' module - if callback? - # Async - fs.readFile path, (err, data) -> - if err - callback null - else - callback String(data) - - else - # Sync - data = fs.readFileSync path - if data? - return String(data) - return null - - - -module.exports = Utils diff --git a/node_modules/yamljs/src/Yaml.coffee b/node_modules/yamljs/src/Yaml.coffee deleted file mode 100644 index c3ae8ae..0000000 --- a/node_modules/yamljs/src/Yaml.coffee +++ /dev/null @@ -1,118 +0,0 @@ - -Parser = require './Parser' -Dumper = require './Dumper' -Utils = require './Utils' - -# Yaml offers convenience methods to load and dump YAML. -# -class Yaml - - # Parses YAML into a JavaScript object. - # - # The parse method, when supplied with a YAML string, - # will do its best to convert YAML in a file into a JavaScript object. - # - # Usage: - # myObject = Yaml.parse('some: yaml'); - # console.log(myObject); - # - # @param [String] input A string containing YAML - # @param [Boolean] exceptionOnInvalidType true if an exception must be thrown on invalid types, false otherwise - # @param [Function] objectDecoder A function to deserialize custom objects, null otherwise - # - # @return [Object] The YAML converted to a JavaScript object - # - # @throw [ParseException] If the YAML is not valid - # - @parse: (input, exceptionOnInvalidType = false, objectDecoder = null) -> - return new Parser().parse(input, exceptionOnInvalidType, objectDecoder) - - - # Parses YAML from file path into a JavaScript object. - # - # The parseFile method, when supplied with a YAML file, - # will do its best to convert YAML in a file into a JavaScript object. - # - # Usage: - # myObject = Yaml.parseFile('config.yml'); - # console.log(myObject); - # - # @param [String] path A file path pointing to a valid YAML file - # @param [Boolean] exceptionOnInvalidType true if an exception must be thrown on invalid types, false otherwise - # @param [Function] objectDecoder A function to deserialize custom objects, null otherwise - # - # @return [Object] The YAML converted to a JavaScript object or null if the file doesn't exist. - # - # @throw [ParseException] If the YAML is not valid - # - @parseFile: (path, callback = null, exceptionOnInvalidType = false, objectDecoder = null) -> - if callback? - # Async - Utils.getStringFromFile path, (input) => - result = null - if input? - result = @parse input, exceptionOnInvalidType, objectDecoder - callback result - return - else - # Sync - input = Utils.getStringFromFile path - if input? - return @parse input, exceptionOnInvalidType, objectDecoder - return null - - - # Dumps a JavaScript object to a YAML string. - # - # The dump method, when supplied with an object, will do its best - # to convert the object into friendly YAML. - # - # @param [Object] input JavaScript object - # @param [Integer] inline The level where you switch to inline YAML - # @param [Integer] indent The amount of spaces to use for indentation of nested nodes. - # @param [Boolean] exceptionOnInvalidType true if an exception must be thrown on invalid types (a JavaScript resource or object), false otherwise - # @param [Function] objectEncoder A function to serialize custom objects, null otherwise - # - # @return [String] A YAML string representing the original JavaScript object - # - @dump: (input, inline = 2, indent = 4, exceptionOnInvalidType = false, objectEncoder = null) -> - yaml = new Dumper() - yaml.indentation = indent - - return yaml.dump(input, inline, 0, exceptionOnInvalidType, objectEncoder) - - - # Registers .yml extension to work with node's require() function. - # - @register: -> - require_handler = (module, filename) -> - # Fill in result - module.exports = YAML.parseFile filename - - # Register require extensions only if we're on node.js - # hack for browserify - if require?.extensions? - require.extensions['.yml'] = require_handler - require.extensions['.yaml'] = require_handler - - - # Alias of dump() method for compatibility reasons. - # - @stringify: (input, inline, indent, exceptionOnInvalidType, objectEncoder) -> - return @dump input, inline, indent, exceptionOnInvalidType, objectEncoder - - - # Alias of parseFile() method for compatibility reasons. - # - @load: (path, callback, exceptionOnInvalidType, objectDecoder) -> - return @parseFile path, callback, exceptionOnInvalidType, objectDecoder - - -# Expose YAML namespace to browser -window?.YAML = Yaml - -# Not in the browser? -unless window? - @YAML = Yaml - -module.exports = Yaml diff --git a/node_modules/yamljs/test/SpecRunner.html b/node_modules/yamljs/test/SpecRunner.html deleted file mode 100755 index 840545d..0000000 --- a/node_modules/yamljs/test/SpecRunner.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - Jasmine Spec Runner v2.0.0 - - - - - - - - - - - - - - - - - - - diff --git a/node_modules/yamljs/test/lib/jasmine-2.0.0/MIT.LICENSE b/node_modules/yamljs/test/lib/jasmine-2.0.0/MIT.LICENSE deleted file mode 100755 index 7c435ba..0000000 --- a/node_modules/yamljs/test/lib/jasmine-2.0.0/MIT.LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2008-2011 Pivotal Labs - -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/yamljs/test/lib/jasmine-2.0.0/boot.js b/node_modules/yamljs/test/lib/jasmine-2.0.0/boot.js deleted file mode 100755 index ec8baa0..0000000 --- a/node_modules/yamljs/test/lib/jasmine-2.0.0/boot.js +++ /dev/null @@ -1,181 +0,0 @@ -/** - Starting with version 2.0, this file "boots" Jasmine, performing all of the necessary initialization before executing the loaded environment and all of a project's specs. This file should be loaded after `jasmine.js`, but before any project source files or spec files are loaded. Thus this file can also be used to customize Jasmine for a project. - - If a project is using Jasmine via the standalone distribution, this file can be customized directly. If a project is using Jasmine via the [Ruby gem][jasmine-gem], this file can be copied into the support directory via `jasmine copy_boot_js`. Other environments (e.g., Python) will have different mechanisms. - - The location of `boot.js` can be specified and/or overridden in `jasmine.yml`. - - [jasmine-gem]: http://github.com/pivotal/jasmine-gem - */ - -(function() { - - /** - * ## Require & Instantiate - * - * Require Jasmine's core files. Specifically, this requires and attaches all of Jasmine's code to the `jasmine` reference. - */ - window.jasmine = jasmineRequire.core(jasmineRequire); - - /** - * Since this is being run in a browser and the results should populate to an HTML page, require the HTML-specific Jasmine code, injecting the same reference. - */ - jasmineRequire.html(jasmine); - - /** - * Create the Jasmine environment. This is used to run all specs in a project. - */ - var env = jasmine.getEnv(); - - /** - * ## The Global Interface - * - * Build up the functions that will be exposed as the Jasmine public interface. A project can customize, rename or alias any of these functions as desired, provided the implementation remains unchanged. - */ - var jasmineInterface = { - describe: function(description, specDefinitions) { - return env.describe(description, specDefinitions); - }, - - xdescribe: function(description, specDefinitions) { - return env.xdescribe(description, specDefinitions); - }, - - it: function(desc, func) { - return env.it(desc, func); - }, - - xit: function(desc, func) { - return env.xit(desc, func); - }, - - beforeEach: function(beforeEachFunction) { - return env.beforeEach(beforeEachFunction); - }, - - afterEach: function(afterEachFunction) { - return env.afterEach(afterEachFunction); - }, - - expect: function(actual) { - return env.expect(actual); - }, - - pending: function() { - return env.pending(); - }, - - spyOn: function(obj, methodName) { - return env.spyOn(obj, methodName); - }, - - jsApiReporter: new jasmine.JsApiReporter({ - timer: new jasmine.Timer() - }) - }; - - /** - * Add all of the Jasmine global/public interface to the proper global, so a project can use the public interface directly. For example, calling `describe` in specs instead of `jasmine.getEnv().describe`. - */ - if (typeof window == "undefined" && typeof exports == "object") { - extend(exports, jasmineInterface); - } else { - extend(window, jasmineInterface); - } - - /** - * Expose the interface for adding custom equality testers. - */ - jasmine.addCustomEqualityTester = function(tester) { - env.addCustomEqualityTester(tester); - }; - - /** - * Expose the interface for adding custom expectation matchers - */ - jasmine.addMatchers = function(matchers) { - return env.addMatchers(matchers); - }; - - /** - * Expose the mock interface for the JavaScript timeout functions - */ - jasmine.clock = function() { - return env.clock; - }; - - /** - * ## Runner Parameters - * - * More browser specific code - wrap the query string in an object and to allow for getting/setting parameters from the runner user interface. - */ - - var queryString = new jasmine.QueryString({ - getWindowLocation: function() { return window.location; } - }); - - var catchingExceptions = queryString.getParam("catch"); - env.catchExceptions(typeof catchingExceptions === "undefined" ? true : catchingExceptions); - - /** - * ## Reporters - * The `HtmlReporter` builds all of the HTML UI for the runner page. This reporter paints the dots, stars, and x's for specs, as well as all spec names and all failures (if any). - */ - var htmlReporter = new jasmine.HtmlReporter({ - env: env, - onRaiseExceptionsClick: function() { queryString.setParam("catch", !env.catchingExceptions()); }, - getContainer: function() { return document.body; }, - createElement: function() { return document.createElement.apply(document, arguments); }, - createTextNode: function() { return document.createTextNode.apply(document, arguments); }, - timer: new jasmine.Timer() - }); - - /** - * The `jsApiReporter` also receives spec results, and is used by any environment that needs to extract the results from JavaScript. - */ - env.addReporter(jasmineInterface.jsApiReporter); - env.addReporter(htmlReporter); - - /** - * Filter which specs will be run by matching the start of the full name against the `spec` query param. - */ - var specFilter = new jasmine.HtmlSpecFilter({ - filterString: function() { return queryString.getParam("spec"); } - }); - - env.specFilter = function(spec) { - return specFilter.matches(spec.getFullName()); - }; - - /** - * Setting up timing functions to be able to be overridden. Certain browsers (Safari, IE 8, phantomjs) require this hack. - */ - window.setTimeout = window.setTimeout; - window.setInterval = window.setInterval; - window.clearTimeout = window.clearTimeout; - window.clearInterval = window.clearInterval; - - /** - * ## Execution - * - * Replace the browser window's `onload`, ensure it's called, and then run all of the loaded specs. This includes initializing the `HtmlReporter` instance and then executing the loaded Jasmine environment. All of this will happen after all of the specs are loaded. - */ - var currentWindowOnload = window.onload; - - window.onload = function() { - if (currentWindowOnload) { - currentWindowOnload(); - } - htmlReporter.initialize(); - env.execute(); - }; - - /** - * Helper function for readability above. - */ - function extend(destination, source) { - for (var property in source) destination[property] = source[property]; - return destination; - } - -}()); diff --git a/node_modules/yamljs/test/lib/jasmine-2.0.0/console.js b/node_modules/yamljs/test/lib/jasmine-2.0.0/console.js deleted file mode 100755 index 33c1698..0000000 --- a/node_modules/yamljs/test/lib/jasmine-2.0.0/console.js +++ /dev/null @@ -1,160 +0,0 @@ -/* -Copyright (c) 2008-2013 Pivotal Labs - -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. -*/ -function getJasmineRequireObj() { - if (typeof module !== "undefined" && module.exports) { - return exports; - } else { - window.jasmineRequire = window.jasmineRequire || {}; - return window.jasmineRequire; - } -} - -getJasmineRequireObj().console = function(jRequire, j$) { - j$.ConsoleReporter = jRequire.ConsoleReporter(); -}; - -getJasmineRequireObj().ConsoleReporter = function() { - - var noopTimer = { - start: function(){}, - elapsed: function(){ return 0; } - }; - - function ConsoleReporter(options) { - var print = options.print, - showColors = options.showColors || false, - onComplete = options.onComplete || function() {}, - timer = options.timer || noopTimer, - specCount, - failureCount, - failedSpecs = [], - pendingCount, - ansi = { - green: '\x1B[32m', - red: '\x1B[31m', - yellow: '\x1B[33m', - none: '\x1B[0m' - }; - - this.jasmineStarted = function() { - specCount = 0; - failureCount = 0; - pendingCount = 0; - print("Started"); - printNewline(); - timer.start(); - }; - - this.jasmineDone = function() { - printNewline(); - for (var i = 0; i < failedSpecs.length; i++) { - specFailureDetails(failedSpecs[i]); - } - - printNewline(); - var specCounts = specCount + " " + plural("spec", specCount) + ", " + - failureCount + " " + plural("failure", failureCount); - - if (pendingCount) { - specCounts += ", " + pendingCount + " pending " + plural("spec", pendingCount); - } - - print(specCounts); - - printNewline(); - var seconds = timer.elapsed() / 1000; - print("Finished in " + seconds + " " + plural("second", seconds)); - - printNewline(); - - onComplete(failureCount === 0); - }; - - this.specDone = function(result) { - specCount++; - - if (result.status == "pending") { - pendingCount++; - print(colored("yellow", "*")); - return; - } - - if (result.status == "passed") { - print(colored("green", '.')); - return; - } - - if (result.status == "failed") { - failureCount++; - failedSpecs.push(result); - print(colored("red", 'F')); - } - }; - - return this; - - function printNewline() { - print("\n"); - } - - function colored(color, str) { - return showColors ? (ansi[color] + str + ansi.none) : str; - } - - function plural(str, count) { - return count == 1 ? str : str + "s"; - } - - function repeat(thing, times) { - var arr = []; - for (var i = 0; i < times; i++) { - arr.push(thing); - } - return arr; - } - - function indent(str, spaces) { - var lines = (str || '').split("\n"); - var newArr = []; - for (var i = 0; i < lines.length; i++) { - newArr.push(repeat(" ", spaces).join("") + lines[i]); - } - return newArr.join("\n"); - } - - function specFailureDetails(result) { - printNewline(); - print(result.fullName); - - for (var i = 0; i < result.failedExpectations.length; i++) { - var failedExpectation = result.failedExpectations[i]; - printNewline(); - print(indent(failedExpectation.stack, 2)); - } - - printNewline(); - } - } - - return ConsoleReporter; -}; diff --git a/node_modules/yamljs/test/lib/jasmine-2.0.0/jasmine-html.js b/node_modules/yamljs/test/lib/jasmine-2.0.0/jasmine-html.js deleted file mode 100755 index 985d0d1..0000000 --- a/node_modules/yamljs/test/lib/jasmine-2.0.0/jasmine-html.js +++ /dev/null @@ -1,359 +0,0 @@ -/* -Copyright (c) 2008-2013 Pivotal Labs - -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. -*/ -jasmineRequire.html = function(j$) { - j$.ResultsNode = jasmineRequire.ResultsNode(); - j$.HtmlReporter = jasmineRequire.HtmlReporter(j$); - j$.QueryString = jasmineRequire.QueryString(); - j$.HtmlSpecFilter = jasmineRequire.HtmlSpecFilter(); -}; - -jasmineRequire.HtmlReporter = function(j$) { - - var noopTimer = { - start: function() {}, - elapsed: function() { return 0; } - }; - - function HtmlReporter(options) { - var env = options.env || {}, - getContainer = options.getContainer, - createElement = options.createElement, - createTextNode = options.createTextNode, - onRaiseExceptionsClick = options.onRaiseExceptionsClick || function() {}, - timer = options.timer || noopTimer, - results = [], - specsExecuted = 0, - failureCount = 0, - pendingSpecCount = 0, - htmlReporterMain, - symbols; - - this.initialize = function() { - htmlReporterMain = createDom("div", {className: "html-reporter"}, - createDom("div", {className: "banner"}, - createDom("span", {className: "title"}, "Jasmine"), - createDom("span", {className: "version"}, j$.version) - ), - createDom("ul", {className: "symbol-summary"}), - createDom("div", {className: "alert"}), - createDom("div", {className: "results"}, - createDom("div", {className: "failures"}) - ) - ); - getContainer().appendChild(htmlReporterMain); - - symbols = find(".symbol-summary"); - }; - - var totalSpecsDefined; - this.jasmineStarted = function(options) { - totalSpecsDefined = options.totalSpecsDefined || 0; - timer.start(); - }; - - var summary = createDom("div", {className: "summary"}); - - var topResults = new j$.ResultsNode({}, "", null), - currentParent = topResults; - - this.suiteStarted = function(result) { - currentParent.addChild(result, "suite"); - currentParent = currentParent.last(); - }; - - this.suiteDone = function(result) { - if (currentParent == topResults) { - return; - } - - currentParent = currentParent.parent; - }; - - this.specStarted = function(result) { - currentParent.addChild(result, "spec"); - }; - - var failures = []; - this.specDone = function(result) { - if (result.status != "disabled") { - specsExecuted++; - } - - symbols.appendChild(createDom("li", { - className: result.status, - id: "spec_" + result.id, - title: result.fullName - } - )); - - if (result.status == "failed") { - failureCount++; - - var failure = - createDom("div", {className: "spec-detail failed"}, - createDom("div", {className: "description"}, - createDom("a", {title: result.fullName, href: specHref(result)}, result.fullName) - ), - createDom("div", {className: "messages"}) - ); - var messages = failure.childNodes[1]; - - for (var i = 0; i < result.failedExpectations.length; i++) { - var expectation = result.failedExpectations[i]; - messages.appendChild(createDom("div", {className: "result-message"}, expectation.message)); - messages.appendChild(createDom("div", {className: "stack-trace"}, expectation.stack)); - } - - failures.push(failure); - } - - if (result.status == "pending") { - pendingSpecCount++; - } - }; - - this.jasmineDone = function() { - var banner = find(".banner"); - banner.appendChild(createDom("span", {className: "duration"}, "finished in " + timer.elapsed() / 1000 + "s")); - - var alert = find(".alert"); - - alert.appendChild(createDom("span", { className: "exceptions" }, - createDom("label", { className: "label", 'for': "raise-exceptions" }, "raise exceptions"), - createDom("input", { - className: "raise", - id: "raise-exceptions", - type: "checkbox" - }) - )); - var checkbox = find("input"); - - checkbox.checked = !env.catchingExceptions(); - checkbox.onclick = onRaiseExceptionsClick; - - if (specsExecuted < totalSpecsDefined) { - var skippedMessage = "Ran " + specsExecuted + " of " + totalSpecsDefined + " specs - run all"; - alert.appendChild( - createDom("span", {className: "bar skipped"}, - createDom("a", {href: "?", title: "Run all specs"}, skippedMessage) - ) - ); - } - var statusBarMessage = "" + pluralize("spec", specsExecuted) + ", " + pluralize("failure", failureCount); - if (pendingSpecCount) { statusBarMessage += ", " + pluralize("pending spec", pendingSpecCount); } - - var statusBarClassName = "bar " + ((failureCount > 0) ? "failed" : "passed"); - alert.appendChild(createDom("span", {className: statusBarClassName}, statusBarMessage)); - - var results = find(".results"); - results.appendChild(summary); - - summaryList(topResults, summary); - - function summaryList(resultsTree, domParent) { - var specListNode; - for (var i = 0; i < resultsTree.children.length; i++) { - var resultNode = resultsTree.children[i]; - if (resultNode.type == "suite") { - var suiteListNode = createDom("ul", {className: "suite", id: "suite-" + resultNode.result.id}, - createDom("li", {className: "suite-detail"}, - createDom("a", {href: specHref(resultNode.result)}, resultNode.result.description) - ) - ); - - summaryList(resultNode, suiteListNode); - domParent.appendChild(suiteListNode); - } - if (resultNode.type == "spec") { - if (domParent.getAttribute("class") != "specs") { - specListNode = createDom("ul", {className: "specs"}); - domParent.appendChild(specListNode); - } - specListNode.appendChild( - createDom("li", { - className: resultNode.result.status, - id: "spec-" + resultNode.result.id - }, - createDom("a", {href: specHref(resultNode.result)}, resultNode.result.description) - ) - ); - } - } - } - - if (failures.length) { - alert.appendChild( - createDom('span', {className: "menu bar spec-list"}, - createDom("span", {}, "Spec List | "), - createDom('a', {className: "failures-menu", href: "#"}, "Failures"))); - alert.appendChild( - createDom('span', {className: "menu bar failure-list"}, - createDom('a', {className: "spec-list-menu", href: "#"}, "Spec List"), - createDom("span", {}, " | Failures "))); - - find(".failures-menu").onclick = function() { - setMenuModeTo('failure-list'); - }; - find(".spec-list-menu").onclick = function() { - setMenuModeTo('spec-list'); - }; - - setMenuModeTo('failure-list'); - - var failureNode = find(".failures"); - for (var i = 0; i < failures.length; i++) { - failureNode.appendChild(failures[i]); - } - } - }; - - return this; - - function find(selector) { - return getContainer().querySelector(selector); - } - - function createDom(type, attrs, childrenVarArgs) { - var el = createElement(type); - - for (var i = 2; i < arguments.length; i++) { - var child = arguments[i]; - - if (typeof child === 'string') { - el.appendChild(createTextNode(child)); - } else { - if (child) { - el.appendChild(child); - } - } - } - - for (var attr in attrs) { - if (attr == "className") { - el[attr] = attrs[attr]; - } else { - el.setAttribute(attr, attrs[attr]); - } - } - - return el; - } - - function pluralize(singular, count) { - var word = (count == 1 ? singular : singular + "s"); - - return "" + count + " " + word; - } - - function specHref(result) { - return "?spec=" + encodeURIComponent(result.fullName); - } - - function setMenuModeTo(mode) { - htmlReporterMain.setAttribute("class", "html-reporter " + mode); - } - } - - return HtmlReporter; -}; - -jasmineRequire.HtmlSpecFilter = function() { - function HtmlSpecFilter(options) { - var filterString = options && options.filterString() && options.filterString().replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - var filterPattern = new RegExp(filterString); - - this.matches = function(specName) { - return filterPattern.test(specName); - }; - } - - return HtmlSpecFilter; -}; - -jasmineRequire.ResultsNode = function() { - function ResultsNode(result, type, parent) { - this.result = result; - this.type = type; - this.parent = parent; - - this.children = []; - - this.addChild = function(result, type) { - this.children.push(new ResultsNode(result, type, this)); - }; - - this.last = function() { - return this.children[this.children.length - 1]; - }; - } - - return ResultsNode; -}; - -jasmineRequire.QueryString = function() { - function QueryString(options) { - - this.setParam = function(key, value) { - var paramMap = queryStringToParamMap(); - paramMap[key] = value; - options.getWindowLocation().search = toQueryString(paramMap); - }; - - this.getParam = function(key) { - return queryStringToParamMap()[key]; - }; - - return this; - - function toQueryString(paramMap) { - var qStrPairs = []; - for (var prop in paramMap) { - qStrPairs.push(encodeURIComponent(prop) + "=" + encodeURIComponent(paramMap[prop])); - } - return "?" + qStrPairs.join('&'); - } - - function queryStringToParamMap() { - var paramStr = options.getWindowLocation().search.substring(1), - params = [], - paramMap = {}; - - if (paramStr.length > 0) { - params = paramStr.split('&'); - for (var i = 0; i < params.length; i++) { - var p = params[i].split('='); - var value = decodeURIComponent(p[1]); - if (value === "true" || value === "false") { - value = JSON.parse(value); - } - paramMap[decodeURIComponent(p[0])] = value; - } - } - - return paramMap; - } - - } - - return QueryString; -}; diff --git a/node_modules/yamljs/test/lib/jasmine-2.0.0/jasmine.css b/node_modules/yamljs/test/lib/jasmine-2.0.0/jasmine.css deleted file mode 100755 index f4d35b6..0000000 --- a/node_modules/yamljs/test/lib/jasmine-2.0.0/jasmine.css +++ /dev/null @@ -1,55 +0,0 @@ -body { background-color: #eeeeee; padding: 0; margin: 5px; overflow-y: scroll; } - -.html-reporter { font-size: 11px; font-family: Monaco, "Lucida Console", monospace; line-height: 14px; color: #333333; } -.html-reporter a { text-decoration: none; } -.html-reporter a:hover { text-decoration: underline; } -.html-reporter p, .html-reporter h1, .html-reporter h2, .html-reporter h3, .html-reporter h4, .html-reporter h5, .html-reporter h6 { margin: 0; line-height: 14px; } -.html-reporter .banner, .html-reporter .symbol-summary, .html-reporter .summary, .html-reporter .result-message, .html-reporter .spec .description, .html-reporter .spec-detail .description, .html-reporter .alert .bar, .html-reporter .stack-trace { padding-left: 9px; padding-right: 9px; } -.html-reporter .banner .version { margin-left: 14px; } -.html-reporter #jasmine_content { position: fixed; right: 100%; } -.html-reporter .version { color: #aaaaaa; } -.html-reporter .banner { margin-top: 14px; } -.html-reporter .duration { color: #aaaaaa; float: right; } -.html-reporter .symbol-summary { overflow: hidden; *zoom: 1; margin: 14px 0; } -.html-reporter .symbol-summary li { display: inline-block; height: 8px; width: 14px; font-size: 16px; } -.html-reporter .symbol-summary li.passed { font-size: 14px; } -.html-reporter .symbol-summary li.passed:before { color: #5e7d00; content: "\02022"; } -.html-reporter .symbol-summary li.failed { line-height: 9px; } -.html-reporter .symbol-summary li.failed:before { color: #b03911; content: "x"; font-weight: bold; margin-left: -1px; } -.html-reporter .symbol-summary li.disabled { font-size: 14px; } -.html-reporter .symbol-summary li.disabled:before { color: #bababa; content: "\02022"; } -.html-reporter .symbol-summary li.pending { line-height: 17px; } -.html-reporter .symbol-summary li.pending:before { color: #ba9d37; content: "*"; } -.html-reporter .exceptions { color: #fff; float: right; margin-top: 5px; margin-right: 5px; } -.html-reporter .bar { line-height: 28px; font-size: 14px; display: block; color: #eee; } -.html-reporter .bar.failed { background-color: #b03911; } -.html-reporter .bar.passed { background-color: #a6b779; } -.html-reporter .bar.skipped { background-color: #bababa; } -.html-reporter .bar.menu { background-color: #fff; color: #aaaaaa; } -.html-reporter .bar.menu a { color: #333333; } -.html-reporter .bar a { color: white; } -.html-reporter.spec-list .bar.menu.failure-list, .html-reporter.spec-list .results .failures { display: none; } -.html-reporter.failure-list .bar.menu.spec-list, .html-reporter.failure-list .summary { display: none; } -.html-reporter .running-alert { background-color: #666666; } -.html-reporter .results { margin-top: 14px; } -.html-reporter.showDetails .summaryMenuItem { font-weight: normal; text-decoration: inherit; } -.html-reporter.showDetails .summaryMenuItem:hover { text-decoration: underline; } -.html-reporter.showDetails .detailsMenuItem { font-weight: bold; text-decoration: underline; } -.html-reporter.showDetails .summary { display: none; } -.html-reporter.showDetails #details { display: block; } -.html-reporter .summaryMenuItem { font-weight: bold; text-decoration: underline; } -.html-reporter .summary { margin-top: 14px; } -.html-reporter .summary ul { list-style-type: none; margin-left: 14px; padding-top: 0; padding-left: 0; } -.html-reporter .summary ul.suite { margin-top: 7px; margin-bottom: 7px; } -.html-reporter .summary li.passed a { color: #5e7d00; } -.html-reporter .summary li.failed a { color: #b03911; } -.html-reporter .summary li.pending a { color: #ba9d37; } -.html-reporter .description + .suite { margin-top: 0; } -.html-reporter .suite { margin-top: 14px; } -.html-reporter .suite a { color: #333333; } -.html-reporter .failures .spec-detail { margin-bottom: 28px; } -.html-reporter .failures .spec-detail .description { background-color: #b03911; } -.html-reporter .failures .spec-detail .description a { color: white; } -.html-reporter .result-message { padding-top: 14px; color: #333333; white-space: pre; } -.html-reporter .result-message span.result { display: block; } -.html-reporter .stack-trace { margin: 5px 0 0 0; max-height: 224px; overflow: auto; line-height: 18px; color: #666666; border: 1px solid #ddd; background: white; white-space: pre; } diff --git a/node_modules/yamljs/test/lib/jasmine-2.0.0/jasmine.js b/node_modules/yamljs/test/lib/jasmine-2.0.0/jasmine.js deleted file mode 100755 index 24463ec..0000000 --- a/node_modules/yamljs/test/lib/jasmine-2.0.0/jasmine.js +++ /dev/null @@ -1,2402 +0,0 @@ -/* -Copyright (c) 2008-2013 Pivotal Labs - -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. -*/ -function getJasmineRequireObj() { - if (typeof module !== "undefined" && module.exports) { - return exports; - } else { - window.jasmineRequire = window.jasmineRequire || {}; - return window.jasmineRequire; - } -} - -getJasmineRequireObj().core = function(jRequire) { - var j$ = {}; - - jRequire.base(j$); - j$.util = jRequire.util(); - j$.Any = jRequire.Any(); - j$.CallTracker = jRequire.CallTracker(); - j$.Clock = jRequire.Clock(); - j$.DelayedFunctionScheduler = jRequire.DelayedFunctionScheduler(); - j$.Env = jRequire.Env(j$); - j$.ExceptionFormatter = jRequire.ExceptionFormatter(); - j$.Expectation = jRequire.Expectation(); - j$.buildExpectationResult = jRequire.buildExpectationResult(); - j$.JsApiReporter = jRequire.JsApiReporter(); - j$.matchersUtil = jRequire.matchersUtil(j$); - j$.ObjectContaining = jRequire.ObjectContaining(j$); - j$.pp = jRequire.pp(j$); - j$.QueueRunner = jRequire.QueueRunner(); - j$.ReportDispatcher = jRequire.ReportDispatcher(); - j$.Spec = jRequire.Spec(j$); - j$.SpyStrategy = jRequire.SpyStrategy(); - j$.Suite = jRequire.Suite(); - j$.Timer = jRequire.Timer(); - j$.version = jRequire.version(); - - j$.matchers = jRequire.requireMatchers(jRequire, j$); - - return j$; -}; - -getJasmineRequireObj().requireMatchers = function(jRequire, j$) { - var availableMatchers = [ - "toBe", - "toBeCloseTo", - "toBeDefined", - "toBeFalsy", - "toBeGreaterThan", - "toBeLessThan", - "toBeNaN", - "toBeNull", - "toBeTruthy", - "toBeUndefined", - "toContain", - "toEqual", - "toHaveBeenCalled", - "toHaveBeenCalledWith", - "toMatch", - "toThrow", - "toThrowError" - ], - matchers = {}; - - for (var i = 0; i < availableMatchers.length; i++) { - var name = availableMatchers[i]; - matchers[name] = jRequire[name](j$); - } - - return matchers; -}; - -getJasmineRequireObj().base = function(j$) { - j$.unimplementedMethod_ = function() { - throw new Error("unimplemented method"); - }; - - j$.MAX_PRETTY_PRINT_DEPTH = 40; - j$.DEFAULT_TIMEOUT_INTERVAL = 5000; - - j$.getGlobal = (function() { - var jasmineGlobal = eval.call(null, "this"); - return function() { - return jasmineGlobal; - }; - })(); - - j$.getEnv = function(options) { - var env = j$.currentEnv_ = j$.currentEnv_ || new j$.Env(options); - //jasmine. singletons in here (setTimeout blah blah). - return env; - }; - - j$.isArray_ = function(value) { - return j$.isA_("Array", value); - }; - - j$.isString_ = function(value) { - return j$.isA_("String", value); - }; - - j$.isNumber_ = function(value) { - return j$.isA_("Number", value); - }; - - j$.isA_ = function(typeName, value) { - return Object.prototype.toString.apply(value) === '[object ' + typeName + ']'; - }; - - j$.isDomNode = function(obj) { - return obj.nodeType > 0; - }; - - j$.any = function(clazz) { - return new j$.Any(clazz); - }; - - j$.objectContaining = function(sample) { - return new j$.ObjectContaining(sample); - }; - - j$.createSpy = function(name, originalFn) { - - var spyStrategy = new j$.SpyStrategy({ - name: name, - fn: originalFn, - getSpy: function() { return spy; } - }), - callTracker = new j$.CallTracker(), - spy = function() { - callTracker.track({ - object: this, - args: Array.prototype.slice.apply(arguments) - }); - return spyStrategy.exec.apply(this, arguments); - }; - - for (var prop in originalFn) { - if (prop === 'and' || prop === 'calls') { - throw new Error("Jasmine spies would overwrite the 'and' and 'calls' properties on the object being spied upon"); - } - - spy[prop] = originalFn[prop]; - } - - spy.and = spyStrategy; - spy.calls = callTracker; - - return spy; - }; - - j$.isSpy = function(putativeSpy) { - if (!putativeSpy) { - return false; - } - return putativeSpy.and instanceof j$.SpyStrategy && - putativeSpy.calls instanceof j$.CallTracker; - }; - - j$.createSpyObj = function(baseName, methodNames) { - if (!j$.isArray_(methodNames) || methodNames.length === 0) { - throw "createSpyObj requires a non-empty array of method names to create spies for"; - } - var obj = {}; - for (var i = 0; i < methodNames.length; i++) { - obj[methodNames[i]] = j$.createSpy(baseName + '.' + methodNames[i]); - } - return obj; - }; -}; - -getJasmineRequireObj().util = function() { - - var util = {}; - - util.inherit = function(childClass, parentClass) { - var Subclass = function() { - }; - Subclass.prototype = parentClass.prototype; - childClass.prototype = new Subclass(); - }; - - util.htmlEscape = function(str) { - if (!str) { - return str; - } - return str.replace(/&/g, '&') - .replace(//g, '>'); - }; - - util.argsToArray = function(args) { - var arrayOfArgs = []; - for (var i = 0; i < args.length; i++) { - arrayOfArgs.push(args[i]); - } - return arrayOfArgs; - }; - - util.isUndefined = function(obj) { - return obj === void 0; - }; - - return util; -}; - -getJasmineRequireObj().Spec = function(j$) { - function Spec(attrs) { - this.expectationFactory = attrs.expectationFactory; - this.resultCallback = attrs.resultCallback || function() {}; - this.id = attrs.id; - this.description = attrs.description || ''; - this.fn = attrs.fn; - this.beforeFns = attrs.beforeFns || function() { return []; }; - this.afterFns = attrs.afterFns || function() { return []; }; - this.onStart = attrs.onStart || function() {}; - this.exceptionFormatter = attrs.exceptionFormatter || function() {}; - this.getSpecName = attrs.getSpecName || function() { return ''; }; - this.expectationResultFactory = attrs.expectationResultFactory || function() { }; - this.queueRunnerFactory = attrs.queueRunnerFactory || function() {}; - this.catchingExceptions = attrs.catchingExceptions || function() { return true; }; - - this.timer = attrs.timer || {setTimeout: setTimeout, clearTimeout: clearTimeout}; - - if (!this.fn) { - this.pend(); - } - - this.result = { - id: this.id, - description: this.description, - fullName: this.getFullName(), - failedExpectations: [] - }; - } - - Spec.prototype.addExpectationResult = function(passed, data) { - if (passed) { - return; - } - this.result.failedExpectations.push(this.expectationResultFactory(data)); - }; - - Spec.prototype.expect = function(actual) { - return this.expectationFactory(actual, this); - }; - - Spec.prototype.execute = function(onComplete) { - var self = this, - timeout; - - this.onStart(this); - - if (this.markedPending || this.disabled) { - complete(); - return; - } - - function timeoutable(fn) { - return function(done) { - timeout = Function.prototype.apply.apply(self.timer.setTimeout, [j$.getGlobal(), [function() { - onException(new Error('Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.')); - done(); - }, j$.DEFAULT_TIMEOUT_INTERVAL]]); - - var callDone = function() { - clearTimeoutable(); - done(); - }; - - fn.call(this, callDone); //TODO: do we care about more than 1 arg? - }; - } - - function clearTimeoutable() { - Function.prototype.apply.apply(self.timer.clearTimeout, [j$.getGlobal(), [timeout]]); - timeout = void 0; - } - - var allFns = this.beforeFns().concat(this.fn).concat(this.afterFns()), - allTimeoutableFns = []; - for (var i = 0; i < allFns.length; i++) { - var fn = allFns[i]; - allTimeoutableFns.push(fn.length > 0 ? timeoutable(fn) : fn); - } - - this.queueRunnerFactory({ - fns: allTimeoutableFns, - onException: onException, - onComplete: complete - }); - - function onException(e) { - clearTimeoutable(); - if (Spec.isPendingSpecException(e)) { - self.pend(); - return; - } - - self.addExpectationResult(false, { - matcherName: "", - passed: false, - expected: "", - actual: "", - error: e - }); - } - - function complete() { - self.result.status = self.status(); - self.resultCallback(self.result); - - if (onComplete) { - onComplete(); - } - } - }; - - Spec.prototype.disable = function() { - this.disabled = true; - }; - - Spec.prototype.pend = function() { - this.markedPending = true; - }; - - Spec.prototype.status = function() { - if (this.disabled) { - return 'disabled'; - } - - if (this.markedPending) { - return 'pending'; - } - - if (this.result.failedExpectations.length > 0) { - return 'failed'; - } else { - return 'passed'; - } - }; - - Spec.prototype.getFullName = function() { - return this.getSpecName(this); - }; - - Spec.pendingSpecExceptionMessage = "=> marked Pending"; - - Spec.isPendingSpecException = function(e) { - return e.toString().indexOf(Spec.pendingSpecExceptionMessage) !== -1; - }; - - return Spec; -}; - -if (typeof window == void 0 && typeof exports == "object") { - exports.Spec = jasmineRequire.Spec; -} - -getJasmineRequireObj().Env = function(j$) { - function Env(options) { - options = options || {}; - - var self = this; - var global = options.global || j$.getGlobal(); - - var totalSpecsDefined = 0; - - var catchExceptions = true; - - var realSetTimeout = j$.getGlobal().setTimeout; - var realClearTimeout = j$.getGlobal().clearTimeout; - this.clock = new j$.Clock(global, new j$.DelayedFunctionScheduler()); - - var runnableLookupTable = {}; - - var spies = []; - - var currentSpec = null; - var currentSuite = null; - - var reporter = new j$.ReportDispatcher([ - "jasmineStarted", - "jasmineDone", - "suiteStarted", - "suiteDone", - "specStarted", - "specDone" - ]); - - this.specFilter = function() { - return true; - }; - - var equalityTesters = []; - - var customEqualityTesters = []; - this.addCustomEqualityTester = function(tester) { - customEqualityTesters.push(tester); - }; - - j$.Expectation.addCoreMatchers(j$.matchers); - - var nextSpecId = 0; - var getNextSpecId = function() { - return 'spec' + nextSpecId++; - }; - - var nextSuiteId = 0; - var getNextSuiteId = function() { - return 'suite' + nextSuiteId++; - }; - - var expectationFactory = function(actual, spec) { - return j$.Expectation.Factory({ - util: j$.matchersUtil, - customEqualityTesters: customEqualityTesters, - actual: actual, - addExpectationResult: addExpectationResult - }); - - function addExpectationResult(passed, result) { - return spec.addExpectationResult(passed, result); - } - }; - - var specStarted = function(spec) { - currentSpec = spec; - reporter.specStarted(spec.result); - }; - - var beforeFns = function(suite) { - return function() { - var befores = []; - while(suite) { - befores = befores.concat(suite.beforeFns); - suite = suite.parentSuite; - } - return befores.reverse(); - }; - }; - - var afterFns = function(suite) { - return function() { - var afters = []; - while(suite) { - afters = afters.concat(suite.afterFns); - suite = suite.parentSuite; - } - return afters; - }; - }; - - var getSpecName = function(spec, suite) { - return suite.getFullName() + ' ' + spec.description; - }; - - // TODO: we may just be able to pass in the fn instead of wrapping here - var buildExpectationResult = j$.buildExpectationResult, - exceptionFormatter = new j$.ExceptionFormatter(), - expectationResultFactory = function(attrs) { - attrs.messageFormatter = exceptionFormatter.message; - attrs.stackFormatter = exceptionFormatter.stack; - - return buildExpectationResult(attrs); - }; - - // TODO: fix this naming, and here's where the value comes in - this.catchExceptions = function(value) { - catchExceptions = !!value; - return catchExceptions; - }; - - this.catchingExceptions = function() { - return catchExceptions; - }; - - var maximumSpecCallbackDepth = 20; - var currentSpecCallbackDepth = 0; - - function clearStack(fn) { - currentSpecCallbackDepth++; - if (currentSpecCallbackDepth >= maximumSpecCallbackDepth) { - currentSpecCallbackDepth = 0; - realSetTimeout(fn, 0); - } else { - fn(); - } - } - - var catchException = function(e) { - return j$.Spec.isPendingSpecException(e) || catchExceptions; - }; - - var queueRunnerFactory = function(options) { - options.catchException = catchException; - options.clearStack = options.clearStack || clearStack; - - new j$.QueueRunner(options).execute(); - }; - - var topSuite = new j$.Suite({ - env: this, - id: getNextSuiteId(), - description: 'Jasmine__TopLevel__Suite', - queueRunner: queueRunnerFactory, - resultCallback: function() {} // TODO - hook this up - }); - runnableLookupTable[topSuite.id] = topSuite; - currentSuite = topSuite; - - this.topSuite = function() { - return topSuite; - }; - - this.execute = function(runnablesToRun) { - runnablesToRun = runnablesToRun || [topSuite.id]; - - var allFns = []; - for(var i = 0; i < runnablesToRun.length; i++) { - var runnable = runnableLookupTable[runnablesToRun[i]]; - allFns.push((function(runnable) { return function(done) { runnable.execute(done); }; })(runnable)); - } - - reporter.jasmineStarted({ - totalSpecsDefined: totalSpecsDefined - }); - - queueRunnerFactory({fns: allFns, onComplete: reporter.jasmineDone}); - }; - - this.addReporter = function(reporterToAdd) { - reporter.addReporter(reporterToAdd); - }; - - this.addMatchers = function(matchersToAdd) { - j$.Expectation.addMatchers(matchersToAdd); - }; - - this.spyOn = function(obj, methodName) { - if (j$.util.isUndefined(obj)) { - throw new Error("spyOn could not find an object to spy upon for " + methodName + "()"); - } - - if (j$.util.isUndefined(obj[methodName])) { - throw new Error(methodName + '() method does not exist'); - } - - if (obj[methodName] && j$.isSpy(obj[methodName])) { - //TODO?: should this return the current spy? Downside: may cause user confusion about spy state - throw new Error(methodName + ' has already been spied upon'); - } - - var spy = j$.createSpy(methodName, obj[methodName]); - - spies.push({ - spy: spy, - baseObj: obj, - methodName: methodName, - originalValue: obj[methodName] - }); - - obj[methodName] = spy; - - return spy; - }; - - var suiteFactory = function(description) { - var suite = new j$.Suite({ - env: self, - id: getNextSuiteId(), - description: description, - parentSuite: currentSuite, - queueRunner: queueRunnerFactory, - onStart: suiteStarted, - resultCallback: function(attrs) { - reporter.suiteDone(attrs); - } - }); - - runnableLookupTable[suite.id] = suite; - return suite; - }; - - this.describe = function(description, specDefinitions) { - var suite = suiteFactory(description); - - var parentSuite = currentSuite; - parentSuite.addChild(suite); - currentSuite = suite; - - var declarationError = null; - try { - specDefinitions.call(suite); - } catch (e) { - declarationError = e; - } - - if (declarationError) { - this.it("encountered a declaration exception", function() { - throw declarationError; - }); - } - - currentSuite = parentSuite; - - return suite; - }; - - this.xdescribe = function(description, specDefinitions) { - var suite = this.describe(description, specDefinitions); - suite.disable(); - return suite; - }; - - var specFactory = function(description, fn, suite) { - totalSpecsDefined++; - - var spec = new j$.Spec({ - id: getNextSpecId(), - beforeFns: beforeFns(suite), - afterFns: afterFns(suite), - expectationFactory: expectationFactory, - exceptionFormatter: exceptionFormatter, - resultCallback: specResultCallback, - getSpecName: function(spec) { - return getSpecName(spec, suite); - }, - onStart: specStarted, - description: description, - expectationResultFactory: expectationResultFactory, - queueRunnerFactory: queueRunnerFactory, - fn: fn, - timer: {setTimeout: realSetTimeout, clearTimeout: realClearTimeout} - }); - - runnableLookupTable[spec.id] = spec; - - if (!self.specFilter(spec)) { - spec.disable(); - } - - return spec; - - function removeAllSpies() { - for (var i = 0; i < spies.length; i++) { - var spyEntry = spies[i]; - spyEntry.baseObj[spyEntry.methodName] = spyEntry.originalValue; - } - spies = []; - } - - function specResultCallback(result) { - removeAllSpies(); - j$.Expectation.resetMatchers(); - customEqualityTesters = []; - currentSpec = null; - reporter.specDone(result); - } - }; - - var suiteStarted = function(suite) { - reporter.suiteStarted(suite.result); - }; - - this.it = function(description, fn) { - var spec = specFactory(description, fn, currentSuite); - currentSuite.addChild(spec); - return spec; - }; - - this.xit = function(description, fn) { - var spec = this.it(description, fn); - spec.pend(); - return spec; - }; - - this.expect = function(actual) { - return currentSpec.expect(actual); - }; - - this.beforeEach = function(beforeEachFunction) { - currentSuite.beforeEach(beforeEachFunction); - }; - - this.afterEach = function(afterEachFunction) { - currentSuite.afterEach(afterEachFunction); - }; - - this.pending = function() { - throw j$.Spec.pendingSpecExceptionMessage; - }; - } - - return Env; -}; - -getJasmineRequireObj().JsApiReporter = function() { - - var noopTimer = { - start: function(){}, - elapsed: function(){ return 0; } - }; - - function JsApiReporter(options) { - var timer = options.timer || noopTimer, - status = "loaded"; - - this.started = false; - this.finished = false; - - this.jasmineStarted = function() { - this.started = true; - status = 'started'; - timer.start(); - }; - - var executionTime; - - this.jasmineDone = function() { - this.finished = true; - executionTime = timer.elapsed(); - status = 'done'; - }; - - this.status = function() { - return status; - }; - - var suites = {}; - - this.suiteStarted = function(result) { - storeSuite(result); - }; - - this.suiteDone = function(result) { - storeSuite(result); - }; - - function storeSuite(result) { - suites[result.id] = result; - } - - this.suites = function() { - return suites; - }; - - var specs = []; - this.specStarted = function(result) { }; - - this.specDone = function(result) { - specs.push(result); - }; - - this.specResults = function(index, length) { - return specs.slice(index, index + length); - }; - - this.specs = function() { - return specs; - }; - - this.executionTime = function() { - return executionTime; - }; - - } - - return JsApiReporter; -}; - -getJasmineRequireObj().Any = function() { - - function Any(expectedObject) { - this.expectedObject = expectedObject; - } - - Any.prototype.jasmineMatches = function(other) { - if (this.expectedObject == String) { - return typeof other == 'string' || other instanceof String; - } - - if (this.expectedObject == Number) { - return typeof other == 'number' || other instanceof Number; - } - - if (this.expectedObject == Function) { - return typeof other == 'function' || other instanceof Function; - } - - if (this.expectedObject == Object) { - return typeof other == 'object'; - } - - if (this.expectedObject == Boolean) { - return typeof other == 'boolean'; - } - - return other instanceof this.expectedObject; - }; - - Any.prototype.jasmineToString = function() { - return ''; - }; - - return Any; -}; - -getJasmineRequireObj().CallTracker = function() { - - function CallTracker() { - var calls = []; - - this.track = function(context) { - calls.push(context); - }; - - this.any = function() { - return !!calls.length; - }; - - this.count = function() { - return calls.length; - }; - - this.argsFor = function(index) { - var call = calls[index]; - return call ? call.args : []; - }; - - this.all = function() { - return calls; - }; - - this.allArgs = function() { - var callArgs = []; - for(var i = 0; i < calls.length; i++){ - callArgs.push(calls[i].args); - } - - return callArgs; - }; - - this.first = function() { - return calls[0]; - }; - - this.mostRecent = function() { - return calls[calls.length - 1]; - }; - - this.reset = function() { - calls = []; - }; - } - - return CallTracker; -}; - -getJasmineRequireObj().Clock = function() { - function Clock(global, delayedFunctionScheduler) { - var self = this, - realTimingFunctions = { - setTimeout: global.setTimeout, - clearTimeout: global.clearTimeout, - setInterval: global.setInterval, - clearInterval: global.clearInterval - }, - fakeTimingFunctions = { - setTimeout: setTimeout, - clearTimeout: clearTimeout, - setInterval: setInterval, - clearInterval: clearInterval - }, - installed = false, - timer; - - self.install = function() { - replace(global, fakeTimingFunctions); - timer = fakeTimingFunctions; - installed = true; - }; - - self.uninstall = function() { - delayedFunctionScheduler.reset(); - replace(global, realTimingFunctions); - timer = realTimingFunctions; - installed = false; - }; - - self.setTimeout = function(fn, delay, params) { - if (legacyIE()) { - if (arguments.length > 2) { - throw new Error("IE < 9 cannot support extra params to setTimeout without a polyfill"); - } - return timer.setTimeout(fn, delay); - } - return Function.prototype.apply.apply(timer.setTimeout, [global, arguments]); - }; - - self.setInterval = function(fn, delay, params) { - if (legacyIE()) { - if (arguments.length > 2) { - throw new Error("IE < 9 cannot support extra params to setInterval without a polyfill"); - } - return timer.setInterval(fn, delay); - } - return Function.prototype.apply.apply(timer.setInterval, [global, arguments]); - }; - - self.clearTimeout = function(id) { - return Function.prototype.call.apply(timer.clearTimeout, [global, id]); - }; - - self.clearInterval = function(id) { - return Function.prototype.call.apply(timer.clearInterval, [global, id]); - }; - - self.tick = function(millis) { - if (installed) { - delayedFunctionScheduler.tick(millis); - } else { - throw new Error("Mock clock is not installed, use jasmine.clock().install()"); - } - }; - - return self; - - function legacyIE() { - //if these methods are polyfilled, apply will be present - return !(realTimingFunctions.setTimeout || realTimingFunctions.setInterval).apply; - } - - function replace(dest, source) { - for (var prop in source) { - dest[prop] = source[prop]; - } - } - - function setTimeout(fn, delay) { - return delayedFunctionScheduler.scheduleFunction(fn, delay, argSlice(arguments, 2)); - } - - function clearTimeout(id) { - return delayedFunctionScheduler.removeFunctionWithId(id); - } - - function setInterval(fn, interval) { - return delayedFunctionScheduler.scheduleFunction(fn, interval, argSlice(arguments, 2), true); - } - - function clearInterval(id) { - return delayedFunctionScheduler.removeFunctionWithId(id); - } - - function argSlice(argsObj, n) { - return Array.prototype.slice.call(argsObj, 2); - } - } - - return Clock; -}; - -getJasmineRequireObj().DelayedFunctionScheduler = function() { - function DelayedFunctionScheduler() { - var self = this; - var scheduledLookup = []; - var scheduledFunctions = {}; - var currentTime = 0; - var delayedFnCount = 0; - - self.tick = function(millis) { - millis = millis || 0; - var endTime = currentTime + millis; - - runScheduledFunctions(endTime); - currentTime = endTime; - }; - - self.scheduleFunction = function(funcToCall, millis, params, recurring, timeoutKey, runAtMillis) { - var f; - if (typeof(funcToCall) === 'string') { - /* jshint evil: true */ - f = function() { return eval(funcToCall); }; - /* jshint evil: false */ - } else { - f = funcToCall; - } - - millis = millis || 0; - timeoutKey = timeoutKey || ++delayedFnCount; - runAtMillis = runAtMillis || (currentTime + millis); - - var funcToSchedule = { - runAtMillis: runAtMillis, - funcToCall: f, - recurring: recurring, - params: params, - timeoutKey: timeoutKey, - millis: millis - }; - - if (runAtMillis in scheduledFunctions) { - scheduledFunctions[runAtMillis].push(funcToSchedule); - } else { - scheduledFunctions[runAtMillis] = [funcToSchedule]; - scheduledLookup.push(runAtMillis); - scheduledLookup.sort(function (a, b) { - return a - b; - }); - } - - return timeoutKey; - }; - - self.removeFunctionWithId = function(timeoutKey) { - for (var runAtMillis in scheduledFunctions) { - var funcs = scheduledFunctions[runAtMillis]; - var i = indexOfFirstToPass(funcs, function (func) { - return func.timeoutKey === timeoutKey; - }); - - if (i > -1) { - if (funcs.length === 1) { - delete scheduledFunctions[runAtMillis]; - deleteFromLookup(runAtMillis); - } else { - funcs.splice(i, 1); - } - - // intervals get rescheduled when executed, so there's never more - // than a single scheduled function with a given timeoutKey - break; - } - } - }; - - self.reset = function() { - currentTime = 0; - scheduledLookup = []; - scheduledFunctions = {}; - delayedFnCount = 0; - }; - - return self; - - function indexOfFirstToPass(array, testFn) { - var index = -1; - - for (var i = 0; i < array.length; ++i) { - if (testFn(array[i])) { - index = i; - break; - } - } - - return index; - } - - function deleteFromLookup(key) { - var value = Number(key); - var i = indexOfFirstToPass(scheduledLookup, function (millis) { - return millis === value; - }); - - if (i > -1) { - scheduledLookup.splice(i, 1); - } - } - - function reschedule(scheduledFn) { - self.scheduleFunction(scheduledFn.funcToCall, - scheduledFn.millis, - scheduledFn.params, - true, - scheduledFn.timeoutKey, - scheduledFn.runAtMillis + scheduledFn.millis); - } - - function runScheduledFunctions(endTime) { - if (scheduledLookup.length === 0 || scheduledLookup[0] > endTime) { - return; - } - - do { - currentTime = scheduledLookup.shift(); - - var funcsToRun = scheduledFunctions[currentTime]; - delete scheduledFunctions[currentTime]; - - for (var i = 0; i < funcsToRun.length; ++i) { - var funcToRun = funcsToRun[i]; - funcToRun.funcToCall.apply(null, funcToRun.params || []); - - if (funcToRun.recurring) { - reschedule(funcToRun); - } - } - } while (scheduledLookup.length > 0 && - // checking first if we're out of time prevents setTimeout(0) - // scheduled in a funcToRun from forcing an extra iteration - currentTime !== endTime && - scheduledLookup[0] <= endTime); - } - } - - return DelayedFunctionScheduler; -}; - -getJasmineRequireObj().ExceptionFormatter = function() { - function ExceptionFormatter() { - this.message = function(error) { - var message = error.name + - ': ' + - error.message; - - if (error.fileName || error.sourceURL) { - message += " in " + (error.fileName || error.sourceURL); - } - - if (error.line || error.lineNumber) { - message += " (line " + (error.line || error.lineNumber) + ")"; - } - - return message; - }; - - this.stack = function(error) { - return error ? error.stack : null; - }; - } - - return ExceptionFormatter; -}; - -getJasmineRequireObj().Expectation = function() { - - var matchers = {}; - - function Expectation(options) { - this.util = options.util || { buildFailureMessage: function() {} }; - this.customEqualityTesters = options.customEqualityTesters || []; - this.actual = options.actual; - this.addExpectationResult = options.addExpectationResult || function(){}; - this.isNot = options.isNot; - - for (var matcherName in matchers) { - this[matcherName] = matchers[matcherName]; - } - } - - Expectation.prototype.wrapCompare = function(name, matcherFactory) { - return function() { - var args = Array.prototype.slice.call(arguments, 0), - expected = args.slice(0), - message = ""; - - args.unshift(this.actual); - - var matcher = matcherFactory(this.util, this.customEqualityTesters), - matcherCompare = matcher.compare; - - function defaultNegativeCompare() { - var result = matcher.compare.apply(null, args); - result.pass = !result.pass; - return result; - } - - if (this.isNot) { - matcherCompare = matcher.negativeCompare || defaultNegativeCompare; - } - - var result = matcherCompare.apply(null, args); - - if (!result.pass) { - if (!result.message) { - args.unshift(this.isNot); - args.unshift(name); - message = this.util.buildFailureMessage.apply(null, args); - } else { - message = result.message; - } - } - - if (expected.length == 1) { - expected = expected[0]; - } - - // TODO: how many of these params are needed? - this.addExpectationResult( - result.pass, - { - matcherName: name, - passed: result.pass, - message: message, - actual: this.actual, - expected: expected // TODO: this may need to be arrayified/sliced - } - ); - }; - }; - - Expectation.addCoreMatchers = function(matchers) { - var prototype = Expectation.prototype; - for (var matcherName in matchers) { - var matcher = matchers[matcherName]; - prototype[matcherName] = prototype.wrapCompare(matcherName, matcher); - } - }; - - Expectation.addMatchers = function(matchersToAdd) { - for (var name in matchersToAdd) { - var matcher = matchersToAdd[name]; - matchers[name] = Expectation.prototype.wrapCompare(name, matcher); - } - }; - - Expectation.resetMatchers = function() { - for (var name in matchers) { - delete matchers[name]; - } - }; - - Expectation.Factory = function(options) { - options = options || {}; - - var expect = new Expectation(options); - - // TODO: this would be nice as its own Object - NegativeExpectation - // TODO: copy instead of mutate options - options.isNot = true; - expect.not = new Expectation(options); - - return expect; - }; - - return Expectation; -}; - -//TODO: expectation result may make more sense as a presentation of an expectation. -getJasmineRequireObj().buildExpectationResult = function() { - function buildExpectationResult(options) { - var messageFormatter = options.messageFormatter || function() {}, - stackFormatter = options.stackFormatter || function() {}; - - return { - matcherName: options.matcherName, - expected: options.expected, - actual: options.actual, - message: message(), - stack: stack(), - passed: options.passed - }; - - function message() { - if (options.passed) { - return "Passed."; - } else if (options.message) { - return options.message; - } else if (options.error) { - return messageFormatter(options.error); - } - return ""; - } - - function stack() { - if (options.passed) { - return ""; - } - - var error = options.error; - if (!error) { - try { - throw new Error(message()); - } catch (e) { - error = e; - } - } - return stackFormatter(error); - } - } - - return buildExpectationResult; -}; - -getJasmineRequireObj().ObjectContaining = function(j$) { - - function ObjectContaining(sample) { - this.sample = sample; - } - - ObjectContaining.prototype.jasmineMatches = function(other, mismatchKeys, mismatchValues) { - if (typeof(this.sample) !== "object") { throw new Error("You must provide an object to objectContaining, not '"+this.sample+"'."); } - - mismatchKeys = mismatchKeys || []; - mismatchValues = mismatchValues || []; - - var hasKey = function(obj, keyName) { - return obj !== null && !j$.util.isUndefined(obj[keyName]); - }; - - for (var property in this.sample) { - if (!hasKey(other, property) && hasKey(this.sample, property)) { - mismatchKeys.push("expected has key '" + property + "', but missing from actual."); - } - else if (!j$.matchersUtil.equals(this.sample[property], other[property])) { - mismatchValues.push("'" + property + "' was '" + (other[property] ? j$.util.htmlEscape(other[property].toString()) : other[property]) + "' in actual, but was '" + (this.sample[property] ? j$.util.htmlEscape(this.sample[property].toString()) : this.sample[property]) + "' in expected."); - } - } - - return (mismatchKeys.length === 0 && mismatchValues.length === 0); - }; - - ObjectContaining.prototype.jasmineToString = function() { - return ""; - }; - - return ObjectContaining; -}; - -getJasmineRequireObj().pp = function(j$) { - - function PrettyPrinter() { - this.ppNestLevel_ = 0; - } - - PrettyPrinter.prototype.format = function(value) { - this.ppNestLevel_++; - try { - if (j$.util.isUndefined(value)) { - this.emitScalar('undefined'); - } else if (value === null) { - this.emitScalar('null'); - } else if (value === j$.getGlobal()) { - this.emitScalar(''); - } else if (value.jasmineToString) { - this.emitScalar(value.jasmineToString()); - } else if (typeof value === 'string') { - this.emitString(value); - } else if (j$.isSpy(value)) { - this.emitScalar("spy on " + value.and.identity()); - } else if (value instanceof RegExp) { - this.emitScalar(value.toString()); - } else if (typeof value === 'function') { - this.emitScalar('Function'); - } else if (typeof value.nodeType === 'number') { - this.emitScalar('HTMLNode'); - } else if (value instanceof Date) { - this.emitScalar('Date(' + value + ')'); - } else if (value.__Jasmine_been_here_before__) { - this.emitScalar(''); - } else if (j$.isArray_(value) || j$.isA_('Object', value)) { - value.__Jasmine_been_here_before__ = true; - if (j$.isArray_(value)) { - this.emitArray(value); - } else { - this.emitObject(value); - } - delete value.__Jasmine_been_here_before__; - } else { - this.emitScalar(value.toString()); - } - } finally { - this.ppNestLevel_--; - } - }; - - PrettyPrinter.prototype.iterateObject = function(obj, fn) { - for (var property in obj) { - if (!obj.hasOwnProperty(property)) { continue; } - if (property == '__Jasmine_been_here_before__') { continue; } - fn(property, obj.__lookupGetter__ ? (!j$.util.isUndefined(obj.__lookupGetter__(property)) && - obj.__lookupGetter__(property) !== null) : false); - } - }; - - PrettyPrinter.prototype.emitArray = j$.unimplementedMethod_; - PrettyPrinter.prototype.emitObject = j$.unimplementedMethod_; - PrettyPrinter.prototype.emitScalar = j$.unimplementedMethod_; - PrettyPrinter.prototype.emitString = j$.unimplementedMethod_; - - function StringPrettyPrinter() { - PrettyPrinter.call(this); - - this.string = ''; - } - - j$.util.inherit(StringPrettyPrinter, PrettyPrinter); - - StringPrettyPrinter.prototype.emitScalar = function(value) { - this.append(value); - }; - - StringPrettyPrinter.prototype.emitString = function(value) { - this.append("'" + value + "'"); - }; - - StringPrettyPrinter.prototype.emitArray = function(array) { - if (this.ppNestLevel_ > j$.MAX_PRETTY_PRINT_DEPTH) { - this.append("Array"); - return; - } - - this.append('[ '); - for (var i = 0; i < array.length; i++) { - if (i > 0) { - this.append(', '); - } - this.format(array[i]); - } - this.append(' ]'); - }; - - StringPrettyPrinter.prototype.emitObject = function(obj) { - if (this.ppNestLevel_ > j$.MAX_PRETTY_PRINT_DEPTH) { - this.append("Object"); - return; - } - - var self = this; - this.append('{ '); - var first = true; - - this.iterateObject(obj, function(property, isGetter) { - if (first) { - first = false; - } else { - self.append(', '); - } - - self.append(property); - self.append(' : '); - if (isGetter) { - self.append(''); - } else { - self.format(obj[property]); - } - }); - - this.append(' }'); - }; - - StringPrettyPrinter.prototype.append = function(value) { - this.string += value; - }; - - return function(value) { - var stringPrettyPrinter = new StringPrettyPrinter(); - stringPrettyPrinter.format(value); - return stringPrettyPrinter.string; - }; -}; - -getJasmineRequireObj().QueueRunner = function() { - - function QueueRunner(attrs) { - this.fns = attrs.fns || []; - this.onComplete = attrs.onComplete || function() {}; - this.clearStack = attrs.clearStack || function(fn) {fn();}; - this.onException = attrs.onException || function() {}; - this.catchException = attrs.catchException || function() { return true; }; - this.userContext = {}; - } - - QueueRunner.prototype.execute = function() { - this.run(this.fns, 0); - }; - - QueueRunner.prototype.run = function(fns, recursiveIndex) { - var length = fns.length, - self = this, - iterativeIndex; - - for(iterativeIndex = recursiveIndex; iterativeIndex < length; iterativeIndex++) { - var fn = fns[iterativeIndex]; - if (fn.length > 0) { - return attemptAsync(fn); - } else { - attemptSync(fn); - } - } - - var runnerDone = iterativeIndex >= length; - - if (runnerDone) { - this.clearStack(this.onComplete); - } - - function attemptSync(fn) { - try { - fn.call(self.userContext); - } catch (e) { - handleException(e); - } - } - - function attemptAsync(fn) { - var next = function () { self.run(fns, iterativeIndex + 1); }; - - try { - fn.call(self.userContext, next); - } catch (e) { - handleException(e); - next(); - } - } - - function handleException(e) { - self.onException(e); - if (!self.catchException(e)) { - //TODO: set a var when we catch an exception and - //use a finally block to close the loop in a nice way.. - throw e; - } - } - }; - - return QueueRunner; -}; - -getJasmineRequireObj().ReportDispatcher = function() { - function ReportDispatcher(methods) { - - var dispatchedMethods = methods || []; - - for (var i = 0; i < dispatchedMethods.length; i++) { - var method = dispatchedMethods[i]; - this[method] = (function(m) { - return function() { - dispatch(m, arguments); - }; - }(method)); - } - - var reporters = []; - - this.addReporter = function(reporter) { - reporters.push(reporter); - }; - - return this; - - function dispatch(method, args) { - for (var i = 0; i < reporters.length; i++) { - var reporter = reporters[i]; - if (reporter[method]) { - reporter[method].apply(reporter, args); - } - } - } - } - - return ReportDispatcher; -}; - - -getJasmineRequireObj().SpyStrategy = function() { - - function SpyStrategy(options) { - options = options || {}; - - var identity = options.name || "unknown", - originalFn = options.fn || function() {}, - getSpy = options.getSpy || function() {}, - plan = function() {}; - - this.identity = function() { - return identity; - }; - - this.exec = function() { - return plan.apply(this, arguments); - }; - - this.callThrough = function() { - plan = originalFn; - return getSpy(); - }; - - this.returnValue = function(value) { - plan = function() { - return value; - }; - return getSpy(); - }; - - this.throwError = function(something) { - var error = (something instanceof Error) ? something : new Error(something); - plan = function() { - throw error; - }; - return getSpy(); - }; - - this.callFake = function(fn) { - plan = fn; - return getSpy(); - }; - - this.stub = function(fn) { - plan = function() {}; - return getSpy(); - }; - } - - return SpyStrategy; -}; - -getJasmineRequireObj().Suite = function() { - function Suite(attrs) { - this.env = attrs.env; - this.id = attrs.id; - this.parentSuite = attrs.parentSuite; - this.description = attrs.description; - this.onStart = attrs.onStart || function() {}; - this.resultCallback = attrs.resultCallback || function() {}; - this.clearStack = attrs.clearStack || function(fn) {fn();}; - - this.beforeFns = []; - this.afterFns = []; - this.queueRunner = attrs.queueRunner || function() {}; - this.disabled = false; - - this.children = []; - - this.result = { - id: this.id, - status: this.disabled ? 'disabled' : '', - description: this.description, - fullName: this.getFullName() - }; - } - - Suite.prototype.getFullName = function() { - var fullName = this.description; - for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) { - if (parentSuite.parentSuite) { - fullName = parentSuite.description + ' ' + fullName; - } - } - return fullName; - }; - - Suite.prototype.disable = function() { - this.disabled = true; - }; - - Suite.prototype.beforeEach = function(fn) { - this.beforeFns.unshift(fn); - }; - - Suite.prototype.afterEach = function(fn) { - this.afterFns.unshift(fn); - }; - - Suite.prototype.addChild = function(child) { - this.children.push(child); - }; - - Suite.prototype.execute = function(onComplete) { - var self = this; - if (this.disabled) { - complete(); - return; - } - - var allFns = []; - - for (var i = 0; i < this.children.length; i++) { - allFns.push(wrapChildAsAsync(this.children[i])); - } - - this.onStart(this); - - this.queueRunner({ - fns: allFns, - onComplete: complete - }); - - function complete() { - self.resultCallback(self.result); - - if (onComplete) { - onComplete(); - } - } - - function wrapChildAsAsync(child) { - return function(done) { child.execute(done); }; - } - }; - - return Suite; -}; - -if (typeof window == void 0 && typeof exports == "object") { - exports.Suite = jasmineRequire.Suite; -} - -getJasmineRequireObj().Timer = function() { - function Timer(options) { - options = options || {}; - - var now = options.now || function() { return new Date().getTime(); }, - startTime; - - this.start = function() { - startTime = now(); - }; - - this.elapsed = function() { - return now() - startTime; - }; - } - - return Timer; -}; - -getJasmineRequireObj().matchersUtil = function(j$) { - // TODO: what to do about jasmine.pp not being inject? move to JSON.stringify? gut PrettyPrinter? - - return { - equals: function(a, b, customTesters) { - customTesters = customTesters || []; - - return eq(a, b, [], [], customTesters); - }, - - contains: function(haystack, needle, customTesters) { - customTesters = customTesters || []; - - if (Object.prototype.toString.apply(haystack) === "[object Array]") { - for (var i = 0; i < haystack.length; i++) { - if (eq(haystack[i], needle, [], [], customTesters)) { - return true; - } - } - return false; - } - return haystack.indexOf(needle) >= 0; - }, - - buildFailureMessage: function() { - var args = Array.prototype.slice.call(arguments, 0), - matcherName = args[0], - isNot = args[1], - actual = args[2], - expected = args.slice(3), - englishyPredicate = matcherName.replace(/[A-Z]/g, function(s) { return ' ' + s.toLowerCase(); }); - - var message = "Expected " + - j$.pp(actual) + - (isNot ? " not " : " ") + - englishyPredicate; - - if (expected.length > 0) { - for (var i = 0; i < expected.length; i++) { - if (i > 0) { - message += ","; - } - message += " " + j$.pp(expected[i]); - } - } - - return message + "."; - } - }; - - // Equality function lovingly adapted from isEqual in - // [Underscore](http://underscorejs.org) - function eq(a, b, aStack, bStack, customTesters) { - var result = true; - - for (var i = 0; i < customTesters.length; i++) { - var customTesterResult = customTesters[i](a, b); - if (!j$.util.isUndefined(customTesterResult)) { - return customTesterResult; - } - } - - if (a instanceof j$.Any) { - result = a.jasmineMatches(b); - if (result) { - return true; - } - } - - if (b instanceof j$.Any) { - result = b.jasmineMatches(a); - if (result) { - return true; - } - } - - if (b instanceof j$.ObjectContaining) { - result = b.jasmineMatches(a); - if (result) { - return true; - } - } - - if (a instanceof Error && b instanceof Error) { - return a.message == b.message; - } - - // Identical objects are equal. `0 === -0`, but they aren't identical. - // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). - if (a === b) { return a !== 0 || 1 / a == 1 / b; } - // A strict comparison is necessary because `null == undefined`. - if (a === null || b === null) { return a === b; } - var className = Object.prototype.toString.call(a); - if (className != Object.prototype.toString.call(b)) { return false; } - switch (className) { - // Strings, numbers, dates, and booleans are compared by value. - case '[object String]': - // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is - // equivalent to `new String("5")`. - return a == String(b); - case '[object Number]': - // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for - // other numeric values. - return a != +a ? b != +b : (a === 0 ? 1 / a == 1 / b : a == +b); - case '[object Date]': - case '[object Boolean]': - // Coerce dates and booleans to numeric primitive values. Dates are compared by their - // millisecond representations. Note that invalid dates with millisecond representations - // of `NaN` are not equivalent. - return +a == +b; - // RegExps are compared by their source patterns and flags. - case '[object RegExp]': - return a.source == b.source && - a.global == b.global && - a.multiline == b.multiline && - a.ignoreCase == b.ignoreCase; - } - if (typeof a != 'object' || typeof b != 'object') { return false; } - // Assume equality for cyclic structures. The algorithm for detecting cyclic - // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. - var length = aStack.length; - while (length--) { - // Linear search. Performance is inversely proportional to the number of - // unique nested structures. - if (aStack[length] == a) { return bStack[length] == b; } - } - // Add the first object to the stack of traversed objects. - aStack.push(a); - bStack.push(b); - var size = 0; - // Recursively compare objects and arrays. - if (className == '[object Array]') { - // Compare array lengths to determine if a deep comparison is necessary. - size = a.length; - result = size == b.length; - if (result) { - // Deep compare the contents, ignoring non-numeric properties. - while (size--) { - if (!(result = eq(a[size], b[size], aStack, bStack, customTesters))) { break; } - } - } - } else { - // Objects with different constructors are not equivalent, but `Object`s - // from different frames are. - var aCtor = a.constructor, bCtor = b.constructor; - if (aCtor !== bCtor && !(isFunction(aCtor) && (aCtor instanceof aCtor) && - isFunction(bCtor) && (bCtor instanceof bCtor))) { - return false; - } - // Deep compare objects. - for (var key in a) { - if (has(a, key)) { - // Count the expected number of properties. - size++; - // Deep compare each member. - if (!(result = has(b, key) && eq(a[key], b[key], aStack, bStack, customTesters))) { break; } - } - } - // Ensure that both objects contain the same number of properties. - if (result) { - for (key in b) { - if (has(b, key) && !(size--)) { break; } - } - result = !size; - } - } - // Remove the first object from the stack of traversed objects. - aStack.pop(); - bStack.pop(); - - return result; - - function has(obj, key) { - return obj.hasOwnProperty(key); - } - - function isFunction(obj) { - return typeof obj === 'function'; - } - } -}; - -getJasmineRequireObj().toBe = function() { - function toBe() { - return { - compare: function(actual, expected) { - return { - pass: actual === expected - }; - } - }; - } - - return toBe; -}; - -getJasmineRequireObj().toBeCloseTo = function() { - - function toBeCloseTo() { - return { - compare: function(actual, expected, precision) { - if (precision !== 0) { - precision = precision || 2; - } - - return { - pass: Math.abs(expected - actual) < (Math.pow(10, -precision) / 2) - }; - } - }; - } - - return toBeCloseTo; -}; - -getJasmineRequireObj().toBeDefined = function() { - function toBeDefined() { - return { - compare: function(actual) { - return { - pass: (void 0 !== actual) - }; - } - }; - } - - return toBeDefined; -}; - -getJasmineRequireObj().toBeFalsy = function() { - function toBeFalsy() { - return { - compare: function(actual) { - return { - pass: !!!actual - }; - } - }; - } - - return toBeFalsy; -}; - -getJasmineRequireObj().toBeGreaterThan = function() { - - function toBeGreaterThan() { - return { - compare: function(actual, expected) { - return { - pass: actual > expected - }; - } - }; - } - - return toBeGreaterThan; -}; - - -getJasmineRequireObj().toBeLessThan = function() { - function toBeLessThan() { - return { - - compare: function(actual, expected) { - return { - pass: actual < expected - }; - } - }; - } - - return toBeLessThan; -}; -getJasmineRequireObj().toBeNaN = function(j$) { - - function toBeNaN() { - return { - compare: function(actual) { - var result = { - pass: (actual !== actual) - }; - - if (result.pass) { - result.message = "Expected actual not to be NaN."; - } else { - result.message = "Expected " + j$.pp(actual) + " to be NaN."; - } - - return result; - } - }; - } - - return toBeNaN; -}; - -getJasmineRequireObj().toBeNull = function() { - - function toBeNull() { - return { - compare: function(actual) { - return { - pass: actual === null - }; - } - }; - } - - return toBeNull; -}; - -getJasmineRequireObj().toBeTruthy = function() { - - function toBeTruthy() { - return { - compare: function(actual) { - return { - pass: !!actual - }; - } - }; - } - - return toBeTruthy; -}; - -getJasmineRequireObj().toBeUndefined = function() { - - function toBeUndefined() { - return { - compare: function(actual) { - return { - pass: void 0 === actual - }; - } - }; - } - - return toBeUndefined; -}; - -getJasmineRequireObj().toContain = function() { - function toContain(util, customEqualityTesters) { - customEqualityTesters = customEqualityTesters || []; - - return { - compare: function(actual, expected) { - - return { - pass: util.contains(actual, expected, customEqualityTesters) - }; - } - }; - } - - return toContain; -}; - -getJasmineRequireObj().toEqual = function() { - - function toEqual(util, customEqualityTesters) { - customEqualityTesters = customEqualityTesters || []; - - return { - compare: function(actual, expected) { - var result = { - pass: false - }; - - result.pass = util.equals(actual, expected, customEqualityTesters); - - return result; - } - }; - } - - return toEqual; -}; - -getJasmineRequireObj().toHaveBeenCalled = function(j$) { - - function toHaveBeenCalled() { - return { - compare: function(actual) { - var result = {}; - - if (!j$.isSpy(actual)) { - throw new Error('Expected a spy, but got ' + j$.pp(actual) + '.'); - } - - if (arguments.length > 1) { - throw new Error('toHaveBeenCalled does not take arguments, use toHaveBeenCalledWith'); - } - - result.pass = actual.calls.any(); - - result.message = result.pass ? - "Expected spy " + actual.and.identity() + " not to have been called." : - "Expected spy " + actual.and.identity() + " to have been called."; - - return result; - } - }; - } - - return toHaveBeenCalled; -}; - -getJasmineRequireObj().toHaveBeenCalledWith = function(j$) { - - function toHaveBeenCalledWith(util) { - return { - compare: function() { - var args = Array.prototype.slice.call(arguments, 0), - actual = args[0], - expectedArgs = args.slice(1), - result = { pass: false }; - - if (!j$.isSpy(actual)) { - throw new Error('Expected a spy, but got ' + j$.pp(actual) + '.'); - } - - if (!actual.calls.any()) { - result.message = "Expected spy " + actual.and.identity() + " to have been called with " + j$.pp(expectedArgs) + " but it was never called."; - return result; - } - - if (util.contains(actual.calls.allArgs(), expectedArgs)) { - result.pass = true; - result.message = "Expected spy " + actual.and.identity() + " not to have been called with " + j$.pp(expectedArgs) + " but it was."; - } else { - result.message = "Expected spy " + actual.and.identity() + " to have been called with " + j$.pp(expectedArgs) + " but actual calls were " + j$.pp(actual.calls.allArgs()).replace(/^\[ | \]$/g, '') + "."; - } - - return result; - } - }; - } - - return toHaveBeenCalledWith; -}; - -getJasmineRequireObj().toMatch = function() { - - function toMatch() { - return { - compare: function(actual, expected) { - var regexp = new RegExp(expected); - - return { - pass: regexp.test(actual) - }; - } - }; - } - - return toMatch; -}; - -getJasmineRequireObj().toThrow = function(j$) { - - function toThrow(util) { - return { - compare: function(actual, expected) { - var result = { pass: false }, - threw = false, - thrown; - - if (typeof actual != "function") { - throw new Error("Actual is not a Function"); - } - - try { - actual(); - } catch (e) { - threw = true; - thrown = e; - } - - if (!threw) { - result.message = "Expected function to throw an exception."; - return result; - } - - if (arguments.length == 1) { - result.pass = true; - result.message = "Expected function not to throw, but it threw " + j$.pp(thrown) + "."; - - return result; - } - - if (util.equals(thrown, expected)) { - result.pass = true; - result.message = "Expected function not to throw " + j$.pp(expected) + "."; - } else { - result.message = "Expected function to throw " + j$.pp(expected) + ", but it threw " + j$.pp(thrown) + "."; - } - - return result; - } - }; - } - - return toThrow; -}; - -getJasmineRequireObj().toThrowError = function(j$) { - function toThrowError (util) { - return { - compare: function(actual) { - var threw = false, - thrown, - errorType, - message, - regexp, - name, - constructorName; - - if (typeof actual != "function") { - throw new Error("Actual is not a Function"); - } - - extractExpectedParams.apply(null, arguments); - - try { - actual(); - } catch (e) { - threw = true; - thrown = e; - } - - if (!threw) { - return fail("Expected function to throw an Error."); - } - - if (!(thrown instanceof Error)) { - return fail("Expected function to throw an Error, but it threw " + thrown + "."); - } - - if (arguments.length == 1) { - return pass("Expected function not to throw an Error, but it threw " + fnNameFor(thrown) + "."); - } - - if (errorType) { - name = fnNameFor(errorType); - constructorName = fnNameFor(thrown.constructor); - } - - if (errorType && message) { - if (thrown.constructor == errorType && util.equals(thrown.message, message)) { - return pass("Expected function not to throw " + name + " with message \"" + message + "\"."); - } else { - return fail("Expected function to throw " + name + " with message \"" + message + - "\", but it threw " + constructorName + " with message \"" + thrown.message + "\"."); - } - } - - if (errorType && regexp) { - if (thrown.constructor == errorType && regexp.test(thrown.message)) { - return pass("Expected function not to throw " + name + " with message matching " + regexp + "."); - } else { - return fail("Expected function to throw " + name + " with message matching " + regexp + - ", but it threw " + constructorName + " with message \"" + thrown.message + "\"."); - } - } - - if (errorType) { - if (thrown.constructor == errorType) { - return pass("Expected function not to throw " + name + "."); - } else { - return fail("Expected function to throw " + name + ", but it threw " + constructorName + "."); - } - } - - if (message) { - if (thrown.message == message) { - return pass("Expected function not to throw an exception with message " + j$.pp(message) + "."); - } else { - return fail("Expected function to throw an exception with message " + j$.pp(message) + - ", but it threw an exception with message " + j$.pp(thrown.message) + "."); - } - } - - if (regexp) { - if (regexp.test(thrown.message)) { - return pass("Expected function not to throw an exception with a message matching " + j$.pp(regexp) + "."); - } else { - return fail("Expected function to throw an exception with a message matching " + j$.pp(regexp) + - ", but it threw an exception with message " + j$.pp(thrown.message) + "."); - } - } - - function fnNameFor(func) { - return func.name || func.toString().match(/^\s*function\s*(\w*)\s*\(/)[1]; - } - - function pass(notMessage) { - return { - pass: true, - message: notMessage - }; - } - - function fail(message) { - return { - pass: false, - message: message - }; - } - - function extractExpectedParams() { - if (arguments.length == 1) { - return; - } - - if (arguments.length == 2) { - var expected = arguments[1]; - - if (expected instanceof RegExp) { - regexp = expected; - } else if (typeof expected == "string") { - message = expected; - } else if (checkForAnErrorType(expected)) { - errorType = expected; - } - - if (!(errorType || message || regexp)) { - throw new Error("Expected is not an Error, string, or RegExp."); - } - } else { - if (checkForAnErrorType(arguments[1])) { - errorType = arguments[1]; - } else { - throw new Error("Expected error type is not an Error."); - } - - if (arguments[2] instanceof RegExp) { - regexp = arguments[2]; - } else if (typeof arguments[2] == "string") { - message = arguments[2]; - } else { - throw new Error("Expected error message is not a string or RegExp."); - } - } - } - - function checkForAnErrorType(type) { - if (typeof type !== "function") { - return false; - } - - var Surrogate = function() {}; - Surrogate.prototype = type.prototype; - return (new Surrogate()) instanceof Error; - } - } - }; - } - - return toThrowError; -}; - -getJasmineRequireObj().version = function() { - return "2.0.0"; -}; diff --git a/node_modules/yamljs/test/lib/jasmine-2.0.0/jasmine_favicon.png b/node_modules/yamljs/test/lib/jasmine-2.0.0/jasmine_favicon.png deleted file mode 100755 index 3562e278f108d0f6a918d198f21e055e601c7e71..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2057 zcmV+k2=@1hP)&ijKvfTC%$Wid1aFR2$ii+A1Wx?rx%@ z&1NNpLfWZ1g6QrB21_kem?Ba;0|mzpS}7H&g-YZnkRK=6?7O$$ecAi=Wg&q(^Y)(K zd(J)Q+;i`el#*S{2tOPiRoYFrGh&sD(R7k*sw7qlU9~_bzQZKtej(Y8DaO^i{0YBx zG3!ESWCvpN8mF*~^%OCB2n&wAm_;G;1?1QEc|9wiUjMXmZrCxb1K~i}TPpZ6?D&_^ zE*y4+kr}5YqouXUy0ycJo!5b;s>Z1X7ww46j66k4lKd-4+6~@8D0jj^j&C9fnkG5j z%A~vwI+Ulk#ZxFAs99%r<Qy@CSV`29g zvVeMmZ`A$MrNf$h;R;UlDokAO(20Fm$i&T$Cd?j9vlmcE%j}jy7~crcF^)p|RVZ11 zU%qiA&n4R`INPH>W{EaMbB`xd<|kbwXQBqyJ9NpW_cQ*Ag9C6Ju!=fO;3|KEgP0ji z)`b-kt7^P4?vFg1%z`J*qYRG0}f-F>a~5NhU4M@h1(m@oRE#%%}UzHm7_eL@p4 zZwe*qBN{K1{1EsHVu6NxHEp=LIS_dSJ>srWY3rDhF-=pPEwO%#viwl%aAGUk?hTJo z_+SKxegW8<6*%J|&*Cg>PmgVU<`foq5CzlLQWY+9^W3n?JCpPRXJT&kTjp1qXTEIq zNx>clZZ{`Y;5}Zhij?uyfp9T)_kb2g-eWb1XHLK%g~MSdMTp3|lF7CV=dUFLNkhx) zS=A8d{0-=tOH$@PG+oQqrs_YyNpey_#OzIa(#*IMbzGcPNE>9VQE-z#`mNFfd~?hn z*+@j~WvpU%_emKkoycA|%nldpaA`y7(Or|dkUK-E<*RaSn^$4&JL5kJR|GeiXC(1f zVq$()XIir_dJRV_uGEXb`(5_#LEwVO2Kt9-`ZQ;h7G zqk-%^2^!T{blcbo{I}>0KZKLlGvYT4q`gaeN6`*!CJEWO_)6Tmg3;hw$f4?@nul7r z&I9D@If6W>V7o5J*hfrG2C8nnAp?ru;9y5{x*B#~I7BFibdZq$(I|YdZP+-MQ}ywYVUCG z0U>cK(4ZzDscPViUI@FKs9`m?1fIJj=8OCk;r&y;LG9#m+3t$Q(hz9z*9`)9i1!qiu0pftFJEZ@$WPPVR=m5jv9Z-7rg3{7vVKRiDi3GKlM2QBvw-E zOY@(-RMXJXZv%|BpB<8|RuF1{;n6E&n7S2=F9u=%CrdhuGI~TmWN;UZLkDy=37JDh6DGf|WNinY+-QD@5Sv+L9CiBM zVBZG?D+QDFzeZW!1Z;CxiFiuOxo36nGhr+QZHo|mdTnyK-K^BbBt1NZC|=>n6FpwN zw%Sga^CnbRZ|O&T8w}3Uf|9Y{ca!*;df8~2d&W6`1qJ+mFj3#;rfXR3+&0db3co$D zpH?{cbB)^(P>9-rH{+QL2mYm*2A4|1)Y1G+xf6*p7uN^kSGTD6f~2w}ev5{_dg=0aX->Kcd_4M$=;9?x? zYV20E-3tyly%$2OyHAL9=3mUrND3Epz^&XIh<*dF+e%ze-^BTxirwLSODTw*L>`Xd nulYW~`SvFhb)UKQMuPtji`gObi$ZJx00000NkvXXu0mjf%0~0J diff --git a/node_modules/yamljs/test/spec/YamlSpec.coffee b/node_modules/yamljs/test/spec/YamlSpec.coffee deleted file mode 100644 index a565f9d..0000000 --- a/node_modules/yamljs/test/spec/YamlSpec.coffee +++ /dev/null @@ -1,1474 +0,0 @@ - -unless YAML? - YAML = require '../../src/Yaml' - - -# Parsing -# - -describe 'Parsed YAML Collections', -> - - it 'can be simple sequence', -> - - expect YAML.parse """ - - apple - - banana - - carrot - """ - .toEqual ['apple', 'banana', 'carrot'] - - - it 'can be nested sequences', -> - - expect YAML.parse """ - - - - foo - - bar - - baz - """ - .toEqual [['foo', 'bar', 'baz']] - - - it 'can be mixed sequences', -> - - expect YAML.parse """ - - apple - - - - foo - - bar - - x123 - - banana - - carrot - """ - .toEqual ['apple', ['foo', 'bar', 'x123'], 'banana', 'carrot'] - - - it 'can be deeply nested sequences', -> - - expect YAML.parse """ - - - - - - uno - - dos - """ - .toEqual [[['uno', 'dos']]] - - - it 'can be simple mapping', -> - - expect YAML.parse """ - foo: whatever - bar: stuff - """ - .toEqual foo: 'whatever', bar: 'stuff' - - - it 'can be sequence in a mapping', -> - - expect YAML.parse """ - foo: whatever - bar: - - uno - - dos - """ - .toEqual foo: 'whatever', bar: ['uno', 'dos'] - - - it 'can be nested mappings', -> - - expect YAML.parse """ - foo: whatever - bar: - fruit: apple - name: steve - sport: baseball - """ - .toEqual foo: 'whatever', bar: (fruit: 'apple', name: 'steve', sport: 'baseball') - - - it 'can be mixed mapping', -> - - expect YAML.parse """ - foo: whatever - bar: - - - fruit: apple - name: steve - sport: baseball - - more - - - python: rocks - perl: papers - ruby: scissorses - """ - .toEqual foo: 'whatever', bar: [ - (fruit: 'apple', name: 'steve', sport: 'baseball'), - 'more', - (python: 'rocks', perl: 'papers', ruby: 'scissorses') - ] - - - it 'can have mapping-in-sequence shortcut', -> - - expect YAML.parse """ - - work on YAML.py: - - work on Store - """ - .toEqual [('work on YAML.py': ['work on Store'])] - - - it 'can have unindented sequence-in-mapping shortcut', -> - - expect YAML.parse """ - allow: - - 'localhost' - - '%.sourceforge.net' - - '%.freepan.org' - """ - .toEqual (allow: ['localhost', '%.sourceforge.net', '%.freepan.org']) - - - it 'can merge key', -> - - expect YAML.parse """ - mapping: - name: Joe - job: Accountant - <<: - age: 38 - """ - .toEqual mapping: - name: 'Joe' - job: 'Accountant' - age: 38 - - it 'can ignore trailing empty lines for smallest indent', -> - - expect YAML.parse """ trailing: empty lines\n""" - .toEqual trailing: 'empty lines' - -describe 'Parsed YAML Inline Collections', -> - - it 'can be simple inline array', -> - - expect YAML.parse """ - --- - seq: [ a, b, c ] - """ - .toEqual seq: ['a', 'b', 'c'] - - - it 'can be simple inline hash', -> - - expect YAML.parse """ - --- - hash: { name: Steve, foo: bar } - """ - .toEqual hash: (name: 'Steve', foo: 'bar') - - - it 'can be nested inline hash', -> - - expect YAML.parse """ - --- - hash: { val1: "string", val2: { v2k1: "v2k1v" } } - """ - .toEqual hash: (val1: 'string', val2: (v2k1: 'v2k1v')) - - - it 'can be multi-line inline collections', -> - - expect YAML.parse """ - languages: [ Ruby, - Perl, - Python ] - websites: { YAML: yaml.org, - Ruby: ruby-lang.org, - Python: python.org, - Perl: use.perl.org } - """ - .toEqual ( - languages: ['Ruby', 'Perl', 'Python'] - websites: - YAML: 'yaml.org' - Ruby: 'ruby-lang.org' - Python: 'python.org' - Perl: 'use.perl.org' - ) - - - -describe 'Parsed YAML Basic Types', -> - - it 'can be strings', -> - - expect YAML.parse """ - --- - String - """ - .toEqual 'String' - - - it 'can be double-quoted strings with backslashes', -> - - expect YAML.parse """ - str: - "string with \\\\ inside" - """ - .toEqual str: 'string with \\ inside' - - - it 'can be single-quoted strings with backslashes', -> - - expect YAML.parse """ - str: - 'string with \\\\ inside' - """ - .toEqual str: 'string with \\\\ inside' - - - it 'can be double-quoted strings with line breaks', -> - - expect YAML.parse """ - str: - "string with \\n inside" - """ - .toEqual str: 'string with \n inside' - - - it 'can be single-quoted strings with escaped line breaks', -> - - expect YAML.parse """ - str: - 'string with \\n inside' - """ - .toEqual str: 'string with \\n inside' - - - it 'can be double-quoted strings with line breaks and backslashes', -> - - expect YAML.parse """ - str: - "string with \\n inside and \\\\ also" - """ - .toEqual str: 'string with \n inside and \\ also' - - - it 'can be single-quoted strings with line breaks and backslashes', -> - - expect YAML.parse """ - str: - 'string with \\n inside and \\\\ also' - """ - .toEqual str: 'string with \\n inside and \\\\ also' - - - it 'can have string characters in sequences', -> - - expect YAML.parse """ - - What's Yaml? - - It's for writing data structures in plain text. - - And? - - And what? That's not good enough for you? - - No, I mean, "And what about Yaml?" - - Oh, oh yeah. Uh.. Yaml for JavaScript. - """ - .toEqual [ - "What's Yaml?", - "It's for writing data structures in plain text.", - "And?", - "And what? That's not good enough for you?", - "No, I mean, \"And what about Yaml?\"", - "Oh, oh yeah. Uh.. Yaml for JavaScript." - ] - - - it 'can have indicators in strings', -> - - expect YAML.parse """ - the colon followed by space is an indicator: but is a string:right here - same for the pound sign: here we have it#in a string - the comma can, honestly, be used in most cases: [ but not in, inline collections ] - """ - .toEqual ( - 'the colon followed by space is an indicator': 'but is a string:right here', - 'same for the pound sign': 'here we have it#in a string', - 'the comma can, honestly, be used in most cases': ['but not in', 'inline collections'] - ) - - - it 'can force strings', -> - - expect YAML.parse """ - date string: !str 2001-08-01 - number string: !str 192 - date string 2: !!str 2001-08-01 - number string 2: !!str 192 - """ - .toEqual ( - 'date string': '2001-08-01', - 'number string': '192' , - 'date string 2': '2001-08-01', - 'number string 2': '192' - ) - - - it 'can be single-quoted strings', -> - - expect YAML.parse """ - all my favorite symbols: '#:!/%.)' - a few i hate: '&(*' - why do i hate them?: 'it''s very hard to explain' - """ - .toEqual ( - 'all my favorite symbols': '#:!/%.)', - 'a few i hate': '&(*', - 'why do i hate them?': 'it\'s very hard to explain' - ) - - - it 'can be double-quoted strings', -> - - expect YAML.parse """ - i know where i want my line breaks: "one here\\nand another here\\n" - """ - .toEqual ( - 'i know where i want my line breaks': "one here\nand another here\n" - ) - - - it 'can be null', -> - - expect YAML.parse """ - name: Mr. Show - hosted by: Bob and David - date of next season: ~ - """ - .toEqual ( - 'name': 'Mr. Show' - 'hosted by': 'Bob and David' - 'date of next season': null - ) - - - it 'can be boolean', -> - - expect YAML.parse """ - Is Gus a Liar?: true - Do I rely on Gus for Sustenance?: false - """ - .toEqual ( - 'Is Gus a Liar?': true - 'Do I rely on Gus for Sustenance?': false - ) - - - it 'can be integers', -> - - expect YAML.parse """ - zero: 0 - simple: 12 - one-thousand: 1,000 - negative one-thousand: -1,000 - """ - .toEqual ( - 'zero': 0 - 'simple': 12 - 'one-thousand': 1000 - 'negative one-thousand': -1000 - ) - - - it 'can be integers as map keys', -> - - expect YAML.parse """ - 1: one - 2: two - 3: three - """ - .toEqual ( - 1: 'one' - 2: 'two' - 3: 'three' - ) - - - it 'can be floats', -> - - expect YAML.parse """ - a simple float: 2.00 - larger float: 1,000.09 - scientific notation: 1.00009e+3 - """ - .toEqual ( - 'a simple float': 2.0 - 'larger float': 1000.09 - 'scientific notation': 1000.09 - ) - - - it 'can be time', -> - - iso8601Date = new Date Date.UTC(2001, 12-1, 14, 21, 59, 43, 10) - iso8601Date.setTime iso8601Date.getTime() - 5 * 3600 * 1000 - - spaceSeparatedDate = new Date Date.UTC(2001, 12-1, 14, 21, 59, 43, 10) - spaceSeparatedDate.setTime spaceSeparatedDate.getTime() + 5 * 3600 * 1000 - - withDatesToTime = (input) -> - res = {} - for key, val of input - res[key] = val.getTime() - return res - - expect withDatesToTime(YAML.parse """ - iso8601: 2001-12-14t21:59:43.010+05:00 - space separated: 2001-12-14 21:59:43.010 -05:00 - """) - .toEqual withDatesToTime ( - 'iso8601': iso8601Date - 'space separated': spaceSeparatedDate - ) - - - it 'can be date', -> - - aDate = new Date Date.UTC(1976, 7-1, 31, 0, 0, 0, 0) - - withDatesToTime = (input) -> - return input - res = {} - for key, val of input - res[key] = val.getTime() - return res - - expect withDatesToTime(YAML.parse """ - date: 1976-07-31 - """) - .toEqual withDatesToTime ( - 'date': aDate - ) - - - -describe 'Parsed YAML Blocks', -> - - it 'can be single ending newline', -> - - expect YAML.parse """ - --- - this: | - Foo - Bar - """ - .toEqual 'this': "Foo\nBar\n" - - - it 'can be single ending newline with \'+\' indicator', -> - - expect YAML.parse """ - normal: | - extra new lines not kept - - preserving: |+ - extra new lines are kept - - - dummy: value - """ - .toEqual ( - 'normal': "extra new lines not kept\n" - 'preserving': "extra new lines are kept\n\n\n" - 'dummy': 'value' - ) - - - it 'can be multi-line block handling trailing newlines in function of \'+\', \'-\' indicators', -> - - expect YAML.parse """ - clipped: | - This has one newline. - - - - same as "clipped" above: "This has one newline.\\n" - - stripped: |- - This has no newline. - - - - same as "stripped" above: "This has no newline." - - kept: |+ - This has four newlines. - - - - same as "kept" above: "This has four newlines.\\n\\n\\n\\n" - """ - .toEqual ( - 'clipped': "This has one newline.\n" - 'same as "clipped" above': "This has one newline.\n" - 'stripped':'This has no newline.' - 'same as "stripped" above': 'This has no newline.' - 'kept': "This has four newlines.\n\n\n\n" - 'same as "kept" above': "This has four newlines.\n\n\n\n" - ) - - - it 'can be folded block in a sequence', -> - - expect YAML.parse """ - --- - - apple - - banana - - > - can't you see - the beauty of yaml? - hmm - - dog - """ - .toEqual [ - 'apple', - 'banana', - "can't you see the beauty of yaml? hmm\n", - 'dog' - ] - - - it 'can be folded block as a mapping value', -> - - expect YAML.parse """ - --- - quote: > - Mark McGwire's - year was crippled - by a knee injury. - source: espn - """ - .toEqual ( - 'quote': "Mark McGwire's year was crippled by a knee injury.\n" - 'source': 'espn' - ) - - - it 'can be folded block handling trailing newlines in function of \'+\', \'-\' indicators', -> - - expect YAML.parse """ - clipped: > - This has one newline. - - - - same as "clipped" above: "This has one newline.\\n" - - stripped: >- - This has no newline. - - - - same as "stripped" above: "This has no newline." - - kept: >+ - This has four newlines. - - - - same as "kept" above: "This has four newlines.\\n\\n\\n\\n" - """ - .toEqual ( - 'clipped': "This has one newline.\n" - 'same as "clipped" above': "This has one newline.\n" - 'stripped': 'This has no newline.' - 'same as "stripped" above': 'This has no newline.' - 'kept': "This has four newlines.\n\n\n\n" - 'same as "kept" above': "This has four newlines.\n\n\n\n" - ) - - - it 'can be the whole document as intented block', -> - - expect YAML.parse """ - --- - foo: "bar" - baz: - - "qux" - - "quxx" - corge: null - """ - .toEqual ( - 'foo': "bar" - 'baz': ['qux', 'quxx'] - 'corge': null - ) - - - - -describe 'Parsed YAML Comments', -> - - it 'can begin the document', -> - - expect YAML.parse """ - # This is a comment - hello: world - """ - .toEqual ( - hello: 'world' - ) - - - it 'can be less indented in mapping', -> - - expect YAML.parse """ - parts: - a: 'b' - # normally indented comment - c: 'd' - # less indented comment - e: 'f' - """ - .toEqual ( - parts: {a: 'b', c: 'd', e: 'f'} - ) - - - it 'can be less indented in sequence', -> - - expect YAML.parse """ - list-header: - - item1 - # - item2 - - item3 - # - item4 - """ - .toEqual ( - 'list-header': ['item1', 'item3'] - ) - - - it 'can finish a line', -> - - expect YAML.parse """ - hello: world # This is a comment - """ - .toEqual ( - hello: 'world' - ) - - - it 'can end the document', -> - - expect YAML.parse """ - hello: world - # This is a comment - """ - .toEqual ( - hello: 'world' - ) - - - -describe 'Parsed YAML Aliases and Anchors', -> - - it 'can be simple alias', -> - - expect YAML.parse """ - - &showell Steve - - Clark - - Brian - - Oren - - *showell - """ - .toEqual ['Steve', 'Clark', 'Brian', 'Oren', 'Steve'] - - - it 'can be alias of a mapping', -> - - expect YAML.parse """ - - &hello - Meat: pork - Starch: potato - - banana - - *hello - """ - .toEqual [ - Meat: 'pork', Starch: 'potato' - , - 'banana' - , - Meat: 'pork', Starch: 'potato' - ] - - - -describe 'Parsed YAML Documents', -> - - it 'can have YAML header', -> - - expect YAML.parse """ - --- %YAML:1.0 - foo: 1 - bar: 2 - """ - .toEqual ( - foo: 1 - bar: 2 - ) - - - it 'can have leading document separator', -> - - expect YAML.parse """ - --- - - foo: 1 - bar: 2 - """ - .toEqual [( - foo: 1 - bar: 2 - )] - - - it 'can have multiple document separators in block', -> - - expect YAML.parse """ - foo: | - --- - foo: bar - --- - yo: baz - bar: | - fooness - """ - .toEqual ( - foo: "---\nfoo: bar\n---\nyo: baz\n" - bar: "fooness\n" - ) - - -# Dumping -# - -describe 'Dumped YAML Collections', -> - - it 'can be simple sequence', -> - - expect YAML.parse """ - - apple - - banana - - carrot - """ - .toEqual YAML.parse YAML.dump ['apple', 'banana', 'carrot'] - - - it 'can be nested sequences', -> - - expect YAML.parse """ - - - - foo - - bar - - baz - """ - .toEqual YAML.parse YAML.dump [['foo', 'bar', 'baz']] - - - it 'can be mixed sequences', -> - - expect YAML.parse """ - - apple - - - - foo - - bar - - x123 - - banana - - carrot - """ - .toEqual YAML.parse YAML.dump ['apple', ['foo', 'bar', 'x123'], 'banana', 'carrot'] - - - it 'can be deeply nested sequences', -> - - expect YAML.parse """ - - - - - - uno - - dos - """ - .toEqual YAML.parse YAML.dump [[['uno', 'dos']]] - - - it 'can be simple mapping', -> - - expect YAML.parse """ - foo: whatever - bar: stuff - """ - .toEqual YAML.parse YAML.dump foo: 'whatever', bar: 'stuff' - - - it 'can be sequence in a mapping', -> - - expect YAML.parse """ - foo: whatever - bar: - - uno - - dos - """ - .toEqual YAML.parse YAML.dump foo: 'whatever', bar: ['uno', 'dos'] - - - it 'can be nested mappings', -> - - expect YAML.parse """ - foo: whatever - bar: - fruit: apple - name: steve - sport: baseball - """ - .toEqual YAML.parse YAML.dump foo: 'whatever', bar: (fruit: 'apple', name: 'steve', sport: 'baseball') - - - it 'can be mixed mapping', -> - - expect YAML.parse """ - foo: whatever - bar: - - - fruit: apple - name: steve - sport: baseball - - more - - - python: rocks - perl: papers - ruby: scissorses - """ - .toEqual YAML.parse YAML.dump foo: 'whatever', bar: [ - (fruit: 'apple', name: 'steve', sport: 'baseball'), - 'more', - (python: 'rocks', perl: 'papers', ruby: 'scissorses') - ] - - - it 'can have mapping-in-sequence shortcut', -> - - expect YAML.parse """ - - work on YAML.py: - - work on Store - """ - .toEqual YAML.parse YAML.dump [('work on YAML.py': ['work on Store'])] - - - it 'can have unindented sequence-in-mapping shortcut', -> - - expect YAML.parse """ - allow: - - 'localhost' - - '%.sourceforge.net' - - '%.freepan.org' - """ - .toEqual YAML.parse YAML.dump (allow: ['localhost', '%.sourceforge.net', '%.freepan.org']) - - - it 'can merge key', -> - - expect YAML.parse """ - mapping: - name: Joe - job: Accountant - <<: - age: 38 - """ - .toEqual YAML.parse YAML.dump mapping: - name: 'Joe' - job: 'Accountant' - age: 38 - - - -describe 'Dumped YAML Inline Collections', -> - - it 'can be simple inline array', -> - - expect YAML.parse """ - --- - seq: [ a, b, c ] - """ - .toEqual YAML.parse YAML.dump seq: ['a', 'b', 'c'] - - - it 'can be simple inline hash', -> - - expect YAML.parse """ - --- - hash: { name: Steve, foo: bar } - """ - .toEqual YAML.parse YAML.dump hash: (name: 'Steve', foo: 'bar') - - - it 'can be multi-line inline collections', -> - - expect YAML.parse """ - languages: [ Ruby, - Perl, - Python ] - websites: { YAML: yaml.org, - Ruby: ruby-lang.org, - Python: python.org, - Perl: use.perl.org } - """ - .toEqual YAML.parse YAML.dump ( - languages: ['Ruby', 'Perl', 'Python'] - websites: - YAML: 'yaml.org' - Ruby: 'ruby-lang.org' - Python: 'python.org' - Perl: 'use.perl.org' - ) - - it 'can be dumped empty sequences in mappings', -> - - expect YAML.parse(YAML.dump({key:[]})) - .toEqual({key:[]}) - - it 'can be dumpted empty inline collections', -> - - expect YAML.parse(YAML.dump({key:{}})) - .toEqual({key:{}}) - -describe 'Dumped YAML Basic Types', -> - - it 'can be strings', -> - - expect YAML.parse """ - --- - String - """ - .toEqual YAML.parse YAML.dump 'String' - - - it 'can be double-quoted strings with backslashes', -> - - expect YAML.parse """ - str: - "string with \\\\ inside" - """ - .toEqual YAML.parse YAML.dump str: 'string with \\ inside' - - - it 'can be single-quoted strings with backslashes', -> - - expect YAML.parse """ - str: - 'string with \\\\ inside' - """ - .toEqual YAML.parse YAML.dump str: 'string with \\\\ inside' - - - it 'can be double-quoted strings with line breaks', -> - - expect YAML.parse """ - str: - "string with \\n inside" - """ - .toEqual YAML.parse YAML.dump str: 'string with \n inside' - - - it 'can be double-quoted strings with line breaks and backslashes', -> - - expect YAML.parse """ - str: - "string with \\n inside and \\\\ also" - """ - .toEqual YAML.parse YAML.dump str: 'string with \n inside and \\ also' - - - it 'can be single-quoted strings with line breaks and backslashes', -> - - expect YAML.parse """ - str: - 'string with \\n inside and \\\\ also' - """ - .toEqual YAML.parse YAML.dump str: 'string with \\n inside and \\\\ also' - - - it 'can be single-quoted strings with escaped line breaks', -> - - expect YAML.parse """ - str: - 'string with \\n inside' - """ - .toEqual YAML.parse YAML.dump str: 'string with \\n inside' - - - it 'can have string characters in sequences', -> - - expect YAML.parse """ - - What's Yaml? - - It's for writing data structures in plain text. - - And? - - And what? That's not good enough for you? - - No, I mean, "And what about Yaml?" - - Oh, oh yeah. Uh.. Yaml for JavaScript. - """ - .toEqual YAML.parse YAML.dump [ - "What's Yaml?", - "It's for writing data structures in plain text.", - "And?", - "And what? That's not good enough for you?", - "No, I mean, \"And what about Yaml?\"", - "Oh, oh yeah. Uh.. Yaml for JavaScript." - ] - - - it 'can have indicators in strings', -> - - expect YAML.parse """ - the colon followed by space is an indicator: but is a string:right here - same for the pound sign: here we have it#in a string - the comma can, honestly, be used in most cases: [ but not in, inline collections ] - """ - .toEqual YAML.parse YAML.dump ( - 'the colon followed by space is an indicator': 'but is a string:right here', - 'same for the pound sign': 'here we have it#in a string', - 'the comma can, honestly, be used in most cases': ['but not in', 'inline collections'] - ) - - - it 'can force strings', -> - - expect YAML.parse """ - date string: !str 2001-08-01 - number string: !str 192 - date string 2: !!str 2001-08-01 - number string 2: !!str 192 - """ - .toEqual YAML.parse YAML.dump ( - 'date string': '2001-08-01', - 'number string': '192' , - 'date string 2': '2001-08-01', - 'number string 2': '192' - ) - - - it 'can be single-quoted strings', -> - - expect YAML.parse """ - all my favorite symbols: '#:!/%.)' - a few i hate: '&(*' - why do i hate them?: 'it''s very hard to explain' - """ - .toEqual YAML.parse YAML.dump ( - 'all my favorite symbols': '#:!/%.)', - 'a few i hate': '&(*', - 'why do i hate them?': 'it\'s very hard to explain' - ) - - - it 'can be double-quoted strings', -> - - expect YAML.parse """ - i know where i want my line breaks: "one here\\nand another here\\n" - """ - .toEqual YAML.parse YAML.dump ( - 'i know where i want my line breaks': "one here\nand another here\n" - ) - - - it 'can be null', -> - - expect YAML.parse """ - name: Mr. Show - hosted by: Bob and David - date of next season: ~ - """ - .toEqual YAML.parse YAML.dump ( - 'name': 'Mr. Show' - 'hosted by': 'Bob and David' - 'date of next season': null - ) - - - it 'can be boolean', -> - - expect YAML.parse """ - Is Gus a Liar?: true - Do I rely on Gus for Sustenance?: false - """ - .toEqual YAML.parse YAML.dump ( - 'Is Gus a Liar?': true - 'Do I rely on Gus for Sustenance?': false - ) - - - it 'can be integers', -> - - expect YAML.parse """ - zero: 0 - simple: 12 - one-thousand: 1,000 - negative one-thousand: -1,000 - """ - .toEqual YAML.parse YAML.dump ( - 'zero': 0 - 'simple': 12 - 'one-thousand': 1000 - 'negative one-thousand': -1000 - ) - - - it 'can be integers as map keys', -> - - expect YAML.parse """ - 1: one - 2: two - 3: three - """ - .toEqual YAML.parse YAML.dump ( - 1: 'one' - 2: 'two' - 3: 'three' - ) - - - it 'can be floats', -> - - expect YAML.parse """ - a simple float: 2.00 - larger float: 1,000.09 - scientific notation: 1.00009e+3 - """ - .toEqual YAML.parse YAML.dump ( - 'a simple float': 2.0 - 'larger float': 1000.09 - 'scientific notation': 1000.09 - ) - - - it 'can be time', -> - - iso8601Date = new Date Date.UTC(2001, 12-1, 14, 21, 59, 43, 10) - iso8601Date.setTime iso8601Date.getTime() + 5 * 3600 * 1000 - - spaceSeparatedDate = new Date Date.UTC(2001, 12-1, 14, 21, 59, 43, 10) - spaceSeparatedDate.setTime spaceSeparatedDate.getTime() - 5 * 3600 * 1000 - - withDatesToTime = (input) -> - res = {} - for key, val of input - res[key] = val.getTime() - return res - - expect withDatesToTime(YAML.parse """ - iso8601: 2001-12-14t21:59:43.010-05:00 - space separated: 2001-12-14 21:59:43.010 +05:00 - """) - .toEqual YAML.parse YAML.dump withDatesToTime ( - 'iso8601': iso8601Date - 'space separated': spaceSeparatedDate - ) - - - it 'can be date', -> - - aDate = new Date Date.UTC(1976, 7-1, 31, 0, 0, 0, 0) - - withDatesToTime = (input) -> - return input - res = {} - for key, val of input - res[key] = val.getTime() - return res - - expect withDatesToTime(YAML.parse """ - date: 1976-07-31 - """) - .toEqual YAML.parse YAML.dump withDatesToTime ( - 'date': aDate - ) - - - -describe 'Dumped YAML Blocks', -> - - it 'can be single ending newline', -> - - expect YAML.parse """ - --- - this: | - Foo - Bar - """ - .toEqual YAML.parse YAML.dump 'this': "Foo\nBar\n" - - - it 'can be single ending newline with \'+\' indicator', -> - - expect YAML.parse """ - normal: | - extra new lines not kept - - preserving: |+ - extra new lines are kept - - - dummy: value - """ - .toEqual YAML.parse YAML.dump ( - 'normal': "extra new lines not kept\n" - 'preserving': "extra new lines are kept\n\n\n" - 'dummy': 'value' - ) - - - it 'can be multi-line block handling trailing newlines in function of \'+\', \'-\' indicators', -> - - expect YAML.parse """ - clipped: | - This has one newline. - - - - same as "clipped" above: "This has one newline.\\n" - - stripped: |- - This has no newline. - - - - same as "stripped" above: "This has no newline." - - kept: |+ - This has four newlines. - - - - same as "kept" above: "This has four newlines.\\n\\n\\n\\n" - """ - .toEqual YAML.parse YAML.dump ( - 'clipped': "This has one newline.\n" - 'same as "clipped" above': "This has one newline.\n" - 'stripped':'This has no newline.' - 'same as "stripped" above': 'This has no newline.' - 'kept': "This has four newlines.\n\n\n\n" - 'same as "kept" above': "This has four newlines.\n\n\n\n" - ) - - - it 'can be folded block in a sequence', -> - - expect YAML.parse """ - --- - - apple - - banana - - > - can't you see - the beauty of yaml? - hmm - - dog - """ - .toEqual YAML.parse YAML.dump [ - 'apple', - 'banana', - "can't you see the beauty of yaml? hmm\n", - 'dog' - ] - - - it 'can be folded block as a mapping value', -> - - expect YAML.parse """ - --- - quote: > - Mark McGwire's - year was crippled - by a knee injury. - source: espn - """ - .toEqual YAML.parse YAML.dump ( - 'quote': "Mark McGwire's year was crippled by a knee injury.\n" - 'source': 'espn' - ) - - - it 'can be folded block handling trailing newlines in function of \'+\', \'-\' indicators', -> - - expect YAML.parse """ - clipped: > - This has one newline. - - - - same as "clipped" above: "This has one newline.\\n" - - stripped: >- - This has no newline. - - - - same as "stripped" above: "This has no newline." - - kept: >+ - This has four newlines. - - - - same as "kept" above: "This has four newlines.\\n\\n\\n\\n" - """ - .toEqual YAML.parse YAML.dump ( - 'clipped': "This has one newline.\n" - 'same as "clipped" above': "This has one newline.\n" - 'stripped': 'This has no newline.' - 'same as "stripped" above': 'This has no newline.' - 'kept': "This has four newlines.\n\n\n\n" - 'same as "kept" above': "This has four newlines.\n\n\n\n" - ) - - - -describe 'Dumped YAML Comments', -> - - it 'can begin the document', -> - - expect YAML.parse """ - # This is a comment - hello: world - """ - .toEqual YAML.parse YAML.dump ( - hello: 'world' - ) - - - it 'can finish a line', -> - - expect YAML.parse """ - hello: world # This is a comment - """ - .toEqual YAML.parse YAML.dump ( - hello: 'world' - ) - - - it 'can end the document', -> - - expect YAML.parse """ - hello: world - # This is a comment - """ - .toEqual YAML.parse YAML.dump ( - hello: 'world' - ) - - - -describe 'Dumped YAML Aliases and Anchors', -> - - it 'can be simple alias', -> - - expect YAML.parse """ - - &showell Steve - - Clark - - Brian - - Oren - - *showell - """ - .toEqual YAML.parse YAML.dump ['Steve', 'Clark', 'Brian', 'Oren', 'Steve'] - - - it 'can be alias of a mapping', -> - - expect YAML.parse """ - - &hello - Meat: pork - Starch: potato - - banana - - *hello - """ - .toEqual YAML.parse YAML.dump [ - Meat: 'pork', Starch: 'potato' - , - 'banana' - , - Meat: 'pork', Starch: 'potato' - ] - - - -describe 'Dumped YAML Documents', -> - - it 'can have YAML header', -> - - expect YAML.parse """ - --- %YAML:1.0 - foo: 1 - bar: 2 - """ - .toEqual YAML.parse YAML.dump ( - foo: 1 - bar: 2 - ) - - - it 'can have leading document separator', -> - - expect YAML.parse """ - --- - - foo: 1 - bar: 2 - """ - .toEqual YAML.parse YAML.dump [( - foo: 1 - bar: 2 - )] - - - it 'can have multiple document separators in block', -> - - expect YAML.parse """ - foo: | - --- - foo: bar - --- - yo: baz - bar: | - fooness - """ - .toEqual YAML.parse YAML.dump ( - foo: "---\nfoo: bar\n---\nyo: baz\n" - bar: "fooness\n" - ) - - -# Loading -# (disable test when running locally from file) -# -url = document?.location?.href -if not(url?) or url.indexOf('file://') is -1 - - examplePath = 'spec/example.yml' - if __dirname? - examplePath = __dirname+'/example.yml' - - describe 'YAML loading', -> - - it 'can be done synchronously', -> - - expect(YAML.load(examplePath)).toEqual ( - this: 'is' - a: ['YAML', 'example'] - ) - - - it 'can be done asynchronously', (done) -> - - YAML.load examplePath, (result) -> - - expect(result).toEqual ( - this: 'is' - a: ['YAML', 'example'] - ) - - done() diff --git a/node_modules/yamljs/test/spec/YamlSpec.js b/node_modules/yamljs/test/spec/YamlSpec.js deleted file mode 100644 index efdad1e..0000000 --- a/node_modules/yamljs/test/spec/YamlSpec.js +++ /dev/null @@ -1,764 +0,0 @@ -// Generated by CoffeeScript 1.12.4 -var YAML, examplePath, ref, url; - -if (typeof YAML === "undefined" || YAML === null) { - YAML = require('../../src/Yaml'); -} - -describe('Parsed YAML Collections', function() { - it('can be simple sequence', function() { - return expect(YAML.parse("- apple\n- banana\n- carrot")).toEqual(['apple', 'banana', 'carrot']); - }); - it('can be nested sequences', function() { - return expect(YAML.parse("-\n - foo\n - bar\n - baz")).toEqual([['foo', 'bar', 'baz']]); - }); - it('can be mixed sequences', function() { - return expect(YAML.parse("- apple\n-\n - foo\n - bar\n - x123\n- banana\n- carrot")).toEqual(['apple', ['foo', 'bar', 'x123'], 'banana', 'carrot']); - }); - it('can be deeply nested sequences', function() { - return expect(YAML.parse("-\n -\n - uno\n - dos")).toEqual([[['uno', 'dos']]]); - }); - it('can be simple mapping', function() { - return expect(YAML.parse("foo: whatever\nbar: stuff")).toEqual({ - foo: 'whatever', - bar: 'stuff' - }); - }); - it('can be sequence in a mapping', function() { - return expect(YAML.parse("foo: whatever\nbar:\n - uno\n - dos")).toEqual({ - foo: 'whatever', - bar: ['uno', 'dos'] - }); - }); - it('can be nested mappings', function() { - return expect(YAML.parse("foo: whatever\nbar:\n fruit: apple\n name: steve\n sport: baseball")).toEqual({ - foo: 'whatever', - bar: { - fruit: 'apple', - name: 'steve', - sport: 'baseball' - } - }); - }); - it('can be mixed mapping', function() { - return expect(YAML.parse("foo: whatever\nbar:\n -\n fruit: apple\n name: steve\n sport: baseball\n - more\n -\n python: rocks\n perl: papers\n ruby: scissorses")).toEqual({ - foo: 'whatever', - bar: [ - { - fruit: 'apple', - name: 'steve', - sport: 'baseball' - }, 'more', { - python: 'rocks', - perl: 'papers', - ruby: 'scissorses' - } - ] - }); - }); - it('can have mapping-in-sequence shortcut', function() { - return expect(YAML.parse("- work on YAML.py:\n - work on Store")).toEqual([ - { - 'work on YAML.py': ['work on Store'] - } - ]); - }); - it('can have unindented sequence-in-mapping shortcut', function() { - return expect(YAML.parse("allow:\n- 'localhost'\n- '%.sourceforge.net'\n- '%.freepan.org'")).toEqual({ - allow: ['localhost', '%.sourceforge.net', '%.freepan.org'] - }); - }); - it('can merge key', function() { - return expect(YAML.parse("mapping:\n name: Joe\n job: Accountant\n <<:\n age: 38")).toEqual({ - mapping: { - name: 'Joe', - job: 'Accountant', - age: 38 - } - }); - }); - return it('can ignore trailing empty lines for smallest indent', function() { - return expect(YAML.parse(" trailing: empty lines\n")).toEqual({ - trailing: 'empty lines' - }); - }); -}); - -describe('Parsed YAML Inline Collections', function() { - it('can be simple inline array', function() { - return expect(YAML.parse("---\nseq: [ a, b, c ]")).toEqual({ - seq: ['a', 'b', 'c'] - }); - }); - it('can be simple inline hash', function() { - return expect(YAML.parse("---\nhash: { name: Steve, foo: bar }")).toEqual({ - hash: { - name: 'Steve', - foo: 'bar' - } - }); - }); - it('can be nested inline hash', function() { - return expect(YAML.parse("---\nhash: { val1: \"string\", val2: { v2k1: \"v2k1v\" } }")).toEqual({ - hash: { - val1: 'string', - val2: { - v2k1: 'v2k1v' - } - } - }); - }); - return it('can be multi-line inline collections', function() { - return expect(YAML.parse("languages: [ Ruby,\n Perl,\n Python ]\nwebsites: { YAML: yaml.org,\n Ruby: ruby-lang.org,\n Python: python.org,\n Perl: use.perl.org }")).toEqual({ - languages: ['Ruby', 'Perl', 'Python'], - websites: { - YAML: 'yaml.org', - Ruby: 'ruby-lang.org', - Python: 'python.org', - Perl: 'use.perl.org' - } - }); - }); -}); - -describe('Parsed YAML Basic Types', function() { - it('can be strings', function() { - return expect(YAML.parse("---\nString")).toEqual('String'); - }); - it('can be double-quoted strings with backslashes', function() { - return expect(YAML.parse("str:\n \"string with \\\\ inside\"")).toEqual({ - str: 'string with \\ inside' - }); - }); - it('can be single-quoted strings with backslashes', function() { - return expect(YAML.parse("str:\n 'string with \\\\ inside'")).toEqual({ - str: 'string with \\\\ inside' - }); - }); - it('can be double-quoted strings with line breaks', function() { - return expect(YAML.parse("str:\n \"string with \\n inside\"")).toEqual({ - str: 'string with \n inside' - }); - }); - it('can be single-quoted strings with escaped line breaks', function() { - return expect(YAML.parse("str:\n 'string with \\n inside'")).toEqual({ - str: 'string with \\n inside' - }); - }); - it('can be double-quoted strings with line breaks and backslashes', function() { - return expect(YAML.parse("str:\n \"string with \\n inside and \\\\ also\"")).toEqual({ - str: 'string with \n inside and \\ also' - }); - }); - it('can be single-quoted strings with line breaks and backslashes', function() { - return expect(YAML.parse("str:\n 'string with \\n inside and \\\\ also'")).toEqual({ - str: 'string with \\n inside and \\\\ also' - }); - }); - it('can have string characters in sequences', function() { - return expect(YAML.parse("- What's Yaml?\n- It's for writing data structures in plain text.\n- And?\n- And what? That's not good enough for you?\n- No, I mean, \"And what about Yaml?\"\n- Oh, oh yeah. Uh.. Yaml for JavaScript.")).toEqual(["What's Yaml?", "It's for writing data structures in plain text.", "And?", "And what? That's not good enough for you?", "No, I mean, \"And what about Yaml?\"", "Oh, oh yeah. Uh.. Yaml for JavaScript."]); - }); - it('can have indicators in strings', function() { - return expect(YAML.parse("the colon followed by space is an indicator: but is a string:right here\nsame for the pound sign: here we have it#in a string\nthe comma can, honestly, be used in most cases: [ but not in, inline collections ]")).toEqual({ - 'the colon followed by space is an indicator': 'but is a string:right here', - 'same for the pound sign': 'here we have it#in a string', - 'the comma can, honestly, be used in most cases': ['but not in', 'inline collections'] - }); - }); - it('can force strings', function() { - return expect(YAML.parse("date string: !str 2001-08-01\nnumber string: !str 192\ndate string 2: !!str 2001-08-01\nnumber string 2: !!str 192")).toEqual({ - 'date string': '2001-08-01', - 'number string': '192', - 'date string 2': '2001-08-01', - 'number string 2': '192' - }); - }); - it('can be single-quoted strings', function() { - return expect(YAML.parse("all my favorite symbols: '#:!/%.)'\na few i hate: '&(*'\nwhy do i hate them?: 'it''s very hard to explain'")).toEqual({ - 'all my favorite symbols': '#:!/%.)', - 'a few i hate': '&(*', - 'why do i hate them?': 'it\'s very hard to explain' - }); - }); - it('can be double-quoted strings', function() { - return expect(YAML.parse("i know where i want my line breaks: \"one here\\nand another here\\n\"")).toEqual({ - 'i know where i want my line breaks': "one here\nand another here\n" - }); - }); - it('can be null', function() { - return expect(YAML.parse("name: Mr. Show\nhosted by: Bob and David\ndate of next season: ~")).toEqual({ - 'name': 'Mr. Show', - 'hosted by': 'Bob and David', - 'date of next season': null - }); - }); - it('can be boolean', function() { - return expect(YAML.parse("Is Gus a Liar?: true\nDo I rely on Gus for Sustenance?: false")).toEqual({ - 'Is Gus a Liar?': true, - 'Do I rely on Gus for Sustenance?': false - }); - }); - it('can be integers', function() { - return expect(YAML.parse("zero: 0\nsimple: 12\none-thousand: 1,000\nnegative one-thousand: -1,000")).toEqual({ - 'zero': 0, - 'simple': 12, - 'one-thousand': 1000, - 'negative one-thousand': -1000 - }); - }); - it('can be integers as map keys', function() { - return expect(YAML.parse("1: one\n2: two\n3: three")).toEqual({ - 1: 'one', - 2: 'two', - 3: 'three' - }); - }); - it('can be floats', function() { - return expect(YAML.parse("a simple float: 2.00\nlarger float: 1,000.09\nscientific notation: 1.00009e+3")).toEqual({ - 'a simple float': 2.0, - 'larger float': 1000.09, - 'scientific notation': 1000.09 - }); - }); - it('can be time', function() { - var iso8601Date, spaceSeparatedDate, withDatesToTime; - iso8601Date = new Date(Date.UTC(2001, 12 - 1, 14, 21, 59, 43, 10)); - iso8601Date.setTime(iso8601Date.getTime() - 5 * 3600 * 1000); - spaceSeparatedDate = new Date(Date.UTC(2001, 12 - 1, 14, 21, 59, 43, 10)); - spaceSeparatedDate.setTime(spaceSeparatedDate.getTime() + 5 * 3600 * 1000); - withDatesToTime = function(input) { - var key, res, val; - res = {}; - for (key in input) { - val = input[key]; - res[key] = val.getTime(); - } - return res; - }; - return expect(withDatesToTime(YAML.parse("iso8601: 2001-12-14t21:59:43.010+05:00\nspace separated: 2001-12-14 21:59:43.010 -05:00"))).toEqual(withDatesToTime({ - 'iso8601': iso8601Date, - 'space separated': spaceSeparatedDate - })); - }); - return it('can be date', function() { - var aDate, withDatesToTime; - aDate = new Date(Date.UTC(1976, 7 - 1, 31, 0, 0, 0, 0)); - withDatesToTime = function(input) { - var key, res, val; - return input; - res = {}; - for (key in input) { - val = input[key]; - res[key] = val.getTime(); - } - return res; - }; - return expect(withDatesToTime(YAML.parse("date: 1976-07-31"))).toEqual(withDatesToTime({ - 'date': aDate - })); - }); -}); - -describe('Parsed YAML Blocks', function() { - it('can be single ending newline', function() { - return expect(YAML.parse("---\nthis: |\n Foo\n Bar")).toEqual({ - 'this': "Foo\nBar\n" - }); - }); - it('can be single ending newline with \'+\' indicator', function() { - return expect(YAML.parse("normal: |\n extra new lines not kept\n\npreserving: |+\n extra new lines are kept\n\n\ndummy: value")).toEqual({ - 'normal': "extra new lines not kept\n", - 'preserving': "extra new lines are kept\n\n\n", - 'dummy': 'value' - }); - }); - it('can be multi-line block handling trailing newlines in function of \'+\', \'-\' indicators', function() { - return expect(YAML.parse("clipped: |\n This has one newline.\n\n\n\nsame as \"clipped\" above: \"This has one newline.\\n\"\n\nstripped: |-\n This has no newline.\n\n\n\nsame as \"stripped\" above: \"This has no newline.\"\n\nkept: |+\n This has four newlines.\n\n\n\nsame as \"kept\" above: \"This has four newlines.\\n\\n\\n\\n\"")).toEqual({ - 'clipped': "This has one newline.\n", - 'same as "clipped" above': "This has one newline.\n", - 'stripped': 'This has no newline.', - 'same as "stripped" above': 'This has no newline.', - 'kept': "This has four newlines.\n\n\n\n", - 'same as "kept" above': "This has four newlines.\n\n\n\n" - }); - }); - it('can be folded block in a sequence', function() { - return expect(YAML.parse("---\n- apple\n- banana\n- >\n can't you see\n the beauty of yaml?\n hmm\n- dog")).toEqual(['apple', 'banana', "can't you see the beauty of yaml? hmm\n", 'dog']); - }); - it('can be folded block as a mapping value', function() { - return expect(YAML.parse("---\nquote: >\n Mark McGwire's\n year was crippled\n by a knee injury.\nsource: espn")).toEqual({ - 'quote': "Mark McGwire's year was crippled by a knee injury.\n", - 'source': 'espn' - }); - }); - it('can be folded block handling trailing newlines in function of \'+\', \'-\' indicators', function() { - return expect(YAML.parse("clipped: >\n This has one newline.\n\n\n\nsame as \"clipped\" above: \"This has one newline.\\n\"\n\nstripped: >-\n This has no newline.\n\n\n\nsame as \"stripped\" above: \"This has no newline.\"\n\nkept: >+\n This has four newlines.\n\n\n\nsame as \"kept\" above: \"This has four newlines.\\n\\n\\n\\n\"")).toEqual({ - 'clipped': "This has one newline.\n", - 'same as "clipped" above': "This has one newline.\n", - 'stripped': 'This has no newline.', - 'same as "stripped" above': 'This has no newline.', - 'kept': "This has four newlines.\n\n\n\n", - 'same as "kept" above': "This has four newlines.\n\n\n\n" - }); - }); - return it('can be the whole document as intented block', function() { - return expect(YAML.parse("---\n foo: \"bar\"\n baz:\n - \"qux\"\n - \"quxx\"\n corge: null")).toEqual({ - 'foo': "bar", - 'baz': ['qux', 'quxx'], - 'corge': null - }); - }); -}); - -describe('Parsed YAML Comments', function() { - it('can begin the document', function() { - return expect(YAML.parse("# This is a comment\nhello: world")).toEqual({ - hello: 'world' - }); - }); - it('can be less indented in mapping', function() { - return expect(YAML.parse("parts:\n a: 'b'\n # normally indented comment\n c: 'd'\n# less indented comment\n e: 'f'")).toEqual({ - parts: { - a: 'b', - c: 'd', - e: 'f' - } - }); - }); - it('can be less indented in sequence', function() { - return expect(YAML.parse("list-header:\n - item1\n# - item2\n - item3\n # - item4")).toEqual({ - 'list-header': ['item1', 'item3'] - }); - }); - it('can finish a line', function() { - return expect(YAML.parse("hello: world # This is a comment")).toEqual({ - hello: 'world' - }); - }); - return it('can end the document', function() { - return expect(YAML.parse("hello: world\n# This is a comment")).toEqual({ - hello: 'world' - }); - }); -}); - -describe('Parsed YAML Aliases and Anchors', function() { - it('can be simple alias', function() { - return expect(YAML.parse("- &showell Steve\n- Clark\n- Brian\n- Oren\n- *showell")).toEqual(['Steve', 'Clark', 'Brian', 'Oren', 'Steve']); - }); - return it('can be alias of a mapping', function() { - return expect(YAML.parse("- &hello\n Meat: pork\n Starch: potato\n- banana\n- *hello")).toEqual([ - { - Meat: 'pork', - Starch: 'potato' - }, 'banana', { - Meat: 'pork', - Starch: 'potato' - } - ]); - }); -}); - -describe('Parsed YAML Documents', function() { - it('can have YAML header', function() { - return expect(YAML.parse("--- %YAML:1.0\nfoo: 1\nbar: 2")).toEqual({ - foo: 1, - bar: 2 - }); - }); - it('can have leading document separator', function() { - return expect(YAML.parse("---\n- foo: 1\n bar: 2")).toEqual([ - { - foo: 1, - bar: 2 - } - ]); - }); - return it('can have multiple document separators in block', function() { - return expect(YAML.parse("foo: |\n ---\n foo: bar\n ---\n yo: baz\nbar: |\n fooness")).toEqual({ - foo: "---\nfoo: bar\n---\nyo: baz\n", - bar: "fooness\n" - }); - }); -}); - -describe('Dumped YAML Collections', function() { - it('can be simple sequence', function() { - return expect(YAML.parse("- apple\n- banana\n- carrot")).toEqual(YAML.parse(YAML.dump(['apple', 'banana', 'carrot']))); - }); - it('can be nested sequences', function() { - return expect(YAML.parse("-\n - foo\n - bar\n - baz")).toEqual(YAML.parse(YAML.dump([['foo', 'bar', 'baz']]))); - }); - it('can be mixed sequences', function() { - return expect(YAML.parse("- apple\n-\n - foo\n - bar\n - x123\n- banana\n- carrot")).toEqual(YAML.parse(YAML.dump(['apple', ['foo', 'bar', 'x123'], 'banana', 'carrot']))); - }); - it('can be deeply nested sequences', function() { - return expect(YAML.parse("-\n -\n - uno\n - dos")).toEqual(YAML.parse(YAML.dump([[['uno', 'dos']]]))); - }); - it('can be simple mapping', function() { - return expect(YAML.parse("foo: whatever\nbar: stuff")).toEqual(YAML.parse(YAML.dump({ - foo: 'whatever', - bar: 'stuff' - }))); - }); - it('can be sequence in a mapping', function() { - return expect(YAML.parse("foo: whatever\nbar:\n - uno\n - dos")).toEqual(YAML.parse(YAML.dump({ - foo: 'whatever', - bar: ['uno', 'dos'] - }))); - }); - it('can be nested mappings', function() { - return expect(YAML.parse("foo: whatever\nbar:\n fruit: apple\n name: steve\n sport: baseball")).toEqual(YAML.parse(YAML.dump({ - foo: 'whatever', - bar: { - fruit: 'apple', - name: 'steve', - sport: 'baseball' - } - }))); - }); - it('can be mixed mapping', function() { - return expect(YAML.parse("foo: whatever\nbar:\n -\n fruit: apple\n name: steve\n sport: baseball\n - more\n -\n python: rocks\n perl: papers\n ruby: scissorses")).toEqual(YAML.parse(YAML.dump({ - foo: 'whatever', - bar: [ - { - fruit: 'apple', - name: 'steve', - sport: 'baseball' - }, 'more', { - python: 'rocks', - perl: 'papers', - ruby: 'scissorses' - } - ] - }))); - }); - it('can have mapping-in-sequence shortcut', function() { - return expect(YAML.parse("- work on YAML.py:\n - work on Store")).toEqual(YAML.parse(YAML.dump([ - { - 'work on YAML.py': ['work on Store'] - } - ]))); - }); - it('can have unindented sequence-in-mapping shortcut', function() { - return expect(YAML.parse("allow:\n- 'localhost'\n- '%.sourceforge.net'\n- '%.freepan.org'")).toEqual(YAML.parse(YAML.dump({ - allow: ['localhost', '%.sourceforge.net', '%.freepan.org'] - }))); - }); - return it('can merge key', function() { - return expect(YAML.parse("mapping:\n name: Joe\n job: Accountant\n <<:\n age: 38")).toEqual(YAML.parse(YAML.dump({ - mapping: { - name: 'Joe', - job: 'Accountant', - age: 38 - } - }))); - }); -}); - -describe('Dumped YAML Inline Collections', function() { - it('can be simple inline array', function() { - return expect(YAML.parse("---\nseq: [ a, b, c ]")).toEqual(YAML.parse(YAML.dump({ - seq: ['a', 'b', 'c'] - }))); - }); - it('can be simple inline hash', function() { - return expect(YAML.parse("---\nhash: { name: Steve, foo: bar }")).toEqual(YAML.parse(YAML.dump({ - hash: { - name: 'Steve', - foo: 'bar' - } - }))); - }); - it('can be multi-line inline collections', function() { - return expect(YAML.parse("languages: [ Ruby,\n Perl,\n Python ]\nwebsites: { YAML: yaml.org,\n Ruby: ruby-lang.org,\n Python: python.org,\n Perl: use.perl.org }")).toEqual(YAML.parse(YAML.dump({ - languages: ['Ruby', 'Perl', 'Python'], - websites: { - YAML: 'yaml.org', - Ruby: 'ruby-lang.org', - Python: 'python.org', - Perl: 'use.perl.org' - } - }))); - }); - it('can be dumped empty sequences in mappings', function() { - return expect(YAML.parse(YAML.dump({ - key: [] - }))).toEqual({ - key: [] - }); - }); - return it('can be dumpted empty inline collections', function() { - return expect(YAML.parse(YAML.dump({ - key: {} - }))).toEqual({ - key: {} - }); - }); -}); - -describe('Dumped YAML Basic Types', function() { - it('can be strings', function() { - return expect(YAML.parse("---\nString")).toEqual(YAML.parse(YAML.dump('String'))); - }); - it('can be double-quoted strings with backslashes', function() { - return expect(YAML.parse("str:\n \"string with \\\\ inside\"")).toEqual(YAML.parse(YAML.dump({ - str: 'string with \\ inside' - }))); - }); - it('can be single-quoted strings with backslashes', function() { - return expect(YAML.parse("str:\n 'string with \\\\ inside'")).toEqual(YAML.parse(YAML.dump({ - str: 'string with \\\\ inside' - }))); - }); - it('can be double-quoted strings with line breaks', function() { - return expect(YAML.parse("str:\n \"string with \\n inside\"")).toEqual(YAML.parse(YAML.dump({ - str: 'string with \n inside' - }))); - }); - it('can be double-quoted strings with line breaks and backslashes', function() { - return expect(YAML.parse("str:\n \"string with \\n inside and \\\\ also\"")).toEqual(YAML.parse(YAML.dump({ - str: 'string with \n inside and \\ also' - }))); - }); - it('can be single-quoted strings with line breaks and backslashes', function() { - return expect(YAML.parse("str:\n 'string with \\n inside and \\\\ also'")).toEqual(YAML.parse(YAML.dump({ - str: 'string with \\n inside and \\\\ also' - }))); - }); - it('can be single-quoted strings with escaped line breaks', function() { - return expect(YAML.parse("str:\n 'string with \\n inside'")).toEqual(YAML.parse(YAML.dump({ - str: 'string with \\n inside' - }))); - }); - it('can have string characters in sequences', function() { - return expect(YAML.parse("- What's Yaml?\n- It's for writing data structures in plain text.\n- And?\n- And what? That's not good enough for you?\n- No, I mean, \"And what about Yaml?\"\n- Oh, oh yeah. Uh.. Yaml for JavaScript.")).toEqual(YAML.parse(YAML.dump(["What's Yaml?", "It's for writing data structures in plain text.", "And?", "And what? That's not good enough for you?", "No, I mean, \"And what about Yaml?\"", "Oh, oh yeah. Uh.. Yaml for JavaScript."]))); - }); - it('can have indicators in strings', function() { - return expect(YAML.parse("the colon followed by space is an indicator: but is a string:right here\nsame for the pound sign: here we have it#in a string\nthe comma can, honestly, be used in most cases: [ but not in, inline collections ]")).toEqual(YAML.parse(YAML.dump({ - 'the colon followed by space is an indicator': 'but is a string:right here', - 'same for the pound sign': 'here we have it#in a string', - 'the comma can, honestly, be used in most cases': ['but not in', 'inline collections'] - }))); - }); - it('can force strings', function() { - return expect(YAML.parse("date string: !str 2001-08-01\nnumber string: !str 192\ndate string 2: !!str 2001-08-01\nnumber string 2: !!str 192")).toEqual(YAML.parse(YAML.dump({ - 'date string': '2001-08-01', - 'number string': '192', - 'date string 2': '2001-08-01', - 'number string 2': '192' - }))); - }); - it('can be single-quoted strings', function() { - return expect(YAML.parse("all my favorite symbols: '#:!/%.)'\na few i hate: '&(*'\nwhy do i hate them?: 'it''s very hard to explain'")).toEqual(YAML.parse(YAML.dump({ - 'all my favorite symbols': '#:!/%.)', - 'a few i hate': '&(*', - 'why do i hate them?': 'it\'s very hard to explain' - }))); - }); - it('can be double-quoted strings', function() { - return expect(YAML.parse("i know where i want my line breaks: \"one here\\nand another here\\n\"")).toEqual(YAML.parse(YAML.dump({ - 'i know where i want my line breaks': "one here\nand another here\n" - }))); - }); - it('can be null', function() { - return expect(YAML.parse("name: Mr. Show\nhosted by: Bob and David\ndate of next season: ~")).toEqual(YAML.parse(YAML.dump({ - 'name': 'Mr. Show', - 'hosted by': 'Bob and David', - 'date of next season': null - }))); - }); - it('can be boolean', function() { - return expect(YAML.parse("Is Gus a Liar?: true\nDo I rely on Gus for Sustenance?: false")).toEqual(YAML.parse(YAML.dump({ - 'Is Gus a Liar?': true, - 'Do I rely on Gus for Sustenance?': false - }))); - }); - it('can be integers', function() { - return expect(YAML.parse("zero: 0\nsimple: 12\none-thousand: 1,000\nnegative one-thousand: -1,000")).toEqual(YAML.parse(YAML.dump({ - 'zero': 0, - 'simple': 12, - 'one-thousand': 1000, - 'negative one-thousand': -1000 - }))); - }); - it('can be integers as map keys', function() { - return expect(YAML.parse("1: one\n2: two\n3: three")).toEqual(YAML.parse(YAML.dump({ - 1: 'one', - 2: 'two', - 3: 'three' - }))); - }); - it('can be floats', function() { - return expect(YAML.parse("a simple float: 2.00\nlarger float: 1,000.09\nscientific notation: 1.00009e+3")).toEqual(YAML.parse(YAML.dump({ - 'a simple float': 2.0, - 'larger float': 1000.09, - 'scientific notation': 1000.09 - }))); - }); - it('can be time', function() { - var iso8601Date, spaceSeparatedDate, withDatesToTime; - iso8601Date = new Date(Date.UTC(2001, 12 - 1, 14, 21, 59, 43, 10)); - iso8601Date.setTime(iso8601Date.getTime() + 5 * 3600 * 1000); - spaceSeparatedDate = new Date(Date.UTC(2001, 12 - 1, 14, 21, 59, 43, 10)); - spaceSeparatedDate.setTime(spaceSeparatedDate.getTime() - 5 * 3600 * 1000); - withDatesToTime = function(input) { - var key, res, val; - res = {}; - for (key in input) { - val = input[key]; - res[key] = val.getTime(); - } - return res; - }; - return expect(withDatesToTime(YAML.parse("iso8601: 2001-12-14t21:59:43.010-05:00\nspace separated: 2001-12-14 21:59:43.010 +05:00"))).toEqual(YAML.parse(YAML.dump(withDatesToTime({ - 'iso8601': iso8601Date, - 'space separated': spaceSeparatedDate - })))); - }); - return it('can be date', function() { - var aDate, withDatesToTime; - aDate = new Date(Date.UTC(1976, 7 - 1, 31, 0, 0, 0, 0)); - withDatesToTime = function(input) { - var key, res, val; - return input; - res = {}; - for (key in input) { - val = input[key]; - res[key] = val.getTime(); - } - return res; - }; - return expect(withDatesToTime(YAML.parse("date: 1976-07-31"))).toEqual(YAML.parse(YAML.dump(withDatesToTime({ - 'date': aDate - })))); - }); -}); - -describe('Dumped YAML Blocks', function() { - it('can be single ending newline', function() { - return expect(YAML.parse("---\nthis: |\n Foo\n Bar")).toEqual(YAML.parse(YAML.dump({ - 'this': "Foo\nBar\n" - }))); - }); - it('can be single ending newline with \'+\' indicator', function() { - return expect(YAML.parse("normal: |\n extra new lines not kept\n\npreserving: |+\n extra new lines are kept\n\n\ndummy: value")).toEqual(YAML.parse(YAML.dump({ - 'normal': "extra new lines not kept\n", - 'preserving': "extra new lines are kept\n\n\n", - 'dummy': 'value' - }))); - }); - it('can be multi-line block handling trailing newlines in function of \'+\', \'-\' indicators', function() { - return expect(YAML.parse("clipped: |\n This has one newline.\n\n\n\nsame as \"clipped\" above: \"This has one newline.\\n\"\n\nstripped: |-\n This has no newline.\n\n\n\nsame as \"stripped\" above: \"This has no newline.\"\n\nkept: |+\n This has four newlines.\n\n\n\nsame as \"kept\" above: \"This has four newlines.\\n\\n\\n\\n\"")).toEqual(YAML.parse(YAML.dump({ - 'clipped': "This has one newline.\n", - 'same as "clipped" above': "This has one newline.\n", - 'stripped': 'This has no newline.', - 'same as "stripped" above': 'This has no newline.', - 'kept': "This has four newlines.\n\n\n\n", - 'same as "kept" above': "This has four newlines.\n\n\n\n" - }))); - }); - it('can be folded block in a sequence', function() { - return expect(YAML.parse("---\n- apple\n- banana\n- >\n can't you see\n the beauty of yaml?\n hmm\n- dog")).toEqual(YAML.parse(YAML.dump(['apple', 'banana', "can't you see the beauty of yaml? hmm\n", 'dog']))); - }); - it('can be folded block as a mapping value', function() { - return expect(YAML.parse("---\nquote: >\n Mark McGwire's\n year was crippled\n by a knee injury.\nsource: espn")).toEqual(YAML.parse(YAML.dump({ - 'quote': "Mark McGwire's year was crippled by a knee injury.\n", - 'source': 'espn' - }))); - }); - return it('can be folded block handling trailing newlines in function of \'+\', \'-\' indicators', function() { - return expect(YAML.parse("clipped: >\n This has one newline.\n\n\n\nsame as \"clipped\" above: \"This has one newline.\\n\"\n\nstripped: >-\n This has no newline.\n\n\n\nsame as \"stripped\" above: \"This has no newline.\"\n\nkept: >+\n This has four newlines.\n\n\n\nsame as \"kept\" above: \"This has four newlines.\\n\\n\\n\\n\"")).toEqual(YAML.parse(YAML.dump({ - 'clipped': "This has one newline.\n", - 'same as "clipped" above': "This has one newline.\n", - 'stripped': 'This has no newline.', - 'same as "stripped" above': 'This has no newline.', - 'kept': "This has four newlines.\n\n\n\n", - 'same as "kept" above': "This has four newlines.\n\n\n\n" - }))); - }); -}); - -describe('Dumped YAML Comments', function() { - it('can begin the document', function() { - return expect(YAML.parse("# This is a comment\nhello: world")).toEqual(YAML.parse(YAML.dump({ - hello: 'world' - }))); - }); - it('can finish a line', function() { - return expect(YAML.parse("hello: world # This is a comment")).toEqual(YAML.parse(YAML.dump({ - hello: 'world' - }))); - }); - return it('can end the document', function() { - return expect(YAML.parse("hello: world\n# This is a comment")).toEqual(YAML.parse(YAML.dump({ - hello: 'world' - }))); - }); -}); - -describe('Dumped YAML Aliases and Anchors', function() { - it('can be simple alias', function() { - return expect(YAML.parse("- &showell Steve\n- Clark\n- Brian\n- Oren\n- *showell")).toEqual(YAML.parse(YAML.dump(['Steve', 'Clark', 'Brian', 'Oren', 'Steve']))); - }); - return it('can be alias of a mapping', function() { - return expect(YAML.parse("- &hello\n Meat: pork\n Starch: potato\n- banana\n- *hello")).toEqual(YAML.parse(YAML.dump([ - { - Meat: 'pork', - Starch: 'potato' - }, 'banana', { - Meat: 'pork', - Starch: 'potato' - } - ]))); - }); -}); - -describe('Dumped YAML Documents', function() { - it('can have YAML header', function() { - return expect(YAML.parse("--- %YAML:1.0\nfoo: 1\nbar: 2")).toEqual(YAML.parse(YAML.dump({ - foo: 1, - bar: 2 - }))); - }); - it('can have leading document separator', function() { - return expect(YAML.parse("---\n- foo: 1\n bar: 2")).toEqual(YAML.parse(YAML.dump([ - { - foo: 1, - bar: 2 - } - ]))); - }); - return it('can have multiple document separators in block', function() { - return expect(YAML.parse("foo: |\n ---\n foo: bar\n ---\n yo: baz\nbar: |\n fooness")).toEqual(YAML.parse(YAML.dump({ - foo: "---\nfoo: bar\n---\nyo: baz\n", - bar: "fooness\n" - }))); - }); -}); - -url = typeof document !== "undefined" && document !== null ? (ref = document.location) != null ? ref.href : void 0 : void 0; - -if (!(url != null) || url.indexOf('file://') === -1) { - examplePath = 'spec/example.yml'; - if (typeof __dirname !== "undefined" && __dirname !== null) { - examplePath = __dirname + '/example.yml'; - } - describe('YAML loading', function() { - it('can be done synchronously', function() { - return expect(YAML.load(examplePath)).toEqual({ - "this": 'is', - a: ['YAML', 'example'] - }); - }); - return it('can be done asynchronously', function(done) { - return YAML.load(examplePath, function(result) { - expect(result).toEqual({ - "this": 'is', - a: ['YAML', 'example'] - }); - return done(); - }); - }); - }); -} diff --git a/node_modules/yamljs/test/spec/example.yml b/node_modules/yamljs/test/spec/example.yml deleted file mode 100644 index 17d83ee..0000000 --- a/node_modules/yamljs/test/spec/example.yml +++ /dev/null @@ -1,4 +0,0 @@ -this: is -a: - - YAML - - example \ No newline at end of file diff --git a/node_modules/yeast/LICENSE b/node_modules/yeast/LICENSE deleted file mode 100644 index 6dc9316..0000000 --- a/node_modules/yeast/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Unshift.io, Arnout Kazemier, the Contributors. - -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/yeast/README.md b/node_modules/yeast/README.md deleted file mode 100644 index 0b0af0d..0000000 --- a/node_modules/yeast/README.md +++ /dev/null @@ -1,82 +0,0 @@ -# yeast - -[![Made by unshift](https://img.shields.io/badge/made%20by-unshift-00ffcc.svg?style=flat-square)](http://unshift.io)[![Version npm](https://img.shields.io/npm/v/yeast.svg?style=flat-square)](http://browsenpm.org/package/yeast)[![Build Status](https://img.shields.io/travis/unshiftio/yeast/master.svg?style=flat-square)](https://travis-ci.org/unshiftio/yeast)[![Dependencies](https://img.shields.io/david/unshiftio/yeast.svg?style=flat-square)](https://david-dm.org/unshiftio/yeast)[![Coverage Status](https://img.shields.io/coveralls/unshiftio/yeast/master.svg?style=flat-square)](https://coveralls.io/r/unshiftio/yeast?branch=master)[![IRC channel](https://img.shields.io/badge/IRC-irc.freenode.net%23unshift-00a8ff.svg?style=flat-square)](https://webchat.freenode.net/?channels=unshift) - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/yeast.svg)](https://saucelabs.com/u/yeast) - -Yeast is a unique id generator. It has been primarily designed to generate a -unique id which can be used for cache busting. A common practice for this is -to use a timestamp, but there are couple of downsides when using timestamps. - -1. The timestamp is already 13 chars long. This might not matter for 1 request - but if you make hundreds of them this quickly adds up in bandwidth and - processing time. -2. It's not unique enough. If you generate two stamps right after each other, - they would be identical because the timing accuracy is limited to - milliseconds. - -Yeast solves both of these issues by: - -1. Compressing the generated timestamp using a custom `encode()` function that - returns a string representation of the number. -2. Seeding the id in case of collision (when the id is identical to the previous - one). - -To keep the strings unique it will use the `.` char to separate the generated -stamp from the seed. - -## Installation - -The module is intended to be used in browsers as well as in Node.js and is -therefore released in the npm registry and can be installed using: - -``` -npm install --save yeast -``` - -## Usage - -All the examples assume that this library is initialized as follow: - -```js -'use strict'; - -var yeast = require('yeast'); -``` - -To generate an id just call the `yeast` function. - -```js -console.log(yeast(), yeast(), yeast()); // outputs: KyxidwN KyxidwN.0 KyxidwN.1 - -setTimeout(function () { - console.log(yeast()); // outputs: KyxidwO -}); -``` - -### yeast.encode(num) - -An helper function that returns a string representing the specified number. The -returned string contains only URL safe characters. - -```js -yeast.encode(+new Date()); // outputs: Kyxjuo1 -``` - -### yeast.decode(str) - -An helper function that returns the integer value specified by the given string. -This function can be used to retrieve the timestamp from a `yeast` id. - -```js -var id = yeast(); // holds the value: Kyxl1OU - -yeast.decode(id); // outputs: 1439816226334 -``` - -That's all folks. If you have ideas on how we can further compress the ids -please open an issue! - -## License - -[MIT](LICENSE) diff --git a/node_modules/yeast/index.js b/node_modules/yeast/index.js deleted file mode 100644 index 7299762..0000000 --- a/node_modules/yeast/index.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -var alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'.split('') - , length = 64 - , map = {} - , seed = 0 - , i = 0 - , prev; - -/** - * Return a string representing the specified number. - * - * @param {Number} num The number to convert. - * @returns {String} The string representation of the number. - * @api public - */ -function encode(num) { - var encoded = ''; - - do { - encoded = alphabet[num % length] + encoded; - num = Math.floor(num / length); - } while (num > 0); - - return encoded; -} - -/** - * Return the integer value specified by the given string. - * - * @param {String} str The string to convert. - * @returns {Number} The integer value represented by the string. - * @api public - */ -function decode(str) { - var decoded = 0; - - for (i = 0; i < str.length; i++) { - decoded = decoded * length + map[str.charAt(i)]; - } - - return decoded; -} - -/** - * Yeast: A tiny growing id generator. - * - * @returns {String} A unique id. - * @api public - */ -function yeast() { - var now = encode(+new Date()); - - if (now !== prev) return seed = 0, prev = now; - return now +'.'+ encode(seed++); -} - -// -// Map each character to its index. -// -for (; i < length; i++) map[alphabet[i]] = i; - -// -// Expose the `yeast`, `encode` and `decode` functions. -// -yeast.encode = encode; -yeast.decode = decode; -module.exports = yeast; diff --git a/node_modules/yeast/package.json b/node_modules/yeast/package.json deleted file mode 100644 index 952ccfa..0000000 --- a/node_modules/yeast/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_from": "yeast@0.1.2", - "_id": "yeast@0.1.2", - "_inBundle": false, - "_integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", - "_location": "/yeast", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "yeast@0.1.2", - "name": "yeast", - "escapedName": "yeast", - "rawSpec": "0.1.2", - "saveSpec": null, - "fetchSpec": "0.1.2" - }, - "_requiredBy": [ - "/engine.io-client" - ], - "_resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", - "_shasum": "008e06d8094320c372dbc2f8ed76a0ca6c8ac419", - "_spec": "yeast@0.1.2", - "_where": "/Users/paolo/Desktop/multiplayer games/tutorials/hellosocket/node_modules/engine.io-client", - "author": { - "name": "Arnout Kazemier" - }, - "bugs": { - "url": "https://github.com/unshiftio/yeast/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Tiny but linear growing unique id generator", - "devDependencies": { - "assume": "1.3.x", - "istanbul": "0.3.x", - "mocha": "2.3.x", - "pre-commit": "1.1.x", - "zuul": "3.4.x" - }, - "homepage": "https://github.com/unshiftio/yeast", - "keywords": [ - "yeast", - "id", - "generator", - "unique" - ], - "license": "MIT", - "main": "index.js", - "name": "yeast", - "repository": { - "type": "git", - "url": "git+https://github.com/unshiftio/yeast.git" - }, - "scripts": { - "100%": "istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100", - "coverage": "istanbul cover _mocha -- test.js", - "test": "mocha test.js", - "test-browser": "zuul -- test.js", - "test-node": "istanbul cover _mocha --report lcovonly -- test.js", - "watch": "mocha --watch test.js" - }, - "version": "0.1.2" -}