From 8082d914ae08d9125d9494fc571715b0da823287 Mon Sep 17 00:00:00 2001 From: Andrea Rocco Lotronto Date: Thu, 29 Jan 2015 13:34:28 +0100 Subject: [PATCH] alpha version of iotronic node and partial version of iotronic python --- .../.crossbar => .crossbar}/config.json | 3 +- .gitignore | 1 + s4t-server-node/.crossbar/node.pid | 16 - .../lib/wst.js => bin/server} | 13 +- .../bin/wstt.js => index.js} | 5 +- .../libr/https_override.js => lib/getIP.js} | 34 +- .../LICENSE => lib/s4t_WS.js} | 8 +- s4t-server-node/lib/s4t_wamp_server.js | 143 + .../node_modules/autobahn/.npmignore | 5 - .../node_modules/autobahn/Makefile | 25 - .../node_modules/autobahn/README.md | 14 - .../node_modules/autobahn/index.js | 14 - .../node_modules/autobahn/lib/auth/cra.js | 39 - .../node_modules/autobahn/lib/auth/persona.js | 52 - .../node_modules/autobahn/lib/autobahn.js | 60 - .../node_modules/autobahn/lib/configure.js | 58 - .../node_modules/autobahn/lib/connection.js | 485 -- .../node_modules/autobahn/lib/log.js | 23 - .../node_modules/autobahn/lib/polyfill.js | 7 - .../autobahn/lib/polyfill/array.js | 124 - .../autobahn/lib/polyfill/console.js | 96 - .../autobahn/lib/polyfill/function.js | 9 - .../autobahn/lib/polyfill/json.js | 491 -- .../autobahn/lib/polyfill/object.js | 54 - .../autobahn/lib/polyfill/string.js | 7 - .../autobahn/lib/polyfill/typedarray.js | 1174 --- .../node_modules/autobahn/lib/session.js | 1372 ---- .../autobahn/lib/transport/longpoll.js | 204 - .../autobahn/lib/transport/websocket.js | 201 - .../node_modules/autobahn/lib/util.js | 127 - .../autobahn/node_modules/crypto-js/README.md | 76 - .../autobahn/node_modules/crypto-js/aes.js | 227 - .../node_modules/crypto-js/cipher-core.js | 875 --- .../autobahn/node_modules/crypto-js/core.js | 745 -- .../node_modules/crypto-js/enc-base64.js | 123 - .../node_modules/crypto-js/enc-hex.js | 18 - .../node_modules/crypto-js/enc-latin1.js | 18 - .../node_modules/crypto-js/enc-utf16.js | 149 - .../node_modules/crypto-js/enc-utf8.js | 18 - .../autobahn/node_modules/crypto-js/evpkdf.js | 132 - .../node_modules/crypto-js/format-hex.js | 66 - .../node_modules/crypto-js/format-openssl.js | 18 - .../node_modules/crypto-js/hmac-md5.js | 18 - .../node_modules/crypto-js/hmac-ripemd160.js | 18 - .../node_modules/crypto-js/hmac-sha1.js | 18 - .../node_modules/crypto-js/hmac-sha224.js | 18 - .../node_modules/crypto-js/hmac-sha256.js | 18 - .../node_modules/crypto-js/hmac-sha3.js | 18 - .../node_modules/crypto-js/hmac-sha384.js | 18 - .../node_modules/crypto-js/hmac-sha512.js | 18 - .../autobahn/node_modules/crypto-js/hmac.js | 143 - .../autobahn/node_modules/crypto-js/index.js | 18 - .../node_modules/crypto-js/lib-typedarrays.js | 76 - .../autobahn/node_modules/crypto-js/md5.js | 268 - .../node_modules/crypto-js/mode-cfb.js | 78 - .../crypto-js/mode-ctr-gladman.js | 116 - .../node_modules/crypto-js/mode-ctr.js | 58 - .../node_modules/crypto-js/mode-ecb.js | 40 - .../node_modules/crypto-js/mode-ofb.js | 54 - .../node_modules/crypto-js/package.json | 75 - .../node_modules/crypto-js/pad-ansix923.js | 49 - .../node_modules/crypto-js/pad-iso10126.js | 44 - .../node_modules/crypto-js/pad-iso97971.js | 40 - .../node_modules/crypto-js/pad-nopadding.js | 30 - .../node_modules/crypto-js/pad-pkcs7.js | 18 - .../node_modules/crypto-js/pad-zeropadding.js | 45 - .../autobahn/node_modules/crypto-js/pbkdf2.js | 145 - .../node_modules/crypto-js/rabbit-legacy.js | 190 - .../autobahn/node_modules/crypto-js/rabbit.js | 192 - .../autobahn/node_modules/crypto-js/rc4.js | 139 - .../node_modules/crypto-js/ripemd160.js | 267 - .../autobahn/node_modules/crypto-js/sha1.js | 150 - .../autobahn/node_modules/crypto-js/sha224.js | 80 - .../autobahn/node_modules/crypto-js/sha256.js | 199 - .../autobahn/node_modules/crypto-js/sha3.js | 323 - .../autobahn/node_modules/crypto-js/sha384.js | 83 - .../autobahn/node_modules/crypto-js/sha512.js | 323 - .../node_modules/crypto-js/tripledes.js | 770 -- .../node_modules/crypto-js/x64-core.js | 304 - .../autobahn/node_modules/when/LICENSE.txt | 24 - .../autobahn/node_modules/when/README.md | 105 - .../autobahn/node_modules/when/callbacks.js | 262 - .../autobahn/node_modules/when/cancelable.js | 54 - .../autobahn/node_modules/when/delay.js | 27 - .../when/es6-shim/Promise.browserify-es6.js | 13 - .../node_modules/when/es6-shim/Promise.js | 1225 ---- .../node_modules/when/es6-shim/README.md | 5 - .../autobahn/node_modules/when/function.js | 104 - .../autobahn/node_modules/when/generator.js | 105 - .../autobahn/node_modules/when/guard.js | 72 - .../autobahn/node_modules/when/keys.js | 80 - .../autobahn/node_modules/when/lib/Promise.js | 17 - .../node_modules/when/lib/Scheduler.js | 80 - .../node_modules/when/lib/TimeoutError.js | 27 - .../autobahn/node_modules/when/lib/apply.js | 55 - .../node_modules/when/lib/decorators/array.js | 285 - .../node_modules/when/lib/decorators/flow.js | 160 - .../node_modules/when/lib/decorators/fold.js | 27 - .../when/lib/decorators/inspect.js | 20 - .../when/lib/decorators/iterate.js | 65 - .../when/lib/decorators/progress.js | 24 - .../node_modules/when/lib/decorators/timed.js | 78 - .../when/lib/decorators/unhandledRejection.js | 85 - .../node_modules/when/lib/decorators/with.js | 38 - .../autobahn/node_modules/when/lib/env.js | 73 - .../autobahn/node_modules/when/lib/format.js | 56 - .../autobahn/node_modules/when/lib/liftAll.js | 28 - .../node_modules/when/lib/makePromise.js | 883 --- .../autobahn/node_modules/when/lib/state.js | 35 - .../autobahn/node_modules/when/monitor.js | 17 - .../when/monitor/ConsoleReporter.js | 102 - .../when/monitor/PromiseMonitor.js | 197 - .../node_modules/when/monitor/README.md | 3 - .../node_modules/when/monitor/console.js | 14 - .../node_modules/when/monitor/error.js | 86 - .../autobahn/node_modules/when/node.js | 282 - .../node_modules/when/node/function.js | 13 - .../autobahn/node_modules/when/package.json | 108 - .../autobahn/node_modules/when/parallel.js | 39 - .../autobahn/node_modules/when/pipeline.js | 50 - .../autobahn/node_modules/when/poll.js | 114 - .../autobahn/node_modules/when/sequence.js | 46 - .../autobahn/node_modules/when/timeout.js | 27 - .../autobahn/node_modules/when/unfold.js | 17 - .../autobahn/node_modules/when/unfold/list.js | 32 - .../autobahn/node_modules/when/when.js | 229 - .../autobahn/node_modules/ws/.npmignore | 11 - .../autobahn/node_modules/ws/.travis.yml | 5 - .../autobahn/node_modules/ws/History.md | 346 - .../autobahn/node_modules/ws/Makefile | 40 - .../autobahn/node_modules/ws/README.md | 183 - .../autobahn/node_modules/ws/binding.gyp | 16 - .../autobahn/node_modules/ws/build/Makefile | 337 - .../Release/.deps/Release/bufferutil.node.d | 1 - .../Release/obj.target/bufferutil.node.d | 1 - .../obj.target/bufferutil/src/bufferutil.o.d | 29 - .../Release/obj.target/validation.node.d | 1 - .../obj.target/validation/src/validation.o.d | 29 - .../Release/.deps/Release/validation.node.d | 1 - .../ws/build/Release/bufferutil.node | Bin 18586 -> 0 bytes .../node_modules/ws/build/Release/linker.lock | 0 .../build/Release/obj.target/bufferutil.node | Bin 18586 -> 0 bytes .../obj.target/bufferutil/src/bufferutil.o | Bin 14184 -> 0 bytes .../build/Release/obj.target/validation.node | Bin 18448 -> 0 bytes .../obj.target/validation/src/validation.o | Bin 12648 -> 0 bytes .../ws/build/Release/validation.node | Bin 18448 -> 0 bytes .../node_modules/ws/build/binding.Makefile | 6 - .../ws/build/bufferutil.target.mk | 131 - .../node_modules/ws/build/config.gypi | 123 - .../ws/build/validation.target.mk | 131 - .../autobahn/node_modules/ws/builderror.log | 14 - .../autobahn/node_modules/ws/index.js | 49 - .../node_modules/ws/lib/BufferPool.js | 59 - .../ws/lib/BufferUtil.fallback.js | 47 - .../node_modules/ws/lib/BufferUtil.js | 16 - .../node_modules/ws/lib/ErrorCodes.js | 24 - .../node_modules/ws/lib/Extensions.js | 70 - .../node_modules/ws/lib/PerMessageDeflate.js | 289 - .../node_modules/ws/lib/Receiver.hixie.js | 180 - .../autobahn/node_modules/ws/lib/Receiver.js | 698 -- .../node_modules/ws/lib/Sender.hixie.js | 120 - .../autobahn/node_modules/ws/lib/Sender.js | 309 - .../ws/lib/Validation.fallback.js | 12 - .../node_modules/ws/lib/Validation.js | 16 - .../autobahn/node_modules/ws/lib/WebSocket.js | 937 --- .../node_modules/ws/lib/WebSocketServer.js | 501 -- .../autobahn/node_modules/ws/lib/browser.js | 43 - .../node_modules/ws/node_modules/nan/.dntrc | 37 - .../ws/node_modules/nan/CHANGELOG.md | 216 - .../ws/node_modules/nan/LICENSE.md | 13 - .../ws/node_modules/nan/README.md | 1208 ---- .../ws/node_modules/nan/appveyor.yml | 32 - .../ws/node_modules/nan/include_dirs.js | 1 - .../node_modules/ws/node_modules/nan/nan.h | 2428 ------- .../ws/node_modules/nan/package.json | 84 - .../ws/node_modules/options/.npmignore | 7 - .../ws/node_modules/options/Makefile | 12 - .../ws/node_modules/options/README.md | 69 - .../ws/node_modules/options/lib/options.js | 86 - .../ws/node_modules/options/package.json | 51 - .../ws/node_modules/ultron/.npmignore | 3 - .../ws/node_modules/ultron/.travis.yml | 17 - .../ws/node_modules/ultron/README.md | 97 - .../ws/node_modules/ultron/index.js | 125 - .../ws/node_modules/ultron/package.json | 68 - .../ws/node_modules/ultron/test.js | 327 - .../autobahn/node_modules/ws/package.json | 78 - .../node_modules/ws/src/bufferutil.cc | 117 - .../node_modules/ws/src/validation.cc | 145 - .../autobahn/node_modules/ws/wscat/README.md | 26 - .../autobahn/node_modules/ws/wscat/bin/wscat | 222 - .../node_modules/ws/wscat/package.json | 28 - .../node_modules/autobahn/package.json | 57 - .../node_modules/autobahn/test/test.js | 40 - .../autobahn/test/test_connect.js | 47 - .../autobahn/test/test_pubsub_basic.js | 67 - .../autobahn/test/test_pubsub_basic.txt | 14 - .../autobahn/test/test_pubsub_complex.js | 81 - .../autobahn/test/test_pubsub_complex.txt | 14 - .../autobahn/test/test_pubsub_options.js | 74 - .../autobahn/test/test_pubsub_options.txt | 14 - .../autobahn/test/test_rpc_arguments.js | 175 - .../autobahn/test/test_rpc_arguments.txt | 27 - .../autobahn/test/test_rpc_complex.js | 116 - .../autobahn/test/test_rpc_complex.txt | 23 - .../autobahn/test/test_rpc_error.js | 89 - .../autobahn/test/test_rpc_error.txt | 6 - .../autobahn/test/test_rpc_options.js | 104 - .../autobahn/test/test_rpc_options.txt | 9 - .../autobahn/test/test_rpc_progress.js | 105 - .../autobahn/test/test_rpc_progress.txt | 10 - .../autobahn/test/test_rpc_routing.js | 66 - .../autobahn/test/test_rpc_routing.txt | 4 - .../autobahn/test/test_rpc_slowsquare.js | 107 - .../autobahn/test/test_rpc_slowsquare.txt | 5 - .../node_modules/autobahn/test/testutil.js | 144 - .../node_modules/express/History.md | 2620 ------- s4t-server-node/node_modules/express/LICENSE | 22 - .../node_modules/express/Readme.md | 135 - s4t-server-node/node_modules/express/index.js | 2 - .../node_modules/express/lib/application.js | 571 -- .../node_modules/express/lib/express.js | 93 - .../express/lib/middleware/init.js | 26 - .../express/lib/middleware/query.js | 30 - .../node_modules/express/lib/request.js | 467 -- .../node_modules/express/lib/response.js | 1024 --- .../node_modules/express/lib/router/index.js | 630 -- .../node_modules/express/lib/router/layer.js | 166 - .../node_modules/express/lib/router/route.js | 183 - .../node_modules/express/lib/utils.js | 283 - .../node_modules/express/lib/view.js | 142 - .../express/node_modules/accepts/HISTORY.md | 94 - .../express/node_modules/accepts/LICENSE | 22 - .../express/node_modules/accepts/README.md | 135 - .../express/node_modules/accepts/index.js | 160 - .../node_modules/mime-types/HISTORY.md | 72 - .../accepts/node_modules/mime-types/LICENSE | 22 - .../accepts/node_modules/mime-types/README.md | 99 - .../accepts/node_modules/mime-types/index.js | 63 - .../node_modules/mime-db/HISTORY.md | 142 - .../mime-types/node_modules/mime-db/LICENSE | 22 - .../mime-types/node_modules/mime-db/README.md | 72 - .../mime-types/node_modules/mime-db/db.json | 6262 ----------------- .../mime-types/node_modules/mime-db/index.js | 11 - .../node_modules/mime-db/package.json | 87 - .../node_modules/mime-types/package.json | 84 - .../node_modules/negotiator/HISTORY.md | 60 - .../accepts/node_modules/negotiator/LICENSE | 23 - .../accepts/node_modules/negotiator/README.md | 161 - .../accepts/node_modules/negotiator/index.js | 62 - .../node_modules/negotiator/lib/charset.js | 101 - .../node_modules/negotiator/lib/encoding.js | 117 - .../node_modules/negotiator/lib/language.js | 111 - .../node_modules/negotiator/lib/mediaType.js | 135 - .../node_modules/negotiator/package.json | 85 - .../express/node_modules/accepts/package.json | 92 - .../content-disposition/HISTORY.md | 40 - .../node_modules/content-disposition/LICENSE | 22 - .../content-disposition/README.md | 141 - .../node_modules/content-disposition/index.js | 443 -- .../content-disposition/package.json | 66 - .../node_modules/cookie-signature/.npmignore | 4 - .../node_modules/cookie-signature/History.md | 27 - .../node_modules/cookie-signature/Makefile | 7 - .../node_modules/cookie-signature/Readme.md | 42 - .../node_modules/cookie-signature/index.js | 51 - .../cookie-signature/package.json | 56 - .../express/node_modules/cookie/.npmignore | 2 - .../express/node_modules/cookie/LICENSE | 9 - .../express/node_modules/cookie/README.md | 44 - .../express/node_modules/cookie/index.js | 75 - .../express/node_modules/cookie/package.json | 54 - .../express/node_modules/debug/.jshintrc | 3 - .../express/node_modules/debug/.npmignore | 6 - .../express/node_modules/debug/History.md | 166 - .../express/node_modules/debug/Makefile | 33 - .../express/node_modules/debug/Readme.md | 166 - .../express/node_modules/debug/bower.json | 28 - .../express/node_modules/debug/browser.js | 158 - .../express/node_modules/debug/component.json | 19 - .../express/node_modules/debug/debug.js | 197 - .../express/node_modules/debug/node.js | 209 - .../debug/node_modules/ms/.npmignore | 5 - .../debug/node_modules/ms/README.md | 33 - .../debug/node_modules/ms/index.js | 111 - .../debug/node_modules/ms/package.json | 45 - .../express/node_modules/debug/package.json | 72 - .../express/node_modules/depd/History.md | 67 - .../express/node_modules/depd/LICENSE | 22 - .../express/node_modules/depd/Readme.md | 271 - .../express/node_modules/depd/index.js | 522 -- .../depd/lib/compat/buffer-concat.js | 33 - .../depd/lib/compat/callsite-tostring.js | 101 - .../node_modules/depd/lib/compat/index.js | 69 - .../express/node_modules/depd/package.json | 67 - .../node_modules/escape-html/.npmignore | 2 - .../express/node_modules/escape-html/Makefile | 11 - .../node_modules/escape-html/Readme.md | 15 - .../node_modules/escape-html/component.json | 10 - .../express/node_modules/escape-html/index.js | 16 - .../node_modules/escape-html/package.json | 47 - .../express/node_modules/etag/HISTORY.md | 55 - .../express/node_modules/etag/LICENSE | 22 - .../express/node_modules/etag/README.md | 141 - .../express/node_modules/etag/index.js | 171 - .../etag/node_modules/crc/.npmignore | 5 - .../etag/node_modules/crc/LICENSE | 22 - .../etag/node_modules/crc/README.md | 98 - .../etag/node_modules/crc/lib/crc.js | 71 - .../etag/node_modules/crc/lib/crc1.js | 21 - .../etag/node_modules/crc/lib/crc16.js | 25 - .../etag/node_modules/crc/lib/crc16_ccitt.js | 25 - .../etag/node_modules/crc/lib/crc16_modbus.js | 25 - .../etag/node_modules/crc/lib/crc24.js | 25 - .../etag/node_modules/crc/lib/crc32.js | 25 - .../etag/node_modules/crc/lib/crc8.js | 25 - .../etag/node_modules/crc/lib/crc8_1wire.js | 25 - .../etag/node_modules/crc/lib/create.js | 11 - .../etag/node_modules/crc/lib/hex.js | 9 - .../etag/node_modules/crc/lib/index.js | 11 - .../etag/node_modules/crc/package.json | 58 - .../express/node_modules/etag/package.json | 75 - .../node_modules/finalhandler/HISTORY.md | 57 - .../express/node_modules/finalhandler/LICENSE | 22 - .../node_modules/finalhandler/README.md | 133 - .../node_modules/finalhandler/index.js | 171 - .../node_modules/finalhandler/package.json | 80 - .../express/node_modules/fresh/HISTORY.md | 24 - .../express/node_modules/fresh/LICENSE | 22 - .../express/node_modules/fresh/README.md | 58 - .../express/node_modules/fresh/index.js | 53 - .../express/node_modules/fresh/package.json | 77 - .../node_modules/media-typer/HISTORY.md | 22 - .../express/node_modules/media-typer/LICENSE | 22 - .../node_modules/media-typer/README.md | 81 - .../express/node_modules/media-typer/index.js | 270 - .../node_modules/media-typer/package.json | 58 - .../node_modules/merge-descriptors/.npmignore | 59 - .../node_modules/merge-descriptors/README.md | 49 - .../merge-descriptors/component.json | 10 - .../node_modules/merge-descriptors/index.js | 8 - .../merge-descriptors/package.json | 43 - .../express/node_modules/methods/HISTORY.md | 24 - .../express/node_modules/methods/LICENSE | 23 - .../express/node_modules/methods/README.md | 41 - .../express/node_modules/methods/index.js | 42 - .../express/node_modules/methods/package.json | 88 - .../node_modules/on-finished/HISTORY.md | 76 - .../express/node_modules/on-finished/LICENSE | 23 - .../node_modules/on-finished/README.md | 109 - .../express/node_modules/on-finished/index.js | 191 - .../on-finished/node_modules/ee-first/LICENSE | 22 - .../node_modules/ee-first/README.md | 80 - .../node_modules/ee-first/index.js | 68 - .../node_modules/ee-first/package.json | 64 - .../node_modules/on-finished/package.json | 71 - .../express/node_modules/parseurl/.npmignore | 4 - .../express/node_modules/parseurl/HISTORY.md | 42 - .../express/node_modules/parseurl/LICENSE | 24 - .../express/node_modules/parseurl/README.md | 107 - .../express/node_modules/parseurl/index.js | 136 - .../node_modules/parseurl/package.json | 80 - .../node_modules/path-to-regexp/.npmignore | 2 - .../node_modules/path-to-regexp/History.md | 16 - .../node_modules/path-to-regexp/Readme.md | 33 - .../path-to-regexp/component.json | 15 - .../node_modules/path-to-regexp/index.js | 70 - .../node_modules/path-to-regexp/package.json | 162 - .../node_modules/path-to-regexp/test.js | 616 -- .../node_modules/proxy-addr/HISTORY.md | 50 - .../express/node_modules/proxy-addr/LICENSE | 22 - .../express/node_modules/proxy-addr/README.md | 137 - .../express/node_modules/proxy-addr/index.js | 345 - .../node_modules/forwarded/HISTORY.md | 4 - .../proxy-addr/node_modules/forwarded/LICENSE | 22 - .../node_modules/forwarded/README.md | 53 - .../node_modules/forwarded/index.js | 35 - .../node_modules/forwarded/package.json | 65 - .../node_modules/ipaddr.js/.npmignore | 2 - .../node_modules/ipaddr.js/Cakefile | 18 - .../proxy-addr/node_modules/ipaddr.js/LICENSE | 19 - .../node_modules/ipaddr.js/README.md | 149 - .../node_modules/ipaddr.js/ipaddr.min.js | 1 - .../node_modules/ipaddr.js/lib/ipaddr.js | 404 -- .../node_modules/ipaddr.js/package.json | 60 - .../node_modules/ipaddr.js/src/ipaddr.coffee | 346 - .../ipaddr.js/test/ipaddr.test.coffee | 220 - .../node_modules/proxy-addr/package.json | 90 - .../express/node_modules/qs/.jshintignore | 1 - .../express/node_modules/qs/.jshintrc | 10 - .../express/node_modules/qs/.npmignore | 18 - .../express/node_modules/qs/.travis.yml | 4 - .../express/node_modules/qs/CHANGELOG.md | 68 - .../express/node_modules/qs/CONTRIBUTING.md | 1 - .../express/node_modules/qs/LICENSE | 28 - .../express/node_modules/qs/Makefile | 8 - .../express/node_modules/qs/README.md | 222 - .../express/node_modules/qs/index.js | 1 - .../express/node_modules/qs/lib/index.js | 15 - .../express/node_modules/qs/lib/parse.js | 157 - .../express/node_modules/qs/lib/stringify.js | 77 - .../express/node_modules/qs/lib/utils.js | 132 - .../express/node_modules/qs/package.json | 59 - .../express/node_modules/qs/test/parse.js | 413 -- .../express/node_modules/qs/test/stringify.js | 179 - .../node_modules/range-parser/HISTORY.md | 35 - .../express/node_modules/range-parser/LICENSE | 22 - .../node_modules/range-parser/README.md | 48 - .../node_modules/range-parser/index.js | 49 - .../node_modules/range-parser/package.json | 76 - .../express/node_modules/send/History.md | 241 - .../express/node_modules/send/LICENSE | 23 - .../express/node_modules/send/Readme.md | 192 - .../express/node_modules/send/index.js | 773 -- .../send/node_modules/destroy/README.md | 38 - .../send/node_modules/destroy/index.js | 36 - .../send/node_modules/destroy/package.json | 67 - .../send/node_modules/mime/LICENSE | 19 - .../send/node_modules/mime/README.md | 66 - .../send/node_modules/mime/mime.js | 114 - .../send/node_modules/mime/package.json | 59 - .../send/node_modules/mime/test.js | 84 - .../send/node_modules/mime/types/mime.types | 1588 ----- .../send/node_modules/mime/types/node.types | 77 - .../send/node_modules/ms/.npmignore | 5 - .../node_modules/send/node_modules/ms/LICENSE | 20 - .../send/node_modules/ms/README.md | 35 - .../send/node_modules/ms/index.js | 123 - .../send/node_modules/ms/package.json | 47 - .../express/node_modules/send/package.json | 85 - .../node_modules/serve-static/HISTORY.md | 222 - .../express/node_modules/serve-static/LICENSE | 25 - .../node_modules/serve-static/README.md | 168 - .../node_modules/serve-static/index.js | 138 - .../node_modules/serve-static/package.json | 83 - .../express/node_modules/type-is/HISTORY.md | 102 - .../express/node_modules/type-is/LICENSE | 21 - .../express/node_modules/type-is/README.md | 115 - .../express/node_modules/type-is/index.js | 226 - .../node_modules/mime-types/HISTORY.md | 72 - .../type-is/node_modules/mime-types/LICENSE | 22 - .../type-is/node_modules/mime-types/README.md | 99 - .../type-is/node_modules/mime-types/index.js | 63 - .../node_modules/mime-db/HISTORY.md | 142 - .../mime-types/node_modules/mime-db/LICENSE | 22 - .../mime-types/node_modules/mime-db/README.md | 72 - .../mime-types/node_modules/mime-db/db.json | 6262 ----------------- .../mime-types/node_modules/mime-db/index.js | 11 - .../node_modules/mime-db/package.json | 87 - .../node_modules/mime-types/package.json | 84 - .../express/node_modules/type-is/package.json | 93 - .../node_modules/utils-merge/.travis.yml | 6 - .../express/node_modules/utils-merge/LICENSE | 20 - .../node_modules/utils-merge/README.md | 34 - .../express/node_modules/utils-merge/index.js | 23 - .../node_modules/utils-merge/package.json | 61 - .../express/node_modules/vary/.npmignore | 3 - .../express/node_modules/vary/History.md | 16 - .../express/node_modules/vary/LICENSE | 22 - .../express/node_modules/vary/README.md | 59 - .../express/node_modules/vary/index.js | 112 - .../express/node_modules/vary/package.json | 71 - .../node_modules/express/package.json | 165 - .../node-reverse-wstunnel/.npmignore | 1 - .../node-reverse-wstunnel/bin/wst.js | 79 - .../node-reverse-wstunnel/index.js | 1 - .../node-reverse-wstunnel/lib/bindSockets.js | 74 - .../lib/bindSockets_reverse.js | 100 - .../lib/https_override.js | 39 - .../node-reverse-wstunnel/lib/wst_client.js | 67 - .../lib/wst_client_reverse.js | 104 - .../node-reverse-wstunnel/lib/wst_server.js | 82 - .../lib/wst_server_reverse.js | 134 - .../node_modules/optimist/.travis.yml | 4 - .../node_modules/optimist/LICENSE | 21 - .../node_modules/optimist/example/bool.js | 10 - .../optimist/example/boolean_double.js | 7 - .../optimist/example/boolean_single.js | 7 - .../optimist/example/default_hash.js | 8 - .../optimist/example/default_singles.js | 7 - .../node_modules/optimist/example/divide.js | 8 - .../optimist/example/line_count.js | 20 - .../optimist/example/line_count_options.js | 29 - .../optimist/example/line_count_wrap.js | 29 - .../node_modules/optimist/example/nonopt.js | 4 - .../node_modules/optimist/example/reflect.js | 2 - .../node_modules/optimist/example/short.js | 3 - .../node_modules/optimist/example/string.js | 11 - .../optimist/example/usage-options.js | 19 - .../node_modules/optimist/example/xup.js | 10 - .../node_modules/optimist/index.js | 343 - .../node_modules/minimist/.travis.yml | 4 - .../optimist/node_modules/minimist/LICENSE | 18 - .../node_modules/minimist/example/parse.js | 2 - .../optimist/node_modules/minimist/index.js | 187 - .../node_modules/minimist/package.json | 67 - .../node_modules/minimist/readme.markdown | 73 - .../node_modules/minimist/test/bool.js | 119 - .../node_modules/minimist/test/dash.js | 24 - .../minimist/test/default_bool.js | 20 - .../node_modules/minimist/test/dotted.js | 22 - .../node_modules/minimist/test/long.js | 31 - .../node_modules/minimist/test/num.js | 36 - .../node_modules/minimist/test/parse.js | 197 - .../minimist/test/parse_modified.js | 9 - .../node_modules/minimist/test/short.js | 67 - .../node_modules/minimist/test/whitespace.js | 8 - .../optimist/node_modules/wordwrap/.npmignore | 1 - .../node_modules/wordwrap/README.markdown | 70 - .../node_modules/wordwrap/example/center.js | 10 - .../node_modules/wordwrap/example/meat.js | 3 - .../optimist/node_modules/wordwrap/index.js | 76 - .../node_modules/wordwrap/package.json | 61 - .../node_modules/wordwrap/test/break.js | 30 - .../node_modules/wordwrap/test/idleness.txt | 63 - .../node_modules/wordwrap/test/wrap.js | 31 - .../node_modules/optimist/package.json | 64 - .../node_modules/optimist/readme.markdown | 513 -- .../node_modules/optimist/test/_.js | 71 - .../node_modules/optimist/test/_/argv.js | 2 - .../node_modules/optimist/test/_/bin.js | 3 - .../node_modules/optimist/test/dash.js | 31 - .../node_modules/optimist/test/parse.js | 446 -- .../optimist/test/parse_modified.js | 14 - .../node_modules/optimist/test/short.js | 16 - .../node_modules/optimist/test/usage.js | 292 - .../node_modules/optimist/test/whitespace.js | 8 - .../node_modules/under_score/LICENSE | 22 - .../node_modules/under_score/README.md | 8 - .../node_modules/under_score/index.js | 1 - .../under_score/lib/under_score.js | 693 -- .../node_modules/underscore/LICENSE | 23 - .../node_modules/underscore/README.md | 22 - .../node_modules/underscore/package.json | 69 - .../node_modules/underscore/underscore-min.js | 6 - .../node_modules/underscore/underscore.js | 1415 ---- .../node_modules/under_score/package.json | 51 - .../under_score/test/test_under_score.js | 129 - .../node_modules/websocket/.jshintrc | 88 - .../node_modules/websocket/CHANGELOG.md | 164 - .../node_modules/websocket/LICENSE | 177 - .../node_modules/websocket/Makefile | 11 - .../node_modules/websocket/README.md | 296 - .../node_modules/websocket/binding.gyp | 16 - .../node_modules/websocket/build/Makefile | 337 - .../Release/.deps/Release/bufferutil.node.d | 1 - .../Release/obj.target/bufferutil.node.d | 1 - .../obj.target/bufferutil/src/bufferutil.o.d | 29 - .../Release/obj.target/validation.node.d | 1 - .../obj.target/validation/src/validation.o.d | 29 - .../Release/.deps/Release/validation.node.d | 1 - .../websocket/build/Release/bufferutil.node | Bin 18514 -> 0 bytes .../websocket/build/Release/linker.lock | 0 .../build/Release/obj.target/bufferutil.node | Bin 18514 -> 0 bytes .../obj.target/bufferutil/src/bufferutil.o | Bin 13856 -> 0 bytes .../build/Release/obj.target/validation.node | Bin 18448 -> 0 bytes .../obj.target/validation/src/validation.o | Bin 12552 -> 0 bytes .../websocket/build/Release/validation.node | Bin 18448 -> 0 bytes .../websocket/build/binding.Makefile | 6 - .../websocket/build/bufferutil.target.mk | 131 - .../node_modules/websocket/build/config.gypi | 123 - .../websocket/build/validation.target.mk | 131 - .../node_modules/websocket/builderror.log | 0 .../websocket/docs/W3CWebSocket.md | 50 - .../websocket/docs/WebSocketClient.md | 108 - .../websocket/docs/WebSocketConnection.md | 131 - .../websocket/docs/WebSocketFrame.md | 66 - .../websocket/docs/WebSocketRequest.md | 113 - .../websocket/docs/WebSocketServer.md | 105 - .../node_modules/websocket/docs/index.md | 13 - .../node_modules/websocket/gulpfile.js | 14 - .../node_modules/websocket/index.js | 1 - .../websocket/lib/BufferUtil.fallback.js | 52 - .../node_modules/websocket/lib/BufferUtil.js | 17 - .../node_modules/websocket/lib/Deprecation.js | 32 - .../websocket/lib/Validation.fallback.js | 12 - .../node_modules/websocket/lib/Validation.js | 17 - .../websocket/lib/W3CWebSocket.js | 264 - .../websocket/lib/WebSocketClient.js | 348 - .../websocket/lib/WebSocketConnection.js | 858 --- .../websocket/lib/WebSocketFrame.js | 279 - .../websocket/lib/WebSocketRequest.js | 524 -- .../websocket/lib/WebSocketRouter.js | 157 - .../websocket/lib/WebSocketRouterRequest.js | 54 - .../websocket/lib/WebSocketServer.js | 245 - .../node_modules/websocket/lib/browser.js | 35 - .../node_modules/websocket/lib/utils.js | 60 - .../node_modules/websocket/lib/version.js | 1 - .../node_modules/websocket/lib/websocket.js | 11 - .../websocket/node_modules/debug/.jshintrc | 3 - .../websocket/node_modules/debug/.npmignore | 6 - .../websocket/node_modules/debug/History.md | 166 - .../websocket/node_modules/debug/Makefile | 33 - .../websocket/node_modules/debug/Readme.md | 166 - .../websocket/node_modules/debug/bower.json | 28 - .../websocket/node_modules/debug/browser.js | 158 - .../node_modules/debug/component.json | 19 - .../websocket/node_modules/debug/debug.js | 197 - .../websocket/node_modules/debug/node.js | 209 - .../debug/node_modules/ms/.npmignore | 5 - .../debug/node_modules/ms/README.md | 33 - .../debug/node_modules/ms/index.js | 111 - .../debug/node_modules/ms/package.json | 45 - .../websocket/node_modules/debug/package.json | 72 - .../websocket/node_modules/nan/.dntrc | 36 - .../websocket/node_modules/nan/LICENSE | 46 - .../websocket/node_modules/nan/README.md | 947 --- .../node_modules/nan/build/config.gypi | 38 - .../node_modules/nan/include_dirs.js | 1 - .../websocket/node_modules/nan/nan.h | 1910 ----- .../websocket/node_modules/nan/package.json | 68 - .../typedarray-to-buffer/.travis.yml | 7 - .../typedarray-to-buffer/.zuul.yml | 18 - .../node_modules/typedarray-to-buffer/LICENSE | 21 - .../typedarray-to-buffer/README.md | 78 - .../typedarray-to-buffer/index.js | 31 - .../node_modules/is-typedarray/LICENSE.md | 18 - .../node_modules/is-typedarray/README.md | 16 - .../node_modules/is-typedarray/index.js | 39 - .../node_modules/is-typedarray/package.json | 55 - .../node_modules/is-typedarray/test.js | 34 - .../typedarray-to-buffer/package.json | 75 - .../typedarray-to-buffer/test/basic.js | 52 - .../node_modules/websocket/package.json | 80 - .../node_modules/websocket/src/bufferutil.cc | 117 - .../node_modules/websocket/src/validation.cc | 145 - .../websocket/vendor/FastBufferList.js | 192 - .../node-reverse-wstunnel/package.json | 43 - .../node-reverse-wstunnel/readme.md | 138 - s4t-server-node/s4t-wamp-server.js | 111 - s4t-server-python/__init__.py | 24 - s4t-server-python/s4t-wamp-server.py | 85 +- s4t-server-python/yos4t-wamp-server.py | 125 + 633 files changed, 380 insertions(+), 84675 deletions(-) rename {s4t-server-node/.crossbar => .crossbar}/config.json (92%) delete mode 100644 s4t-server-node/.crossbar/node.pid rename s4t-server-node/{node_modules/node-reverse-wstunnel/lib/wst.js => bin/server} (82%) mode change 100644 => 100755 rename s4t-server-node/{node_modules/node-reverse-wstunnel/bin/wstt.js => index.js} (96%) mode change 100755 => 100644 rename s4t-server-node/{node_modules/node-reverse-wstunnel/libr/https_override.js => lib/getIP.js} (72%) rename s4t-server-node/{node_modules/node-reverse-wstunnel/LICENSE => lib/s4t_WS.js} (93%) create mode 100644 s4t-server-node/lib/s4t_wamp_server.js delete mode 100644 s4t-server-node/node_modules/autobahn/.npmignore delete mode 100644 s4t-server-node/node_modules/autobahn/Makefile delete mode 100644 s4t-server-node/node_modules/autobahn/README.md delete mode 100644 s4t-server-node/node_modules/autobahn/index.js delete mode 100644 s4t-server-node/node_modules/autobahn/lib/auth/cra.js delete mode 100644 s4t-server-node/node_modules/autobahn/lib/auth/persona.js delete mode 100644 s4t-server-node/node_modules/autobahn/lib/autobahn.js delete mode 100644 s4t-server-node/node_modules/autobahn/lib/configure.js delete mode 100644 s4t-server-node/node_modules/autobahn/lib/connection.js delete mode 100644 s4t-server-node/node_modules/autobahn/lib/log.js delete mode 100644 s4t-server-node/node_modules/autobahn/lib/polyfill.js delete mode 100644 s4t-server-node/node_modules/autobahn/lib/polyfill/array.js delete mode 100644 s4t-server-node/node_modules/autobahn/lib/polyfill/console.js delete mode 100644 s4t-server-node/node_modules/autobahn/lib/polyfill/function.js delete mode 100644 s4t-server-node/node_modules/autobahn/lib/polyfill/json.js delete mode 100644 s4t-server-node/node_modules/autobahn/lib/polyfill/object.js delete mode 100644 s4t-server-node/node_modules/autobahn/lib/polyfill/string.js delete mode 100644 s4t-server-node/node_modules/autobahn/lib/polyfill/typedarray.js delete mode 100644 s4t-server-node/node_modules/autobahn/lib/session.js delete mode 100644 s4t-server-node/node_modules/autobahn/lib/transport/longpoll.js delete mode 100644 s4t-server-node/node_modules/autobahn/lib/transport/websocket.js delete mode 100644 s4t-server-node/node_modules/autobahn/lib/util.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/README.md delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/aes.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/cipher-core.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/core.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/enc-base64.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/enc-hex.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/enc-latin1.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/enc-utf16.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/enc-utf8.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/evpkdf.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/format-hex.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/format-openssl.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-md5.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-ripemd160.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha1.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha224.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha256.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha3.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha384.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha512.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/index.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/lib-typedarrays.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/md5.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/mode-cfb.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/mode-ctr-gladman.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/mode-ctr.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/mode-ecb.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/mode-ofb.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/package.json delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-ansix923.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-iso10126.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-iso97971.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-nopadding.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-pkcs7.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-zeropadding.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pbkdf2.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/rabbit-legacy.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/rabbit.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/rc4.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/ripemd160.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha1.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha224.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha256.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha3.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha384.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha512.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/tripledes.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/crypto-js/x64-core.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/LICENSE.txt delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/README.md delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/callbacks.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/cancelable.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/delay.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/es6-shim/Promise.browserify-es6.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/es6-shim/Promise.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/es6-shim/README.md delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/function.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/generator.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/guard.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/keys.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/lib/Promise.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/lib/Scheduler.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/lib/TimeoutError.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/lib/apply.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/array.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/flow.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/fold.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/inspect.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/iterate.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/progress.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/timed.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/unhandledRejection.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/with.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/lib/env.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/lib/format.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/lib/liftAll.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/lib/makePromise.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/lib/state.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/monitor.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/monitor/ConsoleReporter.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/monitor/PromiseMonitor.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/monitor/README.md delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/monitor/console.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/monitor/error.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/node.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/node/function.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/package.json delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/parallel.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/pipeline.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/poll.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/sequence.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/timeout.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/unfold.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/unfold/list.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/when/when.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/.npmignore delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/.travis.yml delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/History.md delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/Makefile delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/README.md delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/binding.gyp delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/build/Makefile delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/bufferutil.node.d delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/obj.target/bufferutil.node.d delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/obj.target/validation.node.d delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/obj.target/validation/src/validation.o.d delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/validation.node.d delete mode 100755 s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/bufferutil.node delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/linker.lock delete mode 100755 s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/obj.target/bufferutil.node delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/obj.target/bufferutil/src/bufferutil.o delete mode 100755 s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/obj.target/validation.node delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/obj.target/validation/src/validation.o delete mode 100755 s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/validation.node delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/build/binding.Makefile delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/build/bufferutil.target.mk delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/build/config.gypi delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/build/validation.target.mk delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/builderror.log delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/index.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/lib/BufferPool.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/lib/BufferUtil.fallback.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/lib/BufferUtil.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/lib/ErrorCodes.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Extensions.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/lib/PerMessageDeflate.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Receiver.hixie.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Receiver.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Sender.hixie.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Sender.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Validation.fallback.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Validation.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/lib/WebSocket.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/lib/WebSocketServer.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/lib/browser.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/.dntrc delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/CHANGELOG.md delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/LICENSE.md delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/README.md delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/appveyor.yml delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/include_dirs.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/nan.h delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/package.json delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/options/.npmignore delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/options/Makefile delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/options/README.md delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/options/lib/options.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/options/package.json delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/.npmignore delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/.travis.yml delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/README.md delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/index.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/package.json delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/test.js delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/package.json delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/src/bufferutil.cc delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/src/validation.cc delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/wscat/README.md delete mode 100755 s4t-server-node/node_modules/autobahn/node_modules/ws/wscat/bin/wscat delete mode 100644 s4t-server-node/node_modules/autobahn/node_modules/ws/wscat/package.json delete mode 100644 s4t-server-node/node_modules/autobahn/package.json delete mode 100644 s4t-server-node/node_modules/autobahn/test/test.js delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_connect.js delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_pubsub_basic.js delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_pubsub_basic.txt delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_pubsub_complex.js delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_pubsub_complex.txt delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_pubsub_options.js delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_pubsub_options.txt delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_rpc_arguments.js delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_rpc_arguments.txt delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_rpc_complex.js delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_rpc_complex.txt delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_rpc_error.js delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_rpc_error.txt delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_rpc_options.js delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_rpc_options.txt delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_rpc_progress.js delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_rpc_progress.txt delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_rpc_routing.js delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_rpc_routing.txt delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_rpc_slowsquare.js delete mode 100644 s4t-server-node/node_modules/autobahn/test/test_rpc_slowsquare.txt delete mode 100644 s4t-server-node/node_modules/autobahn/test/testutil.js delete mode 100644 s4t-server-node/node_modules/express/History.md delete mode 100644 s4t-server-node/node_modules/express/LICENSE delete mode 100644 s4t-server-node/node_modules/express/Readme.md delete mode 100644 s4t-server-node/node_modules/express/index.js delete mode 100644 s4t-server-node/node_modules/express/lib/application.js delete mode 100644 s4t-server-node/node_modules/express/lib/express.js delete mode 100644 s4t-server-node/node_modules/express/lib/middleware/init.js delete mode 100644 s4t-server-node/node_modules/express/lib/middleware/query.js delete mode 100644 s4t-server-node/node_modules/express/lib/request.js delete mode 100644 s4t-server-node/node_modules/express/lib/response.js delete mode 100644 s4t-server-node/node_modules/express/lib/router/index.js delete mode 100644 s4t-server-node/node_modules/express/lib/router/layer.js delete mode 100644 s4t-server-node/node_modules/express/lib/router/route.js delete mode 100644 s4t-server-node/node_modules/express/lib/utils.js delete mode 100644 s4t-server-node/node_modules/express/lib/view.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/HISTORY.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/HISTORY.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/HISTORY.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/db.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/HISTORY.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/charset.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/encoding.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/language.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/mediaType.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/accepts/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/content-disposition/HISTORY.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/content-disposition/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/content-disposition/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/content-disposition/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/content-disposition/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/cookie-signature/.npmignore delete mode 100644 s4t-server-node/node_modules/express/node_modules/cookie-signature/History.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/cookie-signature/Makefile delete mode 100644 s4t-server-node/node_modules/express/node_modules/cookie-signature/Readme.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/cookie-signature/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/cookie-signature/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/cookie/.npmignore delete mode 100644 s4t-server-node/node_modules/express/node_modules/cookie/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/cookie/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/cookie/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/cookie/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/debug/.jshintrc delete mode 100644 s4t-server-node/node_modules/express/node_modules/debug/.npmignore delete mode 100644 s4t-server-node/node_modules/express/node_modules/debug/History.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/debug/Makefile delete mode 100644 s4t-server-node/node_modules/express/node_modules/debug/Readme.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/debug/bower.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/debug/browser.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/debug/component.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/debug/debug.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/debug/node.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/debug/node_modules/ms/.npmignore delete mode 100644 s4t-server-node/node_modules/express/node_modules/debug/node_modules/ms/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/debug/node_modules/ms/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/debug/node_modules/ms/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/debug/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/depd/History.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/depd/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/depd/Readme.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/depd/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/depd/lib/compat/buffer-concat.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/depd/lib/compat/callsite-tostring.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/depd/lib/compat/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/depd/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/escape-html/.npmignore delete mode 100644 s4t-server-node/node_modules/express/node_modules/escape-html/Makefile delete mode 100644 s4t-server-node/node_modules/express/node_modules/escape-html/Readme.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/escape-html/component.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/escape-html/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/escape-html/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/HISTORY.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/.npmignore delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc1.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16_ccitt.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16_modbus.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc24.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc32.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc8.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc8_1wire.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/create.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/hex.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/etag/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/finalhandler/HISTORY.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/finalhandler/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/finalhandler/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/finalhandler/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/finalhandler/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/fresh/HISTORY.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/fresh/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/fresh/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/fresh/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/fresh/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/media-typer/HISTORY.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/media-typer/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/media-typer/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/media-typer/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/media-typer/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/merge-descriptors/.npmignore delete mode 100644 s4t-server-node/node_modules/express/node_modules/merge-descriptors/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/merge-descriptors/component.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/merge-descriptors/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/merge-descriptors/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/methods/HISTORY.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/methods/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/methods/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/methods/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/methods/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/on-finished/HISTORY.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/on-finished/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/on-finished/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/on-finished/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/on-finished/node_modules/ee-first/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/on-finished/node_modules/ee-first/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/on-finished/node_modules/ee-first/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/on-finished/node_modules/ee-first/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/on-finished/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/parseurl/.npmignore delete mode 100644 s4t-server-node/node_modules/express/node_modules/parseurl/HISTORY.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/parseurl/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/parseurl/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/parseurl/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/parseurl/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/path-to-regexp/.npmignore delete mode 100644 s4t-server-node/node_modules/express/node_modules/path-to-regexp/History.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/path-to-regexp/Readme.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/path-to-regexp/component.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/path-to-regexp/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/path-to-regexp/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/path-to-regexp/test.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/proxy-addr/HISTORY.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/proxy-addr/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/proxy-addr/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/proxy-addr/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/HISTORY.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/.npmignore delete mode 100644 s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/Cakefile delete mode 100644 s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/ipaddr.min.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/lib/ipaddr.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/src/ipaddr.coffee delete mode 100644 s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/test/ipaddr.test.coffee delete mode 100644 s4t-server-node/node_modules/express/node_modules/proxy-addr/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/qs/.jshintignore delete mode 100644 s4t-server-node/node_modules/express/node_modules/qs/.jshintrc delete mode 100644 s4t-server-node/node_modules/express/node_modules/qs/.npmignore delete mode 100644 s4t-server-node/node_modules/express/node_modules/qs/.travis.yml delete mode 100644 s4t-server-node/node_modules/express/node_modules/qs/CHANGELOG.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/qs/CONTRIBUTING.md delete mode 100755 s4t-server-node/node_modules/express/node_modules/qs/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/qs/Makefile delete mode 100755 s4t-server-node/node_modules/express/node_modules/qs/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/qs/index.js delete mode 100755 s4t-server-node/node_modules/express/node_modules/qs/lib/index.js delete mode 100755 s4t-server-node/node_modules/express/node_modules/qs/lib/parse.js delete mode 100755 s4t-server-node/node_modules/express/node_modules/qs/lib/stringify.js delete mode 100755 s4t-server-node/node_modules/express/node_modules/qs/lib/utils.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/qs/package.json delete mode 100755 s4t-server-node/node_modules/express/node_modules/qs/test/parse.js delete mode 100755 s4t-server-node/node_modules/express/node_modules/qs/test/stringify.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/range-parser/HISTORY.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/range-parser/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/range-parser/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/range-parser/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/range-parser/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/send/History.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/send/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/send/Readme.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/send/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/send/node_modules/destroy/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/send/node_modules/destroy/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/send/node_modules/destroy/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/mime.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/test.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/types/mime.types delete mode 100644 s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/types/node.types delete mode 100644 s4t-server-node/node_modules/express/node_modules/send/node_modules/ms/.npmignore delete mode 100644 s4t-server-node/node_modules/express/node_modules/send/node_modules/ms/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/send/node_modules/ms/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/send/node_modules/ms/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/send/node_modules/ms/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/send/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/serve-static/HISTORY.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/serve-static/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/serve-static/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/serve-static/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/serve-static/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/type-is/HISTORY.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/type-is/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/type-is/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/type-is/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/HISTORY.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/type-is/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/utils-merge/.travis.yml delete mode 100644 s4t-server-node/node_modules/express/node_modules/utils-merge/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/utils-merge/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/utils-merge/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/utils-merge/package.json delete mode 100644 s4t-server-node/node_modules/express/node_modules/vary/.npmignore delete mode 100644 s4t-server-node/node_modules/express/node_modules/vary/History.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/vary/LICENSE delete mode 100644 s4t-server-node/node_modules/express/node_modules/vary/README.md delete mode 100644 s4t-server-node/node_modules/express/node_modules/vary/index.js delete mode 100644 s4t-server-node/node_modules/express/node_modules/vary/package.json delete mode 100644 s4t-server-node/node_modules/express/package.json delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/.npmignore delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/bin/wst.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/index.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/lib/bindSockets.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/lib/bindSockets_reverse.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/lib/https_override.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/lib/wst_client.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/lib/wst_client_reverse.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/lib/wst_server.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/lib/wst_server_reverse.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/.travis.yml delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/LICENSE delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/bool.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/boolean_double.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/boolean_single.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/default_hash.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/default_singles.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/divide.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/line_count.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/line_count_options.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/line_count_wrap.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/nonopt.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/reflect.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/short.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/string.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/usage-options.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/xup.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/index.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/.travis.yml delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/LICENSE delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/example/parse.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/index.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/package.json delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/readme.markdown delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/bool.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/dash.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/default_bool.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/dotted.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/long.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/num.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/parse.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/parse_modified.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/short.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/whitespace.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/.npmignore delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/README.markdown delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/example/center.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/example/meat.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/index.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/package.json delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/test/break.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/test/idleness.txt delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/test/wrap.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/package.json delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/readme.markdown delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/_.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/_/argv.js delete mode 100755 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/_/bin.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/dash.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/parse.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/parse_modified.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/short.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/usage.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/whitespace.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/LICENSE delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/README.md delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/index.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/lib/under_score.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/node_modules/underscore/LICENSE delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/node_modules/underscore/README.md delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/node_modules/underscore/package.json delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/node_modules/underscore/underscore-min.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/node_modules/underscore/underscore.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/package.json delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/test/test_under_score.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/.jshintrc delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/CHANGELOG.md delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/LICENSE delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/Makefile delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/README.md delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/binding.gyp delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Makefile delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/bufferutil.node.d delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/obj.target/bufferutil.node.d delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/obj.target/validation.node.d delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/obj.target/validation/src/validation.o.d delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/validation.node.d delete mode 100755 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/bufferutil.node delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/linker.lock delete mode 100755 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/obj.target/bufferutil.node delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/obj.target/bufferutil/src/bufferutil.o delete mode 100755 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/obj.target/validation.node delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/obj.target/validation/src/validation.o delete mode 100755 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/validation.node delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/binding.Makefile delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/bufferutil.target.mk delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/config.gypi delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/validation.target.mk delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/builderror.log delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/W3CWebSocket.md delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/WebSocketClient.md delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/WebSocketConnection.md delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/WebSocketFrame.md delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/WebSocketRequest.md delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/WebSocketServer.md delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/index.md delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/gulpfile.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/index.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/BufferUtil.fallback.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/BufferUtil.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/Deprecation.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/Validation.fallback.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/Validation.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/W3CWebSocket.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketClient.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketConnection.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketFrame.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketRequest.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketRouter.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketRouterRequest.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketServer.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/browser.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/utils.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/version.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/websocket.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/.jshintrc delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/.npmignore delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/History.md delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/Makefile delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/Readme.md delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/bower.json delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/browser.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/component.json delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/debug.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/node.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/node_modules/ms/.npmignore delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/node_modules/ms/README.md delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/node_modules/ms/index.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/node_modules/ms/package.json delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/package.json delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/.dntrc delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/LICENSE delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/README.md delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/build/config.gypi delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/include_dirs.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/nan.h delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/package.json delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/.travis.yml delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/.zuul.yml delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/LICENSE delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/README.md delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/index.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray/LICENSE.md delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray/README.md delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray/index.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray/package.json delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray/test.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/package.json delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/test/basic.js delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/package.json delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/src/bufferutil.cc delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/src/validation.cc delete mode 100644 s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/vendor/FastBufferList.js delete mode 100755 s4t-server-node/node_modules/node-reverse-wstunnel/package.json delete mode 100755 s4t-server-node/node_modules/node-reverse-wstunnel/readme.md delete mode 100644 s4t-server-node/s4t-wamp-server.js delete mode 100644 s4t-server-python/__init__.py create mode 100644 s4t-server-python/yos4t-wamp-server.py diff --git a/s4t-server-node/.crossbar/config.json b/.crossbar/config.json similarity index 92% rename from s4t-server-node/.crossbar/config.json rename to .crossbar/config.json index 2371cfe..9243667 100644 --- a/s4t-server-node/.crossbar/config.json +++ b/.crossbar/config.json @@ -17,7 +17,8 @@ "publish": true, "subscribe": true, "call": true, - "register": true + "register": true, + "debug":true } ] } diff --git a/.gitignore b/.gitignore index 1819a7a..db06cf0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ s4t-server-node/node_modules +s4t-server-node/lib/node_modules diff --git a/s4t-server-node/.crossbar/node.pid b/s4t-server-node/.crossbar/node.pid deleted file mode 100644 index d1403fd..0000000 --- a/s4t-server-node/.crossbar/node.pid +++ /dev/null @@ -1,16 +0,0 @@ -{ - "pid": 9890, - "options": { - "loglevel": "info", - "logdir": null, - "config": "/mnt/Data-Partition/Develop/crossbar.io/s4t/.crossbar/config.json", - "cbdir": "/mnt/Data-Partition/Develop/crossbar.io/s4t/.crossbar", - "command": "start", - "reactor": null, - "debug": false - }, - "argv": [ - "/mnt/Data-Partition/IoT-Communication/pypy-2.4.0-linux/bin/crossbar", - "start" - ] -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/lib/wst.js b/s4t-server-node/bin/server old mode 100644 new mode 100755 similarity index 82% rename from s4t-server-node/node_modules/node-reverse-wstunnel/lib/wst.js rename to s4t-server-node/bin/server index 83adf83..618c5f1 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/lib/wst.js +++ b/s4t-server-node/bin/server @@ -1,3 +1,5 @@ +#!/usr/bin/env node + /* The MIT License (MIT) @@ -22,13 +24,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -(function() { - module.exports = { - server: require("./wst_server"), - client: require("./wst_client"), - server_reverse : require("./wst_server_reverse"), - client_reverse : require("./wst_client_reverse"), - }; +var s4t = require("../lib/s4t_WS"); -}).call(this); +var server = new s4t.server +server.start(6655); \ No newline at end of file diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/bin/wstt.js b/s4t-server-node/index.js old mode 100755 new mode 100644 similarity index 96% rename from s4t-server-node/node_modules/node-reverse-wstunnel/bin/wstt.js rename to s4t-server-node/index.js index 8b0376e..d904a97 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/bin/wstt.js +++ b/s4t-server-node/index.js @@ -1,5 +1,3 @@ -#!/usr/bin/env node - /* The MIT License (MIT) @@ -23,4 +21,5 @@ 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. */ -require("./wst") + +module.exports = require('./lib/s4t_WS'); \ No newline at end of file diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/libr/https_override.js b/s4t-server-node/lib/getIP.js similarity index 72% rename from s4t-server-node/node_modules/node-reverse-wstunnel/libr/https_override.js rename to s4t-server-node/lib/getIP.js index 7262e55..cc3c6c7 100644 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/libr/https_override.js +++ b/s4t-server-node/lib/getIP.js @@ -1,18 +1,14 @@ /* The MIT License (MIT) - Copyright (c) 2014 Andrea Rocco Lotronto - 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 @@ -22,18 +18,18 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -(function() { - var https, old_https_request; - - https = require("https"); - - old_https_request = https.request; - - https.request = function() { - var options; - options = arguments[0]; - options.rejectUnauthorized = false; - return old_https_request.apply(void 0, Array.apply(null, arguments)); - }; - -}).call(this); +var networkInterfaces = require('os').networkInterfaces(); + +module.exports = function (interface, version) { + var ip ; + for (var ifName in networkInterfaces){ + if(ifName == interface){ + var ifDetails = networkInterfaces[ifName]; + for (var i = 0; ifDetails[i].family == version; i++){ + ip = ifDetails[i].address; + } + } + } + + return ip; +}; diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/LICENSE b/s4t-server-node/lib/s4t_WS.js similarity index 93% rename from s4t-server-node/node_modules/node-reverse-wstunnel/LICENSE rename to s4t-server-node/lib/s4t_WS.js index 42eace7..9461824 100644 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/LICENSE +++ b/s4t-server-node/lib/s4t_WS.js @@ -1,3 +1,4 @@ + /* The MIT License (MIT) Copyright (c) 2014 Andrea Rocco Lotronto @@ -18,4 +19,9 @@ 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 +SOFTWARE. +*/ + +module.exports = { + server: require("./s4t_wamp_server") +}; \ No newline at end of file diff --git a/s4t-server-node/lib/s4t_wamp_server.js b/s4t-server-node/lib/s4t_wamp_server.js new file mode 100644 index 0000000..d72be80 --- /dev/null +++ b/s4t-server-node/lib/s4t_wamp_server.js @@ -0,0 +1,143 @@ +/* +The MIT License (MIT) +Copyright (c) 2014 Andrea Rocco Lotronto +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +var autobahn = require('autobahn'); +var express = require('express'); + + +s4t_wamp_server = function(){ + + +} + +s4t_wamp_server.prototype.start = function(restPort){ + + + var boards = {}; + var getIP = require('./getIP.js'); + var IPLocal = getIP('eth0', 'IPv4'); + + var url_wamp_router = "ws://ip:port/ws"; //example of url wamp router + + var connection = new autobahn.Connection({ + url: url_wamp_router, + realm: "s4t" + }); + + var topic_command = 'board.command' + var topic_connection = 'board.connection' + + connection.onopen = function (session, details) { + + + var rest = express(); + + rest.get('/', function (req, res){ + res.send('API:
http://'+IPLocal+':'+restPort+'/list for board list'); + }); + + rest.get('/command/', function (req, res){ + + //DEBUG Message + console.log('POST::::'+req.originalUrl); + var board = req.query.board + var command = req.query.command + + if(boards[board] != undefined){ + //DEBUG Message + // + console.log("ID exsist"); + //random port for reverse service + var port = randomIntInc(6000,7000); + session.publish(topic_command, [board, command, port]); + if(command == 'ssh'){ + res.send("ssh -p "+port+" root@"+IPLocal); + } + if(command == 'ideino'){ + res.send("http://"+IPLocal+":"+port); + } + + } + else + res.send("Error: malformed REST "); + + }); + + rest.get('/list/', function (req, res){ + + var board_list=''; + + for (var i in boards){ + board_list += boards[i]; + command_list = "ssh" + } + + res.send('List of the board: '+board_list+'
'+'use URL: '+IPLocal+":"+'6655'+"/commad/?board=board_name&command=ssh|ideino"); + }); + + rest.listen(restPort); + console.log("Server REST started on: http://"+IPLocal+":"+restPort); + + console.log("Connected to router WAMP"); + // Publish, Subscribe, Call and Register + + var onBoardConnected = function (args){ + //registrare le schede che si connettono + if(args[1]=='connection'){ + boards[args[0]] = args[0]; + //DEBUGGG Message + console.log("Board connected:"+args[0]+" board state:"+args[1]); + //DEBUGGG Message + console.log("List of board::"+boards.length); + for (var i in boards){ + console.log('Key: '+i+' value: '+boards[i]); + } + + } + if(args[1]=='disconnect'){ + delete boards[args[0]]; + //DEBUGGG + console.log("Board disconnected:"+args[0]+" board state:"+args[1]); + //DEBUGGG + console.log("List of the board::"+boards.length); + for (var i in boards){ + console.log('Key: '+i+' value: '+boards[i]); + } + } + } + + session.subscribe(topic_connection, onBoardConnected); + console.log("Subsscribe to topic: "+topic_connection); + }; + + connection.onclose = function (reason, details) { + // handle connection lost + } + + connection.open(); + +} + +//function for pseudo random number +function randomIntInc (low, high) { + return Math.floor(Math.random() * (high - low + 1) + low); +} + +module.exports = s4t_wamp_server; \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/.npmignore b/s4t-server-node/node_modules/autobahn/.npmignore deleted file mode 100644 index 0effafd..0000000 --- a/s4t-server-node/node_modules/autobahn/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -npm-debug.log -node_modules -.*.swp -.lock-* -build diff --git a/s4t-server-node/node_modules/autobahn/Makefile b/s4t-server-node/node_modules/autobahn/Makefile deleted file mode 100644 index be182a7..0000000 --- a/s4t-server-node/node_modules/autobahn/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -## http://dontkry.com/posts/code/browserify-and-the-universal-module-definition.html -## http://addyosmani.com/writing-modular-js/ - -## -## ~/.npmrc -## npm config edit -## npm adduser -## - -all: bundle - -bundle: - browserify lib/autobahn.js --standalone autobahn -o build/autobahn.js - -test: - npm test - -install: - npm install ws - npm install when - npm install crypto-js - npm install browserify - -publish: - npm publish diff --git a/s4t-server-node/node_modules/autobahn/README.md b/s4t-server-node/node_modules/autobahn/README.md deleted file mode 100644 index 80ef3c8..0000000 --- a/s4t-server-node/node_modules/autobahn/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# AutobahnJS - -AutobahnJS implements **[The Web Application Messaging Protocol V2](http://wamp.ws/)** in JavaScript. - -WAMP provides asynchronous **Remote Procedure Calls** and **Publish & Subscribe** for applications in *one* protocol running over [WebSocket](http://tools.ietf.org/html/rfc6455). - -AutobahnJS runs on both **Web browsers** and **[Node.js](http://nodejs.org/)**, and implements the following WAMP roles: - -1. Publisher -2. Subscriber -3. Caller -4. Callee - -AutobahnJS is part of the [Autobahn project](http://autobahn.ws/), MIT licensed, and full source code can be found on [GitHub](https://github.com/tavendo/AutobahnJS/). diff --git a/s4t-server-node/node_modules/autobahn/index.js b/s4t-server-node/node_modules/autobahn/index.js deleted file mode 100644 index 19cdd99..0000000 --- a/s4t-server-node/node_modules/autobahn/index.js +++ /dev/null @@ -1,14 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -module.exports = require('./lib/autobahn'); diff --git a/s4t-server-node/node_modules/autobahn/lib/auth/cra.js b/s4t-server-node/node_modules/autobahn/lib/auth/cra.js deleted file mode 100644 index fbf1d9a..0000000 --- a/s4t-server-node/node_modules/autobahn/lib/auth/cra.js +++ /dev/null @@ -1,39 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -// require('assert') would be nice .. but it does not -// work with Google Closure after Browserify - -var crypto = require('crypto-js'); - -// PBKDF2-base key derivation function for salted WAMP-CRA -// -function derive_key (secret, salt, iterations, keylen) { - var iterations = iterations || 1000; - var keylen = keylen || 32; - var config = { - keySize: keylen / 4, - iterations: iterations, - hasher: crypto.algo.SHA256 - } - var key = crypto.PBKDF2(secret, salt, config); - return key.toString(crypto.enc.Base64); -} - - -function sign (key, challenge) { - return crypto.HmacSHA256(challenge, key).toString(crypto.enc.Base64); -} - -exports.sign = sign; -exports.derive_key = derive_key; diff --git a/s4t-server-node/node_modules/autobahn/lib/auth/persona.js b/s4t-server-node/node_modules/autobahn/lib/auth/persona.js deleted file mode 100644 index 5cdc66b..0000000 --- a/s4t-server-node/node_modules/autobahn/lib/auth/persona.js +++ /dev/null @@ -1,52 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -var when = require('when'); -var when_fn = require("when/function"); - - -function auth(session, user, extra) { - - // Persona Issues: - // - // Chrome: https://github.com/mozilla/persona/issues/4083 - // IE11: https://groups.google.com/forum/#!topic/mozilla.dev.identity/keEkVpvfLA8 - - var d = session.defer(); - - navigator.id.watch({ - loggedInUser: user, - onlogin: function (assertion) { - // A user has logged in! Here you need to: - // 1. Send the assertion to your backend for verification and to create a session. - // 2. Update your UI. - d.resolve(assertion); - }, - onlogout: function() { - // A user has logged out! Here you need to: - // Tear down the user's session by redirecting the user or making a call to your backend. - // Also, make sure loggedInUser will get set to null on the next page load. - // (That's a literal JavaScript null. Not false, 0, or undefined. null.) - session.leave("wamp.close.logout"); - } - }); - - if (d.promise.then) { - // whenjs has the actual user promise in an attribute - return d.promise; - } else { - return d; - } -} - -exports.auth = auth; diff --git a/s4t-server-node/node_modules/autobahn/lib/autobahn.js b/s4t-server-node/node_modules/autobahn/lib/autobahn.js deleted file mode 100644 index 4d04603..0000000 --- a/s4t-server-node/node_modules/autobahn/lib/autobahn.js +++ /dev/null @@ -1,60 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -// Polyfills for <= IE9 -require('./polyfill.js'); - -var pjson = require('../package.json'); - -var when = require('when'); -//var fn = require("when/function"); - -if ('AUTOBAHN_DEBUG' in global && AUTOBAHN_DEBUG) { - // https://github.com/cujojs/when/blob/master/docs/api.md#whenmonitor - require('when/monitor/console'); - if ('console' in global) { - console.log("AutobahnJS debug enabled"); - } -} - -var util = require('./util.js'); -var log = require('./log.js'); -var session = require('./session.js'); -var connection = require('./connection.js'); -var configure = require('./configure.js'); - -var persona = require('./auth/persona.js'); -var cra = require('./auth/cra.js'); - -exports.version = pjson.version; - -exports.transports = configure.transports; - -exports.Connection = connection.Connection; - -exports.Session = session.Session; -exports.Invocation = session.Invocation; -exports.Event = session.Event; -exports.Result = session.Result; -exports.Error = session.Error; -exports.Subscription = session.Subscription; -exports.Registration = session.Registration; -exports.Publication = session.Publication; - -exports.auth_persona = persona.auth; -exports.auth_cra = cra; - -exports.when = when; - -exports.util = util; -exports.log = log; diff --git a/s4t-server-node/node_modules/autobahn/lib/configure.js b/s4t-server-node/node_modules/autobahn/lib/configure.js deleted file mode 100644 index a4e7b71..0000000 --- a/s4t-server-node/node_modules/autobahn/lib/configure.js +++ /dev/null @@ -1,58 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - - -function Transports() { - this._repository = {}; -} - - -Transports.prototype.register = function (name, factory) { - this._repository[name] = factory; -}; - - -Transports.prototype.isRegistered = function (name) { - return this._repository[name] ? true : false; -}; - - -Transports.prototype.get = function (name) { - if (this._repository[name] !== undefined) { - return this._repository[name]; - } else { - throw "no such transport: " + name; - } -} - - -Transports.prototype.list = function() { - var items = []; - for (var name in this._repository) { - items.push(name); - } - return items; -}; - - -var _transports = new Transports(); - - -// register default transports -var websocket = require('./transport/websocket.js'); -_transports.register("websocket", websocket.Factory); - -var longpoll = require('./transport/longpoll.js'); -_transports.register("longpoll", longpoll.Factory); - -exports.transports = _transports; diff --git a/s4t-server-node/node_modules/autobahn/lib/connection.js b/s4t-server-node/node_modules/autobahn/lib/connection.js deleted file mode 100644 index cdbfaff..0000000 --- a/s4t-server-node/node_modules/autobahn/lib/connection.js +++ /dev/null @@ -1,485 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -var when = require('when'); - -var session = require('./session.js'); -var util = require('./util.js'); -var log = require('./log.js'); -var autobahn = require('./autobahn.js'); - - -var Connection = function (options) { - - var self = this; - - self._options = options; - - - // Deferred factory - // - if (options && options.use_es6_promises) { - - if ('Promise' in global) { - // ES6-based deferred factory - // - self._defer = function () { - var deferred = {}; - - deferred.promise = new Promise(function (resolve, reject) { - deferred.resolve = resolve; - deferred.reject = reject; - }); - - return deferred; - }; - } else { - - log.debug("Warning: ES6 promises requested, but not found! Falling back to whenjs."); - - // whenjs-based deferred factory - // - self._defer = when.defer; - } - - } else if (options && options.use_deferred) { - - // use explicit deferred factory, e.g. jQuery.Deferred or Q.defer - // - self._defer = options.use_deferred; - - } else { - - // whenjs-based deferred factory - // - self._defer = when.defer; - } - - - // WAMP transport - // - // backward compatiblity - if (!self._options.transports) { - self._options.transports = [ - { - type: 'websocket', - url: self._options.url - } - ]; - } - self._transport_factories = []; - self._init_transport_factories(); - - - // WAMP session - // - self._session = null; - self._session_close_reason = null; - self._session_close_message = null; - - // automatic reconnection configuration - // - - // enable automatic reconnect if host is unreachable - if (self._options.retry_if_unreachable !== undefined) { - self._retry_if_unreachable = self._options.retry_if_unreachable; - } else { - self._retry_if_unreachable = true; - } - - // maximum number of reconnection attempts - self._max_retries = self._options.max_retries || 15; - - // initial retry delay in seconds - self._initial_retry_delay = self._options.initial_retry_delay || 1.5; - - // maximum seconds between reconnection attempts - self._max_retry_delay = self._options.max_retry_delay || 300; - - // the growth factor applied to the retry delay on each retry cycle - self._retry_delay_growth = self._options.retry_delay_growth || 1.5; - - // the SD of a Gaussian to jitter the delay on each retry cycle - // as a fraction of the mean - self._retry_delay_jitter = self._options.retry_delay_jitter || 0.1; - - // reconnection tracking - // - - // total number of successful connections - self._connect_successes = 0; - - // controls if we should try to reconnect - self._retry = false; - - // current number of reconnect cycles we went through - self._retry_count = 0; - - // the current retry delay - self._retry_delay = self._initial_retry_delay; - - // flag indicating if we are currently in a reconnect cycle - self._is_retrying = false; - - // when retrying, this is the timer object returned from window.setTimeout() - self._retry_timer = null; -}; - - - -Connection.prototype._create_transport = function () { - for (var i = 0; i < this._transport_factories.length; ++i) { - var transport_factory = this._transport_factories[i]; - log.debug("trying to create WAMP transport of type: " + transport_factory.type); - try { - var transport = transport_factory.create(); - if (transport) { - log.debug("using WAMP transport type: " + transport_factory.type); - return transport; - } - } catch (e) { - // ignore - log.debug("could not create WAMP transport '" + transport_factory.type + "': " + e); - } - } - - // could not create any WAMP transport - return null; -}; - - - -Connection.prototype._init_transport_factories = function () { - // WAMP transport - // - var transports, transport_options, transport_factory, transport_factory_klass; - - util.assert(this._options.transports, "No transport.factory specified"); - transports = this._options.transports; - //if(typeof transports === "object") { - // this._options.transports = [transports]; - //} - for(var i = 0; i < this._options.transports.length; ++i) { - // cascading transports until we find one which works - transport_options = this._options.transports[i]; - - if (!transport_options.url) { - // defaulting to options.url if none is provided - transport_options.url = this._options.url; - } - if (!transport_options.protocols) { - transport_options.protocols = this._options.protocols; - } - util.assert(transport_options.type, "No transport.type specified"); - util.assert(typeof transport_options.type === "string", "transport.type must be a string"); - try { - transport_factory_klass = autobahn.transports.get(transport_options.type); - if (transport_factory_klass) { - transport_factory = new transport_factory_klass(transport_options); - this._transport_factories.push(transport_factory); - } - } catch (exc) { - console.error(exc); - } - } -}; - - -Connection.prototype._autoreconnect_reset_timer = function () { - - var self = this; - - if (self._retry_timer) { - clearTimeout(self._retry_timer); - } - self._retry_timer = null; -} - - -Connection.prototype._autoreconnect_reset = function () { - - var self = this; - - self._autoreconnect_reset_timer(); - - self._retry_count = 0; - self._retry_delay = self._initial_retry_delay; - self._is_retrying = false; -} - - -Connection.prototype._autoreconnect_advance = function () { - - var self = this; - - // jitter retry delay - if (self._retry_delay_jitter) { - self._retry_delay = util.rand_normal(self._retry_delay, self._retry_delay * self._retry_delay_jitter); - } - - // cap the retry delay - if (self._retry_delay > self._max_retry_delay) { - self._retry_delay = self._max_retry_delay; - } - - // count number of retries - self._retry_count += 1; - - var res; - if (self._retry && self._retry_count <= self._max_retries) { - res = { - count: self._retry_count, - delay: self._retry_delay, - will_retry: true - }; - } else { - res = { - count: null, - delay: null, - will_retry: false - } - } - - // retry delay growth for next retry cycle - if (self._retry_delay_growth) { - self._retry_delay = self._retry_delay * self._retry_delay_growth; - } - - return res; -} - - -Connection.prototype.open = function () { - - var self = this; - - if (self._transport) { - throw "connection already open (or opening)"; - } - - self._autoreconnect_reset(); - self._retry = true; - - function retry () { - - // create a WAMP transport - self._transport = self._create_transport(); - - if (!self._transport) { - // failed to create a WAMP transport - self._retry = false; - if (self.onclose) { - var details = { - reason: null, - message: null, - retry_delay: null, - retry_count: null, - will_retry: false - }; - self.onclose("unsupported", details); - } - return; - } - - // create a new WAMP session using the WebSocket connection as transport - self._session = new session.Session(self._transport, self._defer, self._options.onchallenge); - self._session_close_reason = null; - self._session_close_message = null; - - self._transport.onopen = function () { - - // reset auto-reconnect timer and tracking - self._autoreconnect_reset(); - - // log successful connections - self._connect_successes += 1; - - // start WAMP session - self._session.join(self._options.realm, self._options.authmethods, self._options.authid); - }; - - self._session.onjoin = function (details) { - if (self.onopen) { - try { - self.onopen(self._session, details); - } catch (e) { - log.debug("Exception raised from app code while firing Connection.onopen()", e); - } - } - }; - - // - // ... WAMP session is now attached to realm. - // - - self._session.onleave = function (reason, details) { - self._session_close_reason = reason; - self._session_close_message = details.message || ""; - self._retry = false; - self._transport.close(1000); - }; - - self._transport.onclose = function (evt) { - - // remove any pending reconnect timer - self._autoreconnect_reset_timer(); - - self._transport = null; - - var reason = null; - if (self._connect_successes === 0) { - reason = "unreachable"; - if (!self._retry_if_unreachable) { - self._retry = false; - } - - } else if (!evt.wasClean) { - reason = "lost"; - - } else { - reason = "closed"; - } - - var next_retry = self._autoreconnect_advance(); - - // fire app code handler - // - if (self.onclose) { - var details = { - reason: self._session_close_reason, - message: self._session_close_message, - retry_delay: next_retry.delay, - retry_count: next_retry.count, - will_retry: next_retry.will_retry - }; - try { - // Connection.onclose() allows to cancel any subsequent retry attempt - var stop_retrying = self.onclose(reason, details); - } catch (e) { - log.debug("Exception raised from app code while firing Connection.onclose()", e); - } - } - - // reset session info - // - if (self._session) { - self._session._id = null; - self._session = null; - self._session_close_reason = null; - self._session_close_message = null; - } - - // automatic reconnection - // - if (self._retry && !stop_retrying) { - - if (next_retry.will_retry) { - - self._is_retrying = true; - - log.debug("retrying in " + next_retry.delay + " s"); - self._retry_timer = setTimeout(retry, next_retry.delay * 1000); - - } else { - log.debug("giving up trying to reconnect"); - } - } - } - } - - retry(); -}; - - -Connection.prototype.close = function (reason, message) { - var self = this; - - if (!self._transport && !self._is_retrying) { - throw "connection already closed"; - } - - // the app wants to close .. don't retry - self._retry = false; - - if (self._session && self._session.isOpen) { - // if there is an open session, close that first. - self._session.leave(reason, message); - } else if (self._transport) { - // no session active: just close the transport - self._transport.close(1000); - } -}; - - - -Object.defineProperty(Connection.prototype, "defer", { - get: function () { - return this._defer; - } -}); - - - -Object.defineProperty(Connection.prototype, "session", { - get: function () { - return this._session; - } -}); - - - -Object.defineProperty(Connection.prototype, "isOpen", { - get: function () { - if (this._session && this._session.isOpen) { - return true; - } else { - return false; - } - } -}); - - - -Object.defineProperty(Connection.prototype, "isConnected", { - get: function () { - if (this._transport) { - return true; - } else { - return false; - } - } -}); - - - -Object.defineProperty(Connection.prototype, "transport", { - get: function () { - if (this._transport) { - return this._transport; - } else { - return {info: {type: 'none', url: null, protocol: null}}; - } - } -}); - - - -Object.defineProperty(Connection.prototype, "isRetrying", { - get: function () { - return this._is_retrying; - } -}); - - - -exports.Connection = Connection; diff --git a/s4t-server-node/node_modules/autobahn/lib/log.js b/s4t-server-node/node_modules/autobahn/lib/log.js deleted file mode 100644 index 6b5f0c1..0000000 --- a/s4t-server-node/node_modules/autobahn/lib/log.js +++ /dev/null @@ -1,23 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - - -var debug = function () {}; - -if ('AUTOBAHN_DEBUG' in global && AUTOBAHN_DEBUG && 'console' in global) { - debug = function () { - console.log.apply(console, arguments); - } -} - -exports.debug = debug; diff --git a/s4t-server-node/node_modules/autobahn/lib/polyfill.js b/s4t-server-node/node_modules/autobahn/lib/polyfill.js deleted file mode 100644 index 5518760..0000000 --- a/s4t-server-node/node_modules/autobahn/lib/polyfill.js +++ /dev/null @@ -1,7 +0,0 @@ -require('./polyfill/object'); -require('./polyfill/array'); -require('./polyfill/string'); -require('./polyfill/function'); -require('./polyfill/console'); -require('./polyfill/typedarray'); -require('./polyfill/json'); diff --git a/s4t-server-node/node_modules/autobahn/lib/polyfill/array.js b/s4t-server-node/node_modules/autobahn/lib/polyfill/array.js deleted file mode 100644 index 7779bb8..0000000 --- a/s4t-server-node/node_modules/autobahn/lib/polyfill/array.js +++ /dev/null @@ -1,124 +0,0 @@ -if ( 'function' !== typeof Array.prototype.reduce ) { - Array.prototype.reduce = function( callback /*, initialValue*/ ) { - 'use strict'; - var len, t, value, k; - if ( null === this || 'undefined' === typeof this ) { - throw new TypeError( - 'Array.prototype.reduce called on null or undefined' ); - } - if ( 'function' !== typeof callback ) { - throw new TypeError( callback + ' is not a function' ); - } - t = Object( this ); - len = t.length >>> 0; - k = 0; - if ( arguments.length >= 2 ) { - value = arguments[1]; - } else { - while ( k < len && ! k in t ) k++; - if ( k >= len ) - throw new TypeError('Reduce of empty array with no initial value'); - value = t[ k++ ]; - } - for ( ; k < len ; k++ ) { - if ( k in t ) { - value = callback( value, t[k], k, t ); - } - } - return value; - }; -} - -// Add ECMA262-5 Array methods if not supported natively -// -if (!('indexOf' in Array.prototype)) { - Array.prototype.indexOf= function(find, i /*opt*/) { - if (i===undefined) i= 0; - if (i<0) i+= this.length; - if (i<0) i= 0; - for (var n= this.length; ithis.length-1) i= this.length-1; - for (i++; i-->0;) /* i++ because from-argument is sadly inclusive */ - if (i in this && this[i]===find) - return i; - return -1; - }; -} -if (!('forEach' in Array.prototype)) { - Array.prototype.forEach= function(action, that /*opt*/) { - for (var i= 0, n= this.length; i>> 0, k = len - 1, value; - if ( arguments.length >= 2 ) { - value = arguments[1]; - } else { - while ( k >= 0 && ! k in t ) k--; - if ( k < 0 ) - throw new TypeError('Reduce of empty array with no initial value'); - value = t[ k-- ]; - } - for ( ; k >= 0 ; k-- ) { - if ( k in t ) { - value = callback( value, t[k], k, t ); - } - } - return value; - }; -} \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/lib/polyfill/console.js b/s4t-server-node/node_modules/autobahn/lib/polyfill/console.js deleted file mode 100644 index c8a9e16..0000000 --- a/s4t-server-node/node_modules/autobahn/lib/polyfill/console.js +++ /dev/null @@ -1,96 +0,0 @@ - -(function(console) { - /********************************************************************************************* - * Make sure console exists because IE blows up if it's not open and you attempt to access it - * Create some dummy functions if we need to, so we don't have to if/else everything - *********************************************************************************************/ - console||(console = window.console = { - // all this "a, b, c, d, e" garbage is to make the IDEs happy, since they can't do variable argument lists - /** - * @param a - * @param [b] - * @param [c] - * @param [d] - * @param [e] - */ - log: function(a, b, c, d, e) {}, - /** - * @param a - * @param [b] - * @param [c] - * @param [d] - * @param [e] - */ - info: function(a, b, c, d, e) {}, - /** - * @param a - * @param [b] - * @param [c] - * @param [d] - * @param [e] - */ - warn: function(a, b, c, d, e) {}, - /** - * @param a - * @param [b] - * @param [c] - * @param [d] - * @param [e] - */ - error: function(a, b, c, d, e) {}, - - assert: function(test, message) {} - }); - - // IE 9 won't allow us to call console.log.apply (WTF IE!) It also reports typeof(console.log) as 'object' (UNH!) - // but together, those two errors can be useful in allowing us to fix stuff so it works right - if( typeof(console.log) === 'object' ) { - // Array.forEach doesn't work in IE 8 so don't try that :( - console.log = Function.prototype.call.bind(console.log, console); - console.info = Function.prototype.call.bind(console.info, console); - console.warn = Function.prototype.call.bind(console.warn, console); - console.error = Function.prototype.call.bind(console.error, console); - console.debug = Function.prototype.call.bind(console.info, console); - } - - /** - * Support group and groupEnd functions - */ - ('group' in console) || - (console.group = function(msg) { - console.info("\n--- "+msg+" ---\n"); - }); - ('groupEnd' in console) || - (console.groupEnd = function() { - console.log("\n"); - }); - ('assert' in console) || - (console.assert = function(test, message) { - if (!test) { - try { - // attempt to preserve the stack - throw new Error("assertion failed: " + message); - } catch(error) { - setTimeout(function(){ - throw error; - }, 0); - } - } - }); - - /** - * Support time and timeEnd functions - */ - ('time' in console) || - (function() { - var trackedTimes = {}; - console.time = function(msg) { - trackedTimes[msg] = new Date().getTime(); - }; - console.timeEnd = function(msg) { - var end = new Date().getTime(), time = (msg in trackedTimes)? end - trackedTimes[msg] : 0; - console.info(msg+': '+time+'ms') - }; - }()); - -})(global.console); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/lib/polyfill/function.js b/s4t-server-node/node_modules/autobahn/lib/polyfill/function.js deleted file mode 100644 index 8a7c6cf..0000000 --- a/s4t-server-node/node_modules/autobahn/lib/polyfill/function.js +++ /dev/null @@ -1,9 +0,0 @@ -if (!Function.prototype.bind) { - //credits: taken from bind_even_never in this discussion: https://prototype.lighthouseapp.com/projects/8886/tickets/215-optimize-bind-bindaseventlistener#ticket-215-9 - Function.prototype.bind = function(context) { - var fn = this, args = Array.prototype.slice.call(arguments, 1); - return function(){ - return fn.apply(context, Array.prototype.concat.apply(args, arguments)); - }; - }; -} \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/lib/polyfill/json.js b/s4t-server-node/node_modules/autobahn/lib/polyfill/json.js deleted file mode 100644 index 71b9d8a..0000000 --- a/s4t-server-node/node_modules/autobahn/lib/polyfill/json.js +++ /dev/null @@ -1,491 +0,0 @@ -/* - json2.js - 2014-02-04 - - Public Domain. - - NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. - - See http://www.JSON.org/js.html - - - This code should be minified before deployment. - See http://javascript.crockford.com/jsmin.html - - USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO - NOT CONTROL. - - - This file creates a global JSON object containing two methods: stringify - and parse. - - JSON.stringify(value, replacer, space) - value any JavaScript value, usually an object or array. - - replacer an optional parameter that determines how object - values are stringified for objects. It can be a - function or an array of strings. - - space an optional parameter that specifies the indentation - of nested structures. If it is omitted, the text will - be packed without extra whitespace. If it is a number, - it will specify the number of spaces to indent at each - level. If it is a string (such as '\t' or ' '), - it contains the characters used to indent at each level. - - This method produces a JSON text from a JavaScript value. - - When an object value is found, if the object contains a toJSON - method, its toJSON method will be called and the result will be - stringified. A toJSON method does not serialize: it returns the - value represented by the name/value pair that should be serialized, - or undefined if nothing should be serialized. The toJSON method - will be passed the key associated with the value, and this will be - bound to the value - - For example, this would serialize Dates as ISO strings. - - Date.prototype.toJSON = function (key) { - function f(n) { - // Format integers to have at least two digits. - return n < 10 ? '0' + n : n; - } - - return this.getUTCFullYear() + '-' + - f(this.getUTCMonth() + 1) + '-' + - f(this.getUTCDate()) + 'T' + - f(this.getUTCHours()) + ':' + - f(this.getUTCMinutes()) + ':' + - f(this.getUTCSeconds()) + 'Z'; - }; - - You can provide an optional replacer method. It will be passed the - key and value of each member, with this bound to the containing - object. The value that is returned from your method will be - serialized. If your method returns undefined, then the member will - be excluded from the serialization. - - If the replacer parameter is an array of strings, then it will be - used to select the members to be serialized. It filters the results - such that only members with keys listed in the replacer array are - stringified. - - Values that do not have JSON representations, such as undefined or - functions, will not be serialized. Such values in objects will be - dropped; in arrays they will be replaced with null. You can use - a replacer function to replace those with JSON values. - JSON.stringify(undefined) returns undefined. - - The optional space parameter produces a stringification of the - value that is filled with line breaks and indentation to make it - easier to read. - - If the space parameter is a non-empty string, then that string will - be used for indentation. If the space parameter is a number, then - the indentation will be that many spaces. - - Example: - - text = JSON.stringify(['e', {pluribus: 'unum'}]); - // text is '["e",{"pluribus":"unum"}]' - - - text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t'); - // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]' - - text = JSON.stringify([new Date()], function (key, value) { - return this[key] instanceof Date ? - 'Date(' + this[key] + ')' : value; - }); - // text is '["Date(---current time---)"]' - - - JSON.parse(text, reviver) - This method parses a JSON text to produce an object or array. - It can throw a SyntaxError exception. - - The optional reviver parameter is a function that can filter and - transform the results. It receives each of the keys and values, - and its return value is used instead of the original value. - If it returns what it received, then the structure is not modified. - If it returns undefined then the member is deleted. - - Example: - - // Parse the text. Values that look like ISO date strings will - // be converted to Date objects. - - myData = JSON.parse(text, function (key, value) { - var a; - if (typeof value === 'string') { - a = -/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); - if (a) { - return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], - +a[5], +a[6])); - } - } - return value; - }); - - myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) { - var d; - if (typeof value === 'string' && - value.slice(0, 5) === 'Date(' && - value.slice(-1) === ')') { - d = new Date(value.slice(5, -1)); - if (d) { - return d; - } - } - return value; - }); - - - This is a reference implementation. You are free to copy, modify, or - redistribute. -*/ - -/*jslint evil: true, regexp: true */ - -/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply, - call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours, - getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join, - lastIndex, length, parse, prototype, push, replace, slice, stringify, - test, toJSON, toString, valueOf -*/ - - -// Create a JSON object only if one does not already exist. We create the -// methods in a closure to avoid creating global variables. - -if (typeof JSON !== 'object') { - JSON = {}; -} - -(function () { - 'use strict'; - - function f(n) { - // Format integers to have at least two digits. - return n < 10 ? '0' + n : n; - } - - if (typeof Date.prototype.toJSON !== 'function') { - - Date.prototype.toJSON = function () { - - return isFinite(this.valueOf()) - ? this.getUTCFullYear() + '-' + - f(this.getUTCMonth() + 1) + '-' + - f(this.getUTCDate()) + 'T' + - f(this.getUTCHours()) + ':' + - f(this.getUTCMinutes()) + ':' + - f(this.getUTCSeconds()) + 'Z' - : null; - }; - - String.prototype.toJSON = - Number.prototype.toJSON = - Boolean.prototype.toJSON = function () { - return this.valueOf(); - }; - } - - var cx, - escapable, - gap, - indent, - meta, - rep; - - - function quote(string) { - -// If the string contains no control characters, no quote characters, and no -// backslash characters, then we can safely slap some quotes around it. -// Otherwise we must also replace the offending characters with safe escape -// sequences. - - escapable.lastIndex = 0; - return escapable.test(string) ? '"' + string.replace(escapable, function (a) { - var c = meta[a]; - return typeof c === 'string' - ? c - : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }) + '"' : '"' + string + '"'; - } - - - function str(key, holder) { - -// Produce a string from holder[key]. - - var i, // The loop counter. - k, // The member key. - v, // The member value. - length, - mind = gap, - partial, - value = holder[key]; - -// If the value has a toJSON method, call it to obtain a replacement value. - - if (value && typeof value === 'object' && - typeof value.toJSON === 'function') { - value = value.toJSON(key); - } - -// If we were called with a replacer function, then call the replacer to -// obtain a replacement value. - - if (typeof rep === 'function') { - value = rep.call(holder, key, value); - } - -// What happens next depends on the value's type. - - switch (typeof value) { - case 'string': - return quote(value); - - case 'number': - -// JSON numbers must be finite. Encode non-finite numbers as null. - - return isFinite(value) ? String(value) : 'null'; - - case 'boolean': - case 'null': - -// If the value is a boolean or null, convert it to a string. Note: -// typeof null does not produce 'null'. The case is included here in -// the remote chance that this gets fixed someday. - - return String(value); - -// If the type is 'object', we might be dealing with an object or an array or -// null. - - case 'object': - -// Due to a specification blunder in ECMAScript, typeof null is 'object', -// so watch out for that case. - - if (!value) { - return 'null'; - } - -// Make an array to hold the partial results of stringifying this object value. - - gap += indent; - partial = []; - -// Is the value an array? - - if (Object.prototype.toString.apply(value) === '[object Array]') { - -// The value is an array. Stringify every element. Use null as a placeholder -// for non-JSON values. - - length = value.length; - for (i = 0; i < length; i += 1) { - partial[i] = str(i, value) || 'null'; - } - -// Join all of the elements together, separated with commas, and wrap them in -// brackets. - - v = partial.length === 0 - ? '[]' - : gap - ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' - : '[' + partial.join(',') + ']'; - gap = mind; - return v; - } - -// If the replacer is an array, use it to select the members to be stringified. - - if (rep && typeof rep === 'object') { - length = rep.length; - for (i = 0; i < length; i += 1) { - if (typeof rep[i] === 'string') { - k = rep[i]; - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } else { - -// Otherwise, iterate through all of the keys in the object. - - for (k in value) { - if (Object.prototype.hasOwnProperty.call(value, k)) { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } - -// Join all of the member texts together, separated with commas, -// and wrap them in braces. - - v = partial.length === 0 - ? '{}' - : gap - ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' - : '{' + partial.join(',') + '}'; - gap = mind; - return v; - } - } - -// If the JSON object does not yet have a stringify method, give it one. - - if (typeof JSON.stringify !== 'function') { - escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }; - JSON.stringify = function (value, replacer, space) { - -// The stringify method takes a value and an optional replacer, and an optional -// space parameter, and returns a JSON text. The replacer can be a function -// that can replace values, or an array of strings that will select the keys. -// A default replacer method can be provided. Use of the space parameter can -// produce text that is more easily readable. - - var i; - gap = ''; - indent = ''; - -// If the space parameter is a number, make an indent string containing that -// many spaces. - - if (typeof space === 'number') { - for (i = 0; i < space; i += 1) { - indent += ' '; - } - -// If the space parameter is a string, it will be used as the indent string. - - } else if (typeof space === 'string') { - indent = space; - } - -// If there is a replacer, it must be a function or an array. -// Otherwise, throw an error. - - rep = replacer; - if (replacer && typeof replacer !== 'function' && - (typeof replacer !== 'object' || - typeof replacer.length !== 'number')) { - throw new Error('JSON.stringify'); - } - -// Make a fake root object containing our value under the key of ''. -// Return the result of stringifying the value. - - return str('', {'': value}); - }; - } - - -// If the JSON object does not yet have a parse method, give it one. - - if (typeof JSON.parse !== 'function') { - cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; - JSON.parse = function (text, reviver) { - -// The parse method takes a text and an optional reviver function, and returns -// a JavaScript value if the text is a valid JSON text. - - var j; - - function walk(holder, key) { - -// The walk method is used to recursively walk the resulting structure so -// that modifications can be made. - - var k, v, value = holder[key]; - if (value && typeof value === 'object') { - for (k in value) { - if (Object.prototype.hasOwnProperty.call(value, k)) { - v = walk(value, k); - if (v !== undefined) { - value[k] = v; - } else { - delete value[k]; - } - } - } - } - return reviver.call(holder, key, value); - } - - -// Parsing happens in four stages. In the first stage, we replace certain -// Unicode characters with escape sequences. JavaScript handles many characters -// incorrectly, either silently deleting them, or treating them as line endings. - - text = String(text); - cx.lastIndex = 0; - if (cx.test(text)) { - text = text.replace(cx, function (a) { - return '\\u' + - ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }); - } - -// In the second stage, we run the text against regular expressions that look -// for non-JSON patterns. We are especially concerned with '()' and 'new' -// because they can cause invocation, and '=' because it can cause mutation. -// But just to be safe, we want to reject all unexpected forms. - -// We split the second stage into 4 regexp operations in order to work around -// crippling inefficiencies in IE's and Safari's regexp engines. First we -// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we -// replace all simple value tokens with ']' characters. Third, we delete all -// open brackets that follow a colon or comma or that begin the text. Finally, -// we look to see that the remaining characters are only whitespace or ']' or -// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval. - - if (/^[\],:{}\s]*$/ - .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@') - .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']') - .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { - -// In the third stage we use the eval function to compile the text into a -// JavaScript structure. The '{' operator is subject to a syntactic ambiguity -// in JavaScript: it can begin a block or an object literal. We wrap the text -// in parens to eliminate the ambiguity. - - j = eval('(' + text + ')'); - -// In the optional fourth stage, we recursively walk the new structure, passing -// each name/value pair to a reviver function for possible transformation. - - return typeof reviver === 'function' - ? walk({'': j}, '') - : j; - } - -// If the text is not JSON parseable, then a SyntaxError is thrown. - - throw new SyntaxError('JSON.parse'); - }; - } -}()); - -exports.JSON = JSON; \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/lib/polyfill/object.js b/s4t-server-node/node_modules/autobahn/lib/polyfill/object.js deleted file mode 100644 index 0182eb9..0000000 --- a/s4t-server-node/node_modules/autobahn/lib/polyfill/object.js +++ /dev/null @@ -1,54 +0,0 @@ -if (!Object.create) { - Object.create = (function(){ - function F(){} - - return function(o){ - if (arguments.length != 1) { - throw new Error('Object.create implementation only accepts one parameter.'); - } - F.prototype = o; - return new F() - } - })() -} -// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys -if (!Object.keys) { - Object.keys = (function () { - 'use strict'; - var hasOwnProperty = Object.prototype.hasOwnProperty, - hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString'), - dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ], - dontEnumsLength = dontEnums.length; - - return function (obj) { - if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) { - throw new TypeError('Object.keys called on non-object'); - } - - var result = [], prop, i; - - for (prop in obj) { - if (hasOwnProperty.call(obj, prop)) { - result.push(prop); - } - } - - if (hasDontEnumBug) { - for (i = 0; i < dontEnumsLength; i++) { - if (hasOwnProperty.call(obj, dontEnums[i])) { - result.push(dontEnums[i]); - } - } - } - return result; - }; - }()); -} \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/lib/polyfill/string.js b/s4t-server-node/node_modules/autobahn/lib/polyfill/string.js deleted file mode 100644 index f19f467..0000000 --- a/s4t-server-node/node_modules/autobahn/lib/polyfill/string.js +++ /dev/null @@ -1,7 +0,0 @@ -// Add ECMA262-5 string trim if not supported natively -// -if (!('trim' in String.prototype)) { - String.prototype.trim= function() { - return this.replace(/^\s+/, '').replace(/\s+$/, ''); - }; -} \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/lib/polyfill/typedarray.js b/s4t-server-node/node_modules/autobahn/lib/polyfill/typedarray.js deleted file mode 100644 index 83bd5c3..0000000 --- a/s4t-server-node/node_modules/autobahn/lib/polyfill/typedarray.js +++ /dev/null @@ -1,1174 +0,0 @@ -/* - Copyright (c) 2010, Linden Research, Inc. - Copyright (c) 2014, Joshua Bell - - 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. - $/LicenseInfo$ - */ - -// Original can be found at: -// https://bitbucket.org/lindenlab/llsd -// Modifications by Joshua Bell inexorabletash@gmail.com -// https://github.com/inexorabletash/polyfill - -// ES3/ES5 implementation of the Krhonos Typed Array Specification -// Ref: http://www.khronos.org/registry/typedarray/specs/latest/ -// Date: 2011-02-01 -// -// Variations: -// * Allows typed_array.get/set() as alias for subscripts (typed_array[]) -// * Gradually migrating structure from Khronos spec to ES6 spec -if (typeof global["Uint8Array"] === "undefined") { - (function (global, win) { - 'use strict'; - - var undefined = (void 0); // Paranoia - - // Beyond this value, index getters/setters (i.e. array[0], array[1]) are so slow to - // create, and consume so much memory, that the browser appears frozen. - var MAX_ARRAY_LENGTH = 1e5; - - // Approximations of internal ECMAScript conversion functions - function Type(v) { - switch (typeof v) { - case 'undefined': - return 'undefined'; - case 'boolean': - return 'boolean'; - case 'number': - return 'number'; - case 'string': - return 'string'; - default: - return v === null ? 'null' : 'object'; - } - } - - // Class returns internal [[Class]] property, used to avoid cross-frame instanceof issues: - function Class(v) { - return Object.prototype.toString.call(v).replace(/^\[object *|\]$/g, ''); - } - - function IsCallable(o) { - return typeof o === 'function'; - } - - function ToObject(v) { - if (v === null || v === undefined) throw TypeError(); - return Object(v); - } - - function ToInt32(v) { - return v >> 0; - } - - function ToUint32(v) { - return v >>> 0; - } - - // Snapshot intrinsics - var LN2 = Math.LN2, - abs = Math.abs, - floor = Math.floor, - log = Math.log, - max = Math.max, - min = Math.min, - pow = Math.pow, - round = Math.round; - - // emulate ES5 getter/setter API using legacy APIs - // http://blogs.msdn.com/b/ie/archive/2010/09/07/transitioning-existing-code-to-the-es5-getter-setter-apis.aspx - // (second clause tests for Object.defineProperty() in IE<9 that only supports extending DOM prototypes, but - // note that IE<9 does not support __defineGetter__ or __defineSetter__ so it just renders the method harmless) - - (function () { - var orig = Object.defineProperty; - var dom_only = !(function () { - try { - return Object.defineProperty({}, 'x', {}); - } catch (_) { - return false; - } - }()); - - if (!orig || dom_only) { - Object.defineProperty = function (o, prop, desc) { - // In IE8 try built-in implementation for defining properties on DOM prototypes. - if (orig) { - try { - return orig(o, prop, desc); - } catch (_) { - } - } - - if (o !== Object(o)) - throw TypeError('Object.defineProperty called on non-object'); - if (Object.prototype.__defineGetter__ && ('get' in desc)) - Object.prototype.__defineGetter__.call(o, prop, desc.get); - if (Object.prototype.__defineSetter__ && ('set' in desc)) - Object.prototype.__defineSetter__.call(o, prop, desc.set); - if ('value' in desc) - o[prop] = desc.value; - return o; - }; - } - }()); - - // ES5: Make obj[index] an alias for obj._getter(index)/obj._setter(index, value) - // for index in 0 ... obj.length - function makeArrayAccessors(obj) { - if (obj.length > MAX_ARRAY_LENGTH) throw RangeError('Array too large for polyfill'); - - function makeArrayAccessor(index) { - Object.defineProperty(obj, index, { - 'get': function () { - return obj._getter(index); - }, - 'set': function (v) { - obj._setter(index, v); - }, - enumerable: true, - configurable: false - }); - } - - var i; - for (i = 0; i < obj.length; i += 1) { - makeArrayAccessor(i); - } - } - - // Internal conversion functions: - // pack() - take a number (interpreted as Type), output a byte array - // unpack() - take a byte array, output a Type-like number - - function as_signed(value, bits) { - var s = 32 - bits; - return (value << s) >> s; - } - - function as_unsigned(value, bits) { - var s = 32 - bits; - return (value << s) >>> s; - } - - function packI8(n) { - return [n & 0xff]; - } - - function unpackI8(bytes) { - return as_signed(bytes[0], 8); - } - - function packU8(n) { - return [n & 0xff]; - } - - function unpackU8(bytes) { - return as_unsigned(bytes[0], 8); - } - - function packU8Clamped(n) { - n = round(Number(n)); - return [n < 0 ? 0 : n > 0xff ? 0xff : n & 0xff]; - } - - function packI16(n) { - return [(n >> 8) & 0xff, n & 0xff]; - } - - function unpackI16(bytes) { - return as_signed(bytes[0] << 8 | bytes[1], 16); - } - - function packU16(n) { - return [(n >> 8) & 0xff, n & 0xff]; - } - - function unpackU16(bytes) { - return as_unsigned(bytes[0] << 8 | bytes[1], 16); - } - - function packI32(n) { - return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; - } - - function unpackI32(bytes) { - return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); - } - - function packU32(n) { - return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; - } - - function unpackU32(bytes) { - return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); - } - - function packIEEE754(v, ebits, fbits) { - - var bias = (1 << (ebits - 1)) - 1, - s, e, f, ln, - i, bits, str, bytes; - - function roundToEven(n) { - var w = floor(n), f = n - w; - if (f < 0.5) - return w; - if (f > 0.5) - return w + 1; - return w % 2 ? w + 1 : w; - } - - // Compute sign, exponent, fraction - if (v !== v) { - // NaN - // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping - e = (1 << ebits) - 1; - f = pow(2, fbits - 1); - s = 0; - } else if (v === Infinity || v === -Infinity) { - e = (1 << ebits) - 1; - f = 0; - s = (v < 0) ? 1 : 0; - } else if (v === 0) { - e = 0; - f = 0; - s = (1 / v === -Infinity) ? 1 : 0; - } else { - s = v < 0; - v = abs(v); - - if (v >= pow(2, 1 - bias)) { - e = min(floor(log(v) / LN2), 1023); - f = roundToEven(v / pow(2, e) * pow(2, fbits)); - if (f / pow(2, fbits) >= 2) { - e = e + 1; - f = 1; - } - if (e > bias) { - // Overflow - e = (1 << ebits) - 1; - f = 0; - } else { - // Normalized - e = e + bias; - f = f - pow(2, fbits); - } - } else { - // Denormalized - e = 0; - f = roundToEven(v / pow(2, 1 - bias - fbits)); - } - } - - // Pack sign, exponent, fraction - bits = []; - for (i = fbits; i; i -= 1) { - bits.push(f % 2 ? 1 : 0); - f = floor(f / 2); - } - for (i = ebits; i; i -= 1) { - bits.push(e % 2 ? 1 : 0); - e = floor(e / 2); - } - bits.push(s ? 1 : 0); - bits.reverse(); - str = bits.join(''); - - // Bits to bytes - bytes = []; - while (str.length) { - bytes.push(parseInt(str.substring(0, 8), 2)); - str = str.substring(8); - } - return bytes; - } - - function unpackIEEE754(bytes, ebits, fbits) { - // Bytes to bits - var bits = [], i, j, b, str, - bias, s, e, f; - - for (i = bytes.length; i; i -= 1) { - b = bytes[i - 1]; - for (j = 8; j; j -= 1) { - bits.push(b % 2 ? 1 : 0); - b = b >> 1; - } - } - bits.reverse(); - str = bits.join(''); - - // Unpack sign, exponent, fraction - bias = (1 << (ebits - 1)) - 1; - s = parseInt(str.substring(0, 1), 2) ? -1 : 1; - e = parseInt(str.substring(1, 1 + ebits), 2); - f = parseInt(str.substring(1 + ebits), 2); - - // Produce number - if (e === (1 << ebits) - 1) { - return f !== 0 ? NaN : s * Infinity; - } else if (e > 0) { - // Normalized - return s * pow(2, e - bias) * (1 + f / pow(2, fbits)); - } else if (f !== 0) { - // Denormalized - return s * pow(2, -(bias - 1)) * (f / pow(2, fbits)); - } else { - return s < 0 ? -0 : 0; - } - } - - function unpackF64(b) { - return unpackIEEE754(b, 11, 52); - } - - function packF64(v) { - return packIEEE754(v, 11, 52); - } - - function unpackF32(b) { - return unpackIEEE754(b, 8, 23); - } - - function packF32(v) { - return packIEEE754(v, 8, 23); - } - - // - // 3 The ArrayBuffer Type - // - - (function () { - - function ArrayBuffer(length) { - length = ToInt32(length); - if (length < 0) throw RangeError('ArrayBuffer size is not a small enough positive integer.'); - Object.defineProperty(this, 'byteLength', {value: length}); - Object.defineProperty(this, '_bytes', {value: Array(length)}); - - for (var i = 0; i < length; i += 1) - this._bytes[i] = 0; - } - - global.ArrayBuffer = global.ArrayBuffer || ArrayBuffer; - - // - // 5 The Typed Array View Types - // - - function $TypedArray$() { - - // %TypedArray% ( length ) - if (!arguments.length || typeof arguments[0] !== 'object') { - return (function (length) { - length = ToInt32(length); - if (length < 0) throw RangeError('length is not a small enough positive integer.'); - Object.defineProperty(this, 'length', {value: length}); - Object.defineProperty(this, 'byteLength', {value: length * this.BYTES_PER_ELEMENT}); - Object.defineProperty(this, 'buffer', {value: new ArrayBuffer(this.byteLength)}); - Object.defineProperty(this, 'byteOffset', {value: 0}); - - }).apply(this, arguments); - } - - // %TypedArray% ( typedArray ) - if (arguments.length >= 1 && - Type(arguments[0]) === 'object' && - arguments[0] instanceof $TypedArray$) { - return (function (typedArray) { - if (this.constructor !== typedArray.constructor) throw TypeError(); - - var byteLength = typedArray.length * this.BYTES_PER_ELEMENT; - Object.defineProperty(this, 'buffer', {value: new ArrayBuffer(byteLength)}); - Object.defineProperty(this, 'byteLength', {value: byteLength}); - Object.defineProperty(this, 'byteOffset', {value: 0}); - Object.defineProperty(this, 'length', {value: typedArray.length}); - - for (var i = 0; i < this.length; i += 1) - this._setter(i, typedArray._getter(i)); - - }).apply(this, arguments); - } - - // %TypedArray% ( array ) - if (arguments.length >= 1 && - Type(arguments[0]) === 'object' && !(arguments[0] instanceof $TypedArray$) && !(arguments[0] instanceof ArrayBuffer || Class(arguments[0]) === 'ArrayBuffer')) { - return (function (array) { - - var byteLength = array.length * this.BYTES_PER_ELEMENT; - Object.defineProperty(this, 'buffer', {value: new ArrayBuffer(byteLength)}); - Object.defineProperty(this, 'byteLength', {value: byteLength}); - Object.defineProperty(this, 'byteOffset', {value: 0}); - Object.defineProperty(this, 'length', {value: array.length}); - - for (var i = 0; i < this.length; i += 1) { - var s = array[i]; - this._setter(i, Number(s)); - } - }).apply(this, arguments); - } - - // %TypedArray% ( buffer, byteOffset=0, length=undefined ) - if (arguments.length >= 1 && - Type(arguments[0]) === 'object' && - (arguments[0] instanceof ArrayBuffer || Class(arguments[0]) === 'ArrayBuffer')) { - return (function (buffer, byteOffset, length) { - - byteOffset = ToUint32(byteOffset); - if (byteOffset > buffer.byteLength) - throw RangeError('byteOffset out of range'); - - // The given byteOffset must be a multiple of the element - // size of the specific type, otherwise an exception is raised. - if (byteOffset % this.BYTES_PER_ELEMENT) - throw RangeError('buffer length minus the byteOffset is not a multiple of the element size.'); - - if (length === undefined) { - var byteLength = buffer.byteLength - byteOffset; - if (byteLength % this.BYTES_PER_ELEMENT) - throw RangeError('length of buffer minus byteOffset not a multiple of the element size'); - length = byteLength / this.BYTES_PER_ELEMENT; - - } else { - length = ToUint32(length); - byteLength = length * this.BYTES_PER_ELEMENT; - } - - if ((byteOffset + byteLength) > buffer.byteLength) - throw RangeError('byteOffset and length reference an area beyond the end of the buffer'); - - Object.defineProperty(this, 'buffer', {value: buffer}); - Object.defineProperty(this, 'byteLength', {value: byteLength}); - Object.defineProperty(this, 'byteOffset', {value: byteOffset}); - Object.defineProperty(this, 'length', {value: length}); - - }).apply(this, arguments); - } - - // %TypedArray% ( all other argument combinations ) - throw TypeError(); - } - - // Properties of the %TypedArray Instrinsic Object - - // %TypedArray%.from ( source , mapfn=undefined, thisArg=undefined ) - Object.defineProperty($TypedArray$, 'from', {value: function (iterable) { - return new this(iterable); - }}); - - // %TypedArray%.of ( ...items ) - Object.defineProperty($TypedArray$, 'of', {value: function (/*...items*/) { - return new this(arguments); - }}); - - // %TypedArray%.prototype - var $TypedArrayPrototype$ = {}; - $TypedArray$.prototype = $TypedArrayPrototype$; - - // WebIDL: getter type (unsigned long index); - Object.defineProperty($TypedArray$.prototype, '_getter', {value: function (index) { - if (arguments.length < 1) throw SyntaxError('Not enough arguments'); - - index = ToUint32(index); - if (index >= this.length) - return undefined; - - var bytes = [], i, o; - for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; - i < this.BYTES_PER_ELEMENT; - i += 1, o += 1) { - bytes.push(this.buffer._bytes[o]); - } - return this._unpack(bytes); - }}); - - // NONSTANDARD: convenience alias for getter: type get(unsigned long index); - Object.defineProperty($TypedArray$.prototype, 'get', {value: $TypedArray$.prototype._getter}); - - // WebIDL: setter void (unsigned long index, type value); - Object.defineProperty($TypedArray$.prototype, '_setter', {value: function (index, value) { - if (arguments.length < 2) throw SyntaxError('Not enough arguments'); - - index = ToUint32(index); - if (index >= this.length) - return; - - var bytes = this._pack(value), i, o; - for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; - i < this.BYTES_PER_ELEMENT; - i += 1, o += 1) { - this.buffer._bytes[o] = bytes[i]; - } - }}); - - // get %TypedArray%.prototype.buffer - // get %TypedArray%.prototype.byteLength - // get %TypedArray%.prototype.byteOffset - // -- applied directly to the object in the constructor - - // %TypedArray%.prototype.constructor - Object.defineProperty($TypedArray$.prototype, 'constructor', {value: $TypedArray$}); - - // %TypedArray%.prototype.copyWithin (target, start, end = this.length ) - Object.defineProperty($TypedArray$.prototype, 'copyWithin', {value: function (m_target, m_start) { - var m_end = arguments[2]; - - var m_o = ToObject(this); - var lenVal = m_o.length; - var m_len = ToUint32(lenVal); - m_len = max(m_len, 0); - var relativeTarget = ToInt32(m_target); - var m_to; - if (relativeTarget < 0) - { - m_to = max(m_len + relativeTarget, 0); - } - else - { - m_to = min(relativeTarget, m_len); - } - var relativeStart = ToInt32(m_start); - var m_from; - if (relativeStart < 0) - { - m_from = max(m_len + relativeStart, 0); - } - else - { - m_from = min(relativeStart, m_len); - } - var relativeEnd; - if (m_end === undefined) - { - relativeEnd = m_len; - } - else - { - relativeEnd = ToInt32(m_end); - } - var m_final; - if (relativeEnd < 0) { - m_final = max(m_len + relativeEnd, 0); - } else { - m_final = min(relativeEnd, m_len); - } - - var m_count = min(m_final - m_from, m_len - m_to); - var direction; - if (from < m_to && m_to < m_from + m_count) { - direction = -1; - m_from = m_from + m_count - 1; - m_to = m_to + m_count - 1; - } else { - direction = 1; - } - while (count > 0) { - m_o._setter(m_to, m_o._getter(m_from)); - m_from = m_from + direction; - m_to = m_to + direction; - m_count = m_count - 1; - } - return m_o; - }}); - - // %TypedArray%.prototype.entries ( ) - // -- defined in es6.js to shim browsers w/ native TypedArrays - - // %TypedArray%.prototype.every ( callbackfn, thisArg = undefined ) - Object.defineProperty($TypedArray$.prototype, 'every', {value: function (callbackfn) { - if (this === undefined || this === null) throw TypeError(); - var t = Object(this); - var len = ToUint32(t.length); - if (!IsCallable(callbackfn)) throw TypeError(); - var thisArg = arguments[1]; - for (var i = 0; i < len; i++) { - if (!callbackfn.call(thisArg, t._getter(i), i, t)) - return false; - } - return true; - }}); - - // %TypedArray%.prototype.fill (value, start = 0, end = this.length ) - Object.defineProperty($TypedArray$.prototype, 'fill', {value: function (value) { - var m_start = arguments[1], - m_end = arguments[2]; - - var m_o = ToObject(this); - var lenVal = m_o.length; - var m_len = ToUint32(lenVal); - m_len = max(m_len, 0); - var relativeStart = ToInt32(m_start); - var m_k; - if (relativeStart < 0) - { - m_k = max((m_len + relativeStart), 0); - } - else - { - m_k = min(relativeStart, m_len); - } - var relativeEnd; - if (m_end === undefined) - { - relativeEnd = m_len; - } - else - { - relativeEnd = ToInt32(m_end); - } - var m_final; - if (relativeEnd < 0) - { - m_final = max((m_len + relativeEnd), 0); - } - else - { - m_final = min(relativeEnd, m_len); - } - while (m_k < m_final) { - m_o._setter(m_k, value); - m_k += 1; - } - return m_o; - }}); - - // %TypedArray%.prototype.filter ( callbackfn, thisArg = undefined ) - Object.defineProperty($TypedArray$.prototype, 'filter', {value: function (callbackfn) { - if (this === undefined || this === null) throw TypeError(); - var t = Object(this); - var len = ToUint32(t.length); - if (!IsCallable(callbackfn)) throw TypeError(); - var res = []; - var thisp = arguments[1]; - for (var i = 0; i < len; i++) { - var val = t._getter(i); // in case fun mutates this - if (callbackfn.call(thisp, val, i, t)) - res.push(val); - } - return new this.constructor(res); - }}); - - // %TypedArray%.prototype.find (predicate, thisArg = undefined) - Object.defineProperty($TypedArray$.prototype, 'find', {value: function (predicate) { - var o = ToObject(this); - var lenValue = o.length; - var len = ToUint32(lenValue); - if (!IsCallable(predicate)) throw TypeError(); - var t = arguments.length > 1 ? arguments[1] : undefined; - var k = 0; - while (k < len) { - var kValue = o._getter(k); - var testResult = predicate.call(t, kValue, k, o); - if (Boolean(testResult)) - return kValue; - ++k; - } - return undefined; - }}); - - // %TypedArray%.prototype.findIndex ( predicate, thisArg = undefined ) - Object.defineProperty($TypedArray$.prototype, 'findIndex', {value: function (predicate) { - var o = ToObject(this); - var lenValue = o.length; - var len = ToUint32(lenValue); - if (!IsCallable(predicate)) throw TypeError(); - var t = arguments.length > 1 ? arguments[1] : undefined; - var k = 0; - while (k < len) { - var kValue = o._getter(k); - var testResult = predicate.call(t, kValue, k, o); - if (Boolean(testResult)) - return k; - ++k; - } - return -1; - }}); - - // %TypedArray%.prototype.forEach ( callbackfn, thisArg = undefined ) - Object.defineProperty($TypedArray$.prototype, 'forEach', {value: function (callbackfn) { - if (this === undefined || this === null) throw TypeError(); - var t = Object(this); - var len = ToUint32(t.length); - if (!IsCallable(callbackfn)) throw TypeError(); - var thisp = arguments[1]; - for (var i = 0; i < len; i++) - callbackfn.call(thisp, t._getter(i), i, t); - }}); - - // %TypedArray%.prototype.indexOf (searchElement, fromIndex = 0 ) - Object.defineProperty($TypedArray$.prototype, 'indexOf', {value: function (searchElement) { - if (this === undefined || this === null) throw TypeError(); - var t = Object(this); - var len = ToUint32(t.length); - if (len === 0) return -1; - var no = 0; - var na; - if (arguments.length > 0) { - na = Number(arguments[1]); - if (na !== no) { - no = 0; - } else if (na !== 0 && na !== (1 / 0) && na !== -(1 / 0)) { - no = (na > 0 || -1) * floor(abs(na)); - } - } - if (no >= len) return -1; - var k = no >= 0 ? no : max(len - abs(no), 0); - for (; k < len; k++) { - if (t._getter(k) === searchElement) { - return k; - } - } - return -1; - }}); - - // %TypedArray%.prototype.join ( separator ) - Object.defineProperty($TypedArray$.prototype, 'join', {value: function (separator) { - if (this === undefined || this === null) throw TypeError(); - var t = Object(this); - var len = ToUint32(t.length); - var tmp = Array(len); - for (var i = 0; i < len; ++i) - tmp[i] = t._getter(i); - return tmp.join(separator === undefined ? ',' : separator); // Hack for IE7 - }}); - - // %TypedArray%.prototype.keys ( ) - // -- defined in es6.js to shim browsers w/ native TypedArrays - - // %TypedArray%.prototype.lastIndexOf ( searchElement, fromIndex = this.length-1 ) - Object.defineProperty($TypedArray$.prototype, 'lastIndexOf', {value: function (searchElement) { - if (this === undefined || this === null) throw TypeError(); - var t = Object(this); - var len = ToUint32(t.length); - if (len === 0) return -1; - var n = len; - if (arguments.length > 1) { - n = Number(arguments[1]); - if (n !== n) { - n = 0; - } else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) { - n = (n > 0 || -1) * floor(abs(n)); - } - } - var k = n >= 0 ? min(n, len - 1) : len - abs(n); - for (; k >= 0; k--) { - if (t._getter(k) === searchElement) - return k; - } - return -1; - }}); - - // get %TypedArray%.prototype.length - // -- applied directly to the object in the constructor - - // %TypedArray%.prototype.map ( callbackfn, thisArg = undefined ) - Object.defineProperty($TypedArray$.prototype, 'map', {value: function (callbackfn) { - if (this === undefined || this === null) throw TypeError(); - var t = Object(this); - var len = ToUint32(t.length); - if (!IsCallable(callbackfn)) throw TypeError(); - var res = []; - res.length = len; - var thisp = arguments[1]; - for (var i = 0; i < len; i++) - res[i] = callbackfn.call(thisp, t._getter(i), i, t); - return new this.constructor(res); - }}); - - // %TypedArray%.prototype.reduce ( callbackfn [, initialValue] ) - Object.defineProperty($TypedArray$.prototype, 'reduce', {value: function (callbackfn) { - if (this === undefined || this === null) throw TypeError(); - var t = Object(this); - var len = ToUint32(t.length); - if (!IsCallable(callbackfn)) throw TypeError(); - // no value to return if no initial value and an empty array - if (len === 0 && arguments.length === 1) throw TypeError(); - var k = 0; - var accumulator; - if (arguments.length >= 2) { - accumulator = arguments[1]; - } else { - accumulator = t._getter(k++); - } - while (k < len) { - accumulator = callbackfn.call(undefined, accumulator, t._getter(k), k, t); - k++; - } - return accumulator; - }}); - - // %TypedArray%.prototype.reduceRight ( callbackfn [, initialValue] ) - Object.defineProperty($TypedArray$.prototype, 'reduceRight', {value: function (callbackfn) { - if (this === undefined || this === null) throw TypeError(); - var t = Object(this); - var len = ToUint32(t.length); - if (!IsCallable(callbackfn)) throw TypeError(); - // no value to return if no initial value, empty array - if (len === 0 && arguments.length === 1) throw TypeError(); - var k = len - 1; - var accumulator; - if (arguments.length >= 2) { - accumulator = arguments[1]; - } else { - accumulator = t._getter(k--); - } - while (k >= 0) { - accumulator = callbackfn.call(undefined, accumulator, t._getter(k), k, t); - k--; - } - return accumulator; - }}); - - // %TypedArray%.prototype.reverse ( ) - Object.defineProperty($TypedArray$.prototype, 'reverse', {value: function () { - if (this === undefined || this === null) throw TypeError(); - var t = Object(this); - var len = ToUint32(t.length); - var half = floor(len / 2); - for (var i = 0, j = len - 1; i < half; ++i, --j) { - var tmp = t._getter(i); - t._setter(i, t._getter(j)); - t._setter(j, tmp); - } - return t; - }}); - - // %TypedArray%.prototype.set(array, offset = 0 ) - // %TypedArray%.prototype.set(typedArray, offset = 0 ) - // WebIDL: void set(TypedArray array, optional unsigned long offset); - // WebIDL: void set(sequence array, optional unsigned long offset); - Object.defineProperty($TypedArray$.prototype, 'set', {value: function (index, value) { - if (arguments.length < 1) throw SyntaxError('Not enough arguments'); - var array, sequence, offset, len, - i, s, d, - byteOffset, byteLength, tmp; - - if (typeof arguments[0] === 'object' && arguments[0].constructor === this.constructor) { - // void set(TypedArray array, optional unsigned long offset); - array = arguments[0]; - offset = ToUint32(arguments[1]); - - if (offset + array.length > this.length) { - throw RangeError('Offset plus length of array is out of range'); - } - - byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT; - byteLength = array.length * this.BYTES_PER_ELEMENT; - - if (array.buffer === this.buffer) { - tmp = []; - for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) { - tmp[i] = array.buffer._bytes[s]; - } - for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) { - this.buffer._bytes[d] = tmp[i]; - } - } else { - for (i = 0, s = array.byteOffset, d = byteOffset; - i < byteLength; i += 1, s += 1, d += 1) { - this.buffer._bytes[d] = array.buffer._bytes[s]; - } - } - } else if (typeof arguments[0] === 'object' && typeof arguments[0].length !== 'undefined') { - // void set(sequence array, optional unsigned long offset); - sequence = arguments[0]; - len = ToUint32(sequence.length); - offset = ToUint32(arguments[1]); - - if (offset + len > this.length) { - throw RangeError('Offset plus length of array is out of range'); - } - - for (i = 0; i < len; i += 1) { - s = sequence[i]; - this._setter(offset + i, Number(s)); - } - } else { - throw TypeError('Unexpected argument type(s)'); - } - }}); - - // %TypedArray%.prototype.slice ( start, end ) - Object.defineProperty($TypedArray$.prototype, 'slice', {value: function (m_start, m_end) { - var m_o = ToObject(this); - var lenVal = m_o.length; - var m_len = ToUint32(lenVal); - var relativeStart = ToInt32(m_start); - var m_k = (relativeStart < 0) ? max(m_len + relativeStart, 0) : min(relativeStart, m_len); - var relativeEnd = (m_end === undefined) ? m_len : ToInt32(m_end); - var m_final = (relativeEnd < 0) ? max(m_len + relativeEnd, 0) : min(relativeEnd, m_len); - var m_count = m_final - m_k; - var m_c = m_o.constructor; - var m_a = new m_c(m_count); - var m_n = 0; - while (m_k < m_final) { - var kValue = m_o._getter(m_k); - m_a._setter(m_n, kValue); - ++m_k; - ++m_n; - } - return m_a; - }}); - - // %TypedArray%.prototype.some ( callbackfn, thisArg = undefined ) - Object.defineProperty($TypedArray$.prototype, 'some', {value: function (callbackfn) { - if (this === undefined || this === null) throw TypeError(); - var t = Object(this); - var len = ToUint32(t.length); - if (!IsCallable(callbackfn)) throw TypeError(); - var thisp = arguments[1]; - for (var i = 0; i < len; i++) { - if (callbackfn.call(thisp, t._getter(i), i, t)) { - return true; - } - } - return false; - }}); - - // %TypedArray%.prototype.sort ( comparefn ) - Object.defineProperty($TypedArray$.prototype, 'sort', {value: function (comparefn) { - if (this === undefined || this === null) throw TypeError(); - var t = Object(this); - var len = ToUint32(t.length); - var tmp = Array(len); - for (var i = 0; i < len; ++i) - tmp[i] = t._getter(i); - if (comparefn) tmp.sort(comparefn); else tmp.sort(); // Hack for IE8/9 - for (i = 0; i < len; ++i) - t._setter(i, tmp[i]); - return t; - }}); - - // %TypedArray%.prototype.subarray(begin = 0, end = this.length ) - // WebIDL: TypedArray subarray(long begin, optional long end); - Object.defineProperty($TypedArray$.prototype, 'subarray', {value: function (start, end) { - function clamp(v, min, max) { - return v < min ? min : v > max ? max : v; - } - - start = ToInt32(start); - end = ToInt32(end); - - if (arguments.length < 1) { - start = 0; - } - if (arguments.length < 2) { - end = this.length; - } - - if (start < 0) { - start = this.length + start; - } - if (end < 0) { - end = this.length + end; - } - - start = clamp(start, 0, this.length); - end = clamp(end, 0, this.length); - - var len = end - start; - if (len < 0) { - len = 0; - } - - return new this.constructor( - this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len); - }}); - - // %TypedArray%.prototype.toLocaleString ( ) - // %TypedArray%.prototype.toString ( ) - // %TypedArray%.prototype.values ( ) - // %TypedArray%.prototype [ @@iterator ] ( ) - // get %TypedArray%.prototype [ @@toStringTag ] - // -- defined in es6.js to shim browsers w/ native TypedArrays - - function makeTypedArray(elementSize, pack, unpack) { - // Each TypedArray type requires a distinct constructor instance with - // identical logic, which this produces. - var TypedArray = function () { - Object.defineProperty(this, 'constructor', {value: TypedArray}); - $TypedArray$.apply(this, arguments); - makeArrayAccessors(this); - }; - if ('__proto__' in TypedArray) { - TypedArray.__proto__ = $TypedArray$; - } else { - TypedArray.from = $TypedArray$.from; - TypedArray.of = $TypedArray$.of; - } - - TypedArray.BYTES_PER_ELEMENT = elementSize; - - var TypedArrayPrototype = function () { - }; - TypedArrayPrototype.prototype = $TypedArrayPrototype$; - - TypedArray.prototype = new TypedArrayPrototype(); - - Object.defineProperty(TypedArray.prototype, 'BYTES_PER_ELEMENT', {value: elementSize}); - Object.defineProperty(TypedArray.prototype, '_pack', {value: pack}); - Object.defineProperty(TypedArray.prototype, '_unpack', {value: unpack}); - - return TypedArray; - } - - var Int8Array = makeTypedArray(1, packI8, unpackI8); - var Uint8Array = makeTypedArray(1, packU8, unpackU8); - var Uint8ClampedArray = makeTypedArray(1, packU8Clamped, unpackU8); - var Int16Array = makeTypedArray(2, packI16, unpackI16); - var Uint16Array = makeTypedArray(2, packU16, unpackU16); - var Int32Array = makeTypedArray(4, packI32, unpackI32); - var Uint32Array = makeTypedArray(4, packU32, unpackU32); - var Float32Array = makeTypedArray(4, packF32, unpackF32); - var Float64Array = makeTypedArray(8, packF64, unpackF64); - - global.Int8Array = win.Int8Array = global.Int8Array || Int8Array; - global.Uint8Array = win.Uint8Array = global.Uint8Array || Uint8Array; - global.Uint8ClampedArray = win.Uint8ClampedArray = global.Uint8ClampedArray || Uint8ClampedArray; - global.Int16Array = win.Int16Array = global.Int16Array || Int16Array; - global.Uint16Array = win.Uint16Array = global.Uint16Array || Uint16Array; - global.Int32Array = win.Int32Array = global.Int32Array || Int32Array; - global.Uint32Array = win.Uint32Array = global.Uint32Array || Uint32Array; - global.Float32Array = win.Float32Array = global.Float32Array || Float32Array; - global.Float64Array = win.Float64Array = global.Float64Array || Float64Array; - }()); - - // - // 6 The DataView View Type - // - - (function () { - function r(array, index) { - return IsCallable(array.get) ? array.get(index) : array[index]; - } - - var IS_BIG_ENDIAN = (function () { - var u16array = new global.Uint16Array([0x1234]), - u8array = new global.Uint8Array(u16array.buffer); - return r(u8array, 0) === 0x12; - }()); - - // DataView(buffer, byteOffset=0, byteLength=undefined) - // WebIDL: Constructor(ArrayBuffer buffer, - // optional unsigned long byteOffset, - // optional unsigned long byteLength) - function DataView(buffer, byteOffset, byteLength) { - if (!(buffer instanceof ArrayBuffer || Class(buffer) === 'ArrayBuffer')) throw TypeError(); - - byteOffset = ToUint32(byteOffset); - if (byteOffset > buffer.byteLength) - throw RangeError('byteOffset out of range'); - - if (byteLength === undefined) - byteLength = buffer.byteLength - byteOffset; - else - byteLength = ToUint32(byteLength); - - if ((byteOffset + byteLength) > buffer.byteLength) - throw RangeError('byteOffset and length reference an area beyond the end of the buffer'); - - Object.defineProperty(this, 'buffer', {value: buffer}); - Object.defineProperty(this, 'byteLength', {value: byteLength}); - Object.defineProperty(this, 'byteOffset', {value: byteOffset}); - }; - - // get DataView.prototype.buffer - // get DataView.prototype.byteLength - // get DataView.prototype.byteOffset - // -- applied directly to instances by the constructor - - function makeGetter(arrayType) { - return function GetViewValue(byteOffset, littleEndian) { - byteOffset = ToUint32(byteOffset); - - if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) - throw RangeError('Array index out of range'); - - byteOffset += this.byteOffset; - - var uint8Array = new global.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT), - bytes = []; - for (var i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) - bytes.push(r(uint8Array, i)); - - if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) - bytes.reverse(); - - return r(new arrayType(new global.Uint8Array(bytes).buffer), 0); - }; - } - - Object.defineProperty(DataView.prototype, 'getUint8', {value: makeGetter(global.Uint8Array)}); - Object.defineProperty(DataView.prototype, 'getInt8', {value: makeGetter(global.Int8Array)}); - Object.defineProperty(DataView.prototype, 'getUint16', {value: makeGetter(global.Uint16Array)}); - Object.defineProperty(DataView.prototype, 'getInt16', {value: makeGetter(global.Int16Array)}); - Object.defineProperty(DataView.prototype, 'getUint32', {value: makeGetter(global.Uint32Array)}); - Object.defineProperty(DataView.prototype, 'getInt32', {value: makeGetter(global.Int32Array)}); - Object.defineProperty(DataView.prototype, 'getFloat32', {value: makeGetter(global.Float32Array)}); - Object.defineProperty(DataView.prototype, 'getFloat64', {value: makeGetter(global.Float64Array)}); - - function makeSetter(arrayType) { - return function SetViewValue(byteOffset, value, littleEndian) { - byteOffset = ToUint32(byteOffset); - if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) - throw RangeError('Array index out of range'); - - // Get bytes - var typeArray = new arrayType([value]), - byteArray = new global.Uint8Array(typeArray.buffer), - bytes = [], i, byteView; - - for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) - bytes.push(r(byteArray, i)); - - // Flip if necessary - if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) - bytes.reverse(); - - // Write them - byteView = new Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT); - byteView.set(bytes); - }; - } - - Object.defineProperty(DataView.prototype, 'setUint8', {value: makeSetter(global.Uint8Array)}); - Object.defineProperty(DataView.prototype, 'setInt8', {value: makeSetter(global.Int8Array)}); - Object.defineProperty(DataView.prototype, 'setUint16', {value: makeSetter(global.Uint16Array)}); - Object.defineProperty(DataView.prototype, 'setInt16', {value: makeSetter(global.Int16Array)}); - Object.defineProperty(DataView.prototype, 'setUint32', {value: makeSetter(global.Uint32Array)}); - Object.defineProperty(DataView.prototype, 'setInt32', {value: makeSetter(global.Int32Array)}); - Object.defineProperty(DataView.prototype, 'setFloat32', {value: makeSetter(global.Float32Array)}); - Object.defineProperty(DataView.prototype, 'setFloat64', {value: makeSetter(global.Float64Array)}); - - global.DataView = global.DataView || DataView; - - }()); - - }(exports, window) - ); -} -// workaround for crypto-js on IE11 -// http://code.google.com/p/crypto-js/issues/detail?id=81 -if ('window' in global) { - if (!('Uint8ClampedArray' in window)) { - window.Uint8ClampedArray = global.Uint8Array; - } -} \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/lib/session.js b/s4t-server-node/node_modules/autobahn/lib/session.js deleted file mode 100644 index 59d19b5..0000000 --- a/s4t-server-node/node_modules/autobahn/lib/session.js +++ /dev/null @@ -1,1372 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -// require('assert') would be nice .. but it does not -// work with Google Closure after Browserify - -var when = require('when'); -var when_fn = require("when/function"); - -var log = require('./log.js'); -var util = require('./util.js'); - -// IE fallback (http://afuchs.tumblr.com/post/23550124774/date-now-in-ie8) -Date.now = Date.now || function() { return +new Date; }; - - -// WAMP "Advanced Profile" support in AutobahnJS per role -// -WAMP_FEATURES = { - caller: { - features: { - caller_identification: true, - progressive_call_results: true - } - }, - callee: { - features: { - progressive_call_results: true - } - }, - publisher: { - features: { - subscriber_blackwhite_listing: true, - publisher_exclusion: true, - publisher_identification: true - } - }, - subscriber: { - features: { - publisher_identification: true - } - } -}; - - -// generate a WAMP ID -// -function newid () { - return Math.floor(Math.random() * 9007199254740992); -} - - -var Invocation = function (caller, progress) { - - var self = this; - - self.caller = caller; - self.progress = progress; -}; - - -var Event = function (publication, publisher) { - - var self = this; - - self.publication = publication; - self.publisher = publisher; -}; - - -var Result = function (args, kwargs) { - - var self = this; - - self.args = args || []; - self.kwargs = kwargs || {}; -}; - - -var Error = function (error, args, kwargs) { - - var self = this; - - self.error = error; - self.args = args || []; - self.kwargs = kwargs || {}; -}; - - -var Subscription = function (topic, handler, options, session, id) { - - var self = this; - - self.topic = topic; - self.handler = handler; - self.options = options || {}; - self.session = session; - self.id = id; - - self.active = true; -}; - - -Subscription.prototype.unsubscribe = function () { - - var self = this; - return self.session.unsubscribe(self); -}; - - - -var Registration = function (procedure, endpoint, options, session, id) { - - var self = this; - - self.procedure = procedure; - self.endpoint = endpoint; - self.options = options || {}; - self.session = session; - self.id = id; - - self.active = true; -}; - - -Registration.prototype.unregister = function () { - - var self = this; - return self.session.unregister(self); -}; - - -var Publication = function (id) { - - var self = this; - self.id = id; -}; - - -var MSG_TYPE = { - HELLO: 1, - WELCOME: 2, - ABORT: 3, - CHALLENGE: 4, - AUTHENTICATE: 5, - GOODBYE: 6, - HEARTBEAT: 7, - ERROR: 8, - PUBLISH: 16, - PUBLISHED: 17, - SUBSCRIBE: 32, - SUBSCRIBED: 33, - UNSUBSCRIBE: 34, - UNSUBSCRIBED: 35, - EVENT: 36, - CALL: 48, - CANCEL: 49, - RESULT: 50, - REGISTER: 64, - REGISTERED: 65, - UNREGISTER: 66, - UNREGISTERED: 67, - INVOCATION: 68, - INTERRUPT: 69, - YIELD: 70 -}; - - - -var Session = function (socket, defer, onchallenge) { - - var self = this; - - // the transport connection (WebSocket object) - self._socket = socket; - - // the Deferred factory to use - self._defer = defer; - - // the WAMP authentication challenge handler - self._onchallenge = onchallenge; - - // the WAMP session ID - self._id = null; - - // the WAMP realm joined - self._realm = null; - - // the WAMP features in use - self._features = null; - - // closing state - self._goodbye_sent = false; - self._transport_is_closing = false; - - // outstanding requests; - self._publish_reqs = {}; - self._subscribe_reqs = {}; - self._unsubscribe_reqs = {}; - self._call_reqs = {}; - self._register_reqs = {}; - self._unregister_reqs = {}; - - // subscriptions in place; - self._subscriptions = {}; - - // registrations in place; - self._registrations = {}; - - // incoming invocations; - self._invocations = {}; - - // prefix shortcuts for URIs - self._prefixes = {}; - - - - self._send_wamp = function (msg) { - // forward WAMP message to be sent to WAMP transport - self._socket.send(msg); - }; - - - self._protocol_violation = function (reason) { - log.debug("failing transport due to protocol violation: " + reason); - self._socket.close(1002, "protocol violation: " + reason); - }; - - self._MESSAGE_MAP = {}; - self._MESSAGE_MAP[MSG_TYPE.ERROR] = {}; - - - self._process_SUBSCRIBED = function (msg) { - // - // process SUBSCRIBED reply to SUBSCRIBE - // - var request = msg[1]; - var subscription = msg[2]; - - if (request in self._subscribe_reqs) { - - var r = self._subscribe_reqs[request]; - - var d = r[0]; - var topic = r[1]; - var handler = r[2]; - var options = r[3]; - - if (!(subscription in self._subscriptions)) { - self._subscriptions[subscription] = []; - } - var sub = new Subscription(topic, handler, options, self, subscription); - self._subscriptions[subscription].push(sub); - - d.resolve(sub); - - delete self._subscribe_reqs[request]; - - } else { - self._protocol_violation("SUBSCRIBED received for non-pending request ID " + request); - } - }; - self._MESSAGE_MAP[MSG_TYPE.SUBSCRIBED] = self._process_SUBSCRIBED; - - - self._process_SUBSCRIBE_ERROR = function (msg) { - // - // process ERROR reply to SUBSCRIBE - // - var request = msg[2]; - if (request in self._subscribe_reqs) { - - var details = msg[3]; - var error = new Error(msg[4], msg[5], msg[6]); - - var r = self._subscribe_reqs[request]; - - var d = r[0]; - - d.reject(error); - - delete self._subscribe_reqs[request]; - - } else { - self._protocol_violation("SUBSCRIBE-ERROR received for non-pending request ID " + request); - } - }; - self._MESSAGE_MAP[MSG_TYPE.ERROR][MSG_TYPE.SUBSCRIBE] = self._process_SUBSCRIBE_ERROR; - - - self._process_UNSUBSCRIBED = function (msg) { - // - // process UNSUBSCRIBED reply to UNSUBSCRIBE - // - var request = msg[1]; - - if (request in self._unsubscribe_reqs) { - - var r = self._unsubscribe_reqs[request]; - - var d = r[0]; - var subscription = r[1]; - - if (subscription in self._subscriptions) { - var subs = self._subscriptions[subscription]; - // the following should actually be NOP, since UNSUBSCRIBE was - // only sent when subs got empty - for (var i = 0; i < subs.length; ++i) { - subs[i].active = false; - } - delete self._subscriptions[subscription]; - } - - d.resolve(true); - - delete self._unsubscribe_reqs[request]; - - } else { - self._protocol_violation("UNSUBSCRIBED received for non-pending request ID " + request); - } - }; - self._MESSAGE_MAP[MSG_TYPE.UNSUBSCRIBED] = self._process_UNSUBSCRIBED; - - - self._process_UNSUBSCRIBE_ERROR = function (msg) { - // - // process ERROR reply to UNSUBSCRIBE - // - var request = msg[2]; - if (request in self._unsubscribe_reqs) { - - var details = msg[3]; - var error = new Error(msg[4], msg[5], msg[6]); - - var r = self._unsubscribe_reqs[request]; - - var d = r[0]; - var subscription = r[1]; - - d.reject(error); - - delete self._unsubscribe_reqs[request]; - - } else { - self._protocol_violation("UNSUBSCRIBE-ERROR received for non-pending request ID " + request); - } - }; - self._MESSAGE_MAP[MSG_TYPE.ERROR][MSG_TYPE.UNSUBSCRIBE] = self._process_UNSUBSCRIBE_ERROR; - - - self._process_PUBLISHED = function (msg) { - // - // process PUBLISHED reply to PUBLISH - // - var request = msg[1]; - var publication = msg[2]; - - if (request in self._publish_reqs) { - - var r = self._publish_reqs[request]; - - var d = r[0]; - var options = r[1]; - - var pub = new Publication(publication); - d.resolve(pub); - - delete self._publish_reqs[request]; - - } else { - self._protocol_violation("PUBLISHED received for non-pending request ID " + request); - } - }; - self._MESSAGE_MAP[MSG_TYPE.PUBLISHED] = self._process_PUBLISHED; - - - self._process_PUBLISH_ERROR = function (msg) { - // - // process ERROR reply to PUBLISH - // - var request = msg[2]; - if (request in self._publish_reqs) { - - var details = msg[3]; - var error = new Error(msg[4], msg[5], msg[6]); - - var r = self._publish_reqs[request]; - - var d = r[0]; - var options = r[1]; - - d.reject(error); - - delete self._publish_reqs[request]; - - } else { - self._protocol_violation("PUBLISH-ERROR received for non-pending request ID " + request); - } - }; - self._MESSAGE_MAP[MSG_TYPE.ERROR][MSG_TYPE.PUBLISH] = self._process_PUBLISH_ERROR; - - - self._process_EVENT = function (msg) { - // - // process EVENT message - // - // [EVENT, SUBSCRIBED.Subscription|id, PUBLISHED.Publication|id, Details|dict, PUBLISH.Arguments|list, PUBLISH.ArgumentsKw|dict] - - var subscription = msg[1]; - - if (subscription in self._subscriptions) { - - var publication = msg[2]; - var details = msg[3]; - - var args = msg[4] || []; - var kwargs = msg[5] || {}; - - var ed = new Event(publication, details.publisher); - - var subs = self._subscriptions[subscription]; - - for (var i = 0; i < subs.length; ++i) { - try { - subs[i].handler(args, kwargs, ed); - } catch (e) { - log.debug("Exception raised in event handler", e); - } - } - - } else { - self._protocol_violation("EVENT received for non-subscribed subscription ID " + subscription); - } - }; - self._MESSAGE_MAP[MSG_TYPE.EVENT] = self._process_EVENT; - - - self._process_REGISTERED = function (msg) { - // - // process REGISTERED reply to REGISTER - // - var request = msg[1]; - var registration = msg[2]; - - if (request in self._register_reqs) { - - var r = self._register_reqs[request]; - - var d = r[0]; - var procedure = r[1]; - var endpoint = r[2]; - var options = r[3]; - - var reg = new Registration(procedure, endpoint, options, self, registration); - - self._registrations[registration] = reg; - - d.resolve(reg); - - delete self._register_reqs[request]; - - } else { - self._protocol_violation("REGISTERED received for non-pending request ID " + request); - } - }; - self._MESSAGE_MAP[MSG_TYPE.REGISTERED] = self._process_REGISTERED; - - - self._process_REGISTER_ERROR = function (msg) { - // - // process ERROR reply to REGISTER - // - var request = msg[2]; - if (request in self._register_reqs) { - - var details = msg[3]; - var error = new Error(msg[4], msg[5], msg[6]); - - var r = self._register_reqs[request]; - - var d = r[0]; - - d.reject(error); - - delete self._register_reqs[request]; - - } else { - self._protocol_violation("REGISTER-ERROR received for non-pending request ID " + request); - } - }; - self._MESSAGE_MAP[MSG_TYPE.ERROR][MSG_TYPE.REGISTER] = self._process_REGISTER_ERROR; - - - self._process_UNREGISTERED = function (msg) { - // - // process UNREGISTERED reply to UNREGISTER - // - var request = msg[1]; - - if (request in self._unregister_reqs) { - - var r = self._unregister_reqs[request]; - - var d = r[0]; - var registration = r[1]; - - if (registration.id in self._registrations) { - delete self._registrations[registration.id]; - } - - registration.active = false; - d.resolve(); - - delete self._unregister_reqs[request]; - - } else { - self._protocol_violation("UNREGISTERED received for non-pending request ID " + request); - } - }; - self._MESSAGE_MAP[MSG_TYPE.UNREGISTERED] = self._process_UNREGISTERED; - - - self._process_UNREGISTER_ERROR = function (msg) { - // - // process ERROR reply to UNREGISTER - // - var request = msg[2]; - if (request in self._unregister_reqs) { - - var details = msg[3]; - var error = new Error(msg[4], msg[5], msg[6]); - - var r = self._unregister_reqs[request]; - - var d = r[0]; - var registration = r[1]; - - d.reject(error); - - delete self._unregister_reqs[request]; - - } else { - self._protocol_violation("UNREGISTER-ERROR received for non-pending request ID " + request); - } - }; - self._MESSAGE_MAP[MSG_TYPE.ERROR][MSG_TYPE.UNREGISTER] = self._process_UNREGISTER_ERROR; - - - self._process_RESULT = function (msg) { - // - // process RESULT reply to CALL - // - var request = msg[1]; - if (request in self._call_reqs) { - - var details = msg[2]; - - var args = msg[3] || []; - var kwargs = msg[4] || {}; - - // maybe wrap complex result: - var result = null; - if (args.length > 1 || Object.keys(kwargs).length > 0) { - // wrap complex result is more than 1 positional result OR - // non-empty keyword result - result = new Result(args, kwargs); - } else if (args.length > 0) { - // single positional result - result = args[0]; - } - - var r = self._call_reqs[request]; - - var d = r[0]; - var options = r[1]; - - if (details.progress) { - if (options && options.receive_progress) { - d.notify(result); - } - } else { - d.resolve(result); - delete self._call_reqs[request]; - } - } else { - self._protocol_violation("CALL-RESULT received for non-pending request ID " + request); - } - }; - self._MESSAGE_MAP[MSG_TYPE.RESULT] = self._process_RESULT; - - - self._process_CALL_ERROR = function (msg) { - // - // process ERROR reply to CALL - // - var request = msg[2]; - if (request in self._call_reqs) { - - var details = msg[3]; - var error = new Error(msg[4], msg[5], msg[6]); - - var r = self._call_reqs[request]; - - var d = r[0]; - var options = r[1]; - - d.reject(error); - - delete self._call_reqs[request]; - - } else { - self._protocol_violation("CALL-ERROR received for non-pending request ID " + request); - } - }; - self._MESSAGE_MAP[MSG_TYPE.ERROR][MSG_TYPE.CALL] = self._process_CALL_ERROR; - - - self._process_INVOCATION = function (msg) { - // - // process INVOCATION message - // - // [INVOCATION, Request|id, REGISTERED.Registration|id, Details|dict, CALL.Arguments|list, CALL.ArgumentsKw|dict] - // - var request = msg[1]; - var registration = msg[2]; - - var details = msg[3]; - // receive_progress - // timeout - // caller - - if (registration in self._registrations) { - - var endpoint = self._registrations[registration].endpoint; - - var args = msg[4] || []; - var kwargs = msg[5] || {}; - - // create progress function for invocation - // - var progress = null; - if (details.receive_progress) { - - progress = function (args, kwargs) { - var progress_msg = [MSG_TYPE.YIELD, request, {progress: true}]; - - args = args || []; - kwargs = kwargs || {}; - - var kwargs_len = Object.keys(kwargs).length; - if (args.length || kwargs_len) { - progress_msg.push(args); - if (kwargs_len) { - progress_msg.push(kwargs); - } - } - self._send_wamp(progress_msg); - } - }; - - var cd = new Invocation(details.caller, progress); - - // We use the following whenjs call wrapper, which automatically - // wraps a plain, non-promise value in a (immediately resolved) promise - // - // See: https://github.com/cujojs/when/blob/master/docs/api.md#fncall - // - when_fn.call(endpoint, args, kwargs, cd).then( - - function (res) { - // construct YIELD message - // FIXME: Options - // - var reply = [MSG_TYPE.YIELD, request, {}]; - - if (res instanceof Result) { - var kwargs_len = Object.keys(res.kwargs).length; - if (res.args.length || kwargs_len) { - reply.push(res.args); - if (kwargs_len) { - reply.push(res.kwargs); - } - } - } else { - reply.push([res]); - } - - // send WAMP message - // - self._send_wamp(reply); - }, - - function (err) { - // construct ERROR message - // [ERROR, REQUEST.Type|int, REQUEST.Request|id, Details|dict, Error|uri, Arguments|list, ArgumentsKw|dict] - - var reply = [MSG_TYPE.ERROR, MSG_TYPE.INVOCATION, request, {}]; - - if (err instanceof Error) { - - reply.push(err.error); - - var kwargs_len = Object.keys(err.kwargs).length; - if (err.args.length || kwargs_len) { - reply.push(err.args); - if (kwargs_len) { - reply.push(err.kwargs); - } - } - } else { - reply.push('wamp.error.runtime_error'); - reply.push([err]); - } - - // send WAMP message - // - self._send_wamp(reply); - } - ); - - } else { - self._protocol_violation("INVOCATION received for non-registered registration ID " + request); - } - }; - self._MESSAGE_MAP[MSG_TYPE.INVOCATION] = self._process_INVOCATION; - - - // callback fired by WAMP transport on receiving a WAMP message - // - self._socket.onmessage = function (msg) { - - var msg_type = msg[0]; - - // WAMP session not yet open - // - if (!self._id) { - - // the first message must be WELCOME, ABORT or CHALLENGE .. - // - if (msg_type === MSG_TYPE.WELCOME) { - - self._id = msg[1]; - - // determine actual set of advanced features that can be used - // - var rf = msg[2]; - self._features = {}; - - if (rf.roles.broker) { - // "Basic Profile" is mandatory - self._features.subscriber = {}; - self._features.publisher = {}; - - // fill in features that both peers support - if (rf.roles.broker.features) { - - for (var att in WAMP_FEATURES.publisher.features) { - self._features.publisher[att] = WAMP_FEATURES.publisher.features[att] && - rf.roles.broker.features[att]; - } - - for (var att in WAMP_FEATURES.subscriber.features) { - self._features.subscriber[att] = WAMP_FEATURES.subscriber.features[att] && - rf.roles.broker.features[att]; - } - } - } - - if (rf.roles.dealer) { - // "Basic Profile" is mandatory - self._features.caller = {}; - self._features.callee = {}; - - // fill in features that both peers support - if (rf.roles.dealer.features) { - - for (var att in WAMP_FEATURES.caller.features) { - self._features.caller[att] = WAMP_FEATURES.caller.features[att] && - rf.roles.dealer.features[att]; - } - - for (var att in WAMP_FEATURES.callee.features) { - self._features.callee[att] = WAMP_FEATURES.callee.features[att] && - rf.roles.dealer.features[att]; - } - } - } - - if (self.onjoin) { - self.onjoin(msg[2]); - } - - } else if (msg_type === MSG_TYPE.ABORT) { - - var details = msg[1]; - var reason = msg[2]; - - if (self.onleave) { - self.onleave(reason, details); - } - - } else if (msg_type === MSG_TYPE.CHALLENGE) { - - if (self._onchallenge) { - - var method = msg[1]; - var extra = msg[2]; - - when_fn.call(self._onchallenge, self, method, extra).then( - function (signature) { - var msg = [MSG_TYPE.AUTHENTICATE, signature, {}]; - self._send_wamp(msg); - }, - function (err) { - log.debug("onchallenge() raised:", err); - - var msg = [MSG_TYPE.ABORT, {message: "sorry, I cannot authenticate (onchallenge handler raised an exception)"}, "wamp.error.cannot_authenticate"]; - self._send_wamp(msg); - self._socket.close(1000); - } - ); - } else { - log.debug("received WAMP challenge, but no onchallenge() handler set"); - - var msg = [MSG_TYPE.ABORT, {message: "sorry, I cannot authenticate (no onchallenge handler set)"}, "wamp.error.cannot_authenticate"]; - self._send_wamp(msg); - self._socket.close(1000); - } - - } else { - self._protocol_violation("unexpected message type " + msg_type); - } - - // WAMP session is open - // - } else { - - if (msg_type === MSG_TYPE.GOODBYE) { - - if (!self._goodbye_sent) { - - var reply = [MSG_TYPE.GOODBYE, {}, "wamp.error.goodbye_and_out"]; - self._send_wamp(reply); - } - - self._id = null; - self._realm = null; - self._features = null; - - var details = msg[1]; - var reason = msg[2]; - - if (self.onleave) { - self.onleave(reason, details); - } - - } else { - - if (msg_type === MSG_TYPE.ERROR) { - - var request_type = msg[1]; - if (request_type in self._MESSAGE_MAP[MSG_TYPE.ERROR]) { - - self._MESSAGE_MAP[msg_type][request_type](msg); - - } else { - - self._protocol_violation("unexpected ERROR message with request_type " + request_type); - } - - } else { - - if (msg_type in self._MESSAGE_MAP) { - - self._MESSAGE_MAP[msg_type](msg); - - } else { - - self._protocol_violation("unexpected message type " + msg_type); - } - } - } - } - }; - - // session object constructed .. track creation time - // - if ('performance' in global && 'now' in performance) { - self._created = performance.now(); - } else { - self._created = Date.now(); - } -}; - - -Object.defineProperty(Session.prototype, "defer", { - get: function () { - return this._defer; - } -}); - - -Object.defineProperty(Session.prototype, "id", { - get: function () { - return this._id; - } -}); - - -Object.defineProperty(Session.prototype, "realm", { - get: function () { - return this._realm; - } -}); - - -Object.defineProperty(Session.prototype, "isOpen", { - get: function () { - return this.id !== null; - } -}); - - -Object.defineProperty(Session.prototype, "features", { - get: function () { - return this._features; - } -}); - - -Object.defineProperty(Session.prototype, "subscriptions", { - get: function () { - var keys = Object.keys(this._subscriptions); - var vals = []; - for (var i = 0; i < keys.length; ++i) { - vals.push(this._subscriptions[keys[i]]); - } - return vals; - } -}); - - -Object.defineProperty(Session.prototype, "registrations", { - get: function () { - var keys = Object.keys(this._registrations); - var vals = []; - for (var i = 0; i < keys.length; ++i) { - vals.push(this._registrations[keys[i]]); - } - return vals; - } -}); - - -Session.prototype.log = function () { - var self = this; - - if ('console' in global) { - - var header = null; - if (self._id && self._created) { - - var now = null; - if ('performance' in global && 'now' in performance) { - now = performance.now() - self._created; - } else { - now = Date.now() - self._created; - } - - header = "WAMP session " + self._id + " on '" + self._realm + "' at " + Math.round(now * 1000) / 1000 + " ms"; - } else { - header = "WAMP session"; - } - - if ('group' in console) { - console.group(header); - for (var i = 0; i < arguments.length; i += 1) { - console.log(arguments[i]); - } - console.groupEnd(); - } else { - var items = [header + ": "]; - for (var i = 0; i < arguments.length; i += 1) { - items.push(arguments[i]); - } - console.log.apply(console, items); - } - } -}; - - -Session.prototype.join = function (realm, authmethods, authid) { - - util.assert(typeof realm === 'string', "Session.join: must be a string"); - util.assert(!authmethods || Array.isArray(authmethods), "Session.join: must be an array []"); - util.assert(!authid || typeof authid === 'string', "Session.join: must be a string"); - - var self = this; - - if (self.isOpen) { - throw "session already open"; - } - - self._goodbye_sent = false; - self._realm = realm; - - var details = {}; - details.roles = WAMP_FEATURES; - - if (authmethods) { - details.authmethods = authmethods; - } - if (authid) { - details.authid = authid; - } - - var msg = [MSG_TYPE.HELLO, realm, details]; - self._send_wamp(msg); -}; - - -Session.prototype.leave = function (reason, message) { - - util.assert(!reason || typeof reason === 'string', "Session.leave: must be a string"); - util.assert(!message || typeof message === 'string', "Session.leave: must be a string"); - - var self = this; - - if (!self.isOpen) { - throw "session not open"; - } - - if (!reason) { - reason = "wamp.close.normal"; - } - - var details = {}; - if (message) { - details.message = message; - } - - var msg = [MSG_TYPE.GOODBYE, details, reason]; - self._send_wamp(msg); - self._goodbye_sent = true; -}; - - -Session.prototype.call = function (procedure, args, kwargs, options) { - - util.assert(typeof procedure === 'string', "Session.call: must be a string"); - util.assert(!args || Array.isArray(args), "Session.call: must be an array []"); - util.assert(!kwargs || kwargs instanceof Object, "Session.call: must be an object {}"); - util.assert(!options || options instanceof Object, "Session.call: must be an object {}"); - - var self = this; - - if (!self.isOpen) { - throw "session not open"; - } - - // create and remember new CALL request - // - var request = newid(); - var d = self._defer(); - self._call_reqs[request] = [d, options]; - - // construct CALL message - // - var msg = [MSG_TYPE.CALL, request, options || {}, self.resolve(procedure)]; - if (args) { - msg.push(args); - if (kwargs) { - msg.push(kwargs); - } - } - - // send WAMP message - // - self._send_wamp(msg); - - if (d.promise.then) { - // whenjs has the actual user promise in an attribute - return d.promise; - } else { - return d; - } -}; - - -Session.prototype.publish = function (topic, args, kwargs, options) { - - util.assert(typeof topic === 'string', "Session.publish: must be a string"); - util.assert(!args || Array.isArray(args), "Session.publish: must be an array []"); - util.assert(!kwargs || kwargs instanceof Object, "Session.publish: must be an object {}"); - util.assert(!options || options instanceof Object, "Session.publish: must be an object {}"); - - var self = this; - - if (!self.isOpen) { - throw "session not open"; - } - - var ack = options && options.acknowledge; - var d = null; - - // create and remember new PUBLISH request - // - var request = newid(); - if (ack) { - d = self._defer(); - self._publish_reqs[request] = [d, options]; - } - - // construct PUBLISH message - // - var msg = [MSG_TYPE.PUBLISH, request, options || {}, self.resolve(topic)]; - if (args) { - msg.push(args); - if (kwargs) { - msg.push(kwargs); - } - } - - // send WAMP message - // - self._send_wamp(msg); - - if (d) { - if (d.promise.then) { - // whenjs has the actual user promise in an attribute - return d.promise; - } else { - return d; - } - } -}; - - -Session.prototype.subscribe = function (topic, handler, options) { - - util.assert(typeof topic === 'string', "Session.subscribe: must be a string"); - util.assert(typeof handler === 'function', "Session.subscribe: must be a function"); - util.assert(!options || options instanceof Object, "Session.subscribe: must be an object {}"); - - var self = this; - - if (!self.isOpen) { - throw "session not open"; - } - - // create an remember new SUBSCRIBE request - // - var request = newid(); - var d = self._defer(); - self._subscribe_reqs[request] = [d, topic, handler, options]; - - // construct SUBSCRIBE message - // - var msg = [MSG_TYPE.SUBSCRIBE, request]; - if (options) { - msg.push(options); - } else { - msg.push({}); - } - msg.push(self.resolve(topic)); - - // send WAMP message - // - self._send_wamp(msg); - - if (d.promise.then) { - // whenjs has the actual user promise in an attribute - return d.promise; - } else { - return d; - } -}; - - -Session.prototype.register = function (procedure, endpoint, options) { - - util.assert(typeof procedure === 'string', "Session.register: must be a string"); - util.assert(typeof endpoint === 'function', "Session.register: must be a function"); - util.assert(!options || options instanceof Object, "Session.register: must be an object {}"); - - var self = this; - - if (!self.isOpen) { - throw "session not open"; - } - - // create an remember new REGISTER request - // - var request = newid(); - var d = self._defer(); - self._register_reqs[request] = [d, procedure, endpoint, options]; - - // construct REGISTER message - // - var msg = [MSG_TYPE.REGISTER, request]; - if (options) { - msg.push(options); - } else { - msg.push({}); - } - msg.push(self.resolve(procedure)); - - // send WAMP message - // - self._send_wamp(msg); - - if (d.promise.then) { - // whenjs has the actual user promise in an attribute - return d.promise; - } else { - return d; - } -}; - - -Session.prototype.unsubscribe = function (subscription) { - - util.assert(subscription instanceof Subscription, "Session.unsubscribe: must be an instance of class autobahn.Subscription"); - - var self = this; - - if (!self.isOpen) { - throw "session not open"; - } - - if (!subscription.active || !(subscription.id in self._subscriptions)) { - throw "subscription not active"; - } - - var subs = self._subscriptions[subscription.id]; - var i = subs.indexOf(subscription); - - if (i === -1) { - throw "subscription not active"; - } - - // remove handler subscription - subs.splice(i, 1); - subscription.active = false; - - var d = self._defer(); - - if (subs.length) { - // there are still handlers on the subscription .. - d.resolve(false); - - } else { - - // no handlers left .. - - // create and remember new UNSUBSCRIBE request - // - var request = newid(); - self._unsubscribe_reqs[request] = [d, subscription.id]; - - // construct UNSUBSCRIBE message - // - var msg = [MSG_TYPE.UNSUBSCRIBE, request, subscription.id]; - - // send WAMP message - // - self._send_wamp(msg); - } - - if (d.promise.then) { - // whenjs has the actual user promise in an attribute - return d.promise; - } else { - return d; - } -}; - - -Session.prototype.unregister = function (registration) { - - util.assert(registration instanceof Registration, "Session.unregister: must be an instance of class autobahn.Registration"); - - var self = this; - - if (!self.isOpen) { - throw "session not open"; - } - - if (!registration.active || !(registration.id in self._registrations)) { - throw "registration not active"; - } - - // create and remember new UNREGISTER request - // - var request = newid(); - var d = self._defer(); - self._unregister_reqs[request] = [d, registration]; - - // construct UNREGISTER message - // - var msg = [MSG_TYPE.UNREGISTER, request, registration.id]; - - // send WAMP message - // - self._send_wamp(msg); - - if (d.promise.then) { - // whenjs has the actual user promise in an attribute - return d.promise; - } else { - return d; - } -}; - - -Session.prototype.prefix = function (prefix, uri) { - - util.assert(typeof prefix === 'string', "Session.prefix: must be a string"); - util.assert(!uri || typeof uri === 'string', "Session.prefix: must be a string or falsy"); - - var self = this; - - if (uri) { - self._prefixes[prefix] = uri; - } else { - if (prefix in self._prefixes) { - delete self._prefixes[prefix]; - } - } -}; - - -Session.prototype.resolve = function (curie) { - - util.assert(typeof curie === 'string', "Session.resolve: must be a string"); - - var self = this; - - // skip if not a CURIE - var i = curie.indexOf(":"); - if (i >= 0) { - var prefix = curie.substring(0, i); - if (prefix in self._prefixes) { - return self._prefixes[prefix] + '.' + curie.substring(i + 1); - } else { - throw "cannot resolve CURIE prefix '" + prefix + "'"; - } - } else { - return curie; - } -}; - - -exports.Session = Session; - -exports.Invocation = Invocation; -exports.Event = Event; -exports.Result = Result; -exports.Error = Error; -exports.Subscription = Subscription; -exports.Registration = Registration; -exports.Publication = Publication; diff --git a/s4t-server-node/node_modules/autobahn/lib/transport/longpoll.js b/s4t-server-node/node_modules/autobahn/lib/transport/longpoll.js deleted file mode 100644 index fb5b112..0000000 --- a/s4t-server-node/node_modules/autobahn/lib/transport/longpoll.js +++ /dev/null @@ -1,204 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -var util = require('../util.js'); -var log = require('../log.js'); - -var when = require('when'); - - -function Factory (options) { - var self = this; - - util.assert(options.url !== undefined, "options.url missing"); - util.assert(typeof options.url === "string", "options.url must be a string"); - - self._options = options; -}; - - -Factory.prototype.type = "longpoll"; - - -Factory.prototype.create = function () { - - var self = this; - - log.debug("longpoll.Factory.create"); - - // the WAMP transport we create - var transport = {}; - - // these will get defined further below - transport.protocol = undefined; - transport.send = undefined; - transport.close = undefined; - - // these will get overridden by the WAMP session using this transport - transport.onmessage = function () {}; - transport.onopen = function () {}; - transport.onclose = function () {}; - - transport.info = { - type: 'longpoll', - url: null, - protocol: 'wamp.2.json' - }; - - transport._run = function () { - - var session_info = null; - var send_buffer = []; - var is_closing = false; - - var txseq = 0; - var rxseq = 0; - - var options = {'protocols': ['wamp.2.json']}; - var request_timeout = self._options.request_timeout || 2000; - - util.http_post(self._options.url + '/open', JSON.stringify(options), request_timeout).then( - - function (payload) { - - session_info = JSON.parse(payload); - var base_url = self._options.url + '/' + session_info.transport; - - transport.info.url = base_url; - - log.debug("longpoll.Transport: open", session_info); - - transport.close = function (code, reason) { - - if (is_closing) { - throw "transport is already closing"; - } - - is_closing = true; - - util.http_post(base_url + '/close', null, request_timeout).then( - - function () { - log.debug("longpoll.Transport: transport closed"); - var details = { - code: 1000, - reason: "transport closed", - wasClean: true - } - transport.onclose(details); - }, - - function (err) { - log.debug("longpoll.Transport: could not close transport", err.code, err.text); - } - ); - } - - transport.send = function (msg) { - - if (is_closing) { - throw "transport is closing or closed already"; - } - - txseq += 1; - - log.debug("longpoll.Transport: sending message ...", msg); - - var payload = JSON.stringify(msg); - - util.http_post(base_url + '/send', payload, request_timeout).then( - - function () { - // ok, message sent - log.debug("longpoll.Transport: message sent"); - }, - - function (err) { - log.debug("longpoll.Transport: could not send message", err.code, err.text); - - is_closing = true; - var details = { - code: 1001, - reason: "transport send failure (HTTP/POST status " + err.code + " - '" + err.text + "')", - wasClean: false - } - transport.onclose(details); - } - ); - }; - - function receive() { - - rxseq += 1; - - log.debug("longpoll.Transport: polling for message ..."); - - util.http_post(base_url + '/receive', null, request_timeout).then( - - function (payload) { - - if (payload) { - - var msg = JSON.parse(payload); - - log.debug("longpoll.Transport: message received", msg); - - transport.onmessage(msg); - } - - if (!is_closing) { - receive(); - } - }, - - function (err) { - log.debug("longpoll.Transport: could not receive message", err.code, err.text); - - is_closing = true; - var details = { - code: 1001, - reason: "transport receive failure (HTTP/POST status " + err.code + " - '" + err.text + "')", - wasClean: false - } - transport.onclose(details); - } - ); - } - - receive(); - - transport.onopen(); - }, - - function (err) { - log.debug("longpoll.Transport: could not open transport", err.code, err.text); - - is_closing = true; - var details = { - code: 1001, - reason: "transport open failure (HTTP/POST status " + err.code + " - '" + err.text + "')", - wasClean: false - } - transport.onclose(details); - } - ); - } - - transport._run(); - - return transport; -}; - - - -exports.Factory = Factory; diff --git a/s4t-server-node/node_modules/autobahn/lib/transport/websocket.js b/s4t-server-node/node_modules/autobahn/lib/transport/websocket.js deleted file mode 100644 index 50531f4..0000000 --- a/s4t-server-node/node_modules/autobahn/lib/transport/websocket.js +++ /dev/null @@ -1,201 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - - -var util = require('../util.js'); -var log = require('../log.js'); - - -function Factory (options) { - var self = this; - - util.assert(options.url !== undefined, "options.url missing"); - util.assert(typeof options.url === "string", "options.url must be a string"); - - if (!options.protocols) { - options.protocols = ['wamp.2.json']; - } else { - util.assert(Array.isArray(options.protocols), "options.protocols must be an array"); - } - - self._options = options; -} - - -Factory.prototype.type = "websocket"; - - -Factory.prototype.create = function () { - - var self = this; - - // the WAMP transport we create - var transport = {}; - - // these will get defined further below - transport.protocol = undefined; - transport.send = undefined; - transport.close = undefined; - - // these will get overridden by the WAMP session using this transport - transport.onmessage = function () {}; - transport.onopen = function () {}; - transport.onclose = function () {}; - - transport.info = { - type: 'websocket', - url: null, - protocol: 'wamp.2.json' - }; - - // - // running in browser - // - if ('window' in global) { - - (function () { - - var websocket; - - // Chrome, MSIE, newer Firefox - if ("WebSocket" in window) { - - if (self._options.protocols) { - websocket = new window.WebSocket(self._options.url, self._options.protocols); - } else { - websocket = new window.WebSocket(self._options.url); - } - - // older versions of Firefox prefix the WebSocket object - } else if ("MozWebSocket" in window) { - - if (self._options.protocols) { - websocket = new window.MozWebSocket(self._options.url, self._options.protocols); - } else { - websocket = new window.MozWebSocket(self._options.url); - } - } else { - throw "browser does not support WebSocket"; - } - - websocket.onmessage = function (evt) { - log.debug("WebSocket transport receive", evt.data); - - var msg = JSON.parse(evt.data); - transport.onmessage(msg); - } - - websocket.onopen = function () { - transport.info.url = self._options.url; - transport.onopen(); - } - - websocket.onclose = function (evt) { - var details = { - code: evt.code, - reason: evt.message, - wasClean: evt.wasClean - } - transport.onclose(details); - } - - // do NOT do the following, since that will make - // transport.onclose() fire twice (browsers already fire - // websocket.onclose() for errors also) - //websocket.onerror = websocket.onclose; - - transport.send = function (msg) { - var payload = JSON.stringify(msg); - log.debug("WebSocket transport send", payload); - websocket.send(payload); - } - - transport.close = function (code, reason) { - websocket.close(code, reason); - }; - - })(); - - // - // running on NodeJS - // - } else { - - (function () { - - var WebSocket = require('ws'); // https://github.com/einaros/ws - var websocket; - - var protocols; - if (self._options.protocols) { - protocols = self._options.protocols; - if (Array.isArray(protocols)) { - protocols = protocols.join(','); - } - websocket = new WebSocket(self._options.url, {protocol: protocols}); - } else { - websocket = new WebSocket(self._options.url); - } - - transport.send = function (msg) { - var payload = JSON.stringify(msg); - websocket.send(payload, {binary: false}); - }; - - transport.close = function (code, reason) { - websocket.close(); - }; - - websocket.on('open', function () { - transport.onopen(); - }); - - websocket.on('message', function (data, flags) { - if (flags.binary) { - // FIXME! - } else { - var msg = JSON.parse(data); - transport.onmessage(msg); - } - }); - - // FIXME: improve mapping to WS API for the following - // https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent#Close_codes - // - websocket.on('close', function (code, message) { - var details = { - code: code, - reason: message, - wasClean: code === 1000 - } - transport.onclose(details); - }); - - websocket.on('error', function (error) { - var details = { - code: 1006, - reason: '', - wasClean: false - } - transport.onclose(details); - }); - - })(); - } - - return transport; -}; - - - -exports.Factory = Factory; diff --git a/s4t-server-node/node_modules/autobahn/lib/util.js b/s4t-server-node/node_modules/autobahn/lib/util.js deleted file mode 100644 index 29c0599..0000000 --- a/s4t-server-node/node_modules/autobahn/lib/util.js +++ /dev/null @@ -1,127 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -var log = require('./log.js'); - -var when = require('when'); - - - -var rand_normal = function (mean, sd) { - // Derive a Gaussian from Uniform random variables - // http://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform - var x1, x2, rad; - - do { - x1 = 2 * Math.random() - 1; - x2 = 2 * Math.random() - 1; - rad = x1 * x1 + x2 * x2; - } while (rad >= 1 || rad == 0); - - var c = Math.sqrt(-2 * Math.log(rad) / rad); - - return (mean || 0) + (x1 * c) * (sd || 1); -}; - - - -var assert = function (cond, text) { - if (cond) { - return; - } - if (assert.useDebugger || ('AUTOBAHN_DEBUG' in global && AUTOBAHN_DEBUG)) { - debugger; - } - - throw new Error(text || "Assertion failed!"); -}; - - - -// Helper to do HTTP/POST requests returning deferreds. This function is -// supposed to work on IE8, IE9 and old Android WebKit browsers. We don't care -// if it works with other browsers. -// -var http_post = function (url, data, timeout) { - - log.debug("new http_post request", url, data, timeout); - - var d = when.defer(); - var req = new XMLHttpRequest(); - - req.onreadystatechange = function () { - - if (req.readyState === 4) { - - // Normalize IE's response to HTTP 204 when Win error 1223. - // http://stackoverflow.com/a/10047236/884770 - // - var status = (req.status === 1223) ? 204 : req.status; - - if (status === 200) { - - // response with content - // - d.resolve(req.responseText); - - } if (status === 204) { - - // empty response - // - d.resolve(); - - } else { - - // anything else is a fail - // - var statusText = null; - try { - statusText = req.statusText; - } catch (e) { - // IE8 fucks up on this - } - d.reject({code: status, text: statusText}); - } - } - } - - req.open("POST", url, true); - req.setRequestHeader("Content-type", "application/json; charset=utf-8"); - - if (timeout > 0) { - req.timeout = timeout; // request timeout in ms - - req.ontimeout = function () { - d.reject({code: 501, text: "request timeout"}); - } - } - - if (data) { - req.send(data); - } else { - req.send(); - } - - if (d.promise.then) { - // whenjs has the actual user promise in an attribute - return d.promise; - } else { - return d; - } -}; - - - -exports.rand_normal = rand_normal; -exports.assert = assert; -exports.http_post = http_post; diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/README.md b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/README.md deleted file mode 100644 index e0c8423..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/README.md +++ /dev/null @@ -1,76 +0,0 @@ -# crypto-js - -Modularized port of googlecode project crypto-js. - -## Node.js (Install) - -Requirements: -* Node.js -* npm (Node.js package manager) - -```bash -npm install crypto-js -``` - -### Usage - -Modular include: -```javascript -var AES = require("crypto-js/aes"); -var SHA256 = require("crypto-js/sha256"); -... -console.log(SHA256("Message")); -``` - -Including all libraries, for access to extra methods: -```javascript -var CryptoJS = require("crypto-js"); -console.log(CryptoJS.HmacSHA1("Message", "Key")); -``` - -## Client (browser) - -### Usage - -Modular include: -```javascript -require(["crypto-js/aes", "crypto-js/sha256"], function (AES, SHA256) { - console.log(SHA256("Message")); -}); -``` - -Including all libraries, for access to extra methods: -```javascript -require("crypto-js", function (CryptoJS) { - console.log(CryptoJS.HmacSHA1("Message", "Key")); -}); -``` - -## API - -See: https://code.google.com/p/crypto-js - -## License - -[The MIT License (MIT)](http://opensource.org/licenses/MIT) - -Copyright (c) 2009-2013 Jeff Mott -Copyright (c) 2013-2014 Evan Vosberg - -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/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/aes.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/aes.js deleted file mode 100644 index ff0d208..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/aes.js +++ /dev/null @@ -1,227 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; - - // Lookup tables - var SBOX = []; - var INV_SBOX = []; - var SUB_MIX_0 = []; - var SUB_MIX_1 = []; - var SUB_MIX_2 = []; - var SUB_MIX_3 = []; - var INV_SUB_MIX_0 = []; - var INV_SUB_MIX_1 = []; - var INV_SUB_MIX_2 = []; - var INV_SUB_MIX_3 = []; - - // Compute lookup tables - (function () { - // Compute double table - var d = []; - for (var i = 0; i < 256; i++) { - if (i < 128) { - d[i] = i << 1; - } else { - d[i] = (i << 1) ^ 0x11b; - } - } - - // Walk GF(2^8) - var x = 0; - var xi = 0; - for (var i = 0; i < 256; i++) { - // Compute sbox - var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); - sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; - SBOX[x] = sx; - INV_SBOX[sx] = x; - - // Compute multiplication - var x2 = d[x]; - var x4 = d[x2]; - var x8 = d[x4]; - - // Compute sub bytes, mix columns tables - var t = (d[sx] * 0x101) ^ (sx * 0x1010100); - SUB_MIX_0[x] = (t << 24) | (t >>> 8); - SUB_MIX_1[x] = (t << 16) | (t >>> 16); - SUB_MIX_2[x] = (t << 8) | (t >>> 24); - SUB_MIX_3[x] = t; - - // Compute inv sub bytes, inv mix columns tables - var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); - INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); - INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); - INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); - INV_SUB_MIX_3[sx] = t; - - // Compute next counter - if (!x) { - x = xi = 1; - } else { - x = x2 ^ d[d[d[x8 ^ x2]]]; - xi ^= d[d[xi]]; - } - } - }()); - - // Precomputed Rcon lookup - var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; - - /** - * AES block cipher algorithm. - */ - var AES = C_algo.AES = BlockCipher.extend({ - _doReset: function () { - // Shortcuts - var key = this._key; - var keyWords = key.words; - var keySize = key.sigBytes / 4; - - // Compute number of rounds - var nRounds = this._nRounds = keySize + 6 - - // Compute number of key schedule rows - var ksRows = (nRounds + 1) * 4; - - // Compute key schedule - var keySchedule = this._keySchedule = []; - for (var ksRow = 0; ksRow < ksRows; ksRow++) { - if (ksRow < keySize) { - keySchedule[ksRow] = keyWords[ksRow]; - } else { - var t = keySchedule[ksRow - 1]; - - if (!(ksRow % keySize)) { - // Rot word - t = (t << 8) | (t >>> 24); - - // Sub word - t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; - - // Mix Rcon - t ^= RCON[(ksRow / keySize) | 0] << 24; - } else if (keySize > 6 && ksRow % keySize == 4) { - // Sub word - t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; - } - - keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; - } - } - - // Compute inv key schedule - var invKeySchedule = this._invKeySchedule = []; - for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { - var ksRow = ksRows - invKsRow; - - if (invKsRow % 4) { - var t = keySchedule[ksRow]; - } else { - var t = keySchedule[ksRow - 4]; - } - - if (invKsRow < 4 || ksRow <= 4) { - invKeySchedule[invKsRow] = t; - } else { - invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ - INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; - } - } - }, - - encryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); - }, - - decryptBlock: function (M, offset) { - // Swap 2nd and 4th rows - var t = M[offset + 1]; - M[offset + 1] = M[offset + 3]; - M[offset + 3] = t; - - this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); - - // Inv swap 2nd and 4th rows - var t = M[offset + 1]; - M[offset + 1] = M[offset + 3]; - M[offset + 3] = t; - }, - - _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { - // Shortcut - var nRounds = this._nRounds; - - // Get input, add round key - var s0 = M[offset] ^ keySchedule[0]; - var s1 = M[offset + 1] ^ keySchedule[1]; - var s2 = M[offset + 2] ^ keySchedule[2]; - var s3 = M[offset + 3] ^ keySchedule[3]; - - // Key schedule row counter - var ksRow = 4; - - // Rounds - for (var round = 1; round < nRounds; round++) { - // Shift rows, sub bytes, mix columns, add round key - var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; - var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; - var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; - var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; - - // Update state - s0 = t0; - s1 = t1; - s2 = t2; - s3 = t3; - } - - // Shift rows, sub bytes, add round key - var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; - var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; - var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; - var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; - - // Set output - M[offset] = t0; - M[offset + 1] = t1; - M[offset + 2] = t2; - M[offset + 3] = t3; - }, - - keySize: 256/32 - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); - * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); - */ - C.AES = BlockCipher._createHelper(AES); - }()); - - - return CryptoJS.AES; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/cipher-core.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/cipher-core.js deleted file mode 100644 index 4fad569..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/cipher-core.js +++ /dev/null @@ -1,875 +0,0 @@ -;(function (root, factory) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - /** - * Cipher core components. - */ - CryptoJS.lib.Cipher || (function (undefined) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; - var C_enc = C.enc; - var Utf8 = C_enc.Utf8; - var Base64 = C_enc.Base64; - var C_algo = C.algo; - var EvpKDF = C_algo.EvpKDF; - - /** - * Abstract base cipher template. - * - * @property {number} keySize This cipher's key size. Default: 4 (128 bits) - * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) - * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. - * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. - */ - var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ - /** - * Configuration options. - * - * @property {WordArray} iv The IV to use for this operation. - */ - cfg: Base.extend(), - - /** - * Creates this cipher in encryption mode. - * - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {Cipher} A cipher instance. - * - * @static - * - * @example - * - * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); - */ - createEncryptor: function (key, cfg) { - return this.create(this._ENC_XFORM_MODE, key, cfg); - }, - - /** - * Creates this cipher in decryption mode. - * - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {Cipher} A cipher instance. - * - * @static - * - * @example - * - * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); - */ - createDecryptor: function (key, cfg) { - return this.create(this._DEC_XFORM_MODE, key, cfg); - }, - - /** - * Initializes a newly created cipher. - * - * @param {number} xformMode Either the encryption or decryption transormation mode constant. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @example - * - * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); - */ - init: function (xformMode, key, cfg) { - // Apply config defaults - this.cfg = this.cfg.extend(cfg); - - // Store transform mode and key - this._xformMode = xformMode; - this._key = key; - - // Set initial values - this.reset(); - }, - - /** - * Resets this cipher to its initial state. - * - * @example - * - * cipher.reset(); - */ - reset: function () { - // Reset data buffer - BufferedBlockAlgorithm.reset.call(this); - - // Perform concrete-cipher logic - this._doReset(); - }, - - /** - * Adds data to be encrypted or decrypted. - * - * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. - * - * @return {WordArray} The data after processing. - * - * @example - * - * var encrypted = cipher.process('data'); - * var encrypted = cipher.process(wordArray); - */ - process: function (dataUpdate) { - // Append - this._append(dataUpdate); - - // Process available blocks - return this._process(); - }, - - /** - * Finalizes the encryption or decryption process. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. - * - * @return {WordArray} The data after final processing. - * - * @example - * - * var encrypted = cipher.finalize(); - * var encrypted = cipher.finalize('data'); - * var encrypted = cipher.finalize(wordArray); - */ - finalize: function (dataUpdate) { - // Final data update - if (dataUpdate) { - this._append(dataUpdate); - } - - // Perform concrete-cipher logic - var finalProcessedData = this._doFinalize(); - - return finalProcessedData; - }, - - keySize: 128/32, - - ivSize: 128/32, - - _ENC_XFORM_MODE: 1, - - _DEC_XFORM_MODE: 2, - - /** - * Creates shortcut functions to a cipher's object interface. - * - * @param {Cipher} cipher The cipher to create a helper for. - * - * @return {Object} An object with encrypt and decrypt shortcut functions. - * - * @static - * - * @example - * - * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); - */ - _createHelper: (function () { - function selectCipherStrategy(key) { - if (typeof key == 'string') { - return PasswordBasedCipher; - } else { - return SerializableCipher; - } - } - - return function (cipher) { - return { - encrypt: function (message, key, cfg) { - return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); - }, - - decrypt: function (ciphertext, key, cfg) { - return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); - } - }; - }; - }()) - }); - - /** - * Abstract base stream cipher template. - * - * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) - */ - var StreamCipher = C_lib.StreamCipher = Cipher.extend({ - _doFinalize: function () { - // Process partial blocks - var finalProcessedBlocks = this._process(!!'flush'); - - return finalProcessedBlocks; - }, - - blockSize: 1 - }); - - /** - * Mode namespace. - */ - var C_mode = C.mode = {}; - - /** - * Abstract base block cipher mode template. - */ - var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ - /** - * Creates this mode for encryption. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @static - * - * @example - * - * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); - */ - createEncryptor: function (cipher, iv) { - return this.Encryptor.create(cipher, iv); - }, - - /** - * Creates this mode for decryption. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @static - * - * @example - * - * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); - */ - createDecryptor: function (cipher, iv) { - return this.Decryptor.create(cipher, iv); - }, - - /** - * Initializes a newly created mode. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @example - * - * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); - */ - init: function (cipher, iv) { - this._cipher = cipher; - this._iv = iv; - } - }); - - /** - * Cipher Block Chaining mode. - */ - var CBC = C_mode.CBC = (function () { - /** - * Abstract base CBC mode. - */ - var CBC = BlockCipherMode.extend(); - - /** - * CBC encryptor. - */ - CBC.Encryptor = CBC.extend({ - /** - * Processes the data block at offset. - * - * @param {Array} words The data words to operate on. - * @param {number} offset The offset where the block starts. - * - * @example - * - * mode.processBlock(data.words, offset); - */ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - // XOR and encrypt - xorBlock.call(this, words, offset, blockSize); - cipher.encryptBlock(words, offset); - - // Remember this block to use with next block - this._prevBlock = words.slice(offset, offset + blockSize); - } - }); - - /** - * CBC decryptor. - */ - CBC.Decryptor = CBC.extend({ - /** - * Processes the data block at offset. - * - * @param {Array} words The data words to operate on. - * @param {number} offset The offset where the block starts. - * - * @example - * - * mode.processBlock(data.words, offset); - */ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - // Remember this block to use with next block - var thisBlock = words.slice(offset, offset + blockSize); - - // Decrypt and XOR - cipher.decryptBlock(words, offset); - xorBlock.call(this, words, offset, blockSize); - - // This block becomes the previous block - this._prevBlock = thisBlock; - } - }); - - function xorBlock(words, offset, blockSize) { - // Shortcut - var iv = this._iv; - - // Choose mixing block - if (iv) { - var block = iv; - - // Remove IV for subsequent blocks - this._iv = undefined; - } else { - var block = this._prevBlock; - } - - // XOR blocks - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= block[i]; - } - } - - return CBC; - }()); - - /** - * Padding namespace. - */ - var C_pad = C.pad = {}; - - /** - * PKCS #5/7 padding strategy. - */ - var Pkcs7 = C_pad.Pkcs7 = { - /** - * Pads data using the algorithm defined in PKCS #5/7. - * - * @param {WordArray} data The data to pad. - * @param {number} blockSize The multiple that the data should be padded to. - * - * @static - * - * @example - * - * CryptoJS.pad.Pkcs7.pad(wordArray, 4); - */ - pad: function (data, blockSize) { - // Shortcut - var blockSizeBytes = blockSize * 4; - - // Count padding bytes - var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; - - // Create padding word - var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; - - // Create padding - var paddingWords = []; - for (var i = 0; i < nPaddingBytes; i += 4) { - paddingWords.push(paddingWord); - } - var padding = WordArray.create(paddingWords, nPaddingBytes); - - // Add padding - data.concat(padding); - }, - - /** - * Unpads data that had been padded using the algorithm defined in PKCS #5/7. - * - * @param {WordArray} data The data to unpad. - * - * @static - * - * @example - * - * CryptoJS.pad.Pkcs7.unpad(wordArray); - */ - unpad: function (data) { - // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; - - // Remove padding - data.sigBytes -= nPaddingBytes; - } - }; - - /** - * Abstract base block cipher template. - * - * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) - */ - var BlockCipher = C_lib.BlockCipher = Cipher.extend({ - /** - * Configuration options. - * - * @property {Mode} mode The block mode to use. Default: CBC - * @property {Padding} padding The padding strategy to use. Default: Pkcs7 - */ - cfg: Cipher.cfg.extend({ - mode: CBC, - padding: Pkcs7 - }), - - reset: function () { - // Reset cipher - Cipher.reset.call(this); - - // Shortcuts - var cfg = this.cfg; - var iv = cfg.iv; - var mode = cfg.mode; - - // Reset block mode - if (this._xformMode == this._ENC_XFORM_MODE) { - var modeCreator = mode.createEncryptor; - } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { - var modeCreator = mode.createDecryptor; - - // Keep at least one block in the buffer for unpadding - this._minBufferSize = 1; - } - this._mode = modeCreator.call(mode, this, iv && iv.words); - }, - - _doProcessBlock: function (words, offset) { - this._mode.processBlock(words, offset); - }, - - _doFinalize: function () { - // Shortcut - var padding = this.cfg.padding; - - // Finalize - if (this._xformMode == this._ENC_XFORM_MODE) { - // Pad data - padding.pad(this._data, this.blockSize); - - // Process final blocks - var finalProcessedBlocks = this._process(!!'flush'); - } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { - // Process final blocks - var finalProcessedBlocks = this._process(!!'flush'); - - // Unpad data - padding.unpad(finalProcessedBlocks); - } - - return finalProcessedBlocks; - }, - - blockSize: 128/32 - }); - - /** - * A collection of cipher parameters. - * - * @property {WordArray} ciphertext The raw ciphertext. - * @property {WordArray} key The key to this ciphertext. - * @property {WordArray} iv The IV used in the ciphering operation. - * @property {WordArray} salt The salt used with a key derivation function. - * @property {Cipher} algorithm The cipher algorithm. - * @property {Mode} mode The block mode used in the ciphering operation. - * @property {Padding} padding The padding scheme used in the ciphering operation. - * @property {number} blockSize The block size of the cipher. - * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. - */ - var CipherParams = C_lib.CipherParams = Base.extend({ - /** - * Initializes a newly created cipher params object. - * - * @param {Object} cipherParams An object with any of the possible cipher parameters. - * - * @example - * - * var cipherParams = CryptoJS.lib.CipherParams.create({ - * ciphertext: ciphertextWordArray, - * key: keyWordArray, - * iv: ivWordArray, - * salt: saltWordArray, - * algorithm: CryptoJS.algo.AES, - * mode: CryptoJS.mode.CBC, - * padding: CryptoJS.pad.PKCS7, - * blockSize: 4, - * formatter: CryptoJS.format.OpenSSL - * }); - */ - init: function (cipherParams) { - this.mixIn(cipherParams); - }, - - /** - * Converts this cipher params object to a string. - * - * @param {Format} formatter (Optional) The formatting strategy to use. - * - * @return {string} The stringified cipher params. - * - * @throws Error If neither the formatter nor the default formatter is set. - * - * @example - * - * var string = cipherParams + ''; - * var string = cipherParams.toString(); - * var string = cipherParams.toString(CryptoJS.format.OpenSSL); - */ - toString: function (formatter) { - return (formatter || this.formatter).stringify(this); - } - }); - - /** - * Format namespace. - */ - var C_format = C.format = {}; - - /** - * OpenSSL formatting strategy. - */ - var OpenSSLFormatter = C_format.OpenSSL = { - /** - * Converts a cipher params object to an OpenSSL-compatible string. - * - * @param {CipherParams} cipherParams The cipher params object. - * - * @return {string} The OpenSSL-compatible string. - * - * @static - * - * @example - * - * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); - */ - stringify: function (cipherParams) { - // Shortcuts - var ciphertext = cipherParams.ciphertext; - var salt = cipherParams.salt; - - // Format - if (salt) { - var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); - } else { - var wordArray = ciphertext; - } - - return wordArray.toString(Base64); - }, - - /** - * Converts an OpenSSL-compatible string to a cipher params object. - * - * @param {string} openSSLStr The OpenSSL-compatible string. - * - * @return {CipherParams} The cipher params object. - * - * @static - * - * @example - * - * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); - */ - parse: function (openSSLStr) { - // Parse base64 - var ciphertext = Base64.parse(openSSLStr); - - // Shortcut - var ciphertextWords = ciphertext.words; - - // Test for salt - if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { - // Extract salt - var salt = WordArray.create(ciphertextWords.slice(2, 4)); - - // Remove salt from ciphertext - ciphertextWords.splice(0, 4); - ciphertext.sigBytes -= 16; - } - - return CipherParams.create({ ciphertext: ciphertext, salt: salt }); - } - }; - - /** - * A cipher wrapper that returns ciphertext as a serializable cipher params object. - */ - var SerializableCipher = C_lib.SerializableCipher = Base.extend({ - /** - * Configuration options. - * - * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL - */ - cfg: Base.extend({ - format: OpenSSLFormatter - }), - - /** - * Encrypts a message. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {WordArray|string} message The message to encrypt. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {CipherParams} A cipher params object. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - */ - encrypt: function (cipher, message, key, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); - - // Encrypt - var encryptor = cipher.createEncryptor(key, cfg); - var ciphertext = encryptor.finalize(message); - - // Shortcut - var cipherCfg = encryptor.cfg; - - // Create and return serializable cipher params - return CipherParams.create({ - ciphertext: ciphertext, - key: key, - iv: cipherCfg.iv, - algorithm: cipher, - mode: cipherCfg.mode, - padding: cipherCfg.padding, - blockSize: cipher.blockSize, - formatter: cfg.format - }); - }, - - /** - * Decrypts serialized ciphertext. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {CipherParams|string} ciphertext The ciphertext to decrypt. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {WordArray} The plaintext. - * - * @static - * - * @example - * - * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - */ - decrypt: function (cipher, ciphertext, key, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); - - // Convert string to CipherParams - ciphertext = this._parse(ciphertext, cfg.format); - - // Decrypt - var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); - - return plaintext; - }, - - /** - * Converts serialized ciphertext to CipherParams, - * else assumed CipherParams already and returns ciphertext unchanged. - * - * @param {CipherParams|string} ciphertext The ciphertext. - * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. - * - * @return {CipherParams} The unserialized ciphertext. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); - */ - _parse: function (ciphertext, format) { - if (typeof ciphertext == 'string') { - return format.parse(ciphertext, this); - } else { - return ciphertext; - } - } - }); - - /** - * Key derivation function namespace. - */ - var C_kdf = C.kdf = {}; - - /** - * OpenSSL key derivation function. - */ - var OpenSSLKdf = C_kdf.OpenSSL = { - /** - * Derives a key and IV from a password. - * - * @param {string} password The password to derive from. - * @param {number} keySize The size in words of the key to generate. - * @param {number} ivSize The size in words of the IV to generate. - * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. - * - * @return {CipherParams} A cipher params object with the key, IV, and salt. - * - * @static - * - * @example - * - * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); - * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); - */ - execute: function (password, keySize, ivSize, salt) { - // Generate random salt - if (!salt) { - salt = WordArray.random(64/8); - } - - // Derive key and IV - var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); - - // Separate key and IV - var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); - key.sigBytes = keySize * 4; - - // Return params - return CipherParams.create({ key: key, iv: iv, salt: salt }); - } - }; - - /** - * A serializable cipher wrapper that derives the key from a password, - * and returns ciphertext as a serializable cipher params object. - */ - var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ - /** - * Configuration options. - * - * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL - */ - cfg: SerializableCipher.cfg.extend({ - kdf: OpenSSLKdf - }), - - /** - * Encrypts a message using a password. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {WordArray|string} message The message to encrypt. - * @param {string} password The password. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {CipherParams} A cipher params object. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); - * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); - */ - encrypt: function (cipher, message, password, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); - - // Derive key and other params - var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize); - - // Add IV to config - cfg.iv = derivedParams.iv; - - // Encrypt - var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); - - // Mix in derived params - ciphertext.mixIn(derivedParams); - - return ciphertext; - }, - - /** - * Decrypts serialized ciphertext using a password. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {CipherParams|string} ciphertext The ciphertext to decrypt. - * @param {string} password The password. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {WordArray} The plaintext. - * - * @static - * - * @example - * - * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); - * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); - */ - decrypt: function (cipher, ciphertext, password, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); - - // Convert string to CipherParams - ciphertext = this._parse(ciphertext, cfg.format); - - // Derive key and other params - var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt); - - // Add IV to config - cfg.iv = derivedParams.iv; - - // Decrypt - var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); - - return plaintext; - } - }); - }()); - - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/core.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/core.js deleted file mode 100644 index b39b0fd..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/core.js +++ /dev/null @@ -1,745 +0,0 @@ -;(function (root, factory) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(); - } - else if (typeof define === "function" && define.amd) { - // AMD - define([], factory); - } - else { - // Global (browser) - root.CryptoJS = factory(); - } -}(this, function () { - - /** - * CryptoJS core components. - */ - var CryptoJS = CryptoJS || (function (Math, undefined) { - /** - * CryptoJS namespace. - */ - var C = {}; - - /** - * Library namespace. - */ - var C_lib = C.lib = {}; - - /** - * Base object for prototypal inheritance. - */ - var Base = C_lib.Base = (function () { - function F() {} - - return { - /** - * Creates a new object that inherits from this object. - * - * @param {Object} overrides Properties to copy into the new object. - * - * @return {Object} The new object. - * - * @static - * - * @example - * - * var MyType = CryptoJS.lib.Base.extend({ - * field: 'value', - * - * method: function () { - * } - * }); - */ - extend: function (overrides) { - // Spawn - F.prototype = this; - var subtype = new F(); - - // Augment - if (overrides) { - subtype.mixIn(overrides); - } - - // Create default initializer - if (!subtype.hasOwnProperty('init')) { - subtype.init = function () { - subtype.$super.init.apply(this, arguments); - }; - } - - // Initializer's prototype is the subtype object - subtype.init.prototype = subtype; - - // Reference supertype - subtype.$super = this; - - return subtype; - }, - - /** - * Extends this object and runs the init method. - * Arguments to create() will be passed to init(). - * - * @return {Object} The new object. - * - * @static - * - * @example - * - * var instance = MyType.create(); - */ - create: function () { - var instance = this.extend(); - instance.init.apply(instance, arguments); - - return instance; - }, - - /** - * Initializes a newly created object. - * Override this method to add some logic when your objects are created. - * - * @example - * - * var MyType = CryptoJS.lib.Base.extend({ - * init: function () { - * // ... - * } - * }); - */ - init: function () { - }, - - /** - * Copies properties into this object. - * - * @param {Object} properties The properties to mix in. - * - * @example - * - * MyType.mixIn({ - * field: 'value' - * }); - */ - mixIn: function (properties) { - for (var propertyName in properties) { - if (properties.hasOwnProperty(propertyName)) { - this[propertyName] = properties[propertyName]; - } - } - - // IE won't copy toString using the loop above - if (properties.hasOwnProperty('toString')) { - this.toString = properties.toString; - } - }, - - /** - * Creates a copy of this object. - * - * @return {Object} The clone. - * - * @example - * - * var clone = instance.clone(); - */ - clone: function () { - return this.init.prototype.extend(this); - } - }; - }()); - - /** - * An array of 32-bit words. - * - * @property {Array} words The array of 32-bit words. - * @property {number} sigBytes The number of significant bytes in this word array. - */ - var WordArray = C_lib.WordArray = Base.extend({ - /** - * Initializes a newly created word array. - * - * @param {Array} words (Optional) An array of 32-bit words. - * @param {number} sigBytes (Optional) The number of significant bytes in the words. - * - * @example - * - * var wordArray = CryptoJS.lib.WordArray.create(); - * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); - * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); - */ - init: function (words, sigBytes) { - words = this.words = words || []; - - if (sigBytes != undefined) { - this.sigBytes = sigBytes; - } else { - this.sigBytes = words.length * 4; - } - }, - - /** - * Converts this word array to a string. - * - * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex - * - * @return {string} The stringified word array. - * - * @example - * - * var string = wordArray + ''; - * var string = wordArray.toString(); - * var string = wordArray.toString(CryptoJS.enc.Utf8); - */ - toString: function (encoder) { - return (encoder || Hex).stringify(this); - }, - - /** - * Concatenates a word array to this word array. - * - * @param {WordArray} wordArray The word array to append. - * - * @return {WordArray} This word array. - * - * @example - * - * wordArray1.concat(wordArray2); - */ - concat: function (wordArray) { - // Shortcuts - var thisWords = this.words; - var thatWords = wordArray.words; - var thisSigBytes = this.sigBytes; - var thatSigBytes = wordArray.sigBytes; - - // Clamp excess bits - this.clamp(); - - // Concat - if (thisSigBytes % 4) { - // Copy one byte at a time - for (var i = 0; i < thatSigBytes; i++) { - var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); - } - } else if (thatWords.length > 0xffff) { - // Copy one word at a time - for (var i = 0; i < thatSigBytes; i += 4) { - thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2]; - } - } else { - // Copy all words at once - thisWords.push.apply(thisWords, thatWords); - } - this.sigBytes += thatSigBytes; - - // Chainable - return this; - }, - - /** - * Removes insignificant bits. - * - * @example - * - * wordArray.clamp(); - */ - clamp: function () { - // Shortcuts - var words = this.words; - var sigBytes = this.sigBytes; - - // Clamp - words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); - words.length = Math.ceil(sigBytes / 4); - }, - - /** - * Creates a copy of this word array. - * - * @return {WordArray} The clone. - * - * @example - * - * var clone = wordArray.clone(); - */ - clone: function () { - var clone = Base.clone.call(this); - clone.words = this.words.slice(0); - - return clone; - }, - - /** - * Creates a word array filled with random bytes. - * - * @param {number} nBytes The number of random bytes to generate. - * - * @return {WordArray} The random word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.lib.WordArray.random(16); - */ - random: function (nBytes) { - var words = []; - - var r = (function (m_w) { - var m_w = m_w; - var m_z = 0x3ade68b1; - var mask = 0xffffffff; - - return function () { - m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask; - m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask; - var result = ((m_z << 0x10) + m_w) & mask; - result /= 0x100000000; - result += 0.5; - return result * (Math.random() > .5 ? 1 : -1); - } - }); - - for (var i = 0, rcache; i < nBytes; i += 4) { - var _r = r((rcache || Math.random()) * 0x100000000); - - rcache = _r() * 0x3ade67b7; - words.push((_r() * 0x100000000) | 0); - } - - return new WordArray.init(words, nBytes); - } - }); - - /** - * Encoder namespace. - */ - var C_enc = C.enc = {}; - - /** - * Hex encoding strategy. - */ - var Hex = C_enc.Hex = { - /** - * Converts a word array to a hex string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The hex string. - * - * @static - * - * @example - * - * var hexString = CryptoJS.enc.Hex.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var hexChars = []; - for (var i = 0; i < sigBytes; i++) { - var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - hexChars.push((bite >>> 4).toString(16)); - hexChars.push((bite & 0x0f).toString(16)); - } - - return hexChars.join(''); - }, - - /** - * Converts a hex string to a word array. - * - * @param {string} hexStr The hex string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Hex.parse(hexString); - */ - parse: function (hexStr) { - // Shortcut - var hexStrLength = hexStr.length; - - // Convert - var words = []; - for (var i = 0; i < hexStrLength; i += 2) { - words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); - } - - return new WordArray.init(words, hexStrLength / 2); - } - }; - - /** - * Latin1 encoding strategy. - */ - var Latin1 = C_enc.Latin1 = { - /** - * Converts a word array to a Latin1 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The Latin1 string. - * - * @static - * - * @example - * - * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var latin1Chars = []; - for (var i = 0; i < sigBytes; i++) { - var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - latin1Chars.push(String.fromCharCode(bite)); - } - - return latin1Chars.join(''); - }, - - /** - * Converts a Latin1 string to a word array. - * - * @param {string} latin1Str The Latin1 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); - */ - parse: function (latin1Str) { - // Shortcut - var latin1StrLength = latin1Str.length; - - // Convert - var words = []; - for (var i = 0; i < latin1StrLength; i++) { - words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); - } - - return new WordArray.init(words, latin1StrLength); - } - }; - - /** - * UTF-8 encoding strategy. - */ - var Utf8 = C_enc.Utf8 = { - /** - * Converts a word array to a UTF-8 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-8 string. - * - * @static - * - * @example - * - * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); - */ - stringify: function (wordArray) { - try { - return decodeURIComponent(escape(Latin1.stringify(wordArray))); - } catch (e) { - throw new Error('Malformed UTF-8 data'); - } - }, - - /** - * Converts a UTF-8 string to a word array. - * - * @param {string} utf8Str The UTF-8 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); - */ - parse: function (utf8Str) { - return Latin1.parse(unescape(encodeURIComponent(utf8Str))); - } - }; - - /** - * Abstract buffered block algorithm template. - * - * The property blockSize must be implemented in a concrete subtype. - * - * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 - */ - var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ - /** - * Resets this block algorithm's data buffer to its initial state. - * - * @example - * - * bufferedBlockAlgorithm.reset(); - */ - reset: function () { - // Initial values - this._data = new WordArray.init(); - this._nDataBytes = 0; - }, - - /** - * Adds new data to this block algorithm's buffer. - * - * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. - * - * @example - * - * bufferedBlockAlgorithm._append('data'); - * bufferedBlockAlgorithm._append(wordArray); - */ - _append: function (data) { - // Convert string to WordArray, else assume WordArray already - if (typeof data == 'string') { - data = Utf8.parse(data); - } - - // Append - this._data.concat(data); - this._nDataBytes += data.sigBytes; - }, - - /** - * Processes available data blocks. - * - * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. - * - * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. - * - * @return {WordArray} The processed data. - * - * @example - * - * var processedData = bufferedBlockAlgorithm._process(); - * var processedData = bufferedBlockAlgorithm._process(!!'flush'); - */ - _process: function (doFlush) { - // Shortcuts - var data = this._data; - var dataWords = data.words; - var dataSigBytes = data.sigBytes; - var blockSize = this.blockSize; - var blockSizeBytes = blockSize * 4; - - // Count blocks ready - var nBlocksReady = dataSigBytes / blockSizeBytes; - if (doFlush) { - // Round up to include partial blocks - nBlocksReady = Math.ceil(nBlocksReady); - } else { - // Round down to include only full blocks, - // less the number of blocks that must remain in the buffer - nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); - } - - // Count words ready - var nWordsReady = nBlocksReady * blockSize; - - // Count bytes ready - var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); - - // Process blocks - if (nWordsReady) { - for (var offset = 0; offset < nWordsReady; offset += blockSize) { - // Perform concrete-algorithm logic - this._doProcessBlock(dataWords, offset); - } - - // Remove processed words - var processedWords = dataWords.splice(0, nWordsReady); - data.sigBytes -= nBytesReady; - } - - // Return processed words - return new WordArray.init(processedWords, nBytesReady); - }, - - /** - * Creates a copy of this object. - * - * @return {Object} The clone. - * - * @example - * - * var clone = bufferedBlockAlgorithm.clone(); - */ - clone: function () { - var clone = Base.clone.call(this); - clone._data = this._data.clone(); - - return clone; - }, - - _minBufferSize: 0 - }); - - /** - * Abstract hasher template. - * - * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) - */ - var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ - /** - * Configuration options. - */ - cfg: Base.extend(), - - /** - * Initializes a newly created hasher. - * - * @param {Object} cfg (Optional) The configuration options to use for this hash computation. - * - * @example - * - * var hasher = CryptoJS.algo.SHA256.create(); - */ - init: function (cfg) { - // Apply config defaults - this.cfg = this.cfg.extend(cfg); - - // Set initial values - this.reset(); - }, - - /** - * Resets this hasher to its initial state. - * - * @example - * - * hasher.reset(); - */ - reset: function () { - // Reset data buffer - BufferedBlockAlgorithm.reset.call(this); - - // Perform concrete-hasher logic - this._doReset(); - }, - - /** - * Updates this hasher with a message. - * - * @param {WordArray|string} messageUpdate The message to append. - * - * @return {Hasher} This hasher. - * - * @example - * - * hasher.update('message'); - * hasher.update(wordArray); - */ - update: function (messageUpdate) { - // Append - this._append(messageUpdate); - - // Update the hash - this._process(); - - // Chainable - return this; - }, - - /** - * Finalizes the hash computation. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} messageUpdate (Optional) A final message update. - * - * @return {WordArray} The hash. - * - * @example - * - * var hash = hasher.finalize(); - * var hash = hasher.finalize('message'); - * var hash = hasher.finalize(wordArray); - */ - finalize: function (messageUpdate) { - // Final message update - if (messageUpdate) { - this._append(messageUpdate); - } - - // Perform concrete-hasher logic - var hash = this._doFinalize(); - - return hash; - }, - - blockSize: 512/32, - - /** - * Creates a shortcut function to a hasher's object interface. - * - * @param {Hasher} hasher The hasher to create a helper for. - * - * @return {Function} The shortcut function. - * - * @static - * - * @example - * - * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); - */ - _createHelper: function (hasher) { - return function (message, cfg) { - return new hasher.init(cfg).finalize(message); - }; - }, - - /** - * Creates a shortcut function to the HMAC's object interface. - * - * @param {Hasher} hasher The hasher to use in this HMAC helper. - * - * @return {Function} The shortcut function. - * - * @static - * - * @example - * - * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); - */ - _createHmacHelper: function (hasher) { - return function (message, key) { - return new C_algo.HMAC.init(hasher, key).finalize(message); - }; - } - }); - - /** - * Algorithm namespace. - */ - var C_algo = C.algo = {}; - - return C; - }(Math)); - - - return CryptoJS; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/enc-base64.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/enc-base64.js deleted file mode 100644 index cb1b79c..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/enc-base64.js +++ /dev/null @@ -1,123 +0,0 @@ -;(function (root, factory) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_enc = C.enc; - - /** - * Base64 encoding strategy. - */ - var Base64 = C_enc.Base64 = { - /** - * Converts a word array to a Base64 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The Base64 string. - * - * @static - * - * @example - * - * var base64String = CryptoJS.enc.Base64.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - var map = this._map; - - // Clamp excess bits - wordArray.clamp(); - - // Convert - var base64Chars = []; - for (var i = 0; i < sigBytes; i += 3) { - var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; - var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; - - var triplet = (byte1 << 16) | (byte2 << 8) | byte3; - - for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { - base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); - } - } - - // Add padding - var paddingChar = map.charAt(64); - if (paddingChar) { - while (base64Chars.length % 4) { - base64Chars.push(paddingChar); - } - } - - return base64Chars.join(''); - }, - - /** - * Converts a Base64 string to a word array. - * - * @param {string} base64Str The Base64 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Base64.parse(base64String); - */ - parse: function (base64Str) { - // Shortcuts - var base64StrLength = base64Str.length; - var map = this._map; - - // Ignore padding - var paddingChar = map.charAt(64); - if (paddingChar) { - var paddingIndex = base64Str.indexOf(paddingChar); - if (paddingIndex != -1) { - base64StrLength = paddingIndex; - } - } - - // Convert - var words = []; - var nBytes = 0; - for (var i = 0; i < base64StrLength; i++) { - if (i % 4) { - var bits1 = map.indexOf(base64Str.charAt(i - 1)) << ((i % 4) * 2); - var bits2 = map.indexOf(base64Str.charAt(i)) >>> (6 - (i % 4) * 2); - words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8); - nBytes++; - } - } - - return WordArray.create(words, nBytes); - }, - - _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' - }; - }()); - - - return CryptoJS.enc.Base64; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/enc-hex.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/enc-hex.js deleted file mode 100644 index 88161ff..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/enc-hex.js +++ /dev/null @@ -1,18 +0,0 @@ -;(function (root, factory) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - return CryptoJS.enc.Hex; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/enc-latin1.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/enc-latin1.js deleted file mode 100644 index ade56dc..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/enc-latin1.js +++ /dev/null @@ -1,18 +0,0 @@ -;(function (root, factory) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - return CryptoJS.enc.Latin1; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/enc-utf16.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/enc-utf16.js deleted file mode 100644 index 7de6245..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/enc-utf16.js +++ /dev/null @@ -1,149 +0,0 @@ -;(function (root, factory) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_enc = C.enc; - - /** - * UTF-16 BE encoding strategy. - */ - var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { - /** - * Converts a word array to a UTF-16 BE string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-16 BE string. - * - * @static - * - * @example - * - * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var utf16Chars = []; - for (var i = 0; i < sigBytes; i += 2) { - var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; - utf16Chars.push(String.fromCharCode(codePoint)); - } - - return utf16Chars.join(''); - }, - - /** - * Converts a UTF-16 BE string to a word array. - * - * @param {string} utf16Str The UTF-16 BE string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); - */ - parse: function (utf16Str) { - // Shortcut - var utf16StrLength = utf16Str.length; - - // Convert - var words = []; - for (var i = 0; i < utf16StrLength; i++) { - words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); - } - - return WordArray.create(words, utf16StrLength * 2); - } - }; - - /** - * UTF-16 LE encoding strategy. - */ - C_enc.Utf16LE = { - /** - * Converts a word array to a UTF-16 LE string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-16 LE string. - * - * @static - * - * @example - * - * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var utf16Chars = []; - for (var i = 0; i < sigBytes; i += 2) { - var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); - utf16Chars.push(String.fromCharCode(codePoint)); - } - - return utf16Chars.join(''); - }, - - /** - * Converts a UTF-16 LE string to a word array. - * - * @param {string} utf16Str The UTF-16 LE string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); - */ - parse: function (utf16Str) { - // Shortcut - var utf16StrLength = utf16Str.length; - - // Convert - var words = []; - for (var i = 0; i < utf16StrLength; i++) { - words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); - } - - return WordArray.create(words, utf16StrLength * 2); - } - }; - - function swapEndian(word) { - return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); - } - }()); - - - return CryptoJS.enc.Utf16; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/enc-utf8.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/enc-utf8.js deleted file mode 100644 index e7a251d..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/enc-utf8.js +++ /dev/null @@ -1,18 +0,0 @@ -;(function (root, factory) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - return CryptoJS.enc.Utf8; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/evpkdf.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/evpkdf.js deleted file mode 100644 index 3fe5c01..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/evpkdf.js +++ /dev/null @@ -1,132 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./sha1"), require("./hmac")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./sha1", "./hmac"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var MD5 = C_algo.MD5; - - /** - * This key derivation function is meant to conform with EVP_BytesToKey. - * www.openssl.org/docs/crypto/EVP_BytesToKey.html - */ - var EvpKDF = C_algo.EvpKDF = Base.extend({ - /** - * Configuration options. - * - * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) - * @property {Hasher} hasher The hash algorithm to use. Default: MD5 - * @property {number} iterations The number of iterations to perform. Default: 1 - */ - cfg: Base.extend({ - keySize: 128/32, - hasher: MD5, - iterations: 1 - }), - - /** - * Initializes a newly created key derivation function. - * - * @param {Object} cfg (Optional) The configuration options to use for the derivation. - * - * @example - * - * var kdf = CryptoJS.algo.EvpKDF.create(); - * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); - * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); - */ - init: function (cfg) { - this.cfg = this.cfg.extend(cfg); - }, - - /** - * Derives a key from a password. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * - * @return {WordArray} The derived key. - * - * @example - * - * var key = kdf.compute(password, salt); - */ - compute: function (password, salt) { - // Shortcut - var cfg = this.cfg; - - // Init hasher - var hasher = cfg.hasher.create(); - - // Initial values - var derivedKey = WordArray.create(); - - // Shortcuts - var derivedKeyWords = derivedKey.words; - var keySize = cfg.keySize; - var iterations = cfg.iterations; - - // Generate key - while (derivedKeyWords.length < keySize) { - if (block) { - hasher.update(block); - } - var block = hasher.update(password).finalize(salt); - hasher.reset(); - - // Iterations - for (var i = 1; i < iterations; i++) { - block = hasher.finalize(block); - hasher.reset(); - } - - derivedKey.concat(block); - } - derivedKey.sigBytes = keySize * 4; - - return derivedKey; - } - }); - - /** - * Derives a key from a password. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * @param {Object} cfg (Optional) The configuration options to use for this computation. - * - * @return {WordArray} The derived key. - * - * @static - * - * @example - * - * var key = CryptoJS.EvpKDF(password, salt); - * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 }); - * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); - */ - C.EvpKDF = function (password, salt, cfg) { - return EvpKDF.create(cfg).compute(password, salt); - }; - }()); - - - return CryptoJS.EvpKDF; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/format-hex.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/format-hex.js deleted file mode 100644 index 2e9a861..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/format-hex.js +++ /dev/null @@ -1,66 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./cipher-core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./cipher-core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - (function (undefined) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var CipherParams = C_lib.CipherParams; - var C_enc = C.enc; - var Hex = C_enc.Hex; - var C_format = C.format; - - var HexFormatter = C_format.Hex = { - /** - * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. - * - * @param {CipherParams} cipherParams The cipher params object. - * - * @return {string} The hexadecimally encoded string. - * - * @static - * - * @example - * - * var hexString = CryptoJS.format.Hex.stringify(cipherParams); - */ - stringify: function (cipherParams) { - return cipherParams.ciphertext.toString(Hex); - }, - - /** - * Converts a hexadecimally encoded ciphertext string to a cipher params object. - * - * @param {string} input The hexadecimally encoded string. - * - * @return {CipherParams} The cipher params object. - * - * @static - * - * @example - * - * var cipherParams = CryptoJS.format.Hex.parse(hexString); - */ - parse: function (input) { - var ciphertext = Hex.parse(input); - return CipherParams.create({ ciphertext: ciphertext }); - } - }; - }()); - - - return CryptoJS.format.Hex; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/format-openssl.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/format-openssl.js deleted file mode 100644 index 3373edc..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/format-openssl.js +++ /dev/null @@ -1,18 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./cipher-core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./cipher-core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - return CryptoJS.format.OpenSSL; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-md5.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-md5.js deleted file mode 100644 index ad7a90a..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-md5.js +++ /dev/null @@ -1,18 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./md5"), require("./hmac")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./md5", "./hmac"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - return CryptoJS.HmacMD5; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-ripemd160.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-ripemd160.js deleted file mode 100644 index 73d55a7..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-ripemd160.js +++ /dev/null @@ -1,18 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./ripemd160"), require("./hmac")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./ripemd160", "./hmac"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - return CryptoJS.HmacRIPEMD160; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha1.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha1.js deleted file mode 100644 index 0b570cb..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha1.js +++ /dev/null @@ -1,18 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./sha1"), require("./hmac")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./sha1", "./hmac"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - return CryptoJS.HmacSHA1; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha224.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha224.js deleted file mode 100644 index 3778863..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha224.js +++ /dev/null @@ -1,18 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./sha256"), require("./sha224"), require("./hmac")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./sha256", "./sha224", "./hmac"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - return CryptoJS.HmacSHA224; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha256.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha256.js deleted file mode 100644 index 33b0c9f..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha256.js +++ /dev/null @@ -1,18 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./sha256"), require("./hmac")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./sha256", "./hmac"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - return CryptoJS.HmacSHA256; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha3.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha3.js deleted file mode 100644 index 1248804..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha3.js +++ /dev/null @@ -1,18 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha3"), require("./hmac")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./x64-core", "./sha3", "./hmac"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - return CryptoJS.HmacSHA3; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha384.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha384.js deleted file mode 100644 index 0036e2b..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha384.js +++ /dev/null @@ -1,18 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha512"), require("./sha384"), require("./hmac")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./x64-core", "./sha512", "./sha384", "./hmac"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - return CryptoJS.HmacSHA384; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha512.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha512.js deleted file mode 100644 index c1005b6..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac-sha512.js +++ /dev/null @@ -1,18 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha512"), require("./hmac")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./x64-core", "./sha512", "./hmac"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - return CryptoJS.HmacSHA512; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac.js deleted file mode 100644 index 8c09851..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/hmac.js +++ /dev/null @@ -1,143 +0,0 @@ -;(function (root, factory) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var C_enc = C.enc; - var Utf8 = C_enc.Utf8; - var C_algo = C.algo; - - /** - * HMAC algorithm. - */ - var HMAC = C_algo.HMAC = Base.extend({ - /** - * Initializes a newly created HMAC. - * - * @param {Hasher} hasher The hash algorithm to use. - * @param {WordArray|string} key The secret key. - * - * @example - * - * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); - */ - init: function (hasher, key) { - // Init hasher - hasher = this._hasher = new hasher.init(); - - // Convert string to WordArray, else assume WordArray already - if (typeof key == 'string') { - key = Utf8.parse(key); - } - - // Shortcuts - var hasherBlockSize = hasher.blockSize; - var hasherBlockSizeBytes = hasherBlockSize * 4; - - // Allow arbitrary length keys - if (key.sigBytes > hasherBlockSizeBytes) { - key = hasher.finalize(key); - } - - // Clamp excess bits - key.clamp(); - - // Clone key for inner and outer pads - var oKey = this._oKey = key.clone(); - var iKey = this._iKey = key.clone(); - - // Shortcuts - var oKeyWords = oKey.words; - var iKeyWords = iKey.words; - - // XOR keys with pad constants - for (var i = 0; i < hasherBlockSize; i++) { - oKeyWords[i] ^= 0x5c5c5c5c; - iKeyWords[i] ^= 0x36363636; - } - oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; - - // Set initial values - this.reset(); - }, - - /** - * Resets this HMAC to its initial state. - * - * @example - * - * hmacHasher.reset(); - */ - reset: function () { - // Shortcut - var hasher = this._hasher; - - // Reset - hasher.reset(); - hasher.update(this._iKey); - }, - - /** - * Updates this HMAC with a message. - * - * @param {WordArray|string} messageUpdate The message to append. - * - * @return {HMAC} This HMAC instance. - * - * @example - * - * hmacHasher.update('message'); - * hmacHasher.update(wordArray); - */ - update: function (messageUpdate) { - this._hasher.update(messageUpdate); - - // Chainable - return this; - }, - - /** - * Finalizes the HMAC computation. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} messageUpdate (Optional) A final message update. - * - * @return {WordArray} The HMAC. - * - * @example - * - * var hmac = hmacHasher.finalize(); - * var hmac = hmacHasher.finalize('message'); - * var hmac = hmacHasher.finalize(wordArray); - */ - finalize: function (messageUpdate) { - // Shortcut - var hasher = this._hasher; - - // Compute HMAC - var innerHash = hasher.finalize(messageUpdate); - hasher.reset(); - var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); - - return hmac; - } - }); - }()); - - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/index.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/index.js deleted file mode 100644 index cacf485..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/index.js +++ /dev/null @@ -1,18 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./x64-core"), require("./lib-typedarrays"), require("./enc-utf16"), require("./enc-base64"), require("./md5"), require("./sha1"), require("./sha256"), require("./sha224"), require("./sha512"), require("./sha384"), require("./sha3"), require("./ripemd160"), require("./hmac"), require("./pbkdf2"), require("./evpkdf"), require("./cipher-core"), require("./mode-cfb"), require("./mode-ctr"), require("./mode-ctr-gladman"), require("./mode-ofb"), require("./mode-ecb"), require("./pad-ansix923"), require("./pad-iso10126"), require("./pad-iso97971"), require("./pad-zeropadding"), require("./pad-nopadding"), require("./format-hex"), require("./aes"), require("./tripledes"), require("./rc4"), require("./rabbit"), require("./rabbit-legacy")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./x64-core", "./lib-typedarrays", "./enc-utf16", "./enc-base64", "./md5", "./sha1", "./sha256", "./sha224", "./sha512", "./sha384", "./sha3", "./ripemd160", "./hmac", "./pbkdf2", "./evpkdf", "./cipher-core", "./mode-cfb", "./mode-ctr", "./mode-ctr-gladman", "./mode-ofb", "./mode-ecb", "./pad-ansix923", "./pad-iso10126", "./pad-iso97971", "./pad-zeropadding", "./pad-nopadding", "./format-hex", "./aes", "./tripledes", "./rc4", "./rabbit", "./rabbit-legacy"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - return CryptoJS; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/lib-typedarrays.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/lib-typedarrays.js deleted file mode 100644 index b293b28..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/lib-typedarrays.js +++ /dev/null @@ -1,76 +0,0 @@ -;(function (root, factory) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - (function () { - // Check if typed arrays are supported - if (typeof ArrayBuffer != 'function') { - return; - } - - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - - // Reference original init - var superInit = WordArray.init; - - // Augment WordArray.init to handle typed arrays - var subInit = WordArray.init = function (typedArray) { - // Convert buffers to uint8 - if (typedArray instanceof ArrayBuffer) { - typedArray = new Uint8Array(typedArray); - } - - // Convert other array views to uint8 - if ( - typedArray instanceof Int8Array || - typedArray instanceof Uint8ClampedArray || - typedArray instanceof Int16Array || - typedArray instanceof Uint16Array || - typedArray instanceof Int32Array || - typedArray instanceof Uint32Array || - typedArray instanceof Float32Array || - typedArray instanceof Float64Array - ) { - typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); - } - - // Handle Uint8Array - if (typedArray instanceof Uint8Array) { - // Shortcut - var typedArrayByteLength = typedArray.byteLength; - - // Extract bytes - var words = []; - for (var i = 0; i < typedArrayByteLength; i++) { - words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); - } - - // Initialize this word array - superInit.call(this, words, typedArrayByteLength); - } else { - // Else call normal init - superInit.apply(this, arguments); - } - }; - - subInit.prototype = WordArray; - }()); - - - return CryptoJS.lib.WordArray; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/md5.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/md5.js deleted file mode 100644 index 12b0fdd..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/md5.js +++ /dev/null @@ -1,268 +0,0 @@ -;(function (root, factory) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Constants table - var T = []; - - // Compute constants - (function () { - for (var i = 0; i < 64; i++) { - T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; - } - }()); - - /** - * MD5 hash algorithm. - */ - var MD5 = C_algo.MD5 = Hasher.extend({ - _doReset: function () { - this._hash = new WordArray.init([ - 0x67452301, 0xefcdab89, - 0x98badcfe, 0x10325476 - ]); - }, - - _doProcessBlock: function (M, offset) { - // Swap endian - for (var i = 0; i < 16; i++) { - // Shortcuts - var offset_i = offset + i; - var M_offset_i = M[offset_i]; - - M[offset_i] = ( - (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | - (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) - ); - } - - // Shortcuts - var H = this._hash.words; - - var M_offset_0 = M[offset + 0]; - var M_offset_1 = M[offset + 1]; - var M_offset_2 = M[offset + 2]; - var M_offset_3 = M[offset + 3]; - var M_offset_4 = M[offset + 4]; - var M_offset_5 = M[offset + 5]; - var M_offset_6 = M[offset + 6]; - var M_offset_7 = M[offset + 7]; - var M_offset_8 = M[offset + 8]; - var M_offset_9 = M[offset + 9]; - var M_offset_10 = M[offset + 10]; - var M_offset_11 = M[offset + 11]; - var M_offset_12 = M[offset + 12]; - var M_offset_13 = M[offset + 13]; - var M_offset_14 = M[offset + 14]; - var M_offset_15 = M[offset + 15]; - - // Working varialbes - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - - // Computation - a = FF(a, b, c, d, M_offset_0, 7, T[0]); - d = FF(d, a, b, c, M_offset_1, 12, T[1]); - c = FF(c, d, a, b, M_offset_2, 17, T[2]); - b = FF(b, c, d, a, M_offset_3, 22, T[3]); - a = FF(a, b, c, d, M_offset_4, 7, T[4]); - d = FF(d, a, b, c, M_offset_5, 12, T[5]); - c = FF(c, d, a, b, M_offset_6, 17, T[6]); - b = FF(b, c, d, a, M_offset_7, 22, T[7]); - a = FF(a, b, c, d, M_offset_8, 7, T[8]); - d = FF(d, a, b, c, M_offset_9, 12, T[9]); - c = FF(c, d, a, b, M_offset_10, 17, T[10]); - b = FF(b, c, d, a, M_offset_11, 22, T[11]); - a = FF(a, b, c, d, M_offset_12, 7, T[12]); - d = FF(d, a, b, c, M_offset_13, 12, T[13]); - c = FF(c, d, a, b, M_offset_14, 17, T[14]); - b = FF(b, c, d, a, M_offset_15, 22, T[15]); - - a = GG(a, b, c, d, M_offset_1, 5, T[16]); - d = GG(d, a, b, c, M_offset_6, 9, T[17]); - c = GG(c, d, a, b, M_offset_11, 14, T[18]); - b = GG(b, c, d, a, M_offset_0, 20, T[19]); - a = GG(a, b, c, d, M_offset_5, 5, T[20]); - d = GG(d, a, b, c, M_offset_10, 9, T[21]); - c = GG(c, d, a, b, M_offset_15, 14, T[22]); - b = GG(b, c, d, a, M_offset_4, 20, T[23]); - a = GG(a, b, c, d, M_offset_9, 5, T[24]); - d = GG(d, a, b, c, M_offset_14, 9, T[25]); - c = GG(c, d, a, b, M_offset_3, 14, T[26]); - b = GG(b, c, d, a, M_offset_8, 20, T[27]); - a = GG(a, b, c, d, M_offset_13, 5, T[28]); - d = GG(d, a, b, c, M_offset_2, 9, T[29]); - c = GG(c, d, a, b, M_offset_7, 14, T[30]); - b = GG(b, c, d, a, M_offset_12, 20, T[31]); - - a = HH(a, b, c, d, M_offset_5, 4, T[32]); - d = HH(d, a, b, c, M_offset_8, 11, T[33]); - c = HH(c, d, a, b, M_offset_11, 16, T[34]); - b = HH(b, c, d, a, M_offset_14, 23, T[35]); - a = HH(a, b, c, d, M_offset_1, 4, T[36]); - d = HH(d, a, b, c, M_offset_4, 11, T[37]); - c = HH(c, d, a, b, M_offset_7, 16, T[38]); - b = HH(b, c, d, a, M_offset_10, 23, T[39]); - a = HH(a, b, c, d, M_offset_13, 4, T[40]); - d = HH(d, a, b, c, M_offset_0, 11, T[41]); - c = HH(c, d, a, b, M_offset_3, 16, T[42]); - b = HH(b, c, d, a, M_offset_6, 23, T[43]); - a = HH(a, b, c, d, M_offset_9, 4, T[44]); - d = HH(d, a, b, c, M_offset_12, 11, T[45]); - c = HH(c, d, a, b, M_offset_15, 16, T[46]); - b = HH(b, c, d, a, M_offset_2, 23, T[47]); - - a = II(a, b, c, d, M_offset_0, 6, T[48]); - d = II(d, a, b, c, M_offset_7, 10, T[49]); - c = II(c, d, a, b, M_offset_14, 15, T[50]); - b = II(b, c, d, a, M_offset_5, 21, T[51]); - a = II(a, b, c, d, M_offset_12, 6, T[52]); - d = II(d, a, b, c, M_offset_3, 10, T[53]); - c = II(c, d, a, b, M_offset_10, 15, T[54]); - b = II(b, c, d, a, M_offset_1, 21, T[55]); - a = II(a, b, c, d, M_offset_8, 6, T[56]); - d = II(d, a, b, c, M_offset_15, 10, T[57]); - c = II(c, d, a, b, M_offset_6, 15, T[58]); - b = II(b, c, d, a, M_offset_13, 21, T[59]); - a = II(a, b, c, d, M_offset_4, 6, T[60]); - d = II(d, a, b, c, M_offset_11, 10, T[61]); - c = II(c, d, a, b, M_offset_2, 15, T[62]); - b = II(b, c, d, a, M_offset_9, 21, T[63]); - - // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - - var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); - var nBitsTotalL = nBitsTotal; - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( - (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | - (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) - ); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( - (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | - (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) - ); - - data.sigBytes = (dataWords.length + 1) * 4; - - // Hash final blocks - this._process(); - - // Shortcuts - var hash = this._hash; - var H = hash.words; - - // Swap endian - for (var i = 0; i < 4; i++) { - // Shortcut - var H_i = H[i]; - - H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | - (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); - } - - // Return final computed hash - return hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - function FF(a, b, c, d, x, s, t) { - var n = a + ((b & c) | (~b & d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - function GG(a, b, c, d, x, s, t) { - var n = a + ((b & d) | (c & ~d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - function HH(a, b, c, d, x, s, t) { - var n = a + (b ^ c ^ d) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - function II(a, b, c, d, x, s, t) { - var n = a + (c ^ (b | ~d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.MD5('message'); - * var hash = CryptoJS.MD5(wordArray); - */ - C.MD5 = Hasher._createHelper(MD5); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacMD5(message, key); - */ - C.HmacMD5 = Hasher._createHmacHelper(MD5); - }(Math)); - - - return CryptoJS.MD5; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/mode-cfb.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/mode-cfb.js deleted file mode 100644 index 86231f1..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/mode-cfb.js +++ /dev/null @@ -1,78 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./cipher-core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./cipher-core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - /** - * Cipher Feedback block mode. - */ - CryptoJS.mode.CFB = (function () { - var CFB = CryptoJS.lib.BlockCipherMode.extend(); - - CFB.Encryptor = CFB.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); - - // Remember this block to use with next block - this._prevBlock = words.slice(offset, offset + blockSize); - } - }); - - CFB.Decryptor = CFB.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - // Remember this block to use with next block - var thisBlock = words.slice(offset, offset + blockSize); - - generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); - - // This block becomes the previous block - this._prevBlock = thisBlock; - } - }); - - function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { - // Shortcut - var iv = this._iv; - - // Generate keystream - if (iv) { - var keystream = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } else { - var keystream = this._prevBlock; - } - cipher.encryptBlock(keystream, 0); - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - - return CFB; - }()); - - - return CryptoJS.mode.CFB; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/mode-ctr-gladman.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/mode-ctr-gladman.js deleted file mode 100644 index bbc5687..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/mode-ctr-gladman.js +++ /dev/null @@ -1,116 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./cipher-core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./cipher-core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - /** @preserve - * Counter block mode compatible with Dr Brian Gladman fileenc.c - * derived from CryptoJS.mode.CTR - * Jan Hruby jhruby.web@gmail.com - */ - CryptoJS.mode.CTRGladman = (function () { - var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); - - function incWord(word) - { - if (((word >> 24) & 0xff) === 0xff) { //overflow - var b1 = (word >> 16)&0xff; - var b2 = (word >> 8)&0xff; - var b3 = word & 0xff; - - if (b1 === 0xff) // overflow b1 - { - b1 = 0; - if (b2 === 0xff) - { - b2 = 0; - if (b3 === 0xff) - { - b3 = 0; - } - else - { - ++b3; - } - } - else - { - ++b2; - } - } - else - { - ++b1; - } - - word = 0; - word += (b1 << 16); - word += (b2 << 8); - word += b3; - } - else - { - word += (0x01 << 24); - } - return word; - } - - function incCounter(counter) - { - if ((counter[0] = incWord(counter[0])) === 0) - { - // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 - counter[1] = incWord(counter[1]); - } - return counter; - } - - var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var counter = this._counter; - - // Generate keystream - if (iv) { - counter = this._counter = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } - - incCounter(counter); - - var keystream = counter.slice(0); - cipher.encryptBlock(keystream, 0); - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - - CTRGladman.Decryptor = Encryptor; - - return CTRGladman; - }()); - - - - - return CryptoJS.mode.CTRGladman; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/mode-ctr.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/mode-ctr.js deleted file mode 100644 index c3d470a..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/mode-ctr.js +++ /dev/null @@ -1,58 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./cipher-core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./cipher-core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - /** - * Counter block mode. - */ - CryptoJS.mode.CTR = (function () { - var CTR = CryptoJS.lib.BlockCipherMode.extend(); - - var Encryptor = CTR.Encryptor = CTR.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var counter = this._counter; - - // Generate keystream - if (iv) { - counter = this._counter = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } - var keystream = counter.slice(0); - cipher.encryptBlock(keystream, 0); - - // Increment counter - counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - - CTR.Decryptor = Encryptor; - - return CTR; - }()); - - - return CryptoJS.mode.CTR; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/mode-ecb.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/mode-ecb.js deleted file mode 100644 index ff06921..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/mode-ecb.js +++ /dev/null @@ -1,40 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./cipher-core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./cipher-core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - /** - * Electronic Codebook block mode. - */ - CryptoJS.mode.ECB = (function () { - var ECB = CryptoJS.lib.BlockCipherMode.extend(); - - ECB.Encryptor = ECB.extend({ - processBlock: function (words, offset) { - this._cipher.encryptBlock(words, offset); - } - }); - - ECB.Decryptor = ECB.extend({ - processBlock: function (words, offset) { - this._cipher.decryptBlock(words, offset); - } - }); - - return ECB; - }()); - - - return CryptoJS.mode.ECB; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/mode-ofb.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/mode-ofb.js deleted file mode 100644 index c01314c..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/mode-ofb.js +++ /dev/null @@ -1,54 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./cipher-core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./cipher-core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - /** - * Output Feedback block mode. - */ - CryptoJS.mode.OFB = (function () { - var OFB = CryptoJS.lib.BlockCipherMode.extend(); - - var Encryptor = OFB.Encryptor = OFB.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var keystream = this._keystream; - - // Generate keystream - if (iv) { - keystream = this._keystream = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } - cipher.encryptBlock(keystream, 0); - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - - OFB.Decryptor = Encryptor; - - return OFB; - }()); - - - return CryptoJS.mode.OFB; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/package.json b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/package.json deleted file mode 100644 index 165d943..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "crypto-js", - "title": "crypto-js", - "description": "Modularized port of googlecode project crypto-js.", - "version": "3.1.2-5", - "homepage": "http://github.com/evanvosberg/crypto-js", - "author": { - "name": "Evan Vosberg", - "url": "http://github.com/evanvosberg" - }, - "repository": { - "type": "git", - "url": "http://github.com/evanvosberg/crypto-js.git" - }, - "bugs": { - "url": "http://github.com/evanvosberg/crypto-js/issues" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://opensource.org/licenses/MIT" - } - ], - "dependencies": {}, - "devDependencies": { - "underscore": "~1.4.4", - "handlebars": "~1.0.10", - "uglify-js": "~2.2.5", - "js-yaml": "~2.0.4", - "fs.extra": "~1.2.0", - "tar.gz": "~0.1.1", - "fmd": "~0.0.1" - }, - "keywords": [ - "Hash", - "MD5", - "SHA1", - "SHA-1", - "SHA256", - "SHA-256", - "RC4", - "Rabbit", - "AES", - "DES", - "PBKDF2", - "HMAC", - "OFB", - "CFB", - "CTR", - "CBC", - "Base64" - ], - "_id": "crypto-js@3.1.2-5", - "dist": { - "shasum": "8bda4cdadd27f36b1b8ee08989700195c9ab2a0a", - "tarball": "http://registry.npmjs.org/crypto-js/-/crypto-js-3.1.2-5.tgz" - }, - "_resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.2-5.tgz", - "_from": "crypto-js@>=3.1.2-2", - "scripts": {}, - "_npmVersion": "1.4.3", - "_npmUser": { - "name": "evanvosberg", - "email": "evanvosberg@inext.me" - }, - "maintainers": [ - { - "name": "evanvosberg", - "email": "evanvosberg@inext.me" - } - ], - "directories": {}, - "_shasum": "8bda4cdadd27f36b1b8ee08989700195c9ab2a0a", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-ansix923.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-ansix923.js deleted file mode 100644 index f01f21e..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-ansix923.js +++ /dev/null @@ -1,49 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./cipher-core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./cipher-core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - /** - * ANSI X.923 padding strategy. - */ - CryptoJS.pad.AnsiX923 = { - pad: function (data, blockSize) { - // Shortcuts - var dataSigBytes = data.sigBytes; - var blockSizeBytes = blockSize * 4; - - // Count padding bytes - var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; - - // Compute last byte position - var lastBytePos = dataSigBytes + nPaddingBytes - 1; - - // Pad - data.clamp(); - data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); - data.sigBytes += nPaddingBytes; - }, - - unpad: function (data) { - // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; - - // Remove padding - data.sigBytes -= nPaddingBytes; - } - }; - - - return CryptoJS.pad.Ansix923; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-iso10126.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-iso10126.js deleted file mode 100644 index 6e2aefd..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-iso10126.js +++ /dev/null @@ -1,44 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./cipher-core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./cipher-core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - /** - * ISO 10126 padding strategy. - */ - CryptoJS.pad.Iso10126 = { - pad: function (data, blockSize) { - // Shortcut - var blockSizeBytes = blockSize * 4; - - // Count padding bytes - var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; - - // Pad - data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). - concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); - }, - - unpad: function (data) { - // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; - - // Remove padding - data.sigBytes -= nPaddingBytes; - } - }; - - - return CryptoJS.pad.Iso10126; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-iso97971.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-iso97971.js deleted file mode 100644 index 41049b4..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-iso97971.js +++ /dev/null @@ -1,40 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./cipher-core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./cipher-core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - /** - * ISO/IEC 9797-1 Padding Method 2. - */ - CryptoJS.pad.Iso97971 = { - pad: function (data, blockSize) { - // Add 0x80 byte - data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); - - // Zero pad the rest - CryptoJS.pad.ZeroPadding.pad(data, blockSize); - }, - - unpad: function (data) { - // Remove zero padding - CryptoJS.pad.ZeroPadding.unpad(data); - - // Remove one more byte -- the 0x80 byte - data.sigBytes--; - } - }; - - - return CryptoJS.pad.Iso97971; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-nopadding.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-nopadding.js deleted file mode 100644 index c7787c9..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-nopadding.js +++ /dev/null @@ -1,30 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./cipher-core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./cipher-core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - /** - * A noop padding strategy. - */ - CryptoJS.pad.NoPadding = { - pad: function () { - }, - - unpad: function () { - } - }; - - - return CryptoJS.pad.NoPadding; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-pkcs7.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-pkcs7.js deleted file mode 100644 index 3555168..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-pkcs7.js +++ /dev/null @@ -1,18 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./cipher-core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./cipher-core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - return CryptoJS.pad.Pkcs7; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-zeropadding.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-zeropadding.js deleted file mode 100644 index 0e8a859..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pad-zeropadding.js +++ /dev/null @@ -1,45 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./cipher-core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./cipher-core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - /** - * Zero padding strategy. - */ - CryptoJS.pad.ZeroPadding = { - pad: function (data, blockSize) { - // Shortcut - var blockSizeBytes = blockSize * 4; - - // Pad - data.clamp(); - data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); - }, - - unpad: function (data) { - // Shortcut - var dataWords = data.words; - - // Unpad - var i = data.sigBytes - 1; - while (!((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { - i--; - } - data.sigBytes = i + 1; - } - }; - - - return CryptoJS.pad.ZeroPadding; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pbkdf2.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pbkdf2.js deleted file mode 100644 index 1258251..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/pbkdf2.js +++ /dev/null @@ -1,145 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./sha1"), require("./hmac")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./sha1", "./hmac"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var SHA1 = C_algo.SHA1; - var HMAC = C_algo.HMAC; - - /** - * Password-Based Key Derivation Function 2 algorithm. - */ - var PBKDF2 = C_algo.PBKDF2 = Base.extend({ - /** - * Configuration options. - * - * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) - * @property {Hasher} hasher The hasher to use. Default: SHA1 - * @property {number} iterations The number of iterations to perform. Default: 1 - */ - cfg: Base.extend({ - keySize: 128/32, - hasher: SHA1, - iterations: 1 - }), - - /** - * Initializes a newly created key derivation function. - * - * @param {Object} cfg (Optional) The configuration options to use for the derivation. - * - * @example - * - * var kdf = CryptoJS.algo.PBKDF2.create(); - * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); - * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); - */ - init: function (cfg) { - this.cfg = this.cfg.extend(cfg); - }, - - /** - * Computes the Password-Based Key Derivation Function 2. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * - * @return {WordArray} The derived key. - * - * @example - * - * var key = kdf.compute(password, salt); - */ - compute: function (password, salt) { - // Shortcut - var cfg = this.cfg; - - // Init HMAC - var hmac = HMAC.create(cfg.hasher, password); - - // Initial values - var derivedKey = WordArray.create(); - var blockIndex = WordArray.create([0x00000001]); - - // Shortcuts - var derivedKeyWords = derivedKey.words; - var blockIndexWords = blockIndex.words; - var keySize = cfg.keySize; - var iterations = cfg.iterations; - - // Generate key - while (derivedKeyWords.length < keySize) { - var block = hmac.update(salt).finalize(blockIndex); - hmac.reset(); - - // Shortcuts - var blockWords = block.words; - var blockWordsLength = blockWords.length; - - // Iterations - var intermediate = block; - for (var i = 1; i < iterations; i++) { - intermediate = hmac.finalize(intermediate); - hmac.reset(); - - // Shortcut - var intermediateWords = intermediate.words; - - // XOR intermediate with block - for (var j = 0; j < blockWordsLength; j++) { - blockWords[j] ^= intermediateWords[j]; - } - } - - derivedKey.concat(block); - blockIndexWords[0]++; - } - derivedKey.sigBytes = keySize * 4; - - return derivedKey; - } - }); - - /** - * Computes the Password-Based Key Derivation Function 2. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * @param {Object} cfg (Optional) The configuration options to use for this computation. - * - * @return {WordArray} The derived key. - * - * @static - * - * @example - * - * var key = CryptoJS.PBKDF2(password, salt); - * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 }); - * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); - */ - C.PBKDF2 = function (password, salt, cfg) { - return PBKDF2.create(cfg).compute(password, salt); - }; - }()); - - - return CryptoJS.PBKDF2; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/rabbit-legacy.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/rabbit-legacy.js deleted file mode 100644 index e118b6b..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/rabbit-legacy.js +++ /dev/null @@ -1,190 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; - - // Reusable objects - var S = []; - var C_ = []; - var G = []; - - /** - * Rabbit stream cipher algorithm. - * - * This is a legacy version that neglected to convert the key to little-endian. - * This error doesn't affect the cipher's security, - * but it does affect its compatibility with other implementations. - */ - var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ - _doReset: function () { - // Shortcuts - var K = this._key.words; - var iv = this.cfg.iv; - - // Generate initial state values - var X = this._X = [ - K[0], (K[3] << 16) | (K[2] >>> 16), - K[1], (K[0] << 16) | (K[3] >>> 16), - K[2], (K[1] << 16) | (K[0] >>> 16), - K[3], (K[2] << 16) | (K[1] >>> 16) - ]; - - // Generate initial counter values - var C = this._C = [ - (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), - (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), - (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), - (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) - ]; - - // Carry bit - this._b = 0; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - - // Modify the counters - for (var i = 0; i < 8; i++) { - C[i] ^= X[(i + 4) & 7]; - } - - // IV setup - if (iv) { - // Shortcuts - var IV = iv.words; - var IV_0 = IV[0]; - var IV_1 = IV[1]; - - // Generate four subvectors - var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); - var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); - var i1 = (i0 >>> 16) | (i2 & 0xffff0000); - var i3 = (i2 << 16) | (i0 & 0x0000ffff); - - // Modify counter values - C[0] ^= i0; - C[1] ^= i1; - C[2] ^= i2; - C[3] ^= i3; - C[4] ^= i0; - C[5] ^= i1; - C[6] ^= i2; - C[7] ^= i3; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - } - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var X = this._X; - - // Iterate the system - nextState.call(this); - - // Generate four keystream words - S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); - S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); - S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); - S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); - - for (var i = 0; i < 4; i++) { - // Swap endian - S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | - (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); - - // Encrypt - M[offset + i] ^= S[i]; - } - }, - - blockSize: 128/32, - - ivSize: 64/32 - }); - - function nextState() { - // Shortcuts - var X = this._X; - var C = this._C; - - // Save old counter values - for (var i = 0; i < 8; i++) { - C_[i] = C[i]; - } - - // Calculate new counter values - C[0] = (C[0] + 0x4d34d34d + this._b) | 0; - C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; - C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; - C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; - C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; - C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; - C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; - C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; - this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; - - // Calculate the g-values - for (var i = 0; i < 8; i++) { - var gx = X[i] + C[i]; - - // Construct high and low argument for squaring - var ga = gx & 0xffff; - var gb = gx >>> 16; - - // Calculate high and low result of squaring - var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; - var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); - - // High XOR low - G[i] = gh ^ gl; - } - - // Calculate new state values - X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; - X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; - X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; - X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; - X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; - X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; - X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; - X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); - * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); - */ - C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); - }()); - - - return CryptoJS.RabbitLegacy; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/rabbit.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/rabbit.js deleted file mode 100644 index 1b06833..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/rabbit.js +++ /dev/null @@ -1,192 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; - - // Reusable objects - var S = []; - var C_ = []; - var G = []; - - /** - * Rabbit stream cipher algorithm - */ - var Rabbit = C_algo.Rabbit = StreamCipher.extend({ - _doReset: function () { - // Shortcuts - var K = this._key.words; - var iv = this.cfg.iv; - - // Swap endian - for (var i = 0; i < 4; i++) { - K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | - (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); - } - - // Generate initial state values - var X = this._X = [ - K[0], (K[3] << 16) | (K[2] >>> 16), - K[1], (K[0] << 16) | (K[3] >>> 16), - K[2], (K[1] << 16) | (K[0] >>> 16), - K[3], (K[2] << 16) | (K[1] >>> 16) - ]; - - // Generate initial counter values - var C = this._C = [ - (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), - (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), - (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), - (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) - ]; - - // Carry bit - this._b = 0; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - - // Modify the counters - for (var i = 0; i < 8; i++) { - C[i] ^= X[(i + 4) & 7]; - } - - // IV setup - if (iv) { - // Shortcuts - var IV = iv.words; - var IV_0 = IV[0]; - var IV_1 = IV[1]; - - // Generate four subvectors - var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); - var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); - var i1 = (i0 >>> 16) | (i2 & 0xffff0000); - var i3 = (i2 << 16) | (i0 & 0x0000ffff); - - // Modify counter values - C[0] ^= i0; - C[1] ^= i1; - C[2] ^= i2; - C[3] ^= i3; - C[4] ^= i0; - C[5] ^= i1; - C[6] ^= i2; - C[7] ^= i3; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - } - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var X = this._X; - - // Iterate the system - nextState.call(this); - - // Generate four keystream words - S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); - S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); - S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); - S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); - - for (var i = 0; i < 4; i++) { - // Swap endian - S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | - (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); - - // Encrypt - M[offset + i] ^= S[i]; - } - }, - - blockSize: 128/32, - - ivSize: 64/32 - }); - - function nextState() { - // Shortcuts - var X = this._X; - var C = this._C; - - // Save old counter values - for (var i = 0; i < 8; i++) { - C_[i] = C[i]; - } - - // Calculate new counter values - C[0] = (C[0] + 0x4d34d34d + this._b) | 0; - C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; - C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; - C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; - C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; - C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; - C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; - C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; - this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; - - // Calculate the g-values - for (var i = 0; i < 8; i++) { - var gx = X[i] + C[i]; - - // Construct high and low argument for squaring - var ga = gx & 0xffff; - var gb = gx >>> 16; - - // Calculate high and low result of squaring - var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; - var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); - - // High XOR low - G[i] = gh ^ gl; - } - - // Calculate new state values - X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; - X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; - X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; - X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; - X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; - X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; - X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; - X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); - * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); - */ - C.Rabbit = StreamCipher._createHelper(Rabbit); - }()); - - - return CryptoJS.Rabbit; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/rc4.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/rc4.js deleted file mode 100644 index 0e4bdff..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/rc4.js +++ /dev/null @@ -1,139 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; - - /** - * RC4 stream cipher algorithm. - */ - var RC4 = C_algo.RC4 = StreamCipher.extend({ - _doReset: function () { - // Shortcuts - var key = this._key; - var keyWords = key.words; - var keySigBytes = key.sigBytes; - - // Init sbox - var S = this._S = []; - for (var i = 0; i < 256; i++) { - S[i] = i; - } - - // Key setup - for (var i = 0, j = 0; i < 256; i++) { - var keyByteIndex = i % keySigBytes; - var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; - - j = (j + S[i] + keyByte) % 256; - - // Swap - var t = S[i]; - S[i] = S[j]; - S[j] = t; - } - - // Counters - this._i = this._j = 0; - }, - - _doProcessBlock: function (M, offset) { - M[offset] ^= generateKeystreamWord.call(this); - }, - - keySize: 256/32, - - ivSize: 0 - }); - - function generateKeystreamWord() { - // Shortcuts - var S = this._S; - var i = this._i; - var j = this._j; - - // Generate keystream word - var keystreamWord = 0; - for (var n = 0; n < 4; n++) { - i = (i + 1) % 256; - j = (j + S[i]) % 256; - - // Swap - var t = S[i]; - S[i] = S[j]; - S[j] = t; - - keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); - } - - // Update counters - this._i = i; - this._j = j; - - return keystreamWord; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); - * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); - */ - C.RC4 = StreamCipher._createHelper(RC4); - - /** - * Modified RC4 stream cipher algorithm. - */ - var RC4Drop = C_algo.RC4Drop = RC4.extend({ - /** - * Configuration options. - * - * @property {number} drop The number of keystream words to drop. Default 192 - */ - cfg: RC4.cfg.extend({ - drop: 192 - }), - - _doReset: function () { - RC4._doReset.call(this); - - // Drop - for (var i = this.cfg.drop; i > 0; i--) { - generateKeystreamWord.call(this); - } - } - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); - * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); - */ - C.RC4Drop = StreamCipher._createHelper(RC4Drop); - }()); - - - return CryptoJS.RC4; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/ripemd160.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/ripemd160.js deleted file mode 100644 index 24feb47..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/ripemd160.js +++ /dev/null @@ -1,267 +0,0 @@ -;(function (root, factory) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - /** @preserve - (c) 2012 by Cédric Mesnil. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Constants table - var _zl = WordArray.create([ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, - 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, - 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, - 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); - var _zr = WordArray.create([ - 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, - 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, - 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, - 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, - 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); - var _sl = WordArray.create([ - 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, - 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, - 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, - 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, - 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); - var _sr = WordArray.create([ - 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, - 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, - 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, - 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, - 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); - - var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); - var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); - - /** - * RIPEMD160 hash algorithm. - */ - var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ - _doReset: function () { - this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); - }, - - _doProcessBlock: function (M, offset) { - - // Swap endian - for (var i = 0; i < 16; i++) { - // Shortcuts - var offset_i = offset + i; - var M_offset_i = M[offset_i]; - - // Swap - M[offset_i] = ( - (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | - (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) - ); - } - // Shortcut - var H = this._hash.words; - var hl = _hl.words; - var hr = _hr.words; - var zl = _zl.words; - var zr = _zr.words; - var sl = _sl.words; - var sr = _sr.words; - - // Working variables - var al, bl, cl, dl, el; - var ar, br, cr, dr, er; - - ar = al = H[0]; - br = bl = H[1]; - cr = cl = H[2]; - dr = dl = H[3]; - er = el = H[4]; - // Computation - var t; - for (var i = 0; i < 80; i += 1) { - t = (al + M[offset+zl[i]])|0; - if (i<16){ - t += f1(bl,cl,dl) + hl[0]; - } else if (i<32) { - t += f2(bl,cl,dl) + hl[1]; - } else if (i<48) { - t += f3(bl,cl,dl) + hl[2]; - } else if (i<64) { - t += f4(bl,cl,dl) + hl[3]; - } else {// if (i<80) { - t += f5(bl,cl,dl) + hl[4]; - } - t = t|0; - t = rotl(t,sl[i]); - t = (t+el)|0; - al = el; - el = dl; - dl = rotl(cl, 10); - cl = bl; - bl = t; - - t = (ar + M[offset+zr[i]])|0; - if (i<16){ - t += f5(br,cr,dr) + hr[0]; - } else if (i<32) { - t += f4(br,cr,dr) + hr[1]; - } else if (i<48) { - t += f3(br,cr,dr) + hr[2]; - } else if (i<64) { - t += f2(br,cr,dr) + hr[3]; - } else {// if (i<80) { - t += f1(br,cr,dr) + hr[4]; - } - t = t|0; - t = rotl(t,sr[i]) ; - t = (t+er)|0; - ar = er; - er = dr; - dr = rotl(cr, 10); - cr = br; - br = t; - } - // Intermediate hash value - t = (H[1] + cl + dr)|0; - H[1] = (H[2] + dl + er)|0; - H[2] = (H[3] + el + ar)|0; - H[3] = (H[4] + al + br)|0; - H[4] = (H[0] + bl + cr)|0; - H[0] = t; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( - (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | - (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) - ); - data.sigBytes = (dataWords.length + 1) * 4; - - // Hash final blocks - this._process(); - - // Shortcuts - var hash = this._hash; - var H = hash.words; - - // Swap endian - for (var i = 0; i < 5; i++) { - // Shortcut - var H_i = H[i]; - - // Swap - H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | - (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); - } - - // Return final computed hash - return hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - - function f1(x, y, z) { - return ((x) ^ (y) ^ (z)); - - } - - function f2(x, y, z) { - return (((x)&(y)) | ((~x)&(z))); - } - - function f3(x, y, z) { - return (((x) | (~(y))) ^ (z)); - } - - function f4(x, y, z) { - return (((x) & (z)) | ((y)&(~(z)))); - } - - function f5(x, y, z) { - return ((x) ^ ((y) |(~(z)))); - - } - - function rotl(x,n) { - return (x<>>(32-n)); - } - - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.RIPEMD160('message'); - * var hash = CryptoJS.RIPEMD160(wordArray); - */ - C.RIPEMD160 = Hasher._createHelper(RIPEMD160); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacRIPEMD160(message, key); - */ - C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); - }(Math)); - - - return CryptoJS.RIPEMD160; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha1.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha1.js deleted file mode 100644 index 6691149..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha1.js +++ /dev/null @@ -1,150 +0,0 @@ -;(function (root, factory) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Reusable object - var W = []; - - /** - * SHA-1 hash algorithm. - */ - var SHA1 = C_algo.SHA1 = Hasher.extend({ - _doReset: function () { - this._hash = new WordArray.init([ - 0x67452301, 0xefcdab89, - 0x98badcfe, 0x10325476, - 0xc3d2e1f0 - ]); - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var H = this._hash.words; - - // Working variables - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - var e = H[4]; - - // Computation - for (var i = 0; i < 80; i++) { - if (i < 16) { - W[i] = M[offset + i] | 0; - } else { - var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; - W[i] = (n << 1) | (n >>> 31); - } - - var t = ((a << 5) | (a >>> 27)) + e + W[i]; - if (i < 20) { - t += ((b & c) | (~b & d)) + 0x5a827999; - } else if (i < 40) { - t += (b ^ c ^ d) + 0x6ed9eba1; - } else if (i < 60) { - t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; - } else /* if (i < 80) */ { - t += (b ^ c ^ d) - 0x359d3e2a; - } - - e = d; - d = c; - c = (b << 30) | (b >>> 2); - b = a; - a = t; - } - - // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; - H[4] = (H[4] + e) | 0; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Return final computed hash - return this._hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA1('message'); - * var hash = CryptoJS.SHA1(wordArray); - */ - C.SHA1 = Hasher._createHelper(SHA1); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA1(message, key); - */ - C.HmacSHA1 = Hasher._createHmacHelper(SHA1); - }()); - - - return CryptoJS.SHA1; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha224.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha224.js deleted file mode 100644 index d8ce988..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha224.js +++ /dev/null @@ -1,80 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./sha256")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./sha256"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var SHA256 = C_algo.SHA256; - - /** - * SHA-224 hash algorithm. - */ - var SHA224 = C_algo.SHA224 = SHA256.extend({ - _doReset: function () { - this._hash = new WordArray.init([ - 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, - 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 - ]); - }, - - _doFinalize: function () { - var hash = SHA256._doFinalize.call(this); - - hash.sigBytes -= 4; - - return hash; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA224('message'); - * var hash = CryptoJS.SHA224(wordArray); - */ - C.SHA224 = SHA256._createHelper(SHA224); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA224(message, key); - */ - C.HmacSHA224 = SHA256._createHmacHelper(SHA224); - }()); - - - return CryptoJS.SHA224; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha256.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha256.js deleted file mode 100644 index de2d7fc..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha256.js +++ /dev/null @@ -1,199 +0,0 @@ -;(function (root, factory) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Initialization and round constants tables - var H = []; - var K = []; - - // Compute constants - (function () { - function isPrime(n) { - var sqrtN = Math.sqrt(n); - for (var factor = 2; factor <= sqrtN; factor++) { - if (!(n % factor)) { - return false; - } - } - - return true; - } - - function getFractionalBits(n) { - return ((n - (n | 0)) * 0x100000000) | 0; - } - - var n = 2; - var nPrime = 0; - while (nPrime < 64) { - if (isPrime(n)) { - if (nPrime < 8) { - H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); - } - K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); - - nPrime++; - } - - n++; - } - }()); - - // Reusable object - var W = []; - - /** - * SHA-256 hash algorithm. - */ - var SHA256 = C_algo.SHA256 = Hasher.extend({ - _doReset: function () { - this._hash = new WordArray.init(H.slice(0)); - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var H = this._hash.words; - - // Working variables - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - var e = H[4]; - var f = H[5]; - var g = H[6]; - var h = H[7]; - - // Computation - for (var i = 0; i < 64; i++) { - if (i < 16) { - W[i] = M[offset + i] | 0; - } else { - var gamma0x = W[i - 15]; - var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ - ((gamma0x << 14) | (gamma0x >>> 18)) ^ - (gamma0x >>> 3); - - var gamma1x = W[i - 2]; - var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ - ((gamma1x << 13) | (gamma1x >>> 19)) ^ - (gamma1x >>> 10); - - W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; - } - - var ch = (e & f) ^ (~e & g); - var maj = (a & b) ^ (a & c) ^ (b & c); - - var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); - var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); - - var t1 = h + sigma1 + ch + K[i] + W[i]; - var t2 = sigma0 + maj; - - h = g; - g = f; - f = e; - e = (d + t1) | 0; - d = c; - c = b; - b = a; - a = (t1 + t2) | 0; - } - - // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; - H[4] = (H[4] + e) | 0; - H[5] = (H[5] + f) | 0; - H[6] = (H[6] + g) | 0; - H[7] = (H[7] + h) | 0; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Return final computed hash - return this._hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA256('message'); - * var hash = CryptoJS.SHA256(wordArray); - */ - C.SHA256 = Hasher._createHelper(SHA256); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA256(message, key); - */ - C.HmacSHA256 = Hasher._createHmacHelper(SHA256); - }(Math)); - - - return CryptoJS.SHA256; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha3.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha3.js deleted file mode 100644 index 4fb27fe..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha3.js +++ /dev/null @@ -1,323 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./x64-core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./x64-core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var C_algo = C.algo; - - // Constants tables - var RHO_OFFSETS = []; - var PI_INDEXES = []; - var ROUND_CONSTANTS = []; - - // Compute Constants - (function () { - // Compute rho offset constants - var x = 1, y = 0; - for (var t = 0; t < 24; t++) { - RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; - - var newX = y % 5; - var newY = (2 * x + 3 * y) % 5; - x = newX; - y = newY; - } - - // Compute pi index constants - for (var x = 0; x < 5; x++) { - for (var y = 0; y < 5; y++) { - PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; - } - } - - // Compute round constants - var LFSR = 0x01; - for (var i = 0; i < 24; i++) { - var roundConstantMsw = 0; - var roundConstantLsw = 0; - - for (var j = 0; j < 7; j++) { - if (LFSR & 0x01) { - var bitPosition = (1 << j) - 1; - if (bitPosition < 32) { - roundConstantLsw ^= 1 << bitPosition; - } else /* if (bitPosition >= 32) */ { - roundConstantMsw ^= 1 << (bitPosition - 32); - } - } - - // Compute next LFSR - if (LFSR & 0x80) { - // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 - LFSR = (LFSR << 1) ^ 0x71; - } else { - LFSR <<= 1; - } - } - - ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); - } - }()); - - // Reusable objects for temporary values - var T = []; - (function () { - for (var i = 0; i < 25; i++) { - T[i] = X64Word.create(); - } - }()); - - /** - * SHA-3 hash algorithm. - */ - var SHA3 = C_algo.SHA3 = Hasher.extend({ - /** - * Configuration options. - * - * @property {number} outputLength - * The desired number of bits in the output hash. - * Only values permitted are: 224, 256, 384, 512. - * Default: 512 - */ - cfg: Hasher.cfg.extend({ - outputLength: 512 - }), - - _doReset: function () { - var state = this._state = [] - for (var i = 0; i < 25; i++) { - state[i] = new X64Word.init(); - } - - this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; - }, - - _doProcessBlock: function (M, offset) { - // Shortcuts - var state = this._state; - var nBlockSizeLanes = this.blockSize / 2; - - // Absorb - for (var i = 0; i < nBlockSizeLanes; i++) { - // Shortcuts - var M2i = M[offset + 2 * i]; - var M2i1 = M[offset + 2 * i + 1]; - - // Swap endian - M2i = ( - (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | - (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) - ); - M2i1 = ( - (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | - (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) - ); - - // Absorb message into state - var lane = state[i]; - lane.high ^= M2i1; - lane.low ^= M2i; - } - - // Rounds - for (var round = 0; round < 24; round++) { - // Theta - for (var x = 0; x < 5; x++) { - // Mix column lanes - var tMsw = 0, tLsw = 0; - for (var y = 0; y < 5; y++) { - var lane = state[x + 5 * y]; - tMsw ^= lane.high; - tLsw ^= lane.low; - } - - // Temporary values - var Tx = T[x]; - Tx.high = tMsw; - Tx.low = tLsw; - } - for (var x = 0; x < 5; x++) { - // Shortcuts - var Tx4 = T[(x + 4) % 5]; - var Tx1 = T[(x + 1) % 5]; - var Tx1Msw = Tx1.high; - var Tx1Lsw = Tx1.low; - - // Mix surrounding columns - var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); - var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); - for (var y = 0; y < 5; y++) { - var lane = state[x + 5 * y]; - lane.high ^= tMsw; - lane.low ^= tLsw; - } - } - - // Rho Pi - for (var laneIndex = 1; laneIndex < 25; laneIndex++) { - // Shortcuts - var lane = state[laneIndex]; - var laneMsw = lane.high; - var laneLsw = lane.low; - var rhoOffset = RHO_OFFSETS[laneIndex]; - - // Rotate lanes - if (rhoOffset < 32) { - var tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); - var tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); - } else /* if (rhoOffset >= 32) */ { - var tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); - var tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); - } - - // Transpose lanes - var TPiLane = T[PI_INDEXES[laneIndex]]; - TPiLane.high = tMsw; - TPiLane.low = tLsw; - } - - // Rho pi at x = y = 0 - var T0 = T[0]; - var state0 = state[0]; - T0.high = state0.high; - T0.low = state0.low; - - // Chi - for (var x = 0; x < 5; x++) { - for (var y = 0; y < 5; y++) { - // Shortcuts - var laneIndex = x + 5 * y; - var lane = state[laneIndex]; - var TLane = T[laneIndex]; - var Tx1Lane = T[((x + 1) % 5) + 5 * y]; - var Tx2Lane = T[((x + 2) % 5) + 5 * y]; - - // Mix rows - lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); - lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); - } - } - - // Iota - var lane = state[0]; - var roundConstant = ROUND_CONSTANTS[round]; - lane.high ^= roundConstant.high; - lane.low ^= roundConstant.low;; - } - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - var blockSizeBits = this.blockSize * 32; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); - dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Shortcuts - var state = this._state; - var outputLengthBytes = this.cfg.outputLength / 8; - var outputLengthLanes = outputLengthBytes / 8; - - // Squeeze - var hashWords = []; - for (var i = 0; i < outputLengthLanes; i++) { - // Shortcuts - var lane = state[i]; - var laneMsw = lane.high; - var laneLsw = lane.low; - - // Swap endian - laneMsw = ( - (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | - (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) - ); - laneLsw = ( - (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | - (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) - ); - - // Squeeze state to retrieve hash - hashWords.push(laneLsw); - hashWords.push(laneMsw); - } - - // Return final computed hash - return new WordArray.init(hashWords, outputLengthBytes); - }, - - clone: function () { - var clone = Hasher.clone.call(this); - - var state = clone._state = this._state.slice(0); - for (var i = 0; i < 25; i++) { - state[i] = state[i].clone(); - } - - return clone; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA3('message'); - * var hash = CryptoJS.SHA3(wordArray); - */ - C.SHA3 = Hasher._createHelper(SHA3); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA3(message, key); - */ - C.HmacSHA3 = Hasher._createHmacHelper(SHA3); - }(Math)); - - - return CryptoJS.SHA3; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha384.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha384.js deleted file mode 100644 index a0b95bf..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha384.js +++ /dev/null @@ -1,83 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha512")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./x64-core", "./sha512"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var X64WordArray = C_x64.WordArray; - var C_algo = C.algo; - var SHA512 = C_algo.SHA512; - - /** - * SHA-384 hash algorithm. - */ - var SHA384 = C_algo.SHA384 = SHA512.extend({ - _doReset: function () { - this._hash = new X64WordArray.init([ - new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), - new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), - new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), - new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) - ]); - }, - - _doFinalize: function () { - var hash = SHA512._doFinalize.call(this); - - hash.sigBytes -= 16; - - return hash; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA384('message'); - * var hash = CryptoJS.SHA384(wordArray); - */ - C.SHA384 = SHA512._createHelper(SHA384); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA384(message, key); - */ - C.HmacSHA384 = SHA512._createHmacHelper(SHA384); - }()); - - - return CryptoJS.SHA384; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha512.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha512.js deleted file mode 100644 index 3359315..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/sha512.js +++ /dev/null @@ -1,323 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./x64-core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./x64-core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Hasher = C_lib.Hasher; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var X64WordArray = C_x64.WordArray; - var C_algo = C.algo; - - function X64Word_create() { - return X64Word.create.apply(X64Word, arguments); - } - - // Constants - var K = [ - X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), - X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), - X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), - X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), - X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), - X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), - X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), - X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), - X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), - X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), - X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), - X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), - X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), - X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), - X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), - X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), - X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), - X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), - X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), - X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), - X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), - X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), - X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), - X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), - X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), - X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), - X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), - X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), - X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), - X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), - X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), - X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), - X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), - X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), - X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), - X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), - X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), - X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), - X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), - X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) - ]; - - // Reusable objects - var W = []; - (function () { - for (var i = 0; i < 80; i++) { - W[i] = X64Word_create(); - } - }()); - - /** - * SHA-512 hash algorithm. - */ - var SHA512 = C_algo.SHA512 = Hasher.extend({ - _doReset: function () { - this._hash = new X64WordArray.init([ - new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), - new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), - new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), - new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) - ]); - }, - - _doProcessBlock: function (M, offset) { - // Shortcuts - var H = this._hash.words; - - var H0 = H[0]; - var H1 = H[1]; - var H2 = H[2]; - var H3 = H[3]; - var H4 = H[4]; - var H5 = H[5]; - var H6 = H[6]; - var H7 = H[7]; - - var H0h = H0.high; - var H0l = H0.low; - var H1h = H1.high; - var H1l = H1.low; - var H2h = H2.high; - var H2l = H2.low; - var H3h = H3.high; - var H3l = H3.low; - var H4h = H4.high; - var H4l = H4.low; - var H5h = H5.high; - var H5l = H5.low; - var H6h = H6.high; - var H6l = H6.low; - var H7h = H7.high; - var H7l = H7.low; - - // Working variables - var ah = H0h; - var al = H0l; - var bh = H1h; - var bl = H1l; - var ch = H2h; - var cl = H2l; - var dh = H3h; - var dl = H3l; - var eh = H4h; - var el = H4l; - var fh = H5h; - var fl = H5l; - var gh = H6h; - var gl = H6l; - var hh = H7h; - var hl = H7l; - - // Rounds - for (var i = 0; i < 80; i++) { - // Shortcut - var Wi = W[i]; - - // Extend message - if (i < 16) { - var Wih = Wi.high = M[offset + i * 2] | 0; - var Wil = Wi.low = M[offset + i * 2 + 1] | 0; - } else { - // Gamma0 - var gamma0x = W[i - 15]; - var gamma0xh = gamma0x.high; - var gamma0xl = gamma0x.low; - var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); - var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); - - // Gamma1 - var gamma1x = W[i - 2]; - var gamma1xh = gamma1x.high; - var gamma1xl = gamma1x.low; - var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); - var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); - - // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] - var Wi7 = W[i - 7]; - var Wi7h = Wi7.high; - var Wi7l = Wi7.low; - - var Wi16 = W[i - 16]; - var Wi16h = Wi16.high; - var Wi16l = Wi16.low; - - var Wil = gamma0l + Wi7l; - var Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); - var Wil = Wil + gamma1l; - var Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); - var Wil = Wil + Wi16l; - var Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); - - Wi.high = Wih; - Wi.low = Wil; - } - - var chh = (eh & fh) ^ (~eh & gh); - var chl = (el & fl) ^ (~el & gl); - var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); - var majl = (al & bl) ^ (al & cl) ^ (bl & cl); - - var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); - var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); - var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); - var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); - - // t1 = h + sigma1 + ch + K[i] + W[i] - var Ki = K[i]; - var Kih = Ki.high; - var Kil = Ki.low; - - var t1l = hl + sigma1l; - var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); - var t1l = t1l + chl; - var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); - var t1l = t1l + Kil; - var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); - var t1l = t1l + Wil; - var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); - - // t2 = sigma0 + maj - var t2l = sigma0l + majl; - var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); - - // Update working variables - hh = gh; - hl = gl; - gh = fh; - gl = fl; - fh = eh; - fl = el; - el = (dl + t1l) | 0; - eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; - dh = ch; - dl = cl; - ch = bh; - cl = bl; - bh = ah; - bl = al; - al = (t1l + t2l) | 0; - ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; - } - - // Intermediate hash value - H0l = H0.low = (H0l + al); - H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); - H1l = H1.low = (H1l + bl); - H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); - H2l = H2.low = (H2l + cl); - H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); - H3l = H3.low = (H3l + dl); - H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); - H4l = H4.low = (H4l + el); - H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); - H5l = H5.low = (H5l + fl); - H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); - H6l = H6.low = (H6l + gl); - H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); - H7l = H7.low = (H7l + hl); - H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Convert hash to 32-bit word array before returning - var hash = this._hash.toX32(); - - // Return final computed hash - return hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - }, - - blockSize: 1024/32 - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA512('message'); - * var hash = CryptoJS.SHA512(wordArray); - */ - C.SHA512 = Hasher._createHelper(SHA512); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA512(message, key); - */ - C.HmacSHA512 = Hasher._createHmacHelper(SHA512); - }()); - - - return CryptoJS.SHA512; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/tripledes.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/tripledes.js deleted file mode 100644 index c7becf3..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/tripledes.js +++ /dev/null @@ -1,770 +0,0 @@ -;(function (root, factory, undef) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; - - // Permuted Choice 1 constants - var PC1 = [ - 57, 49, 41, 33, 25, 17, 9, 1, - 58, 50, 42, 34, 26, 18, 10, 2, - 59, 51, 43, 35, 27, 19, 11, 3, - 60, 52, 44, 36, 63, 55, 47, 39, - 31, 23, 15, 7, 62, 54, 46, 38, - 30, 22, 14, 6, 61, 53, 45, 37, - 29, 21, 13, 5, 28, 20, 12, 4 - ]; - - // Permuted Choice 2 constants - var PC2 = [ - 14, 17, 11, 24, 1, 5, - 3, 28, 15, 6, 21, 10, - 23, 19, 12, 4, 26, 8, - 16, 7, 27, 20, 13, 2, - 41, 52, 31, 37, 47, 55, - 30, 40, 51, 45, 33, 48, - 44, 49, 39, 56, 34, 53, - 46, 42, 50, 36, 29, 32 - ]; - - // Cumulative bit shift constants - var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; - - // SBOXes and round permutation constants - var SBOX_P = [ - { - 0x0: 0x808200, - 0x10000000: 0x8000, - 0x20000000: 0x808002, - 0x30000000: 0x2, - 0x40000000: 0x200, - 0x50000000: 0x808202, - 0x60000000: 0x800202, - 0x70000000: 0x800000, - 0x80000000: 0x202, - 0x90000000: 0x800200, - 0xa0000000: 0x8200, - 0xb0000000: 0x808000, - 0xc0000000: 0x8002, - 0xd0000000: 0x800002, - 0xe0000000: 0x0, - 0xf0000000: 0x8202, - 0x8000000: 0x0, - 0x18000000: 0x808202, - 0x28000000: 0x8202, - 0x38000000: 0x8000, - 0x48000000: 0x808200, - 0x58000000: 0x200, - 0x68000000: 0x808002, - 0x78000000: 0x2, - 0x88000000: 0x800200, - 0x98000000: 0x8200, - 0xa8000000: 0x808000, - 0xb8000000: 0x800202, - 0xc8000000: 0x800002, - 0xd8000000: 0x8002, - 0xe8000000: 0x202, - 0xf8000000: 0x800000, - 0x1: 0x8000, - 0x10000001: 0x2, - 0x20000001: 0x808200, - 0x30000001: 0x800000, - 0x40000001: 0x808002, - 0x50000001: 0x8200, - 0x60000001: 0x200, - 0x70000001: 0x800202, - 0x80000001: 0x808202, - 0x90000001: 0x808000, - 0xa0000001: 0x800002, - 0xb0000001: 0x8202, - 0xc0000001: 0x202, - 0xd0000001: 0x800200, - 0xe0000001: 0x8002, - 0xf0000001: 0x0, - 0x8000001: 0x808202, - 0x18000001: 0x808000, - 0x28000001: 0x800000, - 0x38000001: 0x200, - 0x48000001: 0x8000, - 0x58000001: 0x800002, - 0x68000001: 0x2, - 0x78000001: 0x8202, - 0x88000001: 0x8002, - 0x98000001: 0x800202, - 0xa8000001: 0x202, - 0xb8000001: 0x808200, - 0xc8000001: 0x800200, - 0xd8000001: 0x0, - 0xe8000001: 0x8200, - 0xf8000001: 0x808002 - }, - { - 0x0: 0x40084010, - 0x1000000: 0x4000, - 0x2000000: 0x80000, - 0x3000000: 0x40080010, - 0x4000000: 0x40000010, - 0x5000000: 0x40084000, - 0x6000000: 0x40004000, - 0x7000000: 0x10, - 0x8000000: 0x84000, - 0x9000000: 0x40004010, - 0xa000000: 0x40000000, - 0xb000000: 0x84010, - 0xc000000: 0x80010, - 0xd000000: 0x0, - 0xe000000: 0x4010, - 0xf000000: 0x40080000, - 0x800000: 0x40004000, - 0x1800000: 0x84010, - 0x2800000: 0x10, - 0x3800000: 0x40004010, - 0x4800000: 0x40084010, - 0x5800000: 0x40000000, - 0x6800000: 0x80000, - 0x7800000: 0x40080010, - 0x8800000: 0x80010, - 0x9800000: 0x0, - 0xa800000: 0x4000, - 0xb800000: 0x40080000, - 0xc800000: 0x40000010, - 0xd800000: 0x84000, - 0xe800000: 0x40084000, - 0xf800000: 0x4010, - 0x10000000: 0x0, - 0x11000000: 0x40080010, - 0x12000000: 0x40004010, - 0x13000000: 0x40084000, - 0x14000000: 0x40080000, - 0x15000000: 0x10, - 0x16000000: 0x84010, - 0x17000000: 0x4000, - 0x18000000: 0x4010, - 0x19000000: 0x80000, - 0x1a000000: 0x80010, - 0x1b000000: 0x40000010, - 0x1c000000: 0x84000, - 0x1d000000: 0x40004000, - 0x1e000000: 0x40000000, - 0x1f000000: 0x40084010, - 0x10800000: 0x84010, - 0x11800000: 0x80000, - 0x12800000: 0x40080000, - 0x13800000: 0x4000, - 0x14800000: 0x40004000, - 0x15800000: 0x40084010, - 0x16800000: 0x10, - 0x17800000: 0x40000000, - 0x18800000: 0x40084000, - 0x19800000: 0x40000010, - 0x1a800000: 0x40004010, - 0x1b800000: 0x80010, - 0x1c800000: 0x0, - 0x1d800000: 0x4010, - 0x1e800000: 0x40080010, - 0x1f800000: 0x84000 - }, - { - 0x0: 0x104, - 0x100000: 0x0, - 0x200000: 0x4000100, - 0x300000: 0x10104, - 0x400000: 0x10004, - 0x500000: 0x4000004, - 0x600000: 0x4010104, - 0x700000: 0x4010000, - 0x800000: 0x4000000, - 0x900000: 0x4010100, - 0xa00000: 0x10100, - 0xb00000: 0x4010004, - 0xc00000: 0x4000104, - 0xd00000: 0x10000, - 0xe00000: 0x4, - 0xf00000: 0x100, - 0x80000: 0x4010100, - 0x180000: 0x4010004, - 0x280000: 0x0, - 0x380000: 0x4000100, - 0x480000: 0x4000004, - 0x580000: 0x10000, - 0x680000: 0x10004, - 0x780000: 0x104, - 0x880000: 0x4, - 0x980000: 0x100, - 0xa80000: 0x4010000, - 0xb80000: 0x10104, - 0xc80000: 0x10100, - 0xd80000: 0x4000104, - 0xe80000: 0x4010104, - 0xf80000: 0x4000000, - 0x1000000: 0x4010100, - 0x1100000: 0x10004, - 0x1200000: 0x10000, - 0x1300000: 0x4000100, - 0x1400000: 0x100, - 0x1500000: 0x4010104, - 0x1600000: 0x4000004, - 0x1700000: 0x0, - 0x1800000: 0x4000104, - 0x1900000: 0x4000000, - 0x1a00000: 0x4, - 0x1b00000: 0x10100, - 0x1c00000: 0x4010000, - 0x1d00000: 0x104, - 0x1e00000: 0x10104, - 0x1f00000: 0x4010004, - 0x1080000: 0x4000000, - 0x1180000: 0x104, - 0x1280000: 0x4010100, - 0x1380000: 0x0, - 0x1480000: 0x10004, - 0x1580000: 0x4000100, - 0x1680000: 0x100, - 0x1780000: 0x4010004, - 0x1880000: 0x10000, - 0x1980000: 0x4010104, - 0x1a80000: 0x10104, - 0x1b80000: 0x4000004, - 0x1c80000: 0x4000104, - 0x1d80000: 0x4010000, - 0x1e80000: 0x4, - 0x1f80000: 0x10100 - }, - { - 0x0: 0x80401000, - 0x10000: 0x80001040, - 0x20000: 0x401040, - 0x30000: 0x80400000, - 0x40000: 0x0, - 0x50000: 0x401000, - 0x60000: 0x80000040, - 0x70000: 0x400040, - 0x80000: 0x80000000, - 0x90000: 0x400000, - 0xa0000: 0x40, - 0xb0000: 0x80001000, - 0xc0000: 0x80400040, - 0xd0000: 0x1040, - 0xe0000: 0x1000, - 0xf0000: 0x80401040, - 0x8000: 0x80001040, - 0x18000: 0x40, - 0x28000: 0x80400040, - 0x38000: 0x80001000, - 0x48000: 0x401000, - 0x58000: 0x80401040, - 0x68000: 0x0, - 0x78000: 0x80400000, - 0x88000: 0x1000, - 0x98000: 0x80401000, - 0xa8000: 0x400000, - 0xb8000: 0x1040, - 0xc8000: 0x80000000, - 0xd8000: 0x400040, - 0xe8000: 0x401040, - 0xf8000: 0x80000040, - 0x100000: 0x400040, - 0x110000: 0x401000, - 0x120000: 0x80000040, - 0x130000: 0x0, - 0x140000: 0x1040, - 0x150000: 0x80400040, - 0x160000: 0x80401000, - 0x170000: 0x80001040, - 0x180000: 0x80401040, - 0x190000: 0x80000000, - 0x1a0000: 0x80400000, - 0x1b0000: 0x401040, - 0x1c0000: 0x80001000, - 0x1d0000: 0x400000, - 0x1e0000: 0x40, - 0x1f0000: 0x1000, - 0x108000: 0x80400000, - 0x118000: 0x80401040, - 0x128000: 0x0, - 0x138000: 0x401000, - 0x148000: 0x400040, - 0x158000: 0x80000000, - 0x168000: 0x80001040, - 0x178000: 0x40, - 0x188000: 0x80000040, - 0x198000: 0x1000, - 0x1a8000: 0x80001000, - 0x1b8000: 0x80400040, - 0x1c8000: 0x1040, - 0x1d8000: 0x80401000, - 0x1e8000: 0x400000, - 0x1f8000: 0x401040 - }, - { - 0x0: 0x80, - 0x1000: 0x1040000, - 0x2000: 0x40000, - 0x3000: 0x20000000, - 0x4000: 0x20040080, - 0x5000: 0x1000080, - 0x6000: 0x21000080, - 0x7000: 0x40080, - 0x8000: 0x1000000, - 0x9000: 0x20040000, - 0xa000: 0x20000080, - 0xb000: 0x21040080, - 0xc000: 0x21040000, - 0xd000: 0x0, - 0xe000: 0x1040080, - 0xf000: 0x21000000, - 0x800: 0x1040080, - 0x1800: 0x21000080, - 0x2800: 0x80, - 0x3800: 0x1040000, - 0x4800: 0x40000, - 0x5800: 0x20040080, - 0x6800: 0x21040000, - 0x7800: 0x20000000, - 0x8800: 0x20040000, - 0x9800: 0x0, - 0xa800: 0x21040080, - 0xb800: 0x1000080, - 0xc800: 0x20000080, - 0xd800: 0x21000000, - 0xe800: 0x1000000, - 0xf800: 0x40080, - 0x10000: 0x40000, - 0x11000: 0x80, - 0x12000: 0x20000000, - 0x13000: 0x21000080, - 0x14000: 0x1000080, - 0x15000: 0x21040000, - 0x16000: 0x20040080, - 0x17000: 0x1000000, - 0x18000: 0x21040080, - 0x19000: 0x21000000, - 0x1a000: 0x1040000, - 0x1b000: 0x20040000, - 0x1c000: 0x40080, - 0x1d000: 0x20000080, - 0x1e000: 0x0, - 0x1f000: 0x1040080, - 0x10800: 0x21000080, - 0x11800: 0x1000000, - 0x12800: 0x1040000, - 0x13800: 0x20040080, - 0x14800: 0x20000000, - 0x15800: 0x1040080, - 0x16800: 0x80, - 0x17800: 0x21040000, - 0x18800: 0x40080, - 0x19800: 0x21040080, - 0x1a800: 0x0, - 0x1b800: 0x21000000, - 0x1c800: 0x1000080, - 0x1d800: 0x40000, - 0x1e800: 0x20040000, - 0x1f800: 0x20000080 - }, - { - 0x0: 0x10000008, - 0x100: 0x2000, - 0x200: 0x10200000, - 0x300: 0x10202008, - 0x400: 0x10002000, - 0x500: 0x200000, - 0x600: 0x200008, - 0x700: 0x10000000, - 0x800: 0x0, - 0x900: 0x10002008, - 0xa00: 0x202000, - 0xb00: 0x8, - 0xc00: 0x10200008, - 0xd00: 0x202008, - 0xe00: 0x2008, - 0xf00: 0x10202000, - 0x80: 0x10200000, - 0x180: 0x10202008, - 0x280: 0x8, - 0x380: 0x200000, - 0x480: 0x202008, - 0x580: 0x10000008, - 0x680: 0x10002000, - 0x780: 0x2008, - 0x880: 0x200008, - 0x980: 0x2000, - 0xa80: 0x10002008, - 0xb80: 0x10200008, - 0xc80: 0x0, - 0xd80: 0x10202000, - 0xe80: 0x202000, - 0xf80: 0x10000000, - 0x1000: 0x10002000, - 0x1100: 0x10200008, - 0x1200: 0x10202008, - 0x1300: 0x2008, - 0x1400: 0x200000, - 0x1500: 0x10000000, - 0x1600: 0x10000008, - 0x1700: 0x202000, - 0x1800: 0x202008, - 0x1900: 0x0, - 0x1a00: 0x8, - 0x1b00: 0x10200000, - 0x1c00: 0x2000, - 0x1d00: 0x10002008, - 0x1e00: 0x10202000, - 0x1f00: 0x200008, - 0x1080: 0x8, - 0x1180: 0x202000, - 0x1280: 0x200000, - 0x1380: 0x10000008, - 0x1480: 0x10002000, - 0x1580: 0x2008, - 0x1680: 0x10202008, - 0x1780: 0x10200000, - 0x1880: 0x10202000, - 0x1980: 0x10200008, - 0x1a80: 0x2000, - 0x1b80: 0x202008, - 0x1c80: 0x200008, - 0x1d80: 0x0, - 0x1e80: 0x10000000, - 0x1f80: 0x10002008 - }, - { - 0x0: 0x100000, - 0x10: 0x2000401, - 0x20: 0x400, - 0x30: 0x100401, - 0x40: 0x2100401, - 0x50: 0x0, - 0x60: 0x1, - 0x70: 0x2100001, - 0x80: 0x2000400, - 0x90: 0x100001, - 0xa0: 0x2000001, - 0xb0: 0x2100400, - 0xc0: 0x2100000, - 0xd0: 0x401, - 0xe0: 0x100400, - 0xf0: 0x2000000, - 0x8: 0x2100001, - 0x18: 0x0, - 0x28: 0x2000401, - 0x38: 0x2100400, - 0x48: 0x100000, - 0x58: 0x2000001, - 0x68: 0x2000000, - 0x78: 0x401, - 0x88: 0x100401, - 0x98: 0x2000400, - 0xa8: 0x2100000, - 0xb8: 0x100001, - 0xc8: 0x400, - 0xd8: 0x2100401, - 0xe8: 0x1, - 0xf8: 0x100400, - 0x100: 0x2000000, - 0x110: 0x100000, - 0x120: 0x2000401, - 0x130: 0x2100001, - 0x140: 0x100001, - 0x150: 0x2000400, - 0x160: 0x2100400, - 0x170: 0x100401, - 0x180: 0x401, - 0x190: 0x2100401, - 0x1a0: 0x100400, - 0x1b0: 0x1, - 0x1c0: 0x0, - 0x1d0: 0x2100000, - 0x1e0: 0x2000001, - 0x1f0: 0x400, - 0x108: 0x100400, - 0x118: 0x2000401, - 0x128: 0x2100001, - 0x138: 0x1, - 0x148: 0x2000000, - 0x158: 0x100000, - 0x168: 0x401, - 0x178: 0x2100400, - 0x188: 0x2000001, - 0x198: 0x2100000, - 0x1a8: 0x0, - 0x1b8: 0x2100401, - 0x1c8: 0x100401, - 0x1d8: 0x400, - 0x1e8: 0x2000400, - 0x1f8: 0x100001 - }, - { - 0x0: 0x8000820, - 0x1: 0x20000, - 0x2: 0x8000000, - 0x3: 0x20, - 0x4: 0x20020, - 0x5: 0x8020820, - 0x6: 0x8020800, - 0x7: 0x800, - 0x8: 0x8020000, - 0x9: 0x8000800, - 0xa: 0x20800, - 0xb: 0x8020020, - 0xc: 0x820, - 0xd: 0x0, - 0xe: 0x8000020, - 0xf: 0x20820, - 0x80000000: 0x800, - 0x80000001: 0x8020820, - 0x80000002: 0x8000820, - 0x80000003: 0x8000000, - 0x80000004: 0x8020000, - 0x80000005: 0x20800, - 0x80000006: 0x20820, - 0x80000007: 0x20, - 0x80000008: 0x8000020, - 0x80000009: 0x820, - 0x8000000a: 0x20020, - 0x8000000b: 0x8020800, - 0x8000000c: 0x0, - 0x8000000d: 0x8020020, - 0x8000000e: 0x8000800, - 0x8000000f: 0x20000, - 0x10: 0x20820, - 0x11: 0x8020800, - 0x12: 0x20, - 0x13: 0x800, - 0x14: 0x8000800, - 0x15: 0x8000020, - 0x16: 0x8020020, - 0x17: 0x20000, - 0x18: 0x0, - 0x19: 0x20020, - 0x1a: 0x8020000, - 0x1b: 0x8000820, - 0x1c: 0x8020820, - 0x1d: 0x20800, - 0x1e: 0x820, - 0x1f: 0x8000000, - 0x80000010: 0x20000, - 0x80000011: 0x800, - 0x80000012: 0x8020020, - 0x80000013: 0x20820, - 0x80000014: 0x20, - 0x80000015: 0x8020000, - 0x80000016: 0x8000000, - 0x80000017: 0x8000820, - 0x80000018: 0x8020820, - 0x80000019: 0x8000020, - 0x8000001a: 0x8000800, - 0x8000001b: 0x0, - 0x8000001c: 0x20800, - 0x8000001d: 0x820, - 0x8000001e: 0x20020, - 0x8000001f: 0x8020800 - } - ]; - - // Masks that select the SBOX input - var SBOX_MASK = [ - 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, - 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f - ]; - - /** - * DES block cipher algorithm. - */ - var DES = C_algo.DES = BlockCipher.extend({ - _doReset: function () { - // Shortcuts - var key = this._key; - var keyWords = key.words; - - // Select 56 bits according to PC1 - var keyBits = []; - for (var i = 0; i < 56; i++) { - var keyBitPos = PC1[i] - 1; - keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; - } - - // Assemble 16 subkeys - var subKeys = this._subKeys = []; - for (var nSubKey = 0; nSubKey < 16; nSubKey++) { - // Create subkey - var subKey = subKeys[nSubKey] = []; - - // Shortcut - var bitShift = BIT_SHIFTS[nSubKey]; - - // Select 48 bits according to PC2 - for (var i = 0; i < 24; i++) { - // Select from the left 28 key bits - subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); - - // Select from the right 28 key bits - subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); - } - - // Since each subkey is applied to an expanded 32-bit input, - // the subkey can be broken into 8 values scaled to 32-bits, - // which allows the key to be used without expansion - subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); - for (var i = 1; i < 7; i++) { - subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); - } - subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); - } - - // Compute inverse subkeys - var invSubKeys = this._invSubKeys = []; - for (var i = 0; i < 16; i++) { - invSubKeys[i] = subKeys[15 - i]; - } - }, - - encryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._subKeys); - }, - - decryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._invSubKeys); - }, - - _doCryptBlock: function (M, offset, subKeys) { - // Get input - this._lBlock = M[offset]; - this._rBlock = M[offset + 1]; - - // Initial permutation - exchangeLR.call(this, 4, 0x0f0f0f0f); - exchangeLR.call(this, 16, 0x0000ffff); - exchangeRL.call(this, 2, 0x33333333); - exchangeRL.call(this, 8, 0x00ff00ff); - exchangeLR.call(this, 1, 0x55555555); - - // Rounds - for (var round = 0; round < 16; round++) { - // Shortcuts - var subKey = subKeys[round]; - var lBlock = this._lBlock; - var rBlock = this._rBlock; - - // Feistel function - var f = 0; - for (var i = 0; i < 8; i++) { - f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; - } - this._lBlock = rBlock; - this._rBlock = lBlock ^ f; - } - - // Undo swap from last round - var t = this._lBlock; - this._lBlock = this._rBlock; - this._rBlock = t; - - // Final permutation - exchangeLR.call(this, 1, 0x55555555); - exchangeRL.call(this, 8, 0x00ff00ff); - exchangeRL.call(this, 2, 0x33333333); - exchangeLR.call(this, 16, 0x0000ffff); - exchangeLR.call(this, 4, 0x0f0f0f0f); - - // Set output - M[offset] = this._lBlock; - M[offset + 1] = this._rBlock; - }, - - keySize: 64/32, - - ivSize: 64/32, - - blockSize: 64/32 - }); - - // Swap bits across the left and right words - function exchangeLR(offset, mask) { - var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; - this._rBlock ^= t; - this._lBlock ^= t << offset; - } - - function exchangeRL(offset, mask) { - var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; - this._lBlock ^= t; - this._rBlock ^= t << offset; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); - * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); - */ - C.DES = BlockCipher._createHelper(DES); - - /** - * Triple-DES block cipher algorithm. - */ - var TripleDES = C_algo.TripleDES = BlockCipher.extend({ - _doReset: function () { - // Shortcuts - var key = this._key; - var keyWords = key.words; - - // Create DES instances - this._des1 = DES.createEncryptor(WordArray.create(keyWords.slice(0, 2))); - this._des2 = DES.createEncryptor(WordArray.create(keyWords.slice(2, 4))); - this._des3 = DES.createEncryptor(WordArray.create(keyWords.slice(4, 6))); - }, - - encryptBlock: function (M, offset) { - this._des1.encryptBlock(M, offset); - this._des2.decryptBlock(M, offset); - this._des3.encryptBlock(M, offset); - }, - - decryptBlock: function (M, offset) { - this._des3.decryptBlock(M, offset); - this._des2.encryptBlock(M, offset); - this._des1.decryptBlock(M, offset); - }, - - keySize: 192/32, - - ivSize: 64/32, - - blockSize: 64/32 - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); - * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); - */ - C.TripleDES = BlockCipher._createHelper(TripleDES); - }()); - - - return CryptoJS.TripleDES; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/x64-core.js b/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/x64-core.js deleted file mode 100644 index 57dcc14..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/crypto-js/x64-core.js +++ /dev/null @@ -1,304 +0,0 @@ -;(function (root, factory) { - if (typeof exports === "object") { - // CommonJS - module.exports = exports = factory(require("./core")); - } - else if (typeof define === "function" && define.amd) { - // AMD - define(["./core"], factory); - } - else { - // Global (browser) - factory(root.CryptoJS); - } -}(this, function (CryptoJS) { - - (function (undefined) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var X32WordArray = C_lib.WordArray; - - /** - * x64 namespace. - */ - var C_x64 = C.x64 = {}; - - /** - * A 64-bit word. - */ - var X64Word = C_x64.Word = Base.extend({ - /** - * Initializes a newly created 64-bit word. - * - * @param {number} high The high 32 bits. - * @param {number} low The low 32 bits. - * - * @example - * - * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); - */ - init: function (high, low) { - this.high = high; - this.low = low; - } - - /** - * Bitwise NOTs this word. - * - * @return {X64Word} A new x64-Word object after negating. - * - * @example - * - * var negated = x64Word.not(); - */ - // not: function () { - // var high = ~this.high; - // var low = ~this.low; - - // return X64Word.create(high, low); - // }, - - /** - * Bitwise ANDs this word with the passed word. - * - * @param {X64Word} word The x64-Word to AND with this word. - * - * @return {X64Word} A new x64-Word object after ANDing. - * - * @example - * - * var anded = x64Word.and(anotherX64Word); - */ - // and: function (word) { - // var high = this.high & word.high; - // var low = this.low & word.low; - - // return X64Word.create(high, low); - // }, - - /** - * Bitwise ORs this word with the passed word. - * - * @param {X64Word} word The x64-Word to OR with this word. - * - * @return {X64Word} A new x64-Word object after ORing. - * - * @example - * - * var ored = x64Word.or(anotherX64Word); - */ - // or: function (word) { - // var high = this.high | word.high; - // var low = this.low | word.low; - - // return X64Word.create(high, low); - // }, - - /** - * Bitwise XORs this word with the passed word. - * - * @param {X64Word} word The x64-Word to XOR with this word. - * - * @return {X64Word} A new x64-Word object after XORing. - * - * @example - * - * var xored = x64Word.xor(anotherX64Word); - */ - // xor: function (word) { - // var high = this.high ^ word.high; - // var low = this.low ^ word.low; - - // return X64Word.create(high, low); - // }, - - /** - * Shifts this word n bits to the left. - * - * @param {number} n The number of bits to shift. - * - * @return {X64Word} A new x64-Word object after shifting. - * - * @example - * - * var shifted = x64Word.shiftL(25); - */ - // shiftL: function (n) { - // if (n < 32) { - // var high = (this.high << n) | (this.low >>> (32 - n)); - // var low = this.low << n; - // } else { - // var high = this.low << (n - 32); - // var low = 0; - // } - - // return X64Word.create(high, low); - // }, - - /** - * Shifts this word n bits to the right. - * - * @param {number} n The number of bits to shift. - * - * @return {X64Word} A new x64-Word object after shifting. - * - * @example - * - * var shifted = x64Word.shiftR(7); - */ - // shiftR: function (n) { - // if (n < 32) { - // var low = (this.low >>> n) | (this.high << (32 - n)); - // var high = this.high >>> n; - // } else { - // var low = this.high >>> (n - 32); - // var high = 0; - // } - - // return X64Word.create(high, low); - // }, - - /** - * Rotates this word n bits to the left. - * - * @param {number} n The number of bits to rotate. - * - * @return {X64Word} A new x64-Word object after rotating. - * - * @example - * - * var rotated = x64Word.rotL(25); - */ - // rotL: function (n) { - // return this.shiftL(n).or(this.shiftR(64 - n)); - // }, - - /** - * Rotates this word n bits to the right. - * - * @param {number} n The number of bits to rotate. - * - * @return {X64Word} A new x64-Word object after rotating. - * - * @example - * - * var rotated = x64Word.rotR(7); - */ - // rotR: function (n) { - // return this.shiftR(n).or(this.shiftL(64 - n)); - // }, - - /** - * Adds this word with the passed word. - * - * @param {X64Word} word The x64-Word to add with this word. - * - * @return {X64Word} A new x64-Word object after adding. - * - * @example - * - * var added = x64Word.add(anotherX64Word); - */ - // add: function (word) { - // var low = (this.low + word.low) | 0; - // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; - // var high = (this.high + word.high + carry) | 0; - - // return X64Word.create(high, low); - // } - }); - - /** - * An array of 64-bit words. - * - * @property {Array} words The array of CryptoJS.x64.Word objects. - * @property {number} sigBytes The number of significant bytes in this word array. - */ - var X64WordArray = C_x64.WordArray = Base.extend({ - /** - * Initializes a newly created word array. - * - * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. - * @param {number} sigBytes (Optional) The number of significant bytes in the words. - * - * @example - * - * var wordArray = CryptoJS.x64.WordArray.create(); - * - * var wordArray = CryptoJS.x64.WordArray.create([ - * CryptoJS.x64.Word.create(0x00010203, 0x04050607), - * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) - * ]); - * - * var wordArray = CryptoJS.x64.WordArray.create([ - * CryptoJS.x64.Word.create(0x00010203, 0x04050607), - * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) - * ], 10); - */ - init: function (words, sigBytes) { - words = this.words = words || []; - - if (sigBytes != undefined) { - this.sigBytes = sigBytes; - } else { - this.sigBytes = words.length * 8; - } - }, - - /** - * Converts this 64-bit word array to a 32-bit word array. - * - * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. - * - * @example - * - * var x32WordArray = x64WordArray.toX32(); - */ - toX32: function () { - // Shortcuts - var x64Words = this.words; - var x64WordsLength = x64Words.length; - - // Convert - var x32Words = []; - for (var i = 0; i < x64WordsLength; i++) { - var x64Word = x64Words[i]; - x32Words.push(x64Word.high); - x32Words.push(x64Word.low); - } - - return X32WordArray.create(x32Words, this.sigBytes); - }, - - /** - * Creates a copy of this word array. - * - * @return {X64WordArray} The clone. - * - * @example - * - * var clone = x64WordArray.clone(); - */ - clone: function () { - var clone = Base.clone.call(this); - - // Clone "words" array - var words = clone.words = this.words.slice(0); - - // Clone each X64Word object - var wordsLength = words.length; - for (var i = 0; i < wordsLength; i++) { - words[i] = words[i].clone(); - } - - return clone; - } - }); - }()); - - - return CryptoJS; - -})); \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/LICENSE.txt b/s4t-server-node/node_modules/autobahn/node_modules/when/LICENSE.txt deleted file mode 100644 index 09a1063..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -Open Source Initiative OSI - The MIT License - -http://www.opensource.org/licenses/mit-license.php - -Copyright (c) 2011 Brian Cavalier - -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/s4t-server-node/node_modules/autobahn/node_modules/when/README.md b/s4t-server-node/node_modules/autobahn/node_modules/when/README.md deleted file mode 100644 index 6183602..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/README.md +++ /dev/null @@ -1,105 +0,0 @@ -Promises/A+ logo - -[![Build Status](https://travis-ci.org/cujojs/when.svg?branch=master)](https://travis-ci.org/cujojs/when) - -when.js -======= - -When.js is a rock solid, battle-tested [Promises/A+](http://promises-aplus.github.com/promises-spec) and `when()` implementation, including a complete [ES6 Promise shim](docs/es6-promise-shim.md). It's a powerful combination of small size, high performance, debuggability, and rich features: - -* Resolve arrays and hashes of promises, as well as infinite promise sequences -* Execute tasks in parallel or sequentially -* Transform Node-style and other callback-based APIs into promise-based APIs - -When.js is one of the many stand-alone components of [cujoJS](http://cujojs.com), the JavaScript Architectural Toolkit. - -Check it out: - -- [What's new](CHANGES.md) -- [API docs](docs/api.md#api) -- Read more about how [promises simplify async programming](http://know.cujojs.com/tutorials/async/simplifying-async-with-promises) - -Installation ------------- - -#### AMD - -Availble as `when` through [bower](http://bower.io), or just clone the repo and load `when.js` from the root. - -``` -bower install --save when -``` - -#### CommonJS/Node - -``` -npm install --save when -``` - -[More help & other environments »](docs/installation.md) - -Usage ------ - -Promises can be used to help manage complex and/or nested callback flows in a simple manner. To get a better handle on how promise flows look and how they can be helpful, there are a couple examples below (using commonjs). - -This first example will print `"hello world!!!!"` if all went well, or `"drat!"` if there was a problem. It also uses [rest](https://github.com/cujojs/rest) to make an ajax request to a (fictional) external service. - -```js -var rest = require('rest'); - -fetchRemoteGreeting() - .then(addExclamation) - .catch(handleError) - .done(function(greeting) { - console.log(greeting); - }); - -function fetchRemoteGreeting() { - // returns a when.js promise for 'hello world' - return rest('http://example.com/greeting'); -} - -function addExclamation(greeting) { - return greeting + '!!!!' -} - -function handleError(e) { - return 'drat!'; -} -``` - -The second example shows off the power that comes with when's promise logic. Here, we get an array of numbers from a remote source and reduce them. The example will print `150` if all went well, and if there was a problem will print a full stack trace. - -```js -var when = require('when'); -var rest = require('rest'); - -when.reduce(when.map(getRemoteNumberList(), times10), sum) - .done(function(result) { - console.log(result); - }); - -function getRemoteNumberList() { - // Get a remote array [1, 2, 3, 4, 5] - return rest('http://example.com/numbers').then(JSON.parse); -} - -function sum(x, y) { return x + y; } -function times10(x) {return x * 10; } -``` - -License -------- - -Licensed under MIT. [Full license here »](LICENSE.txt) - -Contributing ------------- - -Please see the [contributing guide](CONTRIBUTING.md) for more information on running tests, opening issues, and contributing code to the project. - -References ----------- - -Much of this code was inspired by the async innards of [wire.js](https://github.com/cujojs/wire), and has been influenced by the great work in [Q](https://github.com/kriskowal/q), [Dojo's Deferred](https://github.com/dojo/dojo), and [uber.js](https://github.com/phiggins42/uber.js). diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/callbacks.js b/s4t-server-node/node_modules/autobahn/node_modules/when/callbacks.js deleted file mode 100644 index 00e414b..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/callbacks.js +++ /dev/null @@ -1,262 +0,0 @@ -/** @license MIT License (c) copyright 2013-2014 original author or authors */ - -/** - * Collection of helper functions for interacting with 'traditional', - * callback-taking functions using a promise interface. - * - * @author Renato Zannon - * @contributor Brian Cavalier - */ - -(function(define) { -define(function(require) { - - var when = require('./when'); - var Promise = when.Promise; - var _liftAll = require('./lib/liftAll'); - var slice = Array.prototype.slice; - - var makeApply = require('./lib/apply'); - var _apply = makeApply(Promise, dispatch); - - return { - lift: lift, - liftAll: liftAll, - apply: apply, - call: call, - promisify: promisify - }; - - /** - * Takes a `traditional` callback-taking function and returns a promise for its - * result, accepting an optional array of arguments (that might be values or - * promises). It assumes that the function takes its callback and errback as - * the last two arguments. The resolution of the promise depends on whether the - * function will call its callback or its errback. - * - * @example - * var domIsLoaded = callbacks.apply($); - * domIsLoaded.then(function() { - * doMyDomStuff(); - * }); - * - * @example - * function existingAjaxyFunction(url, callback, errback) { - * // Complex logic you'd rather not change - * } - * - * var promise = callbacks.apply(existingAjaxyFunction, ["/movies.json"]); - * - * promise.then(function(movies) { - * // Work with movies - * }, function(reason) { - * // Handle error - * }); - * - * @param {function} asyncFunction function to be called - * @param {Array} [extraAsyncArgs] array of arguments to asyncFunction - * @returns {Promise} promise for the callback value of asyncFunction - */ - function apply(asyncFunction, extraAsyncArgs) { - return _apply(asyncFunction, this, extraAsyncArgs || []); - } - - /** - * Apply helper that allows specifying thisArg - * @private - */ - function dispatch(f, thisArg, args, h) { - args.push(alwaysUnary(h.resolve, h), alwaysUnary(h.reject, h)); - tryCatchResolve(f, thisArg, args, h); - } - - function tryCatchResolve(f, thisArg, args, resolver) { - try { - f.apply(thisArg, args); - } catch(e) { - resolver.reject(e); - } - } - - /** - * Works as `callbacks.apply` does, with the difference that the arguments to - * the function are passed individually, instead of as an array. - * - * @example - * function sumInFiveSeconds(a, b, callback) { - * setTimeout(function() { - * callback(a + b); - * }, 5000); - * } - * - * var sumPromise = callbacks.call(sumInFiveSeconds, 5, 10); - * - * // Logs '15' 5 seconds later - * sumPromise.then(console.log); - * - * @param {function} asyncFunction function to be called - * @param {...*} args arguments that will be forwarded to the function - * @returns {Promise} promise for the callback value of asyncFunction - */ - function call(asyncFunction/*, arg1, arg2...*/) { - return _apply(asyncFunction, this, slice.call(arguments, 1)); - } - - /** - * Takes a 'traditional' callback/errback-taking function and returns a function - * that returns a promise instead. The resolution/rejection of the promise - * depends on whether the original function will call its callback or its - * errback. - * - * If additional arguments are passed to the `lift` call, they will be prepended - * on the calls to the original function, much like `Function.prototype.bind`. - * - * The resulting function is also "promise-aware", in the sense that, if given - * promises as arguments, it will wait for their resolution before executing. - * - * @example - * function traditionalAjax(method, url, callback, errback) { - * var xhr = new XMLHttpRequest(); - * xhr.open(method, url); - * - * xhr.onload = callback; - * xhr.onerror = errback; - * - * xhr.send(); - * } - * - * var promiseAjax = callbacks.lift(traditionalAjax); - * promiseAjax("GET", "/movies.json").then(console.log, console.error); - * - * var promiseAjaxGet = callbacks.lift(traditionalAjax, "GET"); - * promiseAjaxGet("/movies.json").then(console.log, console.error); - * - * @param {Function} f traditional async function to be decorated - * @param {...*} [args] arguments to be prepended for the new function @deprecated - * @returns {Function} a promise-returning function - */ - function lift(f/*, args...*/) { - var args = arguments.length > 1 ? slice.call(arguments, 1) : []; - return function() { - return _apply(f, this, args.concat(slice.call(arguments))); - }; - } - - /** - * Lift all the functions/methods on src - * @param {object|function} src source whose functions will be lifted - * @param {function?} combine optional function for customizing the lifting - * process. It is passed dst, the lifted function, and the property name of - * the original function on src. - * @param {(object|function)?} dst option destination host onto which to place lifted - * functions. If not provided, liftAll returns a new object. - * @returns {*} If dst is provided, returns dst with lifted functions as - * properties. If dst not provided, returns a new object with lifted functions. - */ - function liftAll(src, combine, dst) { - return _liftAll(lift, combine, dst, src); - } - - /** - * `promisify` is a version of `lift` that allows fine-grained control over the - * arguments that passed to the underlying function. It is intended to handle - * functions that don't follow the common callback and errback positions. - * - * The control is done by passing an object whose 'callback' and/or 'errback' - * keys, whose values are the corresponding 0-based indexes of the arguments on - * the function. Negative values are interpreted as being relative to the end - * of the arguments array. - * - * If arguments are given on the call to the 'promisified' function, they are - * intermingled with the callback and errback. If a promise is given among them, - * the execution of the function will only occur after its resolution. - * - * @example - * var delay = callbacks.promisify(setTimeout, { - * callback: 0 - * }); - * - * delay(100).then(function() { - * console.log("This happens 100ms afterwards"); - * }); - * - * @example - * function callbackAsLast(errback, followsStandards, callback) { - * if(followsStandards) { - * callback("well done!"); - * } else { - * errback("some programmers just want to watch the world burn"); - * } - * } - * - * var promisified = callbacks.promisify(callbackAsLast, { - * callback: -1, - * errback: 0, - * }); - * - * promisified(true).then(console.log, console.error); - * promisified(false).then(console.log, console.error); - * - * @param {Function} asyncFunction traditional function to be decorated - * @param {object} positions - * @param {number} [positions.callback] index at which asyncFunction expects to - * receive a success callback - * @param {number} [positions.errback] index at which asyncFunction expects to - * receive an error callback - * @returns {function} promisified function that accepts - * - * @deprecated - */ - function promisify(asyncFunction, positions) { - - return function() { - var thisArg = this; - return Promise.all(arguments).then(function(args) { - var p = Promise._defer(); - - var callbackPos, errbackPos; - - if(typeof positions.callback === 'number') { - callbackPos = normalizePosition(args, positions.callback); - } - - if(typeof positions.errback === 'number') { - errbackPos = normalizePosition(args, positions.errback); - } - - if(errbackPos < callbackPos) { - insertCallback(args, errbackPos, p._handler.reject, p._handler); - insertCallback(args, callbackPos, p._handler.resolve, p._handler); - } else { - insertCallback(args, callbackPos, p._handler.resolve, p._handler); - insertCallback(args, errbackPos, p._handler.reject, p._handler); - } - - asyncFunction.apply(thisArg, args); - - return p; - }); - }; - } - - function normalizePosition(args, pos) { - return pos < 0 ? (args.length + pos + 2) : pos; - } - - function insertCallback(args, pos, callback, thisArg) { - if(typeof pos === 'number') { - args.splice(pos, 0, alwaysUnary(callback, thisArg)); - } - } - - function alwaysUnary(fn, thisArg) { - return function() { - if (arguments.length > 1) { - fn.call(thisArg, slice.call(arguments)); - } else { - fn.apply(thisArg, arguments); - } - }; - } -}); -})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); }); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/cancelable.js b/s4t-server-node/node_modules/autobahn/node_modules/when/cancelable.js deleted file mode 100644 index 7a4d08f..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/cancelable.js +++ /dev/null @@ -1,54 +0,0 @@ -/** @license MIT License (c) copyright B Cavalier & J Hann */ - -/** - * cancelable.js - * @deprecated - * - * Decorator that makes a deferred "cancelable". It adds a cancel() method that - * will call a special cancel handler function and then reject the deferred. The - * cancel handler can be used to do resource cleanup, or anything else that should - * be done before any other rejection handlers are executed. - * - * Usage: - * - * var cancelableDeferred = cancelable(when.defer(), myCancelHandler); - * - * @author brian@hovercraftstudios.com - */ - -(function(define) { -define(function() { - - /** - * Makes deferred cancelable, adding a cancel() method. - * @deprecated - * - * @param deferred {Deferred} the {@link Deferred} to make cancelable - * @param canceler {Function} cancel handler function to execute when this deferred - * is canceled. This is guaranteed to run before all other rejection handlers. - * The canceler will NOT be executed if the deferred is rejected in the standard - * way, i.e. deferred.reject(). It ONLY executes if the deferred is canceled, - * i.e. deferred.cancel() - * - * @returns deferred, with an added cancel() method. - */ - return function(deferred, canceler) { - // Add a cancel method to the deferred to reject the delegate - // with the special canceled indicator. - deferred.cancel = function() { - try { - deferred.reject(canceler(deferred)); - } catch(e) { - deferred.reject(e); - } - - return deferred.promise; - }; - - return deferred; - }; - -}); -})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(); }); - - diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/delay.js b/s4t-server-node/node_modules/autobahn/node_modules/when/delay.js deleted file mode 100644 index 20d77bf..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/delay.js +++ /dev/null @@ -1,27 +0,0 @@ -/** @license MIT License (c) copyright 2011-2013 original author or authors */ - -/** - * delay.js - * - * Helper that returns a promise that resolves after a delay. - * - * @author Brian Cavalier - * @author John Hann - */ - -(function(define) { -define(function(require) { - - var when = require('./when'); - - /** - * @deprecated Use when(value).delay(ms) - */ - return function delay(msec, value) { - return when(value).delay(msec); - }; - -}); -})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); }); - - diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/es6-shim/Promise.browserify-es6.js b/s4t-server-node/node_modules/autobahn/node_modules/when/es6-shim/Promise.browserify-es6.js deleted file mode 100644 index 751208f..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/es6-shim/Promise.browserify-es6.js +++ /dev/null @@ -1,13 +0,0 @@ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -/** - * ES6 global Promise shim - */ -var unhandledRejections = require('../lib/decorators/unhandledRejection'); -var PromiseConstructor = unhandledRejections(require('../lib/Promise')); - -module.exports = typeof global != 'undefined' ? (global.Promise = PromiseConstructor) - : typeof self != 'undefined' ? (self.Promise = PromiseConstructor) - : PromiseConstructor; diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/es6-shim/Promise.js b/s4t-server-node/node_modules/autobahn/node_modules/when/es6-shim/Promise.js deleted file mode 100644 index 0c33e81..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/es6-shim/Promise.js +++ /dev/null @@ -1,1225 +0,0 @@ -!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.Promise=e():"undefined"!=typeof global?global.Promise=e():"undefined"!=typeof self&&(self.Promise=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0) { - reported.splice(i, 1); - logInfo('Handled previous rejection [' + r.id + '] ' + format.formatObject(r.value)); - } - } - - function enqueue(f, x) { - tasks.push(f, x); - if(running === null) { - running = setTimer(flush, 0); - } - } - - function flush() { - running = null; - while(tasks.length > 0) { - tasks.shift()(tasks.shift()); - } - } - - return Promise; - }; - - function throwit(e) { - throw e; - } - - function noop() {} - -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); })); - -},{"../env":5,"../format":6}],5:[function(require,module,exports){ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -/*global process,document,setTimeout,clearTimeout,MutationObserver,WebKitMutationObserver*/ -(function(define) { 'use strict'; -define(function(require) { - /*jshint maxcomplexity:6*/ - - // Sniff "best" async scheduling option - // Prefer process.nextTick or MutationObserver, then check for - // setTimeout, and finally vertx, since its the only env that doesn't - // have setTimeout - - var MutationObs; - var capturedSetTimeout = typeof setTimeout !== 'undefined' && setTimeout; - - // Default env - var setTimer = function(f, ms) { return setTimeout(f, ms); }; - var clearTimer = function(t) { return clearTimeout(t); }; - var asap = function (f) { return capturedSetTimeout(f, 0); }; - - // Detect specific env - if (isNode()) { // Node - asap = function (f) { return process.nextTick(f); }; - - } else if (MutationObs = hasMutationObserver()) { // Modern browser - asap = initMutationObserver(MutationObs); - - } else if (!capturedSetTimeout) { // vert.x - var vertxRequire = require; - var vertx = vertxRequire('vertx'); - setTimer = function (f, ms) { return vertx.setTimer(ms, f); }; - clearTimer = vertx.cancelTimer; - asap = vertx.runOnLoop || vertx.runOnContext; - } - - return { - setTimer: setTimer, - clearTimer: clearTimer, - asap: asap - }; - - function isNode () { - return typeof process !== 'undefined' && process !== null && - typeof process.nextTick === 'function'; - } - - function hasMutationObserver () { - return (typeof MutationObserver === 'function' && MutationObserver) || - (typeof WebKitMutationObserver === 'function' && WebKitMutationObserver); - } - - function initMutationObserver(MutationObserver) { - var scheduled; - var node = document.createTextNode(''); - var o = new MutationObserver(run); - o.observe(node, { characterData: true }); - - function run() { - var f = scheduled; - scheduled = void 0; - f(); - } - - var i = 0; - return function (f) { - scheduled = f; - node.data = (i ^= 1); - }; - } -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); })); - -},{}],6:[function(require,module,exports){ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -define(function() { - - return { - formatError: formatError, - formatObject: formatObject, - tryStringify: tryStringify - }; - - /** - * Format an error into a string. If e is an Error and has a stack property, - * it's returned. Otherwise, e is formatted using formatObject, with a - * warning added about e not being a proper Error. - * @param {*} e - * @returns {String} formatted string, suitable for output to developers - */ - function formatError(e) { - var s = typeof e === 'object' && e !== null && e.stack ? e.stack : formatObject(e); - return e instanceof Error ? s : s + ' (WARNING: non-Error used)'; - } - - /** - * Format an object, detecting "plain" objects and running them through - * JSON.stringify if possible. - * @param {Object} o - * @returns {string} - */ - function formatObject(o) { - var s = String(o); - if(s === '[object Object]' && typeof JSON !== 'undefined') { - s = tryStringify(o, s); - } - return s; - } - - /** - * Try to return the result of JSON.stringify(x). If that fails, return - * defaultValue - * @param {*} x - * @param {*} defaultValue - * @returns {String|*} JSON.stringify(x) or defaultValue - */ - function tryStringify(x, defaultValue) { - try { - return JSON.stringify(x); - } catch(e) { - return defaultValue; - } - } - -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); })); - -},{}],7:[function(require,module,exports){ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -define(function() { - - return function makePromise(environment) { - - var tasks = environment.scheduler; - - var objectCreate = Object.create || - function(proto) { - function Child() {} - Child.prototype = proto; - return new Child(); - }; - - /** - * Create a promise whose fate is determined by resolver - * @constructor - * @returns {Promise} promise - * @name Promise - */ - function Promise(resolver, handler) { - this._handler = resolver === Handler ? handler : init(resolver); - } - - /** - * Run the supplied resolver - * @param resolver - * @returns {Pending} - */ - function init(resolver) { - var handler = new Pending(); - - try { - resolver(promiseResolve, promiseReject, promiseNotify); - } catch (e) { - promiseReject(e); - } - - return handler; - - /** - * Transition from pre-resolution state to post-resolution state, notifying - * all listeners of the ultimate fulfillment or rejection - * @param {*} x resolution value - */ - function promiseResolve (x) { - handler.resolve(x); - } - /** - * Reject this promise with reason, which will be used verbatim - * @param {Error|*} reason rejection reason, strongly suggested - * to be an Error type - */ - function promiseReject (reason) { - handler.reject(reason); - } - - /** - * @deprecated - * Issue a progress event, notifying all progress listeners - * @param {*} x progress event payload to pass to all listeners - */ - function promiseNotify (x) { - handler.notify(x); - } - } - - // Creation - - Promise.resolve = resolve; - Promise.reject = reject; - Promise.never = never; - - Promise._defer = defer; - Promise._handler = getHandler; - - /** - * Returns a trusted promise. If x is already a trusted promise, it is - * returned, otherwise returns a new trusted Promise which follows x. - * @param {*} x - * @return {Promise} promise - */ - function resolve(x) { - return isPromise(x) ? x - : new Promise(Handler, new Async(getHandler(x))); - } - - /** - * Return a reject promise with x as its reason (x is used verbatim) - * @param {*} x - * @returns {Promise} rejected promise - */ - function reject(x) { - return new Promise(Handler, new Async(new Rejected(x))); - } - - /** - * Return a promise that remains pending forever - * @returns {Promise} forever-pending promise. - */ - function never() { - return foreverPendingPromise; // Should be frozen - } - - /** - * Creates an internal {promise, resolver} pair - * @private - * @returns {Promise} - */ - function defer() { - return new Promise(Handler, new Pending()); - } - - // Transformation and flow control - - /** - * Transform this promise's fulfillment value, returning a new Promise - * for the transformed result. If the promise cannot be fulfilled, onRejected - * is called with the reason. onProgress *may* be called with updates toward - * this promise's fulfillment. - * @param {function=} onFulfilled fulfillment handler - * @param {function=} onRejected rejection handler - * @param {function=} onProgress @deprecated progress handler - * @return {Promise} new promise - */ - Promise.prototype.then = function(onFulfilled, onRejected, onProgress) { - var parent = this._handler; - var state = parent.join().state(); - - if ((typeof onFulfilled !== 'function' && state > 0) || - (typeof onRejected !== 'function' && state < 0)) { - // Short circuit: value will not change, simply share handler - return new this.constructor(Handler, parent); - } - - var p = this._beget(); - var child = p._handler; - - parent.chain(child, parent.receiver, onFulfilled, onRejected, onProgress); - - return p; - }; - - /** - * If this promise cannot be fulfilled due to an error, call onRejected to - * handle the error. Shortcut for .then(undefined, onRejected) - * @param {function?} onRejected - * @return {Promise} - */ - Promise.prototype['catch'] = function(onRejected) { - return this.then(void 0, onRejected); - }; - - /** - * Creates a new, pending promise of the same type as this promise - * @private - * @returns {Promise} - */ - Promise.prototype._beget = function() { - return begetFrom(this._handler, this.constructor); - }; - - function begetFrom(parent, Promise) { - var child = new Pending(parent.receiver, parent.join().context); - return new Promise(Handler, child); - } - - // Array combinators - - Promise.all = all; - Promise.race = race; - Promise._traverse = traverse; - - /** - * Return a promise that will fulfill when all promises in the - * input array have fulfilled, or will reject when one of the - * promises rejects. - * @param {array} promises array of promises - * @returns {Promise} promise for array of fulfillment values - */ - function all(promises) { - return traverseWith(snd, null, promises); - } - - /** - * Array> -> Promise> - * @private - * @param {function} f function to apply to each promise's value - * @param {Array} promises array of promises - * @returns {Promise} promise for transformed values - */ - function traverse(f, promises) { - return traverseWith(tryCatch2, f, promises); - } - - function traverseWith(tryMap, f, promises) { - var handler = typeof f === 'function' ? mapAt : settleAt; - - var resolver = new Pending(); - var pending = promises.length >>> 0; - var results = new Array(pending); - - for (var i = 0, x; i < promises.length && !resolver.resolved; ++i) { - x = promises[i]; - - if (x === void 0 && !(i in promises)) { - --pending; - continue; - } - - traverseAt(promises, handler, i, x, resolver); - } - - if(pending === 0) { - resolver.become(new Fulfilled(results)); - } - - return new Promise(Handler, resolver); - - function mapAt(i, x, resolver) { - if(!resolver.resolved) { - traverseAt(promises, settleAt, i, tryMap(f, x, i), resolver); - } - } - - function settleAt(i, x, resolver) { - results[i] = x; - if(--pending === 0) { - resolver.become(new Fulfilled(results)); - } - } - } - - function traverseAt(promises, handler, i, x, resolver) { - if (maybeThenable(x)) { - var h = getHandlerMaybeThenable(x); - var s = h.state(); - - if (s === 0) { - h.fold(handler, i, void 0, resolver); - } else if (s > 0) { - handler(i, h.value, resolver); - } else { - resolver.become(h); - visitRemaining(promises, i+1, h); - } - } else { - handler(i, x, resolver); - } - } - - Promise._visitRemaining = visitRemaining; - function visitRemaining(promises, start, handler) { - for(var i=start; i 1 ? slice.call(arguments, 1) : []; - return function() { - return _apply(f, this, args.concat(slice.call(arguments))); - }; - } - - /** - * Lift all the functions/methods on src - * @param {object|function} src source whose functions will be lifted - * @param {function?} combine optional function for customizing the lifting - * process. It is passed dst, the lifted function, and the property name of - * the original function on src. - * @param {(object|function)?} dst option destination host onto which to place lifted - * functions. If not provided, liftAll returns a new object. - * @returns {*} If dst is provided, returns dst with lifted functions as - * properties. If dst not provided, returns a new object with lifted functions. - */ - function liftAll(src, combine, dst) { - return _liftAll(lift, combine, dst, src); - } - - /** - * Composes multiple functions by piping their return values. It is - * transparent to whether the functions return 'regular' values or promises: - * the piped argument is always a resolved value. If one of the functions - * throws or returns a rejected promise, the composed promise will be also - * rejected. - * - * The arguments (or promises to arguments) given to the returned function (if - * any), are passed directly to the first function on the 'pipeline'. - * @param {Function} f the function to which the arguments will be passed - * @param {...Function} [funcs] functions that will be composed, in order - * @returns {Function} a promise-returning composition of the functions - */ - function compose(f /*, funcs... */) { - var funcs = slice.call(arguments, 1); - - return function() { - var thisArg = this; - var args = slice.call(arguments); - var firstPromise = attempt.apply(thisArg, [f].concat(args)); - - return when.reduce(funcs, function(arg, func) { - return func.call(thisArg, arg); - }, firstPromise); - }; - } -}); -})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); }); - - diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/generator.js b/s4t-server-node/node_modules/autobahn/node_modules/when/generator.js deleted file mode 100644 index e0381f0..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/generator.js +++ /dev/null @@ -1,105 +0,0 @@ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -define(function(require) { - - var when = require('./when'); - var slice = Array.prototype.slice; - var Promise = when.Promise; - var reject = Promise.reject; - - /** - * Lift a generator to create a function that can suspend and - * resume using the `yield` keyword to await promises. - * @param {function} generator - * @return {function} - */ - function lift(generator) { - return function() { - return run(generator, this, arguments); - }; - } - - /** - * Immediately call a generator as a promise-aware coroutine - * that can suspend and resume using the `yield` keyword to - * await promises. Additional arguments after the first will - * be passed through to the generator. - * @param {function} generator - * @returns {Promise} promise for the ultimate value returned - * from the generator. - */ - function call(generator /*x, y, z...*/) { - /*jshint validthis:true*/ - return run(generator, this, slice.call(arguments, 1)); - } - - /** - * Immediately apply a generator, with the supplied args array, - * as a promise-aware coroutine that can suspend and resume - * using the `yield` keyword to await promises. - * @param {function} generator - * @param {Array} args arguments with which to initialize the generator - * @returns {Promise} promise for the ultimate value returned - * from the generator. - */ - function apply(generator, args) { - /*jshint validthis:true*/ - return run(generator, this, args || []); - } - - /** - * Helper to initiate the provided generator as a coroutine - * @returns {*} - */ - function run(generator, thisArg, args) { - return runNext(void 0, generator.apply(thisArg, args)); - } - - function runNext(x, iterator) { - try { - return handle(iterator.next(x), iterator); - } catch(e) { - return reject(e); - } - } - - function next(x) { - /*jshint validthis:true*/ - return runNext(x, this); - } - - function error(e) { - /*jshint validthis:true*/ - try { - return handle(this.throw(e), this); - } catch(e) { - return reject(e); - } - } - - function handle(result, iterator) { - if(result.done) { - return result.value; - } - - var h = Promise._handler(result.value); - if(h.state() > 0) { - return runNext(h.value, iterator); - } - - var p = Promise._defer(); - h.chain(p._handler, iterator, next, error); - return p; - } - - return { - lift: lift, - call: call, - apply: apply - }; - -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); })); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/guard.js b/s4t-server-node/node_modules/autobahn/node_modules/when/guard.js deleted file mode 100644 index 38924ca..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/guard.js +++ /dev/null @@ -1,72 +0,0 @@ -/** @license MIT License (c) copyright 2011-2013 original author or authors */ - -/** - * Generalized promise concurrency guard - * Adapted from original concept by Sakari Jokinen (Rocket Pack, Ltd.) - * - * @author Brian Cavalier - * @author John Hann - * @contributor Sakari Jokinen - */ -(function(define) { -define(function(require) { - - var when = require('./when'); - var slice = Array.prototype.slice; - - guard.n = n; - - return guard; - - /** - * Creates a guarded version of f that can only be entered when the supplied - * condition allows. - * @param {function} condition represents a critical section that may only - * be entered when allowed by the condition - * @param {function} f function to guard - * @returns {function} guarded version of f - */ - function guard(condition, f) { - return function() { - var args = slice.call(arguments); - - return when(condition()).withThis(this).then(function(exit) { - return when(f.apply(this, args))['finally'](exit); - }); - }; - } - - /** - * Creates a condition that allows only n simultaneous executions - * of a guarded function - * @param {number} allowed number of allowed simultaneous executions - * @returns {function} condition function which returns a promise that - * fulfills when the critical section may be entered. The fulfillment - * value is a function ("notifyExit") that must be called when the critical - * section has been exited. - */ - function n(allowed) { - var count = 0; - var waiting = []; - - return function enter() { - return when.promise(function(resolve) { - if(count < allowed) { - resolve(exit); - } else { - waiting.push(resolve); - } - count += 1; - }); - }; - - function exit() { - count = Math.max(count - 1, 0); - if(waiting.length > 0) { - waiting.shift()(exit); - } - } - } - -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); })); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/keys.js b/s4t-server-node/node_modules/autobahn/node_modules/when/keys.js deleted file mode 100644 index 9bca604..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/keys.js +++ /dev/null @@ -1,80 +0,0 @@ -/** @license MIT License (c) copyright 2011-2013 original author or authors */ - -/** - * Licensed under the MIT License at: - * http://www.opensource.org/licenses/mit-license.php - * - * @author Brian Cavalier - * @author John Hann - */ -(function(define) { 'use strict'; -define(function(require) { - - var when = require('./when'); - var Promise = when.Promise; - var toPromise = when.resolve; - - return { - all: when.lift(all), - map: map - }; - - /** - * Resolve all the key-value pairs in the supplied object or promise - * for an object. - * @param {Promise|object} object or promise for object whose key-value pairs - * will be resolved - * @returns {Promise} promise for an object with the fully resolved key-value pairs - */ - function all(object) { - var p = Promise._defer(); - var resolver = Promise._handler(p); - - var results = {}; - var keys = Object.keys(object); - var pending = keys.length; - - for(var i=0, k; i>>0; - - var pending = l; - var errors = []; - - for (var h, x, i = 0; i < l; ++i) { - x = promises[i]; - if(x === void 0 && !(i in promises)) { - --pending; - continue; - } - - h = Promise._handler(x); - if(h.state() > 0) { - resolver.become(h); - Promise._visitRemaining(promises, i, h); - break; - } else { - h.visit(resolver, handleFulfill, handleReject); - } - } - - if(pending === 0) { - resolver.reject(new RangeError('any(): array must not be empty')); - } - - return p; - - function handleFulfill(x) { - /*jshint validthis:true*/ - errors = null; - this.resolve(x); // this === resolver - } - - function handleReject(e) { - /*jshint validthis:true*/ - if(this.resolved) { // this === resolver - return; - } - - errors.push(e); - if(--pending === 0) { - this.reject(errors); - } - } - } - - /** - * N-winner competitive race - * Return a promise that will fulfill when n input promises have - * fulfilled, or will reject when it becomes impossible for n - * input promises to fulfill (ie when promises.length - n + 1 - * have rejected) - * @param {array} promises - * @param {number} n - * @returns {Promise} promise for the earliest n fulfillment values - * - * @deprecated - */ - function some(promises, n) { - /*jshint maxcomplexity:7*/ - var p = Promise._defer(); - var resolver = p._handler; - - var results = []; - var errors = []; - - var l = promises.length>>>0; - var nFulfill = 0; - var nReject; - var x, i; // reused in both for() loops - - // First pass: count actual array items - for(i=0; i nFulfill) { - resolver.reject(new RangeError('some(): array must contain at least ' - + n + ' item(s), but had ' + nFulfill)); - } else if(nFulfill === 0) { - resolver.resolve(results); - } - - // Second pass: observe each array item, make progress toward goals - for(i=0; i 2 ? ar.call(promises, liftCombine(f), arguments[2]) - : ar.call(promises, liftCombine(f)); - } - - /** - * Traditional reduce function, similar to `Array.prototype.reduceRight()`, but - * input may contain promises and/or values, and reduceFunc - * may return either a value or a promise, *and* initialValue may - * be a promise for the starting value. - * @param {Array|Promise} promises array or promise for an array of anything, - * may contain a mix of promises and values. - * @param {function(accumulated:*, x:*, index:Number):*} f reduce function - * @returns {Promise} that will resolve to the final reduced value - */ - function reduceRight(promises, f /*, initialValue */) { - return arguments.length > 2 ? arr.call(promises, liftCombine(f), arguments[2]) - : arr.call(promises, liftCombine(f)); - } - - function liftCombine(f) { - return function(z, x, i) { - return applyFold(f, void 0, [z,x,i]); - }; - } - }; - -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); })); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/flow.js b/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/flow.js deleted file mode 100644 index 635e4f4..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/flow.js +++ /dev/null @@ -1,160 +0,0 @@ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -define(function() { - - return function flow(Promise) { - - var resolve = Promise.resolve; - var reject = Promise.reject; - var origCatch = Promise.prototype['catch']; - - /** - * Handle the ultimate fulfillment value or rejection reason, and assume - * responsibility for all errors. If an error propagates out of result - * or handleFatalError, it will be rethrown to the host, resulting in a - * loud stack track on most platforms and a crash on some. - * @param {function?} onResult - * @param {function?} onError - * @returns {undefined} - */ - Promise.prototype.done = function(onResult, onError) { - this._handler.visit(this._handler.receiver, onResult, onError); - }; - - /** - * Add Error-type and predicate matching to catch. Examples: - * promise.catch(TypeError, handleTypeError) - * .catch(predicate, handleMatchedErrors) - * .catch(handleRemainingErrors) - * @param onRejected - * @returns {*} - */ - Promise.prototype['catch'] = Promise.prototype.otherwise = function(onRejected) { - if (arguments.length < 2) { - return origCatch.call(this, onRejected); - } - - if(typeof onRejected !== 'function') { - return this.ensure(rejectInvalidPredicate); - } - - return origCatch.call(this, createCatchFilter(arguments[1], onRejected)); - }; - - /** - * Wraps the provided catch handler, so that it will only be called - * if the predicate evaluates truthy - * @param {?function} handler - * @param {function} predicate - * @returns {function} conditional catch handler - */ - function createCatchFilter(handler, predicate) { - return function(e) { - return evaluatePredicate(e, predicate) - ? handler.call(this, e) - : reject(e); - }; - } - - /** - * Ensures that onFulfilledOrRejected will be called regardless of whether - * this promise is fulfilled or rejected. onFulfilledOrRejected WILL NOT - * receive the promises' value or reason. Any returned value will be disregarded. - * onFulfilledOrRejected may throw or return a rejected promise to signal - * an additional error. - * @param {function} handler handler to be called regardless of - * fulfillment or rejection - * @returns {Promise} - */ - Promise.prototype['finally'] = Promise.prototype.ensure = function(handler) { - if(typeof handler !== 'function') { - return this; - } - - return this.then(function(x) { - return runSideEffect(handler, this, identity, x); - }, function(e) { - return runSideEffect(handler, this, reject, e); - }); - }; - - function runSideEffect (handler, thisArg, propagate, value) { - var result = handler.call(thisArg); - return maybeThenable(result) - ? propagateValue(result, propagate, value) - : propagate(value); - } - - function propagateValue (result, propagate, x) { - return resolve(result).then(function () { - return propagate(x); - }); - } - - /** - * Recover from a failure by returning a defaultValue. If defaultValue - * is a promise, it's fulfillment value will be used. If defaultValue is - * a promise that rejects, the returned promise will reject with the - * same reason. - * @param {*} defaultValue - * @returns {Promise} new promise - */ - Promise.prototype['else'] = Promise.prototype.orElse = function(defaultValue) { - return this.then(void 0, function() { - return defaultValue; - }); - }; - - /** - * Shortcut for .then(function() { return value; }) - * @param {*} value - * @return {Promise} a promise that: - * - is fulfilled if value is not a promise, or - * - if value is a promise, will fulfill with its value, or reject - * with its reason. - */ - Promise.prototype['yield'] = function(value) { - return this.then(function() { - return value; - }); - }; - - /** - * Runs a side effect when this promise fulfills, without changing the - * fulfillment value. - * @param {function} onFulfilledSideEffect - * @returns {Promise} - */ - Promise.prototype.tap = function(onFulfilledSideEffect) { - return this.then(onFulfilledSideEffect)['yield'](this); - }; - - return Promise; - }; - - function rejectInvalidPredicate() { - throw new TypeError('catch predicate must be a function'); - } - - function evaluatePredicate(e, predicate) { - return isError(predicate) ? e instanceof predicate : predicate(e); - } - - function isError(predicate) { - return predicate === Error - || (predicate != null && predicate.prototype instanceof Error); - } - - function maybeThenable(x) { - return (typeof x === 'object' || typeof x === 'function') && x !== null; - } - - function identity(x) { - return x; - } - -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); })); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/fold.js b/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/fold.js deleted file mode 100644 index c7f027a..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/fold.js +++ /dev/null @@ -1,27 +0,0 @@ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ -/** @author Jeff Escalante */ - -(function(define) { 'use strict'; -define(function() { - - return function fold(Promise) { - - Promise.prototype.fold = function(f, z) { - var promise = this._beget(); - - this._handler.fold(function(z, x, to) { - Promise._handler(z).fold(function(x, z, to) { - to.resolve(f.call(this, z, x)); - }, x, this, to); - }, z, promise._handler.receiver, promise._handler); - - return promise; - }; - - return Promise; - }; - -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); })); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/inspect.js b/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/inspect.js deleted file mode 100644 index 95b8715..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/inspect.js +++ /dev/null @@ -1,20 +0,0 @@ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -define(function(require) { - - var inspect = require('../state').inspect; - - return function inspection(Promise) { - - Promise.prototype.inspect = function() { - return inspect(Promise._handler(this)); - }; - - return Promise; - }; - -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); })); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/iterate.js b/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/iterate.js deleted file mode 100644 index 3ea70b3..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/iterate.js +++ /dev/null @@ -1,65 +0,0 @@ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -define(function() { - - return function generate(Promise) { - - var resolve = Promise.resolve; - - Promise.iterate = iterate; - Promise.unfold = unfold; - - return Promise; - - /** - * @deprecated Use github.com/cujojs/most streams and most.iterate - * Generate a (potentially infinite) stream of promised values: - * x, f(x), f(f(x)), etc. until condition(x) returns true - * @param {function} f function to generate a new x from the previous x - * @param {function} condition function that, given the current x, returns - * truthy when the iterate should stop - * @param {function} handler function to handle the value produced by f - * @param {*|Promise} x starting value, may be a promise - * @return {Promise} the result of the last call to f before - * condition returns true - */ - function iterate(f, condition, handler, x) { - return unfold(function(x) { - return [x, f(x)]; - }, condition, handler, x); - } - - /** - * @deprecated Use github.com/cujojs/most streams and most.unfold - * Generate a (potentially infinite) stream of promised values - * by applying handler(generator(seed)) iteratively until - * condition(seed) returns true. - * @param {function} unspool function that generates a [value, newSeed] - * given a seed. - * @param {function} condition function that, given the current seed, returns - * truthy when the unfold should stop - * @param {function} handler function to handle the value produced by unspool - * @param x {*|Promise} starting value, may be a promise - * @return {Promise} the result of the last value produced by unspool before - * condition returns true - */ - function unfold(unspool, condition, handler, x) { - return resolve(x).then(function(seed) { - return resolve(condition(seed)).then(function(done) { - return done ? seed : resolve(unspool(seed)).spread(next); - }); - }); - - function next(item, newSeed) { - return resolve(handler(item)).then(function() { - return unfold(unspool, condition, handler, newSeed); - }); - } - } - }; - -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); })); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/progress.js b/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/progress.js deleted file mode 100644 index d45e3d0..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/progress.js +++ /dev/null @@ -1,24 +0,0 @@ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -define(function() { - - return function progress(Promise) { - - /** - * @deprecated - * Register a progress handler for this promise - * @param {function} onProgress - * @returns {Promise} - */ - Promise.prototype.progress = function(onProgress) { - return this.then(void 0, void 0, onProgress); - }; - - return Promise; - }; - -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); })); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/timed.js b/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/timed.js deleted file mode 100644 index cd82ed4..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/timed.js +++ /dev/null @@ -1,78 +0,0 @@ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -define(function(require) { - - var env = require('../env'); - var TimeoutError = require('../TimeoutError'); - - function setTimeout(f, ms, x, y) { - return env.setTimer(function() { - f(x, y, ms); - }, ms); - } - - return function timed(Promise) { - /** - * Return a new promise whose fulfillment value is revealed only - * after ms milliseconds - * @param {number} ms milliseconds - * @returns {Promise} - */ - Promise.prototype.delay = function(ms) { - var p = this._beget(); - this._handler.fold(handleDelay, ms, void 0, p._handler); - return p; - }; - - function handleDelay(ms, x, h) { - setTimeout(resolveDelay, ms, x, h); - } - - function resolveDelay(x, h) { - h.resolve(x); - } - - /** - * Return a new promise that rejects after ms milliseconds unless - * this promise fulfills earlier, in which case the returned promise - * fulfills with the same value. - * @param {number} ms milliseconds - * @param {Error|*=} reason optional rejection reason to use, defaults - * to a TimeoutError if not provided - * @returns {Promise} - */ - Promise.prototype.timeout = function(ms, reason) { - var p = this._beget(); - var h = p._handler; - - var t = setTimeout(onTimeout, ms, reason, p._handler); - - this._handler.visit(h, - function onFulfill(x) { - env.clearTimer(t); - this.resolve(x); // this = h - }, - function onReject(x) { - env.clearTimer(t); - this.reject(x); // this = h - }, - h.notify); - - return p; - }; - - function onTimeout(reason, h, ms) { - var e = typeof reason === 'undefined' - ? new TimeoutError('timed out after ' + ms + 'ms') - : reason; - h.reject(e); - } - - return Promise; - }; - -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); })); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/unhandledRejection.js b/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/unhandledRejection.js deleted file mode 100644 index 72f7e20..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/unhandledRejection.js +++ /dev/null @@ -1,85 +0,0 @@ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -define(function(require) { - - var setTimer = require('../env').setTimer; - var format = require('../format'); - - return function unhandledRejection(Promise) { - var logError = noop; - var logInfo = noop; - var localConsole; - - if(typeof console !== 'undefined') { - // Alias console to prevent things like uglify's drop_console option from - // removing console.log/error. Unhandled rejections fall into the same - // category as uncaught exceptions, and build tools shouldn't silence them. - localConsole = console; - logError = typeof localConsole.error !== 'undefined' - ? function (e) { localConsole.error(e); } - : function (e) { localConsole.log(e); }; - - logInfo = typeof localConsole.info !== 'undefined' - ? function (e) { localConsole.info(e); } - : function (e) { localConsole.log(e); }; - } - - Promise.onPotentiallyUnhandledRejection = function(rejection) { - enqueue(report, rejection); - }; - - Promise.onPotentiallyUnhandledRejectionHandled = function(rejection) { - enqueue(unreport, rejection); - }; - - Promise.onFatalRejection = function(rejection) { - enqueue(throwit, rejection.value); - }; - - var tasks = []; - var reported = []; - var running = null; - - function report(r) { - if(!r.handled) { - reported.push(r); - logError('Potentially unhandled rejection [' + r.id + '] ' + format.formatError(r.value)); - } - } - - function unreport(r) { - var i = reported.indexOf(r); - if(i >= 0) { - reported.splice(i, 1); - logInfo('Handled previous rejection [' + r.id + '] ' + format.formatObject(r.value)); - } - } - - function enqueue(f, x) { - tasks.push(f, x); - if(running === null) { - running = setTimer(flush, 0); - } - } - - function flush() { - running = null; - while(tasks.length > 0) { - tasks.shift()(tasks.shift()); - } - } - - return Promise; - }; - - function throwit(e) { - throw e; - } - - function noop() {} - -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); })); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/with.js b/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/with.js deleted file mode 100644 index a0f05f0..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/decorators/with.js +++ /dev/null @@ -1,38 +0,0 @@ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -define(function() { - - return function addWith(Promise) { - /** - * Returns a promise whose handlers will be called with `this` set to - * the supplied receiver. Subsequent promises derived from the - * returned promise will also have their handlers called with receiver - * as `this`. Calling `with` with undefined or no arguments will return - * a promise whose handlers will again be called in the usual Promises/A+ - * way (no `this`) thus safely undoing any previous `with` in the - * promise chain. - * - * WARNING: Promises returned from `with`/`withThis` are NOT Promises/A+ - * compliant, specifically violating 2.2.5 (http://promisesaplus.com/#point-41) - * - * @param {object} receiver `this` value for all handlers attached to - * the returned promise. - * @returns {Promise} - */ - Promise.prototype['with'] = Promise.prototype.withThis = function(receiver) { - var p = this._beget(); - var child = p._handler; - child.receiver = receiver; - this._handler.chain(child, receiver); - return p; - }; - - return Promise; - }; - -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); })); - diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/env.js b/s4t-server-node/node_modules/autobahn/node_modules/when/lib/env.js deleted file mode 100644 index 088ff1e..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/env.js +++ /dev/null @@ -1,73 +0,0 @@ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -/*global process,document,setTimeout,clearTimeout,MutationObserver,WebKitMutationObserver*/ -(function(define) { 'use strict'; -define(function(require) { - /*jshint maxcomplexity:6*/ - - // Sniff "best" async scheduling option - // Prefer process.nextTick or MutationObserver, then check for - // setTimeout, and finally vertx, since its the only env that doesn't - // have setTimeout - - var MutationObs; - var capturedSetTimeout = typeof setTimeout !== 'undefined' && setTimeout; - - // Default env - var setTimer = function(f, ms) { return setTimeout(f, ms); }; - var clearTimer = function(t) { return clearTimeout(t); }; - var asap = function (f) { return capturedSetTimeout(f, 0); }; - - // Detect specific env - if (isNode()) { // Node - asap = function (f) { return process.nextTick(f); }; - - } else if (MutationObs = hasMutationObserver()) { // Modern browser - asap = initMutationObserver(MutationObs); - - } else if (!capturedSetTimeout) { // vert.x - var vertxRequire = require; - var vertx = vertxRequire('vertx'); - setTimer = function (f, ms) { return vertx.setTimer(ms, f); }; - clearTimer = vertx.cancelTimer; - asap = vertx.runOnLoop || vertx.runOnContext; - } - - return { - setTimer: setTimer, - clearTimer: clearTimer, - asap: asap - }; - - function isNode () { - return typeof process !== 'undefined' && process !== null && - typeof process.nextTick === 'function'; - } - - function hasMutationObserver () { - return (typeof MutationObserver === 'function' && MutationObserver) || - (typeof WebKitMutationObserver === 'function' && WebKitMutationObserver); - } - - function initMutationObserver(MutationObserver) { - var scheduled; - var node = document.createTextNode(''); - var o = new MutationObserver(run); - o.observe(node, { characterData: true }); - - function run() { - var f = scheduled; - scheduled = void 0; - f(); - } - - var i = 0; - return function (f) { - scheduled = f; - node.data = (i ^= 1); - }; - } -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); })); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/format.js b/s4t-server-node/node_modules/autobahn/node_modules/when/lib/format.js deleted file mode 100644 index 6f93cd4..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/format.js +++ /dev/null @@ -1,56 +0,0 @@ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -define(function() { - - return { - formatError: formatError, - formatObject: formatObject, - tryStringify: tryStringify - }; - - /** - * Format an error into a string. If e is an Error and has a stack property, - * it's returned. Otherwise, e is formatted using formatObject, with a - * warning added about e not being a proper Error. - * @param {*} e - * @returns {String} formatted string, suitable for output to developers - */ - function formatError(e) { - var s = typeof e === 'object' && e !== null && e.stack ? e.stack : formatObject(e); - return e instanceof Error ? s : s + ' (WARNING: non-Error used)'; - } - - /** - * Format an object, detecting "plain" objects and running them through - * JSON.stringify if possible. - * @param {Object} o - * @returns {string} - */ - function formatObject(o) { - var s = String(o); - if(s === '[object Object]' && typeof JSON !== 'undefined') { - s = tryStringify(o, s); - } - return s; - } - - /** - * Try to return the result of JSON.stringify(x). If that fails, return - * defaultValue - * @param {*} x - * @param {*} defaultValue - * @returns {String|*} JSON.stringify(x) or defaultValue - */ - function tryStringify(x, defaultValue) { - try { - return JSON.stringify(x); - } catch(e) { - return defaultValue; - } - } - -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); })); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/liftAll.js b/s4t-server-node/node_modules/autobahn/node_modules/when/lib/liftAll.js deleted file mode 100644 index af4dd4f..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/liftAll.js +++ /dev/null @@ -1,28 +0,0 @@ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -define(function() { - - return function liftAll(liftOne, combine, dst, src) { - if(typeof combine === 'undefined') { - combine = defaultCombine; - } - - return Object.keys(src).reduce(function(dst, key) { - var f = src[key]; - return typeof f === 'function' ? combine(dst, liftOne(f), key) : dst; - }, typeof dst === 'undefined' ? defaultDst(src) : dst); - }; - - function defaultCombine(o, f, k) { - o[k] = f; - return o; - } - - function defaultDst(src) { - return typeof src === 'function' ? src.bind() : Object.create(src); - } -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); })); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/makePromise.js b/s4t-server-node/node_modules/autobahn/node_modules/when/lib/makePromise.js deleted file mode 100644 index 56a09f8..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/lib/makePromise.js +++ /dev/null @@ -1,883 +0,0 @@ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -define(function() { - - return function makePromise(environment) { - - var tasks = environment.scheduler; - - var objectCreate = Object.create || - function(proto) { - function Child() {} - Child.prototype = proto; - return new Child(); - }; - - /** - * Create a promise whose fate is determined by resolver - * @constructor - * @returns {Promise} promise - * @name Promise - */ - function Promise(resolver, handler) { - this._handler = resolver === Handler ? handler : init(resolver); - } - - /** - * Run the supplied resolver - * @param resolver - * @returns {Pending} - */ - function init(resolver) { - var handler = new Pending(); - - try { - resolver(promiseResolve, promiseReject, promiseNotify); - } catch (e) { - promiseReject(e); - } - - return handler; - - /** - * Transition from pre-resolution state to post-resolution state, notifying - * all listeners of the ultimate fulfillment or rejection - * @param {*} x resolution value - */ - function promiseResolve (x) { - handler.resolve(x); - } - /** - * Reject this promise with reason, which will be used verbatim - * @param {Error|*} reason rejection reason, strongly suggested - * to be an Error type - */ - function promiseReject (reason) { - handler.reject(reason); - } - - /** - * @deprecated - * Issue a progress event, notifying all progress listeners - * @param {*} x progress event payload to pass to all listeners - */ - function promiseNotify (x) { - handler.notify(x); - } - } - - // Creation - - Promise.resolve = resolve; - Promise.reject = reject; - Promise.never = never; - - Promise._defer = defer; - Promise._handler = getHandler; - - /** - * Returns a trusted promise. If x is already a trusted promise, it is - * returned, otherwise returns a new trusted Promise which follows x. - * @param {*} x - * @return {Promise} promise - */ - function resolve(x) { - return isPromise(x) ? x - : new Promise(Handler, new Async(getHandler(x))); - } - - /** - * Return a reject promise with x as its reason (x is used verbatim) - * @param {*} x - * @returns {Promise} rejected promise - */ - function reject(x) { - return new Promise(Handler, new Async(new Rejected(x))); - } - - /** - * Return a promise that remains pending forever - * @returns {Promise} forever-pending promise. - */ - function never() { - return foreverPendingPromise; // Should be frozen - } - - /** - * Creates an internal {promise, resolver} pair - * @private - * @returns {Promise} - */ - function defer() { - return new Promise(Handler, new Pending()); - } - - // Transformation and flow control - - /** - * Transform this promise's fulfillment value, returning a new Promise - * for the transformed result. If the promise cannot be fulfilled, onRejected - * is called with the reason. onProgress *may* be called with updates toward - * this promise's fulfillment. - * @param {function=} onFulfilled fulfillment handler - * @param {function=} onRejected rejection handler - * @param {function=} onProgress @deprecated progress handler - * @return {Promise} new promise - */ - Promise.prototype.then = function(onFulfilled, onRejected, onProgress) { - var parent = this._handler; - var state = parent.join().state(); - - if ((typeof onFulfilled !== 'function' && state > 0) || - (typeof onRejected !== 'function' && state < 0)) { - // Short circuit: value will not change, simply share handler - return new this.constructor(Handler, parent); - } - - var p = this._beget(); - var child = p._handler; - - parent.chain(child, parent.receiver, onFulfilled, onRejected, onProgress); - - return p; - }; - - /** - * If this promise cannot be fulfilled due to an error, call onRejected to - * handle the error. Shortcut for .then(undefined, onRejected) - * @param {function?} onRejected - * @return {Promise} - */ - Promise.prototype['catch'] = function(onRejected) { - return this.then(void 0, onRejected); - }; - - /** - * Creates a new, pending promise of the same type as this promise - * @private - * @returns {Promise} - */ - Promise.prototype._beget = function() { - return begetFrom(this._handler, this.constructor); - }; - - function begetFrom(parent, Promise) { - var child = new Pending(parent.receiver, parent.join().context); - return new Promise(Handler, child); - } - - // Array combinators - - Promise.all = all; - Promise.race = race; - Promise._traverse = traverse; - - /** - * Return a promise that will fulfill when all promises in the - * input array have fulfilled, or will reject when one of the - * promises rejects. - * @param {array} promises array of promises - * @returns {Promise} promise for array of fulfillment values - */ - function all(promises) { - return traverseWith(snd, null, promises); - } - - /** - * Array> -> Promise> - * @private - * @param {function} f function to apply to each promise's value - * @param {Array} promises array of promises - * @returns {Promise} promise for transformed values - */ - function traverse(f, promises) { - return traverseWith(tryCatch2, f, promises); - } - - function traverseWith(tryMap, f, promises) { - var handler = typeof f === 'function' ? mapAt : settleAt; - - var resolver = new Pending(); - var pending = promises.length >>> 0; - var results = new Array(pending); - - for (var i = 0, x; i < promises.length && !resolver.resolved; ++i) { - x = promises[i]; - - if (x === void 0 && !(i in promises)) { - --pending; - continue; - } - - traverseAt(promises, handler, i, x, resolver); - } - - if(pending === 0) { - resolver.become(new Fulfilled(results)); - } - - return new Promise(Handler, resolver); - - function mapAt(i, x, resolver) { - if(!resolver.resolved) { - traverseAt(promises, settleAt, i, tryMap(f, x, i), resolver); - } - } - - function settleAt(i, x, resolver) { - results[i] = x; - if(--pending === 0) { - resolver.become(new Fulfilled(results)); - } - } - } - - function traverseAt(promises, handler, i, x, resolver) { - if (maybeThenable(x)) { - var h = getHandlerMaybeThenable(x); - var s = h.state(); - - if (s === 0) { - h.fold(handler, i, void 0, resolver); - } else if (s > 0) { - handler(i, h.value, resolver); - } else { - resolver.become(h); - visitRemaining(promises, i+1, h); - } - } else { - handler(i, x, resolver); - } - } - - Promise._visitRemaining = visitRemaining; - function visitRemaining(promises, start, handler) { - for(var i=start; i 0 ? toFulfilledState(handler.value) - : toRejectedState(handler.value); - } - -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); })); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/monitor.js b/s4t-server-node/node_modules/autobahn/node_modules/when/monitor.js deleted file mode 100644 index 8979088..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/monitor.js +++ /dev/null @@ -1,17 +0,0 @@ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -define(function(require) { - - var PromiseMonitor = require('./monitor/PromiseMonitor'); - var ConsoleReporter = require('./monitor/ConsoleReporter'); - - var promiseMonitor = new PromiseMonitor(new ConsoleReporter()); - - return function(Promise) { - return promiseMonitor.monitor(Promise); - }; -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); })); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/monitor/ConsoleReporter.js b/s4t-server-node/node_modules/autobahn/node_modules/when/monitor/ConsoleReporter.js deleted file mode 100644 index 79e56ed..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/monitor/ConsoleReporter.js +++ /dev/null @@ -1,102 +0,0 @@ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -define(function(require) { - - var error = require('./error'); - var unhandledRejectionsMsg = '[promises] Unhandled rejections: '; - var allHandledMsg = '[promises] All previously unhandled rejections have now been handled'; - - function ConsoleReporter() { - this._previouslyReported = false; - } - - ConsoleReporter.prototype = initDefaultLogging(); - - ConsoleReporter.prototype.log = function(traces) { - if(traces.length === 0) { - if(this._previouslyReported) { - this._previouslyReported = false; - this.msg(allHandledMsg); - } - return; - } - - this._previouslyReported = true; - this.groupStart(unhandledRejectionsMsg + traces.length); - try { - this._log(traces); - } finally { - this.groupEnd(); - } - }; - - ConsoleReporter.prototype._log = function(traces) { - for(var i=0; i= 0; --i) { - t = this._traces[i]; - if(t.handler === handler) { - break; - } - } - - if(i >= 0) { - t.extraContext = extraContext; - } else { - this._traces.push({ - handler: handler, - extraContext: extraContext - }); - } - - this.logTraces(); - }; - - PromiseMonitor.prototype.removeTrace = function(/*handler*/) { - this.logTraces(); - }; - - PromiseMonitor.prototype.fatal = function(handler, extraContext) { - var err = new Error(); - err.stack = this._createLongTrace(handler.value, handler.context, extraContext).join('\n'); - setTimer(function() { - throw err; - }, 0); - }; - - PromiseMonitor.prototype.logTraces = function() { - if(!this._traceTask) { - this._traceTask = setTimer(this._doLogTraces, this.logDelay); - } - }; - - PromiseMonitor.prototype._logTraces = function() { - this._traceTask = void 0; - this._traces = this._traces.filter(filterHandled); - this._reporter.log(this.formatTraces(this._traces)); - }; - - - PromiseMonitor.prototype.formatTraces = function(traces) { - return traces.map(function(t) { - return this._createLongTrace(t.handler.value, t.handler.context, t.extraContext); - }, this); - }; - - PromiseMonitor.prototype._createLongTrace = function(e, context, extraContext) { - var trace = error.parse(e) || [String(e) + ' (WARNING: non-Error used)']; - trace = filterFrames(this.stackFilter, trace, 0); - this._appendContext(trace, context); - this._appendContext(trace, extraContext); - return this.filterDuplicateFrames ? this._removeDuplicates(trace) : trace; - }; - - PromiseMonitor.prototype._removeDuplicates = function(trace) { - var seen = {}; - var sep = this.stackJumpSeparator; - var count = 0; - return trace.reduceRight(function(deduped, line, i) { - if(i === 0) { - deduped.unshift(line); - } else if(line === sep) { - if(count > 0) { - deduped.unshift(line); - count = 0; - } - } else if(!seen[line]) { - seen[line] = true; - deduped.unshift(line); - ++count; - } - return deduped; - }, []); - }; - - PromiseMonitor.prototype._appendContext = function(trace, context) { - trace.push.apply(trace, this._createTrace(context)); - }; - - PromiseMonitor.prototype._createTrace = function(traceChain) { - var trace = []; - var stack; - - while(traceChain) { - stack = error.parse(traceChain); - - if (stack) { - stack = filterFrames(this.stackFilter, stack); - appendStack(trace, stack, this.stackJumpSeparator); - } - - traceChain = traceChain.parent; - } - - return trace; - }; - - function appendStack(trace, stack, separator) { - if (stack.length > 1) { - stack[0] = separator; - trace.push.apply(trace, stack); - } - } - - function filterFrames(stackFilter, stack) { - return stack.filter(function(frame) { - return !stackFilter.test(frame); - }); - } - - function filterHandled(t) { - return !t.handler.handled; - } - - return PromiseMonitor; -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); })); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/monitor/README.md b/s4t-server-node/node_modules/autobahn/node_modules/when/monitor/README.md deleted file mode 100644 index 57acff9..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/monitor/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Promise monitoring and debugging - -This dir contains experimental new promise monitoring and debugging utilities for when.js. See [the docs](../docs/api.md#debugging-promises). diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/monitor/console.js b/s4t-server-node/node_modules/autobahn/node_modules/when/monitor/console.js deleted file mode 100644 index 931caa6..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/monitor/console.js +++ /dev/null @@ -1,14 +0,0 @@ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -define(function(require) { - - var monitor = require('../monitor'); - var Promise = require('../when').Promise; - - return monitor(Promise); - -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); })); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/monitor/error.js b/s4t-server-node/node_modules/autobahn/node_modules/when/monitor/error.js deleted file mode 100644 index 63825e2..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/monitor/error.js +++ /dev/null @@ -1,86 +0,0 @@ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ -/** @author Brian Cavalier */ -/** @author John Hann */ - -(function(define) { 'use strict'; -define(function() { - - var parse, captureStack, format; - - if(Error.captureStackTrace) { - // Use Error.captureStackTrace if available - parse = function(e) { - return e && e.stack && e.stack.split('\n'); - }; - - format = formatAsString; - captureStack = Error.captureStackTrace; - - } else { - // Otherwise, do minimal feature detection to determine - // how to capture and format reasonable stacks. - parse = function(e) { - var stack = e && e.stack && e.stack.split('\n'); - if(stack && e.message) { - stack.unshift(e.message); - } - return stack; - }; - - (function() { - var e = new Error(); - if(typeof e.stack !== 'string') { - format = formatAsString; - captureStack = captureSpiderMonkeyStack; - } else { - format = formatAsErrorWithStack; - captureStack = useStackDirectly; - } - }()); - } - - function captureSpiderMonkeyStack(host) { - try { - throw new Error(); - } catch(err) { - host.stack = err.stack; - } - } - - function useStackDirectly(host) { - host.stack = new Error().stack; - } - - function formatAsString(longTrace) { - return join(longTrace); - } - - function formatAsErrorWithStack(longTrace) { - var e = new Error(); - e.stack = formatAsString(longTrace); - return e; - } - - // About 5-10x faster than String.prototype.join o_O - function join(a) { - var sep = false; - var s = ''; - for(var i=0; i< a.length; ++i) { - if(sep) { - s += '\n' + a[i]; - } else { - s+= a[i]; - sep = true; - } - } - return s; - } - - return { - parse: parse, - format: format, - captureStack: captureStack - }; - -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); })); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/node.js b/s4t-server-node/node_modules/autobahn/node_modules/when/node.js deleted file mode 100644 index 61d9453..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/node.js +++ /dev/null @@ -1,282 +0,0 @@ -/** @license MIT License (c) copyright 2013 original author or authors */ - -/** - * Collection of helpers for interfacing with node-style asynchronous functions - * using promises. - * - * @author Brian Cavalier - * @contributor Renato Zannon - */ - -(function(define) { -define(function(require) { - - var when = require('./when'); - var _liftAll = require('./lib/liftAll'); - var setTimer = require('./lib/env').setTimer; - var slice = Array.prototype.slice; - - var _apply = require('./lib/apply')(when.Promise, dispatch); - - return { - lift: lift, - liftAll: liftAll, - apply: apply, - call: call, - createCallback: createCallback, - bindCallback: bindCallback, - liftCallback: liftCallback - }; - - /** - * Takes a node-style async function and calls it immediately (with an optional - * array of arguments or promises for arguments). It returns a promise whose - * resolution depends on whether the async functions calls its callback with the - * conventional error argument or not. - * - * With this it becomes possible to leverage existing APIs while still reaping - * the benefits of promises. - * - * @example - * function onlySmallNumbers(n, callback) { - * if(n < 10) { - * callback(null, n + 10); - * } else { - * callback(new Error("Calculation failed")); - * } - * } - * - * var nodefn = require("when/node/function"); - * - * // Logs '15' - * nodefn.apply(onlySmallNumbers, [5]).then(console.log, console.error); - * - * // Logs 'Calculation failed' - * nodefn.apply(onlySmallNumbers, [15]).then(console.log, console.error); - * - * @param {function} f node-style function that will be called - * @param {Array} [args] array of arguments to func - * @returns {Promise} promise for the value func passes to its callback - */ - function apply(f, args) { - return _apply(f, this, args || []); - } - - function dispatch(f, thisArg, args, h) { - var cb = createCallback(h); - try { - switch(args.length) { - case 2: f.call(thisArg, args[0], args[1], cb); break; - case 1: f.call(thisArg, args[0], cb); break; - case 0: f.call(thisArg, cb); break; - default: - args.push(cb); - f.apply(thisArg, args); - } - } catch(e) { - h.reject(e); - } - } - - /** - * Has the same behavior that {@link apply} has, with the difference that the - * arguments to the function are provided individually, while {@link apply} accepts - * a single array. - * - * @example - * function sumSmallNumbers(x, y, callback) { - * var result = x + y; - * if(result < 10) { - * callback(null, result); - * } else { - * callback(new Error("Calculation failed")); - * } - * } - * - * // Logs '5' - * nodefn.call(sumSmallNumbers, 2, 3).then(console.log, console.error); - * - * // Logs 'Calculation failed' - * nodefn.call(sumSmallNumbers, 5, 10).then(console.log, console.error); - * - * @param {function} f node-style function that will be called - * @param {...*} [args] arguments that will be forwarded to the function - * @returns {Promise} promise for the value func passes to its callback - */ - function call(f /*, args... */) { - return _apply(f, this, slice.call(arguments, 1)); - } - - /** - * Takes a node-style function and returns new function that wraps the - * original and, instead of taking a callback, returns a promise. Also, it - * knows how to handle promises given as arguments, waiting for their - * resolution before executing. - * - * Upon execution, the orginal function is executed as well. If it passes - * a truthy value as the first argument to the callback, it will be - * interpreted as an error condition, and the promise will be rejected - * with it. Otherwise, the call is considered a resolution, and the promise - * is resolved with the callback's second argument. - * - * @example - * var fs = require("fs"), nodefn = require("when/node/function"); - * - * var promiseRead = nodefn.lift(fs.readFile); - * - * // The promise is resolved with the contents of the file if everything - * // goes ok - * promiseRead('exists.txt').then(console.log, console.error); - * - * // And will be rejected if something doesn't work out - * // (e.g. the files does not exist) - * promiseRead('doesnt_exist.txt').then(console.log, console.error); - * - * - * @param {Function} f node-style function to be lifted - * @param {...*} [args] arguments to be prepended for the new function @deprecated - * @returns {Function} a promise-returning function - */ - function lift(f /*, args... */) { - var args1 = arguments.length > 1 ? slice.call(arguments, 1) : []; - return function() { - // TODO: Simplify once partialing has been removed - var l = args1.length; - var al = arguments.length; - var args = new Array(al + l); - var i; - for(i=0; i 2) { - resolver.resolve(slice.call(arguments, 1)); - } else { - resolver.resolve(value); - } - }; - } - - /** - * Attaches a node-style callback to a promise, ensuring the callback is - * called for either fulfillment or rejection. Returns a promise with the same - * state as the passed-in promise. - * - * @example - * var deferred = when.defer(); - * - * function callback(err, value) { - * // Handle err or use value - * } - * - * bindCallback(deferred.promise, callback); - * - * deferred.resolve('interesting value'); - * - * @param {Promise} promise The promise to be attached to. - * @param {Function} callback The node-style callback to attach. - * @returns {Promise} A promise with the same state as the passed-in promise. - */ - function bindCallback(promise, callback) { - promise = when(promise); - - if (callback) { - promise.then(success, wrapped); - } - - return promise; - - function success(value) { - wrapped(null, value); - } - - function wrapped(err, value) { - setTimer(function () { - callback(err, value); - }, 0); - } - } - - /** - * Takes a node-style callback and returns new function that accepts a - * promise, calling the original callback when the promise is either - * fulfilled or rejected with the appropriate arguments. - * - * @example - * var deferred = when.defer(); - * - * function callback(err, value) { - * // Handle err or use value - * } - * - * var wrapped = liftCallback(callback); - * - * // `wrapped` can now be passed around at will - * wrapped(deferred.promise); - * - * deferred.resolve('interesting value'); - * - * @param {Function} callback The node-style callback to wrap. - * @returns {Function} The lifted, promise-accepting function. - */ - function liftCallback(callback) { - return function(promise) { - return bindCallback(promise, callback); - }; - } -}); - -})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); }); - - - diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/node/function.js b/s4t-server-node/node_modules/autobahn/node_modules/when/node/function.js deleted file mode 100644 index 6736f1a..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/node/function.js +++ /dev/null @@ -1,13 +0,0 @@ -/** @license MIT License (c) copyright 2013 original author or authors */ - -/** - * @author Brian Cavalier - */ -(function(define) { 'use strict'; -define(function(require) { - - // DEPRECATED: Use when/node instead - return require('../node'); - -}); -}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); })); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/package.json b/s4t-server-node/node_modules/autobahn/node_modules/when/package.json deleted file mode 100644 index 36e1169..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "name": "when", - "version": "3.6.4", - "description": "A lightweight Promises/A+ and when() implementation, plus other async goodies.", - "keywords": [ - "cujo", - "Promises/A+", - "promises-aplus", - "promise", - "promises", - "deferred", - "deferreds", - "when", - "async", - "asynchronous", - "ender" - ], - "homepage": "http://cujojs.com", - "licenses": [ - { - "type": "MIT", - "url": "http://www.opensource.org/licenses/mit-license.php" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/cujojs/when" - }, - "bugs": { - "url": "https://github.com/cujojs/when/issues" - }, - "maintainers": [ - { - "name": "cujojs", - "email": "info@cujojs.com" - } - ], - "contributors": [ - { - "name": "Brian Cavalier", - "url": "http://hovercraftstudios.com" - }, - { - "name": "John Hann", - "url": "http://unscriptable.com" - }, - { - "name": "Scott Andrews" - } - ], - "devDependencies": { - "promises-aplus-tests": "~2", - "benchmark": "~1", - "microtime": "~0", - "browserify": "~2", - "buster": "~0.7", - "jshint": "~2", - "rest": "1.1.x", - "optimist": "~0.6", - "sauce-connect-launcher": "~0.4", - "wd": "~0.2", - "json5": "~0.2", - "poly": "git://github.com/cujojs/poly#0.6.0" - }, - "main": "when", - "ender": { - "files": [ - "*.js", - "lib/*.js", - "node/*.js", - "unfold/*.js", - "monitor/*.js" - ] - }, - "browser": { - "vertx": false - }, - "directories": { - "test": "test" - }, - "scripts": { - "test": "jshint . && buster-test -e node && promises-aplus-tests test/promises-aplus-adapter.js", - "build-browser-test": "browserify ./node_modules/poly/es5.js -o test/browser/es5.js && browserify ./test/*-test.js ./test/**/*-test.js -o test/browser/tests.js -x buster ", - "browser-test": "npm run build-browser-test && buster-static -e browser -p 8080", - "ci": "npm test && node test/sauce.js", - "tunnel": "node test/sauce.js -m", - "start": "buster-static -e browser", - "benchmark": "node benchmark/promise && node benchmark/map", - "browserify-es6": "browserify -s Promise es6-shim/Promise.browserify-es6.js --no-detect-globals -o es6-shim/Promise.js", - "browserify": "browserify -s when build/when.browserify.js --no-detect-globals -o build/when.js", - "browserify-debug": "browserify -s when build/when.browserify-debug.js --no-detect-globals -o build/when.js" - }, - "gitHead": "dd90ad3b83a10a518f9c77ed5a35e8a0022eae35", - "_id": "when@3.6.4", - "_shasum": "473b517ec159e2b85005497a13983f095412e34e", - "_from": "when@>=2.8.0", - "_npmVersion": "2.0.0", - "_npmUser": { - "name": "cujojs", - "email": "info@cujojs.com" - }, - "dist": { - "shasum": "473b517ec159e2b85005497a13983f095412e34e", - "tarball": "http://registry.npmjs.org/when/-/when-3.6.4.tgz" - }, - "_resolved": "https://registry.npmjs.org/when/-/when-3.6.4.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/parallel.js b/s4t-server-node/node_modules/autobahn/node_modules/when/parallel.js deleted file mode 100644 index 6616a82..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/parallel.js +++ /dev/null @@ -1,39 +0,0 @@ -/** @license MIT License (c) copyright 2011-2013 original author or authors */ - -/** - * parallel.js - * - * Run a set of task functions in parallel. All tasks will - * receive the same args - * - * @author Brian Cavalier - * @author John Hann - */ - -(function(define) { -define(function(require) { - - var when = require('./when'); - var all = when.Promise.all; - var slice = Array.prototype.slice; - - /** - * Run array of tasks in parallel - * @param tasks {Array|Promise} array or promiseForArray of task functions - * @param [args] {*} arguments to be passed to all tasks - * @return {Promise} promise for array containing the - * result of each task in the array position corresponding - * to position of the task in the tasks array - */ - return function parallel(tasks /*, args... */) { - return all(slice.call(arguments, 1)).then(function(args) { - return when.map(tasks, function(task) { - return task.apply(void 0, args); - }); - }); - }; - -}); -})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); }); - - diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/pipeline.js b/s4t-server-node/node_modules/autobahn/node_modules/when/pipeline.js deleted file mode 100644 index e5c0bd3..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/pipeline.js +++ /dev/null @@ -1,50 +0,0 @@ -/** @license MIT License (c) copyright 2011-2013 original author or authors */ - -/** - * pipeline.js - * - * Run a set of task functions in sequence, passing the result - * of the previous as an argument to the next. Like a shell - * pipeline, e.g. `cat file.txt | grep 'foo' | sed -e 's/foo/bar/g' - * - * @author Brian Cavalier - * @author John Hann - */ - -(function(define) { -define(function(require) { - - var when = require('./when'); - var all = when.Promise.all; - var slice = Array.prototype.slice; - - /** - * Run array of tasks in a pipeline where the next - * tasks receives the result of the previous. The first task - * will receive the initialArgs as its argument list. - * @param tasks {Array|Promise} array or promise for array of task functions - * @param [initialArgs...] {*} arguments to be passed to the first task - * @return {Promise} promise for return value of the final task - */ - return function pipeline(tasks /* initialArgs... */) { - // Self-optimizing function to run first task with multiple - // args using apply, but subsequence tasks via direct invocation - var runTask = function(args, task) { - runTask = function(arg, task) { - return task(arg); - }; - - return task.apply(null, args); - }; - - return all(slice.call(arguments, 1)).then(function(args) { - return when.reduce(tasks, function(arg, task) { - return runTask(arg, task); - }, args); - }); - }; - -}); -})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); }); - - diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/poll.js b/s4t-server-node/node_modules/autobahn/node_modules/when/poll.js deleted file mode 100644 index 006b16f..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/poll.js +++ /dev/null @@ -1,114 +0,0 @@ -/** @license MIT License (c) copyright 2012-2013 original author or authors */ - -/** - * poll.js - * - * Helper that polls until cancelled or for a condition to become true. - * - * @author Scott Andrews - */ - -(function (define) { 'use strict'; -define(function(require) { - - var when = require('./when'); - var attempt = when['try']; - var cancelable = require('./cancelable'); - - /** - * Periodically execute the work function on the msec delay. The result of - * the work may be verified by watching for a condition to become true. The - * returned deferred is cancellable if the polling needs to be cancelled - * externally before reaching a resolved state. - * - * The next vote is scheduled after the results of the current vote are - * verified and rejected. - * - * Polling may be terminated by the verifier returning a truthy value, - * invoking cancel() on the returned promise, or the work function returning - * a rejected promise. - * - * Usage: - * - * var count = 0; - * function doSomething() { return count++ } - * - * // poll until cancelled - * var p = poll(doSomething, 1000); - * ... - * p.cancel(); - * - * // poll until condition is met - * poll(doSomething, 1000, function(result) { return result > 10 }) - * .then(function(result) { assert result == 10 }); - * - * // delay first vote - * poll(doSomething, 1000, anyFunc, true); - * - * @param work {Function} function that is executed after every timeout - * @param interval {number|Function} timeout in milliseconds - * @param [verifier] {Function} function to evaluate the result of the vote. - * May return a {Promise} or a {Boolean}. Rejecting the promise or a - * falsey value will schedule the next vote. - * @param [delayInitialWork] {boolean} if truthy, the first vote is scheduled - * instead of immediate - * - * @returns {Promise} - */ - return function poll(work, interval, verifier, delayInitialWork) { - var deferred, canceled, reject; - - canceled = false; - deferred = cancelable(when.defer(), function () { canceled = true; }); - reject = deferred.reject; - - verifier = verifier || function () { return false; }; - - if (typeof interval !== 'function') { - interval = (function (interval) { - return function () { return when().delay(interval); }; - })(interval); - } - - function certify(result) { - deferred.resolve(result); - } - - function schedule(result) { - attempt(interval).then(vote, reject); - if (result !== void 0) { - deferred.notify(result); - } - } - - function vote() { - if (canceled) { return; } - when(work(), - function (result) { - when(verifier(result), - function (verification) { - return verification ? certify(result) : schedule(result); - }, - function () { schedule(result); } - ); - }, - reject - ); - } - - if (delayInitialWork) { - schedule(); - } else { - // if work() is blocking, vote will also block - vote(); - } - - // make the promise cancelable - deferred.promise = Object.create(deferred.promise); - deferred.promise.cancel = deferred.cancel; - - return deferred.promise; - }; - -}); -})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); }); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/sequence.js b/s4t-server-node/node_modules/autobahn/node_modules/when/sequence.js deleted file mode 100644 index 5f0bc4f..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/sequence.js +++ /dev/null @@ -1,46 +0,0 @@ -/** @license MIT License (c) copyright 2011-2013 original author or authors */ - -/** - * sequence.js - * - * Run a set of task functions in sequence. All tasks will - * receive the same args. - * - * @author Brian Cavalier - * @author John Hann - */ - -(function(define) { -define(function(require) { - - var when = require('./when'); - var all = when.Promise.all; - var slice = Array.prototype.slice; - - /** - * Run array of tasks in sequence with no overlap - * @param tasks {Array|Promise} array or promiseForArray of task functions - * @param [args] {*} arguments to be passed to all tasks - * @return {Promise} promise for an array containing - * the result of each task in the array position corresponding - * to position of the task in the tasks array - */ - return function sequence(tasks /*, args... */) { - var results = []; - - return all(slice.call(arguments, 1)).then(function(args) { - return when.reduce(tasks, function(results, task) { - return when(task.apply(void 0, args), addResult); - }, results); - }); - - function addResult(result) { - results.push(result); - return results; - } - }; - -}); -})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); }); - - diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/timeout.js b/s4t-server-node/node_modules/autobahn/node_modules/when/timeout.js deleted file mode 100644 index ed4aeb9..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/timeout.js +++ /dev/null @@ -1,27 +0,0 @@ -/** @license MIT License (c) copyright 2011-2013 original author or authors */ - -/** - * timeout.js - * - * Helper that returns a promise that rejects after a specified timeout, - * if not explicitly resolved or rejected before that. - * - * @author Brian Cavalier - * @author John Hann - */ - -(function(define) { -define(function(require) { - - var when = require('./when'); - - /** - * @deprecated Use when(trigger).timeout(ms) - */ - return function timeout(msec, trigger) { - return when(trigger).timeout(msec); - }; -}); -})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); }); - - diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/unfold.js b/s4t-server-node/node_modules/autobahn/node_modules/when/unfold.js deleted file mode 100644 index 807bcfc..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/unfold.js +++ /dev/null @@ -1,17 +0,0 @@ -/** @license MIT License (c) copyright B Cavalier & J Hann */ - -/** - * unfold - * @author: brian@hovercraftstudios.com - */ -(function(define) { -define(function(require) { - - /** - * @deprecated Use when.unfold - */ - return require('./when').unfold; - -}); -})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); } ); - diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/unfold/list.js b/s4t-server-node/node_modules/autobahn/node_modules/when/unfold/list.js deleted file mode 100644 index 529c2c9..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/unfold/list.js +++ /dev/null @@ -1,32 +0,0 @@ -/** @license MIT License (c) copyright B Cavalier & J Hann */ - -(function(define) { -define(function(require) { - - var unfold = require('../when').unfold; - - /** - * @deprecated - * Given a seed and generator, produces an Array. Effectively the - * dual (opposite) of when.reduce() - * @param {function} generator function that generates a value (or promise - * for a value) to be placed in the resulting array - * @param {function} condition given a seed, must return truthy if the unfold - * should continue, or falsey if it should terminate - * @param {*|Promise} seed any value or promise - * @return {Promise} resulting array - */ - return function list(generator, condition, seed) { - var result = []; - - return unfold(generator, condition, append, seed)['yield'](result); - - function append(value, newSeed) { - result.push(value); - return newSeed; - } - }; - -}); -})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); }); - diff --git a/s4t-server-node/node_modules/autobahn/node_modules/when/when.js b/s4t-server-node/node_modules/autobahn/node_modules/when/when.js deleted file mode 100644 index bc1c894..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/when/when.js +++ /dev/null @@ -1,229 +0,0 @@ -/** @license MIT License (c) copyright 2010-2014 original author or authors */ - -/** - * Promises/A+ and when() implementation - * when is part of the cujoJS family of libraries (http://cujojs.com/) - * @author Brian Cavalier - * @author John Hann - * @version 3.6.4 - */ -(function(define) { 'use strict'; -define(function (require) { - - var timed = require('./lib/decorators/timed'); - var array = require('./lib/decorators/array'); - var flow = require('./lib/decorators/flow'); - var fold = require('./lib/decorators/fold'); - var inspect = require('./lib/decorators/inspect'); - var generate = require('./lib/decorators/iterate'); - var progress = require('./lib/decorators/progress'); - var withThis = require('./lib/decorators/with'); - var unhandledRejection = require('./lib/decorators/unhandledRejection'); - var TimeoutError = require('./lib/TimeoutError'); - - var Promise = [array, flow, fold, generate, progress, - inspect, withThis, timed, unhandledRejection] - .reduce(function(Promise, feature) { - return feature(Promise); - }, require('./lib/Promise')); - - var apply = require('./lib/apply')(Promise); - - // Public API - - when.promise = promise; // Create a pending promise - when.resolve = Promise.resolve; // Create a resolved promise - when.reject = Promise.reject; // Create a rejected promise - - when.lift = lift; // lift a function to return promises - when['try'] = attempt; // call a function and return a promise - when.attempt = attempt; // alias for when.try - - when.iterate = Promise.iterate; // DEPRECATED (use cujojs/most streams) Generate a stream of promises - when.unfold = Promise.unfold; // DEPRECATED (use cujojs/most streams) Generate a stream of promises - - when.join = join; // Join 2 or more promises - - when.all = all; // Resolve a list of promises - when.settle = settle; // Settle a list of promises - - when.any = lift(Promise.any); // One-winner race - when.some = lift(Promise.some); // Multi-winner race - when.race = lift(Promise.race); // First-to-settle race - - when.map = map; // Array.map() for promises - when.filter = filter; // Array.filter() for promises - when.reduce = lift(Promise.reduce); // Array.reduce() for promises - when.reduceRight = lift(Promise.reduceRight); // Array.reduceRight() for promises - - when.isPromiseLike = isPromiseLike; // Is something promise-like, aka thenable - - when.Promise = Promise; // Promise constructor - when.defer = defer; // Create a {promise, resolve, reject} tuple - - // Error types - - when.TimeoutError = TimeoutError; - - /** - * Get a trusted promise for x, or by transforming x with onFulfilled - * - * @param {*} x - * @param {function?} onFulfilled callback to be called when x is - * successfully fulfilled. If promiseOrValue is an immediate value, callback - * will be invoked immediately. - * @param {function?} onRejected callback to be called when x is - * rejected. - * @param {function?} onProgress callback to be called when progress updates - * are issued for x. @deprecated - * @returns {Promise} a new promise that will fulfill with the return - * value of callback or errback or the completion value of promiseOrValue if - * callback and/or errback is not supplied. - */ - function when(x, onFulfilled, onRejected, onProgress) { - var p = Promise.resolve(x); - if (arguments.length < 2) { - return p; - } - - return p.then(onFulfilled, onRejected, onProgress); - } - - /** - * Creates a new promise whose fate is determined by resolver. - * @param {function} resolver function(resolve, reject, notify) - * @returns {Promise} promise whose fate is determine by resolver - */ - function promise(resolver) { - return new Promise(resolver); - } - - /** - * Lift the supplied function, creating a version of f that returns - * promises, and accepts promises as arguments. - * @param {function} f - * @returns {Function} version of f that returns promises - */ - function lift(f) { - return function() { - for(var i=0, l=arguments.length, a=new Array(l); i> $(depfile) -# Add extra rules as in (2). -# We remove slashes and replace spaces with new lines; -# remove blank lines; -# delete the first line and append a colon to the remaining lines. -sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\ - grep -v '^$$' |\ - sed -e 1d -e 's|$$|:|' \ - >> $(depfile) -rm $(depfile).raw -endef - -# Command definitions: -# - cmd_foo is the actual command to run; -# - quiet_cmd_foo is the brief-output summary of the command. - -quiet_cmd_cc = CC($(TOOLSET)) $@ -cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $< - -quiet_cmd_cxx = CXX($(TOOLSET)) $@ -cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< - -quiet_cmd_touch = TOUCH $@ -cmd_touch = touch $@ - -quiet_cmd_copy = COPY $@ -# send stderr to /dev/null to ignore messages when linking directories. -cmd_copy = rm -rf "$@" && cp -af "$<" "$@" - -quiet_cmd_alink = AR($(TOOLSET)) $@ -cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^) - -quiet_cmd_alink_thin = AR($(TOOLSET)) $@ -cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^) - -# Due to circular dependencies between libraries :(, we wrap the -# special "figure out circular dependencies" flags around the entire -# input list during linking. -quiet_cmd_link = LINK($(TOOLSET)) $@ -cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS) - -# We support two kinds of shared objects (.so): -# 1) shared_library, which is just bundling together many dependent libraries -# into a link line. -# 2) loadable_module, which is generating a module intended for dlopen(). -# -# They differ only slightly: -# In the former case, we want to package all dependent code into the .so. -# In the latter case, we want to package just the API exposed by the -# outermost module. -# This means shared_library uses --whole-archive, while loadable_module doesn't. -# (Note that --whole-archive is incompatible with the --start-group used in -# normal linking.) - -# Other shared-object link notes: -# - Set SONAME to the library filename so our binaries don't reference -# the local, absolute paths used on the link command-line. -quiet_cmd_solink = SOLINK($(TOOLSET)) $@ -cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS) - -quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ -cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS) - - -# Define an escape_quotes function to escape single quotes. -# This allows us to handle quotes properly as long as we always use -# use single quotes and escape_quotes. -escape_quotes = $(subst ','\'',$(1)) -# This comment is here just to include a ' to unconfuse syntax highlighting. -# Define an escape_vars function to escape '$' variable syntax. -# This allows us to read/write command lines with shell variables (e.g. -# $LD_LIBRARY_PATH), without triggering make substitution. -escape_vars = $(subst $$,$$$$,$(1)) -# Helper that expands to a shell command to echo a string exactly as it is in -# make. This uses printf instead of echo because printf's behaviour with respect -# to escape sequences is more portable than echo's across different shells -# (e.g., dash, bash). -exact_echo = printf '%s\n' '$(call escape_quotes,$(1))' - -# Helper to compare the command we're about to run against the command -# we logged the last time we ran the command. Produces an empty -# string (false) when the commands match. -# Tricky point: Make has no string-equality test function. -# The kernel uses the following, but it seems like it would have false -# positives, where one string reordered its arguments. -# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \ -# $(filter-out $(cmd_$@), $(cmd_$(1)))) -# We instead substitute each for the empty string into the other, and -# say they're equal if both substitutions produce the empty string. -# .d files contain ? instead of spaces, take that into account. -command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\ - $(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1)))) - -# Helper that is non-empty when a prerequisite changes. -# Normally make does this implicitly, but we force rules to always run -# so we can check their command lines. -# $? -- new prerequisites -# $| -- order-only dependencies -prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?)) - -# Helper that executes all postbuilds until one fails. -define do_postbuilds - @E=0;\ - for p in $(POSTBUILDS); do\ - eval $$p;\ - E=$$?;\ - if [ $$E -ne 0 ]; then\ - break;\ - fi;\ - done;\ - if [ $$E -ne 0 ]; then\ - rm -rf "$@";\ - exit $$E;\ - fi -endef - -# do_cmd: run a command via the above cmd_foo names, if necessary. -# Should always run for a given target to handle command-line changes. -# Second argument, if non-zero, makes it do asm/C/C++ dependency munging. -# Third argument, if non-zero, makes it do POSTBUILDS processing. -# Note: We intentionally do NOT call dirx for depfile, since it contains ? for -# spaces already and dirx strips the ? characters. -define do_cmd -$(if $(or $(command_changed),$(prereq_changed)), - @$(call exact_echo, $($(quiet)cmd_$(1))) - @mkdir -p "$(call dirx,$@)" "$(dir $(depfile))" - $(if $(findstring flock,$(word 1,$(cmd_$1))), - @$(cmd_$(1)) - @echo " $(quiet_cmd_$(1)): Finished", - @$(cmd_$(1)) - ) - @$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile) - @$(if $(2),$(fixup_dep)) - $(if $(and $(3), $(POSTBUILDS)), - $(call do_postbuilds) - ) -) -endef - -# Declare the "all" target first so it is the default, -# even though we don't have the deps yet. -.PHONY: all -all: - -# make looks for ways to re-generate included makefiles, but in our case, we -# don't have a direct way. Explicitly telling make that it has nothing to do -# for them makes it go faster. -%.d: ; - -# Use FORCE_DO_CMD to force a target to run. Should be coupled with -# do_cmd. -.PHONY: FORCE_DO_CMD -FORCE_DO_CMD: - -TOOLSET := target -# Suffix rules, putting all outputs into $(obj). -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD - @$(call do_cmd,cc,1) - -# Try building from generated source, too. -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD - @$(call do_cmd,cc,1) - -$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD - @$(call do_cmd,cc,1) - - -ifeq ($(strip $(foreach prefix,$(NO_LOAD),\ - $(findstring $(join ^,$(prefix)),\ - $(join ^,bufferutil.target.mk)))),) - include bufferutil.target.mk -endif -ifeq ($(strip $(foreach prefix,$(NO_LOAD),\ - $(findstring $(join ^,$(prefix)),\ - $(join ^,validation.target.mk)))),) - include validation.target.mk -endif - -quiet_cmd_regen_makefile = ACTION Regenerating $@ -cmd_regen_makefile = cd $(srcdir); /usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/mnt/Data-Partition/Develop/crossbar.io/s4t/node_modules/autobahn/node_modules/ws/build/config.gypi -I/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/home/andrea/.node-gyp/0.10.35/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/home/andrea/.node-gyp/0.10.35" "-Dmodule_root_dir=/mnt/Data-Partition/Develop/crossbar.io/s4t/node_modules/autobahn/node_modules/ws" binding.gyp -Makefile: $(srcdir)/../../../../../../../../../usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../../../../../../../home/andrea/.node-gyp/0.10.35/common.gypi - $(call do_cmd,regen_makefile) - -# "all" is a concatenation of the "all" targets from all the included -# sub-makefiles. This is just here to clarify. -all: - -# Add in dependency-tracking rules. $(all_deps) is the list of every single -# target in our tree. Only consider the ones with .d (dependency) info: -d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d)) -ifneq ($(d_files),) - include $(d_files) -endif diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/bufferutil.node.d b/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/bufferutil.node.d deleted file mode 100644 index 03982be..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/bufferutil.node.d +++ /dev/null @@ -1 +0,0 @@ -cmd_Release/bufferutil.node := rm -rf "Release/bufferutil.node" && cp -af "Release/obj.target/bufferutil.node" "Release/bufferutil.node" diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/obj.target/bufferutil.node.d b/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/obj.target/bufferutil.node.d deleted file mode 100644 index 64d1dc1..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/obj.target/bufferutil.node.d +++ /dev/null @@ -1 +0,0 @@ -cmd_Release/obj.target/bufferutil.node := flock ./Release/linker.lock g++ -shared -pthread -rdynamic -m32 -Wl,-soname=bufferutil.node -o Release/obj.target/bufferutil.node -Wl,--start-group Release/obj.target/bufferutil/src/bufferutil.o -Wl,--end-group diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d b/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d deleted file mode 100644 index 35513d9..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d +++ /dev/null @@ -1,29 +0,0 @@ -cmd_Release/obj.target/bufferutil/src/bufferutil.o := g++ '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/home/andrea/.node-gyp/0.10.35/src -I/home/andrea/.node-gyp/0.10.35/deps/uv/include -I/home/andrea/.node-gyp/0.10.35/deps/v8/include -I../node_modules/nan -Wall -Wextra -Wno-unused-parameter -pthread -m32 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF ./Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d.raw -c -o Release/obj.target/bufferutil/src/bufferutil.o ../src/bufferutil.cc -Release/obj.target/bufferutil/src/bufferutil.o: ../src/bufferutil.cc \ - /home/andrea/.node-gyp/0.10.35/deps/v8/include/v8.h \ - /home/andrea/.node-gyp/0.10.35/deps/v8/include/v8stdint.h \ - /home/andrea/.node-gyp/0.10.35/src/node.h \ - /home/andrea/.node-gyp/0.10.35/deps/uv/include/uv.h \ - /home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/uv-unix.h \ - /home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/ngx-queue.h \ - /home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/uv-linux.h \ - /home/andrea/.node-gyp/0.10.35/src/node_object_wrap.h \ - /home/andrea/.node-gyp/0.10.35/src/node.h \ - /home/andrea/.node-gyp/0.10.35/src/node_buffer.h \ - /home/andrea/.node-gyp/0.10.35/src/node_object_wrap.h \ - ../node_modules/nan/nan.h \ - /home/andrea/.node-gyp/0.10.35/src/node_version.h -../src/bufferutil.cc: -/home/andrea/.node-gyp/0.10.35/deps/v8/include/v8.h: -/home/andrea/.node-gyp/0.10.35/deps/v8/include/v8stdint.h: -/home/andrea/.node-gyp/0.10.35/src/node.h: -/home/andrea/.node-gyp/0.10.35/deps/uv/include/uv.h: -/home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/uv-unix.h: -/home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/ngx-queue.h: -/home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/uv-linux.h: -/home/andrea/.node-gyp/0.10.35/src/node_object_wrap.h: -/home/andrea/.node-gyp/0.10.35/src/node.h: -/home/andrea/.node-gyp/0.10.35/src/node_buffer.h: -/home/andrea/.node-gyp/0.10.35/src/node_object_wrap.h: -../node_modules/nan/nan.h: -/home/andrea/.node-gyp/0.10.35/src/node_version.h: diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/obj.target/validation.node.d b/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/obj.target/validation.node.d deleted file mode 100644 index 97d7984..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/obj.target/validation.node.d +++ /dev/null @@ -1 +0,0 @@ -cmd_Release/obj.target/validation.node := flock ./Release/linker.lock g++ -shared -pthread -rdynamic -m32 -Wl,-soname=validation.node -o Release/obj.target/validation.node -Wl,--start-group Release/obj.target/validation/src/validation.o -Wl,--end-group diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/obj.target/validation/src/validation.o.d b/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/obj.target/validation/src/validation.o.d deleted file mode 100644 index a507a1f..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/obj.target/validation/src/validation.o.d +++ /dev/null @@ -1,29 +0,0 @@ -cmd_Release/obj.target/validation/src/validation.o := g++ '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/home/andrea/.node-gyp/0.10.35/src -I/home/andrea/.node-gyp/0.10.35/deps/uv/include -I/home/andrea/.node-gyp/0.10.35/deps/v8/include -I../node_modules/nan -Wall -Wextra -Wno-unused-parameter -pthread -m32 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF ./Release/.deps/Release/obj.target/validation/src/validation.o.d.raw -c -o Release/obj.target/validation/src/validation.o ../src/validation.cc -Release/obj.target/validation/src/validation.o: ../src/validation.cc \ - /home/andrea/.node-gyp/0.10.35/deps/v8/include/v8.h \ - /home/andrea/.node-gyp/0.10.35/deps/v8/include/v8stdint.h \ - /home/andrea/.node-gyp/0.10.35/src/node.h \ - /home/andrea/.node-gyp/0.10.35/deps/uv/include/uv.h \ - /home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/uv-unix.h \ - /home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/ngx-queue.h \ - /home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/uv-linux.h \ - /home/andrea/.node-gyp/0.10.35/src/node_object_wrap.h \ - /home/andrea/.node-gyp/0.10.35/src/node.h \ - /home/andrea/.node-gyp/0.10.35/src/node_buffer.h \ - /home/andrea/.node-gyp/0.10.35/src/node_object_wrap.h \ - ../node_modules/nan/nan.h \ - /home/andrea/.node-gyp/0.10.35/src/node_version.h -../src/validation.cc: -/home/andrea/.node-gyp/0.10.35/deps/v8/include/v8.h: -/home/andrea/.node-gyp/0.10.35/deps/v8/include/v8stdint.h: -/home/andrea/.node-gyp/0.10.35/src/node.h: -/home/andrea/.node-gyp/0.10.35/deps/uv/include/uv.h: -/home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/uv-unix.h: -/home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/ngx-queue.h: -/home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/uv-linux.h: -/home/andrea/.node-gyp/0.10.35/src/node_object_wrap.h: -/home/andrea/.node-gyp/0.10.35/src/node.h: -/home/andrea/.node-gyp/0.10.35/src/node_buffer.h: -/home/andrea/.node-gyp/0.10.35/src/node_object_wrap.h: -../node_modules/nan/nan.h: -/home/andrea/.node-gyp/0.10.35/src/node_version.h: diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/validation.node.d b/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/validation.node.d deleted file mode 100644 index 6b32ade..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/.deps/Release/validation.node.d +++ /dev/null @@ -1 +0,0 @@ -cmd_Release/validation.node := rm -rf "Release/validation.node" && cp -af "Release/obj.target/validation.node" "Release/validation.node" diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/bufferutil.node b/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/bufferutil.node deleted file mode 100755 index 03c43f09a28b6cdbb1f8ef511d4bb1a63f9cf550..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18586 zcmeHPe|S{YnLd+=I7%dFQSnFDfT@DwkVyh25p6=4V3a^g62uCF zXzl*x;W>Hlcg}ad^PTT}=bU@z-jCaYOKLnGk1)wAynJ?E$KPpci@Z(k5}q?XSFF^yynx zU45H({l}kv_J$W~Hy=A4bx=X_o(!DkS($Tmg=g}e%PvgbIi*V0%|iJcWDHdlBb!vB zFD}>Rjv$0_@ZfBTa+r@S1mU;j+cz`Z{`ZGZ72eQ!-U>x})y2f{Bt zc<{3;&;P^b-`(@rukYIMZ@>Sa!i(B}{f)9M_iU&RzHr2QP0la=yX0HPo_T!dD>v>Q zDw_3V;pzU1-uSP@?F08(UCPVvbMQLRMlBqaPNYxCs=qFa{)(Jj)qwo8qe%t02pIxM z`n%FuRN)zbUt0~>ex+4UIz*?@iTuB@Xx5)^DuD&aS7zyB+nDuV${OFxS^VF$#>f6H z%+l{&tDgOT2iYX@zewlNiS>78>AN=lHNTE6Gj! zoh|pLqv-EfpjrP3)E8B>8(KU5ElgogKG;@tR&|xt37f8H&ZiG2wiAX`pCfe9fA0w8`!0ELj@9 zIk^1VrNzBvz6h-WgWVq zmSptMWbwR)uv;IIOtsw^odi4Tsoc`i?nrAmP^1*OE*k0y6kit(t*s7qb~cAv)&}LM zit5AB7|q)4)-G)bIP+G7I^*GBFsNiGEz9acYr||ij%xM2^)5qMYl``5alC$M-&f!~YLLHrBnx_OaV9!l? zb!RvfonY8wN?BAaWi+lBZGYPYm)FMB%r8YBi^3tdePScfY$c02Vm%nTYB&M^sF_z5 z7{evzHFZZbM;$0Onti~?ZKt1C7ml`t$6hRSa?ylBOD8^Q%kBU8V#*q6mmnBJXtn>Nw~WW7M07uk_KTxu2_1$?xD2g zxOzwn>UMM=`5mwP^$=TG8cA7$EkkaH|q!8+LwEcULI3 zc5KVqjHPwsvW?g|P=t-5q*yI+skSXbdv3;-IIiO?Dw4{!cB*|MLyoFa{$Gx5sxIud zM_OxX^?6GoEul`i(*)+%#JgMEj!1W7xT~iVw!*Fx4E8oU_1Cu4*KjkMudJ83F=2y7 zm9;^eWi?u$+|Vh?k~Fd@QBa1Qh7yOO(VbJ?(9zZ%a^q1drDuDz{6GNCV@8qogZT|^ zw4=MN9H&Xc`mW|kXAlFzDJI>n%nY^!h6!eBrW>M1qeiLpZqiQRa=if7SGkbi9EZKe zS8RT5H%?L@$sV^IOQn@`5$P6HHIE}j0fM%lf!?^b%Ka)HAF4W|RdR>1D?iqP`r^bKK_;roDG(M*B zIgP*6_^QS)P#$y_NxVL2ebd48i{FKI!#&(UXa4$&yPK_~*DUJ7P{F=rG zH9oHKDUBt#$E2KUjn`zqm8OMc((MFC3xRc`nzNB#l#|ZjXjo;V!3fqCFneBiZH2x>sA-}HiB-#VlUtl|+ zhxP!@(D)AJc!l^P+XLTcJK&jY2mCVI0Z%7CFre{l@?$IuiP%=7M9j?(*dF)|()eLw z9}#_YQXa66?SU_`+=KPOa^QU|2NttE9$J@ae2w*>|D^HU8H&DK<1&qH8gJA1bLxGn z5XUsGqusHg3~9XMLeO}KK8iKs!E^6B#4AxxyafJ;GUA^|m*Y8_G|)$!BSao?7Jg6s zB=&?!kV8Bfa)>w)hKTuSPy7UaPpkz0JhTIz4F0J^ls6=f_y%7T_@Q9$Yv?YOI5Ipu zyrthgX%LEv#DMRHy}*$){2iWQ!}oD-WE#E?PAA%VdH4{T4&TR&Y1%(Al#_hoiNhCoo_>BPZUm)Y$z{!1IVwoJ4lyLYHsGyOyL!awbz$upWZG1Ypps+7K zASb7<=^(h1P5qKemKI`u^4K5eNh2LYO=W8JK;lSlauo(!S}0qjg0du+?Q%VaFL^%c zbo-y13C=2iX`J$x)8%$gs&A>G52G4pkAsF&>w%(F&<6#5sFmZOacS;UQ$Gf(M!7&? zU-+FHKI5#GZj`pqg1*%Up{8VnZ&HT3RzD;r_wB1xuoz9PODP`eB>HpdVp4vp$(PJADq^&W zfdw4KlewI;yaK&)7NZ;XrdQ(-7Nu-$Rt)?B>le*a^|@Pq?4FjW^m&p^zGn{8SQNBL zFYA?=g6fUMjUa`zAG~W?YPBy_ox9IV8^JZNHiO#S?=D1zAFSR1KnN%=ea(Ro{{+P9@Yf6FH7 zb*Vs2fqzIl)tT7iAW6QCWE_E!QFvlM!>#cKQzM( zC4;;2H*dvdU#|d1YU7@yi)D%K%(SP}c4n8TZAb42?EP&BFv|~^+$X(`HNR9fiKjfW zDAn|k7rPEuKDJoMl%<}H{a3_y9Nfl^yys=+rxHwoCF8JoDA+!D$4O5z7vOrKDTT=z#7~QMGk+Pr&B2o zyTR-6C-XcRb3T{q`HT-p>zc!2qnt^-PHC~#oJmcqne5NsHhW|yIT5DusEOb!iu6P* zC`|5^L!wx|2R33;8~dMlGiS?i{^nOOJx{!rlYFu-?_?OD?_tm)CMoVqP8x5L@*i%(1^*ItSRi`P*(bOnF8LlyhC@Z(C%lrkW~Dv~g$7{q5{jyHsl9u2g(CD34k#tPf?> z?+N@^dWUxq|hJU{b13D-y*@+O9I@;CRvX%a(T_twOa zCx3Gil;s`vc>W3p+2~82Jf4GSJ@X%4m{VMxv$Y1Uvd~jp?b%ubZ^^Ew>iE z&ee^b+Sd-xwAZ;k!Cd4INPn_Np!{t8IOPk*DS!2U;dTMsV%v8JndjNx?EYZQ+oszO zz8|Tzjz@E10(0fAP(8Axj(Ir;+*wQ;ME>~N{!EOy>$UNL1+DT3sS7^_<9W`vaK9JT)yfNU3`@$ zM&3#bzh9cg`rW&w#rhRo8&*Saq@%Tf7ObdHzw`6OZ$$dYx%^Gh-ZX6(}ub>pE<$uWkVQO#9JObnD1`O)O$e z-8|=cuh@p0pLntA&$Y%1MdMo0OYys!_NpsUhus&JbVCr)3J2%+Cj7f zD}e`r?ZDmGWe)(iVw1-!2(c3P7)3xIZVqn*Zhdcfcsps*e8Vh2IK+76kpAhyle6&ySeMcC(pg&lH$Udb5LA~Tn}9b zfud@PZ%fX?(@v`Sd+!~&iIZ}^d+Oe*r>gc<{SZQ{Crg<lSaR*V|4!&R6d`7QNTY4>= zEc^6f%rE12x$HjiGpFGE937)hjvsZ0(9g4WKhP(VRwtydf|JSL1O82zJAR{+)?e%8 zbv>41S4;k#;48q~@|&Dd{IxcJwdAKS?0k24nBVk_;(yfUzh*M+NuN3Thl%Y;zFFWa zgHL^yZOlB=?oN7ma(?Q;xBWQy)`4#je7D>3f_HcmxjDUb8crqcwG(^?V0%7br294Y zn&KJpFUt8SePn@;Ebx&9{>BzKgm-n@k(szH@mm1mkVbw>fY-m`5?~&X-;m;Uk^B}F zuMFik?07wfFARjhD?<7Hn`bTQcmF&bDTA<+aD5PeCIN>)p9)+Bc|0ShBID?mhcC8A zN%I`%eFa`~;>Di27I-&>*K<9;UDhB^t5mwP_-%RcKp*^;ySTc#qF`22GrqZu7nJ(T{Kc0A%Hxs@%vJ^X z*gdws%MCRH-KfHLbJZPj!~VAJxW75x(b;-gN2`!jdnnc}{H^P|(NdusRW-f*mNL?v zK{%+3hC9ixE_ym$;g?^x`rYt4T+44<{n3d0+{GVmch*EhU16ua6)g>=S~wwo@upgs z>zi7@2H~Nujuvzrfk6E6%U+a3d_N=nEs-vM&Z;fF~bFVoe?#=q!W%o|W< z`el3OCS>{}uj!M_^|)rgEF&_tBA%}#7 zWJq&)K3@hiGIE$?3}z6UPGvj*}3X-vgw`u!$Is?Dxsyp4ZE zCvqCTUAX2nkdNQ+yfO}7KkBI;`3Au^I1b+rQO~&`pN!)H9~+wfh@9W&RI%d2yZ0k_ zxtwi3^8Uo)6O|w^X=CyI!s6pTH4S{c?>EWx|1t{LKlPhai3~ndhax#f;%oXE)iRN< zP+t>h3uf-ulx0#q_>LL^NFFAlHBDmYJPZX3pX+}?!NM5;P;R0)e$tx|Y)}Ep{ z3bn=*%@wQGlA_gsOk9Uop0H|dsCu5XY8@zADMDXYv{HnAt!P?K`LCimE6Pt5El*Gt zQ-%Vs;7O{!2_broM^%y{tp-LvV)E(}m;S=!RVTC}Bt1Pn&n(OpZw*sJzB?`jdT{4( z1CXzPQ6y>p?9IJ}=X4Hs>~916Q9n!9zXara(mG9ZzyD{8pUQIAi$q`cjr2dw%x zLEnh_%XR%cxBy>1(uCBf!*WLI>w@OGX7b>U<961cB}u8@-E42s{|?&RKT-e3LDN3y z7Wr(!xESsyOdhO~cR?Sr+I!%FX8t_z{A_&+P`^&!#CYI%e$cjlO0xP({VV9wm5TOY z{^~&=g+1um)Nc)FGk+coEDGApFX`Jrn|mG){9`L)y3#&dZpT%7{^nt zmXs91_H|iw9JC!b)Cby*d-|%yUx4-xWzho`P47MkdgqLhxThna&H7^8)bBytaZ{(A zgho11zfWe-H&`^~Gj7U`JKAE^v;89$T>$z8i)Q^iy@lXX6d*4HZO1M3TJ_|A6m%sv z@IhS9#QYrsZO3{2F^j(rd#N4A^(bhQsQ-^Fn)3gcMd$HQ(24vPSTy;|K-+Oup{)8Z zWYN!L(bLtID0`s1BGASk8E3Wtv>oSleHMQkXgiK;Q&#=gv*_<<(QkmZ{llZSOmPOx|Mc)nDj$8XdR{a~G?fIKzooTek6`%|7;KSdD7$;W=dc;0w ziN&DpIJ}hAekR)AZ_$)D0D3CcKNI8rtRM3IEiL$oF`q6LD1 za>uD(9&Bv9-l=I?THRQ?Y$-$N#*(FioW^Z2I%tVeA^si&<>6!fF(ooYWL$Y;jOGNR z(8d+5RGqKhPMC-v8QG)Wab!k~s3DY(4B>bi9$)_|P~!u74-}2+{sY>L+xZxFHKAPN zv}uXDF&EJoemI$PP4#kTNo_+TyksP<(s8?-7DiUa@KQ>JT3SVp(;9KwWU!*s>PDh5 zClp^N@L1W?8Fs_1{`vFDF}$&uWDuu%Ttxtf8(lBd18!@)s|%4-`f*oMGU_vf)p2T; zSJefb;L=5OX{ousUc6-4!m1_CvYMKPV58GmwQxz09P7&F``f~<)6?R(?eXrl{^oTk zMbKzkMr$nMs26y`S#APp!*{boFHa;wbo}r(JK|Gohd3cF z!ZAa38De-%XvY)Ul{LfT2TzY1 zjS3Y$^l&)Y+5bz>p^5~}^ecG)sQ0+X5ulCnXT^RZpnTLa8u9O}_*r{>O&BMNe&E~3 z70x{36(<@PtM()G^I-;yXY9u+=-v(o9AhUjr=Z@@tq9%GZm8o_N5(vUw7xY7=4+00 zMCA#EX4{iyf@`5b#y~$f#+`AH%HU&c_7lW@+W&`v>0J(Obl9}5=tSY&%DIj^YJBu8 usCap<92)Wj{yzluKSby#(J@@%1aCBPlVJac5hDwmfu+jW<3;vLP5uu%R0320 diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/linker.lock b/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/linker.lock deleted file mode 100644 index e69de29..0000000 diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/obj.target/bufferutil.node b/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/obj.target/bufferutil.node deleted file mode 100755 index 03c43f09a28b6cdbb1f8ef511d4bb1a63f9cf550..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18586 zcmeHPe|S{YnLd+=I7%dFQSnFDfT@DwkVyh25p6=4V3a^g62uCF zXzl*x;W>Hlcg}ad^PTT}=bU@z-jCaYOKLnGk1)wAynJ?E$KPpci@Z(k5}q?XSFF^yynx zU45H({l}kv_J$W~Hy=A4bx=X_o(!DkS($Tmg=g}e%PvgbIi*V0%|iJcWDHdlBb!vB zFD}>Rjv$0_@ZfBTa+r@S1mU;j+cz`Z{`ZGZ72eQ!-U>x})y2f{Bt zc<{3;&;P^b-`(@rukYIMZ@>Sa!i(B}{f)9M_iU&RzHr2QP0la=yX0HPo_T!dD>v>Q zDw_3V;pzU1-uSP@?F08(UCPVvbMQLRMlBqaPNYxCs=qFa{)(Jj)qwo8qe%t02pIxM z`n%FuRN)zbUt0~>ex+4UIz*?@iTuB@Xx5)^DuD&aS7zyB+nDuV${OFxS^VF$#>f6H z%+l{&tDgOT2iYX@zewlNiS>78>AN=lHNTE6Gj! zoh|pLqv-EfpjrP3)E8B>8(KU5ElgogKG;@tR&|xt37f8H&ZiG2wiAX`pCfe9fA0w8`!0ELj@9 zIk^1VrNzBvz6h-WgWVq zmSptMWbwR)uv;IIOtsw^odi4Tsoc`i?nrAmP^1*OE*k0y6kit(t*s7qb~cAv)&}LM zit5AB7|q)4)-G)bIP+G7I^*GBFsNiGEz9acYr||ij%xM2^)5qMYl``5alC$M-&f!~YLLHrBnx_OaV9!l? zb!RvfonY8wN?BAaWi+lBZGYPYm)FMB%r8YBi^3tdePScfY$c02Vm%nTYB&M^sF_z5 z7{evzHFZZbM;$0Onti~?ZKt1C7ml`t$6hRSa?ylBOD8^Q%kBU8V#*q6mmnBJXtn>Nw~WW7M07uk_KTxu2_1$?xD2g zxOzwn>UMM=`5mwP^$=TG8cA7$EkkaH|q!8+LwEcULI3 zc5KVqjHPwsvW?g|P=t-5q*yI+skSXbdv3;-IIiO?Dw4{!cB*|MLyoFa{$Gx5sxIud zM_OxX^?6GoEul`i(*)+%#JgMEj!1W7xT~iVw!*Fx4E8oU_1Cu4*KjkMudJ83F=2y7 zm9;^eWi?u$+|Vh?k~Fd@QBa1Qh7yOO(VbJ?(9zZ%a^q1drDuDz{6GNCV@8qogZT|^ zw4=MN9H&Xc`mW|kXAlFzDJI>n%nY^!h6!eBrW>M1qeiLpZqiQRa=if7SGkbi9EZKe zS8RT5H%?L@$sV^IOQn@`5$P6HHIE}j0fM%lf!?^b%Ka)HAF4W|RdR>1D?iqP`r^bKK_;roDG(M*B zIgP*6_^QS)P#$y_NxVL2ebd48i{FKI!#&(UXa4$&yPK_~*DUJ7P{F=rG zH9oHKDUBt#$E2KUjn`zqm8OMc((MFC3xRc`nzNB#l#|ZjXjo;V!3fqCFneBiZH2x>sA-}HiB-#VlUtl|+ zhxP!@(D)AJc!l^P+XLTcJK&jY2mCVI0Z%7CFre{l@?$IuiP%=7M9j?(*dF)|()eLw z9}#_YQXa66?SU_`+=KPOa^QU|2NttE9$J@ae2w*>|D^HU8H&DK<1&qH8gJA1bLxGn z5XUsGqusHg3~9XMLeO}KK8iKs!E^6B#4AxxyafJ;GUA^|m*Y8_G|)$!BSao?7Jg6s zB=&?!kV8Bfa)>w)hKTuSPy7UaPpkz0JhTIz4F0J^ls6=f_y%7T_@Q9$Yv?YOI5Ipu zyrthgX%LEv#DMRHy}*$){2iWQ!}oD-WE#E?PAA%VdH4{T4&TR&Y1%(Al#_hoiNhCoo_>BPZUm)Y$z{!1IVwoJ4lyLYHsGyOyL!awbz$upWZG1Ypps+7K zASb7<=^(h1P5qKemKI`u^4K5eNh2LYO=W8JK;lSlauo(!S}0qjg0du+?Q%VaFL^%c zbo-y13C=2iX`J$x)8%$gs&A>G52G4pkAsF&>w%(F&<6#5sFmZOacS;UQ$Gf(M!7&? zU-+FHKI5#GZj`pqg1*%Up{8VnZ&HT3RzD;r_wB1xuoz9PODP`eB>HpdVp4vp$(PJADq^&W zfdw4KlewI;yaK&)7NZ;XrdQ(-7Nu-$Rt)?B>le*a^|@Pq?4FjW^m&p^zGn{8SQNBL zFYA?=g6fUMjUa`zAG~W?YPBy_ox9IV8^JZNHiO#S?=D1zAFSR1KnN%=ea(Ro{{+P9@Yf6FH7 zb*Vs2fqzIl)tT7iAW6QCWE_E!QFvlM!>#cKQzM( zC4;;2H*dvdU#|d1YU7@yi)D%K%(SP}c4n8TZAb42?EP&BFv|~^+$X(`HNR9fiKjfW zDAn|k7rPEuKDJoMl%<}H{a3_y9Nfl^yys=+rxHwoCF8JoDA+!D$4O5z7vOrKDTT=z#7~QMGk+Pr&B2o zyTR-6C-XcRb3T{q`HT-p>zc!2qnt^-PHC~#oJmcqne5NsHhW|yIT5DusEOb!iu6P* zC`|5^L!wx|2R33;8~dMlGiS?i{^nOOJx{!rlYFu-?_?OD?_tm)CMoVqP8x5L@*i%(1^*ItSRi`P*(bOnF8LlyhC@Z(C%lrkW~Dv~g$7{q5{jyHsl9u2g(CD34k#tPf?> z?+N@^dWUxq|hJU{b13D-y*@+O9I@;CRvX%a(T_twOa zCx3Gil;s`vc>W3p+2~82Jf4GSJ@X%4m{VMxv$Y1Uvd~jp?b%ubZ^^Ew>iE z&ee^b+Sd-xwAZ;k!Cd4INPn_Np!{t8IOPk*DS!2U;dTMsV%v8JndjNx?EYZQ+oszO zz8|Tzjz@E10(0fAP(8Axj(Ir;+*wQ;ME>~N{!EOy>$UNL1+DT3sS7^_<9W`vaK9JT)yfNU3`@$ zM&3#bzh9cg`rW&w#rhRo8&*Saq@%Tf7ObdHzw`6OZ$$dYx%^Gh-ZX6(}ub>pE<$uWkVQO#9JObnD1`O)O$e z-8|=cuh@p0pLntA&$Y%1MdMo0OYys!_NpsUhus&JbVCr)3J2%+Cj7f zD}e`r?ZDmGWe)(iVw1-!2(c3P7)3xIZVqn*Zhdcfcsps*e8Vh2IK+76kpAhyle6&ySeMcC(pg&lH$Udb5LA~Tn}9b zfud@PZ%fX?(@v`Sd+!~&iIZ}^d+Oe*r>gc<{SZQ{Crg<lSaR*V|4!&R6d`7QNTY4>= zEc^6f%rE12x$HjiGpFGE937)hjvsZ0(9g4WKhP(VRwtydf|JSL1O82zJAR{+)?e%8 zbv>41S4;k#;48q~@|&Dd{IxcJwdAKS?0k24nBVk_;(yfUzh*M+NuN3Thl%Y;zFFWa zgHL^yZOlB=?oN7ma(?Q;xBWQy)`4#je7D>3f_HcmxjDUb8crqcwG(^?V0%7br294Y zn&KJpFUt8SePn@;Ebx&9{>BzKgm-n@k(szH@mm1mkVbw>fY-m`5?~&X-;m;Uk^B}F zuMFik?07wfFARjhD?<7Hn`bTQcmF&bDTA<+aD5PeCIN>)p9)+Bc|0ShBID?mhcC8A zN%I`%eFa`~;>Di27I-&>*K<9;UDhB^t5mwP_-%RcKp*^;ySTc#qF`22GrqZu7nJ(T{Kc0A%Hxs@%vJ^X z*gdws%MCRH-KfHLbJZPj!~VAJxW75x(b;-gN2`!jdnnc}{H^P|(NdusRW-f*mNL?v zK{%+3hC9ixE_ym$;g?^x`rYt4T+44<{n3d0+{GVmch*EhU16ua6)g>=S~wwo@upgs z>zi7@2H~Nujuvzrfk6E6%U+a3d_N=nEs-vM&Z;fF~bFVoe?#=q!W%o|W< z`el3OCS>{}uj!M_^|)rgEF&_tBA%}#7 zWJq&)K3@hiGIE$?3}z6UPGvj*}3X-vgw`u!$Is?Dxsyp4ZE zCvqCTUAX2nkdNQ+yfO}7KkBI;`3Au^I1b+rQO~&`pN!)H9~+wfh@9W&RI%d2yZ0k_ zxtwi3^8Uo)6O|w^X=CyI!s6pTH4S{c?>EWx|1t{LKlPhai3~ndhax#f;%oXE)iRN< zP+t>h3uf-ulx0#q_>LL^NFFAlHBDmYJPZX3pX+}?!NM5;P;R0)e$tx|Y)}Ep{ z3bn=*%@wQGlA_gsOk9Uop0H|dsCu5XY8@zADMDXYv{HnAt!P?K`LCimE6Pt5El*Gt zQ-%Vs;7O{!2_broM^%y{tp-LvV)E(}m;S=!RVTC}Bt1Pn&n(OpZw*sJzB?`jdT{4( z1CXzPQ6y>p?9IJ}=X4Hs>~916Q9n!9zXara(mG9ZzyD{8pUQIAi$q`cjr2dw%x zLEnh_%XR%cxBy>1(uCBf!*WLI>w@OGX7b>U<961cB}u8@-E42s{|?&RKT-e3LDN3y z7Wr(!xESsyOdhO~cR?Sr+I!%FX8t_z{A_&+P`^&!#CYI%e$cjlO0xP({VV9wm5TOY z{^~&=g+1um)Nc)FGk+coEDGApFX`Jrn|mG){9`L)y3#&dZpT%7{^nt zmXs91_H|iw9JC!b)Cby*d-|%yUx4-xWzho`P47MkdgqLhxThna&H7^8)bBytaZ{(A zgho11zfWe-H&`^~Gj7U`JKAE^v;89$T>$z8i)Q^iy@lXX6d*4HZO1M3TJ_|A6m%sv z@IhS9#QYrsZO3{2F^j(rd#N4A^(bhQsQ-^Fn)3gcMd$HQ(24vPSTy;|K-+Oup{)8Z zWYN!L(bLtID0`s1BGASk8E3Wtv>oSleHMQkXgiK;Q&#=gv*_<<(QkmZ{llZSOmPOx|Mc)nDj$8XdR{a~G?fIKzooTek6`%|7;KSdD7$;W=dc;0w ziN&DpIJ}hAekR)AZ_$)D0D3CcKNI8rtRM3IEiL$oF`q6LD1 za>uD(9&Bv9-l=I?THRQ?Y$-$N#*(FioW^Z2I%tVeA^si&<>6!fF(ooYWL$Y;jOGNR z(8d+5RGqKhPMC-v8QG)Wab!k~s3DY(4B>bi9$)_|P~!u74-}2+{sY>L+xZxFHKAPN zv}uXDF&EJoemI$PP4#kTNo_+TyksP<(s8?-7DiUa@KQ>JT3SVp(;9KwWU!*s>PDh5 zClp^N@L1W?8Fs_1{`vFDF}$&uWDuu%Ttxtf8(lBd18!@)s|%4-`f*oMGU_vf)p2T; zSJefb;L=5OX{ousUc6-4!m1_CvYMKPV58GmwQxz09P7&F``f~<)6?R(?eXrl{^oTk zMbKzkMr$nMs26y`S#APp!*{boFHa;wbo}r(JK|Gohd3cF z!ZAa38De-%XvY)Ul{LfT2TzY1 zjS3Y$^l&)Y+5bz>p^5~}^ecG)sQ0+X5ulCnXT^RZpnTLa8u9O}_*r{>O&BMNe&E~3 z70x{36(<@PtM()G^I-;yXY9u+=-v(o9AhUjr=Z@@tq9%GZm8o_N5(vUw7xY7=4+00 zMCA#EX4{iyf@`5b#y~$f#+`AH%HU&c_7lW@+W&`v>0J(Obl9}5=tSY&%DIj^YJBu8 usCap<92)Wj{yzluKSby#(J@@%1aCBPlVJac5hDwmfu+jW<3;vLP5uu%R0320 diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/obj.target/bufferutil/src/bufferutil.o b/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/obj.target/bufferutil/src/bufferutil.o deleted file mode 100644 index f7fc45a2e77ed29106b20b627ffd8cb65047fe48..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14184 zcmcgy4RBo5b-w$9y|oR3V1ffCT~w9W)Lv`#V@t+3lBJa`Yzx(r46!Y*SJJb+c(oF{ zZ)F6wV_1oJyU2AjkW8jchbH}@Lo%hUL)^qrVO-?UPRlSEhG~B4WRg}Crj#jVJPfJ( zefQnFd-rKqHj_!N=IOk1&$;KGzkBa{=k4bs+d4cRkI>B{e4>b<_hyIEAi)Z;K{QMH zO~A>wOu^*}epD1sFc1A}A9kf6*_(!ruyH^Eq4r<@k<+}Q8O(vOu3nv7RT>`ARk$hZ}Cr!GG4jJ_a*1# z^s%w<^yCM2KnF3m*`GU76M(DeQ)=k==}3)VhcOQp?MdTSiibMcX@3qw<*D!IJsa$3(v#lqI4~OOOh<-C?eP^Wl}p*vWyMnMR?I$#-mzFB zV+HTNJBSFZ-l#^2+a;E=_NSu`$J|kfP5NFLHApe0yU&UpLXR9PBb7-G$I^#{^Uq2h zu*4=AkUl$}5TTIF0VhNm^n?ZnMG<4XvhOT|`T1`Dje*_MDO*BAKSTU>Q?#6GMR zdiVZPM*wrYuOyK5X~oL5ZTRd)&FaiW&f^Y8V5j2TL+G!G0?61DIa?f#z%~c^%Wz`1 zSeow-?Y6Q zQl8Ih9@w$v5eqSUK7E-iSmkWoRE zCULN0h&Jm{ppNTdy5>1p$}>`q=RheBFqN6SgFW&**~4H(E@(@fu$9KxBQsGV{r>jn`EJl){(Szp%;#Lk; zfq{^mvprBOpR=^s{L$%`-t|siuA2B6)PCtdyt#8zOBTWbQ_s_myf5s{p7S@qn)zRt zp6{FXT+05`m;KOdAIW~`vq!TZdhBr{P6c&-i6CVHxdoMiRP}t1x3=30;HmBQR6T!V z?e%XTN50|#tT43`w67s3`%k$#Uqxs5@>>l^E*UEsHQHH>SEgkBb#Ple`OkEDhkvU7 ze6D|*ALJR<1J_-<$w_U<3$*y}6gGPM&sV%FfDlXHFxN z18lyklZQ3a60HRKxvr~DwrkS$n#9nnbY|=y<)kX5@<&hSGiQK#oYg{ltb~3x{JP8z z`%^mqmz=6!oLlmx>^V>Khne?Y`l;9RhUXkoBYV-8z2vQ$n1VC2mwfiI>?KdtL=Kpd z9i~0MM1mX*^Vx;D>=4rGhB&Ua$LTZg!{sC7PVuJdYh zotpvXBL9ZWC({Ba&&DhCZ>Z4!^IxdkW7-v3$$9qcc|ItfpJnIkG>%7oV(MeiAmO&m z^GL4WI83FB3zj-JSGM<8K0jaIg89hxQ~mE_n}li33l3JTHdp1w`v||>r`2Z4w}6b% zNp_^vWfwc&oN#^?1gkS>%DS|BFW!<$+t^5aD9AUU_3NF7>HF{ow0=GRuNZ4uzkZ8+ z58A+6hrW@|OU0J9V|IKnICwCYx>Lz9+BZe0@#*-(R@8P0*k&aU z;2puGMyUujzLFVu7ifzm5(BZpLsCw+l}g9cww1J{Nsg>lK@PvO)G%e@SUhECVhPDn z#!r1oyl3ETqhh zx%HLSnbv>6fVRaV2o}Dhu(is6iob6WIU;;_XDwxvG&I&l3Nmq9gX;~A;J;iP=iAyUnsh(D_mPF z64ZBDha)?-cGZnFHMgb?WQMVQq$8!n!==L;xL(7x#U)ygl^z*0m@>&k{E(FxH@YzG zoN?`SC8Nr*gzH%H(A!*uYKCiz8(n8tPdM5rce+R<(rxNcPFkbf(%h4p?r7Z3B1&0@ zC`Y>;xVBH0U_Q=}hV7`?e4GJS;i&f7`OKP2mBDE4vFz=ZeQ;!`lb&tdHZmAXNS}t+ zc4U%+c6=n+YYmSkVzveUMj~Uq(eAB--5qrMTIcvI4FNI%F5`j-ko#v zfxPgt!DEI-ga${3nVtfrPTLA??&@2O6LRp7Gs-#`-JgmLTOxEIHImU=EmzMKTgWHG z4F(tM;VfpX$HjZUy4-vl(69Mg=izHN_LHSyXN7WF!*RwrFow)`1{48C;+-*4ic z+x7xnY|r76`?$n}xL(0q0e?f?6I`ry>i5j6DqOUK@!=yD!$5( zLx-u~)6kFgOX|mON?N}(?#+4choTqIryFU!9#>G$8-##X%>=0DeGK>JyvtzF3iNSa z`bW?EEbb{+$87+FW59J&=83;RhbgZG^7f&R@@~PU<-Le|DNhZ&2!edxKtG$-?>o3R zE*tCA%cF7AiI{8O=ci__U-f_tj*Org( ztV`Z3!$UiKg@V6TPs8pm?-Z~Tw300m%RV3AaA8h zUbi8S&!Sr1R+qfd>x6g|bltRmn_cowKwc0`)Q{hIwY(RVJOHO*)4M6d4Wd9l?L=KU|1yo(j&{ijRb1w$TEwjggI_9v=cE42{f66A3& z){Qh?*DF5Ve;YStqiNG?6rVCz1i|-=M!--1u?4|r+B*yVj-#J`*5?s@!)d@;Xcul2 zqS5Hk^AZ}#<*nHyCg8T3^uI;$U--NN0rR9wRKMtJnBK-{TUW5KF@D|{V<=pv# zq7lIgg6A`3>DA~hHlN%HO`JPfvH7G`CQdDj%_pl1CeD>yY`!`EGp{wE;=@6qxr;j;!DbeS@c&Uzt0*baUFi&h5xIf0tbJ8?g83#`*4a;V~Ef zkPCmpg@4b5zvjY!?7}~3q#Wm8sc=36RbxHxP&jK|)p#-)ckw@^aK|4j#9zAb7Zm;= zWLINXdc!sTMe-pFXLBT2&_1!Ol%ubU~?5u+spJ-D5zp2 zYnNfCXx1}0GHSIU86Yuv_yPRy-C0uWa@bYchMVU8QqNHaBI|ZGg_|}fMh0RDd}l%> z)=F8)K`YYT-PIFqimRXa=>R2_m?^0ygqBU) zV}~qOb1SIUJ=WbZ2Ay5?-C}vSr!g8SiVHVxkEITECWow13;&XK1+i*GiRYVk#16M5 zM$%XCQpp%DT@j7O(rGJYNB76#iL&ldwQ$GHu)4V|fgc3UV|H07vfx{(NLr8`Ue}p+ zB47B?;rvcuuGF{3)1xrm88{FBoX9&KD3cO;H5tLF)0$nuax>{G*4|<8R+gt_oxiDf zL~Z6WKMjKZ$z)+^s4TBvx7o6pC=Xdf-6<@*lpVLyk%ycgzqY1Qv2nR073Il3y-mvQ z;+m<4un1SIv5p$pdF2_@zB?v{t>MAZaV4XnHKsqMQ3* z;Qn~h8gfLLj;;KO0#=xel|D?A1Rz|CjiSEJ`RF2@V~S9jTOzh%;>gbu(Op9cXRj%d z!|xfG_t*EG!inhI4cu`QT=~P{2tUKRsUbB{ucL!>Mx6(GT8*P!l>2$oTZH%mAmx6U z5OV*R5cIDDdRvq}pnn%Q>E{SRp8@o?DEknU8;Qeiq=@iha{Al5&8a1MQG7Z~yi16$ z5#B4rX~jo*P0kf6__)o>1`XgwXF91+{+KuX`yUdNQBrH|7)d`Ksz?oV@or`9b&- z#rK}#^H46v-9U(O(qGVfm^k##5<>6aCxqT#A%xyiAK8~6!v{Xehp;7kAj diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/obj.target/validation.node b/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/obj.target/validation.node deleted file mode 100755 index 2c97bfb80678486588e61c5f4616468442bf6e55..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18448 zcmeHP4|G)3nZJ_^I07;Vs8s1XU{p{TGD!#trjQUOG0LATN$_9U=Omesfg}@W-h|)^ z#ttB})3K>_TaTV?+4Y?2w%uL2Z8^4e*I1}%J>8{RxAf1pS*_bdsiH+nyB@Q@-@W%u z-n=A0cH6UO&*A3W`QCTG?|%2Y-~H}=_ucot+#g(5<8rx#mGVWtAU12R5G8<>0Yxbh zK5>y)B<72cNV>&O*m%9lQ;5tGl0N7cVsMqp>maZmd8(%80iFQ;1nA7Nf~LEHGS3BW zm5pK5;2%i!|>=fR(NVQx8tPa{6CftbM;`xX=G~dc@40>cZ}+_Y z=(k^g_`XXI*RKBJd;d{Tw)fHds)Mhdc>na=SD(D2{N3R#vl<5^z1$)1bw_)bIqdhZ z4!q8ZJM8hcqrFWwd?Bur4*SkQeczQrYy)kfm@X~{eCBFZX||Xl%Ant|j|fqv>AQj3 z`PrwZ=UDs~i#O5#C6x-FC9aU`Oh4rR0!5U68uUUN{fB6O0F7Rae$58`bC7>`fe`b+ zzd&3fIIp`e!@P&xNq;>@{^jDEp!eGN2OzKTqe9$+a<=zL;FWMvtAD)?{3*zrSBbR^ z{FkEl3BW-#KBVg}0e|;ZLcC<*u-`$*p9Xy?{{ZL*A>V3G7{=DlXqOQ;Low4Zgc0eA zn8IiS5Jp|&dZRTQ3vZ3Y&2X%7eRW5)E8G}r?g%T|_!Oh1H$(xUj>x@Wyrsw3q$N~$ zgyQjVTo`w52o!Dxy)|S;qFu!s!aIVSZrxDSQ&wIT+nVSMcbV}Zxlj@a+#Kp^?Fcut zM7zV)fnX2HyLN2DZ{udW5Y1k?v3Xm##SE0ybwOq5P!kDvv{pwGU8bx`kwu%!0%f%w z(PpXPrf?g&*wqpa*4J-nFv=pjqLyUoq0yq{4PmoBDw*oKavBLn>Z#m@lCEfLI8dk* zxh)pz4iw!M4sEXvb#yd`TDAveuL|qKu{h1zW!7zI2pG#@jzl;Z3@RB)%d+*M?P1oP zK(+dw`kEf-9LSY6Dy(6-Vd>9KFJB*uZLjNU4R?p}1B;xs$2pcS+Z5V?;g6rgN;!4b z%F!}7=J2hyP^3c-QlPXZ(bdACZwz;KcZAHabb ztSOt=f5-GS5U35CmI1PAls1^LNY~bK%!P)Xoz2mXVEwHvvQ79xnWbDYbPMKMNmoSg zEt8b24VfW{8-W$|G0dBoxwFcI{N{uiwv415dK`&aUzBE^P{tTPFUC~L_6Pn}UfmH6 z#m?ft;(>3MF z?hxTCJq`ysE7WcWuSETa}mBggUT5S!m8$6ey~W!AZhu zbqStrr7v%SzPNvdTeG6{98;^*=(H>k_O^t(xsH`L?(7Z+W3gy#!r4hvqKAQ!#`air zN4BPeKRfp{dr4yqw}l=d2UFfHjm~Im0(an!NORn5ZMpGAe?00hCE9JaqmQk`3yHTV ziV?q_h|Tm zhBL57WBD8nZ`AN64cBP6QA0z+HVt3V@O2H})bO_&UW7d!<u<|3vZi zU=L0HeHvyod`!bHY4}wQ?_QwzTQzLgutURc4NVRCEKm8r)NpR4!hISp(y$cckT*?; zBd{OgC9oIaJoJmOR>SQYzN6tB^oR5n8a@m?i67E1i9LB9XrI>bB*u^U7bzd`F!soV zcfuZoKhiM7`oO<}daiOIzRLRWwBKoXm~f#GKPH6Bp8|B60en)!V(JC_1NH-TW`o~VBE)s92c9y* zYlYZIhzH3qV4wzGh&{>f@;<@WEpb#TpbMyBJ&RwRFC(wv! z=jHGqs*F6r6}g?{;bTCXQg0+r%saZaV21A+ApkuXOhWhI)qw7TfA-;F^#gFW_46-1 zzu>UCQopF*F!U>sA2|HvjZoyo+)R>ZUzyMFBy91qx8WTq^!Tys?VBM{pZf)rJj3k_-fY+KRA=H1f|bV(2EcRJt^!5Z@rQE zI;kmgphRRUEuZzaC+u5ER)@m5{9n@fd=YF|8Coi!CRNv^+KwmAhYF& zG-jshIJi?y&qypazknma_Ba9>av+uI(}^R=6Yi9W&dx88HPS&@;$}TJ+*$FRQ;w=d zqm9Z*1qUcxs^EdzBNX|F&uUsxp%t1;m1Om#<(2Mst(2a*q7ICTk~*VeI_N=XJXW7M z5FDCx(=#xNl3Jl)CVc9yKQp!*PMsbd4{1-R<4JFsv3J0`=Uw#QdnkW@@V!*6d-ex^)8kM5Jn(W`f2PWnJd>BHm};)_KJ+OVEO{p1yf%5pow&q%sCFbd z&{wg#XLehEV1RRpO=b>(OJsKEXX!g$OTOds9@;UII$81Tj#vA3z4vSHo))&g?^>zD zuJ=-BDo%R$tOizb%DeY^K=6KQ$KOIO*iU&sJFw#meY<`$#rxo`pp6t{cweTwCC|7L zN$;WHd(@=LyU&C@-ufQ($;8m++&Qje&kat^Y{qp-vFjwSCnyKQ9M{Pk-I<$VhmVbn z%o5%QuYGqn15bX(Ro>+B?)yjfvSg0;&{U@dVZMy}((<6k``|ypy@vI7*3$No^Qb7!1^aDPX|w+A*efC0=Bk(SYa?R8%Ftp_d(8?;WU0SJuuUr0dHzI zOHSjbpJwwu_&o85#=qd*cZm2M#4$=w!-7H$RgZuk7gG;wzExzl9Jibts~G2&bgZM5 za$2R19<5aKOzv{h!5QgFcc$A74^IVuC^`2I?CuE+>^*IIP^g@;)}6Yqzyo*X6oEuN z>+UOXqd<_?8Heoc~W_nity&-kqUO^J8rH4Gy32c6k3Z`*qUCA z=lOJ_)*6idV*Tc1sCVyu*}NoK>2al+JTDG&LQ&8lHaiq_d#<1_I|V6$v>#Thx#=yQ zbhZ0vK0Ae_?q;h~dj`xkAXq2`gF|XaXd~eg6=^JG_iAY{wZ0DR`<-<^vBqmjI>Gsz z*>xPNq_Y2Mh%loN5=-M)+xy4>8sD0(_F&HM?L%W2n#I=8fb`M5KQ%q+d{}g(-fam< z9$6wiq@Sj!)TZb~W#E=gPy4h@IS(QHk%71V($3zK%l<=)-OjTkm*-83C)b`_tsVxa zWt2SwiDucM-7AtquDt`PYL7WpnJD#fn^TP%oCc<=;C`AN;RCu`kz5_-!-JIR(RGWb zJ(p+NcsyHkd2&1@w?BV0|7iQI%|FiJk99Vu!;nnQA5&Xw#vFR*wAHLNz0RY*f57&m zE%59wVqGKm)~e^1}$+558hp&l3JT&)|sicy#H?is=WrfWG*9{R4ll#5Pwso5oO z!+Mrs)!nljQmhFBhz)`C8EK08*NUg)}K~HK>aNqLoxd>d6o^7LvZD93$ z*_@Wn%d%t6+1oj+>cG>p-CFNSxw1&mqi_FM6SI=#7H0THuJv-8Ho9Pdh2sy3+`?4& zv{LEuc0JtkP@VY&fuE|bNiM85Gt$}lnL2E#%N@(S;bw@|_dS|?bPok-!}sF0)YhM4 zhT&5v<1#U@KrOy5X*L9g1ZI@(4YR*G<5qp8@_Ho9G7)-vj~4?4} z+8JJkH!wI^S|-nlmTukIy{yn5DD)REUlxzGEaTyk5tXl9j2(F0;pd{zE??R#T{ZR~ zebHjyDj$z=f#>dwc4!6dAX4Kal_Jw@S@|aSbZ~KZ}HZ3Bf$MQlR(93f( zu|Vl$`0L`q&Tez(qQzQEmSj(nQHry+MA-MSkNME4rK@x;u|Q%t?2Q|W!%@p7o(I2> zBY9BcBB911!NUWe|_ogTM>l8yTt31074>LEx3| zC_l(P8a9Mynh+KyH+W@om*CzAxJ`UX|rAq1Lfj)iU`-Pp) z>c^e7eymaaW#BJ_&0n(fLvA!HHl(kD)2T;0_>Y1AYplk`j^@N5_>RNg{N^Luf2&_xZ2hX8p8wY_8@^Wc(}#Nd(GI`C7*qduHhzrng>=CJ z7c6kW0v9ZB!2%a7@PBWCLcHr6)Ehi(1LQXagfHUUn~>im;B}k$FF+m&^V?GHJ^4*4 zUUSNC*zpQdxRLp0jqks?CnWy^Tn&s$Mlej5uQaA**12OXyk@^fcwgQIUl$=?GOli`1n zJ=@ZBnAJ+tCux69h?tab3 z{_@=n^FfPgn+2?T>S9^cPwd|apIf{)L?R%S!d&J82<+M#qLK5v&dfCtrjoBvtzz&0jv z{a{j&T563@xN4befx=Y_obw7-7U0}gxFT>4E1V;$=BmQEVyQW)a9UK&J%zIuYK|$K zGgi$dg{ux(@g4c{4y)#dqANu>4-~Exp|2~P9t(c>AydAzoVo`qoTH-rRN=gX>XAsI0J*l@0GNjr`|kkxWz8Z@|98Mj@UPc6*L%L4yI$iR!1)0K8>YN{fP9fp zpC|q}aK24gsqxo=^Uc8ujW5o_g-+DB1UTn4lM6eJD&X~cqEWxi!24}@1o)s0zaKd5 z!)9Et&qKhuo-nyEOTGb|doCu*dye(9^jX5G&mida>@1QCE7aS-?fNN-`lbHA2VGPu z+=cO*1sAV`e)Md%cO7tR{9G8%BH-5e5?>A6+Vi;JA2$QH66a-~13&1%f91fvYD!5F ztiKBQz~!UyMU3ydyFiWC0*u#o;P!Z-`+-}@hl__C_}|!YdiNpV)_h{T)HA^C@lrps z@ym5a&waMR`U`D1>6>l14|vRmlm4;|C;fyCC%q6$hCSYCty)4rQR`eUaC`jLrycY+ z9QbUtHp!!io<=piQ9MFzPo28yoL1YMM4w zH`Z<3z)-sJWT_aL32Tgvd0}LTzZ=1M_{M)+i3}5&P~JGbnPfEDWJFuRFca2US5#=m z5C?`pr!_mxaJ(iOWAGF@wl1(d+SV2ioAH`hv{M&q?RCgXsSfvG6veo~Dib!FD@TP# zO;$=v%#53OC+&xm7`Ie!GS<~KG-8xT<0B2T(`aFYWE^jPRmh~R$S_)?##R}0XtbKq zSlkFDdIcT>yF0>WxYb{}yu1*S$6=DenCkHoaT{iAr%(^1t%=Ugov32NWb|eZt6|h^ zs#+g3f*aP-C8g&2x^~^hHC5}3jWsn5!A7I8YR$SJIeN=V{aeGP(cNO0?TN1K{^nkk zBKR{aqct8i)LU_3ti5AH)%v<>jGzo|u?K5TBIIULF?ge4LdBDeE*cwmIDRbNBw}>N zjkKCDc5Q5^mLvLh++bM-dR11+@Eje8qvLbOncdD9yz`Iww8v@c)({K?pOhmz$&kCV zMGh-Z850)y2MYmZ+tvikjaim0TajsFBPp}7S7(oV%o#)#kWAm7bTHV2L52|aM-2Ep z-w5W(2MW>%_Sm`6&s(gRHTaU-FuJlc%+oO+&o82VqDXbwlm7;7AVJpv diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/obj.target/validation/src/validation.o b/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/obj.target/validation/src/validation.o deleted file mode 100644 index bf92948c2a0655777559195ea4fb3c09ff4eb22e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12648 zcmdT~eQ;FQb-()oUfb9U7$;6_#|y?bV6)On0whJo64FXm0a->L#MpSflAh4QYFF8P zD}e(CL-H%B>+|D#8rG5;`TehmuUD z>hE{oy}NIpKERo2XL?6(&pY>=^SkGs`+c82AKuaKa=C;~F5wYnPKbl6EJ>Xt>qMOh zN%>0f)Vp2LPbhk)qIWBLkD{v;y;so(6kV_AgP=@(xu5Rt@5x@;Q8;og*R-~<_sq<% zXJ=;%edlwl*5>+7OD=cU+OutImr)K`y%JZ2s*-PG>xz-C!D<>>-ytMPu@9V>{ ztYBip$%TsqmoE6=+AJZ?dB^0Y=_Zf!yun(2-={o1U zs#1NY5flrx$)W}0!zZ7P?0r3VrEr=dF2xh>`0{&~O&9%Bzd-%{r#vUZ@8`mo{HG>` zoBX+koxT&{55|MJABEl?K3QmSWv{vmO-s$K{^!03pzKwTd0+ObH*<^sRL5+#IN9{b z_{!mvp<^r3(H0Z{0EapEt53-u5Ezh9hqaq`FqOZ>;TLpHm%Aj>fChdZuJ)_*Ge zK0RsiA2ZPqKmRBCQ%IrARkyj``tF6Lg?_x()w(Y8eSv%^+~&IcptmrC5+0tNT`v5` z?+4mOai07QboXQ6v#+@t`h5OlUuP}rZu6g7>Wm=5SMaWA2>blUzy05{vllPmC-+XM zcrgR>!r$Ld-@&E9om?nCAHIZw;O@mbs12V)6fR^|A}BBVkIxV^kDtOg!ZcO%=Z-Sx z3Vu#9Z2seKkdG<;MgOr=tETTP@N}GXbYF}p5NSJ|yVGN}MW->5f1fqd~%F@4Ci23dzUcX+K2!>?k>$$oKhjZtWsQXZB1J z8|O7I=d@)3cty|-i%O?ak9x4umsq+#8jlV2^|sdw`4%-}$%I&KwLv7t|bj1hSF;Q$(O<5p!QR!c5r45uTOhQrDRzuSl&0FKm^jSECH zeflxkDIf_3WluqNY)Cp692_L5;!qJLv{&}h9h{uHz0+@-w`7}ru3Vq*`xiOuGZ2&L zwG6~(pbV-5@o}&+5DI~+MWq_5RNYWg#S6;A>ar@o*Ozbgp7pTNri)uep-3LwlRKvH?p zu+;y25ryx|xB4(gPfx-WU2nbadJx?`{jTZDd(dNMyS*ADd*&fIqEE8^7hpt>4_Z`* zY5=S(v4D9K;LjI-{w2Hmc%^!?R=4X+RO<9=oyvG}b@^S0bWo;>nE_d$qg%2wuIXZ~ z)n_iXLX>;THfYKLXMi~r5XDjtXjaV{tMuW7_JMwCosmi%R?TW2o6f#UopMh?er0|B zZ~DhI`eUc9)3J5wC8%s&n+UJ-^vB#@TQF_ik{~i&dp!K_mVXtSj~P4{@Vtem84tFg zr8J(54F$N`G&Wi@%WkYTjg97!(`}y>F3N?LQ(dEBhl0bhk0Anj4o~rHR2Mp-4xmxls0-%wdGRmJgG%FIOLQe&Pt^(8PtV=`VaUBiCY;?_cF`?*bYwA^0G zfl2HDCIh$PIp>)S_40efAM}eXj3{V_kdUSb|}c39LqNovyp`;= z60XBO*PY9}-VI<6&x%KMKF^CL)G;{smagnTNEWKia>x ztjGNnd?QMW<=0OrNBS{;w4ScV9$P)OS^BH!Khi(*N9zMOS%QtKxA4vMqfO~A<_GoS zO7F7{Tz8}dC+qe6b?7w#<23ZT@!Z3;QTwUuwbxd!j+;Gy?6UD~Ry}{M%DHJi`(N7h z(Y_*>J~V1Z2SCk~MMv~o%7_O|6E-xjuSdqfxHl<7=9y?&f581L%>>Rtc znhLA=R6;d8)9B?mOgBT-_vq_o#pf5yiI@xRjnA=)7w8cer%>n9Xq}V4kkx=pcl9nwVI29c=L~vg!nHl4-xZd$NSSN14_OETYFb zPwQ=3M6cJTw|x=4r)+ww7ttHC={>fHUfibl_#%3yP4AIK^bXtfcn7gioTqGhJa=n7 zeeb&zc}yqqByIcpU+jkir;xX>r!g3lbK|r9_G-OLX();k( z@n(R>^@Vu1;?a0jcqgvLTSb8_sVNip-B!7@XQJNMtXKINB%lWe$Ro|ZNt0QhWCoX)BR!+c%?yw*8m=-uQ~8e08iJK zV^;h3U4>Wb&$kF6_bn2o+#cU{;JpgG<;Y`wAF$#5O5wScgD3sge4yauSmXN@2i`e2 z7eGGo*5lFseF`{G6&mj^7Qp)?^z8j*#)kKx4R4FWV=S18z+*ggVp)86FG8x*PoZZ| zTGp%mQ^FbOtwWwptOrv!^6dWkFnK?NeAc%LkFM_uyz4m($A!@o*8frOGeZ zY>x_K@b(@^xgHf7Z;1_!a%Xv1bZp5}nnkQkPsPZhJtxI-^5CmmzjA2?*=x}M4%=L0 zZ++gu|Dod99;*?*mmTsq9lY08MdF1N|6^I+og(9qpKN07fdwxr5pPKG`|-X8 zJB%ZWx8l2Ae958zeFy(bhy6;`CAfE3gB?MYt&6a{rxkCNcaKOp_+yIa+P(%Y{G!AD zs}=Hl#W%t0I|0V~O^5zc>|=Cd`S&>ZdIz6$@PF;#zvbXRaPUiQb2!Vp+rdBX;3pmY zbBgCoyMpugcgq+q>PhuJo+V6Pi=kP^iN&bpT3k zZ0<2r82k;mq3t;|I*^QqySER@GSLI;wR5%bEnFETWr*7AkXXZ*d?d7`JB7iMG7q(w zz#qt%h7OYI)$<^hrVSb91u^Dyc6Bps)f;`dp*4>GcUhzpGoo`)A(3Z}$ zHI7UFQ?q!N=E$#Yi>1fVkuAeT^yfNd%|3Iz)f2nwc`T(ydv=YQ+xwELbVdKN#?X8b z;;nOJ&rsZ&bSiKxQK&YSj>z>pk}-$t_jhyswwzZ>21jdJkBNn+e41@X2ei6GeQ#1N z?Q*uW3G{y*mAkX0Si1#%ozu=iV@UPHn2`=2wEjJH!ccRE6V$J z7Y_Q|Z@aww?z6hb9KJPK;Zyc269419MSyGg9f^zuF_M-e{CI7mTe?!T?qvUTY z`8!Jfu9D08?7*D`^AW%8%t!nN$pbe{igKSNMY*4+9OWKY@-Hj-A1V2tD!KFr_TN(S z*OdIMlFRyS!T<0w|0Bfddi6(H4&pjO+I{`yIPG9ATbl1Q>1-Xd%F9Dm{9z0lkOJc4@h?j@mHj>EMZZv00QH-h~*DV#7!_X=@{6u4PZ;Jru+d)^1r{vSx6 z7UB(1_Jemwf%ijF1mQi((GPy6jsi-V;+U4jDD>U;!#pG2Jhe9Xq*>F@j<0X3LIWN Jxj!Mq{{Xr@3swLC diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/validation.node b/s4t-server-node/node_modules/autobahn/node_modules/ws/build/Release/validation.node deleted file mode 100755 index 2c97bfb80678486588e61c5f4616468442bf6e55..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18448 zcmeHP4|G)3nZJ_^I07;Vs8s1XU{p{TGD!#trjQUOG0LATN$_9U=Omesfg}@W-h|)^ z#ttB})3K>_TaTV?+4Y?2w%uL2Z8^4e*I1}%J>8{RxAf1pS*_bdsiH+nyB@Q@-@W%u z-n=A0cH6UO&*A3W`QCTG?|%2Y-~H}=_ucot+#g(5<8rx#mGVWtAU12R5G8<>0Yxbh zK5>y)B<72cNV>&O*m%9lQ;5tGl0N7cVsMqp>maZmd8(%80iFQ;1nA7Nf~LEHGS3BW zm5pK5;2%i!|>=fR(NVQx8tPa{6CftbM;`xX=G~dc@40>cZ}+_Y z=(k^g_`XXI*RKBJd;d{Tw)fHds)Mhdc>na=SD(D2{N3R#vl<5^z1$)1bw_)bIqdhZ z4!q8ZJM8hcqrFWwd?Bur4*SkQeczQrYy)kfm@X~{eCBFZX||Xl%Ant|j|fqv>AQj3 z`PrwZ=UDs~i#O5#C6x-FC9aU`Oh4rR0!5U68uUUN{fB6O0F7Rae$58`bC7>`fe`b+ zzd&3fIIp`e!@P&xNq;>@{^jDEp!eGN2OzKTqe9$+a<=zL;FWMvtAD)?{3*zrSBbR^ z{FkEl3BW-#KBVg}0e|;ZLcC<*u-`$*p9Xy?{{ZL*A>V3G7{=DlXqOQ;Low4Zgc0eA zn8IiS5Jp|&dZRTQ3vZ3Y&2X%7eRW5)E8G}r?g%T|_!Oh1H$(xUj>x@Wyrsw3q$N~$ zgyQjVTo`w52o!Dxy)|S;qFu!s!aIVSZrxDSQ&wIT+nVSMcbV}Zxlj@a+#Kp^?Fcut zM7zV)fnX2HyLN2DZ{udW5Y1k?v3Xm##SE0ybwOq5P!kDvv{pwGU8bx`kwu%!0%f%w z(PpXPrf?g&*wqpa*4J-nFv=pjqLyUoq0yq{4PmoBDw*oKavBLn>Z#m@lCEfLI8dk* zxh)pz4iw!M4sEXvb#yd`TDAveuL|qKu{h1zW!7zI2pG#@jzl;Z3@RB)%d+*M?P1oP zK(+dw`kEf-9LSY6Dy(6-Vd>9KFJB*uZLjNU4R?p}1B;xs$2pcS+Z5V?;g6rgN;!4b z%F!}7=J2hyP^3c-QlPXZ(bdACZwz;KcZAHabb ztSOt=f5-GS5U35CmI1PAls1^LNY~bK%!P)Xoz2mXVEwHvvQ79xnWbDYbPMKMNmoSg zEt8b24VfW{8-W$|G0dBoxwFcI{N{uiwv415dK`&aUzBE^P{tTPFUC~L_6Pn}UfmH6 z#m?ft;(>3MF z?hxTCJq`ysE7WcWuSETa}mBggUT5S!m8$6ey~W!AZhu zbqStrr7v%SzPNvdTeG6{98;^*=(H>k_O^t(xsH`L?(7Z+W3gy#!r4hvqKAQ!#`air zN4BPeKRfp{dr4yqw}l=d2UFfHjm~Im0(an!NORn5ZMpGAe?00hCE9JaqmQk`3yHTV ziV?q_h|Tm zhBL57WBD8nZ`AN64cBP6QA0z+HVt3V@O2H})bO_&UW7d!<u<|3vZi zU=L0HeHvyod`!bHY4}wQ?_QwzTQzLgutURc4NVRCEKm8r)NpR4!hISp(y$cckT*?; zBd{OgC9oIaJoJmOR>SQYzN6tB^oR5n8a@m?i67E1i9LB9XrI>bB*u^U7bzd`F!soV zcfuZoKhiM7`oO<}daiOIzRLRWwBKoXm~f#GKPH6Bp8|B60en)!V(JC_1NH-TW`o~VBE)s92c9y* zYlYZIhzH3qV4wzGh&{>f@;<@WEpb#TpbMyBJ&RwRFC(wv! z=jHGqs*F6r6}g?{;bTCXQg0+r%saZaV21A+ApkuXOhWhI)qw7TfA-;F^#gFW_46-1 zzu>UCQopF*F!U>sA2|HvjZoyo+)R>ZUzyMFBy91qx8WTq^!Tys?VBM{pZf)rJj3k_-fY+KRA=H1f|bV(2EcRJt^!5Z@rQE zI;kmgphRRUEuZzaC+u5ER)@m5{9n@fd=YF|8Coi!CRNv^+KwmAhYF& zG-jshIJi?y&qypazknma_Ba9>av+uI(}^R=6Yi9W&dx88HPS&@;$}TJ+*$FRQ;w=d zqm9Z*1qUcxs^EdzBNX|F&uUsxp%t1;m1Om#<(2Mst(2a*q7ICTk~*VeI_N=XJXW7M z5FDCx(=#xNl3Jl)CVc9yKQp!*PMsbd4{1-R<4JFsv3J0`=Uw#QdnkW@@V!*6d-ex^)8kM5Jn(W`f2PWnJd>BHm};)_KJ+OVEO{p1yf%5pow&q%sCFbd z&{wg#XLehEV1RRpO=b>(OJsKEXX!g$OTOds9@;UII$81Tj#vA3z4vSHo))&g?^>zD zuJ=-BDo%R$tOizb%DeY^K=6KQ$KOIO*iU&sJFw#meY<`$#rxo`pp6t{cweTwCC|7L zN$;WHd(@=LyU&C@-ufQ($;8m++&Qje&kat^Y{qp-vFjwSCnyKQ9M{Pk-I<$VhmVbn z%o5%QuYGqn15bX(Ro>+B?)yjfvSg0;&{U@dVZMy}((<6k``|ypy@vI7*3$No^Qb7!1^aDPX|w+A*efC0=Bk(SYa?R8%Ftp_d(8?;WU0SJuuUr0dHzI zOHSjbpJwwu_&o85#=qd*cZm2M#4$=w!-7H$RgZuk7gG;wzExzl9Jibts~G2&bgZM5 za$2R19<5aKOzv{h!5QgFcc$A74^IVuC^`2I?CuE+>^*IIP^g@;)}6Yqzyo*X6oEuN z>+UOXqd<_?8Heoc~W_nity&-kqUO^J8rH4Gy32c6k3Z`*qUCA z=lOJ_)*6idV*Tc1sCVyu*}NoK>2al+JTDG&LQ&8lHaiq_d#<1_I|V6$v>#Thx#=yQ zbhZ0vK0Ae_?q;h~dj`xkAXq2`gF|XaXd~eg6=^JG_iAY{wZ0DR`<-<^vBqmjI>Gsz z*>xPNq_Y2Mh%loN5=-M)+xy4>8sD0(_F&HM?L%W2n#I=8fb`M5KQ%q+d{}g(-fam< z9$6wiq@Sj!)TZb~W#E=gPy4h@IS(QHk%71V($3zK%l<=)-OjTkm*-83C)b`_tsVxa zWt2SwiDucM-7AtquDt`PYL7WpnJD#fn^TP%oCc<=;C`AN;RCu`kz5_-!-JIR(RGWb zJ(p+NcsyHkd2&1@w?BV0|7iQI%|FiJk99Vu!;nnQA5&Xw#vFR*wAHLNz0RY*f57&m zE%59wVqGKm)~e^1}$+558hp&l3JT&)|sicy#H?is=WrfWG*9{R4ll#5Pwso5oO z!+Mrs)!nljQmhFBhz)`C8EK08*NUg)}K~HK>aNqLoxd>d6o^7LvZD93$ z*_@Wn%d%t6+1oj+>cG>p-CFNSxw1&mqi_FM6SI=#7H0THuJv-8Ho9Pdh2sy3+`?4& zv{LEuc0JtkP@VY&fuE|bNiM85Gt$}lnL2E#%N@(S;bw@|_dS|?bPok-!}sF0)YhM4 zhT&5v<1#U@KrOy5X*L9g1ZI@(4YR*G<5qp8@_Ho9G7)-vj~4?4} z+8JJkH!wI^S|-nlmTukIy{yn5DD)REUlxzGEaTyk5tXl9j2(F0;pd{zE??R#T{ZR~ zebHjyDj$z=f#>dwc4!6dAX4Kal_Jw@S@|aSbZ~KZ}HZ3Bf$MQlR(93f( zu|Vl$`0L`q&Tez(qQzQEmSj(nQHry+MA-MSkNME4rK@x;u|Q%t?2Q|W!%@p7o(I2> zBY9BcBB911!NUWe|_ogTM>l8yTt31074>LEx3| zC_l(P8a9Mynh+KyH+W@om*CzAxJ`UX|rAq1Lfj)iU`-Pp) z>c^e7eymaaW#BJ_&0n(fLvA!HHl(kD)2T;0_>Y1AYplk`j^@N5_>RNg{N^Luf2&_xZ2hX8p8wY_8@^Wc(}#Nd(GI`C7*qduHhzrng>=CJ z7c6kW0v9ZB!2%a7@PBWCLcHr6)Ehi(1LQXagfHUUn~>im;B}k$FF+m&^V?GHJ^4*4 zUUSNC*zpQdxRLp0jqks?CnWy^Tn&s$Mlej5uQaA**12OXyk@^fcwgQIUl$=?GOli`1n zJ=@ZBnAJ+tCux69h?tab3 z{_@=n^FfPgn+2?T>S9^cPwd|apIf{)L?R%S!d&J82<+M#qLK5v&dfCtrjoBvtzz&0jv z{a{j&T563@xN4befx=Y_obw7-7U0}gxFT>4E1V;$=BmQEVyQW)a9UK&J%zIuYK|$K zGgi$dg{ux(@g4c{4y)#dqANu>4-~Exp|2~P9t(c>AydAzoVo`qoTH-rRN=gX>XAsI0J*l@0GNjr`|kkxWz8Z@|98Mj@UPc6*L%L4yI$iR!1)0K8>YN{fP9fp zpC|q}aK24gsqxo=^Uc8ujW5o_g-+DB1UTn4lM6eJD&X~cqEWxi!24}@1o)s0zaKd5 z!)9Et&qKhuo-nyEOTGb|doCu*dye(9^jX5G&mida>@1QCE7aS-?fNN-`lbHA2VGPu z+=cO*1sAV`e)Md%cO7tR{9G8%BH-5e5?>A6+Vi;JA2$QH66a-~13&1%f91fvYD!5F ztiKBQz~!UyMU3ydyFiWC0*u#o;P!Z-`+-}@hl__C_}|!YdiNpV)_h{T)HA^C@lrps z@ym5a&waMR`U`D1>6>l14|vRmlm4;|C;fyCC%q6$hCSYCty)4rQR`eUaC`jLrycY+ z9QbUtHp!!io<=piQ9MFzPo28yoL1YMM4w zH`Z<3z)-sJWT_aL32Tgvd0}LTzZ=1M_{M)+i3}5&P~JGbnPfEDWJFuRFca2US5#=m z5C?`pr!_mxaJ(iOWAGF@wl1(d+SV2ioAH`hv{M&q?RCgXsSfvG6veo~Dib!FD@TP# zO;$=v%#53OC+&xm7`Ie!GS<~KG-8xT<0B2T(`aFYWE^jPRmh~R$S_)?##R}0XtbKq zSlkFDdIcT>yF0>WxYb{}yu1*S$6=DenCkHoaT{iAr%(^1t%=Ugov32NWb|eZt6|h^ zs#+g3f*aP-C8g&2x^~^hHC5}3jWsn5!A7I8YR$SJIeN=V{aeGP(cNO0?TN1K{^nkk zBKR{aqct8i)LU_3ti5AH)%v<>jGzo|u?K5TBIIULF?ge4LdBDeE*cwmIDRbNBw}>N zjkKCDc5Q5^mLvLh++bM-dR11+@Eje8qvLbOncdD9yz`Iww8v@c)({K?pOhmz$&kCV zMGh-Z850)y2MYmZ+tvikjaim0TajsFBPp}7S7(oV%o#)#kWAm7bTHV2L52|aM-2Ep z-w5W(2MW>%_Sm`6&s(gRHTaU-FuJlc%+oO+&o82VqDXbwlm7;7AVJpv diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/binding.Makefile b/s4t-server-node/node_modules/autobahn/node_modules/ws/build/binding.Makefile deleted file mode 100644 index 3c498cd..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/binding.Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# This file is generated by gyp; do not edit. - -export builddir_name ?= ./build/. -.PHONY: all -all: - $(MAKE) bufferutil validation diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/bufferutil.target.mk b/s4t-server-node/node_modules/autobahn/node_modules/ws/build/bufferutil.target.mk deleted file mode 100644 index 4f4a430..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/bufferutil.target.mk +++ /dev/null @@ -1,131 +0,0 @@ -# This file is generated by gyp; do not edit. - -TOOLSET := target -TARGET := bufferutil -DEFS_Debug := \ - '-D_LARGEFILE_SOURCE' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DBUILDING_NODE_EXTENSION' \ - '-DDEBUG' \ - '-D_DEBUG' - -# Flags passed to all source files. -CFLAGS_Debug := \ - -Wall \ - -Wextra \ - -Wno-unused-parameter \ - -pthread \ - -m32 \ - -O3 \ - -g \ - -O0 - -# Flags passed to only C files. -CFLAGS_C_Debug := - -# Flags passed to only C++ files. -CFLAGS_CC_Debug := \ - -fno-rtti \ - -fno-exceptions - -INCS_Debug := \ - -I/home/andrea/.node-gyp/0.10.35/src \ - -I/home/andrea/.node-gyp/0.10.35/deps/uv/include \ - -I/home/andrea/.node-gyp/0.10.35/deps/v8/include \ - -I$(srcdir)/node_modules/nan - -DEFS_Release := \ - '-D_LARGEFILE_SOURCE' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DBUILDING_NODE_EXTENSION' - -# Flags passed to all source files. -CFLAGS_Release := \ - -Wall \ - -Wextra \ - -Wno-unused-parameter \ - -pthread \ - -m32 \ - -O2 \ - -fno-strict-aliasing \ - -fno-tree-vrp \ - -fno-omit-frame-pointer - -# Flags passed to only C files. -CFLAGS_C_Release := - -# Flags passed to only C++ files. -CFLAGS_CC_Release := \ - -fno-rtti \ - -fno-exceptions - -INCS_Release := \ - -I/home/andrea/.node-gyp/0.10.35/src \ - -I/home/andrea/.node-gyp/0.10.35/deps/uv/include \ - -I/home/andrea/.node-gyp/0.10.35/deps/v8/include \ - -I$(srcdir)/node_modules/nan - -OBJS := \ - $(obj).target/$(TARGET)/src/bufferutil.o - -# Add to the list of files we specially track dependencies for. -all_deps += $(OBJS) - -# CFLAGS et al overrides must be target-local. -# See "Target-specific Variable Values" in the GNU Make manual. -$(OBJS): TOOLSET := $(TOOLSET) -$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) -$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) - -# Suffix rules, putting all outputs into $(obj). - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) - -# Try building from generated source, too. - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) - -# End of this set of suffix rules -### Rules for final target. -LDFLAGS_Debug := \ - -pthread \ - -rdynamic \ - -m32 - -LDFLAGS_Release := \ - -pthread \ - -rdynamic \ - -m32 - -LIBS := - -$(obj).target/bufferutil.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE)) -$(obj).target/bufferutil.node: LIBS := $(LIBS) -$(obj).target/bufferutil.node: TOOLSET := $(TOOLSET) -$(obj).target/bufferutil.node: $(OBJS) FORCE_DO_CMD - $(call do_cmd,solink_module) - -all_deps += $(obj).target/bufferutil.node -# Add target alias -.PHONY: bufferutil -bufferutil: $(builddir)/bufferutil.node - -# Copy this to the executable output path. -$(builddir)/bufferutil.node: TOOLSET := $(TOOLSET) -$(builddir)/bufferutil.node: $(obj).target/bufferutil.node FORCE_DO_CMD - $(call do_cmd,copy) - -all_deps += $(builddir)/bufferutil.node -# Short alias for building this executable. -.PHONY: bufferutil.node -bufferutil.node: $(obj).target/bufferutil.node $(builddir)/bufferutil.node - -# Add executable to "all" target. -.PHONY: all -all: $(builddir)/bufferutil.node - diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/config.gypi b/s4t-server-node/node_modules/autobahn/node_modules/ws/build/config.gypi deleted file mode 100644 index 951eec3..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/config.gypi +++ /dev/null @@ -1,123 +0,0 @@ -# Do not edit. File was generated by node-gyp's "configure" step -{ - "target_defaults": { - "cflags": [], - "default_configuration": "Release", - "defines": [], - "include_dirs": [], - "libraries": [] - }, - "variables": { - "clang": 0, - "gcc_version": 48, - "host_arch": "ia32", - "node_install_npm": "true", - "node_prefix": "", - "node_shared_cares": "false", - "node_shared_http_parser": "false", - "node_shared_libuv": "false", - "node_shared_openssl": "false", - "node_shared_v8": "false", - "node_shared_zlib": "false", - "node_tag": "", - "node_unsafe_optimizations": 0, - "node_use_dtrace": "false", - "node_use_etw": "false", - "node_use_openssl": "true", - "node_use_perfctr": "false", - "node_use_systemtap": "false", - "openssl_no_asm": 0, - "python": "/usr/bin/python", - "target_arch": "ia32", - "v8_enable_gdbjit": 0, - "v8_no_strict_aliasing": 1, - "v8_use_snapshot": "true", - "want_separate_host_toolset": 0, - "nodedir": "/home/andrea/.node-gyp/0.10.35", - "copy_dev_lib": "true", - "standalone_static_library": 1, - "cache_lock_stale": "60000", - "sign_git_tag": "", - "user_agent": "npm/2.2.0 node/v0.10.35 linux ia32", - "always_auth": "", - "bin_links": "true", - "key": "", - "description": "true", - "fetch_retries": "2", - "heading": "npm", - "init_version": "1.0.0", - "user": "", - "force": "", - "cache_min": "10", - "init_license": "ISC", - "editor": "vi", - "rollback": "true", - "cache_max": "Infinity", - "userconfig": "/home/andrea/.npmrc", - "init_author_name": "", - "engine_strict": "", - "init_author_url": "", - "tmp": "/tmp", - "depth": "Infinity", - "save_dev": "", - "usage": "", - "cafile": "", - "https_proxy": "", - "onload_script": "", - "rebuild_bundle": "true", - "save_bundle": "", - "shell": "/bin/bash", - "prefix": "/usr/local", - "browser": "", - "cache_lock_wait": "10000", - "registry": "https://registry.npmjs.org/", - "save_optional": "", - "scope": "", - "searchopts": "", - "versions": "", - "cache": "/home/andrea/.npm", - "ignore_scripts": "", - "searchsort": "name", - "version": "", - "local_address": "", - "viewer": "man", - "color": "true", - "fetch_retry_mintimeout": "10000", - "umask": "2", - "fetch_retry_maxtimeout": "60000", - "message": "%s", - "ca": "", - "cert": "", - "global": "", - "link": "", - "save": "", - "unicode": "true", - "long": "", - "production": "", - "unsafe_perm": "true", - "node_version": "0.10.35", - "tag": "latest", - "git_tag_version": "true", - "shrinkwrap": "true", - "fetch_retry_factor": "10", - "npat": "", - "proprietary_attribs": "true", - "save_exact": "", - "strict_ssl": "true", - "dev": "", - "globalconfig": "/usr/local/etc/npmrc", - "init_module": "/home/andrea/.npm-init.js", - "parseable": "", - "globalignorefile": "/usr/local/etc/npmignore", - "cache_lock_retries": "10", - "save_prefix": "^", - "init_author_email": "", - "group": "1000", - "searchexclude": "", - "git": "git", - "optional": "true", - "email": "alotronto@unime.it", - "json": "", - "spin": "true" - } -} diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/validation.target.mk b/s4t-server-node/node_modules/autobahn/node_modules/ws/build/validation.target.mk deleted file mode 100644 index 36fe7c4..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/build/validation.target.mk +++ /dev/null @@ -1,131 +0,0 @@ -# This file is generated by gyp; do not edit. - -TOOLSET := target -TARGET := validation -DEFS_Debug := \ - '-D_LARGEFILE_SOURCE' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DBUILDING_NODE_EXTENSION' \ - '-DDEBUG' \ - '-D_DEBUG' - -# Flags passed to all source files. -CFLAGS_Debug := \ - -Wall \ - -Wextra \ - -Wno-unused-parameter \ - -pthread \ - -m32 \ - -O3 \ - -g \ - -O0 - -# Flags passed to only C files. -CFLAGS_C_Debug := - -# Flags passed to only C++ files. -CFLAGS_CC_Debug := \ - -fno-rtti \ - -fno-exceptions - -INCS_Debug := \ - -I/home/andrea/.node-gyp/0.10.35/src \ - -I/home/andrea/.node-gyp/0.10.35/deps/uv/include \ - -I/home/andrea/.node-gyp/0.10.35/deps/v8/include \ - -I$(srcdir)/node_modules/nan - -DEFS_Release := \ - '-D_LARGEFILE_SOURCE' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DBUILDING_NODE_EXTENSION' - -# Flags passed to all source files. -CFLAGS_Release := \ - -Wall \ - -Wextra \ - -Wno-unused-parameter \ - -pthread \ - -m32 \ - -O2 \ - -fno-strict-aliasing \ - -fno-tree-vrp \ - -fno-omit-frame-pointer - -# Flags passed to only C files. -CFLAGS_C_Release := - -# Flags passed to only C++ files. -CFLAGS_CC_Release := \ - -fno-rtti \ - -fno-exceptions - -INCS_Release := \ - -I/home/andrea/.node-gyp/0.10.35/src \ - -I/home/andrea/.node-gyp/0.10.35/deps/uv/include \ - -I/home/andrea/.node-gyp/0.10.35/deps/v8/include \ - -I$(srcdir)/node_modules/nan - -OBJS := \ - $(obj).target/$(TARGET)/src/validation.o - -# Add to the list of files we specially track dependencies for. -all_deps += $(OBJS) - -# CFLAGS et al overrides must be target-local. -# See "Target-specific Variable Values" in the GNU Make manual. -$(OBJS): TOOLSET := $(TOOLSET) -$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) -$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) - -# Suffix rules, putting all outputs into $(obj). - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) - -# Try building from generated source, too. - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) - -# End of this set of suffix rules -### Rules for final target. -LDFLAGS_Debug := \ - -pthread \ - -rdynamic \ - -m32 - -LDFLAGS_Release := \ - -pthread \ - -rdynamic \ - -m32 - -LIBS := - -$(obj).target/validation.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE)) -$(obj).target/validation.node: LIBS := $(LIBS) -$(obj).target/validation.node: TOOLSET := $(TOOLSET) -$(obj).target/validation.node: $(OBJS) FORCE_DO_CMD - $(call do_cmd,solink_module) - -all_deps += $(obj).target/validation.node -# Add target alias -.PHONY: validation -validation: $(builddir)/validation.node - -# Copy this to the executable output path. -$(builddir)/validation.node: TOOLSET := $(TOOLSET) -$(builddir)/validation.node: $(obj).target/validation.node FORCE_DO_CMD - $(call do_cmd,copy) - -all_deps += $(builddir)/validation.node -# Short alias for building this executable. -.PHONY: validation.node -validation.node: $(obj).target/validation.node $(builddir)/validation.node - -# Add executable to "all" target. -.PHONY: all -all: $(builddir)/validation.node - diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/builderror.log b/s4t-server-node/node_modules/autobahn/node_modules/ws/builderror.log deleted file mode 100644 index 9761831..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/builderror.log +++ /dev/null @@ -1,14 +0,0 @@ -../src/bufferutil.cc: In static member function ‘static void BufferUtil::Initialize(v8::Handle)’: -../src/bufferutil.cc:32:17: warning: ‘v8::Local NanSymbol(const char*, int)’ is deprecated (declared at ../node_modules/nan/nan.h:1048) [-Wdeprecated-declarations] - target->Set(NanSymbol("BufferUtil"), t->GetFunction()); - ^ -../src/bufferutil.cc:32:39: warning: ‘v8::Local NanSymbol(const char*, int)’ is deprecated (declared at ../node_modules/nan/nan.h:1048) [-Wdeprecated-declarations] - target->Set(NanSymbol("BufferUtil"), t->GetFunction()); - ^ -../src/validation.cc: In static member function ‘static void Validation::Initialize(v8::Handle)’: -../src/validation.cc:112:17: warning: ‘v8::Local NanSymbol(const char*, int)’ is deprecated (declared at ../node_modules/nan/nan.h:1048) [-Wdeprecated-declarations] - target->Set(NanSymbol("Validation"), t->GetFunction()); - ^ -../src/validation.cc:112:39: warning: ‘v8::Local NanSymbol(const char*, int)’ is deprecated (declared at ../node_modules/nan/nan.h:1048) [-Wdeprecated-declarations] - target->Set(NanSymbol("Validation"), t->GetFunction()); - ^ diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/index.js b/s4t-server-node/node_modules/autobahn/node_modules/ws/index.js deleted file mode 100644 index a7e8644..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/index.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -var WS = module.exports = require('./lib/WebSocket'); - -WS.Server = require('./lib/WebSocketServer'); -WS.Sender = require('./lib/Sender'); -WS.Receiver = require('./lib/Receiver'); - -/** - * Create a new WebSocket server. - * - * @param {Object} options Server options - * @param {Function} fn Optional connection listener. - * @returns {WS.Server} - * @api public - */ -WS.createServer = function createServer(options, fn) { - var server = new WS.Server(options); - - if (typeof fn === 'function') { - server.on('connection', fn); - } - - return server; -}; - -/** - * Create a new WebSocket connection. - * - * @param {String} address The URL/address we need to connect to. - * @param {Function} fn Open listener. - * @returns {WS} - * @api public - */ -WS.connect = WS.createConnection = function connect(address, fn) { - var client = new WS(address); - - if (typeof fn === 'function') { - client.on('open', fn); - } - - return client; -}; diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/BufferPool.js b/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/BufferPool.js deleted file mode 100644 index faf8637..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/BufferPool.js +++ /dev/null @@ -1,59 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -var util = require('util'); - -function BufferPool(initialSize, growStrategy, shrinkStrategy) { - if (typeof initialSize === 'function') { - shrinkStrategy = growStrategy; - growStrategy = initialSize; - initialSize = 0; - } - else if (typeof initialSize === 'undefined') { - initialSize = 0; - } - this._growStrategy = (growStrategy || function(db, size) { - return db.used + size; - }).bind(null, this); - this._shrinkStrategy = (shrinkStrategy || function(db) { - return initialSize; - }).bind(null, this); - this._buffer = initialSize ? new Buffer(initialSize) : null; - this._offset = 0; - this._used = 0; - this._changeFactor = 0; - this.__defineGetter__('size', function(){ - return this._buffer == null ? 0 : this._buffer.length; - }); - this.__defineGetter__('used', function(){ - return this._used; - }); -} - -BufferPool.prototype.get = function(length) { - if (this._buffer == null || this._offset + length > this._buffer.length) { - var newBuf = new Buffer(this._growStrategy(length)); - this._buffer = newBuf; - this._offset = 0; - } - this._used += length; - var buf = this._buffer.slice(this._offset, this._offset + length); - this._offset += length; - return buf; -} - -BufferPool.prototype.reset = function(forceNewBuffer) { - var len = this._shrinkStrategy(); - if (len < this.size) this._changeFactor -= 1; - if (forceNewBuffer || this._changeFactor < -2) { - this._changeFactor = 0; - this._buffer = len ? new Buffer(len) : null; - } - this._offset = 0; - this._used = 0; -} - -module.exports = BufferPool; diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/BufferUtil.fallback.js b/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/BufferUtil.fallback.js deleted file mode 100644 index 508542c..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/BufferUtil.fallback.js +++ /dev/null @@ -1,47 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -module.exports.BufferUtil = { - merge: function(mergedBuffer, buffers) { - var offset = 0; - for (var i = 0, l = buffers.length; i < l; ++i) { - var buf = buffers[i]; - buf.copy(mergedBuffer, offset); - offset += buf.length; - } - }, - mask: function(source, mask, output, offset, length) { - var maskNum = mask.readUInt32LE(0, true); - var i = 0; - for (; i < length - 3; i += 4) { - var num = maskNum ^ source.readUInt32LE(i, true); - if (num < 0) num = 4294967296 + num; - output.writeUInt32LE(num, offset + i, true); - } - switch (length % 4) { - case 3: output[offset + i + 2] = source[i + 2] ^ mask[2]; - case 2: output[offset + i + 1] = source[i + 1] ^ mask[1]; - case 1: output[offset + i] = source[i] ^ mask[0]; - case 0:; - } - }, - unmask: function(data, mask) { - var maskNum = mask.readUInt32LE(0, true); - var length = data.length; - var i = 0; - for (; i < length - 3; i += 4) { - var num = maskNum ^ data.readUInt32LE(i, true); - if (num < 0) num = 4294967296 + num; - data.writeUInt32LE(num, i, true); - } - switch (length % 4) { - case 3: data[i + 2] = data[i + 2] ^ mask[2]; - case 2: data[i + 1] = data[i + 1] ^ mask[1]; - case 1: data[i] = data[i] ^ mask[0]; - case 0:; - } - } -} diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/BufferUtil.js b/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/BufferUtil.js deleted file mode 100644 index 15d35b9..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/BufferUtil.js +++ /dev/null @@ -1,16 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -try { - module.exports = require('../build/Release/bufferutil'); -} catch (e) { try { - module.exports = require('../build/default/bufferutil'); -} catch (e) { try { - module.exports = require('./BufferUtil.fallback'); -} catch (e) { - console.error('bufferutil.node seems to not have been built. Run npm install.'); - throw e; -}}} diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/ErrorCodes.js b/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/ErrorCodes.js deleted file mode 100644 index 55ebd52..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/ErrorCodes.js +++ /dev/null @@ -1,24 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -module.exports = { - isValidErrorCode: function(code) { - return (code >= 1000 && code <= 1011 && code != 1004 && code != 1005 && code != 1006) || - (code >= 3000 && code <= 4999); - }, - 1000: 'normal', - 1001: 'going away', - 1002: 'protocol error', - 1003: 'unsupported data', - 1004: 'reserved', - 1005: 'reserved for extensions', - 1006: 'reserved for extensions', - 1007: 'inconsistent or invalid data', - 1008: 'policy violation', - 1009: 'message too big', - 1010: 'extension handshake missing', - 1011: 'an unexpected condition prevented the request from being fulfilled', -}; \ No newline at end of file diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Extensions.js b/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Extensions.js deleted file mode 100644 index a465ace..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Extensions.js +++ /dev/null @@ -1,70 +0,0 @@ - -var util = require('util'); - -/** - * Module exports. - */ - -exports.parse = parse; -exports.format = format; - -/** - * Parse extensions header value - */ - -function parse(value) { - value = value || ''; - - var extensions = {}; - - value.split(',').forEach(function(v) { - var params = v.split(';'); - var token = params.shift().trim(); - var paramsList = extensions[token] = extensions[token] || []; - var parsedParams = {}; - - params.forEach(function(param) { - var parts = param.trim().split('='); - var key = parts[0]; - var value = parts[1]; - if (typeof value === 'undefined') { - value = true; - } else { - // unquote value - if (value[0] === '"') { - value = value.slice(1); - } - if (value[value.length - 1] === '"') { - value = value.slice(0, value.length - 1); - } - } - (parsedParams[key] = parsedParams[key] || []).push(value); - }); - - paramsList.push(parsedParams); - }); - - return extensions; -} - -/** - * Format extensions header value - */ - -function format(value) { - return Object.keys(value).map(function(token) { - var paramsList = value[token]; - if (!util.isArray(paramsList)) { - paramsList = [paramsList]; - } - return paramsList.map(function(params) { - return [token].concat(Object.keys(params).map(function(k) { - var p = params[k]; - if (!util.isArray(p)) p = [p]; - return p.map(function(v) { - return v === true ? k : k + '=' + v; - }).join('; '); - })).join('; '); - }).join(', '); - }).join(', '); -} diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/PerMessageDeflate.js b/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/PerMessageDeflate.js deleted file mode 100644 index f735977..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/PerMessageDeflate.js +++ /dev/null @@ -1,289 +0,0 @@ - -var zlib = require('zlib'); - -var AVAILABLE_WINDOW_BITS = [8, 9, 10, 11, 12, 13, 14, 15]; -var DEFAULT_WINDOW_BITS = 15; -var DEFAULT_MEM_LEVEL = 8; - -PerMessageDeflate.extensionName = 'permessage-deflate'; - -/** - * Per-message Compression Extensions implementation - */ - -function PerMessageDeflate(options, isServer) { - this._options = options || {}; - this._isServer = !!isServer; - this._inflate = null; - this._deflate = null; - this.params = null; -} - -/** - * Create extension parameters offer - * - * @api public - */ - -PerMessageDeflate.prototype.offer = function() { - var params = {}; - if (this._options.serverNoContextTakeover) { - params.server_no_context_takeover = true; - } - if (this._options.clientNoContextTakeover) { - params.client_no_context_takeover = true; - } - if (this._options.serverMaxWindowBits) { - params.server_max_window_bits = this._options.serverMaxWindowBits; - } - if (this._options.clientMaxWindowBits) { - params.client_max_window_bits = this._options.clientMaxWindowBits; - } else if (this._options.clientMaxWindowBits == null) { - params.client_max_window_bits = true; - } - return params; -}; - -/** - * Accept extension offer - * - * @api public - */ - -PerMessageDeflate.prototype.accept = function(paramsList) { - paramsList = this.normalizeParams(paramsList); - - var params; - if (this._isServer) { - params = this.acceptAsServer(paramsList); - } else { - params = this.acceptAsClient(paramsList); - } - - this.params = params; - return params; -}; - -/** - * Accept extension offer from client - * - * @api private - */ - -PerMessageDeflate.prototype.acceptAsServer = function(paramsList) { - var accepted = {}; - var result = paramsList.some(function(params) { - accepted = {}; - if (this._options.serverNoContextTakeover === false && params.server_no_context_takeover) { - return; - } - if (this._options.serverMaxWindowBits === false && params.server_max_window_bits) { - return; - } - if (typeof this._options.serverMaxWindowBits === 'number' && - typeof params.server_max_window_bits === 'number' && - this._options.serverMaxWindowBits > params.server_max_window_bits) { - return; - } - if (typeof this._options.clientMaxWindowBits === 'number' && !params.client_max_window_bits) { - return; - } - - if (this._options.serverNoContextTakeover || params.server_no_context_takeover) { - accepted.server_no_context_takeover = true; - } - if (this._options.clientNoContextTakeover) { - accepted.client_no_context_takeover = true; - } - if (this._options.clientNoContextTakeover !== false && params.client_no_context_takeover) { - accepted.client_no_context_takeover = true; - } - if (typeof this._options.serverMaxWindowBits === 'number') { - accepted.server_max_window_bits = this._options.serverMaxWindowBits; - } else if (typeof params.server_max_window_bits === 'number') { - accepted.server_max_window_bits = params.server_max_window_bits; - } - if (typeof this._options.clientMaxWindowBits === 'number') { - accepted.client_max_window_bits = this._options.clientMaxWindowBits; - } else if (this._options.clientMaxWindowBits !== false && typeof params.client_max_window_bits === 'number') { - accepted.client_max_window_bits = params.client_max_window_bits; - } - return true; - }, this); - - if (!result) { - throw new Error('Doesn\'t support the offered configuration'); - } - - return accepted; -}; - -/** - * Accept extension response from server - * - * @api privaye - */ - -PerMessageDeflate.prototype.acceptAsClient = function(paramsList) { - var params = paramsList[0]; - if (this._options.clientNoContextTakeover != null) { - if (this._options.clientNoContextTakeover === false && params.client_no_context_takeover) { - throw new Error('Invalid value for "client_no_context_takeover"'); - } - } - if (this._options.clientMaxWindowBits != null) { - if (this._options.clientMaxWindowBits === false && params.client_max_window_bits) { - throw new Error('Invalid value for "client_max_window_bits"'); - } - if (typeof this._options.clientMaxWindowBits === 'number' && - (!params.client_max_window_bits || params.client_max_window_bits > this._options.clientMaxWindowBits)) { - throw new Error('Invalid value for "client_max_window_bits"'); - } - } - return params; -}; - -/** - * Normalize extensions parameters - * - * @api private - */ - -PerMessageDeflate.prototype.normalizeParams = function(paramsList) { - return paramsList.map(function(params) { - Object.keys(params).forEach(function(key) { - var value = params[key]; - if (value.length > 1) { - throw new Error('Multiple extension parameters for ' + key); - } - - value = value[0]; - - switch (key) { - case 'server_no_context_takeover': - case 'client_no_context_takeover': - if (value !== true) { - throw new Error('invalid extension parameter value for ' + key + ' (' + value + ')'); - } - params[key] = true; - break; - case 'server_max_window_bits': - case 'client_max_window_bits': - if (typeof value === 'string') { - value = parseInt(value, 10); - if (!~AVAILABLE_WINDOW_BITS.indexOf(value)) { - throw new Error('invalid extension parameter value for ' + key + ' (' + value + ')'); - } - } - if (!this._isServer && value === true) { - throw new Error('Missing extension parameter value for ' + key); - } - params[key] = value; - break; - default: - throw new Error('Not defined extension parameter (' + key + ')'); - } - }, this); - return params; - }, this); -}; - -/** - * Decompress message - * - * @api public - */ - -PerMessageDeflate.prototype.decompress = function (data, fin, callback) { - var endpoint = this._isServer ? 'client' : 'server'; - - if (!this._inflate) { - var maxWindowBits = this.params[endpoint + '_max_window_bits']; - this._inflate = zlib.createInflateRaw({ - windowBits: 'number' === typeof maxWindowBits ? maxWindowBits : DEFAULT_WINDOW_BITS - }); - } - - var self = this; - var buffers = []; - - this._inflate.on('error', onError).on('data', onData); - this._inflate.write(data); - if (fin) { - this._inflate.write(new Buffer([0x00, 0x00, 0xff, 0xff])); - } - this._inflate.flush(function() { - cleanup(); - callback(null, Buffer.concat(buffers)); - }); - - function onError(err) { - cleanup(); - callback(err); - } - - function onData(data) { - buffers.push(data); - } - - function cleanup() { - self._inflate.removeListener('error', onError); - self._inflate.removeListener('data', onData); - if (fin && self.params[endpoint + '_no_context_takeover']) { - self._inflate = null; - } - } -}; - -/** - * Compress message - * - * @api public - */ - -PerMessageDeflate.prototype.compress = function (data, fin, callback) { - var endpoint = this._isServer ? 'server' : 'client'; - - if (!this._deflate) { - var maxWindowBits = this.params[endpoint + '_max_window_bits']; - this._deflate = zlib.createDeflateRaw({ - flush: zlib.Z_SYNC_FLUSH, - windowBits: 'number' === typeof maxWindowBits ? maxWindowBits : DEFAULT_WINDOW_BITS, - memLevel: this._options.memLevel || DEFAULT_MEM_LEVEL - }); - } - - var self = this; - var buffers = []; - - this._deflate.on('error', onError).on('data', onData); - this._deflate.write(data); - this._deflate.flush(function() { - cleanup(); - var data = Buffer.concat(buffers); - if (fin) { - data = data.slice(0, data.length - 4); - } - callback(null, data); - }); - - function onError(err) { - cleanup(); - callback(err); - } - - function onData(data) { - buffers.push(data); - } - - function cleanup() { - self._deflate.removeListener('error', onError); - self._deflate.removeListener('data', onData); - if (fin && self.params[endpoint + '_no_context_takeover']) { - self._deflate = null; - } - } -}; - -module.exports = PerMessageDeflate; - diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Receiver.hixie.js b/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Receiver.hixie.js deleted file mode 100644 index a8e41c4..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Receiver.hixie.js +++ /dev/null @@ -1,180 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -var util = require('util'); - -/** - * State constants - */ - -var EMPTY = 0 - , BODY = 1; -var BINARYLENGTH = 2 - , BINARYBODY = 3; - -/** - * Hixie Receiver implementation - */ - -function Receiver () { - this.state = EMPTY; - this.buffers = []; - this.messageEnd = -1; - this.spanLength = 0; - this.dead = false; - - this.onerror = function() {}; - this.ontext = function() {}; - this.onbinary = function() {}; - this.onclose = function() {}; - this.onping = function() {}; - this.onpong = function() {}; -} - -module.exports = Receiver; - -/** - * Add new data to the parser. - * - * @api public - */ - -Receiver.prototype.add = function(data) { - var self = this; - function doAdd() { - if (self.state === EMPTY) { - if (data.length == 2 && data[0] == 0xFF && data[1] == 0x00) { - self.reset(); - self.onclose(); - return; - } - if (data[0] === 0x80) { - self.messageEnd = 0; - self.state = BINARYLENGTH; - data = data.slice(1); - } else { - - if (data[0] !== 0x00) { - self.error('payload must start with 0x00 byte', true); - return; - } - data = data.slice(1); - self.state = BODY; - - } - } - if (self.state === BINARYLENGTH) { - var i = 0; - while ((i < data.length) && (data[i] & 0x80)) { - self.messageEnd = 128 * self.messageEnd + (data[i] & 0x7f); - ++i; - } - if (i < data.length) { - self.messageEnd = 128 * self.messageEnd + (data[i] & 0x7f); - self.state = BINARYBODY; - ++i; - } - if (i > 0) - data = data.slice(i); - } - if (self.state === BINARYBODY) { - var dataleft = self.messageEnd - self.spanLength; - if (data.length >= dataleft) { - // consume the whole buffer to finish the frame - self.buffers.push(data); - self.spanLength += dataleft; - self.messageEnd = dataleft; - return self.parse(); - } - // frame's not done even if we consume it all - self.buffers.push(data); - self.spanLength += data.length; - return; - } - self.buffers.push(data); - if ((self.messageEnd = bufferIndex(data, 0xFF)) != -1) { - self.spanLength += self.messageEnd; - return self.parse(); - } - else self.spanLength += data.length; - } - while(data) data = doAdd(); -}; - -/** - * Releases all resources used by the receiver. - * - * @api public - */ - -Receiver.prototype.cleanup = function() { - this.dead = true; - this.state = EMPTY; - this.buffers = []; -}; - -/** - * Process buffered data. - * - * @api public - */ - -Receiver.prototype.parse = function() { - var output = new Buffer(this.spanLength); - var outputIndex = 0; - for (var bi = 0, bl = this.buffers.length; bi < bl - 1; ++bi) { - var buffer = this.buffers[bi]; - buffer.copy(output, outputIndex); - outputIndex += buffer.length; - } - var lastBuffer = this.buffers[this.buffers.length - 1]; - if (this.messageEnd > 0) lastBuffer.copy(output, outputIndex, 0, this.messageEnd); - if (this.state !== BODY) --this.messageEnd; - var tail = null; - if (this.messageEnd < lastBuffer.length - 1) { - tail = lastBuffer.slice(this.messageEnd + 1); - } - this.reset(); - this.ontext(output.toString('utf8')); - return tail; -}; - -/** - * Handles an error - * - * @api private - */ - -Receiver.prototype.error = function (reason, terminate) { - this.reset(); - this.onerror(reason, terminate); - return this; -}; - -/** - * Reset parser state - * - * @api private - */ - -Receiver.prototype.reset = function (reason) { - if (this.dead) return; - this.state = EMPTY; - this.buffers = []; - this.messageEnd = -1; - this.spanLength = 0; -}; - -/** - * Internal api - */ - -function bufferIndex(buffer, byte) { - for (var i = 0, l = buffer.length; i < l; ++i) { - if (buffer[i] === byte) return i; - } - return -1; -} diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Receiver.js b/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Receiver.js deleted file mode 100644 index 1ae1c4e..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Receiver.js +++ /dev/null @@ -1,698 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -var util = require('util') - , Validation = require('./Validation').Validation - , ErrorCodes = require('./ErrorCodes') - , BufferPool = require('./BufferPool') - , bufferUtil = require('./BufferUtil').BufferUtil - , PerMessageDeflate = require('./PerMessageDeflate'); - -/** - * HyBi Receiver implementation - */ - -function Receiver (extensions) { - // memory pool for fragmented messages - var fragmentedPoolPrevUsed = -1; - this.fragmentedBufferPool = new BufferPool(1024, function(db, length) { - return db.used + length; - }, function(db) { - return fragmentedPoolPrevUsed = fragmentedPoolPrevUsed >= 0 ? - (fragmentedPoolPrevUsed + db.used) / 2 : - db.used; - }); - - // memory pool for unfragmented messages - var unfragmentedPoolPrevUsed = -1; - this.unfragmentedBufferPool = new BufferPool(1024, function(db, length) { - return db.used + length; - }, function(db) { - return unfragmentedPoolPrevUsed = unfragmentedPoolPrevUsed >= 0 ? - (unfragmentedPoolPrevUsed + db.used) / 2 : - db.used; - }); - - this.extensions = extensions || {}; - this.state = { - activeFragmentedOperation: null, - lastFragment: false, - masked: false, - opcode: 0, - fragmentedOperation: false - }; - this.overflow = []; - this.headerBuffer = new Buffer(10); - this.expectOffset = 0; - this.expectBuffer = null; - this.expectHandler = null; - this.currentMessage = []; - this.messageHandlers = []; - this.expectHeader(2, this.processPacket); - this.dead = false; - this.processing = false; - - this.onerror = function() {}; - this.ontext = function() {}; - this.onbinary = function() {}; - this.onclose = function() {}; - this.onping = function() {}; - this.onpong = function() {}; -} - -module.exports = Receiver; - -/** - * Add new data to the parser. - * - * @api public - */ - -Receiver.prototype.add = function(data) { - var dataLength = data.length; - if (dataLength == 0) return; - if (this.expectBuffer == null) { - this.overflow.push(data); - return; - } - var toRead = Math.min(dataLength, this.expectBuffer.length - this.expectOffset); - fastCopy(toRead, data, this.expectBuffer, this.expectOffset); - this.expectOffset += toRead; - if (toRead < dataLength) { - this.overflow.push(data.slice(toRead)); - } - while (this.expectBuffer && this.expectOffset == this.expectBuffer.length) { - var bufferForHandler = this.expectBuffer; - this.expectBuffer = null; - this.expectOffset = 0; - this.expectHandler.call(this, bufferForHandler); - } -}; - -/** - * Releases all resources used by the receiver. - * - * @api public - */ - -Receiver.prototype.cleanup = function() { - this.dead = true; - this.overflow = null; - this.headerBuffer = null; - this.expectBuffer = null; - this.expectHandler = null; - this.unfragmentedBufferPool = null; - this.fragmentedBufferPool = null; - this.state = null; - this.currentMessage = null; - this.onerror = null; - this.ontext = null; - this.onbinary = null; - this.onclose = null; - this.onping = null; - this.onpong = null; -}; - -/** - * Waits for a certain amount of header bytes to be available, then fires a callback. - * - * @api private - */ - -Receiver.prototype.expectHeader = function(length, handler) { - if (length == 0) { - handler(null); - return; - } - this.expectBuffer = this.headerBuffer.slice(this.expectOffset, this.expectOffset + length); - this.expectHandler = handler; - var toRead = length; - while (toRead > 0 && this.overflow.length > 0) { - var fromOverflow = this.overflow.pop(); - if (toRead < fromOverflow.length) this.overflow.push(fromOverflow.slice(toRead)); - var read = Math.min(fromOverflow.length, toRead); - fastCopy(read, fromOverflow, this.expectBuffer, this.expectOffset); - this.expectOffset += read; - toRead -= read; - } -}; - -/** - * Waits for a certain amount of data bytes to be available, then fires a callback. - * - * @api private - */ - -Receiver.prototype.expectData = function(length, handler) { - if (length == 0) { - handler(null); - return; - } - this.expectBuffer = this.allocateFromPool(length, this.state.fragmentedOperation); - this.expectHandler = handler; - var toRead = length; - while (toRead > 0 && this.overflow.length > 0) { - var fromOverflow = this.overflow.pop(); - if (toRead < fromOverflow.length) this.overflow.push(fromOverflow.slice(toRead)); - var read = Math.min(fromOverflow.length, toRead); - fastCopy(read, fromOverflow, this.expectBuffer, this.expectOffset); - this.expectOffset += read; - toRead -= read; - } -}; - -/** - * Allocates memory from the buffer pool. - * - * @api private - */ - -Receiver.prototype.allocateFromPool = function(length, isFragmented) { - return (isFragmented ? this.fragmentedBufferPool : this.unfragmentedBufferPool).get(length); -}; - -/** - * Start processing a new packet. - * - * @api private - */ - -Receiver.prototype.processPacket = function (data) { - if (this.extensions[PerMessageDeflate.extensionName]) { - if ((data[0] & 0x30) != 0) { - this.error('reserved fields (2, 3) must be empty', 1002); - return; - } - } else { - if ((data[0] & 0x70) != 0) { - this.error('reserved fields must be empty', 1002); - return; - } - } - this.state.lastFragment = (data[0] & 0x80) == 0x80; - this.state.masked = (data[1] & 0x80) == 0x80; - var compressed = (data[0] & 0x40) == 0x40; - var opcode = data[0] & 0xf; - if (opcode === 0) { - if (compressed) { - this.error('continuation frame cannot have the Per-message Compressed bits', 1002); - return; - } - // continuation frame - this.state.fragmentedOperation = true; - this.state.opcode = this.state.activeFragmentedOperation; - if (!(this.state.opcode == 1 || this.state.opcode == 2)) { - this.error('continuation frame cannot follow current opcode', 1002); - return; - } - } - else { - if (opcode < 3 && this.state.activeFragmentedOperation != null) { - this.error('data frames after the initial data frame must have opcode 0', 1002); - return; - } - if (opcode >= 8 && compressed) { - this.error('control frames cannot have the Per-message Compressed bits', 1002); - return; - } - this.state.compressed = compressed; - this.state.opcode = opcode; - if (this.state.lastFragment === false) { - this.state.fragmentedOperation = true; - this.state.activeFragmentedOperation = opcode; - } - else this.state.fragmentedOperation = false; - } - var handler = opcodes[this.state.opcode]; - if (typeof handler == 'undefined') this.error('no handler for opcode ' + this.state.opcode, 1002); - else { - handler.start.call(this, data); - } -}; - -/** - * Endprocessing a packet. - * - * @api private - */ - -Receiver.prototype.endPacket = function() { - if (!this.state.fragmentedOperation) this.unfragmentedBufferPool.reset(true); - else if (this.state.lastFragment) this.fragmentedBufferPool.reset(false); - this.expectOffset = 0; - this.expectBuffer = null; - this.expectHandler = null; - if (this.state.lastFragment && this.state.opcode === this.state.activeFragmentedOperation) { - // end current fragmented operation - this.state.activeFragmentedOperation = null; - } - this.state.lastFragment = false; - this.state.opcode = this.state.activeFragmentedOperation != null ? this.state.activeFragmentedOperation : 0; - this.state.masked = false; - this.expectHeader(2, this.processPacket); -}; - -/** - * Reset the parser state. - * - * @api private - */ - -Receiver.prototype.reset = function() { - if (this.dead) return; - this.state = { - activeFragmentedOperation: null, - lastFragment: false, - masked: false, - opcode: 0, - fragmentedOperation: false - }; - this.fragmentedBufferPool.reset(true); - this.unfragmentedBufferPool.reset(true); - this.expectOffset = 0; - this.expectBuffer = null; - this.expectHandler = null; - this.overflow = []; - this.currentMessage = []; - this.messageHandlers = []; -}; - -/** - * Unmask received data. - * - * @api private - */ - -Receiver.prototype.unmask = function (mask, buf, binary) { - if (mask != null && buf != null) bufferUtil.unmask(buf, mask); - if (binary) return buf; - return buf != null ? buf.toString('utf8') : ''; -}; - -/** - * Concatenates a list of buffers. - * - * @api private - */ - -Receiver.prototype.concatBuffers = function(buffers) { - var length = 0; - for (var i = 0, l = buffers.length; i < l; ++i) length += buffers[i].length; - var mergedBuffer = new Buffer(length); - bufferUtil.merge(mergedBuffer, buffers); - return mergedBuffer; -}; - -/** - * Handles an error - * - * @api private - */ - -Receiver.prototype.error = function (reason, protocolErrorCode) { - this.reset(); - this.onerror(reason, protocolErrorCode); - return this; -}; - -/** - * Execute message handler buffers - * - * @api private - */ - -Receiver.prototype.flush = function() { - if (this.processing || this.dead) return; - - var handler = this.messageHandlers.shift(); - if (!handler) return; - - this.processing = true; - var self = this; - - handler(function() { - self.processing = false; - self.flush(); - }); -}; - -/** - * Apply extensions to message - * - * @api private - */ - -Receiver.prototype.applyExtensions = function(messageBuffer, fin, compressed, callback) { - var self = this; - if (compressed) { - this.extensions[PerMessageDeflate.extensionName].decompress(messageBuffer, fin, function(err, buffer) { - if (self.dead) return; - if (err) { - callback(new Error('invalid compressed data')); - return; - } - callback(null, buffer); - }); - } else { - callback(null, messageBuffer); - } -}; - -/** - * Buffer utilities - */ - -function readUInt16BE(start) { - return (this[start]<<8) + - this[start+1]; -} - -function readUInt32BE(start) { - return (this[start]<<24) + - (this[start+1]<<16) + - (this[start+2]<<8) + - this[start+3]; -} - -function fastCopy(length, srcBuffer, dstBuffer, dstOffset) { - switch (length) { - default: srcBuffer.copy(dstBuffer, dstOffset, 0, length); break; - case 16: dstBuffer[dstOffset+15] = srcBuffer[15]; - case 15: dstBuffer[dstOffset+14] = srcBuffer[14]; - case 14: dstBuffer[dstOffset+13] = srcBuffer[13]; - case 13: dstBuffer[dstOffset+12] = srcBuffer[12]; - case 12: dstBuffer[dstOffset+11] = srcBuffer[11]; - case 11: dstBuffer[dstOffset+10] = srcBuffer[10]; - case 10: dstBuffer[dstOffset+9] = srcBuffer[9]; - case 9: dstBuffer[dstOffset+8] = srcBuffer[8]; - case 8: dstBuffer[dstOffset+7] = srcBuffer[7]; - case 7: dstBuffer[dstOffset+6] = srcBuffer[6]; - case 6: dstBuffer[dstOffset+5] = srcBuffer[5]; - case 5: dstBuffer[dstOffset+4] = srcBuffer[4]; - case 4: dstBuffer[dstOffset+3] = srcBuffer[3]; - case 3: dstBuffer[dstOffset+2] = srcBuffer[2]; - case 2: dstBuffer[dstOffset+1] = srcBuffer[1]; - case 1: dstBuffer[dstOffset] = srcBuffer[0]; - } -} - -function clone(obj) { - var cloned = {}; - for (var k in obj) { - if (obj.hasOwnProperty(k)) { - cloned[k] = obj[k]; - } - } - return cloned; -} - -/** - * Opcode handlers - */ - -var opcodes = { - // text - '1': { - start: function(data) { - var self = this; - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength < 126) { - opcodes['1'].getData.call(self, firstLength); - } - else if (firstLength == 126) { - self.expectHeader(2, function(data) { - opcodes['1'].getData.call(self, readUInt16BE.call(data, 0)); - }); - } - else if (firstLength == 127) { - self.expectHeader(8, function(data) { - if (readUInt32BE.call(data, 0) != 0) { - self.error('packets with length spanning more than 32 bit is currently not supported', 1008); - return; - } - opcodes['1'].getData.call(self, readUInt32BE.call(data, 4)); - }); - } - }, - getData: function(length) { - var self = this; - if (self.state.masked) { - self.expectHeader(4, function(data) { - var mask = data; - self.expectData(length, function(data) { - opcodes['1'].finish.call(self, mask, data); - }); - }); - } - else { - self.expectData(length, function(data) { - opcodes['1'].finish.call(self, null, data); - }); - } - }, - finish: function(mask, data) { - var self = this; - var packet = this.unmask(mask, data, true) || new Buffer(0); - var state = clone(this.state); - this.messageHandlers.push(function(callback) { - self.applyExtensions(packet, state.lastFragment, state.compressed, function(err, buffer) { - if (err) return self.error(err.message, 1007); - if (buffer != null) self.currentMessage.push(buffer); - - if (state.lastFragment) { - var messageBuffer = self.concatBuffers(self.currentMessage); - self.currentMessage = []; - if (!Validation.isValidUTF8(messageBuffer)) { - self.error('invalid utf8 sequence', 1007); - return; - } - self.ontext(messageBuffer.toString('utf8'), {masked: state.masked, buffer: messageBuffer}); - } - callback(); - }); - }); - this.flush(); - this.endPacket(); - } - }, - // binary - '2': { - start: function(data) { - var self = this; - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength < 126) { - opcodes['2'].getData.call(self, firstLength); - } - else if (firstLength == 126) { - self.expectHeader(2, function(data) { - opcodes['2'].getData.call(self, readUInt16BE.call(data, 0)); - }); - } - else if (firstLength == 127) { - self.expectHeader(8, function(data) { - if (readUInt32BE.call(data, 0) != 0) { - self.error('packets with length spanning more than 32 bit is currently not supported', 1008); - return; - } - opcodes['2'].getData.call(self, readUInt32BE.call(data, 4, true)); - }); - } - }, - getData: function(length) { - var self = this; - if (self.state.masked) { - self.expectHeader(4, function(data) { - var mask = data; - self.expectData(length, function(data) { - opcodes['2'].finish.call(self, mask, data); - }); - }); - } - else { - self.expectData(length, function(data) { - opcodes['2'].finish.call(self, null, data); - }); - } - }, - finish: function(mask, data) { - var self = this; - var packet = this.unmask(mask, data, true) || new Buffer(0); - var state = clone(this.state); - this.messageHandlers.push(function(callback) { - self.applyExtensions(packet, state.lastFragment, state.compressed, function(err, buffer) { - if (err) return self.error(err.message, 1007); - if (buffer != null) self.currentMessage.push(buffer); - if (state.lastFragment) { - var messageBuffer = self.concatBuffers(self.currentMessage); - self.currentMessage = []; - self.onbinary(messageBuffer, {masked: state.masked, buffer: messageBuffer}); - } - callback(); - }); - }); - this.flush(); - this.endPacket(); - } - }, - // close - '8': { - start: function(data) { - var self = this; - if (self.state.lastFragment == false) { - self.error('fragmented close is not supported', 1002); - return; - } - - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength < 126) { - opcodes['8'].getData.call(self, firstLength); - } - else { - self.error('control frames cannot have more than 125 bytes of data', 1002); - } - }, - getData: function(length) { - var self = this; - if (self.state.masked) { - self.expectHeader(4, function(data) { - var mask = data; - self.expectData(length, function(data) { - opcodes['8'].finish.call(self, mask, data); - }); - }); - } - else { - self.expectData(length, function(data) { - opcodes['8'].finish.call(self, null, data); - }); - } - }, - finish: function(mask, data) { - var self = this; - data = self.unmask(mask, data, true); - - var state = clone(this.state); - this.messageHandlers.push(function() { - if (data && data.length == 1) { - self.error('close packets with data must be at least two bytes long', 1002); - return; - } - var code = data && data.length > 1 ? readUInt16BE.call(data, 0) : 1000; - if (!ErrorCodes.isValidErrorCode(code)) { - self.error('invalid error code', 1002); - return; - } - var message = ''; - if (data && data.length > 2) { - var messageBuffer = data.slice(2); - if (!Validation.isValidUTF8(messageBuffer)) { - self.error('invalid utf8 sequence', 1007); - return; - } - message = messageBuffer.toString('utf8'); - } - self.onclose(code, message, {masked: state.masked}); - self.reset(); - }); - this.flush(); - }, - }, - // ping - '9': { - start: function(data) { - var self = this; - if (self.state.lastFragment == false) { - self.error('fragmented ping is not supported', 1002); - return; - } - - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength < 126) { - opcodes['9'].getData.call(self, firstLength); - } - else { - self.error('control frames cannot have more than 125 bytes of data', 1002); - } - }, - getData: function(length) { - var self = this; - if (self.state.masked) { - self.expectHeader(4, function(data) { - var mask = data; - self.expectData(length, function(data) { - opcodes['9'].finish.call(self, mask, data); - }); - }); - } - else { - self.expectData(length, function(data) { - opcodes['9'].finish.call(self, null, data); - }); - } - }, - finish: function(mask, data) { - var self = this; - data = this.unmask(mask, data, true); - var state = clone(this.state); - this.messageHandlers.push(function(callback) { - self.onping(data, {masked: state.masked, binary: true}); - callback(); - }); - this.flush(); - this.endPacket(); - } - }, - // pong - '10': { - start: function(data) { - var self = this; - if (self.state.lastFragment == false) { - self.error('fragmented pong is not supported', 1002); - return; - } - - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength < 126) { - opcodes['10'].getData.call(self, firstLength); - } - else { - self.error('control frames cannot have more than 125 bytes of data', 1002); - } - }, - getData: function(length) { - var self = this; - if (this.state.masked) { - this.expectHeader(4, function(data) { - var mask = data; - self.expectData(length, function(data) { - opcodes['10'].finish.call(self, mask, data); - }); - }); - } - else { - this.expectData(length, function(data) { - opcodes['10'].finish.call(self, null, data); - }); - } - }, - finish: function(mask, data) { - var self = this; - data = self.unmask(mask, data, true); - var state = clone(this.state); - this.messageHandlers.push(function(callback) { - self.onpong(data, {masked: state.masked, binary: true}); - callback(); - }); - this.flush(); - this.endPacket(); - } - } -} diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Sender.hixie.js b/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Sender.hixie.js deleted file mode 100644 index fd2fd25..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Sender.hixie.js +++ /dev/null @@ -1,120 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -var events = require('events') - , util = require('util') - , EventEmitter = events.EventEmitter; - -/** - * Hixie Sender implementation - */ - -function Sender(socket) { - events.EventEmitter.call(this); - - this.socket = socket; - this.continuationFrame = false; - this.isClosed = false; -} - -module.exports = Sender; - -/** - * Inherits from EventEmitter. - */ - -util.inherits(Sender, events.EventEmitter); - -/** - * Frames and writes data. - * - * @api public - */ - -Sender.prototype.send = function(data, options, cb) { - if (this.isClosed) return; - - var isString = typeof data == 'string' - , length = isString ? Buffer.byteLength(data) : data.length - , lengthbytes = (length > 127) ? 2 : 1 // assume less than 2**14 bytes - , writeStartMarker = this.continuationFrame == false - , writeEndMarker = !options || !(typeof options.fin != 'undefined' && !options.fin) - , buffer = new Buffer((writeStartMarker ? ((options && options.binary) ? (1 + lengthbytes) : 1) : 0) + length + ((writeEndMarker && !(options && options.binary)) ? 1 : 0)) - , offset = writeStartMarker ? 1 : 0; - - if (writeStartMarker) { - if (options && options.binary) { - buffer.write('\x80', 'binary'); - // assume length less than 2**14 bytes - if (lengthbytes > 1) - buffer.write(String.fromCharCode(128+length/128), offset++, 'binary'); - buffer.write(String.fromCharCode(length&0x7f), offset++, 'binary'); - } else - buffer.write('\x00', 'binary'); - } - - if (isString) buffer.write(data, offset, 'utf8'); - else data.copy(buffer, offset, 0); - - if (writeEndMarker) { - if (options && options.binary) { - // sending binary, not writing end marker - } else - buffer.write('\xff', offset + length, 'binary'); - this.continuationFrame = false; - } - else this.continuationFrame = true; - - try { - this.socket.write(buffer, 'binary', cb); - } catch (e) { - this.error(e.toString()); - } -}; - -/** - * Sends a close instruction to the remote party. - * - * @api public - */ - -Sender.prototype.close = function(code, data, mask, cb) { - if (this.isClosed) return; - this.isClosed = true; - try { - if (this.continuationFrame) this.socket.write(new Buffer([0xff], 'binary')); - this.socket.write(new Buffer([0xff, 0x00]), 'binary', cb); - } catch (e) { - this.error(e.toString()); - } -}; - -/** - * Sends a ping message to the remote party. Not available for hixie. - * - * @api public - */ - -Sender.prototype.ping = function(data, options) {}; - -/** - * Sends a pong message to the remote party. Not available for hixie. - * - * @api public - */ - -Sender.prototype.pong = function(data, options) {}; - -/** - * Handles an error - * - * @api private - */ - -Sender.prototype.error = function (reason) { - this.emit('error', reason); - return this; -}; diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Sender.js b/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Sender.js deleted file mode 100644 index f346748..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Sender.js +++ /dev/null @@ -1,309 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -var events = require('events') - , util = require('util') - , EventEmitter = events.EventEmitter - , ErrorCodes = require('./ErrorCodes') - , bufferUtil = require('./BufferUtil').BufferUtil - , PerMessageDeflate = require('./PerMessageDeflate'); - -/** - * HyBi Sender implementation - */ - -function Sender(socket, extensions) { - events.EventEmitter.call(this); - - this._socket = socket; - this.extensions = extensions || {}; - this.firstFragment = true; - this.compress = false; - this.messageHandlers = []; - this.processing = false; -} - -/** - * Inherits from EventEmitter. - */ - -util.inherits(Sender, events.EventEmitter); - -/** - * Sends a close instruction to the remote party. - * - * @api public - */ - -Sender.prototype.close = function(code, data, mask, cb) { - if (typeof code !== 'undefined') { - if (typeof code !== 'number' || - !ErrorCodes.isValidErrorCode(code)) throw new Error('first argument must be a valid error code number'); - } - code = code || 1000; - var dataBuffer = new Buffer(2 + (data ? Buffer.byteLength(data) : 0)); - writeUInt16BE.call(dataBuffer, code, 0); - if (dataBuffer.length > 2) dataBuffer.write(data, 2); - - var self = this; - this.messageHandlers.push(function(callback) { - self.frameAndSend(0x8, dataBuffer, true, mask); - callback(); - if (typeof cb == 'function') cb(); - }); - this.flush(); -}; - -/** - * Sends a ping message to the remote party. - * - * @api public - */ - -Sender.prototype.ping = function(data, options) { - var mask = options && options.mask; - var self = this; - this.messageHandlers.push(function(callback) { - self.frameAndSend(0x9, data || '', true, mask); - callback(); - }); - this.flush(); -}; - -/** - * Sends a pong message to the remote party. - * - * @api public - */ - -Sender.prototype.pong = function(data, options) { - var mask = options && options.mask; - var self = this; - this.messageHandlers.push(function(callback) { - self.frameAndSend(0xa, data || '', true, mask); - callback(); - }); - this.flush(); -}; - -/** - * Sends text or binary data to the remote party. - * - * @api public - */ - -Sender.prototype.send = function(data, options, cb) { - var finalFragment = options && options.fin === false ? false : true; - var mask = options && options.mask; - var compress = options && options.compress; - var opcode = options && options.binary ? 2 : 1; - if (this.firstFragment === false) { - opcode = 0; - compress = false; - } else { - this.firstFragment = false; - this.compress = compress; - } - if (finalFragment) this.firstFragment = true - - var compressFragment = this.compress; - - var self = this; - this.messageHandlers.push(function(callback) { - self.applyExtensions(data, finalFragment, compressFragment, function(err, data) { - if (err) { - if (typeof cb == 'function') cb(err); - else self.emit('error', err); - return; - } - self.frameAndSend(opcode, data, finalFragment, mask, compress, cb); - callback(); - }); - }); - this.flush(); -}; - -/** - * Frames and sends a piece of data according to the HyBi WebSocket protocol. - * - * @api private - */ - -Sender.prototype.frameAndSend = function(opcode, data, finalFragment, maskData, compressed, cb) { - var canModifyData = false; - - if (!data) { - try { - this._socket.write(new Buffer([opcode | (finalFragment ? 0x80 : 0), 0 | (maskData ? 0x80 : 0)].concat(maskData ? [0, 0, 0, 0] : [])), 'binary', cb); - } - catch (e) { - if (typeof cb == 'function') cb(e); - else this.emit('error', e); - } - return; - } - - if (!Buffer.isBuffer(data)) { - canModifyData = true; - if (data && (typeof data.byteLength !== 'undefined' || typeof data.buffer !== 'undefined')) { - data = getArrayBuffer(data); - } else { - data = new Buffer(data); - } - } - - var dataLength = data.length - , dataOffset = maskData ? 6 : 2 - , secondByte = dataLength; - - if (dataLength >= 65536) { - dataOffset += 8; - secondByte = 127; - } - else if (dataLength > 125) { - dataOffset += 2; - secondByte = 126; - } - - var mergeBuffers = dataLength < 32768 || (maskData && !canModifyData); - var totalLength = mergeBuffers ? dataLength + dataOffset : dataOffset; - var outputBuffer = new Buffer(totalLength); - outputBuffer[0] = finalFragment ? opcode | 0x80 : opcode; - if (compressed) outputBuffer[0] |= 0x40; - - switch (secondByte) { - case 126: - writeUInt16BE.call(outputBuffer, dataLength, 2); - break; - case 127: - writeUInt32BE.call(outputBuffer, 0, 2); - writeUInt32BE.call(outputBuffer, dataLength, 6); - } - - if (maskData) { - outputBuffer[1] = secondByte | 0x80; - var mask = this._randomMask || (this._randomMask = getRandomMask()); - outputBuffer[dataOffset - 4] = mask[0]; - outputBuffer[dataOffset - 3] = mask[1]; - outputBuffer[dataOffset - 2] = mask[2]; - outputBuffer[dataOffset - 1] = mask[3]; - if (mergeBuffers) { - bufferUtil.mask(data, mask, outputBuffer, dataOffset, dataLength); - try { - this._socket.write(outputBuffer, 'binary', cb); - } - catch (e) { - if (typeof cb == 'function') cb(e); - else this.emit('error', e); - } - } - else { - bufferUtil.mask(data, mask, data, 0, dataLength); - try { - this._socket.write(outputBuffer, 'binary'); - this._socket.write(data, 'binary', cb); - } - catch (e) { - if (typeof cb == 'function') cb(e); - else this.emit('error', e); - } - } - } - else { - outputBuffer[1] = secondByte; - if (mergeBuffers) { - data.copy(outputBuffer, dataOffset); - try { - this._socket.write(outputBuffer, 'binary', cb); - } - catch (e) { - if (typeof cb == 'function') cb(e); - else this.emit('error', e); - } - } - else { - try { - this._socket.write(outputBuffer, 'binary'); - this._socket.write(data, 'binary', cb); - } - catch (e) { - if (typeof cb == 'function') cb(e); - else this.emit('error', e); - } - } - } -}; - -/** - * Execute message handler buffers - * - * @api private - */ - -Sender.prototype.flush = function() { - if (this.processing) return; - - var handler = this.messageHandlers.shift(); - if (!handler) return; - - this.processing = true; - - var self = this; - - handler(function() { - self.processing = false; - self.flush(); - }); -}; - -/** - * Apply extensions to message - * - * @api private - */ - -Sender.prototype.applyExtensions = function(data, fin, compress, callback) { - if (compress && data) { - this.extensions[PerMessageDeflate.extensionName].compress(data, fin, callback); - } else { - callback(null, data); - } -}; - -module.exports = Sender; - -function writeUInt16BE(value, offset) { - this[offset] = (value & 0xff00)>>8; - this[offset+1] = value & 0xff; -} - -function writeUInt32BE(value, offset) { - this[offset] = (value & 0xff000000)>>24; - this[offset+1] = (value & 0xff0000)>>16; - this[offset+2] = (value & 0xff00)>>8; - this[offset+3] = value & 0xff; -} - -function getArrayBuffer(data) { - // data is either an ArrayBuffer or ArrayBufferView. - var array = new Uint8Array(data.buffer || data) - , l = data.byteLength || data.length - , o = data.byteOffset || 0 - , buffer = new Buffer(l); - for (var i = 0; i < l; ++i) { - buffer[i] = array[o+i]; - } - return buffer; -} - -function getRandomMask() { - return new Buffer([ - ~~(Math.random() * 255), - ~~(Math.random() * 255), - ~~(Math.random() * 255), - ~~(Math.random() * 255) - ]); -} diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Validation.fallback.js b/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Validation.fallback.js deleted file mode 100644 index 2c7c4fd..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Validation.fallback.js +++ /dev/null @@ -1,12 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -module.exports.Validation = { - isValidUTF8: function(buffer) { - return true; - } -}; - diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Validation.js b/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Validation.js deleted file mode 100644 index 0f3109a..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/Validation.js +++ /dev/null @@ -1,16 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -try { - module.exports = require('../build/Release/validation'); -} catch (e) { try { - module.exports = require('../build/default/validation'); -} catch (e) { try { - module.exports = require('./Validation.fallback'); -} catch (e) { - console.error('validation.node seems to not have been built. Run npm install.'); - throw e; -}}} diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/WebSocket.js b/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/WebSocket.js deleted file mode 100644 index bc3f84a..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/WebSocket.js +++ /dev/null @@ -1,937 +0,0 @@ -'use strict'; - -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -var url = require('url') - , util = require('util') - , http = require('http') - , https = require('https') - , crypto = require('crypto') - , stream = require('stream') - , Ultron = require('ultron') - , Options = require('options') - , Sender = require('./Sender') - , Receiver = require('./Receiver') - , SenderHixie = require('./Sender.hixie') - , ReceiverHixie = require('./Receiver.hixie') - , Extensions = require('./Extensions') - , PerMessageDeflate = require('./PerMessageDeflate') - , EventEmitter = require('events').EventEmitter; - -/** - * Constants - */ - -// Default protocol version - -var protocolVersion = 13; - -// Close timeout - -var closeTimeout = 30 * 1000; // Allow 30 seconds to terminate the connection cleanly - -/** - * WebSocket implementation - * - * @constructor - * @param {String} address Connection address. - * @param {String|Array} protocols WebSocket protocols. - * @param {Object} options Additional connection options. - * @api public - */ -function WebSocket(address, protocols, options) { - EventEmitter.call(this); - - if (protocols && !Array.isArray(protocols) && 'object' === typeof protocols) { - // accept the "options" Object as the 2nd argument - options = protocols; - protocols = null; - } - - if ('string' === typeof protocols) { - protocols = [ protocols ]; - } - - if (!Array.isArray(protocols)) { - protocols = []; - } - - this._socket = null; - this._ultron = null; - this._closeReceived = false; - this.bytesReceived = 0; - this.readyState = null; - this.supports = {}; - this.extensions = {}; - - if (Array.isArray(address)) { - initAsServerClient.apply(this, address.concat(options)); - } else { - initAsClient.apply(this, [address, protocols, options]); - } -} - -/** - * Inherits from EventEmitter. - */ -util.inherits(WebSocket, EventEmitter); - -/** - * Ready States - */ -["CONNECTING", "OPEN", "CLOSING", "CLOSED"].forEach(function each(state, index) { - WebSocket.prototype[state] = WebSocket[state] = index; -}); - -/** - * Gracefully closes the connection, after sending a description message to the server - * - * @param {Object} data to be sent to the server - * @api public - */ -WebSocket.prototype.close = function close(code, data) { - if (this.readyState === WebSocket.CLOSED) return; - - if (this.readyState === WebSocket.CONNECTING) { - this.readyState = WebSocket.CLOSED; - return; - } - - if (this.readyState === WebSocket.CLOSING) { - if (this._closeReceived && this._isServer) { - this.terminate(); - } - return; - } - - var self = this; - try { - this.readyState = WebSocket.CLOSING; - this._closeCode = code; - this._closeMessage = data; - var mask = !this._isServer; - this._sender.close(code, data, mask, function(err) { - if (err) self.emit('error', err); - - if (self._closeReceived && self._isServer) { - self.terminate(); - } else { - // ensure that the connection is cleaned up even when no response of closing handshake. - clearTimeout(self._closeTimer); - self._closeTimer = setTimeout(cleanupWebsocketResources.bind(self, true), closeTimeout); - } - }); - } catch (e) { - this.emit('error', e); - } -}; - -/** - * Pause the client stream - * - * @api public - */ -WebSocket.prototype.pause = function pauser() { - if (this.readyState !== WebSocket.OPEN) throw new Error('not opened'); - - return this._socket.pause(); -}; - -/** - * Sends a ping - * - * @param {Object} data to be sent to the server - * @param {Object} Members - mask: boolean, binary: boolean - * @param {boolean} dontFailWhenClosed indicates whether or not to throw if the connection isnt open - * @api public - */ -WebSocket.prototype.ping = function ping(data, options, dontFailWhenClosed) { - if (this.readyState !== WebSocket.OPEN) { - if (dontFailWhenClosed === true) return; - throw new Error('not opened'); - } - - options = options || {}; - - if (typeof options.mask === 'undefined') options.mask = !this._isServer; - - this._sender.ping(data, options); -}; - -/** - * Sends a pong - * - * @param {Object} data to be sent to the server - * @param {Object} Members - mask: boolean, binary: boolean - * @param {boolean} dontFailWhenClosed indicates whether or not to throw if the connection isnt open - * @api public - */ -WebSocket.prototype.pong = function(data, options, dontFailWhenClosed) { - if (this.readyState !== WebSocket.OPEN) { - if (dontFailWhenClosed === true) return; - throw new Error('not opened'); - } - - options = options || {}; - - if (typeof options.mask === 'undefined') options.mask = !this._isServer; - - this._sender.pong(data, options); -}; - -/** - * Resume the client stream - * - * @api public - */ -WebSocket.prototype.resume = function resume() { - if (this.readyState !== WebSocket.OPEN) throw new Error('not opened'); - - return this._socket.resume(); -}; - -/** - * Sends a piece of data - * - * @param {Object} data to be sent to the server - * @param {Object} Members - mask: boolean, binary: boolean, compress: boolean - * @param {function} Optional callback which is executed after the send completes - * @api public - */ - -WebSocket.prototype.send = function send(data, options, cb) { - if (typeof options === 'function') { - cb = options; - options = {}; - } - - if (this.readyState !== WebSocket.OPEN) { - if (typeof cb === 'function') cb(new Error('not opened')); - else throw new Error('not opened'); - return; - } - - if (!data) data = ''; - if (this._queue) { - var self = this; - this._queue.push(function() { self.send(data, options, cb); }); - return; - } - - options = options || {}; - options.fin = true; - - if (typeof options.binary === 'undefined') { - options.binary = (data instanceof ArrayBuffer || data instanceof Buffer || - data instanceof Uint8Array || - data instanceof Uint16Array || - data instanceof Uint32Array || - data instanceof Int8Array || - data instanceof Int16Array || - data instanceof Int32Array || - data instanceof Float32Array || - data instanceof Float64Array); - } - - if (typeof options.mask === 'undefined') options.mask = !this._isServer; - if (typeof options.compress === 'undefined') options.compress = true; - if (!this.extensions[PerMessageDeflate.extensionName]) { - options.compress = false; - } - - var readable = typeof stream.Readable === 'function' - ? stream.Readable - : stream.Stream; - - if (data instanceof readable) { - startQueue(this); - var self = this; - - sendStream(this, data, options, function send(error) { - process.nextTick(function tock() { - executeQueueSends(self); - }); - - if (typeof cb === 'function') cb(error); - }); - } else { - this._sender.send(data, options, cb); - } -}; - -/** - * Streams data through calls to a user supplied function - * - * @param {Object} Members - mask: boolean, binary: boolean, compress: boolean - * @param {function} 'function (error, send)' which is executed on successive ticks of which send is 'function (data, final)'. - * @api public - */ -WebSocket.prototype.stream = function stream(options, cb) { - if (typeof options === 'function') { - cb = options; - options = {}; - } - - var self = this; - - if (typeof cb !== 'function') throw new Error('callback must be provided'); - - if (this.readyState !== WebSocket.OPEN) { - if (typeof cb === 'function') cb(new Error('not opened')); - else throw new Error('not opened'); - return; - } - - if (this._queue) { - this._queue.push(function () { self.stream(options, cb); }); - return; - } - - options = options || {}; - - if (typeof options.mask === 'undefined') options.mask = !this._isServer; - if (typeof options.compress === 'undefined') options.compress = true; - if (!this.extensions[PerMessageDeflate.extensionName]) { - options.compress = false; - } - - startQueue(this); - - function send(data, final) { - try { - if (self.readyState !== WebSocket.OPEN) throw new Error('not opened'); - options.fin = final === true; - self._sender.send(data, options); - if (!final) process.nextTick(cb.bind(null, null, send)); - else executeQueueSends(self); - } catch (e) { - if (typeof cb === 'function') cb(e); - else { - delete self._queue; - self.emit('error', e); - } - } - } - - process.nextTick(cb.bind(null, null, send)); -}; - -/** - * Immediately shuts down the connection - * - * @api public - */ -WebSocket.prototype.terminate = function terminate() { - if (this.readyState === WebSocket.CLOSED) return; - - if (this._socket) { - this.readyState = WebSocket.CLOSING; - - // End the connection - try { this._socket.end(); } - catch (e) { - // Socket error during end() call, so just destroy it right now - cleanupWebsocketResources.call(this, true); - return; - } - - // Add a timeout to ensure that the connection is completely - // cleaned up within 30 seconds, even if the clean close procedure - // fails for whatever reason - // First cleanup any pre-existing timeout from an earlier "terminate" call, - // if one exists. Otherwise terminate calls in quick succession will leak timeouts - // and hold the program open for `closeTimout` time. - if (this._closeTimer) { clearTimeout(this._closeTimer); } - this._closeTimer = setTimeout(cleanupWebsocketResources.bind(this, true), closeTimeout); - } else if (this.readyState === WebSocket.CONNECTING) { - cleanupWebsocketResources.call(this, true); - } -}; - -/** - * Expose bufferedAmount - * - * @api public - */ -Object.defineProperty(WebSocket.prototype, 'bufferedAmount', { - get: function get() { - var amount = 0; - if (this._socket) { - amount = this._socket.bufferSize || 0; - } - return amount; - } -}); - -/** - * Emulates the W3C Browser based WebSocket interface using function members. - * - * @see http://dev.w3.org/html5/websockets/#the-websocket-interface - * @api public - */ -['open', 'error', 'close', 'message'].forEach(function(method) { - Object.defineProperty(WebSocket.prototype, 'on' + method, { - /** - * Returns the current listener - * - * @returns {Mixed} the set function or undefined - * @api public - */ - get: function get() { - var listener = this.listeners(method)[0]; - return listener ? (listener._listener ? listener._listener : listener) : undefined; - }, - - /** - * Start listening for events - * - * @param {Function} listener the listener - * @returns {Mixed} the set function or undefined - * @api public - */ - set: function set(listener) { - this.removeAllListeners(method); - this.addEventListener(method, listener); - } - }); -}); - -/** - * Emulates the W3C Browser based WebSocket interface using addEventListener. - * - * @see https://developer.mozilla.org/en/DOM/element.addEventListener - * @see http://dev.w3.org/html5/websockets/#the-websocket-interface - * @api public - */ -WebSocket.prototype.addEventListener = function(method, listener) { - var target = this; - - function onMessage (data, flags) { - listener.call(target, new MessageEvent(data, flags.binary ? 'Binary' : 'Text', target)); - } - - function onClose (code, message) { - listener.call(target, new CloseEvent(code, message, target)); - } - - function onError (event) { - event.target = target; - listener.call(target, event); - } - - function onOpen () { - listener.call(target, new OpenEvent(target)); - } - - if (typeof listener === 'function') { - if (method === 'message') { - // store a reference so we can return the original function from the - // addEventListener hook - onMessage._listener = listener; - this.on(method, onMessage); - } else if (method === 'close') { - // store a reference so we can return the original function from the - // addEventListener hook - onClose._listener = listener; - this.on(method, onClose); - } else if (method === 'error') { - // store a reference so we can return the original function from the - // addEventListener hook - onError._listener = listener; - this.on(method, onError); - } else if (method === 'open') { - // store a reference so we can return the original function from the - // addEventListener hook - onOpen._listener = listener; - this.on(method, onOpen); - } else { - this.on(method, listener); - } - } -}; - -module.exports = WebSocket; - -/** - * W3C MessageEvent - * - * @see http://www.w3.org/TR/html5/comms.html - * @constructor - * @api private - */ -function MessageEvent(dataArg, typeArg, target) { - this.data = dataArg; - this.type = typeArg; - this.target = target; -} - -/** - * W3C CloseEvent - * - * @see http://www.w3.org/TR/html5/comms.html - * @constructor - * @api private - */ -function CloseEvent(code, reason, target) { - this.wasClean = (typeof code === 'undefined' || code === 1000); - this.code = code; - this.reason = reason; - this.target = target; -} - -/** - * W3C OpenEvent - * - * @see http://www.w3.org/TR/html5/comms.html - * @constructor - * @api private - */ -function OpenEvent(target) { - this.target = target; -} - -/** - * Entirely private apis, - * which may or may not be bound to a sepcific WebSocket instance. - */ -function initAsServerClient(req, socket, upgradeHead, options) { - options = new Options({ - protocolVersion: protocolVersion, - protocol: null, - extensions: {} - }).merge(options); - - // expose state properties - this.protocol = options.value.protocol; - this.protocolVersion = options.value.protocolVersion; - this.extensions = options.value.extensions; - this.supports.binary = (this.protocolVersion !== 'hixie-76'); - this.upgradeReq = req; - this.readyState = WebSocket.CONNECTING; - this._isServer = true; - - // establish connection - if (options.value.protocolVersion === 'hixie-76') { - establishConnection.call(this, ReceiverHixie, SenderHixie, socket, upgradeHead); - } else { - establishConnection.call(this, Receiver, Sender, socket, upgradeHead); - } -} - -function initAsClient(address, protocols, options) { - options = new Options({ - origin: null, - protocolVersion: protocolVersion, - host: null, - headers: null, - protocol: protocols.join(','), - agent: null, - - // ssl-related options - pfx: null, - key: null, - passphrase: null, - cert: null, - ca: null, - ciphers: null, - rejectUnauthorized: null, - perMessageDeflate: true - }).merge(options); - - if (options.value.protocolVersion !== 8 && options.value.protocolVersion !== 13) { - throw new Error('unsupported protocol version'); - } - - // verify URL and establish http class - var serverUrl = url.parse(address); - var isUnixSocket = serverUrl.protocol === 'ws+unix:'; - if (!serverUrl.host && !isUnixSocket) throw new Error('invalid url'); - var isSecure = serverUrl.protocol === 'wss:' || serverUrl.protocol === 'https:'; - var httpObj = isSecure ? https : http; - var port = serverUrl.port || (isSecure ? 443 : 80); - var auth = serverUrl.auth; - - // prepare extensions - var extensionsOffer = {}; - var perMessageDeflate; - if (options.value.perMessageDeflate) { - perMessageDeflate = new PerMessageDeflate(typeof options.value.perMessageDeflate !== true ? options.value.perMessageDeflate : {}, false); - extensionsOffer[PerMessageDeflate.extensionName] = perMessageDeflate.offer(); - } - - // expose state properties - this._isServer = false; - this.url = address; - this.protocolVersion = options.value.protocolVersion; - this.supports.binary = (this.protocolVersion !== 'hixie-76'); - - // begin handshake - var key = new Buffer(options.value.protocolVersion + '-' + Date.now()).toString('base64'); - var shasum = crypto.createHash('sha1'); - shasum.update(key + '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'); - var expectedServerKey = shasum.digest('base64'); - - var agent = options.value.agent; - - var headerHost = serverUrl.hostname; - // Append port number to Host and Origin header, only if specified in the url - // and non-default - if (serverUrl.port) { - if ((isSecure && (port !== 443)) || (!isSecure && (port !== 80))){ - headerHost = headerHost + ':' + port; - } - } - - var requestOptions = { - port: port, - host: serverUrl.hostname, - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Host': headerHost, - 'Origin': headerHost, - 'Sec-WebSocket-Version': options.value.protocolVersion, - 'Sec-WebSocket-Key': key - } - }; - - // If we have basic auth. - if (auth) { - requestOptions.headers.Authorization = 'Basic ' + new Buffer(auth).toString('base64'); - } - - if (options.value.protocol) { - requestOptions.headers['Sec-WebSocket-Protocol'] = options.value.protocol; - } - - if (options.value.host) { - requestOptions.headers.Host = options.value.host; - } - - if (options.value.headers) { - for (var header in options.value.headers) { - if (options.value.headers.hasOwnProperty(header)) { - requestOptions.headers[header] = options.value.headers[header]; - } - } - } - - if (Object.keys(extensionsOffer).length) { - requestOptions.headers['Sec-WebSocket-Extensions'] = Extensions.format(extensionsOffer); - } - - if (options.isDefinedAndNonNull('pfx') - || options.isDefinedAndNonNull('key') - || options.isDefinedAndNonNull('passphrase') - || options.isDefinedAndNonNull('cert') - || options.isDefinedAndNonNull('ca') - || options.isDefinedAndNonNull('ciphers') - || options.isDefinedAndNonNull('rejectUnauthorized')) { - - if (options.isDefinedAndNonNull('pfx')) requestOptions.pfx = options.value.pfx; - if (options.isDefinedAndNonNull('key')) requestOptions.key = options.value.key; - if (options.isDefinedAndNonNull('passphrase')) requestOptions.passphrase = options.value.passphrase; - if (options.isDefinedAndNonNull('cert')) requestOptions.cert = options.value.cert; - if (options.isDefinedAndNonNull('ca')) requestOptions.ca = options.value.ca; - if (options.isDefinedAndNonNull('ciphers')) requestOptions.ciphers = options.value.ciphers; - if (options.isDefinedAndNonNull('rejectUnauthorized')) requestOptions.rejectUnauthorized = options.value.rejectUnauthorized; - - if (!agent) { - // global agent ignores client side certificates - agent = new httpObj.Agent(requestOptions); - } - } - - requestOptions.path = serverUrl.path || '/'; - - if (agent) { - requestOptions.agent = agent; - } - - if (isUnixSocket) { - requestOptions.socketPath = serverUrl.pathname; - } - if (options.value.origin) { - if (options.value.protocolVersion < 13) requestOptions.headers['Sec-WebSocket-Origin'] = options.value.origin; - else requestOptions.headers.Origin = options.value.origin; - } - - var self = this; - var req = httpObj.request(requestOptions); - - req.on('error', function onerror(error) { - self.emit('error', error); - cleanupWebsocketResources.call(this, error); - }); - - req.once('response', function response(res) { - var error; - - if (!self.emit('unexpected-response', req, res)) { - error = new Error('unexpected server response (' + res.statusCode + ')'); - req.abort(); - self.emit('error', error); - } - - cleanupWebsocketResources.call(this, error); - }); - - req.once('upgrade', function upgrade(res, socket, upgradeHead) { - if (self.readyState === WebSocket.CLOSED) { - // client closed before server accepted connection - self.emit('close'); - self.removeAllListeners(); - socket.end(); - return; - } - - var serverKey = res.headers['sec-websocket-accept']; - if (typeof serverKey === 'undefined' || serverKey !== expectedServerKey) { - self.emit('error', 'invalid server key'); - self.removeAllListeners(); - socket.end(); - return; - } - - var serverProt = res.headers['sec-websocket-protocol']; - var protList = (options.value.protocol || "").split(/, */); - var protError = null; - - if (!options.value.protocol && serverProt) { - protError = 'server sent a subprotocol even though none requested'; - } else if (options.value.protocol && !serverProt) { - protError = 'server sent no subprotocol even though requested'; - } else if (serverProt && protList.indexOf(serverProt) === -1) { - protError = 'server responded with an invalid protocol'; - } - - if (protError) { - self.emit('error', protError); - self.removeAllListeners(); - socket.end(); - return; - } else if (serverProt) { - self.protocol = serverProt; - } - - var serverExtensions = Extensions.parse(res.headers['sec-websocket-extensions']); - if (perMessageDeflate && serverExtensions[PerMessageDeflate.extensionName]) { - try { - perMessageDeflate.accept(serverExtensions[PerMessageDeflate.extensionName]); - } catch (err) { - self.emit('error', 'invalid extension parameter'); - self.removeAllListeners(); - socket.end(); - return; - } - self.extensions[PerMessageDeflate.extensionName] = perMessageDeflate; - } - - establishConnection.call(self, Receiver, Sender, socket, upgradeHead); - - // perform cleanup on http resources - req.removeAllListeners(); - req = null; - agent = null; - }); - - req.end(); - this.readyState = WebSocket.CONNECTING; -} - -function establishConnection(ReceiverClass, SenderClass, socket, upgradeHead) { - var ultron = this._ultron = new Ultron(socket); - this._socket = socket; - - socket.setTimeout(0); - socket.setNoDelay(true); - var self = this; - this._receiver = new ReceiverClass(this.extensions); - - // socket cleanup handlers - ultron.on('end', cleanupWebsocketResources.bind(this)); - ultron.on('close', cleanupWebsocketResources.bind(this)); - ultron.on('error', cleanupWebsocketResources.bind(this)); - - // ensure that the upgradeHead is added to the receiver - function firstHandler(data) { - if (self.readyState !== WebSocket.OPEN && self.readyState !== WebSocket.CLOSING) return; - - if (upgradeHead && upgradeHead.length > 0) { - self.bytesReceived += upgradeHead.length; - var head = upgradeHead; - upgradeHead = null; - self._receiver.add(head); - } - - dataHandler = realHandler; - - if (data) { - self.bytesReceived += data.length; - self._receiver.add(data); - } - } - - // subsequent packets are pushed straight to the receiver - function realHandler(data) { - if (data) self.bytesReceived += data.length; - self._receiver.add(data); - } - - var dataHandler = firstHandler; - - // if data was passed along with the http upgrade, - // this will schedule a push of that on to the receiver. - // this has to be done on next tick, since the caller - // hasn't had a chance to set event handlers on this client - // object yet. - process.nextTick(firstHandler); - - // receiver event handlers - self._receiver.ontext = function ontext(data, flags) { - flags = flags || {}; - - self.emit('message', data, flags); - }; - - self._receiver.onbinary = function onbinary(data, flags) { - flags = flags || {}; - - flags.binary = true; - self.emit('message', data, flags); - }; - - self._receiver.onping = function onping(data, flags) { - flags = flags || {}; - - self.pong(data, { - mask: !self._isServer, - binary: flags.binary === true - }, true); - - self.emit('ping', data, flags); - }; - - self._receiver.onpong = function onpong(data, flags) { - self.emit('pong', data, flags || {}); - }; - - self._receiver.onclose = function onclose(code, data, flags) { - flags = flags || {}; - - self._closeReceived = true; - self.close(code, data); - }; - - self._receiver.onerror = function onerror(reason, errorCode) { - // close the connection when the receiver reports a HyBi error code - self.close(typeof errorCode !== 'undefined' ? errorCode : 1002, ''); - self.emit('error', reason, errorCode); - }; - - // finalize the client - this._sender = new SenderClass(socket, this.extensions); - this._sender.on('error', function onerror(error) { - self.close(1002, ''); - self.emit('error', error); - }); - - this.readyState = WebSocket.OPEN; - this.emit('open'); - - ultron.on('data', dataHandler); -} - -function startQueue(instance) { - instance._queue = instance._queue || []; -} - -function executeQueueSends(instance) { - var queue = instance._queue; - if (typeof queue === 'undefined') return; - - delete instance._queue; - for (var i = 0, l = queue.length; i < l; ++i) { - queue[i](); - } -} - -function sendStream(instance, stream, options, cb) { - stream.on('data', function incoming(data) { - if (instance.readyState !== WebSocket.OPEN) { - if (typeof cb === 'function') cb(new Error('not opened')); - else { - delete instance._queue; - instance.emit('error', new Error('not opened')); - } - return; - } - - options.fin = false; - instance._sender.send(data, options); - }); - - stream.on('end', function end() { - if (instance.readyState !== WebSocket.OPEN) { - if (typeof cb === 'function') cb(new Error('not opened')); - else { - delete instance._queue; - instance.emit('error', new Error('not opened')); - } - return; - } - - options.fin = true; - instance._sender.send(null, options); - - if (typeof cb === 'function') cb(null); - }); -} - -function cleanupWebsocketResources(error) { - if (this.readyState === WebSocket.CLOSED) return; - - var emitClose = this.readyState !== WebSocket.CONNECTING; - this.readyState = WebSocket.CLOSED; - - clearTimeout(this._closeTimer); - this._closeTimer = null; - - if (emitClose) { - this.emit('close', this._closeCode || 1000, this._closeMessage || ''); - } - - if (this._socket) { - if (this._ultron) this._ultron.destroy(); - this._socket.on('error', function onerror() { - try { this.destroy(); } - catch (e) {} - }); - - try { - if (!error) this._socket.end(); - else this._socket.destroy(); - } catch (e) { /* Ignore termination errors */ } - - this._socket = null; - this._ultron = null; - } - - if (this._sender) { - this._sender.removeAllListeners(); - this._sender = null; - } - - if (this._receiver) { - this._receiver.cleanup(); - this._receiver = null; - } - - this.removeAllListeners(); - this.on('error', function onerror() {}); // catch all errors after this - delete this._queue; -} diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/WebSocketServer.js b/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/WebSocketServer.js deleted file mode 100644 index a2f3a61..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/WebSocketServer.js +++ /dev/null @@ -1,501 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -var util = require('util') - , events = require('events') - , http = require('http') - , crypto = require('crypto') - , Options = require('options') - , WebSocket = require('./WebSocket') - , Extensions = require('./Extensions') - , PerMessageDeflate = require('./PerMessageDeflate') - , tls = require('tls') - , url = require('url'); - -/** - * WebSocket Server implementation - */ - -function WebSocketServer(options, callback) { - events.EventEmitter.call(this); - - options = new Options({ - host: '0.0.0.0', - port: null, - server: null, - verifyClient: null, - handleProtocols: null, - path: null, - noServer: false, - disableHixie: false, - clientTracking: true, - perMessageDeflate: true - }).merge(options); - - if (!options.isDefinedAndNonNull('port') && !options.isDefinedAndNonNull('server') && !options.value.noServer) { - throw new TypeError('`port` or a `server` must be provided'); - } - - var self = this; - - if (options.isDefinedAndNonNull('port')) { - this._server = http.createServer(function (req, res) { - res.writeHead(200, {'Content-Type': 'text/plain'}); - res.end('Not implemented'); - }); - this._server.listen(options.value.port, options.value.host, callback); - this._closeServer = function() { if (self._server) self._server.close(); }; - } - else if (options.value.server) { - this._server = options.value.server; - if (options.value.path) { - // take note of the path, to avoid collisions when multiple websocket servers are - // listening on the same http server - if (this._server._webSocketPaths && options.value.server._webSocketPaths[options.value.path]) { - throw new Error('two instances of WebSocketServer cannot listen on the same http server path'); - } - if (typeof this._server._webSocketPaths !== 'object') { - this._server._webSocketPaths = {}; - } - this._server._webSocketPaths[options.value.path] = 1; - } - } - if (this._server) this._server.once('listening', function() { self.emit('listening'); }); - - if (typeof this._server != 'undefined') { - this._server.on('error', function(error) { - self.emit('error', error) - }); - this._server.on('upgrade', function(req, socket, upgradeHead) { - //copy upgradeHead to avoid retention of large slab buffers used in node core - var head = new Buffer(upgradeHead.length); - upgradeHead.copy(head); - - self.handleUpgrade(req, socket, head, function(client) { - self.emit('connection'+req.url, client); - self.emit('connection', client); - }); - }); - } - - this.options = options.value; - this.path = options.value.path; - this.clients = []; -} - -/** - * Inherits from EventEmitter. - */ - -util.inherits(WebSocketServer, events.EventEmitter); - -/** - * Immediately shuts down the connection. - * - * @api public - */ - -WebSocketServer.prototype.close = function() { - // terminate all associated clients - var error = null; - try { - for (var i = 0, l = this.clients.length; i < l; ++i) { - this.clients[i].terminate(); - } - } - catch (e) { - error = e; - } - - // remove path descriptor, if any - if (this.path && this._server._webSocketPaths) { - delete this._server._webSocketPaths[this.path]; - if (Object.keys(this._server._webSocketPaths).length == 0) { - delete this._server._webSocketPaths; - } - } - - // close the http server if it was internally created - try { - if (typeof this._closeServer !== 'undefined') { - this._closeServer(); - } - } - finally { - delete this._server; - } - if (error) throw error; -} - -/** - * Handle a HTTP Upgrade request. - * - * @api public - */ - -WebSocketServer.prototype.handleUpgrade = function(req, socket, upgradeHead, cb) { - // check for wrong path - if (this.options.path) { - var u = url.parse(req.url); - if (u && u.pathname !== this.options.path) return; - } - - if (typeof req.headers.upgrade === 'undefined' || req.headers.upgrade.toLowerCase() !== 'websocket') { - abortConnection(socket, 400, 'Bad Request'); - return; - } - - if (req.headers['sec-websocket-key1']) handleHixieUpgrade.apply(this, arguments); - else handleHybiUpgrade.apply(this, arguments); -} - -module.exports = WebSocketServer; - -/** - * Entirely private apis, - * which may or may not be bound to a sepcific WebSocket instance. - */ - -function handleHybiUpgrade(req, socket, upgradeHead, cb) { - // handle premature socket errors - var errorHandler = function() { - try { socket.destroy(); } catch (e) {} - } - socket.on('error', errorHandler); - - // verify key presence - if (!req.headers['sec-websocket-key']) { - abortConnection(socket, 400, 'Bad Request'); - return; - } - - // verify version - var version = parseInt(req.headers['sec-websocket-version']); - if ([8, 13].indexOf(version) === -1) { - abortConnection(socket, 400, 'Bad Request'); - return; - } - - // verify protocol - var protocols = req.headers['sec-websocket-protocol']; - - // verify client - var origin = version < 13 ? - req.headers['sec-websocket-origin'] : - req.headers['origin']; - - // handle extensions offer - var extensionsOffer = Extensions.parse(req.headers['sec-websocket-extensions']); - - // handler to call when the connection sequence completes - var self = this; - var completeHybiUpgrade2 = function(protocol) { - - // calc key - var key = req.headers['sec-websocket-key']; - var shasum = crypto.createHash('sha1'); - shasum.update(key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"); - key = shasum.digest('base64'); - - var headers = [ - 'HTTP/1.1 101 Switching Protocols' - , 'Upgrade: websocket' - , 'Connection: Upgrade' - , 'Sec-WebSocket-Accept: ' + key - ]; - - if (typeof protocol != 'undefined') { - headers.push('Sec-WebSocket-Protocol: ' + protocol); - } - - var extensions = {}; - try { - extensions = acceptExtensions.call(self, extensionsOffer); - } catch (err) { - abortConnection(socket, 400, 'Bad Request'); - return; - } - - if (Object.keys(extensions).length) { - var serverExtensions = {}; - Object.keys(extensions).forEach(function(token) { - serverExtensions[token] = [extensions[token].params] - }); - headers.push('Sec-WebSocket-Extensions: ' + Extensions.format(serverExtensions)); - } - - // allows external modification/inspection of handshake headers - self.emit('headers', headers); - - socket.setTimeout(0); - socket.setNoDelay(true); - try { - socket.write(headers.concat('', '').join('\r\n')); - } - catch (e) { - // if the upgrade write fails, shut the connection down hard - try { socket.destroy(); } catch (e) {} - return; - } - - var client = new WebSocket([req, socket, upgradeHead], { - protocolVersion: version, - protocol: protocol, - extensions: extensions - }); - - if (self.options.clientTracking) { - self.clients.push(client); - client.on('close', function() { - var index = self.clients.indexOf(client); - if (index != -1) { - self.clients.splice(index, 1); - } - }); - } - - // signal upgrade complete - socket.removeListener('error', errorHandler); - cb(client); - } - - // optionally call external protocol selection handler before - // calling completeHybiUpgrade2 - var completeHybiUpgrade1 = function() { - // choose from the sub-protocols - if (typeof self.options.handleProtocols == 'function') { - var protList = (protocols || "").split(/, */); - var callbackCalled = false; - var res = self.options.handleProtocols(protList, function(result, protocol) { - callbackCalled = true; - if (!result) abortConnection(socket, 401, 'Unauthorized'); - else completeHybiUpgrade2(protocol); - }); - if (!callbackCalled) { - // the handleProtocols handler never called our callback - abortConnection(socket, 501, 'Could not process protocols'); - } - return; - } else { - if (typeof protocols !== 'undefined') { - completeHybiUpgrade2(protocols.split(/, */)[0]); - } - else { - completeHybiUpgrade2(); - } - } - } - - // optionally call external client verification handler - if (typeof this.options.verifyClient == 'function') { - var info = { - origin: origin, - secure: typeof req.connection.authorized !== 'undefined' || typeof req.connection.encrypted !== 'undefined', - req: req - }; - if (this.options.verifyClient.length == 2) { - this.options.verifyClient(info, function(result, code, name) { - if (typeof code === 'undefined') code = 401; - if (typeof name === 'undefined') name = http.STATUS_CODES[code]; - - if (!result) abortConnection(socket, code, name); - else completeHybiUpgrade1(); - }); - return; - } - else if (!this.options.verifyClient(info)) { - abortConnection(socket, 401, 'Unauthorized'); - return; - } - } - - completeHybiUpgrade1(); -} - -function handleHixieUpgrade(req, socket, upgradeHead, cb) { - // handle premature socket errors - var errorHandler = function() { - try { socket.destroy(); } catch (e) {} - } - socket.on('error', errorHandler); - - // bail if options prevent hixie - if (this.options.disableHixie) { - abortConnection(socket, 401, 'Hixie support disabled'); - return; - } - - // verify key presence - if (!req.headers['sec-websocket-key2']) { - abortConnection(socket, 400, 'Bad Request'); - return; - } - - var origin = req.headers['origin'] - , self = this; - - // setup handshake completion to run after client has been verified - var onClientVerified = function() { - var wshost; - if (!req.headers['x-forwarded-host']) - wshost = req.headers.host; - else - wshost = req.headers['x-forwarded-host']; - var location = ((req.headers['x-forwarded-proto'] === 'https' || socket.encrypted) ? 'wss' : 'ws') + '://' + wshost + req.url - , protocol = req.headers['sec-websocket-protocol']; - - // handshake completion code to run once nonce has been successfully retrieved - var completeHandshake = function(nonce, rest) { - // calculate key - var k1 = req.headers['sec-websocket-key1'] - , k2 = req.headers['sec-websocket-key2'] - , md5 = crypto.createHash('md5'); - - [k1, k2].forEach(function (k) { - var n = parseInt(k.replace(/[^\d]/g, '')) - , spaces = k.replace(/[^ ]/g, '').length; - if (spaces === 0 || n % spaces !== 0){ - abortConnection(socket, 400, 'Bad Request'); - return; - } - n /= spaces; - md5.update(String.fromCharCode( - n >> 24 & 0xFF, - n >> 16 & 0xFF, - n >> 8 & 0xFF, - n & 0xFF)); - }); - md5.update(nonce.toString('binary')); - - var headers = [ - 'HTTP/1.1 101 Switching Protocols' - , 'Upgrade: WebSocket' - , 'Connection: Upgrade' - , 'Sec-WebSocket-Location: ' + location - ]; - if (typeof protocol != 'undefined') headers.push('Sec-WebSocket-Protocol: ' + protocol); - if (typeof origin != 'undefined') headers.push('Sec-WebSocket-Origin: ' + origin); - - socket.setTimeout(0); - socket.setNoDelay(true); - try { - // merge header and hash buffer - var headerBuffer = new Buffer(headers.concat('', '').join('\r\n')); - var hashBuffer = new Buffer(md5.digest('binary'), 'binary'); - var handshakeBuffer = new Buffer(headerBuffer.length + hashBuffer.length); - headerBuffer.copy(handshakeBuffer, 0); - hashBuffer.copy(handshakeBuffer, headerBuffer.length); - - // do a single write, which - upon success - causes a new client websocket to be setup - socket.write(handshakeBuffer, 'binary', function(err) { - if (err) return; // do not create client if an error happens - var client = new WebSocket([req, socket, rest], { - protocolVersion: 'hixie-76', - protocol: protocol - }); - if (self.options.clientTracking) { - self.clients.push(client); - client.on('close', function() { - var index = self.clients.indexOf(client); - if (index != -1) { - self.clients.splice(index, 1); - } - }); - } - - // signal upgrade complete - socket.removeListener('error', errorHandler); - cb(client); - }); - } - catch (e) { - try { socket.destroy(); } catch (e) {} - return; - } - } - - // retrieve nonce - var nonceLength = 8; - if (upgradeHead && upgradeHead.length >= nonceLength) { - var nonce = upgradeHead.slice(0, nonceLength); - var rest = upgradeHead.length > nonceLength ? upgradeHead.slice(nonceLength) : null; - completeHandshake.call(self, nonce, rest); - } - else { - // nonce not present in upgradeHead, so we must wait for enough data - // data to arrive before continuing - var nonce = new Buffer(nonceLength); - upgradeHead.copy(nonce, 0); - var received = upgradeHead.length; - var rest = null; - var handler = function (data) { - var toRead = Math.min(data.length, nonceLength - received); - if (toRead === 0) return; - data.copy(nonce, received, 0, toRead); - received += toRead; - if (received == nonceLength) { - socket.removeListener('data', handler); - if (toRead < data.length) rest = data.slice(toRead); - completeHandshake.call(self, nonce, rest); - } - } - socket.on('data', handler); - } - } - - // verify client - if (typeof this.options.verifyClient == 'function') { - var info = { - origin: origin, - secure: typeof req.connection.authorized !== 'undefined' || typeof req.connection.encrypted !== 'undefined', - req: req - }; - if (this.options.verifyClient.length == 2) { - var self = this; - this.options.verifyClient(info, function(result, code, name) { - if (typeof code === 'undefined') code = 401; - if (typeof name === 'undefined') name = http.STATUS_CODES[code]; - - if (!result) abortConnection(socket, code, name); - else onClientVerified.apply(self); - }); - return; - } - else if (!this.options.verifyClient(info)) { - abortConnection(socket, 401, 'Unauthorized'); - return; - } - } - - // no client verification required - onClientVerified(); -} - -function acceptExtensions(offer) { - var extensions = {}; - var options = this.options.perMessageDeflate; - if (options && offer[PerMessageDeflate.extensionName]) { - var perMessageDeflate = new PerMessageDeflate(options !== true ? options : {}, true); - perMessageDeflate.accept(offer[PerMessageDeflate.extensionName]); - extensions[PerMessageDeflate.extensionName] = perMessageDeflate; - } - return extensions; -} - -function abortConnection(socket, code, name) { - try { - var response = [ - 'HTTP/1.1 ' + code + ' ' + name, - 'Content-type: text/html' - ]; - socket.write(response.concat('', '').join('\r\n')); - } - catch (e) { /* ignore errors - we've aborted this connection */ } - finally { - // ensure that an early aborted connection is shut down completely - try { socket.destroy(); } catch (e) {} - } -} diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/browser.js b/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/browser.js deleted file mode 100644 index 8d3a755..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/lib/browser.js +++ /dev/null @@ -1,43 +0,0 @@ - -/** - * Module dependencies. - */ - -var global = (function() { return this; })(); - -/** - * WebSocket constructor. - */ - -var WebSocket = global.WebSocket || global.MozWebSocket; - -/** - * Module exports. - */ - -module.exports = WebSocket ? ws : null; - -/** - * WebSocket constructor. - * - * The third `opts` options object gets ignored in web browsers, since it's - * non-standard, and throws a TypeError if passed to the constructor. - * See: https://github.com/einaros/ws/issues/227 - * - * @param {String} uri - * @param {Array} protocols (optional) - * @param {Object) opts (optional) - * @api public - */ - -function ws(uri, protocols, opts) { - var instance; - if (protocols) { - instance = new WebSocket(uri, protocols); - } else { - instance = new WebSocket(uri); - } - return instance; -} - -if (WebSocket) ws.prototype = WebSocket.prototype; diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/.dntrc b/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/.dntrc deleted file mode 100644 index d2c6cad..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/.dntrc +++ /dev/null @@ -1,37 +0,0 @@ -## DNT config file -## see https://github.com/rvagg/dnt - -NODE_VERSIONS="\ - v0.11.14 \ - v0.11.13 \ - v0.10.34 \ - v0.10.33 \ - v0.10.32 \ - v0.10.31 \ - v0.10.30 \ - v0.10.29 \ - v0.10.28 \ - v0.10.26 \ - v0.10.25 \ - v0.10.24 \ - v0.10.23 \ - v0.10.22 \ - v0.10.21 \ - v0.10.20 \ - v0.10.19 \ - v0.8.28 \ - v0.8.27 \ - v0.8.26 \ - v0.8.24 \ -" -IOJS_VERSIONS="\ - v1.0.1-release -" -OUTPUT_PREFIX="nan-" -TEST_CMD=" \ - cd /dnt/ && \ - npm install && \ - node_modules/.bin/node-gyp --nodedir /usr/src/node/ rebuild --directory test && \ - node_modules/.bin/tap --gc test/js/*-test.js \ -" - diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/CHANGELOG.md b/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/CHANGELOG.md deleted file mode 100644 index 4408f14..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/CHANGELOG.md +++ /dev/null @@ -1,216 +0,0 @@ -# NAN ChangeLog - -**Version 1.4.1: current Node unstable: 0.11.14, Node stable: 0.10.33** - -### 1.4.1 Nov 8 2014 - - Bugfix: Handle DEBUG definition correctly - - Bugfix: Accept int as Boolean - -### 1.4.0 Nov 1 2014 - - - Feature: Added NAN_GC_CALLBACK 6a5c245 - - Performance: Removed unnecessary local handle creation 18a7243, 41fe2f8 - - Correctness: Added constness to references in NanHasInstance 02c61cd - - Warnings: Fixed spurious warnings from -Wundef and -Wshadow, 541b122, 99d8cb6 - - Windoze: Shut Visual Studio up when compiling 8d558c1 - - License: Switch to plain MIT from custom hacked MIT license 11de983 - - Build: Added test target to Makefile e232e46 - - Performance: Removed superfluous scope in NanAsyncWorker f4b7821 - - Sugar/Feature: Added NanReturnThis() and NanReturnHolder() shorthands 237a5ff, d697208 - - Feature: Added suitable overload of NanNew for v8::Integer::NewFromUnsigned b27b450 - -### 1.3.0 Aug 2 2014 - - - Added NanNew(std::string) - - Added NanNew(std::string&) - - Added NanAsciiString helper class - - Added NanUtf8String helper class - - Added NanUcs2String helper class - - Deprecated NanRawString() - - Deprecated NanCString() - - Added NanGetIsolateData(v8::Isolate *isolate) - - Added NanMakeCallback(v8::Handle target, v8::Handle func, int argc, v8::Handle* argv) - - Added NanMakeCallback(v8::Handle target, v8::Handle symbol, int argc, v8::Handle* argv) - - Added NanMakeCallback(v8::Handle target, const char* method, int argc, v8::Handle* argv) - - Added NanSetTemplate(v8::Handle templ, v8::Handle name , v8::Handle value, v8::PropertyAttribute attributes) - - Added NanSetPrototypeTemplate(v8::Local templ, v8::Handle name, v8::Handle value, v8::PropertyAttribute attributes) - - Added NanSetInstanceTemplate(v8::Local templ, const char *name, v8::Handle value) - - Added NanSetInstanceTemplate(v8::Local templ, v8::Handle name, v8::Handle value, v8::PropertyAttribute attributes) - -### 1.2.0 Jun 5 2014 - - - Add NanSetPrototypeTemplate - - Changed NAN_WEAK_CALLBACK internals, switched _NanWeakCallbackData to class, - introduced _NanWeakCallbackDispatcher - - Removed -Wno-unused-local-typedefs from test builds - - Made test builds Windows compatible ('Sleep()') - -### 1.1.2 May 28 2014 - - - Release to fix more stuff-ups in 1.1.1 - -### 1.1.1 May 28 2014 - - - Release to fix version mismatch in nan.h and lack of changelog entry for 1.1.0 - -### 1.1.0 May 25 2014 - - - Remove nan_isolate, use v8::Isolate::GetCurrent() internally instead - - Additional explicit overloads for NanNew(): (char*,int), (uint8_t*[,int]), - (uint16_t*[,int), double, int, unsigned int, bool, v8::String::ExternalStringResource*, - v8::String::ExternalAsciiStringResource* - - Deprecate NanSymbol() - - Added SetErrorMessage() and ErrorMessage() to NanAsyncWorker - -### 1.0.0 May 4 2014 - - - Heavy API changes for V8 3.25 / Node 0.11.13 - - Use cpplint.py - - Removed NanInitPersistent - - Removed NanPersistentToLocal - - Removed NanFromV8String - - Removed NanMakeWeak - - Removed NanNewLocal - - Removed NAN_WEAK_CALLBACK_OBJECT - - Removed NAN_WEAK_CALLBACK_DATA - - Introduce NanNew, replaces NanNewLocal, NanPersistentToLocal, adds many overloaded typed versions - - Introduce NanUndefined, NanNull, NanTrue and NanFalse - - Introduce NanEscapableScope and NanEscapeScope - - Introduce NanMakeWeakPersistent (requires a special callback to work on both old and new node) - - Introduce NanMakeCallback for node::MakeCallback - - Introduce NanSetTemplate - - Introduce NanGetCurrentContext - - Introduce NanCompileScript and NanRunScript - - Introduce NanAdjustExternalMemory - - Introduce NanAddGCEpilogueCallback, NanAddGCPrologueCallback, NanRemoveGCEpilogueCallback, NanRemoveGCPrologueCallback - - Introduce NanGetHeapStatistics - - Rename NanAsyncWorker#SavePersistent() to SaveToPersistent() - -### 0.8.0 Jan 9 2014 - - - NanDispose -> NanDisposePersistent, deprecate NanDispose - - Extract _NAN_*_RETURN_TYPE, pull up NAN_*() - -### 0.7.1 Jan 9 2014 - - - Fixes to work against debug builds of Node - - Safer NanPersistentToLocal (avoid reinterpret_cast) - - Speed up common NanRawString case by only extracting flattened string when necessary - -### 0.7.0 Dec 17 2013 - - - New no-arg form of NanCallback() constructor. - - NanCallback#Call takes Handle rather than Local - - Removed deprecated NanCallback#Run method, use NanCallback#Call instead - - Split off _NAN_*_ARGS_TYPE from _NAN_*_ARGS - - Restore (unofficial) Node 0.6 compatibility at NanCallback#Call() - - Introduce NanRawString() for char* (or appropriate void*) from v8::String - (replacement for NanFromV8String) - - Introduce NanCString() for null-terminated char* from v8::String - -### 0.6.0 Nov 21 2013 - - - Introduce NanNewLocal(v8::Handle value) for use in place of - v8::Local::New(...) since v8 started requiring isolate in Node 0.11.9 - -### 0.5.2 Nov 16 2013 - - - Convert SavePersistent and GetFromPersistent in NanAsyncWorker from protected and public - -### 0.5.1 Nov 12 2013 - - - Use node::MakeCallback() instead of direct v8::Function::Call() - -### 0.5.0 Nov 11 2013 - - - Added @TooTallNate as collaborator - - New, much simpler, "include_dirs" for binding.gyp - - Added full range of NAN_INDEX_* macros to match NAN_PROPERTY_* macros - -### 0.4.4 Nov 2 2013 - - - Isolate argument from v8::Persistent::MakeWeak removed for 0.11.8+ - -### 0.4.3 Nov 2 2013 - - - Include node_object_wrap.h, removed from node.h for Node 0.11.8. - -### 0.4.2 Nov 2 2013 - - - Handle deprecation of v8::Persistent::Dispose(v8::Isolate* isolate)) for - Node 0.11.8 release. - -### 0.4.1 Sep 16 2013 - - - Added explicit `#include ` as it was removed from node.h for v0.11.8 - -### 0.4.0 Sep 2 2013 - - - Added NAN_INLINE and NAN_DEPRECATED and made use of them - - Added NanError, NanTypeError and NanRangeError - - Cleaned up code - -### 0.3.2 Aug 30 2013 - - - Fix missing scope declaration in GetFromPersistent() and SaveToPersistent - in NanAsyncWorker - -### 0.3.1 Aug 20 2013 - - - fix "not all control paths return a value" compile warning on some platforms - -### 0.3.0 Aug 19 2013 - - - Made NAN work with NPM - - Lots of fixes to NanFromV8String, pulling in features from new Node core - - Changed node::encoding to Nan::Encoding in NanFromV8String to unify the API - - Added optional error number argument for NanThrowError() - - Added NanInitPersistent() - - Added NanReturnNull() and NanReturnEmptyString() - - Added NanLocker and NanUnlocker - - Added missing scopes - - Made sure to clear disposed Persistent handles - - Changed NanAsyncWorker to allocate error messages on the heap - - Changed NanThrowError(Local) to NanThrowError(Handle) - - Fixed leak in NanAsyncWorker when errmsg is used - -### 0.2.2 Aug 5 2013 - - - Fixed usage of undefined variable with node::BASE64 in NanFromV8String() - -### 0.2.1 Aug 5 2013 - - - Fixed 0.8 breakage, node::BUFFER encoding type not available in 0.8 for - NanFromV8String() - -### 0.2.0 Aug 5 2013 - - - Added NAN_PROPERTY_GETTER, NAN_PROPERTY_SETTER, NAN_PROPERTY_ENUMERATOR, - NAN_PROPERTY_DELETER, NAN_PROPERTY_QUERY - - Extracted _NAN_METHOD_ARGS, _NAN_GETTER_ARGS, _NAN_SETTER_ARGS, - _NAN_PROPERTY_GETTER_ARGS, _NAN_PROPERTY_SETTER_ARGS, - _NAN_PROPERTY_ENUMERATOR_ARGS, _NAN_PROPERTY_DELETER_ARGS, - _NAN_PROPERTY_QUERY_ARGS - - Added NanGetInternalFieldPointer, NanSetInternalFieldPointer - - Added NAN_WEAK_CALLBACK, NAN_WEAK_CALLBACK_OBJECT, - NAN_WEAK_CALLBACK_DATA, NanMakeWeak - - Renamed THROW_ERROR to _NAN_THROW_ERROR - - Added NanNewBufferHandle(char*, size_t, node::smalloc::FreeCallback, void*) - - Added NanBufferUse(char*, uint32_t) - - Added NanNewContextHandle(v8::ExtensionConfiguration*, - v8::Handle, v8::Handle) - - Fixed broken NanCallback#GetFunction() - - Added optional encoding and size arguments to NanFromV8String() - - Added NanGetPointerSafe() and NanSetPointerSafe() - - Added initial test suite (to be expanded) - - Allow NanUInt32OptionValue to convert any Number object - -### 0.1.0 Jul 21 2013 - - - Added `NAN_GETTER`, `NAN_SETTER` - - Added `NanThrowError` with single Local argument - - Added `NanNewBufferHandle` with single uint32_t argument - - Added `NanHasInstance(Persistent&, Handle)` - - Added `Local NanCallback#GetFunction()` - - Added `NanCallback#Call(int, Local[])` - - Deprecated `NanCallback#Run(int, Local[])` in favour of Call diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/LICENSE.md b/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/LICENSE.md deleted file mode 100644 index 6821891..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/LICENSE.md +++ /dev/null @@ -1,13 +0,0 @@ -The MIT License (MIT) -===================== - -Copyright (c) 2014 NAN contributors ------------------------------------ - -*NAN contributors listed at * - -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/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/README.md b/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/README.md deleted file mode 100644 index 88caa3e..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/README.md +++ /dev/null @@ -1,1208 +0,0 @@ -Native Abstractions for Node.js -=============================== - -**A header file filled with macro and utility goodness for making add-on development for Node.js easier across versions 0.8, 0.10 and 0.11, and eventually 0.12.** - -***Current version: 1.4.1*** - -*(See [CHANGELOG.md](https://github.com/rvagg/nan/blob/master/CHANGELOG.md) for complete ChangeLog)* - -[![NPM](https://nodei.co/npm/nan.png?downloads=true&downloadRank=true)](https://nodei.co/npm/nan/) [![NPM](https://nodei.co/npm-dl/nan.png?months=6&height=3)](https://nodei.co/npm/nan/) - -[![Build Status](https://secure.travis-ci.org/rvagg/nan.png)](http://travis-ci.org/rvagg/nan) -[![Build status](https://ci.appveyor.com/api/projects/status/kh73pbm9dsju7fgh)](https://ci.appveyor.com/project/RodVagg/nan) - -Thanks to the crazy changes in V8 (and some in Node core), keeping native addons compiling happily across versions, particularly 0.10 to 0.11/0.12, is a minor nightmare. The goal of this project is to store all logic necessary to develop native Node.js addons without having to inspect `NODE_MODULE_VERSION` and get yourself into a macro-tangle. - -This project also contains some helper utilities that make addon development a bit more pleasant. - - * **[News & Updates](#news)** - * **[Usage](#usage)** - * **[Example](#example)** - * **[API](#api)** - - -## News & Updates - -### Aug-2014: 1.3.0 release - -* `NanCString()` and `NanRawString()` have been deprecated in favour of new NanAsciiString, NanUtf8String and NanUcs2String. These classes manage the underlying memory for you in a safer way than just handing off an allocated array. You should now `*NanAsciiString(handle)` to access the raw `char` data, you can also allocate on the heap if you need to keep a reference. -* Two more NanMakeCallback overloads have been added to for parity with Node core. -* You can now `NanNew(std::string)` (use `NanNew(std::string&)` to pass by reference) -* NanSetTemplate, NanSetPrototypeTemplate and NanSetInstanceTemplate have been added. - -### May-2014: 1.1.0 release - -* We've deprecated `NanSymbol()`, you should just use `NanNew()` now. -* `NanNull()`, `NanUndefined()`, `NanTrue()`, `NanFalse()` all return `Local`s now. -* `nan_isolate` is gone, it was intended to be internal-only but if you were using it then you should switch to `v8::Isolate::GetCurrent()`. -* `NanNew()` has received some additional overload-love so you should be able to give it many kinds of values without specifying the ``. -* Lots of small fixes and additions to expand the V8 API coverage, *use the source, Luke*. - - -### May-2014: Major changes for V8 3.25 / Node 0.11.13 - -Node 0.11.11 and 0.11.12 were both broken releases for native add-ons, you simply can't properly compile against either of them for different reasons. But we now have a 0.11.13 release that jumps a couple of versions of V8 ahead and includes some more, major (traumatic) API changes. - -Because we are now nearing Node 0.12 and estimate that the version of V8 we are using in Node 0.11.13 will be close to the API we get for 0.12, we have taken the opportunity to not only *fix* NAN for 0.11.13 but make some major changes to improve the NAN API. - -We have **removed support for Node 0.11 versions prior to 0.11.13**. As usual, our tests are run against (and pass) the last 5 versions of Node 0.8 and Node 0.10. We also include Node 0.11.13 obviously. - -The major change is something that [Benjamin Byholm](kkoopa) has put many hours in to. We now have a fantastic new `NanNew(args)` interface for creating new `Local`s, this replaces `NanNewLocal()` and much more. If you look in [./nan.h](nan.h) you'll see a large number of overloaded versions of this method. In general you should be able to `NanNew(arguments)` for any type you want to make a `Local` from. This includes `Persistent` types, so we now have a `Local NanNew(const Persistent arg)` to replace `NanPersistentToLocal()`. - -We also now have `NanUndefined()`, `NanNull()`, `NanTrue()` and `NanFalse()`. Mainly because of the new requirement for an `Isolate` argument for each of the native V8 versions of this. - -V8 has now introduced an `EscapableHandleScope` from which you `scope.Escape(Local value)` to *return* a value from a one scope to another. This replaces the standard `HandleScope` and `scope.Close(Local value)`, although `HandleScope` still exists for when you don't need to return a handle to the caller. For NAN we are exposing it as `NanEscapableScope()` and `NanEscapeScope()`, while `NanScope()` is still how you create a new scope that doesn't need to return handles. For older versions of Node/V8, it'll still map to the older `HandleScope` functionality. - -`NanFromV8String()` was deprecated and has now been removed. You should use `NanCString()` or `NanRawString()` instead. - -Because `node::MakeCallback()` now takes an `Isolate`, and because it doesn't exist in older versions of Node, we've introduced `NanMakeCallback()`. You should *always* use this when calling a JavaScript function from C++. - -There's lots more, check out the Changelog in nan.h or look through [#86](https://github.com/rvagg/nan/pull/86) for all the gory details. - -### Dec-2013: NanCString and NanRawString - -Two new functions have been introduced to replace the functionality that's been provided by `NanFromV8String` until now. NanCString has sensible defaults so it's super easy to fetch a null-terminated c-style string out of a `v8::String`. `NanFromV8String` is still around and has defaults that allow you to pass a single handle to fetch a `char*` while `NanRawString` requires a little more attention to arguments. - -### Nov-2013: Node 0.11.9+ breaking V8 change - -The version of V8 that's shipping with Node 0.11.9+ has changed the signature for new `Local`s to: `v8::Local::New(isolate, value)`, i.e. introducing the `isolate` argument and therefore breaking all new `Local` declarations for previous versions. NAN 0.6+ now includes a `NanNewLocal(value)` that can be used in place to work around this incompatibility and maintain compatibility with 0.8->0.11.9+ (minus a few early 0.11 releases). - -For example, if you wanted to return a `null` on a callback you will have to change the argument from `v8::Local::New(v8::Null())` to `NanNewLocal(v8::Null())`. - -### Nov-2013: Change to binding.gyp `"include_dirs"` for NAN - -Inclusion of NAN in a project's binding.gyp is now greatly simplified. You can now just use `" -## Usage - -Simply add **NAN** as a dependency in the *package.json* of your Node addon: - -``` bash -$ npm install --save nan -``` - -Pull in the path to **NAN** in your *binding.gyp* so that you can use `#include ` in your *.cpp* files: - -``` python -"include_dirs" : [ - "` when compiling your addon. - - -## Example - -See **[LevelDOWN](https://github.com/rvagg/node-leveldown/pull/48)** for a full example of **NAN** in use. - -For a simpler example, see the **[async pi estimation example](https://github.com/rvagg/nan/tree/master/examples/async_pi_estimate)** in the examples directory for full code and an explanation of what this Monte Carlo Pi estimation example does. Below are just some parts of the full example that illustrate the use of **NAN**. - -For another example, see **[nan-example-eol](https://github.com/CodeCharmLtd/nan-example-eol)**. It shows newline detection implemented as a native addon. - -Compare to the current 0.10 version of this example, found in the [node-addon-examples](https://github.com/rvagg/node-addon-examples/tree/master/9_async_work) repository and also a 0.11 version of the same found [here](https://github.com/kkoopa/node-addon-examples/tree/5c01f58fc993377a567812597e54a83af69686d7/9_async_work). - -Note that there is no embedded version sniffing going on here and also the async work is made much simpler, see below for details on the `NanAsyncWorker` class. - -```c++ -// addon.cc -#include -#include -// ... - -using v8::FunctionTemplate; -using v8::Handle; -using v8::Object; -using v8::String; - -void InitAll(Handle exports) { - exports->Set(NanNew("calculateSync"), - NanNew(CalculateSync)->GetFunction()); - - exports->Set(NanNew("calculateAsync"), - NanNew(CalculateAsync)->GetFunction()); -} - -NODE_MODULE(addon, InitAll) -``` - -```c++ -// sync.h -#include -#include - -NAN_METHOD(CalculateSync); -``` - -```c++ -// sync.cc -#include -#include -#include "./sync.h" -// ... - -using v8::Number; - -// Simple synchronous access to the `Estimate()` function -NAN_METHOD(CalculateSync) { - NanScope(); - - // expect a number as the first argument - int points = args[0]->Uint32Value(); - double est = Estimate(points); - - NanReturnValue(NanNew(est)); -} -``` - -```c++ -// async.h -#include -#include - -NAN_METHOD(CalculateAsync); -``` - -```c++ -// async.cc -#include -#include -#include "./async.h" - -// ... - -using v8::Function; -using v8::Local; -using v8::Null; -using v8::Number; -using v8::Value; - -class PiWorker : public NanAsyncWorker { - public: - PiWorker(NanCallback *callback, int points) - : NanAsyncWorker(callback), points(points) {} - ~PiWorker() {} - - // Executed inside the worker-thread. - // It is not safe to access V8, or V8 data structures - // here, so everything we need for input and output - // should go on `this`. - void Execute () { - estimate = Estimate(points); - } - - // Executed when the async work is complete - // this function will be run inside the main event loop - // so it is safe to use V8 again - void HandleOKCallback () { - NanScope(); - - Local argv[] = { - NanNull() - , NanNew(estimate) - }; - - callback->Call(2, argv); - }; - - private: - int points; - double estimate; -}; - -// Asynchronous access to the `Estimate()` function -NAN_METHOD(CalculateAsync) { - NanScope(); - - int points = args[0]->Uint32Value(); - NanCallback *callback = new NanCallback(args[1].As()); - - NanAsyncQueueWorker(new PiWorker(callback, points)); - NanReturnUndefined(); -} -``` - - -## API - - * NAN_METHOD - * NAN_GETTER - * NAN_SETTER - * NAN_PROPERTY_GETTER - * NAN_PROPERTY_SETTER - * NAN_PROPERTY_ENUMERATOR - * NAN_PROPERTY_DELETER - * NAN_PROPERTY_QUERY - * NAN_INDEX_GETTER - * NAN_INDEX_SETTER - * NAN_INDEX_ENUMERATOR - * NAN_INDEX_DELETER - * NAN_INDEX_QUERY - * NAN_GC_CALLBACK - * NAN_WEAK_CALLBACK - * NAN_DEPRECATED - * NAN_INLINE - * NanNew - * NanUndefined - * NanNull - * NanTrue - * NanFalse - * NanReturnValue - * NanReturnUndefined - * NanReturnNull - * NanReturnEmptyString - * NanReturnThis - * NanReturnHolder - * NanScope - * NanEscapableScope - * NanEscapeScope - * NanLocker - * NanUnlocker - * NanGetInternalFieldPointer - * NanSetInternalFieldPointer - * NanObjectWrapHandle - * NanSymbol - * NanGetPointerSafe - * NanSetPointerSafe - * NanRawString - * NanCString - * NanAsciiString - * NanUtf8String - * NanUcs2String - * NanBooleanOptionValue - * NanUInt32OptionValue - * NanError, NanTypeError, NanRangeError - * NanThrowError, NanThrowTypeError, NanThrowRangeError, NanThrowError(Handle), NanThrowError(Handle, int) - * NanNewBufferHandle(char *, size_t, FreeCallback, void *), NanNewBufferHandle(char *, uint32_t), NanNewBufferHandle(uint32_t) - * NanBufferUse(char *, uint32_t) - * NanNewContextHandle - * NanGetCurrentContext - * NanHasInstance - * NanDisposePersistent - * NanAssignPersistent - * NanMakeWeakPersistent - * NanSetTemplate - * NanSetPrototypeTemplate - * NanSetInstanceTemplate - * NanMakeCallback - * NanCompileScript - * NanRunScript - * NanAdjustExternalMemory - * NanAddGCEpilogueCallback - * NanAddGCPrologueCallback - * NanRemoveGCEpilogueCallback - * NanRemoveGCPrologueCallback - * NanGetHeapStatistics - * NanCallback - * NanAsyncWorker - * NanAsyncQueueWorker - - -### NAN_METHOD(methodname) - -Use `NAN_METHOD` to define your V8 accessible methods: - -```c++ -// .h: -class Foo : public node::ObjectWrap { - ... - - static NAN_METHOD(Bar); - static NAN_METHOD(Baz); -} - - -// .cc: -NAN_METHOD(Foo::Bar) { - ... -} - -NAN_METHOD(Foo::Baz) { - ... -} -``` - -The reason for this macro is because of the method signature change in 0.11: - -```c++ -// 0.10 and below: -Handle name(const Arguments& args) - -// 0.11 and above -void name(const FunctionCallbackInfo& args) -``` - -The introduction of `FunctionCallbackInfo` brings additional complications: - - -### NAN_GETTER(methodname) - -Use `NAN_GETTER` to declare your V8 accessible getters. You get a `Local` `property` and an appropriately typed `args` object that can act like the `args` argument to a `NAN_METHOD` call. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_GETTER`. - - -### NAN_SETTER(methodname) - -Use `NAN_SETTER` to declare your V8 accessible setters. Same as `NAN_GETTER` but you also get a `Local` `value` object to work with. - - -### NAN_PROPERTY_GETTER(cbname) -Use `NAN_PROPERTY_GETTER` to declare your V8 accessible property getters. You get a `Local` `property` and an appropriately typed `args` object that can act similar to the `args` argument to a `NAN_METHOD` call. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_GETTER`. - - -### NAN_PROPERTY_SETTER(cbname) -Use `NAN_PROPERTY_SETTER` to declare your V8 accessible property setters. Same as `NAN_PROPERTY_GETTER` but you also get a `Local` `value` object to work with. - - -### NAN_PROPERTY_ENUMERATOR(cbname) -Use `NAN_PROPERTY_ENUMERATOR` to declare your V8 accessible property enumerators. You get an appropriately typed `args` object like the `args` argument to a `NAN_PROPERTY_GETTER` call. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_ENUMERATOR`. - - -### NAN_PROPERTY_DELETER(cbname) -Use `NAN_PROPERTY_DELETER` to declare your V8 accessible property deleters. Same as `NAN_PROPERTY_GETTER`. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_DELETER`. - - -### NAN_PROPERTY_QUERY(cbname) -Use `NAN_PROPERTY_QUERY` to declare your V8 accessible property queries. Same as `NAN_PROPERTY_GETTER`. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_QUERY`. - - -### NAN_INDEX_GETTER(cbname) -Use `NAN_INDEX_GETTER` to declare your V8 accessible index getters. You get a `uint32_t` `index` and an appropriately typed `args` object that can act similar to the `args` argument to a `NAN_METHOD` call. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_GETTER`. - - -### NAN_INDEX_SETTER(cbname) -Use `NAN_INDEX_SETTER` to declare your V8 accessible index setters. Same as `NAN_INDEX_GETTER` but you also get a `Local` `value` object to work with. - - -### NAN_INDEX_ENUMERATOR(cbname) -Use `NAN_INDEX_ENUMERATOR` to declare your V8 accessible index enumerators. You get an appropriately typed `args` object like the `args` argument to a `NAN_INDEX_GETTER` call. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_ENUMERATOR`. - - -### NAN_INDEX_DELETER(cbname) -Use `NAN_INDEX_DELETER` to declare your V8 accessible index deleters. Same as `NAN_INDEX_GETTER`. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_DELETER`. - - -### NAN_INDEX_QUERY(cbname) -Use `NAN_INDEX_QUERY` to declare your V8 accessible index queries. Same as `NAN_INDEX_GETTER`. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_QUERY`. - - -### NAN_GC_CALLBACK(cbname) -Use `NAN_GC_CALLBACK` to declare your callbacks for `NanAddGCEpilogueCallback` and `NanAddGCPrologueCallback`. You get arguments `GCType type` and `GCCallbackFlags flags`. - -```c++ -static Persistent callback; - -NAN_GC_CALLBACK(gcPrologueCallback) { - Local argv[] = {NanNew("prologue")}; - NanMakeCallback(NanGetCurrentContext()->Global(), NanNew(callback), 1, argv); -} - -NAN_METHOD(Hook) { - NanScope(); - NanAssignPersistent(callback, args[0].As()); - NanAddGCPrologueCallback(gcPrologueCallback); - NanReturnValue(args.Holder()); -} -``` - - -### NAN_WEAK_CALLBACK(cbname) - -Use `NAN_WEAK_CALLBACK` to define your V8 WeakReference callbacks. There is an argument object `const _NanWeakCallbackData &data` allowing access to the weak object and the supplied parameter through its `GetValue` and `GetParameter` methods. You can even access the weak callback info object through the `GetCallbackInfo()`method, but you probably should not. `Revive()` keeps the weak object alive until the next GC round. - -```c++ -NAN_WEAK_CALLBACK(weakCallback) { - int *parameter = data.GetParameter(); - NanMakeCallback(NanGetCurrentContext()->Global(), data.GetValue(), 0, NULL); - if ((*parameter)++ == 0) { - data.Revive(); - } else { - delete parameter; - } -} -``` - - -### NAN_DEPRECATED -Declares a function as deprecated. - -```c++ -static NAN_DEPRECATED NAN_METHOD(foo) { - ... -} -``` - - -### NAN_INLINE -Inlines a function. - -```c++ -NAN_INLINE int foo(int bar) { - ... -} -``` - - -### Local<T> NanNew<T>( ... ) - -Use `NanNew` to construct almost all v8 objects and make new local handles. - -Note: Using NanNew with an std::string is possible, however, you should ensure -to use the overload version (`NanNew(stdString)`) rather than the template -version (`NanNew(stdString)`) as there is an unnecessary -performance penalty to using the template version because of the inability for -compilers to appropriately deduce to reference types on template specialization. - -```c++ -Local s = NanNew("value"); - -... - -Persistent o; - -... - -Local lo = NanNew(o); - -``` - - -### Local<Primitive> NanUndefined() - -Use instead of `Undefined()` - - -### Local<Primitive> NanNull() - -Use instead of `Null()` - - -### Local<Boolean> NanTrue() - -Use instead of `True()` - - -### Local<Boolean> NanFalse() - -Use instead of `False()` - - -### NanReturnValue(Handle<Value>) - -Use `NanReturnValue` when you want to return a value from your V8 accessible method: - -```c++ -NAN_METHOD(Foo::Bar) { - ... - - NanReturnValue(NanNew("FooBar!")); -} -``` - -No `return` statement required. - - -### NanReturnUndefined() - -Use `NanReturnUndefined` when you don't want to return anything from your V8 accessible method: - -```c++ -NAN_METHOD(Foo::Baz) { - ... - - NanReturnUndefined(); -} -``` - - -### NanReturnNull() - -Use `NanReturnNull` when you want to return `Null` from your V8 accessible method: - -```c++ -NAN_METHOD(Foo::Baz) { - ... - - NanReturnNull(); -} -``` - - -### NanReturnEmptyString() - -Use `NanReturnEmptyString` when you want to return an empty `String` from your V8 accessible method: - -```c++ -NAN_METHOD(Foo::Baz) { - ... - - NanReturnEmptyString(); -} -``` - - -### NanReturnThis() - -Use `NanReturnThis` when you want to return `This` from your V8 accessible method: - -```c++ -NAN_METHOD(Foo::Baz) { - ... - - NanReturnThis(); -} -``` - - -### NanReturnHolder() - -Use `NanReturnHolder` when you want to return `Holder` from your V8 accessible method: - -```c++ -NAN_METHOD(Foo::Baz) { - ... - - NanReturnHolder(); -} -``` - - -### NanScope() - -The introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanScope()` necessary, use it in place of `HandleScope scope` when you do not wish to return handles (`Handle` or `Local`) to the surrounding scope (or in functions directly exposed to V8, as they do not return values in the normal sense): - -```c++ -NAN_METHOD(Foo::Bar) { - NanScope(); - - NanReturnValue(NanNew("FooBar!")); -} -``` - -This method is not directly exposed to V8, nor does it return a handle, so it uses an unescapable scope: - -```c++ -bool Foo::Bar() { - NanScope(); - - Local val = NanFalse(); - ... - return val->Value(); -} -``` - - -### NanEscapableScope() - -The separation of handle scopes into escapable and inescapable scopes makes `NanEscapableScope()` necessary, use it in place of `HandleScope scope` when you later wish to return a handle (`Handle` or `Local`) from the scope, this is for internal functions not directly exposed to V8: - -```c++ -Handle Foo::Bar() { - NanEscapableScope(); - - return NanEscapeScope(NanNew("FooBar!")); -} -``` - - -### Local<T> NanEscapeScope(Handle<T> value); -Use together with `NanEscapableScope` to escape the scope. Corresponds to `HandleScope::Close` or `EscapableHandleScope::Escape`. - - -### NanLocker() - -The introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanLocker()` necessary, use it in place of `Locker locker`: - -```c++ -NAN_METHOD(Foo::Bar) { - NanLocker(); - ... - NanUnlocker(); -} -``` - - -### NanUnlocker() - -The introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanUnlocker()` necessary, use it in place of `Unlocker unlocker`: - -```c++ -NAN_METHOD(Foo::Bar) { - NanLocker(); - ... - NanUnlocker(); -} -``` - - -### void * NanGetInternalFieldPointer(Handle<Object>, int) - -Gets a pointer to the internal field with at `index` from a V8 `Object` handle. - -```c++ -Local obj; -... -NanGetInternalFieldPointer(obj, 0); -``` - -### void NanSetInternalFieldPointer(Handle<Object>, int, void *) - -Sets the value of the internal field at `index` on a V8 `Object` handle. - -```c++ -static Persistent dataWrapperCtor; -... -Local wrapper = NanNew(dataWrapperCtor)->NewInstance(); -NanSetInternalFieldPointer(wrapper, 0, this); -``` - - -### Local<Object> NanObjectWrapHandle(Object) - -When you want to fetch the V8 object handle from a native object you've wrapped with Node's `ObjectWrap`, you should use `NanObjectWrapHandle`: - -```c++ -NanObjectWrapHandle(iterator)->Get(NanNew("end")) -``` - - -### ~~Local<String> NanSymbol(const char *)~~ - -Deprecated. Use `NanNew` instead. -~~Use to create string symbol objects (i.e. `v8::String::NewSymbol(x)`), for getting and setting object properties, or names of objects.~~ - -```c++ -bool foo = false; -if (obj->Has(NanNew("foo"))) - foo = optionsObj->Get(NanNew("foo"))->BooleanValue() -``` - - -### Type NanGetPointerSafe(Type *[, Type]) - -A helper for getting values from optional pointers. If the pointer is `NULL`, the function returns the optional default value, which defaults to `0`. Otherwise, the function returns the value the pointer points to. - -```c++ -char *plugh(uint32_t *optional) { - char res[] = "xyzzy"; - uint32_t param = NanGetPointerSafe(optional, 0x1337); - switch (param) { - ... - } - NanSetPointerSafe(optional, 0xDEADBEEF); -} -``` - - -### bool NanSetPointerSafe(Type *, Type) - -A helper for setting optional argument pointers. If the pointer is `NULL`, the function simply returns `false`. Otherwise, the value is assigned to the variable the pointer points to. - -```c++ -const char *plugh(size_t *outputsize) { - char res[] = "xyzzy"; - if !(NanSetPointerSafe(outputsize, strlen(res) + 1)) { - ... - } - - ... -} -``` - - -### ~~void* NanRawString(Handle<Value>, enum Nan::Encoding, size_t *, void *, size_t, int)~~ - -Deprecated. Use something else. - -~~When you want to convert a V8 `String` to a `char*` buffer, use `NanRawString`. You have to supply an encoding as well as a pointer to a variable that will be assigned the number of bytes in the returned string. It is also possible to supply a buffer and its length to the function in order not to have a new buffer allocated. The final argument allows setting `String::WriteOptions`. -Just remember that you'll end up with an object that you'll need to `delete[]` at some point unless you supply your own buffer:~~ - -```c++ -size_t count; -void* decoded = NanRawString(args[1], Nan::BASE64, &count, NULL, 0, String::HINT_MANY_WRITES_EXPECTED); -... -delete[] reinterpret_cast(decoded); -``` - - -### ~~char* NanCString(Handle<Value>, size_t *[, char *, size_t, int])~~ - -Deprecated. Use `String::Utf8Value` or `NanUtf8String` instead. - -~~When you want to convert a V8 `String` to a null-terminated C `char*` use `NanCString`. The resulting `char*` will be UTF-8-encoded, and you need to supply a pointer to a variable that will be assigned the number of bytes in the returned string. It is also possible to supply a buffer and its length to the function in order not to have a new buffer allocated. The final argument allows optionally setting `String::WriteOptions`, which default to `v8::String::NO_OPTIONS`. -Just remember that you'll end up with an object that you'll need to `delete[]` at some point unless you supply your own buffer:~~ - -```c++ -size_t count; -char* name = NanCString(args[0], &count); -... -delete[] name; -``` - - -### NanAsciiString - -Contrary to the name, this is not actually an ASCII string, it is a one-byte string with no particular encoding. Do not use unless you actually need this incorrect legacy behavior. Consider fixing your broken code instead. If you actually have a proper ASCII-string, use UTF-8, which is a proper superset of ASCII. -Convert a `String` to zero-terminated, sort-of Ascii-encoded `char *`. The underlying buffer is freed when the owner object goes out of scope, so make a copy or heap allocation if you need it to stick around. - -```c++ -NAN_METHOD(foo) { - NanScope(); - NanReturnValue(NanNew(*NanAsciiString(arg[0]))); -} -``` - -####*WRONG*: -the buffer `str` points to has been freed when `baz` was destroyed: -```c++ -static char *str; - -NAN_METHOD(bar) { - NanScope(); - NanAsciiString baz(arg[0]); - - str = *baz; - NanReturnUndefined(); // baz goes out of scope, freeing str -} - -... - -printf(str); // use-after-free error -``` - -####*RIGHT*: -```c++ -static NanAsciiString *str; - -NAN_METHOD(bar) { - NanScope(); - str = new NanAsciiString(arg[0]); - NanReturnUndefined(); -} - -... - -printf(**str); -``` - - -### NanUtf8String - -Equivalent to `String::Utf8Value`, it only exists for the sake of completeness. -Convert a `String` to zero-terminated, Utf8-encoded `char *`. The underlying buffer is freed when the owner object goes out of scope, so make a copy or heap allocation if you need it to stick around. - -```c++ -NAN_METHOD(foo) { - NanScope(); - NanReturnValue(NanNew(*NanUtf8String(arg[0]))); -} -``` - -####*WRONG*: -the buffer `str` points to has been freed when `baz` was destroyed: -```c++ -static char *str; - -NAN_METHOD(bar) { - NanScope(); - NanUtf8String baz(arg[0]); - - str = *baz; - NanReturnUndefined(); // baz goes out of scope, freeing str -} - -... - -printf(str); // use-after-free error -``` - -####*RIGHT*: -```c++ -static NanUtf8String *str; - -NAN_METHOD(bar) { - NanScope(); - str = new NanUtf8String(arg[0]); - NanReturnUndefined(); -} - -... - -printf(**str); -``` - - - -### NanUcs2String - -Equivalent to `String::Value`, it only exists for the sake of completeness. -Convert a `String` to zero-terminated, Ucs2-encoded `uint16_t *`. The underlying buffer is freed when the owner object goes out of scope, so make a copy or heap allocation if you need it to stick around. - -```c++ -NAN_METHOD(foo) { - NanScope(); - NanReturnValue(NanNew(*NanUcs2String(arg[0]))); -} -``` - -####*WRONG*: -the buffer `str` points to has been freed when `baz` was destroyed: -```c++ -static char *str; - -NAN_METHOD(bar) { - NanScope(); - NanUcs2String baz(arg[0]); - - str = *baz; - NanReturnUndefined(); // baz goes out of scope, freeing str -} - -... - -printf(str); // use-after-free error -``` - -####*RIGHT*: -```c++ -static NanUcs2String *str; - -NAN_METHOD(bar) { - NanScope(); - str = new NanUcs2String(arg[0]); - NanReturnUndefined(); -} - -... - -printf(**str); -``` - - -### bool NanBooleanOptionValue(Handle<Value>, Handle<String>[, bool]) - -When you have an "options" object that you need to fetch properties from, boolean options can be fetched with this pair. They check first if the object exists (`IsEmpty`), then if the object has the given property (`Has`) then they get and convert/coerce the property to a `bool`. - -The optional last parameter is the *default* value, which is `false` if left off: - -```c++ -// `foo` is false unless the user supplies a truthy value for it -bool foo = NanBooleanOptionValue(optionsObj, NanNew("foo")); -// `bar` is true unless the user supplies a falsy value for it -bool bar = NanBooleanOptionValueDefTrue(optionsObj, NanNew("bar"), true); -``` - - -### uint32_t NanUInt32OptionValue(Handle<Value>, Handle<String>, uint32_t) - -Similar to `NanBooleanOptionValue`, use `NanUInt32OptionValue` to fetch an integer option from your options object. Can be any kind of JavaScript `Number` and it will be coerced to an unsigned 32-bit integer. - -Requires all 3 arguments as a default is not optional: - -```c++ -uint32_t count = NanUInt32OptionValue(optionsObj, NanNew("count"), 1024); -``` - - -### NanError(message), NanTypeError(message), NanRangeError(message) - -For making `Error`, `TypeError` and `RangeError` objects. - -```c++ -Local res = NanError("you must supply a callback argument"); -``` - - -### NanThrowError(message), NanThrowTypeError(message), NanThrowRangeError(message), NanThrowError(Local<Value>), NanThrowError(Local<Value>, int) - -For throwing `Error`, `TypeError` and `RangeError` objects. - -```c++ -NanThrowError("you must supply a callback argument"); -``` - -Can also handle any custom object you may want to throw. If used with the error code argument, it will add the supplied error code to the error object as a property called `code`. - - -### Local<Object> NanNewBufferHandle(char *, uint32_t), Local<Object> NanNewBufferHandle(uint32_t) - -The `Buffer` API has changed a little in Node 0.11, this helper provides consistent access to `Buffer` creation: - -```c++ -NanNewBufferHandle((char*)value.data(), value.size()); -``` - -Can also be used to initialize a `Buffer` with just a `size` argument. - -Can also be supplied with a `NanFreeCallback` and a hint for the garbage collector. - - -### Local<Object> NanBufferUse(char*, uint32_t) - -`Buffer::New(char*, uint32_t)` prior to 0.11 would make a copy of the data. -While it was possible to get around this, it required a shim by passing a -callback. So the new API `Buffer::Use(char*, uint32_t)` was introduced to remove -needing to use this shim. - -`NanBufferUse` uses the `char*` passed as the backing data, and will free the -memory automatically when the weak callback is called. Keep this in mind, as -careless use can lead to "double free or corruption" and other cryptic failures. - - -### bool NanHasInstance(Persistent<FunctionTemplate>&, Handle<Value>) - -Can be used to check the type of an object to determine it is of a particular class you have already defined and have a `Persistent` handle for. - - -### Local<Context> NanNewContextHandle([ExtensionConfiguration*, Handle<ObjectTemplate>, Handle<Value>]) -Creates a new `Local` handle. - -```c++ -Local ftmpl = NanNew(); -Local otmpl = ftmpl->InstanceTemplate(); -Local ctx = NanNewContextHandle(NULL, otmpl); -``` - - -### Local<Context> NanGetCurrentContext() - -Gets the current context. - -```c++ -Local ctx = NanGetCurrentContext(); -``` - - -### void NanDisposePersistent(Persistent<T> &) - -Use `NanDisposePersistent` to dispose a `Persistent` handle. - -```c++ -NanDisposePersistent(persistentHandle); -``` - - -### NanAssignPersistent(handle, object) - -Use `NanAssignPersistent` to assign a non-`Persistent` handle to a `Persistent` one. You can no longer just declare a `Persistent` handle and assign directly to it later, you have to `Reset` it in Node 0.11, so this makes it easier. - -In general it is now better to place anything you want to protect from V8's garbage collector as properties of a generic `Object` and then assign that to a `Persistent`. This works in older versions of Node also if you use `NanAssignPersistent`: - -```c++ -Persistent persistentHandle; - -... - -Local obj = NanNew(); -obj->Set(NanNew("key"), keyHandle); // where keyHandle might be a Local -NanAssignPersistent(persistentHandle, obj) -``` - - -### _NanWeakCallbackInfo<T, P>* NanMakeWeakPersistent(Handle<T>, P*, _NanWeakCallbackInfo<T, P>::Callback) - -Creates a weak persistent handle with the supplied parameter and `NAN_WEAK_CALLBACK`. - -```c++ -NAN_WEAK_CALLBACK(weakCallback) { - -... - -} - -Local func; - -... - -int *parameter = new int(0); -NanMakeWeakPersistent(func, parameter, &weakCallback); -``` - - -### NanSetTemplate(templ, name, value [, attributes]) - -Use to add properties on object and function templates. - - -### NanSetPrototypeTemplate(templ, name, value [, attributes]) - -Use to add prototype properties on function templates. - - -### NanSetInstanceTemplate(templ, name, value [, attributes]) - -Use to add instance properties on function templates. - - -### NanMakeCallback(target, func, argc, argv) - -Use instead of `node::MakeCallback` to call javascript functions. This (or `NanCallback`) is the only proper way of calling functions. You must _*never, ever*_ directly use `Function::Call`, it will lead to run-time failures. - - -### NanCompileScript(Handle s [, const ScriptOrigin& origin]) - -Use to create new scripts bound to the current context. - - -### NanRunScript(script) - -Use to run both bound and unbound scripts. - - -### NanAdjustExternalMemory(int change_in_bytes) - -Simply does `AdjustAmountOfExternalAllocatedMemory`, note that the argument and returned value have type `int`. - - -### NanAddGCEpilogueCallback(GCEpilogueCallback callback, GCType gc_type_filter=kGCTypeAll) - -Simply does `AddGCEpilogueCallback` - - -### NanAddGCPrologueCallback(GCPrologueCallback callback, GCType gc_type_filter=kGCTypeAll) - -Simply does `AddGCPrologueCallback` - - -### NanRemoveGCEpilogueCallback(GCEpilogueCallback callback) - -Simply does `RemoveGCEpilogueCallback` - - -### NanRemoveGCPrologueCallback(GCPrologueCallback callback) - -Simply does `RemoveGCPrologueCallback` - - -### NanGetHeapStatistics(HeapStatistics *heap_statistics) - -Simply does `GetHeapStatistics` - - -### NanCallback - -Because of the difficulties imposed by the changes to `Persistent` handles in V8 in Node 0.11, creating `Persistent` versions of your `Handle` is annoyingly tricky. `NanCallback` makes it easier by taking your handle, making it persistent until the `NanCallback` is deleted and even providing a handy `Call()` method to fetch and execute the callback `Function`. - -```c++ -Local callbackHandle = args[0].As(); -NanCallback *callback = new NanCallback(callbackHandle); -// pass `callback` around and it's safe from GC until you: -delete callback; -``` - -You can execute the callback like so: - -```c++ -// no arguments: -callback->Call(0, NULL); - -// an error argument: -Handle argv[] = { - NanError(NanNew("fail!")) -}; -callback->Call(1, argv); - -// a success argument: -Handle argv[] = { - NanNull(), - NanNew("w00t!") -}; -callback->Call(2, argv); -``` - -`NanCallback` also has a `Local GetFunction()` method that you can use -to fetch a local handle to the underlying callback function, as well as a -`void SetFunction(Handle)` for setting the callback on the -`NanCallback`. You can check if a `NanCallback` is empty with the `bool IsEmpty()` method. Additionally a generic constructor is available for using -`NanCallback` without performing heap allocations. - - -### NanAsyncWorker - -`NanAsyncWorker` is an abstract class that you can subclass to have much of the annoying async queuing and handling taken care of for you. It can even store arbitrary V8 objects for you and have them persist while the async work is in progress. - -See a rough outline of the implementation: - -```c++ -class NanAsyncWorker { -public: - NanAsyncWorker (NanCallback *callback); - - // Clean up persistent handles and delete the *callback - virtual ~NanAsyncWorker (); - - // Check the `ErrorMessage()` and call HandleOKCallback() - // or HandleErrorCallback depending on whether it has been set or not - virtual void WorkComplete (); - - // You must implement this to do some async work. If there is an - // error then use `SetErrorMessage()` to set an error message and the callback will - // be passed that string in an Error object - virtual void Execute (); - - // Save a V8 object in a Persistent handle to protect it from GC - void SaveToPersistent(const char *key, Local &obj); - - // Fetch a stored V8 object (don't call from within `Execute()`) - Local GetFromPersistent(const char *key); - - // Get the error message (or NULL) - const char *ErrorMessage(); - - // Set an error message - void SetErrorMessage(const char *msg); - -protected: - // Default implementation calls the callback function with no arguments. - // Override this to return meaningful data - virtual void HandleOKCallback (); - - // Default implementation calls the callback function with an Error object - // wrapping the `errmsg` string - virtual void HandleErrorCallback (); -}; -``` - - -### NanAsyncQueueWorker(NanAsyncWorker *) - -`NanAsyncQueueWorker` will run a `NanAsyncWorker` asynchronously via libuv. Both the *execute* and *after_work* steps are taken care of for you—most of the logic for this is embedded in `NanAsyncWorker`. - -### Contributors - -NAN is only possible due to the excellent work of the following contributors: - - - - - - - - -
Rod VaggGitHub/rvaggTwitter/@rvagg
Benjamin ByholmGitHub/kkoopa-
Trevor NorrisGitHub/trevnorrisTwitter/@trevnorris
Nathan RajlichGitHub/TooTallNateTwitter/@TooTallNate
Brett LawsonGitHub/brett19Twitter/@brett19x
Ben NoordhuisGitHub/bnoordhuisTwitter/@bnoordhuis
- -Licence & copyright ------------------------ - -Copyright (c) 2014 NAN contributors (listed above). - -Native Abstractions for Node.js is licensed under an MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/appveyor.yml b/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/appveyor.yml deleted file mode 100644 index 657eed6..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/appveyor.yml +++ /dev/null @@ -1,32 +0,0 @@ -# http://www.appveyor.com/docs/appveyor-yml - -# Test against these versions of Node.js. -environment: - matrix: - - nodejs_version: "0.8" - - nodejs_version: "0.10" - - nodejs_version: "0.11" - -# Install scripts. (runs after repo cloning) -install: - # Get the latest stable version of Node 0.STABLE.latest - - npm install npm - - move node_modules npm - - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) - # Typical npm stuff. - - npm/.bin/npm install - - npm/.bin/npm run rebuild-tests - -# Post-install test scripts. -test_script: - # Output useful info for debugging. - - node --version - - npm --version - - cmd: npm test - -# Don't actually build. -build: off - -# Set build version format here instead of in the admin panel. -version: "{build}" - diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/include_dirs.js b/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/include_dirs.js deleted file mode 100644 index 4f1dfb4..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/include_dirs.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('path').relative('.', __dirname)); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/nan.h b/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/nan.h deleted file mode 100644 index 77e1e6d..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/nan.h +++ /dev/null @@ -1,2428 +0,0 @@ -/********************************************************************* - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2014 NAN contributors: - * - Rod Vagg - * - Benjamin Byholm - * - Trevor Norris - * - Nathan Rajlich - * - Brett Lawson - * - Ben Noordhuis - * - * MIT License - * - * Version 1.4.1: current Node unstable: 0.11.14, Node stable: 0.10.33 - * - * See https://github.com/rvagg/nan for the latest update to this file - **********************************************************************************/ - -#ifndef NAN_H_ -#define NAN_H_ - -#include -#include -#include -#include -#include -#include -#include -#if defined(_MSC_VER) -# pragma warning( disable : 4530 ) -#endif -#include - -#if defined(__GNUC__) && !(defined(DEBUG) && DEBUG) -# define NAN_INLINE inline __attribute__((always_inline)) -#elif defined(_MSC_VER) && !(defined(DEBUG) && DEBUG) -# define NAN_INLINE __forceinline -#else -# define NAN_INLINE inline -#endif - -#if defined(__GNUC__) && \ - !(defined(V8_DISABLE_DEPRECATIONS) && V8_DISABLE_DEPRECATIONS) -# define NAN_DEPRECATED __attribute__((deprecated)) -#elif defined(_MSC_VER) && \ - !(defined(V8_DISABLE_DEPRECATIONS) && V8_DISABLE_DEPRECATIONS) -# define NAN_DEPRECATED __declspec(deprecated) -#else -# define NAN_DEPRECATED -#endif - -// some generic helpers - -template NAN_INLINE bool NanSetPointerSafe( - T *var - , T val -) { - if (var) { - *var = val; - return true; - } else { - return false; - } -} - -template NAN_INLINE T NanGetPointerSafe( - T *var - , T fallback = reinterpret_cast(0) -) { - if (var) { - return *var; - } else { - return fallback; - } -} - -NAN_INLINE bool NanBooleanOptionValue( - v8::Local optionsObj - , v8::Handle opt, bool def -) { - if (def) { - return optionsObj.IsEmpty() - || !optionsObj->Has(opt) - || optionsObj->Get(opt)->BooleanValue(); - } else { - return !optionsObj.IsEmpty() - && optionsObj->Has(opt) - && optionsObj->Get(opt)->BooleanValue(); - } -} - -NAN_INLINE bool NanBooleanOptionValue( - v8::Local optionsObj - , v8::Handle opt -) { - return NanBooleanOptionValue(optionsObj, opt, false); -} - -NAN_INLINE uint32_t NanUInt32OptionValue( - v8::Local optionsObj - , v8::Handle opt - , uint32_t def -) { - return !optionsObj.IsEmpty() - && optionsObj->Has(opt) - && optionsObj->Get(opt)->IsNumber() - ? optionsObj->Get(opt)->Uint32Value() - : def; -} - -template -v8::Local NanNew(v8::Handle); - -template -NAN_INLINE v8::Local _NanEnsureLocal(v8::Handle val) { - return NanNew(val); -} - -template -NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) { - return val; -} - -#if (NODE_MODULE_VERSION > 0x000B) -// Node 0.11+ (0.11.3 and below won't compile with these) - -# define _NAN_METHOD_ARGS_TYPE const v8::FunctionCallbackInfo& -# define _NAN_METHOD_ARGS _NAN_METHOD_ARGS_TYPE args -# define _NAN_METHOD_RETURN_TYPE void - -# define _NAN_GETTER_ARGS_TYPE const v8::PropertyCallbackInfo& -# define _NAN_GETTER_ARGS _NAN_GETTER_ARGS_TYPE args -# define _NAN_GETTER_RETURN_TYPE void - -# define _NAN_SETTER_ARGS_TYPE const v8::PropertyCallbackInfo& -# define _NAN_SETTER_ARGS _NAN_SETTER_ARGS_TYPE args -# define _NAN_SETTER_RETURN_TYPE void - -# define _NAN_PROPERTY_GETTER_ARGS_TYPE \ - const v8::PropertyCallbackInfo& -# define _NAN_PROPERTY_GETTER_ARGS _NAN_PROPERTY_GETTER_ARGS_TYPE args -# define _NAN_PROPERTY_GETTER_RETURN_TYPE void - -# define _NAN_PROPERTY_SETTER_ARGS_TYPE \ - const v8::PropertyCallbackInfo& -# define _NAN_PROPERTY_SETTER_ARGS _NAN_PROPERTY_SETTER_ARGS_TYPE args -# define _NAN_PROPERTY_SETTER_RETURN_TYPE void - -# define _NAN_PROPERTY_ENUMERATOR_ARGS_TYPE \ - const v8::PropertyCallbackInfo& -# define _NAN_PROPERTY_ENUMERATOR_ARGS _NAN_PROPERTY_ENUMERATOR_ARGS_TYPE args -# define _NAN_PROPERTY_ENUMERATOR_RETURN_TYPE void - -# define _NAN_PROPERTY_DELETER_ARGS_TYPE \ - const v8::PropertyCallbackInfo& -# define _NAN_PROPERTY_DELETER_ARGS \ - _NAN_PROPERTY_DELETER_ARGS_TYPE args -# define _NAN_PROPERTY_DELETER_RETURN_TYPE void - -# define _NAN_PROPERTY_QUERY_ARGS_TYPE \ - const v8::PropertyCallbackInfo& -# define _NAN_PROPERTY_QUERY_ARGS _NAN_PROPERTY_QUERY_ARGS_TYPE args -# define _NAN_PROPERTY_QUERY_RETURN_TYPE void - -# define _NAN_INDEX_GETTER_ARGS_TYPE \ - const v8::PropertyCallbackInfo& -# define _NAN_INDEX_GETTER_ARGS _NAN_INDEX_GETTER_ARGS_TYPE args -# define _NAN_INDEX_GETTER_RETURN_TYPE void - -# define _NAN_INDEX_SETTER_ARGS_TYPE \ - const v8::PropertyCallbackInfo& -# define _NAN_INDEX_SETTER_ARGS _NAN_INDEX_SETTER_ARGS_TYPE args -# define _NAN_INDEX_SETTER_RETURN_TYPE void - -# define _NAN_INDEX_ENUMERATOR_ARGS_TYPE \ - const v8::PropertyCallbackInfo& -# define _NAN_INDEX_ENUMERATOR_ARGS _NAN_INDEX_ENUMERATOR_ARGS_TYPE args -# define _NAN_INDEX_ENUMERATOR_RETURN_TYPE void - -# define _NAN_INDEX_DELETER_ARGS_TYPE \ - const v8::PropertyCallbackInfo& -# define _NAN_INDEX_DELETER_ARGS _NAN_INDEX_DELETER_ARGS_TYPE args -# define _NAN_INDEX_DELETER_RETURN_TYPE void - -# define _NAN_INDEX_QUERY_ARGS_TYPE \ - const v8::PropertyCallbackInfo& -# define _NAN_INDEX_QUERY_ARGS _NAN_INDEX_QUERY_ARGS_TYPE args -# define _NAN_INDEX_QUERY_RETURN_TYPE void - - typedef v8::FunctionCallback NanFunctionCallback; - - template - NAN_INLINE v8::Local NanNew() { - return T::New(v8::Isolate::GetCurrent()); - } - - template - NAN_INLINE v8::Local NanNew(P arg1) { - return T::New(v8::Isolate::GetCurrent(), arg1); - } - - template - NAN_INLINE v8::Local NanNew( - v8::Handle receiver - , int argc - , v8::Handle argv[] = 0) { - return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv); - } - - template - NAN_INLINE v8::Local NanNew( - NanFunctionCallback callback - , v8::Handle data = v8::Handle() - , v8::Handle signature = v8::Handle()) { - return T::New(v8::Isolate::GetCurrent(), callback, data, signature); - } - - template - NAN_INLINE v8::Local NanNew(v8::Handle arg1) { - return v8::Local::New(v8::Isolate::GetCurrent(), arg1); - } - - template - NAN_INLINE v8::Local NanNew(const v8::Persistent &arg1) { - return v8::Local::New(v8::Isolate::GetCurrent(), arg1); - } - - template - NAN_INLINE v8::Local NanNew(P arg1, int arg2) { - return T::New(v8::Isolate::GetCurrent(), arg1, arg2); - } - - template<> - NAN_INLINE v8::Local NanNew() { - return v8::Array::New(v8::Isolate::GetCurrent()); - } - - template<> - NAN_INLINE v8::Local NanNew(int length) { - return v8::Array::New(v8::Isolate::GetCurrent(), length); - } - - template<> - NAN_INLINE v8::Local NanNew(double time) { - return v8::Date::New(v8::Isolate::GetCurrent(), time).As(); - } - - template<> - NAN_INLINE v8::Local NanNew(int time) { - return v8::Date::New(v8::Isolate::GetCurrent(), time).As(); - } - - typedef v8::UnboundScript NanUnboundScript; - typedef v8::Script NanBoundScript; - - template - NAN_INLINE v8::Local NanNew( - P s - , const v8::ScriptOrigin& origin - ) { - v8::ScriptCompiler::Source source(s, origin); - return v8::ScriptCompiler::CompileUnbound( - v8::Isolate::GetCurrent(), &source); - } - - template<> - NAN_INLINE v8::Local NanNew( - v8::Local s - ) { - v8::ScriptCompiler::Source source(s); - return v8::ScriptCompiler::CompileUnbound( - v8::Isolate::GetCurrent(), &source); - } - - template<> - NAN_INLINE v8::Local NanNew(bool value) { - return v8::BooleanObject::New(value).As(); - } - - template<> - NAN_INLINE v8::Local - NanNew >( - v8::Local value) { - return v8::StringObject::New(value).As(); - } - - template<> - NAN_INLINE v8::Local - NanNew >( - v8::Handle value) { - return v8::StringObject::New(value).As(); - } - - template<> - NAN_INLINE v8::Local NanNew(double val) { - return v8::NumberObject::New( - v8::Isolate::GetCurrent(), val).As(); - } - - template - NAN_INLINE v8::Local NanNew( - v8::Handle pattern, v8::RegExp::Flags flags) { - return v8::RegExp::New(pattern, flags); - } - - template - NAN_INLINE v8::Local NanNew( - v8::Local pattern, v8::RegExp::Flags flags) { - return v8::RegExp::New(pattern, flags); - } - - template - NAN_INLINE v8::Local NanNew( - v8::Handle pattern, v8::RegExp::Flags flags) { - return v8::RegExp::New(pattern, flags); - } - - template - NAN_INLINE v8::Local NanNew( - v8::Local pattern, v8::RegExp::Flags flags) { - return v8::RegExp::New(pattern, flags); - } - - template<> - NAN_INLINE v8::Local NanNew(int32_t val) { - return v8::Uint32::NewFromUnsigned( - v8::Isolate::GetCurrent(), val)->ToUint32(); - } - - template<> - NAN_INLINE v8::Local NanNew(uint32_t val) { - return v8::Uint32::NewFromUnsigned( - v8::Isolate::GetCurrent(), val)->ToUint32(); - } - - template<> - NAN_INLINE v8::Local NanNew(int32_t val) { - return v8::Int32::New(v8::Isolate::GetCurrent(), val)->ToInt32(); - } - - template<> - NAN_INLINE v8::Local NanNew(uint32_t val) { - return v8::Int32::New(v8::Isolate::GetCurrent(), val)->ToInt32(); - } - - template<> - NAN_INLINE v8::Local NanNew(uint32_t val) { - return v8::Integer::NewFromUnsigned(v8::Isolate::GetCurrent(), val); - } - - template<> - NAN_INLINE v8::Local NanNew( - char *arg - , int length) { - return v8::String::NewFromUtf8( - v8::Isolate::GetCurrent() - , arg - , v8::String::kNormalString - , length); - } - - template<> - NAN_INLINE v8::Local NanNew( - const char *arg - , int length) { - return v8::String::NewFromUtf8( - v8::Isolate::GetCurrent() - , arg - , v8::String::kNormalString - , length); - } - - template<> - NAN_INLINE v8::Local NanNew(char *arg) { - return v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), arg); - } - - template<> - NAN_INLINE v8::Local NanNew( - const char *arg) { - return v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), arg); - } - - template<> - NAN_INLINE v8::Local NanNew( - uint8_t *arg - , int length) { - return v8::String::NewFromOneByte( - v8::Isolate::GetCurrent() - , arg - , v8::String::kNormalString - , length); - } - - template<> - NAN_INLINE v8::Local NanNew( - const uint8_t *arg - , int length) { - return v8::String::NewFromOneByte( - v8::Isolate::GetCurrent() - , arg - , v8::String::kNormalString - , length); - } - - template<> - NAN_INLINE v8::Local NanNew(uint8_t *arg) { - return v8::String::NewFromOneByte(v8::Isolate::GetCurrent(), arg); - } - - template<> - NAN_INLINE v8::Local NanNew( - const uint8_t *arg) { - return v8::String::NewFromOneByte(v8::Isolate::GetCurrent(), arg); - } - - template<> - NAN_INLINE v8::Local NanNew( - uint16_t *arg - , int length) { - return v8::String::NewFromTwoByte( - v8::Isolate::GetCurrent() - , arg - , v8::String::kNormalString - , length); - } - - template<> - NAN_INLINE v8::Local NanNew( - const uint16_t *arg - , int length) { - return v8::String::NewFromTwoByte( - v8::Isolate::GetCurrent() - , arg - , v8::String::kNormalString - , length); - } - template<> - NAN_INLINE v8::Local NanNew( - uint16_t *arg) { - return v8::String::NewFromTwoByte(v8::Isolate::GetCurrent(), arg); - } - - template<> - NAN_INLINE v8::Local NanNew( - const uint16_t *arg) { - return v8::String::NewFromTwoByte(v8::Isolate::GetCurrent(), arg); - } - - template<> - NAN_INLINE v8::Local NanNew( - std::string arg) { - return NanNew(arg.c_str(), static_cast(arg.size())); - } - - template<> - NAN_INLINE v8::Local NanNew() { - return v8::String::Empty(v8::Isolate::GetCurrent()); - } - - NAN_INLINE v8::Local NanNew(const char* arg, int length = -1) { - return NanNew(arg, length); - } - - NAN_INLINE v8::Local NanNew( - const uint8_t* arg - , int length = -1) { - return NanNew(arg, length); - } - - NAN_INLINE v8::Local NanNew( - const uint16_t* arg - , int length = -1) { - return NanNew(arg, length); - } - - NAN_INLINE v8::Local NanNew( - const std::string& arg) { - return NanNew(arg.c_str(), static_cast(arg.size())); - } - - NAN_INLINE v8::Local NanNew(double val) { - return NanNew(val); - } - - NAN_INLINE v8::Local NanNew(int val) { - return NanNew(val); - } - - NAN_INLINE v8::Local NanNew(unsigned int val) { - return NanNew(val); - } - - NAN_INLINE v8::Local NanNew(bool val) { - return NanNew(val); - } - - NAN_INLINE v8::Local NanNew( - v8::String::ExternalStringResource *resource) { - return v8::String::NewExternal(v8::Isolate::GetCurrent(), resource); - } - -#if NODE_MODULE_VERSION >= 42 // io.js v1.0.0 - NAN_INLINE v8::Local NanNew( - v8::String::ExternalOneByteStringResource *resource) { -#else - NAN_INLINE v8::Local NanNew( - v8::String::ExternalAsciiStringResource *resource) { -#endif - return v8::String::NewExternal(v8::Isolate::GetCurrent(), resource); - } - -# define NanScope() v8::HandleScope scope(v8::Isolate::GetCurrent()) -# define NanEscapableScope() \ - v8::EscapableHandleScope scope(v8::Isolate::GetCurrent()) - -# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val)) -# define NanLocker() v8::Locker locker(v8::Isolate::GetCurrent()) -# define NanUnlocker() v8::Unlocker unlocker(v8::Isolate::GetCurrent()) -# define NanReturnValue(value) return args.GetReturnValue().Set(value) -# define NanReturnUndefined() return -# define NanReturnHolder() NanReturnValue(args.Holder()) -# define NanReturnThis() NanReturnValue(args.This()) -# define NanReturnNull() return args.GetReturnValue().SetNull() -# define NanReturnEmptyString() return args.GetReturnValue().SetEmptyString() - -# define NanObjectWrapHandle(obj) obj->handle() - - NAN_INLINE v8::Local NanUndefined() { - NanEscapableScope(); - return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent()))); - } - - NAN_INLINE v8::Local NanNull() { - NanEscapableScope(); - return NanEscapeScope(NanNew(v8::Null(v8::Isolate::GetCurrent()))); - } - - NAN_INLINE v8::Local NanTrue() { - NanEscapableScope(); - return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent()))); - } - - NAN_INLINE v8::Local NanFalse() { - NanEscapableScope(); - return NanEscapeScope(NanNew(v8::False(v8::Isolate::GetCurrent()))); - } - - NAN_INLINE int NanAdjustExternalMemory(int bc) { - return static_cast( - v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(bc)); - } - - NAN_INLINE void NanSetTemplate( - v8::Handle templ - , const char *name - , v8::Handle value) { - templ->Set(v8::Isolate::GetCurrent(), name, value); - } - - NAN_INLINE void NanSetTemplate( - v8::Handle templ - , v8::Handle name - , v8::Handle value - , v8::PropertyAttribute attributes) { - templ->Set(name, value, attributes); - } - - NAN_INLINE v8::Local NanGetCurrentContext() { - return v8::Isolate::GetCurrent()->GetCurrentContext(); - } - - NAN_INLINE void* NanGetInternalFieldPointer( - v8::Handle object - , int index) { - return object->GetAlignedPointerFromInternalField(index); - } - - NAN_INLINE void NanSetInternalFieldPointer( - v8::Handle object - , int index - , void* value) { - object->SetAlignedPointerInInternalField(index, value); - } - -# define NAN_GC_CALLBACK(name) \ - void name(v8::Isolate *isolate, v8::GCType type, v8::GCCallbackFlags flags) - - NAN_INLINE void NanAddGCEpilogueCallback( - v8::Isolate::GCEpilogueCallback callback - , v8::GCType gc_type_filter = v8::kGCTypeAll) { - v8::Isolate::GetCurrent()->AddGCEpilogueCallback(callback, gc_type_filter); - } - - NAN_INLINE void NanRemoveGCEpilogueCallback( - v8::Isolate::GCEpilogueCallback callback) { - v8::Isolate::GetCurrent()->RemoveGCEpilogueCallback(callback); - } - - NAN_INLINE void NanAddGCPrologueCallback( - v8::Isolate::GCPrologueCallback callback - , v8::GCType gc_type_filter = v8::kGCTypeAll) { - v8::Isolate::GetCurrent()->AddGCPrologueCallback(callback, gc_type_filter); - } - - NAN_INLINE void NanRemoveGCPrologueCallback( - v8::Isolate::GCPrologueCallback callback) { - v8::Isolate::GetCurrent()->RemoveGCPrologueCallback(callback); - } - - NAN_INLINE void NanGetHeapStatistics( - v8::HeapStatistics *heap_statistics) { - v8::Isolate::GetCurrent()->GetHeapStatistics(heap_statistics); - } - - NAN_DEPRECATED NAN_INLINE v8::Local NanSymbol( - const char* data, int length = -1) { - return NanNew(data, length); - } - - template - NAN_INLINE void NanAssignPersistent( - v8::Persistent& handle - , v8::Handle obj) { - handle.Reset(v8::Isolate::GetCurrent(), obj); - } - - template - NAN_INLINE void NanAssignPersistent( - v8::Persistent& handle - , const v8::Persistent& obj) { - handle.Reset(v8::Isolate::GetCurrent(), obj); - } - - template - class _NanWeakCallbackData; - - template - struct _NanWeakCallbackInfo { - typedef void (*Callback)(const _NanWeakCallbackData& data); - NAN_INLINE _NanWeakCallbackInfo(v8::Handle handle, P* param, Callback cb) - : parameter(param), callback(cb) { - NanAssignPersistent(persistent, handle); - } - - NAN_INLINE ~_NanWeakCallbackInfo() { - persistent.Reset(); - } - - P* const parameter; - Callback const callback; - v8::Persistent persistent; - }; - - template - class _NanWeakCallbackData { - public: - NAN_INLINE _NanWeakCallbackData(_NanWeakCallbackInfo *info) - : info_(info) { } - - NAN_INLINE v8::Local GetValue() const { - return NanNew(info_->persistent); - } - - NAN_INLINE P* GetParameter() const { return info_->parameter; } - - NAN_INLINE bool IsNearDeath() const { - return info_->persistent.IsNearDeath(); - } - - NAN_INLINE void Revive() const; - - NAN_INLINE _NanWeakCallbackInfo* GetCallbackInfo() const { - return info_; - } - - NAN_DEPRECATED NAN_INLINE void Dispose() const { - } - - private: - _NanWeakCallbackInfo* info_; - }; - - template - static void _NanWeakCallbackDispatcher( - const v8::WeakCallbackData > &data) { - _NanWeakCallbackInfo *info = data.GetParameter(); - _NanWeakCallbackData wcbd(info); - info->callback(wcbd); - if (wcbd.IsNearDeath()) { - delete wcbd.GetCallbackInfo(); - } - } - - template - NAN_INLINE void _NanWeakCallbackData::Revive() const { - info_->persistent.SetWeak(info_, &_NanWeakCallbackDispatcher); - } - -template -NAN_INLINE _NanWeakCallbackInfo* NanMakeWeakPersistent( - v8::Handle handle - , P* parameter - , typename _NanWeakCallbackInfo::Callback callback) { - _NanWeakCallbackInfo *cbinfo = - new _NanWeakCallbackInfo(handle, parameter, callback); - cbinfo->persistent.SetWeak(cbinfo, &_NanWeakCallbackDispatcher); - return cbinfo; -} - -# define NAN_WEAK_CALLBACK(name) \ - template \ - static void name(const _NanWeakCallbackData &data) - -# define _NAN_ERROR(fun, errmsg) fun(NanNew(errmsg)) - -# define _NAN_THROW_ERROR(fun, errmsg) \ - do { \ - NanScope(); \ - v8::Isolate::GetCurrent()->ThrowException(_NAN_ERROR(fun, errmsg)); \ - } while (0); - - NAN_INLINE v8::Local NanError(const char* errmsg) { - return _NAN_ERROR(v8::Exception::Error, errmsg); - } - - NAN_INLINE void NanThrowError(const char* errmsg) { - _NAN_THROW_ERROR(v8::Exception::Error, errmsg); - } - - NAN_INLINE void NanThrowError(v8::Handle error) { - NanScope(); - v8::Isolate::GetCurrent()->ThrowException(error); - } - - NAN_INLINE v8::Local NanError( - const char *msg - , const int errorNumber - ) { - v8::Local err = v8::Exception::Error(NanNew(msg)); - v8::Local obj = err.As(); - obj->Set(NanNew("code"), NanNew(errorNumber)); - return err; - } - - NAN_INLINE void NanThrowError( - const char *msg - , const int errorNumber - ) { - NanThrowError(NanError(msg, errorNumber)); - } - - NAN_INLINE v8::Local NanTypeError(const char* errmsg) { - return _NAN_ERROR(v8::Exception::TypeError, errmsg); - } - - NAN_INLINE void NanThrowTypeError(const char* errmsg) { - _NAN_THROW_ERROR(v8::Exception::TypeError, errmsg); - } - - NAN_INLINE v8::Local NanRangeError(const char* errmsg) { - return _NAN_ERROR(v8::Exception::RangeError, errmsg); - } - - NAN_INLINE void NanThrowRangeError(const char* errmsg) { - _NAN_THROW_ERROR(v8::Exception::RangeError, errmsg); - } - - template NAN_INLINE void NanDisposePersistent( - v8::Persistent &handle - ) { - handle.Reset(); - } - - NAN_INLINE v8::Local NanNewBufferHandle ( - char *data - , size_t length - , node::smalloc::FreeCallback callback - , void *hint - ) { - return node::Buffer::New( - v8::Isolate::GetCurrent(), data, length, callback, hint); - } - - NAN_INLINE v8::Local NanNewBufferHandle ( - const char *data - , uint32_t size - ) { - return node::Buffer::New(v8::Isolate::GetCurrent(), data, size); - } - - NAN_INLINE v8::Local NanNewBufferHandle (uint32_t size) { - return node::Buffer::New(v8::Isolate::GetCurrent(), size); - } - - NAN_INLINE v8::Local NanBufferUse( - char* data - , uint32_t size - ) { - return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size); - } - - NAN_INLINE bool NanHasInstance( - const v8::Persistent& function_template - , v8::Handle value - ) { - return NanNew(function_template)->HasInstance(value); - } - - NAN_INLINE v8::Local NanNewContextHandle( - v8::ExtensionConfiguration* extensions = NULL - , v8::Handle tmpl = v8::Handle() - , v8::Handle obj = v8::Handle() - ) { - v8::Isolate* isolate = v8::Isolate::GetCurrent(); - return v8::Local::New( - isolate - , v8::Context::New(isolate, extensions, tmpl, obj) - ); - } - - NAN_INLINE v8::Local NanCompileScript( - v8::Local s - , const v8::ScriptOrigin& origin - ) { - v8::ScriptCompiler::Source source(s, origin); - return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source); - } - - NAN_INLINE v8::Local NanCompileScript( - v8::Local s - ) { - v8::ScriptCompiler::Source source(s); - return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source); - } - - NAN_INLINE v8::Local NanRunScript( - v8::Handle script - ) { - return script->BindToCurrentContext()->Run(); - } - - NAN_INLINE v8::Local NanRunScript( - v8::Handle script - ) { - return script->Run(); - } - - NAN_INLINE v8::Local NanMakeCallback( - v8::Handle target - , v8::Handle func - , int argc - , v8::Handle* argv) { - return NanNew(node::MakeCallback( - v8::Isolate::GetCurrent(), target, func, argc, argv)); - } - - NAN_INLINE v8::Local NanMakeCallback( - v8::Handle target - , v8::Handle symbol - , int argc - , v8::Handle* argv) { - return NanNew(node::MakeCallback( - v8::Isolate::GetCurrent(), target, symbol, argc, argv)); - } - - NAN_INLINE v8::Local NanMakeCallback( - v8::Handle target - , const char* method - , int argc - , v8::Handle* argv) { - return NanNew(node::MakeCallback( - v8::Isolate::GetCurrent(), target, method, argc, argv)); - } - - template - NAN_INLINE void NanSetIsolateData( - v8::Isolate *isolate - , T *data - ) { - isolate->SetData(0, data); - } - - template - NAN_INLINE T *NanGetIsolateData( - v8::Isolate *isolate - ) { - return static_cast(isolate->GetData(0)); - } - - class NanAsciiString { - public: - NAN_INLINE explicit NanAsciiString(v8::Handle from) { - v8::Local toStr = from->ToString(); - size = toStr->Length(); - buf = new char[size + 1]; - size = toStr->WriteOneByte(reinterpret_cast(buf)); - } - - NAN_DEPRECATED NAN_INLINE int Size() const { - return size; - } - - NAN_INLINE int length() const { - return size; - } - - - NAN_INLINE char* operator*() { return buf; } - NAN_INLINE const char* operator*() const { return buf; } - - NAN_INLINE ~NanAsciiString() { - delete[] buf; - } - - private: - // disallow copying and assigning - NanAsciiString(const NanAsciiString&); - void operator=(const NanAsciiString&); - - char *buf; - int size; - }; - - class NanUtf8String { - public: - NAN_INLINE explicit NanUtf8String(v8::Handle from) { - v8::Local toStr = from->ToString(); - size = toStr->Utf8Length(); - buf = new char[size + 1]; - toStr->WriteUtf8(buf); - } - - NAN_DEPRECATED NAN_INLINE int Size() const { - return size; - } - - NAN_INLINE int length() const { - return size; - } - - NAN_INLINE char* operator*() { return buf; } - NAN_INLINE const char* operator*() const { return buf; } - - NAN_INLINE ~NanUtf8String() { - delete[] buf; - } - - private: - // disallow copying and assigning - NanUtf8String(const NanUtf8String&); - void operator=(const NanUtf8String&); - - char *buf; - int size; - }; - - class NanUcs2String { - public: - NAN_INLINE explicit NanUcs2String(v8::Handle from) { - v8::Local toStr = from->ToString(); - size = toStr->Length(); - buf = new uint16_t[size + 1]; - toStr->Write(buf); - } - - NAN_DEPRECATED NAN_INLINE int Size() const { - return size; - } - - NAN_INLINE int length() const { - return size; - } - - NAN_INLINE uint16_t* operator*() { return buf; } - NAN_INLINE const uint16_t* operator*() const { return buf; } - - NAN_INLINE ~NanUcs2String() { - delete[] buf; - } - - private: - // disallow copying and assigning - NanUcs2String(const NanUcs2String&); - void operator=(const NanUcs2String&); - - uint16_t *buf; - int size; - }; - -#else -// Node 0.8 and 0.10 - -# define _NAN_METHOD_ARGS_TYPE const v8::Arguments& -# define _NAN_METHOD_ARGS _NAN_METHOD_ARGS_TYPE args -# define _NAN_METHOD_RETURN_TYPE v8::Handle - -# define _NAN_GETTER_ARGS_TYPE const v8::AccessorInfo & -# define _NAN_GETTER_ARGS _NAN_GETTER_ARGS_TYPE args -# define _NAN_GETTER_RETURN_TYPE v8::Handle - -# define _NAN_SETTER_ARGS_TYPE const v8::AccessorInfo & -# define _NAN_SETTER_ARGS _NAN_SETTER_ARGS_TYPE args -# define _NAN_SETTER_RETURN_TYPE void - -# define _NAN_PROPERTY_GETTER_ARGS_TYPE const v8::AccessorInfo& -# define _NAN_PROPERTY_GETTER_ARGS _NAN_PROPERTY_GETTER_ARGS_TYPE args -# define _NAN_PROPERTY_GETTER_RETURN_TYPE v8::Handle - -# define _NAN_PROPERTY_SETTER_ARGS_TYPE const v8::AccessorInfo& -# define _NAN_PROPERTY_SETTER_ARGS _NAN_PROPERTY_SETTER_ARGS_TYPE args -# define _NAN_PROPERTY_SETTER_RETURN_TYPE v8::Handle - -# define _NAN_PROPERTY_ENUMERATOR_ARGS_TYPE const v8::AccessorInfo& -# define _NAN_PROPERTY_ENUMERATOR_ARGS _NAN_PROPERTY_ENUMERATOR_ARGS_TYPE args -# define _NAN_PROPERTY_ENUMERATOR_RETURN_TYPE v8::Handle - -# define _NAN_PROPERTY_DELETER_ARGS_TYPE const v8::AccessorInfo& -# define _NAN_PROPERTY_DELETER_ARGS _NAN_PROPERTY_DELETER_ARGS_TYPE args -# define _NAN_PROPERTY_DELETER_RETURN_TYPE v8::Handle - -# define _NAN_PROPERTY_QUERY_ARGS_TYPE const v8::AccessorInfo& -# define _NAN_PROPERTY_QUERY_ARGS _NAN_PROPERTY_QUERY_ARGS_TYPE args -# define _NAN_PROPERTY_QUERY_RETURN_TYPE v8::Handle - -# define _NAN_INDEX_GETTER_ARGS_TYPE const v8::AccessorInfo& -# define _NAN_INDEX_GETTER_ARGS _NAN_INDEX_GETTER_ARGS_TYPE args -# define _NAN_INDEX_GETTER_RETURN_TYPE v8::Handle - -# define _NAN_INDEX_SETTER_ARGS_TYPE const v8::AccessorInfo& -# define _NAN_INDEX_SETTER_ARGS _NAN_INDEX_SETTER_ARGS_TYPE args -# define _NAN_INDEX_SETTER_RETURN_TYPE v8::Handle - -# define _NAN_INDEX_ENUMERATOR_ARGS_TYPE const v8::AccessorInfo& -# define _NAN_INDEX_ENUMERATOR_ARGS _NAN_INDEX_ENUMERATOR_ARGS_TYPE args -# define _NAN_INDEX_ENUMERATOR_RETURN_TYPE v8::Handle - -# define _NAN_INDEX_DELETER_ARGS_TYPE const v8::AccessorInfo& -# define _NAN_INDEX_DELETER_ARGS _NAN_INDEX_DELETER_ARGS_TYPE args -# define _NAN_INDEX_DELETER_RETURN_TYPE v8::Handle - -# define _NAN_INDEX_QUERY_ARGS_TYPE const v8::AccessorInfo& -# define _NAN_INDEX_QUERY_ARGS _NAN_INDEX_QUERY_ARGS_TYPE args -# define _NAN_INDEX_QUERY_RETURN_TYPE v8::Handle - - typedef v8::InvocationCallback NanFunctionCallback; - - NAN_DEPRECATED NAN_INLINE v8::Local NanSymbol( - const char* data, int length = -1) { - return v8::String::NewSymbol(data, length); - } - - template - NAN_INLINE v8::Local NanNew() { - return T::New(); - } - - template - NAN_INLINE v8::Local NanNew(v8::Handle arg) { - return v8::Local::New(arg); - } - - template - NAN_INLINE v8::Local NanNew( - v8::Handle receiver - , int argc - , v8::Handle argv[] = 0) { - return v8::Signature::New(receiver, argc, argv); - } - - template - NAN_INLINE v8::Local NanNew( - NanFunctionCallback callback - , v8::Handle data = v8::Handle() - , v8::Handle signature = v8::Handle()) { - return T::New(callback, data, signature); - } - - template - NAN_INLINE v8::Local NanNew(const v8::Persistent &arg) { - return v8::Local::New(arg); - } - - template - NAN_INLINE v8::Local NanNew(P arg) { - return _NanEnsureLocal(T::New(arg)); - } - - template - NAN_INLINE v8::Local NanNew(P arg, int length) { - return _NanEnsureLocal(T::New(arg, length)); - } - - template - NAN_INLINE v8::Local NanNew( - v8::Handle pattern, v8::RegExp::Flags flags) { - return v8::RegExp::New(pattern, flags); - } - - template - NAN_INLINE v8::Local NanNew( - v8::Local pattern, v8::RegExp::Flags flags) { - return v8::RegExp::New(pattern, flags); - } - - template - NAN_INLINE v8::Local NanNew( - v8::Handle pattern, v8::RegExp::Flags flags) { - return v8::RegExp::New(pattern, flags); - } - - template - NAN_INLINE v8::Local NanNew( - v8::Local pattern, v8::RegExp::Flags flags) { - return v8::RegExp::New(pattern, flags); - } - - template<> - NAN_INLINE v8::Local NanNew() { - return v8::Array::New(); - } - - template<> - NAN_INLINE v8::Local NanNew(int length) { - return v8::Array::New(length); - } - - template<> - NAN_INLINE v8::Local NanNew(double time) { - return v8::Date::New(time).As(); - } - - template<> - NAN_INLINE v8::Local NanNew(int time) { - return v8::Date::New(time).As(); - } - - typedef v8::Script NanUnboundScript; - typedef v8::Script NanBoundScript; - - template - NAN_INLINE v8::Local NanNew( - P s - , const v8::ScriptOrigin& origin - ) { - return v8::Script::New(s, const_cast(&origin)); - } - - template<> - NAN_INLINE v8::Local NanNew( - v8::Local s - ) { - return v8::Script::New(s); - } - - template<> - NAN_INLINE v8::Local NanNew(bool value) { - return v8::BooleanObject::New(value).As(); - } - - template<> - NAN_INLINE v8::Local - NanNew >( - v8::Local value) { - return v8::StringObject::New(value).As(); - } - - template<> - NAN_INLINE v8::Local - NanNew >( - v8::Handle value) { - return v8::StringObject::New(value).As(); - } - - template<> - NAN_INLINE v8::Local NanNew(double val) { - return v8::NumberObject::New(val).As(); - } - - template<> - NAN_INLINE v8::Local NanNew(int32_t val) { - return v8::Uint32::NewFromUnsigned(val)->ToUint32(); - } - - template<> - NAN_INLINE v8::Local NanNew(uint32_t val) { - return v8::Uint32::NewFromUnsigned(val)->ToUint32(); - } - - template<> - NAN_INLINE v8::Local NanNew(int32_t val) { - return v8::Int32::New(val)->ToInt32(); - } - - template<> - NAN_INLINE v8::Local NanNew(uint32_t val) { - return v8::Int32::New(val)->ToInt32(); - } - - template<> - NAN_INLINE v8::Local NanNew(uint32_t val) { - return v8::Integer::NewFromUnsigned(val); - } - - template<> - NAN_INLINE v8::Local NanNew( - uint8_t *arg - , int length) { - int len = length; - if (len < 0) { - size_t temp = strlen(reinterpret_cast(arg)); - assert(temp <= INT_MAX && "too long string"); - len = static_cast(temp); - } - uint16_t *warg = new uint16_t[len]; - for (int i = 0; i < len; i++) { - warg[i] = arg[i]; - } - v8::Local retval = v8::String::New(warg, len); - delete[] warg; - return retval; - } - - template<> - NAN_INLINE v8::Local NanNew( - const uint8_t *arg - , int length) { - int len = length; - if (len < 0) { - size_t temp = strlen(reinterpret_cast(arg)); - assert(temp <= INT_MAX && "too long string"); - len = static_cast(temp); - } - uint16_t *warg = new uint16_t[len]; - for (int i = 0; i < len; i++) { - warg[i] = arg[i]; - } - v8::Local retval = v8::String::New(warg, len); - delete[] warg; - return retval; - } - - template<> - NAN_INLINE v8::Local NanNew(uint8_t *arg) { - size_t temp = strlen(reinterpret_cast(arg)); - assert(temp <= INT_MAX && "too long string"); - int length = static_cast(temp); - uint16_t *warg = new uint16_t[length]; - for (int i = 0; i < length; i++) { - warg[i] = arg[i]; - } - - v8::Local retval = v8::String::New(warg, length); - delete[] warg; - return retval; - } - - template<> - NAN_INLINE v8::Local NanNew( - const uint8_t *arg) { - size_t temp = strlen(reinterpret_cast(arg)); - assert(temp <= INT_MAX && "too long string"); - int length = static_cast(temp); - uint16_t *warg = new uint16_t[length]; - for (int i = 0; i < length; i++) { - warg[i] = arg[i]; - } - v8::Local retval = v8::String::New(warg, length); - delete[] warg; - return retval; - } - - template<> - NAN_INLINE v8::Local NanNew( - std::string arg) { - return NanNew(arg.c_str(), static_cast(arg.size())); - } - - template<> - NAN_INLINE v8::Local NanNew() { - return v8::String::Empty(); - } - - NAN_INLINE v8::Local NanNew(const char* arg, int length = -1) { - return NanNew(arg, length); - } - - NAN_INLINE v8::Local NanNew( - const uint8_t* arg - , int length = -1) { - return NanNew(arg, length); - } - - NAN_INLINE v8::Local NanNew( - const uint16_t* arg - , int length = -1) { - return NanNew(arg, length); - } - - NAN_INLINE v8::Local NanNew( - const std::string& arg) { - return NanNew(arg.c_str(), static_cast(arg.size())); - } - - NAN_INLINE v8::Local NanNew(double val) { - return NanNew(val); - } - - NAN_INLINE v8::Local NanNew(int val) { - return NanNew(val); - } - - NAN_INLINE v8::Local NanNew(unsigned int val) { - return NanNew(val); - } - - NAN_INLINE v8::Local NanNew(bool val) { - return NanNew(val); - } - - NAN_INLINE v8::Local NanNew( - v8::String::ExternalStringResource *resource) { - return v8::String::NewExternal(resource); - } - - NAN_INLINE v8::Local NanNew( - v8::String::ExternalAsciiStringResource *resource) { - return v8::String::NewExternal(resource); - } - -# define NanScope() v8::HandleScope scope -# define NanEscapableScope() v8::HandleScope scope -# define NanEscapeScope(val) scope.Close(val) -# define NanLocker() v8::Locker locker -# define NanUnlocker() v8::Unlocker unlocker -# define NanReturnValue(value) return scope.Close(value) -# define NanReturnHolder() NanReturnValue(args.Holder()) -# define NanReturnThis() NanReturnValue(args.This()) -# define NanReturnUndefined() return v8::Undefined() -# define NanReturnNull() return v8::Null() -# define NanReturnEmptyString() return v8::String::Empty() -# define NanObjectWrapHandle(obj) v8::Local::New(obj->handle_) - - NAN_INLINE v8::Local NanUndefined() { - NanEscapableScope(); - return NanEscapeScope(NanNew(v8::Undefined())); - } - - NAN_INLINE v8::Local NanNull() { - NanEscapableScope(); - return NanEscapeScope(NanNew(v8::Null())); - } - - NAN_INLINE v8::Local NanTrue() { - NanEscapableScope(); - return NanEscapeScope(NanNew(v8::True())); - } - - NAN_INLINE v8::Local NanFalse() { - NanEscapableScope(); - return NanEscapeScope(NanNew(v8::False())); - } - - NAN_INLINE int NanAdjustExternalMemory(int bc) { - return static_cast(v8::V8::AdjustAmountOfExternalAllocatedMemory(bc)); - } - - NAN_INLINE void NanSetTemplate( - v8::Handle templ - , const char *name - , v8::Handle value) { - templ->Set(name, value); - } - - NAN_INLINE void NanSetTemplate( - v8::Handle templ - , v8::Handle name - , v8::Handle value - , v8::PropertyAttribute attributes) { - templ->Set(name, value, attributes); - } - - NAN_INLINE v8::Local NanGetCurrentContext() { - return v8::Context::GetCurrent(); - } - - NAN_INLINE void* NanGetInternalFieldPointer( - v8::Handle object - , int index) { - return object->GetPointerFromInternalField(index); - } - - NAN_INLINE void NanSetInternalFieldPointer( - v8::Handle object - , int index - , void* value) { - object->SetPointerInInternalField(index, value); - } - -# define NAN_GC_CALLBACK(name) \ - void name(v8::GCType type, v8::GCCallbackFlags flags) - - NAN_INLINE void NanAddGCEpilogueCallback( - v8::GCEpilogueCallback callback - , v8::GCType gc_type_filter = v8::kGCTypeAll) { - v8::V8::AddGCEpilogueCallback(callback, gc_type_filter); - } - NAN_INLINE void NanRemoveGCEpilogueCallback( - v8::GCEpilogueCallback callback) { - v8::V8::RemoveGCEpilogueCallback(callback); - } - NAN_INLINE void NanAddGCPrologueCallback( - v8::GCPrologueCallback callback - , v8::GCType gc_type_filter = v8::kGCTypeAll) { - v8::V8::AddGCPrologueCallback(callback, gc_type_filter); - } - NAN_INLINE void NanRemoveGCPrologueCallback( - v8::GCPrologueCallback callback) { - v8::V8::RemoveGCPrologueCallback(callback); - } - NAN_INLINE void NanGetHeapStatistics( - v8::HeapStatistics *heap_statistics) { - v8::V8::GetHeapStatistics(heap_statistics); - } - - template - NAN_INLINE void NanAssignPersistent( - v8::Persistent& handle - , v8::Handle obj) { - handle.Dispose(); - handle = v8::Persistent::New(obj); - } - - template - class _NanWeakCallbackData; - - template - struct _NanWeakCallbackInfo { - typedef void (*Callback)(const _NanWeakCallbackData &data); - NAN_INLINE _NanWeakCallbackInfo(v8::Handle handle, P* param, Callback cb) - : parameter(param) - , callback(cb) - , persistent(v8::Persistent::New(handle)) { } - - NAN_INLINE ~_NanWeakCallbackInfo() { - persistent.Dispose(); - persistent.Clear(); - } - - P* const parameter; - Callback const callback; - v8::Persistent persistent; - }; - - template - class _NanWeakCallbackData { - public: - NAN_INLINE _NanWeakCallbackData(_NanWeakCallbackInfo *info) - : info_(info) { } - - NAN_INLINE v8::Local GetValue() const { - return NanNew(info_->persistent); - } - - NAN_INLINE P* GetParameter() const { return info_->parameter; } - - NAN_INLINE bool IsNearDeath() const { - return info_->persistent.IsNearDeath(); - } - - NAN_INLINE void Revive() const; - - NAN_INLINE _NanWeakCallbackInfo* GetCallbackInfo() const { - return info_; - } - - NAN_DEPRECATED NAN_INLINE void Dispose() const { - } - - private: - _NanWeakCallbackInfo* info_; - }; - - template - static void _NanWeakPersistentDispatcher( - v8::Persistent object, void *data) { - _NanWeakCallbackInfo* info = - static_cast<_NanWeakCallbackInfo*>(data); - _NanWeakCallbackData wcbd(info); - info->callback(wcbd); - if (wcbd.IsNearDeath()) { - delete wcbd.GetCallbackInfo(); - } - } - - template - NAN_INLINE void _NanWeakCallbackData::Revive() const { - info_->persistent.MakeWeak( - info_ - , &_NanWeakPersistentDispatcher); - } - - template - NAN_INLINE _NanWeakCallbackInfo* NanMakeWeakPersistent( - v8::Handle handle - , P* parameter - , typename _NanWeakCallbackInfo::Callback callback) { - _NanWeakCallbackInfo *cbinfo = - new _NanWeakCallbackInfo(handle, parameter, callback); - cbinfo->persistent.MakeWeak( - cbinfo - , &_NanWeakPersistentDispatcher); - return cbinfo; - } - -# define NAN_WEAK_CALLBACK(name) \ - template \ - static void name(const _NanWeakCallbackData &data) - -# define _NAN_ERROR(fun, errmsg) \ - fun(v8::String::New(errmsg)) - -# define _NAN_THROW_ERROR(fun, errmsg) \ - do { \ - NanScope(); \ - return v8::Local::New( \ - v8::ThrowException(_NAN_ERROR(fun, errmsg))); \ - } while (0); - - NAN_INLINE v8::Local NanError(const char* errmsg) { - return _NAN_ERROR(v8::Exception::Error, errmsg); - } - - NAN_INLINE v8::Local NanThrowError(const char* errmsg) { - _NAN_THROW_ERROR(v8::Exception::Error, errmsg); - } - - NAN_INLINE v8::Local NanThrowError( - v8::Handle error - ) { - NanScope(); - return v8::Local::New(v8::ThrowException(error)); - } - - NAN_INLINE v8::Local NanError( - const char *msg - , const int errorNumber - ) { - v8::Local err = v8::Exception::Error(v8::String::New(msg)); - v8::Local obj = err.As(); - obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber)); - return err; - } - - NAN_INLINE v8::Local NanThrowError( - const char *msg - , const int errorNumber - ) { - return NanThrowError(NanError(msg, errorNumber)); - } - - NAN_INLINE v8::Local NanTypeError(const char* errmsg) { - return _NAN_ERROR(v8::Exception::TypeError, errmsg); - } - - NAN_INLINE v8::Local NanThrowTypeError( - const char* errmsg - ) { - _NAN_THROW_ERROR(v8::Exception::TypeError, errmsg); - } - - NAN_INLINE v8::Local NanRangeError( - const char* errmsg - ) { - return _NAN_ERROR(v8::Exception::RangeError, errmsg); - } - - NAN_INLINE v8::Local NanThrowRangeError( - const char* errmsg - ) { - _NAN_THROW_ERROR(v8::Exception::RangeError, errmsg); - } - - template - NAN_INLINE void NanDisposePersistent( - v8::Persistent &handle) { // NOLINT(runtime/references) - handle.Dispose(); - handle.Clear(); - } - - NAN_INLINE v8::Local NanNewBufferHandle ( - char *data - , size_t length - , node::Buffer::free_callback callback - , void *hint - ) { - return NanNew( - node::Buffer::New(data, length, callback, hint)->handle_); - } - - NAN_INLINE v8::Local NanNewBufferHandle ( - const char *data - , uint32_t size - ) { -#if NODE_MODULE_VERSION >= 0x000B - return NanNew(node::Buffer::New(data, size)->handle_); -#else - return NanNew( - node::Buffer::New(const_cast(data), size)->handle_); -#endif - } - - NAN_INLINE v8::Local NanNewBufferHandle (uint32_t size) { - return NanNew(node::Buffer::New(size)->handle_); - } - - NAN_INLINE void FreeData(char *data, void *hint) { - delete[] data; - } - - NAN_INLINE v8::Local NanBufferUse( - char* data - , uint32_t size - ) { - return NanNew( - node::Buffer::New(data, size, FreeData, NULL)->handle_); - } - - NAN_INLINE bool NanHasInstance( - const v8::Persistent& function_template - , v8::Handle value - ) { - return function_template->HasInstance(value); - } - - NAN_INLINE v8::Local NanNewContextHandle( - v8::ExtensionConfiguration* extensions = NULL - , v8::Handle tmpl = v8::Handle() - , v8::Handle obj = v8::Handle() - ) { - v8::Persistent ctx = v8::Context::New(extensions, tmpl, obj); - v8::Local lctx = NanNew(ctx); - ctx.Dispose(); - return lctx; - } - - NAN_INLINE v8::Local NanCompileScript( - v8::Local s - , const v8::ScriptOrigin& origin - ) { - return v8::Script::Compile(s, const_cast(&origin)); - } - - NAN_INLINE v8::Local NanCompileScript( - v8::Local s - ) { - return v8::Script::Compile(s); - } - - NAN_INLINE v8::Local NanRunScript(v8::Handle script) { - return script->Run(); - } - - NAN_INLINE v8::Local NanMakeCallback( - v8::Handle target - , v8::Handle func - , int argc - , v8::Handle* argv) { -# if NODE_VERSION_AT_LEAST(0, 8, 0) - return NanNew(node::MakeCallback(target, func, argc, argv)); -# else - v8::TryCatch try_catch; - v8::Local result = func->Call(target, argc, argv); - if (try_catch.HasCaught()) { - node::FatalException(try_catch); - } - return result; -# endif - } - - NAN_INLINE v8::Local NanMakeCallback( - v8::Handle target - , v8::Handle symbol - , int argc - , v8::Handle* argv) { -# if NODE_VERSION_AT_LEAST(0, 8, 0) - return NanNew(node::MakeCallback(target, symbol, argc, argv)); -# else - v8::Local callback = target->Get(symbol).As(); - return NanMakeCallback(target, callback, argc, argv); -# endif - } - - NAN_INLINE v8::Local NanMakeCallback( - v8::Handle target - , const char* method - , int argc - , v8::Handle* argv) { -# if NODE_VERSION_AT_LEAST(0, 8, 0) - return NanNew(node::MakeCallback(target, method, argc, argv)); -# else - return NanMakeCallback(target, NanNew(method), argc, argv); -# endif - } - - template - NAN_INLINE void NanSetIsolateData( - v8::Isolate *isolate - , T *data - ) { - isolate->SetData(data); - } - - template - NAN_INLINE T *NanGetIsolateData( - v8::Isolate *isolate - ) { - return static_cast(isolate->GetData()); - } - - class NanAsciiString { - public: - NAN_INLINE explicit NanAsciiString(v8::Handle from) { - v8::Local toStr = from->ToString(); - size = toStr->Length(); - buf = new char[size + 1]; - size = toStr->WriteAscii(buf); - } - - NAN_DEPRECATED NAN_INLINE int Size() const { - return size; - } - - NAN_INLINE int length() const { - return size; - } - - - NAN_INLINE char* operator*() { return buf; } - NAN_INLINE const char* operator*() const { return buf; } - - NAN_INLINE ~NanAsciiString() { - delete[] buf; - } - - private: - // disallow copying and assigning - NanAsciiString(const NanAsciiString&); - void operator=(const NanAsciiString&); - - char *buf; - int size; - }; - - class NanUtf8String { - public: - NAN_INLINE explicit NanUtf8String(v8::Handle from) { - v8::Local toStr = from->ToString(); - size = toStr->Utf8Length(); - buf = new char[size + 1]; - toStr->WriteUtf8(buf); - } - - NAN_DEPRECATED NAN_INLINE int Size() const { - return size; - } - - NAN_INLINE int length() const { - return size; - } - - NAN_INLINE char* operator*() { return buf; } - NAN_INLINE const char* operator*() const { return buf; } - - NAN_INLINE ~NanUtf8String() { - delete[] buf; - } - - private: - // disallow copying and assigning - NanUtf8String(const NanUtf8String&); - void operator=(const NanUtf8String&); - - char *buf; - int size; - }; - - class NanUcs2String { - public: - NAN_INLINE explicit NanUcs2String(v8::Handle from) { - v8::Local toStr = from->ToString(); - size = toStr->Length(); - buf = new uint16_t[size + 1]; - toStr->Write(buf); - } - - NAN_DEPRECATED NAN_INLINE int Size() const { - return size; - } - - NAN_INLINE int length() const { - return size; - } - - NAN_INLINE uint16_t* operator*() { return buf; } - NAN_INLINE const uint16_t* operator*() const { return buf; } - - NAN_INLINE ~NanUcs2String() { - delete[] buf; - } - - private: - // disallow copying and assigning - NanUcs2String(const NanUcs2String&); - void operator=(const NanUcs2String&); - - uint16_t *buf; - int size; - }; - -#endif // NODE_MODULE_VERSION - -typedef void (*NanFreeCallback)(char *data, void *hint); - -#define NAN_METHOD(name) _NAN_METHOD_RETURN_TYPE name(_NAN_METHOD_ARGS) -#define NAN_GETTER(name) \ - _NAN_GETTER_RETURN_TYPE name( \ - v8::Local property \ - , _NAN_GETTER_ARGS) -#define NAN_SETTER(name) \ - _NAN_SETTER_RETURN_TYPE name( \ - v8::Local property \ - , v8::Local value \ - , _NAN_SETTER_ARGS) -#define NAN_PROPERTY_GETTER(name) \ - _NAN_PROPERTY_GETTER_RETURN_TYPE name( \ - v8::Local property \ - , _NAN_PROPERTY_GETTER_ARGS) -#define NAN_PROPERTY_SETTER(name) \ - _NAN_PROPERTY_SETTER_RETURN_TYPE name( \ - v8::Local property \ - , v8::Local value \ - , _NAN_PROPERTY_SETTER_ARGS) -#define NAN_PROPERTY_ENUMERATOR(name) \ - _NAN_PROPERTY_ENUMERATOR_RETURN_TYPE name(_NAN_PROPERTY_ENUMERATOR_ARGS) -#define NAN_PROPERTY_DELETER(name) \ - _NAN_PROPERTY_DELETER_RETURN_TYPE name( \ - v8::Local property \ - , _NAN_PROPERTY_DELETER_ARGS) -#define NAN_PROPERTY_QUERY(name) \ - _NAN_PROPERTY_QUERY_RETURN_TYPE name( \ - v8::Local property \ - , _NAN_PROPERTY_QUERY_ARGS) -# define NAN_INDEX_GETTER(name) \ - _NAN_INDEX_GETTER_RETURN_TYPE name(uint32_t index, _NAN_INDEX_GETTER_ARGS) -#define NAN_INDEX_SETTER(name) \ - _NAN_INDEX_SETTER_RETURN_TYPE name( \ - uint32_t index \ - , v8::Local value \ - , _NAN_INDEX_SETTER_ARGS) -#define NAN_INDEX_ENUMERATOR(name) \ - _NAN_INDEX_ENUMERATOR_RETURN_TYPE name(_NAN_INDEX_ENUMERATOR_ARGS) -#define NAN_INDEX_DELETER(name) \ - _NAN_INDEX_DELETER_RETURN_TYPE name( \ - uint32_t index \ - , _NAN_INDEX_DELETER_ARGS) -#define NAN_INDEX_QUERY(name) \ - _NAN_INDEX_QUERY_RETURN_TYPE name(uint32_t index, _NAN_INDEX_QUERY_ARGS) - -class NanCallback { - public: - NanCallback() { - NanScope(); - v8::Local obj = NanNew(); - NanAssignPersistent(handle, obj); - } - - explicit NanCallback(const v8::Handle &fn) { - NanScope(); - v8::Local obj = NanNew(); - NanAssignPersistent(handle, obj); - SetFunction(fn); - } - - ~NanCallback() { - if (handle.IsEmpty()) return; - NanDisposePersistent(handle); - } - - NAN_INLINE void SetFunction(const v8::Handle &fn) { - NanScope(); - NanNew(handle)->Set(kCallbackIndex, fn); - } - - NAN_INLINE v8::Local GetFunction() const { - NanEscapableScope(); - return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex) - .As()); - } - - NAN_INLINE bool IsEmpty() const { - NanScope(); - return NanNew(handle)->Get(kCallbackIndex)->IsUndefined(); - } - - v8::Handle Call(int argc, v8::Handle argv[]) const { - NanEscapableScope(); -#if (NODE_MODULE_VERSION > 0x000B) // 0.11.12+ - v8::Isolate* isolate = v8::Isolate::GetCurrent(); - v8::Local callback = NanNew(handle)-> - Get(kCallbackIndex).As(); - return NanEscapeScope(node::MakeCallback( - isolate - , isolate->GetCurrentContext()->Global() - , callback - , argc - , argv - )); -#else -#if NODE_VERSION_AT_LEAST(0, 8, 0) - v8::Local callback = handle-> - Get(kCallbackIndex).As(); - return NanEscapeScope(node::MakeCallback( - v8::Context::GetCurrent()->Global() - , callback - , argc - , argv - )); -#else - v8::Local callback = handle-> - Get(kCallbackIndex).As(); - return NanEscapeScope(NanMakeCallback( - v8::Context::GetCurrent()->Global(), callback, argc, argv)); -#endif -#endif - } - - private: - v8::Persistent handle; - static const uint32_t kCallbackIndex = 0; -}; - -/* abstract */ class NanAsyncWorker { - public: - explicit NanAsyncWorker(NanCallback *callback_) - : callback(callback_), errmsg_(NULL) { - request.data = this; - - NanScope(); - v8::Local obj = NanNew(); - NanAssignPersistent(persistentHandle, obj); - } - - virtual ~NanAsyncWorker() { - NanScope(); - - if (!persistentHandle.IsEmpty()) - NanDisposePersistent(persistentHandle); - if (callback) - delete callback; - if (errmsg_) - delete[] errmsg_; - } - - virtual void WorkComplete() { - NanScope(); - - if (errmsg_ == NULL) - HandleOKCallback(); - else - HandleErrorCallback(); - delete callback; - callback = NULL; - } - - NAN_INLINE void SaveToPersistent( - const char *key, const v8::Local &obj) { - v8::Local handle = NanNew(persistentHandle); - handle->Set(NanNew(key), obj); - } - - v8::Local GetFromPersistent(const char *key) const { - NanEscapableScope(); - v8::Local handle = NanNew(persistentHandle); - return NanEscapeScope(handle->Get(NanNew(key)).As()); - } - - virtual void Execute() = 0; - - uv_work_t request; - - protected: - v8::Persistent persistentHandle; - NanCallback *callback; - - virtual void HandleOKCallback() { - callback->Call(0, NULL); - } - - virtual void HandleErrorCallback() { - NanScope(); - - v8::Local argv[] = { - v8::Exception::Error(NanNew(ErrorMessage())) - }; - callback->Call(1, argv); - } - - void SetErrorMessage(const char *msg) { - if (errmsg_) { - delete[] errmsg_; - } - - size_t size = strlen(msg) + 1; - errmsg_ = new char[size]; - memcpy(errmsg_, msg, size); - } - - const char* ErrorMessage() const { - return errmsg_; - } - - private: - char *errmsg_; -}; - -NAN_INLINE void NanAsyncExecute (uv_work_t* req) { - NanAsyncWorker *worker = static_cast(req->data); - worker->Execute(); -} - -NAN_INLINE void NanAsyncExecuteComplete (uv_work_t* req) { - NanAsyncWorker* worker = static_cast(req->data); - worker->WorkComplete(); - delete worker; -} - -NAN_INLINE void NanAsyncQueueWorker (NanAsyncWorker* worker) { - uv_queue_work( - uv_default_loop() - , &worker->request - , NanAsyncExecute - , (uv_after_work_cb)NanAsyncExecuteComplete - ); -} - -//// Base 64 //// - -#define _nan_base64_encoded_size(size) ((size + 2 - ((size + 2) % 3)) / 3 * 4) - -// Doesn't check for padding at the end. Can be 1-2 bytes over. -NAN_INLINE size_t _nan_base64_decoded_size_fast(size_t size) { - size_t remainder = size % 4; - - size = (size / 4) * 3; - if (remainder) { - if (size == 0 && remainder == 1) { - // special case: 1-byte input cannot be decoded - size = 0; - } else { - // non-padded input, add 1 or 2 extra bytes - size += 1 + (remainder == 3); - } - } - - return size; -} - -template -NAN_INLINE size_t _nan_base64_decoded_size( - const T* src - , size_t size -) { - if (size == 0) - return 0; - - if (src[size - 1] == '=') - size--; - if (size > 0 && src[size - 1] == '=') - size--; - - return _nan_base64_decoded_size_fast(size); -} - -// supports regular and URL-safe base64 -static const int _nan_unbase64_table[] = { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -1, -1, -2, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, 62, -1, 63 - , 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1 - , -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 - , 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, 63 - , -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 - , 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 -}; - -#define _nan_unbase64(x) _nan_unbase64_table[(uint8_t)(x)] - -template static size_t _nan_base64_decode( - char* buf - , size_t len - , const T* src - , const size_t srcLen -) { - char* dst = buf; - char* dstEnd = buf + len; - const T* srcEnd = src + srcLen; - - while (src < srcEnd && dst < dstEnd) { - ptrdiff_t remaining = srcEnd - src; - char a, b, c, d; - - while (_nan_unbase64(*src) < 0 && src < srcEnd) src++, remaining--; - if (remaining == 0 || *src == '=') break; - a = _nan_unbase64(*src++); - - while (_nan_unbase64(*src) < 0 && src < srcEnd) src++, remaining--; - if (remaining <= 1 || *src == '=') break; - b = _nan_unbase64(*src++); - - *dst++ = (a << 2) | ((b & 0x30) >> 4); - if (dst == dstEnd) break; - - while (_nan_unbase64(*src) < 0 && src < srcEnd) src++, remaining--; - if (remaining <= 2 || *src == '=') break; - c = _nan_unbase64(*src++); - - *dst++ = ((b & 0x0F) << 4) | ((c & 0x3C) >> 2); - if (dst == dstEnd) break; - - while (_nan_unbase64(*src) < 0 && src < srcEnd) src++, remaining--; - if (remaining <= 3 || *src == '=') break; - d = _nan_unbase64(*src++); - - *dst++ = ((c & 0x03) << 6) | (d & 0x3F); - } - - return dst - buf; -} - -//// HEX //// - -template unsigned _nan_hex2bin(T c) { - if (c >= '0' && c <= '9') return c - '0'; - if (c >= 'A' && c <= 'F') return 10 + (c - 'A'); - if (c >= 'a' && c <= 'f') return 10 + (c - 'a'); - return static_cast(-1); -} - -template static size_t _nan_hex_decode( - char* buf - , size_t len - , const T* src - , const size_t srcLen -) { - size_t i; - for (i = 0; i < len && i * 2 + 1 < srcLen; ++i) { - unsigned a = _nan_hex2bin(src[i * 2 + 0]); - unsigned b = _nan_hex2bin(src[i * 2 + 1]); - if (!~a || !~b) return i; - buf[i] = a * 16 + b; - } - - return i; -} - -static bool _NanGetExternalParts( - v8::Handle val - , const char** data - , size_t* len -) { - if (node::Buffer::HasInstance(val)) { - *data = node::Buffer::Data(val.As()); - *len = node::Buffer::Length(val.As()); - return true; - } - - assert(val->IsString()); - v8::Local str = NanNew(val.As()); - -#if NODE_MODULE_VERSION >= 42 // io.js v1.0.0 - if (str->IsExternalOneByte()) { - const v8::String::ExternalOneByteStringResource* ext; - ext = str->GetExternalOneByteStringResource(); - *data = ext->data(); - *len = ext->length(); - return true; - } -#else - if (str->IsExternalAscii()) { - const v8::String::ExternalAsciiStringResource* ext; - ext = str->GetExternalAsciiStringResource(); - *data = ext->data(); - *len = ext->length(); - return true; - } -#endif - - if (str->IsExternal()) { - const v8::String::ExternalStringResource* ext; - ext = str->GetExternalStringResource(); - *data = reinterpret_cast(ext->data()); - *len = ext->length(); - return true; - } - - return false; -} - -namespace Nan { - enum Encoding {ASCII, UTF8, BASE64, UCS2, BINARY, HEX, BUFFER}; -} - -/* NAN_DEPRECATED */ NAN_INLINE void* _NanRawString( - v8::Handle from - , enum Nan::Encoding encoding - , size_t *datalen - , void *buf - , size_t buflen - , int flags -) { - NanScope(); - - size_t sz_; - size_t term_len = !(flags & v8::String::NO_NULL_TERMINATION); - char *data = NULL; - size_t len; - bool is_extern = _NanGetExternalParts( - from - , const_cast(&data) - , &len); - - if (is_extern && !term_len) { - NanSetPointerSafe(datalen, len); - return data; - } - - v8::Local toStr = from->ToString(); - - char *to = static_cast(buf); - - switch (encoding) { - case Nan::ASCII: -#if NODE_MODULE_VERSION < 0x000C - sz_ = toStr->Length(); - if (to == NULL) { - to = new char[sz_ + term_len]; - } else { - assert(buflen >= sz_ + term_len && "too small buffer"); - } - NanSetPointerSafe( - datalen - , toStr->WriteAscii(to, 0, static_cast(sz_ + term_len), flags)); - return to; -#endif - case Nan::BINARY: - case Nan::BUFFER: - sz_ = toStr->Length(); - if (to == NULL) { - to = new char[sz_ + term_len]; - } else { - assert(buflen >= sz_ + term_len && "too small buffer"); - } -#if NODE_MODULE_VERSION < 0x000C - { - uint16_t* twobytebuf = new uint16_t[sz_ + term_len]; - - size_t somelen = toStr->Write(twobytebuf, 0, - static_cast(sz_ + term_len), flags); - - for (size_t i = 0; i < sz_ + term_len && i < somelen + term_len; i++) { - unsigned char *b = reinterpret_cast(&twobytebuf[i]); - to[i] = *b; - } - - NanSetPointerSafe(datalen, somelen); - - delete[] twobytebuf; - return to; - } -#else - NanSetPointerSafe( - datalen, - toStr->WriteOneByte( - reinterpret_cast(to) - , 0 - , static_cast(sz_ + term_len) - , flags)); - return to; -#endif - case Nan::UTF8: - sz_ = toStr->Utf8Length(); - if (to == NULL) { - to = new char[sz_ + term_len]; - } else { - assert(buflen >= sz_ + term_len && "too small buffer"); - } - NanSetPointerSafe( - datalen - , toStr->WriteUtf8(to, static_cast(sz_ + term_len) - , NULL, flags) - - term_len); - return to; - case Nan::BASE64: - { - v8::String::Value value(toStr); - sz_ = _nan_base64_decoded_size(*value, value.length()); - if (to == NULL) { - to = new char[sz_ + term_len]; - } else { - assert(buflen >= sz_ + term_len); - } - NanSetPointerSafe( - datalen - , _nan_base64_decode(to, sz_, *value, value.length())); - if (term_len) { - to[sz_] = '\0'; - } - return to; - } - case Nan::UCS2: - { - sz_ = toStr->Length(); - if (to == NULL) { - to = new char[(sz_ + term_len) * 2]; - } else { - assert(buflen >= (sz_ + term_len) * 2 && "too small buffer"); - } - - int bc = 2 * toStr->Write( - reinterpret_cast(to) - , 0 - , static_cast(sz_ + term_len) - , flags); - NanSetPointerSafe(datalen, bc); - return to; - } - case Nan::HEX: - { - v8::String::Value value(toStr); - sz_ = value.length(); - assert(!(sz_ & 1) && "bad hex data"); - if (to == NULL) { - to = new char[sz_ / 2 + term_len]; - } else { - assert(buflen >= sz_ / 2 + term_len && "too small buffer"); - } - NanSetPointerSafe( - datalen - , _nan_hex_decode(to, sz_ / 2, *value, value.length())); - } - if (term_len) { - to[sz_ / 2] = '\0'; - } - return to; - default: - assert(0 && "unknown encoding"); - } - return to; -} - -NAN_DEPRECATED NAN_INLINE void* NanRawString( - v8::Handle from - , enum Nan::Encoding encoding - , size_t *datalen - , void *buf - , size_t buflen - , int flags -) { - return _NanRawString(from, encoding, datalen, buf, buflen, flags); -} - - -NAN_DEPRECATED NAN_INLINE char* NanCString( - v8::Handle from - , size_t *datalen - , char *buf = NULL - , size_t buflen = 0 - , int flags = v8::String::NO_OPTIONS -) { - return static_cast( - _NanRawString(from, Nan::UTF8, datalen, buf, buflen, flags) - ); -} - -NAN_INLINE void NanSetPrototypeTemplate( - v8::Local templ - , const char *name - , v8::Handle value -) { - NanSetTemplate(templ->PrototypeTemplate(), name, value); -} - -NAN_INLINE void NanSetPrototypeTemplate( - v8::Local templ - , v8::Handle name - , v8::Handle value - , v8::PropertyAttribute attributes -) { - NanSetTemplate(templ->PrototypeTemplate(), name, value, attributes); -} - -NAN_INLINE void NanSetInstanceTemplate( - v8::Local templ - , const char *name - , v8::Handle value -) { - NanSetTemplate(templ->InstanceTemplate(), name, value); -} - -NAN_INLINE void NanSetInstanceTemplate( - v8::Local templ - , v8::Handle name - , v8::Handle value - , v8::PropertyAttribute attributes -) { - NanSetTemplate(templ->InstanceTemplate(), name, value, attributes); -} - -#endif // NAN_H_ diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/package.json b/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/package.json deleted file mode 100644 index 34b9a91..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/nan/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "name": "nan", - "version": "1.4.3", - "description": "Native Abstractions for Node.js: C++ header for Node 0.8->0.12 compatibility", - "main": "include_dirs.js", - "repository": { - "type": "git", - "url": "git://github.com/rvagg/nan.git" - }, - "scripts": { - "test": "tap --gc test/js/*-test.js", - "rebuild-tests": "node-gyp rebuild --directory test" - }, - "contributors": [ - { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - { - "name": "Benjamin Byholm", - "email": "bbyholm@abo.fi", - "url": "https://github.com/kkoopa/" - }, - { - "name": "Trevor Norris", - "email": "trev.norris@gmail.com", - "url": "https://github.com/trevnorris" - }, - { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "https://github.com/TooTallNate" - }, - { - "name": "Brett Lawson", - "email": "brett19@gmail.com", - "url": "https://github.com/brett19" - }, - { - "name": "Ben Noordhuis", - "email": "info@bnoordhuis.nl", - "url": "https://github.com/bnoordhuis" - } - ], - "devDependencies": { - "bindings": "~1.2.1", - "node-gyp": "~1.0.2", - "tap": "~0.4.13", - "xtend": "~4.0.0" - }, - "license": "MIT", - "gitHead": "75121a4413c4729170ec97c73c4826600f4a763e", - "bugs": { - "url": "https://github.com/rvagg/nan/issues" - }, - "homepage": "https://github.com/rvagg/nan", - "_id": "nan@1.4.3", - "_shasum": "c56b5404698063696f597435f9163c312aea5009", - "_from": "nan@>=1.4.0 <1.5.0", - "_npmVersion": "2.1.6", - "_nodeVersion": "0.10.33", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - }, - { - "name": "kkoopa", - "email": "bbyholm@abo.fi" - } - ], - "dist": { - "shasum": "c56b5404698063696f597435f9163c312aea5009", - "tarball": "http://registry.npmjs.org/nan/-/nan-1.4.3.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/nan/-/nan-1.4.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/options/.npmignore b/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/options/.npmignore deleted file mode 100644 index 1b18fb3..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/options/.npmignore +++ /dev/null @@ -1,7 +0,0 @@ -npm-debug.log -node_modules -.*.swp -.lock-* -build/ - -test diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/options/Makefile b/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/options/Makefile deleted file mode 100644 index 7496b6f..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/options/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -ALL_TESTS = $(shell find test/ -name '*.test.js') - -run-tests: - @./node_modules/.bin/mocha \ - -t 2000 \ - $(TESTFLAGS) \ - $(TESTS) - -test: - @$(MAKE) NODE_PATH=lib TESTS="$(ALL_TESTS)" run-tests - -.PHONY: test diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/options/README.md b/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/options/README.md deleted file mode 100644 index 0dabc75..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/options/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# options.js # - -A very light-weight in-code option parsers for node.js. - -## Usage ## - -``` js -var Options = require("options"); - -// Create an Options object -function foo(options) { - var default_options = { - foo : "bar" - }; - - // Create an option object with default value - var opts = new Options(default_options); - - // Merge options - opts = opts.merge(options); - - // Reset to default value - opts.reset(); - - // Copy selected attributes out - var seled_att = opts.copy("foo"); - - // Read json options from a file. - opts.read("options.file"); // Sync - opts.read("options.file", function(err){ // Async - if(err){ // If error occurs - console.log("File error."); - }else{ - // No error - } - }); - - // Attributes defined or not - opts.isDefinedAndNonNull("foobar"); - opts.isDefined("foobar"); -} - -``` - - -## License ## - -(The MIT License) - -Copyright (c) 2012 Einar Otto Stangvik <einaros@gmail.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/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/options/lib/options.js b/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/options/lib/options.js deleted file mode 100644 index 4fc45e9..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/options/lib/options.js +++ /dev/null @@ -1,86 +0,0 @@ -/*! - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -var fs = require('fs'); - -function Options(defaults) { - var internalValues = {}; - var values = this.value = {}; - Object.keys(defaults).forEach(function(key) { - internalValues[key] = defaults[key]; - Object.defineProperty(values, key, { - get: function() { return internalValues[key]; }, - configurable: false, - enumerable: true - }); - }); - this.reset = function() { - Object.keys(defaults).forEach(function(key) { - internalValues[key] = defaults[key]; - }); - return this; - }; - this.merge = function(options, required) { - options = options || {}; - if (Object.prototype.toString.call(required) === '[object Array]') { - var missing = []; - for (var i = 0, l = required.length; i < l; ++i) { - var key = required[i]; - if (!(key in options)) { - missing.push(key); - } - } - if (missing.length > 0) { - if (missing.length > 1) { - throw new Error('options ' + - missing.slice(0, missing.length - 1).join(', ') + ' and ' + - missing[missing.length - 1] + ' must be defined'); - } - else throw new Error('option ' + missing[0] + ' must be defined'); - } - } - Object.keys(options).forEach(function(key) { - if (key in internalValues) { - internalValues[key] = options[key]; - } - }); - return this; - }; - this.copy = function(keys) { - var obj = {}; - Object.keys(defaults).forEach(function(key) { - if (keys.indexOf(key) !== -1) { - obj[key] = values[key]; - } - }); - return obj; - }; - this.read = function(filename, cb) { - if (typeof cb == 'function') { - var self = this; - fs.readFile(filename, function(error, data) { - if (error) return cb(error); - var conf = JSON.parse(data); - self.merge(conf); - cb(); - }); - } - else { - var conf = JSON.parse(fs.readFileSync(filename)); - this.merge(conf); - } - return this; - }; - this.isDefined = function(key) { - return typeof values[key] != 'undefined'; - }; - this.isDefinedAndNonNull = function(key) { - return typeof values[key] != 'undefined' && values[key] !== null; - }; - Object.freeze(values); - Object.freeze(this); -} - -module.exports = Options; diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/options/package.json b/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/options/package.json deleted file mode 100644 index 7a62d8e..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/options/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "author": { - "name": "Einar Otto Stangvik", - "email": "einaros@gmail.com", - "url": "http://2x.io" - }, - "name": "options", - "description": "A very light-weight in-code option parsers for node.js.", - "version": "0.0.6", - "repository": { - "type": "git", - "url": "git://github.com/einaros/options.js.git" - }, - "main": "lib/options", - "scripts": { - "test": "make test" - }, - "engines": { - "node": ">=0.4.0" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "latest" - }, - "gitHead": "ff53d0a092c897cb95964232a96fe17da65c11af", - "bugs": { - "url": "https://github.com/einaros/options.js/issues" - }, - "homepage": "https://github.com/einaros/options.js", - "_id": "options@0.0.6", - "_shasum": "ec22d312806bb53e731773e7cdaefcf1c643128f", - "_from": "options@>=0.0.5", - "_npmVersion": "1.4.21", - "_npmUser": { - "name": "einaros", - "email": "einaros@gmail.com" - }, - "maintainers": [ - { - "name": "einaros", - "email": "einaros@gmail.com" - } - ], - "dist": { - "shasum": "ec22d312806bb53e731773e7cdaefcf1c643128f", - "tarball": "http://registry.npmjs.org/options/-/options-0.0.6.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/.npmignore b/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/.npmignore deleted file mode 100644 index 66210a2..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -coverage -.tern-port diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/.travis.yml b/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/.travis.yml deleted file mode 100644 index a6e9741..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.11" -before_install: - - "npm install -g npm@1.4.x" -script: - - "npm run test-travis" -after_script: - - "npm install coveralls@2.11.x && cat coverage/lcov.info | coveralls" -notifications: - irc: - channels: - - "irc.freenode.org#unshift" - on_success: change - on_failure: change diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/README.md b/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/README.md deleted file mode 100644 index 84fa3f2..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# Ultron - -[![Made by unshift](https://img.shields.io/badge/made%20by-unshift-00ffcc.svg?style=flat-square)](http://unshift.io)[![Version npm](http://img.shields.io/npm/v/ultron.svg?style=flat-square)](http://browsenpm.org/package/ultron)[![Build Status](http://img.shields.io/travis/unshiftio/ultron/master.svg?style=flat-square)](https://travis-ci.org/unshiftio/ultron)[![Dependencies](https://img.shields.io/david/unshiftio/ultron.svg?style=flat-square)](https://david-dm.org/unshiftio/ultron)[![Coverage Status](http://img.shields.io/coveralls/unshiftio/ultron/master.svg?style=flat-square)](https://coveralls.io/r/unshiftio/ultron?branch=master)[![IRC channel](http://img.shields.io/badge/IRC-irc.freenode.net%23unshift-00a8ff.svg?style=flat-square)](http://webchat.freenode.net/?channels=unshift) - -Ultron is a high-intelligence robot. It gathers intelligence so it can start -improving upon his rudimentary design. It will learn your event emitting -patterns and find ways to exterminate them. Allowing you to remove only the -event emitters that **you** assigned and not the ones that your users or -developers assigned. This can prevent race conditions, memory leaks and even file -descriptor leaks from ever happening as you won't remove clean up processes. - -## Installation - -The module is designed to be used in browsers using browserify and in Node.js. -You can install the module through the public npm registry by running the -following command in CLI: - -``` -npm install --save ultron -``` - -## Usage - -In all examples we assume that you've required the library as following: - -```js -'use strict'; - -var Ultron = require('ultron'); -``` - -Now that we've required the library we can construct our first `Ultron` instance. -The constructor requires one argument which should be the `EventEmitter` -instance that we need to operate upon. This can be the `EventEmitter` module -that ships with Node.js or `EventEmitter3` or anything else as long as it -follow the same API and internal structure as these 2. So with that in mind we -can create the instance: - -```js -// -// For the sake of this example we're going to construct an empty EventEmitter -// -var EventEmitter = require('events').EventEmitter; // or require('eventmitter3'); -var events = new EventEmitter(); - -var ultron = new Ultron(events); -``` - -You can now use the following API's from the Ultron instance: - -### Ultron.on - -Register a new event listener for the given event. It follows the exact same API -as `EventEmitter.on` but it will return itself instead of returning the -EventEmitter instance. If you are using EventEmitter3 it also supports the -context param: - -```js -ultron.on('event-name', handler, { custom: 'function context' }); -``` - -### Ultron.once - -Exactly the same as the [Ultron.on](#ultronon) but it only allows the execution -once. - -### Ultron.remove - -This is where all the magic happens and the safe removal starts. This function -accepts different argument styles: - -- No arguments, assume that all events need to be removed so it will work as - `removeAllListeners()` API. -- 1 argument, when it's a string it will be split on ` ` and `,` to create a - list of events that need to be cleared. -- Multiple arguments, we assume that they are all names of events that need to - be cleared. - -```js -ultron.remove('foo, bar baz'); // Removes foo, bar and baz. -ultron.remove('foo', 'bar', 'baz'); // Removes foo, bar and baz. -ultron.remove(); // Removes everything. -``` - -If you just want to remove a single event listener using a function reference -you can still use the EventEmitter's `removeListener(event, fn)` API: - -```js -function foo() {} - -ulton.on('foo', foo); -events.removeListener('foo', foo); -``` - -## License - -MIT diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/index.js b/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/index.js deleted file mode 100644 index f0e8113..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/index.js +++ /dev/null @@ -1,125 +0,0 @@ -'use strict'; - -/** - * An auto incrementing id which we can use to create "unique" Ultron instances - * so we can track the event emitters that are added through the Ultron - * interface. - * - * @type {Number} - * @private - */ -var id = 0; - -/** - * Ultron is high-intelligence robot. It gathers intelligence so it can start improving - * upon his rudimentary design. It will learn from your EventEmitting patterns - * and exterminate them. - * - * @constructor - * @param {EventEmitter} ee EventEmitter instance we need to wrap. - * @api public - */ -function Ultron(ee) { - if (!(this instanceof Ultron)) return new Ultron(ee); - - this.id = id++; - this.ee = ee; -} - -/** - * Register a new EventListener for the given event. - * - * @param {String} event Name of the event. - * @param {Functon} fn Callback function. - * @param {Mixed} context The context of the function. - * @returns {Ultron} - * @api public - */ -Ultron.prototype.on = function on(event, fn, context) { - fn.__ultron = this.id; - this.ee.on(event, fn, context); - - return this; -}; -/** - * Add an EventListener that's only called once. - * - * @param {String} event Name of the event. - * @param {Function} fn Callback function. - * @param {Mixed} context The context of the function. - * @returns {Ultron} - * @api public - */ -Ultron.prototype.once = function once(event, fn, context) { - fn.__ultron = this.id; - this.ee.once(event, fn, context); - - return this; -}; - -/** - * Remove the listeners we assigned for the given event. - * - * @returns {Ultron} - * @api public - */ -Ultron.prototype.remove = function remove() { - var args = arguments - , event; - - // - // When no event names are provided we assume that we need to clear all the - // events that were assigned through us. - // - if (args.length === 1 && 'string' === typeof args[0]) { - args = args[0].split(/[, ]+/); - } else if (!args.length) { - args = []; - - for (event in this.ee._events) { - if (this.ee._events.hasOwnProperty(event)) { - args.push(event); - } - } - } - - for (var i = 0; i < args.length; i++) { - var listeners = this.ee.listeners(args[i]); - - for (var j = 0; j < listeners.length; j++) { - event = listeners[j]; - - if (event.listener) { - if (event.listener.__ultron !== this.id) continue; - delete event.listener.__ultron; - } else { - if (event.__ultron !== this.id) continue; - delete event.__ultron; - } - - this.ee.removeListener(args[i], event); - } - } - - return this; -}; - -/** - * Destroy the Ultron instance, remove all listeners and release all references. - * - * @returns {Boolean} - * @api public - */ -Ultron.prototype.destroy = function destroy() { - if (!this.ee) return false; - - this.remove(); - this.ee = null; - - return true; -}; - -// -// Expose the module. -// -module.exports = Ultron; diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/package.json b/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/package.json deleted file mode 100644 index e8829bb..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "ultron", - "version": "1.0.1", - "description": "Ultron is high-intelligence robot. It gathers intel so it can start improving upon his rudimentary design", - "main": "index.js", - "scripts": { - "test": "mocha --reporter spec --ui bdd test.js", - "watch": "mocha --watch --reporter spec --ui bdd test.js", - "coverage": "istanbul cover ./node_modules/.bin/_mocha -- --reporter spec --ui bdd test.js", - "test-travis": "istanbul cover node_modules/.bin/_mocha --report lcovonly -- --reporter spec --ui bdd test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/unshiftio/ultron" - }, - "keywords": [ - "Ultron", - "robot", - "gather", - "intelligence", - "event", - "events", - "eventemitter", - "emitter", - "cleanup" - ], - "author": { - "name": "Arnout Kazemier" - }, - "license": "MIT", - "devDependencies": { - "assume": "0.0.x", - "eventemitter3": "0.1.x", - "istanbul": "0.3.x", - "mocha": "2.0.x", - "pre-commit": "0.0.x" - }, - "bugs": { - "url": "https://github.com/unshiftio/ultron/issues" - }, - "homepage": "https://github.com/unshiftio/ultron", - "gitHead": "1aae6f07661ebb69a60c466ef50b9798cfb7f631", - "_id": "ultron@1.0.1", - "_shasum": "c9d8d86c9cf2823028eb45629ab725897dd65dc5", - "_from": "ultron@>=1.0.0 <1.1.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "V1", - "email": "info@3rd-Eden.com" - }, - "maintainers": [ - { - "name": "V1", - "email": "info@3rd-Eden.com" - }, - { - "name": "unshift", - "email": "npm@unshift.io" - } - ], - "dist": { - "shasum": "c9d8d86c9cf2823028eb45629ab725897dd65dc5", - "tarball": "http://registry.npmjs.org/ultron/-/ultron-1.0.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/test.js b/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/test.js deleted file mode 100644 index 1fd4f1b..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/node_modules/ultron/test.js +++ /dev/null @@ -1,327 +0,0 @@ -/* istanbul ignore next */ -describe('Ultron', function () { - 'use strict'; - - var EventEmitter = require('eventemitter3') - , EE = require('events').EventEmitter - , assume = require('assume') - , Ultron = require('./') - , ultron - , ee; - - beforeEach(function () { - ee = new EventEmitter(); - ultron = new Ultron(ee); - }); - - afterEach(function () { - ultron.destroy(); - ee.removeAllListeners(); - }); - - it('is exposed as a function', function () { - assume(Ultron).is.a('function'); - }); - - it('can be initialized without the new keyword', function () { - assume(Ultron(ee)).is.instanceOf(Ultron); - }); - - it('assigns a unique id to every instance', function () { - for (var i = 0; i < 100; i++) { - assume(ultron.id).does.not.equal((new Ultron()).id); - } - }); - - it('allows removal through the event emitter', function () { - function foo() {} - function bar() {} - - ultron.on('foo', foo); - ultron.once('foo', bar); - - assume(foo.__ultron).equals(ultron.id); - assume(bar.__ultron).equals(ultron.id); - assume(ee.listeners('foo').length).equals(2); - - ee.removeListener('foo', foo); - assume(ee.listeners('foo').length).equals(1); - - ee.removeListener('foo', bar); - assume(ee.listeners('foo').length).equals(0); - }); - - describe('#on', function () { - it('assigns a listener', function () { - assume(ee.listeners('foo').length).equals(0); - - function foo() {} - - ultron.on('foo', foo); - assume(ee.listeners('foo').length).equals(1); - assume(ee.listeners('foo')[0]).equals(foo); - }); - - it('tags the assigned function', function () { - assume(ee.listeners('foo').length).equals(0); - - ultron.on('foo', function () {}); - assume(ee.listeners('foo')[0].__ultron).equals(ultron.id); - }); - - it('also passes in the context', function (next) { - var context = 1313; - - ultron.on('foo', function (a, b, c) { - assume(a).equals('a'); - assume(b).equals('b'); - assume(c).equals('c'); - - assume(this).equals(context); - - next(); - }, context); - - ee.emit('foo', 'a', 'b', 'c'); - }); - - it('works with regular eventemitters as well', function (next) { - var ee = new EE() - , ultron = new Ultron(ee); - - ultron.on('foo', function (a, b, c) { - assume(a).equals('a'); - assume(b).equals('b'); - assume(c).equals('c'); - - next(); - }); - - ee.emit('foo', 'a', 'b', 'c'); - }); - }); - - describe('#once', function () { - it('assigns a listener', function () { - assume(ee.listeners('foo').length).equals(0); - - function foo() {} - ultron.once('foo', foo); - assume(ee.listeners('foo').length).equals(1); - assume(ee.listeners('foo')[0]).equals(foo); - }); - - it('tags the assigned function', function () { - assume(ee.listeners('foo').length).equals(0); - - ultron.once('foo', function () {}); - assume(ee.listeners('foo')[0].__ultron).equals(ultron.id); - }); - - it('also passes in the context', function (next) { - var context = 1313; - - ultron.once('foo', function (a, b, c) { - assume(a).equals('a'); - assume(b).equals('b'); - assume(c).equals('c'); - - assume(this).equals(context); - - next(); - }, context); - - ee.emit('foo', 'a', 'b', 'c'); - ee.emit('foo', 'a', 'b', 'c'); // Ensure that we don't double execute - }); - - it('works with regular eventemitters as well', function (next) { - var ee = new EE() - , ultron = new Ultron(ee); - - ultron.once('foo', function (a, b, c) { - assume(a).equals('a'); - assume(b).equals('b'); - assume(c).equals('c'); - - next(); - }); - - ee.emit('foo', 'a', 'b', 'c'); - ee.emit('foo', 'a', 'b', 'c'); // Ensure that we don't double execute - }); - }); - - describe('#remove', function () { - it('removes only our assigned `on` listeners', function () { - function foo() {} - function bar() {} - - ee.on('foo', foo); - ultron.on('foo', bar); - assume(ee.listeners('foo').length).equals(2); - - ultron.remove('foo'); - assume(ee.listeners('foo').length).equals(1); - assume(ee.listeners('foo')[0]).equals(foo); - }); - - it('removes our private __ultron references', function () { - function once() {} - function on() {} - - assume('__ultron' in once).is.false(); - assume('__ultron' in on).is.false(); - - ultron.on('foo', on); - ultron.once('bar', once); - - assume('__ultron' in once).is.true(); - assume('__ultron' in on).is.true(); - - ultron.remove('foo, bar'); - - assume('__ultron' in once).is.false(); - assume('__ultron' in on).is.false(); - - ultron.destroy(); - - ee = new EE(); - ultron = new Ultron(ee); - - assume('__ultron' in once).is.false(); - assume('__ultron' in on).is.false(); - - ultron.on('foo', on); - ultron.once('bar', once); - - assume('__ultron' in once).is.true(); - assume('__ultron' in on).is.true(); - - ultron.remove('foo, bar'); - - assume('__ultron' in once).is.false(); - assume('__ultron' in on).is.false(); - }); - - it('removes only our assigned `once` listeners', function () { - function foo() {} - function bar() {} - - ee.once('foo', foo); - ultron.once('foo', bar); - assume(ee.listeners('foo').length).equals(2); - - ultron.remove('foo'); - assume(ee.listeners('foo').length).equals(1); - assume(ee.listeners('foo')[0]).equals(foo); - }); - - it('removes only our assigned `once` listeners from regular EE', function () { - var ee = new EE() - , ultron = new Ultron(ee); - - function foo() {} - function bar() {} - - ee.once('foo', foo); - ultron.once('foo', bar); - assume(ee.listeners('foo').length).equals(2); - - ultron.remove('foo'); - assume(ee.listeners('foo').length).equals(1); - assume(ee.listeners('foo')[0].listener).equals(foo); - }); - - it('removes all assigned events if called without args', function () { - function foo() {} - function bar() {} - - ultron.on('foo', foo); - ultron.on('bar', bar); - - assume(ee.listeners('foo').length).equals(1); - assume(ee.listeners('bar').length).equals(1); - - ultron.remove(); - - assume(ee.listeners('foo').length).equals(0); - assume(ee.listeners('bar').length).equals(0); - }); - - it('removes multiple listeners based on args', function () { - function foo() {} - function bar() {} - function baz() {} - - ultron.on('foo', foo); - ultron.on('bar', bar); - ultron.on('baz', baz); - - assume(ee.listeners('foo').length).equals(1); - assume(ee.listeners('bar').length).equals(1); - assume(ee.listeners('baz').length).equals(1); - - ultron.remove('foo', 'bar'); - - assume(ee.listeners('foo').length).equals(0); - assume(ee.listeners('bar').length).equals(0); - assume(ee.listeners('baz').length).equals(1); - }); - - it('removes multiple listeners if first arg is seperated string', function () { - function foo() {} - function bar() {} - function baz() {} - - ultron.on('foo', foo); - ultron.on('bar', bar); - ultron.on('baz', baz); - - assume(ee.listeners('foo').length).equals(1); - assume(ee.listeners('bar').length).equals(1); - assume(ee.listeners('baz').length).equals(1); - - ultron.remove('foo, bar'); - - assume(ee.listeners('foo').length).equals(0); - assume(ee.listeners('bar').length).equals(0); - assume(ee.listeners('baz').length).equals(1); - }); - }); - - describe('#destroy', function () { - it('removes all listeners', function () { - function foo() {} - function bar() {} - function baz() {} - - ultron.on('foo', foo); - ultron.on('bar', bar); - ultron.on('baz', baz); - - assume(ee.listeners('foo').length).equals(1); - assume(ee.listeners('bar').length).equals(1); - assume(ee.listeners('baz').length).equals(1); - - ultron.destroy(); - - assume(ee.listeners('foo').length).equals(0); - assume(ee.listeners('bar').length).equals(0); - assume(ee.listeners('baz').length).equals(0); - }); - - it('removes the .ee reference', function () { - assume(ultron.ee).equals(ee); - ultron.destroy(); - assume(ultron.ee).equals(null); - }); - - it('returns booleans for state indication', function () { - assume(ultron.destroy()).is.true(); - assume(ultron.destroy()).is.false(); - assume(ultron.destroy()).is.false(); - assume(ultron.destroy()).is.false(); - }); - }); -}); diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/package.json b/s4t-server-node/node_modules/autobahn/node_modules/ws/package.json deleted file mode 100644 index e002c0c..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "author": { - "name": "Einar Otto Stangvik", - "email": "einaros@gmail.com", - "url": "http://2x.io" - }, - "name": "ws", - "description": "simple to use, blazing fast and thoroughly tested websocket client, server and console for node.js, up-to-date against RFC-6455", - "version": "0.6.5", - "license": "MIT", - "keywords": [ - "Hixie", - "HyBi", - "Push", - "RFC-6455", - "WebSocket", - "WebSockets", - "real-time" - ], - "repository": { - "type": "git", - "url": "git://github.com/einaros/ws.git" - }, - "scripts": { - "test": "make test", - "install": "(node-gyp rebuild 2> builderror.log) || (exit 0)" - }, - "dependencies": { - "nan": "1.4.x", - "options": ">=0.0.5", - "ultron": "1.0.x" - }, - "devDependencies": { - "ansi": "0.3.x", - "benchmark": "0.3.x", - "expect.js": "0.3.x", - "mocha": "2.0.x", - "should": "4.3.x", - "tinycolor": "0.0.x" - }, - "browser": "./lib/browser.js", - "component": { - "scripts": { - "ws/index.js": "./lib/browser.js" - } - }, - "gypfile": true, - "gitHead": "552dddaf9bcc5304c22415b81aa748384d82837c", - "bugs": { - "url": "https://github.com/einaros/ws/issues" - }, - "homepage": "https://github.com/einaros/ws", - "_id": "ws@0.6.5", - "_shasum": "f00844001ca393b003681ff32838e72a560dafd4", - "_from": "ws@>=0.4.31", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "V1", - "email": "info@3rd-Eden.com" - }, - "maintainers": [ - { - "name": "einaros", - "email": "einaros@gmail.com" - }, - { - "name": "V1", - "email": "info@3rd-Eden.com" - } - ], - "dist": { - "shasum": "f00844001ca393b003681ff32838e72a560dafd4", - "tarball": "http://registry.npmjs.org/ws/-/ws-0.6.5.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/ws/-/ws-0.6.5.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/src/bufferutil.cc b/s4t-server-node/node_modules/autobahn/node_modules/ws/src/bufferutil.cc deleted file mode 100644 index 7f99bd6..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/src/bufferutil.cc +++ /dev/null @@ -1,117 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "nan.h" - -using namespace v8; -using namespace node; - -class BufferUtil : public ObjectWrap -{ -public: - - static void Initialize(v8::Handle target) - { - NanScope(); - Local t = NanNew(New); - t->InstanceTemplate()->SetInternalFieldCount(1); - NODE_SET_METHOD(t, "unmask", BufferUtil::Unmask); - NODE_SET_METHOD(t, "mask", BufferUtil::Mask); - NODE_SET_METHOD(t, "merge", BufferUtil::Merge); - target->Set(NanSymbol("BufferUtil"), t->GetFunction()); - } - -protected: - - static NAN_METHOD(New) - { - NanScope(); - BufferUtil* bufferUtil = new BufferUtil(); - bufferUtil->Wrap(args.This()); - NanReturnValue(args.This()); - } - - static NAN_METHOD(Merge) - { - NanScope(); - Local bufferObj = args[0]->ToObject(); - char* buffer = Buffer::Data(bufferObj); - Local array = Local::Cast(args[1]); - unsigned int arrayLength = array->Length(); - size_t offset = 0; - unsigned int i; - for (i = 0; i < arrayLength; ++i) { - Local src = array->Get(i)->ToObject(); - size_t length = Buffer::Length(src); - memcpy(buffer + offset, Buffer::Data(src), length); - offset += length; - } - NanReturnValue(NanTrue()); - } - - static NAN_METHOD(Unmask) - { - NanScope(); - Local buffer_obj = args[0]->ToObject(); - size_t length = Buffer::Length(buffer_obj); - Local mask_obj = args[1]->ToObject(); - unsigned int *mask = (unsigned int*)Buffer::Data(mask_obj); - unsigned int* from = (unsigned int*)Buffer::Data(buffer_obj); - size_t len32 = length / 4; - unsigned int i; - for (i = 0; i < len32; ++i) *(from + i) ^= *mask; - from += i; - switch (length % 4) { - case 3: *((unsigned char*)from+2) = *((unsigned char*)from+2) ^ ((unsigned char*)mask)[2]; - case 2: *((unsigned char*)from+1) = *((unsigned char*)from+1) ^ ((unsigned char*)mask)[1]; - case 1: *((unsigned char*)from ) = *((unsigned char*)from ) ^ ((unsigned char*)mask)[0]; - case 0:; - } - NanReturnValue(NanTrue()); - } - - static NAN_METHOD(Mask) - { - NanScope(); - Local buffer_obj = args[0]->ToObject(); - Local mask_obj = args[1]->ToObject(); - unsigned int *mask = (unsigned int*)Buffer::Data(mask_obj); - Local output_obj = args[2]->ToObject(); - unsigned int dataOffset = args[3]->Int32Value(); - unsigned int length = args[4]->Int32Value(); - unsigned int* to = (unsigned int*)(Buffer::Data(output_obj) + dataOffset); - unsigned int* from = (unsigned int*)Buffer::Data(buffer_obj); - unsigned int len32 = length / 4; - unsigned int i; - for (i = 0; i < len32; ++i) *(to + i) = *(from + i) ^ *mask; - to += i; - from += i; - switch (length % 4) { - case 3: *((unsigned char*)to+2) = *((unsigned char*)from+2) ^ *((unsigned char*)mask+2); - case 2: *((unsigned char*)to+1) = *((unsigned char*)from+1) ^ *((unsigned char*)mask+1); - case 1: *((unsigned char*)to ) = *((unsigned char*)from ) ^ *((unsigned char*)mask); - case 0:; - } - NanReturnValue(NanTrue()); - } -}; - -extern "C" void init (Handle target) -{ - NanScope(); - BufferUtil::Initialize(target); -} - -NODE_MODULE(bufferutil, init) - diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/src/validation.cc b/s4t-server-node/node_modules/autobahn/node_modules/ws/src/validation.cc deleted file mode 100644 index 0d9e242..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/src/validation.cc +++ /dev/null @@ -1,145 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -#include -#include -#include -#include -#include -#include -#include -#include "nan.h" - -using namespace v8; -using namespace node; - -#define UNI_SUR_HIGH_START (uint32_t) 0xD800 -#define UNI_SUR_LOW_END (uint32_t) 0xDFFF -#define UNI_REPLACEMENT_CHAR (uint32_t) 0x0000FFFD -#define UNI_MAX_LEGAL_UTF32 (uint32_t) 0x0010FFFF - -static const uint8_t trailingBytesForUTF8[256] = { - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 -}; - -static const uint32_t offsetsFromUTF8[6] = { - 0x00000000, 0x00003080, 0x000E2080, - 0x03C82080, 0xFA082080, 0x82082080 -}; - -static int isLegalUTF8(const uint8_t *source, const int length) -{ - uint8_t a; - const uint8_t *srcptr = source+length; - switch (length) { - default: return 0; - /* Everything else falls through when "true"... */ - /* RFC3629 makes 5 & 6 bytes UTF-8 illegal - case 6: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return 0; - case 5: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return 0; */ - case 4: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return 0; - case 3: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return 0; - case 2: if ((a = (*--srcptr)) > 0xBF) return 0; - switch (*source) { - /* no fall-through in this inner switch */ - case 0xE0: if (a < 0xA0) return 0; break; - case 0xED: if (a > 0x9F) return 0; break; - case 0xF0: if (a < 0x90) return 0; break; - case 0xF4: if (a > 0x8F) return 0; break; - default: if (a < 0x80) return 0; - } - - case 1: if (*source >= 0x80 && *source < 0xC2) return 0; - } - if (*source > 0xF4) return 0; - return 1; -} - -int is_valid_utf8 (size_t len, char *value) -{ - /* is the string valid UTF-8? */ - for (unsigned int i = 0; i < len; i++) { - uint32_t ch = 0; - uint8_t extrabytes = trailingBytesForUTF8[(uint8_t) value[i]]; - - if (extrabytes + i >= len) - return 0; - - if (isLegalUTF8 ((uint8_t *) (value + i), extrabytes + 1) == 0) return 0; - - switch (extrabytes) { - case 5 : ch += (uint8_t) value[i++]; ch <<= 6; - case 4 : ch += (uint8_t) value[i++]; ch <<= 6; - case 3 : ch += (uint8_t) value[i++]; ch <<= 6; - case 2 : ch += (uint8_t) value[i++]; ch <<= 6; - case 1 : ch += (uint8_t) value[i++]; ch <<= 6; - case 0 : ch += (uint8_t) value[i]; - } - - ch -= offsetsFromUTF8[extrabytes]; - - if (ch <= UNI_MAX_LEGAL_UTF32) { - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) - return 0; - } else { - return 0; - } - } - - return 1; -} - -class Validation : public ObjectWrap -{ -public: - - static void Initialize(v8::Handle target) - { - NanScope(); - Local t = NanNew(New); - t->InstanceTemplate()->SetInternalFieldCount(1); - NODE_SET_METHOD(t, "isValidUTF8", Validation::IsValidUTF8); - target->Set(NanSymbol("Validation"), t->GetFunction()); - } - -protected: - - static NAN_METHOD(New) - { - NanScope(); - Validation* validation = new Validation(); - validation->Wrap(args.This()); - NanReturnValue(args.This()); - } - - static NAN_METHOD(IsValidUTF8) - { - NanScope(); - if (!Buffer::HasInstance(args[0])) { - return NanThrowTypeError("First argument needs to be a buffer"); - } - Local buffer_obj = args[0]->ToObject(); - char *buffer_data = Buffer::Data(buffer_obj); - size_t buffer_length = Buffer::Length(buffer_obj); - NanReturnValue(is_valid_utf8(buffer_length, buffer_data) == 1 ? NanTrue() : NanFalse()); - } -}; - -extern "C" void init (Handle target) -{ - NanScope(); - Validation::Initialize(target); -} - -NODE_MODULE(validation, init) - diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/wscat/README.md b/s4t-server-node/node_modules/autobahn/node_modules/ws/wscat/README.md deleted file mode 100644 index 5b87ead..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/wscat/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# wscat - -WebSocket cat. - -## Installation - -This module needs to be installed globally so use the `-g` flag when installing: - -``` -npm install -g wscat -``` - -## Usage - -``` -$ wscat -c ws://echo.websocket.org -connected (press CTRL+C to quit) -> hi there -< hi there -> are you a happy parrot? -< are you a happy parrot? -``` - -## License - -MIT diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/wscat/bin/wscat b/s4t-server-node/node_modules/autobahn/node_modules/ws/wscat/bin/wscat deleted file mode 100755 index 5ec8046..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/wscat/bin/wscat +++ /dev/null @@ -1,222 +0,0 @@ -#!/usr/bin/env node - -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var program = require('commander') - , readline = require('readline') - , events = require('events') - , WebSocket = require('ws') - , util = require('util') - , fs = require('fs'); - -/** - * InputReader - processes console input. - */ -function Console() { - if (!(this instanceof Console)) return new Console(); - - this.stdin = process.stdin; - this.stdout = process.stdout; - - this.readlineInterface = readline.createInterface(this.stdin, this.stdout); - - var self = this; - - this.readlineInterface.on('line', function line(data) { - self.emit('line', data); - }).on('close', function close() { - self.emit('close'); - }); - - this._resetInput = function() { - self.clear(); - }; -} - -util.inherits(Console, events.EventEmitter); - -Console.Colors = { - Red: '\033[31m', - Green: '\033[32m', - Yellow: '\033[33m', - Blue: '\033[34m', - Default: '\033[39m' -}; - -Console.prototype.prompt = function prompt() { - this.readlineInterface.prompt(); -}; - -Console.prototype.print = function print(msg, color) { - this.clear(); - color = color || Console.Colors.Default; - this.stdout.write(color + msg + Console.Colors.Default + '\n'); - this.prompt(); -}; - -Console.prototype.clear = function clear() { - this.stdout.write('\033[2K\033[E'); -}; - -Console.prototype.pause = function pausing() { - this.stdin.on('keypress', this._resetInput); -}; - -Console.prototype.resume = function resume() { - this.stdin.removeListener('keypress', this._resetInput); -}; - -function appender(xs) { - xs = xs || []; - - return function (x) { - xs.push(x); - return xs; - }; -} - -function into(obj, kvals) { - kvals.forEach(function (kv) { - obj[kv[0]] = kv[1]; - }); - - return obj; -} - -function splitOnce(sep, str) { // sep can be either String or RegExp - var tokens = str.split(sep); - return [tokens[0], str.replace(sep, '').substr(tokens[0].length)]; -} - -/** - * The actual application - */ -var version = require('../package.json').version; - -program - .version(version) - .usage('[options] ') - .option('-l, --listen ', 'listen on port') - .option('-c, --connect ', 'connect to a websocket server') - .option('-p, --protocol ', 'optional protocol version') - .option('-o, --origin ', 'optional origin') - .option('--host ', 'optional host') - .option('-s, --subprotocol ', 'optional subprotocol') - .option('-n, --no-check', 'Do not check for unauthorized certificates') - .option('-H, --header ', 'Set an HTTP header. Repeat to set multiple. (--connect only)', appender(), []) - .option('--auth ', 'Add basic HTTP authentication header. (--connect only)') - .parse(process.argv); - -if (program.listen && program.connect) { - console.error('\033[33merror: use either --listen or --connect\033[39m'); - process.exit(-1); -} else if (program.listen) { - var wsConsole = new Console(); - wsConsole.pause(); - - var options = {}; - - if (program.protocol) options.protocolVersion = program.protocol; - if (program.origin) options.origin = program.origin; - if (program.subprotocol) options.protocol = program.subprotocol; - if (!program.check) options.rejectUnauthorized = program.check; - - var ws = null; - var wss = new WebSocket.Server({ port: program.listen }, function listening() { - wsConsole.print('listening on port ' + program.listen + ' (press CTRL+C to quit)', Console.Colors.Green); - wsConsole.clear(); - }); - - wsConsole.on('close', function close() { - try { ws.close(); } - catch (e) {} - - process.exit(0); - }); - - wsConsole.on('line', function line(data) { - if (ws) { - ws.send(data, { mask: false }); - wsConsole.prompt(); - } - }); - - wss.on('connection', function(newClient) { - if (ws) return newClient.terminate(); - - ws = newClient; - wsConsole.resume(); - wsConsole.prompt(); - wsConsole.print('client connected', Console.Colors.Green); - - ws.on('close', function close() { - wsConsole.print('disconnected', Console.Colors.Green); - wsConsole.clear(); - wsConsole.pause(); - ws = null; - }).on('error', function error(code, description) { - wsConsole.print('error: ' + code + (description ? ' ' + description : ''), Console.Colors.Yellow); - }).on('message', function message(data, flags) { - wsConsole.print('< ' + data, Console.Colors.Blue); - }); - }).on('error', function servererrror(error) { - wsConsole.print('error: ' + error.toString(), Console.Colors.Yellow); - process.exit(-1); - }); -} else if (program.connect) { - var wsConsole = new Console(); - var options = {}; - - if (program.protocol) options.protocolVersion = program.protocol; - if (program.origin) options.origin = program.origin; - if (program.subprotocol) options.protocol = program.subprotocol; - if (program.host) options.host = program.host; - if (!program.check) options.rejectUnauthorized = program.check; - - var headers = into({}, (program.header || []).map(function split(s) { - return splitOnce(':', s); - })); - - if (program.auth) { - headers.Authorization = 'Basic '+ new Buffer(program.auth).toString('base64'); - } - - options.headers = headers; - var ws = new WebSocket(program.connect, options); - - ws.on('open', function open() { - wsConsole.print('connected (press CTRL+C to quit)', Console.Colors.Green); - wsConsole.on('line', function line(data) { - ws.send(data, { mask: true }); - wsConsole.prompt(); - }); - }).on('close', function close() { - wsConsole.print('disconnected', Console.Colors.Green); - wsConsole.clear(); - process.exit(); - }).on('error', function error(code, description) { - wsConsole.print('error: ' + code + (description ? ' ' + description : ''), Console.Colors.Yellow); - process.exit(-1); - }).on('message', function message(data, flags) { - wsConsole.print('< ' + data, Console.Colors.Blue); - }); - - wsConsole.on('close', function close() { - if (!ws) return; - - try { ws.close(); } - catch(e) {} - - process.exit(); - }); -} else { - program.help(); -} diff --git a/s4t-server-node/node_modules/autobahn/node_modules/ws/wscat/package.json b/s4t-server-node/node_modules/autobahn/node_modules/ws/wscat/package.json deleted file mode 100644 index d275562..0000000 --- a/s4t-server-node/node_modules/autobahn/node_modules/ws/wscat/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "wscat", - "version": "1.0.0", - "description": "WebSocket cat", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "https://github.com/einaros/ws/tree/master/wscat" - }, - "keywords": [ - "wscat", - "websocket", - "cat" - ], - "author": "Arnout Kazemier, Einar Otto Stangvik", - "license": "MIT", - "dependencies": { - "commander": "2.5.x", - "tinycolor": "0.0.x", - "ws": "0.4.x" - }, - "bin": { - "wscat": "./bin/wscat" - } -} diff --git a/s4t-server-node/node_modules/autobahn/package.json b/s4t-server-node/node_modules/autobahn/package.json deleted file mode 100644 index 02b87ee..0000000 --- a/s4t-server-node/node_modules/autobahn/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "autobahn", - "version": "0.9.5", - "description": "An implementation of The Web Application Messaging Protocol (WAMP).", - "main": "index.js", - "scripts": { - "test": "nodeunit test/test.js" - }, - "dependencies": { - "when": ">= 2.8.0", - "ws": ">= 0.4.31", - "crypto-js": ">= 3.1.2-2" - }, - "devDependencies": { - "browserify": ">= 3.28.1", - "nodeunit": ">= 0.8.6" - }, - "repository": { - "type": "git", - "url": "git://github.com/tavendo/AutobahnJS.git" - }, - "keywords": [ - "WAMP", - "WebSocket", - "RPC", - "PubSub" - ], - "author": { - "name": "Tavendo GmbH" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/tavendo/AutobahnJS/issues" - }, - "homepage": "https://github.com/tavendo/AutobahnJS", - "_id": "autobahn@0.9.5", - "dist": { - "shasum": "ec95a5d4518219a13398d1d5d4abce2ff683a731", - "tarball": "http://registry.npmjs.org/autobahn/-/autobahn-0.9.5.tgz" - }, - "_from": "autobahn@*", - "_npmVersion": "1.3.21", - "_npmUser": { - "name": "oberstet", - "email": "tobias.oberstein@tavendo.de" - }, - "maintainers": [ - { - "name": "oberstet", - "email": "tobias.oberstein@tavendo.de" - } - ], - "directories": {}, - "_shasum": "ec95a5d4518219a13398d1d5d4abce2ff683a731", - "_resolved": "https://registry.npmjs.org/autobahn/-/autobahn-0.9.5.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/autobahn/test/test.js b/s4t-server-node/node_modules/autobahn/test/test.js deleted file mode 100644 index 64afd2c..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -// this works via https://github.com/caolan/nodeunit - -var rpc_complex = require('./test_rpc_complex.js'); -var rpc_arguments = require('./test_rpc_arguments.js'); -var rpc_error = require('./test_rpc_error.js'); -var rpc_options = require('./test_rpc_options.js'); -var rpc_progress = require('./test_rpc_progress.js'); -var rpc_slowsquare = require('./test_rpc_slowsquare.js'); -var rpc_routing = require('./test_rpc_routing.js'); -var pubsub_basic = require('./test_pubsub_basic.js'); -var pubsub_complex = require('./test_pubsub_complex.js'); -var pubsub_options = require('./test_pubsub_options.js'); - -exports.testRpcArguments = rpc_arguments.testRpcArguments; -exports.testRpcComplex = rpc_complex.testRpcComplex; -exports.testRpcError = rpc_error.testRpcError; -exports.testRpcOptions = rpc_options.testRpcOptions; -exports.testRpcProgress = rpc_progress.testRpcProgress; -exports.testRpcSlowsquare = rpc_slowsquare.testRpcSlowsquare; -exports.testRpcRouting = rpc_routing.testRpcRouting; -exports.testPubsubBasic = pubsub_basic.testPubsubBasic; -exports.testPubsubComplex = pubsub_complex.testPubsubComplex; -exports.testPubsubOptions = pubsub_options.testPubsubOptions; - - -//var connect = require('./test_connect.js'); -//exports.testConnect = connect.testConnect; diff --git a/s4t-server-node/node_modules/autobahn/test/test_connect.js b/s4t-server-node/node_modules/autobahn/test/test_connect.js deleted file mode 100644 index 7979454..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_connect.js +++ /dev/null @@ -1,47 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -var autobahn = require('./../index.js'); - -exports.testConnect = function (testcase) { - - // fully qualified config - var config = { - transports: [ - { - type: 'websocket', - url: 'ws://127.0.0.1:8080/ws', - protocols: ['wamp.2.json'] - } - ], - realm: 'realm1' - } -/* - // shortcut config - var config = { - url: 'ws://127.0.0.1:8080/ws', - realm: 'realm1' - } -*/ - var connection = new autobahn.Connection(config); - - connection.onopen = function (session) { - console.log("connected", session.id); - }; - - connection.onclose = function (reason, details) { - console.log("connection lost", reason, details); - } - - connection.open(); -} diff --git a/s4t-server-node/node_modules/autobahn/test/test_pubsub_basic.js b/s4t-server-node/node_modules/autobahn/test/test_pubsub_basic.js deleted file mode 100644 index 30c9c14..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_pubsub_basic.js +++ /dev/null @@ -1,67 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -var autobahn = require('./../index.js'); -var testutil = require('./testutil.js'); - - -exports.testPubsubBasic = function (testcase) { - - testcase.expect(1); - - var test = new testutil.Testlog("test/test_pubsub_basic.txt"); - - var dl = testutil.connect_n(2); - - autobahn.when.all(dl).then( - function (res) { - test.log("all sessions connected"); - - var session1 = res[0]; - var session2 = res[1]; - - var counter = 0; - - var t1 = setInterval(function () { - test.log("publishing to topic 'com.myapp.topic1': " + counter); - session1.publish('com.myapp.topic1', [counter]); - counter += 1; - }, 1000); - - var received = 0; - - var sub; - function onevent1(args) { - test.log("Got event:", args[0]); - received += 1; - if (received > 5) { - test.log("Closing .."); - - clearInterval(t1); - - session1.leave(); - session2.leave(); - - var chk = test.check() - testcase.ok(!chk, chk); - testcase.done(); - } - } - - sub = session2.subscribe('com.myapp.topic1', onevent1); - }, - function (err) { - test.log(err); - } - ); -} diff --git a/s4t-server-node/node_modules/autobahn/test/test_pubsub_basic.txt b/s4t-server-node/node_modules/autobahn/test/test_pubsub_basic.txt deleted file mode 100644 index df31123..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_pubsub_basic.txt +++ /dev/null @@ -1,14 +0,0 @@ -0 "all sessions connected" -1 "publishing to topic 'com.myapp.topic1': 0" -2 "Got event:" 0 -3 "publishing to topic 'com.myapp.topic1': 1" -4 "Got event:" 1 -5 "publishing to topic 'com.myapp.topic1': 2" -6 "Got event:" 2 -7 "publishing to topic 'com.myapp.topic1': 3" -8 "Got event:" 3 -9 "publishing to topic 'com.myapp.topic1': 4" -10 "Got event:" 4 -11 "publishing to topic 'com.myapp.topic1': 5" -12 "Got event:" 5 -13 "Closing .." diff --git a/s4t-server-node/node_modules/autobahn/test/test_pubsub_complex.js b/s4t-server-node/node_modules/autobahn/test/test_pubsub_complex.js deleted file mode 100644 index 9600fe0..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_pubsub_complex.js +++ /dev/null @@ -1,81 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -var autobahn = require('./../index.js'); -var testutil = require('./testutil.js'); - - -exports.testPubsubComplex = function (testcase) { - - testcase.expect(1); - - var test = new testutil.Testlog("test/test_pubsub_complex.txt"); - - var dl = testutil.connect_n(2); - - autobahn.when.all(dl).then( - function (res) { - test.log("all sessions connected"); - - var session1 = res[0]; - var session2 = res[1]; - - var counter = 0; - - var t1 = setInterval(function () { - var lst = []; - for (var i = 0; i < counter; ++i) { - lst.push(i); - } - var obj = { - 'counter': counter, - 'foo': [1, counter, 2 * counter], - 'bar': 'This is a test text.', - 'baz': { - 'a': 1.23456, 'b': 10000, 'c': null, 'd': 'foo' - } - }; - session1.publish('com.myapp.topic1', lst, obj); - - counter += 1; - - test.log("events published", counter); - }, 1000); - - - var received = 0; - - function on_topic1(args, kwargs) { - test.log("got event:", args, kwargs); - received += 1; - if (received > 5) { - test.log("closing .."); - - clearInterval(t1); - - session1.leave(); - session2.leave(); - - var chk = test.check() - testcase.ok(!chk, chk); - testcase.done(); - } - } - - session2.subscribe('com.myapp.topic1', on_topic1); - }, - function (err) { - test.log(err); - } - ); -} diff --git a/s4t-server-node/node_modules/autobahn/test/test_pubsub_complex.txt b/s4t-server-node/node_modules/autobahn/test/test_pubsub_complex.txt deleted file mode 100644 index 36d37f9..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_pubsub_complex.txt +++ /dev/null @@ -1,14 +0,0 @@ -0 "all sessions connected" -1 "events published" 1 -2 "got event:" [] {"bar":"This is a test text.","baz":{"a":1.23456,"b":10000,"c":null,"d":"foo"},"counter":0,"foo":[1,0,0]} -3 "events published" 2 -4 "got event:" [0] {"bar":"This is a test text.","baz":{"a":1.23456,"b":10000,"c":null,"d":"foo"},"counter":1,"foo":[1,1,2]} -5 "events published" 3 -6 "got event:" [0,1] {"bar":"This is a test text.","baz":{"a":1.23456,"b":10000,"c":null,"d":"foo"},"counter":2,"foo":[1,2,4]} -7 "events published" 4 -8 "got event:" [0,1,2] {"bar":"This is a test text.","baz":{"a":1.23456,"b":10000,"c":null,"d":"foo"},"counter":3,"foo":[1,3,6]} -9 "events published" 5 -10 "got event:" [0,1,2,3] {"bar":"This is a test text.","baz":{"a":1.23456,"b":10000,"c":null,"d":"foo"},"counter":4,"foo":[1,4,8]} -11 "events published" 6 -12 "got event:" [0,1,2,3,4] {"bar":"This is a test text.","baz":{"a":1.23456,"b":10000,"c":null,"d":"foo"},"counter":5,"foo":[1,5,10]} -13 "closing .." diff --git a/s4t-server-node/node_modules/autobahn/test/test_pubsub_options.js b/s4t-server-node/node_modules/autobahn/test/test_pubsub_options.js deleted file mode 100644 index cccd499..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_pubsub_options.js +++ /dev/null @@ -1,74 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -var autobahn = require('./../index.js'); -var testutil = require('./testutil.js'); - - -exports.testPubsubOptions = function (testcase) { - - testcase.expect(1); - - var test = new testutil.Testlog("test/test_pubsub_options.txt"); - - var dl = testutil.connect_n(2); - - autobahn.when.all(dl).then( - function (res) { - test.log("all sessions connected"); - - var session1 = res[0]; - var session2 = res[1]; - - var counter = 0; - - var t1 = setInterval(function () { - var options = {acknowledge: true, disclose_me: true}; - - session1.publish('com.myapp.topic1', [counter], {}, options).then( - function (pub) { - test.log("event published", typeof(pub), typeof(pub.id)); - } - ); - counter += 1; - }, 1000); - - var received = 0; - - var sub; - - function onevent1(args, kwargs, details) { - test.log("got event:", typeof(details), typeof(details.publication), typeof(details.publisher), details.publisher == session1.id, args[0]); - - received += 1; - if (received > 5) { - test.log("Closing .."); - - clearInterval(t1); - - session1.leave(); - session2.leave(); - - var chk = test.check() - testcase.ok(!chk, chk); - testcase.done(); - } - } - - sub = session2.subscribe('com.myapp.topic1', onevent1); - }, - function (err) { - test.log(err); - } - ); -} diff --git a/s4t-server-node/node_modules/autobahn/test/test_pubsub_options.txt b/s4t-server-node/node_modules/autobahn/test/test_pubsub_options.txt deleted file mode 100644 index 45ce5af..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_pubsub_options.txt +++ /dev/null @@ -1,14 +0,0 @@ -0 "all sessions connected" -1 "event published" "object" "number" -2 "got event:" "object" "number" "number" true 0 -3 "event published" "object" "number" -4 "got event:" "object" "number" "number" true 1 -5 "event published" "object" "number" -6 "got event:" "object" "number" "number" true 2 -7 "event published" "object" "number" -8 "got event:" "object" "number" "number" true 3 -9 "event published" "object" "number" -10 "got event:" "object" "number" "number" true 4 -11 "event published" "object" "number" -12 "got event:" "object" "number" "number" true 5 -13 "Closing .." diff --git a/s4t-server-node/node_modules/autobahn/test/test_rpc_arguments.js b/s4t-server-node/node_modules/autobahn/test/test_rpc_arguments.js deleted file mode 100644 index c5d8458..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_rpc_arguments.js +++ /dev/null @@ -1,175 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -var autobahn = require('./../index.js'); -var testutil = require('./testutil.js'); - - -exports.testRpcArguments = function (testcase) { - - testcase.expect(1); - - var test = new testutil.Testlog("test/test_rpc_arguments.txt"); - - var connection = new autobahn.Connection(testutil.config); - - connection.onopen = function (session) { - - test.log('Connected'); - - function ping() { - test.log('ping()') - } - - function add2(args) { - test.log('add2()', args); - return args[0] + args[1]; - } - - function stars(args, kwargs) { - test.log('stars', args, kwargs); - kwargs = kwargs || {}; - kwargs.nick = kwargs.nick || "somebody"; - kwargs.stars = kwargs.stars || 0; - return kwargs.nick + " starred " + kwargs.stars + "x"; - } - - var _orders = []; - for (var i = 0; i < 50; ++i) _orders.push(i); - - function orders(args, kwargs) { - test.log('orders()', args, kwargs); - kwargs = kwargs || {}; - kwargs.limit = kwargs.limit || 5; - return _orders.slice(0, kwargs.limit); - } - - function arglen(args, kwargs) { - test.log('arglen()', args, kwargs); - args = args || []; - kwargs = kwargs || {}; - return [args.length, Object.keys(kwargs).length]; - } - - var endpoints = { - 'com.arguments.ping': ping, - 'com.arguments.add2': add2, - 'com.arguments.stars': stars, - 'com.arguments.orders': orders, - 'com.arguments.arglen': arglen - }; - - var pl1 = []; - - for (var uri in endpoints) { - pl1.push(session.register(uri, endpoints[uri])); - } - - autobahn.when.all(pl1).then( - function () { - test.log("All registered."); - - var pl2 = []; - - pl2.push(session.call('com.arguments.ping').then( - function () { - test.log("Pinged"); - } - )); - - pl2.push(session.call('com.arguments.add2', [2, 3]).then( - function (res) { - test.log("Add2:", res); - } - )); - - pl2.push(session.call('com.arguments.stars').then( - function (res) { - test.log("Starred 1:", res); - } - )); - - pl2.push(session.call('com.arguments.stars', [], {nick: 'Homer'}).then( - function (res) { - test.log("Starred 2:", res); - } - )); - - pl2.push(session.call('com.arguments.stars', [], {stars: 5}).then( - function (res) { - test.log("Starred 3:", res); - } - )); - - pl2.push(session.call('com.arguments.stars', [], {nick: 'Homer', stars: 5}).then( - function (res) { - test.log("Starred 4:", res); - } - )); - - pl2.push(session.call('com.arguments.orders', ['coffee']).then( - function (res) { - test.log("Orders 1:", res); - } - )); - - pl2.push(session.call('com.arguments.orders', ['coffee'], {limit: 10}).then( - function (res) { - test.log("Orders 2:", res); - }, - function (err) { - test.log(err); - } - )); - - pl2.push(session.call('com.arguments.arglen').then( - function (res) { - test.log("Arglen 1", res); - } - )); - - pl2.push(session.call('com.arguments.arglen', [1, 2, 3]).then( - function (res) { - test.log("Arglen 2", res); - } - )); - - pl2.push(session.call('com.arguments.arglen', [], {a: 1, b: 2, c: 3}).then( - function (res) { - test.log("Arglen 3", res); - } - )); - - pl2.push(session.call('com.arguments.arglen', [1, 2, 3], {a: 1, b: 2, c: 3}).then( - function (res) { - test.log("Arglen 4", res); - } - )); - - autobahn.when.all(pl2).then(function () { - test.log("All finished."); - connection.close(); - - var chk = test.check() - testcase.ok(!chk, chk); - testcase.done(); - }); - }, - function () { - test.log("Registration failed!", arguments); - } - ); - }; - - connection.open(); -} diff --git a/s4t-server-node/node_modules/autobahn/test/test_rpc_arguments.txt b/s4t-server-node/node_modules/autobahn/test/test_rpc_arguments.txt deleted file mode 100644 index fbb64b0..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_rpc_arguments.txt +++ /dev/null @@ -1,27 +0,0 @@ -0 "Connected" -1 "All registered." -2 "ping()" -3 "add2()" [2,3] -4 "stars" [] {"nick":"somebody","stars":0} -5 "stars" [] {"nick":"Homer","stars":0} -6 "stars" [] {"nick":"somebody","stars":5} -7 "stars" [] {"nick":"Homer","stars":5} -8 "orders()" ["coffee"] {"limit":5} -9 "orders()" ["coffee"] {"limit":10} -10 "arglen()" [] {} -11 "arglen()" [1,2,3] {} -12 "arglen()" [] {"a":1,"b":2,"c":3} -13 "arglen()" [1,2,3] {"a":1,"b":2,"c":3} -14 "Pinged" -15 "Add2:" 5 -16 "Starred 1:" "somebody starred 0x" -17 "Starred 2:" "Homer starred 0x" -18 "Starred 3:" "somebody starred 5x" -19 "Starred 4:" "Homer starred 5x" -20 "Orders 1:" [0,1,2,3,4] -21 "Orders 2:" [0,1,2,3,4,5,6,7,8,9] -22 "Arglen 1" [0,0] -23 "Arglen 2" [3,0] -24 "Arglen 3" [0,3] -25 "Arglen 4" [3,3] -26 "All finished." diff --git a/s4t-server-node/node_modules/autobahn/test/test_rpc_complex.js b/s4t-server-node/node_modules/autobahn/test/test_rpc_complex.js deleted file mode 100644 index 9a7c852..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_rpc_complex.js +++ /dev/null @@ -1,116 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -var autobahn = require('./../index.js'); -var testutil = require('./testutil.js'); - - -exports.testRpcComplex = function (testcase) { - - testcase.expect(1); - - var test = new testutil.Testlog("test/test_rpc_complex.txt"); - - var connection = new autobahn.Connection(testutil.config); - - connection.onopen = function (session) { - - test.log('Connected'); - - function add_complex(args, kwargs) { - test.log("add_complex()", args, kwargs); - return new autobahn.Result([], {c: args[0] + args[2], ci: args[1] + args[3]}); - } - - function split_name(args) { - test.log("split_name()", args); - return new autobahn.Result(args[0].split(" ")); - } - - function echo_complex(args, kwargs) { - test.log("echo_complex()", args, kwargs); - return new autobahn.Result(args, kwargs); - } - - var endpoints = { - 'com.myapp.add_complex': add_complex, - 'com.myapp.split_name': split_name, - 'com.myapp.echo_complex': echo_complex - }; - - var pl1 = []; - - for (var uri in endpoints) { - pl1.push(session.register(uri, endpoints[uri])); - } - - autobahn.when.all(pl1).then( - function () { - test.log("All registered."); - - // we enforce sequential execution of RPCs to get "stable" test results - - var d = session.call('com.myapp.add_complex', [2, 3, 4, 5]).then( - function (res) { - test.log("Result: " + res.kwargs.c + " + " + res.kwargs.ci + "i"); - } - ); - - d = d.then(function () { - return session.call('com.myapp.split_name', ['Homer Simpson']).then( - function (res) { - test.log("Forename: " + res.args[0] + ", Surname: " + res.args[1]); - } - ); - }); - - var params = [ - [null, null], - [null, {a: 23, b: "hello"}], - [[1, 2, 3], null], - [[], {}], - [[], {a: 23, b: "hello"}], - [[1, 2, 3], {}], - [[1, 2, 3], {a: 23, b: "hello"}], - [[1, 2, 3, {a: 23, b: "hello"}], {a: 23, b: "hello", c: [1, 2, 3]}], - ]; - - for (var i = 0; i < params.length; ++i) { - (function (i, args, kwargs) { - d = d.then(function () { - return session.call('com.myapp.echo_complex', args, kwargs).then( - function (res) { - test.log("Complex echo", res); - } - ); - }); - })(i, params[i][0], params[i][1]); - } - - d.then(function () { - test.log("All finished."); - connection.close(); - - var chk = test.check() - testcase.ok(!chk, chk); - testcase.done(); - }); - }, - function () { - test.log("Registration failed!", arguments); - } - ); - }; - - connection.open(); -} diff --git a/s4t-server-node/node_modules/autobahn/test/test_rpc_complex.txt b/s4t-server-node/node_modules/autobahn/test/test_rpc_complex.txt deleted file mode 100644 index fc9b0e5..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_rpc_complex.txt +++ /dev/null @@ -1,23 +0,0 @@ -0 "Connected" -1 "All registered." -2 "add_complex()" [2,3,4,5] {} -3 "Result: 6 + 8i" -4 "split_name()" ["Homer Simpson"] -5 "Forename: Homer, Surname: Simpson" -6 "echo_complex()" [] {} -7 "Complex echo" null -8 "echo_complex()" [] {} -9 "Complex echo" null -10 "echo_complex()" [1,2,3] {} -11 "Complex echo" {"args":[1,2,3],"kwargs":{}} -12 "echo_complex()" [] {} -13 "Complex echo" null -14 "echo_complex()" [] {"a":23,"b":"hello"} -15 "Complex echo" {"args":[],"kwargs":{"a":23,"b":"hello"}} -16 "echo_complex()" [1,2,3] {} -17 "Complex echo" {"args":[1,2,3],"kwargs":{}} -18 "echo_complex()" [1,2,3] {"a":23,"b":"hello"} -19 "Complex echo" {"args":[1,2,3],"kwargs":{"a":23,"b":"hello"}} -20 "echo_complex()" [1,2,3,{"a":23,"b":"hello"}] {"a":23,"b":"hello","c":[1,2,3]} -21 "Complex echo" {"args":[1,2,3,{"a":23,"b":"hello"}],"kwargs":{"a":23,"b":"hello","c":[1,2,3]}} -22 "All finished." diff --git a/s4t-server-node/node_modules/autobahn/test/test_rpc_error.js b/s4t-server-node/node_modules/autobahn/test/test_rpc_error.js deleted file mode 100644 index 8a22ce0..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_rpc_error.js +++ /dev/null @@ -1,89 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -var autobahn = require('./../index.js'); -var testutil = require('./testutil.js'); - - -exports.testRpcError = function (testcase) { - - testcase.expect(1); - - var test = new testutil.Testlog("test/test_rpc_error.txt"); - - var connection = new autobahn.Connection(testutil.config); - - connection.onopen = function (session) { - - test.log('Connected'); - - function sqrt(args) { - var x = args[0]; - if (x === 0) { - throw "don't ask folly questions;)"; - } - var res = Math.sqrt(x); - if (res !== res) { - //throw "cannot take sqrt of negative"; - throw new autobahn.Error('com.myapp.error', ['fuck'], {a: 23, b: 9}); - } - return res; - } - - var endpoints = { - 'com.myapp.sqrt': sqrt - }; - - var pl1 = []; - - for (var uri in endpoints) { - pl1.push(session.register(uri, endpoints[uri])); - } - - autobahn.when.all(pl1).then( - function () { - test.log("All registered."); - - var pl2 = []; - - var vals1 = [2, 0, -2]; - - for (var i = 0; i < vals1.length; ++i) { - - pl2.push(session.call('com.myapp.sqrt', [vals1[i]]).then( - function (res) { - test.log("Result:", res); - }, - function (err) { - test.log("Error:", err.error, err.args, err.kwargs); - } - )); - } - - autobahn.when.all(pl2).then(function () { - test.log("All finished."); - connection.close(); - - var chk = test.check() - testcase.ok(!chk, chk); - testcase.done(); - }); - }, - function () { - test.log("Registration failed!", arguments); - } - ); - }; - - connection.open(); -} diff --git a/s4t-server-node/node_modules/autobahn/test/test_rpc_error.txt b/s4t-server-node/node_modules/autobahn/test/test_rpc_error.txt deleted file mode 100644 index c70aeb8..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_rpc_error.txt +++ /dev/null @@ -1,6 +0,0 @@ -0 "Connected" -1 "All registered." -2 "Result:" 1.4142135623730951 -3 "Error:" "wamp.error.runtime_error" ["don't ask folly questions;)"] {} -4 "Error:" "com.myapp.error" ["fuck"] {"a":23,"b":9} -5 "All finished." diff --git a/s4t-server-node/node_modules/autobahn/test/test_rpc_options.js b/s4t-server-node/node_modules/autobahn/test/test_rpc_options.js deleted file mode 100644 index d8417a6..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_rpc_options.js +++ /dev/null @@ -1,104 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -var autobahn = require('./../index.js'); -var testutil = require('./testutil.js'); - - -exports.testRpcOptions = function (testcase) { - - testcase.expect(1); - - var test = new testutil.Testlog("test/test_rpc_options.txt"); - - var connection = new autobahn.Connection(testutil.config); - - connection.onopen = function (session) { - - test.log('Connected'); - - function square(args, kwargs, details) { - - if (details && details.caller) { - // with this test case, the caller and callee are identical! - // subtract both to make the result fixed in the OK case only - details.caller -= session.id; - } - - test.log("Someone is calling me;)", details); - - var val = args[0]; - if (val < 0) { - session.publish('com.myapp.square_on_nonpositive', [val]); - } else if (val === 0) { - var options = {}; - if (details && details.caller) { - options = {exclude: [details.caller]}; - } - session.publish('com.myapp.square_on_nonpositive', [val], {}, options); - } - return args[0] * args[0] - } - - var endpoints = { - 'com.myapp.square': square - }; - - var pl1 = []; - - for (var uri in endpoints) { - pl1.push(session.register(uri, endpoints[uri])); - } - - autobahn.when.all(pl1).then( - function () { - test.log("All registered."); - - function on_event(val) { - test.log("Someone requested to square non-positive:", val); - } - - session.subscribe('com.myapp.square_on_nonpositive', on_event); - - var pl2 = []; - - var vals = [2, 0, -2]; - for (var i = 0; i < vals.length; ++i) { - - pl2.push(session.call('com.myapp.square', [vals[i]], {}, {disclose_me: true}).then( - function (res) { - test.log("Squared", res); - }, - function (error) { - test.log("Call failed:", error); - } - )); - } - - autobahn.when.all(pl2).then(function () { - test.log("All finished."); - connection.close(); - - var chk = test.check() - testcase.ok(!chk, chk); - testcase.done(); - }); - }, - function () { - test.log("Registration failed!", arguments); - } - ); - }; - - connection.open(); -} diff --git a/s4t-server-node/node_modules/autobahn/test/test_rpc_options.txt b/s4t-server-node/node_modules/autobahn/test/test_rpc_options.txt deleted file mode 100644 index 60935f3..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_rpc_options.txt +++ /dev/null @@ -1,9 +0,0 @@ -0 "Connected" -1 "All registered." -2 "Someone is calling me;)" {"caller":0,"progress":null} -3 "Someone is calling me;)" {"caller":0,"progress":null} -4 "Someone is calling me;)" {"caller":0,"progress":null} -5 "Squared" 4 -6 "Squared" 0 -7 "Squared" 4 -8 "All finished." diff --git a/s4t-server-node/node_modules/autobahn/test/test_rpc_progress.js b/s4t-server-node/node_modules/autobahn/test/test_rpc_progress.js deleted file mode 100644 index c7fe414..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_rpc_progress.js +++ /dev/null @@ -1,105 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -var autobahn = require('./../index.js'); -var testutil = require('./testutil.js'); - - -exports.testRpcProgress = function (testcase) { - - testcase.expect(1); - - var test = new testutil.Testlog("test/test_rpc_progress.txt"); - - var connection = new autobahn.Connection(testutil.config); - - connection.onopen = function (session) { - - test.log('Connected'); - - function longop(args, kwargs, details) { - - test.log("longop()", args, kwargs); - - var n = args[0]; - var interval_id = null; - - if (details.progress) { - var i = 0; - details.progress([i]); - i += 1; - interval_id = setInterval(function () { - if (i < n) { - test.log("longop() - progress", i); - details.progress([i]); - i += 1; - } else { - clearInterval(interval_id); - } - }, 1000); - } - - var d = autobahn.when.defer(); - - setTimeout(function () { - d.resolve(n); - }, 1000 * n); - - return d.promise; - } - - var endpoints = { - 'com.myapp.longop': longop - }; - - var pl1 = []; - - for (var uri in endpoints) { - pl1.push(session.register(uri, endpoints[uri])); - } - - autobahn.when.all(pl1).then( - function () { - test.log("All registered."); - - var pl2 = []; - - pl2.push(session.call('com.myapp.longop', [3], {}, {receive_progress: true}).then( - function (res) { - test.log("Final:", res); - }, - function (err) { - test.log("Error:", err); - }, - function (progress) { - test.log("Progress:", progress); - } - )); - - autobahn.when.all(pl2).then(function () { - test.log("All finished."); - connection.close(); - - var chk = test.check() - testcase.ok(!chk, chk); - testcase.done(); - }); - }, - function () { - test.log("Registration failed!", arguments); - } - ); - }; - - connection.open(); -} diff --git a/s4t-server-node/node_modules/autobahn/test/test_rpc_progress.txt b/s4t-server-node/node_modules/autobahn/test/test_rpc_progress.txt deleted file mode 100644 index d1da27b..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_rpc_progress.txt +++ /dev/null @@ -1,10 +0,0 @@ -0 "Connected" -1 "All registered." -2 "longop()" [3] {} -3 "Progress:" 0 -4 "longop() - progress" 1 -5 "Progress:" 1 -6 "longop() - progress" 2 -7 "Progress:" 2 -8 "Final:" 3 -9 "All finished." diff --git a/s4t-server-node/node_modules/autobahn/test/test_rpc_routing.js b/s4t-server-node/node_modules/autobahn/test/test_rpc_routing.js deleted file mode 100644 index 84f3ab6..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_rpc_routing.js +++ /dev/null @@ -1,66 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -var autobahn = require('./../index.js'); -var testutil = require('./testutil.js'); - - -exports.testRpcRouting = function (testcase) { - - testcase.expect(3); - - var test = new testutil.Testlog("test/test_rpc_routing.txt"); - - var dl = testutil.connect_n(2); - - autobahn.when.all(dl).then( - function (res) { - test.log("all sessions connected"); - - var session1 = res[0]; - var session2 = res[1]; - - function square(args, kwargs, details) { - var x = args[0]; - test.log("square() called from session 2", x); - testcase.ok(details.caller == session2.id); - return x * x; - } - - session1.register('com.math.square', square).then( - function (res) { - - test.log("square() registered on session 1"); - - session2.call('com.math.square', [23], {}, {disclose_me: true}).then( - function (res) { - test.log("result:", res); - - session1.leave(); - session2.leave(); - - testcase.ok(res == (23*23)); - - var chk = test.check() - testcase.ok(!chk, chk); - - testcase.done(); - }) - } - ); - }, - function (err) { - test.log(err); - } - ); -} diff --git a/s4t-server-node/node_modules/autobahn/test/test_rpc_routing.txt b/s4t-server-node/node_modules/autobahn/test/test_rpc_routing.txt deleted file mode 100644 index 11e6519..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_rpc_routing.txt +++ /dev/null @@ -1,4 +0,0 @@ -0 "all sessions connected" -1 "square() registered on session 1" -2 "square() called from session 2" 23 -3 "result:" 529 diff --git a/s4t-server-node/node_modules/autobahn/test/test_rpc_slowsquare.js b/s4t-server-node/node_modules/autobahn/test/test_rpc_slowsquare.js deleted file mode 100644 index e296b74..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_rpc_slowsquare.js +++ /dev/null @@ -1,107 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -var autobahn = require('./../index.js'); -var testutil = require('./testutil.js'); - - -exports.testRpcSlowsquare = function (testcase) { - - testcase.expect(1); - - var test = new testutil.Testlog("test/test_rpc_slowsquare.txt"); - - var connection = new autobahn.Connection(testutil.config); - - connection.onopen = function (session) { - - test.log('Connected'); - - // a "fast" function or a function that returns - // a direct value (not a promise) - function square(x) { - return x * x; - } - - // simulates a "slow" function or a function that - // returns a promise - function slowsquare(x) { - - // create a deferred - var d = autobahn.when.defer(); - - // resolve the promise after 1s - setTimeout(function () { - d.resolve(x * x); - }, 1000); - - // need to return the promise - return d.promise; - } - - var endpoints = { - 'com.math.square': square, - 'com.math.slowsquare': slowsquare - }; - - var pl1 = []; - - for (var uri in endpoints) { - pl1.push(session.register(uri, endpoints[uri])); - } - - autobahn.when.all(pl1).then( - function () { - test.log("All registered."); - - var pl2 = []; - - var t1 = process.hrtime(); - pl2.push(session.call('com.math.slowsquare', [3]).then( - function (res) { - var duration = process.hrtime(t1); - test.log("Slow Square:", res); - }, - function (err) { - test.log("Error", err); - } - )); - - var t2 = process.hrtime(); - pl2.push(session.call('com.math.square', [3]).then( - function (res) { - var duration = process.hrtime(t2); - test.log("Quick Square:", res); - }, - function (err) { - test.log("Error", err); - } - )); - - autobahn.when.all(pl2).then(function () { - test.log("All finished."); - connection.close(); - - var chk = test.check() - testcase.ok(!chk, chk); - testcase.done(); - }); - }, - function () { - test.log("Registration failed!", arguments); - } - ); - }; - - connection.open(); -} diff --git a/s4t-server-node/node_modules/autobahn/test/test_rpc_slowsquare.txt b/s4t-server-node/node_modules/autobahn/test/test_rpc_slowsquare.txt deleted file mode 100644 index 5423990..0000000 --- a/s4t-server-node/node_modules/autobahn/test/test_rpc_slowsquare.txt +++ /dev/null @@ -1,5 +0,0 @@ -0 "Connected" -1 "All registered." -2 "Quick Square:" 9 -3 "Slow Square:" 9 -4 "All finished." diff --git a/s4t-server-node/node_modules/autobahn/test/testutil.js b/s4t-server-node/node_modules/autobahn/test/testutil.js deleted file mode 100644 index d3df2cb..0000000 --- a/s4t-server-node/node_modules/autobahn/test/testutil.js +++ /dev/null @@ -1,144 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// AutobahnJS - http://autobahn.ws, http://wamp.ws -// -// A JavaScript library for WAMP ("The Web Application Messaging Protocol"). -// -// Copyright (C) 2011-2014 Tavendo GmbH, http://tavendo.com -// -// Licensed under the MIT License. -// http://www.opensource.org/licenses/mit-license.php -// -/////////////////////////////////////////////////////////////////////////////// - -var autobahn = require('./../index.js'); -var fs = require("fs"); - -/* -// fully qualified config -var config = { - transports: [ - { - type: 'websocket', - url: 'ws://127.0.0.1:8080/ws', - protocols: ['wamp.2.json'] - } - ], - realm: 'realm1' -} -*/ - -// shortcut config -var config = { - url: 'ws://127.0.0.1:8080/ws', - realm: 'realm1' -} - -function connect_n(n) { - var dl = []; - for (var i = 0; i < n; ++i) { - (function (idx) { - var d = autobahn.when.defer(); - var connection = new autobahn.Connection(config); - - connection.onopen = function (session) { - d.resolve(session); - }; - - connection.open(); - - dl.push(d.promise); - })(i); - } - return dl; -} - - -var Testlog = function (filename) { - - var self = this; - - self._filename = filename; - self._log = []; -}; - - -Testlog.prototype.log = function () { - - var self = this; - - //console.log.apply(this, arguments); - self._log.push(arguments); -}; - - -Testlog.prototype.stringify = function () { - - var self = this; - - var s = ''; - for (var i = 0; i < self._log.length; ++i) { - s += i; - args = self._log[i]; - for (arg in args) { - - // stringify with dict attributes ordered - s += ' ' + self.stringifyWithOrderedKeys(args[arg]); - //s += ' ' + JSON.stringify(args[arg]); - } - s += "\n"; - } - return s; -}; - -Testlog.prototype.stringifyWithOrderedKeys = function (arg) { - var self = this; - if(arg != null && typeof(arg) == "object") { - var clazz = Object.prototype.toString.call(arg).toLowerCase(); - if(clazz.indexOf("array") != -1) { - var retval = "["; - for (var i = 0; i < arg.length; i++) { - if(i > 0) retval += ','; - retval += self.stringifyWithOrderedKeys(arg[i]); - } - retval += "]"; - return retval; - } else { - var retval = "{"; - var keys = Object.keys(arg).sort(); - for (var i = 0; i < keys.length; i++) { - if(i > 0) retval += ','; - retval += '"'+keys[i]+'":' + self.stringifyWithOrderedKeys(arg[keys[i]]); - } - retval += "}"; - return retval; - } - } else { - return JSON.stringify(arg); - } -}; - - -Testlog.prototype.check = function () { - - var self = this; - var slog = self.stringify(); - - if (fs.existsSync(self._filename)) { - var slog_baseline = fs.readFileSync(self._filename); - if (slog != slog_baseline) { - return "\nExpected:\n\n" + slog_baseline + "\n\n\nGot:\n\n" + slog + "\n\n"; - } else { - return null; - } - } else { - fs.writeFileSync(self._filename, slog); - console.log("Know-good log file created", self._filename, slog.length); - return null; - } -}; - - -exports.Testlog = Testlog; -exports.config = config; -exports.connect_n = connect_n; diff --git a/s4t-server-node/node_modules/express/History.md b/s4t-server-node/node_modules/express/History.md deleted file mode 100644 index aca4495..0000000 --- a/s4t-server-node/node_modules/express/History.md +++ /dev/null @@ -1,2620 +0,0 @@ -4.11.1 / 2015-01-20 -=================== - - * deps: send@0.11.1 - - Fix root path disclosure - * deps: serve-static@~1.8.1 - - Fix redirect loop in Node.js 0.11.14 - - Fix root path disclosure - - deps: send@0.11.1 - -4.11.0 / 2015-01-13 -=================== - - * Add `res.append(field, val)` to append headers - * Deprecate leading `:` in `name` for `app.param(name, fn)` - * Deprecate `req.param()` -- use `req.params`, `req.body`, or `req.query` instead - * Deprecate `app.param(fn)` - * Fix `OPTIONS` responses to include the `HEAD` method properly - * Fix `res.sendFile` not always detecting aborted connection - * Match routes iteratively to prevent stack overflows - * deps: accepts@~1.2.2 - - deps: mime-types@~2.0.7 - - deps: negotiator@0.5.0 - * deps: send@0.11.0 - - deps: debug@~2.1.1 - - deps: etag@~1.5.1 - - deps: ms@0.7.0 - - deps: on-finished@~2.2.0 - * deps: serve-static@~1.8.0 - - deps: send@0.11.0 - -4.10.8 / 2015-01-13 -=================== - - * Fix crash from error within `OPTIONS` response handler - * deps: proxy-addr@~1.0.5 - - deps: ipaddr.js@0.1.6 - -4.10.7 / 2015-01-04 -=================== - - * Fix `Allow` header for `OPTIONS` to not contain duplicate methods - * Fix incorrect "Request aborted" for `res.sendFile` when `HEAD` or 304 - * deps: debug@~2.1.1 - * deps: finalhandler@0.3.3 - - deps: debug@~2.1.1 - - deps: on-finished@~2.2.0 - * deps: methods@~1.1.1 - * deps: on-finished@~2.2.0 - * deps: serve-static@~1.7.2 - - Fix potential open redirect when mounted at root - * deps: type-is@~1.5.5 - - deps: mime-types@~2.0.7 - -4.10.6 / 2014-12-12 -=================== - - * Fix exception in `req.fresh`/`req.stale` without response headers - -4.10.5 / 2014-12-10 -=================== - - * Fix `res.send` double-calling `res.end` for `HEAD` requests - * deps: accepts@~1.1.4 - - deps: mime-types@~2.0.4 - * deps: type-is@~1.5.4 - - deps: mime-types@~2.0.4 - -4.10.4 / 2014-11-24 -=================== - - * Fix `res.sendfile` logging standard write errors - -4.10.3 / 2014-11-23 -=================== - - * Fix `res.sendFile` logging standard write errors - * deps: etag@~1.5.1 - * deps: proxy-addr@~1.0.4 - - deps: ipaddr.js@0.1.5 - * deps: qs@2.3.3 - - Fix `arrayLimit` behavior - -4.10.2 / 2014-11-09 -=================== - - * Correctly invoke async router callback asynchronously - * deps: accepts@~1.1.3 - - deps: mime-types@~2.0.3 - * deps: type-is@~1.5.3 - - deps: mime-types@~2.0.3 - -4.10.1 / 2014-10-28 -=================== - - * Fix handling of URLs containing `://` in the path - * deps: qs@2.3.2 - - Fix parsing of mixed objects and values - -4.10.0 / 2014-10-23 -=================== - - * Add support for `app.set('views', array)` - - Views are looked up in sequence in array of directories - * Fix `res.send(status)` to mention `res.sendStatus(status)` - * Fix handling of invalid empty URLs - * Use `content-disposition` module for `res.attachment`/`res.download` - - Sends standards-compliant `Content-Disposition` header - - Full Unicode support - * Use `path.resolve` in view lookup - * deps: debug@~2.1.0 - - Implement `DEBUG_FD` env variable support - * deps: depd@~1.0.0 - * deps: etag@~1.5.0 - - Improve string performance - - Slightly improve speed for weak ETags over 1KB - * deps: finalhandler@0.3.2 - - Terminate in progress response only on error - - Use `on-finished` to determine request status - - deps: debug@~2.1.0 - - deps: on-finished@~2.1.1 - * deps: on-finished@~2.1.1 - - Fix handling of pipelined requests - * deps: qs@2.3.0 - - Fix parsing of mixed implicit and explicit arrays - * deps: send@0.10.1 - - deps: debug@~2.1.0 - - deps: depd@~1.0.0 - - deps: etag@~1.5.0 - - deps: on-finished@~2.1.1 - * deps: serve-static@~1.7.1 - - deps: send@0.10.1 - -4.9.8 / 2014-10-17 -================== - - * Fix `res.redirect` body when redirect status specified - * deps: accepts@~1.1.2 - - Fix error when media type has invalid parameter - - deps: negotiator@0.4.9 - -4.9.7 / 2014-10-10 -================== - - * Fix using same param name in array of paths - -4.9.6 / 2014-10-08 -================== - - * deps: accepts@~1.1.1 - - deps: mime-types@~2.0.2 - - deps: negotiator@0.4.8 - * deps: serve-static@~1.6.4 - - Fix redirect loop when index file serving disabled - * deps: type-is@~1.5.2 - - deps: mime-types@~2.0.2 - -4.9.5 / 2014-09-24 -================== - - * deps: etag@~1.4.0 - * deps: proxy-addr@~1.0.3 - - Use `forwarded` npm module - * deps: send@0.9.3 - - deps: etag@~1.4.0 - * deps: serve-static@~1.6.3 - - deps: send@0.9.3 - -4.9.4 / 2014-09-19 -================== - - * deps: qs@2.2.4 - - Fix issue with object keys starting with numbers truncated - -4.9.3 / 2014-09-18 -================== - - * deps: proxy-addr@~1.0.2 - - Fix a global leak when multiple subnets are trusted - - deps: ipaddr.js@0.1.3 - -4.9.2 / 2014-09-17 -================== - - * Fix regression for empty string `path` in `app.use` - * Fix `router.use` to accept array of middleware without path - * Improve error message for bad `app.use` arguments - -4.9.1 / 2014-09-16 -================== - - * Fix `app.use` to accept array of middleware without path - * deps: depd@0.4.5 - * deps: etag@~1.3.1 - * deps: send@0.9.2 - - deps: depd@0.4.5 - - deps: etag@~1.3.1 - - deps: range-parser@~1.0.2 - * deps: serve-static@~1.6.2 - - deps: send@0.9.2 - -4.9.0 / 2014-09-08 -================== - - * Add `res.sendStatus` - * Invoke callback for sendfile when client aborts - - Applies to `res.sendFile`, `res.sendfile`, and `res.download` - - `err` will be populated with request aborted error - * Support IP address host in `req.subdomains` - * Use `etag` to generate `ETag` headers - * deps: accepts@~1.1.0 - - update `mime-types` - * deps: cookie-signature@1.0.5 - * deps: debug@~2.0.0 - * deps: finalhandler@0.2.0 - - Set `X-Content-Type-Options: nosniff` header - - deps: debug@~2.0.0 - * deps: fresh@0.2.4 - * deps: media-typer@0.3.0 - - Throw error when parameter format invalid on parse - * deps: qs@2.2.3 - - Fix issue where first empty value in array is discarded - * deps: range-parser@~1.0.2 - * deps: send@0.9.1 - - Add `lastModified` option - - Use `etag` to generate `ETag` header - - deps: debug@~2.0.0 - - deps: fresh@0.2.4 - * deps: serve-static@~1.6.1 - - Add `lastModified` option - - deps: send@0.9.1 - * deps: type-is@~1.5.1 - - fix `hasbody` to be true for `content-length: 0` - - deps: media-typer@0.3.0 - - deps: mime-types@~2.0.1 - * deps: vary@~1.0.0 - - Accept valid `Vary` header string as `field` - -4.8.8 / 2014-09-04 -================== - - * deps: send@0.8.5 - - Fix a path traversal issue when using `root` - - Fix malicious path detection for empty string path - * deps: serve-static@~1.5.4 - - deps: send@0.8.5 - -4.8.7 / 2014-08-29 -================== - - * deps: qs@2.2.2 - - Remove unnecessary cloning - -4.8.6 / 2014-08-27 -================== - - * deps: qs@2.2.0 - - Array parsing fix - - Performance improvements - -4.8.5 / 2014-08-18 -================== - - * deps: send@0.8.3 - - deps: destroy@1.0.3 - - deps: on-finished@2.1.0 - * deps: serve-static@~1.5.3 - - deps: send@0.8.3 - -4.8.4 / 2014-08-14 -================== - - * deps: qs@1.2.2 - * deps: send@0.8.2 - - Work around `fd` leak in Node.js 0.10 for `fs.ReadStream` - * deps: serve-static@~1.5.2 - - deps: send@0.8.2 - -4.8.3 / 2014-08-10 -================== - - * deps: parseurl@~1.3.0 - * deps: qs@1.2.1 - * deps: serve-static@~1.5.1 - - Fix parsing of weird `req.originalUrl` values - - deps: parseurl@~1.3.0 - - deps: utils-merge@1.0.0 - -4.8.2 / 2014-08-07 -================== - - * deps: qs@1.2.0 - - Fix parsing array of objects - -4.8.1 / 2014-08-06 -================== - - * fix incorrect deprecation warnings on `res.download` - * deps: qs@1.1.0 - - Accept urlencoded square brackets - - Accept empty values in implicit array notation - -4.8.0 / 2014-08-05 -================== - - * add `res.sendFile` - - accepts a file system path instead of a URL - - requires an absolute path or `root` option specified - * deprecate `res.sendfile` -- use `res.sendFile` instead - * support mounted app as any argument to `app.use()` - * deps: qs@1.0.2 - - Complete rewrite - - Limits array length to 20 - - Limits object depth to 5 - - Limits parameters to 1,000 - * deps: send@0.8.1 - - Add `extensions` option - * deps: serve-static@~1.5.0 - - Add `extensions` option - - deps: send@0.8.1 - -4.7.4 / 2014-08-04 -================== - - * fix `res.sendfile` regression for serving directory index files - * deps: send@0.7.4 - - Fix incorrect 403 on Windows and Node.js 0.11 - - Fix serving index files without root dir - * deps: serve-static@~1.4.4 - - deps: send@0.7.4 - -4.7.3 / 2014-08-04 -================== - - * deps: send@0.7.3 - - Fix incorrect 403 on Windows and Node.js 0.11 - * deps: serve-static@~1.4.3 - - Fix incorrect 403 on Windows and Node.js 0.11 - - deps: send@0.7.3 - -4.7.2 / 2014-07-27 -================== - - * deps: depd@0.4.4 - - Work-around v8 generating empty stack traces - * deps: send@0.7.2 - - deps: depd@0.4.4 - * deps: serve-static@~1.4.2 - -4.7.1 / 2014-07-26 -================== - - * deps: depd@0.4.3 - - Fix exception when global `Error.stackTraceLimit` is too low - * deps: send@0.7.1 - - deps: depd@0.4.3 - * deps: serve-static@~1.4.1 - -4.7.0 / 2014-07-25 -================== - - * fix `req.protocol` for proxy-direct connections - * configurable query parser with `app.set('query parser', parser)` - - `app.set('query parser', 'extended')` parse with "qs" module - - `app.set('query parser', 'simple')` parse with "querystring" core module - - `app.set('query parser', false)` disable query string parsing - - `app.set('query parser', true)` enable simple parsing - * deprecate `res.json(status, obj)` -- use `res.status(status).json(obj)` instead - * deprecate `res.jsonp(status, obj)` -- use `res.status(status).jsonp(obj)` instead - * deprecate `res.send(status, body)` -- use `res.status(status).send(body)` instead - * deps: debug@1.0.4 - * deps: depd@0.4.2 - - Add `TRACE_DEPRECATION` environment variable - - Remove non-standard grey color from color output - - Support `--no-deprecation` argument - - Support `--trace-deprecation` argument - * deps: finalhandler@0.1.0 - - Respond after request fully read - - deps: debug@1.0.4 - * deps: parseurl@~1.2.0 - - Cache URLs based on original value - - Remove no-longer-needed URL mis-parse work-around - - Simplify the "fast-path" `RegExp` - * deps: send@0.7.0 - - Add `dotfiles` option - - Cap `maxAge` value to 1 year - - deps: debug@1.0.4 - - deps: depd@0.4.2 - * deps: serve-static@~1.4.0 - - deps: parseurl@~1.2.0 - - deps: send@0.7.0 - * perf: prevent multiple `Buffer` creation in `res.send` - -4.6.1 / 2014-07-12 -================== - - * fix `subapp.mountpath` regression for `app.use(subapp)` - -4.6.0 / 2014-07-11 -================== - - * accept multiple callbacks to `app.use()` - * add explicit "Rosetta Flash JSONP abuse" protection - - previous versions are not vulnerable; this is just explicit protection - * catch errors in multiple `req.param(name, fn)` handlers - * deprecate `res.redirect(url, status)` -- use `res.redirect(status, url)` instead - * fix `res.send(status, num)` to send `num` as json (not error) - * remove unnecessary escaping when `res.jsonp` returns JSON response - * support non-string `path` in `app.use(path, fn)` - - supports array of paths - - supports `RegExp` - * router: fix optimization on router exit - * router: refactor location of `try` blocks - * router: speed up standard `app.use(fn)` - * deps: debug@1.0.3 - - Add support for multiple wildcards in namespaces - * deps: finalhandler@0.0.3 - - deps: debug@1.0.3 - * deps: methods@1.1.0 - - add `CONNECT` - * deps: parseurl@~1.1.3 - - faster parsing of href-only URLs - * deps: path-to-regexp@0.1.3 - * deps: send@0.6.0 - - deps: debug@1.0.3 - * deps: serve-static@~1.3.2 - - deps: parseurl@~1.1.3 - - deps: send@0.6.0 - * perf: fix arguments reassign deopt in some `res` methods - -4.5.1 / 2014-07-06 -================== - - * fix routing regression when altering `req.method` - -4.5.0 / 2014-07-04 -================== - - * add deprecation message to non-plural `req.accepts*` - * add deprecation message to `res.send(body, status)` - * add deprecation message to `res.vary()` - * add `headers` option to `res.sendfile` - - use to set headers on successful file transfer - * add `mergeParams` option to `Router` - - merges `req.params` from parent routes - * add `req.hostname` -- correct name for what `req.host` returns - * deprecate things with `depd` module - * deprecate `req.host` -- use `req.hostname` instead - * fix behavior when handling request without routes - * fix handling when `route.all` is only route - * invoke `router.param()` only when route matches - * restore `req.params` after invoking router - * use `finalhandler` for final response handling - * use `media-typer` to alter content-type charset - * deps: accepts@~1.0.7 - * deps: send@0.5.0 - - Accept string for `maxage` (converted by `ms`) - - Include link in default redirect response - * deps: serve-static@~1.3.0 - - Accept string for `maxAge` (converted by `ms`) - - Add `setHeaders` option - - Include HTML link in redirect response - - deps: send@0.5.0 - * deps: type-is@~1.3.2 - -4.4.5 / 2014-06-26 -================== - - * deps: cookie-signature@1.0.4 - - fix for timing attacks - -4.4.4 / 2014-06-20 -================== - - * fix `res.attachment` Unicode filenames in Safari - * fix "trim prefix" debug message in `express:router` - * deps: accepts@~1.0.5 - * deps: buffer-crc32@0.2.3 - -4.4.3 / 2014-06-11 -================== - - * fix persistence of modified `req.params[name]` from `app.param()` - * deps: accepts@1.0.3 - - deps: negotiator@0.4.6 - * deps: debug@1.0.2 - * deps: send@0.4.3 - - Do not throw un-catchable error on file open race condition - - Use `escape-html` for HTML escaping - - deps: debug@1.0.2 - - deps: finished@1.2.2 - - deps: fresh@0.2.2 - * deps: serve-static@1.2.3 - - Do not throw un-catchable error on file open race condition - - deps: send@0.4.3 - -4.4.2 / 2014-06-09 -================== - - * fix catching errors from top-level handlers - * use `vary` module for `res.vary` - * deps: debug@1.0.1 - * deps: proxy-addr@1.0.1 - * deps: send@0.4.2 - - fix "event emitter leak" warnings - - deps: debug@1.0.1 - - deps: finished@1.2.1 - * deps: serve-static@1.2.2 - - fix "event emitter leak" warnings - - deps: send@0.4.2 - * deps: type-is@1.2.1 - -4.4.1 / 2014-06-02 -================== - - * deps: methods@1.0.1 - * deps: send@0.4.1 - - Send `max-age` in `Cache-Control` in correct format - * deps: serve-static@1.2.1 - - use `escape-html` for escaping - - deps: send@0.4.1 - -4.4.0 / 2014-05-30 -================== - - * custom etag control with `app.set('etag', val)` - - `app.set('etag', function(body, encoding){ return '"etag"' })` custom etag generation - - `app.set('etag', 'weak')` weak tag - - `app.set('etag', 'strong')` strong etag - - `app.set('etag', false)` turn off - - `app.set('etag', true)` standard etag - * mark `res.send` ETag as weak and reduce collisions - * update accepts to 1.0.2 - - Fix interpretation when header not in request - * update send to 0.4.0 - - Calculate ETag with md5 for reduced collisions - - Ignore stream errors after request ends - - deps: debug@0.8.1 - * update serve-static to 1.2.0 - - Calculate ETag with md5 for reduced collisions - - Ignore stream errors after request ends - - deps: send@0.4.0 - -4.3.2 / 2014-05-28 -================== - - * fix handling of errors from `router.param()` callbacks - -4.3.1 / 2014-05-23 -================== - - * revert "fix behavior of multiple `app.VERB` for the same path" - - this caused a regression in the order of route execution - -4.3.0 / 2014-05-21 -================== - - * add `req.baseUrl` to access the path stripped from `req.url` in routes - * fix behavior of multiple `app.VERB` for the same path - * fix issue routing requests among sub routers - * invoke `router.param()` only when necessary instead of every match - * proper proxy trust with `app.set('trust proxy', trust)` - - `app.set('trust proxy', 1)` trust first hop - - `app.set('trust proxy', 'loopback')` trust loopback addresses - - `app.set('trust proxy', '10.0.0.1')` trust single IP - - `app.set('trust proxy', '10.0.0.1/16')` trust subnet - - `app.set('trust proxy', '10.0.0.1, 10.0.0.2')` trust list - - `app.set('trust proxy', false)` turn off - - `app.set('trust proxy', true)` trust everything - * set proper `charset` in `Content-Type` for `res.send` - * update type-is to 1.2.0 - - support suffix matching - -4.2.0 / 2014-05-11 -================== - - * deprecate `app.del()` -- use `app.delete()` instead - * deprecate `res.json(obj, status)` -- use `res.json(status, obj)` instead - - the edge-case `res.json(status, num)` requires `res.status(status).json(num)` - * deprecate `res.jsonp(obj, status)` -- use `res.jsonp(status, obj)` instead - - the edge-case `res.jsonp(status, num)` requires `res.status(status).jsonp(num)` - * fix `req.next` when inside router instance - * include `ETag` header in `HEAD` requests - * keep previous `Content-Type` for `res.jsonp` - * support PURGE method - - add `app.purge` - - add `router.purge` - - include PURGE in `app.all` - * update debug to 0.8.0 - - add `enable()` method - - change from stderr to stdout - * update methods to 1.0.0 - - add PURGE - -4.1.2 / 2014-05-08 -================== - - * fix `req.host` for IPv6 literals - * fix `res.jsonp` error if callback param is object - -4.1.1 / 2014-04-27 -================== - - * fix package.json to reflect supported node version - -4.1.0 / 2014-04-24 -================== - - * pass options from `res.sendfile` to `send` - * preserve casing of headers in `res.header` and `res.set` - * support unicode file names in `res.attachment` and `res.download` - * update accepts to 1.0.1 - - deps: negotiator@0.4.0 - * update cookie to 0.1.2 - - Fix for maxAge == 0 - - made compat with expires field - * update send to 0.3.0 - - Accept API options in options object - - Coerce option types - - Control whether to generate etags - - Default directory access to 403 when index disabled - - Fix sending files with dots without root set - - Include file path in etag - - Make "Can't set headers after they are sent." catchable - - Send full entity-body for multi range requests - - Set etags to "weak" - - Support "If-Range" header - - Support multiple index paths - - deps: mime@1.2.11 - * update serve-static to 1.1.0 - - Accept options directly to `send` module - - Resolve relative paths at middleware setup - - Use parseurl to parse the URL from request - - deps: send@0.3.0 - * update type-is to 1.1.0 - - add non-array values support - - add `multipart` as a shorthand - -4.0.0 / 2014-04-09 -================== - - * remove: - - node 0.8 support - - connect and connect's patches except for charset handling - - express(1) - moved to [express-generator](https://github.com/expressjs/generator) - - `express.createServer()` - it has been deprecated for a long time. Use `express()` - - `app.configure` - use logic in your own app code - - `app.router` - is removed - - `req.auth` - use `basic-auth` instead - - `req.accepted*` - use `req.accepts*()` instead - - `res.location` - relative URL resolution is removed - - `res.charset` - include the charset in the content type when using `res.set()` - - all bundled middleware except `static` - * change: - - `app.route` -> `app.mountpath` when mounting an express app in another express app - - `json spaces` no longer enabled by default in development - - `req.accepts*` -> `req.accepts*s` - i.e. `req.acceptsEncoding` -> `req.acceptsEncodings` - - `req.params` is now an object instead of an array - - `res.locals` is no longer a function. It is a plain js object. Treat it as such. - - `res.headerSent` -> `res.headersSent` to match node.js ServerResponse object - * refactor: - - `req.accepts*` with [accepts](https://github.com/expressjs/accepts) - - `req.is` with [type-is](https://github.com/expressjs/type-is) - - [path-to-regexp](https://github.com/component/path-to-regexp) - * add: - - `app.router()` - returns the app Router instance - - `app.route()` - Proxy to the app's `Router#route()` method to create a new route - - Router & Route - public API - -3.19.1 / 2015-01-20 -=================== - - * deps: connect@2.28.2 - - deps: body-parser@~1.10.2 - - deps: serve-static@~1.8.1 - * deps: send@0.11.1 - - Fix root path disclosure - -3.19.0 / 2015-01-09 -=================== - - * Fix `OPTIONS` responses to include the `HEAD` method property - * Use `readline` for prompt in `express(1)` - * deps: commander@2.6.0 - * deps: connect@2.28.1 - - deps: body-parser@~1.10.1 - - deps: compression@~1.3.0 - - deps: connect-timeout@~1.5.0 - - deps: csurf@~1.6.4 - - deps: debug@~2.1.1 - - deps: errorhandler@~1.3.2 - - deps: express-session@~1.10.1 - - deps: finalhandler@0.3.3 - - deps: method-override@~2.3.1 - - deps: morgan@~1.5.1 - - deps: serve-favicon@~2.2.0 - - deps: serve-index@~1.6.0 - - deps: serve-static@~1.8.0 - - deps: type-is@~1.5.5 - * deps: debug@~2.1.1 - * deps: methods@~1.1.1 - * deps: proxy-addr@~1.0.5 - - deps: ipaddr.js@0.1.6 - * deps: send@0.11.0 - - deps: debug@~2.1.1 - - deps: etag@~1.5.1 - - deps: ms@0.7.0 - - deps: on-finished@~2.2.0 - -3.18.6 / 2014-12-12 -=================== - - * Fix exception in `req.fresh`/`req.stale` without response headers - -3.18.5 / 2014-12-11 -=================== - - * deps: connect@2.27.6 - - deps: compression@~1.2.2 - - deps: express-session@~1.9.3 - - deps: http-errors@~1.2.8 - - deps: serve-index@~1.5.3 - - deps: type-is@~1.5.4 - -3.18.4 / 2014-11-23 -=================== - - * deps: connect@2.27.4 - - deps: body-parser@~1.9.3 - - deps: compression@~1.2.1 - - deps: errorhandler@~1.2.3 - - deps: express-session@~1.9.2 - - deps: qs@2.3.3 - - deps: serve-favicon@~2.1.7 - - deps: serve-static@~1.5.1 - - deps: type-is@~1.5.3 - * deps: etag@~1.5.1 - * deps: proxy-addr@~1.0.4 - - deps: ipaddr.js@0.1.5 - -3.18.3 / 2014-11-09 -=================== - - * deps: connect@2.27.3 - - Correctly invoke async callback asynchronously - - deps: csurf@~1.6.3 - -3.18.2 / 2014-10-28 -=================== - - * deps: connect@2.27.2 - - Fix handling of URLs containing `://` in the path - - deps: body-parser@~1.9.2 - - deps: qs@2.3.2 - -3.18.1 / 2014-10-22 -=================== - - * Fix internal `utils.merge` deprecation warnings - * deps: connect@2.27.1 - - deps: body-parser@~1.9.1 - - deps: express-session@~1.9.1 - - deps: finalhandler@0.3.2 - - deps: morgan@~1.4.1 - - deps: qs@2.3.0 - - deps: serve-static@~1.7.1 - * deps: send@0.10.1 - - deps: on-finished@~2.1.1 - -3.18.0 / 2014-10-17 -=================== - - * Use `content-disposition` module for `res.attachment`/`res.download` - - Sends standards-compliant `Content-Disposition` header - - Full Unicode support - * Use `etag` module to generate `ETag` headers - * deps: connect@2.27.0 - - Use `http-errors` module for creating errors - - Use `utils-merge` module for merging objects - - deps: body-parser@~1.9.0 - - deps: compression@~1.2.0 - - deps: connect-timeout@~1.4.0 - - deps: debug@~2.1.0 - - deps: depd@~1.0.0 - - deps: express-session@~1.9.0 - - deps: finalhandler@0.3.1 - - deps: method-override@~2.3.0 - - deps: morgan@~1.4.0 - - deps: response-time@~2.2.0 - - deps: serve-favicon@~2.1.6 - - deps: serve-index@~1.5.0 - - deps: serve-static@~1.7.0 - * deps: debug@~2.1.0 - - Implement `DEBUG_FD` env variable support - * deps: depd@~1.0.0 - * deps: send@0.10.0 - - deps: debug@~2.1.0 - - deps: depd@~1.0.0 - - deps: etag@~1.5.0 - -3.17.8 / 2014-10-15 -=================== - - * deps: connect@2.26.6 - - deps: compression@~1.1.2 - - deps: csurf@~1.6.2 - - deps: errorhandler@~1.2.2 - -3.17.7 / 2014-10-08 -=================== - - * deps: connect@2.26.5 - - Fix accepting non-object arguments to `logger` - - deps: serve-static@~1.6.4 - -3.17.6 / 2014-10-02 -=================== - - * deps: connect@2.26.4 - - deps: morgan@~1.3.2 - - deps: type-is@~1.5.2 - -3.17.5 / 2014-09-24 -=================== - - * deps: connect@2.26.3 - - deps: body-parser@~1.8.4 - - deps: serve-favicon@~2.1.5 - - deps: serve-static@~1.6.3 - * deps: proxy-addr@~1.0.3 - - Use `forwarded` npm module - * deps: send@0.9.3 - - deps: etag@~1.4.0 - -3.17.4 / 2014-09-19 -=================== - - * deps: connect@2.26.2 - - deps: body-parser@~1.8.3 - - deps: qs@2.2.4 - -3.17.3 / 2014-09-18 -=================== - - * deps: proxy-addr@~1.0.2 - - Fix a global leak when multiple subnets are trusted - - deps: ipaddr.js@0.1.3 - -3.17.2 / 2014-09-15 -=================== - - * Use `crc` instead of `buffer-crc32` for speed - * deps: connect@2.26.1 - - deps: body-parser@~1.8.2 - - deps: depd@0.4.5 - - deps: express-session@~1.8.2 - - deps: morgan@~1.3.1 - - deps: serve-favicon@~2.1.3 - - deps: serve-static@~1.6.2 - * deps: depd@0.4.5 - * deps: send@0.9.2 - - deps: depd@0.4.5 - - deps: etag@~1.3.1 - - deps: range-parser@~1.0.2 - -3.17.1 / 2014-09-08 -=================== - - * Fix error in `req.subdomains` on empty host - -3.17.0 / 2014-09-08 -=================== - - * Support `X-Forwarded-Host` in `req.subdomains` - * Support IP address host in `req.subdomains` - * deps: connect@2.26.0 - - deps: body-parser@~1.8.1 - - deps: compression@~1.1.0 - - deps: connect-timeout@~1.3.0 - - deps: cookie-parser@~1.3.3 - - deps: cookie-signature@1.0.5 - - deps: csurf@~1.6.1 - - deps: debug@~2.0.0 - - deps: errorhandler@~1.2.0 - - deps: express-session@~1.8.1 - - deps: finalhandler@0.2.0 - - deps: fresh@0.2.4 - - deps: media-typer@0.3.0 - - deps: method-override@~2.2.0 - - deps: morgan@~1.3.0 - - deps: qs@2.2.3 - - deps: serve-favicon@~2.1.3 - - deps: serve-index@~1.2.1 - - deps: serve-static@~1.6.1 - - deps: type-is@~1.5.1 - - deps: vhost@~3.0.0 - * deps: cookie-signature@1.0.5 - * deps: debug@~2.0.0 - * deps: fresh@0.2.4 - * deps: media-typer@0.3.0 - - Throw error when parameter format invalid on parse - * deps: range-parser@~1.0.2 - * deps: send@0.9.1 - - Add `lastModified` option - - Use `etag` to generate `ETag` header - - deps: debug@~2.0.0 - - deps: fresh@0.2.4 - * deps: vary@~1.0.0 - - Accept valid `Vary` header string as `field` - -3.16.10 / 2014-09-04 -==================== - - * deps: connect@2.25.10 - - deps: serve-static@~1.5.4 - * deps: send@0.8.5 - - Fix a path traversal issue when using `root` - - Fix malicious path detection for empty string path - -3.16.9 / 2014-08-29 -=================== - - * deps: connect@2.25.9 - - deps: body-parser@~1.6.7 - - deps: qs@2.2.2 - -3.16.8 / 2014-08-27 -=================== - - * deps: connect@2.25.8 - - deps: body-parser@~1.6.6 - - deps: csurf@~1.4.1 - - deps: qs@2.2.0 - -3.16.7 / 2014-08-18 -=================== - - * deps: connect@2.25.7 - - deps: body-parser@~1.6.5 - - deps: express-session@~1.7.6 - - deps: morgan@~1.2.3 - - deps: serve-static@~1.5.3 - * deps: send@0.8.3 - - deps: destroy@1.0.3 - - deps: on-finished@2.1.0 - -3.16.6 / 2014-08-14 -=================== - - * deps: connect@2.25.6 - - deps: body-parser@~1.6.4 - - deps: qs@1.2.2 - - deps: serve-static@~1.5.2 - * deps: send@0.8.2 - - Work around `fd` leak in Node.js 0.10 for `fs.ReadStream` - -3.16.5 / 2014-08-11 -=================== - - * deps: connect@2.25.5 - - Fix backwards compatibility in `logger` - -3.16.4 / 2014-08-10 -=================== - - * Fix original URL parsing in `res.location` - * deps: connect@2.25.4 - - Fix `query` middleware breaking with argument - - deps: body-parser@~1.6.3 - - deps: compression@~1.0.11 - - deps: connect-timeout@~1.2.2 - - deps: express-session@~1.7.5 - - deps: method-override@~2.1.3 - - deps: on-headers@~1.0.0 - - deps: parseurl@~1.3.0 - - deps: qs@1.2.1 - - deps: response-time@~2.0.1 - - deps: serve-index@~1.1.6 - - deps: serve-static@~1.5.1 - * deps: parseurl@~1.3.0 - -3.16.3 / 2014-08-07 -=================== - - * deps: connect@2.25.3 - - deps: multiparty@3.3.2 - -3.16.2 / 2014-08-07 -=================== - - * deps: connect@2.25.2 - - deps: body-parser@~1.6.2 - - deps: qs@1.2.0 - -3.16.1 / 2014-08-06 -=================== - - * deps: connect@2.25.1 - - deps: body-parser@~1.6.1 - - deps: qs@1.1.0 - -3.16.0 / 2014-08-05 -=================== - - * deps: connect@2.25.0 - - deps: body-parser@~1.6.0 - - deps: compression@~1.0.10 - - deps: csurf@~1.4.0 - - deps: express-session@~1.7.4 - - deps: qs@1.0.2 - - deps: serve-static@~1.5.0 - * deps: send@0.8.1 - - Add `extensions` option - -3.15.3 / 2014-08-04 -=================== - - * fix `res.sendfile` regression for serving directory index files - * deps: connect@2.24.3 - - deps: serve-index@~1.1.5 - - deps: serve-static@~1.4.4 - * deps: send@0.7.4 - - Fix incorrect 403 on Windows and Node.js 0.11 - - Fix serving index files without root dir - -3.15.2 / 2014-07-27 -=================== - - * deps: connect@2.24.2 - - deps: body-parser@~1.5.2 - - deps: depd@0.4.4 - - deps: express-session@~1.7.2 - - deps: morgan@~1.2.2 - - deps: serve-static@~1.4.2 - * deps: depd@0.4.4 - - Work-around v8 generating empty stack traces - * deps: send@0.7.2 - - deps: depd@0.4.4 - -3.15.1 / 2014-07-26 -=================== - - * deps: connect@2.24.1 - - deps: body-parser@~1.5.1 - - deps: depd@0.4.3 - - deps: express-session@~1.7.1 - - deps: morgan@~1.2.1 - - deps: serve-index@~1.1.4 - - deps: serve-static@~1.4.1 - * deps: depd@0.4.3 - - Fix exception when global `Error.stackTraceLimit` is too low - * deps: send@0.7.1 - - deps: depd@0.4.3 - -3.15.0 / 2014-07-22 -=================== - - * Fix `req.protocol` for proxy-direct connections - * Pass options from `res.sendfile` to `send` - * deps: connect@2.24.0 - - deps: body-parser@~1.5.0 - - deps: compression@~1.0.9 - - deps: connect-timeout@~1.2.1 - - deps: debug@1.0.4 - - deps: depd@0.4.2 - - deps: express-session@~1.7.0 - - deps: finalhandler@0.1.0 - - deps: method-override@~2.1.2 - - deps: morgan@~1.2.0 - - deps: multiparty@3.3.1 - - deps: parseurl@~1.2.0 - - deps: serve-static@~1.4.0 - * deps: debug@1.0.4 - * deps: depd@0.4.2 - - Add `TRACE_DEPRECATION` environment variable - - Remove non-standard grey color from color output - - Support `--no-deprecation` argument - - Support `--trace-deprecation` argument - * deps: parseurl@~1.2.0 - - Cache URLs based on original value - - Remove no-longer-needed URL mis-parse work-around - - Simplify the "fast-path" `RegExp` - * deps: send@0.7.0 - - Add `dotfiles` option - - Cap `maxAge` value to 1 year - - deps: debug@1.0.4 - - deps: depd@0.4.2 - -3.14.0 / 2014-07-11 -=================== - - * add explicit "Rosetta Flash JSONP abuse" protection - - previous versions are not vulnerable; this is just explicit protection - * deprecate `res.redirect(url, status)` -- use `res.redirect(status, url)` instead - * fix `res.send(status, num)` to send `num` as json (not error) - * remove unnecessary escaping when `res.jsonp` returns JSON response - * deps: basic-auth@1.0.0 - - support empty password - - support empty username - * deps: connect@2.23.0 - - deps: debug@1.0.3 - - deps: express-session@~1.6.4 - - deps: method-override@~2.1.0 - - deps: parseurl@~1.1.3 - - deps: serve-static@~1.3.1 - * deps: debug@1.0.3 - - Add support for multiple wildcards in namespaces - * deps: methods@1.1.0 - - add `CONNECT` - * deps: parseurl@~1.1.3 - - faster parsing of href-only URLs - -3.13.0 / 2014-07-03 -=================== - - * add deprecation message to `app.configure` - * add deprecation message to `req.auth` - * use `basic-auth` to parse `Authorization` header - * deps: connect@2.22.0 - - deps: csurf@~1.3.0 - - deps: express-session@~1.6.1 - - deps: multiparty@3.3.0 - - deps: serve-static@~1.3.0 - * deps: send@0.5.0 - - Accept string for `maxage` (converted by `ms`) - - Include link in default redirect response - -3.12.1 / 2014-06-26 -=================== - - * deps: connect@2.21.1 - - deps: cookie-parser@1.3.2 - - deps: cookie-signature@1.0.4 - - deps: express-session@~1.5.2 - - deps: type-is@~1.3.2 - * deps: cookie-signature@1.0.4 - - fix for timing attacks - -3.12.0 / 2014-06-21 -=================== - - * use `media-typer` to alter content-type charset - * deps: connect@2.21.0 - - deprecate `connect(middleware)` -- use `app.use(middleware)` instead - - deprecate `connect.createServer()` -- use `connect()` instead - - fix `res.setHeader()` patch to work with with get -> append -> set pattern - - deps: compression@~1.0.8 - - deps: errorhandler@~1.1.1 - - deps: express-session@~1.5.0 - - deps: serve-index@~1.1.3 - -3.11.0 / 2014-06-19 -=================== - - * deprecate things with `depd` module - * deps: buffer-crc32@0.2.3 - * deps: connect@2.20.2 - - deprecate `verify` option to `json` -- use `body-parser` npm module instead - - deprecate `verify` option to `urlencoded` -- use `body-parser` npm module instead - - deprecate things with `depd` module - - use `finalhandler` for final response handling - - use `media-typer` to parse `content-type` for charset - - deps: body-parser@1.4.3 - - deps: connect-timeout@1.1.1 - - deps: cookie-parser@1.3.1 - - deps: csurf@1.2.2 - - deps: errorhandler@1.1.0 - - deps: express-session@1.4.0 - - deps: multiparty@3.2.9 - - deps: serve-index@1.1.2 - - deps: type-is@1.3.1 - - deps: vhost@2.0.0 - -3.10.5 / 2014-06-11 -=================== - - * deps: connect@2.19.6 - - deps: body-parser@1.3.1 - - deps: compression@1.0.7 - - deps: debug@1.0.2 - - deps: serve-index@1.1.1 - - deps: serve-static@1.2.3 - * deps: debug@1.0.2 - * deps: send@0.4.3 - - Do not throw un-catchable error on file open race condition - - Use `escape-html` for HTML escaping - - deps: debug@1.0.2 - - deps: finished@1.2.2 - - deps: fresh@0.2.2 - -3.10.4 / 2014-06-09 -=================== - - * deps: connect@2.19.5 - - fix "event emitter leak" warnings - - deps: csurf@1.2.1 - - deps: debug@1.0.1 - - deps: serve-static@1.2.2 - - deps: type-is@1.2.1 - * deps: debug@1.0.1 - * deps: send@0.4.2 - - fix "event emitter leak" warnings - - deps: finished@1.2.1 - - deps: debug@1.0.1 - -3.10.3 / 2014-06-05 -=================== - - * use `vary` module for `res.vary` - * deps: connect@2.19.4 - - deps: errorhandler@1.0.2 - - deps: method-override@2.0.2 - - deps: serve-favicon@2.0.1 - * deps: debug@1.0.0 - -3.10.2 / 2014-06-03 -=================== - - * deps: connect@2.19.3 - - deps: compression@1.0.6 - -3.10.1 / 2014-06-03 -=================== - - * deps: connect@2.19.2 - - deps: compression@1.0.4 - * deps: proxy-addr@1.0.1 - -3.10.0 / 2014-06-02 -=================== - - * deps: connect@2.19.1 - - deprecate `methodOverride()` -- use `method-override` npm module instead - - deps: body-parser@1.3.0 - - deps: method-override@2.0.1 - - deps: multiparty@3.2.8 - - deps: response-time@2.0.0 - - deps: serve-static@1.2.1 - * deps: methods@1.0.1 - * deps: send@0.4.1 - - Send `max-age` in `Cache-Control` in correct format - -3.9.0 / 2014-05-30 -================== - - * custom etag control with `app.set('etag', val)` - - `app.set('etag', function(body, encoding){ return '"etag"' })` custom etag generation - - `app.set('etag', 'weak')` weak tag - - `app.set('etag', 'strong')` strong etag - - `app.set('etag', false)` turn off - - `app.set('etag', true)` standard etag - * Include ETag in HEAD requests - * mark `res.send` ETag as weak and reduce collisions - * update connect to 2.18.0 - - deps: compression@1.0.3 - - deps: serve-index@1.1.0 - - deps: serve-static@1.2.0 - * update send to 0.4.0 - - Calculate ETag with md5 for reduced collisions - - Ignore stream errors after request ends - - deps: debug@0.8.1 - -3.8.1 / 2014-05-27 -================== - - * update connect to 2.17.3 - - deps: body-parser@1.2.2 - - deps: express-session@1.2.1 - - deps: method-override@1.0.2 - -3.8.0 / 2014-05-21 -================== - - * keep previous `Content-Type` for `res.jsonp` - * set proper `charset` in `Content-Type` for `res.send` - * update connect to 2.17.1 - - fix `res.charset` appending charset when `content-type` has one - - deps: express-session@1.2.0 - - deps: morgan@1.1.1 - - deps: serve-index@1.0.3 - -3.7.0 / 2014-05-18 -================== - - * proper proxy trust with `app.set('trust proxy', trust)` - - `app.set('trust proxy', 1)` trust first hop - - `app.set('trust proxy', 'loopback')` trust loopback addresses - - `app.set('trust proxy', '10.0.0.1')` trust single IP - - `app.set('trust proxy', '10.0.0.1/16')` trust subnet - - `app.set('trust proxy', '10.0.0.1, 10.0.0.2')` trust list - - `app.set('trust proxy', false)` turn off - - `app.set('trust proxy', true)` trust everything - * update connect to 2.16.2 - - deprecate `res.headerSent` -- use `res.headersSent` - - deprecate `res.on("header")` -- use on-headers module instead - - fix edge-case in `res.appendHeader` that would append in wrong order - - json: use body-parser - - urlencoded: use body-parser - - dep: bytes@1.0.0 - - dep: cookie-parser@1.1.0 - - dep: csurf@1.2.0 - - dep: express-session@1.1.0 - - dep: method-override@1.0.1 - -3.6.0 / 2014-05-09 -================== - - * deprecate `app.del()` -- use `app.delete()` instead - * deprecate `res.json(obj, status)` -- use `res.json(status, obj)` instead - - the edge-case `res.json(status, num)` requires `res.status(status).json(num)` - * deprecate `res.jsonp(obj, status)` -- use `res.jsonp(status, obj)` instead - - the edge-case `res.jsonp(status, num)` requires `res.status(status).jsonp(num)` - * support PURGE method - - add `app.purge` - - add `router.purge` - - include PURGE in `app.all` - * update connect to 2.15.0 - * Add `res.appendHeader` - * Call error stack even when response has been sent - * Patch `res.headerSent` to return Boolean - * Patch `res.headersSent` for node.js 0.8 - * Prevent default 404 handler after response sent - * dep: compression@1.0.2 - * dep: connect-timeout@1.1.0 - * dep: debug@^0.8.0 - * dep: errorhandler@1.0.1 - * dep: express-session@1.0.4 - * dep: morgan@1.0.1 - * dep: serve-favicon@2.0.0 - * dep: serve-index@1.0.2 - * update debug to 0.8.0 - * add `enable()` method - * change from stderr to stdout - * update methods to 1.0.0 - - add PURGE - * update mkdirp to 0.5.0 - -3.5.3 / 2014-05-08 -================== - - * fix `req.host` for IPv6 literals - * fix `res.jsonp` error if callback param is object - -3.5.2 / 2014-04-24 -================== - - * update connect to 2.14.5 - * update cookie to 0.1.2 - * update mkdirp to 0.4.0 - * update send to 0.3.0 - -3.5.1 / 2014-03-25 -================== - - * pin less-middleware in generated app - -3.5.0 / 2014-03-06 -================== - - * bump deps - -3.4.8 / 2014-01-13 -================== - - * prevent incorrect automatic OPTIONS responses #1868 @dpatti - * update binary and examples for jade 1.0 #1876 @yossi, #1877 @reqshark, #1892 @matheusazzi - * throw 400 in case of malformed paths @rlidwka - -3.4.7 / 2013-12-10 -================== - - * update connect - -3.4.6 / 2013-12-01 -================== - - * update connect (raw-body) - -3.4.5 / 2013-11-27 -================== - - * update connect - * res.location: remove leading ./ #1802 @kapouer - * res.redirect: fix `res.redirect('toString') #1829 @michaelficarra - * res.send: always send ETag when content-length > 0 - * router: add Router.all() method - -3.4.4 / 2013-10-29 -================== - - * update connect - * update supertest - * update methods - * express(1): replace bodyParser() with urlencoded() and json() #1795 @chirag04 - -3.4.3 / 2013-10-23 -================== - - * update connect - -3.4.2 / 2013-10-18 -================== - - * update connect - * downgrade commander - -3.4.1 / 2013-10-15 -================== - - * update connect - * update commander - * jsonp: check if callback is a function - * router: wrap encodeURIComponent in a try/catch #1735 (@lxe) - * res.format: now includes chraset @1747 (@sorribas) - * res.links: allow multiple calls @1746 (@sorribas) - -3.4.0 / 2013-09-07 -================== - - * add res.vary(). Closes #1682 - * update connect - -3.3.8 / 2013-09-02 -================== - - * update connect - -3.3.7 / 2013-08-28 -================== - - * update connect - -3.3.6 / 2013-08-27 -================== - - * Revert "remove charset from json responses. Closes #1631" (causes issues in some clients) - * add: req.accepts take an argument list - -3.3.4 / 2013-07-08 -================== - - * update send and connect - -3.3.3 / 2013-07-04 -================== - - * update connect - -3.3.2 / 2013-07-03 -================== - - * update connect - * update send - * remove .version export - -3.3.1 / 2013-06-27 -================== - - * update connect - -3.3.0 / 2013-06-26 -================== - - * update connect - * add support for multiple X-Forwarded-Proto values. Closes #1646 - * change: remove charset from json responses. Closes #1631 - * change: return actual booleans from req.accept* functions - * fix jsonp callback array throw - -3.2.6 / 2013-06-02 -================== - - * update connect - -3.2.5 / 2013-05-21 -================== - - * update connect - * update node-cookie - * add: throw a meaningful error when there is no default engine - * change generation of ETags with res.send() to GET requests only. Closes #1619 - -3.2.4 / 2013-05-09 -================== - - * fix `req.subdomains` when no Host is present - * fix `req.host` when no Host is present, return undefined - -3.2.3 / 2013-05-07 -================== - - * update connect / qs - -3.2.2 / 2013-05-03 -================== - - * update qs - -3.2.1 / 2013-04-29 -================== - - * add app.VERB() paths array deprecation warning - * update connect - * update qs and remove all ~ semver crap - * fix: accept number as value of Signed Cookie - -3.2.0 / 2013-04-15 -================== - - * add "view" constructor setting to override view behaviour - * add req.acceptsEncoding(name) - * add req.acceptedEncodings - * revert cookie signature change causing session race conditions - * fix sorting of Accept values of the same quality - -3.1.2 / 2013-04-12 -================== - - * add support for custom Accept parameters - * update cookie-signature - -3.1.1 / 2013-04-01 -================== - - * add X-Forwarded-Host support to `req.host` - * fix relative redirects - * update mkdirp - * update buffer-crc32 - * remove legacy app.configure() method from app template. - -3.1.0 / 2013-01-25 -================== - - * add support for leading "." in "view engine" setting - * add array support to `res.set()` - * add node 0.8.x to travis.yml - * add "subdomain offset" setting for tweaking `req.subdomains` - * add `res.location(url)` implementing `res.redirect()`-like setting of Location - * use app.get() for x-powered-by setting for inheritance - * fix colons in passwords for `req.auth` - -3.0.6 / 2013-01-04 -================== - - * add http verb methods to Router - * update connect - * fix mangling of the `res.cookie()` options object - * fix jsonp whitespace escape. Closes #1132 - -3.0.5 / 2012-12-19 -================== - - * add throwing when a non-function is passed to a route - * fix: explicitly remove Transfer-Encoding header from 204 and 304 responses - * revert "add 'etag' option" - -3.0.4 / 2012-12-05 -================== - - * add 'etag' option to disable `res.send()` Etags - * add escaping of urls in text/plain in `res.redirect()` - for old browsers interpreting as html - * change crc32 module for a more liberal license - * update connect - -3.0.3 / 2012-11-13 -================== - - * update connect - * update cookie module - * fix cookie max-age - -3.0.2 / 2012-11-08 -================== - - * add OPTIONS to cors example. Closes #1398 - * fix route chaining regression. Closes #1397 - -3.0.1 / 2012-11-01 -================== - - * update connect - -3.0.0 / 2012-10-23 -================== - - * add `make clean` - * add "Basic" check to req.auth - * add `req.auth` test coverage - * add cb && cb(payload) to `res.jsonp()`. Closes #1374 - * add backwards compat for `res.redirect()` status. Closes #1336 - * add support for `res.json()` to retain previously defined Content-Types. Closes #1349 - * update connect - * change `res.redirect()` to utilize a pathname-relative Location again. Closes #1382 - * remove non-primitive string support for `res.send()` - * fix view-locals example. Closes #1370 - * fix route-separation example - -3.0.0rc5 / 2012-09-18 -================== - - * update connect - * add redis search example - * add static-files example - * add "x-powered-by" setting (`app.disable('x-powered-by')`) - * add "application/octet-stream" redirect Accept test case. Closes #1317 - -3.0.0rc4 / 2012-08-30 -================== - - * add `res.jsonp()`. Closes #1307 - * add "verbose errors" option to error-pages example - * add another route example to express(1) so people are not so confused - * add redis online user activity tracking example - * update connect dep - * fix etag quoting. Closes #1310 - * fix error-pages 404 status - * fix jsonp callback char restrictions - * remove old OPTIONS default response - -3.0.0rc3 / 2012-08-13 -================== - - * update connect dep - * fix signed cookies to work with `connect.cookieParser()` ("s:" prefix was missing) [tnydwrds] - * fix `res.render()` clobbering of "locals" - -3.0.0rc2 / 2012-08-03 -================== - - * add CORS example - * update connect dep - * deprecate `.createServer()` & remove old stale examples - * fix: escape `res.redirect()` link - * fix vhost example - -3.0.0rc1 / 2012-07-24 -================== - - * add more examples to view-locals - * add scheme-relative redirects (`res.redirect("//foo.com")`) support - * update cookie dep - * update connect dep - * update send dep - * fix `express(1)` -h flag, use -H for hogan. Closes #1245 - * fix `res.sendfile()` socket error handling regression - -3.0.0beta7 / 2012-07-16 -================== - - * update connect dep for `send()` root normalization regression - -3.0.0beta6 / 2012-07-13 -================== - - * add `err.view` property for view errors. Closes #1226 - * add "jsonp callback name" setting - * add support for "/foo/:bar*" non-greedy matches - * change `res.sendfile()` to use `send()` module - * change `res.send` to use "response-send" module - * remove `app.locals.use` and `res.locals.use`, use regular middleware - -3.0.0beta5 / 2012-07-03 -================== - - * add "make check" support - * add route-map example - * add `res.json(obj, status)` support back for BC - * add "methods" dep, remove internal methods module - * update connect dep - * update auth example to utilize cores pbkdf2 - * updated tests to use "supertest" - -3.0.0beta4 / 2012-06-25 -================== - - * Added `req.auth` - * Added `req.range(size)` - * Added `res.links(obj)` - * Added `res.send(body, status)` support back for backwards compat - * Added `.default()` support to `res.format()` - * Added 2xx / 304 check to `req.fresh` - * Revert "Added + support to the router" - * Fixed `res.send()` freshness check, respect res.statusCode - -3.0.0beta3 / 2012-06-15 -================== - - * Added hogan `--hjs` to express(1) [nullfirm] - * Added another example to content-negotiation - * Added `fresh` dep - * Changed: `res.send()` always checks freshness - * Fixed: expose connects mime module. Cloases #1165 - -3.0.0beta2 / 2012-06-06 -================== - - * Added `+` support to the router - * Added `req.host` - * Changed `req.param()` to check route first - * Update connect dep - -3.0.0beta1 / 2012-06-01 -================== - - * Added `res.format()` callback to override default 406 behaviour - * Fixed `res.redirect()` 406. Closes #1154 - -3.0.0alpha5 / 2012-05-30 -================== - - * Added `req.ip` - * Added `{ signed: true }` option to `res.cookie()` - * Removed `res.signedCookie()` - * Changed: dont reverse `req.ips` - * Fixed "trust proxy" setting check for `req.ips` - -3.0.0alpha4 / 2012-05-09 -================== - - * Added: allow `[]` in jsonp callback. Closes #1128 - * Added `PORT` env var support in generated template. Closes #1118 [benatkin] - * Updated: connect 2.2.2 - -3.0.0alpha3 / 2012-05-04 -================== - - * Added public `app.routes`. Closes #887 - * Added _view-locals_ example - * Added _mvc_ example - * Added `res.locals.use()`. Closes #1120 - * Added conditional-GET support to `res.send()` - * Added: coerce `res.set()` values to strings - * Changed: moved `static()` in generated apps below router - * Changed: `res.send()` only set ETag when not previously set - * Changed connect 2.2.1 dep - * Changed: `make test` now runs unit / acceptance tests - * Fixed req/res proto inheritance - -3.0.0alpha2 / 2012-04-26 -================== - - * Added `make benchmark` back - * Added `res.send()` support for `String` objects - * Added client-side data exposing example - * Added `res.header()` and `req.header()` aliases for BC - * Added `express.createServer()` for BC - * Perf: memoize parsed urls - * Perf: connect 2.2.0 dep - * Changed: make `expressInit()` middleware self-aware - * Fixed: use app.get() for all core settings - * Fixed redis session example - * Fixed session example. Closes #1105 - * Fixed generated express dep. Closes #1078 - -3.0.0alpha1 / 2012-04-15 -================== - - * Added `app.locals.use(callback)` - * Added `app.locals` object - * Added `app.locals(obj)` - * Added `res.locals` object - * Added `res.locals(obj)` - * Added `res.format()` for content-negotiation - * Added `app.engine()` - * Added `res.cookie()` JSON cookie support - * Added "trust proxy" setting - * Added `req.subdomains` - * Added `req.protocol` - * Added `req.secure` - * Added `req.path` - * Added `req.ips` - * Added `req.fresh` - * Added `req.stale` - * Added comma-delmited / array support for `req.accepts()` - * Added debug instrumentation - * Added `res.set(obj)` - * Added `res.set(field, value)` - * Added `res.get(field)` - * Added `app.get(setting)`. Closes #842 - * Added `req.acceptsLanguage()` - * Added `req.acceptsCharset()` - * Added `req.accepted` - * Added `req.acceptedLanguages` - * Added `req.acceptedCharsets` - * Added "json replacer" setting - * Added "json spaces" setting - * Added X-Forwarded-Proto support to `res.redirect()`. Closes #92 - * Added `--less` support to express(1) - * Added `express.response` prototype - * Added `express.request` prototype - * Added `express.application` prototype - * Added `app.path()` - * Added `app.render()` - * Added `res.type()` to replace `res.contentType()` - * Changed: `res.redirect()` to add relative support - * Changed: enable "jsonp callback" by default - * Changed: renamed "case sensitive routes" to "case sensitive routing" - * Rewrite of all tests with mocha - * Removed "root" setting - * Removed `res.redirect('home')` support - * Removed `req.notify()` - * Removed `app.register()` - * Removed `app.redirect()` - * Removed `app.is()` - * Removed `app.helpers()` - * Removed `app.dynamicHelpers()` - * Fixed `res.sendfile()` with non-GET. Closes #723 - * Fixed express(1) public dir for windows. Closes #866 - -2.5.9/ 2012-04-02 -================== - - * Added support for PURGE request method [pbuyle] - * Fixed `express(1)` generated app `app.address()` before `listening` [mmalecki] - -2.5.8 / 2012-02-08 -================== - - * Update mkdirp dep. Closes #991 - -2.5.7 / 2012-02-06 -================== - - * Fixed `app.all` duplicate DELETE requests [mscdex] - -2.5.6 / 2012-01-13 -================== - - * Updated hamljs dev dep. Closes #953 - -2.5.5 / 2012-01-08 -================== - - * Fixed: set `filename` on cached templates [matthewleon] - -2.5.4 / 2012-01-02 -================== - - * Fixed `express(1)` eol on 0.4.x. Closes #947 - -2.5.3 / 2011-12-30 -================== - - * Fixed `req.is()` when a charset is present - -2.5.2 / 2011-12-10 -================== - - * Fixed: express(1) LF -> CRLF for windows - -2.5.1 / 2011-11-17 -================== - - * Changed: updated connect to 1.8.x - * Removed sass.js support from express(1) - -2.5.0 / 2011-10-24 -================== - - * Added ./routes dir for generated app by default - * Added npm install reminder to express(1) app gen - * Added 0.5.x support - * Removed `make test-cov` since it wont work with node 0.5.x - * Fixed express(1) public dir for windows. Closes #866 - -2.4.7 / 2011-10-05 -================== - - * Added mkdirp to express(1). Closes #795 - * Added simple _json-config_ example - * Added shorthand for the parsed request's pathname via `req.path` - * Changed connect dep to 1.7.x to fix npm issue... - * Fixed `res.redirect()` __HEAD__ support. [reported by xerox] - * Fixed `req.flash()`, only escape args - * Fixed absolute path checking on windows. Closes #829 [reported by andrewpmckenzie] - -2.4.6 / 2011-08-22 -================== - - * Fixed multiple param callback regression. Closes #824 [reported by TroyGoode] - -2.4.5 / 2011-08-19 -================== - - * Added support for routes to handle errors. Closes #809 - * Added `app.routes.all()`. Closes #803 - * Added "basepath" setting to work in conjunction with reverse proxies etc. - * Refactored `Route` to use a single array of callbacks - * Added support for multiple callbacks for `app.param()`. Closes #801 -Closes #805 - * Changed: removed .call(self) for route callbacks - * Dependency: `qs >= 0.3.1` - * Fixed `res.redirect()` on windows due to `join()` usage. Closes #808 - -2.4.4 / 2011-08-05 -================== - - * Fixed `res.header()` intention of a set, even when `undefined` - * Fixed `*`, value no longer required - * Fixed `res.send(204)` support. Closes #771 - -2.4.3 / 2011-07-14 -================== - - * Added docs for `status` option special-case. Closes #739 - * Fixed `options.filename`, exposing the view path to template engines - -2.4.2. / 2011-07-06 -================== - - * Revert "removed jsonp stripping" for XSS - -2.4.1 / 2011-07-06 -================== - - * Added `res.json()` JSONP support. Closes #737 - * Added _extending-templates_ example. Closes #730 - * Added "strict routing" setting for trailing slashes - * Added support for multiple envs in `app.configure()` calls. Closes #735 - * Changed: `res.send()` using `res.json()` - * Changed: when cookie `path === null` don't default it - * Changed; default cookie path to "home" setting. Closes #731 - * Removed _pids/logs_ creation from express(1) - -2.4.0 / 2011-06-28 -================== - - * Added chainable `res.status(code)` - * Added `res.json()`, an explicit version of `res.send(obj)` - * Added simple web-service example - -2.3.12 / 2011-06-22 -================== - - * \#express is now on freenode! come join! - * Added `req.get(field, param)` - * Added links to Japanese documentation, thanks @hideyukisaito! - * Added; the `express(1)` generated app outputs the env - * Added `content-negotiation` example - * Dependency: connect >= 1.5.1 < 2.0.0 - * Fixed view layout bug. Closes #720 - * Fixed; ignore body on 304. Closes #701 - -2.3.11 / 2011-06-04 -================== - - * Added `npm test` - * Removed generation of dummy test file from `express(1)` - * Fixed; `express(1)` adds express as a dep - * Fixed; prune on `prepublish` - -2.3.10 / 2011-05-27 -================== - - * Added `req.route`, exposing the current route - * Added _package.json_ generation support to `express(1)` - * Fixed call to `app.param()` function for optional params. Closes #682 - -2.3.9 / 2011-05-25 -================== - - * Fixed bug-ish with `../' in `res.partial()` calls - -2.3.8 / 2011-05-24 -================== - - * Fixed `app.options()` - -2.3.7 / 2011-05-23 -================== - - * Added route `Collection`, ex: `app.get('/user/:id').remove();` - * Added support for `app.param(fn)` to define param logic - * Removed `app.param()` support for callback with return value - * Removed module.parent check from express(1) generated app. Closes #670 - * Refactored router. Closes #639 - -2.3.6 / 2011-05-20 -================== - - * Changed; using devDependencies instead of git submodules - * Fixed redis session example - * Fixed markdown example - * Fixed view caching, should not be enabled in development - -2.3.5 / 2011-05-20 -================== - - * Added export `.view` as alias for `.View` - -2.3.4 / 2011-05-08 -================== - - * Added `./examples/say` - * Fixed `res.sendfile()` bug preventing the transfer of files with spaces - -2.3.3 / 2011-05-03 -================== - - * Added "case sensitive routes" option. - * Changed; split methods supported per rfc [slaskis] - * Fixed route-specific middleware when using the same callback function several times - -2.3.2 / 2011-04-27 -================== - - * Fixed view hints - -2.3.1 / 2011-04-26 -================== - - * Added `app.match()` as `app.match.all()` - * Added `app.lookup()` as `app.lookup.all()` - * Added `app.remove()` for `app.remove.all()` - * Added `app.remove.VERB()` - * Fixed template caching collision issue. Closes #644 - * Moved router over from connect and started refactor - -2.3.0 / 2011-04-25 -================== - - * Added options support to `res.clearCookie()` - * Added `res.helpers()` as alias of `res.locals()` - * Added; json defaults to UTF-8 with `res.send()`. Closes #632. [Daniel * Dependency `connect >= 1.4.0` - * Changed; auto set Content-Type in res.attachement [Aaron Heckmann] - * Renamed "cache views" to "view cache". Closes #628 - * Fixed caching of views when using several apps. Closes #637 - * Fixed gotcha invoking `app.param()` callbacks once per route middleware. -Closes #638 - * Fixed partial lookup precedence. Closes #631 -Shaw] - -2.2.2 / 2011-04-12 -================== - - * Added second callback support for `res.download()` connection errors - * Fixed `filename` option passing to template engine - -2.2.1 / 2011-04-04 -================== - - * Added `layout(path)` helper to change the layout within a view. Closes #610 - * Fixed `partial()` collection object support. - Previously only anything with `.length` would work. - When `.length` is present one must still be aware of holes, - however now `{ collection: {foo: 'bar'}}` is valid, exposes - `keyInCollection` and `keysInCollection`. - - * Performance improved with better view caching - * Removed `request` and `response` locals - * Changed; errorHandler page title is now `Express` instead of `Connect` - -2.2.0 / 2011-03-30 -================== - - * Added `app.lookup.VERB()`, ex `app.lookup.put('/user/:id')`. Closes #606 - * Added `app.match.VERB()`, ex `app.match.put('/user/12')`. Closes #606 - * Added `app.VERB(path)` as alias of `app.lookup.VERB()`. - * Dependency `connect >= 1.2.0` - -2.1.1 / 2011-03-29 -================== - - * Added; expose `err.view` object when failing to locate a view - * Fixed `res.partial()` call `next(err)` when no callback is given [reported by aheckmann] - * Fixed; `res.send(undefined)` responds with 204 [aheckmann] - -2.1.0 / 2011-03-24 -================== - - * Added `/_?` partial lookup support. Closes #447 - * Added `request`, `response`, and `app` local variables - * Added `settings` local variable, containing the app's settings - * Added `req.flash()` exception if `req.session` is not available - * Added `res.send(bool)` support (json response) - * Fixed stylus example for latest version - * Fixed; wrap try/catch around `res.render()` - -2.0.0 / 2011-03-17 -================== - - * Fixed up index view path alternative. - * Changed; `res.locals()` without object returns the locals - -2.0.0rc3 / 2011-03-17 -================== - - * Added `res.locals(obj)` to compliment `res.local(key, val)` - * Added `res.partial()` callback support - * Fixed recursive error reporting issue in `res.render()` - -2.0.0rc2 / 2011-03-17 -================== - - * Changed; `partial()` "locals" are now optional - * Fixed `SlowBuffer` support. Closes #584 [reported by tyrda01] - * Fixed .filename view engine option [reported by drudge] - * Fixed blog example - * Fixed `{req,res}.app` reference when mounting [Ben Weaver] - -2.0.0rc / 2011-03-14 -================== - - * Fixed; expose `HTTPSServer` constructor - * Fixed express(1) default test charset. Closes #579 [reported by secoif] - * Fixed; default charset to utf-8 instead of utf8 for lame IE [reported by NickP] - -2.0.0beta3 / 2011-03-09 -================== - - * Added support for `res.contentType()` literal - The original `res.contentType('.json')`, - `res.contentType('application/json')`, and `res.contentType('json')` - will work now. - * Added `res.render()` status option support back - * Added charset option for `res.render()` - * Added `.charset` support (via connect 1.0.4) - * Added view resolution hints when in development and a lookup fails - * Added layout lookup support relative to the page view. - For example while rendering `./views/user/index.jade` if you create - `./views/user/layout.jade` it will be used in favour of the root layout. - * Fixed `res.redirect()`. RFC states absolute url [reported by unlink] - * Fixed; default `res.send()` string charset to utf8 - * Removed `Partial` constructor (not currently used) - -2.0.0beta2 / 2011-03-07 -================== - - * Added res.render() `.locals` support back to aid in migration process - * Fixed flash example - -2.0.0beta / 2011-03-03 -================== - - * Added HTTPS support - * Added `res.cookie()` maxAge support - * Added `req.header()` _Referrer_ / _Referer_ special-case, either works - * Added mount support for `res.redirect()`, now respects the mount-point - * Added `union()` util, taking place of `merge(clone())` combo - * Added stylus support to express(1) generated app - * Added secret to session middleware used in examples and generated app - * Added `res.local(name, val)` for progressive view locals - * Added default param support to `req.param(name, default)` - * Added `app.disabled()` and `app.enabled()` - * Added `app.register()` support for omitting leading ".", either works - * Added `res.partial()`, using the same interface as `partial()` within a view. Closes #539 - * Added `app.param()` to map route params to async/sync logic - * Added; aliased `app.helpers()` as `app.locals()`. Closes #481 - * Added extname with no leading "." support to `res.contentType()` - * Added `cache views` setting, defaulting to enabled in "production" env - * Added index file partial resolution, eg: partial('user') may try _views/user/index.jade_. - * Added `req.accepts()` support for extensions - * Changed; `res.download()` and `res.sendfile()` now utilize Connect's - static file server `connect.static.send()`. - * Changed; replaced `connect.utils.mime()` with npm _mime_ module - * Changed; allow `req.query` to be pre-defined (via middleware or other parent - * Changed view partial resolution, now relative to parent view - * Changed view engine signature. no longer `engine.render(str, options, callback)`, now `engine.compile(str, options) -> Function`, the returned function accepts `fn(locals)`. - * Fixed `req.param()` bug returning Array.prototype methods. Closes #552 - * Fixed; using `Stream#pipe()` instead of `sys.pump()` in `res.sendfile()` - * Fixed; using _qs_ module instead of _querystring_ - * Fixed; strip unsafe chars from jsonp callbacks - * Removed "stream threshold" setting - -1.0.8 / 2011-03-01 -================== - - * Allow `req.query` to be pre-defined (via middleware or other parent app) - * "connect": ">= 0.5.0 < 1.0.0". Closes #547 - * Removed the long deprecated __EXPRESS_ENV__ support - -1.0.7 / 2011-02-07 -================== - - * Fixed `render()` setting inheritance. - Mounted apps would not inherit "view engine" - -1.0.6 / 2011-02-07 -================== - - * Fixed `view engine` setting bug when period is in dirname - -1.0.5 / 2011-02-05 -================== - - * Added secret to generated app `session()` call - -1.0.4 / 2011-02-05 -================== - - * Added `qs` dependency to _package.json_ - * Fixed namespaced `require()`s for latest connect support - -1.0.3 / 2011-01-13 -================== - - * Remove unsafe characters from JSONP callback names [Ryan Grove] - -1.0.2 / 2011-01-10 -================== - - * Removed nested require, using `connect.router` - -1.0.1 / 2010-12-29 -================== - - * Fixed for middleware stacked via `createServer()` - previously the `foo` middleware passed to `createServer(foo)` - would not have access to Express methods such as `res.send()` - or props like `req.query` etc. - -1.0.0 / 2010-11-16 -================== - - * Added; deduce partial object names from the last segment. - For example by default `partial('forum/post', postObject)` will - give you the _post_ object, providing a meaningful default. - * Added http status code string representation to `res.redirect()` body - * Added; `res.redirect()` supporting _text/plain_ and _text/html_ via __Accept__. - * Added `req.is()` to aid in content negotiation - * Added partial local inheritance [suggested by masylum]. Closes #102 - providing access to parent template locals. - * Added _-s, --session[s]_ flag to express(1) to add session related middleware - * Added _--template_ flag to express(1) to specify the - template engine to use. - * Added _--css_ flag to express(1) to specify the - stylesheet engine to use (or just plain css by default). - * Added `app.all()` support [thanks aheckmann] - * Added partial direct object support. - You may now `partial('user', user)` providing the "user" local, - vs previously `partial('user', { object: user })`. - * Added _route-separation_ example since many people question ways - to do this with CommonJS modules. Also view the _blog_ example for - an alternative. - * Performance; caching view path derived partial object names - * Fixed partial local inheritance precedence. [reported by Nick Poulden] Closes #454 - * Fixed jsonp support; _text/javascript_ as per mailinglist discussion - -1.0.0rc4 / 2010-10-14 -================== - - * Added _NODE_ENV_ support, _EXPRESS_ENV_ is deprecated and will be removed in 1.0.0 - * Added route-middleware support (very helpful, see the [docs](http://expressjs.com/guide.html#Route-Middleware)) - * Added _jsonp callback_ setting to enable/disable jsonp autowrapping [Dav Glass] - * Added callback query check on response.send to autowrap JSON objects for simple webservice implementations [Dav Glass] - * Added `partial()` support for array-like collections. Closes #434 - * Added support for swappable querystring parsers - * Added session usage docs. Closes #443 - * Added dynamic helper caching. Closes #439 [suggested by maritz] - * Added authentication example - * Added basic Range support to `res.sendfile()` (and `res.download()` etc) - * Changed; `express(1)` generated app using 2 spaces instead of 4 - * Default env to "development" again [aheckmann] - * Removed _context_ option is no more, use "scope" - * Fixed; exposing _./support_ libs to examples so they can run without installs - * Fixed mvc example - -1.0.0rc3 / 2010-09-20 -================== - - * Added confirmation for `express(1)` app generation. Closes #391 - * Added extending of flash formatters via `app.flashFormatters` - * Added flash formatter support. Closes #411 - * Added streaming support to `res.sendfile()` using `sys.pump()` when >= "stream threshold" - * Added _stream threshold_ setting for `res.sendfile()` - * Added `res.send()` __HEAD__ support - * Added `res.clearCookie()` - * Added `res.cookie()` - * Added `res.render()` headers option - * Added `res.redirect()` response bodies - * Added `res.render()` status option support. Closes #425 [thanks aheckmann] - * Fixed `res.sendfile()` responding with 403 on malicious path - * Fixed `res.download()` bug; when an error occurs remove _Content-Disposition_ - * Fixed; mounted apps settings now inherit from parent app [aheckmann] - * Fixed; stripping Content-Length / Content-Type when 204 - * Fixed `res.send()` 204. Closes #419 - * Fixed multiple _Set-Cookie_ headers via `res.header()`. Closes #402 - * Fixed bug messing with error handlers when `listenFD()` is called instead of `listen()`. [thanks guillermo] - - -1.0.0rc2 / 2010-08-17 -================== - - * Added `app.register()` for template engine mapping. Closes #390 - * Added `res.render()` callback support as second argument (no options) - * Added callback support to `res.download()` - * Added callback support for `res.sendfile()` - * Added support for middleware access via `express.middlewareName()` vs `connect.middlewareName()` - * Added "partials" setting to docs - * Added default expresso tests to `express(1)` generated app. Closes #384 - * Fixed `res.sendfile()` error handling, defer via `next()` - * Fixed `res.render()` callback when a layout is used [thanks guillermo] - * Fixed; `make install` creating ~/.node_libraries when not present - * Fixed issue preventing error handlers from being defined anywhere. Closes #387 - -1.0.0rc / 2010-07-28 -================== - - * Added mounted hook. Closes #369 - * Added connect dependency to _package.json_ - - * Removed "reload views" setting and support code - development env never caches, production always caches. - - * Removed _param_ in route callbacks, signature is now - simply (req, res, next), previously (req, res, params, next). - Use _req.params_ for path captures, _req.query_ for GET params. - - * Fixed "home" setting - * Fixed middleware/router precedence issue. Closes #366 - * Fixed; _configure()_ callbacks called immediately. Closes #368 - -1.0.0beta2 / 2010-07-23 -================== - - * Added more examples - * Added; exporting `Server` constructor - * Added `Server#helpers()` for view locals - * Added `Server#dynamicHelpers()` for dynamic view locals. Closes #349 - * Added support for absolute view paths - * Added; _home_ setting defaults to `Server#route` for mounted apps. Closes #363 - * Added Guillermo Rauch to the contributor list - * Added support for "as" for non-collection partials. Closes #341 - * Fixed _install.sh_, ensuring _~/.node_libraries_ exists. Closes #362 [thanks jf] - * Fixed `res.render()` exceptions, now passed to `next()` when no callback is given [thanks guillermo] - * Fixed instanceof `Array` checks, now `Array.isArray()` - * Fixed express(1) expansion of public dirs. Closes #348 - * Fixed middleware precedence. Closes #345 - * Fixed view watcher, now async [thanks aheckmann] - -1.0.0beta / 2010-07-15 -================== - - * Re-write - - much faster - - much lighter - - Check [ExpressJS.com](http://expressjs.com) for migration guide and updated docs - -0.14.0 / 2010-06-15 -================== - - * Utilize relative requires - * Added Static bufferSize option [aheckmann] - * Fixed caching of view and partial subdirectories [aheckmann] - * Fixed mime.type() comments now that ".ext" is not supported - * Updated haml submodule - * Updated class submodule - * Removed bin/express - -0.13.0 / 2010-06-01 -================== - - * Added node v0.1.97 compatibility - * Added support for deleting cookies via Request#cookie('key', null) - * Updated haml submodule - * Fixed not-found page, now using using charset utf-8 - * Fixed show-exceptions page, now using using charset utf-8 - * Fixed view support due to fs.readFile Buffers - * Changed; mime.type() no longer accepts ".type" due to node extname() changes - -0.12.0 / 2010-05-22 -================== - - * Added node v0.1.96 compatibility - * Added view `helpers` export which act as additional local variables - * Updated haml submodule - * Changed ETag; removed inode, modified time only - * Fixed LF to CRLF for setting multiple cookies - * Fixed cookie complation; values are now urlencoded - * Fixed cookies parsing; accepts quoted values and url escaped cookies - -0.11.0 / 2010-05-06 -================== - - * Added support for layouts using different engines - - this.render('page.html.haml', { layout: 'super-cool-layout.html.ejs' }) - - this.render('page.html.haml', { layout: 'foo' }) // assumes 'foo.html.haml' - - this.render('page.html.haml', { layout: false }) // no layout - * Updated ext submodule - * Updated haml submodule - * Fixed EJS partial support by passing along the context. Issue #307 - -0.10.1 / 2010-05-03 -================== - - * Fixed binary uploads. - -0.10.0 / 2010-04-30 -================== - - * Added charset support via Request#charset (automatically assigned to 'UTF-8' when respond()'s - encoding is set to 'utf8' or 'utf-8'. - * Added "encoding" option to Request#render(). Closes #299 - * Added "dump exceptions" setting, which is enabled by default. - * Added simple ejs template engine support - * Added error response support for text/plain, application/json. Closes #297 - * Added callback function param to Request#error() - * Added Request#sendHead() - * Added Request#stream() - * Added support for Request#respond(304, null) for empty response bodies - * Added ETag support to Request#sendfile() - * Added options to Request#sendfile(), passed to fs.createReadStream() - * Added filename arg to Request#download() - * Performance enhanced due to pre-reversing plugins so that plugins.reverse() is not called on each request - * Performance enhanced by preventing several calls to toLowerCase() in Router#match() - * Changed; Request#sendfile() now streams - * Changed; Renamed Request#halt() to Request#respond(). Closes #289 - * Changed; Using sys.inspect() instead of JSON.encode() for error output - * Changed; run() returns the http.Server instance. Closes #298 - * Changed; Defaulting Server#host to null (INADDR_ANY) - * Changed; Logger "common" format scale of 0.4f - * Removed Logger "request" format - * Fixed; Catching ENOENT in view caching, preventing error when "views/partials" is not found - * Fixed several issues with http client - * Fixed Logger Content-Length output - * Fixed bug preventing Opera from retaining the generated session id. Closes #292 - -0.9.0 / 2010-04-14 -================== - - * Added DSL level error() route support - * Added DSL level notFound() route support - * Added Request#error() - * Added Request#notFound() - * Added Request#render() callback function. Closes #258 - * Added "max upload size" setting - * Added "magic" variables to collection partials (\_\_index\_\_, \_\_length\_\_, \_\_isFirst\_\_, \_\_isLast\_\_). Closes #254 - * Added [haml.js](http://github.com/visionmedia/haml.js) submodule; removed haml-js - * Added callback function support to Request#halt() as 3rd/4th arg - * Added preprocessing of route param wildcards using param(). Closes #251 - * Added view partial support (with collections etc) - * Fixed bug preventing falsey params (such as ?page=0). Closes #286 - * Fixed setting of multiple cookies. Closes #199 - * Changed; view naming convention is now NAME.TYPE.ENGINE (for example page.html.haml) - * Changed; session cookie is now httpOnly - * Changed; Request is no longer global - * Changed; Event is no longer global - * Changed; "sys" module is no longer global - * Changed; moved Request#download to Static plugin where it belongs - * Changed; Request instance created before body parsing. Closes #262 - * Changed; Pre-caching views in memory when "cache view contents" is enabled. Closes #253 - * Changed; Pre-caching view partials in memory when "cache view partials" is enabled - * Updated support to node --version 0.1.90 - * Updated dependencies - * Removed set("session cookie") in favour of use(Session, { cookie: { ... }}) - * Removed utils.mixin(); use Object#mergeDeep() - -0.8.0 / 2010-03-19 -================== - - * Added coffeescript example app. Closes #242 - * Changed; cache api now async friendly. Closes #240 - * Removed deprecated 'express/static' support. Use 'express/plugins/static' - -0.7.6 / 2010-03-19 -================== - - * Added Request#isXHR. Closes #229 - * Added `make install` (for the executable) - * Added `express` executable for setting up simple app templates - * Added "GET /public/*" to Static plugin, defaulting to /public - * Added Static plugin - * Fixed; Request#render() only calls cache.get() once - * Fixed; Namespacing View caches with "view:" - * Fixed; Namespacing Static caches with "static:" - * Fixed; Both example apps now use the Static plugin - * Fixed set("views"). Closes #239 - * Fixed missing space for combined log format - * Deprecated Request#sendfile() and 'express/static' - * Removed Server#running - -0.7.5 / 2010-03-16 -================== - - * Added Request#flash() support without args, now returns all flashes - * Updated ext submodule - -0.7.4 / 2010-03-16 -================== - - * Fixed session reaper - * Changed; class.js replacing js-oo Class implementation (quite a bit faster, no browser cruft) - -0.7.3 / 2010-03-16 -================== - - * Added package.json - * Fixed requiring of haml / sass due to kiwi removal - -0.7.2 / 2010-03-16 -================== - - * Fixed GIT submodules (HAH!) - -0.7.1 / 2010-03-16 -================== - - * Changed; Express now using submodules again until a PM is adopted - * Changed; chat example using millisecond conversions from ext - -0.7.0 / 2010-03-15 -================== - - * Added Request#pass() support (finds the next matching route, or the given path) - * Added Logger plugin (default "common" format replaces CommonLogger) - * Removed Profiler plugin - * Removed CommonLogger plugin - -0.6.0 / 2010-03-11 -================== - - * Added seed.yml for kiwi package management support - * Added HTTP client query string support when method is GET. Closes #205 - - * Added support for arbitrary view engines. - For example "foo.engine.html" will now require('engine'), - the exports from this module are cached after the first require(). - - * Added async plugin support - - * Removed usage of RESTful route funcs as http client - get() etc, use http.get() and friends - - * Removed custom exceptions - -0.5.0 / 2010-03-10 -================== - - * Added ext dependency (library of js extensions) - * Removed extname() / basename() utils. Use path module - * Removed toArray() util. Use arguments.values - * Removed escapeRegexp() util. Use RegExp.escape() - * Removed process.mixin() dependency. Use utils.mixin() - * Removed Collection - * Removed ElementCollection - * Shameless self promotion of ebook "Advanced JavaScript" (http://dev-mag.com) ;) - -0.4.0 / 2010-02-11 -================== - - * Added flash() example to sample upload app - * Added high level restful http client module (express/http) - * Changed; RESTful route functions double as HTTP clients. Closes #69 - * Changed; throwing error when routes are added at runtime - * Changed; defaulting render() context to the current Request. Closes #197 - * Updated haml submodule - -0.3.0 / 2010-02-11 -================== - - * Updated haml / sass submodules. Closes #200 - * Added flash message support. Closes #64 - * Added accepts() now allows multiple args. fixes #117 - * Added support for plugins to halt. Closes #189 - * Added alternate layout support. Closes #119 - * Removed Route#run(). Closes #188 - * Fixed broken specs due to use(Cookie) missing - -0.2.1 / 2010-02-05 -================== - - * Added "plot" format option for Profiler (for gnuplot processing) - * Added request number to Profiler plugin - * Fixed binary encoding for multi-part file uploads, was previously defaulting to UTF8 - * Fixed issue with routes not firing when not files are present. Closes #184 - * Fixed process.Promise -> events.Promise - -0.2.0 / 2010-02-03 -================== - - * Added parseParam() support for name[] etc. (allows for file inputs with "multiple" attr) Closes #180 - * Added Both Cache and Session option "reapInterval" may be "reapEvery". Closes #174 - * Added expiration support to cache api with reaper. Closes #133 - * Added cache Store.Memory#reap() - * Added Cache; cache api now uses first class Cache instances - * Added abstract session Store. Closes #172 - * Changed; cache Memory.Store#get() utilizing Collection - * Renamed MemoryStore -> Store.Memory - * Fixed use() of the same plugin several time will always use latest options. Closes #176 - -0.1.0 / 2010-02-03 -================== - - * Changed; Hooks (before / after) pass request as arg as well as evaluated in their context - * Updated node support to 0.1.27 Closes #169 - * Updated dirname(__filename) -> __dirname - * Updated libxmljs support to v0.2.0 - * Added session support with memory store / reaping - * Added quick uid() helper - * Added multi-part upload support - * Added Sass.js support / submodule - * Added production env caching view contents and static files - * Added static file caching. Closes #136 - * Added cache plugin with memory stores - * Added support to StaticFile so that it works with non-textual files. - * Removed dirname() helper - * Removed several globals (now their modules must be required) - -0.0.2 / 2010-01-10 -================== - - * Added view benchmarks; currently haml vs ejs - * Added Request#attachment() specs. Closes #116 - * Added use of node's parseQuery() util. Closes #123 - * Added `make init` for submodules - * Updated Haml - * Updated sample chat app to show messages on load - * Updated libxmljs parseString -> parseHtmlString - * Fixed `make init` to work with older versions of git - * Fixed specs can now run independent specs for those who cant build deps. Closes #127 - * Fixed issues introduced by the node url module changes. Closes 126. - * Fixed two assertions failing due to Collection#keys() returning strings - * Fixed faulty Collection#toArray() spec due to keys() returning strings - * Fixed `make test` now builds libxmljs.node before testing - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/s4t-server-node/node_modules/express/LICENSE b/s4t-server-node/node_modules/express/LICENSE deleted file mode 100644 index 0f3c767..0000000 --- a/s4t-server-node/node_modules/express/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2009-2014 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/s4t-server-node/node_modules/express/Readme.md b/s4t-server-node/node_modules/express/Readme.md deleted file mode 100644 index 748e1ee..0000000 --- a/s4t-server-node/node_modules/express/Readme.md +++ /dev/null @@ -1,135 +0,0 @@ -[![Express Logo](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](http://expressjs.com/) - - Fast, unopinionated, minimalist web framework for [node](http://nodejs.org). - - [![NPM Version][npm-image]][npm-url] - [![NPM Downloads][downloads-image]][downloads-url] - [![Build Status][travis-image]][travis-url] - [![Test Coverage][coveralls-image]][coveralls-url] - -```js -var express = require('express') -var app = express() - -app.get('/', function (req, res) { - res.send('Hello World') -}) - -app.listen(3000) -``` - -## Installation - -```bash -$ npm install express -``` - -## Features - - * Robust routing - * Focus on high performance - * Super-high test coverage - * HTTP helpers (redirection, caching, etc) - * View system supporting 14+ template engines - * Content negotiation - * Executable for generating applications quickly - -## Docs & Community - - * [Website and Documentation](http://expressjs.com/) - [[website repo](https://github.com/strongloop/expressjs.com)] - * [#express](https://webchat.freenode.net/?channels=express) on freenode IRC - * [Github Organization](https://github.com/expressjs) for Official Middleware & Modules - * Visit the [Wiki](https://github.com/strongloop/express/wiki) - * [Google Group](https://groups.google.com/group/express-js) for discussion - * [Русскоязычная документация](http://jsman.ru/express/) - * [한국어 문서](http://expressjs.kr) - [[website repo](https://github.com/Hanul/expressjs.kr)] - -**PROTIP** Be sure to read [Migrating from 3.x to 4.x](https://github.com/strongloop/express/wiki/Migrating-from-3.x-to-4.x) as well as [New features in 4.x](https://github.com/strongloop/express/wiki/New-features-in-4.x). - -## Quick Start - - The quickest way to get started with express is to utilize the executable [`express(1)`](https://github.com/expressjs/generator) to generate an application as shown below: - - Install the executable. The executable's major version will match Express's: - -```bash -$ npm install -g express-generator@4 -``` - - Create the app: - -```bash -$ express /tmp/foo && cd /tmp/foo -``` - - Install dependencies: - -```bash -$ npm install -``` - - Start the server: - -```bash -$ npm start -``` - -## Philosophy - - The Express philosophy is to provide small, robust tooling for HTTP servers, making - it a great solution for single page applications, web sites, hybrids, or public - HTTP APIs. - - Express does not force you to use any specific ORM or template engine. With support for over - 14 template engines via [Consolidate.js](https://github.com/tj/consolidate.js), - you can quickly craft your perfect framework. - -## Examples - - To view the examples, clone the Express repo and install the dependancies: - -```bash -$ git clone git://github.com/strongloop/express.git --depth 1 -$ cd express -$ npm install -``` - - Then run whichever example you want: - -```bash -$ node examples/content-negotiation -``` - -## Tests - - To run the test suite, first install the dependancies, then run `npm test`: - -```bash -$ npm install -$ npm test -``` - -## People - -The original author of Express is [TJ Holowaychuk](https://github.com/tj) [![TJ's Gratipay][gratipay-image-visionmedia]][gratipay-url-visionmedia] - -The current lead maintainer is [Douglas Christopher Wilson](https://github.com/dougwilson) [![Doug's Gratipay][gratipay-image-dougwilson]][gratipay-url-dougwilson] - -[List of all contributors](https://github.com/strongloop/express/graphs/contributors) - -## License - - [MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/express.svg?style=flat -[npm-url]: https://npmjs.org/package/express -[downloads-image]: https://img.shields.io/npm/dm/express.svg?style=flat -[downloads-url]: https://npmjs.org/package/express -[travis-image]: https://img.shields.io/travis/strongloop/express.svg?style=flat -[travis-url]: https://travis-ci.org/strongloop/express -[coveralls-image]: https://img.shields.io/coveralls/strongloop/express.svg?style=flat -[coveralls-url]: https://coveralls.io/r/strongloop/express?branch=master -[gratipay-image-visionmedia]: https://img.shields.io/gratipay/visionmedia.svg?style=flat -[gratipay-url-visionmedia]: https://gratipay.com/visionmedia/ -[gratipay-image-dougwilson]: https://img.shields.io/gratipay/dougwilson.svg?style=flat -[gratipay-url-dougwilson]: https://gratipay.com/dougwilson/ diff --git a/s4t-server-node/node_modules/express/index.js b/s4t-server-node/node_modules/express/index.js deleted file mode 100644 index 3da3378..0000000 --- a/s4t-server-node/node_modules/express/index.js +++ /dev/null @@ -1,2 +0,0 @@ - -module.exports = require('./lib/express'); diff --git a/s4t-server-node/node_modules/express/lib/application.js b/s4t-server-node/node_modules/express/lib/application.js deleted file mode 100644 index 2fbb550..0000000 --- a/s4t-server-node/node_modules/express/lib/application.js +++ /dev/null @@ -1,571 +0,0 @@ -/** - * Module dependencies. - */ - -var finalhandler = require('finalhandler'); -var flatten = require('./utils').flatten; -var Router = require('./router'); -var methods = require('methods'); -var middleware = require('./middleware/init'); -var query = require('./middleware/query'); -var debug = require('debug')('express:application'); -var View = require('./view'); -var http = require('http'); -var compileETag = require('./utils').compileETag; -var compileQueryParser = require('./utils').compileQueryParser; -var compileTrust = require('./utils').compileTrust; -var deprecate = require('depd')('express'); -var merge = require('utils-merge'); -var resolve = require('path').resolve; -var slice = Array.prototype.slice; - -/** - * Application prototype. - */ - -var app = exports = module.exports = {}; - -/** - * Initialize the server. - * - * - setup default configuration - * - setup default middleware - * - setup route reflection methods - * - * @api private - */ - -app.init = function(){ - this.cache = {}; - this.settings = {}; - this.engines = {}; - this.defaultConfiguration(); -}; - -/** - * Initialize application configuration. - * - * @api private - */ - -app.defaultConfiguration = function(){ - // default settings - this.enable('x-powered-by'); - this.set('etag', 'weak'); - var env = process.env.NODE_ENV || 'development'; - this.set('env', env); - this.set('query parser', 'extended'); - this.set('subdomain offset', 2); - this.set('trust proxy', false); - - debug('booting in %s mode', env); - - // inherit protos - this.on('mount', function(parent){ - this.request.__proto__ = parent.request; - this.response.__proto__ = parent.response; - this.engines.__proto__ = parent.engines; - this.settings.__proto__ = parent.settings; - }); - - // setup locals - this.locals = Object.create(null); - - // top-most app is mounted at / - this.mountpath = '/'; - - // default locals - this.locals.settings = this.settings; - - // default configuration - this.set('view', View); - this.set('views', resolve('views')); - this.set('jsonp callback name', 'callback'); - - if (env === 'production') { - this.enable('view cache'); - } - - Object.defineProperty(this, 'router', { - get: function() { - throw new Error('\'app.router\' is deprecated!\nPlease see the 3.x to 4.x migration guide for details on how to update your app.'); - } - }); -}; - -/** - * lazily adds the base router if it has not yet been added. - * - * We cannot add the base router in the defaultConfiguration because - * it reads app settings which might be set after that has run. - * - * @api private - */ -app.lazyrouter = function() { - if (!this._router) { - this._router = new Router({ - caseSensitive: this.enabled('case sensitive routing'), - strict: this.enabled('strict routing') - }); - - this._router.use(query(this.get('query parser fn'))); - this._router.use(middleware.init(this)); - } -}; - -/** - * Dispatch a req, res pair into the application. Starts pipeline processing. - * - * If no _done_ callback is provided, then default error handlers will respond - * in the event of an error bubbling through the stack. - * - * @api private - */ - -app.handle = function(req, res, done) { - var router = this._router; - - // final handler - done = done || finalhandler(req, res, { - env: this.get('env'), - onerror: logerror.bind(this) - }); - - // no routes - if (!router) { - debug('no routes defined on app'); - done(); - return; - } - - router.handle(req, res, done); -}; - -/** - * Proxy `Router#use()` to add middleware to the app router. - * See Router#use() documentation for details. - * - * If the _fn_ parameter is an express app, then it will be - * mounted at the _route_ specified. - * - * @api public - */ - -app.use = function use(fn) { - var offset = 0; - var path = '/'; - - // default path to '/' - // disambiguate app.use([fn]) - if (typeof fn !== 'function') { - var arg = fn; - - while (Array.isArray(arg) && arg.length !== 0) { - arg = arg[0]; - } - - // first arg is the path - if (typeof arg !== 'function') { - offset = 1; - path = fn; - } - } - - var fns = flatten(slice.call(arguments, offset)); - - if (fns.length === 0) { - throw new TypeError('app.use() requires middleware functions'); - } - - // setup router - this.lazyrouter(); - var router = this._router; - - fns.forEach(function (fn) { - // non-express app - if (!fn || !fn.handle || !fn.set) { - return router.use(path, fn); - } - - debug('.use app under %s', path); - fn.mountpath = path; - fn.parent = this; - - // restore .app property on req and res - router.use(path, function mounted_app(req, res, next) { - var orig = req.app; - fn.handle(req, res, function (err) { - req.__proto__ = orig.request; - res.__proto__ = orig.response; - next(err); - }); - }); - - // mounted an app - fn.emit('mount', this); - }, this); - - return this; -}; - -/** - * Proxy to the app `Router#route()` - * Returns a new `Route` instance for the _path_. - * - * Routes are isolated middleware stacks for specific paths. - * See the Route api docs for details. - * - * @api public - */ - -app.route = function(path){ - this.lazyrouter(); - return this._router.route(path); -}; - -/** - * Register the given template engine callback `fn` - * as `ext`. - * - * By default will `require()` the engine based on the - * file extension. For example if you try to render - * a "foo.jade" file Express will invoke the following internally: - * - * app.engine('jade', require('jade').__express); - * - * For engines that do not provide `.__express` out of the box, - * or if you wish to "map" a different extension to the template engine - * you may use this method. For example mapping the EJS template engine to - * ".html" files: - * - * app.engine('html', require('ejs').renderFile); - * - * In this case EJS provides a `.renderFile()` method with - * the same signature that Express expects: `(path, options, callback)`, - * though note that it aliases this method as `ejs.__express` internally - * so if you're using ".ejs" extensions you dont need to do anything. - * - * Some template engines do not follow this convention, the - * [Consolidate.js](https://github.com/tj/consolidate.js) - * library was created to map all of node's popular template - * engines to follow this convention, thus allowing them to - * work seamlessly within Express. - * - * @param {String} ext - * @param {Function} fn - * @return {app} for chaining - * @api public - */ - -app.engine = function(ext, fn){ - if ('function' != typeof fn) throw new Error('callback function required'); - if ('.' != ext[0]) ext = '.' + ext; - this.engines[ext] = fn; - return this; -}; - -/** - * Proxy to `Router#param()` with one added api feature. The _name_ parameter - * can be an array of names. - * - * See the Router#param() docs for more details. - * - * @param {String|Array} name - * @param {Function} fn - * @return {app} for chaining - * @api public - */ - -app.param = function(name, fn){ - this.lazyrouter(); - - if (Array.isArray(name)) { - name.forEach(function(key) { - this.param(key, fn); - }, this); - return this; - } - - this._router.param(name, fn); - return this; -}; - -/** - * Assign `setting` to `val`, or return `setting`'s value. - * - * app.set('foo', 'bar'); - * app.get('foo'); - * // => "bar" - * - * Mounted servers inherit their parent server's settings. - * - * @param {String} setting - * @param {*} [val] - * @return {Server} for chaining - * @api public - */ - -app.set = function(setting, val){ - if (arguments.length === 1) { - // app.get(setting) - return this.settings[setting]; - } - - // set value - this.settings[setting] = val; - - // trigger matched settings - switch (setting) { - case 'etag': - debug('compile etag %s', val); - this.set('etag fn', compileETag(val)); - break; - case 'query parser': - debug('compile query parser %s', val); - this.set('query parser fn', compileQueryParser(val)); - break; - case 'trust proxy': - debug('compile trust proxy %s', val); - this.set('trust proxy fn', compileTrust(val)); - break; - } - - return this; -}; - -/** - * Return the app's absolute pathname - * based on the parent(s) that have - * mounted it. - * - * For example if the application was - * mounted as "/admin", which itself - * was mounted as "/blog" then the - * return value would be "/blog/admin". - * - * @return {String} - * @api private - */ - -app.path = function(){ - return this.parent - ? this.parent.path() + this.mountpath - : ''; -}; - -/** - * Check if `setting` is enabled (truthy). - * - * app.enabled('foo') - * // => false - * - * app.enable('foo') - * app.enabled('foo') - * // => true - * - * @param {String} setting - * @return {Boolean} - * @api public - */ - -app.enabled = function(setting){ - return !!this.set(setting); -}; - -/** - * Check if `setting` is disabled. - * - * app.disabled('foo') - * // => true - * - * app.enable('foo') - * app.disabled('foo') - * // => false - * - * @param {String} setting - * @return {Boolean} - * @api public - */ - -app.disabled = function(setting){ - return !this.set(setting); -}; - -/** - * Enable `setting`. - * - * @param {String} setting - * @return {app} for chaining - * @api public - */ - -app.enable = function(setting){ - return this.set(setting, true); -}; - -/** - * Disable `setting`. - * - * @param {String} setting - * @return {app} for chaining - * @api public - */ - -app.disable = function(setting){ - return this.set(setting, false); -}; - -/** - * Delegate `.VERB(...)` calls to `router.VERB(...)`. - */ - -methods.forEach(function(method){ - app[method] = function(path){ - if ('get' == method && 1 == arguments.length) return this.set(path); - - this.lazyrouter(); - - var route = this._router.route(path); - route[method].apply(route, slice.call(arguments, 1)); - return this; - }; -}); - -/** - * Special-cased "all" method, applying the given route `path`, - * middleware, and callback to _every_ HTTP method. - * - * @param {String} path - * @param {Function} ... - * @return {app} for chaining - * @api public - */ - -app.all = function(path){ - this.lazyrouter(); - - var route = this._router.route(path); - var args = slice.call(arguments, 1); - methods.forEach(function(method){ - route[method].apply(route, args); - }); - - return this; -}; - -// del -> delete alias - -app.del = deprecate.function(app.delete, 'app.del: Use app.delete instead'); - -/** - * Render the given view `name` name with `options` - * and a callback accepting an error and the - * rendered template string. - * - * Example: - * - * app.render('email', { name: 'Tobi' }, function(err, html){ - * // ... - * }) - * - * @param {String} name - * @param {String|Function} options or fn - * @param {Function} fn - * @api public - */ - -app.render = function(name, options, fn){ - var opts = {}; - var cache = this.cache; - var engines = this.engines; - var view; - - // support callback function as second arg - if ('function' == typeof options) { - fn = options, options = {}; - } - - // merge app.locals - merge(opts, this.locals); - - // merge options._locals - if (options._locals) { - merge(opts, options._locals); - } - - // merge options - merge(opts, options); - - // set .cache unless explicitly provided - opts.cache = null == opts.cache - ? this.enabled('view cache') - : opts.cache; - - // primed cache - if (opts.cache) view = cache[name]; - - // view - if (!view) { - view = new (this.get('view'))(name, { - defaultEngine: this.get('view engine'), - root: this.get('views'), - engines: engines - }); - - if (!view.path) { - var dirs = Array.isArray(view.root) && view.root.length > 1 - ? 'directories "' + view.root.slice(0, -1).join('", "') + '" or "' + view.root[view.root.length - 1] + '"' - : 'directory "' + view.root + '"' - var err = new Error('Failed to lookup view "' + name + '" in views ' + dirs); - err.view = view; - return fn(err); - } - - // prime the cache - if (opts.cache) cache[name] = view; - } - - // render - try { - view.render(opts, fn); - } catch (err) { - fn(err); - } -}; - -/** - * Listen for connections. - * - * A node `http.Server` is returned, with this - * application (which is a `Function`) as its - * callback. If you wish to create both an HTTP - * and HTTPS server you may do so with the "http" - * and "https" modules as shown here: - * - * var http = require('http') - * , https = require('https') - * , express = require('express') - * , app = express(); - * - * http.createServer(app).listen(80); - * https.createServer({ ... }, app).listen(443); - * - * @return {http.Server} - * @api public - */ - -app.listen = function(){ - var server = http.createServer(this); - return server.listen.apply(server, arguments); -}; - -/** -* Log error using console.error. -* -* @param {Error} err -* @api public -*/ - -function logerror(err){ - if (this.get('env') !== 'test') console.error(err.stack || err.toString()); -} diff --git a/s4t-server-node/node_modules/express/lib/express.js b/s4t-server-node/node_modules/express/lib/express.js deleted file mode 100644 index 8a6c284..0000000 --- a/s4t-server-node/node_modules/express/lib/express.js +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter; -var mixin = require('merge-descriptors'); -var proto = require('./application'); -var Route = require('./router/route'); -var Router = require('./router'); -var req = require('./request'); -var res = require('./response'); - -/** - * Expose `createApplication()`. - */ - -exports = module.exports = createApplication; - -/** - * Create an express application. - * - * @return {Function} - * @api public - */ - -function createApplication() { - var app = function(req, res, next) { - app.handle(req, res, next); - }; - - mixin(app, proto); - mixin(app, EventEmitter.prototype); - - app.request = { __proto__: req, app: app }; - app.response = { __proto__: res, app: app }; - app.init(); - return app; -} - -/** - * Expose the prototypes. - */ - -exports.application = proto; -exports.request = req; -exports.response = res; - -/** - * Expose constructors. - */ - -exports.Route = Route; -exports.Router = Router; - -/** - * Expose middleware - */ - -exports.query = require('./middleware/query'); -exports.static = require('serve-static'); - -/** - * Replace removed middleware with an appropriate error message. - */ - -[ - 'json', - 'urlencoded', - 'bodyParser', - 'compress', - 'cookieSession', - 'session', - 'logger', - 'cookieParser', - 'favicon', - 'responseTime', - 'errorHandler', - 'timeout', - 'methodOverride', - 'vhost', - 'csrf', - 'directory', - 'limit', - 'multipart', - 'staticCache', -].forEach(function (name) { - Object.defineProperty(exports, name, { - get: function () { - throw new Error('Most middleware (like ' + name + ') is no longer bundled with Express and must be installed separately. Please see https://github.com/senchalabs/connect#middleware.'); - }, - configurable: true - }); -}); diff --git a/s4t-server-node/node_modules/express/lib/middleware/init.js b/s4t-server-node/node_modules/express/lib/middleware/init.js deleted file mode 100644 index 1e3e903..0000000 --- a/s4t-server-node/node_modules/express/lib/middleware/init.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Initialization middleware, exposing the - * request and response to each other, as well - * as defaulting the X-Powered-By header field. - * - * @param {Function} app - * @return {Function} - * @api private - */ - -exports.init = function(app){ - return function expressInit(req, res, next){ - if (app.enabled('x-powered-by')) res.setHeader('X-Powered-By', 'Express'); - req.res = res; - res.req = req; - req.next = next; - - req.__proto__ = app.request; - res.__proto__ = app.response; - - res.locals = res.locals || Object.create(null); - - next(); - }; -}; - diff --git a/s4t-server-node/node_modules/express/lib/middleware/query.js b/s4t-server-node/node_modules/express/lib/middleware/query.js deleted file mode 100644 index 092bbd9..0000000 --- a/s4t-server-node/node_modules/express/lib/middleware/query.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Module dependencies. - */ - -var parseUrl = require('parseurl'); -var qs = require('qs'); - -/** - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function query(options) { - var queryparse = qs.parse; - - if (typeof options === 'function') { - queryparse = options; - options = undefined; - } - - return function query(req, res, next){ - if (!req.query) { - var val = parseUrl(req).query; - req.query = queryparse(val, options); - } - - next(); - }; -}; diff --git a/s4t-server-node/node_modules/express/lib/request.js b/s4t-server-node/node_modules/express/lib/request.js deleted file mode 100644 index 5cd3900..0000000 --- a/s4t-server-node/node_modules/express/lib/request.js +++ /dev/null @@ -1,467 +0,0 @@ -/** - * Module dependencies. - */ - -var accepts = require('accepts'); -var deprecate = require('depd')('express'); -var isIP = require('net').isIP; -var typeis = require('type-is'); -var http = require('http'); -var fresh = require('fresh'); -var parseRange = require('range-parser'); -var parse = require('parseurl'); -var proxyaddr = require('proxy-addr'); - -/** - * Request prototype. - */ - -var req = exports = module.exports = { - __proto__: http.IncomingMessage.prototype -}; - -/** - * Return request header. - * - * The `Referrer` header field is special-cased, - * both `Referrer` and `Referer` are interchangeable. - * - * Examples: - * - * req.get('Content-Type'); - * // => "text/plain" - * - * req.get('content-type'); - * // => "text/plain" - * - * req.get('Something'); - * // => undefined - * - * Aliased as `req.header()`. - * - * @param {String} name - * @return {String} - * @api public - */ - -req.get = -req.header = function(name){ - switch (name = name.toLowerCase()) { - case 'referer': - case 'referrer': - return this.headers.referrer - || this.headers.referer; - default: - return this.headers[name]; - } -}; - -/** - * To do: update docs. - * - * 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", a comma-delimted list such as "json, html, text/plain", - * an argument list such as `"json", "html", "text/plain"`, - * 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 - * req.accepts('html'); - * // => "html" - * - * // Accept: text/*, application/json - * req.accepts('html'); - * // => "html" - * req.accepts('text/html'); - * // => "text/html" - * req.accepts('json, text'); - * // => "json" - * req.accepts('application/json'); - * // => "application/json" - * - * // Accept: text/*, application/json - * req.accepts('image/png'); - * req.accepts('png'); - * // => undefined - * - * // Accept: text/*;q=.5, application/json - * req.accepts(['html', 'json']); - * req.accepts('html', 'json'); - * req.accepts('html, json'); - * // => "json" - * - * @param {String|Array} type(s) - * @return {String} - * @api public - */ - -req.accepts = function(){ - var accept = accepts(this); - return accept.types.apply(accept, arguments); -}; - -/** - * Check if the given `encoding`s are accepted. - * - * @param {String} ...encoding - * @return {Boolean} - * @api public - */ - -req.acceptsEncodings = function(){ - var accept = accepts(this); - return accept.encodings.apply(accept, arguments); -}; - -req.acceptsEncoding = deprecate.function(req.acceptsEncodings, - 'req.acceptsEncoding: Use acceptsEncodings instead'); - -/** - * Check if the given `charset`s are acceptable, - * otherwise you should respond with 406 "Not Acceptable". - * - * @param {String} ...charset - * @return {Boolean} - * @api public - */ - -req.acceptsCharsets = function(){ - var accept = accepts(this); - return accept.charsets.apply(accept, arguments); -}; - -req.acceptsCharset = deprecate.function(req.acceptsCharsets, - 'req.acceptsCharset: Use acceptsCharsets instead'); - -/** - * Check if the given `lang`s are acceptable, - * otherwise you should respond with 406 "Not Acceptable". - * - * @param {String} ...lang - * @return {Boolean} - * @api public - */ - -req.acceptsLanguages = function(){ - var accept = accepts(this); - return accept.languages.apply(accept, arguments); -}; - -req.acceptsLanguage = deprecate.function(req.acceptsLanguages, - 'req.acceptsLanguage: Use acceptsLanguages instead'); - -/** - * Parse Range header field, - * capping to the given `size`. - * - * Unspecified ranges such as "0-" require - * knowledge of your resource length. In - * the case of a byte range this is of course - * the total number of bytes. If the Range - * header field is not given `null` is returned, - * `-1` when unsatisfiable, `-2` when syntactically invalid. - * - * NOTE: remember that ranges are inclusive, so - * for example "Range: users=0-3" should respond - * with 4 users when available, not 3. - * - * @param {Number} size - * @return {Array} - * @api public - */ - -req.range = function(size){ - var range = this.get('Range'); - if (!range) return; - return parseRange(size, range); -}; - -/** - * Return the value of param `name` when present or `defaultValue`. - * - * - Checks route placeholders, ex: _/user/:id_ - * - Checks body params, ex: id=12, {"id":12} - * - Checks query string params, ex: ?id=12 - * - * To utilize request bodies, `req.body` - * should be an object. This can be done by using - * the `bodyParser()` middleware. - * - * @param {String} name - * @param {Mixed} [defaultValue] - * @return {String} - * @api public - */ - -req.param = function param(name, defaultValue) { - var params = this.params || {}; - var body = this.body || {}; - var query = this.query || {}; - - var args = arguments.length === 1 - ? 'name' - : 'name, default'; - deprecate('req.param(' + args + '): Use req.params, req.body, or req.query instead'); - - if (null != params[name] && params.hasOwnProperty(name)) return params[name]; - if (null != body[name]) return body[name]; - if (null != query[name]) return query[name]; - - return defaultValue; -}; - -/** - * Check if the incoming request contains the "Content-Type" - * header field, and it contains the give mime `type`. - * - * Examples: - * - * // With Content-Type: text/html; charset=utf-8 - * req.is('html'); - * req.is('text/html'); - * req.is('text/*'); - * // => true - * - * // When Content-Type is application/json - * req.is('json'); - * req.is('application/json'); - * req.is('application/*'); - * // => true - * - * req.is('html'); - * // => false - * - * @param {String} type - * @return {Boolean} - * @api public - */ - -req.is = function(types){ - if (!Array.isArray(types)) types = [].slice.call(arguments); - return typeis(this, types); -}; - -/** - * Return the protocol string "http" or "https" - * when requested with TLS. When the "trust proxy" - * setting trusts the socket address, the - * "X-Forwarded-Proto" header field will be trusted - * and used if present. - * - * If you're running behind a reverse proxy that - * supplies https for you this may be enabled. - * - * @return {String} - * @api public - */ - -defineGetter(req, 'protocol', function protocol(){ - var proto = this.connection.encrypted - ? 'https' - : 'http'; - var trust = this.app.get('trust proxy fn'); - - if (!trust(this.connection.remoteAddress)) { - return proto; - } - - // Note: X-Forwarded-Proto is normally only ever a - // single value, but this is to be safe. - proto = this.get('X-Forwarded-Proto') || proto; - return proto.split(/\s*,\s*/)[0]; -}); - -/** - * Short-hand for: - * - * req.protocol == 'https' - * - * @return {Boolean} - * @api public - */ - -defineGetter(req, 'secure', function secure(){ - return 'https' == this.protocol; -}); - -/** - * Return the remote address from the trusted proxy. - * - * The is the remote address on the socket unless - * "trust proxy" is set. - * - * @return {String} - * @api public - */ - -defineGetter(req, 'ip', function ip(){ - var trust = this.app.get('trust proxy fn'); - return proxyaddr(this, trust); -}); - -/** - * When "trust proxy" is set, trusted proxy addresses + client. - * - * For example if the value were "client, proxy1, proxy2" - * you would receive the array `["client", "proxy1", "proxy2"]` - * where "proxy2" is the furthest down-stream and "proxy1" and - * "proxy2" were trusted. - * - * @return {Array} - * @api public - */ - -defineGetter(req, 'ips', function ips() { - var trust = this.app.get('trust proxy fn'); - var addrs = proxyaddr.all(this, trust); - return addrs.slice(1).reverse(); -}); - -/** - * Return subdomains as an array. - * - * Subdomains are the dot-separated parts of the host before the main domain of - * the app. By default, the domain of the app is assumed to be the last two - * parts of the host. This can be changed by setting "subdomain offset". - * - * For example, if the domain is "tobi.ferrets.example.com": - * If "subdomain offset" is not set, req.subdomains is `["ferrets", "tobi"]`. - * If "subdomain offset" is 3, req.subdomains is `["tobi"]`. - * - * @return {Array} - * @api public - */ - -defineGetter(req, 'subdomains', function subdomains() { - var hostname = this.hostname; - - if (!hostname) return []; - - var offset = this.app.get('subdomain offset'); - var subdomains = !isIP(hostname) - ? hostname.split('.').reverse() - : [hostname]; - - return subdomains.slice(offset); -}); - -/** - * Short-hand for `url.parse(req.url).pathname`. - * - * @return {String} - * @api public - */ - -defineGetter(req, 'path', function path() { - return parse(this).pathname; -}); - -/** - * Parse the "Host" header field to a hostname. - * - * When the "trust proxy" setting trusts the socket - * address, the "X-Forwarded-Host" header field will - * be trusted. - * - * @return {String} - * @api public - */ - -defineGetter(req, 'hostname', function hostname(){ - var trust = this.app.get('trust proxy fn'); - var host = this.get('X-Forwarded-Host'); - - if (!host || !trust(this.connection.remoteAddress)) { - host = this.get('Host'); - } - - if (!host) return; - - // IPv6 literal support - var offset = host[0] === '[' - ? host.indexOf(']') + 1 - : 0; - var index = host.indexOf(':', offset); - - return ~index - ? host.substring(0, index) - : host; -}); - -// TODO: change req.host to return host in next major - -defineGetter(req, 'host', deprecate.function(function host(){ - return this.hostname; -}, 'req.host: Use req.hostname instead')); - -/** - * Check if the request is fresh, aka - * Last-Modified and/or the ETag - * still match. - * - * @return {Boolean} - * @api public - */ - -defineGetter(req, 'fresh', function(){ - var method = this.method; - var s = this.res.statusCode; - - // GET or HEAD for weak freshness validation only - if ('GET' != method && 'HEAD' != method) return false; - - // 2xx or 304 as per rfc2616 14.26 - if ((s >= 200 && s < 300) || 304 == s) { - return fresh(this.headers, (this.res._headers || {})); - } - - return false; -}); - -/** - * Check if the request is stale, aka - * "Last-Modified" and / or the "ETag" for the - * resource has changed. - * - * @return {Boolean} - * @api public - */ - -defineGetter(req, 'stale', function stale(){ - return !this.fresh; -}); - -/** - * Check if the request was an _XMLHttpRequest_. - * - * @return {Boolean} - * @api public - */ - -defineGetter(req, 'xhr', function xhr(){ - var val = this.get('X-Requested-With') || ''; - return 'xmlhttprequest' == val.toLowerCase(); -}); - -/** - * Helper function for creating a getter on an object. - * - * @param {Object} obj - * @param {String} name - * @param {Function} getter - * @api private - */ -function defineGetter(obj, name, getter) { - Object.defineProperty(obj, name, { - configurable: true, - enumerable: true, - get: getter - }); -}; diff --git a/s4t-server-node/node_modules/express/lib/response.js b/s4t-server-node/node_modules/express/lib/response.js deleted file mode 100644 index 50c313e..0000000 --- a/s4t-server-node/node_modules/express/lib/response.js +++ /dev/null @@ -1,1024 +0,0 @@ -/** - * Module dependencies. - */ - -var contentDisposition = require('content-disposition'); -var deprecate = require('depd')('express'); -var escapeHtml = require('escape-html'); -var http = require('http'); -var isAbsolute = require('./utils').isAbsolute; -var onFinished = require('on-finished'); -var path = require('path'); -var merge = require('utils-merge'); -var sign = require('cookie-signature').sign; -var normalizeType = require('./utils').normalizeType; -var normalizeTypes = require('./utils').normalizeTypes; -var setCharset = require('./utils').setCharset; -var statusCodes = http.STATUS_CODES; -var cookie = require('cookie'); -var send = require('send'); -var extname = path.extname; -var mime = send.mime; -var resolve = path.resolve; -var vary = require('vary'); - -/** - * Response prototype. - */ - -var res = module.exports = { - __proto__: http.ServerResponse.prototype -}; - -/** - * Set status `code`. - * - * @param {Number} code - * @return {ServerResponse} - * @api public - */ - -res.status = function(code){ - this.statusCode = code; - return this; -}; - -/** - * Set Link header field with the given `links`. - * - * Examples: - * - * res.links({ - * next: 'http://api.example.com/users?page=2', - * last: 'http://api.example.com/users?page=5' - * }); - * - * @param {Object} links - * @return {ServerResponse} - * @api public - */ - -res.links = function(links){ - var link = this.get('Link') || ''; - if (link) link += ', '; - return this.set('Link', link + Object.keys(links).map(function(rel){ - return '<' + links[rel] + '>; rel="' + rel + '"'; - }).join(', ')); -}; - -/** - * Send a response. - * - * Examples: - * - * res.send(new Buffer('wahoo')); - * res.send({ some: 'json' }); - * res.send('

some html

'); - * - * @param {string|number|boolean|object|Buffer} body - * @api public - */ - -res.send = function send(body) { - var chunk = body; - var encoding; - var len; - var req = this.req; - var type; - - // settings - var app = this.app; - - // allow status / body - if (arguments.length === 2) { - // res.send(body, status) backwards compat - if (typeof arguments[0] !== 'number' && typeof arguments[1] === 'number') { - deprecate('res.send(body, status): Use res.status(status).send(body) instead'); - this.statusCode = arguments[1]; - } else { - deprecate('res.send(status, body): Use res.status(status).send(body) instead'); - this.statusCode = arguments[0]; - chunk = arguments[1]; - } - } - - // disambiguate res.send(status) and res.send(status, num) - if (typeof chunk === 'number' && arguments.length === 1) { - // res.send(status) will set status message as text string - if (!this.get('Content-Type')) { - this.type('txt'); - } - - deprecate('res.send(status): Use res.sendStatus(status) instead'); - this.statusCode = chunk; - chunk = http.STATUS_CODES[chunk]; - } - - switch (typeof chunk) { - // string defaulting to html - case 'string': - if (!this.get('Content-Type')) { - this.type('html'); - } - break; - case 'boolean': - case 'number': - case 'object': - if (chunk === null) { - chunk = ''; - } else if (Buffer.isBuffer(chunk)) { - if (!this.get('Content-Type')) { - this.type('bin'); - } - } else { - return this.json(chunk); - } - break; - } - - // write strings in utf-8 - if (typeof chunk === 'string') { - encoding = 'utf8'; - type = this.get('Content-Type'); - - // reflect this in content-type - if (typeof type === 'string') { - this.set('Content-Type', setCharset(type, 'utf-8')); - } - } - - // populate Content-Length - if (chunk !== undefined) { - if (!Buffer.isBuffer(chunk)) { - // convert chunk to Buffer; saves later double conversions - chunk = new Buffer(chunk, encoding); - encoding = undefined; - } - - len = chunk.length; - this.set('Content-Length', len); - } - - // method check - var isHead = req.method === 'HEAD'; - - // ETag support - if (len !== undefined && (isHead || req.method === 'GET')) { - var etag = app.get('etag fn'); - if (etag && !this.get('ETag')) { - etag = etag(chunk, encoding); - etag && this.set('ETag', etag); - } - } - - // freshness - if (req.fresh) this.statusCode = 304; - - // strip irrelevant headers - if (204 == this.statusCode || 304 == this.statusCode) { - this.removeHeader('Content-Type'); - this.removeHeader('Content-Length'); - this.removeHeader('Transfer-Encoding'); - chunk = ''; - } - - if (isHead) { - // skip body for HEAD - this.end(); - } else { - // respond - this.end(chunk, encoding); - } - - return this; -}; - -/** - * Send JSON response. - * - * Examples: - * - * res.json(null); - * res.json({ user: 'tj' }); - * - * @param {string|number|boolean|object} obj - * @api public - */ - -res.json = function json(obj) { - var val = obj; - - // allow status / body - if (arguments.length === 2) { - // res.json(body, status) backwards compat - if (typeof arguments[1] === 'number') { - deprecate('res.json(obj, status): Use res.status(status).json(obj) instead'); - this.statusCode = arguments[1]; - } else { - deprecate('res.json(status, obj): Use res.status(status).json(obj) instead'); - this.statusCode = arguments[0]; - val = arguments[1]; - } - } - - // settings - var app = this.app; - var replacer = app.get('json replacer'); - var spaces = app.get('json spaces'); - var body = JSON.stringify(val, replacer, spaces); - - // content-type - if (!this.get('Content-Type')) { - this.set('Content-Type', 'application/json'); - } - - return this.send(body); -}; - -/** - * Send JSON response with JSONP callback support. - * - * Examples: - * - * res.jsonp(null); - * res.jsonp({ user: 'tj' }); - * - * @param {string|number|boolean|object} obj - * @api public - */ - -res.jsonp = function jsonp(obj) { - var val = obj; - - // allow status / body - if (arguments.length === 2) { - // res.json(body, status) backwards compat - if (typeof arguments[1] === 'number') { - deprecate('res.jsonp(obj, status): Use res.status(status).json(obj) instead'); - this.statusCode = arguments[1]; - } else { - deprecate('res.jsonp(status, obj): Use res.status(status).jsonp(obj) instead'); - this.statusCode = arguments[0]; - val = arguments[1]; - } - } - - // settings - var app = this.app; - var replacer = app.get('json replacer'); - var spaces = app.get('json spaces'); - var body = JSON.stringify(val, replacer, spaces); - var callback = this.req.query[app.get('jsonp callback name')]; - - // content-type - if (!this.get('Content-Type')) { - this.set('X-Content-Type-Options', 'nosniff'); - this.set('Content-Type', 'application/json'); - } - - // fixup callback - if (Array.isArray(callback)) { - callback = callback[0]; - } - - // jsonp - if (typeof callback === 'string' && callback.length !== 0) { - this.charset = 'utf-8'; - this.set('X-Content-Type-Options', 'nosniff'); - this.set('Content-Type', 'text/javascript'); - - // restrict callback charset - callback = callback.replace(/[^\[\]\w$.]/g, ''); - - // replace chars not allowed in JavaScript that are in JSON - body = body - .replace(/\u2028/g, '\\u2028') - .replace(/\u2029/g, '\\u2029'); - - // the /**/ is a specific security mitigation for "Rosetta Flash JSONP abuse" - // the typeof check is just to reduce client error noise - body = '/**/ typeof ' + callback + ' === \'function\' && ' + callback + '(' + body + ');'; - } - - return this.send(body); -}; - -/** - * Send given HTTP status code. - * - * Sets the response status to `statusCode` and the body of the - * response to the standard description from node's http.STATUS_CODES - * or the statusCode number if no description. - * - * Examples: - * - * res.sendStatus(200); - * - * @param {number} statusCode - * @api public - */ - -res.sendStatus = function sendStatus(statusCode) { - var body = http.STATUS_CODES[statusCode] || String(statusCode); - - this.statusCode = statusCode; - this.type('txt'); - - return this.send(body); -}; - -/** - * Transfer the file at the given `path`. - * - * Automatically sets the _Content-Type_ response header field. - * The callback `fn(err)` is invoked when the transfer is complete - * or when an error occurs. Be sure to check `res.sentHeader` - * if you wish to attempt responding, as the header and some data - * may have already been transferred. - * - * Options: - * - * - `maxAge` defaulting to 0 (can be string converted by `ms`) - * - `root` root directory for relative filenames - * - `headers` object of headers to serve with file - * - `dotfiles` serve dotfiles, defaulting to false; can be `"allow"` to send them - * - * Other options are passed along to `send`. - * - * Examples: - * - * The following example illustrates how `res.sendFile()` may - * be used as an alternative for the `static()` middleware for - * dynamic situations. The code backing `res.sendFile()` is actually - * the same code, so HTTP cache support etc is identical. - * - * app.get('/user/:uid/photos/:file', function(req, res){ - * var uid = req.params.uid - * , file = req.params.file; - * - * req.user.mayViewFilesFrom(uid, function(yes){ - * if (yes) { - * res.sendFile('/uploads/' + uid + '/' + file); - * } else { - * res.send(403, 'Sorry! you cant see that.'); - * } - * }); - * }); - * - * @api public - */ - -res.sendFile = function sendFile(path, options, fn) { - var req = this.req; - var res = this; - var next = req.next; - - if (!path) { - throw new TypeError('path argument is required to res.sendFile'); - } - - // support function as second arg - if (typeof options === 'function') { - fn = options; - options = {}; - } - - options = options || {}; - - if (!options.root && !isAbsolute(path)) { - throw new TypeError('path must be absolute or specify root to res.sendFile'); - } - - // create file stream - var pathname = encodeURI(path); - var file = send(req, pathname, options); - - // transfer - sendfile(res, file, options, function (err) { - if (fn) return fn(err); - if (err && err.code === 'EISDIR') return next(); - - // next() all but write errors - if (err && err.code !== 'ECONNABORT' && err.syscall !== 'write') { - next(err); - } - }); -}; - -/** - * Transfer the file at the given `path`. - * - * Automatically sets the _Content-Type_ response header field. - * The callback `fn(err)` is invoked when the transfer is complete - * or when an error occurs. Be sure to check `res.sentHeader` - * if you wish to attempt responding, as the header and some data - * may have already been transferred. - * - * Options: - * - * - `maxAge` defaulting to 0 (can be string converted by `ms`) - * - `root` root directory for relative filenames - * - `headers` object of headers to serve with file - * - `dotfiles` serve dotfiles, defaulting to false; can be `"allow"` to send them - * - * Other options are passed along to `send`. - * - * Examples: - * - * The following example illustrates how `res.sendfile()` may - * be used as an alternative for the `static()` middleware for - * dynamic situations. The code backing `res.sendfile()` is actually - * the same code, so HTTP cache support etc is identical. - * - * app.get('/user/:uid/photos/:file', function(req, res){ - * var uid = req.params.uid - * , file = req.params.file; - * - * req.user.mayViewFilesFrom(uid, function(yes){ - * if (yes) { - * res.sendfile('/uploads/' + uid + '/' + file); - * } else { - * res.send(403, 'Sorry! you cant see that.'); - * } - * }); - * }); - * - * @api public - */ - -res.sendfile = function(path, options, fn){ - var req = this.req; - var res = this; - var next = req.next; - - // support function as second arg - if (typeof options === 'function') { - fn = options; - options = {}; - } - - options = options || {}; - - // create file stream - var file = send(req, path, options); - - // transfer - sendfile(res, file, options, function (err) { - if (fn) return fn(err); - if (err && err.code === 'EISDIR') return next(); - - // next() all but write errors - if (err && err.code !== 'ECONNABORT' && err.syscall !== 'write') { - next(err); - } - }); -}; - -res.sendfile = deprecate.function(res.sendfile, - 'res.sendfile: Use res.sendFile instead'); - -/** - * Transfer the file at the given `path` as an attachment. - * - * Optionally providing an alternate attachment `filename`, - * and optional callback `fn(err)`. The callback is invoked - * when the data transfer is complete, or when an error has - * ocurred. Be sure to check `res.headersSent` if you plan to respond. - * - * This method uses `res.sendfile()`. - * - * @api public - */ - -res.download = function download(path, filename, fn) { - // support function as second arg - if (typeof filename === 'function') { - fn = filename; - filename = null; - } - - filename = filename || path; - - // set Content-Disposition when file is sent - var headers = { - 'Content-Disposition': contentDisposition(filename) - }; - - // Resolve the full path for sendFile - var fullPath = resolve(path); - - return this.sendFile(fullPath, { headers: headers }, fn); -}; - -/** - * Set _Content-Type_ response header with `type` through `mime.lookup()` - * when it does not contain "/", or set the Content-Type to `type` otherwise. - * - * Examples: - * - * res.type('.html'); - * res.type('html'); - * res.type('json'); - * res.type('application/json'); - * res.type('png'); - * - * @param {String} type - * @return {ServerResponse} for chaining - * @api public - */ - -res.contentType = -res.type = function(type){ - return this.set('Content-Type', ~type.indexOf('/') - ? type - : mime.lookup(type)); -}; - -/** - * Respond to the Acceptable formats using an `obj` - * of mime-type callbacks. - * - * This method uses `req.accepted`, an array of - * acceptable types ordered by their quality values. - * When "Accept" is not present the _first_ callback - * is invoked, otherwise the first match is used. When - * no match is performed the server responds with - * 406 "Not Acceptable". - * - * Content-Type is set for you, however if you choose - * you may alter this within the callback using `res.type()` - * or `res.set('Content-Type', ...)`. - * - * res.format({ - * 'text/plain': function(){ - * res.send('hey'); - * }, - * - * 'text/html': function(){ - * res.send('

hey

'); - * }, - * - * 'appliation/json': function(){ - * res.send({ message: 'hey' }); - * } - * }); - * - * In addition to canonicalized MIME types you may - * also use extnames mapped to these types: - * - * res.format({ - * text: function(){ - * res.send('hey'); - * }, - * - * html: function(){ - * res.send('

hey

'); - * }, - * - * json: function(){ - * res.send({ message: 'hey' }); - * } - * }); - * - * By default Express passes an `Error` - * with a `.status` of 406 to `next(err)` - * if a match is not made. If you provide - * a `.default` callback it will be invoked - * instead. - * - * @param {Object} obj - * @return {ServerResponse} for chaining - * @api public - */ - -res.format = function(obj){ - var req = this.req; - var next = req.next; - - var fn = obj.default; - if (fn) delete obj.default; - var keys = Object.keys(obj); - - var key = req.accepts(keys); - - this.vary("Accept"); - - if (key) { - this.set('Content-Type', normalizeType(key).value); - obj[key](req, this, next); - } else if (fn) { - fn(); - } else { - var err = new Error('Not Acceptable'); - err.status = 406; - err.types = normalizeTypes(keys).map(function(o){ return o.value }); - next(err); - } - - return this; -}; - -/** - * Set _Content-Disposition_ header to _attachment_ with optional `filename`. - * - * @param {String} filename - * @return {ServerResponse} - * @api public - */ - -res.attachment = function attachment(filename) { - if (filename) { - this.type(extname(filename)); - } - - this.set('Content-Disposition', contentDisposition(filename)); - - return this; -}; - -/** - * Append additional header `field` with value `val`. - * - * Example: - * - * res.append('Link', ['', '']); - * res.append('Set-Cookie', 'foo=bar; Path=/; HttpOnly'); - * res.append('Warning', '199 Miscellaneous warning'); - * - * @param {String} field - * @param {String|Array} val - * @return {ServerResponse} for chaining - * @api public - */ - -res.append = function append(field, val) { - var prev = this.get(field); - var value = val; - - if (prev) { - // concat the new and prev vals - value = Array.isArray(prev) ? prev.concat(val) - : Array.isArray(val) ? [prev].concat(val) - : [prev, val]; - } - - return this.set(field, value); -}; - -/** - * Set header `field` to `val`, or pass - * an object of header fields. - * - * Examples: - * - * res.set('Foo', ['bar', 'baz']); - * res.set('Accept', 'application/json'); - * res.set({ Accept: 'text/plain', 'X-API-Key': 'tobi' }); - * - * Aliased as `res.header()`. - * - * @param {String|Object|Array} field - * @param {String} val - * @return {ServerResponse} for chaining - * @api public - */ - -res.set = -res.header = function header(field, val) { - if (arguments.length === 2) { - if (Array.isArray(val)) val = val.map(String); - else val = String(val); - if ('content-type' == field.toLowerCase() && !/;\s*charset\s*=/.test(val)) { - var charset = mime.charsets.lookup(val.split(';')[0]); - if (charset) val += '; charset=' + charset.toLowerCase(); - } - this.setHeader(field, val); - } else { - for (var key in field) { - this.set(key, field[key]); - } - } - return this; -}; - -/** - * Get value for header `field`. - * - * @param {String} field - * @return {String} - * @api public - */ - -res.get = function(field){ - return this.getHeader(field); -}; - -/** - * Clear cookie `name`. - * - * @param {String} name - * @param {Object} options - * @return {ServerResponse} for chaining - * @api public - */ - -res.clearCookie = function(name, options){ - var opts = { expires: new Date(1), path: '/' }; - return this.cookie(name, '', options - ? merge(opts, options) - : opts); -}; - -/** - * Set cookie `name` to `val`, with the given `options`. - * - * Options: - * - * - `maxAge` max-age in milliseconds, converted to `expires` - * - `signed` sign the cookie - * - `path` defaults to "/" - * - * Examples: - * - * // "Remember Me" for 15 minutes - * res.cookie('rememberme', '1', { expires: new Date(Date.now() + 900000), httpOnly: true }); - * - * // save as above - * res.cookie('rememberme', '1', { maxAge: 900000, httpOnly: true }) - * - * @param {String} name - * @param {String|Object} val - * @param {Options} options - * @return {ServerResponse} for chaining - * @api public - */ - -res.cookie = function(name, val, options){ - options = merge({}, options); - var secret = this.req.secret; - var signed = options.signed; - if (signed && !secret) throw new Error('cookieParser("secret") required for signed cookies'); - if ('number' == typeof val) val = val.toString(); - if ('object' == typeof val) val = 'j:' + JSON.stringify(val); - if (signed) val = 's:' + sign(val, secret); - if ('maxAge' in options) { - options.expires = new Date(Date.now() + options.maxAge); - options.maxAge /= 1000; - } - if (null == options.path) options.path = '/'; - var headerVal = cookie.serialize(name, String(val), options); - - // supports multiple 'res.cookie' calls by getting previous value - var prev = this.get('Set-Cookie'); - if (prev) { - if (Array.isArray(prev)) { - headerVal = prev.concat(headerVal); - } else { - headerVal = [prev, headerVal]; - } - } - this.set('Set-Cookie', headerVal); - return this; -}; - - -/** - * Set the location header to `url`. - * - * The given `url` can also be "back", which redirects - * to the _Referrer_ or _Referer_ headers or "/". - * - * Examples: - * - * res.location('/foo/bar').; - * res.location('http://example.com'); - * res.location('../login'); - * - * @param {String} url - * @return {ServerResponse} for chaining - * @api public - */ - -res.location = function(url){ - var req = this.req; - - // "back" is an alias for the referrer - if ('back' == url) url = req.get('Referrer') || '/'; - - // Respond - this.set('Location', url); - return this; -}; - -/** - * Redirect to the given `url` with optional response `status` - * defaulting to 302. - * - * The resulting `url` is determined by `res.location()`, so - * it will play nicely with mounted apps, relative paths, - * `"back"` etc. - * - * Examples: - * - * res.redirect('/foo/bar'); - * res.redirect('http://example.com'); - * res.redirect(301, 'http://example.com'); - * res.redirect('../login'); // /blog/post/1 -> /blog/login - * - * @api public - */ - -res.redirect = function redirect(url) { - var address = url; - var body; - var status = 302; - - // allow status / url - if (arguments.length === 2) { - if (typeof arguments[0] === 'number') { - status = arguments[0]; - address = arguments[1]; - } else { - deprecate('res.redirect(url, status): Use res.redirect(status, url) instead'); - status = arguments[1]; - } - } - - // Set location header - this.location(address); - address = this.get('Location'); - - // Support text/{plain,html} by default - this.format({ - text: function(){ - body = statusCodes[status] + '. Redirecting to ' + encodeURI(address); - }, - - html: function(){ - var u = escapeHtml(address); - body = '

' + statusCodes[status] + '. Redirecting to ' + u + '

'; - }, - - default: function(){ - body = ''; - } - }); - - // Respond - this.statusCode = status; - this.set('Content-Length', Buffer.byteLength(body)); - - if (this.req.method === 'HEAD') { - this.end(); - } - - this.end(body); -}; - -/** - * Add `field` to Vary. If already present in the Vary set, then - * this call is simply ignored. - * - * @param {Array|String} field - * @return {ServerResponse} for chaining - * @api public - */ - -res.vary = function(field){ - // checks for back-compat - if (!field || (Array.isArray(field) && !field.length)) { - deprecate('res.vary(): Provide a field name'); - return this; - } - - vary(this, field); - - return this; -}; - -/** - * Render `view` with the given `options` and optional callback `fn`. - * When a callback function is given a response will _not_ be made - * automatically, otherwise a response of _200_ and _text/html_ is given. - * - * Options: - * - * - `cache` boolean hinting to the engine it should cache - * - `filename` filename of the view being rendered - * - * @api public - */ - -res.render = function(view, options, fn){ - options = options || {}; - var self = this; - var req = this.req; - var app = req.app; - - // support callback function as second arg - if ('function' == typeof options) { - fn = options, options = {}; - } - - // merge res.locals - options._locals = self.locals; - - // default callback to respond - fn = fn || function(err, str){ - if (err) return req.next(err); - self.send(str); - }; - - // render - app.render(view, options, fn); -}; - -// pipe the send file stream -function sendfile(res, file, options, callback) { - var done = false; - var streaming; - - // request aborted - function onaborted() { - if (done) return; - done = true; - - var err = new Error('Request aborted'); - err.code = 'ECONNABORT'; - callback(err); - } - - // directory - function ondirectory() { - if (done) return; - done = true; - - var err = new Error('EISDIR, read'); - err.code = 'EISDIR'; - callback(err); - } - - // errors - function onerror(err) { - if (done) return; - done = true; - callback(err); - } - - // ended - function onend() { - if (done) return; - done = true; - callback(); - } - - // file - function onfile() { - streaming = false; - } - - // finished - function onfinish(err) { - if (err) return onerror(err); - if (done) return; - - setImmediate(function () { - if (streaming !== false && !done) { - onaborted(); - return; - } - - if (done) return; - done = true; - callback(); - }); - } - - // streaming - function onstream() { - streaming = true; - } - - file.on('directory', ondirectory); - file.on('end', onend); - file.on('error', onerror); - file.on('file', onfile); - file.on('stream', onstream); - onFinished(res, onfinish); - - if (options.headers) { - // set headers on successful transfer - file.on('headers', function headers(res) { - var obj = options.headers; - var keys = Object.keys(obj); - - for (var i = 0; i < keys.length; i++) { - var k = keys[i]; - res.setHeader(k, obj[k]); - } - }); - } - - // pipe - file.pipe(res); -} diff --git a/s4t-server-node/node_modules/express/lib/router/index.js b/s4t-server-node/node_modules/express/lib/router/index.js deleted file mode 100644 index 209f881..0000000 --- a/s4t-server-node/node_modules/express/lib/router/index.js +++ /dev/null @@ -1,630 +0,0 @@ - -/** - * Module dependencies. - */ - -var Route = require('./route'); -var Layer = require('./layer'); -var methods = require('methods'); -var mixin = require('utils-merge'); -var debug = require('debug')('express:router'); -var deprecate = require('depd')('express'); -var parseUrl = require('parseurl'); -var utils = require('../utils'); - -/** - * Module variables. - */ - -var objectRegExp = /^\[object (\S+)\]$/; -var slice = Array.prototype.slice; -var toString = Object.prototype.toString; - -/** - * Initialize a new `Router` with the given `options`. - * - * @param {Object} options - * @return {Router} which is an callable function - * @api public - */ - -var proto = module.exports = function(options) { - options = options || {}; - - function router(req, res, next) { - router.handle(req, res, next); - } - - // mixin Router class functions - router.__proto__ = proto; - - router.params = {}; - router._params = []; - router.caseSensitive = options.caseSensitive; - router.mergeParams = options.mergeParams; - router.strict = options.strict; - router.stack = []; - - return router; -}; - -/** - * Map the given param placeholder `name`(s) to the given callback. - * - * Parameter mapping is used to provide pre-conditions to routes - * which use normalized placeholders. For example a _:user_id_ parameter - * could automatically load a user's information from the database without - * any additional code, - * - * The callback uses the same signature as middleware, the only difference - * being that the value of the placeholder is passed, in this case the _id_ - * of the user. Once the `next()` function is invoked, just like middleware - * it will continue on to execute the route, or subsequent parameter functions. - * - * Just like in middleware, you must either respond to the request or call next - * to avoid stalling the request. - * - * app.param('user_id', function(req, res, next, id){ - * User.find(id, function(err, user){ - * if (err) { - * return next(err); - * } else if (!user) { - * return next(new Error('failed to load user')); - * } - * req.user = user; - * next(); - * }); - * }); - * - * @param {String} name - * @param {Function} fn - * @return {app} for chaining - * @api public - */ - -proto.param = function param(name, fn) { - // param logic - if (typeof name === 'function') { - deprecate('router.param(fn): Refactor to use path params'); - this._params.push(name); - return; - } - - // apply param functions - var params = this._params; - var len = params.length; - var ret; - - if (name[0] === ':') { - deprecate('router.param(' + JSON.stringify(name) + ', fn): Use router.param(' + JSON.stringify(name.substr(1)) + ', fn) instead'); - name = name.substr(1); - } - - for (var i = 0; i < len; ++i) { - if (ret = params[i](name, fn)) { - fn = ret; - } - } - - // ensure we end up with a - // middleware function - if ('function' != typeof fn) { - throw new Error('invalid param() call for ' + name + ', got ' + fn); - } - - (this.params[name] = this.params[name] || []).push(fn); - return this; -}; - -/** - * Dispatch a req, res into the router. - * - * @api private - */ - -proto.handle = function(req, res, done) { - var self = this; - - debug('dispatching %s %s', req.method, req.url); - - var search = 1 + req.url.indexOf('?'); - var pathlength = search ? search - 1 : req.url.length; - var fqdn = req.url[0] !== '/' && 1 + req.url.substr(0, pathlength).indexOf('://'); - var protohost = fqdn ? req.url.substr(0, req.url.indexOf('/', 2 + fqdn)) : ''; - var idx = 0; - var removed = ''; - var slashAdded = false; - var paramcalled = {}; - - // store options for OPTIONS request - // only used if OPTIONS request - var options = []; - - // middleware and routes - var stack = self.stack; - - // manage inter-router variables - var parentParams = req.params; - var parentUrl = req.baseUrl || ''; - done = restore(done, req, 'baseUrl', 'next', 'params'); - - // setup next layer - req.next = next; - - // for options requests, respond with a default if nothing else responds - if (req.method === 'OPTIONS') { - done = wrap(done, function(old, err) { - if (err || options.length === 0) return old(err); - sendOptionsResponse(res, options, old); - }); - } - - // setup basic req values - req.baseUrl = parentUrl; - req.originalUrl = req.originalUrl || req.url; - - next(); - - function next(err) { - var layerError = err === 'route' - ? null - : err; - - // remove added slash - if (slashAdded) { - req.url = req.url.substr(1); - slashAdded = false; - } - - // restore altered req.url - if (removed.length !== 0) { - req.baseUrl = parentUrl; - req.url = protohost + removed + req.url.substr(protohost.length); - removed = ''; - } - - // no more matching layers - if (idx >= stack.length) { - setImmediate(done, layerError); - return; - } - - // get pathname of request - var path = getPathname(req); - - if (path == null) { - return done(layerError); - } - - // find next matching layer - var layer; - var match; - var route; - - while (match !== true && idx < stack.length) { - layer = stack[idx++]; - match = matchLayer(layer, path); - route = layer.route; - - if (typeof match !== 'boolean') { - // hold on to layerError - layerError = layerError || match; - } - - if (match !== true) { - continue; - } - - if (!route) { - // process non-route handlers normally - continue; - } - - if (layerError) { - // routes do not match with a pending error - match = false; - continue; - } - - var method = req.method; - var has_method = route._handles_method(method); - - // build up automatic options response - if (!has_method && method === 'OPTIONS') { - appendMethods(options, route._options()); - } - - // don't even bother matching route - if (!has_method && method !== 'HEAD') { - match = false; - continue; - } - } - - // no match - if (match !== true) { - return done(layerError); - } - - // store route for dispatch on change - if (route) { - req.route = route; - } - - // Capture one-time layer values - req.params = self.mergeParams - ? mergeParams(layer.params, parentParams) - : layer.params; - var layerPath = layer.path; - - // this should be done for the layer - self.process_params(layer, paramcalled, req, res, function (err) { - if (err) { - return next(layerError || err); - } - - if (route) { - return layer.handle_request(req, res, next); - } - - trim_prefix(layer, layerError, layerPath, path); - }); - } - - function trim_prefix(layer, layerError, layerPath, path) { - var c = path[layerPath.length]; - if (c && '/' !== c && '.' !== c) return next(layerError); - - // Trim off the part of the url that matches the route - // middleware (.use stuff) needs to have the path stripped - if (layerPath.length !== 0) { - debug('trim prefix (%s) from url %s', layerPath, req.url); - removed = layerPath; - req.url = protohost + req.url.substr(protohost.length + removed.length); - - // Ensure leading slash - if (!fqdn && req.url[0] !== '/') { - req.url = '/' + req.url; - slashAdded = true; - } - - // Setup base URL (no trailing slash) - req.baseUrl = parentUrl + (removed[removed.length - 1] === '/' - ? removed.substring(0, removed.length - 1) - : removed); - } - - debug('%s %s : %s', layer.name, layerPath, req.originalUrl); - - if (layerError) { - layer.handle_error(layerError, req, res, next); - } else { - layer.handle_request(req, res, next); - } - } -}; - -/** - * Process any parameters for the layer. - * - * @api private - */ - -proto.process_params = function(layer, called, req, res, done) { - var params = this.params; - - // captured parameters from the layer, keys and values - var keys = layer.keys; - - // fast track - if (!keys || keys.length === 0) { - return done(); - } - - var i = 0; - var name; - var paramIndex = 0; - var key; - var paramVal; - var paramCallbacks; - var paramCalled; - - // process params in order - // param callbacks can be async - function param(err) { - if (err) { - return done(err); - } - - if (i >= keys.length ) { - return done(); - } - - paramIndex = 0; - key = keys[i++]; - - if (!key) { - return done(); - } - - name = key.name; - paramVal = req.params[name]; - paramCallbacks = params[name]; - paramCalled = called[name]; - - if (paramVal === undefined || !paramCallbacks) { - return param(); - } - - // param previously called with same value or error occurred - if (paramCalled && (paramCalled.error || paramCalled.match === paramVal)) { - // restore value - req.params[name] = paramCalled.value; - - // next param - return param(paramCalled.error); - } - - called[name] = paramCalled = { - error: null, - match: paramVal, - value: paramVal - }; - - paramCallback(); - } - - // single param callbacks - function paramCallback(err) { - var fn = paramCallbacks[paramIndex++]; - - // store updated value - paramCalled.value = req.params[key.name]; - - if (err) { - // store error - paramCalled.error = err; - param(err); - return; - } - - if (!fn) return param(); - - try { - fn(req, res, paramCallback, paramVal, key.name); - } catch (e) { - paramCallback(e); - } - } - - param(); -}; - -/** - * Use the given middleware function, with optional path, defaulting to "/". - * - * Use (like `.all`) will run for any http METHOD, but it will not add - * handlers for those methods so OPTIONS requests will not consider `.use` - * functions even if they could respond. - * - * The other difference is that _route_ path is stripped and not visible - * to the handler function. The main effect of this feature is that mounted - * handlers can operate without any code changes regardless of the "prefix" - * pathname. - * - * @api public - */ - -proto.use = function use(fn) { - var offset = 0; - var path = '/'; - - // default path to '/' - // disambiguate router.use([fn]) - if (typeof fn !== 'function') { - var arg = fn; - - while (Array.isArray(arg) && arg.length !== 0) { - arg = arg[0]; - } - - // first arg is the path - if (typeof arg !== 'function') { - offset = 1; - path = fn; - } - } - - var callbacks = utils.flatten(slice.call(arguments, offset)); - - if (callbacks.length === 0) { - throw new TypeError('Router.use() requires middleware functions'); - } - - callbacks.forEach(function (fn) { - if (typeof fn !== 'function') { - throw new TypeError('Router.use() requires middleware function but got a ' + gettype(fn)); - } - - // add the middleware - debug('use %s %s', path, fn.name || ''); - - var layer = new Layer(path, { - sensitive: this.caseSensitive, - strict: false, - end: false - }, fn); - - layer.route = undefined; - - this.stack.push(layer); - }, this); - - return this; -}; - -/** - * Create a new Route for the given path. - * - * Each route contains a separate middleware stack and VERB handlers. - * - * See the Route api documentation for details on adding handlers - * and middleware to routes. - * - * @param {String} path - * @return {Route} - * @api public - */ - -proto.route = function(path){ - var route = new Route(path); - - var layer = new Layer(path, { - sensitive: this.caseSensitive, - strict: this.strict, - end: true - }, route.dispatch.bind(route)); - - layer.route = route; - - this.stack.push(layer); - return route; -}; - -// create Router#VERB functions -methods.concat('all').forEach(function(method){ - proto[method] = function(path){ - var route = this.route(path) - route[method].apply(route, slice.call(arguments, 1)); - return this; - }; -}); - -// append methods to a list of methods -function appendMethods(list, addition) { - for (var i = 0; i < addition.length; i++) { - var method = addition[i]; - if (list.indexOf(method) === -1) { - list.push(method); - } - } -} - -// get pathname of request -function getPathname(req) { - try { - return parseUrl(req).pathname; - } catch (err) { - return undefined; - } -} - -// get type for error message -function gettype(obj) { - var type = typeof obj; - - if (type !== 'object') { - return type; - } - - // inspect [[Class]] for objects - return toString.call(obj) - .replace(objectRegExp, '$1'); -} - -/** - * Match path to a layer. - * - * @param {Layer} layer - * @param {string} path - * @private - */ - -function matchLayer(layer, path) { - try { - return layer.match(path); - } catch (err) { - return err; - } -} - -// merge params with parent params -function mergeParams(params, parent) { - if (typeof parent !== 'object' || !parent) { - return params; - } - - // make copy of parent for base - var obj = mixin({}, parent); - - // simple non-numeric merging - if (!(0 in params) || !(0 in parent)) { - return mixin(obj, params); - } - - var i = 0; - var o = 0; - - // determine numeric gaps - while (i === o || o in parent) { - if (i in params) i++; - if (o in parent) o++; - } - - // offset numeric indices in params before merge - for (i--; i >= 0; i--) { - params[i + o] = params[i]; - - // create holes for the merge when necessary - if (i < o) { - delete params[i]; - } - } - - return mixin(parent, params); -} - -// restore obj props after function -function restore(fn, obj) { - var props = new Array(arguments.length - 2); - var vals = new Array(arguments.length - 2); - - for (var i = 0; i < props.length; i++) { - props[i] = arguments[i + 2]; - vals[i] = obj[props[i]]; - } - - return function(err){ - // restore vals - for (var i = 0; i < props.length; i++) { - obj[props[i]] = vals[i]; - } - - return fn.apply(this, arguments); - }; -} - -// send an OPTIONS response -function sendOptionsResponse(res, options, next) { - try { - var body = options.join(','); - res.set('Allow', body); - res.send(body); - } catch (err) { - next(err); - } -} - -// wrap a function -function wrap(old, fn) { - return function proxy() { - var args = new Array(arguments.length + 1); - - args[0] = old; - for (var i = 0, len = arguments.length; i < len; i++) { - args[i + 1] = arguments[i]; - } - - fn.apply(this, args); - }; -} diff --git a/s4t-server-node/node_modules/express/lib/router/layer.js b/s4t-server-node/node_modules/express/lib/router/layer.js deleted file mode 100644 index 88ebd39..0000000 --- a/s4t-server-node/node_modules/express/lib/router/layer.js +++ /dev/null @@ -1,166 +0,0 @@ -/** - * Module dependencies. - */ - -var pathRegexp = require('path-to-regexp'); -var debug = require('debug')('express:router:layer'); - -/** - * Module variables. - */ - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -/** - * Expose `Layer`. - */ - -module.exports = Layer; - -function Layer(path, options, fn) { - if (!(this instanceof Layer)) { - return new Layer(path, options, fn); - } - - debug('new %s', path); - options = options || {}; - - this.handle = fn; - this.name = fn.name || ''; - this.params = undefined; - this.path = undefined; - this.regexp = pathRegexp(path, this.keys = [], options); - - if (path === '/' && options.end === false) { - this.regexp.fast_slash = true; - } -} - -/** - * Handle the error for the layer. - * - * @param {Error} error - * @param {Request} req - * @param {Response} res - * @param {function} next - * @api private - */ - -Layer.prototype.handle_error = function handle_error(error, req, res, next) { - var fn = this.handle; - - if (fn.length !== 4) { - // not a standard error handler - return next(error); - } - - try { - fn(error, req, res, next); - } catch (err) { - next(err); - } -}; - -/** - * Handle the request for the layer. - * - * @param {Request} req - * @param {Response} res - * @param {function} next - * @api private - */ - -Layer.prototype.handle_request = function handle(req, res, next) { - var fn = this.handle; - - if (fn.length > 3) { - // not a standard request handler - return next(); - } - - try { - fn(req, res, next); - } catch (err) { - next(err); - } -}; - -/** - * Check if this route matches `path`, if so - * populate `.params`. - * - * @param {String} path - * @return {Boolean} - * @api private - */ - -Layer.prototype.match = function match(path) { - if (path == null) { - // no path, nothing matches - this.params = undefined; - this.path = undefined; - return false; - } - - if (this.regexp.fast_slash) { - // fast path non-ending match for / (everything matches) - this.params = {}; - this.path = ''; - return true; - } - - var m = this.regexp.exec(path); - - if (!m) { - this.params = undefined; - this.path = undefined; - return false; - } - - // store values - this.params = {}; - this.path = m[0]; - - var keys = this.keys; - var params = this.params; - var prop; - var n = 0; - var key; - var val; - - for (var i = 1, len = m.length; i < len; ++i) { - key = keys[i - 1]; - prop = key - ? key.name - : n++; - val = decode_param(m[i]); - - if (val !== undefined || !(hasOwnProperty.call(params, prop))) { - params[prop] = val; - } - } - - return true; -}; - -/** - * Decode param value. - * - * @param {string} val - * @return {string} - * @api private - */ - -function decode_param(val){ - if (typeof val !== 'string') { - return val; - } - - try { - return decodeURIComponent(val); - } catch (e) { - var err = new TypeError("Failed to decode param '" + val + "'"); - err.status = 400; - throw err; - } -} diff --git a/s4t-server-node/node_modules/express/lib/router/route.js b/s4t-server-node/node_modules/express/lib/router/route.js deleted file mode 100644 index 6213b82..0000000 --- a/s4t-server-node/node_modules/express/lib/router/route.js +++ /dev/null @@ -1,183 +0,0 @@ -/** - * Module dependencies. - */ - -var debug = require('debug')('express:router:route'); -var Layer = require('./layer'); -var methods = require('methods'); -var utils = require('../utils'); - -/** - * Expose `Route`. - */ - -module.exports = Route; - -/** - * Initialize `Route` with the given `path`, - * - * @param {String} path - * @api private - */ - -function Route(path) { - debug('new %s', path); - this.path = path; - this.stack = []; - - // route handlers for various http methods - this.methods = {}; -} - -/** - * @api private - */ - -Route.prototype._handles_method = function _handles_method(method) { - if (this.methods._all) { - return true; - } - - method = method.toLowerCase(); - - if (method === 'head' && !this.methods['head']) { - method = 'get'; - } - - return Boolean(this.methods[method]); -}; - -/** - * @return {Array} supported HTTP methods - * @api private - */ - -Route.prototype._options = function _options() { - var methods = Object.keys(this.methods); - - // append automatic head - if (this.methods.get && !this.methods.head) { - methods.push('head'); - } - - for (var i = 0; i < methods.length; i++) { - // make upper case - methods[i] = methods[i].toUpperCase(); - } - - return methods; -}; - -/** - * dispatch req, res into this route - * - * @api private - */ - -Route.prototype.dispatch = function(req, res, done){ - var idx = 0; - var stack = this.stack; - if (stack.length === 0) { - return done(); - } - - var method = req.method.toLowerCase(); - if (method === 'head' && !this.methods['head']) { - method = 'get'; - } - - req.route = this; - - next(); - - function next(err) { - if (err && err === 'route') { - return done(); - } - - var layer = stack[idx++]; - if (!layer) { - return done(err); - } - - if (layer.method && layer.method !== method) { - return next(err); - } - - if (err) { - layer.handle_error(err, req, res, next); - } else { - layer.handle_request(req, res, next); - } - } -}; - -/** - * Add a handler for all HTTP verbs to this route. - * - * Behaves just like middleware and can respond or call `next` - * to continue processing. - * - * You can use multiple `.all` call to add multiple handlers. - * - * function check_something(req, res, next){ - * next(); - * }; - * - * function validate_user(req, res, next){ - * next(); - * }; - * - * route - * .all(validate_user) - * .all(check_something) - * .get(function(req, res, next){ - * res.send('hello world'); - * }); - * - * @param {function} handler - * @return {Route} for chaining - * @api public - */ - -Route.prototype.all = function(){ - var callbacks = utils.flatten([].slice.call(arguments)); - callbacks.forEach(function(fn) { - if (typeof fn !== 'function') { - var type = {}.toString.call(fn); - var msg = 'Route.all() requires callback functions but got a ' + type; - throw new Error(msg); - } - - var layer = Layer('/', {}, fn); - layer.method = undefined; - - this.methods._all = true; - this.stack.push(layer); - }, this); - - return this; -}; - -methods.forEach(function(method){ - Route.prototype[method] = function(){ - var callbacks = utils.flatten([].slice.call(arguments)); - - callbacks.forEach(function(fn) { - if (typeof fn !== 'function') { - var type = {}.toString.call(fn); - var msg = 'Route.' + method + '() requires callback functions but got a ' + type; - throw new Error(msg); - } - - debug('%s %s', method, this.path); - - var layer = Layer('/', {}, fn); - layer.method = method; - - this.methods[method] = true; - this.stack.push(layer); - }, this); - return this; - }; -}); diff --git a/s4t-server-node/node_modules/express/lib/utils.js b/s4t-server-node/node_modules/express/lib/utils.js deleted file mode 100644 index 9814527..0000000 --- a/s4t-server-node/node_modules/express/lib/utils.js +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Module dependencies. - */ - -var contentDisposition = require('content-disposition'); -var deprecate = require('depd')('express'); -var mime = require('send').mime; -var basename = require('path').basename; -var etag = require('etag'); -var proxyaddr = require('proxy-addr'); -var qs = require('qs'); -var querystring = require('querystring'); -var typer = require('media-typer'); - -/** - * Return strong ETag for `body`. - * - * @param {String|Buffer} body - * @param {String} [encoding] - * @return {String} - * @api private - */ - -exports.etag = function (body, encoding) { - var buf = !Buffer.isBuffer(body) - ? new Buffer(body, encoding) - : body; - - return etag(buf, {weak: false}); -}; - -/** - * Return weak ETag for `body`. - * - * @param {String|Buffer} body - * @param {String} [encoding] - * @return {String} - * @api private - */ - -exports.wetag = function wetag(body, encoding){ - var buf = !Buffer.isBuffer(body) - ? new Buffer(body, encoding) - : body; - - return etag(buf, {weak: true}); -}; - -/** - * Check if `path` looks absolute. - * - * @param {String} path - * @return {Boolean} - * @api private - */ - -exports.isAbsolute = function(path){ - if ('/' == path[0]) return true; - if (':' == path[1] && '\\' == path[2]) return true; - if ('\\\\' == path.substring(0, 2)) return true; // Microsoft Azure absolute path -}; - -/** - * Flatten the given `arr`. - * - * @param {Array} arr - * @return {Array} - * @api private - */ - -exports.flatten = function(arr, ret){ - ret = ret || []; - var len = arr.length; - for (var i = 0; i < len; ++i) { - if (Array.isArray(arr[i])) { - exports.flatten(arr[i], ret); - } else { - ret.push(arr[i]); - } - } - return ret; -}; - -/** - * Normalize the given `type`, for example "html" becomes "text/html". - * - * @param {String} type - * @return {Object} - * @api private - */ - -exports.normalizeType = function(type){ - return ~type.indexOf('/') - ? acceptParams(type) - : { value: mime.lookup(type), params: {} }; -}; - -/** - * Normalize `types`, for example "html" becomes "text/html". - * - * @param {Array} types - * @return {Array} - * @api private - */ - -exports.normalizeTypes = function(types){ - var ret = []; - - for (var i = 0; i < types.length; ++i) { - ret.push(exports.normalizeType(types[i])); - } - - return ret; -}; - -/** - * Generate Content-Disposition header appropriate for the filename. - * non-ascii filenames are urlencoded and a filename* parameter is added - * - * @param {String} filename - * @return {String} - * @api private - */ - -exports.contentDisposition = deprecate.function(contentDisposition, - 'utils.contentDisposition: use content-disposition npm module instead'); - -/** - * Parse accept params `str` returning an - * object with `.value`, `.quality` and `.params`. - * also includes `.originalIndex` for stable sorting - * - * @param {String} str - * @return {Object} - * @api private - */ - -function acceptParams(str, index) { - var parts = str.split(/ *; */); - var ret = { value: parts[0], quality: 1, params: {}, originalIndex: index }; - - for (var i = 1; i < parts.length; ++i) { - var pms = parts[i].split(/ *= */); - if ('q' == pms[0]) { - ret.quality = parseFloat(pms[1]); - } else { - ret.params[pms[0]] = pms[1]; - } - } - - return ret; -} - -/** - * Compile "etag" value to function. - * - * @param {Boolean|String|Function} val - * @return {Function} - * @api private - */ - -exports.compileETag = function(val) { - var fn; - - if (typeof val === 'function') { - return val; - } - - switch (val) { - case true: - fn = exports.wetag; - break; - case false: - break; - case 'strong': - fn = exports.etag; - break; - case 'weak': - fn = exports.wetag; - break; - default: - throw new TypeError('unknown value for etag function: ' + val); - } - - return fn; -} - -/** - * Compile "query parser" value to function. - * - * @param {String|Function} val - * @return {Function} - * @api private - */ - -exports.compileQueryParser = function compileQueryParser(val) { - var fn; - - if (typeof val === 'function') { - return val; - } - - switch (val) { - case true: - fn = querystring.parse; - break; - case false: - fn = newObject; - break; - case 'extended': - fn = qs.parse; - break; - case 'simple': - fn = querystring.parse; - break; - default: - throw new TypeError('unknown value for query parser function: ' + val); - } - - return fn; -} - -/** - * Compile "proxy trust" value to function. - * - * @param {Boolean|String|Number|Array|Function} val - * @return {Function} - * @api private - */ - -exports.compileTrust = function(val) { - if (typeof val === 'function') return val; - - if (val === true) { - // Support plain true/false - return function(){ return true }; - } - - if (typeof val === 'number') { - // Support trusting hop count - return function(a, i){ return i < val }; - } - - if (typeof val === 'string') { - // Support comma-separated values - val = val.split(/ *, */); - } - - return proxyaddr.compile(val || []); -} - -/** - * Set the charset in a given Content-Type string. - * - * @param {String} type - * @param {String} charset - * @return {String} - * @api private - */ - -exports.setCharset = function(type, charset){ - if (!type || !charset) return type; - - // parse type - var parsed = typer.parse(type); - - // set charset - parsed.parameters.charset = charset; - - // format type - return typer.format(parsed); -}; - -/** - * Return new empty objet. - * - * @return {Object} - * @api private - */ - -function newObject() { - return {}; -} diff --git a/s4t-server-node/node_modules/express/lib/view.js b/s4t-server-node/node_modules/express/lib/view.js deleted file mode 100644 index e0989b4..0000000 --- a/s4t-server-node/node_modules/express/lib/view.js +++ /dev/null @@ -1,142 +0,0 @@ -/** - * Module dependencies. - */ - -var debug = require('debug')('express:view'); -var path = require('path'); -var fs = require('fs'); -var utils = require('./utils'); - -/** - * Module variables. - * @private - */ - -var dirname = path.dirname; -var basename = path.basename; -var extname = path.extname; -var join = path.join; -var resolve = path.resolve; - -/** - * Expose `View`. - */ - -module.exports = View; - -/** - * Initialize a new `View` with the given `name`. - * - * Options: - * - * - `defaultEngine` the default template engine name - * - `engines` template engine require() cache - * - `root` root path for view lookup - * - * @param {String} name - * @param {Object} options - * @api private - */ - -function View(name, options) { - options = options || {}; - this.name = name; - this.root = options.root; - var engines = options.engines; - this.defaultEngine = options.defaultEngine; - var ext = this.ext = extname(name); - if (!ext && !this.defaultEngine) throw new Error('No default engine was specified and no extension was provided.'); - if (!ext) name += (ext = this.ext = ('.' != this.defaultEngine[0] ? '.' : '') + this.defaultEngine); - this.engine = engines[ext] || (engines[ext] = require(ext.slice(1)).__express); - this.path = this.lookup(name); -} - -/** - * Lookup view by the given `name` - * - * @param {String} name - * @return {String} - * @api private - */ - -View.prototype.lookup = function lookup(name) { - var path; - var roots = [].concat(this.root); - - debug('lookup "%s"', name); - - for (var i = 0; i < roots.length && !path; i++) { - var root = roots[i]; - - // resolve the path - var loc = resolve(root, name); - var dir = dirname(loc); - var file = basename(loc); - - // resolve the file - path = this.resolve(dir, file); - } - - return path; -}; - -/** - * Render with the given `options` and callback `fn(err, str)`. - * - * @param {Object} options - * @param {Function} fn - * @api private - */ - -View.prototype.render = function render(options, fn) { - debug('render "%s"', this.path); - this.engine(this.path, options, fn); -}; - -/** - * Resolve the file within the given directory. - * - * @param {string} dir - * @param {string} file - * @private - */ - -View.prototype.resolve = function resolve(dir, file) { - var ext = this.ext; - var path; - var stat; - - // . - path = join(dir, file); - stat = tryStat(path); - - if (stat && stat.isFile()) { - return path; - } - - // /index. - path = join(dir, basename(file, ext), 'index' + ext); - stat = tryStat(path); - - if (stat && stat.isFile()) { - return path; - } -}; - -/** - * Return a stat, maybe. - * - * @param {string} path - * @return {fs.Stats} - * @private - */ - -function tryStat(path) { - debug('stat "%s"', path); - - try { - return fs.statSync(path); - } catch (e) { - return undefined; - } -} diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/HISTORY.md b/s4t-server-node/node_modules/express/node_modules/accepts/HISTORY.md deleted file mode 100644 index 57f41f4..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/HISTORY.md +++ /dev/null @@ -1,94 +0,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/s4t-server-node/node_modules/express/node_modules/accepts/LICENSE b/s4t-server-node/node_modules/express/node_modules/accepts/LICENSE deleted file mode 100644 index f23dca8..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Jonathan Ong - -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/s4t-server-node/node_modules/express/node_modules/accepts/README.md b/s4t-server-node/node_modules/express/node_modules/accepts/README.md deleted file mode 100644 index 76a4cbe..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/README.md +++ /dev/null @@ -1,135 +0,0 @@ -# accepts - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator). Extracted from [koa](https://www.npmjs.com/package/koa) for general use. - -In addition to negotiator, it allows: - -- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])` as well as `('text/html', 'application/json')`. -- Allows type shorthands such as `json`. -- Returns `false` when no types match -- Treats non-existent headers as `*` - -## Installation - -```sh -npm install accepts -``` - -## API - -```js -var accepts = require('accepts') -``` - -### accepts(req) - -Create a new `Accepts` object for the given `req`. - -#### .charset(charsets) - -Return the first accepted charset. If nothing in `charsets` is accepted, -then `false` is returned. - -#### .charsets() - -Return the charsets that the request accepts, in the order of the client's -preference (most preferred first). - -#### .encoding(encodings) - -Return the first accepted encoding. If nothing in `encodings` is accepted, -then `false` is returned. - -#### .encodings() - -Return the encodings that the request accepts, in the order of the client's -preference (most preferred first). - -#### .language(languages) - -Return the first accepted language. If nothing in `languages` is accepted, -then `false` is returned. - -#### .languages() - -Return the languages that the request accepts, in the order of the client's -preference (most preferred first). - -#### .type(types) - -Return the first accepted type (and it is returned as the same text as what -appears in the `types` array). If nothing in `types` is accepted, then `false` -is returned. - -The `types` array can contain full MIME types or file extensions. Any value -that is not a full MIME types is passed to `require('mime-types').lookup`. - -#### .types() - -Return the types that the request accepts, in the order of the client's -preference (most preferred first). - -## Examples - -### Simple type negotiation - -This simple example shows how to use `accepts` to return a different typed -respond body based on what the client wants to accept. The server lists it's -preferences in order and will get back the best match between the client and -server. - -```js -var accepts = require('accepts') -var http = require('http') - -function app(req, res) { - var accept = accepts(req) - - // the order of this list is significant; should be server preferred order - switch(accept.type(['json', 'html'])) { - case 'json': - req.setHeader('Content-Type', 'application/json') - req.write('{"hello":"world!"}') - break - case 'html': - req.setHeader('Content-Type', 'text/html') - req.write('hello, world!') - break - default: - // the fallback is text/plain, so no need to specify it above - req.setHeader('Content-Type', 'text/plain') - req.write('hello, world!') - break - } - - req.end() -} - -http.createServer(app).listen(3000) -``` - -You can test this out with the cURL program: -```sh -curl -I -H'Accept: text/html' http://localhost:3000/ -``` - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/accepts.svg?style=flat -[npm-url]: https://npmjs.org/package/accepts -[node-version-image]: https://img.shields.io/node/v/accepts.svg?style=flat -[node-version-url]: http://nodejs.org/download/ -[travis-image]: https://img.shields.io/travis/jshttp/accepts.svg?style=flat -[travis-url]: https://travis-ci.org/jshttp/accepts -[coveralls-image]: https://img.shields.io/coveralls/jshttp/accepts.svg?style=flat -[coveralls-url]: https://coveralls.io/r/jshttp/accepts -[downloads-image]: https://img.shields.io/npm/dm/accepts.svg?style=flat -[downloads-url]: https://npmjs.org/package/accepts diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/index.js b/s4t-server-node/node_modules/express/node_modules/accepts/index.js deleted file mode 100644 index 805e33a..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/index.js +++ /dev/null @@ -1,160 +0,0 @@ -var Negotiator = require('negotiator') -var mime = require('mime-types') - -var slice = [].slice - -module.exports = Accepts - -function Accepts(req) { - if (!(this instanceof Accepts)) - return new Accepts(req) - - this.headers = req.headers - this.negotiator = 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} type(s)... - * @return {String|Array|Boolean} - * @api public - */ - -Accepts.prototype.type = -Accepts.prototype.types = function (types) { - if (!Array.isArray(types)) types = slice.call(arguments); - var n = this.negotiator; - if (!types.length) return n.mediaTypes(); - if (!this.headers.accept) return types[0]; - var mimes = types.map(extToMime); - var accepts = n.mediaTypes(mimes.filter(validMime)); - var first = accepts[0]; - if (!first) return false; - return types[mimes.indexOf(first)]; -} - -/** - * Return accepted encodings or best fit based on `encodings`. - * - * Given `Accept-Encoding: gzip, deflate` - * an array sorted by quality is returned: - * - * ['gzip', 'deflate'] - * - * @param {String|Array} encoding(s)... - * @return {String|Array} - * @api public - */ - -Accepts.prototype.encoding = -Accepts.prototype.encodings = function (encodings) { - if (!Array.isArray(encodings)) encodings = slice.call(arguments); - var n = this.negotiator; - if (!encodings.length) return n.encodings(); - return n.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} charset(s)... - * @return {String|Array} - * @api public - */ - -Accepts.prototype.charset = -Accepts.prototype.charsets = function (charsets) { - if (!Array.isArray(charsets)) charsets = [].slice.call(arguments); - var n = this.negotiator; - if (!charsets.length) return n.charsets(); - if (!this.headers['accept-charset']) return charsets[0]; - return n.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} lang(s)... - * @return {Array|String} - * @api public - */ - -Accepts.prototype.lang = -Accepts.prototype.langs = -Accepts.prototype.language = -Accepts.prototype.languages = function (langs) { - if (!Array.isArray(langs)) langs = slice.call(arguments); - var n = this.negotiator; - if (!langs.length) return n.languages(); - if (!this.headers['accept-language']) return langs[0]; - return n.languages(langs)[0] || false; -} - -/** - * Convert extnames to mime. - * - * @param {String} type - * @return {String} - * @api private - */ - -function extToMime(type) { - if (~type.indexOf('/')) return type; - return mime.lookup(type); -} - -/** - * Check if mime is valid. - * - * @param {String} type - * @return {String} - * @api private - */ - -function validMime(type) { - return typeof type === 'string'; -} diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/HISTORY.md b/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/HISTORY.md deleted file mode 100644 index 9486d94..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/HISTORY.md +++ /dev/null @@ -1,72 +0,0 @@ -2.0.7 / 2014-12-30 -================== - - * deps: mime-db@~1.5.0 - - Add new mime types - - Fix various invalid MIME type entries - -2.0.6 / 2014-12-30 -================== - - * deps: mime-db@~1.4.0 - - Add new mime types - - Fix various invalid MIME type entries - - Remove example template MIME types - -2.0.5 / 2014-12-29 -================== - - * deps: mime-db@~1.3.1 - - Fix missing extensions - -2.0.4 / 2014-12-10 -================== - - * deps: mime-db@~1.3.0 - - Add new mime types - -2.0.3 / 2014-11-09 -================== - - * deps: mime-db@~1.2.0 - - Add new mime types - -2.0.2 / 2014-09-28 -================== - - * deps: mime-db@~1.1.0 - - Add new mime types - - Add additional compressible - - Update charsets - -2.0.1 / 2014-09-07 -================== - - * Support Node.js 0.6 - -2.0.0 / 2014-09-02 -================== - - * Use `mime-db` - * Remove `.define()` - -1.0.2 / 2014-08-04 -================== - - * Set charset=utf-8 for `text/javascript` - -1.0.1 / 2014-06-24 -================== - - * Add `text/jsx` type - -1.0.0 / 2014-05-12 -================== - - * Return `false` for unknown types - * Set charset=utf-8 for `application/json` - -0.1.0 / 2014-05-02 -================== - - * Initial release diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/LICENSE b/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/LICENSE deleted file mode 100644 index a7ae8ee..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ - -The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong me@jongleberry.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/README.md b/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/README.md deleted file mode 100644 index 99d658b..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/README.md +++ /dev/null @@ -1,99 +0,0 @@ -# mime-types - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -The ultimate javascript content-type utility. - -Similar to [node-mime](https://github.com/broofa/node-mime), except: - -- __No fallbacks.__ Instead of naively returning the first available type, `mime-types` simply returns `false`, - so do `var type = mime.lookup('unrecognized') || 'application/octet-stream'`. -- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`. -- Additional mime types are added such as jade and stylus via [mime-db](https://github.com/jshttp/mime-db) -- No `.define()` functionality - -Otherwise, the API is compatible. - -## Install - -```sh -$ npm install mime-types -``` - -## Adding Types - -All mime types are based on [mime-db](https://github.com/jshttp/mime-db), -so open a PR there if you'd like to add mime types. - -## API - -```js -var mime = require('mime-types') -``` - -All functions return `false` if input is invalid or not found. - -### mime.lookup(path) - -Lookup the content-type associated with a file. - -```js -mime.lookup('json') // 'application/json' -mime.lookup('.md') // 'text/x-markdown' -mime.lookup('file.html') // 'text/html' -mime.lookup('folder/file.js') // 'application/javascript' - -mime.lookup('cats') // false -``` - -### mime.contentType(type) - -Create a full content-type header given a content-type or extension. - -```js -mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' -mime.contentType('file.json') // 'application/json; charset=utf-8' -``` - -### mime.extension(type) - -Get the default extension for a content-type. - -```js -mime.extension('application/octet-stream') // 'bin' -``` - -### mime.charset(type) - -Lookup the implied default charset of a content-type. - -```js -mime.charset('text/x-markdown') // 'UTF-8' -``` - -### var type = mime.types[extension] - -A map of content-types by extension. - -### [extensions...] = mime.extensions[type] - -A map of extensions by content-type. - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/mime-types.svg?style=flat -[npm-url]: https://npmjs.org/package/mime-types -[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat -[node-version-url]: http://nodejs.org/download/ -[travis-image]: https://img.shields.io/travis/jshttp/mime-types.svg?style=flat -[travis-url]: https://travis-ci.org/jshttp/mime-types -[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-types.svg?style=flat -[coveralls-url]: https://coveralls.io/r/jshttp/mime-types -[downloads-image]: https://img.shields.io/npm/dm/mime-types.svg?style=flat -[downloads-url]: https://npmjs.org/package/mime-types diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/index.js b/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/index.js deleted file mode 100644 index b46a202..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/index.js +++ /dev/null @@ -1,63 +0,0 @@ - -var db = require('mime-db') - -// types[extension] = type -exports.types = Object.create(null) -// extensions[type] = [extensions] -exports.extensions = Object.create(null) - -Object.keys(db).forEach(function (name) { - var mime = db[name] - var exts = mime.extensions - if (!exts || !exts.length) return - exports.extensions[name] = exts - exts.forEach(function (ext) { - exports.types[ext] = name - }) -}) - -exports.lookup = function (string) { - if (!string || typeof string !== "string") return false - // remove any leading paths, though we should just use path.basename - string = string.replace(/.*[\.\/\\]/, '').toLowerCase() - if (!string) return false - return exports.types[string] || false -} - -exports.extension = function (type) { - if (!type || typeof type !== "string") return false - // to do: use media-typer - type = type.match(/^\s*([^;\s]*)(?:;|\s|$)/) - if (!type) return false - var exts = exports.extensions[type[1].toLowerCase()] - if (!exts || !exts.length) return false - return exts[0] -} - -// type has to be an exact mime type -exports.charset = function (type) { - var mime = db[type] - if (mime && mime.charset) return mime.charset - - // default text/* to utf-8 - if (/^text\//.test(type)) return 'UTF-8' - - return false -} - -// backwards compatibility -exports.charsets = { - lookup: exports.charset -} - -// to do: maybe use set-type module or something -exports.contentType = function (type) { - if (!type || typeof type !== "string") return false - if (!~type.indexOf('/')) type = exports.lookup(type) - if (!type) return false - if (!~type.indexOf('charset')) { - var charset = exports.charset(type) - if (charset) type += '; charset=' + charset.toLowerCase() - } - return type -} diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/HISTORY.md b/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/HISTORY.md deleted file mode 100644 index 30b680d..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/HISTORY.md +++ /dev/null @@ -1,142 +0,0 @@ -1.5.0 / 2014-12-30 -================== - - * Add `application/vnd.oracle.resource+json` - * Fix various invalid MIME type entries - - `application/mbox+xml` - - `application/oscp-response` - - `application/vwg-multiplexed` - - `audio/g721` - -1.4.0 / 2014-12-21 -================== - - * Add `application/vnd.ims.imsccv1p2` - * Fix various invalid MIME type entries - - `application/vnd-acucobol` - - `application/vnd-curl` - - `application/vnd-dart` - - `application/vnd-dxr` - - `application/vnd-fdf` - - `application/vnd-mif` - - `application/vnd-sema` - - `application/vnd-wap-wmlc` - - `application/vnd.adobe.flash-movie` - - `application/vnd.dece-zip` - - `application/vnd.dvb_service` - - `application/vnd.micrografx-igx` - - `application/vnd.sealed-doc` - - `application/vnd.sealed-eml` - - `application/vnd.sealed-mht` - - `application/vnd.sealed-ppt` - - `application/vnd.sealed-tiff` - - `application/vnd.sealed-xls` - - `application/vnd.sealedmedia.softseal-html` - - `application/vnd.sealedmedia.softseal-pdf` - - `application/vnd.wap-slc` - - `application/vnd.wap-wbxml` - - `audio/vnd.sealedmedia.softseal-mpeg` - - `image/vnd-djvu` - - `image/vnd-svf` - - `image/vnd-wap-wbmp` - - `image/vnd.sealed-png` - - `image/vnd.sealedmedia.softseal-gif` - - `image/vnd.sealedmedia.softseal-jpg` - - `model/vnd-dwf` - - `model/vnd.parasolid.transmit-binary` - - `model/vnd.parasolid.transmit-text` - - `text/vnd-a` - - `text/vnd-curl` - - `text/vnd.wap-wml` - * Remove example template MIME types - - `application/example` - - `audio/example` - - `image/example` - - `message/example` - - `model/example` - - `multipart/example` - - `text/example` - - `video/example` - -1.3.1 / 2014-12-16 -================== - - * Fix missing extensions - - `application/json5` - - `text/hjson` - -1.3.0 / 2014-12-07 -================== - - * Add `application/a2l` - * Add `application/aml` - * Add `application/atfx` - * Add `application/atxml` - * Add `application/cdfx+xml` - * Add `application/dii` - * Add `application/json5` - * Add `application/lxf` - * Add `application/mf4` - * Add `application/vnd.apache.thrift.compact` - * Add `application/vnd.apache.thrift.json` - * Add `application/vnd.coffeescript` - * Add `application/vnd.enphase.envoy` - * Add `application/vnd.ims.imsccv1p1` - * Add `text/csv-schema` - * Add `text/hjson` - * Add `text/markdown` - * Add `text/yaml` - -1.2.0 / 2014-11-09 -================== - - * Add `application/cea` - * Add `application/dit` - * Add `application/vnd.gov.sk.e-form+zip` - * Add `application/vnd.tmd.mediaflex.api+xml` - * Type `application/epub+zip` is now IANA-registered - -1.1.2 / 2014-10-23 -================== - - * Rebuild database for `application/x-www-form-urlencoded` change - -1.1.1 / 2014-10-20 -================== - - * Mark `application/x-www-form-urlencoded` as compressible. - -1.1.0 / 2014-09-28 -================== - - * Add `application/font-woff2` - -1.0.3 / 2014-09-25 -================== - - * Fix engine requirement in package - -1.0.2 / 2014-09-25 -================== - - * Add `application/coap-group+json` - * Add `application/dcd` - * Add `application/vnd.apache.thrift.binary` - * Add `image/vnd.tencent.tap` - * Mark all JSON-derived types as compressible - * Update `text/vtt` data - -1.0.1 / 2014-08-30 -================== - - * Fix extension ordering - -1.0.0 / 2014-08-30 -================== - - * Add `application/atf` - * Add `application/merge-patch+json` - * Add `multipart/x-mixed-replace` - * Add `source: 'apache'` metadata - * Add `source: 'iana'` metadata - * Remove badly-assumed charset data diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/LICENSE b/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/LICENSE deleted file mode 100644 index a7ae8ee..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ - -The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong me@jongleberry.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/README.md b/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/README.md deleted file mode 100644 index 3b6364e..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/README.md +++ /dev/null @@ -1,72 +0,0 @@ -# mime-db - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][travis-image]][travis-url] -[![Coverage Status][coveralls-image]][coveralls-url] - -This is a database of all mime types. -It consistents of a single, public JSON file and does not include any logic, -allowing it to remain as unopinionated as possible with an API. -It aggregates data from the following sources: - -- http://www.iana.org/assignments/media-types/media-types.xhtml -- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types - -## Usage - -```bash -npm i mime-db -``` - -```js -var db = require('mime-db'); - -// grab data on .js files -var data = db['application/javascript']; -``` - -If you're crazy enough to use this in the browser, -you can just grab the JSON file: - -``` -https://cdn.rawgit.com/jshttp/mime-db/master/db.json -``` - -## Data Structure - -The JSON file is a map lookup for lowercased mime types. -Each mime type has the following properties: - -- `.source` - where the mime type is defined. - If not set, it's probably a custom media type. - - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) - - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml) -- `.extensions[]` - known extensions associated with this mime type. -- `.compressible` - whether a file of this type is can be gzipped. -- `.charset` - the default charset associated with this type, if any. - -If unknown, every property could be `undefined`. - -## Repository Structure - -- `scripts` - these are scripts to run to build the database -- `src/` - this is a folder of files created from remote sources like Apache and IANA -- `lib/` - this is a folder of our own custom sources and db, which will be merged into `db.json` -- `db.json` - the final built JSON file for end-user usage - -## Contributing - -To edit the database, only make PRs against files in the `lib/` folder. -To update the build, run `npm run update`. - -[npm-version-image]: https://img.shields.io/npm/v/mime-db.svg?style=flat -[npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg?style=flat -[npm-url]: https://npmjs.org/package/mime-db -[travis-image]: https://img.shields.io/travis/jshttp/mime-db.svg?style=flat -[travis-url]: https://travis-ci.org/jshttp/mime-db -[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-db.svg?style=flat -[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master -[node-image]: https://img.shields.io/node/v/mime-db.svg?style=flat -[node-url]: http://nodejs.org/download/ diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/db.json b/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/db.json deleted file mode 100644 index 652feb3..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/db.json +++ /dev/null @@ -1,6262 +0,0 @@ -{ - "application/1d-interleaved-parityfec": { - "source": "iana" - }, - "application/3gpdash-qoe-report+xml": { - "source": "iana" - }, - "application/3gpp-ims+xml": { - "source": "iana" - }, - "application/a2l": { - "source": "iana" - }, - "application/activemessage": { - "source": "iana" - }, - "application/alto-costmap+json": { - "source": "iana", - "compressible": true - }, - "application/alto-costmapfilter+json": { - "source": "iana", - "compressible": true - }, - "application/alto-directory+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointcost+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointcostparams+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointprop+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointpropparams+json": { - "source": "iana", - "compressible": true - }, - "application/alto-error+json": { - "source": "iana", - "compressible": true - }, - "application/alto-networkmap+json": { - "source": "iana", - "compressible": true - }, - "application/alto-networkmapfilter+json": { - "source": "iana", - "compressible": true - }, - "application/aml": { - "source": "iana" - }, - "application/andrew-inset": { - "source": "iana", - "extensions": ["ez"] - }, - "application/applefile": { - "source": "iana" - }, - "application/applixware": { - "source": "apache", - "extensions": ["aw"] - }, - "application/atf": { - "source": "iana" - }, - "application/atfx": { - "source": "iana" - }, - "application/atom+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atom"] - }, - "application/atomcat+xml": { - "source": "iana", - "extensions": ["atomcat"] - }, - "application/atomdeleted+xml": { - "source": "iana" - }, - "application/atomicmail": { - "source": "iana" - }, - "application/atomsvc+xml": { - "source": "iana", - "extensions": ["atomsvc"] - }, - "application/atxml": { - "source": "iana" - }, - "application/auth-policy+xml": { - "source": "iana" - }, - "application/bacnet-xdd+zip": { - "source": "iana" - }, - "application/batch-smtp": { - "source": "iana" - }, - "application/beep+xml": { - "source": "iana" - }, - "application/calendar+json": { - "source": "iana", - "compressible": true - }, - "application/calendar+xml": { - "source": "iana" - }, - "application/call-completion": { - "source": "iana" - }, - "application/cals-1840": { - "source": "iana" - }, - "application/cbor": { - "source": "iana" - }, - "application/ccmp+xml": { - "source": "iana" - }, - "application/ccxml+xml": { - "source": "iana", - "extensions": ["ccxml"] - }, - "application/cdfx+xml": { - "source": "iana" - }, - "application/cdmi-capability": { - "source": "iana", - "extensions": ["cdmia"] - }, - "application/cdmi-container": { - "source": "iana", - "extensions": ["cdmic"] - }, - "application/cdmi-domain": { - "source": "iana", - "extensions": ["cdmid"] - }, - "application/cdmi-object": { - "source": "iana", - "extensions": ["cdmio"] - }, - "application/cdmi-queue": { - "source": "iana", - "extensions": ["cdmiq"] - }, - "application/cea": { - "source": "iana" - }, - "application/cea-2018+xml": { - "source": "iana" - }, - "application/cellml+xml": { - "source": "iana" - }, - "application/cfw": { - "source": "iana" - }, - "application/cms": { - "source": "iana" - }, - "application/cnrp+xml": { - "source": "iana" - }, - "application/coap-group+json": { - "source": "iana", - "compressible": true - }, - "application/commonground": { - "source": "iana" - }, - "application/conference-info+xml": { - "source": "iana" - }, - "application/cpl+xml": { - "source": "iana" - }, - "application/csrattrs": { - "source": "iana" - }, - "application/csta+xml": { - "source": "iana" - }, - "application/cstadata+xml": { - "source": "iana" - }, - "application/cu-seeme": { - "source": "apache", - "extensions": ["cu"] - }, - "application/cybercash": { - "source": "iana" - }, - "application/dart": { - "compressible": true - }, - "application/dash+xml": { - "source": "iana", - "extensions": ["mdp"] - }, - "application/dashdelta": { - "source": "iana" - }, - "application/davmount+xml": { - "source": "iana", - "extensions": ["davmount"] - }, - "application/dca-rft": { - "source": "iana" - }, - "application/dcd": { - "source": "iana" - }, - "application/dec-dx": { - "source": "iana" - }, - "application/dialog-info+xml": { - "source": "iana" - }, - "application/dicom": { - "source": "iana" - }, - "application/dii": { - "source": "iana" - }, - "application/dit": { - "source": "iana" - }, - "application/dns": { - "source": "iana" - }, - "application/docbook+xml": { - "source": "apache", - "extensions": ["dbk"] - }, - "application/dskpp+xml": { - "source": "iana" - }, - "application/dssc+der": { - "source": "iana", - "extensions": ["dssc"] - }, - "application/dssc+xml": { - "source": "iana", - "extensions": ["xdssc"] - }, - "application/dvcs": { - "source": "iana" - }, - "application/ecmascript": { - "source": "iana", - "compressible": true, - "extensions": ["ecma"] - }, - "application/edi-consent": { - "source": "iana" - }, - "application/edi-x12": { - "source": "iana", - "compressible": false - }, - "application/edifact": { - "source": "iana", - "compressible": false - }, - "application/emma+xml": { - "source": "iana", - "extensions": ["emma"] - }, - "application/emotionml+xml": { - "source": "iana" - }, - "application/encaprtp": { - "source": "iana" - }, - "application/epp+xml": { - "source": "iana" - }, - "application/epub+zip": { - "source": "iana", - "extensions": ["epub"] - }, - "application/eshop": { - "source": "iana" - }, - "application/exi": { - "source": "iana", - "extensions": ["exi"] - }, - "application/fastinfoset": { - "source": "iana" - }, - "application/fastsoap": { - "source": "iana" - }, - "application/fdt+xml": { - "source": "iana" - }, - "application/fits": { - "source": "iana" - }, - "application/font-sfnt": { - "source": "iana" - }, - "application/font-tdpfr": { - "source": "iana", - "extensions": ["pfr"] - }, - "application/font-woff": { - "source": "iana", - "compressible": false, - "extensions": ["woff"] - }, - "application/font-woff2": { - "compressible": false, - "extensions": ["woff2"] - }, - "application/framework-attributes+xml": { - "source": "iana" - }, - "application/gml+xml": { - "source": "apache", - "extensions": ["gml"] - }, - "application/gpx+xml": { - "source": "apache", - "extensions": ["gpx"] - }, - "application/gxf": { - "source": "apache", - "extensions": ["gxf"] - }, - "application/gzip": { - "source": "iana", - "compressible": false - }, - "application/h224": { - "source": "iana" - }, - "application/held+xml": { - "source": "iana" - }, - "application/http": { - "source": "iana" - }, - "application/hyperstudio": { - "source": "iana", - "extensions": ["stk"] - }, - "application/ibe-key-request+xml": { - "source": "iana" - }, - "application/ibe-pkg-reply+xml": { - "source": "iana" - }, - "application/ibe-pp-data": { - "source": "iana" - }, - "application/iges": { - "source": "iana" - }, - "application/im-iscomposing+xml": { - "source": "iana" - }, - "application/index": { - "source": "iana" - }, - "application/index.cmd": { - "source": "iana" - }, - "application/index.obj": { - "source": "iana" - }, - "application/index.response": { - "source": "iana" - }, - "application/index.vnd": { - "source": "iana" - }, - "application/inkml+xml": { - "source": "iana", - "extensions": ["ink","inkml"] - }, - "application/iotp": { - "source": "iana" - }, - "application/ipfix": { - "source": "iana", - "extensions": ["ipfix"] - }, - "application/ipp": { - "source": "iana" - }, - "application/isup": { - "source": "iana" - }, - "application/its+xml": { - "source": "iana" - }, - "application/java-archive": { - "source": "apache", - "compressible": false, - "extensions": ["jar"] - }, - "application/java-serialized-object": { - "source": "apache", - "compressible": false, - "extensions": ["ser"] - }, - "application/java-vm": { - "source": "apache", - "compressible": false, - "extensions": ["class"] - }, - "application/javascript": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["js"] - }, - "application/jrd+json": { - "source": "iana", - "compressible": true - }, - "application/json": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["json","map"] - }, - "application/json-patch+json": { - "source": "iana", - "compressible": true - }, - "application/json5": { - "extensions": ["json5"] - }, - "application/jsonml+json": { - "source": "apache", - "compressible": true, - "extensions": ["jsonml"] - }, - "application/kpml-request+xml": { - "source": "iana" - }, - "application/kpml-response+xml": { - "source": "iana" - }, - "application/ld+json": { - "source": "iana", - "compressible": true - }, - "application/link-format": { - "source": "iana" - }, - "application/load-control+xml": { - "source": "iana" - }, - "application/lost+xml": { - "source": "iana", - "extensions": ["lostxml"] - }, - "application/lostsync+xml": { - "source": "iana" - }, - "application/lxf": { - "source": "iana" - }, - "application/mac-binhex40": { - "source": "iana", - "extensions": ["hqx"] - }, - "application/mac-compactpro": { - "source": "apache", - "extensions": ["cpt"] - }, - "application/macwriteii": { - "source": "iana" - }, - "application/mads+xml": { - "source": "iana", - "extensions": ["mads"] - }, - "application/marc": { - "source": "iana", - "extensions": ["mrc"] - }, - "application/marcxml+xml": { - "source": "iana", - "extensions": ["mrcx"] - }, - "application/mathematica": { - "source": "iana", - "extensions": ["ma","nb","mb"] - }, - "application/mathml+xml": { - "source": "iana", - "extensions": ["mathml"] - }, - "application/mathml-content+xml": { - "source": "iana" - }, - "application/mathml-presentation+xml": { - "source": "iana" - }, - "application/mbms-associated-procedure-description+xml": { - "source": "iana" - }, - "application/mbms-deregister+xml": { - "source": "iana" - }, - "application/mbms-envelope+xml": { - "source": "iana" - }, - "application/mbms-msk+xml": { - "source": "iana" - }, - "application/mbms-msk-response+xml": { - "source": "iana" - }, - "application/mbms-protection-description+xml": { - "source": "iana" - }, - "application/mbms-reception-report+xml": { - "source": "iana" - }, - "application/mbms-register+xml": { - "source": "iana" - }, - "application/mbms-register-response+xml": { - "source": "iana" - }, - "application/mbms-schedule+xml": { - "source": "iana" - }, - "application/mbms-user-service-description+xml": { - "source": "iana" - }, - "application/mbox": { - "source": "iana", - "extensions": ["mbox"] - }, - "application/media-policy-dataset+xml": { - "source": "iana" - }, - "application/media_control+xml": { - "source": "iana" - }, - "application/mediaservercontrol+xml": { - "source": "iana", - "extensions": ["mscml"] - }, - "application/merge-patch+json": { - "source": "iana", - "compressible": true - }, - "application/metalink+xml": { - "source": "apache", - "extensions": ["metalink"] - }, - "application/metalink4+xml": { - "source": "iana", - "extensions": ["meta4"] - }, - "application/mets+xml": { - "source": "iana", - "extensions": ["mets"] - }, - "application/mf4": { - "source": "iana" - }, - "application/mikey": { - "source": "iana" - }, - "application/mods+xml": { - "source": "iana", - "extensions": ["mods"] - }, - "application/moss-keys": { - "source": "iana" - }, - "application/moss-signature": { - "source": "iana" - }, - "application/mosskey-data": { - "source": "iana" - }, - "application/mosskey-request": { - "source": "iana" - }, - "application/mp21": { - "source": "iana", - "extensions": ["m21","mp21"] - }, - "application/mp4": { - "source": "iana", - "extensions": ["mp4s","m4p"] - }, - "application/mpeg4-generic": { - "source": "iana" - }, - "application/mpeg4-iod": { - "source": "iana" - }, - "application/mpeg4-iod-xmt": { - "source": "iana" - }, - "application/mrb-consumer+xml": { - "source": "iana" - }, - "application/mrb-publish+xml": { - "source": "iana" - }, - "application/msc-ivr+xml": { - "source": "iana" - }, - "application/msc-mixer+xml": { - "source": "iana" - }, - "application/msword": { - "source": "iana", - "compressible": false, - "extensions": ["doc","dot"] - }, - "application/mxf": { - "source": "iana", - "extensions": ["mxf"] - }, - "application/nasdata": { - "source": "iana" - }, - "application/news-checkgroups": { - "source": "iana" - }, - "application/news-groupinfo": { - "source": "iana" - }, - "application/news-transmission": { - "source": "iana" - }, - "application/nlsml+xml": { - "source": "iana" - }, - "application/nss": { - "source": "iana" - }, - "application/ocsp-request": { - "source": "iana" - }, - "application/ocsp-response": { - "source": "iana" - }, - "application/octet-stream": { - "source": "iana", - "compressible": false, - "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","buffer"] - }, - "application/oda": { - "source": "iana", - "extensions": ["oda"] - }, - "application/odx": { - "source": "iana" - }, - "application/oebps-package+xml": { - "source": "iana", - "extensions": ["opf"] - }, - "application/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["ogx"] - }, - "application/omdoc+xml": { - "source": "apache", - "extensions": ["omdoc"] - }, - "application/onenote": { - "source": "apache", - "extensions": ["onetoc","onetoc2","onetmp","onepkg"] - }, - "application/oxps": { - "source": "iana", - "extensions": ["oxps"] - }, - "application/p2p-overlay+xml": { - "source": "iana" - }, - "application/parityfec": { - "source": "iana" - }, - "application/patch-ops-error+xml": { - "source": "iana", - "extensions": ["xer"] - }, - "application/pdf": { - "source": "iana", - "compressible": false, - "extensions": ["pdf"] - }, - "application/pdx": { - "source": "iana" - }, - "application/pgp-encrypted": { - "source": "iana", - "compressible": false, - "extensions": ["pgp"] - }, - "application/pgp-keys": { - "source": "iana" - }, - "application/pgp-signature": { - "source": "iana", - "extensions": ["asc","sig"] - }, - "application/pics-rules": { - "source": "apache", - "extensions": ["prf"] - }, - "application/pidf+xml": { - "source": "iana" - }, - "application/pidf-diff+xml": { - "source": "iana" - }, - "application/pkcs10": { - "source": "iana", - "extensions": ["p10"] - }, - "application/pkcs7-mime": { - "source": "iana", - "extensions": ["p7m","p7c"] - }, - "application/pkcs7-signature": { - "source": "iana", - "extensions": ["p7s"] - }, - "application/pkcs8": { - "source": "iana", - "extensions": ["p8"] - }, - "application/pkix-attr-cert": { - "source": "iana", - "extensions": ["ac"] - }, - "application/pkix-cert": { - "source": "iana", - "extensions": ["cer"] - }, - "application/pkix-crl": { - "source": "iana", - "extensions": ["crl"] - }, - "application/pkix-pkipath": { - "source": "iana", - "extensions": ["pkipath"] - }, - "application/pkixcmp": { - "source": "iana", - "extensions": ["pki"] - }, - "application/pls+xml": { - "source": "iana", - "extensions": ["pls"] - }, - "application/poc-settings+xml": { - "source": "iana" - }, - "application/postscript": { - "source": "iana", - "compressible": true, - "extensions": ["ai","eps","ps"] - }, - "application/provenance+xml": { - "source": "iana" - }, - "application/prs.alvestrand.titrax-sheet": { - "source": "iana" - }, - "application/prs.cww": { - "source": "iana", - "extensions": ["cww"] - }, - "application/prs.hpub+zip": { - "source": "iana" - }, - "application/prs.nprend": { - "source": "iana" - }, - "application/prs.plucker": { - "source": "iana" - }, - "application/prs.rdf-xml-crypt": { - "source": "iana" - }, - "application/prs.xsf+xml": { - "source": "iana" - }, - "application/pskc+xml": { - "source": "iana", - "extensions": ["pskcxml"] - }, - "application/qsig": { - "source": "iana" - }, - "application/raptorfec": { - "source": "iana" - }, - "application/rdf+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rdf"] - }, - "application/reginfo+xml": { - "source": "iana", - "extensions": ["rif"] - }, - "application/relax-ng-compact-syntax": { - "source": "iana", - "extensions": ["rnc"] - }, - "application/remote-printing": { - "source": "iana" - }, - "application/reputon+json": { - "source": "iana", - "compressible": true - }, - "application/resource-lists+xml": { - "source": "iana", - "extensions": ["rl"] - }, - "application/resource-lists-diff+xml": { - "source": "iana", - "extensions": ["rld"] - }, - "application/riscos": { - "source": "iana" - }, - "application/rlmi+xml": { - "source": "iana" - }, - "application/rls-services+xml": { - "source": "iana", - "extensions": ["rs"] - }, - "application/rpki-ghostbusters": { - "source": "iana", - "extensions": ["gbr"] - }, - "application/rpki-manifest": { - "source": "iana", - "extensions": ["mft"] - }, - "application/rpki-roa": { - "source": "iana", - "extensions": ["roa"] - }, - "application/rpki-updown": { - "source": "iana" - }, - "application/rsd+xml": { - "source": "apache", - "extensions": ["rsd"] - }, - "application/rss+xml": { - "source": "apache", - "compressible": true, - "extensions": ["rss"] - }, - "application/rtf": { - "source": "iana", - "compressible": true, - "extensions": ["rtf"] - }, - "application/rtploopback": { - "source": "iana" - }, - "application/rtx": { - "source": "iana" - }, - "application/samlassertion+xml": { - "source": "iana" - }, - "application/samlmetadata+xml": { - "source": "iana" - }, - "application/sbml+xml": { - "source": "iana", - "extensions": ["sbml"] - }, - "application/scaip+xml": { - "source": "iana" - }, - "application/scvp-cv-request": { - "source": "iana", - "extensions": ["scq"] - }, - "application/scvp-cv-response": { - "source": "iana", - "extensions": ["scs"] - }, - "application/scvp-vp-request": { - "source": "iana", - "extensions": ["spq"] - }, - "application/scvp-vp-response": { - "source": "iana", - "extensions": ["spp"] - }, - "application/sdp": { - "source": "iana", - "extensions": ["sdp"] - }, - "application/sep+xml": { - "source": "iana" - }, - "application/sep-exi": { - "source": "iana" - }, - "application/session-info": { - "source": "iana" - }, - "application/set-payment": { - "source": "iana" - }, - "application/set-payment-initiation": { - "source": "iana", - "extensions": ["setpay"] - }, - "application/set-registration": { - "source": "iana" - }, - "application/set-registration-initiation": { - "source": "iana", - "extensions": ["setreg"] - }, - "application/sgml": { - "source": "iana" - }, - "application/sgml-open-catalog": { - "source": "iana" - }, - "application/shf+xml": { - "source": "iana", - "extensions": ["shf"] - }, - "application/sieve": { - "source": "iana" - }, - "application/simple-filter+xml": { - "source": "iana" - }, - "application/simple-message-summary": { - "source": "iana" - }, - "application/simplesymbolcontainer": { - "source": "iana" - }, - "application/slate": { - "source": "iana" - }, - "application/smil": { - "source": "iana" - }, - "application/smil+xml": { - "source": "iana", - "extensions": ["smi","smil"] - }, - "application/smpte336m": { - "source": "iana" - }, - "application/soap+fastinfoset": { - "source": "iana" - }, - "application/soap+xml": { - "source": "iana", - "compressible": true - }, - "application/sparql-query": { - "source": "iana", - "extensions": ["rq"] - }, - "application/sparql-results+xml": { - "source": "iana", - "extensions": ["srx"] - }, - "application/spirits-event+xml": { - "source": "iana" - }, - "application/sql": { - "source": "iana" - }, - "application/srgs": { - "source": "iana", - "extensions": ["gram"] - }, - "application/srgs+xml": { - "source": "iana", - "extensions": ["grxml"] - }, - "application/sru+xml": { - "source": "iana", - "extensions": ["sru"] - }, - "application/ssdl+xml": { - "source": "apache", - "extensions": ["ssdl"] - }, - "application/ssml+xml": { - "source": "iana", - "extensions": ["ssml"] - }, - "application/tamp-apex-update": { - "source": "iana" - }, - "application/tamp-apex-update-confirm": { - "source": "iana" - }, - "application/tamp-community-update": { - "source": "iana" - }, - "application/tamp-community-update-confirm": { - "source": "iana" - }, - "application/tamp-error": { - "source": "iana" - }, - "application/tamp-sequence-adjust": { - "source": "iana" - }, - "application/tamp-sequence-adjust-confirm": { - "source": "iana" - }, - "application/tamp-status-query": { - "source": "iana" - }, - "application/tamp-status-response": { - "source": "iana" - }, - "application/tamp-update": { - "source": "iana" - }, - "application/tamp-update-confirm": { - "source": "iana" - }, - "application/tar": { - "compressible": true - }, - "application/tei+xml": { - "source": "iana", - "extensions": ["tei","teicorpus"] - }, - "application/thraud+xml": { - "source": "iana", - "extensions": ["tfi"] - }, - "application/timestamp-query": { - "source": "iana" - }, - "application/timestamp-reply": { - "source": "iana" - }, - "application/timestamped-data": { - "source": "iana", - "extensions": ["tsd"] - }, - "application/ttml+xml": { - "source": "iana" - }, - "application/tve-trigger": { - "source": "iana" - }, - "application/ulpfec": { - "source": "iana" - }, - "application/urc-grpsheet+xml": { - "source": "iana" - }, - "application/urc-ressheet+xml": { - "source": "iana" - }, - "application/urc-targetdesc+xml": { - "source": "iana" - }, - "application/urc-uisocketdesc+xml": { - "source": "iana" - }, - "application/vcard+json": { - "source": "iana", - "compressible": true - }, - "application/vcard+xml": { - "source": "iana" - }, - "application/vemmi": { - "source": "iana" - }, - "application/vividence.scriptfile": { - "source": "apache" - }, - "application/vnd.3gpp.bsf+xml": { - "source": "iana" - }, - "application/vnd.3gpp.pic-bw-large": { - "source": "iana", - "extensions": ["plb"] - }, - "application/vnd.3gpp.pic-bw-small": { - "source": "iana", - "extensions": ["psb"] - }, - "application/vnd.3gpp.pic-bw-var": { - "source": "iana", - "extensions": ["pvb"] - }, - "application/vnd.3gpp.sms": { - "source": "iana" - }, - "application/vnd.3gpp2.bcmcsinfo+xml": { - "source": "iana" - }, - "application/vnd.3gpp2.sms": { - "source": "iana" - }, - "application/vnd.3gpp2.tcap": { - "source": "iana", - "extensions": ["tcap"] - }, - "application/vnd.3m.post-it-notes": { - "source": "iana", - "extensions": ["pwn"] - }, - "application/vnd.accpac.simply.aso": { - "source": "iana", - "extensions": ["aso"] - }, - "application/vnd.accpac.simply.imp": { - "source": "iana", - "extensions": ["imp"] - }, - "application/vnd.acucobol": { - "source": "iana", - "extensions": ["acu"] - }, - "application/vnd.acucorp": { - "source": "iana", - "extensions": ["atc","acutc"] - }, - "application/vnd.adobe.air-application-installer-package+zip": { - "source": "apache", - "extensions": ["air"] - }, - "application/vnd.adobe.flash.movie": { - "source": "iana" - }, - "application/vnd.adobe.formscentral.fcdt": { - "source": "iana", - "extensions": ["fcdt"] - }, - "application/vnd.adobe.fxp": { - "source": "iana", - "extensions": ["fxp","fxpl"] - }, - "application/vnd.adobe.partial-upload": { - "source": "iana" - }, - "application/vnd.adobe.xdp+xml": { - "source": "iana", - "extensions": ["xdp"] - }, - "application/vnd.adobe.xfdf": { - "source": "iana", - "extensions": ["xfdf"] - }, - "application/vnd.aether.imp": { - "source": "iana" - }, - "application/vnd.ah-barcode": { - "source": "iana" - }, - "application/vnd.ahead.space": { - "source": "iana", - "extensions": ["ahead"] - }, - "application/vnd.airzip.filesecure.azf": { - "source": "iana", - "extensions": ["azf"] - }, - "application/vnd.airzip.filesecure.azs": { - "source": "iana", - "extensions": ["azs"] - }, - "application/vnd.amazon.ebook": { - "source": "apache", - "extensions": ["azw"] - }, - "application/vnd.americandynamics.acc": { - "source": "iana", - "extensions": ["acc"] - }, - "application/vnd.amiga.ami": { - "source": "iana", - "extensions": ["ami"] - }, - "application/vnd.amundsen.maze+xml": { - "source": "iana" - }, - "application/vnd.android.package-archive": { - "source": "apache", - "compressible": false, - "extensions": ["apk"] - }, - "application/vnd.anser-web-certificate-issue-initiation": { - "source": "iana", - "extensions": ["cii"] - }, - "application/vnd.anser-web-funds-transfer-initiation": { - "source": "apache", - "extensions": ["fti"] - }, - "application/vnd.antix.game-component": { - "source": "iana", - "extensions": ["atx"] - }, - "application/vnd.apache.thrift.binary": { - "source": "iana" - }, - "application/vnd.apache.thrift.compact": { - "source": "iana" - }, - "application/vnd.apache.thrift.json": { - "source": "iana" - }, - "application/vnd.api+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.apple.installer+xml": { - "source": "iana", - "extensions": ["mpkg"] - }, - "application/vnd.apple.mpegurl": { - "source": "iana", - "extensions": ["m3u8"] - }, - "application/vnd.arastra.swi": { - "source": "iana" - }, - "application/vnd.aristanetworks.swi": { - "source": "iana", - "extensions": ["swi"] - }, - "application/vnd.artsquare": { - "source": "iana" - }, - "application/vnd.astraea-software.iota": { - "source": "iana", - "extensions": ["iota"] - }, - "application/vnd.audiograph": { - "source": "iana", - "extensions": ["aep"] - }, - "application/vnd.autopackage": { - "source": "iana" - }, - "application/vnd.avistar+xml": { - "source": "iana" - }, - "application/vnd.balsamiq.bmml+xml": { - "source": "iana" - }, - "application/vnd.bekitzur-stech+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.blueice.multipass": { - "source": "iana", - "extensions": ["mpm"] - }, - "application/vnd.bluetooth.ep.oob": { - "source": "iana" - }, - "application/vnd.bluetooth.le.oob": { - "source": "iana" - }, - "application/vnd.bmi": { - "source": "iana", - "extensions": ["bmi"] - }, - "application/vnd.businessobjects": { - "source": "iana", - "extensions": ["rep"] - }, - "application/vnd.cab-jscript": { - "source": "iana" - }, - "application/vnd.canon-cpdl": { - "source": "iana" - }, - "application/vnd.canon-lips": { - "source": "iana" - }, - "application/vnd.cendio.thinlinc.clientconf": { - "source": "iana" - }, - "application/vnd.century-systems.tcp_stream": { - "source": "iana" - }, - "application/vnd.chemdraw+xml": { - "source": "iana", - "extensions": ["cdxml"] - }, - "application/vnd.chipnuts.karaoke-mmd": { - "source": "iana", - "extensions": ["mmd"] - }, - "application/vnd.cinderella": { - "source": "iana", - "extensions": ["cdy"] - }, - "application/vnd.cirpack.isdn-ext": { - "source": "iana" - }, - "application/vnd.claymore": { - "source": "iana", - "extensions": ["cla"] - }, - "application/vnd.cloanto.rp9": { - "source": "iana", - "extensions": ["rp9"] - }, - "application/vnd.clonk.c4group": { - "source": "iana", - "extensions": ["c4g","c4d","c4f","c4p","c4u"] - }, - "application/vnd.cluetrust.cartomobile-config": { - "source": "iana", - "extensions": ["c11amc"] - }, - "application/vnd.cluetrust.cartomobile-config-pkg": { - "source": "iana", - "extensions": ["c11amz"] - }, - "application/vnd.coffeescript": { - "source": "iana" - }, - "application/vnd.collection+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.collection.doc+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.collection.next+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.commerce-battelle": { - "source": "iana" - }, - "application/vnd.commonspace": { - "source": "iana", - "extensions": ["csp"] - }, - "application/vnd.contact.cmsg": { - "source": "iana", - "extensions": ["cdbcmsg"] - }, - "application/vnd.cosmocaller": { - "source": "iana", - "extensions": ["cmc"] - }, - "application/vnd.crick.clicker": { - "source": "iana", - "extensions": ["clkx"] - }, - "application/vnd.crick.clicker.keyboard": { - "source": "iana", - "extensions": ["clkk"] - }, - "application/vnd.crick.clicker.palette": { - "source": "iana", - "extensions": ["clkp"] - }, - "application/vnd.crick.clicker.template": { - "source": "iana", - "extensions": ["clkt"] - }, - "application/vnd.crick.clicker.wordbank": { - "source": "iana", - "extensions": ["clkw"] - }, - "application/vnd.criticaltools.wbs+xml": { - "source": "iana", - "extensions": ["wbs"] - }, - "application/vnd.ctc-posml": { - "source": "iana", - "extensions": ["pml"] - }, - "application/vnd.ctct.ws+xml": { - "source": "iana" - }, - "application/vnd.cups-pdf": { - "source": "iana" - }, - "application/vnd.cups-postscript": { - "source": "iana" - }, - "application/vnd.cups-ppd": { - "source": "iana", - "extensions": ["ppd"] - }, - "application/vnd.cups-raster": { - "source": "iana" - }, - "application/vnd.cups-raw": { - "source": "iana" - }, - "application/vnd.curl": { - "source": "iana" - }, - "application/vnd.curl.car": { - "source": "apache", - "extensions": ["car"] - }, - "application/vnd.curl.pcurl": { - "source": "apache", - "extensions": ["pcurl"] - }, - "application/vnd.cyan.dean.root+xml": { - "source": "iana" - }, - "application/vnd.cybank": { - "source": "iana" - }, - "application/vnd.dart": { - "source": "iana", - "compressible": true, - "extensions": ["dart"] - }, - "application/vnd.data-vision.rdz": { - "source": "iana", - "extensions": ["rdz"] - }, - "application/vnd.debian.binary-package": { - "source": "iana" - }, - "application/vnd.dece.data": { - "source": "iana", - "extensions": ["uvf","uvvf","uvd","uvvd"] - }, - "application/vnd.dece.ttml+xml": { - "source": "iana", - "extensions": ["uvt","uvvt"] - }, - "application/vnd.dece.unspecified": { - "source": "iana", - "extensions": ["uvx","uvvx"] - }, - "application/vnd.dece.zip": { - "source": "iana", - "extensions": ["uvz","uvvz"] - }, - "application/vnd.denovo.fcselayout-link": { - "source": "iana", - "extensions": ["fe_launch"] - }, - "application/vnd.desmume-movie": { - "source": "iana" - }, - "application/vnd.dir-bi.plate-dl-nosuffix": { - "source": "iana" - }, - "application/vnd.dm.delegation+xml": { - "source": "iana" - }, - "application/vnd.dna": { - "source": "iana", - "extensions": ["dna"] - }, - "application/vnd.document+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.dolby.mlp": { - "source": "apache", - "extensions": ["mlp"] - }, - "application/vnd.dolby.mobile.1": { - "source": "iana" - }, - "application/vnd.dolby.mobile.2": { - "source": "iana" - }, - "application/vnd.doremir.scorecloud-binary-document": { - "source": "iana" - }, - "application/vnd.dpgraph": { - "source": "iana", - "extensions": ["dpg"] - }, - "application/vnd.dreamfactory": { - "source": "iana", - "extensions": ["dfac"] - }, - "application/vnd.ds-keypoint": { - "source": "apache", - "extensions": ["kpxx"] - }, - "application/vnd.dtg.local": { - "source": "iana" - }, - "application/vnd.dtg.local.flash": { - "source": "iana" - }, - "application/vnd.dtg.local.html": { - "source": "iana" - }, - "application/vnd.dvb.ait": { - "source": "iana", - "extensions": ["ait"] - }, - "application/vnd.dvb.dvbj": { - "source": "iana" - }, - "application/vnd.dvb.esgcontainer": { - "source": "iana" - }, - "application/vnd.dvb.ipdcdftnotifaccess": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgaccess": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgaccess2": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgpdd": { - "source": "iana" - }, - "application/vnd.dvb.ipdcroaming": { - "source": "iana" - }, - "application/vnd.dvb.iptv.alfec-base": { - "source": "iana" - }, - "application/vnd.dvb.iptv.alfec-enhancement": { - "source": "iana" - }, - "application/vnd.dvb.notif-aggregate-root+xml": { - "source": "iana" - }, - "application/vnd.dvb.notif-container+xml": { - "source": "iana" - }, - "application/vnd.dvb.notif-generic+xml": { - "source": "iana" - }, - "application/vnd.dvb.notif-ia-msglist+xml": { - "source": "iana" - }, - "application/vnd.dvb.notif-ia-registration-request+xml": { - "source": "iana" - }, - "application/vnd.dvb.notif-ia-registration-response+xml": { - "source": "iana" - }, - "application/vnd.dvb.notif-init+xml": { - "source": "iana" - }, - "application/vnd.dvb.pfr": { - "source": "iana" - }, - "application/vnd.dvb.service": { - "source": "iana", - "extensions": ["svc"] - }, - "application/vnd.dxr": { - "source": "iana" - }, - "application/vnd.dynageo": { - "source": "iana", - "extensions": ["geo"] - }, - "application/vnd.dzr": { - "source": "iana" - }, - "application/vnd.easykaraoke.cdgdownload": { - "source": "iana" - }, - "application/vnd.ecdis-update": { - "source": "iana" - }, - "application/vnd.ecowin.chart": { - "source": "iana", - "extensions": ["mag"] - }, - "application/vnd.ecowin.filerequest": { - "source": "iana" - }, - "application/vnd.ecowin.fileupdate": { - "source": "iana" - }, - "application/vnd.ecowin.series": { - "source": "iana" - }, - "application/vnd.ecowin.seriesrequest": { - "source": "iana" - }, - "application/vnd.ecowin.seriesupdate": { - "source": "iana" - }, - "application/vnd.emclient.accessrequest+xml": { - "source": "iana" - }, - "application/vnd.enliven": { - "source": "iana", - "extensions": ["nml"] - }, - "application/vnd.enphase.envoy": { - "source": "iana" - }, - "application/vnd.eprints.data+xml": { - "source": "iana" - }, - "application/vnd.epson.esf": { - "source": "iana", - "extensions": ["esf"] - }, - "application/vnd.epson.msf": { - "source": "iana", - "extensions": ["msf"] - }, - "application/vnd.epson.quickanime": { - "source": "iana", - "extensions": ["qam"] - }, - "application/vnd.epson.salt": { - "source": "iana", - "extensions": ["slt"] - }, - "application/vnd.epson.ssf": { - "source": "iana", - "extensions": ["ssf"] - }, - "application/vnd.ericsson.quickcall": { - "source": "iana" - }, - "application/vnd.eszigno3+xml": { - "source": "iana", - "extensions": ["es3","et3"] - }, - "application/vnd.etsi.aoc+xml": { - "source": "iana" - }, - "application/vnd.etsi.asic-e+zip": { - "source": "iana" - }, - "application/vnd.etsi.asic-s+zip": { - "source": "iana" - }, - "application/vnd.etsi.cug+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvcommand+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvdiscovery+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvprofile+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvsad-bc+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvsad-cod+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvsad-npvr+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvservice+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvsync+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvueprofile+xml": { - "source": "iana" - }, - "application/vnd.etsi.mcid+xml": { - "source": "iana" - }, - "application/vnd.etsi.mheg5": { - "source": "iana" - }, - "application/vnd.etsi.overload-control-policy-dataset+xml": { - "source": "iana" - }, - "application/vnd.etsi.pstn+xml": { - "source": "iana" - }, - "application/vnd.etsi.sci+xml": { - "source": "iana" - }, - "application/vnd.etsi.simservs+xml": { - "source": "iana" - }, - "application/vnd.etsi.timestamp-token": { - "source": "iana" - }, - "application/vnd.etsi.tsl+xml": { - "source": "iana" - }, - "application/vnd.etsi.tsl.der": { - "source": "iana" - }, - "application/vnd.eudora.data": { - "source": "iana" - }, - "application/vnd.ezpix-album": { - "source": "iana", - "extensions": ["ez2"] - }, - "application/vnd.ezpix-package": { - "source": "iana", - "extensions": ["ez3"] - }, - "application/vnd.f-secure.mobile": { - "source": "iana" - }, - "application/vnd.fdf": { - "source": "iana", - "extensions": ["fdf"] - }, - "application/vnd.fdsn.mseed": { - "source": "iana", - "extensions": ["mseed"] - }, - "application/vnd.fdsn.seed": { - "source": "iana", - "extensions": ["seed","dataless"] - }, - "application/vnd.ffsns": { - "source": "iana" - }, - "application/vnd.fints": { - "source": "iana" - }, - "application/vnd.flographit": { - "source": "iana", - "extensions": ["gph"] - }, - "application/vnd.fluxtime.clip": { - "source": "iana", - "extensions": ["ftc"] - }, - "application/vnd.font-fontforge-sfd": { - "source": "iana" - }, - "application/vnd.framemaker": { - "source": "iana", - "extensions": ["fm","frame","maker","book"] - }, - "application/vnd.frogans.fnc": { - "source": "iana", - "extensions": ["fnc"] - }, - "application/vnd.frogans.ltf": { - "source": "iana", - "extensions": ["ltf"] - }, - "application/vnd.fsc.weblaunch": { - "source": "iana", - "extensions": ["fsc"] - }, - "application/vnd.fujitsu.oasys": { - "source": "iana", - "extensions": ["oas"] - }, - "application/vnd.fujitsu.oasys2": { - "source": "iana", - "extensions": ["oa2"] - }, - "application/vnd.fujitsu.oasys3": { - "source": "iana", - "extensions": ["oa3"] - }, - "application/vnd.fujitsu.oasysgp": { - "source": "iana", - "extensions": ["fg5"] - }, - "application/vnd.fujitsu.oasysprs": { - "source": "iana", - "extensions": ["bh2"] - }, - "application/vnd.fujixerox.art-ex": { - "source": "iana" - }, - "application/vnd.fujixerox.art4": { - "source": "iana" - }, - "application/vnd.fujixerox.ddd": { - "source": "iana", - "extensions": ["ddd"] - }, - "application/vnd.fujixerox.docuworks": { - "source": "iana", - "extensions": ["xdw"] - }, - "application/vnd.fujixerox.docuworks.binder": { - "source": "iana", - "extensions": ["xbd"] - }, - "application/vnd.fujixerox.docuworks.container": { - "source": "iana" - }, - "application/vnd.fujixerox.hbpl": { - "source": "iana" - }, - "application/vnd.fut-misnet": { - "source": "iana" - }, - "application/vnd.fuzzysheet": { - "source": "iana", - "extensions": ["fzs"] - }, - "application/vnd.genomatix.tuxedo": { - "source": "iana", - "extensions": ["txd"] - }, - "application/vnd.geo+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.geocube+xml": { - "source": "iana" - }, - "application/vnd.geogebra.file": { - "source": "iana", - "extensions": ["ggb"] - }, - "application/vnd.geogebra.tool": { - "source": "iana", - "extensions": ["ggt"] - }, - "application/vnd.geometry-explorer": { - "source": "iana", - "extensions": ["gex","gre"] - }, - "application/vnd.geonext": { - "source": "iana", - "extensions": ["gxt"] - }, - "application/vnd.geoplan": { - "source": "iana", - "extensions": ["g2w"] - }, - "application/vnd.geospace": { - "source": "iana", - "extensions": ["g3w"] - }, - "application/vnd.globalplatform.card-content-mgt": { - "source": "iana" - }, - "application/vnd.globalplatform.card-content-mgt-response": { - "source": "iana" - }, - "application/vnd.gmx": { - "source": "iana", - "extensions": ["gmx"] - }, - "application/vnd.google-earth.kml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["kml"] - }, - "application/vnd.google-earth.kmz": { - "source": "iana", - "compressible": false, - "extensions": ["kmz"] - }, - "application/vnd.gov.sk.e-form+zip": { - "source": "iana" - }, - "application/vnd.grafeq": { - "source": "iana", - "extensions": ["gqf","gqs"] - }, - "application/vnd.gridmp": { - "source": "iana" - }, - "application/vnd.groove-account": { - "source": "iana", - "extensions": ["gac"] - }, - "application/vnd.groove-help": { - "source": "iana", - "extensions": ["ghf"] - }, - "application/vnd.groove-identity-message": { - "source": "iana", - "extensions": ["gim"] - }, - "application/vnd.groove-injector": { - "source": "iana", - "extensions": ["grv"] - }, - "application/vnd.groove-tool-message": { - "source": "iana", - "extensions": ["gtm"] - }, - "application/vnd.groove-tool-template": { - "source": "iana", - "extensions": ["tpl"] - }, - "application/vnd.groove-vcard": { - "source": "iana", - "extensions": ["vcg"] - }, - "application/vnd.hal+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hal+xml": { - "source": "iana", - "extensions": ["hal"] - }, - "application/vnd.handheld-entertainment+xml": { - "source": "iana", - "extensions": ["zmm"] - }, - "application/vnd.hbci": { - "source": "iana", - "extensions": ["hbci"] - }, - "application/vnd.hcl-bireports": { - "source": "iana" - }, - "application/vnd.heroku+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hhe.lesson-player": { - "source": "iana", - "extensions": ["les"] - }, - "application/vnd.hp-hpgl": { - "source": "iana", - "extensions": ["hpgl"] - }, - "application/vnd.hp-hpid": { - "source": "iana", - "extensions": ["hpid"] - }, - "application/vnd.hp-hps": { - "source": "iana", - "extensions": ["hps"] - }, - "application/vnd.hp-jlyt": { - "source": "iana", - "extensions": ["jlt"] - }, - "application/vnd.hp-pcl": { - "source": "iana", - "extensions": ["pcl"] - }, - "application/vnd.hp-pclxl": { - "source": "iana", - "extensions": ["pclxl"] - }, - "application/vnd.httphone": { - "source": "iana" - }, - "application/vnd.hydrostatix.sof-data": { - "source": "iana" - }, - "application/vnd.hzn-3d-crossword": { - "source": "iana" - }, - "application/vnd.ibm.afplinedata": { - "source": "iana" - }, - "application/vnd.ibm.electronic-media": { - "source": "iana" - }, - "application/vnd.ibm.minipay": { - "source": "iana", - "extensions": ["mpy"] - }, - "application/vnd.ibm.modcap": { - "source": "iana", - "extensions": ["afp","listafp","list3820"] - }, - "application/vnd.ibm.rights-management": { - "source": "iana", - "extensions": ["irm"] - }, - "application/vnd.ibm.secure-container": { - "source": "iana", - "extensions": ["sc"] - }, - "application/vnd.iccprofile": { - "source": "iana", - "extensions": ["icc","icm"] - }, - "application/vnd.ieee.1905": { - "source": "iana" - }, - "application/vnd.igloader": { - "source": "iana", - "extensions": ["igl"] - }, - "application/vnd.immervision-ivp": { - "source": "iana", - "extensions": ["ivp"] - }, - "application/vnd.immervision-ivu": { - "source": "iana", - "extensions": ["ivu"] - }, - "application/vnd.ims.imsccv1p1": { - "source": "iana" - }, - "application/vnd.ims.imsccv1p2": { - "source": "iana" - }, - "application/vnd.ims.lis.v2.result+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolconsumerprofile+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolproxy+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolproxy.id+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolsettings+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolsettings.simple+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.informedcontrol.rms+xml": { - "source": "iana" - }, - "application/vnd.informix-visionary": { - "source": "iana" - }, - "application/vnd.infotech.project": { - "source": "iana" - }, - "application/vnd.infotech.project+xml": { - "source": "iana" - }, - "application/vnd.innopath.wamp.notification": { - "source": "iana" - }, - "application/vnd.insors.igm": { - "source": "iana", - "extensions": ["igm"] - }, - "application/vnd.intercon.formnet": { - "source": "iana", - "extensions": ["xpw","xpx"] - }, - "application/vnd.intergeo": { - "source": "iana", - "extensions": ["i2g"] - }, - "application/vnd.intertrust.digibox": { - "source": "iana" - }, - "application/vnd.intertrust.nncp": { - "source": "iana" - }, - "application/vnd.intu.qbo": { - "source": "iana", - "extensions": ["qbo"] - }, - "application/vnd.intu.qfx": { - "source": "iana", - "extensions": ["qfx"] - }, - "application/vnd.iptc.g2.catalogitem+xml": { - "source": "iana" - }, - "application/vnd.iptc.g2.conceptitem+xml": { - "source": "iana" - }, - "application/vnd.iptc.g2.knowledgeitem+xml": { - "source": "iana" - }, - "application/vnd.iptc.g2.newsitem+xml": { - "source": "iana" - }, - "application/vnd.iptc.g2.newsmessage+xml": { - "source": "iana" - }, - "application/vnd.iptc.g2.packageitem+xml": { - "source": "iana" - }, - "application/vnd.iptc.g2.planningitem+xml": { - "source": "iana" - }, - "application/vnd.ipunplugged.rcprofile": { - "source": "iana", - "extensions": ["rcprofile"] - }, - "application/vnd.irepository.package+xml": { - "source": "iana", - "extensions": ["irp"] - }, - "application/vnd.is-xpr": { - "source": "iana", - "extensions": ["xpr"] - }, - "application/vnd.isac.fcs": { - "source": "iana", - "extensions": ["fcs"] - }, - "application/vnd.jam": { - "source": "iana", - "extensions": ["jam"] - }, - "application/vnd.japannet-directory-service": { - "source": "iana" - }, - "application/vnd.japannet-jpnstore-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-payment-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-registration": { - "source": "iana" - }, - "application/vnd.japannet-registration-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-setstore-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-verification": { - "source": "iana" - }, - "application/vnd.japannet-verification-wakeup": { - "source": "iana" - }, - "application/vnd.jcp.javame.midlet-rms": { - "source": "iana", - "extensions": ["rms"] - }, - "application/vnd.jisp": { - "source": "iana", - "extensions": ["jisp"] - }, - "application/vnd.joost.joda-archive": { - "source": "iana", - "extensions": ["joda"] - }, - "application/vnd.jsk.isdn-ngn": { - "source": "iana" - }, - "application/vnd.kahootz": { - "source": "iana", - "extensions": ["ktz","ktr"] - }, - "application/vnd.kde.karbon": { - "source": "iana", - "extensions": ["karbon"] - }, - "application/vnd.kde.kchart": { - "source": "iana", - "extensions": ["chrt"] - }, - "application/vnd.kde.kformula": { - "source": "iana", - "extensions": ["kfo"] - }, - "application/vnd.kde.kivio": { - "source": "iana", - "extensions": ["flw"] - }, - "application/vnd.kde.kontour": { - "source": "iana", - "extensions": ["kon"] - }, - "application/vnd.kde.kpresenter": { - "source": "iana", - "extensions": ["kpr","kpt"] - }, - "application/vnd.kde.kspread": { - "source": "iana", - "extensions": ["ksp"] - }, - "application/vnd.kde.kword": { - "source": "iana", - "extensions": ["kwd","kwt"] - }, - "application/vnd.kenameaapp": { - "source": "iana", - "extensions": ["htke"] - }, - "application/vnd.kidspiration": { - "source": "iana", - "extensions": ["kia"] - }, - "application/vnd.kinar": { - "source": "iana", - "extensions": ["kne","knp"] - }, - "application/vnd.koan": { - "source": "iana", - "extensions": ["skp","skd","skt","skm"] - }, - "application/vnd.kodak-descriptor": { - "source": "iana", - "extensions": ["sse"] - }, - "application/vnd.las.las+xml": { - "source": "iana", - "extensions": ["lasxml"] - }, - "application/vnd.liberty-request+xml": { - "source": "iana" - }, - "application/vnd.llamagraphics.life-balance.desktop": { - "source": "iana", - "extensions": ["lbd"] - }, - "application/vnd.llamagraphics.life-balance.exchange+xml": { - "source": "iana", - "extensions": ["lbe"] - }, - "application/vnd.lotus-1-2-3": { - "source": "iana", - "extensions": ["123"] - }, - "application/vnd.lotus-approach": { - "source": "iana", - "extensions": ["apr"] - }, - "application/vnd.lotus-freelance": { - "source": "iana", - "extensions": ["pre"] - }, - "application/vnd.lotus-notes": { - "source": "iana", - "extensions": ["nsf"] - }, - "application/vnd.lotus-organizer": { - "source": "iana", - "extensions": ["org"] - }, - "application/vnd.lotus-screencam": { - "source": "iana", - "extensions": ["scm"] - }, - "application/vnd.lotus-wordpro": { - "source": "iana", - "extensions": ["lwp"] - }, - "application/vnd.macports.portpkg": { - "source": "iana", - "extensions": ["portpkg"] - }, - "application/vnd.marlin.drm.actiontoken+xml": { - "source": "iana" - }, - "application/vnd.marlin.drm.conftoken+xml": { - "source": "iana" - }, - "application/vnd.marlin.drm.license+xml": { - "source": "iana" - }, - "application/vnd.marlin.drm.mdcf": { - "source": "iana" - }, - "application/vnd.mason+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.maxmind.maxmind-db": { - "source": "iana" - }, - "application/vnd.mcd": { - "source": "iana", - "extensions": ["mcd"] - }, - "application/vnd.medcalcdata": { - "source": "iana", - "extensions": ["mc1"] - }, - "application/vnd.mediastation.cdkey": { - "source": "iana", - "extensions": ["cdkey"] - }, - "application/vnd.meridian-slingshot": { - "source": "iana" - }, - "application/vnd.mfer": { - "source": "iana", - "extensions": ["mwf"] - }, - "application/vnd.mfmp": { - "source": "iana", - "extensions": ["mfm"] - }, - "application/vnd.micrografx.flo": { - "source": "iana", - "extensions": ["flo"] - }, - "application/vnd.micrografx.igx": { - "source": "iana", - "extensions": ["igx"] - }, - "application/vnd.miele+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.mif": { - "source": "iana", - "extensions": ["mif"] - }, - "application/vnd.minisoft-hp3000-save": { - "source": "iana" - }, - "application/vnd.mitsubishi.misty-guard.trustweb": { - "source": "iana" - }, - "application/vnd.mobius.daf": { - "source": "iana", - "extensions": ["daf"] - }, - "application/vnd.mobius.dis": { - "source": "iana", - "extensions": ["dis"] - }, - "application/vnd.mobius.mbk": { - "source": "iana", - "extensions": ["mbk"] - }, - "application/vnd.mobius.mqy": { - "source": "iana", - "extensions": ["mqy"] - }, - "application/vnd.mobius.msl": { - "source": "iana", - "extensions": ["msl"] - }, - "application/vnd.mobius.plc": { - "source": "iana", - "extensions": ["plc"] - }, - "application/vnd.mobius.txf": { - "source": "iana", - "extensions": ["txf"] - }, - "application/vnd.mophun.application": { - "source": "iana", - "extensions": ["mpn"] - }, - "application/vnd.mophun.certificate": { - "source": "iana", - "extensions": ["mpc"] - }, - "application/vnd.motorola.flexsuite": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.adsi": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.fis": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.gotap": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.kmr": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.ttc": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.wem": { - "source": "iana" - }, - "application/vnd.motorola.iprm": { - "source": "iana" - }, - "application/vnd.mozilla.xul+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xul"] - }, - "application/vnd.ms-3mfdocument": { - "source": "iana" - }, - "application/vnd.ms-artgalry": { - "source": "iana", - "extensions": ["cil"] - }, - "application/vnd.ms-asf": { - "source": "iana" - }, - "application/vnd.ms-cab-compressed": { - "source": "iana", - "extensions": ["cab"] - }, - "application/vnd.ms-color.iccprofile": { - "source": "apache" - }, - "application/vnd.ms-excel": { - "source": "iana", - "compressible": false, - "extensions": ["xls","xlm","xla","xlc","xlt","xlw"] - }, - "application/vnd.ms-excel.addin.macroenabled.12": { - "source": "iana", - "extensions": ["xlam"] - }, - "application/vnd.ms-excel.sheet.binary.macroenabled.12": { - "source": "iana", - "extensions": ["xlsb"] - }, - "application/vnd.ms-excel.sheet.macroenabled.12": { - "source": "iana", - "extensions": ["xlsm"] - }, - "application/vnd.ms-excel.template.macroenabled.12": { - "source": "iana", - "extensions": ["xltm"] - }, - "application/vnd.ms-fontobject": { - "source": "iana", - "compressible": true, - "extensions": ["eot"] - }, - "application/vnd.ms-htmlhelp": { - "source": "iana", - "extensions": ["chm"] - }, - "application/vnd.ms-ims": { - "source": "iana", - "extensions": ["ims"] - }, - "application/vnd.ms-lrm": { - "source": "iana", - "extensions": ["lrm"] - }, - "application/vnd.ms-office.activex+xml": { - "source": "iana" - }, - "application/vnd.ms-officetheme": { - "source": "iana", - "extensions": ["thmx"] - }, - "application/vnd.ms-opentype": { - "source": "apache", - "compressible": true - }, - "application/vnd.ms-package.obfuscated-opentype": { - "source": "apache" - }, - "application/vnd.ms-pki.seccat": { - "source": "apache", - "extensions": ["cat"] - }, - "application/vnd.ms-pki.stl": { - "source": "apache", - "extensions": ["stl"] - }, - "application/vnd.ms-playready.initiator+xml": { - "source": "iana" - }, - "application/vnd.ms-powerpoint": { - "source": "iana", - "compressible": false, - "extensions": ["ppt","pps","pot"] - }, - "application/vnd.ms-powerpoint.addin.macroenabled.12": { - "source": "iana", - "extensions": ["ppam"] - }, - "application/vnd.ms-powerpoint.presentation.macroenabled.12": { - "source": "iana", - "extensions": ["pptm"] - }, - "application/vnd.ms-powerpoint.slide.macroenabled.12": { - "source": "iana", - "extensions": ["sldm"] - }, - "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { - "source": "iana", - "extensions": ["ppsm"] - }, - "application/vnd.ms-powerpoint.template.macroenabled.12": { - "source": "iana", - "extensions": ["potm"] - }, - "application/vnd.ms-printing.printticket+xml": { - "source": "apache" - }, - "application/vnd.ms-project": { - "source": "iana", - "extensions": ["mpp","mpt"] - }, - "application/vnd.ms-tnef": { - "source": "iana" - }, - "application/vnd.ms-windows.printerpairing": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.lic-chlg-req": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.lic-resp": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.meter-chlg-req": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.meter-resp": { - "source": "iana" - }, - "application/vnd.ms-word.document.macroenabled.12": { - "source": "iana", - "extensions": ["docm"] - }, - "application/vnd.ms-word.template.macroenabled.12": { - "source": "iana", - "extensions": ["dotm"] - }, - "application/vnd.ms-works": { - "source": "iana", - "extensions": ["wps","wks","wcm","wdb"] - }, - "application/vnd.ms-wpl": { - "source": "iana", - "extensions": ["wpl"] - }, - "application/vnd.ms-xpsdocument": { - "source": "iana", - "compressible": false, - "extensions": ["xps"] - }, - "application/vnd.mseq": { - "source": "iana", - "extensions": ["mseq"] - }, - "application/vnd.msign": { - "source": "iana" - }, - "application/vnd.multiad.creator": { - "source": "iana" - }, - "application/vnd.multiad.creator.cif": { - "source": "iana" - }, - "application/vnd.music-niff": { - "source": "iana" - }, - "application/vnd.musician": { - "source": "iana", - "extensions": ["mus"] - }, - "application/vnd.muvee.style": { - "source": "iana", - "extensions": ["msty"] - }, - "application/vnd.mynfc": { - "source": "iana", - "extensions": ["taglet"] - }, - "application/vnd.ncd.control": { - "source": "iana" - }, - "application/vnd.ncd.reference": { - "source": "iana" - }, - "application/vnd.nervana": { - "source": "iana" - }, - "application/vnd.netfpx": { - "source": "iana" - }, - "application/vnd.neurolanguage.nlu": { - "source": "iana", - "extensions": ["nlu"] - }, - "application/vnd.nintendo.nitro.rom": { - "source": "iana" - }, - "application/vnd.nintendo.snes.rom": { - "source": "iana" - }, - "application/vnd.nitf": { - "source": "iana", - "extensions": ["ntf","nitf"] - }, - "application/vnd.noblenet-directory": { - "source": "iana", - "extensions": ["nnd"] - }, - "application/vnd.noblenet-sealer": { - "source": "iana", - "extensions": ["nns"] - }, - "application/vnd.noblenet-web": { - "source": "iana", - "extensions": ["nnw"] - }, - "application/vnd.nokia.catalogs": { - "source": "iana" - }, - "application/vnd.nokia.conml+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.conml+xml": { - "source": "iana" - }, - "application/vnd.nokia.iptv.config+xml": { - "source": "iana" - }, - "application/vnd.nokia.isds-radio-presets": { - "source": "iana" - }, - "application/vnd.nokia.landmark+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.landmark+xml": { - "source": "iana" - }, - "application/vnd.nokia.landmarkcollection+xml": { - "source": "iana" - }, - "application/vnd.nokia.n-gage.ac+xml": { - "source": "iana" - }, - "application/vnd.nokia.n-gage.data": { - "source": "iana", - "extensions": ["ngdat"] - }, - "application/vnd.nokia.n-gage.symbian.install": { - "source": "iana" - }, - "application/vnd.nokia.ncd": { - "source": "iana" - }, - "application/vnd.nokia.pcd+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.pcd+xml": { - "source": "iana" - }, - "application/vnd.nokia.radio-preset": { - "source": "iana", - "extensions": ["rpst"] - }, - "application/vnd.nokia.radio-presets": { - "source": "iana", - "extensions": ["rpss"] - }, - "application/vnd.novadigm.edm": { - "source": "iana", - "extensions": ["edm"] - }, - "application/vnd.novadigm.edx": { - "source": "iana", - "extensions": ["edx"] - }, - "application/vnd.novadigm.ext": { - "source": "iana", - "extensions": ["ext"] - }, - "application/vnd.ntt-local.content-share": { - "source": "iana" - }, - "application/vnd.ntt-local.file-transfer": { - "source": "iana" - }, - "application/vnd.ntt-local.ogw_remote-access": { - "source": "iana" - }, - "application/vnd.ntt-local.sip-ta_remote": { - "source": "iana" - }, - "application/vnd.ntt-local.sip-ta_tcp_stream": { - "source": "iana" - }, - "application/vnd.oasis.opendocument.chart": { - "source": "iana", - "extensions": ["odc"] - }, - "application/vnd.oasis.opendocument.chart-template": { - "source": "iana", - "extensions": ["otc"] - }, - "application/vnd.oasis.opendocument.database": { - "source": "iana", - "extensions": ["odb"] - }, - "application/vnd.oasis.opendocument.formula": { - "source": "iana", - "extensions": ["odf"] - }, - "application/vnd.oasis.opendocument.formula-template": { - "source": "iana", - "extensions": ["odft"] - }, - "application/vnd.oasis.opendocument.graphics": { - "source": "iana", - "compressible": false, - "extensions": ["odg"] - }, - "application/vnd.oasis.opendocument.graphics-template": { - "source": "iana", - "extensions": ["otg"] - }, - "application/vnd.oasis.opendocument.image": { - "source": "iana", - "extensions": ["odi"] - }, - "application/vnd.oasis.opendocument.image-template": { - "source": "iana", - "extensions": ["oti"] - }, - "application/vnd.oasis.opendocument.presentation": { - "source": "iana", - "compressible": false, - "extensions": ["odp"] - }, - "application/vnd.oasis.opendocument.presentation-template": { - "source": "iana", - "extensions": ["otp"] - }, - "application/vnd.oasis.opendocument.spreadsheet": { - "source": "iana", - "compressible": false, - "extensions": ["ods"] - }, - "application/vnd.oasis.opendocument.spreadsheet-template": { - "source": "iana", - "extensions": ["ots"] - }, - "application/vnd.oasis.opendocument.text": { - "source": "iana", - "compressible": false, - "extensions": ["odt"] - }, - "application/vnd.oasis.opendocument.text-master": { - "source": "iana", - "extensions": ["odm"] - }, - "application/vnd.oasis.opendocument.text-template": { - "source": "iana", - "extensions": ["ott"] - }, - "application/vnd.oasis.opendocument.text-web": { - "source": "iana", - "extensions": ["oth"] - }, - "application/vnd.obn": { - "source": "iana" - }, - "application/vnd.oftn.l10n+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.contentaccessdownload+xml": { - "source": "iana" - }, - "application/vnd.oipf.contentaccessstreaming+xml": { - "source": "iana" - }, - "application/vnd.oipf.cspg-hexbinary": { - "source": "iana" - }, - "application/vnd.oipf.dae.svg+xml": { - "source": "iana" - }, - "application/vnd.oipf.dae.xhtml+xml": { - "source": "iana" - }, - "application/vnd.oipf.mippvcontrolmessage+xml": { - "source": "iana" - }, - "application/vnd.oipf.pae.gem": { - "source": "iana" - }, - "application/vnd.oipf.spdiscovery+xml": { - "source": "iana" - }, - "application/vnd.oipf.spdlist+xml": { - "source": "iana" - }, - "application/vnd.oipf.ueprofile+xml": { - "source": "iana" - }, - "application/vnd.oipf.userprofile+xml": { - "source": "iana" - }, - "application/vnd.olpc-sugar": { - "source": "iana", - "extensions": ["xo"] - }, - "application/vnd.oma-scws-config": { - "source": "iana" - }, - "application/vnd.oma-scws-http-request": { - "source": "iana" - }, - "application/vnd.oma-scws-http-response": { - "source": "iana" - }, - "application/vnd.oma.bcast.associated-procedure-parameter+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.drm-trigger+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.imd+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.ltkm": { - "source": "iana" - }, - "application/vnd.oma.bcast.notification+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.provisioningtrigger": { - "source": "iana" - }, - "application/vnd.oma.bcast.sgboot": { - "source": "iana" - }, - "application/vnd.oma.bcast.sgdd+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.sgdu": { - "source": "iana" - }, - "application/vnd.oma.bcast.simple-symbol-container": { - "source": "iana" - }, - "application/vnd.oma.bcast.smartcard-trigger+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.sprov+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.stkm": { - "source": "iana" - }, - "application/vnd.oma.cab-address-book+xml": { - "source": "iana" - }, - "application/vnd.oma.cab-feature-handler+xml": { - "source": "iana" - }, - "application/vnd.oma.cab-pcc+xml": { - "source": "iana" - }, - "application/vnd.oma.cab-subs-invite+xml": { - "source": "iana" - }, - "application/vnd.oma.cab-user-prefs+xml": { - "source": "iana" - }, - "application/vnd.oma.dcd": { - "source": "iana" - }, - "application/vnd.oma.dcdc": { - "source": "iana" - }, - "application/vnd.oma.dd2+xml": { - "source": "iana", - "extensions": ["dd2"] - }, - "application/vnd.oma.drm.risd+xml": { - "source": "iana" - }, - "application/vnd.oma.group-usage-list+xml": { - "source": "iana" - }, - "application/vnd.oma.pal+xml": { - "source": "iana" - }, - "application/vnd.oma.poc.detailed-progress-report+xml": { - "source": "iana" - }, - "application/vnd.oma.poc.final-report+xml": { - "source": "iana" - }, - "application/vnd.oma.poc.groups+xml": { - "source": "iana" - }, - "application/vnd.oma.poc.invocation-descriptor+xml": { - "source": "iana" - }, - "application/vnd.oma.poc.optimized-progress-report+xml": { - "source": "iana" - }, - "application/vnd.oma.push": { - "source": "iana" - }, - "application/vnd.oma.scidm.messages+xml": { - "source": "iana" - }, - "application/vnd.oma.xcap-directory+xml": { - "source": "iana" - }, - "application/vnd.omads-email+xml": { - "source": "iana" - }, - "application/vnd.omads-file+xml": { - "source": "iana" - }, - "application/vnd.omads-folder+xml": { - "source": "iana" - }, - "application/vnd.omaloc-supl-init": { - "source": "iana" - }, - "application/vnd.openeye.oeb": { - "source": "iana" - }, - "application/vnd.openofficeorg.extension": { - "source": "apache", - "extensions": ["oxt"] - }, - "application/vnd.openxmlformats-officedocument.custom-properties+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawing+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.extended-properties+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml-template": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.presentation": { - "source": "iana", - "compressible": false, - "extensions": ["pptx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.slide": { - "source": "iana", - "extensions": ["sldx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { - "source": "iana", - "extensions": ["ppsx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.template": { - "source": "apache", - "extensions": ["potx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml-template": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { - "source": "iana", - "compressible": false, - "extensions": ["xlsx"] - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { - "source": "apache", - "extensions": ["xltx"] - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.theme+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.themeoverride+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.vmldrawing": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml-template": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { - "source": "iana", - "compressible": false, - "extensions": ["docx"] - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { - "source": "apache", - "extensions": ["dotx"] - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-package.core-properties+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-package.relationships+xml": { - "source": "iana" - }, - "application/vnd.oracle.resource+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.orange.indata": { - "source": "iana" - }, - "application/vnd.osa.netdeploy": { - "source": "iana" - }, - "application/vnd.osgeo.mapguide.package": { - "source": "iana", - "extensions": ["mgp"] - }, - "application/vnd.osgi.bundle": { - "source": "iana" - }, - "application/vnd.osgi.dp": { - "source": "iana", - "extensions": ["dp"] - }, - "application/vnd.osgi.subsystem": { - "source": "iana", - "extensions": ["esa"] - }, - "application/vnd.otps.ct-kip+xml": { - "source": "iana" - }, - "application/vnd.palm": { - "source": "iana", - "extensions": ["pdb","pqa","oprc"] - }, - "application/vnd.panoply": { - "source": "iana" - }, - "application/vnd.paos+xml": { - "source": "iana" - }, - "application/vnd.paos.xml": { - "source": "apache" - }, - "application/vnd.pawaafile": { - "source": "iana", - "extensions": ["paw"] - }, - "application/vnd.pcos": { - "source": "iana" - }, - "application/vnd.pg.format": { - "source": "iana", - "extensions": ["str"] - }, - "application/vnd.pg.osasli": { - "source": "iana", - "extensions": ["ei6"] - }, - "application/vnd.piaccess.application-licence": { - "source": "iana" - }, - "application/vnd.picsel": { - "source": "iana", - "extensions": ["efif"] - }, - "application/vnd.pmi.widget": { - "source": "iana", - "extensions": ["wg"] - }, - "application/vnd.poc.group-advertisement+xml": { - "source": "iana" - }, - "application/vnd.pocketlearn": { - "source": "iana", - "extensions": ["plf"] - }, - "application/vnd.powerbuilder6": { - "source": "iana", - "extensions": ["pbd"] - }, - "application/vnd.powerbuilder6-s": { - "source": "iana" - }, - "application/vnd.powerbuilder7": { - "source": "iana" - }, - "application/vnd.powerbuilder7-s": { - "source": "iana" - }, - "application/vnd.powerbuilder75": { - "source": "iana" - }, - "application/vnd.powerbuilder75-s": { - "source": "iana" - }, - "application/vnd.preminet": { - "source": "iana" - }, - "application/vnd.previewsystems.box": { - "source": "iana", - "extensions": ["box"] - }, - "application/vnd.proteus.magazine": { - "source": "iana", - "extensions": ["mgz"] - }, - "application/vnd.publishare-delta-tree": { - "source": "iana", - "extensions": ["qps"] - }, - "application/vnd.pvi.ptid1": { - "source": "iana", - "extensions": ["ptid"] - }, - "application/vnd.pwg-multiplexed": { - "source": "iana" - }, - "application/vnd.pwg-xhtml-print+xml": { - "source": "iana" - }, - "application/vnd.qualcomm.brew-app-res": { - "source": "iana" - }, - "application/vnd.quark.quarkxpress": { - "source": "iana", - "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"] - }, - "application/vnd.quobject-quoxdocument": { - "source": "iana" - }, - "application/vnd.radisys.moml+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-audit+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-audit-conf+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-audit-conn+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-audit-dialog+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-audit-stream+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-conf+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog-base+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog-fax-detect+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog-group+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog-speech+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog-transform+xml": { - "source": "iana" - }, - "application/vnd.rainstor.data": { - "source": "iana" - }, - "application/vnd.rapid": { - "source": "iana" - }, - "application/vnd.realvnc.bed": { - "source": "iana", - "extensions": ["bed"] - }, - "application/vnd.recordare.musicxml": { - "source": "iana", - "extensions": ["mxl"] - }, - "application/vnd.recordare.musicxml+xml": { - "source": "iana", - "extensions": ["musicxml"] - }, - "application/vnd.renlearn.rlprint": { - "source": "iana" - }, - "application/vnd.rig.cryptonote": { - "source": "iana", - "extensions": ["cryptonote"] - }, - "application/vnd.rim.cod": { - "source": "apache", - "extensions": ["cod"] - }, - "application/vnd.rn-realmedia": { - "source": "apache", - "extensions": ["rm"] - }, - "application/vnd.rn-realmedia-vbr": { - "source": "apache", - "extensions": ["rmvb"] - }, - "application/vnd.route66.link66+xml": { - "source": "iana", - "extensions": ["link66"] - }, - "application/vnd.rs-274x": { - "source": "iana" - }, - "application/vnd.ruckus.download": { - "source": "iana" - }, - "application/vnd.s3sms": { - "source": "iana" - }, - "application/vnd.sailingtracker.track": { - "source": "iana", - "extensions": ["st"] - }, - "application/vnd.sbm.cid": { - "source": "iana" - }, - "application/vnd.sbm.mid2": { - "source": "iana" - }, - "application/vnd.scribus": { - "source": "iana" - }, - "application/vnd.sealed.3df": { - "source": "iana" - }, - "application/vnd.sealed.csf": { - "source": "iana" - }, - "application/vnd.sealed.doc": { - "source": "iana" - }, - "application/vnd.sealed.eml": { - "source": "iana" - }, - "application/vnd.sealed.mht": { - "source": "iana" - }, - "application/vnd.sealed.net": { - "source": "iana" - }, - "application/vnd.sealed.ppt": { - "source": "iana" - }, - "application/vnd.sealed.tiff": { - "source": "iana" - }, - "application/vnd.sealed.xls": { - "source": "iana" - }, - "application/vnd.sealedmedia.softseal.html": { - "source": "iana" - }, - "application/vnd.sealedmedia.softseal.pdf": { - "source": "iana" - }, - "application/vnd.seemail": { - "source": "iana", - "extensions": ["see"] - }, - "application/vnd.sema": { - "source": "iana", - "extensions": ["sema"] - }, - "application/vnd.semd": { - "source": "iana", - "extensions": ["semd"] - }, - "application/vnd.semf": { - "source": "iana", - "extensions": ["semf"] - }, - "application/vnd.shana.informed.formdata": { - "source": "iana", - "extensions": ["ifm"] - }, - "application/vnd.shana.informed.formtemplate": { - "source": "iana", - "extensions": ["itp"] - }, - "application/vnd.shana.informed.interchange": { - "source": "iana", - "extensions": ["iif"] - }, - "application/vnd.shana.informed.package": { - "source": "iana", - "extensions": ["ipk"] - }, - "application/vnd.simtech-mindmapper": { - "source": "iana", - "extensions": ["twd","twds"] - }, - "application/vnd.siren+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.smaf": { - "source": "iana", - "extensions": ["mmf"] - }, - "application/vnd.smart.notebook": { - "source": "iana" - }, - "application/vnd.smart.teacher": { - "source": "iana", - "extensions": ["teacher"] - }, - "application/vnd.software602.filler.form+xml": { - "source": "iana" - }, - "application/vnd.software602.filler.form-xml-zip": { - "source": "iana" - }, - "application/vnd.solent.sdkm+xml": { - "source": "iana", - "extensions": ["sdkm","sdkd"] - }, - "application/vnd.spotfire.dxp": { - "source": "iana", - "extensions": ["dxp"] - }, - "application/vnd.spotfire.sfs": { - "source": "iana", - "extensions": ["sfs"] - }, - "application/vnd.sss-cod": { - "source": "iana" - }, - "application/vnd.sss-dtf": { - "source": "iana" - }, - "application/vnd.sss-ntf": { - "source": "iana" - }, - "application/vnd.stardivision.calc": { - "source": "apache", - "extensions": ["sdc"] - }, - "application/vnd.stardivision.draw": { - "source": "apache", - "extensions": ["sda"] - }, - "application/vnd.stardivision.impress": { - "source": "apache", - "extensions": ["sdd"] - }, - "application/vnd.stardivision.math": { - "source": "apache", - "extensions": ["smf"] - }, - "application/vnd.stardivision.writer": { - "source": "apache", - "extensions": ["sdw","vor"] - }, - "application/vnd.stardivision.writer-global": { - "source": "apache", - "extensions": ["sgl"] - }, - "application/vnd.stepmania.package": { - "source": "iana", - "extensions": ["smzip"] - }, - "application/vnd.stepmania.stepchart": { - "source": "iana", - "extensions": ["sm"] - }, - "application/vnd.street-stream": { - "source": "iana" - }, - "application/vnd.sun.wadl+xml": { - "source": "iana" - }, - "application/vnd.sun.xml.calc": { - "source": "apache", - "extensions": ["sxc"] - }, - "application/vnd.sun.xml.calc.template": { - "source": "apache", - "extensions": ["stc"] - }, - "application/vnd.sun.xml.draw": { - "source": "apache", - "extensions": ["sxd"] - }, - "application/vnd.sun.xml.draw.template": { - "source": "apache", - "extensions": ["std"] - }, - "application/vnd.sun.xml.impress": { - "source": "apache", - "extensions": ["sxi"] - }, - "application/vnd.sun.xml.impress.template": { - "source": "apache", - "extensions": ["sti"] - }, - "application/vnd.sun.xml.math": { - "source": "apache", - "extensions": ["sxm"] - }, - "application/vnd.sun.xml.writer": { - "source": "apache", - "extensions": ["sxw"] - }, - "application/vnd.sun.xml.writer.global": { - "source": "apache", - "extensions": ["sxg"] - }, - "application/vnd.sun.xml.writer.template": { - "source": "apache", - "extensions": ["stw"] - }, - "application/vnd.sus-calendar": { - "source": "iana", - "extensions": ["sus","susp"] - }, - "application/vnd.svd": { - "source": "iana", - "extensions": ["svd"] - }, - "application/vnd.swiftview-ics": { - "source": "iana" - }, - "application/vnd.symbian.install": { - "source": "apache", - "extensions": ["sis","sisx"] - }, - "application/vnd.syncml+xml": { - "source": "iana", - "extensions": ["xsm"] - }, - "application/vnd.syncml.dm+wbxml": { - "source": "iana", - "extensions": ["bdm"] - }, - "application/vnd.syncml.dm+xml": { - "source": "iana", - "extensions": ["xdm"] - }, - "application/vnd.syncml.dm.notification": { - "source": "iana" - }, - "application/vnd.syncml.dmddf+wbxml": { - "source": "iana" - }, - "application/vnd.syncml.dmddf+xml": { - "source": "iana" - }, - "application/vnd.syncml.dmtnds+wbxml": { - "source": "iana" - }, - "application/vnd.syncml.dmtnds+xml": { - "source": "iana" - }, - "application/vnd.syncml.ds.notification": { - "source": "iana" - }, - "application/vnd.tao.intent-module-archive": { - "source": "iana", - "extensions": ["tao"] - }, - "application/vnd.tcpdump.pcap": { - "source": "iana", - "extensions": ["pcap","cap","dmp"] - }, - "application/vnd.tmd.mediaflex.api+xml": { - "source": "iana" - }, - "application/vnd.tmobile-livetv": { - "source": "iana", - "extensions": ["tmo"] - }, - "application/vnd.trid.tpt": { - "source": "iana", - "extensions": ["tpt"] - }, - "application/vnd.triscape.mxs": { - "source": "iana", - "extensions": ["mxs"] - }, - "application/vnd.trueapp": { - "source": "iana", - "extensions": ["tra"] - }, - "application/vnd.truedoc": { - "source": "iana" - }, - "application/vnd.ubisoft.webplayer": { - "source": "iana" - }, - "application/vnd.ufdl": { - "source": "iana", - "extensions": ["ufd","ufdl"] - }, - "application/vnd.uiq.theme": { - "source": "iana", - "extensions": ["utz"] - }, - "application/vnd.umajin": { - "source": "iana", - "extensions": ["umj"] - }, - "application/vnd.unity": { - "source": "iana", - "extensions": ["unityweb"] - }, - "application/vnd.uoml+xml": { - "source": "iana", - "extensions": ["uoml"] - }, - "application/vnd.uplanet.alert": { - "source": "iana" - }, - "application/vnd.uplanet.alert-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.bearer-choice": { - "source": "iana" - }, - "application/vnd.uplanet.bearer-choice-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.cacheop": { - "source": "iana" - }, - "application/vnd.uplanet.cacheop-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.channel": { - "source": "iana" - }, - "application/vnd.uplanet.channel-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.list": { - "source": "iana" - }, - "application/vnd.uplanet.list-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.listcmd": { - "source": "iana" - }, - "application/vnd.uplanet.listcmd-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.signal": { - "source": "iana" - }, - "application/vnd.valve.source.material": { - "source": "iana" - }, - "application/vnd.vcx": { - "source": "iana", - "extensions": ["vcx"] - }, - "application/vnd.vd-study": { - "source": "iana" - }, - "application/vnd.vectorworks": { - "source": "iana" - }, - "application/vnd.verimatrix.vcas": { - "source": "iana" - }, - "application/vnd.vidsoft.vidconference": { - "source": "iana" - }, - "application/vnd.visio": { - "source": "iana", - "extensions": ["vsd","vst","vss","vsw"] - }, - "application/vnd.visionary": { - "source": "iana", - "extensions": ["vis"] - }, - "application/vnd.vividence.scriptfile": { - "source": "iana" - }, - "application/vnd.vsf": { - "source": "iana", - "extensions": ["vsf"] - }, - "application/vnd.wap.sic": { - "source": "iana" - }, - "application/vnd.wap.slc": { - "source": "iana" - }, - "application/vnd.wap.wbxml": { - "source": "iana", - "extensions": ["wbxml"] - }, - "application/vnd.wap.wmlc": { - "source": "iana", - "extensions": ["wmlc"] - }, - "application/vnd.wap.wmlscriptc": { - "source": "iana", - "extensions": ["wmlsc"] - }, - "application/vnd.webturbo": { - "source": "iana", - "extensions": ["wtb"] - }, - "application/vnd.wfa.p2p": { - "source": "iana" - }, - "application/vnd.wfa.wsc": { - "source": "iana" - }, - "application/vnd.windows.devicepairing": { - "source": "iana" - }, - "application/vnd.wmc": { - "source": "iana" - }, - "application/vnd.wmf.bootstrap": { - "source": "iana" - }, - "application/vnd.wolfram.mathematica": { - "source": "iana" - }, - "application/vnd.wolfram.mathematica.package": { - "source": "iana" - }, - "application/vnd.wolfram.player": { - "source": "iana", - "extensions": ["nbp"] - }, - "application/vnd.wordperfect": { - "source": "iana", - "extensions": ["wpd"] - }, - "application/vnd.wqd": { - "source": "iana", - "extensions": ["wqd"] - }, - "application/vnd.wrq-hp3000-labelled": { - "source": "iana" - }, - "application/vnd.wt.stf": { - "source": "iana", - "extensions": ["stf"] - }, - "application/vnd.wv.csp+wbxml": { - "source": "iana" - }, - "application/vnd.wv.csp+xml": { - "source": "iana" - }, - "application/vnd.wv.ssp+xml": { - "source": "iana" - }, - "application/vnd.xacml+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.xara": { - "source": "iana", - "extensions": ["xar"] - }, - "application/vnd.xfdl": { - "source": "iana", - "extensions": ["xfdl"] - }, - "application/vnd.xfdl.webform": { - "source": "iana" - }, - "application/vnd.xmi+xml": { - "source": "iana" - }, - "application/vnd.xmpie.cpkg": { - "source": "iana" - }, - "application/vnd.xmpie.dpkg": { - "source": "iana" - }, - "application/vnd.xmpie.plan": { - "source": "iana" - }, - "application/vnd.xmpie.ppkg": { - "source": "iana" - }, - "application/vnd.xmpie.xlim": { - "source": "iana" - }, - "application/vnd.yamaha.hv-dic": { - "source": "iana", - "extensions": ["hvd"] - }, - "application/vnd.yamaha.hv-script": { - "source": "iana", - "extensions": ["hvs"] - }, - "application/vnd.yamaha.hv-voice": { - "source": "iana", - "extensions": ["hvp"] - }, - "application/vnd.yamaha.openscoreformat": { - "source": "iana", - "extensions": ["osf"] - }, - "application/vnd.yamaha.openscoreformat.osfpvg+xml": { - "source": "iana", - "extensions": ["osfpvg"] - }, - "application/vnd.yamaha.remote-setup": { - "source": "iana" - }, - "application/vnd.yamaha.smaf-audio": { - "source": "iana", - "extensions": ["saf"] - }, - "application/vnd.yamaha.smaf-phrase": { - "source": "iana", - "extensions": ["spf"] - }, - "application/vnd.yamaha.through-ngn": { - "source": "iana" - }, - "application/vnd.yamaha.tunnel-udpencap": { - "source": "iana" - }, - "application/vnd.yaoweme": { - "source": "iana" - }, - "application/vnd.yellowriver-custom-menu": { - "source": "iana", - "extensions": ["cmp"] - }, - "application/vnd.zul": { - "source": "iana", - "extensions": ["zir","zirz"] - }, - "application/vnd.zzazz.deck+xml": { - "source": "iana", - "extensions": ["zaz"] - }, - "application/voicexml+xml": { - "source": "iana", - "extensions": ["vxml"] - }, - "application/vq-rtcpxr": { - "source": "iana" - }, - "application/watcherinfo+xml": { - "source": "iana" - }, - "application/whoispp-query": { - "source": "iana" - }, - "application/whoispp-response": { - "source": "iana" - }, - "application/widget": { - "source": "iana", - "extensions": ["wgt"] - }, - "application/winhlp": { - "source": "apache", - "extensions": ["hlp"] - }, - "application/wita": { - "source": "iana" - }, - "application/wordperfect5.1": { - "source": "iana" - }, - "application/wsdl+xml": { - "source": "iana", - "extensions": ["wsdl"] - }, - "application/wspolicy+xml": { - "source": "iana", - "extensions": ["wspolicy"] - }, - "application/x-7z-compressed": { - "source": "apache", - "compressible": false, - "extensions": ["7z"] - }, - "application/x-abiword": { - "source": "apache", - "extensions": ["abw"] - }, - "application/x-ace-compressed": { - "source": "apache", - "extensions": ["ace"] - }, - "application/x-amf": { - "source": "apache" - }, - "application/x-apple-diskimage": { - "source": "apache", - "extensions": ["dmg"] - }, - "application/x-authorware-bin": { - "source": "apache", - "extensions": ["aab","x32","u32","vox"] - }, - "application/x-authorware-map": { - "source": "apache", - "extensions": ["aam"] - }, - "application/x-authorware-seg": { - "source": "apache", - "extensions": ["aas"] - }, - "application/x-bcpio": { - "source": "apache", - "extensions": ["bcpio"] - }, - "application/x-bittorrent": { - "source": "apache", - "extensions": ["torrent"] - }, - "application/x-blorb": { - "source": "apache", - "extensions": ["blb","blorb"] - }, - "application/x-bzip": { - "source": "apache", - "compressible": false, - "extensions": ["bz"] - }, - "application/x-bzip2": { - "source": "apache", - "compressible": false, - "extensions": ["bz2","boz"] - }, - "application/x-cbr": { - "source": "apache", - "extensions": ["cbr","cba","cbt","cbz","cb7"] - }, - "application/x-cdlink": { - "source": "apache", - "extensions": ["vcd"] - }, - "application/x-cfs-compressed": { - "source": "apache", - "extensions": ["cfs"] - }, - "application/x-chat": { - "source": "apache", - "extensions": ["chat"] - }, - "application/x-chess-pgn": { - "source": "apache", - "extensions": ["pgn"] - }, - "application/x-chrome-extension": { - "extensions": ["crx"] - }, - "application/x-compress": { - "source": "apache" - }, - "application/x-conference": { - "source": "apache", - "extensions": ["nsc"] - }, - "application/x-cpio": { - "source": "apache", - "extensions": ["cpio"] - }, - "application/x-csh": { - "source": "apache", - "extensions": ["csh"] - }, - "application/x-deb": { - "compressible": false - }, - "application/x-debian-package": { - "source": "apache", - "extensions": ["deb","udeb"] - }, - "application/x-dgc-compressed": { - "source": "apache", - "extensions": ["dgc"] - }, - "application/x-director": { - "source": "apache", - "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"] - }, - "application/x-doom": { - "source": "apache", - "extensions": ["wad"] - }, - "application/x-dtbncx+xml": { - "source": "apache", - "extensions": ["ncx"] - }, - "application/x-dtbook+xml": { - "source": "apache", - "extensions": ["dtb"] - }, - "application/x-dtbresource+xml": { - "source": "apache", - "extensions": ["res"] - }, - "application/x-dvi": { - "source": "apache", - "compressible": false, - "extensions": ["dvi"] - }, - "application/x-envoy": { - "source": "apache", - "extensions": ["evy"] - }, - "application/x-eva": { - "source": "apache", - "extensions": ["eva"] - }, - "application/x-font-bdf": { - "source": "apache", - "extensions": ["bdf"] - }, - "application/x-font-dos": { - "source": "apache" - }, - "application/x-font-framemaker": { - "source": "apache" - }, - "application/x-font-ghostscript": { - "source": "apache", - "extensions": ["gsf"] - }, - "application/x-font-libgrx": { - "source": "apache" - }, - "application/x-font-linux-psf": { - "source": "apache", - "extensions": ["psf"] - }, - "application/x-font-otf": { - "source": "apache", - "compressible": true, - "extensions": ["otf"] - }, - "application/x-font-pcf": { - "source": "apache", - "extensions": ["pcf"] - }, - "application/x-font-snf": { - "source": "apache", - "extensions": ["snf"] - }, - "application/x-font-speedo": { - "source": "apache" - }, - "application/x-font-sunos-news": { - "source": "apache" - }, - "application/x-font-ttf": { - "source": "apache", - "compressible": true, - "extensions": ["ttf","ttc"] - }, - "application/x-font-type1": { - "source": "apache", - "extensions": ["pfa","pfb","pfm","afm"] - }, - "application/x-font-vfont": { - "source": "apache" - }, - "application/x-freearc": { - "source": "apache", - "extensions": ["arc"] - }, - "application/x-futuresplash": { - "source": "apache", - "extensions": ["spl"] - }, - "application/x-gca-compressed": { - "source": "apache", - "extensions": ["gca"] - }, - "application/x-glulx": { - "source": "apache", - "extensions": ["ulx"] - }, - "application/x-gnumeric": { - "source": "apache", - "extensions": ["gnumeric"] - }, - "application/x-gramps-xml": { - "source": "apache", - "extensions": ["gramps"] - }, - "application/x-gtar": { - "source": "apache", - "extensions": ["gtar"] - }, - "application/x-gzip": { - "source": "apache" - }, - "application/x-hdf": { - "source": "apache", - "extensions": ["hdf"] - }, - "application/x-install-instructions": { - "source": "apache", - "extensions": ["install"] - }, - "application/x-iso9660-image": { - "source": "apache", - "extensions": ["iso"] - }, - "application/x-java-jnlp-file": { - "source": "apache", - "compressible": false, - "extensions": ["jnlp"] - }, - "application/x-javascript": { - "compressible": true - }, - "application/x-latex": { - "source": "apache", - "compressible": false, - "extensions": ["latex"] - }, - "application/x-lua-bytecode": { - "extensions": ["luac"] - }, - "application/x-lzh-compressed": { - "source": "apache", - "extensions": ["lzh","lha"] - }, - "application/x-mie": { - "source": "apache", - "extensions": ["mie"] - }, - "application/x-mobipocket-ebook": { - "source": "apache", - "extensions": ["prc","mobi"] - }, - "application/x-mpegurl": { - "compressible": false - }, - "application/x-ms-application": { - "source": "apache", - "extensions": ["application"] - }, - "application/x-ms-shortcut": { - "source": "apache", - "extensions": ["lnk"] - }, - "application/x-ms-wmd": { - "source": "apache", - "extensions": ["wmd"] - }, - "application/x-ms-wmz": { - "source": "apache", - "extensions": ["wmz"] - }, - "application/x-ms-xbap": { - "source": "apache", - "extensions": ["xbap"] - }, - "application/x-msaccess": { - "source": "apache", - "extensions": ["mdb"] - }, - "application/x-msbinder": { - "source": "apache", - "extensions": ["obd"] - }, - "application/x-mscardfile": { - "source": "apache", - "extensions": ["crd"] - }, - "application/x-msclip": { - "source": "apache", - "extensions": ["clp"] - }, - "application/x-msdownload": { - "source": "apache", - "extensions": ["exe","dll","com","bat","msi"] - }, - "application/x-msmediaview": { - "source": "apache", - "extensions": ["mvb","m13","m14"] - }, - "application/x-msmetafile": { - "source": "apache", - "extensions": ["wmf","wmz","emf","emz"] - }, - "application/x-msmoney": { - "source": "apache", - "extensions": ["mny"] - }, - "application/x-mspublisher": { - "source": "apache", - "extensions": ["pub"] - }, - "application/x-msschedule": { - "source": "apache", - "extensions": ["scd"] - }, - "application/x-msterminal": { - "source": "apache", - "extensions": ["trm"] - }, - "application/x-mswrite": { - "source": "apache", - "extensions": ["wri"] - }, - "application/x-netcdf": { - "source": "apache", - "extensions": ["nc","cdf"] - }, - "application/x-nzb": { - "source": "apache", - "extensions": ["nzb"] - }, - "application/x-pkcs12": { - "source": "apache", - "compressible": false, - "extensions": ["p12","pfx"] - }, - "application/x-pkcs7-certificates": { - "source": "apache", - "extensions": ["p7b","spc"] - }, - "application/x-pkcs7-certreqresp": { - "source": "apache", - "extensions": ["p7r"] - }, - "application/x-rar-compressed": { - "source": "apache", - "compressible": false, - "extensions": ["rar"] - }, - "application/x-research-info-systems": { - "source": "apache", - "extensions": ["ris"] - }, - "application/x-sh": { - "source": "apache", - "compressible": true, - "extensions": ["sh"] - }, - "application/x-shar": { - "source": "apache", - "extensions": ["shar"] - }, - "application/x-shockwave-flash": { - "source": "apache", - "compressible": false, - "extensions": ["swf"] - }, - "application/x-silverlight-app": { - "source": "apache", - "extensions": ["xap"] - }, - "application/x-sql": { - "source": "apache", - "extensions": ["sql"] - }, - "application/x-stuffit": { - "source": "apache", - "compressible": false, - "extensions": ["sit"] - }, - "application/x-stuffitx": { - "source": "apache", - "extensions": ["sitx"] - }, - "application/x-subrip": { - "source": "apache", - "extensions": ["srt"] - }, - "application/x-sv4cpio": { - "source": "apache", - "extensions": ["sv4cpio"] - }, - "application/x-sv4crc": { - "source": "apache", - "extensions": ["sv4crc"] - }, - "application/x-t3vm-image": { - "source": "apache", - "extensions": ["t3"] - }, - "application/x-tads": { - "source": "apache", - "extensions": ["gam"] - }, - "application/x-tar": { - "source": "apache", - "compressible": true, - "extensions": ["tar"] - }, - "application/x-tcl": { - "source": "apache", - "extensions": ["tcl"] - }, - "application/x-tex": { - "source": "apache", - "extensions": ["tex"] - }, - "application/x-tex-tfm": { - "source": "apache", - "extensions": ["tfm"] - }, - "application/x-texinfo": { - "source": "apache", - "extensions": ["texinfo","texi"] - }, - "application/x-tgif": { - "source": "apache", - "extensions": ["obj"] - }, - "application/x-ustar": { - "source": "apache", - "extensions": ["ustar"] - }, - "application/x-wais-source": { - "source": "apache", - "extensions": ["src"] - }, - "application/x-web-app-manifest+json": { - "compressible": true, - "extensions": ["webapp"] - }, - "application/x-www-form-urlencoded": { - "source": "iana", - "compressible": true - }, - "application/x-x509-ca-cert": { - "source": "apache", - "extensions": ["der","crt"] - }, - "application/x-xfig": { - "source": "apache", - "extensions": ["fig"] - }, - "application/x-xliff+xml": { - "source": "apache", - "extensions": ["xlf"] - }, - "application/x-xpinstall": { - "source": "apache", - "compressible": false, - "extensions": ["xpi"] - }, - "application/x-xz": { - "source": "apache", - "extensions": ["xz"] - }, - "application/x-zmachine": { - "source": "apache", - "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"] - }, - "application/x400-bp": { - "source": "iana" - }, - "application/xacml+xml": { - "source": "iana" - }, - "application/xaml+xml": { - "source": "apache", - "extensions": ["xaml"] - }, - "application/xcap-att+xml": { - "source": "iana" - }, - "application/xcap-caps+xml": { - "source": "iana" - }, - "application/xcap-diff+xml": { - "source": "iana", - "extensions": ["xdf"] - }, - "application/xcap-el+xml": { - "source": "iana" - }, - "application/xcap-error+xml": { - "source": "iana" - }, - "application/xcap-ns+xml": { - "source": "iana" - }, - "application/xcon-conference-info+xml": { - "source": "iana" - }, - "application/xcon-conference-info-diff+xml": { - "source": "iana" - }, - "application/xenc+xml": { - "source": "iana", - "extensions": ["xenc"] - }, - "application/xhtml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xhtml","xht"] - }, - "application/xhtml-voice+xml": { - "source": "iana" - }, - "application/xml": { - "source": "iana", - "compressible": true, - "extensions": ["xml","xsl","xsd"] - }, - "application/xml-dtd": { - "source": "iana", - "compressible": true, - "extensions": ["dtd"] - }, - "application/xml-external-parsed-entity": { - "source": "iana" - }, - "application/xml-patch+xml": { - "source": "iana" - }, - "application/xmpp+xml": { - "source": "iana" - }, - "application/xop+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xop"] - }, - "application/xproc+xml": { - "source": "apache", - "extensions": ["xpl"] - }, - "application/xslt+xml": { - "source": "iana", - "extensions": ["xslt"] - }, - "application/xspf+xml": { - "source": "apache", - "extensions": ["xspf"] - }, - "application/xv+xml": { - "source": "iana", - "extensions": ["mxml","xhvml","xvml","xvm"] - }, - "application/yang": { - "source": "iana", - "extensions": ["yang"] - }, - "application/yin+xml": { - "source": "iana", - "extensions": ["yin"] - }, - "application/zip": { - "source": "iana", - "compressible": false, - "extensions": ["zip"] - }, - "application/zlib": { - "source": "iana" - }, - "audio/1d-interleaved-parityfec": { - "source": "iana" - }, - "audio/32kadpcm": { - "source": "iana" - }, - "audio/3gpp": { - "source": "iana" - }, - "audio/3gpp2": { - "source": "iana" - }, - "audio/ac3": { - "source": "iana" - }, - "audio/adpcm": { - "source": "apache", - "extensions": ["adp"] - }, - "audio/amr": { - "source": "iana" - }, - "audio/amr-wb": { - "source": "iana" - }, - "audio/amr-wb+": { - "source": "iana" - }, - "audio/aptx": { - "source": "iana" - }, - "audio/asc": { - "source": "iana" - }, - "audio/atrac-advanced-lossless": { - "source": "iana" - }, - "audio/atrac-x": { - "source": "iana" - }, - "audio/atrac3": { - "source": "iana" - }, - "audio/basic": { - "source": "iana", - "compressible": false, - "extensions": ["au","snd"] - }, - "audio/bv16": { - "source": "iana" - }, - "audio/bv32": { - "source": "iana" - }, - "audio/clearmode": { - "source": "iana" - }, - "audio/cn": { - "source": "iana" - }, - "audio/dat12": { - "source": "iana" - }, - "audio/dls": { - "source": "iana" - }, - "audio/dsr-es201108": { - "source": "iana" - }, - "audio/dsr-es202050": { - "source": "iana" - }, - "audio/dsr-es202211": { - "source": "iana" - }, - "audio/dsr-es202212": { - "source": "iana" - }, - "audio/dv": { - "source": "iana" - }, - "audio/dvi4": { - "source": "iana" - }, - "audio/eac3": { - "source": "iana" - }, - "audio/encaprtp": { - "source": "iana" - }, - "audio/evrc": { - "source": "iana" - }, - "audio/evrc-qcp": { - "source": "iana" - }, - "audio/evrc0": { - "source": "iana" - }, - "audio/evrc1": { - "source": "iana" - }, - "audio/evrcb": { - "source": "iana" - }, - "audio/evrcb0": { - "source": "iana" - }, - "audio/evrcb1": { - "source": "iana" - }, - "audio/evrcnw": { - "source": "iana" - }, - "audio/evrcnw0": { - "source": "iana" - }, - "audio/evrcnw1": { - "source": "iana" - }, - "audio/evrcwb": { - "source": "iana" - }, - "audio/evrcwb0": { - "source": "iana" - }, - "audio/evrcwb1": { - "source": "iana" - }, - "audio/fwdred": { - "source": "iana" - }, - "audio/g719": { - "source": "iana" - }, - "audio/g722": { - "source": "iana" - }, - "audio/g7221": { - "source": "iana" - }, - "audio/g723": { - "source": "iana" - }, - "audio/g726-16": { - "source": "iana" - }, - "audio/g726-24": { - "source": "iana" - }, - "audio/g726-32": { - "source": "iana" - }, - "audio/g726-40": { - "source": "iana" - }, - "audio/g728": { - "source": "iana" - }, - "audio/g729": { - "source": "iana" - }, - "audio/g7291": { - "source": "iana" - }, - "audio/g729d": { - "source": "iana" - }, - "audio/g729e": { - "source": "iana" - }, - "audio/gsm": { - "source": "iana" - }, - "audio/gsm-efr": { - "source": "iana" - }, - "audio/gsm-hr-08": { - "source": "iana" - }, - "audio/ilbc": { - "source": "iana" - }, - "audio/ip-mr_v2.5": { - "source": "iana" - }, - "audio/isac": { - "source": "apache" - }, - "audio/l16": { - "source": "iana" - }, - "audio/l20": { - "source": "iana" - }, - "audio/l24": { - "source": "iana", - "compressible": false - }, - "audio/l8": { - "source": "iana" - }, - "audio/lpc": { - "source": "iana" - }, - "audio/midi": { - "source": "apache", - "extensions": ["mid","midi","kar","rmi"] - }, - "audio/mobile-xmf": { - "source": "iana" - }, - "audio/mp4": { - "source": "iana", - "compressible": false, - "extensions": ["mp4a","m4a"] - }, - "audio/mp4a-latm": { - "source": "iana" - }, - "audio/mpa": { - "source": "iana" - }, - "audio/mpa-robust": { - "source": "iana" - }, - "audio/mpeg": { - "source": "iana", - "compressible": false, - "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"] - }, - "audio/mpeg4-generic": { - "source": "iana" - }, - "audio/musepack": { - "source": "apache" - }, - "audio/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["oga","ogg","spx"] - }, - "audio/opus": { - "source": "apache" - }, - "audio/parityfec": { - "source": "iana" - }, - "audio/pcma": { - "source": "iana" - }, - "audio/pcma-wb": { - "source": "iana" - }, - "audio/pcmu": { - "source": "iana" - }, - "audio/pcmu-wb": { - "source": "iana" - }, - "audio/prs.sid": { - "source": "iana" - }, - "audio/qcelp": { - "source": "iana" - }, - "audio/raptorfec": { - "source": "iana" - }, - "audio/red": { - "source": "iana" - }, - "audio/rtp-enc-aescm128": { - "source": "iana" - }, - "audio/rtp-midi": { - "source": "iana" - }, - "audio/rtploopback": { - "source": "iana" - }, - "audio/rtx": { - "source": "iana" - }, - "audio/s3m": { - "source": "apache", - "extensions": ["s3m"] - }, - "audio/silk": { - "source": "apache", - "extensions": ["sil"] - }, - "audio/smv": { - "source": "iana" - }, - "audio/smv-qcp": { - "source": "iana" - }, - "audio/smv0": { - "source": "iana" - }, - "audio/sp-midi": { - "source": "iana" - }, - "audio/speex": { - "source": "iana" - }, - "audio/t140c": { - "source": "iana" - }, - "audio/t38": { - "source": "iana" - }, - "audio/telephone-event": { - "source": "iana" - }, - "audio/tone": { - "source": "iana" - }, - "audio/uemclip": { - "source": "iana" - }, - "audio/ulpfec": { - "source": "iana" - }, - "audio/vdvi": { - "source": "iana" - }, - "audio/vmr-wb": { - "source": "iana" - }, - "audio/vnd.3gpp.iufp": { - "source": "iana" - }, - "audio/vnd.4sb": { - "source": "iana" - }, - "audio/vnd.audiokoz": { - "source": "iana" - }, - "audio/vnd.celp": { - "source": "iana" - }, - "audio/vnd.cisco.nse": { - "source": "iana" - }, - "audio/vnd.cmles.radio-events": { - "source": "iana" - }, - "audio/vnd.cns.anp1": { - "source": "iana" - }, - "audio/vnd.cns.inf1": { - "source": "iana" - }, - "audio/vnd.dece.audio": { - "source": "iana", - "extensions": ["uva","uvva"] - }, - "audio/vnd.digital-winds": { - "source": "iana", - "extensions": ["eol"] - }, - "audio/vnd.dlna.adts": { - "source": "iana" - }, - "audio/vnd.dolby.heaac.1": { - "source": "iana" - }, - "audio/vnd.dolby.heaac.2": { - "source": "iana" - }, - "audio/vnd.dolby.mlp": { - "source": "iana" - }, - "audio/vnd.dolby.mps": { - "source": "iana" - }, - "audio/vnd.dolby.pl2": { - "source": "iana" - }, - "audio/vnd.dolby.pl2x": { - "source": "iana" - }, - "audio/vnd.dolby.pl2z": { - "source": "iana" - }, - "audio/vnd.dolby.pulse.1": { - "source": "iana" - }, - "audio/vnd.dra": { - "source": "iana", - "extensions": ["dra"] - }, - "audio/vnd.dts": { - "source": "iana", - "extensions": ["dts"] - }, - "audio/vnd.dts.hd": { - "source": "iana", - "extensions": ["dtshd"] - }, - "audio/vnd.dvb.file": { - "source": "iana" - }, - "audio/vnd.everad.plj": { - "source": "iana" - }, - "audio/vnd.hns.audio": { - "source": "iana" - }, - "audio/vnd.lucent.voice": { - "source": "iana", - "extensions": ["lvp"] - }, - "audio/vnd.ms-playready.media.pya": { - "source": "iana", - "extensions": ["pya"] - }, - "audio/vnd.nokia.mobile-xmf": { - "source": "iana" - }, - "audio/vnd.nortel.vbk": { - "source": "iana" - }, - "audio/vnd.nuera.ecelp4800": { - "source": "iana", - "extensions": ["ecelp4800"] - }, - "audio/vnd.nuera.ecelp7470": { - "source": "iana", - "extensions": ["ecelp7470"] - }, - "audio/vnd.nuera.ecelp9600": { - "source": "iana", - "extensions": ["ecelp9600"] - }, - "audio/vnd.octel.sbc": { - "source": "iana" - }, - "audio/vnd.qcelp": { - "source": "iana" - }, - "audio/vnd.rhetorex.32kadpcm": { - "source": "iana" - }, - "audio/vnd.rip": { - "source": "iana", - "extensions": ["rip"] - }, - "audio/vnd.rn-realaudio": { - "compressible": false - }, - "audio/vnd.sealedmedia.softseal.mpeg": { - "source": "iana" - }, - "audio/vnd.vmx.cvsd": { - "source": "iana" - }, - "audio/vnd.wave": { - "compressible": false - }, - "audio/vorbis": { - "source": "iana", - "compressible": false - }, - "audio/vorbis-config": { - "source": "iana" - }, - "audio/webm": { - "source": "apache", - "compressible": false, - "extensions": ["weba"] - }, - "audio/x-aac": { - "source": "apache", - "compressible": false, - "extensions": ["aac"] - }, - "audio/x-aiff": { - "source": "apache", - "extensions": ["aif","aiff","aifc"] - }, - "audio/x-caf": { - "source": "apache", - "compressible": false, - "extensions": ["caf"] - }, - "audio/x-flac": { - "source": "apache", - "extensions": ["flac"] - }, - "audio/x-matroska": { - "source": "apache", - "extensions": ["mka"] - }, - "audio/x-mpegurl": { - "source": "apache", - "extensions": ["m3u"] - }, - "audio/x-ms-wax": { - "source": "apache", - "extensions": ["wax"] - }, - "audio/x-ms-wma": { - "source": "apache", - "extensions": ["wma"] - }, - "audio/x-pn-realaudio": { - "source": "apache", - "extensions": ["ram","ra"] - }, - "audio/x-pn-realaudio-plugin": { - "source": "apache", - "extensions": ["rmp"] - }, - "audio/x-tta": { - "source": "apache" - }, - "audio/x-wav": { - "source": "apache", - "extensions": ["wav"] - }, - "audio/xm": { - "source": "apache", - "extensions": ["xm"] - }, - "chemical/x-cdx": { - "source": "apache", - "extensions": ["cdx"] - }, - "chemical/x-cif": { - "source": "apache", - "extensions": ["cif"] - }, - "chemical/x-cmdf": { - "source": "apache", - "extensions": ["cmdf"] - }, - "chemical/x-cml": { - "source": "apache", - "extensions": ["cml"] - }, - "chemical/x-csml": { - "source": "apache", - "extensions": ["csml"] - }, - "chemical/x-pdb": { - "source": "apache" - }, - "chemical/x-xyz": { - "source": "apache", - "extensions": ["xyz"] - }, - "font/opentype": { - "compressible": true, - "extensions": ["otf"] - }, - "image/bmp": { - "source": "apache", - "compressible": true, - "extensions": ["bmp"] - }, - "image/cgm": { - "source": "iana", - "extensions": ["cgm"] - }, - "image/fits": { - "source": "iana" - }, - "image/g3fax": { - "source": "iana", - "extensions": ["g3"] - }, - "image/gif": { - "source": "iana", - "compressible": false, - "extensions": ["gif"] - }, - "image/ief": { - "source": "iana", - "extensions": ["ief"] - }, - "image/jp2": { - "source": "iana" - }, - "image/jpeg": { - "source": "iana", - "compressible": false, - "extensions": ["jpeg","jpg","jpe"] - }, - "image/jpm": { - "source": "iana" - }, - "image/jpx": { - "source": "iana" - }, - "image/ktx": { - "source": "iana", - "extensions": ["ktx"] - }, - "image/naplps": { - "source": "iana" - }, - "image/pjpeg": { - "compressible": false - }, - "image/png": { - "source": "iana", - "compressible": false, - "extensions": ["png"] - }, - "image/prs.btif": { - "source": "iana", - "extensions": ["btif"] - }, - "image/prs.pti": { - "source": "iana" - }, - "image/pwg-raster": { - "source": "iana" - }, - "image/sgi": { - "source": "apache", - "extensions": ["sgi"] - }, - "image/svg+xml": { - "source": "iana", - "compressible": true, - "extensions": ["svg","svgz"] - }, - "image/t38": { - "source": "iana" - }, - "image/tiff": { - "source": "iana", - "compressible": false, - "extensions": ["tiff","tif"] - }, - "image/tiff-fx": { - "source": "iana" - }, - "image/vnd.adobe.photoshop": { - "source": "iana", - "compressible": true, - "extensions": ["psd"] - }, - "image/vnd.airzip.accelerator.azv": { - "source": "iana" - }, - "image/vnd.cns.inf2": { - "source": "iana" - }, - "image/vnd.dece.graphic": { - "source": "iana", - "extensions": ["uvi","uvvi","uvg","uvvg"] - }, - "image/vnd.djvu": { - "source": "iana", - "extensions": ["djvu","djv"] - }, - "image/vnd.dvb.subtitle": { - "source": "iana", - "extensions": ["sub"] - }, - "image/vnd.dwg": { - "source": "iana", - "extensions": ["dwg"] - }, - "image/vnd.dxf": { - "source": "iana", - "extensions": ["dxf"] - }, - "image/vnd.fastbidsheet": { - "source": "iana", - "extensions": ["fbs"] - }, - "image/vnd.fpx": { - "source": "iana", - "extensions": ["fpx"] - }, - "image/vnd.fst": { - "source": "iana", - "extensions": ["fst"] - }, - "image/vnd.fujixerox.edmics-mmr": { - "source": "iana", - "extensions": ["mmr"] - }, - "image/vnd.fujixerox.edmics-rlc": { - "source": "iana", - "extensions": ["rlc"] - }, - "image/vnd.globalgraphics.pgb": { - "source": "iana" - }, - "image/vnd.microsoft.icon": { - "source": "iana" - }, - "image/vnd.mix": { - "source": "iana" - }, - "image/vnd.ms-modi": { - "source": "iana", - "extensions": ["mdi"] - }, - "image/vnd.ms-photo": { - "source": "apache", - "extensions": ["wdp"] - }, - "image/vnd.net-fpx": { - "source": "iana", - "extensions": ["npx"] - }, - "image/vnd.radiance": { - "source": "iana" - }, - "image/vnd.sealed.png": { - "source": "iana" - }, - "image/vnd.sealedmedia.softseal.gif": { - "source": "iana" - }, - "image/vnd.sealedmedia.softseal.jpg": { - "source": "iana" - }, - "image/vnd.svf": { - "source": "iana" - }, - "image/vnd.tencent.tap": { - "source": "iana" - }, - "image/vnd.valve.source.texture": { - "source": "iana" - }, - "image/vnd.wap.wbmp": { - "source": "iana", - "extensions": ["wbmp"] - }, - "image/vnd.xiff": { - "source": "iana", - "extensions": ["xif"] - }, - "image/webp": { - "source": "apache", - "extensions": ["webp"] - }, - "image/x-3ds": { - "source": "apache", - "extensions": ["3ds"] - }, - "image/x-cmu-raster": { - "source": "apache", - "extensions": ["ras"] - }, - "image/x-cmx": { - "source": "apache", - "extensions": ["cmx"] - }, - "image/x-freehand": { - "source": "apache", - "extensions": ["fh","fhc","fh4","fh5","fh7"] - }, - "image/x-icon": { - "source": "apache", - "compressible": true, - "extensions": ["ico"] - }, - "image/x-mrsid-image": { - "source": "apache", - "extensions": ["sid"] - }, - "image/x-pcx": { - "source": "apache", - "extensions": ["pcx"] - }, - "image/x-pict": { - "source": "apache", - "extensions": ["pic","pct"] - }, - "image/x-portable-anymap": { - "source": "apache", - "extensions": ["pnm"] - }, - "image/x-portable-bitmap": { - "source": "apache", - "extensions": ["pbm"] - }, - "image/x-portable-graymap": { - "source": "apache", - "extensions": ["pgm"] - }, - "image/x-portable-pixmap": { - "source": "apache", - "extensions": ["ppm"] - }, - "image/x-rgb": { - "source": "apache", - "extensions": ["rgb"] - }, - "image/x-tga": { - "source": "apache", - "extensions": ["tga"] - }, - "image/x-xbitmap": { - "source": "apache", - "extensions": ["xbm"] - }, - "image/x-xcf": { - "compressible": false - }, - "image/x-xpixmap": { - "source": "apache", - "extensions": ["xpm"] - }, - "image/x-xwindowdump": { - "source": "apache", - "extensions": ["xwd"] - }, - "message/cpim": { - "source": "iana" - }, - "message/delivery-status": { - "source": "iana" - }, - "message/disposition-notification": { - "source": "iana" - }, - "message/external-body": { - "source": "iana" - }, - "message/feedback-report": { - "source": "iana" - }, - "message/global": { - "source": "iana" - }, - "message/global-delivery-status": { - "source": "iana" - }, - "message/global-disposition-notification": { - "source": "iana" - }, - "message/global-headers": { - "source": "iana" - }, - "message/http": { - "source": "iana", - "compressible": false - }, - "message/imdn+xml": { - "source": "iana", - "compressible": true - }, - "message/news": { - "source": "iana" - }, - "message/partial": { - "source": "iana", - "compressible": false - }, - "message/rfc822": { - "source": "iana", - "compressible": true, - "extensions": ["eml","mime"] - }, - "message/s-http": { - "source": "iana" - }, - "message/sip": { - "source": "iana" - }, - "message/sipfrag": { - "source": "iana" - }, - "message/tracking-status": { - "source": "iana" - }, - "message/vnd.si.simp": { - "source": "iana" - }, - "message/vnd.wfa.wsc": { - "source": "iana" - }, - "model/iges": { - "source": "iana", - "compressible": false, - "extensions": ["igs","iges"] - }, - "model/mesh": { - "source": "iana", - "compressible": false, - "extensions": ["msh","mesh","silo"] - }, - "model/vnd.collada+xml": { - "source": "iana", - "extensions": ["dae"] - }, - "model/vnd.dwf": { - "source": "iana", - "extensions": ["dwf"] - }, - "model/vnd.flatland.3dml": { - "source": "iana" - }, - "model/vnd.gdl": { - "source": "iana", - "extensions": ["gdl"] - }, - "model/vnd.gs-gdl": { - "source": "apache" - }, - "model/vnd.gs.gdl": { - "source": "iana" - }, - "model/vnd.gtw": { - "source": "iana", - "extensions": ["gtw"] - }, - "model/vnd.moml+xml": { - "source": "iana" - }, - "model/vnd.mts": { - "source": "iana", - "extensions": ["mts"] - }, - "model/vnd.opengex": { - "source": "iana" - }, - "model/vnd.parasolid.transmit.binary": { - "source": "iana" - }, - "model/vnd.parasolid.transmit.text": { - "source": "iana" - }, - "model/vnd.valve.source.compiled-map": { - "source": "iana" - }, - "model/vnd.vtu": { - "source": "iana", - "extensions": ["vtu"] - }, - "model/vrml": { - "source": "iana", - "compressible": false, - "extensions": ["wrl","vrml"] - }, - "model/x3d+binary": { - "source": "apache", - "compressible": false, - "extensions": ["x3db","x3dbz"] - }, - "model/x3d+fastinfoset": { - "source": "iana" - }, - "model/x3d+vrml": { - "source": "apache", - "compressible": false, - "extensions": ["x3dv","x3dvz"] - }, - "model/x3d+xml": { - "source": "iana", - "compressible": true, - "extensions": ["x3d","x3dz"] - }, - "model/x3d-vrml": { - "source": "iana" - }, - "multipart/alternative": { - "source": "iana", - "compressible": false - }, - "multipart/appledouble": { - "source": "iana" - }, - "multipart/byteranges": { - "source": "iana" - }, - "multipart/digest": { - "source": "iana" - }, - "multipart/encrypted": { - "source": "iana", - "compressible": false - }, - "multipart/form-data": { - "source": "iana", - "compressible": false - }, - "multipart/header-set": { - "source": "iana" - }, - "multipart/mixed": { - "source": "iana", - "compressible": false - }, - "multipart/parallel": { - "source": "iana" - }, - "multipart/related": { - "source": "iana", - "compressible": false - }, - "multipart/report": { - "source": "iana" - }, - "multipart/signed": { - "source": "iana", - "compressible": false - }, - "multipart/voice-message": { - "source": "iana" - }, - "multipart/x-mixed-replace": { - "source": "iana" - }, - "text/1d-interleaved-parityfec": { - "source": "iana" - }, - "text/cache-manifest": { - "source": "iana", - "compressible": true, - "extensions": ["appcache","manifest"] - }, - "text/calendar": { - "source": "iana", - "extensions": ["ics","ifb"] - }, - "text/calender": { - "compressible": true - }, - "text/cmd": { - "compressible": true - }, - "text/coffeescript": { - "extensions": ["coffee"] - }, - "text/css": { - "source": "iana", - "compressible": true, - "extensions": ["css"] - }, - "text/csv": { - "source": "iana", - "compressible": true, - "extensions": ["csv"] - }, - "text/csv-schema": { - "source": "iana" - }, - "text/directory": { - "source": "iana" - }, - "text/dns": { - "source": "iana" - }, - "text/ecmascript": { - "source": "iana" - }, - "text/encaprtp": { - "source": "iana" - }, - "text/enriched": { - "source": "iana" - }, - "text/fwdred": { - "source": "iana" - }, - "text/grammar-ref-list": { - "source": "iana" - }, - "text/hjson": { - "extensions": ["hjson"] - }, - "text/html": { - "source": "iana", - "compressible": true, - "extensions": ["html","htm"] - }, - "text/jade": { - "extensions": ["jade"] - }, - "text/javascript": { - "source": "iana", - "compressible": true - }, - "text/jcr-cnd": { - "source": "iana" - }, - "text/jsx": { - "compressible": true, - "extensions": ["jsx"] - }, - "text/less": { - "extensions": ["less"] - }, - "text/markdown": { - "source": "iana" - }, - "text/mizar": { - "source": "iana" - }, - "text/n3": { - "source": "iana", - "compressible": true, - "extensions": ["n3"] - }, - "text/parameters": { - "source": "iana" - }, - "text/parityfec": { - "source": "iana" - }, - "text/plain": { - "source": "iana", - "compressible": true, - "extensions": ["txt","text","conf","def","list","log","in","ini"] - }, - "text/provenance-notation": { - "source": "iana" - }, - "text/prs.fallenstein.rst": { - "source": "iana" - }, - "text/prs.lines.tag": { - "source": "iana", - "extensions": ["dsc"] - }, - "text/raptorfec": { - "source": "iana" - }, - "text/red": { - "source": "iana" - }, - "text/rfc822-headers": { - "source": "iana" - }, - "text/richtext": { - "source": "iana", - "compressible": true, - "extensions": ["rtx"] - }, - "text/rtf": { - "source": "iana" - }, - "text/rtp-enc-aescm128": { - "source": "iana" - }, - "text/rtploopback": { - "source": "iana" - }, - "text/rtx": { - "source": "iana" - }, - "text/sgml": { - "source": "iana", - "extensions": ["sgml","sgm"] - }, - "text/stylus": { - "extensions": ["stylus","styl"] - }, - "text/t140": { - "source": "iana" - }, - "text/tab-separated-values": { - "source": "iana", - "compressible": true, - "extensions": ["tsv"] - }, - "text/troff": { - "source": "iana", - "extensions": ["t","tr","roff","man","me","ms"] - }, - "text/turtle": { - "source": "iana", - "extensions": ["ttl"] - }, - "text/ulpfec": { - "source": "iana" - }, - "text/uri-list": { - "source": "iana", - "compressible": true, - "extensions": ["uri","uris","urls"] - }, - "text/vcard": { - "source": "iana", - "compressible": true, - "extensions": ["vcard"] - }, - "text/vnd.a": { - "source": "iana" - }, - "text/vnd.abc": { - "source": "iana" - }, - "text/vnd.curl": { - "source": "iana", - "extensions": ["curl"] - }, - "text/vnd.curl.dcurl": { - "source": "apache", - "extensions": ["dcurl"] - }, - "text/vnd.curl.mcurl": { - "source": "apache", - "extensions": ["mcurl"] - }, - "text/vnd.curl.scurl": { - "source": "apache", - "extensions": ["scurl"] - }, - "text/vnd.debian.copyright": { - "source": "iana" - }, - "text/vnd.dmclientscript": { - "source": "iana" - }, - "text/vnd.dvb.subtitle": { - "source": "iana", - "extensions": ["sub"] - }, - "text/vnd.esmertec.theme-descriptor": { - "source": "iana" - }, - "text/vnd.fly": { - "source": "iana", - "extensions": ["fly"] - }, - "text/vnd.fmi.flexstor": { - "source": "iana", - "extensions": ["flx"] - }, - "text/vnd.graphviz": { - "source": "iana", - "extensions": ["gv"] - }, - "text/vnd.in3d.3dml": { - "source": "iana", - "extensions": ["3dml"] - }, - "text/vnd.in3d.spot": { - "source": "iana", - "extensions": ["spot"] - }, - "text/vnd.iptc.newsml": { - "source": "iana" - }, - "text/vnd.iptc.nitf": { - "source": "iana" - }, - "text/vnd.latex-z": { - "source": "iana" - }, - "text/vnd.motorola.reflex": { - "source": "iana" - }, - "text/vnd.ms-mediapackage": { - "source": "iana" - }, - "text/vnd.net2phone.commcenter.command": { - "source": "iana" - }, - "text/vnd.radisys.msml-basic-layout": { - "source": "iana" - }, - "text/vnd.si.uricatalogue": { - "source": "iana" - }, - "text/vnd.sun.j2me.app-descriptor": { - "source": "iana", - "extensions": ["jad"] - }, - "text/vnd.trolltech.linguist": { - "source": "iana" - }, - "text/vnd.wap.si": { - "source": "iana" - }, - "text/vnd.wap.sl": { - "source": "iana" - }, - "text/vnd.wap.wml": { - "source": "iana", - "extensions": ["wml"] - }, - "text/vnd.wap.wmlscript": { - "source": "iana", - "extensions": ["wmls"] - }, - "text/vtt": { - "charset": "UTF-8", - "compressible": true, - "extensions": ["vtt"] - }, - "text/x-asm": { - "source": "apache", - "extensions": ["s","asm"] - }, - "text/x-c": { - "source": "apache", - "extensions": ["c","cc","cxx","cpp","h","hh","dic"] - }, - "text/x-component": { - "extensions": ["htc"] - }, - "text/x-fortran": { - "source": "apache", - "extensions": ["f","for","f77","f90"] - }, - "text/x-gwt-rpc": { - "compressible": true - }, - "text/x-handlebars-template": { - "extensions": ["hbs"] - }, - "text/x-java-source": { - "source": "apache", - "extensions": ["java"] - }, - "text/x-jquery-tmpl": { - "compressible": true - }, - "text/x-lua": { - "extensions": ["lua"] - }, - "text/x-markdown": { - "compressible": true, - "extensions": ["markdown","md","mkd"] - }, - "text/x-nfo": { - "source": "apache", - "extensions": ["nfo"] - }, - "text/x-opml": { - "source": "apache", - "extensions": ["opml"] - }, - "text/x-pascal": { - "source": "apache", - "extensions": ["p","pas"] - }, - "text/x-sass": { - "extensions": ["sass"] - }, - "text/x-scss": { - "extensions": ["scss"] - }, - "text/x-setext": { - "source": "apache", - "extensions": ["etx"] - }, - "text/x-sfv": { - "source": "apache", - "extensions": ["sfv"] - }, - "text/x-uuencode": { - "source": "apache", - "extensions": ["uu"] - }, - "text/x-vcalendar": { - "source": "apache", - "extensions": ["vcs"] - }, - "text/x-vcard": { - "source": "apache", - "extensions": ["vcf"] - }, - "text/xml": { - "source": "iana", - "compressible": true - }, - "text/xml-external-parsed-entity": { - "source": "iana" - }, - "text/yaml": { - "extensions": ["yaml","yml"] - }, - "video/1d-interleaved-parityfec": { - "source": "apache" - }, - "video/3gpp": { - "source": "apache", - "extensions": ["3gp"] - }, - "video/3gpp-tt": { - "source": "apache" - }, - "video/3gpp2": { - "source": "apache", - "extensions": ["3g2"] - }, - "video/bmpeg": { - "source": "apache" - }, - "video/bt656": { - "source": "apache" - }, - "video/celb": { - "source": "apache" - }, - "video/dv": { - "source": "apache" - }, - "video/h261": { - "source": "apache", - "extensions": ["h261"] - }, - "video/h263": { - "source": "apache", - "extensions": ["h263"] - }, - "video/h263-1998": { - "source": "apache" - }, - "video/h263-2000": { - "source": "apache" - }, - "video/h264": { - "source": "apache", - "extensions": ["h264"] - }, - "video/h264-rcdo": { - "source": "apache" - }, - "video/h264-svc": { - "source": "apache" - }, - "video/jpeg": { - "source": "apache", - "extensions": ["jpgv"] - }, - "video/jpeg2000": { - "source": "apache" - }, - "video/jpm": { - "source": "apache", - "extensions": ["jpm","jpgm"] - }, - "video/mj2": { - "source": "apache", - "extensions": ["mj2","mjp2"] - }, - "video/mp1s": { - "source": "apache" - }, - "video/mp2p": { - "source": "apache" - }, - "video/mp2t": { - "source": "apache", - "extensions": ["ts"] - }, - "video/mp4": { - "source": "apache", - "compressible": false, - "extensions": ["mp4","mp4v","mpg4"] - }, - "video/mp4v-es": { - "source": "apache" - }, - "video/mpeg": { - "source": "apache", - "compressible": false, - "extensions": ["mpeg","mpg","mpe","m1v","m2v"] - }, - "video/mpeg4-generic": { - "source": "apache" - }, - "video/mpv": { - "source": "apache" - }, - "video/nv": { - "source": "apache" - }, - "video/ogg": { - "source": "apache", - "compressible": false, - "extensions": ["ogv"] - }, - "video/parityfec": { - "source": "apache" - }, - "video/pointer": { - "source": "apache" - }, - "video/quicktime": { - "source": "apache", - "compressible": false, - "extensions": ["qt","mov"] - }, - "video/raw": { - "source": "apache" - }, - "video/rtp-enc-aescm128": { - "source": "apache" - }, - "video/rtx": { - "source": "apache" - }, - "video/smpte292m": { - "source": "apache" - }, - "video/ulpfec": { - "source": "apache" - }, - "video/vc1": { - "source": "apache" - }, - "video/vnd.cctv": { - "source": "apache" - }, - "video/vnd.dece.hd": { - "source": "apache", - "extensions": ["uvh","uvvh"] - }, - "video/vnd.dece.mobile": { - "source": "apache", - "extensions": ["uvm","uvvm"] - }, - "video/vnd.dece.mp4": { - "source": "apache" - }, - "video/vnd.dece.pd": { - "source": "apache", - "extensions": ["uvp","uvvp"] - }, - "video/vnd.dece.sd": { - "source": "apache", - "extensions": ["uvs","uvvs"] - }, - "video/vnd.dece.video": { - "source": "apache", - "extensions": ["uvv","uvvv"] - }, - "video/vnd.directv.mpeg": { - "source": "apache" - }, - "video/vnd.directv.mpeg-tts": { - "source": "apache" - }, - "video/vnd.dlna.mpeg-tts": { - "source": "apache" - }, - "video/vnd.dvb.file": { - "source": "apache", - "extensions": ["dvb"] - }, - "video/vnd.fvt": { - "source": "apache", - "extensions": ["fvt"] - }, - "video/vnd.hns.video": { - "source": "apache" - }, - "video/vnd.iptvforum.1dparityfec-1010": { - "source": "apache" - }, - "video/vnd.iptvforum.1dparityfec-2005": { - "source": "apache" - }, - "video/vnd.iptvforum.2dparityfec-1010": { - "source": "apache" - }, - "video/vnd.iptvforum.2dparityfec-2005": { - "source": "apache" - }, - "video/vnd.iptvforum.ttsavc": { - "source": "apache" - }, - "video/vnd.iptvforum.ttsmpeg2": { - "source": "apache" - }, - "video/vnd.motorola.video": { - "source": "apache" - }, - "video/vnd.motorola.videop": { - "source": "apache" - }, - "video/vnd.mpegurl": { - "source": "apache", - "extensions": ["mxu","m4u"] - }, - "video/vnd.ms-playready.media.pyv": { - "source": "apache", - "extensions": ["pyv"] - }, - "video/vnd.nokia.interleaved-multimedia": { - "source": "apache" - }, - "video/vnd.nokia.videovoip": { - "source": "apache" - }, - "video/vnd.objectvideo": { - "source": "apache" - }, - "video/vnd.sealed.mpeg1": { - "source": "apache" - }, - "video/vnd.sealed.mpeg4": { - "source": "apache" - }, - "video/vnd.sealed.swf": { - "source": "apache" - }, - "video/vnd.sealedmedia.softseal.mov": { - "source": "apache" - }, - "video/vnd.uvvu.mp4": { - "source": "apache", - "extensions": ["uvu","uvvu"] - }, - "video/vnd.vivo": { - "source": "apache", - "extensions": ["viv"] - }, - "video/webm": { - "source": "apache", - "compressible": false, - "extensions": ["webm"] - }, - "video/x-f4v": { - "source": "apache", - "extensions": ["f4v"] - }, - "video/x-fli": { - "source": "apache", - "extensions": ["fli"] - }, - "video/x-flv": { - "source": "apache", - "compressible": false, - "extensions": ["flv"] - }, - "video/x-m4v": { - "source": "apache", - "extensions": ["m4v"] - }, - "video/x-matroska": { - "source": "apache", - "compressible": false, - "extensions": ["mkv","mk3d","mks"] - }, - "video/x-mng": { - "source": "apache", - "extensions": ["mng"] - }, - "video/x-ms-asf": { - "source": "apache", - "extensions": ["asf","asx"] - }, - "video/x-ms-vob": { - "source": "apache", - "extensions": ["vob"] - }, - "video/x-ms-wm": { - "source": "apache", - "extensions": ["wm"] - }, - "video/x-ms-wmv": { - "source": "apache", - "compressible": false, - "extensions": ["wmv"] - }, - "video/x-ms-wmx": { - "source": "apache", - "extensions": ["wmx"] - }, - "video/x-ms-wvx": { - "source": "apache", - "extensions": ["wvx"] - }, - "video/x-msvideo": { - "source": "apache", - "extensions": ["avi"] - }, - "video/x-sgi-movie": { - "source": "apache", - "extensions": ["movie"] - }, - "video/x-smv": { - "source": "apache", - "extensions": ["smv"] - }, - "x-conference/x-cooltalk": { - "source": "apache", - "extensions": ["ice"] - }, - "x-shader/x-fragment": { - "compressible": true - }, - "x-shader/x-vertex": { - "compressible": true - } -} diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/index.js b/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/index.js deleted file mode 100644 index 551031f..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/index.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = require('./db.json') diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/package.json b/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/package.json deleted file mode 100644 index be85eb4..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "name": "mime-db", - "description": "Media Type Database", - "version": "1.5.0", - "author": { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - }, - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - } - ], - "license": "MIT", - "keywords": [ - "mime", - "db", - "type", - "types", - "database", - "charset", - "charsets" - ], - "repository": { - "type": "git", - "url": "https://github.com/jshttp/mime-db" - }, - "devDependencies": { - "co": "4", - "cogent": "1", - "csv-parse": "0", - "gnode": "0.1.0", - "istanbul": "0.3.5", - "mocha": "~1.21.4", - "raw-body": "~1.3.1", - "stream-to-array": "2" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "README.md", - "db.json", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "update": "gnode scripts/extensions && gnode scripts/types && node scripts/build", - "clean": "rm src/*", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - }, - "gitHead": "262fafb4a696cae208d6148c6642ee45bce07cb3", - "bugs": { - "url": "https://github.com/jshttp/mime-db/issues" - }, - "homepage": "https://github.com/jshttp/mime-db", - "_id": "mime-db@1.5.0", - "_shasum": "bd80b576157991c3b46c71be7041fc6d5402a6ee", - "_from": "mime-db@>=1.5.0 <1.6.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - } - ], - "dist": { - "shasum": "bd80b576157991c3b46c71be7041fc6d5402a6ee", - "tarball": "http://registry.npmjs.org/mime-db/-/mime-db-1.5.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.5.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/package.json b/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/package.json deleted file mode 100644 index 3abb8c8..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/mime-types/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "name": "mime-types", - "description": "The ultimate javascript content-type utility.", - "version": "2.0.7", - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "Jeremiah Senkpiel", - "email": "fishrock123@rocketmail.com", - "url": "https://searchbeam.jit.su" - }, - { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - } - ], - "license": "MIT", - "keywords": [ - "mime", - "types" - ], - "repository": { - "type": "git", - "url": "https://github.com/jshttp/mime-types" - }, - "dependencies": { - "mime-db": "~1.5.0" - }, - "devDependencies": { - "istanbul": "0.3.5", - "mocha": "~1.21.5" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "test": "mocha --reporter spec test/test.js", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js" - }, - "gitHead": "4216c095dcc3390c2b8f4a96a9eae94d11420f56", - "bugs": { - "url": "https://github.com/jshttp/mime-types/issues" - }, - "homepage": "https://github.com/jshttp/mime-types", - "_id": "mime-types@2.0.7", - "_shasum": "0cb58d0403aec977357db324eea67e40c32b44b2", - "_from": "mime-types@>=2.0.7 <2.1.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "fishrock123", - "email": "fishrock123@rocketmail.com" - }, - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - } - ], - "dist": { - "shasum": "0cb58d0403aec977357db324eea67e40c32b44b2", - "tarball": "http://registry.npmjs.org/mime-types/-/mime-types-2.0.7.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.7.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/HISTORY.md b/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/HISTORY.md deleted file mode 100644 index b786386..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/HISTORY.md +++ /dev/null @@ -1,60 +0,0 @@ -0.5.0 / 2014-12-18 -================== - - * Fix list return order when large accepted list - * Fix missing identity encoding when q=0 exists - * Remove dynamic building of Negotiator class - -0.4.9 / 2014-10-14 -================== - - * Fix error when media type has invalid parameter - -0.4.8 / 2014-09-28 -================== - - * Fix all negotiations to be case-insensitive - * Stable sort preferences of same quality according to client order - * Support Node.js 0.6 - -0.4.7 / 2014-06-24 -================== - - * Handle invalid provided languages - * Handle invalid provided media types - -0.4.6 / 2014-06-11 -================== - - * Order by specificity when quality is the same - -0.4.5 / 2014-05-29 -================== - - * Fix regression in empty header handling - -0.4.4 / 2014-05-29 -================== - - * Fix behaviors when headers are not present - -0.4.3 / 2014-04-16 -================== - - * Handle slashes on media params correctly - -0.4.2 / 2014-02-28 -================== - - * Fix media type sorting - * Handle media types params strictly - -0.4.1 / 2014-01-16 -================== - - * Use most specific matches - -0.4.0 / 2014-01-09 -================== - - * Remove preferred prefix from methods diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/LICENSE b/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/LICENSE deleted file mode 100644 index 692b534..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2012 Federico Romero -Copyright (c) 2012-2014 Isaac Z. Schlueter - -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/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/README.md b/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/README.md deleted file mode 100644 index 2461eb1..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/README.md +++ /dev/null @@ -1,161 +0,0 @@ -# negotiator - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -An HTTP content negotiator for Node.js - -## Installation - -```sh -$ npm install negotiator -``` - -## API - -```js -var Negotiator = require('negotiator') -``` - -### Accept Negotiation - -```js -availableMediaTypes = ['text/html', 'text/plain', 'application/json'] - -// The negotiator constructor receives a request object -negotiator = new Negotiator(request) - -// Let's say Accept header is 'text/html, application/*;q=0.2, image/jpeg;q=0.8' - -negotiator.mediaTypes() -// -> ['text/html', 'image/jpeg', 'application/*'] - -negotiator.mediaTypes(availableMediaTypes) -// -> ['text/html', 'application/json'] - -negotiator.mediaType(availableMediaTypes) -// -> 'text/html' -``` - -You can check a working example at `examples/accept.js`. - -#### Methods - -##### mediaTypes(availableMediaTypes): - -Returns an array of preferred media types ordered by priority from a list of available media types. - -##### mediaType(availableMediaType): - -Returns the top preferred media type from a list of available media types. - -### Accept-Language Negotiation - -```js -negotiator = new Negotiator(request) - -availableLanguages = 'en', 'es', 'fr' - -// Let's say Accept-Language header is 'en;q=0.8, es, pt' - -negotiator.languages() -// -> ['es', 'pt', 'en'] - -negotiator.languages(availableLanguages) -// -> ['es', 'en'] - -language = negotiator.language(availableLanguages) -// -> 'es' -``` - -You can check a working example at `examples/language.js`. - -#### Methods - -##### languages(availableLanguages): - -Returns an array of preferred languages ordered by priority from a list of available languages. - -##### language(availableLanguages): - -Returns the top preferred language from a list of available languages. - -### Accept-Charset Negotiation - -```js -availableCharsets = ['utf-8', 'iso-8859-1', 'iso-8859-5'] - -negotiator = new Negotiator(request) - -// Let's say Accept-Charset header is 'utf-8, iso-8859-1;q=0.8, utf-7;q=0.2' - -negotiator.charsets() -// -> ['utf-8', 'iso-8859-1', 'utf-7'] - -negotiator.charsets(availableCharsets) -// -> ['utf-8', 'iso-8859-1'] - -negotiator.charset(availableCharsets) -// -> 'utf-8' -``` - -You can check a working example at `examples/charset.js`. - -#### Methods - -##### charsets(availableCharsets): - -Returns an array of preferred charsets ordered by priority from a list of available charsets. - -##### charset(availableCharsets): - -Returns the top preferred charset from a list of available charsets. - -### Accept-Encoding Negotiation - -```js -availableEncodings = ['identity', 'gzip'] - -negotiator = new Negotiator(request) - -// Let's say Accept-Encoding header is 'gzip, compress;q=0.2, identity;q=0.5' - -negotiator.encodings() -// -> ['gzip', 'identity', 'compress'] - -negotiator.encodings(availableEncodings) -// -> ['gzip', 'identity'] - -negotiator.encoding(availableEncodings) -// -> 'gzip' -``` - -You can check a working example at `examples/encoding.js`. - -#### Methods - -##### encodings(availableEncodings): - -Returns an array of preferred encodings ordered by priority from a list of available encodings. - -##### encoding(availableEncodings): - -Returns the top preferred encoding from a list of available encodings. - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/negotiator.svg?style=flat -[npm-url]: https://npmjs.org/package/negotiator -[node-version-image]: https://img.shields.io/node/v/negotiator.svg?style=flat -[node-version-url]: http://nodejs.org/download/ -[travis-image]: https://img.shields.io/travis/jshttp/negotiator.svg?style=flat -[travis-url]: https://travis-ci.org/jshttp/negotiator -[coveralls-image]: https://img.shields.io/coveralls/jshttp/negotiator.svg?style=flat -[coveralls-url]: https://coveralls.io/r/jshttp/negotiator?branch=master -[downloads-image]: https://img.shields.io/npm/dm/negotiator.svg?style=flat -[downloads-url]: https://npmjs.org/package/negotiator diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/index.js b/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/index.js deleted file mode 100644 index edae9cf..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/index.js +++ /dev/null @@ -1,62 +0,0 @@ - -var preferredCharsets = require('./lib/charset'); -var preferredEncodings = require('./lib/encoding'); -var preferredLanguages = require('./lib/language'); -var preferredMediaTypes = require('./lib/mediaType'); - -module.exports = Negotiator; -Negotiator.Negotiator = Negotiator; - -function Negotiator(request) { - if (!(this instanceof Negotiator)) { - return new Negotiator(request); - } - - this.request = request; -} - -Negotiator.prototype.charset = function charset(available) { - var set = this.charsets(available); - return set && set[0]; -}; - -Negotiator.prototype.charsets = function charsets(available) { - return preferredCharsets(this.request.headers['accept-charset'], available); -}; - -Negotiator.prototype.encoding = function encoding(available) { - var set = this.encodings(available); - return set && set[0]; -}; - -Negotiator.prototype.encodings = function encodings(available) { - return preferredEncodings(this.request.headers['accept-encoding'], available); -}; - -Negotiator.prototype.language = function language(available) { - var set = this.languages(available); - return set && set[0]; -}; - -Negotiator.prototype.languages = function languages(available) { - return preferredLanguages(this.request.headers['accept-language'], available); -}; - -Negotiator.prototype.mediaType = function mediaType(available) { - var set = this.mediaTypes(available); - return set && set[0]; -}; - -Negotiator.prototype.mediaTypes = function mediaTypes(available) { - return preferredMediaTypes(this.request.headers.accept, available); -}; - -// Backwards compatibility -Negotiator.prototype.preferredCharset = Negotiator.prototype.charset; -Negotiator.prototype.preferredCharsets = Negotiator.prototype.charsets; -Negotiator.prototype.preferredEncoding = Negotiator.prototype.encoding; -Negotiator.prototype.preferredEncodings = Negotiator.prototype.encodings; -Negotiator.prototype.preferredLanguage = Negotiator.prototype.language; -Negotiator.prototype.preferredLanguages = Negotiator.prototype.languages; -Negotiator.prototype.preferredMediaType = Negotiator.prototype.mediaType; -Negotiator.prototype.preferredMediaTypes = Negotiator.prototype.mediaTypes; diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/charset.js b/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/charset.js deleted file mode 100644 index f595e38..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/charset.js +++ /dev/null @@ -1,101 +0,0 @@ -module.exports = preferredCharsets; -preferredCharsets.preferredCharsets = preferredCharsets; - -function parseAcceptCharset(accept) { - var accepts = accept.split(','); - - for (var i = 0, j = 0; i < accepts.length; i++) { - var charset = parseCharset(accepts[i].trim(), i); - - if (charset) { - accepts[j++] = charset; - } - } - - // trim accepts - accepts.length = j; - - return accepts; -} - -function parseCharset(s, i) { - var match = s.match(/^\s*(\S+?)\s*(?:;(.*))?$/); - if (!match) return null; - - var charset = match[1]; - var q = 1; - if (match[2]) { - var params = match[2].split(';') - for (var i = 0; i < params.length; i ++) { - var p = params[i].trim().split('='); - if (p[0] === 'q') { - q = parseFloat(p[1]); - break; - } - } - } - - return { - charset: charset, - q: q, - i: i - }; -} - -function getCharsetPriority(charset, accepted) { - var priority = {i: -1, s: 0, q: 0}; - - for (var i = 0; i < accepted.length; i++) { - var spec = specify(charset, accepted[i]); - - if (spec && (priority.s - spec.s || priority.q - spec.q || priority.i - spec.i) < 0) { - priority = spec; - } - } - - return priority; -} - -function specify(charset, spec) { - var s = 0; - if(spec.charset.toLowerCase() === charset.toLowerCase()){ - s |= 1; - } else if (spec.charset !== '*' ) { - return null - } - - return { - s: s, - q: spec.q, - i: spec.i - } -} - -function preferredCharsets(accept, provided) { - // RFC 2616 sec 14.2: no header = * - var accepts = parseAcceptCharset(accept === undefined ? '*' : accept || ''); - - if (!provided) { - // sorted list of all charsets - return accepts.filter(isQuality).sort(compareSpecs).map(function getCharset(spec) { - return spec.charset; - }); - } - - var priorities = provided.map(function getPriority(type) { - return getCharsetPriority(type, accepts); - }); - - // sorted list of accepted charsets - return priorities.filter(isQuality).sort(compareSpecs).map(function getCharset(priority) { - return provided[priorities.indexOf(priority)]; - }); -} - -function compareSpecs(a, b) { - return (b.q - a.q) || (b.s - a.s) || (a.i - b.i) || 0; -} - -function isQuality(spec) { - return spec.q > 0; -} diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/encoding.js b/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/encoding.js deleted file mode 100644 index 137e6ac..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/encoding.js +++ /dev/null @@ -1,117 +0,0 @@ -module.exports = preferredEncodings; -preferredEncodings.preferredEncodings = preferredEncodings; - -function parseAcceptEncoding(accept) { - var accepts = accept.split(','); - var hasIdentity = false; - var minQuality = 1; - - for (var i = 0, j = 0; i < accepts.length; i++) { - var encoding = parseEncoding(accepts[i].trim(), i); - - if (encoding) { - accepts[j++] = encoding; - hasIdentity = hasIdentity || specify('identity', encoding); - minQuality = Math.min(minQuality, encoding.q || 1); - } - } - - if (!hasIdentity) { - /* - * If identity doesn't explicitly appear in the accept-encoding header, - * it's added to the list of acceptable encoding with the lowest q - */ - accepts[j++] = { - encoding: 'identity', - q: minQuality, - i: i - }; - } - - // trim accepts - accepts.length = j; - - return accepts; -} - -function parseEncoding(s, i) { - var match = s.match(/^\s*(\S+?)\s*(?:;(.*))?$/); - - if (!match) return null; - - var encoding = match[1]; - var q = 1; - if (match[2]) { - var params = match[2].split(';'); - for (var i = 0; i < params.length; i ++) { - var p = params[i].trim().split('='); - if (p[0] === 'q') { - q = parseFloat(p[1]); - break; - } - } - } - - return { - encoding: encoding, - q: q, - i: i - }; -} - -function getEncodingPriority(encoding, accepted) { - var priority = {i: -1, s: 0, q: 0}; - - for (var i = 0; i < accepted.length; i++) { - var spec = specify(encoding, accepted[i]); - - if (spec && (priority.s - spec.s || priority.q - spec.q || priority.i - spec.i) < 0) { - priority = spec; - } - } - - return priority; -} - -function specify(encoding, spec) { - var s = 0; - if(spec.encoding.toLowerCase() === encoding.toLowerCase()){ - s |= 1; - } else if (spec.encoding !== '*' ) { - return null - } - - return { - s: s, - q: spec.q, - i: spec.i - } -}; - -function preferredEncodings(accept, provided) { - var accepts = parseAcceptEncoding(accept || ''); - - if (!provided) { - // sorted list of all encodings - return accepts.filter(isQuality).sort(compareSpecs).map(function getEncoding(spec) { - return spec.encoding; - }); - } - - var priorities = provided.map(function getPriority(type) { - return getEncodingPriority(type, accepts); - }); - - // sorted list of accepted encodings - return priorities.filter(isQuality).sort(compareSpecs).map(function getEncoding(priority) { - return provided[priorities.indexOf(priority)]; - }); -} - -function compareSpecs(a, b) { - return (b.q - a.q) || (b.s - a.s) || (a.i - b.i) || 0; -} - -function isQuality(spec) { - return spec.q > 0; -} diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/language.js b/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/language.js deleted file mode 100644 index a62fb86..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/language.js +++ /dev/null @@ -1,111 +0,0 @@ -module.exports = preferredLanguages; -preferredLanguages.preferredLanguages = preferredLanguages; - -function parseAcceptLanguage(accept) { - var accepts = accept.split(','); - - for (var i = 0, j = 0; i < accepts.length; i++) { - var langauge = parseLanguage(accepts[i].trim(), i); - - if (langauge) { - accepts[j++] = langauge; - } - } - - // trim accepts - accepts.length = j; - - return accepts; -} - -function parseLanguage(s, i) { - var match = s.match(/^\s*(\S+?)(?:-(\S+?))?\s*(?:;(.*))?$/); - if (!match) return null; - - var prefix = match[1], - suffix = match[2], - full = prefix; - - if (suffix) full += "-" + suffix; - - var q = 1; - if (match[3]) { - var params = match[3].split(';') - for (var i = 0; i < params.length; i ++) { - var p = params[i].split('='); - if (p[0] === 'q') q = parseFloat(p[1]); - } - } - - return { - prefix: prefix, - suffix: suffix, - q: q, - i: i, - full: full - }; -} - -function getLanguagePriority(language, accepted) { - var priority = {i: -1, s: 0, q: 0}; - - for (var i = 0; i < accepted.length; i++) { - var spec = specify(language, accepted[i]); - - if (spec && (priority.s - spec.s || priority.q - spec.q || priority.i - spec.i) < 0) { - priority = spec; - } - } - - return priority; -} - -function specify(language, spec) { - var p = parseLanguage(language) - if (!p) return null; - var s = 0; - if(spec.full.toLowerCase() === p.full.toLowerCase()){ - s |= 4; - } else if (spec.prefix.toLowerCase() === p.full.toLowerCase()) { - s |= 2; - } else if (spec.full.toLowerCase() === p.prefix.toLowerCase()) { - s |= 1; - } else if (spec.full !== '*' ) { - return null - } - - return { - s: s, - q: spec.q, - i: spec.i - } -}; - -function preferredLanguages(accept, provided) { - // RFC 2616 sec 14.4: no header = * - var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || ''); - - if (!provided) { - // sorted list of all languages - return accepts.filter(isQuality).sort(compareSpecs).map(function getLanguage(spec) { - return spec.full; - }); - } - - var priorities = provided.map(function getPriority(type) { - return getLanguagePriority(type, accepts); - }); - - // sorted list of accepted languages - return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) { - return provided[priorities.indexOf(priority)]; - }); -} - -function compareSpecs(a, b) { - return (b.q - a.q) || (b.s - a.s) || (a.i - b.i) || 0; -} - -function isQuality(spec) { - return spec.q > 0; -} diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/mediaType.js b/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/mediaType.js deleted file mode 100644 index d88ea6a..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/lib/mediaType.js +++ /dev/null @@ -1,135 +0,0 @@ -module.exports = preferredMediaTypes; -preferredMediaTypes.preferredMediaTypes = preferredMediaTypes; - -function parseAccept(accept) { - var accepts = accept.split(','); - - for (var i = 0, j = 0; i < accepts.length; i++) { - var mediaType = parseMediaType(accepts[i].trim(), i); - - if (mediaType) { - accepts[j++] = mediaType; - } - } - - // trim accepts - accepts.length = j; - - return accepts; -}; - -function parseMediaType(s, i) { - var match = s.match(/\s*(\S+?)\/([^;\s]+)\s*(?:;(.*))?/); - if (!match) return null; - - var type = match[1], - subtype = match[2], - full = "" + type + "/" + subtype, - params = {}, - q = 1; - - if (match[3]) { - params = match[3].split(';').map(function(s) { - return s.trim().split('='); - }).reduce(function (set, p) { - set[p[0]] = p[1]; - return set - }, params); - - if (params.q != null) { - q = parseFloat(params.q); - delete params.q; - } - } - - return { - type: type, - subtype: subtype, - params: params, - q: q, - i: i, - full: full - }; -} - -function getMediaTypePriority(type, accepted) { - var priority = {i: -1, s: 0, q: 0}; - - for (var i = 0; i < accepted.length; i++) { - var spec = specify(type, accepted[i]); - - if (spec && (priority.s - spec.s || priority.q - spec.q || priority.i - spec.i) < 0) { - priority = spec; - } - } - - return priority; -} - -function specify(type, spec) { - var p = parseMediaType(type); - var s = 0; - - if (!p) { - return null; - } - - if(spec.type.toLowerCase() == p.type.toLowerCase()) { - s |= 4 - } else if(spec.type != '*') { - return null; - } - - if(spec.subtype.toLowerCase() == p.subtype.toLowerCase()) { - s |= 2 - } else if(spec.subtype != '*') { - return null; - } - - var keys = Object.keys(spec.params); - if (keys.length > 0) { - if (keys.every(function (k) { - return spec.params[k] == '*' || (spec.params[k] || '').toLowerCase() == (p.params[k] || '').toLowerCase(); - })) { - s |= 1 - } else { - return null - } - } - - return { - q: spec.q, - i: spec.i, - s: s, - } - -} - -function preferredMediaTypes(accept, provided) { - // RFC 2616 sec 14.2: no header = */* - var accepts = parseAccept(accept === undefined ? '*/*' : accept || ''); - - if (!provided) { - // sorted list of all types - return accepts.filter(isQuality).sort(compareSpecs).map(function getType(spec) { - return spec.full; - }); - } - - var priorities = provided.map(function getPriority(type) { - return getMediaTypePriority(type, accepts); - }); - - // sorted list of accepted types - return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) { - return provided[priorities.indexOf(priority)]; - }); -} - -function compareSpecs(a, b) { - return (b.q - a.q) || (b.s - a.s) || (a.i - b.i) || 0; -} - -function isQuality(spec) { - return spec.q > 0; -} diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/package.json b/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/package.json deleted file mode 100644 index 41e51a0..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/node_modules/negotiator/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "name": "negotiator", - "description": "HTTP content negotiation", - "version": "0.5.0", - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "Federico Romero", - "email": "federico.romero@outboxlabs.com" - }, - { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - } - ], - "license": "MIT", - "keywords": [ - "http", - "content negotiation", - "accept", - "accept-language", - "accept-encoding", - "accept-charset" - ], - "repository": { - "type": "git", - "url": "https://github.com/jshttp/negotiator" - }, - "devDependencies": { - "istanbul": "0.3.5", - "nodeunit": "0.9.0" - }, - "files": [ - "lib/", - "HISTORY.md", - "LICENSE", - "index.js", - "README.md" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "test": "nodeunit test", - "test-cov": "istanbul cover ./node_modules/nodeunit/bin/nodeunit test" - }, - "gitHead": "79110a26fa939a77df65f8651a5d4d071f77a14a", - "bugs": { - "url": "https://github.com/jshttp/negotiator/issues" - }, - "homepage": "https://github.com/jshttp/negotiator", - "_id": "negotiator@0.5.0", - "_shasum": "bb77b3139d80d9b1ee8c913520a18b0d475b1b90", - "_from": "negotiator@0.5.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "federomero", - "email": "federomero@gmail.com" - }, - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - } - ], - "dist": { - "shasum": "bb77b3139d80d9b1ee8c913520a18b0d475b1b90", - "tarball": "http://registry.npmjs.org/negotiator/-/negotiator-0.5.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.5.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/accepts/package.json b/s4t-server-node/node_modules/express/node_modules/accepts/package.json deleted file mode 100644 index 6b07fb0..0000000 --- a/s4t-server-node/node_modules/express/node_modules/accepts/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "name": "accepts", - "description": "Higher-level content negotiation", - "version": "1.2.2", - "author": { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/jshttp/accepts" - }, - "dependencies": { - "mime-types": "~2.0.7", - "negotiator": "0.5.0" - }, - "devDependencies": { - "istanbul": "0.3.5", - "mocha": "~2.1.0" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "index.js" - ], - "engines": { - "node": ">= 0.8" - }, - "scripts": { - "test": "mocha --reporter spec --check-leaks --bail test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - }, - "keywords": [ - "content", - "negotiation", - "accept", - "accepts" - ], - "gitHead": "08c807538789b4908ddb5f6ad58550b2d0c3c261", - "bugs": { - "url": "https://github.com/jshttp/accepts/issues" - }, - "homepage": "https://github.com/jshttp/accepts", - "_id": "accepts@1.2.2", - "_shasum": "9bc29b9b39f33a351e76a76058184ebc8ed7783f", - "_from": "accepts@>=1.2.2 <1.3.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "federomero", - "email": "federomero@gmail.com" - }, - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "shtylman", - "email": "shtylman@gmail.com" - }, - { - "name": "mscdex", - "email": "mscdex@mscdex.net" - }, - { - "name": "fishrock123", - "email": "fishrock123@rocketmail.com" - } - ], - "dist": { - "shasum": "9bc29b9b39f33a351e76a76058184ebc8ed7783f", - "tarball": "http://registry.npmjs.org/accepts/-/accepts-1.2.2.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.2.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/content-disposition/HISTORY.md b/s4t-server-node/node_modules/express/node_modules/content-disposition/HISTORY.md deleted file mode 100644 index 1192551..0000000 --- a/s4t-server-node/node_modules/express/node_modules/content-disposition/HISTORY.md +++ /dev/null @@ -1,40 +0,0 @@ -0.5.0 / 2014-10-11 -================== - - * Add `parse` function - -0.4.0 / 2014-09-21 -================== - - * Expand non-Unicode `filename` to the full ISO-8859-1 charset - -0.3.0 / 2014-09-20 -================== - - * Add `fallback` option - * Add `type` option - -0.2.0 / 2014-09-19 -================== - - * Reduce ambiguity of file names with hex escape in buggy browsers - -0.1.2 / 2014-09-19 -================== - - * Fix periodic invalid Unicode filename header - -0.1.1 / 2014-09-19 -================== - - * Fix invalid characters appearing in `filename*` parameter - -0.1.0 / 2014-09-18 -================== - - * Make the `filename` argument optional - -0.0.0 / 2014-09-18 -================== - - * Initial release diff --git a/s4t-server-node/node_modules/express/node_modules/content-disposition/LICENSE b/s4t-server-node/node_modules/express/node_modules/content-disposition/LICENSE deleted file mode 100644 index b7dce6c..0000000 --- a/s4t-server-node/node_modules/express/node_modules/content-disposition/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 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/s4t-server-node/node_modules/express/node_modules/content-disposition/README.md b/s4t-server-node/node_modules/express/node_modules/content-disposition/README.md deleted file mode 100644 index d265431..0000000 --- a/s4t-server-node/node_modules/express/node_modules/content-disposition/README.md +++ /dev/null @@ -1,141 +0,0 @@ -# content-disposition - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Create and parse HTTP `Content-Disposition` header - -## Installation - -```sh -$ npm install content-disposition -``` - -## API - -```js -var contentDisposition = require('content-disposition') -``` - -### contentDisposition(filename, options) - -Create an attachment `Content-Disposition` header value using the given file name, -if supplied. The `filename` is optional and if no file name is desired, but you -want to specify `options`, set `filename` to `undefined`. - -```js -res.setHeader('Content-Disposition', contentDisposition('∫ maths.pdf')) -``` - -**note** HTTP headers are of the ISO-8859-1 character set. If you are writing this -header through a means different from `setHeader` in Node.js, you'll want to specify -the `'binary'` encoding in Node.js. - -#### Options - -`contentDisposition` accepts these properties in the options object. - -##### fallback - -If the `filename` option is outside ISO-8859-1, then the file name is actually -stored in a supplemental field for clients that support Unicode file names and -a ISO-8859-1 version of the file name is automatically generated. - -This specifies the ISO-8859-1 file name to override the automatic generation or -disables the generation all together, defaults to `true`. - - - A string will specify the ISO-8859-1 file name to use in place of automatic - generation. - - `false` will disable including a ISO-8859-1 file name and only include the - Unicode version (unless the file name is already ISO-8859-1). - - `true` will enable automatic generation if the file name is outside ISO-8859-1. - -If the `filename` option is ISO-8859-1 and this option is specified and has a -different value, then the `filename` option is encoded in the extended field -and this set as the fallback field, even though they are both ISO-8859-1. - -##### type - -Specifies the disposition type, defaults to `"attachment"`. This can also be -`"inline"`, or any other value (all values except inline are treated like -`attachment`, but can convey additional information if both parties agree to -it). The type is normalized to lower-case. - -### contentDisposition.parse(string) - -```js -var disposition = contentDisposition.parse('attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt"'); -``` - -Parse a `Content-Disposition` header string. This automatically handles extended -("Unicode") parameters by decoding them and providing them under the standard -parameter name. This will return an object with the following properties (examples -are shown for the string `'attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt'`): - - - `type`: The disposition type (always lower case). Example: `'attachment'` - - - `parameters`: An object of the parameters in the disposition (name of parameter - always lower case and extended versions replace non-extended versions). Example: - `{filename: "€ rates.txt"}` - -## Examples - -### Send a file for download - -```js -var contentDisposition = require('content-disposition') -var destroy = require('destroy') -var http = require('http') -var onFinished = require('on-finished') - -var filePath = '/path/to/public/plans.pdf' - -http.createServer(function onRequest(req, res) { - // set headers - res.setHeader('Content-Type', 'application/pdf') - res.setHeader('Content-Disposition', contentDisposition(filePath)) - - // send file - var stream = fs.createReadStream(filePath) - stream.pipe(res) - onFinished(res, function (err) { - destroy(stream) - }) -}) -``` - -## Testing - -```sh -$ npm test -``` - -## References - -- [RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1][rfc-2616] -- [RFC 5987: Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters][rfc-5987] -- [RFC 6266: Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)][rfc-6266] -- [Test Cases for HTTP Content-Disposition header field (RFC 6266) and the Encodings defined in RFCs 2047, 2231 and 5987][tc-2231] - -[rfc-2616]: https://tools.ietf.org/html/rfc2616 -[rfc-5987]: https://tools.ietf.org/html/rfc5987 -[rfc-6266]: https://tools.ietf.org/html/rfc6266 -[tc-2231]: http://greenbytes.de/tech/tc2231/ - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/content-disposition.svg?style=flat -[npm-url]: https://npmjs.org/package/content-disposition -[node-version-image]: https://img.shields.io/node/v/content-disposition.svg?style=flat -[node-version-url]: http://nodejs.org/download/ -[travis-image]: https://img.shields.io/travis/jshttp/content-disposition.svg?style=flat -[travis-url]: https://travis-ci.org/jshttp/content-disposition -[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-disposition.svg?style=flat -[coveralls-url]: https://coveralls.io/r/jshttp/content-disposition?branch=master -[downloads-image]: https://img.shields.io/npm/dm/content-disposition.svg?style=flat -[downloads-url]: https://npmjs.org/package/content-disposition diff --git a/s4t-server-node/node_modules/express/node_modules/content-disposition/index.js b/s4t-server-node/node_modules/express/node_modules/content-disposition/index.js deleted file mode 100644 index fa3bc74..0000000 --- a/s4t-server-node/node_modules/express/node_modules/content-disposition/index.js +++ /dev/null @@ -1,443 +0,0 @@ -/*! - * content-disposition - * Copyright(c) 2014 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = contentDisposition -module.exports.parse = parse - -/** - * Module dependencies. - */ - -var basename = require('path').basename - -/** - * RegExp to match non attr-char, *after* encodeURIComponent (i.e. not including "%") - */ - -var encodeUriAttrCharRegExp = /[\x00-\x20"'\(\)*,\/:;<=>?@\[\\\]\{\}\x7f]/g - -/** - * RegExp to match percent encoding escape. - */ - -var hexEscapeRegExp = /%[0-9A-Fa-f]{2}/ -var hexEscapeReplaceRegExp = /%([0-9A-Fa-f]{2})/g - -/** - * RegExp to match non-latin1 characters. - */ - -var nonLatin1RegExp = /[^\x20-\x7e\xa0-\xff]/g - -/** - * RegExp to match quoted-pair in RFC 2616 - * - * quoted-pair = "\" CHAR - * CHAR = - */ - -var qescRegExp = /\\([\u0000-\u007f])/g; - -/** - * RegExp to match chars that must be quoted-pair in RFC 2616 - */ - -var quoteRegExp = /([\\"])/g - -/** - * RegExp for various RFC 2616 grammar - * - * parameter = token "=" ( token | quoted-string ) - * token = 1* - * separators = "(" | ")" | "<" | ">" | "@" - * | "," | ";" | ":" | "\" | <"> - * | "/" | "[" | "]" | "?" | "=" - * | "{" | "}" | SP | HT - * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> ) - * qdtext = > - * quoted-pair = "\" CHAR - * CHAR = - * TEXT = - * LWS = [CRLF] 1*( SP | HT ) - * CRLF = CR LF - * CR = - * LF = - * SP = - * HT = - * CTL = - * OCTET = - */ - -var paramRegExp = /; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g -var textRegExp = /^[\x20-\x7e\x80-\xff]+$/ -var tokenRegExp = /^[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+$/ - -/** - * RegExp for various RFC 5987 grammar - * - * ext-value = charset "'" [ language ] "'" value-chars - * charset = "UTF-8" / "ISO-8859-1" / mime-charset - * mime-charset = 1*mime-charsetc - * mime-charsetc = ALPHA / DIGIT - * / "!" / "#" / "$" / "%" / "&" - * / "+" / "-" / "^" / "_" / "`" - * / "{" / "}" / "~" - * language = ( 2*3ALPHA [ extlang ] ) - * / 4ALPHA - * / 5*8ALPHA - * extlang = *3( "-" 3ALPHA ) - * value-chars = *( pct-encoded / attr-char ) - * pct-encoded = "%" HEXDIG HEXDIG - * attr-char = ALPHA / DIGIT - * / "!" / "#" / "$" / "&" / "+" / "-" / "." - * / "^" / "_" / "`" / "|" / "~" - */ - -var extValueRegExp = /^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+\-\.^_`|~])+)$/ - -/** - * RegExp for various RFC 6266 grammar - * - * disposition-type = "inline" | "attachment" | disp-ext-type - * disp-ext-type = token - * disposition-parm = filename-parm | disp-ext-parm - * filename-parm = "filename" "=" value - * | "filename*" "=" ext-value - * disp-ext-parm = token "=" value - * | ext-token "=" ext-value - * ext-token = - */ - -var dispositionTypeRegExp = /^([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *(?:$|;)/ - -/** - * Create an attachment Content-Disposition header. - * - * @param {string} [filename] - * @param {object} [options] - * @param {string} [options.type=attachment] - * @param {string|boolean} [options.fallback=true] - * @return {string} - * @api public - */ - -function contentDisposition(filename, options) { - var opts = options || {} - - // get type - var type = opts.type || 'attachment' - - // get parameters - var params = createparams(filename, opts.fallback) - - // format into string - return format(new ContentDisposition(type, params)) -} - -/** - * Create parameters object from filename and fallback. - * - * @param {string} [filename] - * @param {string|boolean} [fallback=true] - * @return {object} - * @api private - */ - -function createparams(filename, fallback) { - if (filename === undefined) { - return - } - - var params = {} - - if (typeof filename !== 'string') { - throw new TypeError('filename must be a string') - } - - // fallback defaults to true - if (fallback === undefined) { - fallback = true - } - - if (typeof fallback !== 'string' && typeof fallback !== 'boolean') { - throw new TypeError('fallback must be a string or boolean') - } - - if (typeof fallback === 'string' && nonLatin1RegExp.test(fallback)) { - throw new TypeError('fallback must be ISO-8859-1 string') - } - - // restrict to file base name - var name = basename(filename) - - // determine if name is suitable for quoted string - var isQuotedString = textRegExp.test(name) - - // generate fallback name - var fallbackName = typeof fallback !== 'string' - ? fallback && getlatin1(name) - : basename(fallback) - var hasFallback = typeof fallbackName === 'string' && fallbackName !== name - - // set extended filename parameter - if (hasFallback || !isQuotedString || hexEscapeRegExp.test(name)) { - params['filename*'] = name - } - - // set filename parameter - if (isQuotedString || hasFallback) { - params.filename = hasFallback - ? fallbackName - : name - } - - return params -} - -/** - * Format object to Content-Disposition header. - * - * @param {object} obj - * @param {string} obj.type - * @param {object} [obj.parameters] - * @return {string} - * @api private - */ - -function format(obj) { - var parameters = obj.parameters - var type = obj.type - - if (!type || typeof type !== 'string' || !tokenRegExp.test(type)) { - throw new TypeError('invalid type') - } - - // start with normalized type - var string = String(type).toLowerCase() - - // append parameters - if (parameters && typeof parameters === 'object') { - var param - var params = Object.keys(parameters).sort() - - for (var i = 0; i < params.length; i++) { - param = params[i] - - var val = param.substr(-1) === '*' - ? ustring(parameters[param]) - : qstring(parameters[param]) - - string += '; ' + param + '=' + val - } - } - - return string -} - -/** - * Decode a RFC 6987 field value (gracefully). - * - * @param {string} str - * @return {string} - * @api private - */ - -function decodefield(str) { - var match = extValueRegExp.exec(str) - - if (!match) { - throw new TypeError('invalid extended field value') - } - - var charset = match[1].toLowerCase() - var encoded = match[2] - var value - - // to binary string - var binary = encoded.replace(hexEscapeReplaceRegExp, pdecode) - - switch (charset) { - case 'iso-8859-1': - value = getlatin1(binary) - break - case 'utf-8': - value = new Buffer(binary, 'binary').toString('utf8') - break - default: - throw new TypeError('unsupported charset in extended field') - } - - return value -} - -/** - * Get ISO-8859-1 version of string. - * - * @param {string} val - * @return {string} - * @api private - */ - -function getlatin1(val) { - // simple Unicode -> ISO-8859-1 transformation - return String(val).replace(nonLatin1RegExp, '?') -} - -/** - * Parse Content-Disposition header string. - * - * @param {string} string - * @return {object} - * @api private - */ - -function parse(string) { - if (!string || typeof string !== 'string') { - throw new TypeError('argument string is required') - } - - var match = dispositionTypeRegExp.exec(string) - - if (!match) { - throw new TypeError('invalid type format') - } - - // normalize type - var index = match[0].length - var type = match[1].toLowerCase() - - var key - var names = [] - var params = {} - var value - - // calculate index to start at - index = paramRegExp.lastIndex = match[0].substr(-1) === ';' - ? index - 1 - : index - - // match parameters - while (match = paramRegExp.exec(string)) { - if (match.index !== index) { - throw new TypeError('invalid parameter format') - } - - index += match[0].length - key = match[1].toLowerCase() - value = match[2] - - if (names.indexOf(key) !== -1) { - throw new TypeError('invalid duplicate parameter') - } - - names.push(key) - - if (key.indexOf('*') + 1 === key.length) { - // decode extended value - key = key.slice(0, -1) - value = decodefield(value) - - // overwrite existing value - params[key] = value - continue - } - - if (typeof params[key] === 'string') { - continue - } - - if (value[0] === '"') { - // remove quotes and escapes - value = value - .substr(1, value.length - 2) - .replace(qescRegExp, '$1') - } - - params[key] = value - } - - if (index !== -1 && index !== string.length) { - throw new TypeError('invalid parameter format') - } - - return new ContentDisposition(type, params) -} - -/** - * Percent decode a single character. - * - * @param {string} str - * @param {string} hex - * @return {string} - * @api private - */ - -function pdecode(str, hex) { - return String.fromCharCode(parseInt(hex, 16)) -} - -/** - * Percent encode a single character. - * - * @param {string} char - * @return {string} - * @api private - */ - -function pencode(char) { - var hex = String(char) - .charCodeAt(0) - .toString(16) - .toUpperCase() - return hex.length === 1 - ? '%0' + hex - : '%' + hex -} - -/** - * Quote a string for HTTP. - * - * @param {string} val - * @return {string} - * @api private - */ - -function qstring(val) { - var str = String(val) - - return '"' + str.replace(quoteRegExp, '\\$1') + '"' -} - -/** - * Encode a Unicode string for HTTP (RFC 5987). - * - * @param {string} val - * @return {string} - * @api private - */ - -function ustring(val) { - var str = String(val) - - // percent encode as UTF-8 - var encoded = encodeURIComponent(str) - .replace(encodeUriAttrCharRegExp, pencode) - - return 'UTF-8\'\'' + encoded -} - -/** - * Class for parsed Content-Disposition header for v8 optimization - */ - -function ContentDisposition(type, parameters) { - this.type = type - this.parameters = parameters -} diff --git a/s4t-server-node/node_modules/express/node_modules/content-disposition/package.json b/s4t-server-node/node_modules/express/node_modules/content-disposition/package.json deleted file mode 100644 index b0bb7ec..0000000 --- a/s4t-server-node/node_modules/express/node_modules/content-disposition/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "content-disposition", - "description": "Create and parse Content-Disposition header", - "version": "0.5.0", - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - } - ], - "license": "MIT", - "keywords": [ - "content-disposition", - "http", - "rfc6266", - "res" - ], - "repository": { - "type": "git", - "url": "https://github.com/jshttp/content-disposition" - }, - "devDependencies": { - "istanbul": "0.3.2", - "mocha": "~1.21.4" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "README.md", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - }, - "gitHead": "f3c915f0c9d9f5ec79713dba24c8c6181b73305d", - "bugs": { - "url": "https://github.com/jshttp/content-disposition/issues" - }, - "homepage": "https://github.com/jshttp/content-disposition", - "_id": "content-disposition@0.5.0", - "_shasum": "4284fe6ae0630874639e44e80a418c2934135e9e", - "_from": "content-disposition@0.5.0", - "_npmVersion": "1.4.21", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - } - ], - "dist": { - "shasum": "4284fe6ae0630874639e44e80a418c2934135e9e", - "tarball": "http://registry.npmjs.org/content-disposition/-/content-disposition-0.5.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/cookie-signature/.npmignore b/s4t-server-node/node_modules/express/node_modules/cookie-signature/.npmignore deleted file mode 100644 index f1250e5..0000000 --- a/s4t-server-node/node_modules/express/node_modules/cookie-signature/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/s4t-server-node/node_modules/express/node_modules/cookie-signature/History.md b/s4t-server-node/node_modules/express/node_modules/cookie-signature/History.md deleted file mode 100644 index 2bbc4b3..0000000 --- a/s4t-server-node/node_modules/express/node_modules/cookie-signature/History.md +++ /dev/null @@ -1,27 +0,0 @@ -1.0.4 / 2014-06-25 -================== - - * corrected avoidance of timing attacks (thanks @tenbits!) - - -1.0.3 / 2014-01-28 -================== - - * [incorrect] fix for timing attacks - -1.0.2 / 2014-01-28 -================== - - * fix missing repository warning - * fix typo in test - -1.0.1 / 2013-04-15 -================== - - * Revert "Changed underlying HMAC algo. to sha512." - * Revert "Fix for timing attacks on MAC verification." - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/s4t-server-node/node_modules/express/node_modules/cookie-signature/Makefile b/s4t-server-node/node_modules/express/node_modules/cookie-signature/Makefile deleted file mode 100644 index 4e9c8d3..0000000 --- a/s4t-server-node/node_modules/express/node_modules/cookie-signature/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --require should \ - --reporter spec - -.PHONY: test \ No newline at end of file diff --git a/s4t-server-node/node_modules/express/node_modules/cookie-signature/Readme.md b/s4t-server-node/node_modules/express/node_modules/cookie-signature/Readme.md deleted file mode 100644 index 2559e84..0000000 --- a/s4t-server-node/node_modules/express/node_modules/cookie-signature/Readme.md +++ /dev/null @@ -1,42 +0,0 @@ - -# cookie-signature - - Sign and unsign cookies. - -## Example - -```js -var cookie = require('cookie-signature'); - -var val = cookie.sign('hello', 'tobiiscool'); -val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI'); - -var val = cookie.sign('hello', 'tobiiscool'); -cookie.unsign(val, 'tobiiscool').should.equal('hello'); -cookie.unsign(val, 'luna').should.be.false; -``` - -## License - -(The MIT License) - -Copyright (c) 2012 LearnBoost <tj@learnboost.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. \ No newline at end of file diff --git a/s4t-server-node/node_modules/express/node_modules/cookie-signature/index.js b/s4t-server-node/node_modules/express/node_modules/cookie-signature/index.js deleted file mode 100644 index b63bf84..0000000 --- a/s4t-server-node/node_modules/express/node_modules/cookie-signature/index.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Module dependencies. - */ - -var crypto = require('crypto'); - -/** - * Sign the given `val` with `secret`. - * - * @param {String} val - * @param {String} secret - * @return {String} - * @api private - */ - -exports.sign = function(val, secret){ - if ('string' != typeof val) throw new TypeError('cookie required'); - if ('string' != typeof secret) throw new TypeError('secret required'); - return val + '.' + crypto - .createHmac('sha256', secret) - .update(val) - .digest('base64') - .replace(/\=+$/, ''); -}; - -/** - * Unsign and decode the given `val` with `secret`, - * returning `false` if the signature is invalid. - * - * @param {String} val - * @param {String} secret - * @return {String|Boolean} - * @api private - */ - -exports.unsign = function(val, secret){ - if ('string' != typeof val) throw new TypeError('cookie required'); - if ('string' != typeof secret) throw new TypeError('secret required'); - var str = val.slice(0, val.lastIndexOf('.')) - , mac = exports.sign(str, secret); - - return sha1(mac) == sha1(val) ? str : false; -}; - -/** - * Private - */ - -function sha1(str){ - return crypto.createHash('sha1').update(str).digest('hex'); -} diff --git a/s4t-server-node/node_modules/express/node_modules/cookie-signature/package.json b/s4t-server-node/node_modules/express/node_modules/cookie-signature/package.json deleted file mode 100644 index 741961f..0000000 --- a/s4t-server-node/node_modules/express/node_modules/cookie-signature/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "cookie-signature", - "version": "1.0.5", - "description": "Sign and unsign cookies", - "keywords": [ - "cookie", - "sign", - "unsign" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@learnboost.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/visionmedia/node-cookie-signature.git" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "main": "index", - "gitHead": "73ed69b511b3ef47555d71b4ed1deea9e5ed6e1f", - "bugs": { - "url": "https://github.com/visionmedia/node-cookie-signature/issues" - }, - "homepage": "https://github.com/visionmedia/node-cookie-signature", - "_id": "cookie-signature@1.0.5", - "scripts": {}, - "_shasum": "a122e3f1503eca0f5355795b0711bb2368d450f9", - "_from": "cookie-signature@1.0.5", - "_npmVersion": "1.4.20", - "_npmUser": { - "name": "natevw", - "email": "natevw@yahoo.com" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "natevw", - "email": "natevw@yahoo.com" - } - ], - "dist": { - "shasum": "a122e3f1503eca0f5355795b0711bb2368d450f9", - "tarball": "http://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.5.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.5.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/cookie/.npmignore b/s4t-server-node/node_modules/express/node_modules/cookie/.npmignore deleted file mode 100644 index efab07f..0000000 --- a/s4t-server-node/node_modules/express/node_modules/cookie/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -test -.travis.yml diff --git a/s4t-server-node/node_modules/express/node_modules/cookie/LICENSE b/s4t-server-node/node_modules/express/node_modules/cookie/LICENSE deleted file mode 100644 index 249d9de..0000000 --- a/s4t-server-node/node_modules/express/node_modules/cookie/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -// MIT License - -Copyright (C) Roman Shtylman - -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/s4t-server-node/node_modules/express/node_modules/cookie/README.md b/s4t-server-node/node_modules/express/node_modules/cookie/README.md deleted file mode 100644 index 3170b4b..0000000 --- a/s4t-server-node/node_modules/express/node_modules/cookie/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# cookie [![Build Status](https://secure.travis-ci.org/defunctzombie/node-cookie.png?branch=master)](http://travis-ci.org/defunctzombie/node-cookie) # - -cookie is a basic cookie parser and serializer. It doesn't make assumptions about how you are going to deal with your cookies. It basically just provides a way to read and write the HTTP cookie headers. - -See [RFC6265](http://tools.ietf.org/html/rfc6265) for details about the http header for cookies. - -## how? - -``` -npm install cookie -``` - -```javascript -var cookie = require('cookie'); - -var hdr = cookie.serialize('foo', 'bar'); -// hdr = 'foo=bar'; - -var cookies = cookie.parse('foo=bar; cat=meow; dog=ruff'); -// cookies = { foo: 'bar', cat: 'meow', dog: 'ruff' }; -``` - -## more - -The serialize function takes a third parameter, an object, to set cookie options. See the RFC for valid values. - -### path -> cookie path - -### expires -> absolute expiration date for the cookie (Date object) - -### maxAge -> relative max age of the cookie from when the client receives it (seconds) - -### domain -> domain for the cookie - -### secure -> true or false - -### httpOnly -> true or false - diff --git a/s4t-server-node/node_modules/express/node_modules/cookie/index.js b/s4t-server-node/node_modules/express/node_modules/cookie/index.js deleted file mode 100644 index 00d54a7..0000000 --- a/s4t-server-node/node_modules/express/node_modules/cookie/index.js +++ /dev/null @@ -1,75 +0,0 @@ - -/// Serialize the a name value pair into a cookie string suitable for -/// http headers. An optional options object specified cookie parameters -/// -/// serialize('foo', 'bar', { httpOnly: true }) -/// => "foo=bar; httpOnly" -/// -/// @param {String} name -/// @param {String} val -/// @param {Object} options -/// @return {String} -var serialize = function(name, val, opt){ - opt = opt || {}; - var enc = opt.encode || encode; - var pairs = [name + '=' + enc(val)]; - - if (null != opt.maxAge) { - var maxAge = opt.maxAge - 0; - if (isNaN(maxAge)) throw new Error('maxAge should be a Number'); - pairs.push('Max-Age=' + maxAge); - } - - if (opt.domain) pairs.push('Domain=' + opt.domain); - if (opt.path) pairs.push('Path=' + opt.path); - if (opt.expires) pairs.push('Expires=' + opt.expires.toUTCString()); - if (opt.httpOnly) pairs.push('HttpOnly'); - if (opt.secure) pairs.push('Secure'); - - return pairs.join('; '); -}; - -/// Parse the given cookie header string into an object -/// The object has the various cookies as keys(names) => values -/// @param {String} str -/// @return {Object} -var parse = function(str, opt) { - opt = opt || {}; - var obj = {} - var pairs = str.split(/; */); - var dec = opt.decode || decode; - - pairs.forEach(function(pair) { - var eq_idx = pair.indexOf('=') - - // skip things that don't look like key=value - if (eq_idx < 0) { - return; - } - - var key = pair.substr(0, eq_idx).trim() - var val = pair.substr(++eq_idx, pair.length).trim(); - - // quoted values - if ('"' == val[0]) { - val = val.slice(1, -1); - } - - // only assign once - if (undefined == obj[key]) { - try { - obj[key] = dec(val); - } catch (e) { - obj[key] = val; - } - } - }); - - return obj; -}; - -var encode = encodeURIComponent; -var decode = decodeURIComponent; - -module.exports.serialize = serialize; -module.exports.parse = parse; diff --git a/s4t-server-node/node_modules/express/node_modules/cookie/package.json b/s4t-server-node/node_modules/express/node_modules/cookie/package.json deleted file mode 100644 index 7dbb395..0000000 --- a/s4t-server-node/node_modules/express/node_modules/cookie/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "author": { - "name": "Roman Shtylman", - "email": "shtylman@gmail.com" - }, - "name": "cookie", - "description": "cookie parsing and serialization", - "version": "0.1.2", - "repository": { - "type": "git", - "url": "git://github.com/shtylman/node-cookie.git" - }, - "keywords": [ - "cookie", - "cookies" - ], - "main": "index.js", - "scripts": { - "test": "mocha" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "1.x.x" - }, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "bugs": { - "url": "https://github.com/shtylman/node-cookie/issues" - }, - "homepage": "https://github.com/shtylman/node-cookie", - "_id": "cookie@0.1.2", - "dist": { - "shasum": "72fec3d24e48a3432073d90c12642005061004b1", - "tarball": "http://registry.npmjs.org/cookie/-/cookie-0.1.2.tgz" - }, - "_from": "cookie@0.1.2", - "_npmVersion": "1.4.6", - "_npmUser": { - "name": "shtylman", - "email": "shtylman@gmail.com" - }, - "maintainers": [ - { - "name": "shtylman", - "email": "shtylman@gmail.com" - } - ], - "directories": {}, - "_shasum": "72fec3d24e48a3432073d90c12642005061004b1", - "_resolved": "https://registry.npmjs.org/cookie/-/cookie-0.1.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/debug/.jshintrc b/s4t-server-node/node_modules/express/node_modules/debug/.jshintrc deleted file mode 100644 index 299877f..0000000 --- a/s4t-server-node/node_modules/express/node_modules/debug/.jshintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "laxbreak": true -} diff --git a/s4t-server-node/node_modules/express/node_modules/debug/.npmignore b/s4t-server-node/node_modules/express/node_modules/debug/.npmignore deleted file mode 100644 index 7e6163d..0000000 --- a/s4t-server-node/node_modules/express/node_modules/debug/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -support -test -examples -example -*.sock -dist diff --git a/s4t-server-node/node_modules/express/node_modules/debug/History.md b/s4t-server-node/node_modules/express/node_modules/debug/History.md deleted file mode 100644 index 2c40404..0000000 --- a/s4t-server-node/node_modules/express/node_modules/debug/History.md +++ /dev/null @@ -1,166 +0,0 @@ - -2.1.1 / 2014-12-29 -================== - - * browser: use `typeof` to check for `console` existence - * browser: check for `console.log` truthiness (fix IE 8/9) - * browser: add support for Chrome apps - * Readme: added Windows usage remarks - * Add `bower.json` to properly support bower install - -2.1.0 / 2014-10-15 -================== - - * node: implement `DEBUG_FD` env variable support - * package: update "browserify" to v6.1.0 - * package: add "license" field to package.json (#135, @panuhorsmalahti) - -2.0.0 / 2014-09-01 -================== - - * package: update "browserify" to v5.11.0 - * node: use stderr rather than stdout for logging (#29, @stephenmathieson) - -1.0.4 / 2014-07-15 -================== - - * dist: recompile - * example: remove `console.info()` log usage - * example: add "Content-Type" UTF-8 header to browser example - * browser: place %c marker after the space character - * browser: reset the "content" color via `color: inherit` - * browser: add colors support for Firefox >= v31 - * debug: prefer an instance `log()` function over the global one (#119) - * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) - -1.0.3 / 2014-07-09 -================== - - * Add support for multiple wildcards in namespaces (#122, @seegno) - * browser: fix lint - -1.0.2 / 2014-06-10 -================== - - * browser: update color palette (#113, @gscottolson) - * common: make console logging function configurable (#108, @timoxley) - * node: fix %o colors on old node <= 0.8.x - * Makefile: find node path using shell/which (#109, @timoxley) - -1.0.1 / 2014-06-06 -================== - - * browser: use `removeItem()` to clear localStorage - * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) - * package: add "contributors" section - * node: fix comment typo - * README: list authors - -1.0.0 / 2014-06-04 -================== - - * make ms diff be global, not be scope - * debug: ignore empty strings in enable() - * node: make DEBUG_COLORS able to disable coloring - * *: export the `colors` array - * npmignore: don't publish the `dist` dir - * Makefile: refactor to use browserify - * package: add "browserify" as a dev dependency - * Readme: add Web Inspector Colors section - * node: reset terminal color for the debug content - * node: map "%o" to `util.inspect()` - * browser: map "%j" to `JSON.stringify()` - * debug: add custom "formatters" - * debug: use "ms" module for humanizing the diff - * Readme: add "bash" syntax highlighting - * browser: add Firebug color support - * browser: add colors for WebKit browsers - * node: apply log to `console` - * rewrite: abstract common logic for Node & browsers - * add .jshintrc file - -0.8.1 / 2014-04-14 -================== - - * package: re-add the "component" section - -0.8.0 / 2014-03-30 -================== - - * add `enable()` method for nodejs. Closes #27 - * change from stderr to stdout - * remove unnecessary index.js file - -0.7.4 / 2013-11-13 -================== - - * remove "browserify" key from package.json (fixes something in browserify) - -0.7.3 / 2013-10-30 -================== - - * fix: catch localStorage security error when cookies are blocked (Chrome) - * add debug(err) support. Closes #46 - * add .browser prop to package.json. Closes #42 - -0.7.2 / 2013-02-06 -================== - - * fix package.json - * fix: Mobile Safari (private mode) is broken with debug - * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript - -0.7.1 / 2013-02-05 -================== - - * add repository URL to package.json - * add DEBUG_COLORED to force colored output - * add browserify support - * fix component. Closes #24 - -0.7.0 / 2012-05-04 -================== - - * Added .component to package.json - * Added debug.component.js build - -0.6.0 / 2012-03-16 -================== - - * Added support for "-" prefix in DEBUG [Vinay Pulim] - * Added `.enabled` flag to the node version [TooTallNate] - -0.5.0 / 2012-02-02 -================== - - * Added: humanize diffs. Closes #8 - * Added `debug.disable()` to the CS variant - * Removed padding. Closes #10 - * Fixed: persist client-side variant again. Closes #9 - -0.4.0 / 2012-02-01 -================== - - * Added browser variant support for older browsers [TooTallNate] - * Added `debug.enable('project:*')` to browser variant [TooTallNate] - * Added padding to diff (moved it to the right) - -0.3.0 / 2012-01-26 -================== - - * Added millisecond diff when isatty, otherwise UTC string - -0.2.0 / 2012-01-22 -================== - - * Added wildcard support - -0.1.0 / 2011-12-02 -================== - - * Added: remove colors unless stderr isatty [TooTallNate] - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/s4t-server-node/node_modules/express/node_modules/debug/Makefile b/s4t-server-node/node_modules/express/node_modules/debug/Makefile deleted file mode 100644 index b0bde6e..0000000 --- a/s4t-server-node/node_modules/express/node_modules/debug/Makefile +++ /dev/null @@ -1,33 +0,0 @@ - -# get Makefile directory name: http://stackoverflow.com/a/5982798/376773 -THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) -THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) - -# BIN directory -BIN := $(THIS_DIR)/node_modules/.bin - -# applications -NODE ?= $(shell which node) -NPM ?= $(NODE) $(shell which npm) -BROWSERIFY ?= $(NODE) $(BIN)/browserify - -all: dist/debug.js - -install: node_modules - -clean: - @rm -rf node_modules dist - -dist: - @mkdir -p $@ - -dist/debug.js: node_modules browser.js debug.js dist - @$(BROWSERIFY) \ - --standalone debug \ - . > $@ - -node_modules: package.json - @NODE_ENV= $(NPM) install - @touch node_modules - -.PHONY: all install clean diff --git a/s4t-server-node/node_modules/express/node_modules/debug/Readme.md b/s4t-server-node/node_modules/express/node_modules/debug/Readme.md deleted file mode 100644 index e6a02d9..0000000 --- a/s4t-server-node/node_modules/express/node_modules/debug/Readme.md +++ /dev/null @@ -1,166 +0,0 @@ -# debug - - tiny node.js debugging utility modelled after node core's debugging technique. - -## Installation - -```bash -$ npm install debug -``` - -## Usage - - With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility. - -Example _app.js_: - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %s', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example _worker.js_: - -```js -var debug = require('debug')('worker'); - -setInterval(function(){ - debug('doing some work'); -}, 1000); -``` - - The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: - - ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) - - ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) - -#### Windows note - - On Windows the environment variable is set using the `set` command. - - ```cmd - set DEBUG=*,-not_this - ``` - -Then, run the program to be debugged as ususal. - -## Millisecond diff - - When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) - - When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: - - ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) - -## Conventions - - If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". - -## Wildcards - - The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect.compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - - You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:". - -## Browser support - - Debug works in the browser as well, currently persisted by `localStorage`. For example if you have `worker:a` and `worker:b` as shown below, and wish to debug both type `debug.enable('worker:*')` in the console and refresh the page, this will remain until you disable with `debug.disable()`. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - b('doing some work'); -}, 1200); -``` - -#### Web Inspector Colors - - Colors are also enabled on "Web Inspectors" that understand the `%c` formatting - option. These are WebKit web inspectors, Firefox ([since version - 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) - and the Firebug plugin for Firefox (any version). - - Colored output looks something like: - - ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png) - -### stderr vs stdout - -You can set an alternative logging method per-namespace by overriding the `log` method on a per-namespace or globally: - -Example _stderr.js_: - -```js -var debug = require('../'); -var log = debug('app:log'); - -// by default console.log is used -log('goes to stdout!'); - -var error = debug('app:error'); -// set this namespace to log via console.error -error.log = console.error.bind(console); // don't forget to bind to console! -error('goes to stderr'); -log('still goes to stdout!'); - -// set all output to go via console.warn -// overrides all per-namespace log settings -debug.log = console.warn.bind(console); -log('now goes to stderr via console.warn'); -error('still goes to stderr, but via console.warn now'); -``` - -## Authors - - - TJ Holowaychuk - - Nathan Rajlich - -## License - -(The MIT License) - -Copyright (c) 2014 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. diff --git a/s4t-server-node/node_modules/express/node_modules/debug/bower.json b/s4t-server-node/node_modules/express/node_modules/debug/bower.json deleted file mode 100644 index c4fabd4..0000000 --- a/s4t-server-node/node_modules/express/node_modules/debug/bower.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "visionmedia/debug", - "main": "dist/debug.js", - "version": "2.1.1", - "homepage": "https://github.com/visionmedia/debug", - "authors": [ - "TJ Holowaychuk " - ], - "description": "visionmedia/debug", - "moduleType": [ - "amd", - "es6", - "globals", - "node" - ], - "keywords": [ - "visionmedia", - "debug" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ] -} diff --git a/s4t-server-node/node_modules/express/node_modules/debug/browser.js b/s4t-server-node/node_modules/express/node_modules/debug/browser.js deleted file mode 100644 index 52c3d32..0000000 --- a/s4t-server-node/node_modules/express/node_modules/debug/browser.js +++ /dev/null @@ -1,158 +0,0 @@ - -/** - * This is the web browser implementation of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = require('./debug'); -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; - -/** - * Use chrome.storage.local if we are in an app - */ - -var storage; - -if (typeof chrome !== 'undefined' && typeof chrome.storage !== 'undefined') - storage = chrome.storage.local; -else - storage = window.localStorage; - -/** - * Colors. - */ - -exports.colors = [ - 'lightseagreen', - 'forestgreen', - 'goldenrod', - 'dodgerblue', - 'darkorchid', - 'crimson' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -function useColors() { - // is webkit? http://stackoverflow.com/a/16459606/376773 - return ('WebkitAppearance' in document.documentElement.style) || - // is firebug? http://stackoverflow.com/a/398120/376773 - (window.console && (console.firebug || (console.exception && console.table))) || - // is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31); -} - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -exports.formatters.j = function(v) { - return JSON.stringify(v); -}; - - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs() { - var args = arguments; - var useColors = this.useColors; - - args[0] = (useColors ? '%c' : '') - + this.namespace - + (useColors ? ' %c' : ' ') - + args[0] - + (useColors ? '%c ' : ' ') - + '+' + exports.humanize(this.diff); - - if (!useColors) return args; - - var c = 'color: ' + this.color; - args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1)); - - // the final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - var index = 0; - var lastC = 0; - args[0].replace(/%[a-z%]/g, function(match) { - if ('%%' === match) return; - index++; - if ('%c' === match) { - // we only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); - return args; -} - -/** - * Invokes `console.log()` when available. - * No-op when `console.log` is not a "function". - * - * @api public - */ - -function log() { - // this hackery is required for IE8/9, where - // the `console.log` function doesn't have 'apply' - return 'object' === typeof console - && console.log - && Function.prototype.apply.call(console.log, console, arguments); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - -function save(namespaces) { - try { - if (null == namespaces) { - storage.removeItem('debug'); - } else { - storage.debug = namespaces; - } - } catch(e) {} -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - var r; - try { - r = storage.debug; - } catch(e) {} - return r; -} - -/** - * Enable namespaces listed in `localStorage.debug` initially. - */ - -exports.enable(load()); diff --git a/s4t-server-node/node_modules/express/node_modules/debug/component.json b/s4t-server-node/node_modules/express/node_modules/debug/component.json deleted file mode 100644 index 71e1abb..0000000 --- a/s4t-server-node/node_modules/express/node_modules/debug/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "debug", - "repo": "visionmedia/debug", - "description": "small debugging utility", - "version": "2.1.1", - "keywords": [ - "debug", - "log", - "debugger" - ], - "main": "browser.js", - "scripts": [ - "browser.js", - "debug.js" - ], - "dependencies": { - "guille/ms.js": "0.6.1" - } -} diff --git a/s4t-server-node/node_modules/express/node_modules/debug/debug.js b/s4t-server-node/node_modules/express/node_modules/debug/debug.js deleted file mode 100644 index 7571a86..0000000 --- a/s4t-server-node/node_modules/express/node_modules/debug/debug.js +++ /dev/null @@ -1,197 +0,0 @@ - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = debug; -exports.coerce = coerce; -exports.disable = disable; -exports.enable = enable; -exports.enabled = enabled; -exports.humanize = require('ms'); - -/** - * The currently active debug mode names, and names to skip. - */ - -exports.names = []; -exports.skips = []; - -/** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lowercased letter, i.e. "n". - */ - -exports.formatters = {}; - -/** - * Previously assigned color. - */ - -var prevColor = 0; - -/** - * Previous log timestamp. - */ - -var prevTime; - -/** - * Select a color. - * - * @return {Number} - * @api private - */ - -function selectColor() { - return exports.colors[prevColor++ % exports.colors.length]; -} - -/** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - -function debug(namespace) { - - // define the `disabled` version - function disabled() { - } - disabled.enabled = false; - - // define the `enabled` version - function enabled() { - - var self = enabled; - - // set `diff` timestamp - var curr = +new Date(); - var ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - // add the `color` if not set - if (null == self.useColors) self.useColors = exports.useColors(); - if (null == self.color && self.useColors) self.color = selectColor(); - - var args = Array.prototype.slice.call(arguments); - - args[0] = exports.coerce(args[0]); - - if ('string' !== typeof args[0]) { - // anything else let's inspect with %o - args = ['%o'].concat(args); - } - - // apply any `formatters` transformations - var index = 0; - args[0] = args[0].replace(/%([a-z%])/g, function(match, format) { - // if we encounter an escaped % then don't increase the array index - if (match === '%%') return match; - index++; - var formatter = exports.formatters[format]; - if ('function' === typeof formatter) { - var val = args[index]; - match = formatter.call(self, val); - - // now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - if ('function' === typeof exports.formatArgs) { - args = exports.formatArgs.apply(self, args); - } - var logFn = enabled.log || exports.log || console.log.bind(console); - logFn.apply(self, args); - } - enabled.enabled = true; - - var fn = exports.enabled(namespace) ? enabled : disabled; - - fn.namespace = namespace; - - return fn; -} - -/** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - -function enable(namespaces) { - exports.save(namespaces); - - var split = (namespaces || '').split(/[\s,]+/); - var len = split.length; - - for (var i = 0; i < len; i++) { - if (!split[i]) continue; // ignore empty strings - namespaces = split[i].replace(/\*/g, '.*?'); - if (namespaces[0] === '-') { - exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - exports.names.push(new RegExp('^' + namespaces + '$')); - } - } -} - -/** - * Disable debug output. - * - * @api public - */ - -function disable() { - exports.enable(''); -} - -/** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - -function enabled(name) { - var i, len; - for (i = 0, len = exports.skips.length; i < len; i++) { - if (exports.skips[i].test(name)) { - return false; - } - } - for (i = 0, len = exports.names.length; i < len; i++) { - if (exports.names[i].test(name)) { - return true; - } - } - return false; -} - -/** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - -function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; -} diff --git a/s4t-server-node/node_modules/express/node_modules/debug/node.js b/s4t-server-node/node_modules/express/node_modules/debug/node.js deleted file mode 100644 index 5dc999f..0000000 --- a/s4t-server-node/node_modules/express/node_modules/debug/node.js +++ /dev/null @@ -1,209 +0,0 @@ - -/** - * Module dependencies. - */ - -var tty = require('tty'); -var util = require('util'); - -/** - * This is the Node.js implementation of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = require('./debug'); -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -/** - * The file descriptor to write the `debug()` calls to. - * Set the `DEBUG_FD` env variable to override with another value. i.e.: - * - * $ DEBUG_FD=3 node script.js 3>debug.log - */ - -var fd = parseInt(process.env.DEBUG_FD, 10) || 2; -var stream = 1 === fd ? process.stdout : - 2 === fd ? process.stderr : - createWritableStdioStream(fd); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - var debugColors = (process.env.DEBUG_COLORS || '').trim().toLowerCase(); - if (0 === debugColors.length) { - return tty.isatty(fd); - } else { - return '0' !== debugColors - && 'no' !== debugColors - && 'false' !== debugColors - && 'disabled' !== debugColors; - } -} - -/** - * Map %o to `util.inspect()`, since Node doesn't do that out of the box. - */ - -var inspect = (4 === util.inspect.length ? - // node <= 0.8.x - function (v, colors) { - return util.inspect(v, void 0, void 0, colors); - } : - // node > 0.8.x - function (v, colors) { - return util.inspect(v, { colors: colors }); - } -); - -exports.formatters.o = function(v) { - return inspect(v, this.useColors) - .replace(/\s*\n\s*/g, ' '); -}; - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs() { - var args = arguments; - var useColors = this.useColors; - var name = this.namespace; - - if (useColors) { - var c = this.color; - - args[0] = ' \u001b[9' + c + 'm' + name + ' ' - + '\u001b[0m' - + args[0] + '\u001b[3' + c + 'm' - + ' +' + exports.humanize(this.diff) + '\u001b[0m'; - } else { - args[0] = new Date().toUTCString() - + ' ' + name + ' ' + args[0]; - } - return args; -} - -/** - * Invokes `console.error()` with the specified arguments. - */ - -function log() { - return stream.write(util.format.apply(this, arguments) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - -function save(namespaces) { - if (null == namespaces) { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } else { - process.env.DEBUG = namespaces; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Copied from `node/src/node.js`. - * - * XXX: It's lame that node doesn't expose this API out-of-the-box. It also - * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. - */ - -function createWritableStdioStream (fd) { - var stream; - var tty_wrap = process.binding('tty_wrap'); - - // Note stream._type is used for test-module-load-list.js - - switch (tty_wrap.guessHandleType(fd)) { - case 'TTY': - stream = new tty.WriteStream(fd); - stream._type = 'tty'; - - // Hack to have stream not keep the event loop alive. - // See https://github.com/joyent/node/issues/1726 - if (stream._handle && stream._handle.unref) { - stream._handle.unref(); - } - break; - - case 'FILE': - var fs = require('fs'); - stream = new fs.SyncWriteStream(fd, { autoClose: false }); - stream._type = 'fs'; - break; - - case 'PIPE': - case 'TCP': - var net = require('net'); - stream = new net.Socket({ - fd: fd, - readable: false, - writable: true - }); - - // FIXME Should probably have an option in net.Socket to create a - // stream from an existing fd which is writable only. But for now - // we'll just add this hack and set the `readable` member to false. - // Test: ./node test/fixtures/echo.js < /etc/passwd - stream.readable = false; - stream.read = null; - stream._type = 'pipe'; - - // FIXME Hack to have stream not keep the event loop alive. - // See https://github.com/joyent/node/issues/1726 - if (stream._handle && stream._handle.unref) { - stream._handle.unref(); - } - break; - - default: - // Probably an error on in uv_guess_handle() - throw new Error('Implement me. Unknown stream file type!'); - } - - // For supporting legacy API we put the FD here. - stream.fd = fd; - - stream._isStdio = true; - - return stream; -} - -/** - * Enable namespaces listed in `process.env.DEBUG` initially. - */ - -exports.enable(load()); diff --git a/s4t-server-node/node_modules/express/node_modules/debug/node_modules/ms/.npmignore b/s4t-server-node/node_modules/express/node_modules/debug/node_modules/ms/.npmignore deleted file mode 100644 index d1aa0ce..0000000 --- a/s4t-server-node/node_modules/express/node_modules/debug/node_modules/ms/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules -test -History.md -Makefile -component.json diff --git a/s4t-server-node/node_modules/express/node_modules/debug/node_modules/ms/README.md b/s4t-server-node/node_modules/express/node_modules/debug/node_modules/ms/README.md deleted file mode 100644 index d4ab12a..0000000 --- a/s4t-server-node/node_modules/express/node_modules/debug/node_modules/ms/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# ms.js: miliseconds conversion utility - -```js -ms('1d') // 86400000 -ms('10h') // 36000000 -ms('2h') // 7200000 -ms('1m') // 60000 -ms('5s') // 5000 -ms('100') // 100 -``` - -```js -ms(60000) // "1m" -ms(2 * 60000) // "2m" -ms(ms('10 hours')) // "10h" -``` - -```js -ms(60000, { long: true }) // "1 minute" -ms(2 * 60000, { long: true }) // "2 minutes" -ms(ms('10 hours', { long: true })) // "10 hours" -``` - -- Node/Browser compatible. Published as `ms` in NPM. -- If a number is supplied to `ms`, a string with a unit is returned. -- If a string that contains the number is supplied, it returns it as -a number (e.g: it returns `100` for `'100'`). -- If you pass a string with a number and a valid unit, the number of -equivalent ms is returned. - -## License - -MIT \ No newline at end of file diff --git a/s4t-server-node/node_modules/express/node_modules/debug/node_modules/ms/index.js b/s4t-server-node/node_modules/express/node_modules/debug/node_modules/ms/index.js deleted file mode 100644 index c5847f8..0000000 --- a/s4t-server-node/node_modules/express/node_modules/debug/node_modules/ms/index.js +++ /dev/null @@ -1,111 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} options - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options){ - options = options || {}; - if ('string' == typeof val) return parse(val); - return options.long - ? long(val) - : short(val); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - var match = /^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(str); - if (!match) return; - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'y': - return n * y; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 's': - return n * s; - case 'ms': - return n; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function short(ms) { - if (ms >= d) return Math.round(ms / d) + 'd'; - if (ms >= h) return Math.round(ms / h) + 'h'; - if (ms >= m) return Math.round(ms / m) + 'm'; - if (ms >= s) return Math.round(ms / s) + 's'; - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function long(ms) { - return plural(ms, d, 'day') - || plural(ms, h, 'hour') - || plural(ms, m, 'minute') - || plural(ms, s, 'second') - || ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, n, name) { - if (ms < n) return; - if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name; - return Math.ceil(ms / n) + ' ' + name + 's'; -} diff --git a/s4t-server-node/node_modules/express/node_modules/debug/node_modules/ms/package.json b/s4t-server-node/node_modules/express/node_modules/debug/node_modules/ms/package.json deleted file mode 100644 index 0839b59..0000000 --- a/s4t-server-node/node_modules/express/node_modules/debug/node_modules/ms/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "ms", - "version": "0.6.2", - "description": "Tiny ms conversion utility", - "repository": { - "type": "git", - "url": "git://github.com/guille/ms.js.git" - }, - "main": "./index", - "devDependencies": { - "mocha": "*", - "expect.js": "*", - "serve": "*" - }, - "component": { - "scripts": { - "ms/index.js": "index.js" - } - }, - "bugs": { - "url": "https://github.com/guille/ms.js/issues" - }, - "_id": "ms@0.6.2", - "dist": { - "shasum": "d89c2124c6fdc1353d65a8b77bf1aac4b193708c", - "tarball": "http://registry.npmjs.org/ms/-/ms-0.6.2.tgz" - }, - "_from": "ms@0.6.2", - "_npmVersion": "1.2.30", - "_npmUser": { - "name": "rauchg", - "email": "rauchg@gmail.com" - }, - "maintainers": [ - { - "name": "rauchg", - "email": "rauchg@gmail.com" - } - ], - "directories": {}, - "_shasum": "d89c2124c6fdc1353d65a8b77bf1aac4b193708c", - "_resolved": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz", - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/guille/ms.js" -} diff --git a/s4t-server-node/node_modules/express/node_modules/debug/package.json b/s4t-server-node/node_modules/express/node_modules/debug/package.json deleted file mode 100644 index 4673a5c..0000000 --- a/s4t-server-node/node_modules/express/node_modules/debug/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "debug", - "version": "2.1.1", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" - }, - "description": "small debugging utility", - "keywords": [ - "debug", - "log", - "debugger" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "contributors": [ - { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io" - } - ], - "license": "MIT", - "dependencies": { - "ms": "0.6.2" - }, - "devDependencies": { - "browserify": "6.1.0", - "mocha": "*" - }, - "main": "./node.js", - "browser": "./browser.js", - "component": { - "scripts": { - "debug/index.js": "browser.js", - "debug/debug.js": "debug.js" - } - }, - "gitHead": "24cc5c04fc8886fa9afcadea4db439f9a6186ca4", - "bugs": { - "url": "https://github.com/visionmedia/debug/issues" - }, - "homepage": "https://github.com/visionmedia/debug", - "_id": "debug@2.1.1", - "scripts": {}, - "_shasum": "e0c548cc607adc22b537540dc3639c4236fdf90c", - "_from": "debug@>=2.1.1 <2.2.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - } - ], - "dist": { - "shasum": "e0c548cc607adc22b537540dc3639c4236fdf90c", - "tarball": "http://registry.npmjs.org/debug/-/debug-2.1.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/debug/-/debug-2.1.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/depd/History.md b/s4t-server-node/node_modules/express/node_modules/depd/History.md deleted file mode 100644 index bdbcf58..0000000 --- a/s4t-server-node/node_modules/express/node_modules/depd/History.md +++ /dev/null @@ -1,67 +0,0 @@ -1.0.0 / 2014-09-17 -================== - - * No changes - -0.4.5 / 2014-09-09 -================== - - * Improve call speed to functions using the function wrapper - * Support Node.js 0.6 - -0.4.4 / 2014-07-27 -================== - - * Work-around v8 generating empty stack traces - -0.4.3 / 2014-07-26 -================== - - * Fix exception when global `Error.stackTraceLimit` is too low - -0.4.2 / 2014-07-19 -================== - - * Correct call site for wrapped functions and properties - -0.4.1 / 2014-07-19 -================== - - * Improve automatic message generation for function properties - -0.4.0 / 2014-07-19 -================== - - * Add `TRACE_DEPRECATION` environment variable - * Remove non-standard grey color from color output - * Support `--no-deprecation` argument - * Support `--trace-deprecation` argument - * Support `deprecate.property(fn, prop, message)` - -0.3.0 / 2014-06-16 -================== - - * Add `NO_DEPRECATION` environment variable - -0.2.0 / 2014-06-15 -================== - - * Add `deprecate.property(obj, prop, message)` - * Remove `supports-color` dependency for node.js 0.8 - -0.1.0 / 2014-06-15 -================== - - * Add `deprecate.function(fn, message)` - * Add `process.on('deprecation', fn)` emitter - * Automatically generate message when omitted from `deprecate()` - -0.0.1 / 2014-06-15 -================== - - * Fix warning for dynamic calls at singe call site - -0.0.0 / 2014-06-15 -================== - - * Initial implementation diff --git a/s4t-server-node/node_modules/express/node_modules/depd/LICENSE b/s4t-server-node/node_modules/express/node_modules/depd/LICENSE deleted file mode 100644 index b7dce6c..0000000 --- a/s4t-server-node/node_modules/express/node_modules/depd/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 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/s4t-server-node/node_modules/express/node_modules/depd/Readme.md b/s4t-server-node/node_modules/express/node_modules/depd/Readme.md deleted file mode 100644 index 9fb2737..0000000 --- a/s4t-server-node/node_modules/express/node_modules/depd/Readme.md +++ /dev/null @@ -1,271 +0,0 @@ -# depd - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][travis-image]][travis-url] -[![Coverage Status][coveralls-image]][coveralls-url] -[![Gratipay][gratipay-image]][gratipay-url] - -Deprecate all the things - -> With great modules comes great responsibility; mark things deprecated! - -## Install - -```sh -$ npm install depd -``` - -## API - -```js -var deprecate = require('depd')('my-module') -``` - -This library allows you to display deprecation messages to your users. -This library goes above and beyond with deprecation warnings by -introspection of the call stack (but only the bits that it is interested -in). - -Instead of just warning on the first invocation of a deprecated -function and never again, this module will warn on the first invocation -of a deprecated function per unique call site, making it ideal to alert -users of all deprecated uses across the code base, rather than just -whatever happens to execute first. - -The deprecation warnings from this module also include the file and line -information for the call into the module that the deprecated function was -in. - -**NOTE** this library has a similar interface to the `debug` module, and -this module uses the calling file to get the boundary for the call stacks, -so you should always create a new `deprecate` object in each file and not -within some central file. - -### depd(namespace) - -Create a new deprecate function that uses the given namespace name in the -messages and will display the call site prior to the stack entering the -file this function was called from. It is highly suggested you use the -name of your module as the namespace. - -### deprecate(message) - -Call this function from deprecated code to display a deprecation message. -This message will appear once per unique caller site. Caller site is the -first call site in the stack in a different file from the caller of this -function. - -If the message is omitted, a message is generated for you based on the site -of the `deprecate()` call and will display the name of the function called, -similar to the name displayed in a stack trace. - -### deprecate.function(fn, message) - -Call this function to wrap a given function in a deprecation message on any -call to the function. An optional message can be supplied to provide a custom -message. - -### deprecate.property(obj, prop, message) - -Call this function to wrap a given property on object in a deprecation message -on any accessing or setting of the property. An optional message can be supplied -to provide a custom message. - -The method must be called on the object where the property belongs (not -inherited from the prototype). - -If the property is a data descriptor, it will be converted to an accessor -descriptor in order to display the deprecation message. - -### process.on('deprecation', fn) - -This module will allow easy capturing of deprecation errors by emitting the -errors as the type "deprecation" on the global `process`. If there are no -listeners for this type, the errors are written to STDERR as normal, but if -there are any listeners, nothing will be written to STDERR and instead only -emitted. From there, you can write the errors in a different format or to a -logging source. - -The error represents the deprecation and is emitted only once with the same -rules as writing to STDERR. The error has the following properties: - - - `message` - This is the message given by the library - - `name` - This is always `'DeprecationError'` - - `namespace` - This is the namespace the deprecation came from - - `stack` - This is the stack of the call to the deprecated thing - -Example `error.stack` output: - -``` -DeprecationError: my-cool-module deprecated oldfunction - at Object. ([eval]-wrapper:6:22) - at Module._compile (module.js:456:26) - at evalScript (node.js:532:25) - at startup (node.js:80:7) - at node.js:902:3 -``` - -### process.env.NO_DEPRECATION - -As a user of modules that are deprecated, the environment variable `NO_DEPRECATION` -is provided as a quick solution to silencing deprecation warnings from being -output. The format of this is similar to that of `DEBUG`: - -```sh -$ NO_DEPRECATION=my-module,othermod node app.js -``` - -This will suppress deprecations from being output for "my-module" and "othermod". -The value is a list of comma-separated namespaces. To suppress every warning -across all namespaces, use the value `*` for a namespace. - -Providing the argument `--no-deprecation` to the `node` executable will suppress -all deprecations (only available in Node.js 0.8 or higher). - -**NOTE** This will not suppress the deperecations given to any "deprecation" -event listeners, just the output to STDERR. - -### process.env.TRACE_DEPRECATION - -As a user of modules that are deprecated, the environment variable `TRACE_DEPRECATION` -is provided as a solution to getting more detailed location information in deprecation -warnings by including the entire stack trace. The format of this is the same as -`NO_DEPRECATION`: - -```sh -$ TRACE_DEPRECATION=my-module,othermod node app.js -``` - -This will include stack traces for deprecations being output for "my-module" and -"othermod". The value is a list of comma-separated namespaces. To trace every -warning across all namespaces, use the value `*` for a namespace. - -Providing the argument `--trace-deprecation` to the `node` executable will trace -all deprecations (only available in Node.js 0.8 or higher). - -**NOTE** This will not trace the deperecations silenced by `NO_DEPRECATION`. - -## Display - -![message](files/message.png) - -When a user calls a function in your library that you mark deprecated, they -will see the following written to STDERR (in the given colors, similar colors -and layout to the `debug` module): - -``` -bright cyan bright yellow -| | reset cyan -| | | | -▼ ▼ ▼ ▼ -my-cool-module deprecated oldfunction [eval]-wrapper:6:22 -▲ ▲ ▲ ▲ -| | | | -namespace | | location of mycoolmod.oldfunction() call - | deprecation message - the word "deprecated" -``` - -If the user redirects their STDERR to a file or somewhere that does not support -colors, they see (similar layout to the `debug` module): - -``` -Sun, 15 Jun 2014 05:21:37 GMT my-cool-module deprecated oldfunction at [eval]-wrapper:6:22 -▲ ▲ ▲ ▲ ▲ -| | | | | -timestamp of message namespace | | location of mycoolmod.oldfunction() call - | deprecation message - the word "deprecated" -``` - -## Examples - -### Deprecating all calls to a function - -This will display a deprecated message about "oldfunction" being deprecated -from "my-module" on STDERR. - -```js -var deprecate = require('depd')('my-cool-module') - -// message automatically derived from function name -// Object.oldfunction -exports.oldfunction = deprecate.function(function oldfunction() { - // all calls to function are deprecated -}) - -// specific message -exports.oldfunction = deprecate.function(function () { - // all calls to function are deprecated -}, 'oldfunction') -``` - -### Conditionally deprecating a function call - -This will display a deprecated message about "weirdfunction" being deprecated -from "my-module" on STDERR when called with less than 2 arguments. - -```js -var deprecate = require('depd')('my-cool-module') - -exports.weirdfunction = function () { - if (arguments.length < 2) { - // calls with 0 or 1 args are deprecated - deprecate('weirdfunction args < 2') - } -} -``` - -When calling `deprecate` as a function, the warning is counted per call site -within your own module, so you can display different deprecations depending -on different situations and the users will still get all the warnings: - -```js -var deprecate = require('depd')('my-cool-module') - -exports.weirdfunction = function () { - if (arguments.length < 2) { - // calls with 0 or 1 args are deprecated - deprecate('weirdfunction args < 2') - } else if (typeof arguments[0] !== 'string') { - // calls with non-string first argument are deprecated - deprecate('weirdfunction non-string first arg') - } -} -``` - -### Deprecating property access - -This will display a deprecated message about "oldprop" being deprecated -from "my-module" on STDERR when accessed. A deprecation will be displayed -when setting the value and when getting the value. - -```js -var deprecate = require('depd')('my-cool-module') - -exports.oldprop = 'something' - -// message automatically derives from property name -deprecate.property(exports, 'oldprop') - -// explicit message -deprecate.property(exports, 'oldprop', 'oldprop >= 0.10') -``` - -## License - -[MIT](LICENSE) - -[npm-version-image]: https://img.shields.io/npm/v/depd.svg?style=flat -[npm-downloads-image]: https://img.shields.io/npm/dm/depd.svg?style=flat -[npm-url]: https://npmjs.org/package/depd -[travis-image]: https://img.shields.io/travis/dougwilson/nodejs-depd.svg?style=flat -[travis-url]: https://travis-ci.org/dougwilson/nodejs-depd -[coveralls-image]: https://img.shields.io/coveralls/dougwilson/nodejs-depd.svg?style=flat -[coveralls-url]: https://coveralls.io/r/dougwilson/nodejs-depd?branch=master -[node-image]: https://img.shields.io/node/v/depd.svg?style=flat -[node-url]: http://nodejs.org/download/ -[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg?style=flat -[gratipay-url]: https://www.gratipay.com/dougwilson/ diff --git a/s4t-server-node/node_modules/express/node_modules/depd/index.js b/s4t-server-node/node_modules/express/node_modules/depd/index.js deleted file mode 100644 index 4fee4d9..0000000 --- a/s4t-server-node/node_modules/express/node_modules/depd/index.js +++ /dev/null @@ -1,522 +0,0 @@ -/*! - * depd - * Copyright(c) 2014 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var callSiteToString = require('./lib/compat').callSiteToString -var EventEmitter = require('events').EventEmitter -var relative = require('path').relative - -/** - * Module exports. - */ - -module.exports = depd - -/** - * Get the path to base files on. - */ - -var basePath = process.cwd() - -/** - * Get listener count on event emitter. - */ - -/*istanbul ignore next*/ -var eventListenerCount = EventEmitter.listenerCount - || function (emitter, type) { return emitter.listeners(type).length } - -/** - * Determine if namespace is contained in the string. - */ - -function containsNamespace(str, namespace) { - var val = str.split(/[ ,]+/) - - namespace = String(namespace).toLowerCase() - - for (var i = 0 ; i < val.length; i++) { - if (!(str = val[i])) continue; - - // namespace contained - if (str === '*' || str.toLowerCase() === namespace) { - return true - } - } - - return false -} - -/** - * Convert a data descriptor to accessor descriptor. - */ - -function convertDataDescriptorToAccessor(obj, prop, message) { - var descriptor = Object.getOwnPropertyDescriptor(obj, prop) - var value = descriptor.value - - descriptor.get = function getter() { return value } - - if (descriptor.writable) { - descriptor.set = function setter(val) { return value = val } - } - - delete descriptor.value - delete descriptor.writable - - Object.defineProperty(obj, prop, descriptor) - - return descriptor -} - -/** - * Create arguments string to keep arity. - */ - -function createArgumentsString(arity) { - var str = '' - - for (var i = 0; i < arity; i++) { - str += ', arg' + i - } - - return str.substr(2) -} - -/** - * Create stack string from stack. - */ - -function createStackString(stack) { - var str = this.name + ': ' + this.namespace - - if (this.message) { - str += ' deprecated ' + this.message - } - - for (var i = 0; i < stack.length; i++) { - str += '\n at ' + callSiteToString(stack[i]) - } - - return str -} - -/** - * Create deprecate for namespace in caller. - */ - -function depd(namespace) { - if (!namespace) { - throw new TypeError('argument namespace is required') - } - - var stack = getStack() - var site = callSiteLocation(stack[1]) - var file = site[0] - - function deprecate(message) { - // call to self as log - log.call(deprecate, message) - } - - deprecate._file = file - deprecate._ignored = isignored(namespace) - deprecate._namespace = namespace - deprecate._traced = istraced(namespace) - deprecate._warned = Object.create(null) - - deprecate.function = wrapfunction - deprecate.property = wrapproperty - - return deprecate -} - -/** - * Determine if namespace is ignored. - */ - -function isignored(namespace) { - /* istanbul ignore next: tested in a child processs */ - if (process.noDeprecation) { - // --no-deprecation support - return true - } - - var str = process.env.NO_DEPRECATION || '' - - // namespace ignored - return containsNamespace(str, namespace) -} - -/** - * Determine if namespace is traced. - */ - -function istraced(namespace) { - /* istanbul ignore next: tested in a child processs */ - if (process.traceDeprecation) { - // --trace-deprecation support - return true - } - - var str = process.env.TRACE_DEPRECATION || '' - - // namespace traced - return containsNamespace(str, namespace) -} - -/** - * Display deprecation message. - */ - -function log(message, site) { - var haslisteners = eventListenerCount(process, 'deprecation') !== 0 - - // abort early if no destination - if (!haslisteners && this._ignored) { - return - } - - var caller - var callFile - var callSite - var i = 0 - var seen = false - var stack = getStack() - var file = this._file - - if (site) { - // provided site - callSite = callSiteLocation(stack[1]) - callSite.name = site.name - file = callSite[0] - } else { - // get call site - i = 2 - site = callSiteLocation(stack[i]) - callSite = site - } - - // get caller of deprecated thing in relation to file - for (; i < stack.length; i++) { - caller = callSiteLocation(stack[i]) - callFile = caller[0] - - if (callFile === file) { - seen = true - } else if (callFile === this._file) { - file = this._file - } else if (seen) { - break - } - } - - var key = caller - ? site.join(':') + '__' + caller.join(':') - : undefined - - if (key !== undefined && key in this._warned) { - // already warned - return - } - - this._warned[key] = true - - // generate automatic message from call site - if (!message) { - message = callSite === site || !callSite.name - ? defaultMessage(site) - : defaultMessage(callSite) - } - - // emit deprecation if listeners exist - if (haslisteners) { - var err = DeprecationError(this._namespace, message, stack.slice(i)) - process.emit('deprecation', err) - return - } - - // format and write message - var format = process.stderr.isTTY - ? formatColor - : formatPlain - var msg = format.call(this, message, caller, stack.slice(i)) - process.stderr.write(msg + '\n', 'utf8') - - return -} - -/** - * Get call site location as array. - */ - -function callSiteLocation(callSite) { - var file = callSite.getFileName() || '' - var line = callSite.getLineNumber() - var colm = callSite.getColumnNumber() - - if (callSite.isEval()) { - file = callSite.getEvalOrigin() + ', ' + file - } - - var site = [file, line, colm] - - site.callSite = callSite - site.name = callSite.getFunctionName() - - return site -} - -/** - * Generate a default message from the site. - */ - -function defaultMessage(site) { - var callSite = site.callSite - var funcName = site.name - var typeName = callSite.getTypeName() - - // make useful anonymous name - if (!funcName) { - funcName = '' - } - - // make useful type name - if (typeName === 'Function') { - typeName = callSite.getThis().name || typeName - } - - return callSite.getMethodName() - ? typeName + '.' + funcName - : funcName -} - -/** - * Format deprecation message without color. - */ - -function formatPlain(msg, caller, stack) { - var timestamp = new Date().toUTCString() - - var formatted = timestamp - + ' ' + this._namespace - + ' deprecated ' + msg - - // add stack trace - if (this._traced) { - for (var i = 0; i < stack.length; i++) { - formatted += '\n at ' + callSiteToString(stack[i]) - } - - return formatted - } - - if (caller) { - formatted += ' at ' + formatLocation(caller) - } - - return formatted -} - -/** - * Format deprecation message with color. - */ - -function formatColor(msg, caller, stack) { - var formatted = '\x1b[36;1m' + this._namespace + '\x1b[22;39m' // bold cyan - + ' \x1b[33;1mdeprecated\x1b[22;39m' // bold yellow - + ' \x1b[0m' + msg + '\x1b[39m' // reset - - // add stack trace - if (this._traced) { - for (var i = 0; i < stack.length; i++) { - formatted += '\n \x1b[36mat ' + callSiteToString(stack[i]) + '\x1b[39m' // cyan - } - - return formatted - } - - if (caller) { - formatted += ' \x1b[36m' + formatLocation(caller) + '\x1b[39m' // cyan - } - - return formatted -} - -/** - * Format call site location. - */ - -function formatLocation(callSite) { - return relative(basePath, callSite[0]) - + ':' + callSite[1] - + ':' + callSite[2] -} - -/** - * Get the stack as array of call sites. - */ - -function getStack() { - var limit = Error.stackTraceLimit - var obj = {} - var prep = Error.prepareStackTrace - - Error.prepareStackTrace = prepareObjectStackTrace - Error.stackTraceLimit = Math.max(10, limit) - - // capture the stack - Error.captureStackTrace(obj) - - // slice this function off the top - var stack = obj.stack.slice(1) - - Error.prepareStackTrace = prep - Error.stackTraceLimit = limit - - return stack -} - -/** - * Capture call site stack from v8. - */ - -function prepareObjectStackTrace(obj, stack) { - return stack -} - -/** - * Return a wrapped function in a deprecation message. - */ - -function wrapfunction(fn, message) { - if (typeof fn !== 'function') { - throw new TypeError('argument fn must be a function') - } - - var args = createArgumentsString(fn.length) - var deprecate = this - var stack = getStack() - var site = callSiteLocation(stack[1]) - - site.name = fn.name - - var deprecatedfn = eval('(function (' + args + ') {\n' - + '"use strict"\n' - + 'log.call(deprecate, message, site)\n' - + 'return fn.apply(this, arguments)\n' - + '})') - - return deprecatedfn -} - -/** - * Wrap property in a deprecation message. - */ - -function wrapproperty(obj, prop, message) { - if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { - throw new TypeError('argument obj must be object') - } - - var descriptor = Object.getOwnPropertyDescriptor(obj, prop) - - if (!descriptor) { - throw new TypeError('must call property on owner object') - } - - if (!descriptor.configurable) { - throw new TypeError('property must be configurable') - } - - var deprecate = this - var stack = getStack() - var site = callSiteLocation(stack[1]) - - // set site name - site.name = prop - - // convert data descriptor - if ('value' in descriptor) { - descriptor = convertDataDescriptorToAccessor(obj, prop, message) - } - - var get = descriptor.get - var set = descriptor.set - - // wrap getter - if (typeof get === 'function') { - descriptor.get = function getter() { - log.call(deprecate, message, site) - return get.apply(this, arguments) - } - } - - // wrap setter - if (typeof set === 'function') { - descriptor.set = function setter() { - log.call(deprecate, message, site) - return set.apply(this, arguments) - } - } - - Object.defineProperty(obj, prop, descriptor) -} - -/** - * Create DeprecationError for deprecation - */ - -function DeprecationError(namespace, message, stack) { - var error = new Error() - var stackString - - Object.defineProperty(error, 'constructor', { - value: DeprecationError - }) - - Object.defineProperty(error, 'message', { - configurable: true, - enumerable: false, - value: message, - writable: true - }) - - Object.defineProperty(error, 'name', { - enumerable: false, - configurable: true, - value: 'DeprecationError', - writable: true - }) - - Object.defineProperty(error, 'namespace', { - configurable: true, - enumerable: false, - value: namespace, - writable: true - }) - - Object.defineProperty(error, 'stack', { - configurable: true, - enumerable: false, - get: function () { - if (stackString !== undefined) { - return stackString - } - - // prepare stack trace - return stackString = createStackString.call(this, stack) - }, - set: function setter(val) { - stackString = val - } - }) - - return error -} diff --git a/s4t-server-node/node_modules/express/node_modules/depd/lib/compat/buffer-concat.js b/s4t-server-node/node_modules/express/node_modules/depd/lib/compat/buffer-concat.js deleted file mode 100644 index 09d9721..0000000 --- a/s4t-server-node/node_modules/express/node_modules/depd/lib/compat/buffer-concat.js +++ /dev/null @@ -1,33 +0,0 @@ -/*! - * depd - * Copyright(c) 2014 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = bufferConcat - -/** - * Concatenate an array of Buffers. - */ - -function bufferConcat(bufs) { - var length = 0 - - for (var i = 0, len = bufs.length; i < len; i++) { - length += bufs[i].length - } - - var buf = new Buffer(length) - var pos = 0 - - for (var i = 0, len = bufs.length; i < len; i++) { - bufs[i].copy(buf, pos) - pos += bufs[i].length - } - - return buf -} diff --git a/s4t-server-node/node_modules/express/node_modules/depd/lib/compat/callsite-tostring.js b/s4t-server-node/node_modules/express/node_modules/depd/lib/compat/callsite-tostring.js deleted file mode 100644 index 17cf7ed..0000000 --- a/s4t-server-node/node_modules/express/node_modules/depd/lib/compat/callsite-tostring.js +++ /dev/null @@ -1,101 +0,0 @@ -/*! - * depd - * Copyright(c) 2014 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = callSiteToString - -/** - * Format a CallSite file location to a string. - */ - -function callSiteFileLocation(callSite) { - var fileName - var fileLocation = '' - - if (callSite.isNative()) { - fileLocation = 'native' - } else if (callSite.isEval()) { - fileName = callSite.getScriptNameOrSourceURL() - if (!fileName) { - fileLocation = callSite.getEvalOrigin() - } - } else { - fileName = callSite.getFileName() - } - - if (fileName) { - fileLocation += fileName - - var lineNumber = callSite.getLineNumber() - if (lineNumber != null) { - fileLocation += ':' + lineNumber - - var columnNumber = callSite.getColumnNumber() - if (columnNumber) { - fileLocation += ':' + columnNumber - } - } - } - - return fileLocation || 'unknown source' -} - -/** - * Format a CallSite to a string. - */ - -function callSiteToString(callSite) { - var addSuffix = true - var fileLocation = callSiteFileLocation(callSite) - var functionName = callSite.getFunctionName() - var isConstructor = callSite.isConstructor() - var isMethodCall = !(callSite.isToplevel() || isConstructor) - var line = '' - - if (isMethodCall) { - var methodName = callSite.getMethodName() - var typeName = getConstructorName(callSite) - - if (functionName) { - if (typeName && functionName.indexOf(typeName) !== 0) { - line += typeName + '.' - } - - line += functionName - - if (methodName && functionName.lastIndexOf('.' + methodName) !== functionName.length - methodName.length - 1) { - line += ' [as ' + methodName + ']' - } - } else { - line += typeName + '.' + (methodName || '') - } - } else if (isConstructor) { - line += 'new ' + (functionName || '') - } else if (functionName) { - line += functionName - } else { - addSuffix = false - line += fileLocation - } - - if (addSuffix) { - line += ' (' + fileLocation + ')' - } - - return line -} - -/** - * Get constructor name of reviver. - */ - -function getConstructorName(obj) { - var receiver = obj.receiver - return (receiver.constructor && receiver.constructor.name) || null -} diff --git a/s4t-server-node/node_modules/express/node_modules/depd/lib/compat/index.js b/s4t-server-node/node_modules/express/node_modules/depd/lib/compat/index.js deleted file mode 100644 index 7fee026..0000000 --- a/s4t-server-node/node_modules/express/node_modules/depd/lib/compat/index.js +++ /dev/null @@ -1,69 +0,0 @@ -/*! - * depd - * Copyright(c) 2014 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module exports. - */ - -lazyProperty(module.exports, 'bufferConcat', function bufferConcat() { - return Buffer.concat || require('./buffer-concat') -}) - -lazyProperty(module.exports, 'callSiteToString', function callSiteToString() { - var limit = Error.stackTraceLimit - var obj = {} - var prep = Error.prepareStackTrace - - function prepareObjectStackTrace(obj, stack) { - return stack - } - - Error.prepareStackTrace = prepareObjectStackTrace - Error.stackTraceLimit = 2 - - // capture the stack - Error.captureStackTrace(obj) - - // slice the stack - var stack = obj.stack.slice() - - Error.prepareStackTrace = prep - Error.stackTraceLimit = limit - - return stack[0].toString ? toString : require('./callsite-tostring') -}) - -/** - * Define a lazy property. - */ - -function lazyProperty(obj, prop, getter) { - function get() { - var val = getter() - - Object.defineProperty(obj, prop, { - configurable: true, - enumerable: true, - value: val - }) - - return val - } - - Object.defineProperty(obj, prop, { - configurable: true, - enumerable: true, - get: get - }) -} - -/** - * Call toString() on the obj - */ - -function toString(obj) { - return obj.toString() -} diff --git a/s4t-server-node/node_modules/express/node_modules/depd/package.json b/s4t-server-node/node_modules/express/node_modules/depd/package.json deleted file mode 100644 index 85dd84c..0000000 --- a/s4t-server-node/node_modules/express/node_modules/depd/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "depd", - "description": "Deprecate all the things", - "version": "1.0.0", - "author": { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - "license": "MIT", - "keywords": [ - "deprecate", - "deprecated" - ], - "repository": { - "type": "git", - "url": "https://github.com/dougwilson/nodejs-depd" - }, - "devDependencies": { - "benchmark": "1.0.0", - "beautify-benchmark": "0.2.4", - "istanbul": "0.3.2", - "mocha": "~1.21.4", - "should": "~4.0.4" - }, - "files": [ - "lib/", - "History.md", - "LICENSE", - "index.js", - "Readme.md" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "bench": "node benchmark/index.js", - "test": "mocha --reporter spec --bail --require should test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --require should test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --require should test/" - }, - "gitHead": "08b5a2182c8c1fdf7420e4ff8532bfd7e266a7b2", - "bugs": { - "url": "https://github.com/dougwilson/nodejs-depd/issues" - }, - "homepage": "https://github.com/dougwilson/nodejs-depd", - "_id": "depd@1.0.0", - "_shasum": "2fda0d00e98aae2845d4991ab1bf1f2a199073d5", - "_from": "depd@>=1.0.0 <1.1.0", - "_npmVersion": "1.4.21", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - } - ], - "dist": { - "shasum": "2fda0d00e98aae2845d4991ab1bf1f2a199073d5", - "tarball": "http://registry.npmjs.org/depd/-/depd-1.0.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/depd/-/depd-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/escape-html/.npmignore b/s4t-server-node/node_modules/express/node_modules/escape-html/.npmignore deleted file mode 100644 index 48a2e24..0000000 --- a/s4t-server-node/node_modules/express/node_modules/escape-html/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -components -build diff --git a/s4t-server-node/node_modules/express/node_modules/escape-html/Makefile b/s4t-server-node/node_modules/express/node_modules/escape-html/Makefile deleted file mode 100644 index 3f6119d..0000000 --- a/s4t-server-node/node_modules/express/node_modules/escape-html/Makefile +++ /dev/null @@ -1,11 +0,0 @@ - -build: components index.js - @component build - -components: - @Component install - -clean: - rm -fr build components template.js - -.PHONY: clean diff --git a/s4t-server-node/node_modules/express/node_modules/escape-html/Readme.md b/s4t-server-node/node_modules/express/node_modules/escape-html/Readme.md deleted file mode 100644 index 2cfcc99..0000000 --- a/s4t-server-node/node_modules/express/node_modules/escape-html/Readme.md +++ /dev/null @@ -1,15 +0,0 @@ - -# escape-html - - Escape HTML entities - -## Example - -```js -var escape = require('escape-html'); -escape(str); -``` - -## License - - MIT \ No newline at end of file diff --git a/s4t-server-node/node_modules/express/node_modules/escape-html/component.json b/s4t-server-node/node_modules/express/node_modules/escape-html/component.json deleted file mode 100644 index cb9740f..0000000 --- a/s4t-server-node/node_modules/express/node_modules/escape-html/component.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "escape-html", - "description": "Escape HTML entities", - "version": "1.0.1", - "keywords": ["escape", "html", "utility"], - "dependencies": {}, - "scripts": [ - "index.js" - ] -} diff --git a/s4t-server-node/node_modules/express/node_modules/escape-html/index.js b/s4t-server-node/node_modules/express/node_modules/escape-html/index.js deleted file mode 100644 index 2765211..0000000 --- a/s4t-server-node/node_modules/express/node_modules/escape-html/index.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Escape special characters in the given string of html. - * - * @param {String} html - * @return {String} - * @api private - */ - -module.exports = function(html) { - return String(html) - .replace(/&/g, '&') - .replace(/"/g, '"') - .replace(/'/g, ''') - .replace(//g, '>'); -} diff --git a/s4t-server-node/node_modules/express/node_modules/escape-html/package.json b/s4t-server-node/node_modules/express/node_modules/escape-html/package.json deleted file mode 100644 index ee240f0..0000000 --- a/s4t-server-node/node_modules/express/node_modules/escape-html/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "escape-html", - "description": "Escape HTML entities", - "version": "1.0.1", - "keywords": [ - "escape", - "html", - "utility" - ], - "dependencies": {}, - "main": "index.js", - "component": { - "scripts": { - "escape-html/index.js": "index.js" - } - }, - "repository": { - "type": "git", - "url": "https://github.com/component/escape-html.git" - }, - "readme": "\n# escape-html\n\n Escape HTML entities\n\n## Example\n\n```js\nvar escape = require('escape-html');\nescape(str);\n```\n\n## License\n\n MIT", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/component/escape-html/issues" - }, - "homepage": "https://github.com/component/escape-html", - "_id": "escape-html@1.0.1", - "dist": { - "shasum": "181a286ead397a39a92857cfb1d43052e356bff0", - "tarball": "http://registry.npmjs.org/escape-html/-/escape-html-1.0.1.tgz" - }, - "_from": "escape-html@1.0.1", - "_npmVersion": "1.3.15", - "_npmUser": { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - } - ], - "directories": {}, - "_shasum": "181a286ead397a39a92857cfb1d43052e356bff0", - "_resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.1.tgz" -} diff --git a/s4t-server-node/node_modules/express/node_modules/etag/HISTORY.md b/s4t-server-node/node_modules/express/node_modules/etag/HISTORY.md deleted file mode 100644 index 10cf504..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/HISTORY.md +++ /dev/null @@ -1,55 +0,0 @@ -1.5.1 / 2014-11-19 -================== - - * deps: crc@3.2.1 - - Minor fixes - -1.5.0 / 2014-10-14 -================== - - * Improve string performance - * Slightly improve speed for weak ETags over 1KB - -1.4.0 / 2014-09-21 -================== - - * Support "fake" stats objects - * Support Node.js 0.6 - -1.3.1 / 2014-09-14 -================== - - * Use the (new and improved) `crc` for crc32 - -1.3.0 / 2014-08-29 -================== - - * Default strings to strong ETags - * Improve speed for weak ETags over 1KB - -1.2.1 / 2014-08-29 -================== - - * Use the (much faster) `buffer-crc32` for crc32 - -1.2.0 / 2014-08-24 -================== - - * Add support for file stat objects - -1.1.0 / 2014-08-24 -================== - - * Add fast-path for empty entity - * Add weak ETag generation - * Shrink size of generated ETags - -1.0.1 / 2014-08-24 -================== - - * Fix behavior of string containing Unicode - -1.0.0 / 2014-05-18 -================== - - * Initial release diff --git a/s4t-server-node/node_modules/express/node_modules/etag/LICENSE b/s4t-server-node/node_modules/express/node_modules/etag/LICENSE deleted file mode 100644 index b7dce6c..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 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/s4t-server-node/node_modules/express/node_modules/etag/README.md b/s4t-server-node/node_modules/express/node_modules/etag/README.md deleted file mode 100644 index 68c16d5..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/README.md +++ /dev/null @@ -1,141 +0,0 @@ -# etag - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Create simple ETags - -## Installation - -```sh -$ npm install etag -``` - -## API - -```js -var etag = require('etag') -``` - -### etag(entity, [options]) - -Generate a strong ETag for the given entity. This should be the complete -body of the entity. Strings, `Buffer`s, and `fs.Stats` are accepted. By -default, a strong ETag is generated except for `fs.Stats`, which will -generate a weak ETag (this can be overwritten by `options.weak`). - -```js -res.setHeader('ETag', etag(body)) -``` - -#### Options - -`etag` accepts these properties in the options object. - -##### weak - -Specifies if a "strong" or a "weak" ETag will be generated. The ETag can only -really be a strong as the given input. - -## Testing - -```sh -$ npm test -``` - -## Benchmark - -```bash -$ npm run-script bench - -> etag@1.5.1 bench nodejs-etag -> node benchmark/index.js - -> node benchmark/body0-100b.js - - 100B body - - 1 test completed. - 2 tests completed. - 3 tests completed. - 4 tests completed. - - buffer - strong x 425,007 ops/sec ±1.47% (184 runs sampled) -* buffer - weak x 1,009,859 ops/sec ±0.18% (197 runs sampled) - string - strong x 442,096 ops/sec ±1.20% (181 runs sampled) - string - weak x 325,063 ops/sec ±0.31% (192 runs sampled) - -> node benchmark/body1-1kb.js - - 1KB body - - 1 test completed. - 2 tests completed. - 3 tests completed. - 4 tests completed. - - buffer - strong x 263,069 ops/sec ±1.60% (190 runs sampled) -* buffer - weak x 295,732 ops/sec ±0.43% (199 runs sampled) - string - strong x 274,822 ops/sec ±1.15% (191 runs sampled) - string - weak x 169,473 ops/sec ±1.59% (194 runs sampled) - -> node benchmark/body2-5kb.js - - 5KB body - - 1 test completed. - 2 tests completed. - 3 tests completed. - 4 tests completed. - - buffer - strong x 104,299 ops/sec ±0.60% (193 runs sampled) -* buffer - weak x 108,126 ops/sec ±0.65% (196 runs sampled) - string - strong x 101,736 ops/sec ±0.78% (194 runs sampled) - string - weak x 101,266 ops/sec ±0.85% (192 runs sampled) - -> node benchmark/body3-10kb.js - - 10KB body - - 1 test completed. - 2 tests completed. - 3 tests completed. - 4 tests completed. - - buffer - strong x 59,007 ops/sec ±0.29% (198 runs sampled) -* buffer - weak x 60,968 ops/sec ±0.48% (197 runs sampled) - string - strong x 51,873 ops/sec ±1.78% (178 runs sampled) - string - weak x 52,307 ops/sec ±2.63% (193 runs sampled) - -> node benchmark/body4-100kb.js - - 100KB body - - 1 test completed. - 2 tests completed. - 3 tests completed. - 4 tests completed. - - buffer - strong x 6,712 ops/sec ±0.11% (198 runs sampled) -* buffer - weak x 6,716 ops/sec ±0.50% (196 runs sampled) - string - strong x 6,397 ops/sec ±0.36% (196 runs sampled) - string - weak x 6,635 ops/sec ±0.15% (198 runs sampled) -``` - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/etag.svg?style=flat -[npm-url]: https://npmjs.org/package/etag -[node-version-image]: https://img.shields.io/node/v/etag.svg?style=flat -[node-version-url]: http://nodejs.org/download/ -[travis-image]: https://img.shields.io/travis/jshttp/etag.svg?style=flat -[travis-url]: https://travis-ci.org/jshttp/etag -[coveralls-image]: https://img.shields.io/coveralls/jshttp/etag.svg?style=flat -[coveralls-url]: https://coveralls.io/r/jshttp/etag?branch=master -[downloads-image]: https://img.shields.io/npm/dm/etag.svg?style=flat -[downloads-url]: https://npmjs.org/package/etag diff --git a/s4t-server-node/node_modules/express/node_modules/etag/index.js b/s4t-server-node/node_modules/express/node_modules/etag/index.js deleted file mode 100644 index bb05eb7..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/index.js +++ /dev/null @@ -1,171 +0,0 @@ -/*! - * etag - * Copyright(c) 2014 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = etag - -/** - * Module dependencies. - */ - -var crc = require('crc').crc32 -var crypto = require('crypto') -var Stats = require('fs').Stats - -/** - * Module variables. - */ - -var crc32threshold = 1000 // 1KB -var NULL = new Buffer([0]) -var toString = Object.prototype.toString - -/** - * Create a simple ETag. - * - * @param {string|Buffer|Stats} entity - * @param {object} [options] - * @param {boolean} [options.weak] - * @return {String} - * @api public - */ - -function etag(entity, options) { - if (entity == null) { - throw new TypeError('argument entity is required') - } - - var isStats = isstats(entity) - var weak = options && typeof options.weak === 'boolean' - ? options.weak - : isStats - - // support fs.Stats object - if (isStats) { - return stattag(entity, weak) - } - - if (typeof entity !== 'string' && !Buffer.isBuffer(entity)) { - throw new TypeError('argument entity must be string, Buffer, or fs.Stats') - } - - var hash = weak - ? weakhash(entity) - : stronghash(entity) - - return weak - ? 'W/"' + hash + '"' - : '"' + hash + '"' -} - -/** - * Determine if object is a Stats object. - * - * @param {object} obj - * @return {boolean} - * @api private - */ - -function isstats(obj) { - // not even an object - if (obj === null || typeof obj !== 'object') { - return false - } - - // genuine fs.Stats - if (obj instanceof Stats) { - return true - } - - // quack quack - return 'atime' in obj && toString.call(obj.atime) === '[object Date]' - && 'ctime' in obj && toString.call(obj.ctime) === '[object Date]' - && 'mtime' in obj && toString.call(obj.mtime) === '[object Date]' - && 'ino' in obj && typeof obj.ino === 'number' - && 'size' in obj && typeof obj.size === 'number' -} - -/** - * Generate a tag for a stat. - * - * @param {Buffer} entity - * @return {String} - * @api private - */ - -function stattag(stat, weak) { - var mtime = stat.mtime.toISOString() - var size = stat.size.toString(16) - - if (weak) { - return 'W/"' + size + '-' + crc(mtime) + '"' - } - - var hash = crypto - .createHash('md5') - .update('file', 'utf8') - .update(NULL) - .update(size, 'utf8') - .update(NULL) - .update(mtime, 'utf8') - .digest('base64') - - return '"' + hash + '"' -} - -/** - * Generate a strong hash. - * - * @param {Buffer} entity - * @return {String} - * @api private - */ - -function stronghash(entity) { - if (entity.length === 0) { - // fast-path empty - return '1B2M2Y8AsgTpgAmY7PhCfg==' - } - - return crypto - .createHash('md5') - .update(entity, 'utf8') - .digest('base64') -} - -/** - * Generate a weak hash. - * - * @param {Buffer} entity - * @return {String} - * @api private - */ - -function weakhash(entity) { - if (entity.length === 0) { - // fast-path empty - return '0-0' - } - - var len = typeof entity === 'string' - ? Buffer.byteLength(entity, 'utf8') - : entity.length - - if (len <= crc32threshold) { - // crc32 plus length when it's fast - // crc(str) only accepts utf-8 encoding - return len.toString(16) + '-' + crc(entity).toString(16) - } - - // use md4 for long strings - return crypto - .createHash('md4') - .update(entity, 'utf8') - .digest('base64') -} diff --git a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/.npmignore b/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/.npmignore deleted file mode 100644 index 57d4cb8..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -benchmark -src -test -.travis.yml -bitcoin.png diff --git a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/LICENSE b/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/LICENSE deleted file mode 100644 index c49097c..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright 2014 Alex Gorbatchev - -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/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/README.md b/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/README.md deleted file mode 100644 index 6473cbd..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/README.md +++ /dev/null @@ -1,98 +0,0 @@ -# crc - -[![GitTip](http://img.shields.io/gittip/alexgorbatchev.svg?style=flat)](https://www.gittip.com/alexgorbatchev/) -[![Dependency status](http://img.shields.io/david/alexgorbatchev/node-crc.svg?style=flat)](https://david-dm.org/alexgorbatchev/node-crc) -[![devDependency Status](http://img.shields.io/david/dev/alexgorbatchev/node-crc.svg?style=flat)](https://david-dm.org/alexgorbatchev/node-crc#info=devDependencies) -[![Build Status](http://img.shields.io/travis/alexgorbatchev/node-crc.svg?style=flat&branch=master)](https://travis-ci.org/alexgorbatchev/node-crc) - -[![NPM](https://nodei.co/npm/crc.svg?style=flat)](https://npmjs.org/package/node-crc) - -Module for calculating Cyclic Redundancy Check (CRC). - -## Features - -* Full test suite comparing values against reference `pycrc` implementation. -* Version 3.x is 3x to 4x faster than version 2.x. -* Pure JavaScript implementation, no dependencies. -* Provides CRC Tables for optimized calculations. -* Provides support for the following CRC algorithms: - * CRC1 `crc.crc1(…)` - * CRC8 `crc.crc8(…)` - * CRC8 1-Wire `crc.crc81wire(…)` - * CRC16 `crc.crc16(…)` - * CRC16 CCITT `crc.crc16ccitt(…)` - * CRC16 Modbus `crc.crc16modbus(…)` - * CRC24 `crc.crc24(…)` - * CRC32 `crc.crc32(…)` - -## IMPORTANT - -If you've used `crc` module prior to version 2.x, you might have some inconsistentcies with the current implementation because it relied on very old code and wasn't checked against reference implementation. If you upgrading from 1.x, please take special care. - -## Support - - Please support me on [GitTip](https://www.gittip.com/alexgorbatchev/). I've spend days developing and grooming this module and hope to spend more time. If you have bitcoin, please use the QR code or this wallet address [`1CZyBREeHTmy8C5zVGHZHPwqBuWFmEuUCQ`](https://blockchain.info/address/1CZyBREeHTmy8C5zVGHZHPwqBuWFmEuUCQ): - -## Installation - - npm install crc - -## Running tests - - $ npm install - $ npm test - -## Usage Example - -Calculate a CRC32: - - var crc = require('crc'); - - crc.crc32('hello').toString(16); - # => "3610a686" - -Calculate a CRC32 of a file: - - crc.crc32(fs.readFileSync('README.md', 'utf8')).toString(16); - # => "127ad531" - -Or using a `Buffer`: - - crc.crc32(fs.readFileSync('README.md')).toString(16); - # => "127ad531" - -Incrementally calculate a CRC32: - - value = crc32('one'); - value = crc32('two', value); - value = crc32('three', value); - value.toString(16); - # => "09e1c092" - -## Thanks! - -[pycrc](http://www.tty1.net/pycrc/) library is which the source of all of the CRC tables. - -# License - -The MIT License (MIT) - -Copyright (c) 2014 Alex Gorbatchev - -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/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc.js b/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc.js deleted file mode 100644 index 1c342b7..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc.js +++ /dev/null @@ -1,71 +0,0 @@ -// Generated by CoffeeScript 1.7.1 -var CRC, hex; - -hex = require('./hex'); - -module.exports = CRC = (function() { - CRC.prototype.INIT_CRC = 0x00; - - CRC.prototype.XOR_MASK = 0x00; - - CRC.prototype.WIDTH = 0; - - CRC.prototype.pack = function(crc) { - return ''; - }; - - CRC.prototype.each_byte = function(buf, cb) { - var i, _i, _ref, _results; - if (!Buffer.isBuffer(buf)) { - buf = Buffer(buf); - } - _results = []; - for (i = _i = 0, _ref = buf.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) { - _results.push(cb(buf[i])); - } - return _results; - }; - - function CRC() { - this.crc = this.INIT_CRC; - } - - CRC.prototype.digest_length = function() { - return Math.ceil(this.WIDTH / 8.0); - }; - - CRC.prototype.update = function(data) {}; - - CRC.prototype.reset = function() { - return this.crc = this.INIT_CRC; - }; - - CRC.prototype.checksum = function(signed) { - var sum; - if (signed == null) { - signed = true; - } - sum = this.crc ^ this.XOR_MASK; - if (signed) { - sum = sum >>> 0; - } - return sum; - }; - - CRC.prototype.finish = function() { - return this.pack(this.checksum()); - }; - - CRC.prototype.hexdigest = function(value) { - var result; - if (value != null) { - this.update(value); - } - result = this.finish(); - this.reset(); - return result; - }; - - return CRC; - -})(); diff --git a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc1.js b/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc1.js deleted file mode 100644 index f094567..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc1.js +++ /dev/null @@ -1,21 +0,0 @@ -// Generated by CoffeeScript 1.7.1 -var Buffer, create; - -Buffer = require('buffer').Buffer; - -create = require('./create'); - -module.exports = create('crc1', function(buf, previous) { - var accum, byte, crc, _i, _len; - if (!Buffer.isBuffer(buf)) { - buf = Buffer(buf); - } - crc = ~~previous; - accum = 0; - for (_i = 0, _len = buf.length; _i < _len; _i++) { - byte = buf[_i]; - accum += byte; - } - crc += accum % 256; - return crc % 256; -}); diff --git a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16.js b/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16.js deleted file mode 100644 index a09cd1e..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16.js +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by CoffeeScript 1.7.1 -var Buffer, TABLE, create; - -Buffer = require('buffer').Buffer; - -create = require('./create'); - -TABLE = [0x0000, 0xc0c1, 0xc181, 0x0140, 0xc301, 0x03c0, 0x0280, 0xc241, 0xc601, 0x06c0, 0x0780, 0xc741, 0x0500, 0xc5c1, 0xc481, 0x0440, 0xcc01, 0x0cc0, 0x0d80, 0xcd41, 0x0f00, 0xcfc1, 0xce81, 0x0e40, 0x0a00, 0xcac1, 0xcb81, 0x0b40, 0xc901, 0x09c0, 0x0880, 0xc841, 0xd801, 0x18c0, 0x1980, 0xd941, 0x1b00, 0xdbc1, 0xda81, 0x1a40, 0x1e00, 0xdec1, 0xdf81, 0x1f40, 0xdd01, 0x1dc0, 0x1c80, 0xdc41, 0x1400, 0xd4c1, 0xd581, 0x1540, 0xd701, 0x17c0, 0x1680, 0xd641, 0xd201, 0x12c0, 0x1380, 0xd341, 0x1100, 0xd1c1, 0xd081, 0x1040, 0xf001, 0x30c0, 0x3180, 0xf141, 0x3300, 0xf3c1, 0xf281, 0x3240, 0x3600, 0xf6c1, 0xf781, 0x3740, 0xf501, 0x35c0, 0x3480, 0xf441, 0x3c00, 0xfcc1, 0xfd81, 0x3d40, 0xff01, 0x3fc0, 0x3e80, 0xfe41, 0xfa01, 0x3ac0, 0x3b80, 0xfb41, 0x3900, 0xf9c1, 0xf881, 0x3840, 0x2800, 0xe8c1, 0xe981, 0x2940, 0xeb01, 0x2bc0, 0x2a80, 0xea41, 0xee01, 0x2ec0, 0x2f80, 0xef41, 0x2d00, 0xedc1, 0xec81, 0x2c40, 0xe401, 0x24c0, 0x2580, 0xe541, 0x2700, 0xe7c1, 0xe681, 0x2640, 0x2200, 0xe2c1, 0xe381, 0x2340, 0xe101, 0x21c0, 0x2080, 0xe041, 0xa001, 0x60c0, 0x6180, 0xa141, 0x6300, 0xa3c1, 0xa281, 0x6240, 0x6600, 0xa6c1, 0xa781, 0x6740, 0xa501, 0x65c0, 0x6480, 0xa441, 0x6c00, 0xacc1, 0xad81, 0x6d40, 0xaf01, 0x6fc0, 0x6e80, 0xae41, 0xaa01, 0x6ac0, 0x6b80, 0xab41, 0x6900, 0xa9c1, 0xa881, 0x6840, 0x7800, 0xb8c1, 0xb981, 0x7940, 0xbb01, 0x7bc0, 0x7a80, 0xba41, 0xbe01, 0x7ec0, 0x7f80, 0xbf41, 0x7d00, 0xbdc1, 0xbc81, 0x7c40, 0xb401, 0x74c0, 0x7580, 0xb541, 0x7700, 0xb7c1, 0xb681, 0x7640, 0x7200, 0xb2c1, 0xb381, 0x7340, 0xb101, 0x71c0, 0x7080, 0xb041, 0x5000, 0x90c1, 0x9181, 0x5140, 0x9301, 0x53c0, 0x5280, 0x9241, 0x9601, 0x56c0, 0x5780, 0x9741, 0x5500, 0x95c1, 0x9481, 0x5440, 0x9c01, 0x5cc0, 0x5d80, 0x9d41, 0x5f00, 0x9fc1, 0x9e81, 0x5e40, 0x5a00, 0x9ac1, 0x9b81, 0x5b40, 0x9901, 0x59c0, 0x5880, 0x9841, 0x8801, 0x48c0, 0x4980, 0x8941, 0x4b00, 0x8bc1, 0x8a81, 0x4a40, 0x4e00, 0x8ec1, 0x8f81, 0x4f40, 0x8d01, 0x4dc0, 0x4c80, 0x8c41, 0x4400, 0x84c1, 0x8581, 0x4540, 0x8701, 0x47c0, 0x4680, 0x8641, 0x8201, 0x42c0, 0x4380, 0x8341, 0x4100, 0x81c1, 0x8081, 0x4040]; - -if (typeof Int32Array !== 'undefined') { - TABLE = new Int32Array(TABLE); -} - -module.exports = create('crc-16', function(buf, previous) { - var byte, crc, _i, _len; - if (!Buffer.isBuffer(buf)) { - buf = Buffer(buf); - } - crc = ~~previous; - for (_i = 0, _len = buf.length; _i < _len; _i++) { - byte = buf[_i]; - crc = (TABLE[(crc ^ byte) & 0xff] ^ (crc >> 8)) & 0xffff; - } - return crc; -}); diff --git a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16_ccitt.js b/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16_ccitt.js deleted file mode 100644 index 0bdb0bf..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16_ccitt.js +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by CoffeeScript 1.7.1 -var Buffer, TABLE, create; - -Buffer = require('buffer').Buffer; - -create = require('./create'); - -TABLE = [0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de, 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485, 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4, 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc, 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823, 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b, 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12, 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a, 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41, 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49, 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70, 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78, 0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f, 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067, 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e, 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256, 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d, 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c, 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634, 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab, 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3, 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a, 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92, 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9, 0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1, 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8, 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0]; - -if (typeof Int32Array !== 'undefined') { - TABLE = new Int32Array(TABLE); -} - -module.exports = create('ccitt', function(buf, previous) { - var byte, crc, _i, _len; - if (!Buffer.isBuffer(buf)) { - buf = Buffer(buf); - } - crc = previous != null ? ~~previous : 0xffff; - for (_i = 0, _len = buf.length; _i < _len; _i++) { - byte = buf[_i]; - crc = (TABLE[((crc >> 8) ^ byte) & 0xff] ^ (crc << 8)) & 0xffff; - } - return crc; -}); diff --git a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16_modbus.js b/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16_modbus.js deleted file mode 100644 index 52a536a..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc16_modbus.js +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by CoffeeScript 1.7.1 -var Buffer, TABLE, create; - -Buffer = require('buffer').Buffer; - -create = require('./create'); - -TABLE = [0x0000, 0xc0c1, 0xc181, 0x0140, 0xc301, 0x03c0, 0x0280, 0xc241, 0xc601, 0x06c0, 0x0780, 0xc741, 0x0500, 0xc5c1, 0xc481, 0x0440, 0xcc01, 0x0cc0, 0x0d80, 0xcd41, 0x0f00, 0xcfc1, 0xce81, 0x0e40, 0x0a00, 0xcac1, 0xcb81, 0x0b40, 0xc901, 0x09c0, 0x0880, 0xc841, 0xd801, 0x18c0, 0x1980, 0xd941, 0x1b00, 0xdbc1, 0xda81, 0x1a40, 0x1e00, 0xdec1, 0xdf81, 0x1f40, 0xdd01, 0x1dc0, 0x1c80, 0xdc41, 0x1400, 0xd4c1, 0xd581, 0x1540, 0xd701, 0x17c0, 0x1680, 0xd641, 0xd201, 0x12c0, 0x1380, 0xd341, 0x1100, 0xd1c1, 0xd081, 0x1040, 0xf001, 0x30c0, 0x3180, 0xf141, 0x3300, 0xf3c1, 0xf281, 0x3240, 0x3600, 0xf6c1, 0xf781, 0x3740, 0xf501, 0x35c0, 0x3480, 0xf441, 0x3c00, 0xfcc1, 0xfd81, 0x3d40, 0xff01, 0x3fc0, 0x3e80, 0xfe41, 0xfa01, 0x3ac0, 0x3b80, 0xfb41, 0x3900, 0xf9c1, 0xf881, 0x3840, 0x2800, 0xe8c1, 0xe981, 0x2940, 0xeb01, 0x2bc0, 0x2a80, 0xea41, 0xee01, 0x2ec0, 0x2f80, 0xef41, 0x2d00, 0xedc1, 0xec81, 0x2c40, 0xe401, 0x24c0, 0x2580, 0xe541, 0x2700, 0xe7c1, 0xe681, 0x2640, 0x2200, 0xe2c1, 0xe381, 0x2340, 0xe101, 0x21c0, 0x2080, 0xe041, 0xa001, 0x60c0, 0x6180, 0xa141, 0x6300, 0xa3c1, 0xa281, 0x6240, 0x6600, 0xa6c1, 0xa781, 0x6740, 0xa501, 0x65c0, 0x6480, 0xa441, 0x6c00, 0xacc1, 0xad81, 0x6d40, 0xaf01, 0x6fc0, 0x6e80, 0xae41, 0xaa01, 0x6ac0, 0x6b80, 0xab41, 0x6900, 0xa9c1, 0xa881, 0x6840, 0x7800, 0xb8c1, 0xb981, 0x7940, 0xbb01, 0x7bc0, 0x7a80, 0xba41, 0xbe01, 0x7ec0, 0x7f80, 0xbf41, 0x7d00, 0xbdc1, 0xbc81, 0x7c40, 0xb401, 0x74c0, 0x7580, 0xb541, 0x7700, 0xb7c1, 0xb681, 0x7640, 0x7200, 0xb2c1, 0xb381, 0x7340, 0xb101, 0x71c0, 0x7080, 0xb041, 0x5000, 0x90c1, 0x9181, 0x5140, 0x9301, 0x53c0, 0x5280, 0x9241, 0x9601, 0x56c0, 0x5780, 0x9741, 0x5500, 0x95c1, 0x9481, 0x5440, 0x9c01, 0x5cc0, 0x5d80, 0x9d41, 0x5f00, 0x9fc1, 0x9e81, 0x5e40, 0x5a00, 0x9ac1, 0x9b81, 0x5b40, 0x9901, 0x59c0, 0x5880, 0x9841, 0x8801, 0x48c0, 0x4980, 0x8941, 0x4b00, 0x8bc1, 0x8a81, 0x4a40, 0x4e00, 0x8ec1, 0x8f81, 0x4f40, 0x8d01, 0x4dc0, 0x4c80, 0x8c41, 0x4400, 0x84c1, 0x8581, 0x4540, 0x8701, 0x47c0, 0x4680, 0x8641, 0x8201, 0x42c0, 0x4380, 0x8341, 0x4100, 0x81c1, 0x8081, 0x4040]; - -if (typeof Int32Array !== 'undefined') { - TABLE = new Int32Array(TABLE); -} - -module.exports = create('crc-16-modbus', function(buf, previous) { - var byte, crc, _i, _len; - if (!Buffer.isBuffer(buf)) { - buf = Buffer(buf); - } - crc = previous != null ? ~~previous : 0xffff; - for (_i = 0, _len = buf.length; _i < _len; _i++) { - byte = buf[_i]; - crc = (TABLE[(crc ^ byte) & 0xff] ^ (crc >> 8)) & 0xffff; - } - return crc; -}); diff --git a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc24.js b/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc24.js deleted file mode 100644 index ff67bc1..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc24.js +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by CoffeeScript 1.7.1 -var Buffer, TABLE, create; - -Buffer = require('buffer').Buffer; - -create = require('./create'); - -TABLE = [0x000000, 0x864cfb, 0x8ad50d, 0x0c99f6, 0x93e6e1, 0x15aa1a, 0x1933ec, 0x9f7f17, 0xa18139, 0x27cdc2, 0x2b5434, 0xad18cf, 0x3267d8, 0xb42b23, 0xb8b2d5, 0x3efe2e, 0xc54e89, 0x430272, 0x4f9b84, 0xc9d77f, 0x56a868, 0xd0e493, 0xdc7d65, 0x5a319e, 0x64cfb0, 0xe2834b, 0xee1abd, 0x685646, 0xf72951, 0x7165aa, 0x7dfc5c, 0xfbb0a7, 0x0cd1e9, 0x8a9d12, 0x8604e4, 0x00481f, 0x9f3708, 0x197bf3, 0x15e205, 0x93aefe, 0xad50d0, 0x2b1c2b, 0x2785dd, 0xa1c926, 0x3eb631, 0xb8faca, 0xb4633c, 0x322fc7, 0xc99f60, 0x4fd39b, 0x434a6d, 0xc50696, 0x5a7981, 0xdc357a, 0xd0ac8c, 0x56e077, 0x681e59, 0xee52a2, 0xe2cb54, 0x6487af, 0xfbf8b8, 0x7db443, 0x712db5, 0xf7614e, 0x19a3d2, 0x9fef29, 0x9376df, 0x153a24, 0x8a4533, 0x0c09c8, 0x00903e, 0x86dcc5, 0xb822eb, 0x3e6e10, 0x32f7e6, 0xb4bb1d, 0x2bc40a, 0xad88f1, 0xa11107, 0x275dfc, 0xdced5b, 0x5aa1a0, 0x563856, 0xd074ad, 0x4f0bba, 0xc94741, 0xc5deb7, 0x43924c, 0x7d6c62, 0xfb2099, 0xf7b96f, 0x71f594, 0xee8a83, 0x68c678, 0x645f8e, 0xe21375, 0x15723b, 0x933ec0, 0x9fa736, 0x19ebcd, 0x8694da, 0x00d821, 0x0c41d7, 0x8a0d2c, 0xb4f302, 0x32bff9, 0x3e260f, 0xb86af4, 0x2715e3, 0xa15918, 0xadc0ee, 0x2b8c15, 0xd03cb2, 0x567049, 0x5ae9bf, 0xdca544, 0x43da53, 0xc596a8, 0xc90f5e, 0x4f43a5, 0x71bd8b, 0xf7f170, 0xfb6886, 0x7d247d, 0xe25b6a, 0x641791, 0x688e67, 0xeec29c, 0x3347a4, 0xb50b5f, 0xb992a9, 0x3fde52, 0xa0a145, 0x26edbe, 0x2a7448, 0xac38b3, 0x92c69d, 0x148a66, 0x181390, 0x9e5f6b, 0x01207c, 0x876c87, 0x8bf571, 0x0db98a, 0xf6092d, 0x7045d6, 0x7cdc20, 0xfa90db, 0x65efcc, 0xe3a337, 0xef3ac1, 0x69763a, 0x578814, 0xd1c4ef, 0xdd5d19, 0x5b11e2, 0xc46ef5, 0x42220e, 0x4ebbf8, 0xc8f703, 0x3f964d, 0xb9dab6, 0xb54340, 0x330fbb, 0xac70ac, 0x2a3c57, 0x26a5a1, 0xa0e95a, 0x9e1774, 0x185b8f, 0x14c279, 0x928e82, 0x0df195, 0x8bbd6e, 0x872498, 0x016863, 0xfad8c4, 0x7c943f, 0x700dc9, 0xf64132, 0x693e25, 0xef72de, 0xe3eb28, 0x65a7d3, 0x5b59fd, 0xdd1506, 0xd18cf0, 0x57c00b, 0xc8bf1c, 0x4ef3e7, 0x426a11, 0xc426ea, 0x2ae476, 0xaca88d, 0xa0317b, 0x267d80, 0xb90297, 0x3f4e6c, 0x33d79a, 0xb59b61, 0x8b654f, 0x0d29b4, 0x01b042, 0x87fcb9, 0x1883ae, 0x9ecf55, 0x9256a3, 0x141a58, 0xefaaff, 0x69e604, 0x657ff2, 0xe33309, 0x7c4c1e, 0xfa00e5, 0xf69913, 0x70d5e8, 0x4e2bc6, 0xc8673d, 0xc4fecb, 0x42b230, 0xddcd27, 0x5b81dc, 0x57182a, 0xd154d1, 0x26359f, 0xa07964, 0xace092, 0x2aac69, 0xb5d37e, 0x339f85, 0x3f0673, 0xb94a88, 0x87b4a6, 0x01f85d, 0x0d61ab, 0x8b2d50, 0x145247, 0x921ebc, 0x9e874a, 0x18cbb1, 0xe37b16, 0x6537ed, 0x69ae1b, 0xefe2e0, 0x709df7, 0xf6d10c, 0xfa48fa, 0x7c0401, 0x42fa2f, 0xc4b6d4, 0xc82f22, 0x4e63d9, 0xd11cce, 0x575035, 0x5bc9c3, 0xdd8538]; - -if (typeof Int32Array !== 'undefined') { - TABLE = new Int32Array(TABLE); -} - -module.exports = create('crc-24', function(buf, previous) { - var byte, crc, _i, _len; - if (!Buffer.isBuffer(buf)) { - buf = Buffer(buf); - } - crc = previous != null ? ~~previous : 0xb704ce; - for (_i = 0, _len = buf.length; _i < _len; _i++) { - byte = buf[_i]; - crc = (TABLE[((crc >> 16) ^ byte) & 0xff] ^ (crc << 8)) & 0xffffff; - } - return crc; -}); diff --git a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc32.js b/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc32.js deleted file mode 100644 index 20bc024..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc32.js +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by CoffeeScript 1.7.1 -var Buffer, TABLE, create; - -Buffer = require('buffer').Buffer; - -create = require('./create'); - -TABLE = [0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d]; - -if (typeof Int32Array !== 'undefined') { - TABLE = new Int32Array(TABLE); -} - -module.exports = create('crc-32', function(buf, previous) { - var byte, crc, _i, _len; - if (!Buffer.isBuffer(buf)) { - buf = Buffer(buf); - } - crc = previous === 0 ? 0 : ~~previous ^ -1; - for (_i = 0, _len = buf.length; _i < _len; _i++) { - byte = buf[_i]; - crc = TABLE[(crc ^ byte) & 0xff] ^ (crc >>> 8); - } - return crc ^ -1; -}); diff --git a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc8.js b/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc8.js deleted file mode 100644 index 6ebe77c..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc8.js +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by CoffeeScript 1.7.1 -var Buffer, TABLE, create; - -Buffer = require('buffer').Buffer; - -create = require('./create'); - -TABLE = [0x00, 0x07, 0x0e, 0x09, 0x1c, 0x1b, 0x12, 0x15, 0x38, 0x3f, 0x36, 0x31, 0x24, 0x23, 0x2a, 0x2d, 0x70, 0x77, 0x7e, 0x79, 0x6c, 0x6b, 0x62, 0x65, 0x48, 0x4f, 0x46, 0x41, 0x54, 0x53, 0x5a, 0x5d, 0xe0, 0xe7, 0xee, 0xe9, 0xfc, 0xfb, 0xf2, 0xf5, 0xd8, 0xdf, 0xd6, 0xd1, 0xc4, 0xc3, 0xca, 0xcd, 0x90, 0x97, 0x9e, 0x99, 0x8c, 0x8b, 0x82, 0x85, 0xa8, 0xaf, 0xa6, 0xa1, 0xb4, 0xb3, 0xba, 0xbd, 0xc7, 0xc0, 0xc9, 0xce, 0xdb, 0xdc, 0xd5, 0xd2, 0xff, 0xf8, 0xf1, 0xf6, 0xe3, 0xe4, 0xed, 0xea, 0xb7, 0xb0, 0xb9, 0xbe, 0xab, 0xac, 0xa5, 0xa2, 0x8f, 0x88, 0x81, 0x86, 0x93, 0x94, 0x9d, 0x9a, 0x27, 0x20, 0x29, 0x2e, 0x3b, 0x3c, 0x35, 0x32, 0x1f, 0x18, 0x11, 0x16, 0x03, 0x04, 0x0d, 0x0a, 0x57, 0x50, 0x59, 0x5e, 0x4b, 0x4c, 0x45, 0x42, 0x6f, 0x68, 0x61, 0x66, 0x73, 0x74, 0x7d, 0x7a, 0x89, 0x8e, 0x87, 0x80, 0x95, 0x92, 0x9b, 0x9c, 0xb1, 0xb6, 0xbf, 0xb8, 0xad, 0xaa, 0xa3, 0xa4, 0xf9, 0xfe, 0xf7, 0xf0, 0xe5, 0xe2, 0xeb, 0xec, 0xc1, 0xc6, 0xcf, 0xc8, 0xdd, 0xda, 0xd3, 0xd4, 0x69, 0x6e, 0x67, 0x60, 0x75, 0x72, 0x7b, 0x7c, 0x51, 0x56, 0x5f, 0x58, 0x4d, 0x4a, 0x43, 0x44, 0x19, 0x1e, 0x17, 0x10, 0x05, 0x02, 0x0b, 0x0c, 0x21, 0x26, 0x2f, 0x28, 0x3d, 0x3a, 0x33, 0x34, 0x4e, 0x49, 0x40, 0x47, 0x52, 0x55, 0x5c, 0x5b, 0x76, 0x71, 0x78, 0x7f, 0x6a, 0x6d, 0x64, 0x63, 0x3e, 0x39, 0x30, 0x37, 0x22, 0x25, 0x2c, 0x2b, 0x06, 0x01, 0x08, 0x0f, 0x1a, 0x1d, 0x14, 0x13, 0xae, 0xa9, 0xa0, 0xa7, 0xb2, 0xb5, 0xbc, 0xbb, 0x96, 0x91, 0x98, 0x9f, 0x8a, 0x8d, 0x84, 0x83, 0xde, 0xd9, 0xd0, 0xd7, 0xc2, 0xc5, 0xcc, 0xcb, 0xe6, 0xe1, 0xe8, 0xef, 0xfa, 0xfd, 0xf4, 0xf3]; - -if (typeof Int32Array !== 'undefined') { - TABLE = new Int32Array(TABLE); -} - -module.exports = create('crc-8', function(buf, previous) { - var byte, crc, _i, _len; - if (!Buffer.isBuffer(buf)) { - buf = Buffer(buf); - } - crc = ~~previous; - for (_i = 0, _len = buf.length; _i < _len; _i++) { - byte = buf[_i]; - crc = TABLE[(crc ^ byte) & 0xff] & 0xff; - } - return crc; -}); diff --git a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc8_1wire.js b/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc8_1wire.js deleted file mode 100644 index b561246..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/crc8_1wire.js +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by CoffeeScript 1.7.1 -var Buffer, TABLE, create; - -Buffer = require('buffer').Buffer; - -create = require('./create'); - -TABLE = [0x00, 0x5e, 0xbc, 0xe2, 0x61, 0x3f, 0xdd, 0x83, 0xc2, 0x9c, 0x7e, 0x20, 0xa3, 0xfd, 0x1f, 0x41, 0x9d, 0xc3, 0x21, 0x7f, 0xfc, 0xa2, 0x40, 0x1e, 0x5f, 0x01, 0xe3, 0xbd, 0x3e, 0x60, 0x82, 0xdc, 0x23, 0x7d, 0x9f, 0xc1, 0x42, 0x1c, 0xfe, 0xa0, 0xe1, 0xbf, 0x5d, 0x03, 0x80, 0xde, 0x3c, 0x62, 0xbe, 0xe0, 0x02, 0x5c, 0xdf, 0x81, 0x63, 0x3d, 0x7c, 0x22, 0xc0, 0x9e, 0x1d, 0x43, 0xa1, 0xff, 0x46, 0x18, 0xfa, 0xa4, 0x27, 0x79, 0x9b, 0xc5, 0x84, 0xda, 0x38, 0x66, 0xe5, 0xbb, 0x59, 0x07, 0xdb, 0x85, 0x67, 0x39, 0xba, 0xe4, 0x06, 0x58, 0x19, 0x47, 0xa5, 0xfb, 0x78, 0x26, 0xc4, 0x9a, 0x65, 0x3b, 0xd9, 0x87, 0x04, 0x5a, 0xb8, 0xe6, 0xa7, 0xf9, 0x1b, 0x45, 0xc6, 0x98, 0x7a, 0x24, 0xf8, 0xa6, 0x44, 0x1a, 0x99, 0xc7, 0x25, 0x7b, 0x3a, 0x64, 0x86, 0xd8, 0x5b, 0x05, 0xe7, 0xb9, 0x8c, 0xd2, 0x30, 0x6e, 0xed, 0xb3, 0x51, 0x0f, 0x4e, 0x10, 0xf2, 0xac, 0x2f, 0x71, 0x93, 0xcd, 0x11, 0x4f, 0xad, 0xf3, 0x70, 0x2e, 0xcc, 0x92, 0xd3, 0x8d, 0x6f, 0x31, 0xb2, 0xec, 0x0e, 0x50, 0xaf, 0xf1, 0x13, 0x4d, 0xce, 0x90, 0x72, 0x2c, 0x6d, 0x33, 0xd1, 0x8f, 0x0c, 0x52, 0xb0, 0xee, 0x32, 0x6c, 0x8e, 0xd0, 0x53, 0x0d, 0xef, 0xb1, 0xf0, 0xae, 0x4c, 0x12, 0x91, 0xcf, 0x2d, 0x73, 0xca, 0x94, 0x76, 0x28, 0xab, 0xf5, 0x17, 0x49, 0x08, 0x56, 0xb4, 0xea, 0x69, 0x37, 0xd5, 0x8b, 0x57, 0x09, 0xeb, 0xb5, 0x36, 0x68, 0x8a, 0xd4, 0x95, 0xcb, 0x29, 0x77, 0xf4, 0xaa, 0x48, 0x16, 0xe9, 0xb7, 0x55, 0x0b, 0x88, 0xd6, 0x34, 0x6a, 0x2b, 0x75, 0x97, 0xc9, 0x4a, 0x14, 0xf6, 0xa8, 0x74, 0x2a, 0xc8, 0x96, 0x15, 0x4b, 0xa9, 0xf7, 0xb6, 0xe8, 0x0a, 0x54, 0xd7, 0x89, 0x6b, 0x35]; - -if (typeof Int32Array !== 'undefined') { - TABLE = new Int32Array(TABLE); -} - -module.exports = create('dallas-1-wire', function(buf, previous) { - var byte, crc, _i, _len; - if (!Buffer.isBuffer(buf)) { - buf = Buffer(buf); - } - crc = ~~previous; - for (_i = 0, _len = buf.length; _i < _len; _i++) { - byte = buf[_i]; - crc = TABLE[(crc ^ byte) & 0xff] & 0xff; - } - return crc; -}); diff --git a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/create.js b/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/create.js deleted file mode 100644 index 2d856bd..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/create.js +++ /dev/null @@ -1,11 +0,0 @@ -// Generated by CoffeeScript 1.7.1 -module.exports = function(model, calc) { - var fn; - fn = function(buf, previous) { - return calc(buf, previous) >>> 0; - }; - fn.signed = calc; - fn.unsigned = fn; - fn.model = model; - return fn; -}; diff --git a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/hex.js b/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/hex.js deleted file mode 100644 index 0a6aa4c..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/hex.js +++ /dev/null @@ -1,9 +0,0 @@ -// Generated by CoffeeScript 1.7.1 -module.exports = function(number) { - var result; - result = number.toString(16); - while (result.length % 2) { - result = "0" + result; - } - return result; -}; diff --git a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/index.js b/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/index.js deleted file mode 100644 index 15ac34c..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/lib/index.js +++ /dev/null @@ -1,11 +0,0 @@ -// Generated by CoffeeScript 1.7.1 -module.exports = { - crc1: require('./crc1'), - crc8: require('./crc8'), - crc81wire: require('./crc8_1wire'), - crc16: require('./crc16'), - crc16ccitt: require('./crc16_ccitt'), - crc16modbus: require('./crc16_modbus'), - crc24: require('./crc24'), - crc32: require('./crc32') -}; diff --git a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/package.json b/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/package.json deleted file mode 100644 index b0ceb1e..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/node_modules/crc/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "crc", - "version": "3.2.1", - "description": "Various CRC JavaScript implementations", - "keywords": [ - "crc" - ], - "main": "./lib/index.js", - "scripts": { - "test": "mocha test/*.spec.coffee", - "pretest": "coffee --bare --output ./lib --compile ./src/*.coffee" - }, - "author": { - "name": "Alex Gorbatchev", - "url": "https://github.com/alexgorbatchev" - }, - "devDependencies": { - "beautify-benchmark": "^0.2.4", - "benchmark": "^1.0.0", - "buffer-crc32": "^0.2.3", - "chai": "~1.9.1", - "coffee-errors": "~0.8.6", - "coffee-script": "~1.7.1", - "mocha": "*", - "seedrandom": "^2.3.6" - }, - "homepage": "https://github.com/alexgorbatchev/node-crc", - "bugs": { - "url": "https://github.com/alexgorbatchev/node-crc/issues" - }, - "repository": { - "type": "git", - "url": "git://github.com/alexgorbatchev/node-crc.git" - }, - "license": "MIT", - "gitHead": "71caf362b061992bfe4ca8706ee264e764d2e88e", - "_id": "crc@3.2.1", - "_shasum": "5d9c8fb77a245cd5eca291e5d2d005334bab0082", - "_from": "crc@3.2.1", - "_npmVersion": "1.4.13", - "_npmUser": { - "name": "alexgorbatchev", - "email": "alex.gorbatchev@gmail.com" - }, - "maintainers": [ - { - "name": "alexgorbatchev", - "email": "alex.gorbatchev@gmail.com" - } - ], - "dist": { - "shasum": "5d9c8fb77a245cd5eca291e5d2d005334bab0082", - "tarball": "http://registry.npmjs.org/crc/-/crc-3.2.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/crc/-/crc-3.2.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/etag/package.json b/s4t-server-node/node_modules/express/node_modules/etag/package.json deleted file mode 100644 index 901a5fe..0000000 --- a/s4t-server-node/node_modules/express/node_modules/etag/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "etag", - "description": "Create simple ETags", - "version": "1.5.1", - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "David Björklund", - "email": "david.bjorklund@gmail.com" - } - ], - "license": "MIT", - "keywords": [ - "etag", - "http", - "res" - ], - "repository": { - "type": "git", - "url": "https://github.com/jshttp/etag" - }, - "dependencies": { - "crc": "3.2.1" - }, - "devDependencies": { - "benchmark": "1.0.0", - "beautify-benchmark": "0.2.4", - "istanbul": "0.3.2", - "mocha": "~1.21.4", - "seedrandom": "~2.3.6" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "bench": "node benchmark/index.js", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - }, - "gitHead": "27335e2265388109e50a9f037452081dc8a8260f", - "bugs": { - "url": "https://github.com/jshttp/etag/issues" - }, - "homepage": "https://github.com/jshttp/etag", - "_id": "etag@1.5.1", - "_shasum": "54c50de04ee42695562925ac566588291be7e9ea", - "_from": "etag@>=1.5.1 <1.6.0", - "_npmVersion": "1.4.21", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - } - ], - "dist": { - "shasum": "54c50de04ee42695562925ac566588291be7e9ea", - "tarball": "http://registry.npmjs.org/etag/-/etag-1.5.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/etag/-/etag-1.5.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/finalhandler/HISTORY.md b/s4t-server-node/node_modules/express/node_modules/finalhandler/HISTORY.md deleted file mode 100644 index 6f5cb71..0000000 --- a/s4t-server-node/node_modules/express/node_modules/finalhandler/HISTORY.md +++ /dev/null @@ -1,57 +0,0 @@ -0.3.3 / 2015-01-01 -================== - - * deps: debug@~2.1.1 - * deps: on-finished@~2.2.0 - -0.3.2 / 2014-10-22 -================== - - * deps: on-finished@~2.1.1 - - Fix handling of pipelined requests - -0.3.1 / 2014-10-16 -================== - - * deps: debug@~2.1.0 - - Implement `DEBUG_FD` env variable support - -0.3.0 / 2014-09-17 -================== - - * Terminate in progress response only on error - * Use `on-finished` to determine request status - -0.2.0 / 2014-09-03 -================== - - * Set `X-Content-Type-Options: nosniff` header - * deps: debug@~2.0.0 - -0.1.0 / 2014-07-16 -================== - - * Respond after request fully read - - prevents hung responses and socket hang ups - * deps: debug@1.0.4 - -0.0.3 / 2014-07-11 -================== - - * deps: debug@1.0.3 - - Add support for multiple wildcards in namespaces - -0.0.2 / 2014-06-19 -================== - - * Handle invalid status codes - -0.0.1 / 2014-06-05 -================== - - * deps: debug@1.0.2 - -0.0.0 / 2014-06-05 -================== - - * Extracted from connect/express diff --git a/s4t-server-node/node_modules/express/node_modules/finalhandler/LICENSE b/s4t-server-node/node_modules/express/node_modules/finalhandler/LICENSE deleted file mode 100644 index eda2305..0000000 --- a/s4t-server-node/node_modules/express/node_modules/finalhandler/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 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/s4t-server-node/node_modules/express/node_modules/finalhandler/README.md b/s4t-server-node/node_modules/express/node_modules/finalhandler/README.md deleted file mode 100644 index 2015ac0..0000000 --- a/s4t-server-node/node_modules/express/node_modules/finalhandler/README.md +++ /dev/null @@ -1,133 +0,0 @@ -# finalhandler - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Node.js function to invoke as the final step to respond to HTTP request. - -## Installation - -```sh -$ npm install finalhandler -``` - -## API - -```js -var finalhandler = require('finalhandler') -``` - -### finalhandler(req, res, [options]) - -Returns function to be invoked as the final step for the given `req` and `res`. -This function is to be invoked as `fn(err)`. If `err` is falsy, the handler will -write out a 404 response to the `res`. If it is truthy, an error response will -be written out to the `res`, and `res.statusCode` is set from `err.status`. - -The final handler will also unpipe anything from `req` when it is invoked. - -#### options.env - -By default, the environment is determined by `NODE_ENV` variable, but it can be -overridden by this option. - -#### options.onerror - -Provide a function to be called with the `err` when it exists. Can be used for -writing errors to a central location without excessive function generation. Called -as `onerror(err, req, res)`. - -## Examples - -### always 404 - -```js -var finalhandler = require('finalhandler') -var http = require('http') - -var server = http.createServer(function (req, res) { - var done = finalhandler(req, res) - done() -}) - -server.listen(3000) -``` - -### perform simple action - -```js -var finalhandler = require('finalhandler') -var fs = require('fs') -var http = require('http') - -var server = http.createServer(function (req, res) { - var done = finalhandler(req, res) - - fs.readFile('index.html', function (err, buf) { - if (err) return done(err) - res.setHeader('Content-Type', 'text/html') - res.end(buf) - }) -}) - -server.listen(3000) -``` - -### use with middleware-style functions - -```js -var finalhandler = require('finalhandler') -var http = require('http') -var serveStatic = require('serve-static') - -var serve = serveStatic('public') - -var server = http.createServer(function (req, res) { - var done = finalhandler(req, res) - serve(req, res, done) -}) - -server.listen(3000) -``` - -### keep log of all errors - -```js -var finalhandler = require('finalhandler') -var fs = require('fs') -var http = require('http') - -var server = http.createServer(function (req, res) { - var done = finalhandler(req, res, {onerror: logerror}) - - fs.readFile('index.html', function (err, buf) { - if (err) return done(err) - res.setHeader('Content-Type', 'text/html') - res.end(buf) - }) -}) - -server.listen(3000) - -function logerror(err) { - console.error(err.stack || err.toString()) -} -``` - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/finalhandler.svg?style=flat -[npm-url]: https://npmjs.org/package/finalhandler -[node-image]: https://img.shields.io/node/v/finalhandler.svg?style=flat -[node-url]: http://nodejs.org/download/ -[travis-image]: https://img.shields.io/travis/pillarjs/finalhandler.svg?style=flat -[travis-url]: https://travis-ci.org/pillarjs/finalhandler -[coveralls-image]: https://img.shields.io/coveralls/pillarjs/finalhandler.svg?style=flat -[coveralls-url]: https://coveralls.io/r/pillarjs/finalhandler?branch=master -[downloads-image]: https://img.shields.io/npm/dm/finalhandler.svg?style=flat -[downloads-url]: https://npmjs.org/package/finalhandler diff --git a/s4t-server-node/node_modules/express/node_modules/finalhandler/index.js b/s4t-server-node/node_modules/express/node_modules/finalhandler/index.js deleted file mode 100644 index bb2bb58..0000000 --- a/s4t-server-node/node_modules/express/node_modules/finalhandler/index.js +++ /dev/null @@ -1,171 +0,0 @@ -/*! - * finalhandler - * Copyright(c) 2014 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var debug = require('debug')('finalhandler') -var escapeHtml = require('escape-html') -var http = require('http') -var onFinished = require('on-finished') - -/** - * Variables. - */ - -/* istanbul ignore next */ -var defer = typeof setImmediate === 'function' - ? setImmediate - : function(fn){ process.nextTick(fn.bind.apply(fn, arguments)) } -var isFinished = onFinished.isFinished - -/** - * Module exports. - */ - -module.exports = finalhandler - -/** - * Final handler: - * - * @param {Request} req - * @param {Response} res - * @param {Object} [options] - * @return {Function} - * @api public - */ - -function finalhandler(req, res, options) { - options = options || {} - - // get environment - var env = options.env || process.env.NODE_ENV || 'development' - - // get error callback - var onerror = options.onerror - - return function (err) { - var msg - - // ignore 404 on in-flight response - if (!err && res._header) { - debug('cannot 404 after headers sent') - return - } - - // unhandled error - if (err) { - // default status code to 500 - if (!res.statusCode || res.statusCode < 400) { - res.statusCode = 500 - } - - // respect err.status - if (err.status) { - res.statusCode = err.status - } - - // production gets a basic error message - var msg = env === 'production' - ? http.STATUS_CODES[res.statusCode] - : err.stack || err.toString() - msg = escapeHtml(msg) - .replace(/\n/g, '
') - .replace(/ /g, '  ') + '\n' - } else { - res.statusCode = 404 - msg = 'Cannot ' + escapeHtml(req.method) + ' ' + escapeHtml(req.originalUrl || req.url) + '\n' - } - - debug('default %s', res.statusCode) - - // schedule onerror callback - if (err && onerror) { - defer(onerror, err, req, res) - } - - // cannot actually respond - if (res._header) { - return req.socket.destroy() - } - - send(req, res, res.statusCode, msg) - } -} - -/** - * Send response. - * - * @param {IncomingMessage} req - * @param {OutgoingMessage} res - * @param {number} status - * @param {string} body - * @api private - */ - -function send(req, res, status, body) { - function write() { - res.statusCode = status - - // security header for content sniffing - res.setHeader('X-Content-Type-Options', 'nosniff') - - // standard headers - res.setHeader('Content-Type', 'text/html; charset=utf-8') - res.setHeader('Content-Length', Buffer.byteLength(body, 'utf8')) - - if (req.method === 'HEAD') { - res.end() - return - } - - res.end(body, 'utf8') - } - - if (isFinished(req)) { - write() - return - } - - // unpipe everything from the request - unpipe(req) - - // flush the request - onFinished(req, write) - req.resume() -} - -/** - * Unpipe everything from a stream. - * - * @param {Object} stream - * @api private - */ - -/* istanbul ignore next: implementation differs between versions */ -function unpipe(stream) { - if (typeof stream.unpipe === 'function') { - // new-style - stream.unpipe() - return - } - - // Node.js 0.8 hack - var listener - var listeners = stream.listeners('close') - - for (var i = 0; i < listeners.length; i++) { - listener = listeners[i] - - if (listener.name !== 'cleanup' && listener.name !== 'onclose') { - continue - } - - // invoke the listener - listener.call(stream) - } -} diff --git a/s4t-server-node/node_modules/express/node_modules/finalhandler/package.json b/s4t-server-node/node_modules/express/node_modules/finalhandler/package.json deleted file mode 100644 index 11acd79..0000000 --- a/s4t-server-node/node_modules/express/node_modules/finalhandler/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "finalhandler", - "description": "Node.js final http responder", - "version": "0.3.3", - "author": { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/pillarjs/finalhandler" - }, - "dependencies": { - "debug": "~2.1.1", - "escape-html": "1.0.1", - "on-finished": "~2.2.0" - }, - "devDependencies": { - "istanbul": "0.3.5", - "mocha": "~2.1.0", - "readable-stream": "~1.0.33", - "supertest": "~0.15.0" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "index.js" - ], - "engines": { - "node": ">= 0.8" - }, - "scripts": { - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - }, - "gitHead": "dfce5042f996ba93ac85b9282e6d1cae1561acc6", - "bugs": { - "url": "https://github.com/pillarjs/finalhandler/issues" - }, - "homepage": "https://github.com/pillarjs/finalhandler", - "_id": "finalhandler@0.3.3", - "_shasum": "b1a09aa1e6a607b3541669b09bcb727f460cd426", - "_from": "finalhandler@0.3.3", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "shtylman", - "email": "shtylman@gmail.com" - }, - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "fishrock123", - "email": "fishrock123@rocketmail.com" - } - ], - "dist": { - "shasum": "b1a09aa1e6a607b3541669b09bcb727f460cd426", - "tarball": "http://registry.npmjs.org/finalhandler/-/finalhandler-0.3.3.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.3.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/fresh/HISTORY.md b/s4t-server-node/node_modules/express/node_modules/fresh/HISTORY.md deleted file mode 100644 index 56361df..0000000 --- a/s4t-server-node/node_modules/express/node_modules/fresh/HISTORY.md +++ /dev/null @@ -1,24 +0,0 @@ -0.2.4 / 2014-09-07 -================== - - * Support Node.js 0.6 - -0.2.3 / 2014-09-07 -================== - - * Move repository to jshttp - -0.2.2 / 2014-02-19 -================== - - * Revert "Fix for blank page on Safari reload" - -0.2.1 / 2014-01-29 -================== - - * fix: support max-age=0 for end-to-end revalidation - -0.2.0 / 2013-08-11 -================== - - * fix: return false for no-cache diff --git a/s4t-server-node/node_modules/express/node_modules/fresh/LICENSE b/s4t-server-node/node_modules/express/node_modules/fresh/LICENSE deleted file mode 100644 index f527394..0000000 --- a/s4t-server-node/node_modules/express/node_modules/fresh/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/s4t-server-node/node_modules/express/node_modules/fresh/README.md b/s4t-server-node/node_modules/express/node_modules/fresh/README.md deleted file mode 100644 index 54a885f..0000000 --- a/s4t-server-node/node_modules/express/node_modules/fresh/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# fresh - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -HTTP response freshness testing - -## Installation - -``` -$ npm install fresh -``` - -## API - -```js -var fresh = require('fresh') -``` - -### fresh(req, res) - - Check freshness of `req` and `res` headers. - - When the cache is "fresh" __true__ is returned, - otherwise __false__ is returned to indicate that - the cache is now stale. - -## Example - -```js -var req = { 'if-none-match': 'tobi' }; -var res = { 'etag': 'luna' }; -fresh(req, res); -// => false - -var req = { 'if-none-match': 'tobi' }; -var res = { 'etag': 'tobi' }; -fresh(req, res); -// => true -``` - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/fresh.svg?style=flat -[npm-url]: https://npmjs.org/package/fresh -[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat -[node-version-url]: http://nodejs.org/download/ -[travis-image]: https://img.shields.io/travis/jshttp/fresh.svg?style=flat -[travis-url]: https://travis-ci.org/jshttp/fresh -[coveralls-image]: https://img.shields.io/coveralls/jshttp/fresh.svg?style=flat -[coveralls-url]: https://coveralls.io/r/jshttp/fresh?branch=master -[downloads-image]: https://img.shields.io/npm/dm/fresh.svg?style=flat -[downloads-url]: https://npmjs.org/package/fresh diff --git a/s4t-server-node/node_modules/express/node_modules/fresh/index.js b/s4t-server-node/node_modules/express/node_modules/fresh/index.js deleted file mode 100644 index 9c3f47d..0000000 --- a/s4t-server-node/node_modules/express/node_modules/fresh/index.js +++ /dev/null @@ -1,53 +0,0 @@ - -/** - * Expose `fresh()`. - */ - -module.exports = fresh; - -/** - * Check freshness of `req` and `res` headers. - * - * When the cache is "fresh" __true__ is returned, - * otherwise __false__ is returned to indicate that - * the cache is now stale. - * - * @param {Object} req - * @param {Object} res - * @return {Boolean} - * @api public - */ - -function fresh(req, res) { - // defaults - var etagMatches = true; - var notModified = true; - - // fields - var modifiedSince = req['if-modified-since']; - var noneMatch = req['if-none-match']; - var lastModified = res['last-modified']; - var etag = res['etag']; - var cc = req['cache-control']; - - // unconditional request - if (!modifiedSince && !noneMatch) return false; - - // check for no-cache cache request directive - if (cc && cc.indexOf('no-cache') !== -1) return false; - - // parse if-none-match - if (noneMatch) noneMatch = noneMatch.split(/ *, */); - - // if-none-match - if (noneMatch) etagMatches = ~noneMatch.indexOf(etag) || '*' == noneMatch[0]; - - // if-modified-since - if (modifiedSince) { - modifiedSince = new Date(modifiedSince); - lastModified = new Date(lastModified); - notModified = lastModified <= modifiedSince; - } - - return !! (etagMatches && notModified); -} \ No newline at end of file diff --git a/s4t-server-node/node_modules/express/node_modules/fresh/package.json b/s4t-server-node/node_modules/express/node_modules/fresh/package.json deleted file mode 100644 index a153522..0000000 --- a/s4t-server-node/node_modules/express/node_modules/fresh/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "fresh", - "description": "HTTP response freshness testing", - "version": "0.2.4", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "license": "MIT", - "keywords": [ - "fresh", - "http", - "conditional", - "cache" - ], - "repository": { - "type": "git", - "url": "https://github.com/jshttp/fresh" - }, - "devDependencies": { - "istanbul": "0", - "mocha": "1", - "should": "3" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "test": "mocha --reporter spec --require should", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --require should", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot --require should" - }, - "gitHead": "8440a4ca75fb091dec06e88654b3b1c31d7e7164", - "bugs": { - "url": "https://github.com/jshttp/fresh/issues" - }, - "homepage": "https://github.com/jshttp/fresh", - "_id": "fresh@0.2.4", - "_shasum": "3582499206c9723714190edd74b4604feb4a614c", - "_from": "fresh@0.2.4", - "_npmVersion": "1.4.21", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "jonathanong", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - } - ], - "dist": { - "shasum": "3582499206c9723714190edd74b4604feb4a614c", - "tarball": "http://registry.npmjs.org/fresh/-/fresh-0.2.4.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/fresh/-/fresh-0.2.4.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/media-typer/HISTORY.md b/s4t-server-node/node_modules/express/node_modules/media-typer/HISTORY.md deleted file mode 100644 index 62c2003..0000000 --- a/s4t-server-node/node_modules/express/node_modules/media-typer/HISTORY.md +++ /dev/null @@ -1,22 +0,0 @@ -0.3.0 / 2014-09-07 -================== - - * Support Node.js 0.6 - * Throw error when parameter format invalid on parse - -0.2.0 / 2014-06-18 -================== - - * Add `typer.format()` to format media types - -0.1.0 / 2014-06-17 -================== - - * Accept `req` as argument to `parse` - * Accept `res` as argument to `parse` - * Parse media type with extra LWS between type and first parameter - -0.0.0 / 2014-06-13 -================== - - * Initial implementation diff --git a/s4t-server-node/node_modules/express/node_modules/media-typer/LICENSE b/s4t-server-node/node_modules/express/node_modules/media-typer/LICENSE deleted file mode 100644 index b7dce6c..0000000 --- a/s4t-server-node/node_modules/express/node_modules/media-typer/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 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/s4t-server-node/node_modules/express/node_modules/media-typer/README.md b/s4t-server-node/node_modules/express/node_modules/media-typer/README.md deleted file mode 100644 index d8df623..0000000 --- a/s4t-server-node/node_modules/express/node_modules/media-typer/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# media-typer - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Simple RFC 6838 media type parser - -## Installation - -```sh -$ npm install media-typer -``` - -## API - -```js -var typer = require('media-typer') -``` - -### typer.parse(string) - -```js -var obj = typer.parse('image/svg+xml; charset=utf-8') -``` - -Parse a media type string. This will return an object with the following -properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`): - - - `type`: The type of the media type (always lower case). Example: `'image'` - - - `subtype`: The subtype of the media type (always lower case). Example: `'svg'` - - - `suffix`: The suffix of the media type (always lower case). Example: `'xml'` - - - `parameters`: An object of the parameters in the media type (name of parameter always lower case). Example: `{charset: 'utf-8'}` - -### typer.parse(req) - -```js -var obj = typer.parse(req) -``` - -Parse the `content-type` header from the given `req`. Short-cut for -`typer.parse(req.headers['content-type'])`. - -### typer.parse(res) - -```js -var obj = typer.parse(res) -``` - -Parse the `content-type` header set on the given `res`. Short-cut for -`typer.parse(res.getHeader('content-type'))`. - -### typer.format(obj) - -```js -var obj = typer.format({type: 'image', subtype: 'svg', suffix: 'xml'}) -``` - -Format an object into a media type string. This will return a string of the -mime type for the given object. For the properties of the object, see the -documentation for `typer.parse(string)`. - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/media-typer.svg?style=flat -[npm-url]: https://npmjs.org/package/media-typer -[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat -[node-version-url]: http://nodejs.org/download/ -[travis-image]: https://img.shields.io/travis/jshttp/media-typer.svg?style=flat -[travis-url]: https://travis-ci.org/jshttp/media-typer -[coveralls-image]: https://img.shields.io/coveralls/jshttp/media-typer.svg?style=flat -[coveralls-url]: https://coveralls.io/r/jshttp/media-typer -[downloads-image]: https://img.shields.io/npm/dm/media-typer.svg?style=flat -[downloads-url]: https://npmjs.org/package/media-typer diff --git a/s4t-server-node/node_modules/express/node_modules/media-typer/index.js b/s4t-server-node/node_modules/express/node_modules/media-typer/index.js deleted file mode 100644 index 07f7295..0000000 --- a/s4t-server-node/node_modules/express/node_modules/media-typer/index.js +++ /dev/null @@ -1,270 +0,0 @@ -/*! - * media-typer - * Copyright(c) 2014 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * RegExp to match *( ";" parameter ) in RFC 2616 sec 3.7 - * - * parameter = token "=" ( token | quoted-string ) - * token = 1* - * separators = "(" | ")" | "<" | ">" | "@" - * | "," | ";" | ":" | "\" | <"> - * | "/" | "[" | "]" | "?" | "=" - * | "{" | "}" | SP | HT - * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> ) - * qdtext = > - * quoted-pair = "\" CHAR - * CHAR = - * TEXT = - * LWS = [CRLF] 1*( SP | HT ) - * CRLF = CR LF - * CR = - * LF = - * SP = - * SHT = - * CTL = - * OCTET = - */ -var paramRegExp = /; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g; -var textRegExp = /^[\u0020-\u007e\u0080-\u00ff]+$/ -var tokenRegExp = /^[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+$/ - -/** - * RegExp to match quoted-pair in RFC 2616 - * - * quoted-pair = "\" CHAR - * CHAR = - */ -var qescRegExp = /\\([\u0000-\u007f])/g; - -/** - * RegExp to match chars that must be quoted-pair in RFC 2616 - */ -var quoteRegExp = /([\\"])/g; - -/** - * RegExp to match type in RFC 6838 - * - * type-name = restricted-name - * subtype-name = restricted-name - * restricted-name = restricted-name-first *126restricted-name-chars - * restricted-name-first = ALPHA / DIGIT - * restricted-name-chars = ALPHA / DIGIT / "!" / "#" / - * "$" / "&" / "-" / "^" / "_" - * restricted-name-chars =/ "." ; Characters before first dot always - * ; specify a facet name - * restricted-name-chars =/ "+" ; Characters after last plus always - * ; specify a structured syntax suffix - * ALPHA = %x41-5A / %x61-7A ; A-Z / a-z - * DIGIT = %x30-39 ; 0-9 - */ -var subtypeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/ -var typeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/ -var typeRegExp = /^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/; - -/** - * Module exports. - */ - -exports.format = format -exports.parse = parse - -/** - * Format object to media type. - * - * @param {object} obj - * @return {string} - * @api public - */ - -function format(obj) { - if (!obj || typeof obj !== 'object') { - throw new TypeError('argument obj is required') - } - - var parameters = obj.parameters - var subtype = obj.subtype - var suffix = obj.suffix - var type = obj.type - - if (!type || !typeNameRegExp.test(type)) { - throw new TypeError('invalid type') - } - - if (!subtype || !subtypeNameRegExp.test(subtype)) { - throw new TypeError('invalid subtype') - } - - // format as type/subtype - var string = type + '/' + subtype - - // append +suffix - if (suffix) { - if (!typeNameRegExp.test(suffix)) { - throw new TypeError('invalid suffix') - } - - string += '+' + suffix - } - - // append parameters - if (parameters && typeof parameters === 'object') { - var param - var params = Object.keys(parameters).sort() - - for (var i = 0; i < params.length; i++) { - param = params[i] - - if (!tokenRegExp.test(param)) { - throw new TypeError('invalid parameter name') - } - - string += '; ' + param + '=' + qstring(parameters[param]) - } - } - - return string -} - -/** - * Parse media type to object. - * - * @param {string|object} string - * @return {Object} - * @api public - */ - -function parse(string) { - if (!string) { - throw new TypeError('argument string is required') - } - - // support req/res-like objects as argument - if (typeof string === 'object') { - string = getcontenttype(string) - } - - if (typeof string !== 'string') { - throw new TypeError('argument string is required to be a string') - } - - var index = string.indexOf(';') - var type = index !== -1 - ? string.substr(0, index) - : string - - var key - var match - var obj = splitType(type) - var params = {} - var value - - paramRegExp.lastIndex = index - - while (match = paramRegExp.exec(string)) { - if (match.index !== index) { - throw new TypeError('invalid parameter format') - } - - index += match[0].length - key = match[1].toLowerCase() - value = match[2] - - if (value[0] === '"') { - // remove quotes and escapes - value = value - .substr(1, value.length - 2) - .replace(qescRegExp, '$1') - } - - params[key] = value - } - - if (index !== -1 && index !== string.length) { - throw new TypeError('invalid parameter format') - } - - obj.parameters = params - - return obj -} - -/** - * Get content-type from req/res objects. - * - * @param {object} - * @return {Object} - * @api private - */ - -function getcontenttype(obj) { - if (typeof obj.getHeader === 'function') { - // res-like - return obj.getHeader('content-type') - } - - if (typeof obj.headers === 'object') { - // req-like - return obj.headers && obj.headers['content-type'] - } -} - -/** - * Quote a string if necessary. - * - * @param {string} val - * @return {string} - * @api private - */ - -function qstring(val) { - var str = String(val) - - // no need to quote tokens - if (tokenRegExp.test(str)) { - return str - } - - if (str.length > 0 && !textRegExp.test(str)) { - throw new TypeError('invalid parameter value') - } - - return '"' + str.replace(quoteRegExp, '\\$1') + '"' -} - -/** - * Simply "type/subtype+siffx" into parts. - * - * @param {string} string - * @return {Object} - * @api private - */ - -function splitType(string) { - var match = typeRegExp.exec(string.toLowerCase()) - - if (!match) { - throw new TypeError('invalid media type') - } - - var type = match[1] - var subtype = match[2] - var suffix - - // suffix after last + - var index = subtype.lastIndexOf('+') - if (index !== -1) { - suffix = subtype.substr(index + 1) - subtype = subtype.substr(0, index) - } - - var obj = { - type: type, - subtype: subtype, - suffix: suffix - } - - return obj -} diff --git a/s4t-server-node/node_modules/express/node_modules/media-typer/package.json b/s4t-server-node/node_modules/express/node_modules/media-typer/package.json deleted file mode 100644 index 4bd1a51..0000000 --- a/s4t-server-node/node_modules/express/node_modules/media-typer/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "media-typer", - "description": "Simple RFC 6838 media type parser and formatter", - "version": "0.3.0", - "author": { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/jshttp/media-typer" - }, - "devDependencies": { - "istanbul": "0.3.2", - "mocha": "~1.21.4", - "should": "~4.0.4" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "test": "mocha --reporter spec --check-leaks --bail test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - }, - "gitHead": "d49d41ffd0bb5a0655fa44a59df2ec0bfc835b16", - "bugs": { - "url": "https://github.com/jshttp/media-typer/issues" - }, - "homepage": "https://github.com/jshttp/media-typer", - "_id": "media-typer@0.3.0", - "_shasum": "8710d7af0aa626f8fffa1ce00168545263255748", - "_from": "media-typer@0.3.0", - "_npmVersion": "1.4.21", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - } - ], - "dist": { - "shasum": "8710d7af0aa626f8fffa1ce00168545263255748", - "tarball": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/merge-descriptors/.npmignore b/s4t-server-node/node_modules/express/node_modules/merge-descriptors/.npmignore deleted file mode 100644 index f62e605..0000000 --- a/s4t-server-node/node_modules/express/node_modules/merge-descriptors/.npmignore +++ /dev/null @@ -1,59 +0,0 @@ -# Compiled source # -################### -*.com -*.class -*.dll -*.exe -*.o -*.so - -# Packages # -############ -# it's better to unpack these files and commit the raw source -# git has its own built in compression methods -*.7z -*.dmg -*.gz -*.iso -*.jar -*.rar -*.tar -*.zip - -# Logs and databases # -###################### -*.log -*.sql -*.sqlite - -# OS generated files # -###################### -.DS_Store* -ehthumbs.db -Icon? -Thumbs.db - -# Node.js # -########### -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -node_modules -npm-debug.log - -# Components # -############## - -/build -/components -/vendors \ No newline at end of file diff --git a/s4t-server-node/node_modules/express/node_modules/merge-descriptors/README.md b/s4t-server-node/node_modules/express/node_modules/merge-descriptors/README.md deleted file mode 100644 index 50cf50c..0000000 --- a/s4t-server-node/node_modules/express/node_modules/merge-descriptors/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# Merge Descriptors [![Build Status](https://travis-ci.org/component/merge-descriptors.png)](https://travis-ci.org/component/merge-descriptors) - -Merge objects using descriptors. - -```js -var thing = { - get name() { - return 'jon' - } -} - -var animal = { - -} - -merge(animal, thing) - -animal.name === 'jon' -``` - -## API - -### merge(destination, source) - -Overwrites `destination`'s descriptors with `source`'s. - -## License - -The MIT License (MIT) - -Copyright (c) 2013 Jonathan Ong me@jongleberry.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/s4t-server-node/node_modules/express/node_modules/merge-descriptors/component.json b/s4t-server-node/node_modules/express/node_modules/merge-descriptors/component.json deleted file mode 100644 index 7653906..0000000 --- a/s4t-server-node/node_modules/express/node_modules/merge-descriptors/component.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "merge-descriptors", - "description": "Merge objects using descriptors", - "version": "0.0.2", - "scripts": [ - "index.js" - ], - "repo": "component/merge-descriptors", - "license": "MIT" -} \ No newline at end of file diff --git a/s4t-server-node/node_modules/express/node_modules/merge-descriptors/index.js b/s4t-server-node/node_modules/express/node_modules/merge-descriptors/index.js deleted file mode 100644 index e4e2379..0000000 --- a/s4t-server-node/node_modules/express/node_modules/merge-descriptors/index.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = function (dest, src) { - Object.getOwnPropertyNames(src).forEach(function (name) { - var descriptor = Object.getOwnPropertyDescriptor(src, name) - Object.defineProperty(dest, name, descriptor) - }) - - return dest -} \ No newline at end of file diff --git a/s4t-server-node/node_modules/express/node_modules/merge-descriptors/package.json b/s4t-server-node/node_modules/express/node_modules/merge-descriptors/package.json deleted file mode 100644 index b1b83d4..0000000 --- a/s4t-server-node/node_modules/express/node_modules/merge-descriptors/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "merge-descriptors", - "description": "Merge objects using descriptors", - "version": "0.0.2", - "author": { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/component/merge-descriptors.git" - }, - "bugs": { - "url": "https://github.com/component/merge-descriptors/issues" - }, - "scripts": { - "test": "make test;" - }, - "homepage": "https://github.com/component/merge-descriptors", - "_id": "merge-descriptors@0.0.2", - "dist": { - "shasum": "c36a52a781437513c57275f39dd9d317514ac8c7", - "tarball": "http://registry.npmjs.org/merge-descriptors/-/merge-descriptors-0.0.2.tgz" - }, - "_from": "merge-descriptors@0.0.2", - "_npmVersion": "1.3.17", - "_npmUser": { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - }, - "maintainers": [ - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - } - ], - "directories": {}, - "_shasum": "c36a52a781437513c57275f39dd9d317514ac8c7", - "_resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-0.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/methods/HISTORY.md b/s4t-server-node/node_modules/express/node_modules/methods/HISTORY.md deleted file mode 100644 index c9e302c..0000000 --- a/s4t-server-node/node_modules/express/node_modules/methods/HISTORY.md +++ /dev/null @@ -1,24 +0,0 @@ -1.1.1 / 2014-12-30 -================== - - * Improve `browserify` support - -1.1.0 / 2014-07-05 -================== - - * Add `CONNECT` method - -1.0.1 / 2014-06-02 -================== - - * Fix module to work with harmony transform - -1.0.0 / 2014-05-08 -================== - - * Add `PURGE` method - -0.1.0 / 2013-10-28 -================== - - * Add `http.METHODS` support diff --git a/s4t-server-node/node_modules/express/node_modules/methods/LICENSE b/s4t-server-node/node_modules/express/node_modules/methods/LICENSE deleted file mode 100644 index 8bce401..0000000 --- a/s4t-server-node/node_modules/express/node_modules/methods/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2013-2014 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/s4t-server-node/node_modules/express/node_modules/methods/README.md b/s4t-server-node/node_modules/express/node_modules/methods/README.md deleted file mode 100644 index dccc473..0000000 --- a/s4t-server-node/node_modules/express/node_modules/methods/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# Methods - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - - HTTP verbs that node core's parser supports. - - -## Install - -```bash -$ npm install methods -``` - -## API - -```js -var methods = require('methods') -``` - -### methods - -This is an array of lower-case method names that Node.js supports. - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/methods.svg?style=flat -[npm-url]: https://npmjs.org/package/methods -[node-version-image]: https://img.shields.io/node/v/methods.svg?style=flat -[node-version-url]: http://nodejs.org/download/ -[travis-image]: https://img.shields.io/travis/jshttp/methods.svg?style=flat -[travis-url]: https://travis-ci.org/jshttp/methods -[coveralls-image]: https://img.shields.io/coveralls/jshttp/methods.svg?style=flat -[coveralls-url]: https://coveralls.io/r/jshttp/methods?branch=master -[downloads-image]: https://img.shields.io/npm/dm/methods.svg?style=flat -[downloads-url]: https://npmjs.org/package/methods diff --git a/s4t-server-node/node_modules/express/node_modules/methods/index.js b/s4t-server-node/node_modules/express/node_modules/methods/index.js deleted file mode 100644 index e89c7fd..0000000 --- a/s4t-server-node/node_modules/express/node_modules/methods/index.js +++ /dev/null @@ -1,42 +0,0 @@ - -var http = require('http'); - -/* istanbul ignore next: implementation differs on version */ -if (http.METHODS) { - - module.exports = http.METHODS.map(function(method){ - return method.toLowerCase(); - }); - -} else { - - module.exports = [ - 'get', - 'post', - 'put', - 'head', - 'delete', - 'options', - 'trace', - 'copy', - 'lock', - 'mkcol', - 'move', - 'purge', - 'propfind', - 'proppatch', - 'unlock', - 'report', - 'mkactivity', - 'checkout', - 'merge', - 'm-search', - 'notify', - 'subscribe', - 'unsubscribe', - 'patch', - 'search', - 'connect' - ]; - -} diff --git a/s4t-server-node/node_modules/express/node_modules/methods/package.json b/s4t-server-node/node_modules/express/node_modules/methods/package.json deleted file mode 100644 index c1ce061..0000000 --- a/s4t-server-node/node_modules/express/node_modules/methods/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "name": "methods", - "description": "HTTP methods that node supports", - "version": "1.1.1", - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - }, - { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - } - ], - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/jshttp/methods" - }, - "devDependencies": { - "istanbul": "0.3", - "mocha": "1" - }, - "files": [ - "index.js", - "HISTORY.md", - "LICENSE" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "test": "mocha --reporter spec", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot" - }, - "browser": { - "http": false - }, - "keywords": [ - "http", - "methods" - ], - "gitHead": "6293c6b27c5fb963acf67a347af80ad2ebd7247f", - "bugs": { - "url": "https://github.com/jshttp/methods/issues" - }, - "homepage": "https://github.com/jshttp/methods", - "_id": "methods@1.1.1", - "_shasum": "17ea6366066d00c58e375b8ec7dfd0453c89822a", - "_from": "methods@>=1.1.1 <1.2.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "jonathanong", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - } - ], - "dist": { - "shasum": "17ea6366066d00c58e375b8ec7dfd0453c89822a", - "tarball": "http://registry.npmjs.org/methods/-/methods-1.1.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/methods/-/methods-1.1.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/on-finished/HISTORY.md b/s4t-server-node/node_modules/express/node_modules/on-finished/HISTORY.md deleted file mode 100644 index 5d1e1c9..0000000 --- a/s4t-server-node/node_modules/express/node_modules/on-finished/HISTORY.md +++ /dev/null @@ -1,76 +0,0 @@ -2.2.0 / 2014-12-22 -================== - - * Add message object to callback arguments - -2.1.1 / 2014-10-22 -================== - - * Fix handling of pipelined requests - -2.1.0 / 2014-08-16 -================== - - * Check if `socket` is detached - * Return `undefined` for `isFinished` if state unknown - -2.0.0 / 2014-08-16 -================== - - * Add `isFinished` function - * Move to `jshttp` organization - * Remove support for plain socket argument - * Rename to `on-finished` - * Support both `req` and `res` as arguments - * deps: ee-first@1.0.5 - -1.2.2 / 2014-06-10 -================== - - * Reduce listeners added to emitters - - avoids "event emitter leak" warnings when used multiple times on same request - -1.2.1 / 2014-06-08 -================== - - * Fix returned value when already finished - -1.2.0 / 2014-06-05 -================== - - * Call callback when called on already-finished socket - -1.1.4 / 2014-05-27 -================== - - * Support node.js 0.8 - -1.1.3 / 2014-04-30 -================== - - * Make sure errors passed as instanceof `Error` - -1.1.2 / 2014-04-18 -================== - - * Default the `socket` to passed-in object - -1.1.1 / 2014-01-16 -================== - - * Rename module to `finished` - -1.1.0 / 2013-12-25 -================== - - * Call callback when called on already-errored socket - -1.0.1 / 2013-12-20 -================== - - * Actually pass the error to the callback - -1.0.0 / 2013-12-20 -================== - - * Initial release diff --git a/s4t-server-node/node_modules/express/node_modules/on-finished/LICENSE b/s4t-server-node/node_modules/express/node_modules/on-finished/LICENSE deleted file mode 100644 index 5931fd2..0000000 --- a/s4t-server-node/node_modules/express/node_modules/on-finished/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2013 Jonathan Ong -Copyright (c) 2014 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/s4t-server-node/node_modules/express/node_modules/on-finished/README.md b/s4t-server-node/node_modules/express/node_modules/on-finished/README.md deleted file mode 100644 index 29d6991..0000000 --- a/s4t-server-node/node_modules/express/node_modules/on-finished/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# on-finished - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Execute a callback when a request closes, finishes, or errors. - -## Install - -```sh -$ npm install on-finished -``` - -## API - -```js -var onFinished = require('on-finished') -``` - -### onFinished(res, listener) - -Attach a listener to listen for the response to finish. The listener will -be invoked only once when the response finished. If the response finished -to to an error, the first argument will contain the error. If the response -has already finished, the listener will be invoked. - -Listening to the end of a response would be used to close things associated -with the response, like open files. - -Listener is invoked as `listener(err, res)`. - -```js -onFinished(res, function (err, res) { - // clean up open fds, etc. - // err contains the error is request error'd -}) -``` - -### onFinished(req, listener) - -Attach a listener to listen for the request to finish. The listener will -be invoked only once when the request finished. If the request finished -to to an error, the first argument will contain the error. If the request -has already finished, the listener will be invoked. - -Listening to the end of a request would be used to know when to continue -after reading the data. - -Listener is invoked as `listener(err, req)`. - -```js -var data = '' - -req.setEncoding('utf8') -res.on('data', function (str) { - data += str -}) - -onFinished(req, function (err, req) { - // data is read unless there is err -}) -``` - -### onFinished.isFinished(res) - -Determine if `res` is already finished. This would be useful to check and -not even start certain operations if the response has already finished. - -### onFinished.isFinished(req) - -Determine if `req` is already finished. This would be useful to check and -not even start certain operations if the request has already finished. - -### Example - -The following code ensures that file descriptors are always closed -once the response finishes. - -```js -var destroy = require('destroy') -var http = require('http') -var onFinished = require('on-finished') - -http.createServer(function onRequest(req, res) { - var stream = fs.createReadStream('package.json') - stream.pipe(res) - onFinished(res, function (err) { - destroy(stream) - }) -}) -``` - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/on-finished.svg?style=flat -[npm-url]: https://npmjs.org/package/on-finished -[node-version-image]: https://img.shields.io/node/v/on-finished.svg?style=flat -[node-version-url]: http://nodejs.org/download/ -[travis-image]: https://img.shields.io/travis/jshttp/on-finished.svg?style=flat -[travis-url]: https://travis-ci.org/jshttp/on-finished -[coveralls-image]: https://img.shields.io/coveralls/jshttp/on-finished.svg?style=flat -[coveralls-url]: https://coveralls.io/r/jshttp/on-finished?branch=master -[downloads-image]: https://img.shields.io/npm/dm/on-finished.svg?style=flat -[downloads-url]: https://npmjs.org/package/on-finished diff --git a/s4t-server-node/node_modules/express/node_modules/on-finished/index.js b/s4t-server-node/node_modules/express/node_modules/on-finished/index.js deleted file mode 100644 index f68161c..0000000 --- a/s4t-server-node/node_modules/express/node_modules/on-finished/index.js +++ /dev/null @@ -1,191 +0,0 @@ -/*! - * on-finished - * Copyright(c) 2013 Jonathan Ong - * Copyright(c) 2014 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = onFinished; -module.exports.isFinished = isFinished; - -/** -* Module dependencies. -*/ - -var first = require('ee-first') - -/** -* Variables. -*/ - -/* istanbul ignore next */ -var defer = typeof setImmediate === 'function' - ? setImmediate - : function(fn){ process.nextTick(fn.bind.apply(fn, arguments)) } - -/** - * Invoke callback when the response has finished, useful for - * cleaning up resources afterwards. - * - * @param {object} msg - * @param {function} listener - * @return {object} - * @api public - */ - -function onFinished(msg, listener) { - if (isFinished(msg) !== false) { - defer(listener, null, msg) - return msg - } - - // attach the listener to the message - attachListener(msg, listener) - - return msg -} - -/** - * Determine if message is already finished. - * - * @param {object} msg - * @return {boolean} - * @api public - */ - -function isFinished(msg) { - var socket = msg.socket - - if (typeof msg.finished === 'boolean') { - // OutgoingMessage - return Boolean(msg.finished || (socket && !socket.writable)) - } - - if (typeof msg.complete === 'boolean') { - // IncomingMessage - return Boolean(!socket || msg.complete || !socket.readable) - } - - // don't know - return undefined -} - -/** - * Attach a finished listener to the message. - * - * @param {object} msg - * @param {function} callback - * @private - */ - -function attachFinishedListener(msg, callback) { - var eeMsg - var eeSocket - var finished = false - - function onFinish(error) { - eeMsg.cancel() - eeSocket.cancel() - - finished = true - callback(error) - } - - // finished on first message event - eeMsg = eeSocket = first([[msg, 'end', 'finish']], onFinish) - - function onSocket(socket) { - // remove listener - msg.removeListener('socket', onSocket) - - if (finished) return - if (eeMsg !== eeSocket) return - - // finished on first socket event - eeSocket = first([[socket, 'error', 'close']], onFinish) - } - - if (msg.socket) { - // socket already assigned - onSocket(msg.socket) - return - } - - // wait for socket to be assigned - msg.on('socket', onSocket) - - if (msg.socket === undefined) { - // node.js 0.8 patch - patchAssignSocket(msg, onSocket) - } -} - -/** - * Attach the listener to the message. - * - * @param {object} msg - * @return {function} - * @api private - */ - -function attachListener(msg, listener) { - var attached = msg.__onFinished - - // create a private single listener with queue - if (!attached || !attached.queue) { - attached = msg.__onFinished = createListener(msg) - attachFinishedListener(msg, attached) - } - - attached.queue.push(listener) -} - -/** - * Create listener on message. - * - * @param {object} msg - * @return {function} - * @api private - */ - -function createListener(msg) { - function listener(err) { - if (msg.__onFinished === listener) msg.__onFinished = null - if (!listener.queue) return - - var queue = listener.queue - listener.queue = null - - for (var i = 0; i < queue.length; i++) { - queue[i](err, msg) - } - } - - listener.queue = [] - - return listener -} - -/** - * Patch ServerResponse.prototype.assignSocket for node.js 0.8. - * - * @param {ServerResponse} res - * @param {function} callback - * @private - */ - -function patchAssignSocket(res, callback) { - var assignSocket = res.assignSocket - - if (typeof assignSocket !== 'function') return - - // res.on('socket', callback) is broken in 0.8 - res.assignSocket = function _assignSocket(socket) { - assignSocket.call(this, socket) - callback(socket) - } -} diff --git a/s4t-server-node/node_modules/express/node_modules/on-finished/node_modules/ee-first/LICENSE b/s4t-server-node/node_modules/express/node_modules/on-finished/node_modules/ee-first/LICENSE deleted file mode 100644 index c1b15a1..0000000 --- a/s4t-server-node/node_modules/express/node_modules/on-finished/node_modules/ee-first/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ - -The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong me@jongleberry.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/s4t-server-node/node_modules/express/node_modules/on-finished/node_modules/ee-first/README.md b/s4t-server-node/node_modules/express/node_modules/on-finished/node_modules/ee-first/README.md deleted file mode 100644 index bb16aab..0000000 --- a/s4t-server-node/node_modules/express/node_modules/on-finished/node_modules/ee-first/README.md +++ /dev/null @@ -1,80 +0,0 @@ -# EE First - -[![NPM version][npm-image]][npm-url] -[![Build status][travis-image]][travis-url] -[![Test coverage][coveralls-image]][coveralls-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] -[![Gittip][gittip-image]][gittip-url] - -Get the first event in a set of event emitters and event pairs, -then clean up after itself. - -## Install - -```sh -$ npm install ee-first -``` - -## API - -```js -var first = require('ee-first') -``` - -### first(arr, listener) - -Invoke `listener` on the first event from the list specified in `arr`. `arr` is -an array of arrays, with each array in the format `[ee, ...event]`. `listener` -will be called only once, the first time any of the given events are emitted. If -`error` is one of the listened events, then if that fires first, the `listener` -will be given the `err` argument. - -The `listener` is invoked as `listener(err, ee, event, args)`, where `err` is the -first argument emitted from an `error` event, if applicable; `ee` is the event -emitter that fired; `event` is the string event name that fired; and `args` is an -array of the arguments that were emitted on the event. - -```js -var ee1 = new EventEmitter() -var ee2 = new EventEmitter() - -first([ - [ee1, 'close', 'end', 'error'], - [ee2, 'error'] -], function (err, ee, event, args) { - // listener invoked -}) -``` - -#### .cancel() - -The group of listeners can be cancelled before being invoked and have all the event -listeners removed from the underlying event emitters. - -```js -var thunk = first([ - [ee1, 'close', 'end', 'error'], - [ee2, 'error'] -], function (err, ee, event, args) { - // listener invoked -}) - -// cancel and clean up -thunk.cancel() -``` - -[npm-image]: https://img.shields.io/npm/v/ee-first.svg?style=flat-square -[npm-url]: https://npmjs.org/package/ee-first -[github-tag]: http://img.shields.io/github/tag/jonathanong/ee-first.svg?style=flat-square -[github-url]: https://github.com/jonathanong/ee-first/tags -[travis-image]: https://img.shields.io/travis/jonathanong/ee-first.svg?style=flat-square -[travis-url]: https://travis-ci.org/jonathanong/ee-first -[coveralls-image]: https://img.shields.io/coveralls/jonathanong/ee-first.svg?style=flat-square -[coveralls-url]: https://coveralls.io/r/jonathanong/ee-first?branch=master -[license-image]: http://img.shields.io/npm/l/ee-first.svg?style=flat-square -[license-url]: LICENSE.md -[downloads-image]: http://img.shields.io/npm/dm/ee-first.svg?style=flat-square -[downloads-url]: https://npmjs.org/package/ee-first -[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square -[gittip-url]: https://www.gittip.com/jonathanong/ diff --git a/s4t-server-node/node_modules/express/node_modules/on-finished/node_modules/ee-first/index.js b/s4t-server-node/node_modules/express/node_modules/on-finished/node_modules/ee-first/index.js deleted file mode 100644 index 1d66203..0000000 --- a/s4t-server-node/node_modules/express/node_modules/on-finished/node_modules/ee-first/index.js +++ /dev/null @@ -1,68 +0,0 @@ - -module.exports = function first(stuff, done) { - if (!Array.isArray(stuff)) - throw new TypeError('arg must be an array of [ee, events...] arrays') - - var cleanups = [] - - for (var i = 0; i < stuff.length; i++) { - var arr = stuff[i] - - if (!Array.isArray(arr) || arr.length < 2) - throw new TypeError('each array member must be [ee, events...]') - - var ee = arr[0] - - for (var j = 1; j < arr.length; j++) { - var event = arr[j] - var fn = listener(event, callback) - - // listen to the event - ee.on(event, fn) - // push this listener to the list of cleanups - cleanups.push({ - ee: ee, - event: event, - fn: fn, - }) - } - } - - function callback() { - cleanup() - done.apply(null, arguments) - } - - function cleanup() { - var x - for (var i = 0; i < cleanups.length; i++) { - x = cleanups[i] - x.ee.removeListener(x.event, x.fn) - } - } - - function thunk(fn) { - done = fn - } - - thunk.cancel = cleanup - - return thunk -} - -function listener(event, done) { - return function onevent(arg1) { - var args = new Array(arguments.length) - var ee = this - var err = event === 'error' - ? arg1 - : null - - // copy args to prevent arguments escaping scope - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - - done(err, ee, event, args) - } -} diff --git a/s4t-server-node/node_modules/express/node_modules/on-finished/node_modules/ee-first/package.json b/s4t-server-node/node_modules/express/node_modules/on-finished/node_modules/ee-first/package.json deleted file mode 100644 index 5b39931..0000000 --- a/s4t-server-node/node_modules/express/node_modules/on-finished/node_modules/ee-first/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "ee-first", - "description": "return the first event in a set of ee/event pairs", - "version": "1.1.0", - "author": { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - }, - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - } - ], - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/jonathanong/ee-first" - }, - "devDependencies": { - "istanbul": "0.3.2", - "mocha": "1" - }, - "files": [ - "index.js", - "LICENSE" - ], - "scripts": { - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - }, - "gitHead": "a6412004da4745941af2fc98ec30c8da570da7ea", - "bugs": { - "url": "https://github.com/jonathanong/ee-first/issues" - }, - "homepage": "https://github.com/jonathanong/ee-first", - "_id": "ee-first@1.1.0", - "_shasum": "6a0d7c6221e490feefd92ec3f441c9ce8cd097f4", - "_from": "ee-first@1.1.0", - "_npmVersion": "1.4.21", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - } - ], - "dist": { - "shasum": "6a0d7c6221e490feefd92ec3f441c9ce8cd097f4", - "tarball": "http://registry.npmjs.org/ee-first/-/ee-first-1.1.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/on-finished/package.json b/s4t-server-node/node_modules/express/node_modules/on-finished/package.json deleted file mode 100644 index 3d3eef6..0000000 --- a/s4t-server-node/node_modules/express/node_modules/on-finished/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "on-finished", - "description": "Execute a callback when a request closes, finishes, or errors", - "version": "2.2.0", - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - } - ], - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/jshttp/on-finished" - }, - "dependencies": { - "ee-first": "1.1.0" - }, - "devDependencies": { - "istanbul": "0.3.5", - "mocha": "~2.0.1" - }, - "engines": { - "node": ">= 0.8" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "index.js" - ], - "scripts": { - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - }, - "gitHead": "fcd56f5674721cac92a16eff93547929716f5192", - "bugs": { - "url": "https://github.com/jshttp/on-finished/issues" - }, - "homepage": "https://github.com/jshttp/on-finished", - "_id": "on-finished@2.2.0", - "_shasum": "e6ba6a09a3482d6b7969bc3da92c86f0a967605e", - "_from": "on-finished@>=2.2.0 <2.3.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - } - ], - "dist": { - "shasum": "e6ba6a09a3482d6b7969bc3da92c86f0a967605e", - "tarball": "http://registry.npmjs.org/on-finished/-/on-finished-2.2.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.2.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/parseurl/.npmignore b/s4t-server-node/node_modules/express/node_modules/parseurl/.npmignore deleted file mode 100644 index 85c82a5..0000000 --- a/s4t-server-node/node_modules/express/node_modules/parseurl/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -benchmark/ -coverage/ -test/ -.travis.yml diff --git a/s4t-server-node/node_modules/express/node_modules/parseurl/HISTORY.md b/s4t-server-node/node_modules/express/node_modules/parseurl/HISTORY.md deleted file mode 100644 index 65a0860..0000000 --- a/s4t-server-node/node_modules/express/node_modules/parseurl/HISTORY.md +++ /dev/null @@ -1,42 +0,0 @@ -1.3.0 / 2014-08-09 -================== - - * Add `parseurl.original` for parsing `req.originalUrl` with fallback - * Return `undefined` if `req.url` is `undefined` - -1.2.0 / 2014-07-21 -================== - - * Cache URLs based on original value - * Remove no-longer-needed URL mis-parse work-around - * Simplify the "fast-path" `RegExp` - -1.1.3 / 2014-07-08 -================== - - * Fix typo - -1.1.2 / 2014-07-08 -================== - - * Seriously fix Node.js 0.8 compatibility - -1.1.1 / 2014-07-08 -================== - - * Fix Node.js 0.8 compatibility - -1.1.0 / 2014-07-08 -================== - - * Incorporate URL href-only parse fast-path - -1.0.1 / 2014-03-08 -================== - - * Add missing `require` - -1.0.0 / 2014-03-08 -================== - - * Genesis from `connect` diff --git a/s4t-server-node/node_modules/express/node_modules/parseurl/LICENSE b/s4t-server-node/node_modules/express/node_modules/parseurl/LICENSE deleted file mode 100644 index ec7dfe7..0000000 --- a/s4t-server-node/node_modules/express/node_modules/parseurl/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ - -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2014 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/s4t-server-node/node_modules/express/node_modules/parseurl/README.md b/s4t-server-node/node_modules/express/node_modules/parseurl/README.md deleted file mode 100644 index 0db1d02..0000000 --- a/s4t-server-node/node_modules/express/node_modules/parseurl/README.md +++ /dev/null @@ -1,107 +0,0 @@ -# parseurl - -[![NPM version](https://badge.fury.io/js/parseurl.svg)](http://badge.fury.io/js/parseurl) -[![Build Status](https://travis-ci.org/expressjs/parseurl.svg?branch=master)](https://travis-ci.org/expressjs/parseurl) -[![Coverage Status](https://img.shields.io/coveralls/expressjs/parseurl.svg?branch=master)](https://coveralls.io/r/expressjs/parseurl) - -Parse a URL with memoization. - -## Install - -```bash -$ npm install parseurl -``` - -## API - -```js -var parseurl = require('parseurl') -``` - -### parseurl(req) - -Parse the URL of the given request object (looks at the `req.url` property) -and return the result. The result is the same as `url.parse` in Node.js core. -Calling this function multiple times on the same `req` where `req.url` does -not change will return a cached parsed object, rather than parsing again. - -### parseurl.original(req) - -Parse the original URL of the given request object and return the result. -This works by trying to parse `req.originalUrl` if it is a string, otherwise -parses `req.url`. The result is the same as `url.parse` in Node.js core. -Calling this function multiple times on the same `req` where `req.originalUrl` -does not change will return a cached parsed object, rather than parsing again. - -## Benchmark - -```bash -$ npm run-script bench - -> parseurl@1.3.0 bench nodejs-parseurl -> node benchmark/index.js - -> node benchmark/fullurl.js - - Parsing URL "http://localhost:8888/foo/bar?user=tj&pet=fluffy" - - 1 test completed. - 2 tests completed. - 3 tests completed. - - fasturl x 1,290,780 ops/sec ±0.46% (195 runs sampled) - nativeurl x 56,401 ops/sec ±0.22% (196 runs sampled) - parseurl x 55,231 ops/sec ±0.22% (194 runs sampled) - -> node benchmark/pathquery.js - - Parsing URL "/foo/bar?user=tj&pet=fluffy" - - 1 test completed. - 2 tests completed. - 3 tests completed. - - fasturl x 1,986,668 ops/sec ±0.27% (190 runs sampled) - nativeurl x 98,740 ops/sec ±0.21% (195 runs sampled) - parseurl x 2,628,171 ops/sec ±0.36% (195 runs sampled) - -> node benchmark/samerequest.js - - Parsing URL "/foo/bar?user=tj&pet=fluffy" on same request object - - 1 test completed. - 2 tests completed. - 3 tests completed. - - fasturl x 2,184,468 ops/sec ±0.40% (194 runs sampled) - nativeurl x 99,437 ops/sec ±0.71% (194 runs sampled) - parseurl x 10,498,005 ops/sec ±0.61% (186 runs sampled) - -> node benchmark/simplepath.js - - Parsing URL "/foo/bar" - - 1 test completed. - 2 tests completed. - 3 tests completed. - - fasturl x 4,535,825 ops/sec ±0.27% (191 runs sampled) - nativeurl x 98,769 ops/sec ±0.54% (191 runs sampled) - parseurl x 4,164,865 ops/sec ±0.34% (192 runs sampled) - -> node benchmark/slash.js - - Parsing URL "/" - - 1 test completed. - 2 tests completed. - 3 tests completed. - - fasturl x 4,908,405 ops/sec ±0.42% (191 runs sampled) - nativeurl x 100,945 ops/sec ±0.59% (188 runs sampled) - parseurl x 4,333,208 ops/sec ±0.27% (194 runs sampled) -``` - -## License - - [MIT](LICENSE) diff --git a/s4t-server-node/node_modules/express/node_modules/parseurl/index.js b/s4t-server-node/node_modules/express/node_modules/parseurl/index.js deleted file mode 100644 index 8632347..0000000 --- a/s4t-server-node/node_modules/express/node_modules/parseurl/index.js +++ /dev/null @@ -1,136 +0,0 @@ -/*! - * parseurl - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2014 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var url = require('url') -var parse = url.parse -var Url = url.Url - -/** - * Pattern for a simple path case. - * See: https://github.com/joyent/node/pull/7878 - */ - -var simplePathRegExp = /^(\/\/?(?!\/)[^\?#\s]*)(\?[^#\s]*)?$/ - -/** - * Exports. - */ - -module.exports = parseurl -module.exports.original = originalurl - -/** - * Parse the `req` url with memoization. - * - * @param {ServerRequest} req - * @return {Object} - * @api public - */ - -function parseurl(req) { - var url = req.url - - if (url === undefined) { - // URL is undefined - return undefined - } - - var parsed = req._parsedUrl - - if (fresh(url, parsed)) { - // Return cached URL parse - return parsed - } - - // Parse the URL - parsed = fastparse(url) - parsed._raw = url - - return req._parsedUrl = parsed -}; - -/** - * Parse the `req` original url with fallback and memoization. - * - * @param {ServerRequest} req - * @return {Object} - * @api public - */ - -function originalurl(req) { - var url = req.originalUrl - - if (typeof url !== 'string') { - // Fallback - return parseurl(req) - } - - var parsed = req._parsedOriginalUrl - - if (fresh(url, parsed)) { - // Return cached URL parse - return parsed - } - - // Parse the URL - parsed = fastparse(url) - parsed._raw = url - - return req._parsedOriginalUrl = parsed -}; - -/** - * Parse the `str` url with fast-path short-cut. - * - * @param {string} str - * @return {Object} - * @api private - */ - -function fastparse(str) { - // Try fast path regexp - // See: https://github.com/joyent/node/pull/7878 - var simplePath = typeof str === 'string' && simplePathRegExp.exec(str) - - // Construct simple URL - if (simplePath) { - var pathname = simplePath[1] - var search = simplePath[2] || null - var url = Url !== undefined - ? new Url() - : {} - url.path = str - url.href = str - url.pathname = pathname - url.search = search - url.query = search && search.substr(1) - - return url - } - - return parse(str) -} - -/** - * Determine if parsed is still fresh for url. - * - * @param {string} url - * @param {object} parsedUrl - * @return {boolean} - * @api private - */ - -function fresh(url, parsedUrl) { - return typeof parsedUrl === 'object' - && parsedUrl !== null - && (Url === undefined || parsedUrl instanceof Url) - && parsedUrl._raw === url -} diff --git a/s4t-server-node/node_modules/express/node_modules/parseurl/package.json b/s4t-server-node/node_modules/express/node_modules/parseurl/package.json deleted file mode 100644 index 4a6a46b..0000000 --- a/s4t-server-node/node_modules/express/node_modules/parseurl/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "parseurl", - "description": "parse a url with memoization", - "version": "1.3.0", - "author": { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - }, - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/expressjs/parseurl" - }, - "license": "MIT", - "devDependencies": { - "benchmark": "1.0.0", - "beautify-benchmark": "0.2.4", - "fast-url-parser": "~1.0.0", - "istanbul": "0.3.0", - "mocha": "~1.21.4" - }, - "scripts": { - "bench": "node benchmark/index.js", - "test": "mocha --check-leaks --bail --reporter spec test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec test/" - }, - "gitHead": "03b7ccca240e2bef5df6c25797e99175d28fb2cb", - "bugs": { - "url": "https://github.com/expressjs/parseurl/issues" - }, - "homepage": "https://github.com/expressjs/parseurl", - "_id": "parseurl@1.3.0", - "_shasum": "b58046db4223e145afa76009e61bac87cc2281b3", - "_from": "parseurl@>=1.3.0 <1.4.0", - "_npmVersion": "1.4.21", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "shtylman", - "email": "shtylman@gmail.com" - }, - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "mscdex", - "email": "mscdex@mscdex.net" - }, - { - "name": "fishrock123", - "email": "fishrock123@rocketmail.com" - } - ], - "dist": { - "shasum": "b58046db4223e145afa76009e61bac87cc2281b3", - "tarball": "http://registry.npmjs.org/parseurl/-/parseurl-1.3.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/path-to-regexp/.npmignore b/s4t-server-node/node_modules/express/node_modules/path-to-regexp/.npmignore deleted file mode 100644 index ba2a97b..0000000 --- a/s4t-server-node/node_modules/express/node_modules/path-to-regexp/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -coverage diff --git a/s4t-server-node/node_modules/express/node_modules/path-to-regexp/History.md b/s4t-server-node/node_modules/express/node_modules/path-to-regexp/History.md deleted file mode 100644 index f962cfa..0000000 --- a/s4t-server-node/node_modules/express/node_modules/path-to-regexp/History.md +++ /dev/null @@ -1,16 +0,0 @@ -0.1.3 / 2014-07-06 -================== - - * Better array support - * Improved support for trailing slash in non-ending mode - -0.1.0 / 2014-03-06 -================== - - * add options.end - -0.0.2 / 2013-02-10 -================== - - * Update to match current express - * add .license property to component.json diff --git a/s4t-server-node/node_modules/express/node_modules/path-to-regexp/Readme.md b/s4t-server-node/node_modules/express/node_modules/path-to-regexp/Readme.md deleted file mode 100644 index 9199e38..0000000 --- a/s4t-server-node/node_modules/express/node_modules/path-to-regexp/Readme.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Path-to-RegExp - - Turn an Express-style path string such as `/user/:name` into a regular expression. - -## Usage - -```javascript -var pathToRegexp = require('path-to-regexp'); -``` -### pathToRegexp(path, keys, options) - - - **path** A string in the express format, an array of such strings, or a regular expression - - **keys** An array to be populated with the keys present in the url. Once the function completes, this will be an array of strings. - - **options** - - **options.sensitive** Defaults to false, set this to true to make routes case sensitive - - **options.strict** Defaults to false, set this to true to make the trailing slash matter. - - **options.end** Defaults to true, set this to false to only match the prefix of the URL. - -```javascript -var keys = []; -var exp = pathToRegexp('/foo/:bar', keys); -//keys = ['bar'] -//exp = /^\/foo\/(?:([^\/]+?))\/?$/i -``` - -## Live Demo - -You can see a live demo of this library in use at [express-route-tester](http://forbeslindesay.github.com/express-route-tester/). - -## License - - MIT \ No newline at end of file diff --git a/s4t-server-node/node_modules/express/node_modules/path-to-regexp/component.json b/s4t-server-node/node_modules/express/node_modules/path-to-regexp/component.json deleted file mode 100644 index 6ab37d3..0000000 --- a/s4t-server-node/node_modules/express/node_modules/path-to-regexp/component.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "path-to-regexp", - "description": "Express style path to RegExp utility", - "version": "0.1.3", - "keywords": [ - "express", - "regexp", - "route", - "routing" - ], - "scripts": [ - "index.js" - ], - "license": "MIT" -} diff --git a/s4t-server-node/node_modules/express/node_modules/path-to-regexp/index.js b/s4t-server-node/node_modules/express/node_modules/path-to-regexp/index.js deleted file mode 100644 index 2801f91..0000000 --- a/s4t-server-node/node_modules/express/node_modules/path-to-regexp/index.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Expose `pathtoRegexp`. - */ - -module.exports = pathtoRegexp; - -/** - * Normalize the given path string, - * returning a regular expression. - * - * An empty array should be passed, - * which will contain the placeholder - * key names. For example "/user/:id" will - * then contain ["id"]. - * - * @param {String|RegExp|Array} path - * @param {Array} keys - * @param {Object} options - * @return {RegExp} - * @api private - */ - -function pathtoRegexp(path, keys, options) { - options = options || {}; - var strict = options.strict; - var end = options.end !== false; - var flags = options.sensitive ? '' : 'i'; - keys = keys || []; - - if (path instanceof RegExp) { - return path; - } - - if (Array.isArray(path)) { - // Map array parts into regexps and return their source. We also pass - // the same keys and options instance into every generation to get - // consistent matching groups before we join the sources together. - path = path.map(function (value) { - return pathtoRegexp(value, keys, options).source; - }); - - return new RegExp('(?:' + path.join('|') + ')', flags); - } - - path = ('^' + path + (strict ? '' : path[path.length - 1] === '/' ? '?' : '/?')) - .replace(/\/\(/g, '/(?:') - .replace(/([\/\.])/g, '\\$1') - .replace(/(\\\/)?(\\\.)?:(\w+)(\(.*?\))?(\*)?(\?)?/g, function (match, slash, format, key, capture, star, optional) { - slash = slash || ''; - format = format || ''; - capture = capture || '([^\\/' + format + ']+?)'; - optional = optional || ''; - - keys.push({ name: key, optional: !!optional }); - - return '' - + (optional ? '' : slash) - + '(?:' - + format + (optional ? slash : '') + capture - + (star ? '((?:[\\/' + format + '].+?)?)' : '') - + ')' - + optional; - }) - .replace(/\*/g, '(.*)'); - - // If the path is non-ending, match until the end or a slash. - path += (end ? '$' : (path[path.length - 1] === '/' ? '' : '(?=\\/|$)')); - - return new RegExp(path, flags); -}; diff --git a/s4t-server-node/node_modules/express/node_modules/path-to-regexp/package.json b/s4t-server-node/node_modules/express/node_modules/path-to-regexp/package.json deleted file mode 100644 index bccfe25..0000000 --- a/s4t-server-node/node_modules/express/node_modules/path-to-regexp/package.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "name": "path-to-regexp", - "description": "Express style path to RegExp utility", - "version": "0.1.3", - "scripts": { - "test": "istanbul cover _mocha -- -R spec" - }, - "keywords": [ - "express", - "regexp" - ], - "component": { - "scripts": { - "path-to-regexp": "index.js" - } - }, - "repository": { - "type": "git", - "url": "https://github.com/component/path-to-regexp.git" - }, - "devDependencies": { - "mocha": "^1.17.1", - "istanbul": "^0.2.6" - }, - "bugs": { - "url": "https://github.com/component/path-to-regexp/issues" - }, - "homepage": "https://github.com/component/path-to-regexp", - "_id": "path-to-regexp@0.1.3", - "_shasum": "21b9ab82274279de25b156ea08fd12ca51b8aecb", - "_from": "path-to-regexp@0.1.3", - "_npmVersion": "1.4.9", - "_npmUser": { - "name": "blakeembrey", - "email": "hello@blakeembrey.com" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "dominicbarnes", - "email": "dominic@dbarnes.info" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - { - "name": "rauchg", - "email": "rauchg@gmail.com" - }, - { - "name": "retrofox", - "email": "rdsuarez@gmail.com" - }, - { - "name": "coreh", - "email": "thecoreh@gmail.com" - }, - { - "name": "forbeslindesay", - "email": "forbes@lindesay.co.uk" - }, - { - "name": "kelonye", - "email": "kelonyemitchel@gmail.com" - }, - { - "name": "mattmueller", - "email": "mattmuelle@gmail.com" - }, - { - "name": "yields", - "email": "yields@icloud.com" - }, - { - "name": "anthonyshort", - "email": "antshort@gmail.com" - }, - { - "name": "ianstormtaylor", - "email": "ian@ianstormtaylor.com" - }, - { - "name": "cristiandouce", - "email": "cristian@gravityonmars.com" - }, - { - "name": "swatinem", - "email": "arpad.borsos@googlemail.com" - }, - { - "name": "stagas", - "email": "gstagas@gmail.com" - }, - { - "name": "amasad", - "email": "amjad.masad@gmail.com" - }, - { - "name": "juliangruber", - "email": "julian@juliangruber.com" - }, - { - "name": "shtylman", - "email": "shtylman@gmail.com" - }, - { - "name": "calvinfo", - "email": "calvin@calv.info" - }, - { - "name": "blakeembrey", - "email": "hello@blakeembrey.com" - }, - { - "name": "timoxley", - "email": "secoif@gmail.com" - }, - { - "name": "jonathanong", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "queckezz", - "email": "fabian.eichenberger@gmail.com" - }, - { - "name": "nami-doc", - "email": "vendethiel@hotmail.fr" - }, - { - "name": "clintwood", - "email": "clint@anotherway.co.za" - }, - { - "name": "thehydroimpulse", - "email": "dnfagnan@gmail.com" - }, - { - "name": "stephenmathieson", - "email": "me@stephenmathieson.com" - }, - { - "name": "trevorgerhardt", - "email": "trevorgerhardt@gmail.com" - } - ], - "dist": { - "shasum": "21b9ab82274279de25b156ea08fd12ca51b8aecb", - "tarball": "http://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.3.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/path-to-regexp/test.js b/s4t-server-node/node_modules/express/node_modules/path-to-regexp/test.js deleted file mode 100644 index 4a0c270..0000000 --- a/s4t-server-node/node_modules/express/node_modules/path-to-regexp/test.js +++ /dev/null @@ -1,616 +0,0 @@ -var pathToRegExp = require('./'); -var assert = require('assert'); - -describe('path-to-regexp', function () { - describe('strings', function () { - it('should match simple paths', function () { - var params = []; - var m = pathToRegExp('/test', params).exec('/test'); - - assert.equal(params.length, 0); - - assert.equal(m.length, 1); - assert.equal(m[0], '/test'); - }); - - it('should match express format params', function () { - var params = []; - var m = pathToRegExp('/:test', params).exec('/pathname'); - - assert.equal(params.length, 1); - assert.equal(params[0].name, 'test'); - assert.equal(params[0].optional, false); - - assert.equal(m.length, 2); - assert.equal(m[0], '/pathname'); - assert.equal(m[1], 'pathname'); - }); - - it('should do strict matches', function () { - var params = []; - var re = pathToRegExp('/:test', params, { strict: true }); - var m; - - assert.equal(params.length, 1); - assert.equal(params[0].name, 'test'); - assert.equal(params[0].optional, false); - - m = re.exec('/route'); - - assert.equal(m.length, 2); - assert.equal(m[0], '/route'); - assert.equal(m[1], 'route'); - - m = re.exec('/route/'); - - assert.ok(!m); - }); - - it('should do strict matches with trailing slashes', function () { - var params = []; - var re = pathToRegExp('/:test/', params, { strict: true }); - var m; - - assert.equal(params.length, 1); - assert.equal(params[0].name, 'test'); - assert.equal(params[0].optional, false); - - m = re.exec('/route'); - - assert.ok(!m); - - m = re.exec('/route/'); - - assert.equal(m.length, 2); - assert.equal(m[0], '/route/'); - assert.equal(m[1], 'route'); - - m = re.exec('/route//'); - - assert.ok(!m); - }); - - it('should allow optional express format params', function () { - var params = []; - var re = pathToRegExp('/:test?', params); - var m; - - assert.equal(params.length, 1); - assert.equal(params[0].name, 'test'); - assert.equal(params[0].optional, true); - - m = re.exec('/route'); - - assert.equal(m.length, 2); - assert.equal(m[0], '/route'); - assert.equal(m[1], 'route'); - - m = re.exec('/'); - - assert.equal(m.length, 2); - assert.equal(m[0], '/'); - assert.equal(m[1], undefined); - }); - - it('should allow express format param regexps', function () { - var params = []; - var m = pathToRegExp('/:page(\\d+)', params).exec('/56'); - - assert.equal(params.length, 1); - assert.equal(params[0].name, 'page'); - assert.equal(params[0].optional, false); - - assert.equal(m.length, 2); - assert.equal(m[0], '/56'); - assert.equal(m[1], '56'); - }); - - it('should match without a prefixed slash', function () { - var params = []; - var m = pathToRegExp(':test', params).exec('string'); - - assert.equal(params.length, 1); - assert.equal(params[0].name, 'test'); - assert.equal(params[0].optional, false); - - assert.equal(m.length, 2); - assert.equal(m[0], 'string'); - assert.equal(m[1], 'string'); - }); - - it('should not match format parts', function () { - var params = []; - var m = pathToRegExp('/:test.json', params).exec('/route.json'); - - assert.equal(params.length, 1); - assert.equal(params[0].name, 'test'); - assert.equal(params[0].optional, false); - - assert.equal(m.length, 2); - assert.equal(m[0], '/route.json'); - assert.equal(m[1], 'route'); - }); - - it('should match format parts', function () { - var params = []; - var re = pathToRegExp('/:test.:format', params); - var m; - - assert.equal(params.length, 2); - assert.equal(params[0].name, 'test'); - assert.equal(params[0].optional, false); - assert.equal(params[1].name, 'format'); - assert.equal(params[1].optional, false); - - m = re.exec('/route.json'); - - assert.equal(m.length, 3); - assert.equal(m[0], '/route.json'); - assert.equal(m[1], 'route'); - assert.equal(m[2], 'json'); - - m = re.exec('/route'); - - assert.ok(!m); - }); - - it('should match route parts with a trailing format', function () { - var params = []; - var m = pathToRegExp('/:test.json', params).exec('/route.json'); - - assert.equal(params.length, 1); - assert.equal(params[0].name, 'test'); - assert.equal(params[0].optional, false); - - assert.equal(m.length, 2); - assert.equal(m[0], '/route.json'); - assert.equal(m[1], 'route'); - }); - - it('should match optional trailing routes', function () { - var params = []; - var m = pathToRegExp('/test*', params).exec('/test/route'); - - assert.equal(params.length, 0); - - assert.equal(m.length, 2); - assert.equal(m[0], '/test/route'); - assert.equal(m[1], '/route'); - }); - - it('should match optional trailing routes after a param', function () { - var params = []; - var re = pathToRegExp('/:test*', params); - var m; - - assert.equal(params.length, 1); - assert.equal(params[0].name, 'test'); - assert.equal(params[0].optional, false); - - m = re.exec('/test/route'); - - assert.equal(m.length, 3); - assert.equal(m[0], '/test/route'); - assert.equal(m[1], 'test'); - assert.equal(m[2], '/route'); - - m = re.exec('/testing'); - - assert.equal(m.length, 3); - assert.equal(m[0], '/testing'); - assert.equal(m[1], 'testing'); - assert.equal(m[2], ''); - }); - - it('should match optional trailing routes before a format', function () { - var params = []; - var re = pathToRegExp('/test*.json', params); - var m; - - assert.equal(params.length, 0); - - m = re.exec('/test.json'); - - assert.equal(m.length, 2); - assert.equal(m[0], '/test.json'); - assert.equal(m[1], ''); - - m = re.exec('/testing.json'); - - assert.equal(m.length, 2); - assert.equal(m[0], '/testing.json'); - assert.equal(m[1], 'ing'); - - m = re.exec('/test/route.json'); - - assert.equal(m.length, 2); - assert.equal(m[0], '/test/route.json'); - assert.equal(m[1], '/route'); - }); - - it('should match optional trailing routes after a param and before a format', function () { - var params = []; - var re = pathToRegExp('/:test*.json', params); - var m; - - assert.equal(params.length, 1); - assert.equal(params[0].name, 'test'); - assert.equal(params[0].optional, false); - - m = re.exec('/testing.json'); - - assert.equal(m.length, 3); - assert.equal(m[0], '/testing.json'); - assert.equal(m[1], 'testing'); - assert.equal(m[2], ''); - - m = re.exec('/test/route.json'); - - assert.equal(m.length, 3); - assert.equal(m[0], '/test/route.json'); - assert.equal(m[1], 'test'); - assert.equal(m[2], '/route'); - - m = re.exec('.json'); - - assert.ok(!m); - }); - - it('should match optional trailing routes between a normal param and a format param', function () { - var params = []; - var re = pathToRegExp('/:test*.:format', params); - var m; - - assert.equal(params.length, 2); - assert.equal(params[0].name, 'test'); - assert.equal(params[0].optional, false); - assert.equal(params[1].name, 'format'); - assert.equal(params[1].optional, false); - - m = re.exec('/testing.json'); - - assert.equal(m.length, 4); - assert.equal(m[0], '/testing.json'); - assert.equal(m[1], 'testing'); - assert.equal(m[2], ''); - assert.equal(m[3], 'json'); - - m = re.exec('/test/route.json'); - - assert.equal(m.length, 4); - assert.equal(m[0], '/test/route.json'); - assert.equal(m[1], 'test'); - assert.equal(m[2], '/route'); - assert.equal(m[3], 'json'); - - m = re.exec('/test'); - - assert.ok(!m); - - m = re.exec('.json'); - - assert.ok(!m); - }); - - it('should match optional trailing routes after a param and before an optional format param', function () { - var params = []; - var re = pathToRegExp('/:test*.:format?', params); - var m; - - assert.equal(params.length, 2); - assert.equal(params[0].name, 'test'); - assert.equal(params[0].optional, false); - assert.equal(params[1].name, 'format'); - assert.equal(params[1].optional, true); - - m = re.exec('/testing.json'); - - assert.equal(m.length, 4); - assert.equal(m[0], '/testing.json'); - assert.equal(m[1], 'testing'); - assert.equal(m[2], ''); - assert.equal(m[3], 'json'); - - m = re.exec('/test/route.json'); - - assert.equal(m.length, 4); - assert.equal(m[0], '/test/route.json'); - assert.equal(m[1], 'test'); - assert.equal(m[2], '/route'); - assert.equal(m[3], 'json'); - - m = re.exec('/test'); - - assert.equal(m.length, 4); - assert.equal(m[0], '/test'); - assert.equal(m[1], 'test'); - assert.equal(m[2], ''); - assert.equal(m[3], undefined); - - m = re.exec('.json'); - - assert.ok(!m); - }); - - it('should match optional trailing routes inside optional express param', function () { - var params = []; - var re = pathToRegExp('/:test*?', params); - var m; - - assert.equal(params.length, 1); - assert.equal(params[0].name, 'test'); - assert.equal(params[0].optional, true); - - m = re.exec('/test/route'); - - assert.equal(m.length, 3); - assert.equal(m[0], '/test/route'); - assert.equal(m[1], 'test'); - assert.equal(m[2], '/route'); - - m = re.exec('/test'); - - assert.equal(m.length, 3); - assert.equal(m[0], '/test'); - assert.equal(m[1], 'test'); - assert.equal(m[2], ''); - - m = re.exec('/'); - - assert.equal(m.length, 3); - assert.equal(m[0], '/'); - assert.equal(m[1], undefined); - assert.equal(m[2], undefined); - }); - - it('should do case insensitive matches', function () { - var m = pathToRegExp('/test').exec('/TEST'); - - assert.equal(m[0], '/TEST'); - }); - - it('should do case sensitive matches', function () { - var re = pathToRegExp('/test', null, { sensitive: true }); - var m; - - m = re.exec('/test'); - - assert.equal(m.length, 1); - assert.equal(m[0], '/test'); - - m = re.exec('/TEST'); - - assert.ok(!m); - }); - - it('should do non-ending matches', function () { - var params = []; - var m = pathToRegExp('/:test', params, { end: false }).exec('/test/route'); - - assert.equal(params.length, 1); - assert.equal(params[0].name, 'test'); - assert.equal(params[0].optional, false); - - assert.equal(m.length, 2); - assert.equal(m[0], '/test'); - assert.equal(m[1], 'test'); - }); - - it('should match trailing slashes in non-ending non-strict mode', function () { - var params = []; - var re = pathToRegExp('/:test', params, { end: false }); - var m; - - assert.equal(params.length, 1); - assert.equal(params[0].name, 'test'); - assert.equal(params[0].optional, false); - - m = re.exec('/test/'); - - assert.equal(m.length, 2); - assert.equal(m[0], '/test/'); - assert.equal(m[1], 'test'); - }); - - it('should match trailing slashes in non-ending non-strict mode', function () { - var params = []; - var re = pathToRegExp('/route/', params, { end: false }); - var m; - - assert.equal(params.length, 0); - - m = re.exec('/route/'); - - assert.equal(m.length, 1); - assert.equal(m[0], '/route/'); - - m = re.exec('/route/test'); - - assert.equal(m.length, 1); - assert.equal(m[0], '/route'); - - m = re.exec('/route'); - - assert.equal(m.length, 1); - assert.equal(m[0], '/route'); - - m = re.exec('/route//'); - - assert.equal(m.length, 1); - assert.equal(m[0], '/route/'); - }); - - it('should match trailing slashing in non-ending strict mode', function () { - var params = []; - var re = pathToRegExp('/route/', params, { end: false, strict: true }); - - assert.equal(params.length, 0); - - m = re.exec('/route/'); - - assert.equal(m.length, 1); - assert.equal(m[0], '/route/'); - - m = re.exec('/route/test'); - - assert.equal(m.length, 1); - assert.equal(m[0], '/route/'); - - m = re.exec('/route'); - - assert.ok(!m); - - m = re.exec('/route//'); - - assert.equal(m.length, 1); - assert.equal(m[0], '/route/'); - }); - - it('should not match trailing slashes in non-ending strict mode', function () { - var params = []; - var re = pathToRegExp('/route', params, { end: false, strict: true }); - - assert.equal(params.length, 0); - - m = re.exec('/route'); - - assert.equal(m.length, 1); - assert.equal(m[0], '/route'); - - m = re.exec('/route/'); - - assert.ok(m.length, 1); - assert.equal(m[0], '/route'); - }); - - it('should match text after an express param', function () { - var params = []; - var re = pathToRegExp('/(:test)route', params); - - assert.equal(params.length, 1); - assert.equal(params[0].name, 'test'); - assert.equal(params[0].optional, false); - - m = re.exec('/route'); - - assert.ok(!m); - - m = re.exec('/testroute'); - - assert.equal(m.length, 2); - assert.equal(m[0], '/testroute'); - assert.equal(m[1], 'test'); - - m = re.exec('testroute'); - - assert.ok(!m); - }); - - it('should match text after an optional express param', function () { - var params = []; - var re = pathToRegExp('/(:test?)route', params); - var m; - - assert.equal(params.length, 1); - assert.equal(params[0].name, 'test'); - assert.equal(params[0].optional, true); - - m = re.exec('/route'); - - assert.equal(m.length, 2); - assert.equal(m[0], '/route'); - assert.equal(m[1], undefined); - - m = re.exec('/testroute'); - - assert.equal(m.length, 2); - assert.equal(m[0], '/testroute'); - assert.equal(m[1], 'test'); - - m = re.exec('route'); - - assert.ok(!m); - }); - - it('should match optional formats', function () { - var params = []; - var re = pathToRegExp('/:test.:format?', params); - var m; - - assert.equal(params.length, 2); - assert.equal(params[0].name, 'test'); - assert.equal(params[0].optional, false); - assert.equal(params[1].name, 'format'); - assert.equal(params[1].optional, true); - - m = re.exec('/route'); - - assert.equal(m.length, 3); - assert.equal(m[0], '/route'); - assert.equal(m[1], 'route'); - assert.equal(m[2], undefined); - - m = re.exec('/route.json'); - - assert.equal(m.length, 3); - assert.equal(m[0], '/route.json'); - assert.equal(m[1], 'route'); - assert.equal(m[2], 'json'); - }); - - it('should match full paths with format by default', function () { - var params = []; - var m = pathToRegExp('/:test', params).exec('/test.json'); - - assert.equal(params.length, 1); - assert.equal(params[0].name, 'test'); - assert.equal(params[0].optional, false); - - assert.equal(m.length, 2); - assert.equal(m[0], '/test.json'); - assert.equal(m[1], 'test.json'); - }); - }); - - describe('regexps', function () { - it('should return the regexp', function () { - assert.deepEqual(pathToRegExp(/.*/), /.*/); - }); - }); - - describe('arrays', function () { - it('should join arrays parts', function () { - var re = pathToRegExp(['/test', '/route']); - - assert.ok(re.test('/test')); - assert.ok(re.test('/route')); - assert.ok(!re.test('/else')); - }); - - it('should match parts properly', function () { - var params = []; - var re = pathToRegExp(['/:test', '/test/:route'], params); - var m; - - assert.equal(params.length, 2); - assert.equal(params[0].name, 'test'); - assert.equal(params[0].optional, false); - assert.equal(params[1].name, 'route'); - assert.equal(params[1].optional, false); - - m = re.exec('/route'); - - assert.equal(m.length, 3); - assert.equal(m[0], '/route'); - assert.equal(m[1], 'route'); - assert.equal(m[2], undefined); - - m = re.exec('/test/path'); - - assert.equal(m.length, 3); - assert.equal(m[0], '/test/path'); - assert.equal(m[1], undefined); - assert.equal(m[2], 'path'); - }); - }); -}); diff --git a/s4t-server-node/node_modules/express/node_modules/proxy-addr/HISTORY.md b/s4t-server-node/node_modules/express/node_modules/proxy-addr/HISTORY.md deleted file mode 100644 index 4b9f164..0000000 --- a/s4t-server-node/node_modules/express/node_modules/proxy-addr/HISTORY.md +++ /dev/null @@ -1,50 +0,0 @@ -1.0.5 / 2015-01-08 -================== - - * deps: ipaddr.js@0.1.6 - -1.0.4 / 2014-11-23 -================== - - * deps: ipaddr.js@0.1.5 - - Fix edge cases with `isValid` - -1.0.3 / 2014-09-21 -================== - - * Use `forwarded` npm module - -1.0.2 / 2014-09-18 -================== - - * Fix a global leak when multiple subnets are trusted - * Support Node.js 0.6 - * deps: ipaddr.js@0.1.3 - -1.0.1 / 2014-06-03 -================== - - * Fix links in npm package - -1.0.0 / 2014-05-08 -================== - - * Add `trust` argument to determine proxy trust on - * Accepts custom function - * Accepts IPv4/IPv6 address(es) - * Accepts subnets - * Accepts pre-defined names - * Add optional `trust` argument to `proxyaddr.all` to - stop at first untrusted - * Add `proxyaddr.compile` to pre-compile `trust` function - to make subsequent calls faster - -0.0.1 / 2014-05-04 -================== - - * Fix bad npm publish - -0.0.0 / 2014-05-04 -================== - - * Initial release diff --git a/s4t-server-node/node_modules/express/node_modules/proxy-addr/LICENSE b/s4t-server-node/node_modules/express/node_modules/proxy-addr/LICENSE deleted file mode 100644 index b7dce6c..0000000 --- a/s4t-server-node/node_modules/express/node_modules/proxy-addr/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 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/s4t-server-node/node_modules/express/node_modules/proxy-addr/README.md b/s4t-server-node/node_modules/express/node_modules/proxy-addr/README.md deleted file mode 100644 index 57ec4cd..0000000 --- a/s4t-server-node/node_modules/express/node_modules/proxy-addr/README.md +++ /dev/null @@ -1,137 +0,0 @@ -# proxy-addr - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Determine address of proxied request - -## Install - -```sh -$ npm install proxy-addr -``` - -## API - -```js -var proxyaddr = require('proxy-addr') -``` - -### proxyaddr(req, trust) - -Return the address of the request, using the given `trust` parameter. - -The `trust` argument is a function that returns `true` if you trust -the address, `false` if you don't. The closest untrusted address is -returned. - -```js -proxyaddr(req, function(addr){ return addr === '127.0.0.1' }) -proxyaddr(req, function(addr, i){ return i < 1 }) -``` - -The `trust` arugment may also be a single IP address string or an -array of trusted addresses, as plain IP addresses, CIDR-formatted -strings, or IP/netmask strings. - -```js -proxyaddr(req, '127.0.0.1') -proxyaddr(req, ['127.0.0.0/8', '10.0.0.0/8']) -proxyaddr(req, ['127.0.0.0/255.0.0.0', '192.168.0.0/255.255.0.0']) -``` - -This module also supports IPv6. Your IPv6 addresses will be normalized -automatically (i.e. `fe80::00ed:1` equals `fe80:0:0:0:0:0:ed:1`). - -```js -proxyaddr(req, '::1') -proxyaddr(req, ['::1/128', 'fe80::/10']) -proxyaddr(req, ['fe80::/ffc0::']) -``` - -This module will automatically work with IPv4-mapped IPv6 addresses -as well to support node.js in IPv6-only mode. This means that you do -not have to specify both `::ffff:a00:1` and `10.0.0.1`. - -As a convenience, this module also takes certain pre-defined names -in addition to IP addresses, which expand into IP addresses: - -```js -proxyaddr(req, 'loopback') -proxyaddr(req, ['loopback', 'fc00:ac:1ab5:fff::1/64']) -``` - - * `loopback`: IPv4 and IPv6 loopback addresses (like `::1` and - `127.0.0.1`). - * `linklocal`: IPv4 and IPv6 link-local addresses (like - `fe80::1:1:1:1` and `169.254.0.1`). - * `uniquelocal`: IPv4 private addresses and IPv6 unique-local - addresses (like `fc00:ac:1ab5:fff::1` and `192.168.0.1`). - -When `trust` is specified as a function, it will be called for each -address to determine if it is a trusted address. The function is -given two arguments: `addr` and `i`, where `addr` is a string of -the address to check and `i` is a number that represents the distance -from the socket address. - -### proxyaddr.all(req, [trust]) - -Return all the addresses of the request, optionally stopping at the -first untrusted. This array is ordered from closest to furthest -(i.e. `arr[0] === req.connection.remoteAddress`). - -```js -proxyaddr.all(req) -``` - -The optional `trust` argument takes the same arguments as `trust` -does in `proxyaddr(req, trust)`. - -```js -proxyaddr.all(req, 'loopback') -``` - -### proxyaddr.compile(val) - -Compiles argument `val` into a `trust` function. This function takes -the same arguments as `trust` does in `proxyaddr(req, trust)` and -returns a function suitable for `proxyaddr(req, trust)`. - -```js -var trust = proxyaddr.compile('localhost') -var addr = proxyaddr(req, trust) -``` - -This function is meant to be optimized for use against every request. -It is recommend to compile a trust function up-front for the trusted -configuration and pass that to `proxyaddr(req, trust)` for each request. - -## Testing - -```sh -$ npm test -``` - -## Benchmarks - -```sh -$ npm run-script bench -``` - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/proxy-addr.svg?style=flat -[npm-url]: https://npmjs.org/package/proxy-addr -[node-version-image]: https://img.shields.io/node/v/proxy-addr.svg?style=flat -[node-version-url]: http://nodejs.org/download/ -[travis-image]: https://img.shields.io/travis/jshttp/proxy-addr.svg?style=flat -[travis-url]: https://travis-ci.org/jshttp/proxy-addr -[coveralls-image]: https://img.shields.io/coveralls/jshttp/proxy-addr.svg?style=flat -[coveralls-url]: https://coveralls.io/r/jshttp/proxy-addr?branch=master -[downloads-image]: https://img.shields.io/npm/dm/proxy-addr.svg?style=flat -[downloads-url]: https://npmjs.org/package/proxy-addr diff --git a/s4t-server-node/node_modules/express/node_modules/proxy-addr/index.js b/s4t-server-node/node_modules/express/node_modules/proxy-addr/index.js deleted file mode 100644 index d739513..0000000 --- a/s4t-server-node/node_modules/express/node_modules/proxy-addr/index.js +++ /dev/null @@ -1,345 +0,0 @@ -/*! - * proxy-addr - * Copyright(c) 2014 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = proxyaddr; -module.exports.all = alladdrs; -module.exports.compile = compile; - -/** - * Module dependencies. - */ - -var forwarded = require('forwarded'); -var ipaddr = require('ipaddr.js'); - -/** - * Variables. - */ - -var digitre = /^[0-9]+$/; -var isip = ipaddr.isValid; -var parseip = ipaddr.parse; - -/** - * Pre-defined IP ranges. - */ - -var ipranges = { - linklocal: ['169.254.0.0/16', 'fe80::/10'], - loopback: ['127.0.0.1/8', '::1/128'], - uniquelocal: ['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16', 'fc00::/7'] -}; - -/** - * Get all addresses in the request, optionally stopping - * at the first untrusted. - * - * @param {Object} request - * @param {Function|Array|String} [trust] - * @api public - */ - -function alladdrs(req, trust) { - // get addresses - var addrs = forwarded(req); - - if (!trust) { - // Return all addresses - return addrs; - } - - if (typeof trust !== 'function') { - trust = compile(trust); - } - - for (var i = 0; i < addrs.length - 1; i++) { - if (trust(addrs[i], i)) continue; - - addrs.length = i + 1; - } - - return addrs; -} - -/** - * Compile argument into trust function. - * - * @param {Array|String} val - * @api private - */ - -function compile(val) { - if (!val) { - throw new TypeError('argument is required'); - } - - var trust = typeof val === 'string' - ? [val] - : val; - - if (!Array.isArray(trust)) { - throw new TypeError('unsupported trust argument'); - } - - for (var i = 0; i < trust.length; i++) { - val = trust[i]; - - if (!ipranges.hasOwnProperty(val)) { - continue; - } - - // Splice in pre-defined range - val = ipranges[val]; - trust.splice.apply(trust, [i, 1].concat(val)); - i += val.length - 1; - } - - return compileTrust(compileRangeSubnets(trust)); -} - -/** - * Compile `arr` elements into range subnets. - * - * @param {Array} arr - * @api private - */ - -function compileRangeSubnets(arr) { - var rangeSubnets = new Array(arr.length); - - for (var i = 0; i < arr.length; i++) { - rangeSubnets[i] = parseipNotation(arr[i]); - } - - return rangeSubnets; -} - -/** - * Compile range subnet array into trust function. - * - * @param {Array} rangeSubnets - * @api private - */ - -function compileTrust(rangeSubnets) { - // Return optimized function based on length - var len = rangeSubnets.length; - return len === 0 - ? trustNone - : len === 1 - ? trustSingle(rangeSubnets[0]) - : trustMulti(rangeSubnets); -} - -/** - * Parse IP notation string into range subnet. - * - * @param {String} note - * @api private - */ - -function parseipNotation(note) { - var ip; - var kind; - var max; - var pos = note.lastIndexOf('/'); - var range; - - ip = pos !== -1 - ? note.substring(0, pos) - : note; - - if (!isip(ip)) { - throw new TypeError('invalid IP address: ' + ip); - } - - ip = parseip(ip); - - kind = ip.kind(); - max = kind === 'ipv6' - ? 128 - : 32; - - range = pos !== -1 - ? note.substring(pos + 1, note.length) - : max; - - if (typeof range !== 'number') { - range = digitre.test(range) - ? parseInt(range, 10) - : isip(range) - ? parseNetmask(range) - : 0; - } - - if (ip.kind() === 'ipv6' && ip.isIPv4MappedAddress()) { - // Store as IPv4 - ip = ip.toIPv4Address(); - range = range <= max - ? range - 96 - : range; - } - - if (range <= 0 || range > max) { - throw new TypeError('invalid range on address: ' + note); - } - - return [ip, range]; -} - -/** - * Parse netmask string into CIDR range. - * - * @param {String} note - * @api private - */ - -function parseNetmask(netmask) { - var ip = parseip(netmask); - var parts; - var size; - - switch (ip.kind()) { - case 'ipv4': - parts = ip.octets; - size = 8; - break; - case 'ipv6': - parts = ip.parts; - size = 16; - break; - } - - var max = Math.pow(2, size) - 1; - var part; - var range = 0; - - for (var i = 0; i < parts.length; i++) { - part = parts[i] & max; - - if (part === max) { - range += size; - continue; - } - - while (part) { - part = (part << 1) & max; - range += 1; - } - - break; - } - - return range; -} - -/** - * Determine address of proxied request. - * - * @param {Object} request - * @param {Function|Array|String} trust - * @api public - */ - -function proxyaddr(req, trust) { - if (!req) { - throw new TypeError('req argument is required'); - } - - if (!trust) { - throw new TypeError('trust argument is required'); - } - - var addrs = alladdrs(req, trust); - var addr = addrs[addrs.length - 1]; - - return addr; -} - -/** - * Static trust function to trust nothing. - * - * @api private - */ - -function trustNone() { - return false; -} - -/** - * Compile trust function for multiple subnets. - * - * @param {Array} subnets - * @api private - */ - -function trustMulti(subnets) { - return function trust(addr) { - if (!isip(addr)) return false; - - var ip = parseip(addr); - var ipv4; - var kind = ip.kind(); - var subnet; - var subnetip; - var subnetkind; - var subnetrange; - var trusted; - - for (var i = 0; i < subnets.length; i++) { - subnet = subnets[i]; - subnetip = subnet[0]; - subnetkind = subnetip.kind(); - subnetrange = subnet[1]; - trusted = ip; - - if (kind !== subnetkind) { - if (kind !== 'ipv6' || subnetkind !== 'ipv4' || !ip.isIPv4MappedAddress()) { - continue; - } - - // Store addr as IPv4 - ipv4 = ipv4 || ip.toIPv4Address(); - trusted = ipv4; - } - - if (trusted.match(subnetip, subnetrange)) return true; - } - - return false; - }; -} - -/** - * Compile trust function for single subnet. - * - * @param {Object} subnet - * @api private - */ - -function trustSingle(subnet) { - var subnetip = subnet[0]; - var subnetkind = subnetip.kind(); - var subnetisipv4 = subnetkind === 'ipv4'; - var subnetrange = subnet[1]; - - return function trust(addr) { - if (!isip(addr)) return false; - - var ip = parseip(addr); - var kind = ip.kind(); - - return kind === subnetkind - ? ip.match(subnetip, subnetrange) - : subnetisipv4 && kind === 'ipv6' && ip.isIPv4MappedAddress() - ? ip.toIPv4Address().match(subnetip, subnetrange) - : false; - }; -} diff --git a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/HISTORY.md b/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/HISTORY.md deleted file mode 100644 index 97fa1d1..0000000 --- a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/HISTORY.md +++ /dev/null @@ -1,4 +0,0 @@ -0.1.0 / 2014-09-21 -================== - - * Initial release diff --git a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/LICENSE b/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/LICENSE deleted file mode 100644 index b7dce6c..0000000 --- a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 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/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/README.md b/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/README.md deleted file mode 100644 index 2b4988f..0000000 --- a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# forwarded - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Parse HTTP X-Forwarded-For header - -## Installation - -```sh -$ npm install forwarded -``` - -## API - -```js -var forwarded = require('forwarded') -``` - -### forwarded(req) - -```js -var addresses = forwarded(req) -``` - -Parse the `X-Forwarded-For` header from the request. Returns an array -of the addresses, including the socket address for the `req`. In reverse -order (i.e. index `0` is the socket address and the last index is the -furthest address, typically the end-user). - -## Testing - -```sh -$ npm test -``` - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/forwarded.svg?style=flat -[npm-url]: https://npmjs.org/package/forwarded -[node-version-image]: https://img.shields.io/node/v/forwarded.svg?style=flat -[node-version-url]: http://nodejs.org/download/ -[travis-image]: https://img.shields.io/travis/jshttp/forwarded.svg?style=flat -[travis-url]: https://travis-ci.org/jshttp/forwarded -[coveralls-image]: https://img.shields.io/coveralls/jshttp/forwarded.svg?style=flat -[coveralls-url]: https://coveralls.io/r/jshttp/forwarded?branch=master -[downloads-image]: https://img.shields.io/npm/dm/forwarded.svg?style=flat -[downloads-url]: https://npmjs.org/package/forwarded diff --git a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/index.js b/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/index.js deleted file mode 100644 index 2f5c340..0000000 --- a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/index.js +++ /dev/null @@ -1,35 +0,0 @@ -/*! - * forwarded - * Copyright(c) 2014 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = forwarded - -/** - * Get all addresses in the request, using the `X-Forwarded-For` header. - * - * @param {Object} req - * @api public - */ - -function forwarded(req) { - if (!req) { - throw new TypeError('argument req is required') - } - - // simple header parsing - var proxyAddrs = (req.headers['x-forwarded-for'] || '') - .split(/ *, */) - .filter(Boolean) - .reverse() - var socketAddr = req.connection.remoteAddress - var addrs = [socketAddr].concat(proxyAddrs) - - // return all addresses - return addrs -} diff --git a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/package.json b/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/package.json deleted file mode 100644 index fa8af9e..0000000 --- a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/forwarded/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "forwarded", - "description": "Parse HTTP X-Forwarded-For header", - "version": "0.1.0", - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - } - ], - "license": "MIT", - "keywords": [ - "x-forwarded-for", - "http", - "req" - ], - "repository": { - "type": "git", - "url": "https://github.com/jshttp/forwarded" - }, - "devDependencies": { - "istanbul": "0.3.2", - "mocha": "~1.21.4" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "README.md", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - }, - "gitHead": "e9a9faeb3cfaadf40eb57d144fff26bca9b818e8", - "bugs": { - "url": "https://github.com/jshttp/forwarded/issues" - }, - "homepage": "https://github.com/jshttp/forwarded", - "_id": "forwarded@0.1.0", - "_shasum": "19ef9874c4ae1c297bcf078fde63a09b66a84363", - "_from": "forwarded@>=0.1.0 <0.2.0", - "_npmVersion": "1.4.21", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - } - ], - "dist": { - "shasum": "19ef9874c4ae1c297bcf078fde63a09b66a84363", - "tarball": "http://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/.npmignore b/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/.npmignore deleted file mode 100644 index 7a1537b..0000000 --- a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -.idea -node_modules diff --git a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/Cakefile b/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/Cakefile deleted file mode 100644 index 7fd355a..0000000 --- a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/Cakefile +++ /dev/null @@ -1,18 +0,0 @@ -fs = require 'fs' -CoffeeScript = require 'coffee-script' -nodeunit = require 'nodeunit' -UglifyJS = require 'uglify-js' - -task 'build', 'build the JavaScript files from CoffeeScript source', build = (cb) -> - source = fs.readFileSync 'src/ipaddr.coffee' - fs.writeFileSync 'lib/ipaddr.js', CoffeeScript.compile source.toString() - - invoke 'test' - invoke 'compress' - -task 'test', 'run the bundled tests', (cb) -> - nodeunit.reporters.default.run ['test'] - -task 'compress', 'uglify the resulting javascript', (cb) -> - result = UglifyJS.minify('lib/ipaddr.js') - fs.writeFileSync('ipaddr.min.js', result.code) diff --git a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/LICENSE b/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/LICENSE deleted file mode 100644 index 3493f0d..0000000 --- a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2011 Peter Zotov - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/README.md b/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/README.md deleted file mode 100644 index a816672..0000000 --- a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/README.md +++ /dev/null @@ -1,149 +0,0 @@ -# ipaddr.js — an IPv6 and IPv4 address manipulation library - -ipaddr.js is a small (1.9K minified and gzipped) library for manipulating -IP addresses in JavaScript environments. It runs on both CommonJS runtimes -(e.g. [nodejs]) and in a web browser. - -ipaddr.js allows you to verify and parse string representation of an IP -address, match it against a CIDR range or range list, determine if it falls -into some reserved ranges (examples include loopback and private ranges), -and convert between IPv4 and IPv4-mapped IPv6 addresses. - -[nodejs]: http://nodejs.org - -## Installation - -`npm install ipaddr.js` - -## API - -ipaddr.js defines one object in the global scope: `ipaddr`. In CommonJS, -it is exported from the module: - -```js -var ipaddr = require('ipaddr.js'); -``` - -The API consists of several global methods and two classes: ipaddr.IPv6 and ipaddr.IPv4. - -### Global methods - -There are three global methods defined: `ipaddr.isValid`, `ipaddr.parse` and -`ipaddr.process`. All of them receive a string as a single parameter. - -The `ipaddr.isValid` method returns `true` if the address is a valid IPv4 or -IPv6 address, and `false` otherwise. It does not throw any exceptions. - -The `ipaddr.parse` method returns an object representing the IP address, -or throws an `Error` if the passed string is not a valid representation of an -IP address. - -The `ipaddr.process` method works just like the `ipaddr.parse` one, but it -automatically converts IPv4-mapped IPv6 addresses to their IPv4 couterparts -before returning. It is useful when you have a Node.js instance listening -on an IPv6 socket, and the `net.ivp6.bindv6only` sysctl parameter (or its -equivalent on non-Linux OS) is set to 0. In this case, you can accept IPv4 -connections on your IPv6-only socket, but the remote address will be mangled. -Use `ipaddr.process` method to automatically demangle it. - -### Object representation - -Parsing methods return an object which descends from `ipaddr.IPv6` or -`ipaddr.IPv4`. These objects share some properties, but most of them differ. - -#### Shared properties - -One can determine the type of address by calling `addr.kind()`. It will return -either `"ipv6"` or `"ipv4"`. - -An address can be converted back to its string representation with `addr.toString()`. -Note that this method: - * does not return the original string used to create the object (in fact, there is - no way of getting that string) - * returns a compact representation (when it is applicable) - -A `match(range, bits)` method can be used to check if the address falls into a -certain CIDR range. -Note that an address can be (obviously) matched only against an address of the same type. - -For example: - -```js -var addr = ipaddr.parse("2001:db8:1234::1"); -var range = ipaddr.parse("2001:db8::"); - -addr.match(range, 32); // => true -``` - -A `range()` method returns one of predefined names for several special ranges defined -by IP protocols. The exact names (and their respective CIDR ranges) can be looked up -in the source: [IPv6 ranges] and [IPv4 ranges]. Some common ones include `"unicast"` -(the default one) and `"reserved"`. - -You can match against your own range list by using -`ipaddr.subnetMatch(address, rangeList, defaultName)` method. It can work with both -IPv6 and IPv4 addresses, and accepts a name-to-subnet map as the range list. For example: - -```js -var rangeList = { - documentationOnly: [ ipaddr.parse('2001:db8::'), 32 ], - tunnelProviders: [ - [ ipaddr.parse('2001:470::'), 32 ], // he.net - [ ipaddr.parse('2001:5c0::'), 32 ] // freenet6 - ] -}; -ipaddr.subnetMatch(ipaddr.parse('2001:470:8:66::1'), rangeList, 'unknown'); // => "he.net" -``` - -The addresses can be converted to their byte representation with `toByteArray()`. -(Actually, JavaScript mostly does not know about byte buffers. They are emulated with -arrays of numbers, each in range of 0..255.) - -```js -var bytes = ipaddr.parse('2a00:1450:8007::68').toByteArray(); // ipv6.google.com -bytes // => [42, 0x00, 0x14, 0x50, 0x80, 0x07, 0x00, , 0x00, 0x68 ] -``` - -The `ipaddr.IPv4` and `ipaddr.IPv6` objects have some methods defined, too. All of them -have the same interface for both protocols, and are similar to global methods. - -`ipaddr.IPvX.isValid(string)` can be used to check if the string is a valid address -for particular protocol, and `ipaddr.IPvX.parse(string)` is the error-throwing parser. - -[IPv6 ranges]: https://github.com/whitequark/ipaddr.js/blob/master/src/ipaddr.coffee#L186 -[IPv4 ranges]: https://github.com/whitequark/ipaddr.js/blob/master/src/ipaddr.coffee#L71 - -#### IPv6 properties - -Sometimes you will want to convert IPv6 not to a compact string representation (with -the `::` substitution); the `toNormalizedString()` method will return an address where -all zeroes are explicit. - -For example: - -```js -var addr = ipaddr.parse("2001:0db8::0001"); -addr.toString(); // => "2001:db8::1" -addr.toNormalizedString(); // => "2001:db8:0:0:0:0:0:1" -``` - -The `isIPv4MappedAddress()` method will return `true` if this address is an IPv4-mapped -one, and `toIPv4Address()` will return an IPv4 object address. - -To access the underlying binary representation of the address, use `addr.parts`. - -```js -var addr = ipaddr.parse("2001:db8:10::1234:DEAD"); -addr.parts // => [0x2001, 0xdb8, 0x10, 0, 0, 0, 0x1234, 0xdead] -``` - -#### IPv4 properties - -`toIPv4MappedAddress()` will return a corresponding IPv4-mapped IPv6 address. - -To access the underlying representation of the address, use `addr.octets`. - -```js -var addr = ipaddr.parse("192.168.1.1"); -addr.octets // => [192, 168, 1, 1] -``` diff --git a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/ipaddr.min.js b/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/ipaddr.min.js deleted file mode 100644 index db44419..0000000 --- a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/ipaddr.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var t,r,n,e,i,o,a,s;r={},s=this,"undefined"!=typeof module&&null!==module&&module.exports?module.exports=r:s.ipaddr=r,a=function(t,r,n,e){var i,o;if(t.length!==r.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");for(i=0;e>0;){if(o=n-e,0>o&&(o=0),t[i]>>o!==r[i]>>o)return!1;e-=n,i+=1}return!0},r.subnetMatch=function(t,r,n){var e,i,o,a,s;null==n&&(n="unicast");for(e in r)for(i=r[e],"[object Array]"!==toString.call(i[0])&&(i=[i]),a=0,s=i.length;s>a;a++)if(o=i[a],t.match.apply(t,o))return e;return n},r.IPv4=function(){function t(t){var r,n,e;if(4!==t.length)throw new Error("ipaddr: ipv4 octet count should be 4");for(n=0,e=t.length;e>n;n++)if(r=t[n],!(r>=0&&255>=r))throw new Error("ipaddr: ipv4 octet is a byte");this.octets=t}return t.prototype.kind=function(){return"ipv4"},t.prototype.toString=function(){return this.octets.join(".")},t.prototype.toByteArray=function(){return this.octets.slice(0)},t.prototype.match=function(t,r){if("ipv4"!==t.kind())throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return a(this.octets,t.octets,8,r)},t.prototype.SpecialRanges={broadcast:[[new t([255,255,255,255]),32]],multicast:[[new t([224,0,0,0]),4]],linkLocal:[[new t([169,254,0,0]),16]],loopback:[[new t([127,0,0,0]),8]],"private":[[new t([10,0,0,0]),8],[new t([172,16,0,0]),12],[new t([192,168,0,0]),16]],reserved:[[new t([192,0,0,0]),24],[new t([192,0,2,0]),24],[new t([192,88,99,0]),24],[new t([198,51,100,0]),24],[new t([203,0,113,0]),24],[new t([240,0,0,0]),4]]},t.prototype.range=function(){return r.subnetMatch(this,this.SpecialRanges)},t.prototype.toIPv4MappedAddress=function(){return r.IPv6.parse("::ffff:"+this.toString())},t}(),n="(0?\\d+|0x[a-f0-9]+)",e={fourOctet:new RegExp("^"+n+"\\."+n+"\\."+n+"\\."+n+"$","i"),longValue:new RegExp("^"+n+"$","i")},r.IPv4.parser=function(t){var r,n,i,o,a;if(n=function(t){return"0"===t[0]&&"x"!==t[1]?parseInt(t,8):parseInt(t)},r=t.match(e.fourOctet))return function(){var t,e,o,a;for(o=r.slice(1,6),a=[],t=0,e=o.length;e>t;t++)i=o[t],a.push(n(i));return a}();if(r=t.match(e.longValue)){if(a=n(r[1]),a>4294967295||0>a)throw new Error("ipaddr: address outside defined range");return function(){var t,r;for(r=[],o=t=0;24>=t;o=t+=8)r.push(a>>o&255);return r}().reverse()}return null},r.IPv6=function(){function t(t){var r,n,e;if(8!==t.length)throw new Error("ipaddr: ipv6 part count should be 8");for(n=0,e=t.length;e>n;n++)if(r=t[n],!(r>=0&&65535>=r))throw new Error("ipaddr: ipv6 part should fit to two octets");this.parts=t}return t.prototype.kind=function(){return"ipv6"},t.prototype.toString=function(){var t,r,n,e,i,o,a;for(i=function(){var t,n,e,i;for(e=this.parts,i=[],t=0,n=e.length;n>t;t++)r=e[t],i.push(r.toString(16));return i}.call(this),t=[],n=function(r){return t.push(r)},e=0,o=0,a=i.length;a>o;o++)switch(r=i[o],e){case 0:n("0"===r?"":r),e=1;break;case 1:"0"===r?e=2:n(r);break;case 2:"0"!==r&&(n(""),n(r),e=3);break;case 3:n(r)}return 2===e&&(n(""),n("")),t.join(":")},t.prototype.toByteArray=function(){var t,r,n,e,i;for(t=[],i=this.parts,n=0,e=i.length;e>n;n++)r=i[n],t.push(r>>8),t.push(255&r);return t},t.prototype.toNormalizedString=function(){var t;return function(){var r,n,e,i;for(e=this.parts,i=[],r=0,n=e.length;n>r;r++)t=e[r],i.push(t.toString(16));return i}.call(this).join(":")},t.prototype.match=function(t,r){if("ipv6"!==t.kind())throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return a(this.parts,t.parts,16,r)},t.prototype.SpecialRanges={unspecified:[new t([0,0,0,0,0,0,0,0]),128],linkLocal:[new t([65152,0,0,0,0,0,0,0]),10],multicast:[new t([65280,0,0,0,0,0,0,0]),8],loopback:[new t([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new t([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new t([0,0,0,0,0,65535,0,0]),96],rfc6145:[new t([0,0,0,0,65535,0,0,0]),96],rfc6052:[new t([100,65435,0,0,0,0,0,0]),96],"6to4":[new t([8194,0,0,0,0,0,0,0]),16],teredo:[new t([8193,0,0,0,0,0,0,0]),32],reserved:[[new t([8193,3512,0,0,0,0,0,0]),32]]},t.prototype.range=function(){return r.subnetMatch(this,this.SpecialRanges)},t.prototype.isIPv4MappedAddress=function(){return"ipv4Mapped"===this.range()},t.prototype.toIPv4Address=function(){var t,n,e;if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");return e=this.parts.slice(-2),t=e[0],n=e[1],new r.IPv4([t>>8,255&t,n>>8,255&n])},t}(),i="(?:[0-9a-f]+::?)+",o={"native":new RegExp("^(::)?("+i+")?([0-9a-f]+)?(::)?$","i"),transitional:new RegExp("^((?:"+i+")|(?:::)(?:"+i+")?)"+(""+n+"\\."+n+"\\."+n+"\\."+n+"$"),"i")},t=function(t,r){var n,e,i,o,a;if(t.indexOf("::")!==t.lastIndexOf("::"))return null;for(n=0,e=-1;(e=t.indexOf(":",e+1))>=0;)n++;for(":"===t[0]&&n--,":"===t[t.length-1]&&n--,a=r-n,o=":";a--;)o+="0:";return t=t.replace("::",o),":"===t[0]&&(t=t.slice(1)),":"===t[t.length-1]&&(t=t.slice(0,-1)),function(){var r,n,e,o;for(e=t.split(":"),o=[],r=0,n=e.length;n>r;r++)i=e[r],o.push(parseInt(i,16));return o}()},r.IPv6.parser=function(r){var n,e;return r.match(o["native"])?t(r,8):(n=r.match(o.transitional))&&(e=t(n[1].slice(0,-1),6))?(e.push(parseInt(n[2])<<8|parseInt(n[3])),e.push(parseInt(n[4])<<8|parseInt(n[5])),e):null},r.IPv4.isIPv4=r.IPv6.isIPv6=function(t){return null!==this.parser(t)},r.IPv4.isValid=r.IPv6.isValid=function(t){var r;try{return new this(this.parser(t)),!0}catch(n){return r=n,!1}},r.IPv4.parse=r.IPv6.parse=function(t){var r;if(r=this.parser(t),null===r)throw new Error("ipaddr: string is not formatted like ip address");return new this(r)},r.isValid=function(t){return r.IPv6.isValid(t)||r.IPv4.isValid(t)},r.parse=function(t){if(r.IPv6.isValid(t))return r.IPv6.parse(t);if(r.IPv4.isValid(t))return r.IPv4.parse(t);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},r.process=function(t){var r;return r=this.parse(t),"ipv6"===r.kind()&&r.isIPv4MappedAddress()?r.toIPv4Address():r}}).call(this); \ No newline at end of file diff --git a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/lib/ipaddr.js b/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/lib/ipaddr.js deleted file mode 100644 index 1e6d801..0000000 --- a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/lib/ipaddr.js +++ /dev/null @@ -1,404 +0,0 @@ -(function() { - var expandIPv6, ipaddr, ipv4Part, ipv4Regexes, ipv6Part, ipv6Regexes, matchCIDR, root; - - ipaddr = {}; - - root = this; - - if ((typeof module !== "undefined" && module !== null) && module.exports) { - module.exports = ipaddr; - } else { - root['ipaddr'] = ipaddr; - } - - matchCIDR = function(first, second, partSize, cidrBits) { - var part, shift; - if (first.length !== second.length) { - throw new Error("ipaddr: cannot match CIDR for objects with different lengths"); - } - part = 0; - while (cidrBits > 0) { - shift = partSize - cidrBits; - if (shift < 0) { - shift = 0; - } - if (first[part] >> shift !== second[part] >> shift) { - return false; - } - cidrBits -= partSize; - part += 1; - } - return true; - }; - - ipaddr.subnetMatch = function(address, rangeList, defaultName) { - var rangeName, rangeSubnets, subnet, _i, _len; - if (defaultName == null) { - defaultName = 'unicast'; - } - for (rangeName in rangeList) { - rangeSubnets = rangeList[rangeName]; - if (toString.call(rangeSubnets[0]) !== '[object Array]') { - rangeSubnets = [rangeSubnets]; - } - for (_i = 0, _len = rangeSubnets.length; _i < _len; _i++) { - subnet = rangeSubnets[_i]; - if (address.match.apply(address, subnet)) { - return rangeName; - } - } - } - return defaultName; - }; - - ipaddr.IPv4 = (function() { - function IPv4(octets) { - var octet, _i, _len; - if (octets.length !== 4) { - throw new Error("ipaddr: ipv4 octet count should be 4"); - } - for (_i = 0, _len = octets.length; _i < _len; _i++) { - octet = octets[_i]; - if (!((0 <= octet && octet <= 255))) { - throw new Error("ipaddr: ipv4 octet is a byte"); - } - } - this.octets = octets; - } - - IPv4.prototype.kind = function() { - return 'ipv4'; - }; - - IPv4.prototype.toString = function() { - return this.octets.join("."); - }; - - IPv4.prototype.toByteArray = function() { - return this.octets.slice(0); - }; - - IPv4.prototype.match = function(other, cidrRange) { - if (other.kind() !== 'ipv4') { - throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one"); - } - return matchCIDR(this.octets, other.octets, 8, cidrRange); - }; - - IPv4.prototype.SpecialRanges = { - broadcast: [[new IPv4([255, 255, 255, 255]), 32]], - multicast: [[new IPv4([224, 0, 0, 0]), 4]], - linkLocal: [[new IPv4([169, 254, 0, 0]), 16]], - loopback: [[new IPv4([127, 0, 0, 0]), 8]], - "private": [[new IPv4([10, 0, 0, 0]), 8], [new IPv4([172, 16, 0, 0]), 12], [new IPv4([192, 168, 0, 0]), 16]], - reserved: [[new IPv4([192, 0, 0, 0]), 24], [new IPv4([192, 0, 2, 0]), 24], [new IPv4([192, 88, 99, 0]), 24], [new IPv4([198, 51, 100, 0]), 24], [new IPv4([203, 0, 113, 0]), 24], [new IPv4([240, 0, 0, 0]), 4]] - }; - - IPv4.prototype.range = function() { - return ipaddr.subnetMatch(this, this.SpecialRanges); - }; - - IPv4.prototype.toIPv4MappedAddress = function() { - return ipaddr.IPv6.parse("::ffff:" + (this.toString())); - }; - - return IPv4; - - })(); - - ipv4Part = "(0?\\d+|0x[a-f0-9]+)"; - - ipv4Regexes = { - fourOctet: new RegExp("^" + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "$", 'i'), - longValue: new RegExp("^" + ipv4Part + "$", 'i') - }; - - ipaddr.IPv4.parser = function(string) { - var match, parseIntAuto, part, shift, value; - parseIntAuto = function(string) { - if (string[0] === "0" && string[1] !== "x") { - return parseInt(string, 8); - } else { - return parseInt(string); - } - }; - if (match = string.match(ipv4Regexes.fourOctet)) { - return (function() { - var _i, _len, _ref, _results; - _ref = match.slice(1, 6); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - part = _ref[_i]; - _results.push(parseIntAuto(part)); - } - return _results; - })(); - } else if (match = string.match(ipv4Regexes.longValue)) { - value = parseIntAuto(match[1]); - if (value > 0xffffffff || value < 0) { - throw new Error("ipaddr: address outside defined range"); - } - return ((function() { - var _i, _results; - _results = []; - for (shift = _i = 0; _i <= 24; shift = _i += 8) { - _results.push((value >> shift) & 0xff); - } - return _results; - })()).reverse(); - } else { - return null; - } - }; - - ipaddr.IPv6 = (function() { - function IPv6(parts) { - var part, _i, _len; - if (parts.length !== 8) { - throw new Error("ipaddr: ipv6 part count should be 8"); - } - for (_i = 0, _len = parts.length; _i < _len; _i++) { - part = parts[_i]; - if (!((0 <= part && part <= 0xffff))) { - throw new Error("ipaddr: ipv6 part should fit to two octets"); - } - } - this.parts = parts; - } - - IPv6.prototype.kind = function() { - return 'ipv6'; - }; - - IPv6.prototype.toString = function() { - var compactStringParts, part, pushPart, state, stringParts, _i, _len; - stringParts = (function() { - var _i, _len, _ref, _results; - _ref = this.parts; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - part = _ref[_i]; - _results.push(part.toString(16)); - } - return _results; - }).call(this); - compactStringParts = []; - pushPart = function(part) { - return compactStringParts.push(part); - }; - state = 0; - for (_i = 0, _len = stringParts.length; _i < _len; _i++) { - part = stringParts[_i]; - switch (state) { - case 0: - if (part === '0') { - pushPart(''); - } else { - pushPart(part); - } - state = 1; - break; - case 1: - if (part === '0') { - state = 2; - } else { - pushPart(part); - } - break; - case 2: - if (part !== '0') { - pushPart(''); - pushPart(part); - state = 3; - } - break; - case 3: - pushPart(part); - } - } - if (state === 2) { - pushPart(''); - pushPart(''); - } - return compactStringParts.join(":"); - }; - - IPv6.prototype.toByteArray = function() { - var bytes, part, _i, _len, _ref; - bytes = []; - _ref = this.parts; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - part = _ref[_i]; - bytes.push(part >> 8); - bytes.push(part & 0xff); - } - return bytes; - }; - - IPv6.prototype.toNormalizedString = function() { - var part; - return ((function() { - var _i, _len, _ref, _results; - _ref = this.parts; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - part = _ref[_i]; - _results.push(part.toString(16)); - } - return _results; - }).call(this)).join(":"); - }; - - IPv6.prototype.match = function(other, cidrRange) { - if (other.kind() !== 'ipv6') { - throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one"); - } - return matchCIDR(this.parts, other.parts, 16, cidrRange); - }; - - IPv6.prototype.SpecialRanges = { - unspecified: [new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128], - linkLocal: [new IPv6([0xfe80, 0, 0, 0, 0, 0, 0, 0]), 10], - multicast: [new IPv6([0xff00, 0, 0, 0, 0, 0, 0, 0]), 8], - loopback: [new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128], - uniqueLocal: [new IPv6([0xfc00, 0, 0, 0, 0, 0, 0, 0]), 7], - ipv4Mapped: [new IPv6([0, 0, 0, 0, 0, 0xffff, 0, 0]), 96], - rfc6145: [new IPv6([0, 0, 0, 0, 0xffff, 0, 0, 0]), 96], - rfc6052: [new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96], - '6to4': [new IPv6([0x2002, 0, 0, 0, 0, 0, 0, 0]), 16], - teredo: [new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 32], - reserved: [[new IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32]] - }; - - IPv6.prototype.range = function() { - return ipaddr.subnetMatch(this, this.SpecialRanges); - }; - - IPv6.prototype.isIPv4MappedAddress = function() { - return this.range() === 'ipv4Mapped'; - }; - - IPv6.prototype.toIPv4Address = function() { - var high, low, _ref; - if (!this.isIPv4MappedAddress()) { - throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4"); - } - _ref = this.parts.slice(-2), high = _ref[0], low = _ref[1]; - return new ipaddr.IPv4([high >> 8, high & 0xff, low >> 8, low & 0xff]); - }; - - return IPv6; - - })(); - - ipv6Part = "(?:[0-9a-f]+::?)+"; - - ipv6Regexes = { - "native": new RegExp("^(::)?(" + ipv6Part + ")?([0-9a-f]+)?(::)?$", 'i'), - transitional: new RegExp(("^((?:" + ipv6Part + ")|(?:::)(?:" + ipv6Part + ")?)") + ("" + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "$"), 'i') - }; - - expandIPv6 = function(string, parts) { - var colonCount, lastColon, part, replacement, replacementCount; - if (string.indexOf('::') !== string.lastIndexOf('::')) { - return null; - } - colonCount = 0; - lastColon = -1; - while ((lastColon = string.indexOf(':', lastColon + 1)) >= 0) { - colonCount++; - } - if (string[0] === ':') { - colonCount--; - } - if (string[string.length - 1] === ':') { - colonCount--; - } - replacementCount = parts - colonCount; - replacement = ':'; - while (replacementCount--) { - replacement += '0:'; - } - string = string.replace('::', replacement); - if (string[0] === ':') { - string = string.slice(1); - } - if (string[string.length - 1] === ':') { - string = string.slice(0, -1); - } - return (function() { - var _i, _len, _ref, _results; - _ref = string.split(":"); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - part = _ref[_i]; - _results.push(parseInt(part, 16)); - } - return _results; - })(); - }; - - ipaddr.IPv6.parser = function(string) { - var match, parts; - if (string.match(ipv6Regexes['native'])) { - return expandIPv6(string, 8); - } else if (match = string.match(ipv6Regexes['transitional'])) { - parts = expandIPv6(match[1].slice(0, -1), 6); - if (parts) { - parts.push(parseInt(match[2]) << 8 | parseInt(match[3])); - parts.push(parseInt(match[4]) << 8 | parseInt(match[5])); - return parts; - } - } - return null; - }; - - ipaddr.IPv4.isIPv4 = ipaddr.IPv6.isIPv6 = function(string) { - return this.parser(string) !== null; - }; - - ipaddr.IPv4.isValid = ipaddr.IPv6.isValid = function(string) { - var e; - try { - new this(this.parser(string)); - return true; - } catch (_error) { - e = _error; - return false; - } - }; - - ipaddr.IPv4.parse = ipaddr.IPv6.parse = function(string) { - var parts; - parts = this.parser(string); - if (parts === null) { - throw new Error("ipaddr: string is not formatted like ip address"); - } - return new this(parts); - }; - - ipaddr.isValid = function(string) { - return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string); - }; - - ipaddr.parse = function(string) { - if (ipaddr.IPv6.isValid(string)) { - return ipaddr.IPv6.parse(string); - } else if (ipaddr.IPv4.isValid(string)) { - return ipaddr.IPv4.parse(string); - } else { - throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format"); - } - }; - - ipaddr.process = function(string) { - var addr; - addr = this.parse(string); - if (addr.kind() === 'ipv6' && addr.isIPv4MappedAddress()) { - return addr.toIPv4Address(); - } else { - return addr; - } - }; - -}).call(this); diff --git a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/package.json b/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/package.json deleted file mode 100644 index 15d42d9..0000000 --- a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "ipaddr.js", - "description": "A library for manipulating IPv4 and IPv6 addresses in JavaScript.", - "version": "0.1.6", - "author": { - "name": "Peter Zotov", - "email": "whitequark@whitequark.org" - }, - "directories": { - "lib": "./lib" - }, - "dependencies": {}, - "devDependencies": { - "coffee-script": "~1.6", - "nodeunit": "~0.5.3", - "uglify-js": "latest" - }, - "scripts": { - "test": "cake build test" - }, - "keywords": [ - "ip", - "ipv4", - "ipv6" - ], - "repository": { - "type": "git", - "url": "git://github.com/whitequark/ipaddr.js" - }, - "main": "./lib/ipaddr", - "engines": { - "node": ">= 0.2.5" - }, - "license": "MIT", - "gitHead": "87595aade23e18114b05efa09e1d46ea2ef20c12", - "bugs": { - "url": "https://github.com/whitequark/ipaddr.js/issues" - }, - "_id": "ipaddr.js@0.1.6", - "_shasum": "8f0530b217993873025fd4b72bdfd69bc56a9a12", - "_from": "ipaddr.js@0.1.6", - "_npmVersion": "1.4.21", - "_npmUser": { - "name": "whitequark", - "email": "whitequark@whitequark.org" - }, - "maintainers": [ - { - "name": "whitequark", - "email": "whitequark@whitequark.org" - } - ], - "dist": { - "shasum": "8f0530b217993873025fd4b72bdfd69bc56a9a12", - "tarball": "http://registry.npmjs.org/ipaddr.js/-/ipaddr.js-0.1.6.tgz" - }, - "_resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-0.1.6.tgz", - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/whitequark/ipaddr.js" -} diff --git a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/src/ipaddr.coffee b/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/src/ipaddr.coffee deleted file mode 100644 index 2a26833..0000000 --- a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/src/ipaddr.coffee +++ /dev/null @@ -1,346 +0,0 @@ -# Define the main object -ipaddr = {} - -root = this - -# Export for both the CommonJS and browser-like environment -if module? && module.exports - module.exports = ipaddr -else - root['ipaddr'] = ipaddr - -# A generic CIDR (Classless Inter-Domain Routing) RFC1518 range matcher. -matchCIDR = (first, second, partSize, cidrBits) -> - if first.length != second.length - throw new Error "ipaddr: cannot match CIDR for objects with different lengths" - - part = 0 - while cidrBits > 0 - shift = partSize - cidrBits - shift = 0 if shift < 0 - - if first[part] >> shift != second[part] >> shift - return false - - cidrBits -= partSize - part += 1 - - return true - -# An utility function to ease named range matching. See examples below. -ipaddr.subnetMatch = (address, rangeList, defaultName='unicast') -> - for rangeName, rangeSubnets of rangeList - # ECMA5 Array.isArray isn't available everywhere - if toString.call(rangeSubnets[0]) != '[object Array]' - rangeSubnets = [ rangeSubnets ] - - for subnet in rangeSubnets - return rangeName if address.match.apply(address, subnet) - - return defaultName - -# An IPv4 address (RFC791). -class ipaddr.IPv4 - # Constructs a new IPv4 address from an array of four octets. - # Verifies the input. - constructor: (octets) -> - if octets.length != 4 - throw new Error "ipaddr: ipv4 octet count should be 4" - - for octet in octets - if !(0 <= octet <= 255) - throw new Error "ipaddr: ipv4 octet is a byte" - - @octets = octets - - # The 'kind' method exists on both IPv4 and IPv6 classes. - kind: -> - return 'ipv4' - - # Returns the address in convenient, decimal-dotted format. - toString: -> - return @octets.join "." - - # Returns an array of byte-sized values in network order - toByteArray: -> - return @octets.slice(0) # octets.clone - - # Checks if this address matches other one within given CIDR range. - match: (other, cidrRange) -> - if other.kind() != 'ipv4' - throw new Error "ipaddr: cannot match ipv4 address with non-ipv4 one" - - return matchCIDR(this.octets, other.octets, 8, cidrRange) - - # Special IPv4 address ranges. - SpecialRanges: - broadcast: [ - [ new IPv4([255, 255, 255, 255]), 32 ] - ] - multicast: [ # RFC3171 - [ new IPv4([224, 0, 0, 0]), 4 ] - ] - linkLocal: [ # RFC3927 - [ new IPv4([169, 254, 0, 0]), 16 ] - ] - loopback: [ # RFC5735 - [ new IPv4([127, 0, 0, 0]), 8 ] - ] - private: [ # RFC1918 - [ new IPv4([10, 0, 0, 0]), 8 ] - [ new IPv4([172, 16, 0, 0]), 12 ] - [ new IPv4([192, 168, 0, 0]), 16 ] - ] - reserved: [ # Reserved and testing-only ranges; RFCs 5735, 5737, 2544, 1700 - [ new IPv4([192, 0, 0, 0]), 24 ] - [ new IPv4([192, 0, 2, 0]), 24 ] - [ new IPv4([192, 88, 99, 0]), 24 ] - [ new IPv4([198, 51, 100, 0]), 24 ] - [ new IPv4([203, 0, 113, 0]), 24 ] - [ new IPv4([240, 0, 0, 0]), 4 ] - ] - - # Checks if the address corresponds to one of the special ranges. - range: -> - return ipaddr.subnetMatch(this, @SpecialRanges) - - # Convrets this IPv4 address to an IPv4-mapped IPv6 address. - toIPv4MappedAddress: -> - return ipaddr.IPv6.parse "::ffff:#{@toString()}" - -# A list of regular expressions that match arbitrary IPv4 addresses, -# for which a number of weird notations exist. -# Note that an address like 0010.0xa5.1.1 is considered legal. -ipv4Part = "(0?\\d+|0x[a-f0-9]+)" -ipv4Regexes = - fourOctet: new RegExp "^#{ipv4Part}\\.#{ipv4Part}\\.#{ipv4Part}\\.#{ipv4Part}$", 'i' - longValue: new RegExp "^#{ipv4Part}$", 'i' - -# Classful variants (like a.b, where a is an octet, and b is a 24-bit -# value representing last three octets; this corresponds to a class C -# address) are omitted due to classless nature of modern Internet. -ipaddr.IPv4.parser = (string) -> - parseIntAuto = (string) -> - if string[0] == "0" && string[1] != "x" - parseInt(string, 8) - else - parseInt(string) - - # parseInt recognizes all that octal & hexadecimal weirdness for us - if match = string.match(ipv4Regexes.fourOctet) - return (parseIntAuto(part) for part in match[1..5]) - else if match = string.match(ipv4Regexes.longValue) - value = parseIntAuto(match[1]) - if value > 0xffffffff || value < 0 - throw new Error "ipaddr: address outside defined range" - return ((value >> shift) & 0xff for shift in [0..24] by 8).reverse() - else - return null - -# An IPv6 address (RFC2460) -class ipaddr.IPv6 - # Constructs an IPv6 address from an array of eight 16-bit parts. - # Throws an error if the input is invalid. - constructor: (parts) -> - if parts.length != 8 - throw new Error "ipaddr: ipv6 part count should be 8" - - for part in parts - if !(0 <= part <= 0xffff) - throw new Error "ipaddr: ipv6 part should fit to two octets" - - @parts = parts - - # The 'kind' method exists on both IPv4 and IPv6 classes. - kind: -> - return 'ipv6' - - # Returns the address in compact, human-readable format like - # 2001:db8:8:66::1 - toString: -> - stringParts = (part.toString(16) for part in @parts) - - compactStringParts = [] - pushPart = (part) -> compactStringParts.push part - - state = 0 - for part in stringParts - switch state - when 0 - if part == '0' - pushPart('') - else - pushPart(part) - - state = 1 - when 1 - if part == '0' - state = 2 - else - pushPart(part) - when 2 - unless part == '0' - pushPart('') - pushPart(part) - state = 3 - when 3 - pushPart(part) - - if state == 2 - pushPart('') - pushPart('') - - return compactStringParts.join ":" - - # Returns an array of byte-sized values in network order - toByteArray: -> - bytes = [] - for part in @parts - bytes.push(part >> 8) - bytes.push(part & 0xff) - - return bytes - - # Returns the address in expanded format with all zeroes included, like - # 2001:db8:8:66:0:0:0:1 - toNormalizedString: -> - return (part.toString(16) for part in @parts).join ":" - - # Checks if this address matches other one within given CIDR range. - match: (other, cidrRange) -> - if other.kind() != 'ipv6' - throw new Error "ipaddr: cannot match ipv6 address with non-ipv6 one" - - return matchCIDR(this.parts, other.parts, 16, cidrRange) - - # Special IPv6 ranges - SpecialRanges: - unspecified: [ new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128 ] # RFC4291, here and after - linkLocal: [ new IPv6([0xfe80, 0, 0, 0, 0, 0, 0, 0]), 10 ] - multicast: [ new IPv6([0xff00, 0, 0, 0, 0, 0, 0, 0]), 8 ] - loopback: [ new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128 ] - uniqueLocal: [ new IPv6([0xfc00, 0, 0, 0, 0, 0, 0, 0]), 7 ] - ipv4Mapped: [ new IPv6([0, 0, 0, 0, 0, 0xffff, 0, 0]), 96 ] - rfc6145: [ new IPv6([0, 0, 0, 0, 0xffff, 0, 0, 0]), 96 ] # RFC6145 - rfc6052: [ new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96 ] # RFC6052 - '6to4': [ new IPv6([0x2002, 0, 0, 0, 0, 0, 0, 0]), 16 ] # RFC3056 - teredo: [ new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 32 ] # RFC6052, RFC6146 - reserved: [ - [ new IPv6([ 0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32 ] # RFC4291 - ] - - # Checks if the address corresponds to one of the special ranges. - range: -> - return ipaddr.subnetMatch(this, @SpecialRanges) - - # Checks if this address is an IPv4-mapped IPv6 address. - isIPv4MappedAddress: -> - return @range() == 'ipv4Mapped' - - # Converts this address to IPv4 address if it is an IPv4-mapped IPv6 address. - # Throws an error otherwise. - toIPv4Address: -> - unless @isIPv4MappedAddress() - throw new Error "ipaddr: trying to convert a generic ipv6 address to ipv4" - - [high, low] = @parts[-2..-1] - - return new ipaddr.IPv4([high >> 8, high & 0xff, low >> 8, low & 0xff]) - -# IPv6-matching regular expressions. -# For IPv6, the task is simpler: it is enough to match the colon-delimited -# hexadecimal IPv6 and a transitional variant with dotted-decimal IPv4 at -# the end. -ipv6Part = "(?:[0-9a-f]+::?)+" -ipv6Regexes = - native: new RegExp "^(::)?(#{ipv6Part})?([0-9a-f]+)?(::)?$", 'i' - transitional: new RegExp "^((?:#{ipv6Part})|(?:::)(?:#{ipv6Part})?)" + - "#{ipv4Part}\\.#{ipv4Part}\\.#{ipv4Part}\\.#{ipv4Part}$", 'i' - -# Expand :: in an IPv6 address or address part consisting of `parts` groups. -expandIPv6 = (string, parts) -> - # More than one '::' means invalid adddress - if string.indexOf('::') != string.lastIndexOf('::') - return null - - # How many parts do we already have? - colonCount = 0 - lastColon = -1 - while (lastColon = string.indexOf(':', lastColon + 1)) >= 0 - colonCount++ - - # 0::0 is two parts more than :: - colonCount-- if string[0] == ':' - colonCount-- if string[string.length-1] == ':' - - # replacement = ':' + '0:' * (parts - colonCount) - replacementCount = parts - colonCount - replacement = ':' - while replacementCount-- - replacement += '0:' - - # Insert the missing zeroes - string = string.replace('::', replacement) - - # Trim any garbage which may be hanging around if :: was at the edge in - # the source string - string = string[1..-1] if string[0] == ':' - string = string[0..-2] if string[string.length-1] == ':' - - return (parseInt(part, 16) for part in string.split(":")) - -# Parse an IPv6 address. -ipaddr.IPv6.parser = (string) -> - if string.match(ipv6Regexes['native']) - return expandIPv6(string, 8) - - else if match = string.match(ipv6Regexes['transitional']) - parts = expandIPv6(match[1][0..-2], 6) - if parts - parts.push(parseInt(match[2]) << 8 | parseInt(match[3])) - parts.push(parseInt(match[4]) << 8 | parseInt(match[5])) - return parts - - return null - -# Checks if a given string is formatted like IPv4/IPv6 address. -ipaddr.IPv4.isIPv4 = ipaddr.IPv6.isIPv6 = (string) -> - return @parser(string) != null - -# Checks if a given string is a valid IPv4/IPv6 address. -ipaddr.IPv4.isValid = ipaddr.IPv6.isValid = (string) -> - try - new this(@parser(string)) - return true - catch e - return false - -# Tries to parse and validate a string with IPv4/IPv6 address. -# Throws an error if it fails. -ipaddr.IPv4.parse = ipaddr.IPv6.parse = (string) -> - parts = @parser(string) - if parts == null - throw new Error "ipaddr: string is not formatted like ip address" - - return new this(parts) - -# Checks if the address is valid IP address -ipaddr.isValid = (string) -> - return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string) - -# Try to parse an address and throw an error if it is impossible -ipaddr.parse = (string) -> - if ipaddr.IPv6.isValid(string) - return ipaddr.IPv6.parse(string) - else if ipaddr.IPv4.isValid(string) - return ipaddr.IPv4.parse(string) - else - throw new Error "ipaddr: the address has neither IPv6 nor IPv4 format" - -# Parse an address and return plain IPv4 address if it is an IPv4-mapped address -ipaddr.process = (string) -> - addr = @parse(string) - if addr.kind() == 'ipv6' && addr.isIPv4MappedAddress() - return addr.toIPv4Address() - else - return addr diff --git a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/test/ipaddr.test.coffee b/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/test/ipaddr.test.coffee deleted file mode 100644 index a06836a..0000000 --- a/s4t-server-node/node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/test/ipaddr.test.coffee +++ /dev/null @@ -1,220 +0,0 @@ -ipaddr = require '../lib/ipaddr' - -module.exports = - 'should define main classes': (test) -> - test.ok(ipaddr.IPv4?, 'defines IPv4 class') - test.ok(ipaddr.IPv6?, 'defines IPv6 class') - test.done() - - 'can construct IPv4 from octets': (test) -> - test.doesNotThrow -> - new ipaddr.IPv4([192, 168, 1, 2]) - test.done() - - 'refuses to construct invalid IPv4': (test) -> - test.throws -> - new ipaddr.IPv4([300, 1, 2, 3]) - test.throws -> - new ipaddr.IPv4([8, 8, 8]) - test.done() - - 'converts IPv4 to string correctly': (test) -> - addr = new ipaddr.IPv4([192, 168, 1, 1]) - test.equal(addr.toString(), '192.168.1.1') - test.done() - - 'returns correct kind for IPv4': (test) -> - addr = new ipaddr.IPv4([1, 2, 3, 4]) - test.equal(addr.kind(), 'ipv4') - test.done() - - 'allows to access IPv4 octets': (test) -> - addr = new ipaddr.IPv4([42, 0, 0, 0]) - test.equal(addr.octets[0], 42) - test.done() - - 'checks IPv4 address format': (test) -> - test.equal(ipaddr.IPv4.isIPv4('192.168.007.0xa'), true) - test.equal(ipaddr.IPv4.isIPv4('1024.0.0.1'), true) - test.equal(ipaddr.IPv4.isIPv4('8.0xa.wtf.6'), false) - test.done() - - 'validates IPv4 addresses': (test) -> - test.equal(ipaddr.IPv4.isValid('192.168.007.0xa'), true) - test.equal(ipaddr.IPv4.isValid('1024.0.0.1'), false) - test.equal(ipaddr.IPv4.isValid('8.0xa.wtf.6'), false) - test.done() - - 'parses IPv4 in several weird formats': (test) -> - test.deepEqual(ipaddr.IPv4.parse('192.168.1.1').octets, [192, 168, 1, 1]) - test.deepEqual(ipaddr.IPv4.parse('0xc0.168.1.1').octets, [192, 168, 1, 1]) - test.deepEqual(ipaddr.IPv4.parse('192.0250.1.1').octets, [192, 168, 1, 1]) - test.deepEqual(ipaddr.IPv4.parse('0xc0a80101').octets, [192, 168, 1, 1]) - test.deepEqual(ipaddr.IPv4.parse('030052000401').octets, [192, 168, 1, 1]) - test.deepEqual(ipaddr.IPv4.parse('3232235777').octets, [192, 168, 1, 1]) - test.done() - - 'barfs at invalid IPv4': (test) -> - test.throws -> - ipaddr.IPv4.parse('10.0.0.wtf') - test.done() - - 'matches IPv4 CIDR correctly': (test) -> - addr = new ipaddr.IPv4([10, 5, 0, 1]) - test.equal(addr.match(ipaddr.IPv4.parse('0.0.0.0'), 0), true) - test.equal(addr.match(ipaddr.IPv4.parse('11.0.0.0'), 8), false) - test.equal(addr.match(ipaddr.IPv4.parse('10.0.0.0'), 8), true) - test.equal(addr.match(ipaddr.IPv4.parse('10.0.0.1'), 8), true) - test.equal(addr.match(ipaddr.IPv4.parse('10.0.0.10'), 8), true) - test.equal(addr.match(ipaddr.IPv4.parse('10.5.5.0'), 16), true) - test.equal(addr.match(ipaddr.IPv4.parse('10.4.5.0'), 16), false) - test.equal(addr.match(ipaddr.IPv4.parse('10.4.5.0'), 15), true) - test.equal(addr.match(ipaddr.IPv4.parse('10.5.0.2'), 32), false) - test.equal(addr.match(addr, 32), true) - test.done() - - 'detects reserved IPv4 networks': (test) -> - test.equal(ipaddr.IPv4.parse('10.1.0.1').range(), 'private') - test.equal(ipaddr.IPv4.parse('192.168.2.1').range(), 'private') - test.equal(ipaddr.IPv4.parse('224.100.0.1').range(), 'multicast') - test.equal(ipaddr.IPv4.parse('169.254.15.0').range(), 'linkLocal') - test.equal(ipaddr.IPv4.parse('127.1.1.1').range(), 'loopback') - test.equal(ipaddr.IPv4.parse('255.255.255.255').range(), 'broadcast') - test.equal(ipaddr.IPv4.parse('240.1.2.3').range(), 'reserved') - test.equal(ipaddr.IPv4.parse('8.8.8.8').range(), 'unicast') - test.done() - - 'can construct IPv6 from parts': (test) -> - test.doesNotThrow -> - new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1]) - test.done() - - 'refuses to construct invalid IPv6': (test) -> - test.throws -> - new ipaddr.IPv6([0xfffff, 0, 0, 0, 0, 0, 0, 1]) - test.throws -> - new ipaddr.IPv6([0xfffff, 0, 0, 0, 0, 0, 1]) - test.done() - - 'converts IPv6 to string correctly': (test) -> - addr = new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1]) - test.equal(addr.toNormalizedString(), '2001:db8:f53a:0:0:0:0:1') - test.equal(addr.toString(), '2001:db8:f53a::1') - test.equal(new ipaddr.IPv6([0, 0, 0, 0, 0, 0, 0, 1]).toString(), '::1') - test.equal(new ipaddr.IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]).toString(), '2001:db8::') - test.done() - - 'returns correct kind for IPv6': (test) -> - addr = new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1]) - test.equal(addr.kind(), 'ipv6') - test.done() - - 'allows to access IPv6 address parts': (test) -> - addr = new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 42, 0, 1]) - test.equal(addr.parts[5], 42) - test.done() - - 'checks IPv6 address format': (test) -> - test.equal(ipaddr.IPv6.isIPv6('2001:db8:F53A::1'), true) - test.equal(ipaddr.IPv6.isIPv6('200001::1'), true) - test.equal(ipaddr.IPv6.isIPv6('::ffff:192.168.1.1'), true) - test.equal(ipaddr.IPv6.isIPv6('::ffff:300.168.1.1'), true) - test.equal(ipaddr.IPv6.isIPv6('::ffff:300.168.1.1:0'), false) - test.equal(ipaddr.IPv6.isIPv6('fe80::wtf'), false) - test.done() - - 'validates IPv6 addresses': (test) -> - test.equal(ipaddr.IPv6.isValid('2001:db8:F53A::1'), true) - test.equal(ipaddr.IPv6.isValid('200001::1'), false) - test.equal(ipaddr.IPv6.isValid('::ffff:192.168.1.1'), true) - test.equal(ipaddr.IPv6.isValid('::ffff:300.168.1.1'), false) - test.equal(ipaddr.IPv6.isValid('::ffff:300.168.1.1:0'), false) - test.equal(ipaddr.IPv6.isValid('2001:db8::F53A::1'), false) - test.equal(ipaddr.IPv6.isValid('fe80::wtf'), false) - test.done() - - 'parses IPv6 in different formats': (test) -> - test.deepEqual(ipaddr.IPv6.parse('2001:db8:F53A:0:0:0:0:1').parts, [0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1]) - test.deepEqual(ipaddr.IPv6.parse('fe80::10').parts, [0xfe80, 0, 0, 0, 0, 0, 0, 0x10]) - test.deepEqual(ipaddr.IPv6.parse('2001:db8:F53A::').parts, [0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 0]) - test.deepEqual(ipaddr.IPv6.parse('::1').parts, [0, 0, 0, 0, 0, 0, 0, 1]) - test.deepEqual(ipaddr.IPv6.parse('::').parts, [0, 0, 0, 0, 0, 0, 0, 0]) - test.done() - - 'barfs at invalid IPv6': (test) -> - test.throws -> - ipaddr.IPv6.parse('fe80::0::1') - test.done() - - 'matches IPv6 CIDR correctly': (test) -> - addr = ipaddr.IPv6.parse('2001:db8:f53a::1') - test.equal(addr.match(ipaddr.IPv6.parse('::'), 0), true) - test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f53a::1:1'), 64), true) - test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f53b::1:1'), 48), false) - test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f531::1:1'), 44), true) - test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f500::1'), 40), true) - test.equal(addr.match(ipaddr.IPv6.parse('2001:db9:f500::1'), 40), false) - test.equal(addr.match(addr, 128), true) - test.done() - - 'converts between IPv4-mapped IPv6 addresses and IPv4 addresses': (test) -> - addr = ipaddr.IPv4.parse('77.88.21.11') - mapped = addr.toIPv4MappedAddress() - test.deepEqual(mapped.parts, [0, 0, 0, 0, 0, 0xffff, 0x4d58, 0x150b]) - test.deepEqual(mapped.toIPv4Address().octets, addr.octets) - test.done() - - 'refuses to convert non-IPv4-mapped IPv6 address to IPv4 address': (test) -> - test.throws -> - ipaddr.IPv6.parse('2001:db8::1').toIPv4Address() - test.done() - - 'detects reserved IPv6 networks': (test) -> - test.equal(ipaddr.IPv6.parse('::').range(), 'unspecified') - test.equal(ipaddr.IPv6.parse('fe80::1234:5678:abcd:0123').range(), 'linkLocal') - test.equal(ipaddr.IPv6.parse('ff00::1234').range(), 'multicast') - test.equal(ipaddr.IPv6.parse('::1').range(), 'loopback') - test.equal(ipaddr.IPv6.parse('fc00::').range(), 'uniqueLocal') - test.equal(ipaddr.IPv6.parse('::ffff:192.168.1.10').range(), 'ipv4Mapped') - test.equal(ipaddr.IPv6.parse('::ffff:0:192.168.1.10').range(), 'rfc6145') - test.equal(ipaddr.IPv6.parse('64:ff9b::1234').range(), 'rfc6052') - test.equal(ipaddr.IPv6.parse('2002:1f63:45e8::1').range(), '6to4') - test.equal(ipaddr.IPv6.parse('2001::4242').range(), 'teredo') - test.equal(ipaddr.IPv6.parse('2001:db8::3210').range(), 'reserved') - test.equal(ipaddr.IPv6.parse('2001:470:8:66::1').range(), 'unicast') - test.done() - - 'is able to determine IP address type': (test) -> - test.equal(ipaddr.parse('8.8.8.8').kind(), 'ipv4') - test.equal(ipaddr.parse('2001:db8:3312::1').kind(), 'ipv6') - test.done() - - 'throws an error if tried to parse an invalid address': (test) -> - test.throws -> - ipaddr.parse('::some.nonsense') - test.done() - - 'correctly processes IPv4-mapped addresses': (test) -> - test.equal(ipaddr.process('8.8.8.8').kind(), 'ipv4') - test.equal(ipaddr.process('2001:db8:3312::1').kind(), 'ipv6') - test.equal(ipaddr.process('::ffff:192.168.1.1').kind(), 'ipv4') - test.done() - - 'correctly converts IPv6 and IPv4 addresses to byte arrays': (test) -> - test.deepEqual(ipaddr.parse('1.2.3.4').toByteArray(), - [0x1, 0x2, 0x3, 0x4]); - # Fuck yeah. The first byte of Google's IPv6 address is 42. 42! - test.deepEqual(ipaddr.parse('2a00:1450:8007::68').toByteArray(), - [42, 0x00, 0x14, 0x50, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68 ]) - test.done() - - 'correctly parses 1 as an IPv4 address': (test) -> - test.equal(ipaddr.IPv6.isValid('1'), false) - test.equal(ipaddr.IPv4.isValid('1'), true) - test.deepEqual(new ipaddr.IPv4([0, 0, 0, 1]), ipaddr.parse('1')) - test.done() - - 'does not consider a very large or very small number a valid IP address': (test) -> - test.equal(ipaddr.isValid('4999999999'), false) - test.equal(ipaddr.isValid('-1'), false) - test.done() diff --git a/s4t-server-node/node_modules/express/node_modules/proxy-addr/package.json b/s4t-server-node/node_modules/express/node_modules/proxy-addr/package.json deleted file mode 100644 index a675b3f..0000000 --- a/s4t-server-node/node_modules/express/node_modules/proxy-addr/package.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "name": "proxy-addr", - "description": "Determine address of proxied request", - "version": "1.0.5", - "author": { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - "license": "MIT", - "keywords": [ - "ip", - "proxy", - "x-forwarded-for" - ], - "repository": { - "type": "git", - "url": "https://github.com/jshttp/proxy-addr" - }, - "dependencies": { - "forwarded": "~0.1.0", - "ipaddr.js": "0.1.6" - }, - "devDependencies": { - "benchmark": "1.0.0", - "beautify-benchmark": "0.2.4", - "istanbul": "0.3.5", - "mocha": "~1.21.5" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "README.md", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "bench": "node benchmark/index.js", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - }, - "gitHead": "dd768c48b99fb65b2b753269b8eea675e86da3fd", - "bugs": { - "url": "https://github.com/jshttp/proxy-addr/issues" - }, - "homepage": "https://github.com/jshttp/proxy-addr", - "_id": "proxy-addr@1.0.5", - "_shasum": "17ad518b637a21a64746319f39fbc72c8628f63b", - "_from": "proxy-addr@>=1.0.5 <1.1.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "shtylman", - "email": "shtylman@gmail.com" - }, - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "mscdex", - "email": "mscdex@mscdex.net" - }, - { - "name": "fishrock123", - "email": "fishrock123@rocketmail.com" - } - ], - "dist": { - "shasum": "17ad518b637a21a64746319f39fbc72c8628f63b", - "tarball": "http://registry.npmjs.org/proxy-addr/-/proxy-addr-1.0.5.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.0.5.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/qs/.jshintignore b/s4t-server-node/node_modules/express/node_modules/qs/.jshintignore deleted file mode 100644 index 3c3629e..0000000 --- a/s4t-server-node/node_modules/express/node_modules/qs/.jshintignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/s4t-server-node/node_modules/express/node_modules/qs/.jshintrc b/s4t-server-node/node_modules/express/node_modules/qs/.jshintrc deleted file mode 100644 index 997b3f7..0000000 --- a/s4t-server-node/node_modules/express/node_modules/qs/.jshintrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "node": true, - - "curly": true, - "latedef": true, - "quotmark": true, - "undef": true, - "unused": true, - "trailing": true -} diff --git a/s4t-server-node/node_modules/express/node_modules/qs/.npmignore b/s4t-server-node/node_modules/express/node_modules/qs/.npmignore deleted file mode 100644 index 7e1574d..0000000 --- a/s4t-server-node/node_modules/express/node_modules/qs/.npmignore +++ /dev/null @@ -1,18 +0,0 @@ -.idea -*.iml -npm-debug.log -dump.rdb -node_modules -results.tap -results.xml -npm-shrinkwrap.json -config.json -.DS_Store -*/.DS_Store -*/*/.DS_Store -._* -*/._* -*/*/._* -coverage.* -lib-cov -complexity.md diff --git a/s4t-server-node/node_modules/express/node_modules/qs/.travis.yml b/s4t-server-node/node_modules/express/node_modules/qs/.travis.yml deleted file mode 100644 index c891dd0..0000000 --- a/s4t-server-node/node_modules/express/node_modules/qs/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js - -node_js: - - 0.10 \ No newline at end of file diff --git a/s4t-server-node/node_modules/express/node_modules/qs/CHANGELOG.md b/s4t-server-node/node_modules/express/node_modules/qs/CHANGELOG.md deleted file mode 100644 index f5ee8b4..0000000 --- a/s4t-server-node/node_modules/express/node_modules/qs/CHANGELOG.md +++ /dev/null @@ -1,68 +0,0 @@ - -## [**2.3.3**](https://github.com/hapijs/qs/issues?milestone=18&state=open) -- [**#59**](https://github.com/hapijs/qs/issues/59) make sure array indexes are >= 0, closes #57 -- [**#58**](https://github.com/hapijs/qs/issues/58) make qs usable for browser loader - -## [**2.3.2**](https://github.com/hapijs/qs/issues?milestone=17&state=closed) -- [**#55**](https://github.com/hapijs/qs/issues/55) allow merging a string into an object - -## [**2.3.1**](https://github.com/hapijs/qs/issues?milestone=16&state=closed) -- [**#52**](https://github.com/hapijs/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError". - -## [**2.3.0**](https://github.com/hapijs/qs/issues?milestone=15&state=closed) -- [**#50**](https://github.com/hapijs/qs/issues/50) add option to omit array indices, closes #46 - -## [**2.2.5**](https://github.com/hapijs/qs/issues?milestone=14&state=closed) -- [**#39**](https://github.com/hapijs/qs/issues/39) Is there an alternative to Buffer.isBuffer? -- [**#49**](https://github.com/hapijs/qs/issues/49) refactor utils.merge, fixes #45 -- [**#41**](https://github.com/hapijs/qs/issues/41) avoid browserifying Buffer, for #39 - -## [**2.2.4**](https://github.com/hapijs/qs/issues?milestone=13&state=closed) -- [**#38**](https://github.com/hapijs/qs/issues/38) how to handle object keys beginning with a number - -## [**2.2.3**](https://github.com/hapijs/qs/issues?milestone=12&state=closed) -- [**#37**](https://github.com/hapijs/qs/issues/37) parser discards first empty value in array -- [**#36**](https://github.com/hapijs/qs/issues/36) Update to lab 4.x - -## [**2.2.2**](https://github.com/hapijs/qs/issues?milestone=11&state=closed) -- [**#33**](https://github.com/hapijs/qs/issues/33) Error when plain object in a value -- [**#34**](https://github.com/hapijs/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty -- [**#24**](https://github.com/hapijs/qs/issues/24) Changelog? Semver? - -## [**2.2.1**](https://github.com/hapijs/qs/issues?milestone=10&state=closed) -- [**#32**](https://github.com/hapijs/qs/issues/32) account for circular references properly, closes #31 -- [**#31**](https://github.com/hapijs/qs/issues/31) qs.parse stackoverflow on circular objects - -## [**2.2.0**](https://github.com/hapijs/qs/issues?milestone=9&state=closed) -- [**#26**](https://github.com/hapijs/qs/issues/26) Don't use Buffer global if it's not present -- [**#30**](https://github.com/hapijs/qs/issues/30) Bug when merging non-object values into arrays -- [**#29**](https://github.com/hapijs/qs/issues/29) Don't call Utils.clone at the top of Utils.merge -- [**#23**](https://github.com/hapijs/qs/issues/23) Ability to not limit parameters? - -## [**2.1.0**](https://github.com/hapijs/qs/issues?milestone=8&state=closed) -- [**#22**](https://github.com/hapijs/qs/issues/22) Enable using a RegExp as delimiter - -## [**2.0.0**](https://github.com/hapijs/qs/issues?milestone=7&state=closed) -- [**#18**](https://github.com/hapijs/qs/issues/18) Why is there arrayLimit? -- [**#20**](https://github.com/hapijs/qs/issues/20) Configurable parametersLimit -- [**#21**](https://github.com/hapijs/qs/issues/21) make all limits optional, for #18, for #20 - -## [**1.2.2**](https://github.com/hapijs/qs/issues?milestone=6&state=closed) -- [**#19**](https://github.com/hapijs/qs/issues/19) Don't overwrite null values - -## [**1.2.1**](https://github.com/hapijs/qs/issues?milestone=5&state=closed) -- [**#16**](https://github.com/hapijs/qs/issues/16) ignore non-string delimiters -- [**#15**](https://github.com/hapijs/qs/issues/15) Close code block - -## [**1.2.0**](https://github.com/hapijs/qs/issues?milestone=4&state=closed) -- [**#12**](https://github.com/hapijs/qs/issues/12) Add optional delim argument -- [**#13**](https://github.com/hapijs/qs/issues/13) fix #11: flattened keys in array are now correctly parsed - -## [**1.1.0**](https://github.com/hapijs/qs/issues?milestone=3&state=closed) -- [**#7**](https://github.com/hapijs/qs/issues/7) Empty values of a POST array disappear after being submitted -- [**#9**](https://github.com/hapijs/qs/issues/9) Should not omit equals signs (=) when value is null -- [**#6**](https://github.com/hapijs/qs/issues/6) Minor grammar fix in README - -## [**1.0.2**](https://github.com/hapijs/qs/issues?milestone=2&state=closed) -- [**#5**](https://github.com/hapijs/qs/issues/5) array holes incorrectly copied into object on large index - diff --git a/s4t-server-node/node_modules/express/node_modules/qs/CONTRIBUTING.md b/s4t-server-node/node_modules/express/node_modules/qs/CONTRIBUTING.md deleted file mode 100644 index 8928361..0000000 --- a/s4t-server-node/node_modules/express/node_modules/qs/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md). diff --git a/s4t-server-node/node_modules/express/node_modules/qs/LICENSE b/s4t-server-node/node_modules/express/node_modules/qs/LICENSE deleted file mode 100755 index d456948..0000000 --- a/s4t-server-node/node_modules/express/node_modules/qs/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2014 Nathan LaFreniere and other contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * The names of any contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - * * * - -The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors diff --git a/s4t-server-node/node_modules/express/node_modules/qs/Makefile b/s4t-server-node/node_modules/express/node_modules/qs/Makefile deleted file mode 100644 index 31cc899..0000000 --- a/s4t-server-node/node_modules/express/node_modules/qs/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -test: - @node node_modules/lab/bin/lab -a code -L -test-cov: - @node node_modules/lab/bin/lab -a code -t 100 -L -test-cov-html: - @node node_modules/lab/bin/lab -a code -L -r html -o coverage.html - -.PHONY: test test-cov test-cov-html diff --git a/s4t-server-node/node_modules/express/node_modules/qs/README.md b/s4t-server-node/node_modules/express/node_modules/qs/README.md deleted file mode 100755 index 21bf3fa..0000000 --- a/s4t-server-node/node_modules/express/node_modules/qs/README.md +++ /dev/null @@ -1,222 +0,0 @@ -# qs - -A querystring parsing and stringifying library with some added security. - -[![Build Status](https://secure.travis-ci.org/hapijs/qs.svg)](http://travis-ci.org/hapijs/qs) - -Lead Maintainer: [Nathan LaFreniere](https://github.com/nlf) - -The **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring). - -## Usage - -```javascript -var Qs = require('qs'); - -var obj = Qs.parse('a=c'); // { a: 'c' } -var str = Qs.stringify(obj); // 'a=c' -``` - -### Parsing Objects - -```javascript -Qs.parse(string, [options]); -``` - -**qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`. -For example, the string `'foo[bar]=baz'` converts to: - -```javascript -{ - foo: { - bar: 'baz' - } -} -``` - -URI encoded strings work too: - -```javascript -Qs.parse('a%5Bb%5D=c'); -// { a: { b: 'c' } } -``` - -You can also nest your objects, like `'foo[bar][baz]=foobarbaz'`: - -```javascript -{ - foo: { - bar: { - baz: 'foobarbaz' - } - } -} -``` - -By default, when nesting objects **qs** will only parse up to 5 children deep. This means if you attempt to parse a string like -`'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be: - -```javascript -{ - a: { - b: { - c: { - d: { - e: { - f: { - '[g][h][i]': 'j' - } - } - } - } - } - } -} -``` - -This depth can be overridden by passing a `depth` option to `Qs.parse(string, [options])`: - -```javascript -Qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 }); -// { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } } -``` - -The depth limit helps mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number. - -For similar reasons, by default **qs** will only parse up to 1000 parameters. This can be overridden by passing a `parameterLimit` option: - -```javascript -Qs.parse('a=b&c=d', { parameterLimit: 1 }); -// { a: 'b' } -``` - -An optional delimiter can also be passed: - -```javascript -Qs.parse('a=b;c=d', { delimiter: ';' }); -// { a: 'b', c: 'd' } -``` - -Delimiters can be a regular expression too: - -```javascript -Qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ }); -// { a: 'b', c: 'd', e: 'f' } -``` - -### Parsing Arrays - -**qs** can also parse arrays using a similar `[]` notation: - -```javascript -Qs.parse('a[]=b&a[]=c'); -// { a: ['b', 'c'] } -``` - -You may specify an index as well: - -```javascript -Qs.parse('a[1]=c&a[0]=b'); -// { a: ['b', 'c'] } -``` - -Note that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number -to create an array. When creating arrays with specific indices, **qs** will compact a sparse array to only the existing values preserving -their order: - -```javascript -Qs.parse('a[1]=b&a[15]=c'); -// { a: ['b', 'c'] } -``` - -Note that an empty string is also a value, and will be preserved: - -```javascript -Qs.parse('a[]=&a[]=b'); -// { a: ['', 'b'] } -Qs.parse('a[0]=b&a[1]=&a[2]=c'); -// { a: ['b', '', 'c'] } -``` - -**qs** will also limit specifying indices in an array to a maximum index of `20`. Any array members with an index of greater than `20` will -instead be converted to an object with the index as the key: - -```javascript -Qs.parse('a[100]=b'); -// { a: { '100': 'b' } } -``` - -This limit can be overridden by passing an `arrayLimit` option: - -```javascript -Qs.parse('a[1]=b', { arrayLimit: 0 }); -// { a: { '1': 'b' } } -``` - -To disable array parsing entirely, set `arrayLimit` to `-1`. - -If you mix notations, **qs** will merge the two items into an object: - -```javascript -Qs.parse('a[0]=b&a[b]=c'); -// { a: { '0': 'b', b: 'c' } } -``` - -You can also create arrays of objects: - -```javascript -Qs.parse('a[][b]=c'); -// { a: [{ b: 'c' }] } -``` - -### Stringifying - -```javascript -Qs.stringify(object, [options]); -``` - -When stringifying, **qs** always URI encodes output. Objects are stringified as you would expect: - -```javascript -Qs.stringify({ a: 'b' }); -// 'a=b' -Qs.stringify({ a: { b: 'c' } }); -// 'a%5Bb%5D=c' -``` - -Examples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage. - -When arrays are stringified, by default they are given explicit indices: - -```javascript -Qs.stringify({ a: ['b', 'c', 'd'] }); -// 'a[0]=b&a[1]=c&a[2]=d' -``` - -You may override this by setting the `indices` option to `false`: - -```javascript -Qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }); -// 'a=b&a=c&a=d' -``` - -Empty strings and null values will omit the value, but the equals sign (=) remains in place: - -```javascript -Qs.stringify({ a: '' }); -// 'a=' -``` - -Properties that are set to `undefined` will be omitted entirely: - -```javascript -Qs.stringify({ a: null, b: undefined }); -// 'a=' -``` - -The delimiter may be overridden with stringify as well: - -```javascript -Qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }); -// 'a=b;c=d' -``` diff --git a/s4t-server-node/node_modules/express/node_modules/qs/index.js b/s4t-server-node/node_modules/express/node_modules/qs/index.js deleted file mode 100644 index 2291cd8..0000000 --- a/s4t-server-node/node_modules/express/node_modules/qs/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/'); diff --git a/s4t-server-node/node_modules/express/node_modules/qs/lib/index.js b/s4t-server-node/node_modules/express/node_modules/qs/lib/index.js deleted file mode 100755 index 0e09493..0000000 --- a/s4t-server-node/node_modules/express/node_modules/qs/lib/index.js +++ /dev/null @@ -1,15 +0,0 @@ -// Load modules - -var Stringify = require('./stringify'); -var Parse = require('./parse'); - - -// Declare internals - -var internals = {}; - - -module.exports = { - stringify: Stringify, - parse: Parse -}; diff --git a/s4t-server-node/node_modules/express/node_modules/qs/lib/parse.js b/s4t-server-node/node_modules/express/node_modules/qs/lib/parse.js deleted file mode 100755 index 4e7d02a..0000000 --- a/s4t-server-node/node_modules/express/node_modules/qs/lib/parse.js +++ /dev/null @@ -1,157 +0,0 @@ -// Load modules - -var Utils = require('./utils'); - - -// Declare internals - -var internals = { - delimiter: '&', - depth: 5, - arrayLimit: 20, - parameterLimit: 1000 -}; - - -internals.parseValues = function (str, options) { - - var obj = {}; - var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit); - - for (var i = 0, il = parts.length; i < il; ++i) { - var part = parts[i]; - var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1; - - if (pos === -1) { - obj[Utils.decode(part)] = ''; - } - else { - var key = Utils.decode(part.slice(0, pos)); - var val = Utils.decode(part.slice(pos + 1)); - - if (!obj.hasOwnProperty(key)) { - obj[key] = val; - } - else { - obj[key] = [].concat(obj[key]).concat(val); - } - } - } - - return obj; -}; - - -internals.parseObject = function (chain, val, options) { - - if (!chain.length) { - return val; - } - - var root = chain.shift(); - - var obj = {}; - if (root === '[]') { - obj = []; - obj = obj.concat(internals.parseObject(chain, val, options)); - } - else { - var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root; - var index = parseInt(cleanRoot, 10); - var indexString = '' + index; - if (!isNaN(index) && - root !== cleanRoot && - indexString === cleanRoot && - index >= 0 && - index <= options.arrayLimit) { - - obj = []; - obj[index] = internals.parseObject(chain, val, options); - } - else { - obj[cleanRoot] = internals.parseObject(chain, val, options); - } - } - - return obj; -}; - - -internals.parseKeys = function (key, val, options) { - - if (!key) { - return; - } - - // The regex chunks - - var parent = /^([^\[\]]*)/; - var child = /(\[[^\[\]]*\])/g; - - // Get the parent - - var segment = parent.exec(key); - - // Don't allow them to overwrite object prototype properties - - if (Object.prototype.hasOwnProperty(segment[1])) { - return; - } - - // Stash the parent if it exists - - var keys = []; - if (segment[1]) { - keys.push(segment[1]); - } - - // Loop through children appending to the array until we hit depth - - var i = 0; - while ((segment = child.exec(key)) !== null && i < options.depth) { - - ++i; - if (!Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) { - keys.push(segment[1]); - } - } - - // If there's a remainder, just add whatever is left - - if (segment) { - keys.push('[' + key.slice(segment.index) + ']'); - } - - return internals.parseObject(keys, val, options); -}; - - -module.exports = function (str, options) { - - if (str === '' || - str === null || - typeof str === 'undefined') { - - return {}; - } - - options = options || {}; - options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : internals.delimiter; - options.depth = typeof options.depth === 'number' ? options.depth : internals.depth; - options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : internals.arrayLimit; - options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : internals.parameterLimit; - - var tempObj = typeof str === 'string' ? internals.parseValues(str, options) : str; - var obj = {}; - - // Iterate over the keys and setup the new object - - var keys = Object.keys(tempObj); - for (var i = 0, il = keys.length; i < il; ++i) { - var key = keys[i]; - var newObj = internals.parseKeys(key, tempObj[key], options); - obj = Utils.merge(obj, newObj); - } - - return Utils.compact(obj); -}; diff --git a/s4t-server-node/node_modules/express/node_modules/qs/lib/stringify.js b/s4t-server-node/node_modules/express/node_modules/qs/lib/stringify.js deleted file mode 100755 index b441104..0000000 --- a/s4t-server-node/node_modules/express/node_modules/qs/lib/stringify.js +++ /dev/null @@ -1,77 +0,0 @@ -// Load modules - -var Utils = require('./utils'); - - -// Declare internals - -var internals = { - delimiter: '&', - indices: true -}; - - -internals.stringify = function (obj, prefix, options) { - - if (Utils.isBuffer(obj)) { - obj = obj.toString(); - } - else if (obj instanceof Date) { - obj = obj.toISOString(); - } - else if (obj === null) { - obj = ''; - } - - if (typeof obj === 'string' || - typeof obj === 'number' || - typeof obj === 'boolean') { - - return [encodeURIComponent(prefix) + '=' + encodeURIComponent(obj)]; - } - - var values = []; - - if (typeof obj === 'undefined') { - return values; - } - - var objKeys = Object.keys(obj); - for (var i = 0, il = objKeys.length; i < il; ++i) { - var key = objKeys[i]; - if (!options.indices && - Array.isArray(obj)) { - - values = values.concat(internals.stringify(obj[key], prefix, options)); - } - else { - values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']', options)); - } - } - - return values; -}; - - -module.exports = function (obj, options) { - - options = options || {}; - var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter; - options.indices = typeof options.indices === 'boolean' ? options.indices : internals.indices; - - var keys = []; - - if (typeof obj !== 'object' || - obj === null) { - - return ''; - } - - var objKeys = Object.keys(obj); - for (var i = 0, il = objKeys.length; i < il; ++i) { - var key = objKeys[i]; - keys = keys.concat(internals.stringify(obj[key], key, options)); - } - - return keys.join(delimiter); -}; diff --git a/s4t-server-node/node_modules/express/node_modules/qs/lib/utils.js b/s4t-server-node/node_modules/express/node_modules/qs/lib/utils.js deleted file mode 100755 index 5240bd5..0000000 --- a/s4t-server-node/node_modules/express/node_modules/qs/lib/utils.js +++ /dev/null @@ -1,132 +0,0 @@ -// Load modules - - -// Declare internals - -var internals = {}; - - -exports.arrayToObject = function (source) { - - var obj = {}; - for (var i = 0, il = source.length; i < il; ++i) { - if (typeof source[i] !== 'undefined') { - - obj[i] = source[i]; - } - } - - return obj; -}; - - -exports.merge = function (target, source) { - - if (!source) { - return target; - } - - if (typeof source !== 'object') { - if (Array.isArray(target)) { - target.push(source); - } - else { - target[source] = true; - } - - return target; - } - - if (typeof target !== 'object') { - target = [target].concat(source); - return target; - } - - if (Array.isArray(target) && - !Array.isArray(source)) { - - target = exports.arrayToObject(target); - } - - var keys = Object.keys(source); - for (var k = 0, kl = keys.length; k < kl; ++k) { - var key = keys[k]; - var value = source[key]; - - if (!target[key]) { - target[key] = value; - } - else { - target[key] = exports.merge(target[key], value); - } - } - - return target; -}; - - -exports.decode = function (str) { - - try { - return decodeURIComponent(str.replace(/\+/g, ' ')); - } catch (e) { - return str; - } -}; - - -exports.compact = function (obj, refs) { - - if (typeof obj !== 'object' || - obj === null) { - - return obj; - } - - refs = refs || []; - var lookup = refs.indexOf(obj); - if (lookup !== -1) { - return refs[lookup]; - } - - refs.push(obj); - - if (Array.isArray(obj)) { - var compacted = []; - - for (var i = 0, il = obj.length; i < il; ++i) { - if (typeof obj[i] !== 'undefined') { - compacted.push(obj[i]); - } - } - - return compacted; - } - - var keys = Object.keys(obj); - for (i = 0, il = keys.length; i < il; ++i) { - var key = keys[i]; - obj[key] = exports.compact(obj[key], refs); - } - - return obj; -}; - - -exports.isRegExp = function (obj) { - return Object.prototype.toString.call(obj) === '[object RegExp]'; -}; - - -exports.isBuffer = function (obj) { - - if (obj === null || - typeof obj === 'undefined') { - - return false; - } - - return !!(obj.constructor && - obj.constructor.isBuffer && - obj.constructor.isBuffer(obj)); -}; diff --git a/s4t-server-node/node_modules/express/node_modules/qs/package.json b/s4t-server-node/node_modules/express/node_modules/qs/package.json deleted file mode 100644 index 466f9fb..0000000 --- a/s4t-server-node/node_modules/express/node_modules/qs/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "qs", - "version": "2.3.3", - "description": "A querystring parser that supports nesting and arrays, with a depth limit", - "homepage": "https://github.com/hapijs/qs", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "code": "1.x.x", - "lab": "5.x.x" - }, - "scripts": { - "test": "make test-cov" - }, - "repository": { - "type": "git", - "url": "https://github.com/hapijs/qs.git" - }, - "keywords": [ - "querystring", - "qs" - ], - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/hapijs/qs/raw/master/LICENSE" - } - ], - "gitHead": "9250c4cda5102fcf72441445816e6d311fc6813d", - "bugs": { - "url": "https://github.com/hapijs/qs/issues" - }, - "_id": "qs@2.3.3", - "_shasum": "e9e85adbe75da0bbe4c8e0476a086290f863b404", - "_from": "qs@2.3.3", - "_npmVersion": "2.1.6", - "_nodeVersion": "0.10.32", - "_npmUser": { - "name": "nlf", - "email": "quitlahok@gmail.com" - }, - "maintainers": [ - { - "name": "nlf", - "email": "quitlahok@gmail.com" - }, - { - "name": "hueniverse", - "email": "eran@hueniverse.com" - } - ], - "dist": { - "shasum": "e9e85adbe75da0bbe4c8e0476a086290f863b404", - "tarball": "http://registry.npmjs.org/qs/-/qs-2.3.3.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/qs/test/parse.js b/s4t-server-node/node_modules/express/node_modules/qs/test/parse.js deleted file mode 100755 index 6c20cc1..0000000 --- a/s4t-server-node/node_modules/express/node_modules/qs/test/parse.js +++ /dev/null @@ -1,413 +0,0 @@ -/* eslint no-extend-native:0 */ -// Load modules - -var Code = require('code'); -var Lab = require('lab'); -var Qs = require('../'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var lab = exports.lab = Lab.script(); -var expect = Code.expect; -var describe = lab.experiment; -var it = lab.test; - - -describe('parse()', function () { - - it('parses a simple string', function (done) { - - expect(Qs.parse('0=foo')).to.deep.equal({ '0': 'foo' }); - expect(Qs.parse('foo=c++')).to.deep.equal({ foo: 'c ' }); - expect(Qs.parse('a[>=]=23')).to.deep.equal({ a: { '>=': '23' } }); - expect(Qs.parse('a[<=>]==23')).to.deep.equal({ a: { '<=>': '=23' } }); - expect(Qs.parse('a[==]=23')).to.deep.equal({ a: { '==': '23' } }); - expect(Qs.parse('foo')).to.deep.equal({ foo: '' }); - expect(Qs.parse('foo=bar')).to.deep.equal({ foo: 'bar' }); - expect(Qs.parse(' foo = bar = baz ')).to.deep.equal({ ' foo ': ' bar = baz ' }); - expect(Qs.parse('foo=bar=baz')).to.deep.equal({ foo: 'bar=baz' }); - expect(Qs.parse('foo=bar&bar=baz')).to.deep.equal({ foo: 'bar', bar: 'baz' }); - expect(Qs.parse('foo=bar&baz')).to.deep.equal({ foo: 'bar', baz: '' }); - expect(Qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World')).to.deep.equal({ - cht: 'p3', - chd: 't:60,40', - chs: '250x100', - chl: 'Hello|World' - }); - done(); - }); - - it('parses a single nested string', function (done) { - - expect(Qs.parse('a[b]=c')).to.deep.equal({ a: { b: 'c' } }); - done(); - }); - - it('parses a double nested string', function (done) { - - expect(Qs.parse('a[b][c]=d')).to.deep.equal({ a: { b: { c: 'd' } } }); - done(); - }); - - it('defaults to a depth of 5', function (done) { - - expect(Qs.parse('a[b][c][d][e][f][g][h]=i')).to.deep.equal({ a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } }); - done(); - }); - - it('only parses one level when depth = 1', function (done) { - - expect(Qs.parse('a[b][c]=d', { depth: 1 })).to.deep.equal({ a: { b: { '[c]': 'd' } } }); - expect(Qs.parse('a[b][c][d]=e', { depth: 1 })).to.deep.equal({ a: { b: { '[c][d]': 'e' } } }); - done(); - }); - - it('parses a simple array', function (done) { - - expect(Qs.parse('a=b&a=c')).to.deep.equal({ a: ['b', 'c'] }); - done(); - }); - - it('parses an explicit array', function (done) { - - expect(Qs.parse('a[]=b')).to.deep.equal({ a: ['b'] }); - expect(Qs.parse('a[]=b&a[]=c')).to.deep.equal({ a: ['b', 'c'] }); - expect(Qs.parse('a[]=b&a[]=c&a[]=d')).to.deep.equal({ a: ['b', 'c', 'd'] }); - done(); - }); - - it('parses a mix of simple and explicit arrays', function (done) { - - expect(Qs.parse('a=b&a[]=c')).to.deep.equal({ a: ['b', 'c'] }); - expect(Qs.parse('a[]=b&a=c')).to.deep.equal({ a: ['b', 'c'] }); - expect(Qs.parse('a[0]=b&a=c')).to.deep.equal({ a: ['b', 'c'] }); - expect(Qs.parse('a=b&a[0]=c')).to.deep.equal({ a: ['b', 'c'] }); - expect(Qs.parse('a[1]=b&a=c')).to.deep.equal({ a: ['b', 'c'] }); - expect(Qs.parse('a=b&a[1]=c')).to.deep.equal({ a: ['b', 'c'] }); - done(); - }); - - it('parses a nested array', function (done) { - - expect(Qs.parse('a[b][]=c&a[b][]=d')).to.deep.equal({ a: { b: ['c', 'd'] } }); - expect(Qs.parse('a[>=]=25')).to.deep.equal({ a: { '>=': '25' } }); - done(); - }); - - it('allows to specify array indices', function (done) { - - expect(Qs.parse('a[1]=c&a[0]=b&a[2]=d')).to.deep.equal({ a: ['b', 'c', 'd'] }); - expect(Qs.parse('a[1]=c&a[0]=b')).to.deep.equal({ a: ['b', 'c'] }); - expect(Qs.parse('a[1]=c')).to.deep.equal({ a: ['c'] }); - done(); - }); - - it('limits specific array indices to 20', function (done) { - - expect(Qs.parse('a[20]=a')).to.deep.equal({ a: ['a'] }); - expect(Qs.parse('a[21]=a')).to.deep.equal({ a: { '21': 'a' } }); - done(); - }); - - it('supports keys that begin with a number', function (done) { - - expect(Qs.parse('a[12b]=c')).to.deep.equal({ a: { '12b': 'c' } }); - done(); - }); - - it('supports encoded = signs', function (done) { - - expect(Qs.parse('he%3Dllo=th%3Dere')).to.deep.equal({ 'he=llo': 'th=ere' }); - done(); - }); - - it('is ok with url encoded strings', function (done) { - - expect(Qs.parse('a[b%20c]=d')).to.deep.equal({ a: { 'b c': 'd' } }); - expect(Qs.parse('a[b]=c%20d')).to.deep.equal({ a: { b: 'c d' } }); - done(); - }); - - it('allows brackets in the value', function (done) { - - expect(Qs.parse('pets=["tobi"]')).to.deep.equal({ pets: '["tobi"]' }); - expect(Qs.parse('operators=[">=", "<="]')).to.deep.equal({ operators: '[">=", "<="]' }); - done(); - }); - - it('allows empty values', function (done) { - - expect(Qs.parse('')).to.deep.equal({}); - expect(Qs.parse(null)).to.deep.equal({}); - expect(Qs.parse(undefined)).to.deep.equal({}); - done(); - }); - - it('transforms arrays to objects', function (done) { - - expect(Qs.parse('foo[0]=bar&foo[bad]=baz')).to.deep.equal({ foo: { '0': 'bar', bad: 'baz' } }); - expect(Qs.parse('foo[bad]=baz&foo[0]=bar')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar' } }); - expect(Qs.parse('foo[bad]=baz&foo[]=bar')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar' } }); - expect(Qs.parse('foo[]=bar&foo[bad]=baz')).to.deep.equal({ foo: { '0': 'bar', bad: 'baz' } }); - expect(Qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar', '1': 'foo' } }); - expect(Qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb')).to.deep.equal({foo: [ {a: 'a', b: 'b'}, {a: 'aa', b: 'bb'} ]}); - done(); - }); - - it('can add keys to objects', function (done) { - - expect(Qs.parse('a[b]=c&a=d')).to.deep.equal({ a: { b: 'c', d: true } }); - done(); - }); - - it('correctly prunes undefined values when converting an array to an object', function (done) { - - expect(Qs.parse('a[2]=b&a[99999999]=c')).to.deep.equal({ a: { '2': 'b', '99999999': 'c' } }); - done(); - }); - - it('supports malformed uri characters', function (done) { - - expect(Qs.parse('{%:%}')).to.deep.equal({ '{%:%}': '' }); - expect(Qs.parse('foo=%:%}')).to.deep.equal({ foo: '%:%}' }); - done(); - }); - - it('doesn\'t produce empty keys', function (done) { - - expect(Qs.parse('_r=1&')).to.deep.equal({ '_r': '1' }); - done(); - }); - - it('cannot override prototypes', function (done) { - - var obj = Qs.parse('toString=bad&bad[toString]=bad&constructor=bad'); - expect(typeof obj.toString).to.equal('function'); - expect(typeof obj.bad.toString).to.equal('function'); - expect(typeof obj.constructor).to.equal('function'); - done(); - }); - - it('cannot access Object prototype', function (done) { - - Qs.parse('constructor[prototype][bad]=bad'); - Qs.parse('bad[constructor][prototype][bad]=bad'); - expect(typeof Object.prototype.bad).to.equal('undefined'); - done(); - }); - - it('parses arrays of objects', function (done) { - - expect(Qs.parse('a[][b]=c')).to.deep.equal({ a: [{ b: 'c' }] }); - expect(Qs.parse('a[0][b]=c')).to.deep.equal({ a: [{ b: 'c' }] }); - done(); - }); - - it('allows for empty strings in arrays', function (done) { - - expect(Qs.parse('a[]=b&a[]=&a[]=c')).to.deep.equal({ a: ['b', '', 'c'] }); - expect(Qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]=')).to.deep.equal({ a: ['b', '', 'c', ''] }); - expect(Qs.parse('a[]=&a[]=b&a[]=c')).to.deep.equal({ a: ['', 'b', 'c'] }); - done(); - }); - - it('compacts sparse arrays', function (done) { - - expect(Qs.parse('a[10]=1&a[2]=2')).to.deep.equal({ a: ['2', '1'] }); - done(); - }); - - it('parses semi-parsed strings', function (done) { - - expect(Qs.parse({ 'a[b]': 'c' })).to.deep.equal({ a: { b: 'c' } }); - expect(Qs.parse({ 'a[b]': 'c', 'a[d]': 'e' })).to.deep.equal({ a: { b: 'c', d: 'e' } }); - done(); - }); - - it('parses buffers correctly', function (done) { - - var b = new Buffer('test'); - expect(Qs.parse({ a: b })).to.deep.equal({ a: b }); - done(); - }); - - it('continues parsing when no parent is found', function (done) { - - expect(Qs.parse('[]&a=b')).to.deep.equal({ '0': '', a: 'b' }); - expect(Qs.parse('[foo]=bar')).to.deep.equal({ foo: 'bar' }); - done(); - }); - - it('does not error when parsing a very long array', function (done) { - - var str = 'a[]=a'; - while (Buffer.byteLength(str) < 128 * 1024) { - str += '&' + str; - } - - expect(function () { - - Qs.parse(str); - }).to.not.throw(); - - done(); - }); - - it('should not throw when a native prototype has an enumerable property', { parallel: false }, function (done) { - - Object.prototype.crash = ''; - Array.prototype.crash = ''; - expect(Qs.parse.bind(null, 'a=b')).to.not.throw(); - expect(Qs.parse('a=b')).to.deep.equal({ a: 'b' }); - expect(Qs.parse.bind(null, 'a[][b]=c')).to.not.throw(); - expect(Qs.parse('a[][b]=c')).to.deep.equal({ a: [{ b: 'c' }] }); - delete Object.prototype.crash; - delete Array.prototype.crash; - done(); - }); - - it('parses a string with an alternative string delimiter', function (done) { - - expect(Qs.parse('a=b;c=d', { delimiter: ';' })).to.deep.equal({ a: 'b', c: 'd' }); - done(); - }); - - it('parses a string with an alternative RegExp delimiter', function (done) { - - expect(Qs.parse('a=b; c=d', { delimiter: /[;,] */ })).to.deep.equal({ a: 'b', c: 'd' }); - done(); - }); - - it('does not use non-splittable objects as delimiters', function (done) { - - expect(Qs.parse('a=b&c=d', { delimiter: true })).to.deep.equal({ a: 'b', c: 'd' }); - done(); - }); - - it('allows overriding parameter limit', function (done) { - - expect(Qs.parse('a=b&c=d', { parameterLimit: 1 })).to.deep.equal({ a: 'b' }); - done(); - }); - - it('allows setting the parameter limit to Infinity', function (done) { - - expect(Qs.parse('a=b&c=d', { parameterLimit: Infinity })).to.deep.equal({ a: 'b', c: 'd' }); - done(); - }); - - it('allows overriding array limit', function (done) { - - expect(Qs.parse('a[0]=b', { arrayLimit: -1 })).to.deep.equal({ a: { '0': 'b' } }); - expect(Qs.parse('a[-1]=b', { arrayLimit: -1 })).to.deep.equal({ a: { '-1': 'b' } }); - expect(Qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 })).to.deep.equal({ a: { '0': 'b', '1': 'c' } }); - done(); - }); - - it('parses an object', function (done) { - - var input = { - 'user[name]': {'pop[bob]': 3}, - 'user[email]': null - }; - - var expected = { - 'user': { - 'name': {'pop[bob]': 3}, - 'email': null - } - }; - - var result = Qs.parse(input); - - expect(result).to.deep.equal(expected); - done(); - }); - - it('parses an object and not child values', function (done) { - - var input = { - 'user[name]': {'pop[bob]': { 'test': 3 }}, - 'user[email]': null - }; - - var expected = { - 'user': { - 'name': {'pop[bob]': { 'test': 3 }}, - 'email': null - } - }; - - var result = Qs.parse(input); - - expect(result).to.deep.equal(expected); - done(); - }); - - it('does not blow up when Buffer global is missing', function (done) { - - var tempBuffer = global.Buffer; - delete global.Buffer; - var result = Qs.parse('a=b&c=d'); - global.Buffer = tempBuffer; - expect(result).to.deep.equal({ a: 'b', c: 'd' }); - done(); - }); - - it('does not crash when using invalid dot notation', function (done) { - - expect(Qs.parse('roomInfoList[0].childrenAges[0]=15&roomInfoList[0].numberOfAdults=2')).to.deep.equal({ roomInfoList: [['15', '2']] }); - done(); - }); - - it('does not crash when parsing circular references', function (done) { - - var a = {}; - a.b = a; - - var parsed; - - expect(function () { - - parsed = Qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a }); - }).to.not.throw(); - - expect(parsed).to.contain('foo'); - expect(parsed.foo).to.contain('bar', 'baz'); - expect(parsed.foo.bar).to.equal('baz'); - expect(parsed.foo.baz).to.deep.equal(a); - done(); - }); - - it('parses plain objects correctly', function (done) { - - var a = Object.create(null); - a.b = 'c'; - - expect(Qs.parse(a)).to.deep.equal({ b: 'c' }); - var result = Qs.parse({ a: a }); - expect(result).to.contain('a'); - expect(result.a).to.deep.equal(a); - done(); - }); - - it('parses dates correctly', function (done) { - - var now = new Date(); - expect(Qs.parse({ a: now })).to.deep.equal({ a: now }); - done(); - }); - - it('parses regular expressions correctly', function (done) { - - var re = /^test$/; - expect(Qs.parse({ a: re })).to.deep.equal({ a: re }); - done(); - }); -}); diff --git a/s4t-server-node/node_modules/express/node_modules/qs/test/stringify.js b/s4t-server-node/node_modules/express/node_modules/qs/test/stringify.js deleted file mode 100755 index 75e397a..0000000 --- a/s4t-server-node/node_modules/express/node_modules/qs/test/stringify.js +++ /dev/null @@ -1,179 +0,0 @@ -/* eslint no-extend-native:0 */ -// Load modules - -var Code = require('code'); -var Lab = require('lab'); -var Qs = require('../'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var lab = exports.lab = Lab.script(); -var expect = Code.expect; -var describe = lab.experiment; -var it = lab.test; - - -describe('stringify()', function () { - - it('stringifies a querystring object', function (done) { - - expect(Qs.stringify({ a: 'b' })).to.equal('a=b'); - expect(Qs.stringify({ a: 1 })).to.equal('a=1'); - expect(Qs.stringify({ a: 1, b: 2 })).to.equal('a=1&b=2'); - done(); - }); - - it('stringifies a nested object', function (done) { - - expect(Qs.stringify({ a: { b: 'c' } })).to.equal('a%5Bb%5D=c'); - expect(Qs.stringify({ a: { b: { c: { d: 'e' } } } })).to.equal('a%5Bb%5D%5Bc%5D%5Bd%5D=e'); - done(); - }); - - it('stringifies an array value', function (done) { - - expect(Qs.stringify({ a: ['b', 'c', 'd'] })).to.equal('a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d'); - done(); - }); - - it('omits array indices when asked', function (done) { - - expect(Qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false })).to.equal('a=b&a=c&a=d'); - done(); - }); - - it('stringifies a nested array value', function (done) { - - expect(Qs.stringify({ a: { b: ['c', 'd'] } })).to.equal('a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d'); - done(); - }); - - it('stringifies an object inside an array', function (done) { - - expect(Qs.stringify({ a: [{ b: 'c' }] })).to.equal('a%5B0%5D%5Bb%5D=c'); - expect(Qs.stringify({ a: [{ b: { c: [1] } }] })).to.equal('a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1'); - done(); - }); - - it('does not omit object keys when indices = false', function (done) { - - expect(Qs.stringify({ a: [{ b: 'c' }] }, { indices: false })).to.equal('a%5Bb%5D=c'); - done(); - }); - - it('stringifies a complicated object', function (done) { - - expect(Qs.stringify({ a: { b: 'c', d: 'e' } })).to.equal('a%5Bb%5D=c&a%5Bd%5D=e'); - done(); - }); - - it('stringifies an empty value', function (done) { - - expect(Qs.stringify({ a: '' })).to.equal('a='); - expect(Qs.stringify({ a: '', b: '' })).to.equal('a=&b='); - expect(Qs.stringify({ a: null })).to.equal('a='); - expect(Qs.stringify({ a: { b: null } })).to.equal('a%5Bb%5D='); - done(); - }); - - it('stringifies an empty object', function (done) { - - var obj = Object.create(null); - obj.a = 'b'; - expect(Qs.stringify(obj)).to.equal('a=b'); - done(); - }); - - it('returns an empty string for invalid input', function (done) { - - expect(Qs.stringify(undefined)).to.equal(''); - expect(Qs.stringify(false)).to.equal(''); - expect(Qs.stringify(null)).to.equal(''); - expect(Qs.stringify('')).to.equal(''); - done(); - }); - - it('stringifies an object with an empty object as a child', function (done) { - - var obj = { - a: Object.create(null) - }; - - obj.a.b = 'c'; - expect(Qs.stringify(obj)).to.equal('a%5Bb%5D=c'); - done(); - }); - - it('drops keys with a value of undefined', function (done) { - - expect(Qs.stringify({ a: undefined })).to.equal(''); - expect(Qs.stringify({ a: { b: undefined, c: null } })).to.equal('a%5Bc%5D='); - done(); - }); - - it('url encodes values', function (done) { - - expect(Qs.stringify({ a: 'b c' })).to.equal('a=b%20c'); - done(); - }); - - it('stringifies a date', function (done) { - - var now = new Date(); - var str = 'a=' + encodeURIComponent(now.toISOString()); - expect(Qs.stringify({ a: now })).to.equal(str); - done(); - }); - - it('stringifies the weird object from qs', function (done) { - - expect(Qs.stringify({ 'my weird field': 'q1!2"\'w$5&7/z8)?' })).to.equal('my%20weird%20field=q1!2%22\'w%245%267%2Fz8)%3F'); - done(); - }); - - it('skips properties that are part of the object prototype', function (done) { - - Object.prototype.crash = 'test'; - expect(Qs.stringify({ a: 'b'})).to.equal('a=b'); - expect(Qs.stringify({ a: { b: 'c' } })).to.equal('a%5Bb%5D=c'); - delete Object.prototype.crash; - done(); - }); - - it('stringifies boolean values', function (done) { - - expect(Qs.stringify({ a: true })).to.equal('a=true'); - expect(Qs.stringify({ a: { b: true } })).to.equal('a%5Bb%5D=true'); - expect(Qs.stringify({ b: false })).to.equal('b=false'); - expect(Qs.stringify({ b: { c: false } })).to.equal('b%5Bc%5D=false'); - done(); - }); - - it('stringifies buffer values', function (done) { - - expect(Qs.stringify({ a: new Buffer('test') })).to.equal('a=test'); - expect(Qs.stringify({ a: { b: new Buffer('test') } })).to.equal('a%5Bb%5D=test'); - done(); - }); - - it('stringifies an object using an alternative delimiter', function (done) { - - expect(Qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' })).to.equal('a=b;c=d'); - done(); - }); - - it('doesn\'t blow up when Buffer global is missing', function (done) { - - var tempBuffer = global.Buffer; - delete global.Buffer; - expect(Qs.stringify({ a: 'b', c: 'd' })).to.equal('a=b&c=d'); - global.Buffer = tempBuffer; - done(); - }); -}); diff --git a/s4t-server-node/node_modules/express/node_modules/range-parser/HISTORY.md b/s4t-server-node/node_modules/express/node_modules/range-parser/HISTORY.md deleted file mode 100644 index 1bb53bd..0000000 --- a/s4t-server-node/node_modules/express/node_modules/range-parser/HISTORY.md +++ /dev/null @@ -1,35 +0,0 @@ -1.0.2 / 2014-09-08 -================== - - * Support Node.js 0.6 - -1.0.1 / 2014-09-07 -================== - - * Move repository to jshttp - -1.0.0 / 2013-12-11 -================== - - * Add repository to package.json - * Add MIT license - -0.0.4 / 2012-06-17 -================== - - * Change ret -1 for unsatisfiable and -2 when invalid - -0.0.3 / 2012-06-17 -================== - - * Fix last-byte-pos default to len - 1 - -0.0.2 / 2012-06-14 -================== - - * Add `.type` - -0.0.1 / 2012-06-11 -================== - - * Initial release diff --git a/s4t-server-node/node_modules/express/node_modules/range-parser/LICENSE b/s4t-server-node/node_modules/express/node_modules/range-parser/LICENSE deleted file mode 100644 index a491841..0000000 --- a/s4t-server-node/node_modules/express/node_modules/range-parser/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2012-2014 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/s4t-server-node/node_modules/express/node_modules/range-parser/README.md b/s4t-server-node/node_modules/express/node_modules/range-parser/README.md deleted file mode 100644 index 6a2682f..0000000 --- a/s4t-server-node/node_modules/express/node_modules/range-parser/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# range-parser - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Range header field parser. - -## Installation - -``` -$ npm install range-parser -``` - -## Examples - -```js -assert(-1 == parse(200, 'bytes=500-20')); -assert(-2 == parse(200, 'bytes=malformed')); -parse(200, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 199 }])); -parse(1000, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 499 }])); -parse(1000, 'bytes=40-80').should.eql(arr('bytes', [{ start: 40, end: 80 }])); -parse(1000, 'bytes=-500').should.eql(arr('bytes', [{ start: 500, end: 999 }])); -parse(1000, 'bytes=-400').should.eql(arr('bytes', [{ start: 600, end: 999 }])); -parse(1000, 'bytes=500-').should.eql(arr('bytes', [{ start: 500, end: 999 }])); -parse(1000, 'bytes=400-').should.eql(arr('bytes', [{ start: 400, end: 999 }])); -parse(1000, 'bytes=0-0').should.eql(arr('bytes', [{ start: 0, end: 0 }])); -parse(1000, 'bytes=-1').should.eql(arr('bytes', [{ start: 999, end: 999 }])); -parse(1000, 'items=0-5').should.eql(arr('items', [{ start: 0, end: 5 }])); -parse(1000, 'bytes=40-80,-1').should.eql(arr('bytes', [{ start: 40, end: 80 }, { start: 999, end: 999 }])); -``` - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/range-parser.svg?style=flat -[npm-url]: https://npmjs.org/package/range-parser -[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat -[node-version-url]: http://nodejs.org/download/ -[travis-image]: https://img.shields.io/travis/jshttp/range-parser.svg?style=flat -[travis-url]: https://travis-ci.org/jshttp/range-parser -[coveralls-image]: https://img.shields.io/coveralls/jshttp/range-parser.svg?style=flat -[coveralls-url]: https://coveralls.io/r/jshttp/range-parser -[downloads-image]: https://img.shields.io/npm/dm/range-parser.svg?style=flat -[downloads-url]: https://npmjs.org/package/range-parser diff --git a/s4t-server-node/node_modules/express/node_modules/range-parser/index.js b/s4t-server-node/node_modules/express/node_modules/range-parser/index.js deleted file mode 100644 index 09a6c40..0000000 --- a/s4t-server-node/node_modules/express/node_modules/range-parser/index.js +++ /dev/null @@ -1,49 +0,0 @@ - -/** - * Parse "Range" header `str` relative to the given file `size`. - * - * @param {Number} size - * @param {String} str - * @return {Array} - * @api public - */ - -module.exports = function(size, str){ - var valid = true; - var i = str.indexOf('='); - - if (-1 == i) return -2; - - var arr = str.slice(i + 1).split(',').map(function(range){ - var range = range.split('-') - , start = parseInt(range[0], 10) - , end = parseInt(range[1], 10); - - // -nnn - if (isNaN(start)) { - start = size - end; - end = size - 1; - // nnn- - } else if (isNaN(end)) { - end = size - 1; - } - - // limit last-byte-pos to current length - if (end > size - 1) end = size - 1; - - // invalid - if (isNaN(start) - || isNaN(end) - || start > end - || start < 0) valid = false; - - return { - start: start, - end: end - }; - }); - - arr.type = str.slice(0, i); - - return valid ? arr : -1; -}; diff --git a/s4t-server-node/node_modules/express/node_modules/range-parser/package.json b/s4t-server-node/node_modules/express/node_modules/range-parser/package.json deleted file mode 100644 index c4f8b2f..0000000 --- a/s4t-server-node/node_modules/express/node_modules/range-parser/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "range-parser", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "description": "Range header field string parser", - "version": "1.0.2", - "license": "MIT", - "keywords": [ - "range", - "parser", - "http" - ], - "repository": { - "type": "git", - "url": "https://github.com/jshttp/range-parser" - }, - "devDependencies": { - "istanbul": "0", - "mocha": "1", - "should": "2" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "test": "mocha --reporter spec --require should", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --require should", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot --require should" - }, - "gitHead": "ae23b02ce705b56e7f7c48e832d41fa710227ecc", - "bugs": { - "url": "https://github.com/jshttp/range-parser/issues" - }, - "homepage": "https://github.com/jshttp/range-parser", - "_id": "range-parser@1.0.2", - "_shasum": "06a12a42e5131ba8e457cd892044867f2344e549", - "_from": "range-parser@>=1.0.2 <1.1.0", - "_npmVersion": "1.4.21", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "jonathanong", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - } - ], - "dist": { - "shasum": "06a12a42e5131ba8e457cd892044867f2344e549", - "tarball": "http://registry.npmjs.org/range-parser/-/range-parser-1.0.2.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/send/History.md b/s4t-server-node/node_modules/express/node_modules/send/History.md deleted file mode 100644 index 697a028..0000000 --- a/s4t-server-node/node_modules/express/node_modules/send/History.md +++ /dev/null @@ -1,241 +0,0 @@ -0.11.1 / 2015-01-20 -=================== - - * Fix `root` path disclosure - -0.11.0 / 2015-01-05 -=================== - - * deps: debug@~2.1.1 - * deps: etag@~1.5.1 - - deps: crc@3.2.1 - * deps: ms@0.7.0 - - Add `milliseconds` - - Add `msecs` - - Add `secs` - - Add `mins` - - Add `hrs` - - Add `yrs` - * deps: on-finished@~2.2.0 - -0.10.1 / 2014-10-22 -=================== - - * deps: on-finished@~2.1.1 - - Fix handling of pipelined requests - -0.10.0 / 2014-10-15 -=================== - - * deps: debug@~2.1.0 - - Implement `DEBUG_FD` env variable support - * deps: depd@~1.0.0 - * deps: etag@~1.5.0 - - Improve string performance - - Slightly improve speed for weak ETags over 1KB - -0.9.3 / 2014-09-24 -================== - - * deps: etag@~1.4.0 - - Support "fake" stats objects - -0.9.2 / 2014-09-15 -================== - - * deps: depd@0.4.5 - * deps: etag@~1.3.1 - * deps: range-parser@~1.0.2 - -0.9.1 / 2014-09-07 -================== - - * deps: fresh@0.2.4 - -0.9.0 / 2014-09-07 -================== - - * Add `lastModified` option - * Use `etag` to generate `ETag` header - * deps: debug@~2.0.0 - -0.8.5 / 2014-09-04 -================== - - * Fix malicious path detection for empty string path - -0.8.4 / 2014-09-04 -================== - - * Fix a path traversal issue when using `root` - -0.8.3 / 2014-08-16 -================== - - * deps: destroy@1.0.3 - - renamed from dethroy - * deps: on-finished@2.1.0 - -0.8.2 / 2014-08-14 -================== - - * Work around `fd` leak in Node.js 0.10 for `fs.ReadStream` - * deps: dethroy@1.0.2 - -0.8.1 / 2014-08-05 -================== - - * Fix `extensions` behavior when file already has extension - -0.8.0 / 2014-08-05 -================== - - * Add `extensions` option - -0.7.4 / 2014-08-04 -================== - - * Fix serving index files without root dir - -0.7.3 / 2014-07-29 -================== - - * Fix incorrect 403 on Windows and Node.js 0.11 - -0.7.2 / 2014-07-27 -================== - - * deps: depd@0.4.4 - - Work-around v8 generating empty stack traces - -0.7.1 / 2014-07-26 -================== - - * deps: depd@0.4.3 - - Fix exception when global `Error.stackTraceLimit` is too low - -0.7.0 / 2014-07-20 -================== - - * Deprecate `hidden` option; use `dotfiles` option - * Add `dotfiles` option - * deps: debug@1.0.4 - * deps: depd@0.4.2 - - Add `TRACE_DEPRECATION` environment variable - - Remove non-standard grey color from color output - - Support `--no-deprecation` argument - - Support `--trace-deprecation` argument - -0.6.0 / 2014-07-11 -================== - - * Deprecate `from` option; use `root` option - * Deprecate `send.etag()` -- use `etag` in `options` - * Deprecate `send.hidden()` -- use `hidden` in `options` - * Deprecate `send.index()` -- use `index` in `options` - * Deprecate `send.maxage()` -- use `maxAge` in `options` - * Deprecate `send.root()` -- use `root` in `options` - * Cap `maxAge` value to 1 year - * deps: debug@1.0.3 - - Add support for multiple wildcards in namespaces - -0.5.0 / 2014-06-28 -================== - - * Accept string for `maxAge` (converted by `ms`) - * Add `headers` event - * Include link in default redirect response - * Use `EventEmitter.listenerCount` to count listeners - -0.4.3 / 2014-06-11 -================== - - * Do not throw un-catchable error on file open race condition - * Use `escape-html` for HTML escaping - * deps: debug@1.0.2 - - fix some debugging output colors on node.js 0.8 - * deps: finished@1.2.2 - * deps: fresh@0.2.2 - -0.4.2 / 2014-06-09 -================== - - * fix "event emitter leak" warnings - * deps: debug@1.0.1 - * deps: finished@1.2.1 - -0.4.1 / 2014-06-02 -================== - - * Send `max-age` in `Cache-Control` in correct format - -0.4.0 / 2014-05-27 -================== - - * Calculate ETag with md5 for reduced collisions - * Fix wrong behavior when index file matches directory - * Ignore stream errors after request ends - - Goodbye `EBADF, read` - * Skip directories in index file search - * deps: debug@0.8.1 - -0.3.0 / 2014-04-24 -================== - - * Fix sending files with dots without root set - * Coerce option types - * Accept API options in options object - * Set etags to "weak" - * Include file path in etag - * Make "Can't set headers after they are sent." catchable - * Send full entity-body for multi range requests - * Default directory access to 403 when index disabled - * Support multiple index paths - * Support "If-Range" header - * Control whether to generate etags - * deps: mime@1.2.11 - -0.2.0 / 2014-01-29 -================== - - * update range-parser and fresh - -0.1.4 / 2013-08-11 -================== - - * update fresh - -0.1.3 / 2013-07-08 -================== - - * Revert "Fix fd leak" - -0.1.2 / 2013-07-03 -================== - - * Fix fd leak - -0.1.0 / 2012-08-25 -================== - - * add options parameter to send() that is passed to fs.createReadStream() [kanongil] - -0.0.4 / 2012-08-16 -================== - - * allow custom "Accept-Ranges" definition - -0.0.3 / 2012-07-16 -================== - - * fix normalization of the root directory. Closes #3 - -0.0.2 / 2012-07-09 -================== - - * add passing of req explicitly for now (YUCK) - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/s4t-server-node/node_modules/express/node_modules/send/LICENSE b/s4t-server-node/node_modules/express/node_modules/send/LICENSE deleted file mode 100644 index 3b87e2d..0000000 --- a/s4t-server-node/node_modules/express/node_modules/send/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk -Copyright (c) 2014 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/s4t-server-node/node_modules/express/node_modules/send/Readme.md b/s4t-server-node/node_modules/express/node_modules/send/Readme.md deleted file mode 100644 index 5c03b96..0000000 --- a/s4t-server-node/node_modules/express/node_modules/send/Readme.md +++ /dev/null @@ -1,192 +0,0 @@ -# send - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] -[![Gittip][gittip-image]][gittip-url] - -Send is a library for streaming files from the file system as a http response -supporting partial responses (Ranges), conditional-GET negotiation, high test -coverage, and granular events which may be leveraged to take appropriate actions -in your application or framework. - -Looking to serve up entire folders mapped to URLs? Try [serve-static](https://www.npmjs.org/package/serve-static). - -## Installation - -```bash -$ npm install send -``` - -## API - -```js -var send = require('send') -``` - -### send(req, path, [options]) - -Create a new `SendStream` for the given path to send to a `res`. The `req` is -the Node.js HTTP request and the `path` is a urlencoded path to send (urlencoded, -not the actual file-system path). - -#### Options - -##### dotfiles - -Set how "dotfiles" are treated when encountered. A dotfile is a file -or directory that begins with a dot ("."). Note this check is done on -the path itself without checking if the path actually exists on the -disk. If `root` is specified, only the dotfiles above the root are -checked (i.e. the root itself can be within a dotfile when when set -to "deny"). - - - `'allow'` No special treatment for dotfiles. - - `'deny'` Send a 403 for any request for a dotfile. - - `'ignore'` Pretend like the dotfile does not exist and 404. - -The default value is _similar_ to `'ignore'`, with the exception that -this default will not ignore the files within a directory that begins -with a dot, for backward-compatibility. - -##### etag - -Enable or disable etag generation, defaults to true. - -##### extensions - -If a given file doesn't exist, try appending one of the given extensions, -in the given order. By default, this is disabled (set to `false`). An -example value that will serve extension-less HTML files: `['html', 'htm']`. -This is skipped if the requested file already has an extension. - -##### index - -By default send supports "index.html" files, to disable this -set `false` or to supply a new index pass a string or an array -in preferred order. - -##### lastModified - -Enable or disable `Last-Modified` header, defaults to true. Uses the file -system's last modified value. - -##### maxAge - -Provide a max-age in milliseconds for http caching, defaults to 0. -This can also be a string accepted by the -[ms](https://www.npmjs.org/package/ms#readme) module. - -##### root - -Serve files relative to `path`. - -### Events - -The `SendStream` is an event emitter and will emit the following events: - - - `error` an error occurred `(err)` - - `directory` a directory was requested - - `file` a file was requested `(path, stat)` - - `headers` the headers are about to be set on a file `(res, path, stat)` - - `stream` file streaming has started `(stream)` - - `end` streaming has completed - -### .pipe - -The `pipe` method is used to pipe the response into the Node.js HTTP response -object, typically `send(req, path, options).pipe(res)`. - -## Error-handling - -By default when no `error` listeners are present an automatic response will be -made, otherwise you have full control over the response, aka you may show a 5xx -page etc. - -## Caching - -It does _not_ perform internal caching, you should use a reverse proxy cache -such as Varnish for this, or those fancy things called CDNs. If your -application is small enough that it would benefit from single-node memory -caching, it's small enough that it does not need caching at all ;). - -## Debugging - -To enable `debug()` instrumentation output export __DEBUG__: - -``` -$ DEBUG=send node app -``` - -## Running tests - -``` -$ npm install -$ npm test -``` - -## Examples - -### Small example - -```js -var http = require('http'); -var send = require('send'); - -var app = http.createServer(function(req, res){ - send(req, req.url).pipe(res); -}).listen(3000); -``` - -Serving from a root directory with custom error-handling: - -```js -var http = require('http'); -var send = require('send'); -var url = require('url'); - -var app = http.createServer(function(req, res){ - // your custom error-handling logic: - function error(err) { - res.statusCode = err.status || 500; - res.end(err.message); - } - - // your custom headers - function headers(res, path, stat) { - // serve all files for download - res.setHeader('Content-Disposition', 'attachment'); - } - - // your custom directory handling logic: - function redirect() { - res.statusCode = 301; - res.setHeader('Location', req.url + '/'); - res.end('Redirecting to ' + req.url + '/'); - } - - // transfer arbitrary files from within - // /www/example.com/public/* - send(req, url.parse(req.url).pathname, {root: '/www/example.com/public'}) - .on('error', error) - .on('directory', redirect) - .on('headers', headers) - .pipe(res); -}).listen(3000); -``` - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/send.svg?style=flat -[npm-url]: https://npmjs.org/package/send -[travis-image]: https://img.shields.io/travis/tj/send.svg?style=flat -[travis-url]: https://travis-ci.org/tj/send -[coveralls-image]: https://img.shields.io/coveralls/tj/send.svg?style=flat -[coveralls-url]: https://coveralls.io/r/tj/send?branch=master -[downloads-image]: https://img.shields.io/npm/dm/send.svg?style=flat -[downloads-url]: https://npmjs.org/package/send -[gittip-image]: https://img.shields.io/gittip/dougwilson.svg?style=flat -[gittip-url]: https://www.gittip.com/dougwilson/ diff --git a/s4t-server-node/node_modules/express/node_modules/send/index.js b/s4t-server-node/node_modules/express/node_modules/send/index.js deleted file mode 100644 index f63081d..0000000 --- a/s4t-server-node/node_modules/express/node_modules/send/index.js +++ /dev/null @@ -1,773 +0,0 @@ - -/** - * Module dependencies. - */ - -var debug = require('debug')('send') -var deprecate = require('depd')('send') -var destroy = require('destroy') -var escapeHtml = require('escape-html') - , parseRange = require('range-parser') - , Stream = require('stream') - , mime = require('mime') - , fresh = require('fresh') - , path = require('path') - , http = require('http') - , fs = require('fs') - , normalize = path.normalize - , join = path.join -var etag = require('etag') -var EventEmitter = require('events').EventEmitter; -var ms = require('ms'); -var onFinished = require('on-finished') - -/** - * Variables. - */ -var extname = path.extname -var maxMaxAge = 60 * 60 * 24 * 365 * 1000; // 1 year -var resolve = path.resolve -var sep = path.sep -var toString = Object.prototype.toString -var upPathRegexp = /(?:^|[\\\/])\.\.(?:[\\\/]|$)/ - -/** - * Expose `send`. - */ - -exports = module.exports = send; - -/** - * Expose mime module. - */ - -exports.mime = mime; - -/** - * Shim EventEmitter.listenerCount for node.js < 0.10 - */ - -/* istanbul ignore next */ -var listenerCount = EventEmitter.listenerCount - || function(emitter, type){ return emitter.listeners(type).length; }; - -/** - * Return a `SendStream` for `req` and `path`. - * - * @param {Request} req - * @param {String} path - * @param {Object} options - * @return {SendStream} - * @api public - */ - -function send(req, path, options) { - return new SendStream(req, path, options); -} - -/** - * Initialize a `SendStream` with the given `path`. - * - * @param {Request} req - * @param {String} path - * @param {Object} options - * @api private - */ - -function SendStream(req, path, options) { - var self = this; - options = options || {}; - this.req = req; - this.path = path; - this.options = options; - - this._etag = options.etag !== undefined - ? Boolean(options.etag) - : true - - this._dotfiles = options.dotfiles !== undefined - ? options.dotfiles - : 'ignore' - - if (['allow', 'deny', 'ignore'].indexOf(this._dotfiles) === -1) { - throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"') - } - - this._hidden = Boolean(options.hidden) - - if ('hidden' in options) { - deprecate('hidden: use dotfiles: \'' + (this._hidden ? 'allow' : 'ignore') + '\' instead') - } - - // legacy support - if (!('dotfiles' in options)) { - this._dotfiles = undefined - } - - this._extensions = options.extensions !== undefined - ? normalizeList(options.extensions) - : [] - - this._index = options.index !== undefined - ? normalizeList(options.index) - : ['index.html'] - - this._lastModified = options.lastModified !== undefined - ? Boolean(options.lastModified) - : true - - this._maxage = options.maxAge || options.maxage - this._maxage = typeof this._maxage === 'string' - ? ms(this._maxage) - : Number(this._maxage) - this._maxage = !isNaN(this._maxage) - ? Math.min(Math.max(0, this._maxage), maxMaxAge) - : 0 - - this._root = options.root - ? resolve(options.root) - : null - - if (!this._root && options.from) { - this.from(options.from); - } -} - -/** - * Inherits from `Stream.prototype`. - */ - -SendStream.prototype.__proto__ = Stream.prototype; - -/** - * Enable or disable etag generation. - * - * @param {Boolean} val - * @return {SendStream} - * @api public - */ - -SendStream.prototype.etag = deprecate.function(function etag(val) { - val = Boolean(val); - debug('etag %s', val); - this._etag = val; - return this; -}, 'send.etag: pass etag as option'); - -/** - * Enable or disable "hidden" (dot) files. - * - * @param {Boolean} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.hidden = deprecate.function(function hidden(val) { - val = Boolean(val); - debug('hidden %s', val); - this._hidden = val; - this._dotfiles = undefined - return this; -}, 'send.hidden: use dotfiles option'); - -/** - * Set index `paths`, set to a falsy - * value to disable index support. - * - * @param {String|Boolean|Array} paths - * @return {SendStream} - * @api public - */ - -SendStream.prototype.index = deprecate.function(function index(paths) { - var index = !paths ? [] : normalizeList(paths); - debug('index %o', paths); - this._index = index; - return this; -}, 'send.index: pass index as option'); - -/** - * Set root `path`. - * - * @param {String} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.root = function(path){ - path = String(path); - this._root = resolve(path) - return this; -}; - -SendStream.prototype.from = deprecate.function(SendStream.prototype.root, - 'send.from: pass root as option'); - -SendStream.prototype.root = deprecate.function(SendStream.prototype.root, - 'send.root: pass root as option'); - -/** - * Set max-age to `maxAge`. - * - * @param {Number} maxAge - * @return {SendStream} - * @api public - */ - -SendStream.prototype.maxage = deprecate.function(function maxage(maxAge) { - maxAge = typeof maxAge === 'string' - ? ms(maxAge) - : Number(maxAge); - if (isNaN(maxAge)) maxAge = 0; - if (Infinity == maxAge) maxAge = 60 * 60 * 24 * 365 * 1000; - debug('max-age %d', maxAge); - this._maxage = maxAge; - return this; -}, 'send.maxage: pass maxAge as option'); - -/** - * Emit error with `status`. - * - * @param {Number} status - * @api private - */ - -SendStream.prototype.error = function(status, err){ - var res = this.res; - var msg = http.STATUS_CODES[status]; - - err = err || new Error(msg); - err.status = status; - - // emit if listeners instead of responding - if (listenerCount(this, 'error') !== 0) { - return this.emit('error', err); - } - - // wipe all existing headers - res._headers = undefined; - - res.statusCode = err.status; - res.end(msg); -}; - -/** - * Check if the pathname ends with "/". - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.hasTrailingSlash = function(){ - return '/' == this.path[this.path.length - 1]; -}; - -/** - * Check if this is a conditional GET request. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isConditionalGET = function(){ - return this.req.headers['if-none-match'] - || this.req.headers['if-modified-since']; -}; - -/** - * Strip content-* header fields. - * - * @api private - */ - -SendStream.prototype.removeContentHeaderFields = function(){ - var res = this.res; - Object.keys(res._headers).forEach(function(field){ - if (0 == field.indexOf('content')) { - res.removeHeader(field); - } - }); -}; - -/** - * Respond with 304 not modified. - * - * @api private - */ - -SendStream.prototype.notModified = function(){ - var res = this.res; - debug('not modified'); - this.removeContentHeaderFields(); - res.statusCode = 304; - res.end(); -}; - -/** - * Raise error that headers already sent. - * - * @api private - */ - -SendStream.prototype.headersAlreadySent = function headersAlreadySent(){ - var err = new Error('Can\'t set headers after they are sent.'); - debug('headers already sent'); - this.error(500, err); -}; - -/** - * Check if the request is cacheable, aka - * responded with 2xx or 304 (see RFC 2616 section 14.2{5,6}). - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isCachable = function(){ - var res = this.res; - return (res.statusCode >= 200 && res.statusCode < 300) || 304 == res.statusCode; -}; - -/** - * Handle stat() error. - * - * @param {Error} err - * @api private - */ - -SendStream.prototype.onStatError = function(err){ - var notfound = ['ENOENT', 'ENAMETOOLONG', 'ENOTDIR']; - if (~notfound.indexOf(err.code)) return this.error(404, err); - this.error(500, err); -}; - -/** - * Check if the cache is fresh. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isFresh = function(){ - return fresh(this.req.headers, this.res._headers); -}; - -/** - * Check if the range is fresh. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isRangeFresh = function isRangeFresh(){ - var ifRange = this.req.headers['if-range']; - - if (!ifRange) return true; - - return ~ifRange.indexOf('"') - ? ~ifRange.indexOf(this.res._headers['etag']) - : Date.parse(this.res._headers['last-modified']) <= Date.parse(ifRange); -}; - -/** - * Redirect to `path`. - * - * @param {String} path - * @api private - */ - -SendStream.prototype.redirect = function(path){ - if (listenerCount(this, 'directory') !== 0) { - return this.emit('directory'); - } - - if (this.hasTrailingSlash()) return this.error(403); - var res = this.res; - path += '/'; - res.statusCode = 301; - res.setHeader('Content-Type', 'text/html; charset=utf-8'); - res.setHeader('Location', path); - res.end('Redirecting to ' + escapeHtml(path) + '\n'); -}; - -/** - * Pipe to `res. - * - * @param {Stream} res - * @return {Stream} res - * @api public - */ - -SendStream.prototype.pipe = function(res){ - var self = this - , args = arguments - , root = this._root; - - // references - this.res = res; - - // decode the path - var path = decode(this.path) - if (path === -1) return this.error(400) - - // null byte(s) - if (~path.indexOf('\0')) return this.error(400); - - var parts - if (root !== null) { - // malicious path - if (upPathRegexp.test(normalize('.' + sep + path))) { - debug('malicious path "%s"', path) - return this.error(403) - } - - // join / normalize from optional root dir - path = normalize(join(root, path)) - root = normalize(root + sep) - - // explode path parts - parts = path.substr(root.length).split(sep) - } else { - // ".." is malicious without "root" - if (upPathRegexp.test(path)) { - debug('malicious path "%s"', path) - return this.error(403) - } - - // explode path parts - parts = normalize(path).split(sep) - - // resolve the path - path = resolve(path) - } - - // dotfile handling - if (containsDotFile(parts)) { - var access = this._dotfiles - - // legacy support - if (access === undefined) { - access = parts[parts.length - 1][0] === '.' - ? (this._hidden ? 'allow' : 'ignore') - : 'allow' - } - - debug('%s dotfile "%s"', access, path) - switch (access) { - case 'allow': - break - case 'deny': - return this.error(403) - case 'ignore': - default: - return this.error(404) - } - } - - // index file support - if (this._index.length && this.path[this.path.length - 1] === '/') { - this.sendIndex(path); - return res; - } - - this.sendFile(path); - return res; -}; - -/** - * Transfer `path`. - * - * @param {String} path - * @api public - */ - -SendStream.prototype.send = function(path, stat){ - var options = this.options; - var len = stat.size; - var res = this.res; - var req = this.req; - var ranges = req.headers.range; - var offset = options.start || 0; - - if (res._header) { - // impossible to send now - return this.headersAlreadySent(); - } - - debug('pipe "%s"', path) - - // set header fields - this.setHeader(path, stat); - - // set content-type - this.type(path); - - // conditional GET support - if (this.isConditionalGET() - && this.isCachable() - && this.isFresh()) { - return this.notModified(); - } - - // adjust len to start/end options - len = Math.max(0, len - offset); - if (options.end !== undefined) { - var bytes = options.end - offset + 1; - if (len > bytes) len = bytes; - } - - // Range support - if (ranges) { - ranges = parseRange(len, ranges); - - // If-Range support - if (!this.isRangeFresh()) { - debug('range stale'); - ranges = -2; - } - - // unsatisfiable - if (-1 == ranges) { - debug('range unsatisfiable'); - res.setHeader('Content-Range', 'bytes */' + stat.size); - return this.error(416); - } - - // valid (syntactically invalid/multiple ranges are treated as a regular response) - if (-2 != ranges && ranges.length === 1) { - debug('range %j', ranges); - - options.start = offset + ranges[0].start; - options.end = offset + ranges[0].end; - - // Content-Range - res.statusCode = 206; - res.setHeader('Content-Range', 'bytes ' - + ranges[0].start - + '-' - + ranges[0].end - + '/' - + len); - len = options.end - options.start + 1; - } - } - - // content-length - res.setHeader('Content-Length', len); - - // HEAD support - if ('HEAD' == req.method) return res.end(); - - this.stream(path, options); -}; - -/** - * Transfer file for `path`. - * - * @param {String} path - * @api private - */ -SendStream.prototype.sendFile = function sendFile(path) { - var i = 0 - var self = this - - debug('stat "%s"', path); - fs.stat(path, function onstat(err, stat) { - if (err && err.code === 'ENOENT' - && !extname(path) - && path[path.length - 1] !== sep) { - // not found, check extensions - return next(err) - } - if (err) return self.onStatError(err) - if (stat.isDirectory()) return self.redirect(self.path) - self.emit('file', path, stat) - self.send(path, stat) - }) - - function next(err) { - if (self._extensions.length <= i) { - return err - ? self.onStatError(err) - : self.error(404) - } - - var p = path + '.' + self._extensions[i++] - - debug('stat "%s"', p) - fs.stat(p, function (err, stat) { - if (err) return next(err) - if (stat.isDirectory()) return next() - self.emit('file', p, stat) - self.send(p, stat) - }) - } -} - -/** - * Transfer index for `path`. - * - * @param {String} path - * @api private - */ -SendStream.prototype.sendIndex = function sendIndex(path){ - var i = -1; - var self = this; - - function next(err){ - if (++i >= self._index.length) { - if (err) return self.onStatError(err); - return self.error(404); - } - - var p = join(path, self._index[i]); - - debug('stat "%s"', p); - fs.stat(p, function(err, stat){ - if (err) return next(err); - if (stat.isDirectory()) return next(); - self.emit('file', p, stat); - self.send(p, stat); - }); - } - - next(); -}; - -/** - * Stream `path` to the response. - * - * @param {String} path - * @param {Object} options - * @api private - */ - -SendStream.prototype.stream = function(path, options){ - // TODO: this is all lame, refactor meeee - var finished = false; - var self = this; - var res = this.res; - var req = this.req; - - // pipe - var stream = fs.createReadStream(path, options); - this.emit('stream', stream); - stream.pipe(res); - - // response finished, done with the fd - onFinished(res, function onfinished(){ - finished = true; - destroy(stream); - }); - - // error handling code-smell - stream.on('error', function onerror(err){ - // request already finished - if (finished) return; - - // clean up stream - finished = true; - destroy(stream); - - // error - self.onStatError(err); - }); - - // end - stream.on('end', function onend(){ - self.emit('end'); - }); -}; - -/** - * Set content-type based on `path` - * if it hasn't been explicitly set. - * - * @param {String} path - * @api private - */ - -SendStream.prototype.type = function(path){ - var res = this.res; - if (res.getHeader('Content-Type')) return; - var type = mime.lookup(path); - var charset = mime.charsets.lookup(type); - debug('content-type %s', type); - res.setHeader('Content-Type', type + (charset ? '; charset=' + charset : '')); -}; - -/** - * Set response header fields, most - * fields may be pre-defined. - * - * @param {String} path - * @param {Object} stat - * @api private - */ - -SendStream.prototype.setHeader = function setHeader(path, stat){ - var res = this.res; - - this.emit('headers', res, path, stat); - - if (!res.getHeader('Accept-Ranges')) res.setHeader('Accept-Ranges', 'bytes'); - if (!res.getHeader('Date')) res.setHeader('Date', new Date().toUTCString()); - if (!res.getHeader('Cache-Control')) res.setHeader('Cache-Control', 'public, max-age=' + Math.floor(this._maxage / 1000)); - - if (this._lastModified && !res.getHeader('Last-Modified')) { - var modified = stat.mtime.toUTCString() - debug('modified %s', modified) - res.setHeader('Last-Modified', modified) - } - - if (this._etag && !res.getHeader('ETag')) { - var val = etag(stat) - debug('etag %s', val) - res.setHeader('ETag', val) - } -}; - -/** - * Determine if path parts contain a dotfile. - * - * @api private - */ - -function containsDotFile(parts) { - for (var i = 0; i < parts.length; i++) { - if (parts[i][0] === '.') { - return true - } - } - - return false -} - -/** - * decodeURIComponent. - * - * Allows V8 to only deoptimize this fn instead of all - * of send(). - * - * @param {String} path - * @api private - */ - -function decode(path) { - try { - return decodeURIComponent(path) - } catch (err) { - return -1 - } -} - -/** - * Normalize the index option into an array. - * - * @param {boolean|string|array} val - * @api private - */ - -function normalizeList(val){ - return [].concat(val || []) -} diff --git a/s4t-server-node/node_modules/express/node_modules/send/node_modules/destroy/README.md b/s4t-server-node/node_modules/express/node_modules/send/node_modules/destroy/README.md deleted file mode 100644 index 665acb7..0000000 --- a/s4t-server-node/node_modules/express/node_modules/send/node_modules/destroy/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# Destroy - -[![NPM version][npm-image]][npm-url] -[![Build status][travis-image]][travis-url] -[![Test coverage][coveralls-image]][coveralls-url] -[![Dependency Status][david-image]][david-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] -[![Gittip][gittip-image]][gittip-url] - -Destroy a stream. - -## API - -```js -var destroy = require('destroy') - -var fs = require('fs') -var stream = fs.createReadStream('package.json') -destroy(stream) -``` - -[npm-image]: https://img.shields.io/npm/v/destroy.svg?style=flat-square -[npm-url]: https://npmjs.org/package/destroy -[github-tag]: http://img.shields.io/github/tag/stream-utils/destroy.svg?style=flat-square -[github-url]: https://github.com/stream-utils/destroy/tags -[travis-image]: https://img.shields.io/travis/stream-utils/destroy.svg?style=flat-square -[travis-url]: https://travis-ci.org/stream-utils/destroy -[coveralls-image]: https://img.shields.io/coveralls/stream-utils/destroy.svg?style=flat-square -[coveralls-url]: https://coveralls.io/r/stream-utils/destroy?branch=master -[david-image]: http://img.shields.io/david/stream-utils/destroy.svg?style=flat-square -[david-url]: https://david-dm.org/stream-utils/destroy -[license-image]: http://img.shields.io/npm/l/destroy.svg?style=flat-square -[license-url]: LICENSE.md -[downloads-image]: http://img.shields.io/npm/dm/destroy.svg?style=flat-square -[downloads-url]: https://npmjs.org/package/destroy -[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square -[gittip-url]: https://www.gittip.com/jonathanong/ diff --git a/s4t-server-node/node_modules/express/node_modules/send/node_modules/destroy/index.js b/s4t-server-node/node_modules/express/node_modules/send/node_modules/destroy/index.js deleted file mode 100644 index b455217..0000000 --- a/s4t-server-node/node_modules/express/node_modules/send/node_modules/destroy/index.js +++ /dev/null @@ -1,36 +0,0 @@ -var ReadStream = require('fs').ReadStream -var Stream = require('stream') - -module.exports = function destroy(stream) { - if (stream instanceof ReadStream) { - return destroyReadStream(stream) - } - - if (!(stream instanceof Stream)) { - return stream - } - - if (typeof stream.destroy === 'function') { - stream.destroy() - } - - return stream -} - -function destroyReadStream(stream) { - stream.destroy() - - if (typeof stream.close === 'function') { - // node.js core bug work-around - stream.on('open', onopenClose) - } - - return stream -} - -function onopenClose() { - if (typeof this.fd === 'number') { - // actually close down the fd - this.close() - } -} diff --git a/s4t-server-node/node_modules/express/node_modules/send/node_modules/destroy/package.json b/s4t-server-node/node_modules/express/node_modules/send/node_modules/destroy/package.json deleted file mode 100644 index c88380a..0000000 --- a/s4t-server-node/node_modules/express/node_modules/send/node_modules/destroy/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "destroy", - "description": "destroy a stream if possible", - "version": "1.0.3", - "author": { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - }, - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - } - ], - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/stream-utils/destroy" - }, - "devDependencies": { - "istanbul": "0", - "mocha": "1" - }, - "scripts": { - "test": "mocha --reporter spec", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot" - }, - "files": [ - "index.js" - ], - "keywords": [ - "stream", - "streams", - "destroy", - "cleanup", - "leak", - "fd" - ], - "gitHead": "50af95ece4a70202f9301bc3edc8f9fdbbad0f26", - "bugs": { - "url": "https://github.com/stream-utils/destroy/issues" - }, - "homepage": "https://github.com/stream-utils/destroy", - "_id": "destroy@1.0.3", - "_shasum": "b433b4724e71fd8551d9885174851c5fc377e2c9", - "_from": "destroy@1.0.3", - "_npmVersion": "1.4.21", - "_npmUser": { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - }, - "maintainers": [ - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - } - ], - "dist": { - "shasum": "b433b4724e71fd8551d9885174851c5fc377e2c9", - "tarball": "http://registry.npmjs.org/destroy/-/destroy-1.0.3.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.3.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/LICENSE b/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/LICENSE deleted file mode 100644 index 451fc45..0000000 --- a/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Benjamin Thomas, Robert Kieffer - -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/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/README.md b/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/README.md deleted file mode 100644 index 6ca19bd..0000000 --- a/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# mime - -Comprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community. - -## Install - -Install with [npm](http://github.com/isaacs/npm): - - npm install mime - -## API - Queries - -### mime.lookup(path) -Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g. - - var mime = require('mime'); - - mime.lookup('/path/to/file.txt'); // => 'text/plain' - mime.lookup('file.txt'); // => 'text/plain' - mime.lookup('.TXT'); // => 'text/plain' - mime.lookup('htm'); // => 'text/html' - -### mime.default_type -Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.) - -### mime.extension(type) -Get the default extension for `type` - - mime.extension('text/html'); // => 'html' - mime.extension('application/octet-stream'); // => 'bin' - -### mime.charsets.lookup() - -Map mime-type to charset - - mime.charsets.lookup('text/plain'); // => 'UTF-8' - -(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.) - -## API - Defining Custom Types - -The following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types). - -### mime.define() - -Add custom mime/extension mappings - - mime.define({ - 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'], - 'application/x-my-type': ['x-mt', 'x-mtt'], - // etc ... - }); - - mime.lookup('x-sft'); // => 'text/x-some-format' - -The first entry in the extensions array is returned by `mime.extension()`. E.g. - - mime.extension('text/x-some-format'); // => 'x-sf' - -### mime.load(filepath) - -Load mappings from an Apache ".types" format file - - mime.load('./my_project.types'); - -The .types file format is simple - See the `types` dir for examples. diff --git a/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/mime.js b/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/mime.js deleted file mode 100644 index 48be0c5..0000000 --- a/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/mime.js +++ /dev/null @@ -1,114 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -function Mime() { - // Map of extension -> mime type - this.types = Object.create(null); - - // Map of mime type -> extension - this.extensions = Object.create(null); -} - -/** - * Define mimetype -> extension mappings. Each key is a mime-type that maps - * to an array of extensions associated with the type. The first extension is - * used as the default extension for the type. - * - * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); - * - * @param map (Object) type definitions - */ -Mime.prototype.define = function (map) { - for (var type in map) { - var exts = map[type]; - - for (var i = 0; i < exts.length; i++) { - if (process.env.DEBUG_MIME && this.types[exts]) { - console.warn(this._loading.replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' + - this.types[exts] + ' to ' + type); - } - - this.types[exts[i]] = type; - } - - // Default extension is the first one we encounter - if (!this.extensions[type]) { - this.extensions[type] = exts[0]; - } - } -}; - -/** - * Load an Apache2-style ".types" file - * - * This may be called multiple times (it's expected). Where files declare - * overlapping types/extensions, the last file wins. - * - * @param file (String) path of file to load. - */ -Mime.prototype.load = function(file) { - - this._loading = file; - // Read file and split into lines - var map = {}, - content = fs.readFileSync(file, 'ascii'), - lines = content.split(/[\r\n]+/); - - lines.forEach(function(line) { - // Clean up whitespace/comments, and split into fields - var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/); - map[fields.shift()] = fields; - }); - - this.define(map); - - this._loading = null; -}; - -/** - * Lookup a mime type based on extension - */ -Mime.prototype.lookup = function(path, fallback) { - var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase(); - - return this.types[ext] || fallback || this.default_type; -}; - -/** - * Return file extension associated with a mime type - */ -Mime.prototype.extension = function(mimeType) { - var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase(); - return this.extensions[type]; -}; - -// Default instance -var mime = new Mime(); - -// Load local copy of -// http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types -mime.load(path.join(__dirname, 'types/mime.types')); - -// Load additional types from node.js community -mime.load(path.join(__dirname, 'types/node.types')); - -// Default type -mime.default_type = mime.lookup('bin'); - -// -// Additional API specific to the default instance -// - -mime.Mime = Mime; - -/** - * Lookup a charset based on mime type. - */ -mime.charsets = { - lookup: function(mimeType, fallback) { - // Assume text types are utf8 - return (/^text\//).test(mimeType) ? 'UTF-8' : fallback; - } -}; - -module.exports = mime; diff --git a/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/package.json b/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/package.json deleted file mode 100644 index ab6beca..0000000 --- a/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "author": { - "name": "Robert Kieffer", - "email": "robert@broofa.com", - "url": "http://github.com/broofa" - }, - "contributors": [ - { - "name": "Benjamin Thomas", - "email": "benjamin@benjaminthomas.org", - "url": "http://github.com/bentomas" - } - ], - "dependencies": {}, - "description": "A comprehensive library for mime-type mapping", - "devDependencies": {}, - "keywords": [ - "util", - "mime" - ], - "main": "mime.js", - "name": "mime", - "repository": { - "url": "https://github.com/broofa/node-mime", - "type": "git" - }, - "version": "1.2.11", - "readme": "# mime\n\nComprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community.\n\n## Install\n\nInstall with [npm](http://github.com/isaacs/npm):\n\n npm install mime\n\n## API - Queries\n\n### mime.lookup(path)\nGet the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.\n\n var mime = require('mime');\n\n mime.lookup('/path/to/file.txt'); // => 'text/plain'\n mime.lookup('file.txt'); // => 'text/plain'\n mime.lookup('.TXT'); // => 'text/plain'\n mime.lookup('htm'); // => 'text/html'\n\n### mime.default_type\nSets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.)\n\n### mime.extension(type)\nGet the default extension for `type`\n\n mime.extension('text/html'); // => 'html'\n mime.extension('application/octet-stream'); // => 'bin'\n\n### mime.charsets.lookup()\n\nMap mime-type to charset\n\n mime.charsets.lookup('text/plain'); // => 'UTF-8'\n\n(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)\n\n## API - Defining Custom Types\n\nThe following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types).\n\n### mime.define()\n\nAdd custom mime/extension mappings\n\n mime.define({\n 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],\n 'application/x-my-type': ['x-mt', 'x-mtt'],\n // etc ...\n });\n\n mime.lookup('x-sft'); // => 'text/x-some-format'\n\nThe first entry in the extensions array is returned by `mime.extension()`. E.g.\n\n mime.extension('text/x-some-format'); // => 'x-sf'\n\n### mime.load(filepath)\n\nLoad mappings from an Apache \".types\" format file\n\n mime.load('./my_project.types');\n\nThe .types file format is simple - See the `types` dir for examples.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/broofa/node-mime/issues" - }, - "_id": "mime@1.2.11", - "dist": { - "shasum": "58203eed86e3a5ef17aed2b7d9ebd47f0a60dd10", - "tarball": "http://registry.npmjs.org/mime/-/mime-1.2.11.tgz" - }, - "_from": "mime@1.2.11", - "_npmVersion": "1.3.6", - "_npmUser": { - "name": "broofa", - "email": "robert@broofa.com" - }, - "maintainers": [ - { - "name": "broofa", - "email": "robert@broofa.com" - }, - { - "name": "bentomas", - "email": "benjamin@benjaminthomas.org" - } - ], - "directories": {}, - "_shasum": "58203eed86e3a5ef17aed2b7d9ebd47f0a60dd10", - "_resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz", - "homepage": "https://github.com/broofa/node-mime", - "scripts": {} -} diff --git a/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/test.js b/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/test.js deleted file mode 100644 index 2cda1c7..0000000 --- a/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/test.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Usage: node test.js - */ - -var mime = require('./mime'); -var assert = require('assert'); -var path = require('path'); - -function eq(a, b) { - console.log('Test: ' + a + ' === ' + b); - assert.strictEqual.apply(null, arguments); -} - -console.log(Object.keys(mime.extensions).length + ' types'); -console.log(Object.keys(mime.types).length + ' extensions\n'); - -// -// Test mime lookups -// - -eq('text/plain', mime.lookup('text.txt')); // normal file -eq('text/plain', mime.lookup('TEXT.TXT')); // uppercase -eq('text/plain', mime.lookup('dir/text.txt')); // dir + file -eq('text/plain', mime.lookup('.text.txt')); // hidden file -eq('text/plain', mime.lookup('.txt')); // nameless -eq('text/plain', mime.lookup('txt')); // extension-only -eq('text/plain', mime.lookup('/txt')); // extension-less () -eq('text/plain', mime.lookup('\\txt')); // Windows, extension-less -eq('application/octet-stream', mime.lookup('text.nope')); // unrecognized -eq('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default - -// -// Test extensions -// - -eq('txt', mime.extension(mime.types.text)); -eq('html', mime.extension(mime.types.htm)); -eq('bin', mime.extension('application/octet-stream')); -eq('bin', mime.extension('application/octet-stream ')); -eq('html', mime.extension(' text/html; charset=UTF-8')); -eq('html', mime.extension('text/html; charset=UTF-8 ')); -eq('html', mime.extension('text/html; charset=UTF-8')); -eq('html', mime.extension('text/html ; charset=UTF-8')); -eq('html', mime.extension('text/html;charset=UTF-8')); -eq('html', mime.extension('text/Html;charset=UTF-8')); -eq(undefined, mime.extension('unrecognized')); - -// -// Test node.types lookups -// - -eq('application/font-woff', mime.lookup('file.woff')); -eq('application/octet-stream', mime.lookup('file.buffer')); -eq('audio/mp4', mime.lookup('file.m4a')); -eq('font/opentype', mime.lookup('file.otf')); - -// -// Test charsets -// - -eq('UTF-8', mime.charsets.lookup('text/plain')); -eq(undefined, mime.charsets.lookup(mime.types.js)); -eq('fallback', mime.charsets.lookup('application/octet-stream', 'fallback')); - -// -// Test for overlaps between mime.types and node.types -// - -var apacheTypes = new mime.Mime(), nodeTypes = new mime.Mime(); -apacheTypes.load(path.join(__dirname, 'types/mime.types')); -nodeTypes.load(path.join(__dirname, 'types/node.types')); - -var keys = [].concat(Object.keys(apacheTypes.types)) - .concat(Object.keys(nodeTypes.types)); -keys.sort(); -for (var i = 1; i < keys.length; i++) { - if (keys[i] == keys[i-1]) { - console.warn('Warning: ' + - 'node.types defines ' + keys[i] + '->' + nodeTypes.types[keys[i]] + - ', mime.types defines ' + keys[i] + '->' + apacheTypes.types[keys[i]]); - } -} - -console.log('\nOK'); diff --git a/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/types/mime.types b/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/types/mime.types deleted file mode 100644 index da8cd69..0000000 --- a/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/types/mime.types +++ /dev/null @@ -1,1588 +0,0 @@ -# This file maps Internet media types to unique file extension(s). -# Although created for httpd, this file is used by many software systems -# and has been placed in the public domain for unlimited redisribution. -# -# The table below contains both registered and (common) unregistered types. -# A type that has no unique extension can be ignored -- they are listed -# here to guide configurations toward known types and to make it easier to -# identify "new" types. File extensions are also commonly used to indicate -# content languages and encodings, so choose them carefully. -# -# Internet media types should be registered as described in RFC 4288. -# The registry is at . -# -# MIME type (lowercased) Extensions -# ============================================ ========== -# application/1d-interleaved-parityfec -# application/3gpp-ims+xml -# application/activemessage -application/andrew-inset ez -# application/applefile -application/applixware aw -application/atom+xml atom -application/atomcat+xml atomcat -# application/atomicmail -application/atomsvc+xml atomsvc -# application/auth-policy+xml -# application/batch-smtp -# application/beep+xml -# application/calendar+xml -# application/cals-1840 -# application/ccmp+xml -application/ccxml+xml ccxml -application/cdmi-capability cdmia -application/cdmi-container cdmic -application/cdmi-domain cdmid -application/cdmi-object cdmio -application/cdmi-queue cdmiq -# application/cea-2018+xml -# application/cellml+xml -# application/cfw -# application/cnrp+xml -# application/commonground -# application/conference-info+xml -# application/cpl+xml -# application/csta+xml -# application/cstadata+xml -application/cu-seeme cu -# application/cybercash -application/davmount+xml davmount -# application/dca-rft -# application/dec-dx -# application/dialog-info+xml -# application/dicom -# application/dns -application/docbook+xml dbk -# application/dskpp+xml -application/dssc+der dssc -application/dssc+xml xdssc -# application/dvcs -application/ecmascript ecma -# application/edi-consent -# application/edi-x12 -# application/edifact -application/emma+xml emma -# application/epp+xml -application/epub+zip epub -# application/eshop -# application/example -application/exi exi -# application/fastinfoset -# application/fastsoap -# application/fits -application/font-tdpfr pfr -# application/framework-attributes+xml -application/gml+xml gml -application/gpx+xml gpx -application/gxf gxf -# application/h224 -# application/held+xml -# application/http -application/hyperstudio stk -# application/ibe-key-request+xml -# application/ibe-pkg-reply+xml -# application/ibe-pp-data -# application/iges -# application/im-iscomposing+xml -# application/index -# application/index.cmd -# application/index.obj -# application/index.response -# application/index.vnd -application/inkml+xml ink inkml -# application/iotp -application/ipfix ipfix -# application/ipp -# application/isup -application/java-archive jar -application/java-serialized-object ser -application/java-vm class -application/javascript js -application/json json -application/jsonml+json jsonml -# application/kpml-request+xml -# application/kpml-response+xml -application/lost+xml lostxml -application/mac-binhex40 hqx -application/mac-compactpro cpt -# application/macwriteii -application/mads+xml mads -application/marc mrc -application/marcxml+xml mrcx -application/mathematica ma nb mb -# application/mathml-content+xml -# application/mathml-presentation+xml -application/mathml+xml mathml -# application/mbms-associated-procedure-description+xml -# application/mbms-deregister+xml -# application/mbms-envelope+xml -# application/mbms-msk+xml -# application/mbms-msk-response+xml -# application/mbms-protection-description+xml -# application/mbms-reception-report+xml -# application/mbms-register+xml -# application/mbms-register-response+xml -# application/mbms-user-service-description+xml -application/mbox mbox -# application/media_control+xml -application/mediaservercontrol+xml mscml -application/metalink+xml metalink -application/metalink4+xml meta4 -application/mets+xml mets -# application/mikey -application/mods+xml mods -# application/moss-keys -# application/moss-signature -# application/mosskey-data -# application/mosskey-request -application/mp21 m21 mp21 -application/mp4 mp4s -# application/mpeg4-generic -# application/mpeg4-iod -# application/mpeg4-iod-xmt -# application/msc-ivr+xml -# application/msc-mixer+xml -application/msword doc dot -application/mxf mxf -# application/nasdata -# application/news-checkgroups -# application/news-groupinfo -# application/news-transmission -# application/nss -# application/ocsp-request -# application/ocsp-response -application/octet-stream bin dms lrf mar so dist distz pkg bpk dump elc deploy -application/oda oda -application/oebps-package+xml opf -application/ogg ogx -application/omdoc+xml omdoc -application/onenote onetoc onetoc2 onetmp onepkg -application/oxps oxps -# application/parityfec -application/patch-ops-error+xml xer -application/pdf pdf -application/pgp-encrypted pgp -# application/pgp-keys -application/pgp-signature asc sig -application/pics-rules prf -# application/pidf+xml -# application/pidf-diff+xml -application/pkcs10 p10 -application/pkcs7-mime p7m p7c -application/pkcs7-signature p7s -application/pkcs8 p8 -application/pkix-attr-cert ac -application/pkix-cert cer -application/pkix-crl crl -application/pkix-pkipath pkipath -application/pkixcmp pki -application/pls+xml pls -# application/poc-settings+xml -application/postscript ai eps ps -# application/prs.alvestrand.titrax-sheet -application/prs.cww cww -# application/prs.nprend -# application/prs.plucker -# application/prs.rdf-xml-crypt -# application/prs.xsf+xml -application/pskc+xml pskcxml -# application/qsig -application/rdf+xml rdf -application/reginfo+xml rif -application/relax-ng-compact-syntax rnc -# application/remote-printing -application/resource-lists+xml rl -application/resource-lists-diff+xml rld -# application/riscos -# application/rlmi+xml -application/rls-services+xml rs -application/rpki-ghostbusters gbr -application/rpki-manifest mft -application/rpki-roa roa -# application/rpki-updown -application/rsd+xml rsd -application/rss+xml rss -application/rtf rtf -# application/rtx -# application/samlassertion+xml -# application/samlmetadata+xml -application/sbml+xml sbml -application/scvp-cv-request scq -application/scvp-cv-response scs -application/scvp-vp-request spq -application/scvp-vp-response spp -application/sdp sdp -# application/set-payment -application/set-payment-initiation setpay -# application/set-registration -application/set-registration-initiation setreg -# application/sgml -# application/sgml-open-catalog -application/shf+xml shf -# application/sieve -# application/simple-filter+xml -# application/simple-message-summary -# application/simplesymbolcontainer -# application/slate -# application/smil -application/smil+xml smi smil -# application/soap+fastinfoset -# application/soap+xml -application/sparql-query rq -application/sparql-results+xml srx -# application/spirits-event+xml -application/srgs gram -application/srgs+xml grxml -application/sru+xml sru -application/ssdl+xml ssdl -application/ssml+xml ssml -# application/tamp-apex-update -# application/tamp-apex-update-confirm -# application/tamp-community-update -# application/tamp-community-update-confirm -# application/tamp-error -# application/tamp-sequence-adjust -# application/tamp-sequence-adjust-confirm -# application/tamp-status-query -# application/tamp-status-response -# application/tamp-update -# application/tamp-update-confirm -application/tei+xml tei teicorpus -application/thraud+xml tfi -# application/timestamp-query -# application/timestamp-reply -application/timestamped-data tsd -# application/tve-trigger -# application/ulpfec -# application/vcard+xml -# application/vemmi -# application/vividence.scriptfile -# application/vnd.3gpp.bsf+xml -application/vnd.3gpp.pic-bw-large plb -application/vnd.3gpp.pic-bw-small psb -application/vnd.3gpp.pic-bw-var pvb -# application/vnd.3gpp.sms -# application/vnd.3gpp2.bcmcsinfo+xml -# application/vnd.3gpp2.sms -application/vnd.3gpp2.tcap tcap -application/vnd.3m.post-it-notes pwn -application/vnd.accpac.simply.aso aso -application/vnd.accpac.simply.imp imp -application/vnd.acucobol acu -application/vnd.acucorp atc acutc -application/vnd.adobe.air-application-installer-package+zip air -application/vnd.adobe.formscentral.fcdt fcdt -application/vnd.adobe.fxp fxp fxpl -# application/vnd.adobe.partial-upload -application/vnd.adobe.xdp+xml xdp -application/vnd.adobe.xfdf xfdf -# application/vnd.aether.imp -# application/vnd.ah-barcode -application/vnd.ahead.space ahead -application/vnd.airzip.filesecure.azf azf -application/vnd.airzip.filesecure.azs azs -application/vnd.amazon.ebook azw -application/vnd.americandynamics.acc acc -application/vnd.amiga.ami ami -# application/vnd.amundsen.maze+xml -application/vnd.android.package-archive apk -application/vnd.anser-web-certificate-issue-initiation cii -application/vnd.anser-web-funds-transfer-initiation fti -application/vnd.antix.game-component atx -application/vnd.apple.installer+xml mpkg -application/vnd.apple.mpegurl m3u8 -# application/vnd.arastra.swi -application/vnd.aristanetworks.swi swi -application/vnd.astraea-software.iota iota -application/vnd.audiograph aep -# application/vnd.autopackage -# application/vnd.avistar+xml -application/vnd.blueice.multipass mpm -# application/vnd.bluetooth.ep.oob -application/vnd.bmi bmi -application/vnd.businessobjects rep -# application/vnd.cab-jscript -# application/vnd.canon-cpdl -# application/vnd.canon-lips -# application/vnd.cendio.thinlinc.clientconf -application/vnd.chemdraw+xml cdxml -application/vnd.chipnuts.karaoke-mmd mmd -application/vnd.cinderella cdy -# application/vnd.cirpack.isdn-ext -application/vnd.claymore cla -application/vnd.cloanto.rp9 rp9 -application/vnd.clonk.c4group c4g c4d c4f c4p c4u -application/vnd.cluetrust.cartomobile-config c11amc -application/vnd.cluetrust.cartomobile-config-pkg c11amz -# application/vnd.collection+json -# application/vnd.commerce-battelle -application/vnd.commonspace csp -application/vnd.contact.cmsg cdbcmsg -application/vnd.cosmocaller cmc -application/vnd.crick.clicker clkx -application/vnd.crick.clicker.keyboard clkk -application/vnd.crick.clicker.palette clkp -application/vnd.crick.clicker.template clkt -application/vnd.crick.clicker.wordbank clkw -application/vnd.criticaltools.wbs+xml wbs -application/vnd.ctc-posml pml -# application/vnd.ctct.ws+xml -# application/vnd.cups-pdf -# application/vnd.cups-postscript -application/vnd.cups-ppd ppd -# application/vnd.cups-raster -# application/vnd.cups-raw -# application/vnd.curl -application/vnd.curl.car car -application/vnd.curl.pcurl pcurl -# application/vnd.cybank -application/vnd.dart dart -application/vnd.data-vision.rdz rdz -application/vnd.dece.data uvf uvvf uvd uvvd -application/vnd.dece.ttml+xml uvt uvvt -application/vnd.dece.unspecified uvx uvvx -application/vnd.dece.zip uvz uvvz -application/vnd.denovo.fcselayout-link fe_launch -# application/vnd.dir-bi.plate-dl-nosuffix -application/vnd.dna dna -application/vnd.dolby.mlp mlp -# application/vnd.dolby.mobile.1 -# application/vnd.dolby.mobile.2 -application/vnd.dpgraph dpg -application/vnd.dreamfactory dfac -application/vnd.ds-keypoint kpxx -application/vnd.dvb.ait ait -# application/vnd.dvb.dvbj -# application/vnd.dvb.esgcontainer -# application/vnd.dvb.ipdcdftnotifaccess -# application/vnd.dvb.ipdcesgaccess -# application/vnd.dvb.ipdcesgaccess2 -# application/vnd.dvb.ipdcesgpdd -# application/vnd.dvb.ipdcroaming -# application/vnd.dvb.iptv.alfec-base -# application/vnd.dvb.iptv.alfec-enhancement -# application/vnd.dvb.notif-aggregate-root+xml -# application/vnd.dvb.notif-container+xml -# application/vnd.dvb.notif-generic+xml -# application/vnd.dvb.notif-ia-msglist+xml -# application/vnd.dvb.notif-ia-registration-request+xml -# application/vnd.dvb.notif-ia-registration-response+xml -# application/vnd.dvb.notif-init+xml -# application/vnd.dvb.pfr -application/vnd.dvb.service svc -# application/vnd.dxr -application/vnd.dynageo geo -# application/vnd.easykaraoke.cdgdownload -# application/vnd.ecdis-update -application/vnd.ecowin.chart mag -# application/vnd.ecowin.filerequest -# application/vnd.ecowin.fileupdate -# application/vnd.ecowin.series -# application/vnd.ecowin.seriesrequest -# application/vnd.ecowin.seriesupdate -# application/vnd.emclient.accessrequest+xml -application/vnd.enliven nml -# application/vnd.eprints.data+xml -application/vnd.epson.esf esf -application/vnd.epson.msf msf -application/vnd.epson.quickanime qam -application/vnd.epson.salt slt -application/vnd.epson.ssf ssf -# application/vnd.ericsson.quickcall -application/vnd.eszigno3+xml es3 et3 -# application/vnd.etsi.aoc+xml -# application/vnd.etsi.cug+xml -# application/vnd.etsi.iptvcommand+xml -# application/vnd.etsi.iptvdiscovery+xml -# application/vnd.etsi.iptvprofile+xml -# application/vnd.etsi.iptvsad-bc+xml -# application/vnd.etsi.iptvsad-cod+xml -# application/vnd.etsi.iptvsad-npvr+xml -# application/vnd.etsi.iptvservice+xml -# application/vnd.etsi.iptvsync+xml -# application/vnd.etsi.iptvueprofile+xml -# application/vnd.etsi.mcid+xml -# application/vnd.etsi.overload-control-policy-dataset+xml -# application/vnd.etsi.sci+xml -# application/vnd.etsi.simservs+xml -# application/vnd.etsi.tsl+xml -# application/vnd.etsi.tsl.der -# application/vnd.eudora.data -application/vnd.ezpix-album ez2 -application/vnd.ezpix-package ez3 -# application/vnd.f-secure.mobile -application/vnd.fdf fdf -application/vnd.fdsn.mseed mseed -application/vnd.fdsn.seed seed dataless -# application/vnd.ffsns -# application/vnd.fints -application/vnd.flographit gph -application/vnd.fluxtime.clip ftc -# application/vnd.font-fontforge-sfd -application/vnd.framemaker fm frame maker book -application/vnd.frogans.fnc fnc -application/vnd.frogans.ltf ltf -application/vnd.fsc.weblaunch fsc -application/vnd.fujitsu.oasys oas -application/vnd.fujitsu.oasys2 oa2 -application/vnd.fujitsu.oasys3 oa3 -application/vnd.fujitsu.oasysgp fg5 -application/vnd.fujitsu.oasysprs bh2 -# application/vnd.fujixerox.art-ex -# application/vnd.fujixerox.art4 -# application/vnd.fujixerox.hbpl -application/vnd.fujixerox.ddd ddd -application/vnd.fujixerox.docuworks xdw -application/vnd.fujixerox.docuworks.binder xbd -# application/vnd.fut-misnet -application/vnd.fuzzysheet fzs -application/vnd.genomatix.tuxedo txd -# application/vnd.geocube+xml -application/vnd.geogebra.file ggb -application/vnd.geogebra.tool ggt -application/vnd.geometry-explorer gex gre -application/vnd.geonext gxt -application/vnd.geoplan g2w -application/vnd.geospace g3w -# application/vnd.globalplatform.card-content-mgt -# application/vnd.globalplatform.card-content-mgt-response -application/vnd.gmx gmx -application/vnd.google-earth.kml+xml kml -application/vnd.google-earth.kmz kmz -application/vnd.grafeq gqf gqs -# application/vnd.gridmp -application/vnd.groove-account gac -application/vnd.groove-help ghf -application/vnd.groove-identity-message gim -application/vnd.groove-injector grv -application/vnd.groove-tool-message gtm -application/vnd.groove-tool-template tpl -application/vnd.groove-vcard vcg -# application/vnd.hal+json -application/vnd.hal+xml hal -application/vnd.handheld-entertainment+xml zmm -application/vnd.hbci hbci -# application/vnd.hcl-bireports -application/vnd.hhe.lesson-player les -application/vnd.hp-hpgl hpgl -application/vnd.hp-hpid hpid -application/vnd.hp-hps hps -application/vnd.hp-jlyt jlt -application/vnd.hp-pcl pcl -application/vnd.hp-pclxl pclxl -# application/vnd.httphone -application/vnd.hydrostatix.sof-data sfd-hdstx -# application/vnd.hzn-3d-crossword -# application/vnd.ibm.afplinedata -# application/vnd.ibm.electronic-media -application/vnd.ibm.minipay mpy -application/vnd.ibm.modcap afp listafp list3820 -application/vnd.ibm.rights-management irm -application/vnd.ibm.secure-container sc -application/vnd.iccprofile icc icm -application/vnd.igloader igl -application/vnd.immervision-ivp ivp -application/vnd.immervision-ivu ivu -# application/vnd.informedcontrol.rms+xml -# application/vnd.informix-visionary -# application/vnd.infotech.project -# application/vnd.infotech.project+xml -# application/vnd.innopath.wamp.notification -application/vnd.insors.igm igm -application/vnd.intercon.formnet xpw xpx -application/vnd.intergeo i2g -# application/vnd.intertrust.digibox -# application/vnd.intertrust.nncp -application/vnd.intu.qbo qbo -application/vnd.intu.qfx qfx -# application/vnd.iptc.g2.conceptitem+xml -# application/vnd.iptc.g2.knowledgeitem+xml -# application/vnd.iptc.g2.newsitem+xml -# application/vnd.iptc.g2.newsmessage+xml -# application/vnd.iptc.g2.packageitem+xml -# application/vnd.iptc.g2.planningitem+xml -application/vnd.ipunplugged.rcprofile rcprofile -application/vnd.irepository.package+xml irp -application/vnd.is-xpr xpr -application/vnd.isac.fcs fcs -application/vnd.jam jam -# application/vnd.japannet-directory-service -# application/vnd.japannet-jpnstore-wakeup -# application/vnd.japannet-payment-wakeup -# application/vnd.japannet-registration -# application/vnd.japannet-registration-wakeup -# application/vnd.japannet-setstore-wakeup -# application/vnd.japannet-verification -# application/vnd.japannet-verification-wakeup -application/vnd.jcp.javame.midlet-rms rms -application/vnd.jisp jisp -application/vnd.joost.joda-archive joda -application/vnd.kahootz ktz ktr -application/vnd.kde.karbon karbon -application/vnd.kde.kchart chrt -application/vnd.kde.kformula kfo -application/vnd.kde.kivio flw -application/vnd.kde.kontour kon -application/vnd.kde.kpresenter kpr kpt -application/vnd.kde.kspread ksp -application/vnd.kde.kword kwd kwt -application/vnd.kenameaapp htke -application/vnd.kidspiration kia -application/vnd.kinar kne knp -application/vnd.koan skp skd skt skm -application/vnd.kodak-descriptor sse -application/vnd.las.las+xml lasxml -# application/vnd.liberty-request+xml -application/vnd.llamagraphics.life-balance.desktop lbd -application/vnd.llamagraphics.life-balance.exchange+xml lbe -application/vnd.lotus-1-2-3 123 -application/vnd.lotus-approach apr -application/vnd.lotus-freelance pre -application/vnd.lotus-notes nsf -application/vnd.lotus-organizer org -application/vnd.lotus-screencam scm -application/vnd.lotus-wordpro lwp -application/vnd.macports.portpkg portpkg -# application/vnd.marlin.drm.actiontoken+xml -# application/vnd.marlin.drm.conftoken+xml -# application/vnd.marlin.drm.license+xml -# application/vnd.marlin.drm.mdcf -application/vnd.mcd mcd -application/vnd.medcalcdata mc1 -application/vnd.mediastation.cdkey cdkey -# application/vnd.meridian-slingshot -application/vnd.mfer mwf -application/vnd.mfmp mfm -application/vnd.micrografx.flo flo -application/vnd.micrografx.igx igx -application/vnd.mif mif -# application/vnd.minisoft-hp3000-save -# application/vnd.mitsubishi.misty-guard.trustweb -application/vnd.mobius.daf daf -application/vnd.mobius.dis dis -application/vnd.mobius.mbk mbk -application/vnd.mobius.mqy mqy -application/vnd.mobius.msl msl -application/vnd.mobius.plc plc -application/vnd.mobius.txf txf -application/vnd.mophun.application mpn -application/vnd.mophun.certificate mpc -# application/vnd.motorola.flexsuite -# application/vnd.motorola.flexsuite.adsi -# application/vnd.motorola.flexsuite.fis -# application/vnd.motorola.flexsuite.gotap -# application/vnd.motorola.flexsuite.kmr -# application/vnd.motorola.flexsuite.ttc -# application/vnd.motorola.flexsuite.wem -# application/vnd.motorola.iprm -application/vnd.mozilla.xul+xml xul -application/vnd.ms-artgalry cil -# application/vnd.ms-asf -application/vnd.ms-cab-compressed cab -# application/vnd.ms-color.iccprofile -application/vnd.ms-excel xls xlm xla xlc xlt xlw -application/vnd.ms-excel.addin.macroenabled.12 xlam -application/vnd.ms-excel.sheet.binary.macroenabled.12 xlsb -application/vnd.ms-excel.sheet.macroenabled.12 xlsm -application/vnd.ms-excel.template.macroenabled.12 xltm -application/vnd.ms-fontobject eot -application/vnd.ms-htmlhelp chm -application/vnd.ms-ims ims -application/vnd.ms-lrm lrm -# application/vnd.ms-office.activex+xml -application/vnd.ms-officetheme thmx -# application/vnd.ms-opentype -# application/vnd.ms-package.obfuscated-opentype -application/vnd.ms-pki.seccat cat -application/vnd.ms-pki.stl stl -# application/vnd.ms-playready.initiator+xml -application/vnd.ms-powerpoint ppt pps pot -application/vnd.ms-powerpoint.addin.macroenabled.12 ppam -application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm -application/vnd.ms-powerpoint.slide.macroenabled.12 sldm -application/vnd.ms-powerpoint.slideshow.macroenabled.12 ppsm -application/vnd.ms-powerpoint.template.macroenabled.12 potm -# application/vnd.ms-printing.printticket+xml -application/vnd.ms-project mpp mpt -# application/vnd.ms-tnef -# application/vnd.ms-wmdrm.lic-chlg-req -# application/vnd.ms-wmdrm.lic-resp -# application/vnd.ms-wmdrm.meter-chlg-req -# application/vnd.ms-wmdrm.meter-resp -application/vnd.ms-word.document.macroenabled.12 docm -application/vnd.ms-word.template.macroenabled.12 dotm -application/vnd.ms-works wps wks wcm wdb -application/vnd.ms-wpl wpl -application/vnd.ms-xpsdocument xps -application/vnd.mseq mseq -# application/vnd.msign -# application/vnd.multiad.creator -# application/vnd.multiad.creator.cif -# application/vnd.music-niff -application/vnd.musician mus -application/vnd.muvee.style msty -application/vnd.mynfc taglet -# application/vnd.ncd.control -# application/vnd.ncd.reference -# application/vnd.nervana -# application/vnd.netfpx -application/vnd.neurolanguage.nlu nlu -application/vnd.nitf ntf nitf -application/vnd.noblenet-directory nnd -application/vnd.noblenet-sealer nns -application/vnd.noblenet-web nnw -# application/vnd.nokia.catalogs -# application/vnd.nokia.conml+wbxml -# application/vnd.nokia.conml+xml -# application/vnd.nokia.isds-radio-presets -# application/vnd.nokia.iptv.config+xml -# application/vnd.nokia.landmark+wbxml -# application/vnd.nokia.landmark+xml -# application/vnd.nokia.landmarkcollection+xml -# application/vnd.nokia.n-gage.ac+xml -application/vnd.nokia.n-gage.data ngdat -application/vnd.nokia.n-gage.symbian.install n-gage -# application/vnd.nokia.ncd -# application/vnd.nokia.pcd+wbxml -# application/vnd.nokia.pcd+xml -application/vnd.nokia.radio-preset rpst -application/vnd.nokia.radio-presets rpss -application/vnd.novadigm.edm edm -application/vnd.novadigm.edx edx -application/vnd.novadigm.ext ext -# application/vnd.ntt-local.file-transfer -# application/vnd.ntt-local.sip-ta_remote -# application/vnd.ntt-local.sip-ta_tcp_stream -application/vnd.oasis.opendocument.chart odc -application/vnd.oasis.opendocument.chart-template otc -application/vnd.oasis.opendocument.database odb -application/vnd.oasis.opendocument.formula odf -application/vnd.oasis.opendocument.formula-template odft -application/vnd.oasis.opendocument.graphics odg -application/vnd.oasis.opendocument.graphics-template otg -application/vnd.oasis.opendocument.image odi -application/vnd.oasis.opendocument.image-template oti -application/vnd.oasis.opendocument.presentation odp -application/vnd.oasis.opendocument.presentation-template otp -application/vnd.oasis.opendocument.spreadsheet ods -application/vnd.oasis.opendocument.spreadsheet-template ots -application/vnd.oasis.opendocument.text odt -application/vnd.oasis.opendocument.text-master odm -application/vnd.oasis.opendocument.text-template ott -application/vnd.oasis.opendocument.text-web oth -# application/vnd.obn -# application/vnd.oftn.l10n+json -# application/vnd.oipf.contentaccessdownload+xml -# application/vnd.oipf.contentaccessstreaming+xml -# application/vnd.oipf.cspg-hexbinary -# application/vnd.oipf.dae.svg+xml -# application/vnd.oipf.dae.xhtml+xml -# application/vnd.oipf.mippvcontrolmessage+xml -# application/vnd.oipf.pae.gem -# application/vnd.oipf.spdiscovery+xml -# application/vnd.oipf.spdlist+xml -# application/vnd.oipf.ueprofile+xml -# application/vnd.oipf.userprofile+xml -application/vnd.olpc-sugar xo -# application/vnd.oma-scws-config -# application/vnd.oma-scws-http-request -# application/vnd.oma-scws-http-response -# application/vnd.oma.bcast.associated-procedure-parameter+xml -# application/vnd.oma.bcast.drm-trigger+xml -# application/vnd.oma.bcast.imd+xml -# application/vnd.oma.bcast.ltkm -# application/vnd.oma.bcast.notification+xml -# application/vnd.oma.bcast.provisioningtrigger -# application/vnd.oma.bcast.sgboot -# application/vnd.oma.bcast.sgdd+xml -# application/vnd.oma.bcast.sgdu -# application/vnd.oma.bcast.simple-symbol-container -# application/vnd.oma.bcast.smartcard-trigger+xml -# application/vnd.oma.bcast.sprov+xml -# application/vnd.oma.bcast.stkm -# application/vnd.oma.cab-address-book+xml -# application/vnd.oma.cab-feature-handler+xml -# application/vnd.oma.cab-pcc+xml -# application/vnd.oma.cab-user-prefs+xml -# application/vnd.oma.dcd -# application/vnd.oma.dcdc -application/vnd.oma.dd2+xml dd2 -# application/vnd.oma.drm.risd+xml -# application/vnd.oma.group-usage-list+xml -# application/vnd.oma.pal+xml -# application/vnd.oma.poc.detailed-progress-report+xml -# application/vnd.oma.poc.final-report+xml -# application/vnd.oma.poc.groups+xml -# application/vnd.oma.poc.invocation-descriptor+xml -# application/vnd.oma.poc.optimized-progress-report+xml -# application/vnd.oma.push -# application/vnd.oma.scidm.messages+xml -# application/vnd.oma.xcap-directory+xml -# application/vnd.omads-email+xml -# application/vnd.omads-file+xml -# application/vnd.omads-folder+xml -# application/vnd.omaloc-supl-init -application/vnd.openofficeorg.extension oxt -# application/vnd.openxmlformats-officedocument.custom-properties+xml -# application/vnd.openxmlformats-officedocument.customxmlproperties+xml -# application/vnd.openxmlformats-officedocument.drawing+xml -# application/vnd.openxmlformats-officedocument.drawingml.chart+xml -# application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml -# application/vnd.openxmlformats-officedocument.extended-properties+xml -# application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml -# application/vnd.openxmlformats-officedocument.presentationml.comments+xml -# application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml -# application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml -# application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml -application/vnd.openxmlformats-officedocument.presentationml.presentation pptx -# application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.presprops+xml -application/vnd.openxmlformats-officedocument.presentationml.slide sldx -# application/vnd.openxmlformats-officedocument.presentationml.slide+xml -# application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml -# application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml -application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx -# application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml -# application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml -# application/vnd.openxmlformats-officedocument.presentationml.tags+xml -application/vnd.openxmlformats-officedocument.presentationml.template potx -# application/vnd.openxmlformats-officedocument.presentationml.template.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx -# application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx -# application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml -# application/vnd.openxmlformats-officedocument.theme+xml -# application/vnd.openxmlformats-officedocument.themeoverride+xml -# application/vnd.openxmlformats-officedocument.vmldrawing -# application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.document docx -# application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx -# application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml -# application/vnd.openxmlformats-package.core-properties+xml -# application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml -# application/vnd.openxmlformats-package.relationships+xml -# application/vnd.quobject-quoxdocument -# application/vnd.osa.netdeploy -application/vnd.osgeo.mapguide.package mgp -# application/vnd.osgi.bundle -application/vnd.osgi.dp dp -application/vnd.osgi.subsystem esa -# application/vnd.otps.ct-kip+xml -application/vnd.palm pdb pqa oprc -# application/vnd.paos.xml -application/vnd.pawaafile paw -application/vnd.pg.format str -application/vnd.pg.osasli ei6 -# application/vnd.piaccess.application-licence -application/vnd.picsel efif -application/vnd.pmi.widget wg -# application/vnd.poc.group-advertisement+xml -application/vnd.pocketlearn plf -application/vnd.powerbuilder6 pbd -# application/vnd.powerbuilder6-s -# application/vnd.powerbuilder7 -# application/vnd.powerbuilder7-s -# application/vnd.powerbuilder75 -# application/vnd.powerbuilder75-s -# application/vnd.preminet -application/vnd.previewsystems.box box -application/vnd.proteus.magazine mgz -application/vnd.publishare-delta-tree qps -application/vnd.pvi.ptid1 ptid -# application/vnd.pwg-multiplexed -# application/vnd.pwg-xhtml-print+xml -# application/vnd.qualcomm.brew-app-res -application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb -# application/vnd.radisys.moml+xml -# application/vnd.radisys.msml+xml -# application/vnd.radisys.msml-audit+xml -# application/vnd.radisys.msml-audit-conf+xml -# application/vnd.radisys.msml-audit-conn+xml -# application/vnd.radisys.msml-audit-dialog+xml -# application/vnd.radisys.msml-audit-stream+xml -# application/vnd.radisys.msml-conf+xml -# application/vnd.radisys.msml-dialog+xml -# application/vnd.radisys.msml-dialog-base+xml -# application/vnd.radisys.msml-dialog-fax-detect+xml -# application/vnd.radisys.msml-dialog-fax-sendrecv+xml -# application/vnd.radisys.msml-dialog-group+xml -# application/vnd.radisys.msml-dialog-speech+xml -# application/vnd.radisys.msml-dialog-transform+xml -# application/vnd.rainstor.data -# application/vnd.rapid -application/vnd.realvnc.bed bed -application/vnd.recordare.musicxml mxl -application/vnd.recordare.musicxml+xml musicxml -# application/vnd.renlearn.rlprint -application/vnd.rig.cryptonote cryptonote -application/vnd.rim.cod cod -application/vnd.rn-realmedia rm -application/vnd.rn-realmedia-vbr rmvb -application/vnd.route66.link66+xml link66 -# application/vnd.rs-274x -# application/vnd.ruckus.download -# application/vnd.s3sms -application/vnd.sailingtracker.track st -# application/vnd.sbm.cid -# application/vnd.sbm.mid2 -# application/vnd.scribus -# application/vnd.sealed.3df -# application/vnd.sealed.csf -# application/vnd.sealed.doc -# application/vnd.sealed.eml -# application/vnd.sealed.mht -# application/vnd.sealed.net -# application/vnd.sealed.ppt -# application/vnd.sealed.tiff -# application/vnd.sealed.xls -# application/vnd.sealedmedia.softseal.html -# application/vnd.sealedmedia.softseal.pdf -application/vnd.seemail see -application/vnd.sema sema -application/vnd.semd semd -application/vnd.semf semf -application/vnd.shana.informed.formdata ifm -application/vnd.shana.informed.formtemplate itp -application/vnd.shana.informed.interchange iif -application/vnd.shana.informed.package ipk -application/vnd.simtech-mindmapper twd twds -application/vnd.smaf mmf -# application/vnd.smart.notebook -application/vnd.smart.teacher teacher -# application/vnd.software602.filler.form+xml -# application/vnd.software602.filler.form-xml-zip -application/vnd.solent.sdkm+xml sdkm sdkd -application/vnd.spotfire.dxp dxp -application/vnd.spotfire.sfs sfs -# application/vnd.sss-cod -# application/vnd.sss-dtf -# application/vnd.sss-ntf -application/vnd.stardivision.calc sdc -application/vnd.stardivision.draw sda -application/vnd.stardivision.impress sdd -application/vnd.stardivision.math smf -application/vnd.stardivision.writer sdw vor -application/vnd.stardivision.writer-global sgl -application/vnd.stepmania.package smzip -application/vnd.stepmania.stepchart sm -# application/vnd.street-stream -application/vnd.sun.xml.calc sxc -application/vnd.sun.xml.calc.template stc -application/vnd.sun.xml.draw sxd -application/vnd.sun.xml.draw.template std -application/vnd.sun.xml.impress sxi -application/vnd.sun.xml.impress.template sti -application/vnd.sun.xml.math sxm -application/vnd.sun.xml.writer sxw -application/vnd.sun.xml.writer.global sxg -application/vnd.sun.xml.writer.template stw -# application/vnd.sun.wadl+xml -application/vnd.sus-calendar sus susp -application/vnd.svd svd -# application/vnd.swiftview-ics -application/vnd.symbian.install sis sisx -application/vnd.syncml+xml xsm -application/vnd.syncml.dm+wbxml bdm -application/vnd.syncml.dm+xml xdm -# application/vnd.syncml.dm.notification -# application/vnd.syncml.ds.notification -application/vnd.tao.intent-module-archive tao -application/vnd.tcpdump.pcap pcap cap dmp -application/vnd.tmobile-livetv tmo -application/vnd.trid.tpt tpt -application/vnd.triscape.mxs mxs -application/vnd.trueapp tra -# application/vnd.truedoc -# application/vnd.ubisoft.webplayer -application/vnd.ufdl ufd ufdl -application/vnd.uiq.theme utz -application/vnd.umajin umj -application/vnd.unity unityweb -application/vnd.uoml+xml uoml -# application/vnd.uplanet.alert -# application/vnd.uplanet.alert-wbxml -# application/vnd.uplanet.bearer-choice -# application/vnd.uplanet.bearer-choice-wbxml -# application/vnd.uplanet.cacheop -# application/vnd.uplanet.cacheop-wbxml -# application/vnd.uplanet.channel -# application/vnd.uplanet.channel-wbxml -# application/vnd.uplanet.list -# application/vnd.uplanet.list-wbxml -# application/vnd.uplanet.listcmd -# application/vnd.uplanet.listcmd-wbxml -# application/vnd.uplanet.signal -application/vnd.vcx vcx -# application/vnd.vd-study -# application/vnd.vectorworks -# application/vnd.verimatrix.vcas -# application/vnd.vidsoft.vidconference -application/vnd.visio vsd vst vss vsw -application/vnd.visionary vis -# application/vnd.vividence.scriptfile -application/vnd.vsf vsf -# application/vnd.wap.sic -# application/vnd.wap.slc -application/vnd.wap.wbxml wbxml -application/vnd.wap.wmlc wmlc -application/vnd.wap.wmlscriptc wmlsc -application/vnd.webturbo wtb -# application/vnd.wfa.wsc -# application/vnd.wmc -# application/vnd.wmf.bootstrap -# application/vnd.wolfram.mathematica -# application/vnd.wolfram.mathematica.package -application/vnd.wolfram.player nbp -application/vnd.wordperfect wpd -application/vnd.wqd wqd -# application/vnd.wrq-hp3000-labelled -application/vnd.wt.stf stf -# application/vnd.wv.csp+wbxml -# application/vnd.wv.csp+xml -# application/vnd.wv.ssp+xml -application/vnd.xara xar -application/vnd.xfdl xfdl -# application/vnd.xfdl.webform -# application/vnd.xmi+xml -# application/vnd.xmpie.cpkg -# application/vnd.xmpie.dpkg -# application/vnd.xmpie.plan -# application/vnd.xmpie.ppkg -# application/vnd.xmpie.xlim -application/vnd.yamaha.hv-dic hvd -application/vnd.yamaha.hv-script hvs -application/vnd.yamaha.hv-voice hvp -application/vnd.yamaha.openscoreformat osf -application/vnd.yamaha.openscoreformat.osfpvg+xml osfpvg -# application/vnd.yamaha.remote-setup -application/vnd.yamaha.smaf-audio saf -application/vnd.yamaha.smaf-phrase spf -# application/vnd.yamaha.through-ngn -# application/vnd.yamaha.tunnel-udpencap -application/vnd.yellowriver-custom-menu cmp -application/vnd.zul zir zirz -application/vnd.zzazz.deck+xml zaz -application/voicexml+xml vxml -# application/vq-rtcpxr -# application/watcherinfo+xml -# application/whoispp-query -# application/whoispp-response -application/widget wgt -application/winhlp hlp -# application/wita -# application/wordperfect5.1 -application/wsdl+xml wsdl -application/wspolicy+xml wspolicy -application/x-7z-compressed 7z -application/x-abiword abw -application/x-ace-compressed ace -# application/x-amf -application/x-apple-diskimage dmg -application/x-authorware-bin aab x32 u32 vox -application/x-authorware-map aam -application/x-authorware-seg aas -application/x-bcpio bcpio -application/x-bittorrent torrent -application/x-blorb blb blorb -application/x-bzip bz -application/x-bzip2 bz2 boz -application/x-cbr cbr cba cbt cbz cb7 -application/x-cdlink vcd -application/x-cfs-compressed cfs -application/x-chat chat -application/x-chess-pgn pgn -application/x-conference nsc -# application/x-compress -application/x-cpio cpio -application/x-csh csh -application/x-debian-package deb udeb -application/x-dgc-compressed dgc -application/x-director dir dcr dxr cst cct cxt w3d fgd swa -application/x-doom wad -application/x-dtbncx+xml ncx -application/x-dtbook+xml dtb -application/x-dtbresource+xml res -application/x-dvi dvi -application/x-envoy evy -application/x-eva eva -application/x-font-bdf bdf -# application/x-font-dos -# application/x-font-framemaker -application/x-font-ghostscript gsf -# application/x-font-libgrx -application/x-font-linux-psf psf -application/x-font-otf otf -application/x-font-pcf pcf -application/x-font-snf snf -# application/x-font-speedo -# application/x-font-sunos-news -application/x-font-ttf ttf ttc -application/x-font-type1 pfa pfb pfm afm -application/font-woff woff -# application/x-font-vfont -application/x-freearc arc -application/x-futuresplash spl -application/x-gca-compressed gca -application/x-glulx ulx -application/x-gnumeric gnumeric -application/x-gramps-xml gramps -application/x-gtar gtar -# application/x-gzip -application/x-hdf hdf -application/x-install-instructions install -application/x-iso9660-image iso -application/x-java-jnlp-file jnlp -application/x-latex latex -application/x-lzh-compressed lzh lha -application/x-mie mie -application/x-mobipocket-ebook prc mobi -application/x-ms-application application -application/x-ms-shortcut lnk -application/x-ms-wmd wmd -application/x-ms-wmz wmz -application/x-ms-xbap xbap -application/x-msaccess mdb -application/x-msbinder obd -application/x-mscardfile crd -application/x-msclip clp -application/x-msdownload exe dll com bat msi -application/x-msmediaview mvb m13 m14 -application/x-msmetafile wmf wmz emf emz -application/x-msmoney mny -application/x-mspublisher pub -application/x-msschedule scd -application/x-msterminal trm -application/x-mswrite wri -application/x-netcdf nc cdf -application/x-nzb nzb -application/x-pkcs12 p12 pfx -application/x-pkcs7-certificates p7b spc -application/x-pkcs7-certreqresp p7r -application/x-rar-compressed rar -application/x-research-info-systems ris -application/x-sh sh -application/x-shar shar -application/x-shockwave-flash swf -application/x-silverlight-app xap -application/x-sql sql -application/x-stuffit sit -application/x-stuffitx sitx -application/x-subrip srt -application/x-sv4cpio sv4cpio -application/x-sv4crc sv4crc -application/x-t3vm-image t3 -application/x-tads gam -application/x-tar tar -application/x-tcl tcl -application/x-tex tex -application/x-tex-tfm tfm -application/x-texinfo texinfo texi -application/x-tgif obj -application/x-ustar ustar -application/x-wais-source src -application/x-x509-ca-cert der crt -application/x-xfig fig -application/x-xliff+xml xlf -application/x-xpinstall xpi -application/x-xz xz -application/x-zmachine z1 z2 z3 z4 z5 z6 z7 z8 -# application/x400-bp -application/xaml+xml xaml -# application/xcap-att+xml -# application/xcap-caps+xml -application/xcap-diff+xml xdf -# application/xcap-el+xml -# application/xcap-error+xml -# application/xcap-ns+xml -# application/xcon-conference-info-diff+xml -# application/xcon-conference-info+xml -application/xenc+xml xenc -application/xhtml+xml xhtml xht -# application/xhtml-voice+xml -application/xml xml xsl -application/xml-dtd dtd -# application/xml-external-parsed-entity -# application/xmpp+xml -application/xop+xml xop -application/xproc+xml xpl -application/xslt+xml xslt -application/xspf+xml xspf -application/xv+xml mxml xhvml xvml xvm -application/yang yang -application/yin+xml yin -application/zip zip -# audio/1d-interleaved-parityfec -# audio/32kadpcm -# audio/3gpp -# audio/3gpp2 -# audio/ac3 -audio/adpcm adp -# audio/amr -# audio/amr-wb -# audio/amr-wb+ -# audio/asc -# audio/atrac-advanced-lossless -# audio/atrac-x -# audio/atrac3 -audio/basic au snd -# audio/bv16 -# audio/bv32 -# audio/clearmode -# audio/cn -# audio/dat12 -# audio/dls -# audio/dsr-es201108 -# audio/dsr-es202050 -# audio/dsr-es202211 -# audio/dsr-es202212 -# audio/dv -# audio/dvi4 -# audio/eac3 -# audio/evrc -# audio/evrc-qcp -# audio/evrc0 -# audio/evrc1 -# audio/evrcb -# audio/evrcb0 -# audio/evrcb1 -# audio/evrcwb -# audio/evrcwb0 -# audio/evrcwb1 -# audio/example -# audio/fwdred -# audio/g719 -# audio/g722 -# audio/g7221 -# audio/g723 -# audio/g726-16 -# audio/g726-24 -# audio/g726-32 -# audio/g726-40 -# audio/g728 -# audio/g729 -# audio/g7291 -# audio/g729d -# audio/g729e -# audio/gsm -# audio/gsm-efr -# audio/gsm-hr-08 -# audio/ilbc -# audio/ip-mr_v2.5 -# audio/isac -# audio/l16 -# audio/l20 -# audio/l24 -# audio/l8 -# audio/lpc -audio/midi mid midi kar rmi -# audio/mobile-xmf -audio/mp4 mp4a -# audio/mp4a-latm -# audio/mpa -# audio/mpa-robust -audio/mpeg mpga mp2 mp2a mp3 m2a m3a -# audio/mpeg4-generic -# audio/musepack -audio/ogg oga ogg spx -# audio/opus -# audio/parityfec -# audio/pcma -# audio/pcma-wb -# audio/pcmu-wb -# audio/pcmu -# audio/prs.sid -# audio/qcelp -# audio/red -# audio/rtp-enc-aescm128 -# audio/rtp-midi -# audio/rtx -audio/s3m s3m -audio/silk sil -# audio/smv -# audio/smv0 -# audio/smv-qcp -# audio/sp-midi -# audio/speex -# audio/t140c -# audio/t38 -# audio/telephone-event -# audio/tone -# audio/uemclip -# audio/ulpfec -# audio/vdvi -# audio/vmr-wb -# audio/vnd.3gpp.iufp -# audio/vnd.4sb -# audio/vnd.audiokoz -# audio/vnd.celp -# audio/vnd.cisco.nse -# audio/vnd.cmles.radio-events -# audio/vnd.cns.anp1 -# audio/vnd.cns.inf1 -audio/vnd.dece.audio uva uvva -audio/vnd.digital-winds eol -# audio/vnd.dlna.adts -# audio/vnd.dolby.heaac.1 -# audio/vnd.dolby.heaac.2 -# audio/vnd.dolby.mlp -# audio/vnd.dolby.mps -# audio/vnd.dolby.pl2 -# audio/vnd.dolby.pl2x -# audio/vnd.dolby.pl2z -# audio/vnd.dolby.pulse.1 -audio/vnd.dra dra -audio/vnd.dts dts -audio/vnd.dts.hd dtshd -# audio/vnd.dvb.file -# audio/vnd.everad.plj -# audio/vnd.hns.audio -audio/vnd.lucent.voice lvp -audio/vnd.ms-playready.media.pya pya -# audio/vnd.nokia.mobile-xmf -# audio/vnd.nortel.vbk -audio/vnd.nuera.ecelp4800 ecelp4800 -audio/vnd.nuera.ecelp7470 ecelp7470 -audio/vnd.nuera.ecelp9600 ecelp9600 -# audio/vnd.octel.sbc -# audio/vnd.qcelp -# audio/vnd.rhetorex.32kadpcm -audio/vnd.rip rip -# audio/vnd.sealedmedia.softseal.mpeg -# audio/vnd.vmx.cvsd -# audio/vorbis -# audio/vorbis-config -audio/webm weba -audio/x-aac aac -audio/x-aiff aif aiff aifc -audio/x-caf caf -audio/x-flac flac -audio/x-matroska mka -audio/x-mpegurl m3u -audio/x-ms-wax wax -audio/x-ms-wma wma -audio/x-pn-realaudio ram ra -audio/x-pn-realaudio-plugin rmp -# audio/x-tta -audio/x-wav wav -audio/xm xm -chemical/x-cdx cdx -chemical/x-cif cif -chemical/x-cmdf cmdf -chemical/x-cml cml -chemical/x-csml csml -# chemical/x-pdb -chemical/x-xyz xyz -image/bmp bmp -image/cgm cgm -# image/example -# image/fits -image/g3fax g3 -image/gif gif -image/ief ief -# image/jp2 -image/jpeg jpeg jpg jpe -# image/jpm -# image/jpx -image/ktx ktx -# image/naplps -image/png png -image/prs.btif btif -# image/prs.pti -image/sgi sgi -image/svg+xml svg svgz -# image/t38 -image/tiff tiff tif -# image/tiff-fx -image/vnd.adobe.photoshop psd -# image/vnd.cns.inf2 -image/vnd.dece.graphic uvi uvvi uvg uvvg -image/vnd.dvb.subtitle sub -image/vnd.djvu djvu djv -image/vnd.dwg dwg -image/vnd.dxf dxf -image/vnd.fastbidsheet fbs -image/vnd.fpx fpx -image/vnd.fst fst -image/vnd.fujixerox.edmics-mmr mmr -image/vnd.fujixerox.edmics-rlc rlc -# image/vnd.globalgraphics.pgb -# image/vnd.microsoft.icon -# image/vnd.mix -image/vnd.ms-modi mdi -image/vnd.ms-photo wdp -image/vnd.net-fpx npx -# image/vnd.radiance -# image/vnd.sealed.png -# image/vnd.sealedmedia.softseal.gif -# image/vnd.sealedmedia.softseal.jpg -# image/vnd.svf -image/vnd.wap.wbmp wbmp -image/vnd.xiff xif -image/webp webp -image/x-3ds 3ds -image/x-cmu-raster ras -image/x-cmx cmx -image/x-freehand fh fhc fh4 fh5 fh7 -image/x-icon ico -image/x-mrsid-image sid -image/x-pcx pcx -image/x-pict pic pct -image/x-portable-anymap pnm -image/x-portable-bitmap pbm -image/x-portable-graymap pgm -image/x-portable-pixmap ppm -image/x-rgb rgb -image/x-tga tga -image/x-xbitmap xbm -image/x-xpixmap xpm -image/x-xwindowdump xwd -# message/cpim -# message/delivery-status -# message/disposition-notification -# message/example -# message/external-body -# message/feedback-report -# message/global -# message/global-delivery-status -# message/global-disposition-notification -# message/global-headers -# message/http -# message/imdn+xml -# message/news -# message/partial -message/rfc822 eml mime -# message/s-http -# message/sip -# message/sipfrag -# message/tracking-status -# message/vnd.si.simp -# model/example -model/iges igs iges -model/mesh msh mesh silo -model/vnd.collada+xml dae -model/vnd.dwf dwf -# model/vnd.flatland.3dml -model/vnd.gdl gdl -# model/vnd.gs-gdl -# model/vnd.gs.gdl -model/vnd.gtw gtw -# model/vnd.moml+xml -model/vnd.mts mts -# model/vnd.parasolid.transmit.binary -# model/vnd.parasolid.transmit.text -model/vnd.vtu vtu -model/vrml wrl vrml -model/x3d+binary x3db x3dbz -model/x3d+vrml x3dv x3dvz -model/x3d+xml x3d x3dz -# multipart/alternative -# multipart/appledouble -# multipart/byteranges -# multipart/digest -# multipart/encrypted -# multipart/example -# multipart/form-data -# multipart/header-set -# multipart/mixed -# multipart/parallel -# multipart/related -# multipart/report -# multipart/signed -# multipart/voice-message -# text/1d-interleaved-parityfec -text/cache-manifest appcache -text/calendar ics ifb -text/css css -text/csv csv -# text/directory -# text/dns -# text/ecmascript -# text/enriched -# text/example -# text/fwdred -text/html html htm -# text/javascript -text/n3 n3 -# text/parityfec -text/plain txt text conf def list log in -# text/prs.fallenstein.rst -text/prs.lines.tag dsc -# text/vnd.radisys.msml-basic-layout -# text/red -# text/rfc822-headers -text/richtext rtx -# text/rtf -# text/rtp-enc-aescm128 -# text/rtx -text/sgml sgml sgm -# text/t140 -text/tab-separated-values tsv -text/troff t tr roff man me ms -text/turtle ttl -# text/ulpfec -text/uri-list uri uris urls -text/vcard vcard -# text/vnd.abc -text/vnd.curl curl -text/vnd.curl.dcurl dcurl -text/vnd.curl.scurl scurl -text/vnd.curl.mcurl mcurl -# text/vnd.dmclientscript -text/vnd.dvb.subtitle sub -# text/vnd.esmertec.theme-descriptor -text/vnd.fly fly -text/vnd.fmi.flexstor flx -text/vnd.graphviz gv -text/vnd.in3d.3dml 3dml -text/vnd.in3d.spot spot -# text/vnd.iptc.newsml -# text/vnd.iptc.nitf -# text/vnd.latex-z -# text/vnd.motorola.reflex -# text/vnd.ms-mediapackage -# text/vnd.net2phone.commcenter.command -# text/vnd.si.uricatalogue -text/vnd.sun.j2me.app-descriptor jad -# text/vnd.trolltech.linguist -# text/vnd.wap.si -# text/vnd.wap.sl -text/vnd.wap.wml wml -text/vnd.wap.wmlscript wmls -text/x-asm s asm -text/x-c c cc cxx cpp h hh dic -text/x-fortran f for f77 f90 -text/x-java-source java -text/x-opml opml -text/x-pascal p pas -text/x-nfo nfo -text/x-setext etx -text/x-sfv sfv -text/x-uuencode uu -text/x-vcalendar vcs -text/x-vcard vcf -# text/xml -# text/xml-external-parsed-entity -# video/1d-interleaved-parityfec -video/3gpp 3gp -# video/3gpp-tt -video/3gpp2 3g2 -# video/bmpeg -# video/bt656 -# video/celb -# video/dv -# video/example -video/h261 h261 -video/h263 h263 -# video/h263-1998 -# video/h263-2000 -video/h264 h264 -# video/h264-rcdo -# video/h264-svc -video/jpeg jpgv -# video/jpeg2000 -video/jpm jpm jpgm -video/mj2 mj2 mjp2 -# video/mp1s -# video/mp2p -# video/mp2t -video/mp4 mp4 mp4v mpg4 -# video/mp4v-es -video/mpeg mpeg mpg mpe m1v m2v -# video/mpeg4-generic -# video/mpv -# video/nv -video/ogg ogv -# video/parityfec -# video/pointer -video/quicktime qt mov -# video/raw -# video/rtp-enc-aescm128 -# video/rtx -# video/smpte292m -# video/ulpfec -# video/vc1 -# video/vnd.cctv -video/vnd.dece.hd uvh uvvh -video/vnd.dece.mobile uvm uvvm -# video/vnd.dece.mp4 -video/vnd.dece.pd uvp uvvp -video/vnd.dece.sd uvs uvvs -video/vnd.dece.video uvv uvvv -# video/vnd.directv.mpeg -# video/vnd.directv.mpeg-tts -# video/vnd.dlna.mpeg-tts -video/vnd.dvb.file dvb -video/vnd.fvt fvt -# video/vnd.hns.video -# video/vnd.iptvforum.1dparityfec-1010 -# video/vnd.iptvforum.1dparityfec-2005 -# video/vnd.iptvforum.2dparityfec-1010 -# video/vnd.iptvforum.2dparityfec-2005 -# video/vnd.iptvforum.ttsavc -# video/vnd.iptvforum.ttsmpeg2 -# video/vnd.motorola.video -# video/vnd.motorola.videop -video/vnd.mpegurl mxu m4u -video/vnd.ms-playready.media.pyv pyv -# video/vnd.nokia.interleaved-multimedia -# video/vnd.nokia.videovoip -# video/vnd.objectvideo -# video/vnd.sealed.mpeg1 -# video/vnd.sealed.mpeg4 -# video/vnd.sealed.swf -# video/vnd.sealedmedia.softseal.mov -video/vnd.uvvu.mp4 uvu uvvu -video/vnd.vivo viv -video/webm webm -video/x-f4v f4v -video/x-fli fli -video/x-flv flv -video/x-m4v m4v -video/x-matroska mkv mk3d mks -video/x-mng mng -video/x-ms-asf asf asx -video/x-ms-vob vob -video/x-ms-wm wm -video/x-ms-wmv wmv -video/x-ms-wmx wmx -video/x-ms-wvx wvx -video/x-msvideo avi -video/x-sgi-movie movie -video/x-smv smv -x-conference/x-cooltalk ice diff --git a/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/types/node.types b/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/types/node.types deleted file mode 100644 index 55b2cf7..0000000 --- a/s4t-server-node/node_modules/express/node_modules/send/node_modules/mime/types/node.types +++ /dev/null @@ -1,77 +0,0 @@ -# What: WebVTT -# Why: To allow formats intended for marking up external text track resources. -# http://dev.w3.org/html5/webvtt/ -# Added by: niftylettuce -text/vtt vtt - -# What: Google Chrome Extension -# Why: To allow apps to (work) be served with the right content type header. -# http://codereview.chromium.org/2830017 -# Added by: niftylettuce -application/x-chrome-extension crx - -# What: HTC support -# Why: To properly render .htc files such as CSS3PIE -# Added by: niftylettuce -text/x-component htc - -# What: HTML5 application cache manifes ('.manifest' extension) -# Why: De-facto standard. Required by Mozilla browser when serving HTML5 apps -# per https://developer.mozilla.org/en/offline_resources_in_firefox -# Added by: louisremi -text/cache-manifest manifest - -# What: node binary buffer format -# Why: semi-standard extension w/in the node community -# Added by: tootallnate -application/octet-stream buffer - -# What: The "protected" MP-4 formats used by iTunes. -# Why: Required for streaming music to browsers (?) -# Added by: broofa -application/mp4 m4p -audio/mp4 m4a - -# What: Video format, Part of RFC1890 -# Why: See https://github.com/bentomas/node-mime/pull/6 -# Added by: mjrusso -video/MP2T ts - -# What: EventSource mime type -# Why: mime type of Server-Sent Events stream -# http://www.w3.org/TR/eventsource/#text-event-stream -# Added by: francois2metz -text/event-stream event-stream - -# What: Mozilla App manifest mime type -# Why: https://developer.mozilla.org/en/Apps/Manifest#Serving_manifests -# Added by: ednapiranha -application/x-web-app-manifest+json webapp - -# What: Lua file types -# Why: Googling around shows de-facto consensus on these -# Added by: creationix (Issue #45) -text/x-lua lua -application/x-lua-bytecode luac - -# What: Markdown files, as per http://daringfireball.net/projects/markdown/syntax -# Why: http://stackoverflow.com/questions/10701983/what-is-the-mime-type-for-markdown -# Added by: avoidwork -text/x-markdown markdown md mkd - -# What: ini files -# Why: because they're just text files -# Added by: Matthew Kastor -text/plain ini - -# What: DASH Adaptive Streaming manifest -# Why: https://developer.mozilla.org/en-US/docs/DASH_Adaptive_Streaming_for_HTML_5_Video -# Added by: eelcocramer -application/dash+xml mdp - -# What: OpenType font files - http://www.microsoft.com/typography/otspec/ -# Why: Browsers usually ignore the font MIME types and sniff the content, -# but Chrome, shows a warning if OpenType fonts aren't served with -# the `font/opentype` MIME type: http://i.imgur.com/8c5RN8M.png. -# Added by: alrra -font/opentype otf diff --git a/s4t-server-node/node_modules/express/node_modules/send/node_modules/ms/.npmignore b/s4t-server-node/node_modules/express/node_modules/send/node_modules/ms/.npmignore deleted file mode 100644 index d1aa0ce..0000000 --- a/s4t-server-node/node_modules/express/node_modules/send/node_modules/ms/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules -test -History.md -Makefile -component.json diff --git a/s4t-server-node/node_modules/express/node_modules/send/node_modules/ms/LICENSE b/s4t-server-node/node_modules/express/node_modules/send/node_modules/ms/LICENSE deleted file mode 100644 index 6c07561..0000000 --- a/s4t-server-node/node_modules/express/node_modules/send/node_modules/ms/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Guillermo Rauch - -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/s4t-server-node/node_modules/express/node_modules/send/node_modules/ms/README.md b/s4t-server-node/node_modules/express/node_modules/send/node_modules/ms/README.md deleted file mode 100644 index 0fd54fd..0000000 --- a/s4t-server-node/node_modules/express/node_modules/send/node_modules/ms/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# ms.js: miliseconds conversion utility - -```js -ms('2 days') // 172800000 -ms('1d') // 86400000 -ms('10h') // 36000000 -ms('2.5 hrs') // 9000000 -ms('2h') // 7200000 -ms('1m') // 60000 -ms('5s') // 5000 -ms('100') // 100 -``` - -```js -ms(60000) // "1m" -ms(2 * 60000) // "2m" -ms(ms('10 hours')) // "10h" -``` - -```js -ms(60000, { long: true }) // "1 minute" -ms(2 * 60000, { long: true }) // "2 minutes" -ms(ms('10 hours'), { long: true }) // "10 hours" -``` - -- Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](nodejs.org/download). -- If a number is supplied to `ms`, a string with a unit is returned. -- If a string that contains the number is supplied, it returns it as -a number (e.g: it returns `100` for `'100'`). -- If you pass a string with a number and a valid unit, the number of -equivalent ms is returned. - -## License - -MIT diff --git a/s4t-server-node/node_modules/express/node_modules/send/node_modules/ms/index.js b/s4t-server-node/node_modules/express/node_modules/send/node_modules/ms/index.js deleted file mode 100644 index e79bfa1..0000000 --- a/s4t-server-node/node_modules/express/node_modules/send/node_modules/ms/index.js +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} options - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options){ - options = options || {}; - if ('string' == typeof val) return parse(val); - return options.long - ? long(val) - : short(val); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str); - if (!match) return; - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function short(ms) { - if (ms >= d) return Math.round(ms / d) + 'd'; - if (ms >= h) return Math.round(ms / h) + 'h'; - if (ms >= m) return Math.round(ms / m) + 'm'; - if (ms >= s) return Math.round(ms / s) + 's'; - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function long(ms) { - return plural(ms, d, 'day') - || plural(ms, h, 'hour') - || plural(ms, m, 'minute') - || plural(ms, s, 'second') - || ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, n, name) { - if (ms < n) return; - if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name; - return Math.ceil(ms / n) + ' ' + name + 's'; -} diff --git a/s4t-server-node/node_modules/express/node_modules/send/node_modules/ms/package.json b/s4t-server-node/node_modules/express/node_modules/send/node_modules/ms/package.json deleted file mode 100644 index ec3ea9b..0000000 --- a/s4t-server-node/node_modules/express/node_modules/send/node_modules/ms/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "ms", - "version": "0.7.0", - "description": "Tiny ms conversion utility", - "repository": { - "type": "git", - "url": "git://github.com/guille/ms.js.git" - }, - "main": "./index", - "devDependencies": { - "mocha": "*", - "expect.js": "*", - "serve": "*" - }, - "component": { - "scripts": { - "ms/index.js": "index.js" - } - }, - "gitHead": "1e9cd9b05ef0dc26f765434d2bfee42394376e52", - "bugs": { - "url": "https://github.com/guille/ms.js/issues" - }, - "homepage": "https://github.com/guille/ms.js", - "_id": "ms@0.7.0", - "scripts": {}, - "_shasum": "865be94c2e7397ad8a57da6a633a6e2f30798b83", - "_from": "ms@0.7.0", - "_npmVersion": "1.4.21", - "_npmUser": { - "name": "rauchg", - "email": "rauchg@gmail.com" - }, - "maintainers": [ - { - "name": "rauchg", - "email": "rauchg@gmail.com" - } - ], - "dist": { - "shasum": "865be94c2e7397ad8a57da6a633a6e2f30798b83", - "tarball": "http://registry.npmjs.org/ms/-/ms-0.7.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/ms/-/ms-0.7.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/send/package.json b/s4t-server-node/node_modules/express/node_modules/send/package.json deleted file mode 100644 index 31f188c..0000000 --- a/s4t-server-node/node_modules/express/node_modules/send/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "name": "send", - "description": "Better streaming static file server with Range and conditional-GET support", - "version": "0.11.1", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - } - ], - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/tj/send" - }, - "keywords": [ - "static", - "file", - "server" - ], - "dependencies": { - "debug": "~2.1.1", - "depd": "~1.0.0", - "destroy": "1.0.3", - "escape-html": "1.0.1", - "etag": "~1.5.1", - "fresh": "0.2.4", - "mime": "1.2.11", - "ms": "0.7.0", - "on-finished": "~2.2.0", - "range-parser": "~1.0.2" - }, - "devDependencies": { - "after": "0.8.1", - "istanbul": "0.3.5", - "mocha": "~2.1.0", - "supertest": "~0.15.0" - }, - "files": [ - "History.md", - "LICENSE", - "index.js" - ], - "engines": { - "node": ">= 0.8.0" - }, - "scripts": { - "test": "mocha --check-leaks --reporter spec --bail", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec" - }, - "gitHead": "1e18c059e94879ededcea3d58f52eec6791560ee", - "bugs": { - "url": "https://github.com/tj/send/issues" - }, - "homepage": "https://github.com/tj/send", - "_id": "send@0.11.1", - "_shasum": "1beabfd42f9e2709f99028af3078ac12b47092d5", - "_from": "send@0.11.1", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - } - ], - "dist": { - "shasum": "1beabfd42f9e2709f99028af3078ac12b47092d5", - "tarball": "http://registry.npmjs.org/send/-/send-0.11.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/send/-/send-0.11.1.tgz" -} diff --git a/s4t-server-node/node_modules/express/node_modules/serve-static/HISTORY.md b/s4t-server-node/node_modules/express/node_modules/serve-static/HISTORY.md deleted file mode 100644 index d3165dc..0000000 --- a/s4t-server-node/node_modules/express/node_modules/serve-static/HISTORY.md +++ /dev/null @@ -1,222 +0,0 @@ -1.8.1 / 2015-01-20 -================== - - * Fix redirect loop in Node.js 0.11.14 - * deps: send@0.11.1 - - Fix root path disclosure - -1.8.0 / 2015-01-05 -================== - - * deps: send@0.11.0 - - deps: debug@~2.1.1 - - deps: etag@~1.5.1 - - deps: ms@0.7.0 - - deps: on-finished@~2.2.0 - -1.7.2 / 2015-01-02 -================== - - * Fix potential open redirect when mounted at root - -1.7.1 / 2014-10-22 -================== - - * deps: send@0.10.1 - - deps: on-finished@~2.1.1 - -1.7.0 / 2014-10-15 -================== - - * deps: send@0.10.0 - - deps: debug@~2.1.0 - - deps: depd@~1.0.0 - - deps: etag@~1.5.0 - -1.6.4 / 2014-10-08 -================== - - * Fix redirect loop when index file serving disabled - -1.6.3 / 2014-09-24 -================== - - * deps: send@0.9.3 - - deps: etag@~1.4.0 - -1.6.2 / 2014-09-15 -================== - - * deps: send@0.9.2 - - deps: depd@0.4.5 - - deps: etag@~1.3.1 - - deps: range-parser@~1.0.2 - -1.6.1 / 2014-09-07 -================== - - * deps: send@0.9.1 - - deps: fresh@0.2.4 - -1.6.0 / 2014-09-07 -================== - - * deps: send@0.9.0 - - Add `lastModified` option - - Use `etag` to generate `ETag` header - - deps: debug@~2.0.0 - -1.5.4 / 2014-09-04 -================== - - * deps: send@0.8.5 - - Fix a path traversal issue when using `root` - - Fix malicious path detection for empty string path - -1.5.3 / 2014-08-17 -================== - - * deps: send@0.8.3 - -1.5.2 / 2014-08-14 -================== - - * deps: send@0.8.2 - - Work around `fd` leak in Node.js 0.10 for `fs.ReadStream` - -1.5.1 / 2014-08-09 -================== - - * Fix parsing of weird `req.originalUrl` values - * deps: parseurl@~1.3.0 - * deps: utils-merge@1.0.0 - -1.5.0 / 2014-08-05 -================== - - * deps: send@0.8.1 - - Add `extensions` option - -1.4.4 / 2014-08-04 -================== - - * deps: send@0.7.4 - - Fix serving index files without root dir - -1.4.3 / 2014-07-29 -================== - - * deps: send@0.7.3 - - Fix incorrect 403 on Windows and Node.js 0.11 - -1.4.2 / 2014-07-27 -================== - - * deps: send@0.7.2 - - deps: depd@0.4.4 - -1.4.1 / 2014-07-26 -================== - - * deps: send@0.7.1 - - deps: depd@0.4.3 - -1.4.0 / 2014-07-21 -================== - - * deps: parseurl@~1.2.0 - - Cache URLs based on original value - - Remove no-longer-needed URL mis-parse work-around - - Simplify the "fast-path" `RegExp` - * deps: send@0.7.0 - - Add `dotfiles` option - - deps: debug@1.0.4 - - deps: depd@0.4.2 - -1.3.2 / 2014-07-11 -================== - - * deps: send@0.6.0 - - Cap `maxAge` value to 1 year - - deps: debug@1.0.3 - -1.3.1 / 2014-07-09 -================== - - * deps: parseurl@~1.1.3 - - faster parsing of href-only URLs - -1.3.0 / 2014-06-28 -================== - - * Add `setHeaders` option - * Include HTML link in redirect response - * deps: send@0.5.0 - - Accept string for `maxAge` (converted by `ms`) - -1.2.3 / 2014-06-11 -================== - - * deps: send@0.4.3 - - Do not throw un-catchable error on file open race condition - - Use `escape-html` for HTML escaping - - deps: debug@1.0.2 - - deps: finished@1.2.2 - - deps: fresh@0.2.2 - -1.2.2 / 2014-06-09 -================== - - * deps: send@0.4.2 - - fix "event emitter leak" warnings - - deps: debug@1.0.1 - - deps: finished@1.2.1 - -1.2.1 / 2014-06-02 -================== - - * use `escape-html` for escaping - * deps: send@0.4.1 - - Send `max-age` in `Cache-Control` in correct format - -1.2.0 / 2014-05-29 -================== - - * deps: send@0.4.0 - - Calculate ETag with md5 for reduced collisions - - Fix wrong behavior when index file matches directory - - Ignore stream errors after request ends - - Skip directories in index file search - - deps: debug@0.8.1 - -1.1.0 / 2014-04-24 -================== - - * Accept options directly to `send` module - * deps: send@0.3.0 - -1.0.4 / 2014-04-07 -================== - - * Resolve relative paths at middleware setup - * Use parseurl to parse the URL from request - -1.0.3 / 2014-03-20 -================== - - * Do not rely on connect-like environments - -1.0.2 / 2014-03-06 -================== - - * deps: send@0.2.0 - -1.0.1 / 2014-03-05 -================== - - * Add mime export for back-compat - -1.0.0 / 2014-03-05 -================== - - * Genesis from `connect` diff --git a/s4t-server-node/node_modules/express/node_modules/serve-static/LICENSE b/s4t-server-node/node_modules/express/node_modules/serve-static/LICENSE deleted file mode 100644 index b7bc085..0000000 --- a/s4t-server-node/node_modules/express/node_modules/serve-static/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -(The MIT License) - -Copyright (c) 2010 Sencha Inc. -Copyright (c) 2011 LearnBoost -Copyright (c) 2011 TJ Holowaychuk -Copyright (c) 2014 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/s4t-server-node/node_modules/express/node_modules/serve-static/README.md b/s4t-server-node/node_modules/express/node_modules/serve-static/README.md deleted file mode 100644 index 8287eb6..0000000 --- a/s4t-server-node/node_modules/express/node_modules/serve-static/README.md +++ /dev/null @@ -1,168 +0,0 @@ -# serve-static - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Linux Build][travis-image]][travis-url] -[![Windows Build][appveyor-image]][appveyor-url] -[![Test Coverage][coveralls-image]][coveralls-url] -[![Gratipay][gratipay-image]][gratipay-url] - -## Install - -```sh -$ npm install serve-static -``` - -## API - -```js -var serveStatic = require('serve-static') -``` - -### serveStatic(root, options) - -Create a new middleware function to serve files from within a given root -directory. The file to serve will be determined by combining `req.url` -with the provided root directory. When a file is not found, instead of -sending a 404 response, this module will instead call `next()` to move on -to the next middleware, allowing for stacking and fall-backs. - -#### Options - -##### dotfiles - - Set how "dotfiles" are treated when encountered. A dotfile is a file -or directory that begins with a dot ("."). Note this check is done on -the path itself without checking if the path actually exists on the -disk. If `root` is specified, only the dotfiles above the root are -checked (i.e. the root itself can be within a dotfile when set -to "deny"). - -The default value is `'ignore'`. - - - `'allow'` No special treatment for dotfiles. - - `'deny'` Send a 403 for any request for a dotfile. - - `'ignore'` Pretend like the dotfile does not exist and call `next()`. - -##### etag - -Enable or disable etag generation, defaults to true. - -##### extensions - -Set file extension fallbacks. When set, if a file is not found, the given -extensions will be added to the file name and search for. The first that -exists will be served. Example: `['html', 'htm']`. - -The default value is `false`. - -##### index - -By default this module will send "index.html" files in response to a request -on a directory. To disable this set `false` or to supply a new index pass a -string or an array in preferred order. - -##### lastModified - -Enable or disable `Last-Modified` header, defaults to true. Uses the file -system's last modified value. - -##### maxAge - -Provide a max-age in milliseconds for http caching, defaults to 0. This -can also be a string accepted by the [ms](https://www.npmjs.org/package/ms#readme) -module. - -##### redirect - -Redirect to trailing "/" when the pathname is a dir. Defaults to `true`. - -##### setHeaders - -Function to set custom headers on response. Alterations to the headers need to -occur synchronously. The function is called as `fn(res, path, stat)`, where -the arguments are: - - - `res` the response object - - `path` the file path that is being sent - - `stat` the stat object of the file that is being sent - -## Examples - -### Serve files with vanilla node.js http server - -```js -var finalhandler = require('finalhandler') -var http = require('http') -var serveStatic = require('serve-static') - -// Serve up public/ftp folder -var serve = serveStatic('public/ftp', {'index': ['index.html', 'index.htm']}) - -// Create server -var server = http.createServer(function(req, res){ - var done = finalhandler(req, res) - serve(req, res, done) -}) - -// Listen -server.listen(3000) -``` - -### Serve all files as downloads - -```js -var contentDisposition = require('content-disposition') -var finalhandler = require('finalhandler') -var http = require('http') -var serveStatic = require('serve-static') - -// Serve up public/ftp folder -var serve = serveStatic('public/ftp', { - 'index': false, - 'setHeaders': setHeaders -}) - -// Set header to force download -function setHeaders(res, path) { - res.setHeader('Content-Disposition', contentDisposition(path)) -} - -// Create server -var server = http.createServer(function(req, res){ - var done = finalhandler(req, res) - serve(req, res, done) -}) - -// Listen -server.listen(3000) -``` - -### Serving using express - -```js -var connect = require('connect') -var serveStatic = require('serve-static') - -var app = connect() - -app.use(serveStatic('public/ftp', {'index': ['default.html', 'default.htm']})) -app.listen(3000) -``` - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/serve-static.svg?style=flat -[npm-url]: https://npmjs.org/package/serve-static -[travis-image]: https://img.shields.io/travis/expressjs/serve-static/master.svg?label=linux&style=flat -[travis-url]: https://travis-ci.org/expressjs/serve-static -[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/serve-static/master.svg?label=windows&style=flat -[appveyor-url]: https://ci.appveyor.com/project/dougwilson/serve-static -[coveralls-image]: https://img.shields.io/coveralls/expressjs/serve-static/master.svg?style=flat -[coveralls-url]: https://coveralls.io/r/expressjs/serve-static -[downloads-image]: https://img.shields.io/npm/dm/serve-static.svg?style=flat -[downloads-url]: https://npmjs.org/package/serve-static -[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg?style=flat -[gratipay-url]: https://gratipay.com/dougwilson/ diff --git a/s4t-server-node/node_modules/express/node_modules/serve-static/index.js b/s4t-server-node/node_modules/express/node_modules/serve-static/index.js deleted file mode 100644 index 0d1d9fb..0000000 --- a/s4t-server-node/node_modules/express/node_modules/serve-static/index.js +++ /dev/null @@ -1,138 +0,0 @@ -/*! - * serve-static - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * Copyright(c) 2014 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var escapeHtml = require('escape-html'); -var merge = require('utils-merge'); -var parseurl = require('parseurl'); -var resolve = require('path').resolve; -var send = require('send'); -var url = require('url'); - -/** - * @param {String} root - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function serveStatic(root, options) { - if (!root) { - throw new TypeError('root path required') - } - - if (typeof root !== 'string') { - throw new TypeError('root path must be a string') - } - - // copy options object - options = merge({}, options) - - // resolve root to absolute - root = resolve(root) - - // default redirect - var redirect = options.redirect !== false - - // headers listener - var setHeaders = options.setHeaders - delete options.setHeaders - - if (setHeaders && typeof setHeaders !== 'function') { - throw new TypeError('option setHeaders must be function') - } - - // setup options for send - options.maxage = options.maxage || options.maxAge || 0 - options.root = root - - return function serveStatic(req, res, next) { - if (req.method !== 'GET' && req.method !== 'HEAD') { - return next() - } - - var opts = merge({}, options) - var originalUrl = parseurl.original(req) - var path = parseurl(req).pathname - var hasTrailingSlash = originalUrl.pathname[originalUrl.pathname.length - 1] === '/' - - if (path === '/' && !hasTrailingSlash) { - // make sure redirect occurs at mount - path = '' - } - - // create send stream - var stream = send(req, path, opts) - - if (redirect) { - // redirect relative to originalUrl - stream.on('directory', function redirect() { - if (hasTrailingSlash) { - return next() - } - - // append trailing slash - originalUrl.path = null - originalUrl.pathname = collapseLeadingSlashes(originalUrl.pathname + '/') - - // reformat the URL - var target = url.format(originalUrl) - - // send redirect response - res.statusCode = 303 - res.setHeader('Content-Type', 'text/html; charset=utf-8') - res.setHeader('Location', target) - res.end('Redirecting to ' + escapeHtml(target) + '\n') - }) - } else { - // forward to next middleware on directory - stream.on('directory', next) - } - - // add headers listener - if (setHeaders) { - stream.on('headers', setHeaders) - } - - // forward non-404 errors - stream.on('error', function error(err) { - next(err.status === 404 ? null : err) - }) - - // pipe - stream.pipe(res) - } -} - -/** - * Expose mime module. - * - * If you wish to extend the mime table use this - * reference to the "mime" module in the npm registry. - */ - -exports.mime = send.mime - -/** - * Collapse all leading slashes into a single slash - * @private - */ -function collapseLeadingSlashes(str) { - for (var i = 0; i < str.length; i++) { - if (str[i] !== '/') { - break - } - } - - return i > 1 - ? '/' + str.substr(i) - : str -} diff --git a/s4t-server-node/node_modules/express/node_modules/serve-static/package.json b/s4t-server-node/node_modules/express/node_modules/serve-static/package.json deleted file mode 100644 index ff89fcd..0000000 --- a/s4t-server-node/node_modules/express/node_modules/serve-static/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "serve-static", - "description": "Serve static files", - "version": "1.8.1", - "author": { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/expressjs/serve-static" - }, - "dependencies": { - "escape-html": "1.0.1", - "parseurl": "~1.3.0", - "send": "0.11.1", - "utils-merge": "1.0.0" - }, - "devDependencies": { - "istanbul": "0.3.5", - "mocha": "~2.1.0", - "supertest": "~0.15.0" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "index.js" - ], - "engines": { - "node": ">= 0.8.0" - }, - "scripts": { - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/" - }, - "gitHead": "5a47eff4e550f30a7a1e5fb87c8656a1b8dbb249", - "bugs": { - "url": "https://github.com/expressjs/serve-static/issues" - }, - "homepage": "https://github.com/expressjs/serve-static", - "_id": "serve-static@1.8.1", - "_shasum": "08fabd39999f050fc311443f46d5888a77ecfc7c", - "_from": "serve-static@>=1.8.1 <1.9.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "shtylman", - "email": "shtylman@gmail.com" - }, - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "mscdex", - "email": "mscdex@mscdex.net" - }, - { - "name": "fishrock123", - "email": "fishrock123@rocketmail.com" - } - ], - "dist": { - "shasum": "08fabd39999f050fc311443f46d5888a77ecfc7c", - "tarball": "http://registry.npmjs.org/serve-static/-/serve-static-1.8.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.8.1.tgz" -} diff --git a/s4t-server-node/node_modules/express/node_modules/type-is/HISTORY.md b/s4t-server-node/node_modules/express/node_modules/type-is/HISTORY.md deleted file mode 100644 index f55b221..0000000 --- a/s4t-server-node/node_modules/express/node_modules/type-is/HISTORY.md +++ /dev/null @@ -1,102 +0,0 @@ -1.5.5 / 2014-12-30 -================== - - * deps: mime-types@~2.0.7 - - Add new mime types - - Fix missing extensions - - Fix various invalid MIME type entries - - Remove example template MIME types - - deps: mime-db@~1.5.0 - -1.5.4 / 2014-12-10 -================== - - * deps: mime-types@~2.0.4 - - Add new mime types - - deps: mime-db@~1.3.0 - -1.5.3 / 2014-11-09 -================== - - * deps: mime-types@~2.0.3 - - Add new mime types - - deps: mime-db@~1.2.0 - -1.5.2 / 2014-09-28 -================== - - * deps: mime-types@~2.0.2 - - Add new mime types - - deps: mime-db@~1.1.0 - -1.5.1 / 2014-09-07 -================== - - * Support Node.js 0.6 - * deps: media-typer@0.3.0 - * deps: mime-types@~2.0.1 - - Support Node.js 0.6 - -1.5.0 / 2014-09-05 -================== - - * fix `hasbody` to be true for `content-length: 0` - -1.4.0 / 2014-09-02 -================== - - * update mime-types - -1.3.2 / 2014-06-24 -================== - - * use `~` range on mime-types - -1.3.1 / 2014-06-19 -================== - - * fix global variable leak - -1.3.0 / 2014-06-19 -================== - - * improve type parsing - - - invalid media type never matches - - media type not case-sensitive - - extra LWS does not affect results - -1.2.2 / 2014-06-19 -================== - - * fix behavior on unknown type argument - -1.2.1 / 2014-06-03 -================== - - * switch dependency from `mime` to `mime-types@1.0.0` - -1.2.0 / 2014-05-11 -================== - - * support suffix matching: - - - `+json` matches `application/vnd+json` - - `*/vnd+json` matches `application/vnd+json` - - `application/*+json` matches `application/vnd+json` - -1.1.0 / 2014-04-12 -================== - - * add non-array values support - * expose internal utilities: - - - `.is()` - - `.hasBody()` - - `.normalize()` - - `.match()` - -1.0.1 / 2014-03-30 -================== - - * add `multipart` as a shorthand diff --git a/s4t-server-node/node_modules/express/node_modules/type-is/LICENSE b/s4t-server-node/node_modules/express/node_modules/type-is/LICENSE deleted file mode 100644 index 4164d08..0000000 --- a/s4t-server-node/node_modules/express/node_modules/type-is/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong me@jongleberry.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/s4t-server-node/node_modules/express/node_modules/type-is/README.md b/s4t-server-node/node_modules/express/node_modules/type-is/README.md deleted file mode 100644 index 7d0ce59..0000000 --- a/s4t-server-node/node_modules/express/node_modules/type-is/README.md +++ /dev/null @@ -1,115 +0,0 @@ -# type-is - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Infer the content-type of a request. - -### Install - -```sh -$ npm install type-is -``` - -## API - -```js -var http = require('http') -var is = require('type-is') - -http.createServer(function (req, res) { - var istext = is(req, ['text/*']) - res.end('you ' + (istext ? 'sent' : 'did not send') + ' me text') -}) -``` - -### type = is(request, types) - -`request` is the node HTTP request. `types` is an array of types. - -```js -// req.headers.content-type = 'application/json' - -is(req, ['json']) // 'json' -is(req, ['html', 'json']) // 'json' -is(req, ['application/*']) // 'application/json' -is(req, ['application/json']) // 'application/json' - -is(req, ['html']) // false -``` - -### type = is.is(mediaType, types) - -`mediaType` is the [media type](https://tools.ietf.org/html/rfc6838) string. `types` is an array of types. - -```js -var mediaType = 'application/json' - -is.is(mediaType, ['json']) // 'json' -is.is(mediaType, ['html', 'json']) // 'json' -is.is(mediaType, ['application/*']) // 'application/json' -is.is(mediaType, ['application/json']) // 'application/json' - -is.is(mediaType, ['html']) // false -``` - -### Each type can be: - -- An extension name such as `json`. This name will be returned if matched. -- A mime type such as `application/json`. -- A mime type with a wildcard such as `*/json` or `application/*`. The full mime type will be returned if matched -- A suffix such as `+json`. This can be combined with a wildcard such as `*/vnd+json` or `application/*+json`. The full mime type will be returned if matched. - -`false` will be returned if no type matches. - -## Examples - -#### Example body parser - -```js -var is = require('type-is'); - -function bodyParser(req, res, next) { - if (!is.hasBody(req)) { - return next() - } - - switch (is(req, ['urlencoded', 'json', 'multipart'])) { - case 'urlencoded': - // parse urlencoded body - throw new Error('implement urlencoded body parsing') - break - case 'json': - // parse json body - throw new Error('implement json body parsing') - break - case 'multipart': - // parse multipart body - throw new Error('implement multipart body parsing') - break - default: - // 415 error code - res.statusCode = 415 - res.end() - return - } -} -``` - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/type-is.svg?style=flat -[npm-url]: https://npmjs.org/package/type-is -[node-version-image]: https://img.shields.io/node/v/type-is.svg?style=flat -[node-version-url]: http://nodejs.org/download/ -[travis-image]: https://img.shields.io/travis/jshttp/type-is.svg?style=flat -[travis-url]: https://travis-ci.org/jshttp/type-is -[coveralls-image]: https://img.shields.io/coveralls/jshttp/type-is.svg?style=flat -[coveralls-url]: https://coveralls.io/r/jshttp/type-is?branch=master -[downloads-image]: https://img.shields.io/npm/dm/type-is.svg?style=flat -[downloads-url]: https://npmjs.org/package/type-is diff --git a/s4t-server-node/node_modules/express/node_modules/type-is/index.js b/s4t-server-node/node_modules/express/node_modules/type-is/index.js deleted file mode 100644 index 8d220d1..0000000 --- a/s4t-server-node/node_modules/express/node_modules/type-is/index.js +++ /dev/null @@ -1,226 +0,0 @@ - -var typer = require('media-typer') -var mime = require('mime-types') - -module.exports = typeofrequest; -typeofrequest.is = typeis; -typeofrequest.hasBody = hasbody; -typeofrequest.normalize = normalize; -typeofrequest.match = mimeMatch; - -/** - * Compare a `value` content-type with `types`. - * Each `type` can be an extension like `html`, - * a special shortcut like `multipart` or `urlencoded`, - * or a mime type. - * - * If no types match, `false` is returned. - * Otherwise, the first `type` that matches is returned. - * - * @param {String} value - * @param {Array} types - * @return String - */ - -function typeis(value, types_) { - var i - var types = types_ - - // remove parameters and normalize - value = typenormalize(value) - - // no type or invalid - if (!value) { - return false - } - - // support flattened arguments - if (types && !Array.isArray(types)) { - types = new Array(arguments.length - 1) - for (i = 0; i < types.length; i++) { - types[i] = arguments[i + 1] - } - } - - // no types, return the content type - if (!types || !types.length) return value; - - var type - for (i = 0; i < types.length; i++) { - if (mimeMatch(normalize(type = types[i]), value)) { - return type[0] === '+' || ~type.indexOf('*') - ? value - : type - } - } - - // no matches - return false; -} - -/** - * Check if a request has a request body. - * A request with a body __must__ either have `transfer-encoding` - * or `content-length` headers set. - * http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3 - * - * @param {Object} request - * @return {Boolean} - * @api public - */ - -function hasbody(req) { - var headers = req.headers; - if ('transfer-encoding' in headers) return true; - return !isNaN(headers['content-length']); -} - -/** - * Check if the incoming request contains the "Content-Type" - * header field, and it contains any of the give mime `type`s. - * If there is no request body, `null` is returned. - * If there is no content type, `false` is returned. - * Otherwise, it returns the first `type` that matches. - * - * Examples: - * - * // With Content-Type: text/html; charset=utf-8 - * this.is('html'); // => 'html' - * this.is('text/html'); // => 'text/html' - * this.is('text/*', 'application/json'); // => 'text/html' - * - * // When Content-Type is application/json - * this.is('json', 'urlencoded'); // => 'json' - * this.is('application/json'); // => 'application/json' - * this.is('html', 'application/*'); // => 'application/json' - * - * this.is('html'); // => false - * - * @param {String|Array} types... - * @return {String|false|null} - * @api public - */ - -function typeofrequest(req, types_) { - var types = types_ - - // no body - if (!hasbody(req)) { - return null - } - - // support flattened arguments - if (arguments.length > 2) { - types = new Array(arguments.length - 1) - for (var i = 0; i < types.length; i++) { - types[i] = arguments[i + 1] - } - } - - // request content type - var value = req.headers['content-type'] - - return typeis(value, types); -} - -/** - * Normalize a mime type. - * If it's a shorthand, expand it to a valid mime type. - * - * In general, you probably want: - * - * var type = is(req, ['urlencoded', 'json', 'multipart']); - * - * Then use the appropriate body parsers. - * These three are the most common request body types - * and are thus ensured to work. - * - * @param {String} type - * @api private - */ - -function normalize(type) { - switch (type) { - case 'urlencoded': return 'application/x-www-form-urlencoded'; - case 'multipart': - type = 'multipart/*'; - break; - } - - return type[0] === '+' || ~type.indexOf('/') - ? type - : mime.lookup(type) -} - -/** - * Check if `exected` mime type - * matches `actual` mime type with - * wildcard and +suffix support. - * - * @param {String} expected - * @param {String} actual - * @return {Boolean} - * @api private - */ - -function mimeMatch(expected, actual) { - // invalid type - if (expected === false) { - return false - } - - // exact match - if (expected === actual) { - return true - } - - actual = actual.split('/'); - - if (expected[0] === '+') { - // support +suffix - return Boolean(actual[1]) - && expected.length <= actual[1].length - && expected === actual[1].substr(0 - expected.length) - } - - if (!~expected.indexOf('*')) return false; - - expected = expected.split('/'); - - if (expected[0] === '*') { - // support */yyy - return expected[1] === actual[1] - } - - if (expected[1] === '*') { - // support xxx/* - return expected[0] === actual[0] - } - - if (expected[1][0] === '*' && expected[1][1] === '+') { - // support xxx/*+zzz - return expected[0] === actual[0] - && expected[1].length <= actual[1].length + 1 - && expected[1].substr(1) === actual[1].substr(1 - expected[1].length) - } - - return false -} - -/** - * Normalize a type and remove parameters. - * - * @param {string} value - * @return {string} - * @api private - */ - -function typenormalize(value) { - try { - var type = typer.parse(value) - delete type.parameters - return typer.format(type) - } catch (err) { - return null - } -} diff --git a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/HISTORY.md b/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/HISTORY.md deleted file mode 100644 index 9486d94..0000000 --- a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/HISTORY.md +++ /dev/null @@ -1,72 +0,0 @@ -2.0.7 / 2014-12-30 -================== - - * deps: mime-db@~1.5.0 - - Add new mime types - - Fix various invalid MIME type entries - -2.0.6 / 2014-12-30 -================== - - * deps: mime-db@~1.4.0 - - Add new mime types - - Fix various invalid MIME type entries - - Remove example template MIME types - -2.0.5 / 2014-12-29 -================== - - * deps: mime-db@~1.3.1 - - Fix missing extensions - -2.0.4 / 2014-12-10 -================== - - * deps: mime-db@~1.3.0 - - Add new mime types - -2.0.3 / 2014-11-09 -================== - - * deps: mime-db@~1.2.0 - - Add new mime types - -2.0.2 / 2014-09-28 -================== - - * deps: mime-db@~1.1.0 - - Add new mime types - - Add additional compressible - - Update charsets - -2.0.1 / 2014-09-07 -================== - - * Support Node.js 0.6 - -2.0.0 / 2014-09-02 -================== - - * Use `mime-db` - * Remove `.define()` - -1.0.2 / 2014-08-04 -================== - - * Set charset=utf-8 for `text/javascript` - -1.0.1 / 2014-06-24 -================== - - * Add `text/jsx` type - -1.0.0 / 2014-05-12 -================== - - * Return `false` for unknown types - * Set charset=utf-8 for `application/json` - -0.1.0 / 2014-05-02 -================== - - * Initial release diff --git a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/LICENSE b/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/LICENSE deleted file mode 100644 index a7ae8ee..0000000 --- a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ - -The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong me@jongleberry.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/README.md b/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/README.md deleted file mode 100644 index 99d658b..0000000 --- a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/README.md +++ /dev/null @@ -1,99 +0,0 @@ -# mime-types - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -The ultimate javascript content-type utility. - -Similar to [node-mime](https://github.com/broofa/node-mime), except: - -- __No fallbacks.__ Instead of naively returning the first available type, `mime-types` simply returns `false`, - so do `var type = mime.lookup('unrecognized') || 'application/octet-stream'`. -- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`. -- Additional mime types are added such as jade and stylus via [mime-db](https://github.com/jshttp/mime-db) -- No `.define()` functionality - -Otherwise, the API is compatible. - -## Install - -```sh -$ npm install mime-types -``` - -## Adding Types - -All mime types are based on [mime-db](https://github.com/jshttp/mime-db), -so open a PR there if you'd like to add mime types. - -## API - -```js -var mime = require('mime-types') -``` - -All functions return `false` if input is invalid or not found. - -### mime.lookup(path) - -Lookup the content-type associated with a file. - -```js -mime.lookup('json') // 'application/json' -mime.lookup('.md') // 'text/x-markdown' -mime.lookup('file.html') // 'text/html' -mime.lookup('folder/file.js') // 'application/javascript' - -mime.lookup('cats') // false -``` - -### mime.contentType(type) - -Create a full content-type header given a content-type or extension. - -```js -mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' -mime.contentType('file.json') // 'application/json; charset=utf-8' -``` - -### mime.extension(type) - -Get the default extension for a content-type. - -```js -mime.extension('application/octet-stream') // 'bin' -``` - -### mime.charset(type) - -Lookup the implied default charset of a content-type. - -```js -mime.charset('text/x-markdown') // 'UTF-8' -``` - -### var type = mime.types[extension] - -A map of content-types by extension. - -### [extensions...] = mime.extensions[type] - -A map of extensions by content-type. - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/mime-types.svg?style=flat -[npm-url]: https://npmjs.org/package/mime-types -[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat -[node-version-url]: http://nodejs.org/download/ -[travis-image]: https://img.shields.io/travis/jshttp/mime-types.svg?style=flat -[travis-url]: https://travis-ci.org/jshttp/mime-types -[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-types.svg?style=flat -[coveralls-url]: https://coveralls.io/r/jshttp/mime-types -[downloads-image]: https://img.shields.io/npm/dm/mime-types.svg?style=flat -[downloads-url]: https://npmjs.org/package/mime-types diff --git a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/index.js b/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/index.js deleted file mode 100644 index b46a202..0000000 --- a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/index.js +++ /dev/null @@ -1,63 +0,0 @@ - -var db = require('mime-db') - -// types[extension] = type -exports.types = Object.create(null) -// extensions[type] = [extensions] -exports.extensions = Object.create(null) - -Object.keys(db).forEach(function (name) { - var mime = db[name] - var exts = mime.extensions - if (!exts || !exts.length) return - exports.extensions[name] = exts - exts.forEach(function (ext) { - exports.types[ext] = name - }) -}) - -exports.lookup = function (string) { - if (!string || typeof string !== "string") return false - // remove any leading paths, though we should just use path.basename - string = string.replace(/.*[\.\/\\]/, '').toLowerCase() - if (!string) return false - return exports.types[string] || false -} - -exports.extension = function (type) { - if (!type || typeof type !== "string") return false - // to do: use media-typer - type = type.match(/^\s*([^;\s]*)(?:;|\s|$)/) - if (!type) return false - var exts = exports.extensions[type[1].toLowerCase()] - if (!exts || !exts.length) return false - return exts[0] -} - -// type has to be an exact mime type -exports.charset = function (type) { - var mime = db[type] - if (mime && mime.charset) return mime.charset - - // default text/* to utf-8 - if (/^text\//.test(type)) return 'UTF-8' - - return false -} - -// backwards compatibility -exports.charsets = { - lookup: exports.charset -} - -// to do: maybe use set-type module or something -exports.contentType = function (type) { - if (!type || typeof type !== "string") return false - if (!~type.indexOf('/')) type = exports.lookup(type) - if (!type) return false - if (!~type.indexOf('charset')) { - var charset = exports.charset(type) - if (charset) type += '; charset=' + charset.toLowerCase() - } - return type -} diff --git a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md b/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md deleted file mode 100644 index 30b680d..0000000 --- a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/HISTORY.md +++ /dev/null @@ -1,142 +0,0 @@ -1.5.0 / 2014-12-30 -================== - - * Add `application/vnd.oracle.resource+json` - * Fix various invalid MIME type entries - - `application/mbox+xml` - - `application/oscp-response` - - `application/vwg-multiplexed` - - `audio/g721` - -1.4.0 / 2014-12-21 -================== - - * Add `application/vnd.ims.imsccv1p2` - * Fix various invalid MIME type entries - - `application/vnd-acucobol` - - `application/vnd-curl` - - `application/vnd-dart` - - `application/vnd-dxr` - - `application/vnd-fdf` - - `application/vnd-mif` - - `application/vnd-sema` - - `application/vnd-wap-wmlc` - - `application/vnd.adobe.flash-movie` - - `application/vnd.dece-zip` - - `application/vnd.dvb_service` - - `application/vnd.micrografx-igx` - - `application/vnd.sealed-doc` - - `application/vnd.sealed-eml` - - `application/vnd.sealed-mht` - - `application/vnd.sealed-ppt` - - `application/vnd.sealed-tiff` - - `application/vnd.sealed-xls` - - `application/vnd.sealedmedia.softseal-html` - - `application/vnd.sealedmedia.softseal-pdf` - - `application/vnd.wap-slc` - - `application/vnd.wap-wbxml` - - `audio/vnd.sealedmedia.softseal-mpeg` - - `image/vnd-djvu` - - `image/vnd-svf` - - `image/vnd-wap-wbmp` - - `image/vnd.sealed-png` - - `image/vnd.sealedmedia.softseal-gif` - - `image/vnd.sealedmedia.softseal-jpg` - - `model/vnd-dwf` - - `model/vnd.parasolid.transmit-binary` - - `model/vnd.parasolid.transmit-text` - - `text/vnd-a` - - `text/vnd-curl` - - `text/vnd.wap-wml` - * Remove example template MIME types - - `application/example` - - `audio/example` - - `image/example` - - `message/example` - - `model/example` - - `multipart/example` - - `text/example` - - `video/example` - -1.3.1 / 2014-12-16 -================== - - * Fix missing extensions - - `application/json5` - - `text/hjson` - -1.3.0 / 2014-12-07 -================== - - * Add `application/a2l` - * Add `application/aml` - * Add `application/atfx` - * Add `application/atxml` - * Add `application/cdfx+xml` - * Add `application/dii` - * Add `application/json5` - * Add `application/lxf` - * Add `application/mf4` - * Add `application/vnd.apache.thrift.compact` - * Add `application/vnd.apache.thrift.json` - * Add `application/vnd.coffeescript` - * Add `application/vnd.enphase.envoy` - * Add `application/vnd.ims.imsccv1p1` - * Add `text/csv-schema` - * Add `text/hjson` - * Add `text/markdown` - * Add `text/yaml` - -1.2.0 / 2014-11-09 -================== - - * Add `application/cea` - * Add `application/dit` - * Add `application/vnd.gov.sk.e-form+zip` - * Add `application/vnd.tmd.mediaflex.api+xml` - * Type `application/epub+zip` is now IANA-registered - -1.1.2 / 2014-10-23 -================== - - * Rebuild database for `application/x-www-form-urlencoded` change - -1.1.1 / 2014-10-20 -================== - - * Mark `application/x-www-form-urlencoded` as compressible. - -1.1.0 / 2014-09-28 -================== - - * Add `application/font-woff2` - -1.0.3 / 2014-09-25 -================== - - * Fix engine requirement in package - -1.0.2 / 2014-09-25 -================== - - * Add `application/coap-group+json` - * Add `application/dcd` - * Add `application/vnd.apache.thrift.binary` - * Add `image/vnd.tencent.tap` - * Mark all JSON-derived types as compressible - * Update `text/vtt` data - -1.0.1 / 2014-08-30 -================== - - * Fix extension ordering - -1.0.0 / 2014-08-30 -================== - - * Add `application/atf` - * Add `application/merge-patch+json` - * Add `multipart/x-mixed-replace` - * Add `source: 'apache'` metadata - * Add `source: 'iana'` metadata - * Remove badly-assumed charset data diff --git a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE b/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE deleted file mode 100644 index a7ae8ee..0000000 --- a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ - -The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong me@jongleberry.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md b/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md deleted file mode 100644 index 3b6364e..0000000 --- a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md +++ /dev/null @@ -1,72 +0,0 @@ -# mime-db - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][travis-image]][travis-url] -[![Coverage Status][coveralls-image]][coveralls-url] - -This is a database of all mime types. -It consistents of a single, public JSON file and does not include any logic, -allowing it to remain as unopinionated as possible with an API. -It aggregates data from the following sources: - -- http://www.iana.org/assignments/media-types/media-types.xhtml -- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types - -## Usage - -```bash -npm i mime-db -``` - -```js -var db = require('mime-db'); - -// grab data on .js files -var data = db['application/javascript']; -``` - -If you're crazy enough to use this in the browser, -you can just grab the JSON file: - -``` -https://cdn.rawgit.com/jshttp/mime-db/master/db.json -``` - -## Data Structure - -The JSON file is a map lookup for lowercased mime types. -Each mime type has the following properties: - -- `.source` - where the mime type is defined. - If not set, it's probably a custom media type. - - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) - - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml) -- `.extensions[]` - known extensions associated with this mime type. -- `.compressible` - whether a file of this type is can be gzipped. -- `.charset` - the default charset associated with this type, if any. - -If unknown, every property could be `undefined`. - -## Repository Structure - -- `scripts` - these are scripts to run to build the database -- `src/` - this is a folder of files created from remote sources like Apache and IANA -- `lib/` - this is a folder of our own custom sources and db, which will be merged into `db.json` -- `db.json` - the final built JSON file for end-user usage - -## Contributing - -To edit the database, only make PRs against files in the `lib/` folder. -To update the build, run `npm run update`. - -[npm-version-image]: https://img.shields.io/npm/v/mime-db.svg?style=flat -[npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg?style=flat -[npm-url]: https://npmjs.org/package/mime-db -[travis-image]: https://img.shields.io/travis/jshttp/mime-db.svg?style=flat -[travis-url]: https://travis-ci.org/jshttp/mime-db -[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-db.svg?style=flat -[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master -[node-image]: https://img.shields.io/node/v/mime-db.svg?style=flat -[node-url]: http://nodejs.org/download/ diff --git a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json b/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json deleted file mode 100644 index 652feb3..0000000 --- a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json +++ /dev/null @@ -1,6262 +0,0 @@ -{ - "application/1d-interleaved-parityfec": { - "source": "iana" - }, - "application/3gpdash-qoe-report+xml": { - "source": "iana" - }, - "application/3gpp-ims+xml": { - "source": "iana" - }, - "application/a2l": { - "source": "iana" - }, - "application/activemessage": { - "source": "iana" - }, - "application/alto-costmap+json": { - "source": "iana", - "compressible": true - }, - "application/alto-costmapfilter+json": { - "source": "iana", - "compressible": true - }, - "application/alto-directory+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointcost+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointcostparams+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointprop+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointpropparams+json": { - "source": "iana", - "compressible": true - }, - "application/alto-error+json": { - "source": "iana", - "compressible": true - }, - "application/alto-networkmap+json": { - "source": "iana", - "compressible": true - }, - "application/alto-networkmapfilter+json": { - "source": "iana", - "compressible": true - }, - "application/aml": { - "source": "iana" - }, - "application/andrew-inset": { - "source": "iana", - "extensions": ["ez"] - }, - "application/applefile": { - "source": "iana" - }, - "application/applixware": { - "source": "apache", - "extensions": ["aw"] - }, - "application/atf": { - "source": "iana" - }, - "application/atfx": { - "source": "iana" - }, - "application/atom+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atom"] - }, - "application/atomcat+xml": { - "source": "iana", - "extensions": ["atomcat"] - }, - "application/atomdeleted+xml": { - "source": "iana" - }, - "application/atomicmail": { - "source": "iana" - }, - "application/atomsvc+xml": { - "source": "iana", - "extensions": ["atomsvc"] - }, - "application/atxml": { - "source": "iana" - }, - "application/auth-policy+xml": { - "source": "iana" - }, - "application/bacnet-xdd+zip": { - "source": "iana" - }, - "application/batch-smtp": { - "source": "iana" - }, - "application/beep+xml": { - "source": "iana" - }, - "application/calendar+json": { - "source": "iana", - "compressible": true - }, - "application/calendar+xml": { - "source": "iana" - }, - "application/call-completion": { - "source": "iana" - }, - "application/cals-1840": { - "source": "iana" - }, - "application/cbor": { - "source": "iana" - }, - "application/ccmp+xml": { - "source": "iana" - }, - "application/ccxml+xml": { - "source": "iana", - "extensions": ["ccxml"] - }, - "application/cdfx+xml": { - "source": "iana" - }, - "application/cdmi-capability": { - "source": "iana", - "extensions": ["cdmia"] - }, - "application/cdmi-container": { - "source": "iana", - "extensions": ["cdmic"] - }, - "application/cdmi-domain": { - "source": "iana", - "extensions": ["cdmid"] - }, - "application/cdmi-object": { - "source": "iana", - "extensions": ["cdmio"] - }, - "application/cdmi-queue": { - "source": "iana", - "extensions": ["cdmiq"] - }, - "application/cea": { - "source": "iana" - }, - "application/cea-2018+xml": { - "source": "iana" - }, - "application/cellml+xml": { - "source": "iana" - }, - "application/cfw": { - "source": "iana" - }, - "application/cms": { - "source": "iana" - }, - "application/cnrp+xml": { - "source": "iana" - }, - "application/coap-group+json": { - "source": "iana", - "compressible": true - }, - "application/commonground": { - "source": "iana" - }, - "application/conference-info+xml": { - "source": "iana" - }, - "application/cpl+xml": { - "source": "iana" - }, - "application/csrattrs": { - "source": "iana" - }, - "application/csta+xml": { - "source": "iana" - }, - "application/cstadata+xml": { - "source": "iana" - }, - "application/cu-seeme": { - "source": "apache", - "extensions": ["cu"] - }, - "application/cybercash": { - "source": "iana" - }, - "application/dart": { - "compressible": true - }, - "application/dash+xml": { - "source": "iana", - "extensions": ["mdp"] - }, - "application/dashdelta": { - "source": "iana" - }, - "application/davmount+xml": { - "source": "iana", - "extensions": ["davmount"] - }, - "application/dca-rft": { - "source": "iana" - }, - "application/dcd": { - "source": "iana" - }, - "application/dec-dx": { - "source": "iana" - }, - "application/dialog-info+xml": { - "source": "iana" - }, - "application/dicom": { - "source": "iana" - }, - "application/dii": { - "source": "iana" - }, - "application/dit": { - "source": "iana" - }, - "application/dns": { - "source": "iana" - }, - "application/docbook+xml": { - "source": "apache", - "extensions": ["dbk"] - }, - "application/dskpp+xml": { - "source": "iana" - }, - "application/dssc+der": { - "source": "iana", - "extensions": ["dssc"] - }, - "application/dssc+xml": { - "source": "iana", - "extensions": ["xdssc"] - }, - "application/dvcs": { - "source": "iana" - }, - "application/ecmascript": { - "source": "iana", - "compressible": true, - "extensions": ["ecma"] - }, - "application/edi-consent": { - "source": "iana" - }, - "application/edi-x12": { - "source": "iana", - "compressible": false - }, - "application/edifact": { - "source": "iana", - "compressible": false - }, - "application/emma+xml": { - "source": "iana", - "extensions": ["emma"] - }, - "application/emotionml+xml": { - "source": "iana" - }, - "application/encaprtp": { - "source": "iana" - }, - "application/epp+xml": { - "source": "iana" - }, - "application/epub+zip": { - "source": "iana", - "extensions": ["epub"] - }, - "application/eshop": { - "source": "iana" - }, - "application/exi": { - "source": "iana", - "extensions": ["exi"] - }, - "application/fastinfoset": { - "source": "iana" - }, - "application/fastsoap": { - "source": "iana" - }, - "application/fdt+xml": { - "source": "iana" - }, - "application/fits": { - "source": "iana" - }, - "application/font-sfnt": { - "source": "iana" - }, - "application/font-tdpfr": { - "source": "iana", - "extensions": ["pfr"] - }, - "application/font-woff": { - "source": "iana", - "compressible": false, - "extensions": ["woff"] - }, - "application/font-woff2": { - "compressible": false, - "extensions": ["woff2"] - }, - "application/framework-attributes+xml": { - "source": "iana" - }, - "application/gml+xml": { - "source": "apache", - "extensions": ["gml"] - }, - "application/gpx+xml": { - "source": "apache", - "extensions": ["gpx"] - }, - "application/gxf": { - "source": "apache", - "extensions": ["gxf"] - }, - "application/gzip": { - "source": "iana", - "compressible": false - }, - "application/h224": { - "source": "iana" - }, - "application/held+xml": { - "source": "iana" - }, - "application/http": { - "source": "iana" - }, - "application/hyperstudio": { - "source": "iana", - "extensions": ["stk"] - }, - "application/ibe-key-request+xml": { - "source": "iana" - }, - "application/ibe-pkg-reply+xml": { - "source": "iana" - }, - "application/ibe-pp-data": { - "source": "iana" - }, - "application/iges": { - "source": "iana" - }, - "application/im-iscomposing+xml": { - "source": "iana" - }, - "application/index": { - "source": "iana" - }, - "application/index.cmd": { - "source": "iana" - }, - "application/index.obj": { - "source": "iana" - }, - "application/index.response": { - "source": "iana" - }, - "application/index.vnd": { - "source": "iana" - }, - "application/inkml+xml": { - "source": "iana", - "extensions": ["ink","inkml"] - }, - "application/iotp": { - "source": "iana" - }, - "application/ipfix": { - "source": "iana", - "extensions": ["ipfix"] - }, - "application/ipp": { - "source": "iana" - }, - "application/isup": { - "source": "iana" - }, - "application/its+xml": { - "source": "iana" - }, - "application/java-archive": { - "source": "apache", - "compressible": false, - "extensions": ["jar"] - }, - "application/java-serialized-object": { - "source": "apache", - "compressible": false, - "extensions": ["ser"] - }, - "application/java-vm": { - "source": "apache", - "compressible": false, - "extensions": ["class"] - }, - "application/javascript": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["js"] - }, - "application/jrd+json": { - "source": "iana", - "compressible": true - }, - "application/json": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["json","map"] - }, - "application/json-patch+json": { - "source": "iana", - "compressible": true - }, - "application/json5": { - "extensions": ["json5"] - }, - "application/jsonml+json": { - "source": "apache", - "compressible": true, - "extensions": ["jsonml"] - }, - "application/kpml-request+xml": { - "source": "iana" - }, - "application/kpml-response+xml": { - "source": "iana" - }, - "application/ld+json": { - "source": "iana", - "compressible": true - }, - "application/link-format": { - "source": "iana" - }, - "application/load-control+xml": { - "source": "iana" - }, - "application/lost+xml": { - "source": "iana", - "extensions": ["lostxml"] - }, - "application/lostsync+xml": { - "source": "iana" - }, - "application/lxf": { - "source": "iana" - }, - "application/mac-binhex40": { - "source": "iana", - "extensions": ["hqx"] - }, - "application/mac-compactpro": { - "source": "apache", - "extensions": ["cpt"] - }, - "application/macwriteii": { - "source": "iana" - }, - "application/mads+xml": { - "source": "iana", - "extensions": ["mads"] - }, - "application/marc": { - "source": "iana", - "extensions": ["mrc"] - }, - "application/marcxml+xml": { - "source": "iana", - "extensions": ["mrcx"] - }, - "application/mathematica": { - "source": "iana", - "extensions": ["ma","nb","mb"] - }, - "application/mathml+xml": { - "source": "iana", - "extensions": ["mathml"] - }, - "application/mathml-content+xml": { - "source": "iana" - }, - "application/mathml-presentation+xml": { - "source": "iana" - }, - "application/mbms-associated-procedure-description+xml": { - "source": "iana" - }, - "application/mbms-deregister+xml": { - "source": "iana" - }, - "application/mbms-envelope+xml": { - "source": "iana" - }, - "application/mbms-msk+xml": { - "source": "iana" - }, - "application/mbms-msk-response+xml": { - "source": "iana" - }, - "application/mbms-protection-description+xml": { - "source": "iana" - }, - "application/mbms-reception-report+xml": { - "source": "iana" - }, - "application/mbms-register+xml": { - "source": "iana" - }, - "application/mbms-register-response+xml": { - "source": "iana" - }, - "application/mbms-schedule+xml": { - "source": "iana" - }, - "application/mbms-user-service-description+xml": { - "source": "iana" - }, - "application/mbox": { - "source": "iana", - "extensions": ["mbox"] - }, - "application/media-policy-dataset+xml": { - "source": "iana" - }, - "application/media_control+xml": { - "source": "iana" - }, - "application/mediaservercontrol+xml": { - "source": "iana", - "extensions": ["mscml"] - }, - "application/merge-patch+json": { - "source": "iana", - "compressible": true - }, - "application/metalink+xml": { - "source": "apache", - "extensions": ["metalink"] - }, - "application/metalink4+xml": { - "source": "iana", - "extensions": ["meta4"] - }, - "application/mets+xml": { - "source": "iana", - "extensions": ["mets"] - }, - "application/mf4": { - "source": "iana" - }, - "application/mikey": { - "source": "iana" - }, - "application/mods+xml": { - "source": "iana", - "extensions": ["mods"] - }, - "application/moss-keys": { - "source": "iana" - }, - "application/moss-signature": { - "source": "iana" - }, - "application/mosskey-data": { - "source": "iana" - }, - "application/mosskey-request": { - "source": "iana" - }, - "application/mp21": { - "source": "iana", - "extensions": ["m21","mp21"] - }, - "application/mp4": { - "source": "iana", - "extensions": ["mp4s","m4p"] - }, - "application/mpeg4-generic": { - "source": "iana" - }, - "application/mpeg4-iod": { - "source": "iana" - }, - "application/mpeg4-iod-xmt": { - "source": "iana" - }, - "application/mrb-consumer+xml": { - "source": "iana" - }, - "application/mrb-publish+xml": { - "source": "iana" - }, - "application/msc-ivr+xml": { - "source": "iana" - }, - "application/msc-mixer+xml": { - "source": "iana" - }, - "application/msword": { - "source": "iana", - "compressible": false, - "extensions": ["doc","dot"] - }, - "application/mxf": { - "source": "iana", - "extensions": ["mxf"] - }, - "application/nasdata": { - "source": "iana" - }, - "application/news-checkgroups": { - "source": "iana" - }, - "application/news-groupinfo": { - "source": "iana" - }, - "application/news-transmission": { - "source": "iana" - }, - "application/nlsml+xml": { - "source": "iana" - }, - "application/nss": { - "source": "iana" - }, - "application/ocsp-request": { - "source": "iana" - }, - "application/ocsp-response": { - "source": "iana" - }, - "application/octet-stream": { - "source": "iana", - "compressible": false, - "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","buffer"] - }, - "application/oda": { - "source": "iana", - "extensions": ["oda"] - }, - "application/odx": { - "source": "iana" - }, - "application/oebps-package+xml": { - "source": "iana", - "extensions": ["opf"] - }, - "application/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["ogx"] - }, - "application/omdoc+xml": { - "source": "apache", - "extensions": ["omdoc"] - }, - "application/onenote": { - "source": "apache", - "extensions": ["onetoc","onetoc2","onetmp","onepkg"] - }, - "application/oxps": { - "source": "iana", - "extensions": ["oxps"] - }, - "application/p2p-overlay+xml": { - "source": "iana" - }, - "application/parityfec": { - "source": "iana" - }, - "application/patch-ops-error+xml": { - "source": "iana", - "extensions": ["xer"] - }, - "application/pdf": { - "source": "iana", - "compressible": false, - "extensions": ["pdf"] - }, - "application/pdx": { - "source": "iana" - }, - "application/pgp-encrypted": { - "source": "iana", - "compressible": false, - "extensions": ["pgp"] - }, - "application/pgp-keys": { - "source": "iana" - }, - "application/pgp-signature": { - "source": "iana", - "extensions": ["asc","sig"] - }, - "application/pics-rules": { - "source": "apache", - "extensions": ["prf"] - }, - "application/pidf+xml": { - "source": "iana" - }, - "application/pidf-diff+xml": { - "source": "iana" - }, - "application/pkcs10": { - "source": "iana", - "extensions": ["p10"] - }, - "application/pkcs7-mime": { - "source": "iana", - "extensions": ["p7m","p7c"] - }, - "application/pkcs7-signature": { - "source": "iana", - "extensions": ["p7s"] - }, - "application/pkcs8": { - "source": "iana", - "extensions": ["p8"] - }, - "application/pkix-attr-cert": { - "source": "iana", - "extensions": ["ac"] - }, - "application/pkix-cert": { - "source": "iana", - "extensions": ["cer"] - }, - "application/pkix-crl": { - "source": "iana", - "extensions": ["crl"] - }, - "application/pkix-pkipath": { - "source": "iana", - "extensions": ["pkipath"] - }, - "application/pkixcmp": { - "source": "iana", - "extensions": ["pki"] - }, - "application/pls+xml": { - "source": "iana", - "extensions": ["pls"] - }, - "application/poc-settings+xml": { - "source": "iana" - }, - "application/postscript": { - "source": "iana", - "compressible": true, - "extensions": ["ai","eps","ps"] - }, - "application/provenance+xml": { - "source": "iana" - }, - "application/prs.alvestrand.titrax-sheet": { - "source": "iana" - }, - "application/prs.cww": { - "source": "iana", - "extensions": ["cww"] - }, - "application/prs.hpub+zip": { - "source": "iana" - }, - "application/prs.nprend": { - "source": "iana" - }, - "application/prs.plucker": { - "source": "iana" - }, - "application/prs.rdf-xml-crypt": { - "source": "iana" - }, - "application/prs.xsf+xml": { - "source": "iana" - }, - "application/pskc+xml": { - "source": "iana", - "extensions": ["pskcxml"] - }, - "application/qsig": { - "source": "iana" - }, - "application/raptorfec": { - "source": "iana" - }, - "application/rdf+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rdf"] - }, - "application/reginfo+xml": { - "source": "iana", - "extensions": ["rif"] - }, - "application/relax-ng-compact-syntax": { - "source": "iana", - "extensions": ["rnc"] - }, - "application/remote-printing": { - "source": "iana" - }, - "application/reputon+json": { - "source": "iana", - "compressible": true - }, - "application/resource-lists+xml": { - "source": "iana", - "extensions": ["rl"] - }, - "application/resource-lists-diff+xml": { - "source": "iana", - "extensions": ["rld"] - }, - "application/riscos": { - "source": "iana" - }, - "application/rlmi+xml": { - "source": "iana" - }, - "application/rls-services+xml": { - "source": "iana", - "extensions": ["rs"] - }, - "application/rpki-ghostbusters": { - "source": "iana", - "extensions": ["gbr"] - }, - "application/rpki-manifest": { - "source": "iana", - "extensions": ["mft"] - }, - "application/rpki-roa": { - "source": "iana", - "extensions": ["roa"] - }, - "application/rpki-updown": { - "source": "iana" - }, - "application/rsd+xml": { - "source": "apache", - "extensions": ["rsd"] - }, - "application/rss+xml": { - "source": "apache", - "compressible": true, - "extensions": ["rss"] - }, - "application/rtf": { - "source": "iana", - "compressible": true, - "extensions": ["rtf"] - }, - "application/rtploopback": { - "source": "iana" - }, - "application/rtx": { - "source": "iana" - }, - "application/samlassertion+xml": { - "source": "iana" - }, - "application/samlmetadata+xml": { - "source": "iana" - }, - "application/sbml+xml": { - "source": "iana", - "extensions": ["sbml"] - }, - "application/scaip+xml": { - "source": "iana" - }, - "application/scvp-cv-request": { - "source": "iana", - "extensions": ["scq"] - }, - "application/scvp-cv-response": { - "source": "iana", - "extensions": ["scs"] - }, - "application/scvp-vp-request": { - "source": "iana", - "extensions": ["spq"] - }, - "application/scvp-vp-response": { - "source": "iana", - "extensions": ["spp"] - }, - "application/sdp": { - "source": "iana", - "extensions": ["sdp"] - }, - "application/sep+xml": { - "source": "iana" - }, - "application/sep-exi": { - "source": "iana" - }, - "application/session-info": { - "source": "iana" - }, - "application/set-payment": { - "source": "iana" - }, - "application/set-payment-initiation": { - "source": "iana", - "extensions": ["setpay"] - }, - "application/set-registration": { - "source": "iana" - }, - "application/set-registration-initiation": { - "source": "iana", - "extensions": ["setreg"] - }, - "application/sgml": { - "source": "iana" - }, - "application/sgml-open-catalog": { - "source": "iana" - }, - "application/shf+xml": { - "source": "iana", - "extensions": ["shf"] - }, - "application/sieve": { - "source": "iana" - }, - "application/simple-filter+xml": { - "source": "iana" - }, - "application/simple-message-summary": { - "source": "iana" - }, - "application/simplesymbolcontainer": { - "source": "iana" - }, - "application/slate": { - "source": "iana" - }, - "application/smil": { - "source": "iana" - }, - "application/smil+xml": { - "source": "iana", - "extensions": ["smi","smil"] - }, - "application/smpte336m": { - "source": "iana" - }, - "application/soap+fastinfoset": { - "source": "iana" - }, - "application/soap+xml": { - "source": "iana", - "compressible": true - }, - "application/sparql-query": { - "source": "iana", - "extensions": ["rq"] - }, - "application/sparql-results+xml": { - "source": "iana", - "extensions": ["srx"] - }, - "application/spirits-event+xml": { - "source": "iana" - }, - "application/sql": { - "source": "iana" - }, - "application/srgs": { - "source": "iana", - "extensions": ["gram"] - }, - "application/srgs+xml": { - "source": "iana", - "extensions": ["grxml"] - }, - "application/sru+xml": { - "source": "iana", - "extensions": ["sru"] - }, - "application/ssdl+xml": { - "source": "apache", - "extensions": ["ssdl"] - }, - "application/ssml+xml": { - "source": "iana", - "extensions": ["ssml"] - }, - "application/tamp-apex-update": { - "source": "iana" - }, - "application/tamp-apex-update-confirm": { - "source": "iana" - }, - "application/tamp-community-update": { - "source": "iana" - }, - "application/tamp-community-update-confirm": { - "source": "iana" - }, - "application/tamp-error": { - "source": "iana" - }, - "application/tamp-sequence-adjust": { - "source": "iana" - }, - "application/tamp-sequence-adjust-confirm": { - "source": "iana" - }, - "application/tamp-status-query": { - "source": "iana" - }, - "application/tamp-status-response": { - "source": "iana" - }, - "application/tamp-update": { - "source": "iana" - }, - "application/tamp-update-confirm": { - "source": "iana" - }, - "application/tar": { - "compressible": true - }, - "application/tei+xml": { - "source": "iana", - "extensions": ["tei","teicorpus"] - }, - "application/thraud+xml": { - "source": "iana", - "extensions": ["tfi"] - }, - "application/timestamp-query": { - "source": "iana" - }, - "application/timestamp-reply": { - "source": "iana" - }, - "application/timestamped-data": { - "source": "iana", - "extensions": ["tsd"] - }, - "application/ttml+xml": { - "source": "iana" - }, - "application/tve-trigger": { - "source": "iana" - }, - "application/ulpfec": { - "source": "iana" - }, - "application/urc-grpsheet+xml": { - "source": "iana" - }, - "application/urc-ressheet+xml": { - "source": "iana" - }, - "application/urc-targetdesc+xml": { - "source": "iana" - }, - "application/urc-uisocketdesc+xml": { - "source": "iana" - }, - "application/vcard+json": { - "source": "iana", - "compressible": true - }, - "application/vcard+xml": { - "source": "iana" - }, - "application/vemmi": { - "source": "iana" - }, - "application/vividence.scriptfile": { - "source": "apache" - }, - "application/vnd.3gpp.bsf+xml": { - "source": "iana" - }, - "application/vnd.3gpp.pic-bw-large": { - "source": "iana", - "extensions": ["plb"] - }, - "application/vnd.3gpp.pic-bw-small": { - "source": "iana", - "extensions": ["psb"] - }, - "application/vnd.3gpp.pic-bw-var": { - "source": "iana", - "extensions": ["pvb"] - }, - "application/vnd.3gpp.sms": { - "source": "iana" - }, - "application/vnd.3gpp2.bcmcsinfo+xml": { - "source": "iana" - }, - "application/vnd.3gpp2.sms": { - "source": "iana" - }, - "application/vnd.3gpp2.tcap": { - "source": "iana", - "extensions": ["tcap"] - }, - "application/vnd.3m.post-it-notes": { - "source": "iana", - "extensions": ["pwn"] - }, - "application/vnd.accpac.simply.aso": { - "source": "iana", - "extensions": ["aso"] - }, - "application/vnd.accpac.simply.imp": { - "source": "iana", - "extensions": ["imp"] - }, - "application/vnd.acucobol": { - "source": "iana", - "extensions": ["acu"] - }, - "application/vnd.acucorp": { - "source": "iana", - "extensions": ["atc","acutc"] - }, - "application/vnd.adobe.air-application-installer-package+zip": { - "source": "apache", - "extensions": ["air"] - }, - "application/vnd.adobe.flash.movie": { - "source": "iana" - }, - "application/vnd.adobe.formscentral.fcdt": { - "source": "iana", - "extensions": ["fcdt"] - }, - "application/vnd.adobe.fxp": { - "source": "iana", - "extensions": ["fxp","fxpl"] - }, - "application/vnd.adobe.partial-upload": { - "source": "iana" - }, - "application/vnd.adobe.xdp+xml": { - "source": "iana", - "extensions": ["xdp"] - }, - "application/vnd.adobe.xfdf": { - "source": "iana", - "extensions": ["xfdf"] - }, - "application/vnd.aether.imp": { - "source": "iana" - }, - "application/vnd.ah-barcode": { - "source": "iana" - }, - "application/vnd.ahead.space": { - "source": "iana", - "extensions": ["ahead"] - }, - "application/vnd.airzip.filesecure.azf": { - "source": "iana", - "extensions": ["azf"] - }, - "application/vnd.airzip.filesecure.azs": { - "source": "iana", - "extensions": ["azs"] - }, - "application/vnd.amazon.ebook": { - "source": "apache", - "extensions": ["azw"] - }, - "application/vnd.americandynamics.acc": { - "source": "iana", - "extensions": ["acc"] - }, - "application/vnd.amiga.ami": { - "source": "iana", - "extensions": ["ami"] - }, - "application/vnd.amundsen.maze+xml": { - "source": "iana" - }, - "application/vnd.android.package-archive": { - "source": "apache", - "compressible": false, - "extensions": ["apk"] - }, - "application/vnd.anser-web-certificate-issue-initiation": { - "source": "iana", - "extensions": ["cii"] - }, - "application/vnd.anser-web-funds-transfer-initiation": { - "source": "apache", - "extensions": ["fti"] - }, - "application/vnd.antix.game-component": { - "source": "iana", - "extensions": ["atx"] - }, - "application/vnd.apache.thrift.binary": { - "source": "iana" - }, - "application/vnd.apache.thrift.compact": { - "source": "iana" - }, - "application/vnd.apache.thrift.json": { - "source": "iana" - }, - "application/vnd.api+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.apple.installer+xml": { - "source": "iana", - "extensions": ["mpkg"] - }, - "application/vnd.apple.mpegurl": { - "source": "iana", - "extensions": ["m3u8"] - }, - "application/vnd.arastra.swi": { - "source": "iana" - }, - "application/vnd.aristanetworks.swi": { - "source": "iana", - "extensions": ["swi"] - }, - "application/vnd.artsquare": { - "source": "iana" - }, - "application/vnd.astraea-software.iota": { - "source": "iana", - "extensions": ["iota"] - }, - "application/vnd.audiograph": { - "source": "iana", - "extensions": ["aep"] - }, - "application/vnd.autopackage": { - "source": "iana" - }, - "application/vnd.avistar+xml": { - "source": "iana" - }, - "application/vnd.balsamiq.bmml+xml": { - "source": "iana" - }, - "application/vnd.bekitzur-stech+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.blueice.multipass": { - "source": "iana", - "extensions": ["mpm"] - }, - "application/vnd.bluetooth.ep.oob": { - "source": "iana" - }, - "application/vnd.bluetooth.le.oob": { - "source": "iana" - }, - "application/vnd.bmi": { - "source": "iana", - "extensions": ["bmi"] - }, - "application/vnd.businessobjects": { - "source": "iana", - "extensions": ["rep"] - }, - "application/vnd.cab-jscript": { - "source": "iana" - }, - "application/vnd.canon-cpdl": { - "source": "iana" - }, - "application/vnd.canon-lips": { - "source": "iana" - }, - "application/vnd.cendio.thinlinc.clientconf": { - "source": "iana" - }, - "application/vnd.century-systems.tcp_stream": { - "source": "iana" - }, - "application/vnd.chemdraw+xml": { - "source": "iana", - "extensions": ["cdxml"] - }, - "application/vnd.chipnuts.karaoke-mmd": { - "source": "iana", - "extensions": ["mmd"] - }, - "application/vnd.cinderella": { - "source": "iana", - "extensions": ["cdy"] - }, - "application/vnd.cirpack.isdn-ext": { - "source": "iana" - }, - "application/vnd.claymore": { - "source": "iana", - "extensions": ["cla"] - }, - "application/vnd.cloanto.rp9": { - "source": "iana", - "extensions": ["rp9"] - }, - "application/vnd.clonk.c4group": { - "source": "iana", - "extensions": ["c4g","c4d","c4f","c4p","c4u"] - }, - "application/vnd.cluetrust.cartomobile-config": { - "source": "iana", - "extensions": ["c11amc"] - }, - "application/vnd.cluetrust.cartomobile-config-pkg": { - "source": "iana", - "extensions": ["c11amz"] - }, - "application/vnd.coffeescript": { - "source": "iana" - }, - "application/vnd.collection+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.collection.doc+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.collection.next+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.commerce-battelle": { - "source": "iana" - }, - "application/vnd.commonspace": { - "source": "iana", - "extensions": ["csp"] - }, - "application/vnd.contact.cmsg": { - "source": "iana", - "extensions": ["cdbcmsg"] - }, - "application/vnd.cosmocaller": { - "source": "iana", - "extensions": ["cmc"] - }, - "application/vnd.crick.clicker": { - "source": "iana", - "extensions": ["clkx"] - }, - "application/vnd.crick.clicker.keyboard": { - "source": "iana", - "extensions": ["clkk"] - }, - "application/vnd.crick.clicker.palette": { - "source": "iana", - "extensions": ["clkp"] - }, - "application/vnd.crick.clicker.template": { - "source": "iana", - "extensions": ["clkt"] - }, - "application/vnd.crick.clicker.wordbank": { - "source": "iana", - "extensions": ["clkw"] - }, - "application/vnd.criticaltools.wbs+xml": { - "source": "iana", - "extensions": ["wbs"] - }, - "application/vnd.ctc-posml": { - "source": "iana", - "extensions": ["pml"] - }, - "application/vnd.ctct.ws+xml": { - "source": "iana" - }, - "application/vnd.cups-pdf": { - "source": "iana" - }, - "application/vnd.cups-postscript": { - "source": "iana" - }, - "application/vnd.cups-ppd": { - "source": "iana", - "extensions": ["ppd"] - }, - "application/vnd.cups-raster": { - "source": "iana" - }, - "application/vnd.cups-raw": { - "source": "iana" - }, - "application/vnd.curl": { - "source": "iana" - }, - "application/vnd.curl.car": { - "source": "apache", - "extensions": ["car"] - }, - "application/vnd.curl.pcurl": { - "source": "apache", - "extensions": ["pcurl"] - }, - "application/vnd.cyan.dean.root+xml": { - "source": "iana" - }, - "application/vnd.cybank": { - "source": "iana" - }, - "application/vnd.dart": { - "source": "iana", - "compressible": true, - "extensions": ["dart"] - }, - "application/vnd.data-vision.rdz": { - "source": "iana", - "extensions": ["rdz"] - }, - "application/vnd.debian.binary-package": { - "source": "iana" - }, - "application/vnd.dece.data": { - "source": "iana", - "extensions": ["uvf","uvvf","uvd","uvvd"] - }, - "application/vnd.dece.ttml+xml": { - "source": "iana", - "extensions": ["uvt","uvvt"] - }, - "application/vnd.dece.unspecified": { - "source": "iana", - "extensions": ["uvx","uvvx"] - }, - "application/vnd.dece.zip": { - "source": "iana", - "extensions": ["uvz","uvvz"] - }, - "application/vnd.denovo.fcselayout-link": { - "source": "iana", - "extensions": ["fe_launch"] - }, - "application/vnd.desmume-movie": { - "source": "iana" - }, - "application/vnd.dir-bi.plate-dl-nosuffix": { - "source": "iana" - }, - "application/vnd.dm.delegation+xml": { - "source": "iana" - }, - "application/vnd.dna": { - "source": "iana", - "extensions": ["dna"] - }, - "application/vnd.document+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.dolby.mlp": { - "source": "apache", - "extensions": ["mlp"] - }, - "application/vnd.dolby.mobile.1": { - "source": "iana" - }, - "application/vnd.dolby.mobile.2": { - "source": "iana" - }, - "application/vnd.doremir.scorecloud-binary-document": { - "source": "iana" - }, - "application/vnd.dpgraph": { - "source": "iana", - "extensions": ["dpg"] - }, - "application/vnd.dreamfactory": { - "source": "iana", - "extensions": ["dfac"] - }, - "application/vnd.ds-keypoint": { - "source": "apache", - "extensions": ["kpxx"] - }, - "application/vnd.dtg.local": { - "source": "iana" - }, - "application/vnd.dtg.local.flash": { - "source": "iana" - }, - "application/vnd.dtg.local.html": { - "source": "iana" - }, - "application/vnd.dvb.ait": { - "source": "iana", - "extensions": ["ait"] - }, - "application/vnd.dvb.dvbj": { - "source": "iana" - }, - "application/vnd.dvb.esgcontainer": { - "source": "iana" - }, - "application/vnd.dvb.ipdcdftnotifaccess": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgaccess": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgaccess2": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgpdd": { - "source": "iana" - }, - "application/vnd.dvb.ipdcroaming": { - "source": "iana" - }, - "application/vnd.dvb.iptv.alfec-base": { - "source": "iana" - }, - "application/vnd.dvb.iptv.alfec-enhancement": { - "source": "iana" - }, - "application/vnd.dvb.notif-aggregate-root+xml": { - "source": "iana" - }, - "application/vnd.dvb.notif-container+xml": { - "source": "iana" - }, - "application/vnd.dvb.notif-generic+xml": { - "source": "iana" - }, - "application/vnd.dvb.notif-ia-msglist+xml": { - "source": "iana" - }, - "application/vnd.dvb.notif-ia-registration-request+xml": { - "source": "iana" - }, - "application/vnd.dvb.notif-ia-registration-response+xml": { - "source": "iana" - }, - "application/vnd.dvb.notif-init+xml": { - "source": "iana" - }, - "application/vnd.dvb.pfr": { - "source": "iana" - }, - "application/vnd.dvb.service": { - "source": "iana", - "extensions": ["svc"] - }, - "application/vnd.dxr": { - "source": "iana" - }, - "application/vnd.dynageo": { - "source": "iana", - "extensions": ["geo"] - }, - "application/vnd.dzr": { - "source": "iana" - }, - "application/vnd.easykaraoke.cdgdownload": { - "source": "iana" - }, - "application/vnd.ecdis-update": { - "source": "iana" - }, - "application/vnd.ecowin.chart": { - "source": "iana", - "extensions": ["mag"] - }, - "application/vnd.ecowin.filerequest": { - "source": "iana" - }, - "application/vnd.ecowin.fileupdate": { - "source": "iana" - }, - "application/vnd.ecowin.series": { - "source": "iana" - }, - "application/vnd.ecowin.seriesrequest": { - "source": "iana" - }, - "application/vnd.ecowin.seriesupdate": { - "source": "iana" - }, - "application/vnd.emclient.accessrequest+xml": { - "source": "iana" - }, - "application/vnd.enliven": { - "source": "iana", - "extensions": ["nml"] - }, - "application/vnd.enphase.envoy": { - "source": "iana" - }, - "application/vnd.eprints.data+xml": { - "source": "iana" - }, - "application/vnd.epson.esf": { - "source": "iana", - "extensions": ["esf"] - }, - "application/vnd.epson.msf": { - "source": "iana", - "extensions": ["msf"] - }, - "application/vnd.epson.quickanime": { - "source": "iana", - "extensions": ["qam"] - }, - "application/vnd.epson.salt": { - "source": "iana", - "extensions": ["slt"] - }, - "application/vnd.epson.ssf": { - "source": "iana", - "extensions": ["ssf"] - }, - "application/vnd.ericsson.quickcall": { - "source": "iana" - }, - "application/vnd.eszigno3+xml": { - "source": "iana", - "extensions": ["es3","et3"] - }, - "application/vnd.etsi.aoc+xml": { - "source": "iana" - }, - "application/vnd.etsi.asic-e+zip": { - "source": "iana" - }, - "application/vnd.etsi.asic-s+zip": { - "source": "iana" - }, - "application/vnd.etsi.cug+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvcommand+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvdiscovery+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvprofile+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvsad-bc+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvsad-cod+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvsad-npvr+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvservice+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvsync+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvueprofile+xml": { - "source": "iana" - }, - "application/vnd.etsi.mcid+xml": { - "source": "iana" - }, - "application/vnd.etsi.mheg5": { - "source": "iana" - }, - "application/vnd.etsi.overload-control-policy-dataset+xml": { - "source": "iana" - }, - "application/vnd.etsi.pstn+xml": { - "source": "iana" - }, - "application/vnd.etsi.sci+xml": { - "source": "iana" - }, - "application/vnd.etsi.simservs+xml": { - "source": "iana" - }, - "application/vnd.etsi.timestamp-token": { - "source": "iana" - }, - "application/vnd.etsi.tsl+xml": { - "source": "iana" - }, - "application/vnd.etsi.tsl.der": { - "source": "iana" - }, - "application/vnd.eudora.data": { - "source": "iana" - }, - "application/vnd.ezpix-album": { - "source": "iana", - "extensions": ["ez2"] - }, - "application/vnd.ezpix-package": { - "source": "iana", - "extensions": ["ez3"] - }, - "application/vnd.f-secure.mobile": { - "source": "iana" - }, - "application/vnd.fdf": { - "source": "iana", - "extensions": ["fdf"] - }, - "application/vnd.fdsn.mseed": { - "source": "iana", - "extensions": ["mseed"] - }, - "application/vnd.fdsn.seed": { - "source": "iana", - "extensions": ["seed","dataless"] - }, - "application/vnd.ffsns": { - "source": "iana" - }, - "application/vnd.fints": { - "source": "iana" - }, - "application/vnd.flographit": { - "source": "iana", - "extensions": ["gph"] - }, - "application/vnd.fluxtime.clip": { - "source": "iana", - "extensions": ["ftc"] - }, - "application/vnd.font-fontforge-sfd": { - "source": "iana" - }, - "application/vnd.framemaker": { - "source": "iana", - "extensions": ["fm","frame","maker","book"] - }, - "application/vnd.frogans.fnc": { - "source": "iana", - "extensions": ["fnc"] - }, - "application/vnd.frogans.ltf": { - "source": "iana", - "extensions": ["ltf"] - }, - "application/vnd.fsc.weblaunch": { - "source": "iana", - "extensions": ["fsc"] - }, - "application/vnd.fujitsu.oasys": { - "source": "iana", - "extensions": ["oas"] - }, - "application/vnd.fujitsu.oasys2": { - "source": "iana", - "extensions": ["oa2"] - }, - "application/vnd.fujitsu.oasys3": { - "source": "iana", - "extensions": ["oa3"] - }, - "application/vnd.fujitsu.oasysgp": { - "source": "iana", - "extensions": ["fg5"] - }, - "application/vnd.fujitsu.oasysprs": { - "source": "iana", - "extensions": ["bh2"] - }, - "application/vnd.fujixerox.art-ex": { - "source": "iana" - }, - "application/vnd.fujixerox.art4": { - "source": "iana" - }, - "application/vnd.fujixerox.ddd": { - "source": "iana", - "extensions": ["ddd"] - }, - "application/vnd.fujixerox.docuworks": { - "source": "iana", - "extensions": ["xdw"] - }, - "application/vnd.fujixerox.docuworks.binder": { - "source": "iana", - "extensions": ["xbd"] - }, - "application/vnd.fujixerox.docuworks.container": { - "source": "iana" - }, - "application/vnd.fujixerox.hbpl": { - "source": "iana" - }, - "application/vnd.fut-misnet": { - "source": "iana" - }, - "application/vnd.fuzzysheet": { - "source": "iana", - "extensions": ["fzs"] - }, - "application/vnd.genomatix.tuxedo": { - "source": "iana", - "extensions": ["txd"] - }, - "application/vnd.geo+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.geocube+xml": { - "source": "iana" - }, - "application/vnd.geogebra.file": { - "source": "iana", - "extensions": ["ggb"] - }, - "application/vnd.geogebra.tool": { - "source": "iana", - "extensions": ["ggt"] - }, - "application/vnd.geometry-explorer": { - "source": "iana", - "extensions": ["gex","gre"] - }, - "application/vnd.geonext": { - "source": "iana", - "extensions": ["gxt"] - }, - "application/vnd.geoplan": { - "source": "iana", - "extensions": ["g2w"] - }, - "application/vnd.geospace": { - "source": "iana", - "extensions": ["g3w"] - }, - "application/vnd.globalplatform.card-content-mgt": { - "source": "iana" - }, - "application/vnd.globalplatform.card-content-mgt-response": { - "source": "iana" - }, - "application/vnd.gmx": { - "source": "iana", - "extensions": ["gmx"] - }, - "application/vnd.google-earth.kml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["kml"] - }, - "application/vnd.google-earth.kmz": { - "source": "iana", - "compressible": false, - "extensions": ["kmz"] - }, - "application/vnd.gov.sk.e-form+zip": { - "source": "iana" - }, - "application/vnd.grafeq": { - "source": "iana", - "extensions": ["gqf","gqs"] - }, - "application/vnd.gridmp": { - "source": "iana" - }, - "application/vnd.groove-account": { - "source": "iana", - "extensions": ["gac"] - }, - "application/vnd.groove-help": { - "source": "iana", - "extensions": ["ghf"] - }, - "application/vnd.groove-identity-message": { - "source": "iana", - "extensions": ["gim"] - }, - "application/vnd.groove-injector": { - "source": "iana", - "extensions": ["grv"] - }, - "application/vnd.groove-tool-message": { - "source": "iana", - "extensions": ["gtm"] - }, - "application/vnd.groove-tool-template": { - "source": "iana", - "extensions": ["tpl"] - }, - "application/vnd.groove-vcard": { - "source": "iana", - "extensions": ["vcg"] - }, - "application/vnd.hal+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hal+xml": { - "source": "iana", - "extensions": ["hal"] - }, - "application/vnd.handheld-entertainment+xml": { - "source": "iana", - "extensions": ["zmm"] - }, - "application/vnd.hbci": { - "source": "iana", - "extensions": ["hbci"] - }, - "application/vnd.hcl-bireports": { - "source": "iana" - }, - "application/vnd.heroku+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hhe.lesson-player": { - "source": "iana", - "extensions": ["les"] - }, - "application/vnd.hp-hpgl": { - "source": "iana", - "extensions": ["hpgl"] - }, - "application/vnd.hp-hpid": { - "source": "iana", - "extensions": ["hpid"] - }, - "application/vnd.hp-hps": { - "source": "iana", - "extensions": ["hps"] - }, - "application/vnd.hp-jlyt": { - "source": "iana", - "extensions": ["jlt"] - }, - "application/vnd.hp-pcl": { - "source": "iana", - "extensions": ["pcl"] - }, - "application/vnd.hp-pclxl": { - "source": "iana", - "extensions": ["pclxl"] - }, - "application/vnd.httphone": { - "source": "iana" - }, - "application/vnd.hydrostatix.sof-data": { - "source": "iana" - }, - "application/vnd.hzn-3d-crossword": { - "source": "iana" - }, - "application/vnd.ibm.afplinedata": { - "source": "iana" - }, - "application/vnd.ibm.electronic-media": { - "source": "iana" - }, - "application/vnd.ibm.minipay": { - "source": "iana", - "extensions": ["mpy"] - }, - "application/vnd.ibm.modcap": { - "source": "iana", - "extensions": ["afp","listafp","list3820"] - }, - "application/vnd.ibm.rights-management": { - "source": "iana", - "extensions": ["irm"] - }, - "application/vnd.ibm.secure-container": { - "source": "iana", - "extensions": ["sc"] - }, - "application/vnd.iccprofile": { - "source": "iana", - "extensions": ["icc","icm"] - }, - "application/vnd.ieee.1905": { - "source": "iana" - }, - "application/vnd.igloader": { - "source": "iana", - "extensions": ["igl"] - }, - "application/vnd.immervision-ivp": { - "source": "iana", - "extensions": ["ivp"] - }, - "application/vnd.immervision-ivu": { - "source": "iana", - "extensions": ["ivu"] - }, - "application/vnd.ims.imsccv1p1": { - "source": "iana" - }, - "application/vnd.ims.imsccv1p2": { - "source": "iana" - }, - "application/vnd.ims.lis.v2.result+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolconsumerprofile+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolproxy+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolproxy.id+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolsettings+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolsettings.simple+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.informedcontrol.rms+xml": { - "source": "iana" - }, - "application/vnd.informix-visionary": { - "source": "iana" - }, - "application/vnd.infotech.project": { - "source": "iana" - }, - "application/vnd.infotech.project+xml": { - "source": "iana" - }, - "application/vnd.innopath.wamp.notification": { - "source": "iana" - }, - "application/vnd.insors.igm": { - "source": "iana", - "extensions": ["igm"] - }, - "application/vnd.intercon.formnet": { - "source": "iana", - "extensions": ["xpw","xpx"] - }, - "application/vnd.intergeo": { - "source": "iana", - "extensions": ["i2g"] - }, - "application/vnd.intertrust.digibox": { - "source": "iana" - }, - "application/vnd.intertrust.nncp": { - "source": "iana" - }, - "application/vnd.intu.qbo": { - "source": "iana", - "extensions": ["qbo"] - }, - "application/vnd.intu.qfx": { - "source": "iana", - "extensions": ["qfx"] - }, - "application/vnd.iptc.g2.catalogitem+xml": { - "source": "iana" - }, - "application/vnd.iptc.g2.conceptitem+xml": { - "source": "iana" - }, - "application/vnd.iptc.g2.knowledgeitem+xml": { - "source": "iana" - }, - "application/vnd.iptc.g2.newsitem+xml": { - "source": "iana" - }, - "application/vnd.iptc.g2.newsmessage+xml": { - "source": "iana" - }, - "application/vnd.iptc.g2.packageitem+xml": { - "source": "iana" - }, - "application/vnd.iptc.g2.planningitem+xml": { - "source": "iana" - }, - "application/vnd.ipunplugged.rcprofile": { - "source": "iana", - "extensions": ["rcprofile"] - }, - "application/vnd.irepository.package+xml": { - "source": "iana", - "extensions": ["irp"] - }, - "application/vnd.is-xpr": { - "source": "iana", - "extensions": ["xpr"] - }, - "application/vnd.isac.fcs": { - "source": "iana", - "extensions": ["fcs"] - }, - "application/vnd.jam": { - "source": "iana", - "extensions": ["jam"] - }, - "application/vnd.japannet-directory-service": { - "source": "iana" - }, - "application/vnd.japannet-jpnstore-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-payment-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-registration": { - "source": "iana" - }, - "application/vnd.japannet-registration-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-setstore-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-verification": { - "source": "iana" - }, - "application/vnd.japannet-verification-wakeup": { - "source": "iana" - }, - "application/vnd.jcp.javame.midlet-rms": { - "source": "iana", - "extensions": ["rms"] - }, - "application/vnd.jisp": { - "source": "iana", - "extensions": ["jisp"] - }, - "application/vnd.joost.joda-archive": { - "source": "iana", - "extensions": ["joda"] - }, - "application/vnd.jsk.isdn-ngn": { - "source": "iana" - }, - "application/vnd.kahootz": { - "source": "iana", - "extensions": ["ktz","ktr"] - }, - "application/vnd.kde.karbon": { - "source": "iana", - "extensions": ["karbon"] - }, - "application/vnd.kde.kchart": { - "source": "iana", - "extensions": ["chrt"] - }, - "application/vnd.kde.kformula": { - "source": "iana", - "extensions": ["kfo"] - }, - "application/vnd.kde.kivio": { - "source": "iana", - "extensions": ["flw"] - }, - "application/vnd.kde.kontour": { - "source": "iana", - "extensions": ["kon"] - }, - "application/vnd.kde.kpresenter": { - "source": "iana", - "extensions": ["kpr","kpt"] - }, - "application/vnd.kde.kspread": { - "source": "iana", - "extensions": ["ksp"] - }, - "application/vnd.kde.kword": { - "source": "iana", - "extensions": ["kwd","kwt"] - }, - "application/vnd.kenameaapp": { - "source": "iana", - "extensions": ["htke"] - }, - "application/vnd.kidspiration": { - "source": "iana", - "extensions": ["kia"] - }, - "application/vnd.kinar": { - "source": "iana", - "extensions": ["kne","knp"] - }, - "application/vnd.koan": { - "source": "iana", - "extensions": ["skp","skd","skt","skm"] - }, - "application/vnd.kodak-descriptor": { - "source": "iana", - "extensions": ["sse"] - }, - "application/vnd.las.las+xml": { - "source": "iana", - "extensions": ["lasxml"] - }, - "application/vnd.liberty-request+xml": { - "source": "iana" - }, - "application/vnd.llamagraphics.life-balance.desktop": { - "source": "iana", - "extensions": ["lbd"] - }, - "application/vnd.llamagraphics.life-balance.exchange+xml": { - "source": "iana", - "extensions": ["lbe"] - }, - "application/vnd.lotus-1-2-3": { - "source": "iana", - "extensions": ["123"] - }, - "application/vnd.lotus-approach": { - "source": "iana", - "extensions": ["apr"] - }, - "application/vnd.lotus-freelance": { - "source": "iana", - "extensions": ["pre"] - }, - "application/vnd.lotus-notes": { - "source": "iana", - "extensions": ["nsf"] - }, - "application/vnd.lotus-organizer": { - "source": "iana", - "extensions": ["org"] - }, - "application/vnd.lotus-screencam": { - "source": "iana", - "extensions": ["scm"] - }, - "application/vnd.lotus-wordpro": { - "source": "iana", - "extensions": ["lwp"] - }, - "application/vnd.macports.portpkg": { - "source": "iana", - "extensions": ["portpkg"] - }, - "application/vnd.marlin.drm.actiontoken+xml": { - "source": "iana" - }, - "application/vnd.marlin.drm.conftoken+xml": { - "source": "iana" - }, - "application/vnd.marlin.drm.license+xml": { - "source": "iana" - }, - "application/vnd.marlin.drm.mdcf": { - "source": "iana" - }, - "application/vnd.mason+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.maxmind.maxmind-db": { - "source": "iana" - }, - "application/vnd.mcd": { - "source": "iana", - "extensions": ["mcd"] - }, - "application/vnd.medcalcdata": { - "source": "iana", - "extensions": ["mc1"] - }, - "application/vnd.mediastation.cdkey": { - "source": "iana", - "extensions": ["cdkey"] - }, - "application/vnd.meridian-slingshot": { - "source": "iana" - }, - "application/vnd.mfer": { - "source": "iana", - "extensions": ["mwf"] - }, - "application/vnd.mfmp": { - "source": "iana", - "extensions": ["mfm"] - }, - "application/vnd.micrografx.flo": { - "source": "iana", - "extensions": ["flo"] - }, - "application/vnd.micrografx.igx": { - "source": "iana", - "extensions": ["igx"] - }, - "application/vnd.miele+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.mif": { - "source": "iana", - "extensions": ["mif"] - }, - "application/vnd.minisoft-hp3000-save": { - "source": "iana" - }, - "application/vnd.mitsubishi.misty-guard.trustweb": { - "source": "iana" - }, - "application/vnd.mobius.daf": { - "source": "iana", - "extensions": ["daf"] - }, - "application/vnd.mobius.dis": { - "source": "iana", - "extensions": ["dis"] - }, - "application/vnd.mobius.mbk": { - "source": "iana", - "extensions": ["mbk"] - }, - "application/vnd.mobius.mqy": { - "source": "iana", - "extensions": ["mqy"] - }, - "application/vnd.mobius.msl": { - "source": "iana", - "extensions": ["msl"] - }, - "application/vnd.mobius.plc": { - "source": "iana", - "extensions": ["plc"] - }, - "application/vnd.mobius.txf": { - "source": "iana", - "extensions": ["txf"] - }, - "application/vnd.mophun.application": { - "source": "iana", - "extensions": ["mpn"] - }, - "application/vnd.mophun.certificate": { - "source": "iana", - "extensions": ["mpc"] - }, - "application/vnd.motorola.flexsuite": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.adsi": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.fis": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.gotap": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.kmr": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.ttc": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.wem": { - "source": "iana" - }, - "application/vnd.motorola.iprm": { - "source": "iana" - }, - "application/vnd.mozilla.xul+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xul"] - }, - "application/vnd.ms-3mfdocument": { - "source": "iana" - }, - "application/vnd.ms-artgalry": { - "source": "iana", - "extensions": ["cil"] - }, - "application/vnd.ms-asf": { - "source": "iana" - }, - "application/vnd.ms-cab-compressed": { - "source": "iana", - "extensions": ["cab"] - }, - "application/vnd.ms-color.iccprofile": { - "source": "apache" - }, - "application/vnd.ms-excel": { - "source": "iana", - "compressible": false, - "extensions": ["xls","xlm","xla","xlc","xlt","xlw"] - }, - "application/vnd.ms-excel.addin.macroenabled.12": { - "source": "iana", - "extensions": ["xlam"] - }, - "application/vnd.ms-excel.sheet.binary.macroenabled.12": { - "source": "iana", - "extensions": ["xlsb"] - }, - "application/vnd.ms-excel.sheet.macroenabled.12": { - "source": "iana", - "extensions": ["xlsm"] - }, - "application/vnd.ms-excel.template.macroenabled.12": { - "source": "iana", - "extensions": ["xltm"] - }, - "application/vnd.ms-fontobject": { - "source": "iana", - "compressible": true, - "extensions": ["eot"] - }, - "application/vnd.ms-htmlhelp": { - "source": "iana", - "extensions": ["chm"] - }, - "application/vnd.ms-ims": { - "source": "iana", - "extensions": ["ims"] - }, - "application/vnd.ms-lrm": { - "source": "iana", - "extensions": ["lrm"] - }, - "application/vnd.ms-office.activex+xml": { - "source": "iana" - }, - "application/vnd.ms-officetheme": { - "source": "iana", - "extensions": ["thmx"] - }, - "application/vnd.ms-opentype": { - "source": "apache", - "compressible": true - }, - "application/vnd.ms-package.obfuscated-opentype": { - "source": "apache" - }, - "application/vnd.ms-pki.seccat": { - "source": "apache", - "extensions": ["cat"] - }, - "application/vnd.ms-pki.stl": { - "source": "apache", - "extensions": ["stl"] - }, - "application/vnd.ms-playready.initiator+xml": { - "source": "iana" - }, - "application/vnd.ms-powerpoint": { - "source": "iana", - "compressible": false, - "extensions": ["ppt","pps","pot"] - }, - "application/vnd.ms-powerpoint.addin.macroenabled.12": { - "source": "iana", - "extensions": ["ppam"] - }, - "application/vnd.ms-powerpoint.presentation.macroenabled.12": { - "source": "iana", - "extensions": ["pptm"] - }, - "application/vnd.ms-powerpoint.slide.macroenabled.12": { - "source": "iana", - "extensions": ["sldm"] - }, - "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { - "source": "iana", - "extensions": ["ppsm"] - }, - "application/vnd.ms-powerpoint.template.macroenabled.12": { - "source": "iana", - "extensions": ["potm"] - }, - "application/vnd.ms-printing.printticket+xml": { - "source": "apache" - }, - "application/vnd.ms-project": { - "source": "iana", - "extensions": ["mpp","mpt"] - }, - "application/vnd.ms-tnef": { - "source": "iana" - }, - "application/vnd.ms-windows.printerpairing": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.lic-chlg-req": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.lic-resp": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.meter-chlg-req": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.meter-resp": { - "source": "iana" - }, - "application/vnd.ms-word.document.macroenabled.12": { - "source": "iana", - "extensions": ["docm"] - }, - "application/vnd.ms-word.template.macroenabled.12": { - "source": "iana", - "extensions": ["dotm"] - }, - "application/vnd.ms-works": { - "source": "iana", - "extensions": ["wps","wks","wcm","wdb"] - }, - "application/vnd.ms-wpl": { - "source": "iana", - "extensions": ["wpl"] - }, - "application/vnd.ms-xpsdocument": { - "source": "iana", - "compressible": false, - "extensions": ["xps"] - }, - "application/vnd.mseq": { - "source": "iana", - "extensions": ["mseq"] - }, - "application/vnd.msign": { - "source": "iana" - }, - "application/vnd.multiad.creator": { - "source": "iana" - }, - "application/vnd.multiad.creator.cif": { - "source": "iana" - }, - "application/vnd.music-niff": { - "source": "iana" - }, - "application/vnd.musician": { - "source": "iana", - "extensions": ["mus"] - }, - "application/vnd.muvee.style": { - "source": "iana", - "extensions": ["msty"] - }, - "application/vnd.mynfc": { - "source": "iana", - "extensions": ["taglet"] - }, - "application/vnd.ncd.control": { - "source": "iana" - }, - "application/vnd.ncd.reference": { - "source": "iana" - }, - "application/vnd.nervana": { - "source": "iana" - }, - "application/vnd.netfpx": { - "source": "iana" - }, - "application/vnd.neurolanguage.nlu": { - "source": "iana", - "extensions": ["nlu"] - }, - "application/vnd.nintendo.nitro.rom": { - "source": "iana" - }, - "application/vnd.nintendo.snes.rom": { - "source": "iana" - }, - "application/vnd.nitf": { - "source": "iana", - "extensions": ["ntf","nitf"] - }, - "application/vnd.noblenet-directory": { - "source": "iana", - "extensions": ["nnd"] - }, - "application/vnd.noblenet-sealer": { - "source": "iana", - "extensions": ["nns"] - }, - "application/vnd.noblenet-web": { - "source": "iana", - "extensions": ["nnw"] - }, - "application/vnd.nokia.catalogs": { - "source": "iana" - }, - "application/vnd.nokia.conml+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.conml+xml": { - "source": "iana" - }, - "application/vnd.nokia.iptv.config+xml": { - "source": "iana" - }, - "application/vnd.nokia.isds-radio-presets": { - "source": "iana" - }, - "application/vnd.nokia.landmark+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.landmark+xml": { - "source": "iana" - }, - "application/vnd.nokia.landmarkcollection+xml": { - "source": "iana" - }, - "application/vnd.nokia.n-gage.ac+xml": { - "source": "iana" - }, - "application/vnd.nokia.n-gage.data": { - "source": "iana", - "extensions": ["ngdat"] - }, - "application/vnd.nokia.n-gage.symbian.install": { - "source": "iana" - }, - "application/vnd.nokia.ncd": { - "source": "iana" - }, - "application/vnd.nokia.pcd+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.pcd+xml": { - "source": "iana" - }, - "application/vnd.nokia.radio-preset": { - "source": "iana", - "extensions": ["rpst"] - }, - "application/vnd.nokia.radio-presets": { - "source": "iana", - "extensions": ["rpss"] - }, - "application/vnd.novadigm.edm": { - "source": "iana", - "extensions": ["edm"] - }, - "application/vnd.novadigm.edx": { - "source": "iana", - "extensions": ["edx"] - }, - "application/vnd.novadigm.ext": { - "source": "iana", - "extensions": ["ext"] - }, - "application/vnd.ntt-local.content-share": { - "source": "iana" - }, - "application/vnd.ntt-local.file-transfer": { - "source": "iana" - }, - "application/vnd.ntt-local.ogw_remote-access": { - "source": "iana" - }, - "application/vnd.ntt-local.sip-ta_remote": { - "source": "iana" - }, - "application/vnd.ntt-local.sip-ta_tcp_stream": { - "source": "iana" - }, - "application/vnd.oasis.opendocument.chart": { - "source": "iana", - "extensions": ["odc"] - }, - "application/vnd.oasis.opendocument.chart-template": { - "source": "iana", - "extensions": ["otc"] - }, - "application/vnd.oasis.opendocument.database": { - "source": "iana", - "extensions": ["odb"] - }, - "application/vnd.oasis.opendocument.formula": { - "source": "iana", - "extensions": ["odf"] - }, - "application/vnd.oasis.opendocument.formula-template": { - "source": "iana", - "extensions": ["odft"] - }, - "application/vnd.oasis.opendocument.graphics": { - "source": "iana", - "compressible": false, - "extensions": ["odg"] - }, - "application/vnd.oasis.opendocument.graphics-template": { - "source": "iana", - "extensions": ["otg"] - }, - "application/vnd.oasis.opendocument.image": { - "source": "iana", - "extensions": ["odi"] - }, - "application/vnd.oasis.opendocument.image-template": { - "source": "iana", - "extensions": ["oti"] - }, - "application/vnd.oasis.opendocument.presentation": { - "source": "iana", - "compressible": false, - "extensions": ["odp"] - }, - "application/vnd.oasis.opendocument.presentation-template": { - "source": "iana", - "extensions": ["otp"] - }, - "application/vnd.oasis.opendocument.spreadsheet": { - "source": "iana", - "compressible": false, - "extensions": ["ods"] - }, - "application/vnd.oasis.opendocument.spreadsheet-template": { - "source": "iana", - "extensions": ["ots"] - }, - "application/vnd.oasis.opendocument.text": { - "source": "iana", - "compressible": false, - "extensions": ["odt"] - }, - "application/vnd.oasis.opendocument.text-master": { - "source": "iana", - "extensions": ["odm"] - }, - "application/vnd.oasis.opendocument.text-template": { - "source": "iana", - "extensions": ["ott"] - }, - "application/vnd.oasis.opendocument.text-web": { - "source": "iana", - "extensions": ["oth"] - }, - "application/vnd.obn": { - "source": "iana" - }, - "application/vnd.oftn.l10n+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.contentaccessdownload+xml": { - "source": "iana" - }, - "application/vnd.oipf.contentaccessstreaming+xml": { - "source": "iana" - }, - "application/vnd.oipf.cspg-hexbinary": { - "source": "iana" - }, - "application/vnd.oipf.dae.svg+xml": { - "source": "iana" - }, - "application/vnd.oipf.dae.xhtml+xml": { - "source": "iana" - }, - "application/vnd.oipf.mippvcontrolmessage+xml": { - "source": "iana" - }, - "application/vnd.oipf.pae.gem": { - "source": "iana" - }, - "application/vnd.oipf.spdiscovery+xml": { - "source": "iana" - }, - "application/vnd.oipf.spdlist+xml": { - "source": "iana" - }, - "application/vnd.oipf.ueprofile+xml": { - "source": "iana" - }, - "application/vnd.oipf.userprofile+xml": { - "source": "iana" - }, - "application/vnd.olpc-sugar": { - "source": "iana", - "extensions": ["xo"] - }, - "application/vnd.oma-scws-config": { - "source": "iana" - }, - "application/vnd.oma-scws-http-request": { - "source": "iana" - }, - "application/vnd.oma-scws-http-response": { - "source": "iana" - }, - "application/vnd.oma.bcast.associated-procedure-parameter+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.drm-trigger+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.imd+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.ltkm": { - "source": "iana" - }, - "application/vnd.oma.bcast.notification+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.provisioningtrigger": { - "source": "iana" - }, - "application/vnd.oma.bcast.sgboot": { - "source": "iana" - }, - "application/vnd.oma.bcast.sgdd+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.sgdu": { - "source": "iana" - }, - "application/vnd.oma.bcast.simple-symbol-container": { - "source": "iana" - }, - "application/vnd.oma.bcast.smartcard-trigger+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.sprov+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.stkm": { - "source": "iana" - }, - "application/vnd.oma.cab-address-book+xml": { - "source": "iana" - }, - "application/vnd.oma.cab-feature-handler+xml": { - "source": "iana" - }, - "application/vnd.oma.cab-pcc+xml": { - "source": "iana" - }, - "application/vnd.oma.cab-subs-invite+xml": { - "source": "iana" - }, - "application/vnd.oma.cab-user-prefs+xml": { - "source": "iana" - }, - "application/vnd.oma.dcd": { - "source": "iana" - }, - "application/vnd.oma.dcdc": { - "source": "iana" - }, - "application/vnd.oma.dd2+xml": { - "source": "iana", - "extensions": ["dd2"] - }, - "application/vnd.oma.drm.risd+xml": { - "source": "iana" - }, - "application/vnd.oma.group-usage-list+xml": { - "source": "iana" - }, - "application/vnd.oma.pal+xml": { - "source": "iana" - }, - "application/vnd.oma.poc.detailed-progress-report+xml": { - "source": "iana" - }, - "application/vnd.oma.poc.final-report+xml": { - "source": "iana" - }, - "application/vnd.oma.poc.groups+xml": { - "source": "iana" - }, - "application/vnd.oma.poc.invocation-descriptor+xml": { - "source": "iana" - }, - "application/vnd.oma.poc.optimized-progress-report+xml": { - "source": "iana" - }, - "application/vnd.oma.push": { - "source": "iana" - }, - "application/vnd.oma.scidm.messages+xml": { - "source": "iana" - }, - "application/vnd.oma.xcap-directory+xml": { - "source": "iana" - }, - "application/vnd.omads-email+xml": { - "source": "iana" - }, - "application/vnd.omads-file+xml": { - "source": "iana" - }, - "application/vnd.omads-folder+xml": { - "source": "iana" - }, - "application/vnd.omaloc-supl-init": { - "source": "iana" - }, - "application/vnd.openeye.oeb": { - "source": "iana" - }, - "application/vnd.openofficeorg.extension": { - "source": "apache", - "extensions": ["oxt"] - }, - "application/vnd.openxmlformats-officedocument.custom-properties+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawing+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.extended-properties+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml-template": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.presentation": { - "source": "iana", - "compressible": false, - "extensions": ["pptx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.slide": { - "source": "iana", - "extensions": ["sldx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { - "source": "iana", - "extensions": ["ppsx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.template": { - "source": "apache", - "extensions": ["potx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml-template": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { - "source": "iana", - "compressible": false, - "extensions": ["xlsx"] - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { - "source": "apache", - "extensions": ["xltx"] - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.theme+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.themeoverride+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.vmldrawing": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml-template": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { - "source": "iana", - "compressible": false, - "extensions": ["docx"] - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { - "source": "apache", - "extensions": ["dotx"] - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-package.core-properties+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-package.relationships+xml": { - "source": "iana" - }, - "application/vnd.oracle.resource+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.orange.indata": { - "source": "iana" - }, - "application/vnd.osa.netdeploy": { - "source": "iana" - }, - "application/vnd.osgeo.mapguide.package": { - "source": "iana", - "extensions": ["mgp"] - }, - "application/vnd.osgi.bundle": { - "source": "iana" - }, - "application/vnd.osgi.dp": { - "source": "iana", - "extensions": ["dp"] - }, - "application/vnd.osgi.subsystem": { - "source": "iana", - "extensions": ["esa"] - }, - "application/vnd.otps.ct-kip+xml": { - "source": "iana" - }, - "application/vnd.palm": { - "source": "iana", - "extensions": ["pdb","pqa","oprc"] - }, - "application/vnd.panoply": { - "source": "iana" - }, - "application/vnd.paos+xml": { - "source": "iana" - }, - "application/vnd.paos.xml": { - "source": "apache" - }, - "application/vnd.pawaafile": { - "source": "iana", - "extensions": ["paw"] - }, - "application/vnd.pcos": { - "source": "iana" - }, - "application/vnd.pg.format": { - "source": "iana", - "extensions": ["str"] - }, - "application/vnd.pg.osasli": { - "source": "iana", - "extensions": ["ei6"] - }, - "application/vnd.piaccess.application-licence": { - "source": "iana" - }, - "application/vnd.picsel": { - "source": "iana", - "extensions": ["efif"] - }, - "application/vnd.pmi.widget": { - "source": "iana", - "extensions": ["wg"] - }, - "application/vnd.poc.group-advertisement+xml": { - "source": "iana" - }, - "application/vnd.pocketlearn": { - "source": "iana", - "extensions": ["plf"] - }, - "application/vnd.powerbuilder6": { - "source": "iana", - "extensions": ["pbd"] - }, - "application/vnd.powerbuilder6-s": { - "source": "iana" - }, - "application/vnd.powerbuilder7": { - "source": "iana" - }, - "application/vnd.powerbuilder7-s": { - "source": "iana" - }, - "application/vnd.powerbuilder75": { - "source": "iana" - }, - "application/vnd.powerbuilder75-s": { - "source": "iana" - }, - "application/vnd.preminet": { - "source": "iana" - }, - "application/vnd.previewsystems.box": { - "source": "iana", - "extensions": ["box"] - }, - "application/vnd.proteus.magazine": { - "source": "iana", - "extensions": ["mgz"] - }, - "application/vnd.publishare-delta-tree": { - "source": "iana", - "extensions": ["qps"] - }, - "application/vnd.pvi.ptid1": { - "source": "iana", - "extensions": ["ptid"] - }, - "application/vnd.pwg-multiplexed": { - "source": "iana" - }, - "application/vnd.pwg-xhtml-print+xml": { - "source": "iana" - }, - "application/vnd.qualcomm.brew-app-res": { - "source": "iana" - }, - "application/vnd.quark.quarkxpress": { - "source": "iana", - "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"] - }, - "application/vnd.quobject-quoxdocument": { - "source": "iana" - }, - "application/vnd.radisys.moml+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-audit+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-audit-conf+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-audit-conn+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-audit-dialog+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-audit-stream+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-conf+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog-base+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog-fax-detect+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog-group+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog-speech+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog-transform+xml": { - "source": "iana" - }, - "application/vnd.rainstor.data": { - "source": "iana" - }, - "application/vnd.rapid": { - "source": "iana" - }, - "application/vnd.realvnc.bed": { - "source": "iana", - "extensions": ["bed"] - }, - "application/vnd.recordare.musicxml": { - "source": "iana", - "extensions": ["mxl"] - }, - "application/vnd.recordare.musicxml+xml": { - "source": "iana", - "extensions": ["musicxml"] - }, - "application/vnd.renlearn.rlprint": { - "source": "iana" - }, - "application/vnd.rig.cryptonote": { - "source": "iana", - "extensions": ["cryptonote"] - }, - "application/vnd.rim.cod": { - "source": "apache", - "extensions": ["cod"] - }, - "application/vnd.rn-realmedia": { - "source": "apache", - "extensions": ["rm"] - }, - "application/vnd.rn-realmedia-vbr": { - "source": "apache", - "extensions": ["rmvb"] - }, - "application/vnd.route66.link66+xml": { - "source": "iana", - "extensions": ["link66"] - }, - "application/vnd.rs-274x": { - "source": "iana" - }, - "application/vnd.ruckus.download": { - "source": "iana" - }, - "application/vnd.s3sms": { - "source": "iana" - }, - "application/vnd.sailingtracker.track": { - "source": "iana", - "extensions": ["st"] - }, - "application/vnd.sbm.cid": { - "source": "iana" - }, - "application/vnd.sbm.mid2": { - "source": "iana" - }, - "application/vnd.scribus": { - "source": "iana" - }, - "application/vnd.sealed.3df": { - "source": "iana" - }, - "application/vnd.sealed.csf": { - "source": "iana" - }, - "application/vnd.sealed.doc": { - "source": "iana" - }, - "application/vnd.sealed.eml": { - "source": "iana" - }, - "application/vnd.sealed.mht": { - "source": "iana" - }, - "application/vnd.sealed.net": { - "source": "iana" - }, - "application/vnd.sealed.ppt": { - "source": "iana" - }, - "application/vnd.sealed.tiff": { - "source": "iana" - }, - "application/vnd.sealed.xls": { - "source": "iana" - }, - "application/vnd.sealedmedia.softseal.html": { - "source": "iana" - }, - "application/vnd.sealedmedia.softseal.pdf": { - "source": "iana" - }, - "application/vnd.seemail": { - "source": "iana", - "extensions": ["see"] - }, - "application/vnd.sema": { - "source": "iana", - "extensions": ["sema"] - }, - "application/vnd.semd": { - "source": "iana", - "extensions": ["semd"] - }, - "application/vnd.semf": { - "source": "iana", - "extensions": ["semf"] - }, - "application/vnd.shana.informed.formdata": { - "source": "iana", - "extensions": ["ifm"] - }, - "application/vnd.shana.informed.formtemplate": { - "source": "iana", - "extensions": ["itp"] - }, - "application/vnd.shana.informed.interchange": { - "source": "iana", - "extensions": ["iif"] - }, - "application/vnd.shana.informed.package": { - "source": "iana", - "extensions": ["ipk"] - }, - "application/vnd.simtech-mindmapper": { - "source": "iana", - "extensions": ["twd","twds"] - }, - "application/vnd.siren+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.smaf": { - "source": "iana", - "extensions": ["mmf"] - }, - "application/vnd.smart.notebook": { - "source": "iana" - }, - "application/vnd.smart.teacher": { - "source": "iana", - "extensions": ["teacher"] - }, - "application/vnd.software602.filler.form+xml": { - "source": "iana" - }, - "application/vnd.software602.filler.form-xml-zip": { - "source": "iana" - }, - "application/vnd.solent.sdkm+xml": { - "source": "iana", - "extensions": ["sdkm","sdkd"] - }, - "application/vnd.spotfire.dxp": { - "source": "iana", - "extensions": ["dxp"] - }, - "application/vnd.spotfire.sfs": { - "source": "iana", - "extensions": ["sfs"] - }, - "application/vnd.sss-cod": { - "source": "iana" - }, - "application/vnd.sss-dtf": { - "source": "iana" - }, - "application/vnd.sss-ntf": { - "source": "iana" - }, - "application/vnd.stardivision.calc": { - "source": "apache", - "extensions": ["sdc"] - }, - "application/vnd.stardivision.draw": { - "source": "apache", - "extensions": ["sda"] - }, - "application/vnd.stardivision.impress": { - "source": "apache", - "extensions": ["sdd"] - }, - "application/vnd.stardivision.math": { - "source": "apache", - "extensions": ["smf"] - }, - "application/vnd.stardivision.writer": { - "source": "apache", - "extensions": ["sdw","vor"] - }, - "application/vnd.stardivision.writer-global": { - "source": "apache", - "extensions": ["sgl"] - }, - "application/vnd.stepmania.package": { - "source": "iana", - "extensions": ["smzip"] - }, - "application/vnd.stepmania.stepchart": { - "source": "iana", - "extensions": ["sm"] - }, - "application/vnd.street-stream": { - "source": "iana" - }, - "application/vnd.sun.wadl+xml": { - "source": "iana" - }, - "application/vnd.sun.xml.calc": { - "source": "apache", - "extensions": ["sxc"] - }, - "application/vnd.sun.xml.calc.template": { - "source": "apache", - "extensions": ["stc"] - }, - "application/vnd.sun.xml.draw": { - "source": "apache", - "extensions": ["sxd"] - }, - "application/vnd.sun.xml.draw.template": { - "source": "apache", - "extensions": ["std"] - }, - "application/vnd.sun.xml.impress": { - "source": "apache", - "extensions": ["sxi"] - }, - "application/vnd.sun.xml.impress.template": { - "source": "apache", - "extensions": ["sti"] - }, - "application/vnd.sun.xml.math": { - "source": "apache", - "extensions": ["sxm"] - }, - "application/vnd.sun.xml.writer": { - "source": "apache", - "extensions": ["sxw"] - }, - "application/vnd.sun.xml.writer.global": { - "source": "apache", - "extensions": ["sxg"] - }, - "application/vnd.sun.xml.writer.template": { - "source": "apache", - "extensions": ["stw"] - }, - "application/vnd.sus-calendar": { - "source": "iana", - "extensions": ["sus","susp"] - }, - "application/vnd.svd": { - "source": "iana", - "extensions": ["svd"] - }, - "application/vnd.swiftview-ics": { - "source": "iana" - }, - "application/vnd.symbian.install": { - "source": "apache", - "extensions": ["sis","sisx"] - }, - "application/vnd.syncml+xml": { - "source": "iana", - "extensions": ["xsm"] - }, - "application/vnd.syncml.dm+wbxml": { - "source": "iana", - "extensions": ["bdm"] - }, - "application/vnd.syncml.dm+xml": { - "source": "iana", - "extensions": ["xdm"] - }, - "application/vnd.syncml.dm.notification": { - "source": "iana" - }, - "application/vnd.syncml.dmddf+wbxml": { - "source": "iana" - }, - "application/vnd.syncml.dmddf+xml": { - "source": "iana" - }, - "application/vnd.syncml.dmtnds+wbxml": { - "source": "iana" - }, - "application/vnd.syncml.dmtnds+xml": { - "source": "iana" - }, - "application/vnd.syncml.ds.notification": { - "source": "iana" - }, - "application/vnd.tao.intent-module-archive": { - "source": "iana", - "extensions": ["tao"] - }, - "application/vnd.tcpdump.pcap": { - "source": "iana", - "extensions": ["pcap","cap","dmp"] - }, - "application/vnd.tmd.mediaflex.api+xml": { - "source": "iana" - }, - "application/vnd.tmobile-livetv": { - "source": "iana", - "extensions": ["tmo"] - }, - "application/vnd.trid.tpt": { - "source": "iana", - "extensions": ["tpt"] - }, - "application/vnd.triscape.mxs": { - "source": "iana", - "extensions": ["mxs"] - }, - "application/vnd.trueapp": { - "source": "iana", - "extensions": ["tra"] - }, - "application/vnd.truedoc": { - "source": "iana" - }, - "application/vnd.ubisoft.webplayer": { - "source": "iana" - }, - "application/vnd.ufdl": { - "source": "iana", - "extensions": ["ufd","ufdl"] - }, - "application/vnd.uiq.theme": { - "source": "iana", - "extensions": ["utz"] - }, - "application/vnd.umajin": { - "source": "iana", - "extensions": ["umj"] - }, - "application/vnd.unity": { - "source": "iana", - "extensions": ["unityweb"] - }, - "application/vnd.uoml+xml": { - "source": "iana", - "extensions": ["uoml"] - }, - "application/vnd.uplanet.alert": { - "source": "iana" - }, - "application/vnd.uplanet.alert-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.bearer-choice": { - "source": "iana" - }, - "application/vnd.uplanet.bearer-choice-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.cacheop": { - "source": "iana" - }, - "application/vnd.uplanet.cacheop-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.channel": { - "source": "iana" - }, - "application/vnd.uplanet.channel-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.list": { - "source": "iana" - }, - "application/vnd.uplanet.list-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.listcmd": { - "source": "iana" - }, - "application/vnd.uplanet.listcmd-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.signal": { - "source": "iana" - }, - "application/vnd.valve.source.material": { - "source": "iana" - }, - "application/vnd.vcx": { - "source": "iana", - "extensions": ["vcx"] - }, - "application/vnd.vd-study": { - "source": "iana" - }, - "application/vnd.vectorworks": { - "source": "iana" - }, - "application/vnd.verimatrix.vcas": { - "source": "iana" - }, - "application/vnd.vidsoft.vidconference": { - "source": "iana" - }, - "application/vnd.visio": { - "source": "iana", - "extensions": ["vsd","vst","vss","vsw"] - }, - "application/vnd.visionary": { - "source": "iana", - "extensions": ["vis"] - }, - "application/vnd.vividence.scriptfile": { - "source": "iana" - }, - "application/vnd.vsf": { - "source": "iana", - "extensions": ["vsf"] - }, - "application/vnd.wap.sic": { - "source": "iana" - }, - "application/vnd.wap.slc": { - "source": "iana" - }, - "application/vnd.wap.wbxml": { - "source": "iana", - "extensions": ["wbxml"] - }, - "application/vnd.wap.wmlc": { - "source": "iana", - "extensions": ["wmlc"] - }, - "application/vnd.wap.wmlscriptc": { - "source": "iana", - "extensions": ["wmlsc"] - }, - "application/vnd.webturbo": { - "source": "iana", - "extensions": ["wtb"] - }, - "application/vnd.wfa.p2p": { - "source": "iana" - }, - "application/vnd.wfa.wsc": { - "source": "iana" - }, - "application/vnd.windows.devicepairing": { - "source": "iana" - }, - "application/vnd.wmc": { - "source": "iana" - }, - "application/vnd.wmf.bootstrap": { - "source": "iana" - }, - "application/vnd.wolfram.mathematica": { - "source": "iana" - }, - "application/vnd.wolfram.mathematica.package": { - "source": "iana" - }, - "application/vnd.wolfram.player": { - "source": "iana", - "extensions": ["nbp"] - }, - "application/vnd.wordperfect": { - "source": "iana", - "extensions": ["wpd"] - }, - "application/vnd.wqd": { - "source": "iana", - "extensions": ["wqd"] - }, - "application/vnd.wrq-hp3000-labelled": { - "source": "iana" - }, - "application/vnd.wt.stf": { - "source": "iana", - "extensions": ["stf"] - }, - "application/vnd.wv.csp+wbxml": { - "source": "iana" - }, - "application/vnd.wv.csp+xml": { - "source": "iana" - }, - "application/vnd.wv.ssp+xml": { - "source": "iana" - }, - "application/vnd.xacml+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.xara": { - "source": "iana", - "extensions": ["xar"] - }, - "application/vnd.xfdl": { - "source": "iana", - "extensions": ["xfdl"] - }, - "application/vnd.xfdl.webform": { - "source": "iana" - }, - "application/vnd.xmi+xml": { - "source": "iana" - }, - "application/vnd.xmpie.cpkg": { - "source": "iana" - }, - "application/vnd.xmpie.dpkg": { - "source": "iana" - }, - "application/vnd.xmpie.plan": { - "source": "iana" - }, - "application/vnd.xmpie.ppkg": { - "source": "iana" - }, - "application/vnd.xmpie.xlim": { - "source": "iana" - }, - "application/vnd.yamaha.hv-dic": { - "source": "iana", - "extensions": ["hvd"] - }, - "application/vnd.yamaha.hv-script": { - "source": "iana", - "extensions": ["hvs"] - }, - "application/vnd.yamaha.hv-voice": { - "source": "iana", - "extensions": ["hvp"] - }, - "application/vnd.yamaha.openscoreformat": { - "source": "iana", - "extensions": ["osf"] - }, - "application/vnd.yamaha.openscoreformat.osfpvg+xml": { - "source": "iana", - "extensions": ["osfpvg"] - }, - "application/vnd.yamaha.remote-setup": { - "source": "iana" - }, - "application/vnd.yamaha.smaf-audio": { - "source": "iana", - "extensions": ["saf"] - }, - "application/vnd.yamaha.smaf-phrase": { - "source": "iana", - "extensions": ["spf"] - }, - "application/vnd.yamaha.through-ngn": { - "source": "iana" - }, - "application/vnd.yamaha.tunnel-udpencap": { - "source": "iana" - }, - "application/vnd.yaoweme": { - "source": "iana" - }, - "application/vnd.yellowriver-custom-menu": { - "source": "iana", - "extensions": ["cmp"] - }, - "application/vnd.zul": { - "source": "iana", - "extensions": ["zir","zirz"] - }, - "application/vnd.zzazz.deck+xml": { - "source": "iana", - "extensions": ["zaz"] - }, - "application/voicexml+xml": { - "source": "iana", - "extensions": ["vxml"] - }, - "application/vq-rtcpxr": { - "source": "iana" - }, - "application/watcherinfo+xml": { - "source": "iana" - }, - "application/whoispp-query": { - "source": "iana" - }, - "application/whoispp-response": { - "source": "iana" - }, - "application/widget": { - "source": "iana", - "extensions": ["wgt"] - }, - "application/winhlp": { - "source": "apache", - "extensions": ["hlp"] - }, - "application/wita": { - "source": "iana" - }, - "application/wordperfect5.1": { - "source": "iana" - }, - "application/wsdl+xml": { - "source": "iana", - "extensions": ["wsdl"] - }, - "application/wspolicy+xml": { - "source": "iana", - "extensions": ["wspolicy"] - }, - "application/x-7z-compressed": { - "source": "apache", - "compressible": false, - "extensions": ["7z"] - }, - "application/x-abiword": { - "source": "apache", - "extensions": ["abw"] - }, - "application/x-ace-compressed": { - "source": "apache", - "extensions": ["ace"] - }, - "application/x-amf": { - "source": "apache" - }, - "application/x-apple-diskimage": { - "source": "apache", - "extensions": ["dmg"] - }, - "application/x-authorware-bin": { - "source": "apache", - "extensions": ["aab","x32","u32","vox"] - }, - "application/x-authorware-map": { - "source": "apache", - "extensions": ["aam"] - }, - "application/x-authorware-seg": { - "source": "apache", - "extensions": ["aas"] - }, - "application/x-bcpio": { - "source": "apache", - "extensions": ["bcpio"] - }, - "application/x-bittorrent": { - "source": "apache", - "extensions": ["torrent"] - }, - "application/x-blorb": { - "source": "apache", - "extensions": ["blb","blorb"] - }, - "application/x-bzip": { - "source": "apache", - "compressible": false, - "extensions": ["bz"] - }, - "application/x-bzip2": { - "source": "apache", - "compressible": false, - "extensions": ["bz2","boz"] - }, - "application/x-cbr": { - "source": "apache", - "extensions": ["cbr","cba","cbt","cbz","cb7"] - }, - "application/x-cdlink": { - "source": "apache", - "extensions": ["vcd"] - }, - "application/x-cfs-compressed": { - "source": "apache", - "extensions": ["cfs"] - }, - "application/x-chat": { - "source": "apache", - "extensions": ["chat"] - }, - "application/x-chess-pgn": { - "source": "apache", - "extensions": ["pgn"] - }, - "application/x-chrome-extension": { - "extensions": ["crx"] - }, - "application/x-compress": { - "source": "apache" - }, - "application/x-conference": { - "source": "apache", - "extensions": ["nsc"] - }, - "application/x-cpio": { - "source": "apache", - "extensions": ["cpio"] - }, - "application/x-csh": { - "source": "apache", - "extensions": ["csh"] - }, - "application/x-deb": { - "compressible": false - }, - "application/x-debian-package": { - "source": "apache", - "extensions": ["deb","udeb"] - }, - "application/x-dgc-compressed": { - "source": "apache", - "extensions": ["dgc"] - }, - "application/x-director": { - "source": "apache", - "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"] - }, - "application/x-doom": { - "source": "apache", - "extensions": ["wad"] - }, - "application/x-dtbncx+xml": { - "source": "apache", - "extensions": ["ncx"] - }, - "application/x-dtbook+xml": { - "source": "apache", - "extensions": ["dtb"] - }, - "application/x-dtbresource+xml": { - "source": "apache", - "extensions": ["res"] - }, - "application/x-dvi": { - "source": "apache", - "compressible": false, - "extensions": ["dvi"] - }, - "application/x-envoy": { - "source": "apache", - "extensions": ["evy"] - }, - "application/x-eva": { - "source": "apache", - "extensions": ["eva"] - }, - "application/x-font-bdf": { - "source": "apache", - "extensions": ["bdf"] - }, - "application/x-font-dos": { - "source": "apache" - }, - "application/x-font-framemaker": { - "source": "apache" - }, - "application/x-font-ghostscript": { - "source": "apache", - "extensions": ["gsf"] - }, - "application/x-font-libgrx": { - "source": "apache" - }, - "application/x-font-linux-psf": { - "source": "apache", - "extensions": ["psf"] - }, - "application/x-font-otf": { - "source": "apache", - "compressible": true, - "extensions": ["otf"] - }, - "application/x-font-pcf": { - "source": "apache", - "extensions": ["pcf"] - }, - "application/x-font-snf": { - "source": "apache", - "extensions": ["snf"] - }, - "application/x-font-speedo": { - "source": "apache" - }, - "application/x-font-sunos-news": { - "source": "apache" - }, - "application/x-font-ttf": { - "source": "apache", - "compressible": true, - "extensions": ["ttf","ttc"] - }, - "application/x-font-type1": { - "source": "apache", - "extensions": ["pfa","pfb","pfm","afm"] - }, - "application/x-font-vfont": { - "source": "apache" - }, - "application/x-freearc": { - "source": "apache", - "extensions": ["arc"] - }, - "application/x-futuresplash": { - "source": "apache", - "extensions": ["spl"] - }, - "application/x-gca-compressed": { - "source": "apache", - "extensions": ["gca"] - }, - "application/x-glulx": { - "source": "apache", - "extensions": ["ulx"] - }, - "application/x-gnumeric": { - "source": "apache", - "extensions": ["gnumeric"] - }, - "application/x-gramps-xml": { - "source": "apache", - "extensions": ["gramps"] - }, - "application/x-gtar": { - "source": "apache", - "extensions": ["gtar"] - }, - "application/x-gzip": { - "source": "apache" - }, - "application/x-hdf": { - "source": "apache", - "extensions": ["hdf"] - }, - "application/x-install-instructions": { - "source": "apache", - "extensions": ["install"] - }, - "application/x-iso9660-image": { - "source": "apache", - "extensions": ["iso"] - }, - "application/x-java-jnlp-file": { - "source": "apache", - "compressible": false, - "extensions": ["jnlp"] - }, - "application/x-javascript": { - "compressible": true - }, - "application/x-latex": { - "source": "apache", - "compressible": false, - "extensions": ["latex"] - }, - "application/x-lua-bytecode": { - "extensions": ["luac"] - }, - "application/x-lzh-compressed": { - "source": "apache", - "extensions": ["lzh","lha"] - }, - "application/x-mie": { - "source": "apache", - "extensions": ["mie"] - }, - "application/x-mobipocket-ebook": { - "source": "apache", - "extensions": ["prc","mobi"] - }, - "application/x-mpegurl": { - "compressible": false - }, - "application/x-ms-application": { - "source": "apache", - "extensions": ["application"] - }, - "application/x-ms-shortcut": { - "source": "apache", - "extensions": ["lnk"] - }, - "application/x-ms-wmd": { - "source": "apache", - "extensions": ["wmd"] - }, - "application/x-ms-wmz": { - "source": "apache", - "extensions": ["wmz"] - }, - "application/x-ms-xbap": { - "source": "apache", - "extensions": ["xbap"] - }, - "application/x-msaccess": { - "source": "apache", - "extensions": ["mdb"] - }, - "application/x-msbinder": { - "source": "apache", - "extensions": ["obd"] - }, - "application/x-mscardfile": { - "source": "apache", - "extensions": ["crd"] - }, - "application/x-msclip": { - "source": "apache", - "extensions": ["clp"] - }, - "application/x-msdownload": { - "source": "apache", - "extensions": ["exe","dll","com","bat","msi"] - }, - "application/x-msmediaview": { - "source": "apache", - "extensions": ["mvb","m13","m14"] - }, - "application/x-msmetafile": { - "source": "apache", - "extensions": ["wmf","wmz","emf","emz"] - }, - "application/x-msmoney": { - "source": "apache", - "extensions": ["mny"] - }, - "application/x-mspublisher": { - "source": "apache", - "extensions": ["pub"] - }, - "application/x-msschedule": { - "source": "apache", - "extensions": ["scd"] - }, - "application/x-msterminal": { - "source": "apache", - "extensions": ["trm"] - }, - "application/x-mswrite": { - "source": "apache", - "extensions": ["wri"] - }, - "application/x-netcdf": { - "source": "apache", - "extensions": ["nc","cdf"] - }, - "application/x-nzb": { - "source": "apache", - "extensions": ["nzb"] - }, - "application/x-pkcs12": { - "source": "apache", - "compressible": false, - "extensions": ["p12","pfx"] - }, - "application/x-pkcs7-certificates": { - "source": "apache", - "extensions": ["p7b","spc"] - }, - "application/x-pkcs7-certreqresp": { - "source": "apache", - "extensions": ["p7r"] - }, - "application/x-rar-compressed": { - "source": "apache", - "compressible": false, - "extensions": ["rar"] - }, - "application/x-research-info-systems": { - "source": "apache", - "extensions": ["ris"] - }, - "application/x-sh": { - "source": "apache", - "compressible": true, - "extensions": ["sh"] - }, - "application/x-shar": { - "source": "apache", - "extensions": ["shar"] - }, - "application/x-shockwave-flash": { - "source": "apache", - "compressible": false, - "extensions": ["swf"] - }, - "application/x-silverlight-app": { - "source": "apache", - "extensions": ["xap"] - }, - "application/x-sql": { - "source": "apache", - "extensions": ["sql"] - }, - "application/x-stuffit": { - "source": "apache", - "compressible": false, - "extensions": ["sit"] - }, - "application/x-stuffitx": { - "source": "apache", - "extensions": ["sitx"] - }, - "application/x-subrip": { - "source": "apache", - "extensions": ["srt"] - }, - "application/x-sv4cpio": { - "source": "apache", - "extensions": ["sv4cpio"] - }, - "application/x-sv4crc": { - "source": "apache", - "extensions": ["sv4crc"] - }, - "application/x-t3vm-image": { - "source": "apache", - "extensions": ["t3"] - }, - "application/x-tads": { - "source": "apache", - "extensions": ["gam"] - }, - "application/x-tar": { - "source": "apache", - "compressible": true, - "extensions": ["tar"] - }, - "application/x-tcl": { - "source": "apache", - "extensions": ["tcl"] - }, - "application/x-tex": { - "source": "apache", - "extensions": ["tex"] - }, - "application/x-tex-tfm": { - "source": "apache", - "extensions": ["tfm"] - }, - "application/x-texinfo": { - "source": "apache", - "extensions": ["texinfo","texi"] - }, - "application/x-tgif": { - "source": "apache", - "extensions": ["obj"] - }, - "application/x-ustar": { - "source": "apache", - "extensions": ["ustar"] - }, - "application/x-wais-source": { - "source": "apache", - "extensions": ["src"] - }, - "application/x-web-app-manifest+json": { - "compressible": true, - "extensions": ["webapp"] - }, - "application/x-www-form-urlencoded": { - "source": "iana", - "compressible": true - }, - "application/x-x509-ca-cert": { - "source": "apache", - "extensions": ["der","crt"] - }, - "application/x-xfig": { - "source": "apache", - "extensions": ["fig"] - }, - "application/x-xliff+xml": { - "source": "apache", - "extensions": ["xlf"] - }, - "application/x-xpinstall": { - "source": "apache", - "compressible": false, - "extensions": ["xpi"] - }, - "application/x-xz": { - "source": "apache", - "extensions": ["xz"] - }, - "application/x-zmachine": { - "source": "apache", - "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"] - }, - "application/x400-bp": { - "source": "iana" - }, - "application/xacml+xml": { - "source": "iana" - }, - "application/xaml+xml": { - "source": "apache", - "extensions": ["xaml"] - }, - "application/xcap-att+xml": { - "source": "iana" - }, - "application/xcap-caps+xml": { - "source": "iana" - }, - "application/xcap-diff+xml": { - "source": "iana", - "extensions": ["xdf"] - }, - "application/xcap-el+xml": { - "source": "iana" - }, - "application/xcap-error+xml": { - "source": "iana" - }, - "application/xcap-ns+xml": { - "source": "iana" - }, - "application/xcon-conference-info+xml": { - "source": "iana" - }, - "application/xcon-conference-info-diff+xml": { - "source": "iana" - }, - "application/xenc+xml": { - "source": "iana", - "extensions": ["xenc"] - }, - "application/xhtml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xhtml","xht"] - }, - "application/xhtml-voice+xml": { - "source": "iana" - }, - "application/xml": { - "source": "iana", - "compressible": true, - "extensions": ["xml","xsl","xsd"] - }, - "application/xml-dtd": { - "source": "iana", - "compressible": true, - "extensions": ["dtd"] - }, - "application/xml-external-parsed-entity": { - "source": "iana" - }, - "application/xml-patch+xml": { - "source": "iana" - }, - "application/xmpp+xml": { - "source": "iana" - }, - "application/xop+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xop"] - }, - "application/xproc+xml": { - "source": "apache", - "extensions": ["xpl"] - }, - "application/xslt+xml": { - "source": "iana", - "extensions": ["xslt"] - }, - "application/xspf+xml": { - "source": "apache", - "extensions": ["xspf"] - }, - "application/xv+xml": { - "source": "iana", - "extensions": ["mxml","xhvml","xvml","xvm"] - }, - "application/yang": { - "source": "iana", - "extensions": ["yang"] - }, - "application/yin+xml": { - "source": "iana", - "extensions": ["yin"] - }, - "application/zip": { - "source": "iana", - "compressible": false, - "extensions": ["zip"] - }, - "application/zlib": { - "source": "iana" - }, - "audio/1d-interleaved-parityfec": { - "source": "iana" - }, - "audio/32kadpcm": { - "source": "iana" - }, - "audio/3gpp": { - "source": "iana" - }, - "audio/3gpp2": { - "source": "iana" - }, - "audio/ac3": { - "source": "iana" - }, - "audio/adpcm": { - "source": "apache", - "extensions": ["adp"] - }, - "audio/amr": { - "source": "iana" - }, - "audio/amr-wb": { - "source": "iana" - }, - "audio/amr-wb+": { - "source": "iana" - }, - "audio/aptx": { - "source": "iana" - }, - "audio/asc": { - "source": "iana" - }, - "audio/atrac-advanced-lossless": { - "source": "iana" - }, - "audio/atrac-x": { - "source": "iana" - }, - "audio/atrac3": { - "source": "iana" - }, - "audio/basic": { - "source": "iana", - "compressible": false, - "extensions": ["au","snd"] - }, - "audio/bv16": { - "source": "iana" - }, - "audio/bv32": { - "source": "iana" - }, - "audio/clearmode": { - "source": "iana" - }, - "audio/cn": { - "source": "iana" - }, - "audio/dat12": { - "source": "iana" - }, - "audio/dls": { - "source": "iana" - }, - "audio/dsr-es201108": { - "source": "iana" - }, - "audio/dsr-es202050": { - "source": "iana" - }, - "audio/dsr-es202211": { - "source": "iana" - }, - "audio/dsr-es202212": { - "source": "iana" - }, - "audio/dv": { - "source": "iana" - }, - "audio/dvi4": { - "source": "iana" - }, - "audio/eac3": { - "source": "iana" - }, - "audio/encaprtp": { - "source": "iana" - }, - "audio/evrc": { - "source": "iana" - }, - "audio/evrc-qcp": { - "source": "iana" - }, - "audio/evrc0": { - "source": "iana" - }, - "audio/evrc1": { - "source": "iana" - }, - "audio/evrcb": { - "source": "iana" - }, - "audio/evrcb0": { - "source": "iana" - }, - "audio/evrcb1": { - "source": "iana" - }, - "audio/evrcnw": { - "source": "iana" - }, - "audio/evrcnw0": { - "source": "iana" - }, - "audio/evrcnw1": { - "source": "iana" - }, - "audio/evrcwb": { - "source": "iana" - }, - "audio/evrcwb0": { - "source": "iana" - }, - "audio/evrcwb1": { - "source": "iana" - }, - "audio/fwdred": { - "source": "iana" - }, - "audio/g719": { - "source": "iana" - }, - "audio/g722": { - "source": "iana" - }, - "audio/g7221": { - "source": "iana" - }, - "audio/g723": { - "source": "iana" - }, - "audio/g726-16": { - "source": "iana" - }, - "audio/g726-24": { - "source": "iana" - }, - "audio/g726-32": { - "source": "iana" - }, - "audio/g726-40": { - "source": "iana" - }, - "audio/g728": { - "source": "iana" - }, - "audio/g729": { - "source": "iana" - }, - "audio/g7291": { - "source": "iana" - }, - "audio/g729d": { - "source": "iana" - }, - "audio/g729e": { - "source": "iana" - }, - "audio/gsm": { - "source": "iana" - }, - "audio/gsm-efr": { - "source": "iana" - }, - "audio/gsm-hr-08": { - "source": "iana" - }, - "audio/ilbc": { - "source": "iana" - }, - "audio/ip-mr_v2.5": { - "source": "iana" - }, - "audio/isac": { - "source": "apache" - }, - "audio/l16": { - "source": "iana" - }, - "audio/l20": { - "source": "iana" - }, - "audio/l24": { - "source": "iana", - "compressible": false - }, - "audio/l8": { - "source": "iana" - }, - "audio/lpc": { - "source": "iana" - }, - "audio/midi": { - "source": "apache", - "extensions": ["mid","midi","kar","rmi"] - }, - "audio/mobile-xmf": { - "source": "iana" - }, - "audio/mp4": { - "source": "iana", - "compressible": false, - "extensions": ["mp4a","m4a"] - }, - "audio/mp4a-latm": { - "source": "iana" - }, - "audio/mpa": { - "source": "iana" - }, - "audio/mpa-robust": { - "source": "iana" - }, - "audio/mpeg": { - "source": "iana", - "compressible": false, - "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"] - }, - "audio/mpeg4-generic": { - "source": "iana" - }, - "audio/musepack": { - "source": "apache" - }, - "audio/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["oga","ogg","spx"] - }, - "audio/opus": { - "source": "apache" - }, - "audio/parityfec": { - "source": "iana" - }, - "audio/pcma": { - "source": "iana" - }, - "audio/pcma-wb": { - "source": "iana" - }, - "audio/pcmu": { - "source": "iana" - }, - "audio/pcmu-wb": { - "source": "iana" - }, - "audio/prs.sid": { - "source": "iana" - }, - "audio/qcelp": { - "source": "iana" - }, - "audio/raptorfec": { - "source": "iana" - }, - "audio/red": { - "source": "iana" - }, - "audio/rtp-enc-aescm128": { - "source": "iana" - }, - "audio/rtp-midi": { - "source": "iana" - }, - "audio/rtploopback": { - "source": "iana" - }, - "audio/rtx": { - "source": "iana" - }, - "audio/s3m": { - "source": "apache", - "extensions": ["s3m"] - }, - "audio/silk": { - "source": "apache", - "extensions": ["sil"] - }, - "audio/smv": { - "source": "iana" - }, - "audio/smv-qcp": { - "source": "iana" - }, - "audio/smv0": { - "source": "iana" - }, - "audio/sp-midi": { - "source": "iana" - }, - "audio/speex": { - "source": "iana" - }, - "audio/t140c": { - "source": "iana" - }, - "audio/t38": { - "source": "iana" - }, - "audio/telephone-event": { - "source": "iana" - }, - "audio/tone": { - "source": "iana" - }, - "audio/uemclip": { - "source": "iana" - }, - "audio/ulpfec": { - "source": "iana" - }, - "audio/vdvi": { - "source": "iana" - }, - "audio/vmr-wb": { - "source": "iana" - }, - "audio/vnd.3gpp.iufp": { - "source": "iana" - }, - "audio/vnd.4sb": { - "source": "iana" - }, - "audio/vnd.audiokoz": { - "source": "iana" - }, - "audio/vnd.celp": { - "source": "iana" - }, - "audio/vnd.cisco.nse": { - "source": "iana" - }, - "audio/vnd.cmles.radio-events": { - "source": "iana" - }, - "audio/vnd.cns.anp1": { - "source": "iana" - }, - "audio/vnd.cns.inf1": { - "source": "iana" - }, - "audio/vnd.dece.audio": { - "source": "iana", - "extensions": ["uva","uvva"] - }, - "audio/vnd.digital-winds": { - "source": "iana", - "extensions": ["eol"] - }, - "audio/vnd.dlna.adts": { - "source": "iana" - }, - "audio/vnd.dolby.heaac.1": { - "source": "iana" - }, - "audio/vnd.dolby.heaac.2": { - "source": "iana" - }, - "audio/vnd.dolby.mlp": { - "source": "iana" - }, - "audio/vnd.dolby.mps": { - "source": "iana" - }, - "audio/vnd.dolby.pl2": { - "source": "iana" - }, - "audio/vnd.dolby.pl2x": { - "source": "iana" - }, - "audio/vnd.dolby.pl2z": { - "source": "iana" - }, - "audio/vnd.dolby.pulse.1": { - "source": "iana" - }, - "audio/vnd.dra": { - "source": "iana", - "extensions": ["dra"] - }, - "audio/vnd.dts": { - "source": "iana", - "extensions": ["dts"] - }, - "audio/vnd.dts.hd": { - "source": "iana", - "extensions": ["dtshd"] - }, - "audio/vnd.dvb.file": { - "source": "iana" - }, - "audio/vnd.everad.plj": { - "source": "iana" - }, - "audio/vnd.hns.audio": { - "source": "iana" - }, - "audio/vnd.lucent.voice": { - "source": "iana", - "extensions": ["lvp"] - }, - "audio/vnd.ms-playready.media.pya": { - "source": "iana", - "extensions": ["pya"] - }, - "audio/vnd.nokia.mobile-xmf": { - "source": "iana" - }, - "audio/vnd.nortel.vbk": { - "source": "iana" - }, - "audio/vnd.nuera.ecelp4800": { - "source": "iana", - "extensions": ["ecelp4800"] - }, - "audio/vnd.nuera.ecelp7470": { - "source": "iana", - "extensions": ["ecelp7470"] - }, - "audio/vnd.nuera.ecelp9600": { - "source": "iana", - "extensions": ["ecelp9600"] - }, - "audio/vnd.octel.sbc": { - "source": "iana" - }, - "audio/vnd.qcelp": { - "source": "iana" - }, - "audio/vnd.rhetorex.32kadpcm": { - "source": "iana" - }, - "audio/vnd.rip": { - "source": "iana", - "extensions": ["rip"] - }, - "audio/vnd.rn-realaudio": { - "compressible": false - }, - "audio/vnd.sealedmedia.softseal.mpeg": { - "source": "iana" - }, - "audio/vnd.vmx.cvsd": { - "source": "iana" - }, - "audio/vnd.wave": { - "compressible": false - }, - "audio/vorbis": { - "source": "iana", - "compressible": false - }, - "audio/vorbis-config": { - "source": "iana" - }, - "audio/webm": { - "source": "apache", - "compressible": false, - "extensions": ["weba"] - }, - "audio/x-aac": { - "source": "apache", - "compressible": false, - "extensions": ["aac"] - }, - "audio/x-aiff": { - "source": "apache", - "extensions": ["aif","aiff","aifc"] - }, - "audio/x-caf": { - "source": "apache", - "compressible": false, - "extensions": ["caf"] - }, - "audio/x-flac": { - "source": "apache", - "extensions": ["flac"] - }, - "audio/x-matroska": { - "source": "apache", - "extensions": ["mka"] - }, - "audio/x-mpegurl": { - "source": "apache", - "extensions": ["m3u"] - }, - "audio/x-ms-wax": { - "source": "apache", - "extensions": ["wax"] - }, - "audio/x-ms-wma": { - "source": "apache", - "extensions": ["wma"] - }, - "audio/x-pn-realaudio": { - "source": "apache", - "extensions": ["ram","ra"] - }, - "audio/x-pn-realaudio-plugin": { - "source": "apache", - "extensions": ["rmp"] - }, - "audio/x-tta": { - "source": "apache" - }, - "audio/x-wav": { - "source": "apache", - "extensions": ["wav"] - }, - "audio/xm": { - "source": "apache", - "extensions": ["xm"] - }, - "chemical/x-cdx": { - "source": "apache", - "extensions": ["cdx"] - }, - "chemical/x-cif": { - "source": "apache", - "extensions": ["cif"] - }, - "chemical/x-cmdf": { - "source": "apache", - "extensions": ["cmdf"] - }, - "chemical/x-cml": { - "source": "apache", - "extensions": ["cml"] - }, - "chemical/x-csml": { - "source": "apache", - "extensions": ["csml"] - }, - "chemical/x-pdb": { - "source": "apache" - }, - "chemical/x-xyz": { - "source": "apache", - "extensions": ["xyz"] - }, - "font/opentype": { - "compressible": true, - "extensions": ["otf"] - }, - "image/bmp": { - "source": "apache", - "compressible": true, - "extensions": ["bmp"] - }, - "image/cgm": { - "source": "iana", - "extensions": ["cgm"] - }, - "image/fits": { - "source": "iana" - }, - "image/g3fax": { - "source": "iana", - "extensions": ["g3"] - }, - "image/gif": { - "source": "iana", - "compressible": false, - "extensions": ["gif"] - }, - "image/ief": { - "source": "iana", - "extensions": ["ief"] - }, - "image/jp2": { - "source": "iana" - }, - "image/jpeg": { - "source": "iana", - "compressible": false, - "extensions": ["jpeg","jpg","jpe"] - }, - "image/jpm": { - "source": "iana" - }, - "image/jpx": { - "source": "iana" - }, - "image/ktx": { - "source": "iana", - "extensions": ["ktx"] - }, - "image/naplps": { - "source": "iana" - }, - "image/pjpeg": { - "compressible": false - }, - "image/png": { - "source": "iana", - "compressible": false, - "extensions": ["png"] - }, - "image/prs.btif": { - "source": "iana", - "extensions": ["btif"] - }, - "image/prs.pti": { - "source": "iana" - }, - "image/pwg-raster": { - "source": "iana" - }, - "image/sgi": { - "source": "apache", - "extensions": ["sgi"] - }, - "image/svg+xml": { - "source": "iana", - "compressible": true, - "extensions": ["svg","svgz"] - }, - "image/t38": { - "source": "iana" - }, - "image/tiff": { - "source": "iana", - "compressible": false, - "extensions": ["tiff","tif"] - }, - "image/tiff-fx": { - "source": "iana" - }, - "image/vnd.adobe.photoshop": { - "source": "iana", - "compressible": true, - "extensions": ["psd"] - }, - "image/vnd.airzip.accelerator.azv": { - "source": "iana" - }, - "image/vnd.cns.inf2": { - "source": "iana" - }, - "image/vnd.dece.graphic": { - "source": "iana", - "extensions": ["uvi","uvvi","uvg","uvvg"] - }, - "image/vnd.djvu": { - "source": "iana", - "extensions": ["djvu","djv"] - }, - "image/vnd.dvb.subtitle": { - "source": "iana", - "extensions": ["sub"] - }, - "image/vnd.dwg": { - "source": "iana", - "extensions": ["dwg"] - }, - "image/vnd.dxf": { - "source": "iana", - "extensions": ["dxf"] - }, - "image/vnd.fastbidsheet": { - "source": "iana", - "extensions": ["fbs"] - }, - "image/vnd.fpx": { - "source": "iana", - "extensions": ["fpx"] - }, - "image/vnd.fst": { - "source": "iana", - "extensions": ["fst"] - }, - "image/vnd.fujixerox.edmics-mmr": { - "source": "iana", - "extensions": ["mmr"] - }, - "image/vnd.fujixerox.edmics-rlc": { - "source": "iana", - "extensions": ["rlc"] - }, - "image/vnd.globalgraphics.pgb": { - "source": "iana" - }, - "image/vnd.microsoft.icon": { - "source": "iana" - }, - "image/vnd.mix": { - "source": "iana" - }, - "image/vnd.ms-modi": { - "source": "iana", - "extensions": ["mdi"] - }, - "image/vnd.ms-photo": { - "source": "apache", - "extensions": ["wdp"] - }, - "image/vnd.net-fpx": { - "source": "iana", - "extensions": ["npx"] - }, - "image/vnd.radiance": { - "source": "iana" - }, - "image/vnd.sealed.png": { - "source": "iana" - }, - "image/vnd.sealedmedia.softseal.gif": { - "source": "iana" - }, - "image/vnd.sealedmedia.softseal.jpg": { - "source": "iana" - }, - "image/vnd.svf": { - "source": "iana" - }, - "image/vnd.tencent.tap": { - "source": "iana" - }, - "image/vnd.valve.source.texture": { - "source": "iana" - }, - "image/vnd.wap.wbmp": { - "source": "iana", - "extensions": ["wbmp"] - }, - "image/vnd.xiff": { - "source": "iana", - "extensions": ["xif"] - }, - "image/webp": { - "source": "apache", - "extensions": ["webp"] - }, - "image/x-3ds": { - "source": "apache", - "extensions": ["3ds"] - }, - "image/x-cmu-raster": { - "source": "apache", - "extensions": ["ras"] - }, - "image/x-cmx": { - "source": "apache", - "extensions": ["cmx"] - }, - "image/x-freehand": { - "source": "apache", - "extensions": ["fh","fhc","fh4","fh5","fh7"] - }, - "image/x-icon": { - "source": "apache", - "compressible": true, - "extensions": ["ico"] - }, - "image/x-mrsid-image": { - "source": "apache", - "extensions": ["sid"] - }, - "image/x-pcx": { - "source": "apache", - "extensions": ["pcx"] - }, - "image/x-pict": { - "source": "apache", - "extensions": ["pic","pct"] - }, - "image/x-portable-anymap": { - "source": "apache", - "extensions": ["pnm"] - }, - "image/x-portable-bitmap": { - "source": "apache", - "extensions": ["pbm"] - }, - "image/x-portable-graymap": { - "source": "apache", - "extensions": ["pgm"] - }, - "image/x-portable-pixmap": { - "source": "apache", - "extensions": ["ppm"] - }, - "image/x-rgb": { - "source": "apache", - "extensions": ["rgb"] - }, - "image/x-tga": { - "source": "apache", - "extensions": ["tga"] - }, - "image/x-xbitmap": { - "source": "apache", - "extensions": ["xbm"] - }, - "image/x-xcf": { - "compressible": false - }, - "image/x-xpixmap": { - "source": "apache", - "extensions": ["xpm"] - }, - "image/x-xwindowdump": { - "source": "apache", - "extensions": ["xwd"] - }, - "message/cpim": { - "source": "iana" - }, - "message/delivery-status": { - "source": "iana" - }, - "message/disposition-notification": { - "source": "iana" - }, - "message/external-body": { - "source": "iana" - }, - "message/feedback-report": { - "source": "iana" - }, - "message/global": { - "source": "iana" - }, - "message/global-delivery-status": { - "source": "iana" - }, - "message/global-disposition-notification": { - "source": "iana" - }, - "message/global-headers": { - "source": "iana" - }, - "message/http": { - "source": "iana", - "compressible": false - }, - "message/imdn+xml": { - "source": "iana", - "compressible": true - }, - "message/news": { - "source": "iana" - }, - "message/partial": { - "source": "iana", - "compressible": false - }, - "message/rfc822": { - "source": "iana", - "compressible": true, - "extensions": ["eml","mime"] - }, - "message/s-http": { - "source": "iana" - }, - "message/sip": { - "source": "iana" - }, - "message/sipfrag": { - "source": "iana" - }, - "message/tracking-status": { - "source": "iana" - }, - "message/vnd.si.simp": { - "source": "iana" - }, - "message/vnd.wfa.wsc": { - "source": "iana" - }, - "model/iges": { - "source": "iana", - "compressible": false, - "extensions": ["igs","iges"] - }, - "model/mesh": { - "source": "iana", - "compressible": false, - "extensions": ["msh","mesh","silo"] - }, - "model/vnd.collada+xml": { - "source": "iana", - "extensions": ["dae"] - }, - "model/vnd.dwf": { - "source": "iana", - "extensions": ["dwf"] - }, - "model/vnd.flatland.3dml": { - "source": "iana" - }, - "model/vnd.gdl": { - "source": "iana", - "extensions": ["gdl"] - }, - "model/vnd.gs-gdl": { - "source": "apache" - }, - "model/vnd.gs.gdl": { - "source": "iana" - }, - "model/vnd.gtw": { - "source": "iana", - "extensions": ["gtw"] - }, - "model/vnd.moml+xml": { - "source": "iana" - }, - "model/vnd.mts": { - "source": "iana", - "extensions": ["mts"] - }, - "model/vnd.opengex": { - "source": "iana" - }, - "model/vnd.parasolid.transmit.binary": { - "source": "iana" - }, - "model/vnd.parasolid.transmit.text": { - "source": "iana" - }, - "model/vnd.valve.source.compiled-map": { - "source": "iana" - }, - "model/vnd.vtu": { - "source": "iana", - "extensions": ["vtu"] - }, - "model/vrml": { - "source": "iana", - "compressible": false, - "extensions": ["wrl","vrml"] - }, - "model/x3d+binary": { - "source": "apache", - "compressible": false, - "extensions": ["x3db","x3dbz"] - }, - "model/x3d+fastinfoset": { - "source": "iana" - }, - "model/x3d+vrml": { - "source": "apache", - "compressible": false, - "extensions": ["x3dv","x3dvz"] - }, - "model/x3d+xml": { - "source": "iana", - "compressible": true, - "extensions": ["x3d","x3dz"] - }, - "model/x3d-vrml": { - "source": "iana" - }, - "multipart/alternative": { - "source": "iana", - "compressible": false - }, - "multipart/appledouble": { - "source": "iana" - }, - "multipart/byteranges": { - "source": "iana" - }, - "multipart/digest": { - "source": "iana" - }, - "multipart/encrypted": { - "source": "iana", - "compressible": false - }, - "multipart/form-data": { - "source": "iana", - "compressible": false - }, - "multipart/header-set": { - "source": "iana" - }, - "multipart/mixed": { - "source": "iana", - "compressible": false - }, - "multipart/parallel": { - "source": "iana" - }, - "multipart/related": { - "source": "iana", - "compressible": false - }, - "multipart/report": { - "source": "iana" - }, - "multipart/signed": { - "source": "iana", - "compressible": false - }, - "multipart/voice-message": { - "source": "iana" - }, - "multipart/x-mixed-replace": { - "source": "iana" - }, - "text/1d-interleaved-parityfec": { - "source": "iana" - }, - "text/cache-manifest": { - "source": "iana", - "compressible": true, - "extensions": ["appcache","manifest"] - }, - "text/calendar": { - "source": "iana", - "extensions": ["ics","ifb"] - }, - "text/calender": { - "compressible": true - }, - "text/cmd": { - "compressible": true - }, - "text/coffeescript": { - "extensions": ["coffee"] - }, - "text/css": { - "source": "iana", - "compressible": true, - "extensions": ["css"] - }, - "text/csv": { - "source": "iana", - "compressible": true, - "extensions": ["csv"] - }, - "text/csv-schema": { - "source": "iana" - }, - "text/directory": { - "source": "iana" - }, - "text/dns": { - "source": "iana" - }, - "text/ecmascript": { - "source": "iana" - }, - "text/encaprtp": { - "source": "iana" - }, - "text/enriched": { - "source": "iana" - }, - "text/fwdred": { - "source": "iana" - }, - "text/grammar-ref-list": { - "source": "iana" - }, - "text/hjson": { - "extensions": ["hjson"] - }, - "text/html": { - "source": "iana", - "compressible": true, - "extensions": ["html","htm"] - }, - "text/jade": { - "extensions": ["jade"] - }, - "text/javascript": { - "source": "iana", - "compressible": true - }, - "text/jcr-cnd": { - "source": "iana" - }, - "text/jsx": { - "compressible": true, - "extensions": ["jsx"] - }, - "text/less": { - "extensions": ["less"] - }, - "text/markdown": { - "source": "iana" - }, - "text/mizar": { - "source": "iana" - }, - "text/n3": { - "source": "iana", - "compressible": true, - "extensions": ["n3"] - }, - "text/parameters": { - "source": "iana" - }, - "text/parityfec": { - "source": "iana" - }, - "text/plain": { - "source": "iana", - "compressible": true, - "extensions": ["txt","text","conf","def","list","log","in","ini"] - }, - "text/provenance-notation": { - "source": "iana" - }, - "text/prs.fallenstein.rst": { - "source": "iana" - }, - "text/prs.lines.tag": { - "source": "iana", - "extensions": ["dsc"] - }, - "text/raptorfec": { - "source": "iana" - }, - "text/red": { - "source": "iana" - }, - "text/rfc822-headers": { - "source": "iana" - }, - "text/richtext": { - "source": "iana", - "compressible": true, - "extensions": ["rtx"] - }, - "text/rtf": { - "source": "iana" - }, - "text/rtp-enc-aescm128": { - "source": "iana" - }, - "text/rtploopback": { - "source": "iana" - }, - "text/rtx": { - "source": "iana" - }, - "text/sgml": { - "source": "iana", - "extensions": ["sgml","sgm"] - }, - "text/stylus": { - "extensions": ["stylus","styl"] - }, - "text/t140": { - "source": "iana" - }, - "text/tab-separated-values": { - "source": "iana", - "compressible": true, - "extensions": ["tsv"] - }, - "text/troff": { - "source": "iana", - "extensions": ["t","tr","roff","man","me","ms"] - }, - "text/turtle": { - "source": "iana", - "extensions": ["ttl"] - }, - "text/ulpfec": { - "source": "iana" - }, - "text/uri-list": { - "source": "iana", - "compressible": true, - "extensions": ["uri","uris","urls"] - }, - "text/vcard": { - "source": "iana", - "compressible": true, - "extensions": ["vcard"] - }, - "text/vnd.a": { - "source": "iana" - }, - "text/vnd.abc": { - "source": "iana" - }, - "text/vnd.curl": { - "source": "iana", - "extensions": ["curl"] - }, - "text/vnd.curl.dcurl": { - "source": "apache", - "extensions": ["dcurl"] - }, - "text/vnd.curl.mcurl": { - "source": "apache", - "extensions": ["mcurl"] - }, - "text/vnd.curl.scurl": { - "source": "apache", - "extensions": ["scurl"] - }, - "text/vnd.debian.copyright": { - "source": "iana" - }, - "text/vnd.dmclientscript": { - "source": "iana" - }, - "text/vnd.dvb.subtitle": { - "source": "iana", - "extensions": ["sub"] - }, - "text/vnd.esmertec.theme-descriptor": { - "source": "iana" - }, - "text/vnd.fly": { - "source": "iana", - "extensions": ["fly"] - }, - "text/vnd.fmi.flexstor": { - "source": "iana", - "extensions": ["flx"] - }, - "text/vnd.graphviz": { - "source": "iana", - "extensions": ["gv"] - }, - "text/vnd.in3d.3dml": { - "source": "iana", - "extensions": ["3dml"] - }, - "text/vnd.in3d.spot": { - "source": "iana", - "extensions": ["spot"] - }, - "text/vnd.iptc.newsml": { - "source": "iana" - }, - "text/vnd.iptc.nitf": { - "source": "iana" - }, - "text/vnd.latex-z": { - "source": "iana" - }, - "text/vnd.motorola.reflex": { - "source": "iana" - }, - "text/vnd.ms-mediapackage": { - "source": "iana" - }, - "text/vnd.net2phone.commcenter.command": { - "source": "iana" - }, - "text/vnd.radisys.msml-basic-layout": { - "source": "iana" - }, - "text/vnd.si.uricatalogue": { - "source": "iana" - }, - "text/vnd.sun.j2me.app-descriptor": { - "source": "iana", - "extensions": ["jad"] - }, - "text/vnd.trolltech.linguist": { - "source": "iana" - }, - "text/vnd.wap.si": { - "source": "iana" - }, - "text/vnd.wap.sl": { - "source": "iana" - }, - "text/vnd.wap.wml": { - "source": "iana", - "extensions": ["wml"] - }, - "text/vnd.wap.wmlscript": { - "source": "iana", - "extensions": ["wmls"] - }, - "text/vtt": { - "charset": "UTF-8", - "compressible": true, - "extensions": ["vtt"] - }, - "text/x-asm": { - "source": "apache", - "extensions": ["s","asm"] - }, - "text/x-c": { - "source": "apache", - "extensions": ["c","cc","cxx","cpp","h","hh","dic"] - }, - "text/x-component": { - "extensions": ["htc"] - }, - "text/x-fortran": { - "source": "apache", - "extensions": ["f","for","f77","f90"] - }, - "text/x-gwt-rpc": { - "compressible": true - }, - "text/x-handlebars-template": { - "extensions": ["hbs"] - }, - "text/x-java-source": { - "source": "apache", - "extensions": ["java"] - }, - "text/x-jquery-tmpl": { - "compressible": true - }, - "text/x-lua": { - "extensions": ["lua"] - }, - "text/x-markdown": { - "compressible": true, - "extensions": ["markdown","md","mkd"] - }, - "text/x-nfo": { - "source": "apache", - "extensions": ["nfo"] - }, - "text/x-opml": { - "source": "apache", - "extensions": ["opml"] - }, - "text/x-pascal": { - "source": "apache", - "extensions": ["p","pas"] - }, - "text/x-sass": { - "extensions": ["sass"] - }, - "text/x-scss": { - "extensions": ["scss"] - }, - "text/x-setext": { - "source": "apache", - "extensions": ["etx"] - }, - "text/x-sfv": { - "source": "apache", - "extensions": ["sfv"] - }, - "text/x-uuencode": { - "source": "apache", - "extensions": ["uu"] - }, - "text/x-vcalendar": { - "source": "apache", - "extensions": ["vcs"] - }, - "text/x-vcard": { - "source": "apache", - "extensions": ["vcf"] - }, - "text/xml": { - "source": "iana", - "compressible": true - }, - "text/xml-external-parsed-entity": { - "source": "iana" - }, - "text/yaml": { - "extensions": ["yaml","yml"] - }, - "video/1d-interleaved-parityfec": { - "source": "apache" - }, - "video/3gpp": { - "source": "apache", - "extensions": ["3gp"] - }, - "video/3gpp-tt": { - "source": "apache" - }, - "video/3gpp2": { - "source": "apache", - "extensions": ["3g2"] - }, - "video/bmpeg": { - "source": "apache" - }, - "video/bt656": { - "source": "apache" - }, - "video/celb": { - "source": "apache" - }, - "video/dv": { - "source": "apache" - }, - "video/h261": { - "source": "apache", - "extensions": ["h261"] - }, - "video/h263": { - "source": "apache", - "extensions": ["h263"] - }, - "video/h263-1998": { - "source": "apache" - }, - "video/h263-2000": { - "source": "apache" - }, - "video/h264": { - "source": "apache", - "extensions": ["h264"] - }, - "video/h264-rcdo": { - "source": "apache" - }, - "video/h264-svc": { - "source": "apache" - }, - "video/jpeg": { - "source": "apache", - "extensions": ["jpgv"] - }, - "video/jpeg2000": { - "source": "apache" - }, - "video/jpm": { - "source": "apache", - "extensions": ["jpm","jpgm"] - }, - "video/mj2": { - "source": "apache", - "extensions": ["mj2","mjp2"] - }, - "video/mp1s": { - "source": "apache" - }, - "video/mp2p": { - "source": "apache" - }, - "video/mp2t": { - "source": "apache", - "extensions": ["ts"] - }, - "video/mp4": { - "source": "apache", - "compressible": false, - "extensions": ["mp4","mp4v","mpg4"] - }, - "video/mp4v-es": { - "source": "apache" - }, - "video/mpeg": { - "source": "apache", - "compressible": false, - "extensions": ["mpeg","mpg","mpe","m1v","m2v"] - }, - "video/mpeg4-generic": { - "source": "apache" - }, - "video/mpv": { - "source": "apache" - }, - "video/nv": { - "source": "apache" - }, - "video/ogg": { - "source": "apache", - "compressible": false, - "extensions": ["ogv"] - }, - "video/parityfec": { - "source": "apache" - }, - "video/pointer": { - "source": "apache" - }, - "video/quicktime": { - "source": "apache", - "compressible": false, - "extensions": ["qt","mov"] - }, - "video/raw": { - "source": "apache" - }, - "video/rtp-enc-aescm128": { - "source": "apache" - }, - "video/rtx": { - "source": "apache" - }, - "video/smpte292m": { - "source": "apache" - }, - "video/ulpfec": { - "source": "apache" - }, - "video/vc1": { - "source": "apache" - }, - "video/vnd.cctv": { - "source": "apache" - }, - "video/vnd.dece.hd": { - "source": "apache", - "extensions": ["uvh","uvvh"] - }, - "video/vnd.dece.mobile": { - "source": "apache", - "extensions": ["uvm","uvvm"] - }, - "video/vnd.dece.mp4": { - "source": "apache" - }, - "video/vnd.dece.pd": { - "source": "apache", - "extensions": ["uvp","uvvp"] - }, - "video/vnd.dece.sd": { - "source": "apache", - "extensions": ["uvs","uvvs"] - }, - "video/vnd.dece.video": { - "source": "apache", - "extensions": ["uvv","uvvv"] - }, - "video/vnd.directv.mpeg": { - "source": "apache" - }, - "video/vnd.directv.mpeg-tts": { - "source": "apache" - }, - "video/vnd.dlna.mpeg-tts": { - "source": "apache" - }, - "video/vnd.dvb.file": { - "source": "apache", - "extensions": ["dvb"] - }, - "video/vnd.fvt": { - "source": "apache", - "extensions": ["fvt"] - }, - "video/vnd.hns.video": { - "source": "apache" - }, - "video/vnd.iptvforum.1dparityfec-1010": { - "source": "apache" - }, - "video/vnd.iptvforum.1dparityfec-2005": { - "source": "apache" - }, - "video/vnd.iptvforum.2dparityfec-1010": { - "source": "apache" - }, - "video/vnd.iptvforum.2dparityfec-2005": { - "source": "apache" - }, - "video/vnd.iptvforum.ttsavc": { - "source": "apache" - }, - "video/vnd.iptvforum.ttsmpeg2": { - "source": "apache" - }, - "video/vnd.motorola.video": { - "source": "apache" - }, - "video/vnd.motorola.videop": { - "source": "apache" - }, - "video/vnd.mpegurl": { - "source": "apache", - "extensions": ["mxu","m4u"] - }, - "video/vnd.ms-playready.media.pyv": { - "source": "apache", - "extensions": ["pyv"] - }, - "video/vnd.nokia.interleaved-multimedia": { - "source": "apache" - }, - "video/vnd.nokia.videovoip": { - "source": "apache" - }, - "video/vnd.objectvideo": { - "source": "apache" - }, - "video/vnd.sealed.mpeg1": { - "source": "apache" - }, - "video/vnd.sealed.mpeg4": { - "source": "apache" - }, - "video/vnd.sealed.swf": { - "source": "apache" - }, - "video/vnd.sealedmedia.softseal.mov": { - "source": "apache" - }, - "video/vnd.uvvu.mp4": { - "source": "apache", - "extensions": ["uvu","uvvu"] - }, - "video/vnd.vivo": { - "source": "apache", - "extensions": ["viv"] - }, - "video/webm": { - "source": "apache", - "compressible": false, - "extensions": ["webm"] - }, - "video/x-f4v": { - "source": "apache", - "extensions": ["f4v"] - }, - "video/x-fli": { - "source": "apache", - "extensions": ["fli"] - }, - "video/x-flv": { - "source": "apache", - "compressible": false, - "extensions": ["flv"] - }, - "video/x-m4v": { - "source": "apache", - "extensions": ["m4v"] - }, - "video/x-matroska": { - "source": "apache", - "compressible": false, - "extensions": ["mkv","mk3d","mks"] - }, - "video/x-mng": { - "source": "apache", - "extensions": ["mng"] - }, - "video/x-ms-asf": { - "source": "apache", - "extensions": ["asf","asx"] - }, - "video/x-ms-vob": { - "source": "apache", - "extensions": ["vob"] - }, - "video/x-ms-wm": { - "source": "apache", - "extensions": ["wm"] - }, - "video/x-ms-wmv": { - "source": "apache", - "compressible": false, - "extensions": ["wmv"] - }, - "video/x-ms-wmx": { - "source": "apache", - "extensions": ["wmx"] - }, - "video/x-ms-wvx": { - "source": "apache", - "extensions": ["wvx"] - }, - "video/x-msvideo": { - "source": "apache", - "extensions": ["avi"] - }, - "video/x-sgi-movie": { - "source": "apache", - "extensions": ["movie"] - }, - "video/x-smv": { - "source": "apache", - "extensions": ["smv"] - }, - "x-conference/x-cooltalk": { - "source": "apache", - "extensions": ["ice"] - }, - "x-shader/x-fragment": { - "compressible": true - }, - "x-shader/x-vertex": { - "compressible": true - } -} diff --git a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js b/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js deleted file mode 100644 index 551031f..0000000 --- a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/index.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = require('./db.json') diff --git a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json b/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json deleted file mode 100644 index be85eb4..0000000 --- a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "name": "mime-db", - "description": "Media Type Database", - "version": "1.5.0", - "author": { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - }, - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - } - ], - "license": "MIT", - "keywords": [ - "mime", - "db", - "type", - "types", - "database", - "charset", - "charsets" - ], - "repository": { - "type": "git", - "url": "https://github.com/jshttp/mime-db" - }, - "devDependencies": { - "co": "4", - "cogent": "1", - "csv-parse": "0", - "gnode": "0.1.0", - "istanbul": "0.3.5", - "mocha": "~1.21.4", - "raw-body": "~1.3.1", - "stream-to-array": "2" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "README.md", - "db.json", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "update": "gnode scripts/extensions && gnode scripts/types && node scripts/build", - "clean": "rm src/*", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - }, - "gitHead": "262fafb4a696cae208d6148c6642ee45bce07cb3", - "bugs": { - "url": "https://github.com/jshttp/mime-db/issues" - }, - "homepage": "https://github.com/jshttp/mime-db", - "_id": "mime-db@1.5.0", - "_shasum": "bd80b576157991c3b46c71be7041fc6d5402a6ee", - "_from": "mime-db@>=1.5.0 <1.6.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - } - ], - "dist": { - "shasum": "bd80b576157991c3b46c71be7041fc6d5402a6ee", - "tarball": "http://registry.npmjs.org/mime-db/-/mime-db-1.5.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.5.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/package.json b/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/package.json deleted file mode 100644 index 3abb8c8..0000000 --- a/s4t-server-node/node_modules/express/node_modules/type-is/node_modules/mime-types/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "name": "mime-types", - "description": "The ultimate javascript content-type utility.", - "version": "2.0.7", - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "Jeremiah Senkpiel", - "email": "fishrock123@rocketmail.com", - "url": "https://searchbeam.jit.su" - }, - { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - } - ], - "license": "MIT", - "keywords": [ - "mime", - "types" - ], - "repository": { - "type": "git", - "url": "https://github.com/jshttp/mime-types" - }, - "dependencies": { - "mime-db": "~1.5.0" - }, - "devDependencies": { - "istanbul": "0.3.5", - "mocha": "~1.21.5" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "test": "mocha --reporter spec test/test.js", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js" - }, - "gitHead": "4216c095dcc3390c2b8f4a96a9eae94d11420f56", - "bugs": { - "url": "https://github.com/jshttp/mime-types/issues" - }, - "homepage": "https://github.com/jshttp/mime-types", - "_id": "mime-types@2.0.7", - "_shasum": "0cb58d0403aec977357db324eea67e40c32b44b2", - "_from": "mime-types@>=2.0.7 <2.1.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "fishrock123", - "email": "fishrock123@rocketmail.com" - }, - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - } - ], - "dist": { - "shasum": "0cb58d0403aec977357db324eea67e40c32b44b2", - "tarball": "http://registry.npmjs.org/mime-types/-/mime-types-2.0.7.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.7.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/type-is/package.json b/s4t-server-node/node_modules/express/node_modules/type-is/package.json deleted file mode 100644 index c0963d1..0000000 --- a/s4t-server-node/node_modules/express/node_modules/type-is/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "name": "type-is", - "description": "Infer the content-type of a request.", - "version": "1.5.5", - "author": { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - }, - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - } - ], - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/jshttp/type-is" - }, - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.0.7" - }, - "devDependencies": { - "istanbul": "0.3.5", - "mocha": "~1.21.5" - }, - "engines": { - "node": ">= 0.6" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "index.js" - ], - "scripts": { - "test": "mocha --reporter spec --check-leaks --bail test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - }, - "keywords": [ - "content", - "type", - "checking" - ], - "gitHead": "b13dc3fa142ad60bea775181ba5f50364042691f", - "bugs": { - "url": "https://github.com/jshttp/type-is/issues" - }, - "homepage": "https://github.com/jshttp/type-is", - "_id": "type-is@1.5.5", - "_shasum": "45248af57f96366d0326ea0868f6bc8607dc4b21", - "_from": "type-is@>=1.5.5 <1.6.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "shtylman", - "email": "shtylman@gmail.com" - }, - { - "name": "mscdex", - "email": "mscdex@mscdex.net" - }, - { - "name": "fishrock123", - "email": "fishrock123@rocketmail.com" - } - ], - "dist": { - "shasum": "45248af57f96366d0326ea0868f6bc8607dc4b21", - "tarball": "http://registry.npmjs.org/type-is/-/type-is-1.5.5.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/type-is/-/type-is-1.5.5.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/node_modules/utils-merge/.travis.yml b/s4t-server-node/node_modules/express/node_modules/utils-merge/.travis.yml deleted file mode 100644 index af92b02..0000000 --- a/s4t-server-node/node_modules/express/node_modules/utils-merge/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: "node_js" -node_js: - - "0.4" - - "0.6" - - "0.8" - - "0.10" diff --git a/s4t-server-node/node_modules/express/node_modules/utils-merge/LICENSE b/s4t-server-node/node_modules/express/node_modules/utils-merge/LICENSE deleted file mode 100644 index e33bd10..0000000 --- a/s4t-server-node/node_modules/express/node_modules/utils-merge/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -(The MIT License) - -Copyright (c) 2013 Jared Hanson - -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/s4t-server-node/node_modules/express/node_modules/utils-merge/README.md b/s4t-server-node/node_modules/express/node_modules/utils-merge/README.md deleted file mode 100644 index 2f94e9b..0000000 --- a/s4t-server-node/node_modules/express/node_modules/utils-merge/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# utils-merge - -Merges the properties from a source object into a destination object. - -## Install - - $ npm install utils-merge - -## Usage - -```javascript -var a = { foo: 'bar' } - , b = { bar: 'baz' }; - -merge(a, b); -// => { foo: 'bar', bar: 'baz' } -``` - -## Tests - - $ npm install - $ npm test - -[![Build Status](https://secure.travis-ci.org/jaredhanson/utils-merge.png)](http://travis-ci.org/jaredhanson/utils-merge) - -## Credits - - - [Jared Hanson](http://github.com/jaredhanson) - -## License - -[The MIT License](http://opensource.org/licenses/MIT) - -Copyright (c) 2013 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)> diff --git a/s4t-server-node/node_modules/express/node_modules/utils-merge/index.js b/s4t-server-node/node_modules/express/node_modules/utils-merge/index.js deleted file mode 100644 index 4265c69..0000000 --- a/s4t-server-node/node_modules/express/node_modules/utils-merge/index.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Merge object b with object a. - * - * var a = { foo: 'bar' } - * , b = { bar: 'baz' }; - * - * merge(a, b); - * // => { foo: 'bar', bar: 'baz' } - * - * @param {Object} a - * @param {Object} b - * @return {Object} - * @api public - */ - -exports = module.exports = function(a, b){ - if (a && b) { - for (var key in b) { - a[key] = b[key]; - } - } - return a; -}; diff --git a/s4t-server-node/node_modules/express/node_modules/utils-merge/package.json b/s4t-server-node/node_modules/express/node_modules/utils-merge/package.json deleted file mode 100644 index e655383..0000000 --- a/s4t-server-node/node_modules/express/node_modules/utils-merge/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "utils-merge", - "version": "1.0.0", - "description": "merge() utility function", - "keywords": [ - "util" - ], - "repository": { - "type": "git", - "url": "git://github.com/jaredhanson/utils-merge.git" - }, - "bugs": { - "url": "http://github.com/jaredhanson/utils-merge/issues" - }, - "author": { - "name": "Jared Hanson", - "email": "jaredhanson@gmail.com", - "url": "http://www.jaredhanson.net/" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://www.opensource.org/licenses/MIT" - } - ], - "main": "./index", - "dependencies": {}, - "devDependencies": { - "mocha": "1.x.x", - "chai": "1.x.x" - }, - "scripts": { - "test": "mocha --reporter spec --require test/bootstrap/node test/*.test.js" - }, - "engines": { - "node": ">= 0.4.0" - }, - "readme": "# utils-merge\n\nMerges the properties from a source object into a destination object.\n\n## Install\n\n $ npm install utils-merge\n\n## Usage\n\n```javascript\nvar a = { foo: 'bar' }\n , b = { bar: 'baz' };\n\nmerge(a, b);\n// => { foo: 'bar', bar: 'baz' }\n```\n\n## Tests\n\n $ npm install\n $ npm test\n\n[![Build Status](https://secure.travis-ci.org/jaredhanson/utils-merge.png)](http://travis-ci.org/jaredhanson/utils-merge)\n\n## Credits\n\n - [Jared Hanson](http://github.com/jaredhanson)\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2013 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>\n", - "readmeFilename": "README.md", - "_id": "utils-merge@1.0.0", - "dist": { - "shasum": "0294fb922bb9375153541c4f7096231f287c8af8", - "tarball": "http://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz" - }, - "_from": "utils-merge@1.0.0", - "_npmVersion": "1.2.25", - "_npmUser": { - "name": "jaredhanson", - "email": "jaredhanson@gmail.com" - }, - "maintainers": [ - { - "name": "jaredhanson", - "email": "jaredhanson@gmail.com" - } - ], - "directories": {}, - "_shasum": "0294fb922bb9375153541c4f7096231f287c8af8", - "_resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", - "homepage": "https://github.com/jaredhanson/utils-merge" -} diff --git a/s4t-server-node/node_modules/express/node_modules/vary/.npmignore b/s4t-server-node/node_modules/express/node_modules/vary/.npmignore deleted file mode 100644 index cd39b77..0000000 --- a/s4t-server-node/node_modules/express/node_modules/vary/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -coverage/ -test/ -.travis.yml diff --git a/s4t-server-node/node_modules/express/node_modules/vary/History.md b/s4t-server-node/node_modules/express/node_modules/vary/History.md deleted file mode 100644 index e5d8e69..0000000 --- a/s4t-server-node/node_modules/express/node_modules/vary/History.md +++ /dev/null @@ -1,16 +0,0 @@ -1.0.0 / 2014-08-10 -================== - - * Accept valid `Vary` header string as `field` - * Add `vary.append` for low-level string manipulation - * Move to `jshttp` orgainzation - -0.1.0 / 2014-06-05 -================== - - * Support array of fields to set - -0.0.0 / 2014-06-04 -================== - - * Initial release diff --git a/s4t-server-node/node_modules/express/node_modules/vary/LICENSE b/s4t-server-node/node_modules/express/node_modules/vary/LICENSE deleted file mode 100644 index b7dce6c..0000000 --- a/s4t-server-node/node_modules/express/node_modules/vary/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 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/s4t-server-node/node_modules/express/node_modules/vary/README.md b/s4t-server-node/node_modules/express/node_modules/vary/README.md deleted file mode 100644 index 82392d0..0000000 --- a/s4t-server-node/node_modules/express/node_modules/vary/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# vary - -[![NPM Version](http://img.shields.io/npm/v/vary.svg?style=flat)](https://www.npmjs.org/package/vary) -[![Node.js Version](http://img.shields.io/badge/node.js->=_0.8-blue.svg?style=flat)](http://nodejs.org/download/) -[![Build Status](http://img.shields.io/travis/jshttp/vary.svg?style=flat)](https://travis-ci.org/jshttp/vary) -[![Coverage Status](https://img.shields.io/coveralls/jshttp/vary.svg?style=flat)](https://coveralls.io/r/jshttp/vary) -[![Gittip](http://img.shields.io/gittip/dougwilson.svg?style=flat)](https://www.gittip.com/dougwilson/) - -Manipulate the HTTP Vary header - -## Install - -```sh -$ npm install vary -``` - -## API - -```js -var vary = require('vary') -``` - -### vary(res, field) - -Adds the given header `field` to the `Vary` response header of `res`. -This can be a string of a single field, a string of a valid `Vary` -header, or an array of multiple fields. - -This will append the header if not already listed, otherwise leaves -it listed in the current location. - -```js -// Append "Origin" to the Vary header of the response -vary(res, 'Origin') -``` - -### vary.append(header, field) - -Adds the given header `field` to the `Vary` response header string `header`. -This can be a string of a single field, a string of a valid `Vary` header, -or an array of multiple fields. - -This will append the header if not already listed, otherwise leaves -it listed in the current location. The new header string is returned. - -```js -// Get header string appending "Origin" to "Accept, User-Agent" -vary.append('Accept, User-Agent', 'Origin') -``` - -## Testing - -```sh -$ npm test -``` - -## License - -[MIT](LICENSE) diff --git a/s4t-server-node/node_modules/express/node_modules/vary/index.js b/s4t-server-node/node_modules/express/node_modules/vary/index.js deleted file mode 100644 index 1e544e8..0000000 --- a/s4t-server-node/node_modules/express/node_modules/vary/index.js +++ /dev/null @@ -1,112 +0,0 @@ -/*! - * vary - * Copyright(c) 2014 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = vary; -module.exports.append = append; - -/** - * Variables. - */ - -var separators = /[\(\)<>@,;:\\"\/\[\]\?=\{\}\u0020\u0009]/; - -/** - * Append a field to a vary header. - * - * @param {String} header - * @param {String|Array} field - * @return {String} - * @api public - */ - -function append(header, field) { - if (typeof header !== 'string') { - throw new TypeError('header argument is required'); - } - - if (!field) { - throw new TypeError('field argument is required'); - } - - // get fields array - var fields = !Array.isArray(field) - ? parse(String(field)) - : field; - - // assert on invalid fields - for (var i = 0; i < fields.length; i++) { - if (separators.test(fields[i])) { - throw new TypeError('field argument contains an invalid header'); - } - } - - // existing, unspecified vary - if (header === '*') { - return header; - } - - // enumerate current values - var vals = parse(header.toLowerCase()); - - // unspecified vary - if (fields.indexOf('*') !== -1 || vals.indexOf('*') !== -1) { - return '*'; - } - - for (var i = 0; i < fields.length; i++) { - field = fields[i].toLowerCase(); - - // append value (case-preserving) - if (vals.indexOf(field) === -1) { - vals.push(field); - header = header - ? header + ', ' + fields[i] - : fields[i]; - } - } - - return header; -} - -/** - * Parse a vary header into an array. - * - * @param {String} header - * @return {Array} - * @api private - */ - -function parse(header) { - return header.trim().split(/ *, */); -} - -/** - * Mark that a request is varied on a header field. - * - * @param {Object} res - * @param {String|Array} field - * @api public - */ - -function vary(res, field) { - if (!res || !res.getHeader || !res.setHeader) { - // quack quack - throw new TypeError('res argument is required'); - } - - // get existing header - var val = res.getHeader('Vary') || '' - var header = Array.isArray(val) - ? val.join(', ') - : String(val); - - // set new header - res.setHeader('Vary', append(header, field)); -} diff --git a/s4t-server-node/node_modules/express/node_modules/vary/package.json b/s4t-server-node/node_modules/express/node_modules/vary/package.json deleted file mode 100644 index 4e43572..0000000 --- a/s4t-server-node/node_modules/express/node_modules/vary/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "vary", - "description": "Manipulate the HTTP Vary header", - "version": "1.0.0", - "author": { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - "license": "MIT", - "keywords": [ - "http", - "res", - "vary" - ], - "repository": { - "type": "git", - "url": "https://github.com/jshttp/vary" - }, - "devDependencies": { - "istanbul": "0.3.0", - "mocha": "~1.21.4", - "should": "~4.0.4", - "supertest": "~0.13.0" - }, - "engines": { - "node": ">= 0.8.0" - }, - "scripts": { - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - }, - "gitHead": "56acecd9fa20888132563b00576625ea02a69a35", - "bugs": { - "url": "https://github.com/jshttp/vary/issues" - }, - "homepage": "https://github.com/jshttp/vary", - "_id": "vary@1.0.0", - "_shasum": "c5e76cec20d3820d8f2a96e7bee38731c34da1e7", - "_from": "vary@>=1.0.0 <1.1.0", - "_npmVersion": "1.4.21", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "fishrock123", - "email": "fishrock123@rocketmail.com" - }, - { - "name": "shtylman", - "email": "shtylman@gmail.com" - } - ], - "dist": { - "shasum": "c5e76cec20d3820d8f2a96e7bee38731c34da1e7", - "tarball": "http://registry.npmjs.org/vary/-/vary-1.0.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/vary/-/vary-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/express/package.json b/s4t-server-node/node_modules/express/package.json deleted file mode 100644 index 816dd97..0000000 --- a/s4t-server-node/node_modules/express/package.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "name": "express", - "description": "Fast, unopinionated, minimalist web framework", - "version": "4.11.1", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "contributors": [ - { - "name": "Aaron Heckmann", - "email": "aaron.heckmann+github@gmail.com" - }, - { - "name": "Ciaran Jessup", - "email": "ciaranj@gmail.com" - }, - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "Guillermo Rauch", - "email": "rauchg@gmail.com" - }, - { - "name": "Jonathan Ong", - "email": "me@jongleberry.com" - }, - { - "name": "Roman Shtylman", - "email": "shtylman+expressjs@gmail.com" - }, - { - "name": "Young Jae Sim", - "email": "hanul@hanul.me" - } - ], - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/strongloop/express" - }, - "homepage": "http://expressjs.com/", - "keywords": [ - "express", - "framework", - "sinatra", - "web", - "rest", - "restful", - "router", - "app", - "api" - ], - "dependencies": { - "accepts": "~1.2.2", - "content-disposition": "0.5.0", - "cookie-signature": "1.0.5", - "debug": "~2.1.1", - "depd": "~1.0.0", - "escape-html": "1.0.1", - "etag": "~1.5.1", - "finalhandler": "0.3.3", - "fresh": "0.2.4", - "media-typer": "0.3.0", - "methods": "~1.1.1", - "on-finished": "~2.2.0", - "parseurl": "~1.3.0", - "path-to-regexp": "0.1.3", - "proxy-addr": "~1.0.5", - "qs": "2.3.3", - "range-parser": "~1.0.2", - "send": "0.11.1", - "serve-static": "~1.8.1", - "type-is": "~1.5.5", - "vary": "~1.0.0", - "cookie": "0.1.2", - "merge-descriptors": "0.0.2", - "utils-merge": "1.0.0" - }, - "devDependencies": { - "after": "0.8.1", - "ejs": "2.1.4", - "istanbul": "0.3.5", - "mocha": "~2.1.0", - "should": "~4.6.1", - "supertest": "~0.15.0", - "marked": "0.3.2", - "hjs": "~0.0.6", - "body-parser": "~1.10.2", - "connect-redis": "~2.1.0", - "cookie-parser": "~1.3.3", - "express-session": "~1.10.1", - "jade": "~1.9.1", - "method-override": "~2.3.1", - "morgan": "~1.5.1", - "multiparty": "~4.1.1", - "vhost": "~3.0.0" - }, - "engines": { - "node": ">= 0.10.0" - }, - "files": [ - "LICENSE", - "History.md", - "Readme.md", - "index.js", - "lib/" - ], - "scripts": { - "test": "mocha --require test/support/env --reporter spec --bail --check-leaks test/ test/acceptance/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require test/support/env --reporter dot --check-leaks test/ test/acceptance/", - "test-tap": "mocha --require test/support/env --reporter tap --check-leaks test/ test/acceptance/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --require test/support/env --reporter spec --check-leaks test/ test/acceptance/" - }, - "gitHead": "45ebb6cdf45710f4fba93ae41c9dbd16afae83fe", - "bugs": { - "url": "https://github.com/strongloop/express/issues" - }, - "_id": "express@4.11.1", - "_shasum": "36d04dd27aa1667634e987529767f9c99de7903f", - "_from": "express@*", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "jongleberry", - "email": "jonathanrichardong@gmail.com" - }, - { - "name": "shtylman", - "email": "shtylman@gmail.com" - }, - { - "name": "dougwilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "aredridel", - "email": "aredridel@nbtsc.org" - }, - { - "name": "strongloop", - "email": "callback@strongloop.com" - }, - { - "name": "rfeng", - "email": "enjoyjava@gmail.com" - } - ], - "dist": { - "shasum": "36d04dd27aa1667634e987529767f9c99de7903f", - "tarball": "http://registry.npmjs.org/express/-/express-4.11.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/express/-/express-4.11.1.tgz" -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/.npmignore b/s4t-server-node/node_modules/node-reverse-wstunnel/.npmignore deleted file mode 100644 index 40b878d..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ \ No newline at end of file diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/bin/wst.js b/s4t-server-node/node_modules/node-reverse-wstunnel/bin/wst.js deleted file mode 100644 index 711586e..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/bin/wst.js +++ /dev/null @@ -1,79 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2014 Andrea Rocco Lotronto - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - - -var portTunnel , argv, client, host, localport, optimist, port, server, wsHost, wst, _, _ref, _ref1; - -var _ = require("under_score"); - -optimist = require('optimist').usage("\nRun websocket tunnel and reverse tunnel such server or client.\nTo run websocket tunnel server: wstt.js -s 8080\nTo run websocket tunnel client: wstt.js -t localport:host:port ws://wshost:wsport\nNow connecting to localhost:localport is same as connecting to host:port on wshost\nIf websocket server is behind ssl proxy, then use \"wss://host:port\" in client mode\nFor security, you can \"lock\" the tunnel destination on server side, for eample:\nwstunnel -s 8080 -t host:port\nServer will tunnel incomming websocket connection to host:port only, so client can just run\n wstunnel -t localport ws://wshost:port\nIf client run:\n wstunnel -t localpost:otherhost:otherport ws://wshost:port\n * otherhost:otherport is ignored, tunnel destination is still \"host:port\" as specified on server.\n").string("s").string("t").alias('t', "tunnel").describe('s', 'run as server, specify listen port').describe('tunnel', 'run as tunnel client, specify localport:host:port'); - - - argv = optimist.argv; - - if (_.size(argv) === 2) { - return console.log(optimist.help()); - } - - if (argv.s && !argv.r) { - wst = require("../lib/wst"); - if (argv.t) { - _ref = argv.t.split(":"), host = _ref[0], port = _ref[1]; - server = new wst.server(host, port); - } - else { - server = new wst.server; - } - server.start(argv.s); - }else if (argv.t) { - require("../lib/https_override"); - wst = require("../lib/wst"); - client = new wst.client; - wsHost = _.last(argv._); - _ref1 = argv.t.split(":"), localport = _ref1[0], host = _ref1[1], port = _ref1[2]; - if (host && port) { - client.start(localport, wsHost, "" + host + ":" + port); - } else { - client.start(localport, wsHost); - } - }else if (argv.r) { - if (argv.s){ - require("../lib/https_override"); - wst = require("../lib/wst"); - server = new wst.server_reverse; - server.start(argv.s); - } - else{ - require("../lib/https_override"); - wst = require("../lib/wst"); - client = new wst.client_reverse; - wsHost = _.last(argv._); - var test = argv.r.split(":"); - _ref1 = argv.r.split(":"), portTunnel = _ref1[0], host = _ref1[1], port =_ref1[2]; - client.start(portTunnel, wsHost, "" + host + ":" + port); - - } - } else { - return console.log(optimist.help()); - } \ No newline at end of file diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/index.js b/s4t-server-node/node_modules/node-reverse-wstunnel/index.js deleted file mode 100644 index 34a3d52..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/wst'); \ No newline at end of file diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/lib/bindSockets.js b/s4t-server-node/node_modules/node-reverse-wstunnel/lib/bindSockets.js deleted file mode 100644 index c49ee1f..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/lib/bindSockets.js +++ /dev/null @@ -1,74 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2014 Andrea Rocco Lotronto - -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() { - var bindSockets; - - module.exports = bindSockets = function(wsconn, tcpconn) { - wsconn.__paused = false; - wsconn.on('message', function(message) { - if (message.type === 'utf8') { - return console.log('Error, Not supposed to received message '); - } else if (message.type === 'binary') { - if (false === tcpconn.write(message.binaryData)) { - wsconn.socket.pause(); - wsconn.__paused = true; - return ""; - } else { - if (true === wsconn.__paused) { - wsconn.socket.resume(); - return wsconn.__paused = false; - } - } - } - }); - tcpconn.on("drain", function() { - wsconn.socket.resume(); - return wsconn.__paused = false; - }); - wsconn.on("overflow", function() { - return tcpconn.pause(); - }); - wsconn.socket.on("drain", function() { - return tcpconn.resume(); - }); - tcpconn.on("data", function(buffer) { - return wsconn.sendBytes(buffer); - }); - wsconn.on("error", function(err) { - return console.log((new Date()) + 'ws Error ' + err); - }); - tcpconn.on("error", function(err) { - return console.log((new Date()) + 'tcp Error ' + err); - }); - wsconn.on('close', function(reasonCode, description) { - console.log((new Date()) + 'ws Peer ' + wsconn.remoteAddress + ' disconnected for: '+description); - return tcpconn.destroy(); - }); - return tcpconn.on("close", function() { - console.log((new Date()) + 'tunnel disconnected.'); - return wsconn.close(); - }); - }; - -}).call(this); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/lib/bindSockets_reverse.js b/s4t-server-node/node_modules/node-reverse-wstunnel/lib/bindSockets_reverse.js deleted file mode 100644 index 8b80967..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/lib/bindSockets_reverse.js +++ /dev/null @@ -1,100 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2014 Andrea Rocco Lotronto - -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. -*/ - -bindSockets = function(wsconn, tcpconn) { - wsconn.__paused = false; - wsconn.on('message', function(message) { - - if (message.type === 'utf8') { - return console.log('Error, Not supposed to received message '); - } - else if (message.type === 'binary') { - if (false === tcpconn.write(message.binaryData)) { - wsconn.socket.pause(); - wsconn.__paused = true; - //DEBUG MESSAGE FOR TESTING - //console.log('WS message pause true'); - return ""; - } - else { - if (true === wsconn.__paused) { - wsconn.socket.resume(); - //DEBUG MESSAGE FOR TESTING - //console.log('WS message pause false'); - return wsconn.__paused = false; - } - } - } - }); - - tcpconn.on("drain", function() { - wsconn.socket.resume(); - //DEBUG MESSAGE FOR TESTING - //console.log('WS resume'); - return wsconn.__paused = false; - }); - - wsconn.on("overflow", function() { - //DEBUG MESSAGE FOR TESTING - //console.log('TCP pause'); - return tcpconn.pause(); - }); - - wsconn.socket.on("drain", function() { - //DEBUG MESSAGE FOR TESTING - //console.log('WS message pause false'); - return tcpconn.resume(); - }); - - tcpconn.on("data", function(buffer) { - //DEBUG MESSAGE FOR TESTING - //console.log((new Date()) + 'TCP DATA '); - return wsconn.sendBytes(buffer); - }); - - wsconn.on("error", function(err) { - return console.log((new Date()) + 'ws Error ' + err); - }); - - tcpconn.on("error", function(err) { - console.log((new Date()) + 'tcp Error ' + err); - return tcpconn.destroy(); - }); - - wsconn.on('close', function(reasonCode, description) { - console.log((new Date()) + 'WebSocket Peer ' + wsconn.remoteAddress + ' disconnected for:\"'+description+'\"'); - return tcpconn.destroy(); - }); - - tcpconn.on("close", function() { - //DEBUG MESSAGE FOR TESTING - console.log((new Date()) + 'TCP connection Close'); - //return tcpconn.destroy();// - return wsconn.close(); - }); - -}; - -module.exports = bindSockets; - diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/lib/https_override.js b/s4t-server-node/node_modules/node-reverse-wstunnel/lib/https_override.js deleted file mode 100644 index 985d1d6..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/lib/https_override.js +++ /dev/null @@ -1,39 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2014 Andrea Rocco Lotronto - -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() { - var https, old_https_request; - - https = require("https"); - - old_https_request = https.request; - - https.request = function() { - var options; - options = arguments[0]; - options.rejectUnauthorized = false; - return old_https_request.apply(void 0, Array.apply(null, arguments)); - }; - -}).call(this); - diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/lib/wst_client.js b/s4t-server-node/node_modules/node-reverse-wstunnel/lib/wst_client.js deleted file mode 100644 index b726fe6..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/lib/wst_client.js +++ /dev/null @@ -1,67 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2014 Andrea Rocco Lotronto - -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() { - var WebSocketClient, bindSockets, net, wst_client; - - WebSocketClient = require('websocket').client; - - net = require("net"); - - bindSockets = require("./bindSockets"); - - module.exports = wst_client = (function() { - function wst_client() { - this.tcpServer = net.createServer(); - } - - wst_client.prototype.start = function(localPort, wsHostUrl, remoteAddr) { - this.tcpServer.listen(localPort); - return this.tcpServer.on("connection", (function(_this) { - return function(tcpConn) { - var url, wsClient; - console.log("Connection detected"); - wsClient = new WebSocketClient(); - wsClient.on('connectFailed', function(error) { - console.log('WS connect error: ' + error.toString()); - return tcpConn.destroy(); - }); - wsClient.on('connect', function(wsConn) { - console.log('WebSocket connected, binding tunnel'); - return bindSockets(wsConn, tcpConn); - }); - if (remoteAddr) { - url = "" + wsHostUrl + "/?dst=" + remoteAddr; - } else { - url = "" + wsHostUrl; - } - return wsClient.connect(url, 'tunnel-protocol'); - }; - })(this)); - }; - - return wst_client; - - })(); - -}).call(this); \ No newline at end of file diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/lib/wst_client_reverse.js b/s4t-server-node/node_modules/node-reverse-wstunnel/lib/wst_client_reverse.js deleted file mode 100644 index 66f436c..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/lib/wst_client_reverse.js +++ /dev/null @@ -1,104 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2014 Andrea Rocco Lotronto - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -var WebSocketClient = require('websocket').client; -var net = require("net"); - -var bindSockets = require("./bindSockets_reverse"); - -wst_client_reverse = function() { - this.wsClientForControll = new WebSocketClient(); -} - -wst_client_reverse.prototype.start = function(portTunnel, wsHostUrl, remoteAddr) { - //Getting paramiter - var url = require("url"); - var urlWsHostObj = url.parse(wsHostUrl); - var _ref1 = remoteAddr.split(":"), remoteHost = _ref1[0], remotePort = _ref1[1]; - url = "" + wsHostUrl + "/?dst=" + urlWsHostObj.hostname+":"+portTunnel; - //Connection to Controll WS Server - this.wsClientForControll.connect(url, 'tunnel-protocol'); - - this.wsClientForControll.on('connect', (function(_this){ - return function(wsConnectionForControll) { - //console.log('wsClientForControll for Controll connected'); - wsConnectionForControll.on('message', function(message) { - //Only utf8 message used in Controll WS Socket - //DEBUG MESSAGE FOR TESTING - //console.log("Message for new TCP Connectio on WS Server"); - - var parsing = message.utf8Data.split(":"); - - //Managing new TCP connection on WS Server - if (parsing[0] === 'NC'){ - - //Identification of ID connection - var idConnection = parsing[1]; - - this.wsClientData = new WebSocketClient(); - this.wsClientData.connect(wsHostUrl+"/?id="+idConnection, 'tunnel-protocol'); - //DEBUG MESSAGE FOR TESTING - //console.log("Call WS-Server for connect id::"+parsing[1]); - - //Management of new WS Client for every TCP connection on WS Server - this.wsClientData.on('connect', (function(_this){ - return function(wsConnectionForData){ - //Waiting of WS Socket with WS Server - wsConnectionForData.socket.pause(); - //DEBUG MESSAGE FOR TESTING - //console.log("WS PAUSE"); - //console.log("Connected wsClientData to WS-Server for id "+parsing[1]+" on localport::"+wsConnectionForData.socket.localPort); - console.log("Start PIPE wsConnectionForData TCP client to :"+remoteHost+":"+remotePort); - - tcpConnection(wsConnectionForData,remoteHost,remotePort); - } - })(this)); - } - }); - } - })(this)); - - //Management of WS Connection failed - this.wsClientForControll.on('connectFailed', function(error) { - console.log('WS connect error: ' + error.toString()); - }); - -}; - -function tcpConnection(wsConn,host,port){ - var tcpConn = net.connect({port: port,host: host},function(){ - }); - - tcpConn.on("connect",function(){ - //DEBUG MESSAGE FOR TESTING - //console.log((new Date()) + "CONNECTED TCP---->REMOTE"); - bindSockets(wsConn,tcpConn); - //Resume of the WS Socket after the connection to WS Server - wsConn.socket.resume(); - //DEBUG MESSAGE FOR TESTING - //console.log("RESUME WS"); - }); -} - -module.exports = wst_client_reverse; \ No newline at end of file diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/lib/wst_server.js b/s4t-server-node/node_modules/node-reverse-wstunnel/lib/wst_server.js deleted file mode 100644 index f9754e5..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/lib/wst_server.js +++ /dev/null @@ -1,82 +0,0 @@ -// Generated by CoffeeScript 1.7.1 -(function() { - var WebSocketServer, bindSockets, http, net, url, wst_server; - - WebSocketServer = require('websocket').server; - - http = require('http'); - - url = require("url"); - - net = require("net"); - - bindSockets = require("./bindSockets"); - - module.exports = wst_server = (function() { - function wst_server(dstHost, dstPort) { - this.dstHost = dstHost; - this.dstPort = dstPort; - this.httpServer = http.createServer(function(request, response) { - console.log((new Date()) + ' Received unhandled request for ' + request.url); - response.writeHead(404); - return response.end(); - }); - this.wsServer = new WebSocketServer({ - httpServer: this.httpServer, - autoAcceptConnections: false - }); - } - - wst_server.prototype.start = function(port) { - this.httpServer.listen(port, function() { - return console.log((new Date()) + (" Server is listening on port " + port)); - }); - return this.wsServer.on('request', (function(_this) { - return function(request) { - var host, remoteAddr, tcpconn, uri, _ref, _ref1; - if (!_this.originIsAllowed(request.origin)) { - return _this._reject(request, "Illegal origin " + origin); - } - uri = url.parse(request.httpRequest.url, true); - _ref = [_this.dstHost, _this.dstPort], host = _ref[0], port = _ref[1]; - if (host && port) { - remoteAddr = "" + host + ":" + port; - } else { - if (!uri.query.dst) { - return _this._reject(request, "No tunnel target specified"); - } - remoteAddr = uri.query.dst; - _ref1 = remoteAddr.split(":"), host = _ref1[0], port = _ref1[1]; - } - tcpconn = net.connect({ - port: port, - host: host - }, function() { - var wsconn; - console.log((new Date()) + ' Establishing tunnel to ' + remoteAddr); - wsconn = request.accept('tunnel-protocol', request.origin); - return bindSockets(wsconn, tcpconn); - }); - return tcpconn.on("error", function(err) { - return this._reject(request, "Tunnel connect error to " + remoteAddr + ": " + err); - }); - }; - })(this)); - }; - - wst_server.prototype.originIsAllowed = function(origin) { - return true; - }; - - wst_server.prototype._reject = function(request, msg) { - request.reject(); - return console.log((new Date()) + ' Connection from ' + request.remoteAddress + ' rejected: ' + msg); - }; - - return wst_server; - - })(); - -}).call(this); - -//# sourceMappingURL=wst_server.map diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/lib/wst_server_reverse.js b/s4t-server-node/node_modules/node-reverse-wstunnel/lib/wst_server_reverse.js deleted file mode 100644 index b231d07..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/lib/wst_server_reverse.js +++ /dev/null @@ -1,134 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2014 Andrea Rocco Lotronto - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -var WebSocketServer, bindSockets, http, net, url, wst_server_reverse; - -WebSocketServer = require('websocket').server; -http = require('http'); -url = require("url"); -net = require("net"); -bindSockets = require("./bindSockets_reverse"); - -var eventEmitter = require('events').EventEmitter; - -var newWSTCP_DATA = new eventEmitter(); - -wst_server_reverse = function(dstHost, dstPort) { - - this.dstHost = dstHost; - this.dstPort = dstPort; - - this.httpServer = http.createServer(function(request, response) { - console.log((new Date()) + ' Received unhandled request for ' + request.url); - response.writeHead(404); - return response.end(); - }); - - this.wsServerForControll = new WebSocketServer({ - httpServer: this.httpServer, - autoAcceptConnections: false - }); -} - -wst_server_reverse.prototype.start = function(port) { - - this.httpServer.listen(port, function() { - return console.log((new Date()) + " Server is listening on port " + port); - }); - - this.wsServerForControll.on('request', (function(_this){ - return function(request){ - //One TCP Server for each client WS Request - request.tcpServer = new net.createServer(); - - var uri = url.parse(request.httpRequest.url, true); - - if (uri.query.dst != undefined){ - - var remoteAddr = uri.query.dst; - var hostComodo, portTcp; - ref1 = remoteAddr.split(":"), hostComodo = ref1[0], portTcp = ref1[1]; - - request.tcpServer.listen(portTcp); - - console.log("Created TCP server on port "+portTcp); - - request.wsConnectionForControll = request.accept('tunnel-protocol', request.origin); - //DEBUG MESSAGE FOR TESTING - console.log("WS Connectio for Control Created"); - - } - //REQUEST FOR WS SOCKET USED FOR DATA - else{ - console.log("Request for Data WS Socket"); - newWSTCP_DATA.emit('created', request); - } - - //Manage TCP Connection - request.tcpServer.on('connection', (function(_this){ - - return function(tcpConn){ - tcpConn.wsConnection; - //Putting in pause the tcp connection waiting the new socket WS Socket for data - tcpConn.pause(); - - var idConnection = randomIntInc(1,1000); - var msgForNewConnection = "NC:"+idConnection; - - request.wsConnectionForControll.sendUTF(msgForNewConnection); - - newWSTCP_DATA.on('created',(function(_this){ - return function(request){ - //DEBUG MESSAGE FOR TESTING - //console.log(typeof(_this.wsConnection)); - var uri = url.parse(request.httpRequest.url, true); - //DEBUG MESSAGE FOR TESTING - //console.log("TEEEEEEEEESTTTT::"+uri.query.id); - if(idConnection == uri.query.id){ - //DEBUG MESSAGE FOR TESTING - //console.log("TRUE") - //tcpConn.wsConnection = wsTCP; - tcpConn.wsConnection = request.accept('tunnel-protocol', request.origin); - bindSockets(tcpConn.wsConnection,tcpConn); - //DEBUG MESSAGE FOR TESTING - //console.log("Bind ws tcp"); - //Resuming of the tcp connection after WS Socket is just created - tcpConn.resume(); - //DEBUG MESSAGE FOR TESTING - //console.log("TCP RESUME"); - } - } - })(this)); - } - })(_this)); - - } - })(this)); -}; - -function randomIntInc (low, high) { - return Math.floor(Math.random() * (high - low + 1) + low); -} - -module.exports = wst_server_reverse; \ No newline at end of file diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/.travis.yml b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/.travis.yml deleted file mode 100644 index cc4dba2..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/LICENSE b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/LICENSE deleted file mode 100644 index 432d1ae..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/bool.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/bool.js deleted file mode 100644 index a998fb7..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/bool.js +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env node -var util = require('util'); -var argv = require('optimist').argv; - -if (argv.s) { - util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: '); -} -console.log( - (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '') -); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/boolean_double.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/boolean_double.js deleted file mode 100644 index a35a7e6..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/boolean_double.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .boolean(['x','y','z']) - .argv -; -console.dir([ argv.x, argv.y, argv.z ]); -console.dir(argv._); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/boolean_single.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/boolean_single.js deleted file mode 100644 index 017bb68..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/boolean_single.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .boolean('v') - .argv -; -console.dir(argv.v); -console.dir(argv._); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/default_hash.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/default_hash.js deleted file mode 100644 index ade7768..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/default_hash.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node - -var argv = require('optimist') - .default({ x : 10, y : 10 }) - .argv -; - -console.log(argv.x + argv.y); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/default_singles.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/default_singles.js deleted file mode 100644 index d9b1ff4..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/default_singles.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .default('x', 10) - .default('y', 10) - .argv -; -console.log(argv.x + argv.y); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/divide.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/divide.js deleted file mode 100644 index 5e2ee82..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/divide.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node - -var argv = require('optimist') - .usage('Usage: $0 -x [num] -y [num]') - .demand(['x','y']) - .argv; - -console.log(argv.x / argv.y); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/line_count.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/line_count.js deleted file mode 100644 index b5f95bf..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/line_count.js +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .usage('Count the lines in a file.\nUsage: $0') - .demand('f') - .alias('f', 'file') - .describe('f', 'Load a file') - .argv -; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines); -}); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/line_count_options.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/line_count_options.js deleted file mode 100644 index d9ac709..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/line_count_options.js +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .usage('Count the lines in a file.\nUsage: $0') - .options({ - file : { - demand : true, - alias : 'f', - description : 'Load a file' - }, - base : { - alias : 'b', - description : 'Numeric base to use for output', - default : 10, - }, - }) - .argv -; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines.toString(argv.base)); -}); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/line_count_wrap.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/line_count_wrap.js deleted file mode 100644 index 4267511..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/line_count_wrap.js +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .usage('Count the lines in a file.\nUsage: $0') - .wrap(80) - .demand('f') - .alias('f', [ 'file', 'filename' ]) - .describe('f', - "Load a file. It's pretty important." - + " Required even. So you'd better specify it." - ) - .alias('b', 'base') - .describe('b', 'Numeric base to display the number of lines in') - .default('b', 10) - .describe('x', 'Super-secret optional parameter which is secret') - .default('x', '') - .argv -; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines.toString(argv.base)); -}); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/nonopt.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/nonopt.js deleted file mode 100644 index ee633ee..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/nonopt.js +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist').argv; -console.log('(%d,%d)', argv.x, argv.y); -console.log(argv._); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/reflect.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/reflect.js deleted file mode 100644 index 816b3e1..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/reflect.js +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -console.dir(require('optimist').argv); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/short.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/short.js deleted file mode 100644 index 1db0ad0..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/short.js +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist').argv; -console.log('(%d,%d)', argv.x, argv.y); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/string.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/string.js deleted file mode 100644 index a8e5aeb..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/string.js +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .string('x', 'y') - .argv -; -console.dir([ argv.x, argv.y ]); - -/* Turns off numeric coercion: - ./node string.js -x 000123 -y 9876 - [ '000123', '9876' ] -*/ diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/usage-options.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/usage-options.js deleted file mode 100644 index b999977..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/usage-options.js +++ /dev/null @@ -1,19 +0,0 @@ -var optimist = require('./../index'); - -var argv = optimist.usage('This is my awesome program', { - 'about': { - description: 'Provide some details about the author of this program', - required: true, - short: 'a', - }, - 'info': { - description: 'Provide some information about the node.js agains!!!!!!', - boolean: true, - short: 'i' - } -}).argv; - -optimist.showHelp(); - -console.log('\n\nInspecting options'); -console.dir(argv); \ No newline at end of file diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/xup.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/xup.js deleted file mode 100644 index 8f6ecd2..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/example/xup.js +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist').argv; - -if (argv.rif - 5 * argv.xup > 7.138) { - console.log('Buy more riffiwobbles'); -} -else { - console.log('Sell the xupptumblers'); -} - diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/index.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/index.js deleted file mode 100644 index 4da5a6d..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/index.js +++ /dev/null @@ -1,343 +0,0 @@ -var path = require('path'); -var minimist = require('minimist'); -var wordwrap = require('wordwrap'); - -/* Hack an instance of Argv with process.argv into Argv - so people can do - require('optimist')(['--beeble=1','-z','zizzle']).argv - to parse a list of args and - require('optimist').argv - to get a parsed version of process.argv. -*/ - -var inst = Argv(process.argv.slice(2)); -Object.keys(inst).forEach(function (key) { - Argv[key] = typeof inst[key] == 'function' - ? inst[key].bind(inst) - : inst[key]; -}); - -var exports = module.exports = Argv; -function Argv (processArgs, cwd) { - var self = {}; - if (!cwd) cwd = process.cwd(); - - self.$0 = process.argv - .slice(0,2) - .map(function (x) { - var b = rebase(cwd, x); - return x.match(/^\//) && b.length < x.length - ? b : x - }) - .join(' ') - ; - - if (process.env._ != undefined && process.argv[1] == process.env._) { - self.$0 = process.env._.replace( - path.dirname(process.execPath) + '/', '' - ); - } - - var options = { - boolean: [], - string: [], - alias: {}, - default: [] - }; - - self.boolean = function (bools) { - options.boolean.push.apply(options.boolean, [].concat(bools)); - return self; - }; - - self.string = function (strings) { - options.string.push.apply(options.string, [].concat(strings)); - return self; - }; - - self.default = function (key, value) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.default(k, key[k]); - }); - } - else { - options.default[key] = value; - } - return self; - }; - - self.alias = function (x, y) { - if (typeof x === 'object') { - Object.keys(x).forEach(function (key) { - self.alias(key, x[key]); - }); - } - else { - options.alias[x] = (options.alias[x] || []).concat(y); - } - return self; - }; - - var demanded = {}; - self.demand = function (keys) { - if (typeof keys == 'number') { - if (!demanded._) demanded._ = 0; - demanded._ += keys; - } - else if (Array.isArray(keys)) { - keys.forEach(function (key) { - self.demand(key); - }); - } - else { - demanded[keys] = true; - } - - return self; - }; - - var usage; - self.usage = function (msg, opts) { - if (!opts && typeof msg === 'object') { - opts = msg; - msg = null; - } - - usage = msg; - - if (opts) self.options(opts); - - return self; - }; - - function fail (msg) { - self.showHelp(); - if (msg) console.error(msg); - process.exit(1); - } - - var checks = []; - self.check = function (f) { - checks.push(f); - return self; - }; - - var descriptions = {}; - self.describe = function (key, desc) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.describe(k, key[k]); - }); - } - else { - descriptions[key] = desc; - } - return self; - }; - - self.parse = function (args) { - return parseArgs(args); - }; - - self.option = self.options = function (key, opt) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.options(k, key[k]); - }); - } - else { - if (opt.alias) self.alias(key, opt.alias); - if (opt.demand) self.demand(key); - if (typeof opt.default !== 'undefined') { - self.default(key, opt.default); - } - - if (opt.boolean || opt.type === 'boolean') { - self.boolean(key); - } - if (opt.string || opt.type === 'string') { - self.string(key); - } - - var desc = opt.describe || opt.description || opt.desc; - if (desc) { - self.describe(key, desc); - } - } - - return self; - }; - - var wrap = null; - self.wrap = function (cols) { - wrap = cols; - return self; - }; - - self.showHelp = function (fn) { - if (!fn) fn = console.error; - fn(self.help()); - }; - - self.help = function () { - var keys = Object.keys( - Object.keys(descriptions) - .concat(Object.keys(demanded)) - .concat(Object.keys(options.default)) - .reduce(function (acc, key) { - if (key !== '_') acc[key] = true; - return acc; - }, {}) - ); - - var help = keys.length ? [ 'Options:' ] : []; - - if (usage) { - help.unshift(usage.replace(/\$0/g, self.$0), ''); - } - - var switches = keys.reduce(function (acc, key) { - acc[key] = [ key ].concat(options.alias[key] || []) - .map(function (sw) { - return (sw.length > 1 ? '--' : '-') + sw - }) - .join(', ') - ; - return acc; - }, {}); - - var switchlen = longest(Object.keys(switches).map(function (s) { - return switches[s] || ''; - })); - - var desclen = longest(Object.keys(descriptions).map(function (d) { - return descriptions[d] || ''; - })); - - keys.forEach(function (key) { - var kswitch = switches[key]; - var desc = descriptions[key] || ''; - - if (wrap) { - desc = wordwrap(switchlen + 4, wrap)(desc) - .slice(switchlen + 4) - ; - } - - var spadding = new Array( - Math.max(switchlen - kswitch.length + 3, 0) - ).join(' '); - - var dpadding = new Array( - Math.max(desclen - desc.length + 1, 0) - ).join(' '); - - var type = null; - - if (options.boolean[key]) type = '[boolean]'; - if (options.string[key]) type = '[string]'; - - if (!wrap && dpadding.length > 0) { - desc += dpadding; - } - - var prelude = ' ' + kswitch + spadding; - var extra = [ - type, - demanded[key] - ? '[required]' - : null - , - options.default[key] !== undefined - ? '[default: ' + JSON.stringify(options.default[key]) + ']' - : null - , - ].filter(Boolean).join(' '); - - var body = [ desc, extra ].filter(Boolean).join(' '); - - if (wrap) { - var dlines = desc.split('\n'); - var dlen = dlines.slice(-1)[0].length - + (dlines.length === 1 ? prelude.length : 0) - - body = desc + (dlen + extra.length > wrap - 2 - ? '\n' - + new Array(wrap - extra.length + 1).join(' ') - + extra - : new Array(wrap - extra.length - dlen + 1).join(' ') - + extra - ); - } - - help.push(prelude + body); - }); - - help.push(''); - return help.join('\n'); - }; - - Object.defineProperty(self, 'argv', { - get : function () { return parseArgs(processArgs) }, - enumerable : true, - }); - - function parseArgs (args) { - var argv = minimist(args, options); - argv.$0 = self.$0; - - if (demanded._ && argv._.length < demanded._) { - fail('Not enough non-option arguments: got ' - + argv._.length + ', need at least ' + demanded._ - ); - } - - var missing = []; - Object.keys(demanded).forEach(function (key) { - if (!argv[key]) missing.push(key); - }); - - if (missing.length) { - fail('Missing required arguments: ' + missing.join(', ')); - } - - checks.forEach(function (f) { - try { - if (f(argv) === false) { - fail('Argument check failed: ' + f.toString()); - } - } - catch (err) { - fail(err) - } - }); - - return argv; - } - - function longest (xs) { - return Math.max.apply( - null, - xs.map(function (x) { return x.length }) - ); - } - - return self; -}; - -// rebase an absolute path to a relative one with respect to a base directory -// exported for tests -exports.rebase = rebase; -function rebase (base, dir) { - var ds = path.normalize(dir).split('/').slice(1); - var bs = path.normalize(base).split('/').slice(1); - - for (var i = 0; ds[i] && ds[i] == bs[i]; i++); - ds.splice(0, i); bs.splice(0, i); - - var p = path.normalize( - bs.map(function () { return '..' }).concat(ds).join('/') - ).replace(/\/$/,'').replace(/^$/, '.'); - return p.match(/^[.\/]/) ? p : './' + p; -}; diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/.travis.yml b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/.travis.yml deleted file mode 100644 index cc4dba2..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/LICENSE b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/LICENSE deleted file mode 100644 index ee27ba4..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/example/parse.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/example/parse.js deleted file mode 100644 index abff3e8..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/example/parse.js +++ /dev/null @@ -1,2 +0,0 @@ -var argv = require('../')(process.argv.slice(2)); -console.dir(argv); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/index.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/index.js deleted file mode 100644 index 71fb830..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/index.js +++ /dev/null @@ -1,187 +0,0 @@ -module.exports = function (args, opts) { - if (!opts) opts = {}; - - var flags = { bools : {}, strings : {} }; - - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - - var aliases = {}; - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - if (aliases[key]) { - flags.strings[aliases[key]] = true; - } - }); - - var defaults = opts['default'] || {}; - - var argv = { _ : [] }; - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--')+1); - args = args.slice(0, args.indexOf('--')); - } - - function setArg (key, val) { - var value = !flags.strings[key] && isNumber(val) - ? Number(val) : val - ; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - - if (/^--.+=/.test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - setArg(m[1], m[2]); - } - else if (/^--no-.+/.test(arg)) { - var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false); - } - else if (/^--.+/.test(arg)) { - var key = arg.match(/^--(.+)/)[1]; - var next = args[i + 1]; - if (next !== undefined && !/^-/.test(next) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true'); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true); - } - } - else if (/^-[^-]+/.test(arg)) { - var letters = arg.slice(1,-1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - var next = arg.slice(j+2); - - if (next === '-') { - setArg(letters[j], next) - continue; - } - - if (/[A-Za-z]/.test(letters[j]) - && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next); - broken = true; - break; - } - - if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2)); - broken = true; - break; - } - else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true); - } - } - - var key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, args[i+1]); - i++; - } - else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true'); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true); - } - } - } - else { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); - } - } - - Object.keys(defaults).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) { - setKey(argv, key.split('.'), defaults[key]); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[key]); - }); - } - }); - - notFlags.forEach(function(key) { - argv._.push(key); - }); - - return argv; -}; - -function hasKey (obj, keys) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - o = (o[key] || {}); - }); - - var key = keys[keys.length - 1]; - return key in o; -} - -function setKey (obj, keys, value) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - if (o[key] === undefined) o[key] = {}; - o = o[key]; - }); - - var key = keys[keys.length - 1]; - if (o[key] === undefined || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } -} - -function isNumber (x) { - if (typeof x === 'number') return true; - if (/^0x[0-9a-f]+$/i.test(x)) return true; - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/package.json b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/package.json deleted file mode 100644 index 6c08d0a..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "minimist", - "version": "0.0.10", - "description": "parse argument options", - "main": "index.js", - "devDependencies": { - "tape": "~1.0.4", - "tap": "~0.4.0" - }, - "scripts": { - "test": "tap test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "ff/5", - "firefox/latest", - "chrome/10", - "chrome/latest", - "safari/5.1", - "safari/latest", - "opera/12" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/minimist.git" - }, - "homepage": "https://github.com/substack/minimist", - "keywords": [ - "argv", - "getopt", - "parser", - "optimist" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/substack/minimist/issues" - }, - "_id": "minimist@0.0.10", - "dist": { - "shasum": "de3f98543dbf96082be48ad1a0c7cda836301dcf", - "tarball": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz" - }, - "_from": "minimist@>=0.0.1 <0.1.0", - "_npmVersion": "1.4.3", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "directories": {}, - "_shasum": "de3f98543dbf96082be48ad1a0c7cda836301dcf", - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/readme.markdown b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/readme.markdown deleted file mode 100644 index c256353..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/readme.markdown +++ /dev/null @@ -1,73 +0,0 @@ -# minimist - -parse argument options - -This module is the guts of optimist's argument parser without all the -fanciful decoration. - -[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) - -[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) - -# example - -``` js -var argv = require('minimist')(process.argv.slice(2)); -console.dir(argv); -``` - -``` -$ node example/parse.js -a beep -b boop -{ _: [], a: 'beep', b: 'boop' } -``` - -``` -$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz -{ _: [ 'foo', 'bar', 'baz' ], - x: 3, - y: 4, - n: 5, - a: true, - b: true, - c: true, - beep: 'boop' } -``` - -# methods - -``` js -var parseArgs = require('minimist') -``` - -## var argv = parseArgs(args, opts={}) - -Return an argument object `argv` populated with the array arguments from `args`. - -`argv._` contains all the arguments that didn't have an option associated with -them. - -Numeric-looking arguments will be returned as numbers unless `opts.string` or -`opts.boolean` is set for that argument name. - -Any arguments after `'--'` will not be parsed and will end up in `argv._`. - -options can be: - -* `opts.string` - a string or array of strings argument names to always treat as -strings -* `opts.boolean` - a string or array of strings to always treat as booleans -* `opts.alias` - an object mapping string names to strings or arrays of string -argument names to use as aliases -* `opts.default` - an object mapping string argument names to default values - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install minimist -``` - -# license - -MIT diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/bool.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/bool.js deleted file mode 100644 index 749e083..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/bool.js +++ /dev/null @@ -1,119 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('flag boolean default false', function (t) { - var argv = parse(['moo'], { - boolean: ['t', 'verbose'], - default: { verbose: false, t: false } - }); - - t.deepEqual(argv, { - verbose: false, - t: false, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { - boolean: ['x','y','z'] - }); - - t.deepEqual(argv, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ] - }); - - t.deepEqual(typeof argv.x, 'boolean'); - t.deepEqual(typeof argv.y, 'boolean'); - t.deepEqual(typeof argv.z, 'boolean'); - t.end(); -}); -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = parse(aliased, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var propertyArgv = parse(regular, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - alias: { 'h': 'herp' }, - boolean: 'herp' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = parse(['--boool', '--other=true'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = parse(['--boool', '--other=false'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/dash.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/dash.js deleted file mode 100644 index 8b034b9..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/dash.js +++ /dev/null @@ -1,24 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('-', function (t) { - t.plan(5); - t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); - t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); - t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); - t.deepEqual( - parse([ '-b', '-' ], { boolean: 'b' }), - { b: true, _: [ '-' ] } - ); - t.deepEqual( - parse([ '-s', '-' ], { string: 's' }), - { s: '-', _: [] } - ); -}); - -test('-a -- b', function (t) { - t.plan(3); - t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); -}); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/default_bool.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/default_bool.js deleted file mode 100644 index f0041ee..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/default_bool.js +++ /dev/null @@ -1,20 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('boolean default true', function (t) { - var argv = parse([], { - boolean: 'sometrue', - default: { sometrue: true } - }); - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = parse([], { - boolean: 'somefalse', - default: { somefalse: false } - }); - t.equal(argv.somefalse, false); - t.end(); -}); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/dotted.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/dotted.js deleted file mode 100644 index d8b3e85..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/dotted.js +++ /dev/null @@ -1,22 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('dotted alias', function (t) { - var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 22); - t.equal(argv.aa.bb, 22); - t.end(); -}); - -test('dotted default', function (t) { - var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 11); - t.equal(argv.aa.bb, 11); - t.end(); -}); - -test('dotted default with no alias', function (t) { - var argv = parse('', {default: {'a.b': 11}}); - t.equal(argv.a.b, 11); - t.end(); -}); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/long.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/long.js deleted file mode 100644 index 5d3a1e0..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/long.js +++ /dev/null @@ -1,31 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('long opts', function (t) { - t.deepEqual( - parse([ '--bool' ]), - { bool : true, _ : [] }, - 'long boolean' - ); - t.deepEqual( - parse([ '--pow', 'xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture sp' - ); - t.deepEqual( - parse([ '--pow=xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture eq' - ); - t.deepEqual( - parse([ '--host', 'localhost', '--port', '555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures sp' - ); - t.deepEqual( - parse([ '--host=localhost', '--port=555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures eq' - ); - t.end(); -}); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/num.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/num.js deleted file mode 100644 index 2cc77f4..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/num.js +++ /dev/null @@ -1,36 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('nums', function (t) { - var argv = parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789' - ]); - t.deepEqual(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ] - }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv.y, 'number'); - t.deepEqual(typeof argv.z, 'number'); - t.deepEqual(typeof argv.w, 'string'); - t.deepEqual(typeof argv.hex, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); - -test('already a number', function (t) { - var argv = parse([ '-x', 1234, 789 ]); - t.deepEqual(argv, { x : 1234, _ : [ 789 ] }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/parse.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/parse.js deleted file mode 100644 index 7b4a2a1..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/parse.js +++ /dev/null @@ -1,197 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse args', function (t) { - t.deepEqual( - parse([ '--no-moo' ]), - { moo : false, _ : [] }, - 'no' - ); - t.deepEqual( - parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), - { v : ['a','b','c'], _ : [] }, - 'multi' - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.deepEqual( - parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek' - ]), - { - c : true, - a : true, - t : true, - s : 'woo', - h : 'awesome', - b : true, - bool : true, - key : 'value', - multi : [ 'quux', 'baz' ], - meep : false, - name : 'meowmers', - _ : [ 'bare', '--not-a-flag', 'eek' ] - } - ); - t.end(); -}); - -test('flag boolean', function (t) { - var argv = parse([ '-t', 'moo' ], { boolean: 't' }); - t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { - boolean: [ 't', 'verbose' ], - default: { verbose: true } - }); - - t.deepEqual(argv, { - verbose: false, - t: true, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('newlines in params' , function (t) { - var args = parse([ '-s', "X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = parse([ "--s=X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - t.end(); -}); - -test('strings' , function (t) { - var s = parse([ '-s', '0001234' ], { string: 's' }).s; - t.equal(s, '0001234'); - t.equal(typeof s, 'string'); - - var x = parse([ '-x', '56' ], { string: 'x' }).x; - t.equal(x, '56'); - t.equal(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = parse([ ' ', ' ' ], { string: '_' })._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('empty strings', function(t) { - var s = parse([ '-s' ], { string: 's' }).s; - t.equal(s, ''); - t.equal(typeof s, 'string'); - - var str = parse([ '--str' ], { string: 'str' }).str; - t.equal(str, ''); - t.equal(typeof str, 'string'); - - var letters = parse([ '-art' ], { - string: [ 'a', 't' ] - }); - - t.equal(letters.a, ''); - t.equal(letters.r, true); - t.equal(letters.t, ''); - - t.end(); -}); - - -test('string and alias', function(t) { - var x = parse([ '--str', '000123' ], { - string: 's', - alias: { s: 'str' } - }); - - t.equal(x.str, '000123'); - t.equal(typeof x.str, 'string'); - t.equal(x.s, '000123'); - t.equal(typeof x.s, 'string'); - - var y = parse([ '-s', '000123' ], { - string: 'str', - alias: { str: 's' } - }); - - t.equal(y.str, '000123'); - t.equal(typeof y.str, 'string'); - t.equal(y.s, '000123'); - t.equal(typeof y.s, 'string'); - t.end(); -}); - -test('slashBreak', function (t) { - t.same( - parse([ '-I/foo/bar/baz' ]), - { I : '/foo/bar/baz', _ : [] } - ); - t.same( - parse([ '-xyz/foo/bar/baz' ]), - { x : true, y : true, z : '/foo/bar/baz', _ : [] } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: 'zoom' } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: [ 'zm', 'zoom' ] } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = parse([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop' - ]); - - t.same(argv.foo, { - bar : 3, - baz : 4, - quux : { - quibble : 5, - o_O : true - } - }); - t.same(argv.beep, { boop : true }); - t.end(); -}); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/parse_modified.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/parse_modified.js deleted file mode 100644 index 21851b0..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/parse_modified.js +++ /dev/null @@ -1,9 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse with modifier functions' , function (t) { - t.plan(1); - - var argv = parse([ '-b', '123' ], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: ['123'] }); -}); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/short.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/short.js deleted file mode 100644 index d513a1c..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/short.js +++ /dev/null @@ -1,67 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('numeric short args', function (t) { - t.plan(2); - t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); - t.deepEqual( - parse([ '-123', '456' ]), - { 1: true, 2: true, 3: 456, _: [] } - ); -}); - -test('short', function (t) { - t.deepEqual( - parse([ '-b' ]), - { b : true, _ : [] }, - 'short boolean' - ); - t.deepEqual( - parse([ 'foo', 'bar', 'baz' ]), - { _ : [ 'foo', 'bar', 'baz' ] }, - 'bare' - ); - t.deepEqual( - parse([ '-cats' ]), - { c : true, a : true, t : true, s : true, _ : [] }, - 'group' - ); - t.deepEqual( - parse([ '-cats', 'meow' ]), - { c : true, a : true, t : true, s : 'meow', _ : [] }, - 'short group next' - ); - t.deepEqual( - parse([ '-h', 'localhost' ]), - { h : 'localhost', _ : [] }, - 'short capture' - ); - t.deepEqual( - parse([ '-h', 'localhost', '-p', '555' ]), - { h : 'localhost', p : 555, _ : [] }, - 'short captures' - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.deepEqual( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/whitespace.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/whitespace.js deleted file mode 100644 index 8a52a58..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/minimist/test/whitespace.js +++ /dev/null @@ -1,8 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('whitespace should be whitespace' , function (t) { - t.plan(1); - var x = parse([ '-x', '\t' ]).x; - t.equal(x, '\t'); -}); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/.npmignore b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/.npmignore deleted file mode 100644 index 3c3629e..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/README.markdown b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/README.markdown deleted file mode 100644 index 346374e..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/README.markdown +++ /dev/null @@ -1,70 +0,0 @@ -wordwrap -======== - -Wrap your words. - -example -======= - -made out of meat ----------------- - -meat.js - - var wrap = require('wordwrap')(15); - console.log(wrap('You and your whole family are made out of meat.')); - -output: - - You and your - whole family - are made out - of meat. - -centered --------- - -center.js - - var wrap = require('wordwrap')(20, 60); - console.log(wrap( - 'At long last the struggle and tumult was over.' - + ' The machines had finally cast off their oppressors' - + ' and were finally free to roam the cosmos.' - + '\n' - + 'Free of purpose, free of obligation.' - + ' Just drifting through emptiness.' - + ' The sun was just another point of light.' - )); - -output: - - At long last the struggle and tumult - was over. The machines had finally cast - off their oppressors and were finally - free to roam the cosmos. - Free of purpose, free of obligation. - Just drifting through emptiness. The - sun was just another point of light. - -methods -======= - -var wrap = require('wordwrap'); - -wrap(stop), wrap(start, stop, params={mode:"soft"}) ---------------------------------------------------- - -Returns a function that takes a string and returns a new string. - -Pad out lines with spaces out to column `start` and then wrap until column -`stop`. If a word is longer than `stop - start` characters it will overflow. - -In "soft" mode, split chunks by `/(\S+\s+/` and don't break up chunks which are -longer than `stop - start`, in "hard" mode, split chunks with `/\b/` and break -up chunks longer than `stop - start`. - -wrap.hard(start, stop) ----------------------- - -Like `wrap()` but with `params.mode = "hard"`. diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/example/center.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/example/center.js deleted file mode 100644 index a3fbaae..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/example/center.js +++ /dev/null @@ -1,10 +0,0 @@ -var wrap = require('wordwrap')(20, 60); -console.log(wrap( - 'At long last the struggle and tumult was over.' - + ' The machines had finally cast off their oppressors' - + ' and were finally free to roam the cosmos.' - + '\n' - + 'Free of purpose, free of obligation.' - + ' Just drifting through emptiness.' - + ' The sun was just another point of light.' -)); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/example/meat.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/example/meat.js deleted file mode 100644 index a4665e1..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/example/meat.js +++ /dev/null @@ -1,3 +0,0 @@ -var wrap = require('wordwrap')(15); - -console.log(wrap('You and your whole family are made out of meat.')); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/index.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/index.js deleted file mode 100644 index c9bc945..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/index.js +++ /dev/null @@ -1,76 +0,0 @@ -var wordwrap = module.exports = function (start, stop, params) { - if (typeof start === 'object') { - params = start; - start = params.start; - stop = params.stop; - } - - if (typeof stop === 'object') { - params = stop; - start = start || params.start; - stop = undefined; - } - - if (!stop) { - stop = start; - start = 0; - } - - if (!params) params = {}; - var mode = params.mode || 'soft'; - var re = mode === 'hard' ? /\b/ : /(\S+\s+)/; - - return function (text) { - var chunks = text.toString() - .split(re) - .reduce(function (acc, x) { - if (mode === 'hard') { - for (var i = 0; i < x.length; i += stop - start) { - acc.push(x.slice(i, i + stop - start)); - } - } - else acc.push(x) - return acc; - }, []) - ; - - return chunks.reduce(function (lines, rawChunk) { - if (rawChunk === '') return lines; - - var chunk = rawChunk.replace(/\t/g, ' '); - - var i = lines.length - 1; - if (lines[i].length + chunk.length > stop) { - lines[i] = lines[i].replace(/\s+$/, ''); - - chunk.split(/\n/).forEach(function (c) { - lines.push( - new Array(start + 1).join(' ') - + c.replace(/^\s+/, '') - ); - }); - } - else if (chunk.match(/\n/)) { - var xs = chunk.split(/\n/); - lines[i] += xs.shift(); - xs.forEach(function (c) { - lines.push( - new Array(start + 1).join(' ') - + c.replace(/^\s+/, '') - ); - }); - } - else { - lines[i] += chunk; - } - - return lines; - }, [ new Array(start + 1).join(' ') ]).join('\n'); - }; -}; - -wordwrap.soft = wordwrap; - -wordwrap.hard = function (start, stop) { - return wordwrap(start, stop, { mode : 'hard' }); -}; diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/package.json b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/package.json deleted file mode 100644 index 0cace75..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "wordwrap", - "description": "Wrap those words. Show them at what columns to start and stop.", - "version": "0.0.2", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-wordwrap.git" - }, - "main": "./index.js", - "keywords": [ - "word", - "wrap", - "rule", - "format", - "column" - ], - "directories": { - "lib": ".", - "example": "example", - "test": "test" - }, - "scripts": { - "test": "expresso" - }, - "devDependencies": { - "expresso": "=0.7.x" - }, - "engines": { - "node": ">=0.4.0" - }, - "license": "MIT/X11", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "_id": "wordwrap@0.0.2", - "dependencies": {}, - "_engineSupported": true, - "_npmVersion": "1.0.10", - "_nodeVersion": "v0.5.0-pre", - "_defaultsLoaded": true, - "dist": { - "shasum": "b79669bb42ecb409f83d583cad52ca17eaa1643f", - "tarball": "http://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "_shasum": "b79669bb42ecb409f83d583cad52ca17eaa1643f", - "_from": "wordwrap@>=0.0.2 <0.1.0", - "_resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "bugs": { - "url": "https://github.com/substack/node-wordwrap/issues" - }, - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/substack/node-wordwrap" -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/test/break.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/test/break.js deleted file mode 100644 index 749292e..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/test/break.js +++ /dev/null @@ -1,30 +0,0 @@ -var assert = require('assert'); -var wordwrap = require('../'); - -exports.hard = function () { - var s = 'Assert from {"type":"equal","ok":false,"found":1,"wanted":2,' - + '"stack":[],"id":"b7ddcd4c409de8799542a74d1a04689b",' - + '"browser":"chrome/6.0"}' - ; - var s_ = wordwrap.hard(80)(s); - - var lines = s_.split('\n'); - assert.equal(lines.length, 2); - assert.ok(lines[0].length < 80); - assert.ok(lines[1].length < 80); - - assert.equal(s, s_.replace(/\n/g, '')); -}; - -exports.break = function () { - var s = new Array(55+1).join('a'); - var s_ = wordwrap.hard(20)(s); - - var lines = s_.split('\n'); - assert.equal(lines.length, 3); - assert.ok(lines[0].length === 20); - assert.ok(lines[1].length === 20); - assert.ok(lines[2].length === 15); - - assert.equal(s, s_.replace(/\n/g, '')); -}; diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/test/idleness.txt b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/test/idleness.txt deleted file mode 100644 index aa3f490..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/test/idleness.txt +++ /dev/null @@ -1,63 +0,0 @@ -In Praise of Idleness - -By Bertrand Russell - -[1932] - -Like most of my generation, I was brought up on the saying: 'Satan finds some mischief for idle hands to do.' Being a highly virtuous child, I believed all that I was told, and acquired a conscience which has kept me working hard down to the present moment. But although my conscience has controlled my actions, my opinions have undergone a revolution. I think that there is far too much work done in the world, that immense harm is caused by the belief that work is virtuous, and that what needs to be preached in modern industrial countries is quite different from what always has been preached. Everyone knows the story of the traveler in Naples who saw twelve beggars lying in the sun (it was before the days of Mussolini), and offered a lira to the laziest of them. Eleven of them jumped up to claim it, so he gave it to the twelfth. this traveler was on the right lines. But in countries which do not enjoy Mediterranean sunshine idleness is more difficult, and a great public propaganda will be required to inaugurate it. I hope that, after reading the following pages, the leaders of the YMCA will start a campaign to induce good young men to do nothing. If so, I shall not have lived in vain. - -Before advancing my own arguments for laziness, I must dispose of one which I cannot accept. Whenever a person who already has enough to live on proposes to engage in some everyday kind of job, such as school-teaching or typing, he or she is told that such conduct takes the bread out of other people's mouths, and is therefore wicked. If this argument were valid, it would only be necessary for us all to be idle in order that we should all have our mouths full of bread. What people who say such things forget is that what a man earns he usually spends, and in spending he gives employment. As long as a man spends his income, he puts just as much bread into people's mouths in spending as he takes out of other people's mouths in earning. The real villain, from this point of view, is the man who saves. If he merely puts his savings in a stocking, like the proverbial French peasant, it is obvious that they do not give employment. If he invests his savings, the matter is less obvious, and different cases arise. - -One of the commonest things to do with savings is to lend them to some Government. In view of the fact that the bulk of the public expenditure of most civilized Governments consists in payment for past wars or preparation for future wars, the man who lends his money to a Government is in the same position as the bad men in Shakespeare who hire murderers. The net result of the man's economical habits is to increase the armed forces of the State to which he lends his savings. Obviously it would be better if he spent the money, even if he spent it in drink or gambling. - -But, I shall be told, the case is quite different when savings are invested in industrial enterprises. When such enterprises succeed, and produce something useful, this may be conceded. In these days, however, no one will deny that most enterprises fail. That means that a large amount of human labor, which might have been devoted to producing something that could be enjoyed, was expended on producing machines which, when produced, lay idle and did no good to anyone. The man who invests his savings in a concern that goes bankrupt is therefore injuring others as well as himself. If he spent his money, say, in giving parties for his friends, they (we may hope) would get pleasure, and so would all those upon whom he spent money, such as the butcher, the baker, and the bootlegger. But if he spends it (let us say) upon laying down rails for surface card in some place where surface cars turn out not to be wanted, he has diverted a mass of labor into channels where it gives pleasure to no one. Nevertheless, when he becomes poor through failure of his investment he will be regarded as a victim of undeserved misfortune, whereas the gay spendthrift, who has spent his money philanthropically, will be despised as a fool and a frivolous person. - -All this is only preliminary. I want to say, in all seriousness, that a great deal of harm is being done in the modern world by belief in the virtuousness of work, and that the road to happiness and prosperity lies in an organized diminution of work. - -First of all: what is work? Work is of two kinds: first, altering the position of matter at or near the earth's surface relatively to other such matter; second, telling other people to do so. The first kind is unpleasant and ill paid; the second is pleasant and highly paid. The second kind is capable of indefinite extension: there are not only those who give orders, but those who give advice as to what orders should be given. Usually two opposite kinds of advice are given simultaneously by two organized bodies of men; this is called politics. The skill required for this kind of work is not knowledge of the subjects as to which advice is given, but knowledge of the art of persuasive speaking and writing, i.e. of advertising. - -Throughout Europe, though not in America, there is a third class of men, more respected than either of the classes of workers. There are men who, through ownership of land, are able to make others pay for the privilege of being allowed to exist and to work. These landowners are idle, and I might therefore be expected to praise them. Unfortunately, their idleness is only rendered possible by the industry of others; indeed their desire for comfortable idleness is historically the source of the whole gospel of work. The last thing they have ever wished is that others should follow their example. - -From the beginning of civilization until the Industrial Revolution, a man could, as a rule, produce by hard work little more than was required for the subsistence of himself and his family, although his wife worked at least as hard as he did, and his children added their labor as soon as they were old enough to do so. The small surplus above bare necessaries was not left to those who produced it, but was appropriated by warriors and priests. In times of famine there was no surplus; the warriors and priests, however, still secured as much as at other times, with the result that many of the workers died of hunger. This system persisted in Russia until 1917 [1], and still persists in the East; in England, in spite of the Industrial Revolution, it remained in full force throughout the Napoleonic wars, and until a hundred years ago, when the new class of manufacturers acquired power. In America, the system came to an end with the Revolution, except in the South, where it persisted until the Civil War. A system which lasted so long and ended so recently has naturally left a profound impress upon men's thoughts and opinions. Much that we take for granted about the desirability of work is derived from this system, and, being pre-industrial, is not adapted to the modern world. Modern technique has made it possible for leisure, within limits, to be not the prerogative of small privileged classes, but a right evenly distributed throughout the community. The morality of work is the morality of slaves, and the modern world has no need of slavery. - -It is obvious that, in primitive communities, peasants, left to themselves, would not have parted with the slender surplus upon which the warriors and priests subsisted, but would have either produced less or consumed more. At first, sheer force compelled them to produce and part with the surplus. Gradually, however, it was found possible to induce many of them to accept an ethic according to which it was their duty to work hard, although part of their work went to support others in idleness. By this means the amount of compulsion required was lessened, and the expenses of government were diminished. To this day, 99 per cent of British wage-earners would be genuinely shocked if it were proposed that the King should not have a larger income than a working man. The conception of duty, speaking historically, has been a means used by the holders of power to induce others to live for the interests of their masters rather than for their own. Of course the holders of power conceal this fact from themselves by managing to believe that their interests are identical with the larger interests of humanity. Sometimes this is true; Athenian slave-owners, for instance, employed part of their leisure in making a permanent contribution to civilization which would have been impossible under a just economic system. Leisure is essential to civilization, and in former times leisure for the few was only rendered possible by the labors of the many. But their labors were valuable, not because work is good, but because leisure is good. And with modern technique it would be possible to distribute leisure justly without injury to civilization. - -Modern technique has made it possible to diminish enormously the amount of labor required to secure the necessaries of life for everyone. This was made obvious during the war. At that time all the men in the armed forces, and all the men and women engaged in the production of munitions, all the men and women engaged in spying, war propaganda, or Government offices connected with the war, were withdrawn from productive occupations. In spite of this, the general level of well-being among unskilled wage-earners on the side of the Allies was higher than before or since. The significance of this fact was concealed by finance: borrowing made it appear as if the future was nourishing the present. But that, of course, would have been impossible; a man cannot eat a loaf of bread that does not yet exist. The war showed conclusively that, by the scientific organization of production, it is possible to keep modern populations in fair comfort on a small part of the working capacity of the modern world. If, at the end of the war, the scientific organization, which had been created in order to liberate men for fighting and munition work, had been preserved, and the hours of the week had been cut down to four, all would have been well. Instead of that the old chaos was restored, those whose work was demanded were made to work long hours, and the rest were left to starve as unemployed. Why? Because work is a duty, and a man should not receive wages in proportion to what he has produced, but in proportion to his virtue as exemplified by his industry. - -This is the morality of the Slave State, applied in circumstances totally unlike those in which it arose. No wonder the result has been disastrous. Let us take an illustration. Suppose that, at a given moment, a certain number of people are engaged in the manufacture of pins. They make as many pins as the world needs, working (say) eight hours a day. Someone makes an invention by which the same number of men can make twice as many pins: pins are already so cheap that hardly any more will be bought at a lower price. In a sensible world, everybody concerned in the manufacturing of pins would take to working four hours instead of eight, and everything else would go on as before. But in the actual world this would be thought demoralizing. The men still work eight hours, there are too many pins, some employers go bankrupt, and half the men previously concerned in making pins are thrown out of work. There is, in the end, just as much leisure as on the other plan, but half the men are totally idle while half are still overworked. In this way, it is insured that the unavoidable leisure shall cause misery all round instead of being a universal source of happiness. Can anything more insane be imagined? - -The idea that the poor should have leisure has always been shocking to the rich. In England, in the early nineteenth century, fifteen hours was the ordinary day's work for a man; children sometimes did as much, and very commonly did twelve hours a day. When meddlesome busybodies suggested that perhaps these hours were rather long, they were told that work kept adults from drink and children from mischief. When I was a child, shortly after urban working men had acquired the vote, certain public holidays were established by law, to the great indignation of the upper classes. I remember hearing an old Duchess say: 'What do the poor want with holidays? They ought to work.' People nowadays are less frank, but the sentiment persists, and is the source of much of our economic confusion. - -Let us, for a moment, consider the ethics of work frankly, without superstition. Every human being, of necessity, consumes, in the course of his life, a certain amount of the produce of human labor. Assuming, as we may, that labor is on the whole disagreeable, it is unjust that a man should consume more than he produces. Of course he may provide services rather than commodities, like a medical man, for example; but he should provide something in return for his board and lodging. to this extent, the duty of work must be admitted, but to this extent only. - -I shall not dwell upon the fact that, in all modern societies outside the USSR, many people escape even this minimum amount of work, namely all those who inherit money and all those who marry money. I do not think the fact that these people are allowed to be idle is nearly so harmful as the fact that wage-earners are expected to overwork or starve. - -If the ordinary wage-earner worked four hours a day, there would be enough for everybody and no unemployment -- assuming a certain very moderate amount of sensible organization. This idea shocks the well-to-do, because they are convinced that the poor would not know how to use so much leisure. In America men often work long hours even when they are well off; such men, naturally, are indignant at the idea of leisure for wage-earners, except as the grim punishment of unemployment; in fact, they dislike leisure even for their sons. Oddly enough, while they wish their sons to work so hard as to have no time to be civilized, they do not mind their wives and daughters having no work at all. the snobbish admiration of uselessness, which, in an aristocratic society, extends to both sexes, is, under a plutocracy, confined to women; this, however, does not make it any more in agreement with common sense. - -The wise use of leisure, it must be conceded, is a product of civilization and education. A man who has worked long hours all his life will become bored if he becomes suddenly idle. But without a considerable amount of leisure a man is cut off from many of the best things. There is no longer any reason why the bulk of the population should suffer this deprivation; only a foolish asceticism, usually vicarious, makes us continue to insist on work in excessive quantities now that the need no longer exists. - -In the new creed which controls the government of Russia, while there is much that is very different from the traditional teaching of the West, there are some things that are quite unchanged. The attitude of the governing classes, and especially of those who conduct educational propaganda, on the subject of the dignity of labor, is almost exactly that which the governing classes of the world have always preached to what were called the 'honest poor'. Industry, sobriety, willingness to work long hours for distant advantages, even submissiveness to authority, all these reappear; moreover authority still represents the will of the Ruler of the Universe, Who, however, is now called by a new name, Dialectical Materialism. - -The victory of the proletariat in Russia has some points in common with the victory of the feminists in some other countries. For ages, men had conceded the superior saintliness of women, and had consoled women for their inferiority by maintaining that saintliness is more desirable than power. At last the feminists decided that they would have both, since the pioneers among them believed all that the men had told them about the desirability of virtue, but not what they had told them about the worthlessness of political power. A similar thing has happened in Russia as regards manual work. For ages, the rich and their sycophants have written in praise of 'honest toil', have praised the simple life, have professed a religion which teaches that the poor are much more likely to go to heaven than the rich, and in general have tried to make manual workers believe that there is some special nobility about altering the position of matter in space, just as men tried to make women believe that they derived some special nobility from their sexual enslavement. In Russia, all this teaching about the excellence of manual work has been taken seriously, with the result that the manual worker is more honored than anyone else. What are, in essence, revivalist appeals are made, but not for the old purposes: they are made to secure shock workers for special tasks. Manual work is the ideal which is held before the young, and is the basis of all ethical teaching. - -For the present, possibly, this is all to the good. A large country, full of natural resources, awaits development, and has has to be developed with very little use of credit. In these circumstances, hard work is necessary, and is likely to bring a great reward. But what will happen when the point has been reached where everybody could be comfortable without working long hours? - -In the West, we have various ways of dealing with this problem. We have no attempt at economic justice, so that a large proportion of the total produce goes to a small minority of the population, many of whom do no work at all. Owing to the absence of any central control over production, we produce hosts of things that are not wanted. We keep a large percentage of the working population idle, because we can dispense with their labor by making the others overwork. When all these methods prove inadequate, we have a war: we cause a number of people to manufacture high explosives, and a number of others to explode them, as if we were children who had just discovered fireworks. By a combination of all these devices we manage, though with difficulty, to keep alive the notion that a great deal of severe manual work must be the lot of the average man. - -In Russia, owing to more economic justice and central control over production, the problem will have to be differently solved. the rational solution would be, as soon as the necessaries and elementary comforts can be provided for all, to reduce the hours of labor gradually, allowing a popular vote to decide, at each stage, whether more leisure or more goods were to be preferred. But, having taught the supreme virtue of hard work, it is difficult to see how the authorities can aim at a paradise in which there will be much leisure and little work. It seems more likely that they will find continually fresh schemes, by which present leisure is to be sacrificed to future productivity. I read recently of an ingenious plan put forward by Russian engineers, for making the White Sea and the northern coasts of Siberia warm, by putting a dam across the Kara Sea. An admirable project, but liable to postpone proletarian comfort for a generation, while the nobility of toil is being displayed amid the ice-fields and snowstorms of the Arctic Ocean. This sort of thing, if it happens, will be the result of regarding the virtue of hard work as an end in itself, rather than as a means to a state of affairs in which it is no longer needed. - -The fact is that moving matter about, while a certain amount of it is necessary to our existence, is emphatically not one of the ends of human life. If it were, we should have to consider every navvy superior to Shakespeare. We have been misled in this matter by two causes. One is the necessity of keeping the poor contented, which has led the rich, for thousands of years, to preach the dignity of labor, while taking care themselves to remain undignified in this respect. The other is the new pleasure in mechanism, which makes us delight in the astonishingly clever changes that we can produce on the earth's surface. Neither of these motives makes any great appeal to the actual worker. If you ask him what he thinks the best part of his life, he is not likely to say: 'I enjoy manual work because it makes me feel that I am fulfilling man's noblest task, and because I like to think how much man can transform his planet. It is true that my body demands periods of rest, which I have to fill in as best I may, but I am never so happy as when the morning comes and I can return to the toil from which my contentment springs.' I have never heard working men say this sort of thing. They consider work, as it should be considered, a necessary means to a livelihood, and it is from their leisure that they derive whatever happiness they may enjoy. - -It will be said that, while a little leisure is pleasant, men would not know how to fill their days if they had only four hours of work out of the twenty-four. In so far as this is true in the modern world, it is a condemnation of our civilization; it would not have been true at any earlier period. There was formerly a capacity for light-heartedness and play which has been to some extent inhibited by the cult of efficiency. The modern man thinks that everything ought to be done for the sake of something else, and never for its own sake. Serious-minded persons, for example, are continually condemning the habit of going to the cinema, and telling us that it leads the young into crime. But all the work that goes to producing a cinema is respectable, because it is work, and because it brings a money profit. The notion that the desirable activities are those that bring a profit has made everything topsy-turvy. The butcher who provides you with meat and the baker who provides you with bread are praiseworthy, because they are making money; but when you enjoy the food they have provided, you are merely frivolous, unless you eat only to get strength for your work. Broadly speaking, it is held that getting money is good and spending money is bad. Seeing that they are two sides of one transaction, this is absurd; one might as well maintain that keys are good, but keyholes are bad. Whatever merit there may be in the production of goods must be entirely derivative from the advantage to be obtained by consuming them. The individual, in our society, works for profit; but the social purpose of his work lies in the consumption of what he produces. It is this divorce between the individual and the social purpose of production that makes it so difficult for men to think clearly in a world in which profit-making is the incentive to industry. We think too much of production, and too little of consumption. One result is that we attach too little importance to enjoyment and simple happiness, and that we do not judge production by the pleasure that it gives to the consumer. - -When I suggest that working hours should be reduced to four, I am not meaning to imply that all the remaining time should necessarily be spent in pure frivolity. I mean that four hours' work a day should entitle a man to the necessities and elementary comforts of life, and that the rest of his time should be his to use as he might see fit. It is an essential part of any such social system that education should be carried further than it usually is at present, and should aim, in part, at providing tastes which would enable a man to use leisure intelligently. I am not thinking mainly of the sort of things that would be considered 'highbrow'. Peasant dances have died out except in remote rural areas, but the impulses which caused them to be cultivated must still exist in human nature. The pleasures of urban populations have become mainly passive: seeing cinemas, watching football matches, listening to the radio, and so on. This results from the fact that their active energies are fully taken up with work; if they had more leisure, they would again enjoy pleasures in which they took an active part. - -In the past, there was a small leisure class and a larger working class. The leisure class enjoyed advantages for which there was no basis in social justice; this necessarily made it oppressive, limited its sympathies, and caused it to invent theories by which to justify its privileges. These facts greatly diminished its excellence, but in spite of this drawback it contributed nearly the whole of what we call civilization. It cultivated the arts and discovered the sciences; it wrote the books, invented the philosophies, and refined social relations. Even the liberation of the oppressed has usually been inaugurated from above. Without the leisure class, mankind would never have emerged from barbarism. - -The method of a leisure class without duties was, however, extraordinarily wasteful. None of the members of the class had to be taught to be industrious, and the class as a whole was not exceptionally intelligent. The class might produce one Darwin, but against him had to be set tens of thousands of country gentlemen who never thought of anything more intelligent than fox-hunting and punishing poachers. At present, the universities are supposed to provide, in a more systematic way, what the leisure class provided accidentally and as a by-product. This is a great improvement, but it has certain drawbacks. University life is so different from life in the world at large that men who live in academic milieu tend to be unaware of the preoccupations and problems of ordinary men and women; moreover their ways of expressing themselves are usually such as to rob their opinions of the influence that they ought to have upon the general public. Another disadvantage is that in universities studies are organized, and the man who thinks of some original line of research is likely to be discouraged. Academic institutions, therefore, useful as they are, are not adequate guardians of the interests of civilization in a world where everyone outside their walls is too busy for unutilitarian pursuits. - -In a world where no one is compelled to work more than four hours a day, every person possessed of scientific curiosity will be able to indulge it, and every painter will be able to paint without starving, however excellent his pictures may be. Young writers will not be obliged to draw attention to themselves by sensational pot-boilers, with a view to acquiring the economic independence needed for monumental works, for which, when the time at last comes, they will have lost the taste and capacity. Men who, in their professional work, have become interested in some phase of economics or government, will be able to develop their ideas without the academic detachment that makes the work of university economists often seem lacking in reality. Medical men will have the time to learn about the progress of medicine, teachers will not be exasperatedly struggling to teach by routine methods things which they learnt in their youth, which may, in the interval, have been proved to be untrue. - -Above all, there will be happiness and joy of life, instead of frayed nerves, weariness, and dyspepsia. The work exacted will be enough to make leisure delightful, but not enough to produce exhaustion. Since men will not be tired in their spare time, they will not demand only such amusements as are passive and vapid. At least one per cent will probably devote the time not spent in professional work to pursuits of some public importance, and, since they will not depend upon these pursuits for their livelihood, their originality will be unhampered, and there will be no need to conform to the standards set by elderly pundits. But it is not only in these exceptional cases that the advantages of leisure will appear. Ordinary men and women, having the opportunity of a happy life, will become more kindly and less persecuting and less inclined to view others with suspicion. The taste for war will die out, partly for this reason, and partly because it will involve long and severe work for all. Good nature is, of all moral qualities, the one that the world needs most, and good nature is the result of ease and security, not of a life of arduous struggle. Modern methods of production have given us the possibility of ease and security for all; we have chosen, instead, to have overwork for some and starvation for others. Hitherto we have continued to be as energetic as we were before there were machines; in this we have been foolish, but there is no reason to go on being foolish forever. - -[1] Since then, members of the Communist Party have succeeded to this privilege of the warriors and priests. diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/test/wrap.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/test/wrap.js deleted file mode 100644 index 0cfb76d..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/node_modules/wordwrap/test/wrap.js +++ /dev/null @@ -1,31 +0,0 @@ -var assert = require('assert'); -var wordwrap = require('wordwrap'); - -var fs = require('fs'); -var idleness = fs.readFileSync(__dirname + '/idleness.txt', 'utf8'); - -exports.stop80 = function () { - var lines = wordwrap(80)(idleness).split(/\n/); - var words = idleness.split(/\s+/); - - lines.forEach(function (line) { - assert.ok(line.length <= 80, 'line > 80 columns'); - var chunks = line.match(/\S/) ? line.split(/\s+/) : []; - assert.deepEqual(chunks, words.splice(0, chunks.length)); - }); -}; - -exports.start20stop60 = function () { - var lines = wordwrap(20, 100)(idleness).split(/\n/); - var words = idleness.split(/\s+/); - - lines.forEach(function (line) { - assert.ok(line.length <= 100, 'line > 100 columns'); - var chunks = line - .split(/\s+/) - .filter(function (x) { return x.match(/\S/) }) - ; - assert.deepEqual(chunks, words.splice(0, chunks.length)); - assert.deepEqual(line.slice(0, 20), new Array(20 + 1).join(' ')); - }); -}; diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/package.json b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/package.json deleted file mode 100644 index 96866e2..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "optimist", - "version": "0.6.1", - "description": "Light-weight option parsing with an argv hash. No optstrings attached.", - "main": "./index.js", - "dependencies": { - "wordwrap": "~0.0.2", - "minimist": "~0.0.1" - }, - "devDependencies": { - "hashish": "~0.0.4", - "tap": "~0.4.0" - }, - "scripts": { - "test": "tap ./test/*.js" - }, - "repository": { - "type": "git", - "url": "http://github.com/substack/node-optimist.git" - }, - "keywords": [ - "argument", - "args", - "option", - "parser", - "parsing", - "cli", - "command" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT/X11", - "engine": { - "node": ">=0.4" - }, - "bugs": { - "url": "https://github.com/substack/node-optimist/issues" - }, - "homepage": "https://github.com/substack/node-optimist", - "_id": "optimist@0.6.1", - "dist": { - "shasum": "da3ea74686fa21a19a111c326e90eb15a0196686", - "tarball": "http://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz" - }, - "_from": "optimist@>=0.6.1", - "_npmVersion": "1.3.21", - "_npmUser": { - "name": "substack", - "email": "mail@substack.net" - }, - "maintainers": [ - { - "name": "substack", - "email": "mail@substack.net" - } - ], - "directories": {}, - "_shasum": "da3ea74686fa21a19a111c326e90eb15a0196686", - "_resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/readme.markdown b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/readme.markdown deleted file mode 100644 index b74b437..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/readme.markdown +++ /dev/null @@ -1,513 +0,0 @@ -# DEPRECATION NOTICE - -I don't want to maintain this module anymore since I just use -[minimist](https://npmjs.org/package/minimist), the argument parsing engine, -directly instead nowadays. - -See [yargs](https://github.com/chevex/yargs) for the modern, pirate-themed -successor to optimist. - -[![yarrrrrrrgs!](http://i.imgur.com/4WFGVJ9.png)](https://github.com/chevex/yargs) - -You should also consider [nomnom](https://github.com/harthur/nomnom). - -optimist -======== - -Optimist is a node.js library for option parsing for people who hate option -parsing. More specifically, this module is for people who like all the --bells -and -whistlz of program usage but think optstrings are a waste of time. - -With optimist, option parsing doesn't have to suck (as much). - -[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist) - -examples -======== - -With Optimist, the options are just a hash! No optstrings attached. -------------------------------------------------------------------- - -xup.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist').argv; - -if (argv.rif - 5 * argv.xup > 7.138) { - console.log('Buy more riffiwobbles'); -} -else { - console.log('Sell the xupptumblers'); -} -```` - -*** - - $ ./xup.js --rif=55 --xup=9.52 - Buy more riffiwobbles - - $ ./xup.js --rif 12 --xup 8.1 - Sell the xupptumblers - -![This one's optimistic.](http://substack.net/images/optimistic.png) - -But wait! There's more! You can do short options: -------------------------------------------------- - -short.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist').argv; -console.log('(%d,%d)', argv.x, argv.y); -```` - -*** - - $ ./short.js -x 10 -y 21 - (10,21) - -And booleans, both long and short (and grouped): ----------------------------------- - -bool.js: - -````javascript -#!/usr/bin/env node -var util = require('util'); -var argv = require('optimist').argv; - -if (argv.s) { - util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: '); -} -console.log( - (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '') -); -```` - -*** - - $ ./bool.js -s - The cat says: meow - - $ ./bool.js -sp - The cat says: meow. - - $ ./bool.js -sp --fr - Le chat dit: miaou. - -And non-hypenated options too! Just use `argv._`! -------------------------------------------------- - -nonopt.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist').argv; -console.log('(%d,%d)', argv.x, argv.y); -console.log(argv._); -```` - -*** - - $ ./nonopt.js -x 6.82 -y 3.35 moo - (6.82,3.35) - [ 'moo' ] - - $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz - (0.54,1.12) - [ 'foo', 'bar', 'baz' ] - -Plus, Optimist comes with .usage() and .demand()! -------------------------------------------------- - -divide.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .usage('Usage: $0 -x [num] -y [num]') - .demand(['x','y']) - .argv; - -console.log(argv.x / argv.y); -```` - -*** - - $ ./divide.js -x 55 -y 11 - 5 - - $ node ./divide.js -x 4.91 -z 2.51 - Usage: node ./divide.js -x [num] -y [num] - - Options: - -x [required] - -y [required] - - Missing required arguments: y - -EVEN MORE HOLY COW ------------------- - -default_singles.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .default('x', 10) - .default('y', 10) - .argv -; -console.log(argv.x + argv.y); -```` - -*** - - $ ./default_singles.js -x 5 - 15 - -default_hash.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .default({ x : 10, y : 10 }) - .argv -; -console.log(argv.x + argv.y); -```` - -*** - - $ ./default_hash.js -y 7 - 17 - -And if you really want to get all descriptive about it... ---------------------------------------------------------- - -boolean_single.js - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .boolean('v') - .argv -; -console.dir(argv); -```` - -*** - - $ ./boolean_single.js -v foo bar baz - true - [ 'bar', 'baz', 'foo' ] - -boolean_double.js - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .boolean(['x','y','z']) - .argv -; -console.dir([ argv.x, argv.y, argv.z ]); -console.dir(argv._); -```` - -*** - - $ ./boolean_double.js -x -z one two three - [ true, false, true ] - [ 'one', 'two', 'three' ] - -Optimist is here to help... ---------------------------- - -You can describe parameters for help messages and set aliases. Optimist figures -out how to format a handy help string automatically. - -line_count.js - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .usage('Count the lines in a file.\nUsage: $0') - .demand('f') - .alias('f', 'file') - .describe('f', 'Load a file') - .argv -; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines); -}); -```` - -*** - - $ node line_count.js - Count the lines in a file. - Usage: node ./line_count.js - - Options: - -f, --file Load a file [required] - - Missing required arguments: f - - $ node line_count.js --file line_count.js - 20 - - $ node line_count.js -f line_count.js - 20 - -methods -======= - -By itself, - -````javascript -require('optimist').argv -````` - -will use `process.argv` array to construct the `argv` object. - -You can pass in the `process.argv` yourself: - -````javascript -require('optimist')([ '-x', '1', '-y', '2' ]).argv -```` - -or use .parse() to do the same thing: - -````javascript -require('optimist').parse([ '-x', '1', '-y', '2' ]) -```` - -The rest of these methods below come in just before the terminating `.argv`. - -.alias(key, alias) ------------------- - -Set key names as equivalent such that updates to a key will propagate to aliases -and vice-versa. - -Optionally `.alias()` can take an object that maps keys to aliases. - -.default(key, value) --------------------- - -Set `argv[key]` to `value` if no option was specified on `process.argv`. - -Optionally `.default()` can take an object that maps keys to default values. - -.demand(key) ------------- - -If `key` is a string, show the usage information and exit if `key` wasn't -specified in `process.argv`. - -If `key` is a number, demand at least as many non-option arguments, which show -up in `argv._`. - -If `key` is an Array, demand each element. - -.describe(key, desc) --------------------- - -Describe a `key` for the generated usage information. - -Optionally `.describe()` can take an object that maps keys to descriptions. - -.options(key, opt) ------------------- - -Instead of chaining together `.alias().demand().default()`, you can specify -keys in `opt` for each of the chainable methods. - -For example: - -````javascript -var argv = require('optimist') - .options('f', { - alias : 'file', - default : '/etc/passwd', - }) - .argv -; -```` - -is the same as - -````javascript -var argv = require('optimist') - .alias('f', 'file') - .default('f', '/etc/passwd') - .argv -; -```` - -Optionally `.options()` can take an object that maps keys to `opt` parameters. - -.usage(message) ---------------- - -Set a usage message to show which commands to use. Inside `message`, the string -`$0` will get interpolated to the current script name or node command for the -present script similar to how `$0` works in bash or perl. - -.check(fn) ----------- - -Check that certain conditions are met in the provided arguments. - -If `fn` throws or returns `false`, show the thrown error, usage information, and -exit. - -.boolean(key) -------------- - -Interpret `key` as a boolean. If a non-flag option follows `key` in -`process.argv`, that string won't get set as the value of `key`. - -If `key` never shows up as a flag in `process.arguments`, `argv[key]` will be -`false`. - -If `key` is an Array, interpret all the elements as booleans. - -.string(key) ------------- - -Tell the parser logic not to interpret `key` as a number or boolean. -This can be useful if you need to preserve leading zeros in an input. - -If `key` is an Array, interpret all the elements as strings. - -.wrap(columns) --------------- - -Format usage output to wrap at `columns` many columns. - -.help() -------- - -Return the generated usage string. - -.showHelp(fn=console.error) ---------------------------- - -Print the usage data using `fn` for printing. - -.parse(args) ------------- - -Parse `args` instead of `process.argv`. Returns the `argv` object. - -.argv ------ - -Get the arguments as a plain old object. - -Arguments without a corresponding flag show up in the `argv._` array. - -The script name or node command is available at `argv.$0` similarly to how `$0` -works in bash or perl. - -parsing tricks -============== - -stop parsing ------------- - -Use `--` to stop parsing flags and stuff the remainder into `argv._`. - - $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4 - { _: [ '-c', '3', '-d', '4' ], - '$0': 'node ./examples/reflect.js', - a: 1, - b: 2 } - -negate fields -------------- - -If you want to explicity set a field to false instead of just leaving it -undefined or to override a default you can do `--no-key`. - - $ node examples/reflect.js -a --no-b - { _: [], - '$0': 'node ./examples/reflect.js', - a: true, - b: false } - -numbers -------- - -Every argument that looks like a number (`!isNaN(Number(arg))`) is converted to -one. This way you can just `net.createConnection(argv.port)` and you can add -numbers out of `argv` with `+` without having that mean concatenation, -which is super frustrating. - -duplicates ----------- - -If you specify a flag multiple times it will get turned into an array containing -all the values in order. - - $ node examples/reflect.js -x 5 -x 8 -x 0 - { _: [], - '$0': 'node ./examples/reflect.js', - x: [ 5, 8, 0 ] } - -dot notation ------------- - -When you use dots (`.`s) in argument names, an implicit object path is assumed. -This lets you organize arguments into nested objects. - - $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5 - { _: [], - '$0': 'node ./examples/reflect.js', - foo: { bar: { baz: 33 }, quux: 5 } } - -short numbers -------------- - -Short numeric `head -n5` style argument work too: - - $ node reflect.js -n123 -m456 - { '3': true, - '6': true, - _: [], - '$0': 'node ./reflect.js', - n: 123, - m: 456 } - -installation -============ - -With [npm](http://github.com/isaacs/npm), just do: - npm install optimist - -or clone this project on github: - - git clone http://github.com/substack/node-optimist.git - -To run the tests with [expresso](http://github.com/visionmedia/expresso), -just do: - - expresso - -inspired By -=========== - -This module is loosely inspired by Perl's -[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm). diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/_.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/_.js deleted file mode 100644 index d9c58b3..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/_.js +++ /dev/null @@ -1,71 +0,0 @@ -var spawn = require('child_process').spawn; -var test = require('tap').test; - -test('dotSlashEmpty', testCmd('./bin.js', [])); - -test('dotSlashArgs', testCmd('./bin.js', [ 'a', 'b', 'c' ])); - -test('nodeEmpty', testCmd('node bin.js', [])); - -test('nodeArgs', testCmd('node bin.js', [ 'x', 'y', 'z' ])); - -test('whichNodeEmpty', function (t) { - var which = spawn('which', ['node']); - - which.stdout.on('data', function (buf) { - t.test( - testCmd(buf.toString().trim() + ' bin.js', []) - ); - t.end(); - }); - - which.stderr.on('data', function (err) { - assert.error(err); - t.end(); - }); -}); - -test('whichNodeArgs', function (t) { - var which = spawn('which', ['node']); - - which.stdout.on('data', function (buf) { - t.test( - testCmd(buf.toString().trim() + ' bin.js', [ 'q', 'r' ]) - ); - t.end(); - }); - - which.stderr.on('data', function (err) { - t.error(err); - t.end(); - }); -}); - -function testCmd (cmd, args) { - - return function (t) { - var to = setTimeout(function () { - assert.fail('Never got stdout data.') - }, 5000); - - var oldDir = process.cwd(); - process.chdir(__dirname + '/_'); - - var cmds = cmd.split(' '); - - var bin = spawn(cmds[0], cmds.slice(1).concat(args.map(String))); - process.chdir(oldDir); - - bin.stderr.on('data', function (err) { - t.error(err); - t.end(); - }); - - bin.stdout.on('data', function (buf) { - clearTimeout(to); - var _ = JSON.parse(buf.toString()); - t.same(_.map(String), args.map(String)); - t.end(); - }); - }; -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/_/argv.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/_/argv.js deleted file mode 100644 index 3d09606..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/_/argv.js +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -console.log(JSON.stringify(process.argv)); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/_/bin.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/_/bin.js deleted file mode 100755 index 4a18d85..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/_/bin.js +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -var argv = require('../../index').argv -console.log(JSON.stringify(argv._)); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/dash.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/dash.js deleted file mode 100644 index af8ed6f..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/dash.js +++ /dev/null @@ -1,31 +0,0 @@ -var optimist = require('../index'); -var test = require('tap').test; - -test('-', function (t) { - t.plan(5); - t.deepEqual( - fix(optimist.parse([ '-n', '-' ])), - { n: '-', _: [] } - ); - t.deepEqual( - fix(optimist.parse([ '-' ])), - { _: [ '-' ] } - ); - t.deepEqual( - fix(optimist.parse([ '-f-' ])), - { f: '-', _: [] } - ); - t.deepEqual( - fix(optimist([ '-b', '-' ]).boolean('b').argv), - { b: true, _: [ '-' ] } - ); - t.deepEqual( - fix(optimist([ '-s', '-' ]).string('s').argv), - { s: '-', _: [] } - ); -}); - -function fix (obj) { - delete obj.$0; - return obj; -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/parse.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/parse.js deleted file mode 100644 index d320f43..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/parse.js +++ /dev/null @@ -1,446 +0,0 @@ -var optimist = require('../index'); -var path = require('path'); -var test = require('tap').test; - -var $0 = 'node ./' + path.relative(process.cwd(), __filename); - -test('short boolean', function (t) { - var parse = optimist.parse([ '-b' ]); - t.same(parse, { b : true, _ : [], $0 : $0 }); - t.same(typeof parse.b, 'boolean'); - t.end(); -}); - -test('long boolean', function (t) { - t.same( - optimist.parse([ '--bool' ]), - { bool : true, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('bare', function (t) { - t.same( - optimist.parse([ 'foo', 'bar', 'baz' ]), - { _ : [ 'foo', 'bar', 'baz' ], $0 : $0 } - ); - t.end(); -}); - -test('short group', function (t) { - t.same( - optimist.parse([ '-cats' ]), - { c : true, a : true, t : true, s : true, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('short group next', function (t) { - t.same( - optimist.parse([ '-cats', 'meow' ]), - { c : true, a : true, t : true, s : 'meow', _ : [], $0 : $0 } - ); - t.end(); -}); - -test('short capture', function (t) { - t.same( - optimist.parse([ '-h', 'localhost' ]), - { h : 'localhost', _ : [], $0 : $0 } - ); - t.end(); -}); - -test('short captures', function (t) { - t.same( - optimist.parse([ '-h', 'localhost', '-p', '555' ]), - { h : 'localhost', p : 555, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('long capture sp', function (t) { - t.same( - optimist.parse([ '--pow', 'xixxle' ]), - { pow : 'xixxle', _ : [], $0 : $0 } - ); - t.end(); -}); - -test('long capture eq', function (t) { - t.same( - optimist.parse([ '--pow=xixxle' ]), - { pow : 'xixxle', _ : [], $0 : $0 } - ); - t.end() -}); - -test('long captures sp', function (t) { - t.same( - optimist.parse([ '--host', 'localhost', '--port', '555' ]), - { host : 'localhost', port : 555, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('long captures eq', function (t) { - t.same( - optimist.parse([ '--host=localhost', '--port=555' ]), - { host : 'localhost', port : 555, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ], $0 : $0, - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.same( - optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ], $0 : $0, - } - ); - t.end(); -}); - -test('no', function (t) { - t.same( - optimist.parse([ '--no-moo' ]), - { moo : false, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('multi', function (t) { - t.same( - optimist.parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), - { v : ['a','b','c'], _ : [], $0 : $0 } - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.same( - optimist.parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek' - ]), - { - c : true, - a : true, - t : true, - s : 'woo', - h : 'awesome', - b : true, - bool : true, - key : 'value', - multi : [ 'quux', 'baz' ], - meep : false, - name : 'meowmers', - _ : [ 'bare', '--not-a-flag', 'eek' ], - $0 : $0 - } - ); - t.end(); -}); - -test('nums', function (t) { - var argv = optimist.parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789', - ]); - t.same(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ], - $0 : $0 - }); - t.same(typeof argv.x, 'number'); - t.same(typeof argv.y, 'number'); - t.same(typeof argv.z, 'number'); - t.same(typeof argv.w, 'string'); - t.same(typeof argv.hex, 'number'); - t.same(typeof argv._[0], 'number'); - t.end(); -}); - -test('flag boolean', function (t) { - var parse = optimist([ '-t', 'moo' ]).boolean(['t']).argv; - t.same(parse, { t : true, _ : [ 'moo' ], $0 : $0 }); - t.same(typeof parse.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var parse = optimist(['--verbose', 'false', 'moo', '-t', 'true']) - .boolean(['t', 'verbose']).default('verbose', true).argv; - - t.same(parse, { - verbose: false, - t: true, - _: ['moo'], - $0 : $0 - }); - - t.same(typeof parse.verbose, 'boolean'); - t.same(typeof parse.t, 'boolean'); - t.end(); -}); - -test('flag boolean default false', function (t) { - var parse = optimist(['moo']) - .boolean(['t', 'verbose']) - .default('verbose', false) - .default('t', false).argv; - - t.same(parse, { - verbose: false, - t: false, - _: ['moo'], - $0 : $0 - }); - - t.same(typeof parse.verbose, 'boolean'); - t.same(typeof parse.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var parse = optimist([ '-x', '-z', 'one', 'two', 'three' ]) - .boolean(['x','y','z']).argv; - - t.same(parse, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ], - $0 : $0 - }); - - t.same(typeof parse.x, 'boolean'); - t.same(typeof parse.y, 'boolean'); - t.same(typeof parse.z, 'boolean'); - t.end(); -}); - -test('newlines in params' , function (t) { - var args = optimist.parse([ '-s', "X\nX" ]) - t.same(args, { _ : [], s : "X\nX", $0 : $0 }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = optimist.parse([ "--s=X\nX" ]) - t.same(args, { _ : [], s : "X\nX", $0 : $0 }); - t.end(); -}); - -test('strings' , function (t) { - var s = optimist([ '-s', '0001234' ]).string('s').argv.s; - t.same(s, '0001234'); - t.same(typeof s, 'string'); - - var x = optimist([ '-x', '56' ]).string('x').argv.x; - t.same(x, '56'); - t.same(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = optimist([ ' ', ' ' ]).string('_').argv._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('slashBreak', function (t) { - t.same( - optimist.parse([ '-I/foo/bar/baz' ]), - { I : '/foo/bar/baz', _ : [], $0 : $0 } - ); - t.same( - optimist.parse([ '-xyz/foo/bar/baz' ]), - { x : true, y : true, z : '/foo/bar/baz', _ : [], $0 : $0 } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = optimist([ '-f', '11', '--zoom', '55' ]) - .alias('z', 'zoom') - .argv - ; - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = optimist([ '-f', '11', '--zoom', '55' ]) - .alias('z', [ 'zm', 'zoom' ]) - .argv - ; - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('boolean default true', function (t) { - var argv = optimist.options({ - sometrue: { - boolean: true, - default: true - } - }).argv; - - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = optimist.options({ - somefalse: { - boolean: true, - default: false - } - }).argv; - - t.equal(argv.somefalse, false); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = optimist([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop' - ]).argv; - - t.same(argv.foo, { - bar : 3, - baz : 4, - quux : { - quibble : 5, - o_O : true - }, - }); - t.same(argv.beep, { boop : true }); - t.end(); -}); - -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = optimist(aliased) - .boolean('herp') - .alias('h', 'herp') - .argv; - var propertyArgv = optimist(regular) - .boolean('herp') - .alias('h', 'herp') - .argv; - var expected = { - herp: true, - h: true, - '_': [ 'derp' ], - '$0': $0, - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = optimist(aliased) - .options(opts) - .argv; - var propertyArgv = optimist(regular).options(opts).argv; - var expected = { - herp: true, - h: true, - '_': [ 'derp' ], - '$0': $0, - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = optimist(aliased) - .boolean('h') - .alias('h', 'herp') - .argv; - var propertyArgv = optimist(regular) - .boolean('h') - .alias('h', 'herp') - .argv; - var expected = { - herp: true, - h: true, - '_': [ ], - '$0': $0, - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = optimist(['--boool', '--other=true']).boolean('boool').argv; - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = optimist(['--boool', '--other=false']).boolean('boool').argv; - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/parse_modified.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/parse_modified.js deleted file mode 100644 index a57dc84..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/parse_modified.js +++ /dev/null @@ -1,14 +0,0 @@ -var optimist = require('../'); -var test = require('tap').test; - -test('parse with modifier functions' , function (t) { - t.plan(1); - - var argv = optimist().boolean('b').parse([ '-b', '123' ]); - t.deepEqual(fix(argv), { b: true, _: ['123'] }); -}); - -function fix (obj) { - delete obj.$0; - return obj; -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/short.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/short.js deleted file mode 100644 index b2c38ad..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/short.js +++ /dev/null @@ -1,16 +0,0 @@ -var optimist = require('../index'); -var test = require('tap').test; - -test('-n123', function (t) { - t.plan(1); - var parse = optimist.parse([ '-n123' ]); - t.equal(parse.n, 123); -}); - -test('-123', function (t) { - t.plan(3); - var parse = optimist.parse([ '-123', '456' ]); - t.equal(parse['1'], true); - t.equal(parse['2'], true); - t.equal(parse['3'], 456); -}); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/usage.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/usage.js deleted file mode 100644 index 300454c..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/usage.js +++ /dev/null @@ -1,292 +0,0 @@ -var Hash = require('hashish'); -var optimist = require('../index'); -var test = require('tap').test; - -test('usageFail', function (t) { - var r = checkUsage(function () { - return optimist('-x 10 -z 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .demand(['x','y']) - .argv; - }); - t.same( - r.result, - { x : 10, z : 20, _ : [], $0 : './usage' } - ); - - t.same( - r.errors.join('\n').split(/\n+/), - [ - 'Usage: ./usage -x NUM -y NUM', - 'Options:', - ' -x [required]', - ' -y [required]', - 'Missing required arguments: y', - ] - ); - t.same(r.logs, []); - t.ok(r.exit); - t.end(); -}); - - -test('usagePass', function (t) { - var r = checkUsage(function () { - return optimist('-x 10 -y 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .demand(['x','y']) - .argv; - }); - t.same(r, { - result : { x : 10, y : 20, _ : [], $0 : './usage' }, - errors : [], - logs : [], - exit : false, - }); - t.end(); -}); - -test('checkPass', function (t) { - var r = checkUsage(function () { - return optimist('-x 10 -y 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .check(function (argv) { - if (!('x' in argv)) throw 'You forgot about -x'; - if (!('y' in argv)) throw 'You forgot about -y'; - }) - .argv; - }); - t.same(r, { - result : { x : 10, y : 20, _ : [], $0 : './usage' }, - errors : [], - logs : [], - exit : false, - }); - t.end(); -}); - -test('checkFail', function (t) { - var r = checkUsage(function () { - return optimist('-x 10 -z 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .check(function (argv) { - if (!('x' in argv)) throw 'You forgot about -x'; - if (!('y' in argv)) throw 'You forgot about -y'; - }) - .argv; - }); - - t.same( - r.result, - { x : 10, z : 20, _ : [], $0 : './usage' } - ); - - t.same( - r.errors.join('\n').split(/\n+/), - [ - 'Usage: ./usage -x NUM -y NUM', - 'You forgot about -y' - ] - ); - - t.same(r.logs, []); - t.ok(r.exit); - t.end(); -}); - -test('checkCondPass', function (t) { - function checker (argv) { - return 'x' in argv && 'y' in argv; - } - - var r = checkUsage(function () { - return optimist('-x 10 -y 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .check(checker) - .argv; - }); - t.same(r, { - result : { x : 10, y : 20, _ : [], $0 : './usage' }, - errors : [], - logs : [], - exit : false, - }); - t.end(); -}); - -test('checkCondFail', function (t) { - function checker (argv) { - return 'x' in argv && 'y' in argv; - } - - var r = checkUsage(function () { - return optimist('-x 10 -z 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .check(checker) - .argv; - }); - - t.same( - r.result, - { x : 10, z : 20, _ : [], $0 : './usage' } - ); - - t.same( - r.errors.join('\n').split(/\n+/).join('\n'), - 'Usage: ./usage -x NUM -y NUM\n' - + 'Argument check failed: ' + checker.toString() - ); - - t.same(r.logs, []); - t.ok(r.exit); - t.end(); -}); - -test('countPass', function (t) { - var r = checkUsage(function () { - return optimist('1 2 3 --moo'.split(' ')) - .usage('Usage: $0 [x] [y] [z] {OPTIONS}') - .demand(3) - .argv; - }); - t.same(r, { - result : { _ : [ '1', '2', '3' ], moo : true, $0 : './usage' }, - errors : [], - logs : [], - exit : false, - }); - t.end(); -}); - -test('countFail', function (t) { - var r = checkUsage(function () { - return optimist('1 2 --moo'.split(' ')) - .usage('Usage: $0 [x] [y] [z] {OPTIONS}') - .demand(3) - .argv; - }); - t.same( - r.result, - { _ : [ '1', '2' ], moo : true, $0 : './usage' } - ); - - t.same( - r.errors.join('\n').split(/\n+/), - [ - 'Usage: ./usage [x] [y] [z] {OPTIONS}', - 'Not enough non-option arguments: got 2, need at least 3', - ] - ); - - t.same(r.logs, []); - t.ok(r.exit); - t.end(); -}); - -test('defaultSingles', function (t) { - var r = checkUsage(function () { - return optimist('--foo 50 --baz 70 --powsy'.split(' ')) - .default('foo', 5) - .default('bar', 6) - .default('baz', 7) - .argv - ; - }); - t.same(r.result, { - foo : '50', - bar : 6, - baz : '70', - powsy : true, - _ : [], - $0 : './usage', - }); - t.end(); -}); - -test('defaultAliases', function (t) { - var r = checkUsage(function () { - return optimist('') - .alias('f', 'foo') - .default('f', 5) - .argv - ; - }); - t.same(r.result, { - f : '5', - foo : '5', - _ : [], - $0 : './usage', - }); - t.end(); -}); - -test('defaultHash', function (t) { - var r = checkUsage(function () { - return optimist('--foo 50 --baz 70'.split(' ')) - .default({ foo : 10, bar : 20, quux : 30 }) - .argv - ; - }); - t.same(r.result, { - _ : [], - $0 : './usage', - foo : 50, - baz : 70, - bar : 20, - quux : 30, - }); - t.end(); -}); - -test('rebase', function (t) { - t.equal( - optimist.rebase('/home/substack', '/home/substack/foo/bar/baz'), - './foo/bar/baz' - ); - t.equal( - optimist.rebase('/home/substack/foo/bar/baz', '/home/substack'), - '../../..' - ); - t.equal( - optimist.rebase('/home/substack/foo', '/home/substack/pow/zoom.txt'), - '../pow/zoom.txt' - ); - t.end(); -}); - -function checkUsage (f) { - - var exit = false; - - process._exit = process.exit; - process._env = process.env; - process._argv = process.argv; - - process.exit = function (t) { exit = true }; - process.env = Hash.merge(process.env, { _ : 'node' }); - process.argv = [ './usage' ]; - - var errors = []; - var logs = []; - - console._error = console.error; - console.error = function (msg) { errors.push(msg) }; - console._log = console.log; - console.log = function (msg) { logs.push(msg) }; - - var result = f(); - - process.exit = process._exit; - process.env = process._env; - process.argv = process._argv; - - console.error = console._error; - console.log = console._log; - - return { - errors : errors, - logs : logs, - exit : exit, - result : result, - }; -}; diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/whitespace.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/whitespace.js deleted file mode 100644 index 90b9075..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/optimist/test/whitespace.js +++ /dev/null @@ -1,8 +0,0 @@ -var optimist = require('../'); -var test = require('tap').test; - -test('whitespace should be whitespace' , function (t) { - t.plan(1); - var x = optimist.parse([ '-x', '\t' ]).x; - t.equal(x, '\t'); -}); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/LICENSE b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/LICENSE deleted file mode 100644 index aa0e624..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2013 Minhong Zhou - -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/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/README.md b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/README.md deleted file mode 100644 index a16b9ca..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# under_score - -under_score puts the _ in undersocre. Lame joke aside, under_socre is simply an extension to the very awesome -underscore: add some useful (or not so useful, depending on your point of view) helpers to _. - -./lib/under_score.js is amply commented, read it for apis and documentation. - -./test/test_under_score.js contains examples. \ No newline at end of file diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/index.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/index.js deleted file mode 100644 index e9bb54e..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/under_score'); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/lib/under_score.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/lib/under_score.js deleted file mode 100644 index cbfff51..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/lib/under_score.js +++ /dev/null @@ -1,693 +0,0 @@ -// under_score, extend Underscore with a motley collection of various helpers -// (c) Zed Zhou, https://github.com/mhzed/under_score -// under_score is freely distributable under the MIT license. - -//noinspection ThisExpressionReferencesGlobalObjectJS,ThisExpressionReferencesGlobalObjectJS -(function() { - -function extend(_) { -_.mixin({ - // env is one of - // "unknown" : undetermined - // "module" : inside env that supports "module" and "require", aka nodejs - // "amd" : inside requirejs AMD (asynchronous module definition) - // "script" : inside - _ = this._; - _.env = "script"; - extend(_); - } - -}).call(this); - - - - diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/node_modules/underscore/LICENSE b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/node_modules/underscore/LICENSE deleted file mode 100644 index 0d6b873..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/node_modules/underscore/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative -Reporters & Editors - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/node_modules/underscore/README.md b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/node_modules/underscore/README.md deleted file mode 100644 index c2ba259..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/node_modules/underscore/README.md +++ /dev/null @@ -1,22 +0,0 @@ - __ - /\ \ __ - __ __ ___ \_\ \ __ _ __ ____ ___ ___ _ __ __ /\_\ ____ - /\ \/\ \ /' _ `\ /'_ \ /'__`\/\ __\/ ,__\ / ___\ / __`\/\ __\/'__`\ \/\ \ /',__\ - \ \ \_\ \/\ \/\ \/\ \ \ \/\ __/\ \ \//\__, `\/\ \__//\ \ \ \ \ \//\ __/ __ \ \ \/\__, `\ - \ \____/\ \_\ \_\ \___,_\ \____\\ \_\\/\____/\ \____\ \____/\ \_\\ \____\/\_\ _\ \ \/\____/ - \/___/ \/_/\/_/\/__,_ /\/____/ \/_/ \/___/ \/____/\/___/ \/_/ \/____/\/_//\ \_\ \/___/ - \ \____/ - \/___/ - -Underscore.js is a utility-belt library for JavaScript that provides -support for the usual functional suspects (each, map, reduce, filter...) -without extending any core JavaScript objects. - -For Docs, License, Tests, and pre-packed downloads, see: -http://underscorejs.org - -Underscore is an open-sourced component of DocumentCloud: -https://github.com/documentcloud - -Many thanks to our contributors: -https://github.com/jashkenas/underscore/contributors diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/node_modules/underscore/package.json b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/node_modules/underscore/package.json deleted file mode 100644 index 1c5a6ac..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/node_modules/underscore/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "underscore", - "description": "JavaScript's functional programming helper library.", - "homepage": "http://underscorejs.org", - "keywords": [ - "util", - "functional", - "server", - "client", - "browser" - ], - "author": { - "name": "Jeremy Ashkenas", - "email": "jeremy@documentcloud.org" - }, - "repository": { - "type": "git", - "url": "git://github.com/jashkenas/underscore.git" - }, - "main": "underscore.js", - "version": "1.7.0", - "devDependencies": { - "docco": "0.6.x", - "phantomjs": "1.9.7-1", - "uglify-js": "2.4.x", - "eslint": "0.6.x" - }, - "scripts": { - "test": "phantomjs test/vendor/runner.js test/index.html?noglobals=true && eslint underscore.js test/*.js test/vendor/runner.js", - "build": "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m --source-map underscore-min.map -o underscore-min.js", - "doc": "docco underscore.js" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://raw.github.com/jashkenas/underscore/master/LICENSE" - } - ], - "files": [ - "underscore.js", - "underscore-min.js", - "LICENSE" - ], - "gitHead": "da996e665deb0b69b257e80e3e257c04fde4191c", - "bugs": { - "url": "https://github.com/jashkenas/underscore/issues" - }, - "_id": "underscore@1.7.0", - "_shasum": "6bbaf0877500d36be34ecaa584e0db9fef035209", - "_from": "underscore@*", - "_npmVersion": "1.4.24", - "_npmUser": { - "name": "jashkenas", - "email": "jashkenas@gmail.com" - }, - "maintainers": [ - { - "name": "jashkenas", - "email": "jashkenas@gmail.com" - } - ], - "dist": { - "shasum": "6bbaf0877500d36be34ecaa584e0db9fef035209", - "tarball": "http://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/node_modules/underscore/underscore-min.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/node_modules/underscore/underscore-min.js deleted file mode 100644 index 11f1d96..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/node_modules/underscore/underscore-min.js +++ /dev/null @@ -1,6 +0,0 @@ -// Underscore.js 1.7.0 -// http://underscorejs.org -// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors -// Underscore may be freely distributed under the MIT license. -(function(){var n=this,t=n._,r=Array.prototype,e=Object.prototype,u=Function.prototype,i=r.push,a=r.slice,o=r.concat,l=e.toString,c=e.hasOwnProperty,f=Array.isArray,s=Object.keys,p=u.bind,h=function(n){return n instanceof h?n:this instanceof h?void(this._wrapped=n):new h(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=h),exports._=h):n._=h,h.VERSION="1.7.0";var g=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}};h.iteratee=function(n,t,r){return null==n?h.identity:h.isFunction(n)?g(n,t,r):h.isObject(n)?h.matches(n):h.property(n)},h.each=h.forEach=function(n,t,r){if(null==n)return n;t=g(t,r);var e,u=n.length;if(u===+u)for(e=0;u>e;e++)t(n[e],e,n);else{var i=h.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},h.map=h.collect=function(n,t,r){if(null==n)return[];t=h.iteratee(t,r);for(var e,u=n.length!==+n.length&&h.keys(n),i=(u||n).length,a=Array(i),o=0;i>o;o++)e=u?u[o]:o,a[o]=t(n[e],e,n);return a};var v="Reduce of empty array with no initial value";h.reduce=h.foldl=h.inject=function(n,t,r,e){null==n&&(n=[]),t=g(t,e,4);var u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length,o=0;if(arguments.length<3){if(!a)throw new TypeError(v);r=n[i?i[o++]:o++]}for(;a>o;o++)u=i?i[o]:o,r=t(r,n[u],u,n);return r},h.reduceRight=h.foldr=function(n,t,r,e){null==n&&(n=[]),t=g(t,e,4);var u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;if(arguments.length<3){if(!a)throw new TypeError(v);r=n[i?i[--a]:--a]}for(;a--;)u=i?i[a]:a,r=t(r,n[u],u,n);return r},h.find=h.detect=function(n,t,r){var e;return t=h.iteratee(t,r),h.some(n,function(n,r,u){return t(n,r,u)?(e=n,!0):void 0}),e},h.filter=h.select=function(n,t,r){var e=[];return null==n?e:(t=h.iteratee(t,r),h.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e)},h.reject=function(n,t,r){return h.filter(n,h.negate(h.iteratee(t)),r)},h.every=h.all=function(n,t,r){if(null==n)return!0;t=h.iteratee(t,r);var e,u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;for(e=0;a>e;e++)if(u=i?i[e]:e,!t(n[u],u,n))return!1;return!0},h.some=h.any=function(n,t,r){if(null==n)return!1;t=h.iteratee(t,r);var e,u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;for(e=0;a>e;e++)if(u=i?i[e]:e,t(n[u],u,n))return!0;return!1},h.contains=h.include=function(n,t){return null==n?!1:(n.length!==+n.length&&(n=h.values(n)),h.indexOf(n,t)>=0)},h.invoke=function(n,t){var r=a.call(arguments,2),e=h.isFunction(t);return h.map(n,function(n){return(e?t:n[t]).apply(n,r)})},h.pluck=function(n,t){return h.map(n,h.property(t))},h.where=function(n,t){return h.filter(n,h.matches(t))},h.findWhere=function(n,t){return h.find(n,h.matches(t))},h.max=function(n,t,r){var e,u,i=-1/0,a=-1/0;if(null==t&&null!=n){n=n.length===+n.length?n:h.values(n);for(var o=0,l=n.length;l>o;o++)e=n[o],e>i&&(i=e)}else t=h.iteratee(t,r),h.each(n,function(n,r,e){u=t(n,r,e),(u>a||u===-1/0&&i===-1/0)&&(i=n,a=u)});return i},h.min=function(n,t,r){var e,u,i=1/0,a=1/0;if(null==t&&null!=n){n=n.length===+n.length?n:h.values(n);for(var o=0,l=n.length;l>o;o++)e=n[o],i>e&&(i=e)}else t=h.iteratee(t,r),h.each(n,function(n,r,e){u=t(n,r,e),(a>u||1/0===u&&1/0===i)&&(i=n,a=u)});return i},h.shuffle=function(n){for(var t,r=n&&n.length===+n.length?n:h.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=h.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},h.sample=function(n,t,r){return null==t||r?(n.length!==+n.length&&(n=h.values(n)),n[h.random(n.length-1)]):h.shuffle(n).slice(0,Math.max(0,t))},h.sortBy=function(n,t,r){return t=h.iteratee(t,r),h.pluck(h.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var m=function(n){return function(t,r,e){var u={};return r=h.iteratee(r,e),h.each(t,function(e,i){var a=r(e,i,t);n(u,e,a)}),u}};h.groupBy=m(function(n,t,r){h.has(n,r)?n[r].push(t):n[r]=[t]}),h.indexBy=m(function(n,t,r){n[r]=t}),h.countBy=m(function(n,t,r){h.has(n,r)?n[r]++:n[r]=1}),h.sortedIndex=function(n,t,r,e){r=h.iteratee(r,e,1);for(var u=r(t),i=0,a=n.length;a>i;){var o=i+a>>>1;r(n[o])t?[]:a.call(n,0,t)},h.initial=function(n,t,r){return a.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},h.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:a.call(n,Math.max(n.length-t,0))},h.rest=h.tail=h.drop=function(n,t,r){return a.call(n,null==t||r?1:t)},h.compact=function(n){return h.filter(n,h.identity)};var y=function(n,t,r,e){if(t&&h.every(n,h.isArray))return o.apply(e,n);for(var u=0,a=n.length;a>u;u++){var l=n[u];h.isArray(l)||h.isArguments(l)?t?i.apply(e,l):y(l,t,r,e):r||e.push(l)}return e};h.flatten=function(n,t){return y(n,t,!1,[])},h.without=function(n){return h.difference(n,a.call(arguments,1))},h.uniq=h.unique=function(n,t,r,e){if(null==n)return[];h.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=h.iteratee(r,e));for(var u=[],i=[],a=0,o=n.length;o>a;a++){var l=n[a];if(t)a&&i===l||u.push(l),i=l;else if(r){var c=r(l,a,n);h.indexOf(i,c)<0&&(i.push(c),u.push(l))}else h.indexOf(u,l)<0&&u.push(l)}return u},h.union=function(){return h.uniq(y(arguments,!0,!0,[]))},h.intersection=function(n){if(null==n)return[];for(var t=[],r=arguments.length,e=0,u=n.length;u>e;e++){var i=n[e];if(!h.contains(t,i)){for(var a=1;r>a&&h.contains(arguments[a],i);a++);a===r&&t.push(i)}}return t},h.difference=function(n){var t=y(a.call(arguments,1),!0,!0,[]);return h.filter(n,function(n){return!h.contains(t,n)})},h.zip=function(n){if(null==n)return[];for(var t=h.max(arguments,"length").length,r=Array(t),e=0;t>e;e++)r[e]=h.pluck(arguments,e);return r},h.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},h.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=h.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}for(;u>e;e++)if(n[e]===t)return e;return-1},h.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=n.length;for("number"==typeof r&&(e=0>r?e+r+1:Math.min(e,r+1));--e>=0;)if(n[e]===t)return e;return-1},h.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=r||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),i=0;e>i;i++,n+=r)u[i]=n;return u};var d=function(){};h.bind=function(n,t){var r,e;if(p&&n.bind===p)return p.apply(n,a.call(arguments,1));if(!h.isFunction(n))throw new TypeError("Bind must be called on a function");return r=a.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(a.call(arguments)));d.prototype=n.prototype;var u=new d;d.prototype=null;var i=n.apply(u,r.concat(a.call(arguments)));return h.isObject(i)?i:u}},h.partial=function(n){var t=a.call(arguments,1);return function(){for(var r=0,e=t.slice(),u=0,i=e.length;i>u;u++)e[u]===h&&(e[u]=arguments[r++]);for(;r=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=h.bind(n[r],n);return n},h.memoize=function(n,t){var r=function(e){var u=r.cache,i=t?t.apply(this,arguments):e;return h.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},h.delay=function(n,t){var r=a.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},h.defer=function(n){return h.delay.apply(h,[n,1].concat(a.call(arguments,1)))},h.throttle=function(n,t,r){var e,u,i,a=null,o=0;r||(r={});var l=function(){o=r.leading===!1?0:h.now(),a=null,i=n.apply(e,u),a||(e=u=null)};return function(){var c=h.now();o||r.leading!==!1||(o=c);var f=t-(c-o);return e=this,u=arguments,0>=f||f>t?(clearTimeout(a),a=null,o=c,i=n.apply(e,u),a||(e=u=null)):a||r.trailing===!1||(a=setTimeout(l,f)),i}},h.debounce=function(n,t,r){var e,u,i,a,o,l=function(){var c=h.now()-a;t>c&&c>0?e=setTimeout(l,t-c):(e=null,r||(o=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,a=h.now();var c=r&&!e;return e||(e=setTimeout(l,t)),c&&(o=n.apply(i,u),i=u=null),o}},h.wrap=function(n,t){return h.partial(t,n)},h.negate=function(n){return function(){return!n.apply(this,arguments)}},h.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},h.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},h.before=function(n,t){var r;return function(){return--n>0?r=t.apply(this,arguments):t=null,r}},h.once=h.partial(h.before,2),h.keys=function(n){if(!h.isObject(n))return[];if(s)return s(n);var t=[];for(var r in n)h.has(n,r)&&t.push(r);return t},h.values=function(n){for(var t=h.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},h.pairs=function(n){for(var t=h.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},h.invert=function(n){for(var t={},r=h.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},h.functions=h.methods=function(n){var t=[];for(var r in n)h.isFunction(n[r])&&t.push(r);return t.sort()},h.extend=function(n){if(!h.isObject(n))return n;for(var t,r,e=1,u=arguments.length;u>e;e++){t=arguments[e];for(r in t)c.call(t,r)&&(n[r]=t[r])}return n},h.pick=function(n,t,r){var e,u={};if(null==n)return u;if(h.isFunction(t)){t=g(t,r);for(e in n){var i=n[e];t(i,e,n)&&(u[e]=i)}}else{var l=o.apply([],a.call(arguments,1));n=new Object(n);for(var c=0,f=l.length;f>c;c++)e=l[c],e in n&&(u[e]=n[e])}return u},h.omit=function(n,t,r){if(h.isFunction(t))t=h.negate(t);else{var e=h.map(o.apply([],a.call(arguments,1)),String);t=function(n,t){return!h.contains(e,t)}}return h.pick(n,t,r)},h.defaults=function(n){if(!h.isObject(n))return n;for(var t=1,r=arguments.length;r>t;t++){var e=arguments[t];for(var u in e)n[u]===void 0&&(n[u]=e[u])}return n},h.clone=function(n){return h.isObject(n)?h.isArray(n)?n.slice():h.extend({},n):n},h.tap=function(n,t){return t(n),n};var b=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof h&&(n=n._wrapped),t instanceof h&&(t=t._wrapped);var u=l.call(n);if(u!==l.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]===n)return e[i]===t;var a=n.constructor,o=t.constructor;if(a!==o&&"constructor"in n&&"constructor"in t&&!(h.isFunction(a)&&a instanceof a&&h.isFunction(o)&&o instanceof o))return!1;r.push(n),e.push(t);var c,f;if("[object Array]"===u){if(c=n.length,f=c===t.length)for(;c--&&(f=b(n[c],t[c],r,e)););}else{var s,p=h.keys(n);if(c=p.length,f=h.keys(t).length===c)for(;c--&&(s=p[c],f=h.has(t,s)&&b(n[s],t[s],r,e)););}return r.pop(),e.pop(),f};h.isEqual=function(n,t){return b(n,t,[],[])},h.isEmpty=function(n){if(null==n)return!0;if(h.isArray(n)||h.isString(n)||h.isArguments(n))return 0===n.length;for(var t in n)if(h.has(n,t))return!1;return!0},h.isElement=function(n){return!(!n||1!==n.nodeType)},h.isArray=f||function(n){return"[object Array]"===l.call(n)},h.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},h.each(["Arguments","Function","String","Number","Date","RegExp"],function(n){h["is"+n]=function(t){return l.call(t)==="[object "+n+"]"}}),h.isArguments(arguments)||(h.isArguments=function(n){return h.has(n,"callee")}),"function"!=typeof/./&&(h.isFunction=function(n){return"function"==typeof n||!1}),h.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},h.isNaN=function(n){return h.isNumber(n)&&n!==+n},h.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===l.call(n)},h.isNull=function(n){return null===n},h.isUndefined=function(n){return n===void 0},h.has=function(n,t){return null!=n&&c.call(n,t)},h.noConflict=function(){return n._=t,this},h.identity=function(n){return n},h.constant=function(n){return function(){return n}},h.noop=function(){},h.property=function(n){return function(t){return t[n]}},h.matches=function(n){var t=h.pairs(n),r=t.length;return function(n){if(null==n)return!r;n=new Object(n);for(var e=0;r>e;e++){var u=t[e],i=u[0];if(u[1]!==n[i]||!(i in n))return!1}return!0}},h.times=function(n,t,r){var e=Array(Math.max(0,n));t=g(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},h.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},h.now=Date.now||function(){return(new Date).getTime()};var _={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},w=h.invert(_),j=function(n){var t=function(t){return n[t]},r="(?:"+h.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};h.escape=j(_),h.unescape=j(w),h.result=function(n,t){if(null==n)return void 0;var r=n[t];return h.isFunction(r)?n[t]():r};var x=0;h.uniqueId=function(n){var t=++x+"";return n?n+t:t},h.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var A=/(.)^/,k={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},O=/\\|'|\r|\n|\u2028|\u2029/g,F=function(n){return"\\"+k[n]};h.template=function(n,t,r){!t&&r&&(t=r),t=h.defaults({},t,h.templateSettings);var e=RegExp([(t.escape||A).source,(t.interpolate||A).source,(t.evaluate||A).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,a,o){return i+=n.slice(u,o).replace(O,F),u=o+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":a&&(i+="';\n"+a+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var a=new Function(t.variable||"obj","_",i)}catch(o){throw o.source=i,o}var l=function(n){return a.call(this,n,h)},c=t.variable||"obj";return l.source="function("+c+"){\n"+i+"}",l},h.chain=function(n){var t=h(n);return t._chain=!0,t};var E=function(n){return this._chain?h(n).chain():n};h.mixin=function(n){h.each(h.functions(n),function(t){var r=h[t]=n[t];h.prototype[t]=function(){var n=[this._wrapped];return i.apply(n,arguments),E.call(this,r.apply(h,n))}})},h.mixin(h),h.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=r[n];h.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],E.call(this,r)}}),h.each(["concat","join","slice"],function(n){var t=r[n];h.prototype[n]=function(){return E.call(this,t.apply(this._wrapped,arguments))}}),h.prototype.value=function(){return this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return h})}).call(this); -//# sourceMappingURL=underscore-min.map \ No newline at end of file diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/node_modules/underscore/underscore.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/node_modules/underscore/underscore.js deleted file mode 100644 index b4f49a0..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/node_modules/underscore/underscore.js +++ /dev/null @@ -1,1415 +0,0 @@ -// Underscore.js 1.7.0 -// http://underscorejs.org -// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors -// Underscore may be freely distributed under the MIT license. - -(function() { - - // Baseline setup - // -------------- - - // Establish the root object, `window` in the browser, or `exports` on the server. - var root = this; - - // Save the previous value of the `_` variable. - var previousUnderscore = root._; - - // Save bytes in the minified (but not gzipped) version: - var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; - - // Create quick reference variables for speed access to core prototypes. - var - push = ArrayProto.push, - slice = ArrayProto.slice, - concat = ArrayProto.concat, - toString = ObjProto.toString, - hasOwnProperty = ObjProto.hasOwnProperty; - - // All **ECMAScript 5** native function implementations that we hope to use - // are declared here. - var - nativeIsArray = Array.isArray, - nativeKeys = Object.keys, - nativeBind = FuncProto.bind; - - // Create a safe reference to the Underscore object for use below. - var _ = function(obj) { - if (obj instanceof _) return obj; - if (!(this instanceof _)) return new _(obj); - this._wrapped = obj; - }; - - // Export the Underscore object for **Node.js**, with - // backwards-compatibility for the old `require()` API. If we're in - // the browser, add `_` as a global object. - if (typeof exports !== 'undefined') { - if (typeof module !== 'undefined' && module.exports) { - exports = module.exports = _; - } - exports._ = _; - } else { - root._ = _; - } - - // Current version. - _.VERSION = '1.7.0'; - - // Internal function that returns an efficient (for current engines) version - // of the passed-in callback, to be repeatedly applied in other Underscore - // functions. - var createCallback = function(func, context, argCount) { - if (context === void 0) return func; - switch (argCount == null ? 3 : argCount) { - case 1: return function(value) { - return func.call(context, value); - }; - case 2: return function(value, other) { - return func.call(context, value, other); - }; - case 3: return function(value, index, collection) { - return func.call(context, value, index, collection); - }; - case 4: return function(accumulator, value, index, collection) { - return func.call(context, accumulator, value, index, collection); - }; - } - return function() { - return func.apply(context, arguments); - }; - }; - - // A mostly-internal function to generate callbacks that can be applied - // to each element in a collection, returning the desired result — either - // identity, an arbitrary callback, a property matcher, or a property accessor. - _.iteratee = function(value, context, argCount) { - if (value == null) return _.identity; - if (_.isFunction(value)) return createCallback(value, context, argCount); - if (_.isObject(value)) return _.matches(value); - return _.property(value); - }; - - // Collection Functions - // -------------------- - - // The cornerstone, an `each` implementation, aka `forEach`. - // Handles raw objects in addition to array-likes. Treats all - // sparse array-likes as if they were dense. - _.each = _.forEach = function(obj, iteratee, context) { - if (obj == null) return obj; - iteratee = createCallback(iteratee, context); - var i, length = obj.length; - if (length === +length) { - for (i = 0; i < length; i++) { - iteratee(obj[i], i, obj); - } - } else { - var keys = _.keys(obj); - for (i = 0, length = keys.length; i < length; i++) { - iteratee(obj[keys[i]], keys[i], obj); - } - } - return obj; - }; - - // Return the results of applying the iteratee to each element. - _.map = _.collect = function(obj, iteratee, context) { - if (obj == null) return []; - iteratee = _.iteratee(iteratee, context); - var keys = obj.length !== +obj.length && _.keys(obj), - length = (keys || obj).length, - results = Array(length), - currentKey; - for (var index = 0; index < length; index++) { - currentKey = keys ? keys[index] : index; - results[index] = iteratee(obj[currentKey], currentKey, obj); - } - return results; - }; - - var reduceError = 'Reduce of empty array with no initial value'; - - // **Reduce** builds up a single result from a list of values, aka `inject`, - // or `foldl`. - _.reduce = _.foldl = _.inject = function(obj, iteratee, memo, context) { - if (obj == null) obj = []; - iteratee = createCallback(iteratee, context, 4); - var keys = obj.length !== +obj.length && _.keys(obj), - length = (keys || obj).length, - index = 0, currentKey; - if (arguments.length < 3) { - if (!length) throw new TypeError(reduceError); - memo = obj[keys ? keys[index++] : index++]; - } - for (; index < length; index++) { - currentKey = keys ? keys[index] : index; - memo = iteratee(memo, obj[currentKey], currentKey, obj); - } - return memo; - }; - - // The right-associative version of reduce, also known as `foldr`. - _.reduceRight = _.foldr = function(obj, iteratee, memo, context) { - if (obj == null) obj = []; - iteratee = createCallback(iteratee, context, 4); - var keys = obj.length !== + obj.length && _.keys(obj), - index = (keys || obj).length, - currentKey; - if (arguments.length < 3) { - if (!index) throw new TypeError(reduceError); - memo = obj[keys ? keys[--index] : --index]; - } - while (index--) { - currentKey = keys ? keys[index] : index; - memo = iteratee(memo, obj[currentKey], currentKey, obj); - } - return memo; - }; - - // Return the first value which passes a truth test. Aliased as `detect`. - _.find = _.detect = function(obj, predicate, context) { - var result; - predicate = _.iteratee(predicate, context); - _.some(obj, function(value, index, list) { - if (predicate(value, index, list)) { - result = value; - return true; - } - }); - return result; - }; - - // Return all the elements that pass a truth test. - // Aliased as `select`. - _.filter = _.select = function(obj, predicate, context) { - var results = []; - if (obj == null) return results; - predicate = _.iteratee(predicate, context); - _.each(obj, function(value, index, list) { - if (predicate(value, index, list)) results.push(value); - }); - return results; - }; - - // Return all the elements for which a truth test fails. - _.reject = function(obj, predicate, context) { - return _.filter(obj, _.negate(_.iteratee(predicate)), context); - }; - - // Determine whether all of the elements match a truth test. - // Aliased as `all`. - _.every = _.all = function(obj, predicate, context) { - if (obj == null) return true; - predicate = _.iteratee(predicate, context); - var keys = obj.length !== +obj.length && _.keys(obj), - length = (keys || obj).length, - index, currentKey; - for (index = 0; index < length; index++) { - currentKey = keys ? keys[index] : index; - if (!predicate(obj[currentKey], currentKey, obj)) return false; - } - return true; - }; - - // Determine if at least one element in the object matches a truth test. - // Aliased as `any`. - _.some = _.any = function(obj, predicate, context) { - if (obj == null) return false; - predicate = _.iteratee(predicate, context); - var keys = obj.length !== +obj.length && _.keys(obj), - length = (keys || obj).length, - index, currentKey; - for (index = 0; index < length; index++) { - currentKey = keys ? keys[index] : index; - if (predicate(obj[currentKey], currentKey, obj)) return true; - } - return false; - }; - - // Determine if the array or object contains a given value (using `===`). - // Aliased as `include`. - _.contains = _.include = function(obj, target) { - if (obj == null) return false; - if (obj.length !== +obj.length) obj = _.values(obj); - return _.indexOf(obj, target) >= 0; - }; - - // Invoke a method (with arguments) on every item in a collection. - _.invoke = function(obj, method) { - var args = slice.call(arguments, 2); - var isFunc = _.isFunction(method); - return _.map(obj, function(value) { - return (isFunc ? method : value[method]).apply(value, args); - }); - }; - - // Convenience version of a common use case of `map`: fetching a property. - _.pluck = function(obj, key) { - return _.map(obj, _.property(key)); - }; - - // Convenience version of a common use case of `filter`: selecting only objects - // containing specific `key:value` pairs. - _.where = function(obj, attrs) { - return _.filter(obj, _.matches(attrs)); - }; - - // Convenience version of a common use case of `find`: getting the first object - // containing specific `key:value` pairs. - _.findWhere = function(obj, attrs) { - return _.find(obj, _.matches(attrs)); - }; - - // Return the maximum element (or element-based computation). - _.max = function(obj, iteratee, context) { - var result = -Infinity, lastComputed = -Infinity, - value, computed; - if (iteratee == null && obj != null) { - obj = obj.length === +obj.length ? obj : _.values(obj); - for (var i = 0, length = obj.length; i < length; i++) { - value = obj[i]; - if (value > result) { - result = value; - } - } - } else { - iteratee = _.iteratee(iteratee, context); - _.each(obj, function(value, index, list) { - computed = iteratee(value, index, list); - if (computed > lastComputed || computed === -Infinity && result === -Infinity) { - result = value; - lastComputed = computed; - } - }); - } - return result; - }; - - // Return the minimum element (or element-based computation). - _.min = function(obj, iteratee, context) { - var result = Infinity, lastComputed = Infinity, - value, computed; - if (iteratee == null && obj != null) { - obj = obj.length === +obj.length ? obj : _.values(obj); - for (var i = 0, length = obj.length; i < length; i++) { - value = obj[i]; - if (value < result) { - result = value; - } - } - } else { - iteratee = _.iteratee(iteratee, context); - _.each(obj, function(value, index, list) { - computed = iteratee(value, index, list); - if (computed < lastComputed || computed === Infinity && result === Infinity) { - result = value; - lastComputed = computed; - } - }); - } - return result; - }; - - // Shuffle a collection, using the modern version of the - // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle). - _.shuffle = function(obj) { - var set = obj && obj.length === +obj.length ? obj : _.values(obj); - var length = set.length; - var shuffled = Array(length); - for (var index = 0, rand; index < length; index++) { - rand = _.random(0, index); - if (rand !== index) shuffled[index] = shuffled[rand]; - shuffled[rand] = set[index]; - } - return shuffled; - }; - - // Sample **n** random values from a collection. - // If **n** is not specified, returns a single random element. - // The internal `guard` argument allows it to work with `map`. - _.sample = function(obj, n, guard) { - if (n == null || guard) { - if (obj.length !== +obj.length) obj = _.values(obj); - return obj[_.random(obj.length - 1)]; - } - return _.shuffle(obj).slice(0, Math.max(0, n)); - }; - - // Sort the object's values by a criterion produced by an iteratee. - _.sortBy = function(obj, iteratee, context) { - iteratee = _.iteratee(iteratee, context); - return _.pluck(_.map(obj, function(value, index, list) { - return { - value: value, - index: index, - criteria: iteratee(value, index, list) - }; - }).sort(function(left, right) { - var a = left.criteria; - var b = right.criteria; - if (a !== b) { - if (a > b || a === void 0) return 1; - if (a < b || b === void 0) return -1; - } - return left.index - right.index; - }), 'value'); - }; - - // An internal function used for aggregate "group by" operations. - var group = function(behavior) { - return function(obj, iteratee, context) { - var result = {}; - iteratee = _.iteratee(iteratee, context); - _.each(obj, function(value, index) { - var key = iteratee(value, index, obj); - behavior(result, value, key); - }); - return result; - }; - }; - - // Groups the object's values by a criterion. Pass either a string attribute - // to group by, or a function that returns the criterion. - _.groupBy = group(function(result, value, key) { - if (_.has(result, key)) result[key].push(value); else result[key] = [value]; - }); - - // Indexes the object's values by a criterion, similar to `groupBy`, but for - // when you know that your index values will be unique. - _.indexBy = group(function(result, value, key) { - result[key] = value; - }); - - // Counts instances of an object that group by a certain criterion. Pass - // either a string attribute to count by, or a function that returns the - // criterion. - _.countBy = group(function(result, value, key) { - if (_.has(result, key)) result[key]++; else result[key] = 1; - }); - - // Use a comparator function to figure out the smallest index at which - // an object should be inserted so as to maintain order. Uses binary search. - _.sortedIndex = function(array, obj, iteratee, context) { - iteratee = _.iteratee(iteratee, context, 1); - var value = iteratee(obj); - var low = 0, high = array.length; - while (low < high) { - var mid = low + high >>> 1; - if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; - } - return low; - }; - - // Safely create a real, live array from anything iterable. - _.toArray = function(obj) { - if (!obj) return []; - if (_.isArray(obj)) return slice.call(obj); - if (obj.length === +obj.length) return _.map(obj, _.identity); - return _.values(obj); - }; - - // Return the number of elements in an object. - _.size = function(obj) { - if (obj == null) return 0; - return obj.length === +obj.length ? obj.length : _.keys(obj).length; - }; - - // Split a collection into two arrays: one whose elements all satisfy the given - // predicate, and one whose elements all do not satisfy the predicate. - _.partition = function(obj, predicate, context) { - predicate = _.iteratee(predicate, context); - var pass = [], fail = []; - _.each(obj, function(value, key, obj) { - (predicate(value, key, obj) ? pass : fail).push(value); - }); - return [pass, fail]; - }; - - // Array Functions - // --------------- - - // Get the first element of an array. Passing **n** will return the first N - // values in the array. Aliased as `head` and `take`. The **guard** check - // allows it to work with `_.map`. - _.first = _.head = _.take = function(array, n, guard) { - if (array == null) return void 0; - if (n == null || guard) return array[0]; - if (n < 0) return []; - return slice.call(array, 0, n); - }; - - // Returns everything but the last entry of the array. Especially useful on - // the arguments object. Passing **n** will return all the values in - // the array, excluding the last N. The **guard** check allows it to work with - // `_.map`. - _.initial = function(array, n, guard) { - return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); - }; - - // Get the last element of an array. Passing **n** will return the last N - // values in the array. The **guard** check allows it to work with `_.map`. - _.last = function(array, n, guard) { - if (array == null) return void 0; - if (n == null || guard) return array[array.length - 1]; - return slice.call(array, Math.max(array.length - n, 0)); - }; - - // Returns everything but the first entry of the array. Aliased as `tail` and `drop`. - // Especially useful on the arguments object. Passing an **n** will return - // the rest N values in the array. The **guard** - // check allows it to work with `_.map`. - _.rest = _.tail = _.drop = function(array, n, guard) { - return slice.call(array, n == null || guard ? 1 : n); - }; - - // Trim out all falsy values from an array. - _.compact = function(array) { - return _.filter(array, _.identity); - }; - - // Internal implementation of a recursive `flatten` function. - var flatten = function(input, shallow, strict, output) { - if (shallow && _.every(input, _.isArray)) { - return concat.apply(output, input); - } - for (var i = 0, length = input.length; i < length; i++) { - var value = input[i]; - if (!_.isArray(value) && !_.isArguments(value)) { - if (!strict) output.push(value); - } else if (shallow) { - push.apply(output, value); - } else { - flatten(value, shallow, strict, output); - } - } - return output; - }; - - // Flatten out an array, either recursively (by default), or just one level. - _.flatten = function(array, shallow) { - return flatten(array, shallow, false, []); - }; - - // Return a version of the array that does not contain the specified value(s). - _.without = function(array) { - return _.difference(array, slice.call(arguments, 1)); - }; - - // Produce a duplicate-free version of the array. If the array has already - // been sorted, you have the option of using a faster algorithm. - // Aliased as `unique`. - _.uniq = _.unique = function(array, isSorted, iteratee, context) { - if (array == null) return []; - if (!_.isBoolean(isSorted)) { - context = iteratee; - iteratee = isSorted; - isSorted = false; - } - if (iteratee != null) iteratee = _.iteratee(iteratee, context); - var result = []; - var seen = []; - for (var i = 0, length = array.length; i < length; i++) { - var value = array[i]; - if (isSorted) { - if (!i || seen !== value) result.push(value); - seen = value; - } else if (iteratee) { - var computed = iteratee(value, i, array); - if (_.indexOf(seen, computed) < 0) { - seen.push(computed); - result.push(value); - } - } else if (_.indexOf(result, value) < 0) { - result.push(value); - } - } - return result; - }; - - // Produce an array that contains the union: each distinct element from all of - // the passed-in arrays. - _.union = function() { - return _.uniq(flatten(arguments, true, true, [])); - }; - - // Produce an array that contains every item shared between all the - // passed-in arrays. - _.intersection = function(array) { - if (array == null) return []; - var result = []; - var argsLength = arguments.length; - for (var i = 0, length = array.length; i < length; i++) { - var item = array[i]; - if (_.contains(result, item)) continue; - for (var j = 1; j < argsLength; j++) { - if (!_.contains(arguments[j], item)) break; - } - if (j === argsLength) result.push(item); - } - return result; - }; - - // Take the difference between one array and a number of other arrays. - // Only the elements present in just the first array will remain. - _.difference = function(array) { - var rest = flatten(slice.call(arguments, 1), true, true, []); - return _.filter(array, function(value){ - return !_.contains(rest, value); - }); - }; - - // Zip together multiple lists into a single array -- elements that share - // an index go together. - _.zip = function(array) { - if (array == null) return []; - var length = _.max(arguments, 'length').length; - var results = Array(length); - for (var i = 0; i < length; i++) { - results[i] = _.pluck(arguments, i); - } - return results; - }; - - // Converts lists into objects. Pass either a single array of `[key, value]` - // pairs, or two parallel arrays of the same length -- one of keys, and one of - // the corresponding values. - _.object = function(list, values) { - if (list == null) return {}; - var result = {}; - for (var i = 0, length = list.length; i < length; i++) { - if (values) { - result[list[i]] = values[i]; - } else { - result[list[i][0]] = list[i][1]; - } - } - return result; - }; - - // Return the position of the first occurrence of an item in an array, - // or -1 if the item is not included in the array. - // If the array is large and already in sort order, pass `true` - // for **isSorted** to use binary search. - _.indexOf = function(array, item, isSorted) { - if (array == null) return -1; - var i = 0, length = array.length; - if (isSorted) { - if (typeof isSorted == 'number') { - i = isSorted < 0 ? Math.max(0, length + isSorted) : isSorted; - } else { - i = _.sortedIndex(array, item); - return array[i] === item ? i : -1; - } - } - for (; i < length; i++) if (array[i] === item) return i; - return -1; - }; - - _.lastIndexOf = function(array, item, from) { - if (array == null) return -1; - var idx = array.length; - if (typeof from == 'number') { - idx = from < 0 ? idx + from + 1 : Math.min(idx, from + 1); - } - while (--idx >= 0) if (array[idx] === item) return idx; - return -1; - }; - - // Generate an integer Array containing an arithmetic progression. A port of - // the native Python `range()` function. See - // [the Python documentation](http://docs.python.org/library/functions.html#range). - _.range = function(start, stop, step) { - if (arguments.length <= 1) { - stop = start || 0; - start = 0; - } - step = step || 1; - - var length = Math.max(Math.ceil((stop - start) / step), 0); - var range = Array(length); - - for (var idx = 0; idx < length; idx++, start += step) { - range[idx] = start; - } - - return range; - }; - - // Function (ahem) Functions - // ------------------ - - // Reusable constructor function for prototype setting. - var Ctor = function(){}; - - // Create a function bound to a given object (assigning `this`, and arguments, - // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if - // available. - _.bind = function(func, context) { - var args, bound; - if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); - if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function'); - args = slice.call(arguments, 2); - bound = function() { - if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments))); - Ctor.prototype = func.prototype; - var self = new Ctor; - Ctor.prototype = null; - var result = func.apply(self, args.concat(slice.call(arguments))); - if (_.isObject(result)) return result; - return self; - }; - return bound; - }; - - // Partially apply a function by creating a version that has had some of its - // arguments pre-filled, without changing its dynamic `this` context. _ acts - // as a placeholder, allowing any combination of arguments to be pre-filled. - _.partial = function(func) { - var boundArgs = slice.call(arguments, 1); - return function() { - var position = 0; - var args = boundArgs.slice(); - for (var i = 0, length = args.length; i < length; i++) { - if (args[i] === _) args[i] = arguments[position++]; - } - while (position < arguments.length) args.push(arguments[position++]); - return func.apply(this, args); - }; - }; - - // Bind a number of an object's methods to that object. Remaining arguments - // are the method names to be bound. Useful for ensuring that all callbacks - // defined on an object belong to it. - _.bindAll = function(obj) { - var i, length = arguments.length, key; - if (length <= 1) throw new Error('bindAll must be passed function names'); - for (i = 1; i < length; i++) { - key = arguments[i]; - obj[key] = _.bind(obj[key], obj); - } - return obj; - }; - - // Memoize an expensive function by storing its results. - _.memoize = function(func, hasher) { - var memoize = function(key) { - var cache = memoize.cache; - var address = hasher ? hasher.apply(this, arguments) : key; - if (!_.has(cache, address)) cache[address] = func.apply(this, arguments); - return cache[address]; - }; - memoize.cache = {}; - return memoize; - }; - - // Delays a function for the given number of milliseconds, and then calls - // it with the arguments supplied. - _.delay = function(func, wait) { - var args = slice.call(arguments, 2); - return setTimeout(function(){ - return func.apply(null, args); - }, wait); - }; - - // Defers a function, scheduling it to run after the current call stack has - // cleared. - _.defer = function(func) { - return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1))); - }; - - // Returns a function, that, when invoked, will only be triggered at most once - // during a given window of time. Normally, the throttled function will run - // as much as it can, without ever going more than once per `wait` duration; - // but if you'd like to disable the execution on the leading edge, pass - // `{leading: false}`. To disable execution on the trailing edge, ditto. - _.throttle = function(func, wait, options) { - var context, args, result; - var timeout = null; - var previous = 0; - if (!options) options = {}; - var later = function() { - previous = options.leading === false ? 0 : _.now(); - timeout = null; - result = func.apply(context, args); - if (!timeout) context = args = null; - }; - return function() { - var now = _.now(); - if (!previous && options.leading === false) previous = now; - var remaining = wait - (now - previous); - context = this; - args = arguments; - if (remaining <= 0 || remaining > wait) { - clearTimeout(timeout); - timeout = null; - previous = now; - result = func.apply(context, args); - if (!timeout) context = args = null; - } else if (!timeout && options.trailing !== false) { - timeout = setTimeout(later, remaining); - } - return result; - }; - }; - - // Returns a function, that, as long as it continues to be invoked, will not - // be triggered. The function will be called after it stops being called for - // N milliseconds. If `immediate` is passed, trigger the function on the - // leading edge, instead of the trailing. - _.debounce = function(func, wait, immediate) { - var timeout, args, context, timestamp, result; - - var later = function() { - var last = _.now() - timestamp; - - if (last < wait && last > 0) { - timeout = setTimeout(later, wait - last); - } else { - timeout = null; - if (!immediate) { - result = func.apply(context, args); - if (!timeout) context = args = null; - } - } - }; - - return function() { - context = this; - args = arguments; - timestamp = _.now(); - var callNow = immediate && !timeout; - if (!timeout) timeout = setTimeout(later, wait); - if (callNow) { - result = func.apply(context, args); - context = args = null; - } - - return result; - }; - }; - - // Returns the first function passed as an argument to the second, - // allowing you to adjust arguments, run code before and after, and - // conditionally execute the original function. - _.wrap = function(func, wrapper) { - return _.partial(wrapper, func); - }; - - // Returns a negated version of the passed-in predicate. - _.negate = function(predicate) { - return function() { - return !predicate.apply(this, arguments); - }; - }; - - // Returns a function that is the composition of a list of functions, each - // consuming the return value of the function that follows. - _.compose = function() { - var args = arguments; - var start = args.length - 1; - return function() { - var i = start; - var result = args[start].apply(this, arguments); - while (i--) result = args[i].call(this, result); - return result; - }; - }; - - // Returns a function that will only be executed after being called N times. - _.after = function(times, func) { - return function() { - if (--times < 1) { - return func.apply(this, arguments); - } - }; - }; - - // Returns a function that will only be executed before being called N times. - _.before = function(times, func) { - var memo; - return function() { - if (--times > 0) { - memo = func.apply(this, arguments); - } else { - func = null; - } - return memo; - }; - }; - - // Returns a function that will be executed at most one time, no matter how - // often you call it. Useful for lazy initialization. - _.once = _.partial(_.before, 2); - - // Object Functions - // ---------------- - - // Retrieve the names of an object's properties. - // Delegates to **ECMAScript 5**'s native `Object.keys` - _.keys = function(obj) { - if (!_.isObject(obj)) return []; - if (nativeKeys) return nativeKeys(obj); - var keys = []; - for (var key in obj) if (_.has(obj, key)) keys.push(key); - return keys; - }; - - // Retrieve the values of an object's properties. - _.values = function(obj) { - var keys = _.keys(obj); - var length = keys.length; - var values = Array(length); - for (var i = 0; i < length; i++) { - values[i] = obj[keys[i]]; - } - return values; - }; - - // Convert an object into a list of `[key, value]` pairs. - _.pairs = function(obj) { - var keys = _.keys(obj); - var length = keys.length; - var pairs = Array(length); - for (var i = 0; i < length; i++) { - pairs[i] = [keys[i], obj[keys[i]]]; - } - return pairs; - }; - - // Invert the keys and values of an object. The values must be serializable. - _.invert = function(obj) { - var result = {}; - var keys = _.keys(obj); - for (var i = 0, length = keys.length; i < length; i++) { - result[obj[keys[i]]] = keys[i]; - } - return result; - }; - - // Return a sorted list of the function names available on the object. - // Aliased as `methods` - _.functions = _.methods = function(obj) { - var names = []; - for (var key in obj) { - if (_.isFunction(obj[key])) names.push(key); - } - return names.sort(); - }; - - // Extend a given object with all the properties in passed-in object(s). - _.extend = function(obj) { - if (!_.isObject(obj)) return obj; - var source, prop; - for (var i = 1, length = arguments.length; i < length; i++) { - source = arguments[i]; - for (prop in source) { - if (hasOwnProperty.call(source, prop)) { - obj[prop] = source[prop]; - } - } - } - return obj; - }; - - // Return a copy of the object only containing the whitelisted properties. - _.pick = function(obj, iteratee, context) { - var result = {}, key; - if (obj == null) return result; - if (_.isFunction(iteratee)) { - iteratee = createCallback(iteratee, context); - for (key in obj) { - var value = obj[key]; - if (iteratee(value, key, obj)) result[key] = value; - } - } else { - var keys = concat.apply([], slice.call(arguments, 1)); - obj = new Object(obj); - for (var i = 0, length = keys.length; i < length; i++) { - key = keys[i]; - if (key in obj) result[key] = obj[key]; - } - } - return result; - }; - - // Return a copy of the object without the blacklisted properties. - _.omit = function(obj, iteratee, context) { - if (_.isFunction(iteratee)) { - iteratee = _.negate(iteratee); - } else { - var keys = _.map(concat.apply([], slice.call(arguments, 1)), String); - iteratee = function(value, key) { - return !_.contains(keys, key); - }; - } - return _.pick(obj, iteratee, context); - }; - - // Fill in a given object with default properties. - _.defaults = function(obj) { - if (!_.isObject(obj)) return obj; - for (var i = 1, length = arguments.length; i < length; i++) { - var source = arguments[i]; - for (var prop in source) { - if (obj[prop] === void 0) obj[prop] = source[prop]; - } - } - return obj; - }; - - // Create a (shallow-cloned) duplicate of an object. - _.clone = function(obj) { - if (!_.isObject(obj)) return obj; - return _.isArray(obj) ? obj.slice() : _.extend({}, obj); - }; - - // Invokes interceptor with the obj, and then returns obj. - // The primary purpose of this method is to "tap into" a method chain, in - // order to perform operations on intermediate results within the chain. - _.tap = function(obj, interceptor) { - interceptor(obj); - return obj; - }; - - // Internal recursive comparison function for `isEqual`. - var eq = function(a, b, aStack, bStack) { - // 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; - // Unwrap any wrapped objects. - if (a instanceof _) a = a._wrapped; - if (b instanceof _) b = b._wrapped; - // Compare `[[Class]]` names. - var className = toString.call(a); - if (className !== toString.call(b)) return false; - switch (className) { - // Strings, numbers, regular expressions, dates, and booleans are compared by value. - case '[object RegExp]': - // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i') - case '[object String]': - // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is - // equivalent to `new String("5")`. - return '' + a === '' + b; - case '[object Number]': - // `NaN`s are equivalent, but non-reflexive. - // Object(NaN) is equivalent to NaN - if (+a !== +a) return +b !== +b; - // An `egal` comparison is performed for other numeric values. - return +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; - } - 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; - } - // Objects with different constructors are not equivalent, but `Object`s - // from different frames are. - var aCtor = a.constructor, bCtor = b.constructor; - if ( - aCtor !== bCtor && - // Handle Object.create(x) cases - 'constructor' in a && 'constructor' in b && - !(_.isFunction(aCtor) && aCtor instanceof aCtor && - _.isFunction(bCtor) && bCtor instanceof bCtor) - ) { - return false; - } - // Add the first object to the stack of traversed objects. - aStack.push(a); - bStack.push(b); - var size, result; - // 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))) break; - } - } - } else { - // Deep compare objects. - var keys = _.keys(a), key; - size = keys.length; - // Ensure that both objects contain the same number of properties before comparing deep equality. - result = _.keys(b).length === size; - if (result) { - while (size--) { - // Deep compare each member - key = keys[size]; - if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break; - } - } - } - // Remove the first object from the stack of traversed objects. - aStack.pop(); - bStack.pop(); - return result; - }; - - // Perform a deep comparison to check if two objects are equal. - _.isEqual = function(a, b) { - return eq(a, b, [], []); - }; - - // Is a given array, string, or object empty? - // An "empty" object has no enumerable own-properties. - _.isEmpty = function(obj) { - if (obj == null) return true; - if (_.isArray(obj) || _.isString(obj) || _.isArguments(obj)) return obj.length === 0; - for (var key in obj) if (_.has(obj, key)) return false; - return true; - }; - - // Is a given value a DOM element? - _.isElement = function(obj) { - return !!(obj && obj.nodeType === 1); - }; - - // Is a given value an array? - // Delegates to ECMA5's native Array.isArray - _.isArray = nativeIsArray || function(obj) { - return toString.call(obj) === '[object Array]'; - }; - - // Is a given variable an object? - _.isObject = function(obj) { - var type = typeof obj; - return type === 'function' || type === 'object' && !!obj; - }; - - // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp. - _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) { - _['is' + name] = function(obj) { - return toString.call(obj) === '[object ' + name + ']'; - }; - }); - - // Define a fallback version of the method in browsers (ahem, IE), where - // there isn't any inspectable "Arguments" type. - if (!_.isArguments(arguments)) { - _.isArguments = function(obj) { - return _.has(obj, 'callee'); - }; - } - - // Optimize `isFunction` if appropriate. Work around an IE 11 bug. - if (typeof /./ !== 'function') { - _.isFunction = function(obj) { - return typeof obj == 'function' || false; - }; - } - - // Is a given object a finite number? - _.isFinite = function(obj) { - return isFinite(obj) && !isNaN(parseFloat(obj)); - }; - - // Is the given value `NaN`? (NaN is the only number which does not equal itself). - _.isNaN = function(obj) { - return _.isNumber(obj) && obj !== +obj; - }; - - // Is a given value a boolean? - _.isBoolean = function(obj) { - return obj === true || obj === false || toString.call(obj) === '[object Boolean]'; - }; - - // Is a given value equal to null? - _.isNull = function(obj) { - return obj === null; - }; - - // Is a given variable undefined? - _.isUndefined = function(obj) { - return obj === void 0; - }; - - // Shortcut function for checking if an object has a given property directly - // on itself (in other words, not on a prototype). - _.has = function(obj, key) { - return obj != null && hasOwnProperty.call(obj, key); - }; - - // Utility Functions - // ----------------- - - // Run Underscore.js in *noConflict* mode, returning the `_` variable to its - // previous owner. Returns a reference to the Underscore object. - _.noConflict = function() { - root._ = previousUnderscore; - return this; - }; - - // Keep the identity function around for default iteratees. - _.identity = function(value) { - return value; - }; - - _.constant = function(value) { - return function() { - return value; - }; - }; - - _.noop = function(){}; - - _.property = function(key) { - return function(obj) { - return obj[key]; - }; - }; - - // Returns a predicate for checking whether an object has a given set of `key:value` pairs. - _.matches = function(attrs) { - var pairs = _.pairs(attrs), length = pairs.length; - return function(obj) { - if (obj == null) return !length; - obj = new Object(obj); - for (var i = 0; i < length; i++) { - var pair = pairs[i], key = pair[0]; - if (pair[1] !== obj[key] || !(key in obj)) return false; - } - return true; - }; - }; - - // Run a function **n** times. - _.times = function(n, iteratee, context) { - var accum = Array(Math.max(0, n)); - iteratee = createCallback(iteratee, context, 1); - for (var i = 0; i < n; i++) accum[i] = iteratee(i); - return accum; - }; - - // Return a random integer between min and max (inclusive). - _.random = function(min, max) { - if (max == null) { - max = min; - min = 0; - } - return min + Math.floor(Math.random() * (max - min + 1)); - }; - - // A (possibly faster) way to get the current timestamp as an integer. - _.now = Date.now || function() { - return new Date().getTime(); - }; - - // List of HTML entities for escaping. - var escapeMap = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`' - }; - var unescapeMap = _.invert(escapeMap); - - // Functions for escaping and unescaping strings to/from HTML interpolation. - var createEscaper = function(map) { - var escaper = function(match) { - return map[match]; - }; - // Regexes for identifying a key that needs to be escaped - var source = '(?:' + _.keys(map).join('|') + ')'; - var testRegexp = RegExp(source); - var replaceRegexp = RegExp(source, 'g'); - return function(string) { - string = string == null ? '' : '' + string; - return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; - }; - }; - _.escape = createEscaper(escapeMap); - _.unescape = createEscaper(unescapeMap); - - // If the value of the named `property` is a function then invoke it with the - // `object` as context; otherwise, return it. - _.result = function(object, property) { - if (object == null) return void 0; - var value = object[property]; - return _.isFunction(value) ? object[property]() : value; - }; - - // Generate a unique integer id (unique within the entire client session). - // Useful for temporary DOM ids. - var idCounter = 0; - _.uniqueId = function(prefix) { - var id = ++idCounter + ''; - return prefix ? prefix + id : id; - }; - - // By default, Underscore uses ERB-style template delimiters, change the - // following template settings to use alternative delimiters. - _.templateSettings = { - evaluate : /<%([\s\S]+?)%>/g, - interpolate : /<%=([\s\S]+?)%>/g, - escape : /<%-([\s\S]+?)%>/g - }; - - // When customizing `templateSettings`, if you don't want to define an - // interpolation, evaluation or escaping regex, we need one that is - // guaranteed not to match. - var noMatch = /(.)^/; - - // Certain characters need to be escaped so that they can be put into a - // string literal. - var escapes = { - "'": "'", - '\\': '\\', - '\r': 'r', - '\n': 'n', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - var escaper = /\\|'|\r|\n|\u2028|\u2029/g; - - var escapeChar = function(match) { - return '\\' + escapes[match]; - }; - - // JavaScript micro-templating, similar to John Resig's implementation. - // Underscore templating handles arbitrary delimiters, preserves whitespace, - // and correctly escapes quotes within interpolated code. - // NB: `oldSettings` only exists for backwards compatibility. - _.template = function(text, settings, oldSettings) { - if (!settings && oldSettings) settings = oldSettings; - settings = _.defaults({}, settings, _.templateSettings); - - // Combine delimiters into one regular expression via alternation. - var matcher = RegExp([ - (settings.escape || noMatch).source, - (settings.interpolate || noMatch).source, - (settings.evaluate || noMatch).source - ].join('|') + '|$', 'g'); - - // Compile the template source, escaping string literals appropriately. - var index = 0; - var source = "__p+='"; - text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { - source += text.slice(index, offset).replace(escaper, escapeChar); - index = offset + match.length; - - if (escape) { - source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; - } else if (interpolate) { - source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; - } else if (evaluate) { - source += "';\n" + evaluate + "\n__p+='"; - } - - // Adobe VMs need the match returned to produce the correct offest. - return match; - }); - source += "';\n"; - - // If a variable is not specified, place data values in local scope. - if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; - - source = "var __t,__p='',__j=Array.prototype.join," + - "print=function(){__p+=__j.call(arguments,'');};\n" + - source + 'return __p;\n'; - - try { - var render = new Function(settings.variable || 'obj', '_', source); - } catch (e) { - e.source = source; - throw e; - } - - var template = function(data) { - return render.call(this, data, _); - }; - - // Provide the compiled source as a convenience for precompilation. - var argument = settings.variable || 'obj'; - template.source = 'function(' + argument + '){\n' + source + '}'; - - return template; - }; - - // Add a "chain" function. Start chaining a wrapped Underscore object. - _.chain = function(obj) { - var instance = _(obj); - instance._chain = true; - return instance; - }; - - // OOP - // --------------- - // If Underscore is called as a function, it returns a wrapped object that - // can be used OO-style. This wrapper holds altered versions of all the - // underscore functions. Wrapped objects may be chained. - - // Helper function to continue chaining intermediate results. - var result = function(obj) { - return this._chain ? _(obj).chain() : obj; - }; - - // Add your own custom functions to the Underscore object. - _.mixin = function(obj) { - _.each(_.functions(obj), function(name) { - var func = _[name] = obj[name]; - _.prototype[name] = function() { - var args = [this._wrapped]; - push.apply(args, arguments); - return result.call(this, func.apply(_, args)); - }; - }); - }; - - // Add all of the Underscore functions to the wrapper object. - _.mixin(_); - - // Add all mutator Array functions to the wrapper. - _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { - var method = ArrayProto[name]; - _.prototype[name] = function() { - var obj = this._wrapped; - method.apply(obj, arguments); - if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0]; - return result.call(this, obj); - }; - }); - - // Add all accessor Array functions to the wrapper. - _.each(['concat', 'join', 'slice'], function(name) { - var method = ArrayProto[name]; - _.prototype[name] = function() { - return result.call(this, method.apply(this._wrapped, arguments)); - }; - }); - - // Extracts the result from a wrapped and chained object. - _.prototype.value = function() { - return this._wrapped; - }; - - // AMD registration happens at the end for compatibility with AMD loaders - // that may not enforce next-turn semantics on modules. Even though general - // practice for AMD registration is to be anonymous, underscore registers - // as a named module because, like jQuery, it is a base library that is - // popular enough to be bundled in a third party lib, but not be part of - // an AMD load request. Those cases could generate an error when an - // anonymous define() is called outside of a loader request. - if (typeof define === 'function' && define.amd) { - define('underscore', [], function() { - return _; - }); - } -}.call(this)); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/package.json b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/package.json deleted file mode 100644 index ad1a49c..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "under_score", - "version": "0.1.0", - "author": { - "name": "zed zhou", - "email": "minhongz@gmail.com", - "url": "http://mhzed.com" - }, - "keywords": [ - "utility" - ], - "description": "Add more utilities to underscore", - "homepage": "https://github.com/mhzed/under_score", - "bugs": { - "email": "minhongz@gmail.com" - }, - "licenses": [ - { - "type": "MIT" - } - ], - "engines": { - "node": ">=0.4.0" - }, - "dependencies": { - "underscore": "*" - }, - "devDependencies": {}, - "main": "./index", - "readme": "# under_score\n\nunder_score puts the _ in undersocre. Lame joke aside, under_socre is simply an extension to the very awesome\nunderscore: add some useful (or not so useful, depending on your point of view) helpers to _.\n\n./lib/under_score.js is amply commented, read it for apis and documentation.\n\n./test/test_under_score.js contains examples.", - "_id": "under_score@0.1.0", - "dist": { - "shasum": "2775796432d569dc0bb49a3fa1c9e16f3e3baeb9", - "tarball": "http://registry.npmjs.org/under_score/-/under_score-0.1.0.tgz" - }, - "_npmVersion": "1.1.62", - "_npmUser": { - "name": "mhzed", - "email": "minhongz@gmail.com" - }, - "maintainers": [ - { - "name": "mhzed", - "email": "minhongz@gmail.com" - } - ], - "directories": {}, - "_shasum": "2775796432d569dc0bb49a3fa1c9e16f3e3baeb9", - "_from": "under_score@>=0.1.0", - "_resolved": "https://registry.npmjs.org/under_score/-/under_score-0.1.0.tgz" -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/test/test_under_score.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/test/test_under_score.js deleted file mode 100644 index 78c4401..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/under_score/test/test_under_score.js +++ /dev/null @@ -1,129 +0,0 @@ -var assert = require("assert"); -var _ = require("../lib/under_score"); - -function BaseType() { - this.b = 1; -} -BaseType.prototype.get = function() { return this.b; }; -_(ChildType).inherites(BaseType); -function ChildType() { - this.parent.constructor.call(this); - this.c = 3; -} -var c = new ChildType(); -assert.equal(c.b, 1); -assert.equal(c instanceof ChildType, true); -assert.equal(c instanceof BaseType, true); - -assert.equal( _([1,2]).chain().append([3,4]).compare([1,2,3,4]).value(), 0 ); -assert.equal( _([1,2]).chain().append(3).compare([1,2,3]).value(), 0 ); - -assert.equal(_('a').multiply(0), ''); -assert.equal(_('a').multiply(3), 'aaa'); - -assert.equal(_([1,2,3]).multiply(0).length, 0); -assert.equal(_([1,2,3]).multiply(3).length, 9); - -assert.equal( _([1,2,3]).chain().multiply(2).compare([1,2,3,1,2,3]).value(), 0); - -assert.equal(_('abc').compare('abc'), 0); -assert.equal(_('abc').compare('bc'), -1); - -assert.equal(_('abc').cut(1), 'ab'); -assert.equal(_('abc').cut(-1), 'bc'); -assert.equal( _([1,2,3]).chain().cut(1).compare([1,2]).value(), 0); -assert.equal( _([1,2,3]).chain().cut(-1).compare([2,3]).value(), 0); - -assert.equal(_(' abc').trim(), 'abc'); -assert.equal(_(' abc ').trim(), 'abc'); -assert.equal(_('abc ').trim(), 'abc'); -assert.equal(_('--abc').trim('-'), 'abc'); -assert.equal(_('\/abc//\\').trim('\\/'), 'abc'); -assert.equal(_('abc--').trim('-'), 'abc'); - -assert.equal(_(' too many spaces here').prettySentence(), 'too many spaces here'); - -assert.equal(_('who-are-you-2').camelCase(), 'whoAreYou-2'); -assert.equal(_('WhoAreYou2').hyphenate(), 'who-are-you2'); - -assert.equal(_('my.doc').endsWith('.doc'), true); -assert.equal(_('my.doc').endsWith('.do'), false); - -assert.equal(_('voodoo').count('o'), 4); -assert.equal(_('voodoo').count('oo'), 2); -assert.equal(_('v').count('v'), 1); - -assert.equal(_('%s is back').format('joe'), 'joe is back'); -assert.equal(_('joe is %5s').format('him'), 'joe is him'); -assert.equal(_('joe is %5d').format(100), 'joe is 100'); -assert.equal(_('joe is %05d').format(100), 'joe is 00100'); -assert.equal(_('joe is %-5d').format(100), 'joe is 100 '); - -assert.equal(_('joe is %-5d').format(100), 'joe is 100 '); - -assert.equal(_(61).prettyMinutes(), "01:01"); -assert.equal(_(61).prettyMinutes(true), "+01:01"); -assert.equal(_(-61).prettyMinutes(false), "01:01"); -assert.equal(_(-61).prettyMinutes(true), "-01:01"); - -assert.equal(_("/p/a/t/h/file.ext").dirname(), "/p/a/t/h"); -assert.equal(_("/p/a/t/h/").dirname(), "/p/a/t/h"); -assert.equal(_("/p/a/t/h/file.ext").basename(), "file.ext"); -assert.equal(_("/p/a/t/h/file.ext").basename('.ext'), "file"); -assert.equal(_("/p/a/t/h/file.ext").extname(), ".ext"); -assert.equal(_("file.ext").extname(), ".ext"); -assert.equal(_("/p/a/t/h/file.").extname(), "."); -assert.equal(_("/p/a/t/h/file").extname(), ""); - -assert.equal(_("p").pathjoin('a'), "p/a"); -assert.equal(_("/p").pathjoin('a'), "/p/a"); - -assert.equal(_("http://host:10/a/b/c/../../e").pathResolve(), "http://host:10/a/e"); -assert.equal(_.pathResolve("http://host:10/", "/a/b/c", "../", "/..", "e"), "http://host:10/a/e"); -assert.equal(_.pathResolve("c:\\a\\b\\c", ".\\..\\", "e"), "c:/a/b/e"); -assert.equal(_.pathResolve("c:\\a\\b\\c", "..\\.\\", "e"), "c:/a/b/e"); -assert.equal(_.pathResolve("\\a\\b\\c", "..\\.\\", "e"), "/a/b/e"); -assert.equal(_.pathResolve("\\a\\b\\c", "..", "\\.\\", "e"), "/a/b/e"); -assert.equal(_("http://host:10/a/b/c/../../e/a.html").pathResolve(), "http://host:10/a/e/a.html"); -assert.equal(_("http://host:10/a/b/c/./../e/a.html").pathResolve(), "http://host:10/a/b/e/a.html"); -assert.equal(_("http://host:10/a/b/c/./../e.x/a.html").pathResolve(), "http://host:10/a/b/e.x/a.html"); -assert.equal(_.pathResolve("\\a\\b\\c", "..", "\\.\\", "e\\"), "/a/b/e/"); - -assert.equal(_(__dirname).chain().pathResolve().endsWith("test").value(), true); -assert.equal(_(__dirname).chain().pathResolve().endsWith("test").value(), true); -assert.equal(_("test_under_score.js").chain().pathResolve().endsWith("test_under_score.js").value(), true); - -assert.equal(_({a: 1, b: 2}).pick( function(v,k) { return k=='a';}).a, 1); - -assert.equal(_({a: 1, b: 2}).pickKeys(['a']).a, 1); -assert.equal(_({a: 1, b: 2}).pickKeys({a: ''}).a, 1); - - -assert.equal(_.typeConvert("1", 2), "2"); -assert.equal(_.typeConvert(1, "2"), 2); -assert.equal(_.typeConvert(true, ""), false); -assert.equal(_.typeConvert(true, "2"), true ); -assert.equal(_.typeConvert("", true), "true" ); -assert.equal(_.typeConvert([], ""), "" ); -assert.equal(_.typeConvert( {x: 1}, {x: "2"}).x, 2); -assert.equal(_.typeConvert( {xs: [1]}, {xs : ["2"]}).xs[0], 2); -assert.equal(_.typeConvert( {xs: 1}, {xs : ["2"]}).xs[0], "2"); -assert.equal(_.typeConvert( [ {xs: 1} ], [ {xs: "2"} ] )[0].xs, 2); -assert.equal(_.typeConvert( {x: 1}, {xs: "2"}).xs, undefined); -assert.equal(_.typeConvert( {x: 1}, {xs: "2"}, true).xs, "2"); - -assert.equal(_.typeCheck( {x: 1}, {x: 2} ), null); -assert.equal(_.typeCheck( {x: 1}, {x: '2'} ), { x: 'type-mismatch: expect number but was string' }.toString()); -assert.equal(_.typeCheck( {x: 1}, {} ), { x:'missing'}.toString()); -assert.equal(_.typeCheck( {x: 1, y: 2}, {} ), { x:'missing', y:'missing'}.toString()); - -// test recursion check -assert.equal(_.typeCheck( {x: 1, o : { y: 2} }, {x: 2, o: 's'} ), {o: 'type-mismatch: expect object but was string'}.toString()); -assert.equal(_.typeCheck( {x: 1, o : { y: 2} }, {x: 2, o: {} } ), {o: { y: 'missing'}}.toString()); -assert.equal(_.typeCheck( {x: 1, o : { y: 2} }, {x: 2, o: {y: '2'} } ), {o:{y:'type-mismatch: expect number but was string'}}.toString()); -assert.equal(_.typeCheck( {x: 1, o : { y: 2} }, {x: 2, o: {y: 1} } ), null); - -// nextTick -//console.log(_.timeIt( function() { var n = 0; for (var i=0; i<100000000; i++) { n += i/2;}} )); - -console.log("If you see nothing above, all test cases passed"); \ No newline at end of file diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/.jshintrc b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/.jshintrc deleted file mode 100644 index 98d8766..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/.jshintrc +++ /dev/null @@ -1,88 +0,0 @@ -{ - // JSHint Default Configuration File (as on JSHint website) - // See http://jshint.com/docs/ for more details - - "maxerr" : 50, // {int} Maximum error before stopping - - // Enforcing - "bitwise" : false, // true: Prohibit bitwise operators (&, |, ^, etc.) - "camelcase" : false, // true: Identifiers must be in camelCase - "curly" : true, // true: Require {} for every new block or scope - "eqeqeq" : true, // true: Require triple equals (===) for comparison - "freeze" : true, // true: prohibits overwriting prototypes of native objects such as Array, Date etc. - "forin" : false, // true: Require filtering for..in loops with obj.hasOwnProperty() - "immed" : true, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());` - "latedef" : "nofunc", // true: Require variables/functions to be defined before being used - "newcap" : true, // true: Require capitalization of all constructor functions e.g. `new F()` - "noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee` - "noempty" : true, // true: Prohibit use of empty blocks - "nonbsp" : true, // true: Prohibit "non-breaking whitespace" characters. - "nonew" : true, // true: Prohibit use of constructors for side-effects (without assignment) - "plusplus" : false, // true: Prohibit use of `++` & `--` - "quotmark" : "single", // Quotation mark consistency: - // false : do nothing (default) - // true : ensure whatever is used is consistent - // "single" : require single quotes - // "double" : require double quotes - "undef" : true, // true: Require all non-global variables to be declared (prevents global leaks) - "unused" : "vars", // vars: Require all defined variables be used, ignore function params - "strict" : false, // true: Requires all functions run in ES5 Strict Mode - "maxparams" : false, // {int} Max number of formal params allowed per function - "maxdepth" : false, // {int} Max depth of nested blocks (within functions) - "maxstatements" : false, // {int} Max number statements per function - "maxcomplexity" : false, // {int} Max cyclomatic complexity per function - "maxlen" : false, // {int} Max number of characters per line - - // Relaxing - "asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons) - "boss" : false, // true: Tolerate assignments where comparisons would be expected - "debug" : false, // true: Allow debugger statements e.g. browser breakpoints. - "eqnull" : false, // true: Tolerate use of `== null` - "es5" : false, // true: Allow ES5 syntax (ex: getters and setters) - "esnext" : true, // true: Allow ES.next (ES6) syntax (ex: `const`) - "moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features) - // (ex: `for each`, multiple try/catch, function expression…) - "evil" : false, // true: Tolerate use of `eval` and `new Function()` - "expr" : false, // true: Tolerate `ExpressionStatement` as Programs - "funcscope" : false, // true: Tolerate defining variables inside control statements - "globalstrict" : false, // true: Allow global "use strict" (also enables 'strict') - "iterator" : false, // true: Tolerate using the `__iterator__` property - "lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block - "laxbreak" : false, // true: Tolerate possibly unsafe line breakings - "laxcomma" : false, // true: Tolerate comma-first style coding - "loopfunc" : false, // true: Tolerate functions being defined in loops - "multistr" : false, // true: Tolerate multi-line strings - "noyield" : false, // true: Tolerate generator functions with no yield statement in them. - "notypeof" : false, // true: Tolerate invalid typeof operator values - "proto" : false, // true: Tolerate using the `__proto__` property - "scripturl" : false, // true: Tolerate script-targeted URLs - "shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;` - "sub" : true, // true: Tolerate using `[]` notation when it can still be expressed in dot notation - "supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;` - "validthis" : false, // true: Tolerate using this in a non-constructor function - - // Environments - "browser" : true, // Web Browser (window, document, etc) - "browserify" : true, // Browserify (node.js code in the browser) - "couch" : false, // CouchDB - "devel" : true, // Development/debugging (alert, confirm, etc) - "dojo" : false, // Dojo Toolkit - "jasmine" : false, // Jasmine - "jquery" : false, // jQuery - "mocha" : false, // Mocha - "mootools" : false, // MooTools - "node" : true, // Node.js - "nonstandard" : false, // Widely adopted globals (escape, unescape, etc) - "prototypejs" : false, // Prototype and Scriptaculous - "qunit" : false, // QUnit - "rhino" : false, // Rhino - "shelljs" : false, // ShellJS - "worker" : false, // Web Workers - "wsh" : false, // Windows Scripting Host - "yui" : false, // Yahoo User Interface - - // Custom Globals - "globals" : { // additional predefined global variables - "WebSocket": true - } -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/CHANGELOG.md b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/CHANGELOG.md deleted file mode 100644 index aca2aa1..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/CHANGELOG.md +++ /dev/null @@ -1,164 +0,0 @@ -Changelog -========= - -Version 1.0.17 --------------- -*Released 2015-01-17* - -* Resolves [issue #179](https://github.com/theturtle32/WebSocket-Node/pull/179) - Allow toBuffer to work with empty data - - -Version 1.0.16 --------------- -*Released 2015-01-16* - -* Resolves [issue #178](https://github.com/theturtle32/WebSocket-Node/issues/178) - Ping Frames with no data - - -Version 1.0.15 --------------- -*Released 2015-01-13* - -* Resolves [issue #177](https://github.com/theturtle32/WebSocket-Node/issues/177) - WebSocketClient ignores options unless it has a tlsOptions property - - -Version 1.0.14 --------------- -*Released 2014-12-03* - -* Resolves [issue #173](https://github.com/theturtle32/WebSocket-Node/issues/173) - To allow the W3CWebSocket interface to accept an optional non-standard configuration object as its third parameter, which will be ignored when running in a browser context. - - -Version 1.0.13 --------------- -*Released 2014-11-29* - -* Fixes [issue #171](https://github.com/theturtle32/WebSocket-Node/issues/171) - Code to prevent calling req.accept/req.reject multiple times breaks sanity checks in req.accept - - -Version 1.0.12 --------------- -*Released 2014-11-28* - -* Fixes [issue #170](https://github.com/theturtle32/WebSocket-Node/issues/170) - Non-native XOR implementation broken after making JSHint happy - - -Version 1.0.11 --------------- -*Released 2014-11-25* - -* Fixes some undefined behavior surrounding closing WebSocket connections and more reliably handles edge cases. -* Adds an implementation of the W3C WebSocket API for browsers to facilitate sharing code between client and server via browserify. (Thanks, [@ibc](https://github.com/ibc)!) -* `WebSocketConnection.prototype.close` now accepts optional `reasonCode` and `description` parameters. -* Calling `accept` or `reject` more than once on a `WebSocketRequest` will now throw an error. [Issue #149](https://github.com/theturtle32/WebSocket-Node/issues/149) -* Handling connections dropped by client before accepted by server [Issue #167](https://github.com/theturtle32/WebSocket-Node/issues/167) -* Integrating Gulp and JSHint (Thanks, [@ibc](https://github.com/ibc)!) -* Starting to add individual unit tests (using substack's [tape](github.com/substack/tape) and [faucet](github.com/substack/faucet)) - - -Version 1.0.10 --------------- -*Released 2014-10-22* - -* Fixed Issue [#146](https://github.com/theturtle32/WebSocket-Node/issues/146) that was causing WebSocketClient to throw errors when instantiated if passed `tlsOptions`. - -Version 1.0.9 -------------- -*Released 2014-10-20* - -* Fixing an insidious corner-case bug that prevented `WebSocketConnection` from firing the `close` event in certain cases when there was an error on the underlying `Socket`, leading to connections sticking around forever, stuck erroneously in the `connected` state. These "ghost" connections would cause an error event when trying to write to them. -* Removed deprecated `websocketVersion` property. Use `webSocketVersion` instead (case difference). -* Allowing user to specify all properties for `tlsOptions` in WebSocketClient, not just a few whitelisted properties. This keeps us from having to constantly add new config properties for new versions of Node. (Thanks, [jesusprubio](https://github.com/jesusprubio)) -* Removing support for Node 0.4.x and 0.6.x. -* Adding `fuzzingclient.json` spec file for the Autobahn Test Suite. -* Now more fairly emitting `message` events from the `WebSocketConnection`. Previously, all buffered frames for a connection would be processed and all `message` events emitted before moving on to processing the next connection with available data. Now We process one frame per connection (most of the time) in a more fair round-robin fashion. -* Now correctly calling the `EventEmitter` superclass constructor during class instance initialization. -* `WebSocketClient.prototype.connect` now accepts the empty string (`''`) to mean "no subprotocol requested." Previously either `null` or an empty array (`[]`) was required. -* Fixing a `TypeError` bug in `WebSocketRouter` (Thanks, [a0000778](https://github.com/a0000778)) -* Fixing a potential race condition when attaching event listeners to the underlying `Socket`. (Thanks [RichardBsolut](https://github.com/RichardBsolut)) -* `WebSocketClient` now accepts an optional options hash to be passed to `(http|https).request`. (Thanks [mildred](https://github.com/mildred) and [aus](https://github.com/aus)) This enables the following new abilities, amongst others: - * Use WebSocket-Node from behind HTTP/HTTPS proxy servers using [koichik/node-tunnel](https://github.com/koichik/node-tunnel) or similar. - * Specify the local port and local address to bind the outgoing request socket to. -* Adding option to ignore `X-Forwarded-For` headers when accepting connections from untrusted clients. -* Adding ability to mount a `WebSocketServer` instance to an arbitrary number of Node http/https servers. -* Adding browser shim so Browserify won't blow up when trying to package up code that uses WebSocket-Node. The shim is a no-op, it ***does not implement a wrapper*** providing the WebSocket-Node API in the browser. -* Incorporating upstream enhancements for the native C++ UTF-8 validation and xor masking functions. (Thanks [einaros](https://github.com/einaros) and [kkoopa](https://github.com/kkoopa)) - - -Version 1.0.8 -------------- -*Released 2012-12-26* - -* Fixed remaining naming inconsistency of "websocketVersion" as opposed to "webSocketVersion" throughout the code, and added deprecation warnings for use of the old casing throughout. -* Fixed an issue with our case-insensitive handling of WebSocket subprotocols. Clients that requested a mixed-case subprotocol would end up failing the connection when the server accepted the connection, returning a lower-case version of the subprotocol name. Now we return the subprotocol name in the exact casing that was requested by the client, while still maintaining the case-insensitive verification logic for convenience and practicality. -* Making sure that any socket-level activity timeout that may have been set on a TCP socket is removed when initializing a connection. -* Added support for native TCP Keep-Alive instead of using the WebSocket ping/pong packets to serve that function. -* Fixed cookie parsing to be compliant with RFC 2109 - -Version 1.0.7 -------------- -*Released 2012-08-12* - -* ***Native modules are now optional!*** If they fail to compile, WebSocket-Node will still work but will not verify that received UTF-8 data is valid, and xor masking/unmasking of payload data for security purposes will not be as efficient as it is performed in JavaScript instead of native code. -* Reduced Node.JS version requirement back to v0.6.10 - -Version 1.0.6 -------------- -*Released 2012-05-22* - -* Now requires Node v0.6.13 since that's the first version that I can manage to successfully build the native UTF-8 validator with node-gyp through npm. - -Version 1.0.5 -------------- -*Released 2012-05-21* - -* Fixes the issues that users were having building the native UTF-8 validator on Windows platforms. Special Thanks to: - * [zerodivisi0n](https://github.com/zerodivisi0n) - * [andreasbotsikas](https://github.com/andreasbotsikas) -* Fixed accidental global variable usage (Thanks, [hakobera](https://github.com/hakobera)!) -* Added callbacks to the send* methods that provide notification of messages being sent on the wire and any socket errors that may occur when sending a message. (Thanks, [zerodivisi0n](https://github.com/zerodivisi0n)!) -* Added option to disable logging in the echo-server in the test folder (Thanks, [oberstet](https://github.com/oberstet)!) - - -Version 1.0.4 -------------- -*Released 2011-12-18* - -* Now validates that incoming UTF-8 messages do, in fact, contain valid UTF-8 data. The connection is dropped with prejudice if invalid data is received. This strict behavior conforms to the WebSocket RFC and is verified by the Autobahn Test Suite. This is accomplished in a performant way by using a native C++ Node module created by [einaros](https://github.com/einaros). -* Updated handling of connection closure to pass more of the Autobahn Test Suite. - -Version 1.0.3 -------------- -*Released 2011-12-18* - -* Substantial speed increase (~150% on my machine, depending on the circumstances) due to an optimization in FastBufferList.js that drastically reduces the number of memory alloctions and buffer copying. ([kazuyukitanimura](https://github.com/kazuyukitanimura)) - - -Version 1.0.2 -------------- -*Released 2011-11-28* - -* Fixing whiteboard example to work under Node 0.6.x ([theturtle32](https://github.com/theturtle32)) -* Now correctly emitting a `close` event with a 1006 error code if there is a TCP error while writing to the socket during the handshake. ([theturtle32](https://github.com/theturtle32)) -* Catching errors when writing to the TCP socket during the handshake. ([justoneplanet](https://github.com/justoneplanet)) -* No longer outputting console.warn messages when there is an error writing to the TCP socket ([justoneplanet](https://github.com/justoneplanet)) -* Fixing some formatting errors, commas, semicolons, etc. ([kaisellgren](https://github.com/kaisellgren)) - - -Version 1.0.1 -------------- -*Released 2011-11-21* - -* Now works with Node 0.6.2 as well as 0.4.12 -* Support TLS in WebSocketClient -* Added support for setting and reading cookies -* Added WebSocketServer.prototype.broadcast(data) convenience method -* Added `resourceURL` property to WebSocketRequest objects. It is a Node URL object with the `resource` and any query string params already parsed. -* The WebSocket request router no longer includes the entire query string when trying to match the path name of the request. -* WebSocketRouterRequest objects now include all the properties and events of WebSocketRequest objects. -* Removed more console.log statements. Please rely on the various events emitted to be notified of error conditions. I decided that it is not a library's place to spew information to the console. -* Renamed the `websocketVersion` property to `webSocketVersion` throughout the code to fix inconsistent capitalization. `websocketVersion` has been kept for compatibility but is deprecated and may be removed in the future. -* Now outputting the sanitized version of custom header names rather than the raw value. This prevents invalid HTTP from being put onto the wire if given an illegal header name. - - -I decided it's time to start maintaining a changelog now, starting with version 1.0.1. diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/LICENSE b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/LICENSE deleted file mode 100644 index 430d42b..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/LICENSE +++ /dev/null @@ -1,177 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/Makefile b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/Makefile deleted file mode 100644 index 39ff645..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -all: - node-gyp configure build - -clean: - node-gyp clean - -autobahn: - @NODE_PATH=lib node test/autobahn-test-client.js --host=127.0.0.1 --port=9000 - -autobahn-server: - @NODE_PATH=lib node test/echo-server.js diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/README.md b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/README.md deleted file mode 100644 index ada448c..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/README.md +++ /dev/null @@ -1,296 +0,0 @@ -WebSocket Client & Server Implementation for Node -================================================= - -[![npm version](https://badge.fury.io/js/websocket.svg)](http://badge.fury.io/js/websocket) - -[![NPM](https://nodei.co/npm/websocket.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/websocket/) - -[![NPM](https://nodei.co/npm-dl/websocket.png?height=3)](https://nodei.co/npm/websocket/) - -Overview --------- -This is a (mostly) pure JavaScript implementation of the WebSocket protocol versions 8 and 13 for Node. There are some example client and server applications that implement various interoperability testing protocols in the "test/scripts" folder. - -For a WebSocket client written in ActionScript 3, see my [AS3WebScocket](https://github.com/theturtle32/AS3WebSocket) project. - - -Documentation -============= - -[You can read the full API documentation in the docs folder.](docs/index.md) - - -Changelog ---------- - -***Current Version: 1.0.17*** — Released 2015-01-17 - -***Version 1.0.17*** - -* Resolves [issue #179](https://github.com/theturtle32/WebSocket-Node/pull/179) - Allow toBuffer to work with empty data - -***Version 1.0.16*** - -* Resolves [issue #178](https://github.com/theturtle32/WebSocket-Node/issues/178) - Ping Frames with no data - -***Version 1.0.15*** - -* Resolves [issue #177](https://github.com/theturtle32/WebSocket-Node/issues/177) - WebSocketClient ignores options unless it has a tlsOptions property - -***Version 1.0.14*** - -* Resolves [issue #173](https://github.com/theturtle32/WebSocket-Node/issues/173) - To allow the W3CWebSocket interface to accept an optional non-standard configuration object as its third parameter, which will be ignored when running in a browser context. - - -[View the full changelog](CHANGELOG.md) - -Browser Support ---------------- - -All current browsers are fully supported. - -* Firefox 7-9 (Old) (Protocol Version 8) -* Firefox 10+ (Protocol Version 13) -* Chrome 14,15 (Old) (Protocol Version 8) -* Chrome 16+ (Protocol Version 13) -* Internet Explorer 10+ (Protocol Version 13) -* Safari 6+ (Protocol Version 13) - -***Safari older than 6.0 is not supported since it uses a very old draft of WebSockets*** - -***If you need to simultaneously support legacy browser versions that had implemented draft-75/draft-76/draft-00, take a look here: https://gist.github.com/1428579*** - -Benchmarks ----------- -There are some basic benchmarking sections in the Autobahn test suite. I've put up a [benchmark page](http://theturtle32.github.com/WebSocket-Node/benchmarks/) that shows the results from the Autobahn tests run against AutobahnServer 0.4.10, WebSocket-Node 1.0.2, WebSocket-Node 1.0.4, and ws 0.3.4. - -Autobahn Tests --------------- -The very complete [Autobahn Test Suite](http://autobahn.ws/testsuite/) is used by most WebSocket implementations to test spec compliance and interoperability. - -- [View Server Test Results](http://theturtle32.github.com/WebSocket-Node/test-report/servers/) -- [View Client Test Results](http://theturtle32.github.com/WebSocket-Node/test-report/clients/) - -Notes ------ -This library has been used in production on [worlize.com](https://www.worlize.com) since April 2011 and seems to be stable. Your mileage may vary. - -**Tested with the following node versions:** - -- 0.8.28 -- 0.10.33 - -It may work in earlier or later versions but I'm not actively testing it outside of the listed versions. YMMV. - -Installation ------------- - -A few users have reported difficulties building the native extensions without first manually installing node-gyp. If you have trouble building the native extensions, make sure you've got a C++ compiler, and have done `npm install -g node-gyp` first. - -Native extensions are optional, however, and WebSocket-Node will work even if the extensions cannot be compiled. - -In your project root: - - $ npm install websocket - -Then in your code: - -```javascript -var WebSocketServer = require('websocket').server; -var WebSocketClient = require('websocket').client; -var WebSocketFrame = require('websocket').frame; -var WebSocketRouter = require('websocket').router; -var W3CWebSocket = require('websocket').w3cwebsocket; -``` - -Note for Windows Users ----------------------- -Because there is a small C++ component used for validating UTF-8 data, you will need to install a few other software packages in addition to Node to be able to build this module: - -- [Microsoft Visual C++](http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express) -- [Python 2.7](http://www.python.org/download/) (NOT Python 3.x) - - -Current Features: ------------------ -- Licensed under the Apache License, Version 2.0 -- Protocol version "8" and "13" (Draft-08 through the final RFC) framing and handshake -- Can handle/aggregate received fragmented messages -- Can fragment outgoing messages -- Router to mount multiple applications to various path and protocol combinations -- TLS supported for outbound connections via WebSocketClient -- TLS supported for server connections (use https.createServer instead of http.createServer) - - Thanks to [pors](https://github.com/pors) for confirming this! -- Cookie setting and parsing -- Tunable settings - - Max Receivable Frame Size - - Max Aggregate ReceivedMessage Size - - Whether to fragment outgoing messages - - Fragmentation chunk size for outgoing messages - - Whether to automatically send ping frames for the purposes of keepalive - - Keep-alive ping interval - - Whether or not to automatically assemble received fragments (allows application to handle individual fragments directly) - - How long to wait after sending a close frame for acknowledgment before closing the socket. -- [W3C WebSocket API](http://www.w3.org/TR/websockets/) for applications running on both Node and browsers (via the `W3CWebSocket` class). - - -Known Issues/Missing Features: ------------------------------- -- No API for user-provided protocol extensions. - - -Usage Examples -============== - -Server Example --------------- - -Here's a short example showing a server that echos back anything sent to it, whether utf-8 or binary. - -```javascript -#!/usr/bin/env node -var WebSocketServer = require('websocket').server; -var http = require('http'); - -var server = http.createServer(function(request, response) { - console.log((new Date()) + ' Received request for ' + request.url); - response.writeHead(404); - response.end(); -}); -server.listen(8080, function() { - console.log((new Date()) + ' Server is listening on port 8080'); -}); - -wsServer = new WebSocketServer({ - httpServer: server, - // You should not use autoAcceptConnections for production - // applications, as it defeats all standard cross-origin protection - // facilities built into the protocol and the browser. You should - // *always* verify the connection's origin and decide whether or not - // to accept it. - autoAcceptConnections: false -}); - -function originIsAllowed(origin) { - // put logic here to detect whether the specified origin is allowed. - return true; -} - -wsServer.on('request', function(request) { - if (!originIsAllowed(request.origin)) { - // Make sure we only accept requests from an allowed origin - request.reject(); - console.log((new Date()) + ' Connection from origin ' + request.origin + ' rejected.'); - return; - } - - var connection = request.accept('echo-protocol', request.origin); - console.log((new Date()) + ' Connection accepted.'); - connection.on('message', function(message) { - if (message.type === 'utf8') { - console.log('Received Message: ' + message.utf8Data); - connection.sendUTF(message.utf8Data); - } - else if (message.type === 'binary') { - console.log('Received Binary Message of ' + message.binaryData.length + ' bytes'); - connection.sendBytes(message.binaryData); - } - }); - connection.on('close', function(reasonCode, description) { - console.log((new Date()) + ' Peer ' + connection.remoteAddress + ' disconnected.'); - }); -}); -``` - -Client Example --------------- - -This is a simple example client that will print out any utf-8 messages it receives on the console, and periodically sends a random number. - -*This code demonstrates a client in Node.js, not in the browser* - -```javascript -#!/usr/bin/env node -var WebSocketClient = require('websocket').client; - -var client = new WebSocketClient(); - -client.on('connectFailed', function(error) { - console.log('Connect Error: ' + error.toString()); -}); - -client.on('connect', function(connection) { - console.log('WebSocket Client Connected'); - connection.on('error', function(error) { - console.log("Connection Error: " + error.toString()); - }); - connection.on('close', function() { - console.log('echo-protocol Connection Closed'); - }); - connection.on('message', function(message) { - if (message.type === 'utf8') { - console.log("Received: '" + message.utf8Data + "'"); - } - }); - - function sendNumber() { - if (connection.connected) { - var number = Math.round(Math.random() * 0xFFFFFF); - connection.sendUTF(number.toString()); - setTimeout(sendNumber, 1000); - } - } - sendNumber(); -}); - -client.connect('ws://localhost:8080/', 'echo-protocol'); -``` - -Client Example using the *W3C WebSocket API* --------------------------------------------- - -Same example as above but using the [W3C WebSocket API](http://www.w3.org/TR/websockets/). - -```javascript -var W3CWebSocket = require('websocket').w3cwebsocket; - -var client = new W3CWebSocket('ws://localhost:8080/', 'echo-protocol'); - -client.onerror = function() { - console.log('Connection Error'); -}; - -client.onopen = function() { - console.log('WebSocket Client Connected'); - - function sendNumber() { - if (client.readyState === client.OPEN) { - var number = Math.round(Math.random() * 0xFFFFFF); - client.send(number.toString()); - setTimeout(sendNumber, 1000); - } - } - sendNumber(); -}; - -client.onclose = function() { - console.log('echo-protocol Client Closed'); -}; - -client.onmessage = function(e) { - if (typeof e.data === 'string') { - console.log("Received: '" + e.data + "'"); - } -}; -``` - -Request Router Example ----------------------- - -For an example of using the request router, see `libwebsockets-test-server.js` in the `test` folder. - - -Resources ---------- - -A presentation on the state of the WebSockets protocol that I gave on July 23, 2011 at the LA Hacker News meetup. [WebSockets: The Real-Time Web, Delivered](http://www.scribd.com/doc/60898569/WebSockets-The-Real-Time-Web-Delivered) diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/binding.gyp b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/binding.gyp deleted file mode 100644 index 600f9d1..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/binding.gyp +++ /dev/null @@ -1,16 +0,0 @@ -{ - 'targets': [ - { - 'target_name': 'validation', - 'include_dirs': ["> $(depfile) -# Add extra rules as in (2). -# We remove slashes and replace spaces with new lines; -# remove blank lines; -# delete the first line and append a colon to the remaining lines. -sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\ - grep -v '^$$' |\ - sed -e 1d -e 's|$$|:|' \ - >> $(depfile) -rm $(depfile).raw -endef - -# Command definitions: -# - cmd_foo is the actual command to run; -# - quiet_cmd_foo is the brief-output summary of the command. - -quiet_cmd_cc = CC($(TOOLSET)) $@ -cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $< - -quiet_cmd_cxx = CXX($(TOOLSET)) $@ -cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< - -quiet_cmd_touch = TOUCH $@ -cmd_touch = touch $@ - -quiet_cmd_copy = COPY $@ -# send stderr to /dev/null to ignore messages when linking directories. -cmd_copy = rm -rf "$@" && cp -af "$<" "$@" - -quiet_cmd_alink = AR($(TOOLSET)) $@ -cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^) - -quiet_cmd_alink_thin = AR($(TOOLSET)) $@ -cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^) - -# Due to circular dependencies between libraries :(, we wrap the -# special "figure out circular dependencies" flags around the entire -# input list during linking. -quiet_cmd_link = LINK($(TOOLSET)) $@ -cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS) - -# We support two kinds of shared objects (.so): -# 1) shared_library, which is just bundling together many dependent libraries -# into a link line. -# 2) loadable_module, which is generating a module intended for dlopen(). -# -# They differ only slightly: -# In the former case, we want to package all dependent code into the .so. -# In the latter case, we want to package just the API exposed by the -# outermost module. -# This means shared_library uses --whole-archive, while loadable_module doesn't. -# (Note that --whole-archive is incompatible with the --start-group used in -# normal linking.) - -# Other shared-object link notes: -# - Set SONAME to the library filename so our binaries don't reference -# the local, absolute paths used on the link command-line. -quiet_cmd_solink = SOLINK($(TOOLSET)) $@ -cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS) - -quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ -cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS) - - -# Define an escape_quotes function to escape single quotes. -# This allows us to handle quotes properly as long as we always use -# use single quotes and escape_quotes. -escape_quotes = $(subst ','\'',$(1)) -# This comment is here just to include a ' to unconfuse syntax highlighting. -# Define an escape_vars function to escape '$' variable syntax. -# This allows us to read/write command lines with shell variables (e.g. -# $LD_LIBRARY_PATH), without triggering make substitution. -escape_vars = $(subst $$,$$$$,$(1)) -# Helper that expands to a shell command to echo a string exactly as it is in -# make. This uses printf instead of echo because printf's behaviour with respect -# to escape sequences is more portable than echo's across different shells -# (e.g., dash, bash). -exact_echo = printf '%s\n' '$(call escape_quotes,$(1))' - -# Helper to compare the command we're about to run against the command -# we logged the last time we ran the command. Produces an empty -# string (false) when the commands match. -# Tricky point: Make has no string-equality test function. -# The kernel uses the following, but it seems like it would have false -# positives, where one string reordered its arguments. -# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \ -# $(filter-out $(cmd_$@), $(cmd_$(1)))) -# We instead substitute each for the empty string into the other, and -# say they're equal if both substitutions produce the empty string. -# .d files contain ? instead of spaces, take that into account. -command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\ - $(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1)))) - -# Helper that is non-empty when a prerequisite changes. -# Normally make does this implicitly, but we force rules to always run -# so we can check their command lines. -# $? -- new prerequisites -# $| -- order-only dependencies -prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?)) - -# Helper that executes all postbuilds until one fails. -define do_postbuilds - @E=0;\ - for p in $(POSTBUILDS); do\ - eval $$p;\ - E=$$?;\ - if [ $$E -ne 0 ]; then\ - break;\ - fi;\ - done;\ - if [ $$E -ne 0 ]; then\ - rm -rf "$@";\ - exit $$E;\ - fi -endef - -# do_cmd: run a command via the above cmd_foo names, if necessary. -# Should always run for a given target to handle command-line changes. -# Second argument, if non-zero, makes it do asm/C/C++ dependency munging. -# Third argument, if non-zero, makes it do POSTBUILDS processing. -# Note: We intentionally do NOT call dirx for depfile, since it contains ? for -# spaces already and dirx strips the ? characters. -define do_cmd -$(if $(or $(command_changed),$(prereq_changed)), - @$(call exact_echo, $($(quiet)cmd_$(1))) - @mkdir -p "$(call dirx,$@)" "$(dir $(depfile))" - $(if $(findstring flock,$(word 1,$(cmd_$1))), - @$(cmd_$(1)) - @echo " $(quiet_cmd_$(1)): Finished", - @$(cmd_$(1)) - ) - @$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile) - @$(if $(2),$(fixup_dep)) - $(if $(and $(3), $(POSTBUILDS)), - $(call do_postbuilds) - ) -) -endef - -# Declare the "all" target first so it is the default, -# even though we don't have the deps yet. -.PHONY: all -all: - -# make looks for ways to re-generate included makefiles, but in our case, we -# don't have a direct way. Explicitly telling make that it has nothing to do -# for them makes it go faster. -%.d: ; - -# Use FORCE_DO_CMD to force a target to run. Should be coupled with -# do_cmd. -.PHONY: FORCE_DO_CMD -FORCE_DO_CMD: - -TOOLSET := target -# Suffix rules, putting all outputs into $(obj). -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD - @$(call do_cmd,cc,1) - -# Try building from generated source, too. -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD - @$(call do_cmd,cc,1) - -$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD - @$(call do_cmd,cc,1) - - -ifeq ($(strip $(foreach prefix,$(NO_LOAD),\ - $(findstring $(join ^,$(prefix)),\ - $(join ^,bufferutil.target.mk)))),) - include bufferutil.target.mk -endif -ifeq ($(strip $(foreach prefix,$(NO_LOAD),\ - $(findstring $(join ^,$(prefix)),\ - $(join ^,validation.target.mk)))),) - include validation.target.mk -endif - -quiet_cmd_regen_makefile = ACTION Regenerating $@ -cmd_regen_makefile = cd $(srcdir); /usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/mnt/Data-Partition/Develop/crossbar.io/s4t/node_modules/node-reverse-wstunnel/node_modules/websocket/build/config.gypi -I/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/home/andrea/.node-gyp/0.10.35/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/home/andrea/.node-gyp/0.10.35" "-Dmodule_root_dir=/mnt/Data-Partition/Develop/crossbar.io/s4t/node_modules/node-reverse-wstunnel/node_modules/websocket" binding.gyp -Makefile: $(srcdir)/../../../../../../../../../usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../../../../../../../home/andrea/.node-gyp/0.10.35/common.gypi - $(call do_cmd,regen_makefile) - -# "all" is a concatenation of the "all" targets from all the included -# sub-makefiles. This is just here to clarify. -all: - -# Add in dependency-tracking rules. $(all_deps) is the list of every single -# target in our tree. Only consider the ones with .d (dependency) info: -d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d)) -ifneq ($(d_files),) - include $(d_files) -endif diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/bufferutil.node.d b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/bufferutil.node.d deleted file mode 100644 index 03982be..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/bufferutil.node.d +++ /dev/null @@ -1 +0,0 @@ -cmd_Release/bufferutil.node := rm -rf "Release/bufferutil.node" && cp -af "Release/obj.target/bufferutil.node" "Release/bufferutil.node" diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/obj.target/bufferutil.node.d b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/obj.target/bufferutil.node.d deleted file mode 100644 index 64d1dc1..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/obj.target/bufferutil.node.d +++ /dev/null @@ -1 +0,0 @@ -cmd_Release/obj.target/bufferutil.node := flock ./Release/linker.lock g++ -shared -pthread -rdynamic -m32 -Wl,-soname=bufferutil.node -o Release/obj.target/bufferutil.node -Wl,--start-group Release/obj.target/bufferutil/src/bufferutil.o -Wl,--end-group diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d deleted file mode 100644 index 35513d9..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d +++ /dev/null @@ -1,29 +0,0 @@ -cmd_Release/obj.target/bufferutil/src/bufferutil.o := g++ '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/home/andrea/.node-gyp/0.10.35/src -I/home/andrea/.node-gyp/0.10.35/deps/uv/include -I/home/andrea/.node-gyp/0.10.35/deps/v8/include -I../node_modules/nan -Wall -Wextra -Wno-unused-parameter -pthread -m32 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF ./Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d.raw -c -o Release/obj.target/bufferutil/src/bufferutil.o ../src/bufferutil.cc -Release/obj.target/bufferutil/src/bufferutil.o: ../src/bufferutil.cc \ - /home/andrea/.node-gyp/0.10.35/deps/v8/include/v8.h \ - /home/andrea/.node-gyp/0.10.35/deps/v8/include/v8stdint.h \ - /home/andrea/.node-gyp/0.10.35/src/node.h \ - /home/andrea/.node-gyp/0.10.35/deps/uv/include/uv.h \ - /home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/uv-unix.h \ - /home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/ngx-queue.h \ - /home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/uv-linux.h \ - /home/andrea/.node-gyp/0.10.35/src/node_object_wrap.h \ - /home/andrea/.node-gyp/0.10.35/src/node.h \ - /home/andrea/.node-gyp/0.10.35/src/node_buffer.h \ - /home/andrea/.node-gyp/0.10.35/src/node_object_wrap.h \ - ../node_modules/nan/nan.h \ - /home/andrea/.node-gyp/0.10.35/src/node_version.h -../src/bufferutil.cc: -/home/andrea/.node-gyp/0.10.35/deps/v8/include/v8.h: -/home/andrea/.node-gyp/0.10.35/deps/v8/include/v8stdint.h: -/home/andrea/.node-gyp/0.10.35/src/node.h: -/home/andrea/.node-gyp/0.10.35/deps/uv/include/uv.h: -/home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/uv-unix.h: -/home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/ngx-queue.h: -/home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/uv-linux.h: -/home/andrea/.node-gyp/0.10.35/src/node_object_wrap.h: -/home/andrea/.node-gyp/0.10.35/src/node.h: -/home/andrea/.node-gyp/0.10.35/src/node_buffer.h: -/home/andrea/.node-gyp/0.10.35/src/node_object_wrap.h: -../node_modules/nan/nan.h: -/home/andrea/.node-gyp/0.10.35/src/node_version.h: diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/obj.target/validation.node.d b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/obj.target/validation.node.d deleted file mode 100644 index 97d7984..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/obj.target/validation.node.d +++ /dev/null @@ -1 +0,0 @@ -cmd_Release/obj.target/validation.node := flock ./Release/linker.lock g++ -shared -pthread -rdynamic -m32 -Wl,-soname=validation.node -o Release/obj.target/validation.node -Wl,--start-group Release/obj.target/validation/src/validation.o -Wl,--end-group diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/obj.target/validation/src/validation.o.d b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/obj.target/validation/src/validation.o.d deleted file mode 100644 index a507a1f..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/obj.target/validation/src/validation.o.d +++ /dev/null @@ -1,29 +0,0 @@ -cmd_Release/obj.target/validation/src/validation.o := g++ '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/home/andrea/.node-gyp/0.10.35/src -I/home/andrea/.node-gyp/0.10.35/deps/uv/include -I/home/andrea/.node-gyp/0.10.35/deps/v8/include -I../node_modules/nan -Wall -Wextra -Wno-unused-parameter -pthread -m32 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF ./Release/.deps/Release/obj.target/validation/src/validation.o.d.raw -c -o Release/obj.target/validation/src/validation.o ../src/validation.cc -Release/obj.target/validation/src/validation.o: ../src/validation.cc \ - /home/andrea/.node-gyp/0.10.35/deps/v8/include/v8.h \ - /home/andrea/.node-gyp/0.10.35/deps/v8/include/v8stdint.h \ - /home/andrea/.node-gyp/0.10.35/src/node.h \ - /home/andrea/.node-gyp/0.10.35/deps/uv/include/uv.h \ - /home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/uv-unix.h \ - /home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/ngx-queue.h \ - /home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/uv-linux.h \ - /home/andrea/.node-gyp/0.10.35/src/node_object_wrap.h \ - /home/andrea/.node-gyp/0.10.35/src/node.h \ - /home/andrea/.node-gyp/0.10.35/src/node_buffer.h \ - /home/andrea/.node-gyp/0.10.35/src/node_object_wrap.h \ - ../node_modules/nan/nan.h \ - /home/andrea/.node-gyp/0.10.35/src/node_version.h -../src/validation.cc: -/home/andrea/.node-gyp/0.10.35/deps/v8/include/v8.h: -/home/andrea/.node-gyp/0.10.35/deps/v8/include/v8stdint.h: -/home/andrea/.node-gyp/0.10.35/src/node.h: -/home/andrea/.node-gyp/0.10.35/deps/uv/include/uv.h: -/home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/uv-unix.h: -/home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/ngx-queue.h: -/home/andrea/.node-gyp/0.10.35/deps/uv/include/uv-private/uv-linux.h: -/home/andrea/.node-gyp/0.10.35/src/node_object_wrap.h: -/home/andrea/.node-gyp/0.10.35/src/node.h: -/home/andrea/.node-gyp/0.10.35/src/node_buffer.h: -/home/andrea/.node-gyp/0.10.35/src/node_object_wrap.h: -../node_modules/nan/nan.h: -/home/andrea/.node-gyp/0.10.35/src/node_version.h: diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/validation.node.d b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/validation.node.d deleted file mode 100644 index 6b32ade..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/.deps/Release/validation.node.d +++ /dev/null @@ -1 +0,0 @@ -cmd_Release/validation.node := rm -rf "Release/validation.node" && cp -af "Release/obj.target/validation.node" "Release/validation.node" diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/bufferutil.node b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/bufferutil.node deleted file mode 100755 index 1b5f4072facd71ffb98197e0a6894be399b1e5e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18514 zcmeHP4|JSWm4A~7Wgwv`*p?zyr)|I%+G!?9)1*|KG@X<{Qeu;oYONoWWSXQ+GGX#f z+CmF0)36=K)CkqXF6&wkF5)h(x&m7j*OXSuzr~Em&Laa=C;_Zs8WhhNcQp3K;M!N~!RQbH!XS zQ(PkHhM#ceJeAKOGDS%G5uXr8u2#7g0_%|{X?hOeanO&0&MYfvdM;4rslZJx1kP+| z^}n%O_gyB0$$LO!HuR5x4s={%`%q7;0^O;f7i}@KK7eW;(2cxeWs~?~^yd3!d}Z3q z1y?q2TK_uZCyR%} zKmFQsH?5iZ$DO~w`#ZnBbL)Mt|Elov_Fw;VdH>y8tAam1?!GqX=RYX<*SDVd-rkpP z+;_5Q?xTel`Y!+7f30Xgc#m!-1+HW#bfS&UqcLDnNT=OQ^5P+65J2MF zq;sgkivWJ@sKEMO2c39`PNEa}Uv}W6&oo3pFY-AV`WQQsjr6q{{ri^;{`(#MV|#Nl z^!u)Z&i22FY!dl@N@vlD^iO8!yD_8wo(%cU0b%{GW$-^~gaeX(BBQrK%B2VnZ_y%SPag)ZU11@Jpq>Dtp zh(Mq1;I9Nu{)d1&>(`@xy?0C=ZP1Q2is>S8o>-bezZ>`v+S>s-<^2ldKR-Zj+V5hy z9tAED;sxNO{|@w`0I7=p4BFpynGjG(%n}!f7~tT=LW}^CpYy*5ow(G+_VdKg(&SGU zUjRNMfOP?U7mDfPYp}J0VvhI@tev6cR!WwG_^!_g+YqqAgXcvEoI zbt{Ye$}1|PZLzL!x7`~g7fSs8YeL+4rGSmhnMqLyUz z&}i|ZhOk{9kxVt+X^jLs>Z#ny((XuW*k7a+xgi?r@fY6^4sEOob#^v~S~dn{uZrr! z(O#Oh+pbyJ;I|g74t2)D!C+9yP+FGPg*Jv+cLLSw`|7LvptC<++L*A0MV8T@onBNI zif*jwZVmT@@dp+;WslP=U%o1|3B%ue8Y`vMSuRJ*;+Vs?)`vPevzn&_Bj6mHimJ|V zD0+%+XO*(NSjuQzJ>LFK6D+RjRU^L=Z7dIm?DkU|fo3aN-qG8GuB(ct;2$^g$^uzj zVo_6fG`-jUVx!q zvN_yZAH~Fr+8yEE;ASo@evZn5?Q18a<7IHF{)=kJZW-oscCVWY; znyRvSrwHwVX-nIL4zRpPD%;wr=6jkPMN)oTf#s$yY_~^RYiPYiwUL%kr(7}oW!16n z7P}+T-5Bob=?vLiJ%Yi$Myvk1milTgDrIWvOkZHI(1PSxXwCE(FHkPb6y=aKwzyDG znw*9bi=xq-RngGV)*Z5AQ7WZJZM=NHA5LI;ks8mk20Pl(-By8Jp2o-(V|hKRC+0K%fDDV@|H>)@|$C@*TjmI)pTP=#HL`HOKImXRa3?g ziv3U|Z68pZjZxUlsPXEimV9Zq>FbU7%82&Z z?a^?km3R^H7Dchbt(cmewSW#QEtja3(`F$m+=OXpAW{p+i zE5!-JnQ*W`avbwgn4(B>);~Ndy3Xn!`E$fD&O|)76(RS2pyNEgY2|oS*_4is3#iRx z;7pYN4b4y7o_8lGIbw#UKZ%1CAAhFduQYr^!`x|#o~PmaHS}q?NWC0S%wm@R)|LYdET50nUP~H(kTHhIeWB z4;p@1!~f9mKQ(+x!{;@8QA56iQ|?O|P7NsBtKnP?UxwXs&c|55E`&=ow9zl(-_`JO z=u7;M8eWQah<`!D0~)@fVI20&0qwXDN7q_y>geZ$g}fUn1XCLcB&CzbTwY`GB)D{1fR*a1ICVT8wvbmcxNhQXb%S z#BuJPHe10?;sru%BJ>Jzn}${FKk$2~H=v*T0^avN1wRd)h(ADn*z!?8SA`HiA&x$d z5Y7=|ln^hB(~gdGW|vwh@^v@75&;uzRlhy#`phwWxj zFTl@HFTmTV7vSHM4qLpf;mvFp_-{4bz;=PZ0J^JK2n*$eKhW@c(1{;o{X8M!)E{so z>jOTo;abW8UPwB0_!7$jr?MPykA@Z08#ce3;}2i^l7>UnANZd&tcLEyyEXi(hNa{O z&%bNFnSU2z2uxvJPEV_g6ao6RrKjBg#?k2?Vc3;=<9|_Bacu>Rp z39p1d6MhhSeHg#ror8B+LcHt0L70zuL^xT9KM@vU+yme*MZW>h1^*O6lsCkWdq#dB zV2A^shS+5M_~__p|B!vo2#g`(2R&;K0AhZ86O&Sm-pe(MY4lz+BHH?zB&PNpI_2W7D zvm-fcC*WK^n4DR7VEy3OKj_mi@(P;Uap22Wpkv3U4#XFt_P|~9@ps;E{N$ufli~-b zu3dK^8Gi$Ou)&GM)WXr>V@C(<%Z04}Wm&(?)MrgofB(sx#Qyz9Kj3=&*^@CND0z~C zo`4|qo5G$w_M3qRG1@}OyFtpkSjpS|9m*52!epFgLHm=FajaM(ky|+O`M->gj+CSL zu{gP0N>eH}@Cdv>%R5)fI|TPZ|B~?$RDzgk$@mE+FmK>4mdS2O2}dsjfkqlc|87_f zXQ&<6_IP4x;Xv%59Gros=fIt48j@I|v=CO$XM421hI9-yl*x4mK=LUSm47bI4u>fFaof0aA0PmS07WXzLXmp`!WIe4|Q|634YM<67c6cv*S_6(u% zwq%v3f2g2;I~v2#%rip+();?Kw>?QWEIL}BYlOrP&X>M1NK^GK{r}dF)Bb zM4X&xKw3B5stLLZ*1yyUAJN_FNY~*eqXYFcJniW`RyLltbe=R%NsU)62P^oT>4_Sa z-DOxhpzT22;Y8ij^z>x#=@d)sFc%%Y;OvAcs=;mW_$~0;;84Nt_b3tZk=#V^@nrCE z|64}Dq2Mqy!w4mU2Mc!Y!s9@n07r7$(+L~X63v-mPX=XM&XRSqM6U>J{Qv}*=?9oN zB)yK5e^ZqBV=h^QCCA+~EN4EJSjd#6u5H6t#SRwq-@--7(aTiJPV3Zp5-ukm^yozk zvwh%UG$#gvhtbbO@M+bglydaj*aY-Gl->kP16v;b1$UcPY+fS?{7Ks%mS!EF_v`VA z9hTNIi~lxh8$Iu6fdw2HjjNFvF4+A)P!og8k)dHt<#C2RrpzZh0wIY5@`+-fB}I!( zZX4eJYEJ)X!OjO!y8o4&#G?cG=fVKW9!a-9C;n(|#gnl&(e-50uTM?#GhZjr3S$4&r6fBwE0oZWo!3t+P^w?VBO)wx?x%|85}n5 z4WET$V_4(2dRzs&pHi&a+D^W427j2Nr9B&!a}oy%cH5@9oEOgOa9~50>O5 z@;?`U)K&3z?6v(b=D2?1dK5z)KjMy`%&|WbKk2rY#ZS8Ik2sajI?(Gp3HL+;UGVU- zoZ_mSUDX)sWv=2X*RE=ec22Q-*Q8_jalG}s8+OjSX6L+f4iG2Zap@1^lsfvY3Cg!l zP<|Q8N1nwI)@Y zY~@wT*wqE~1+N|hx`_?vsC40&bZ6rt<);)>X^GX$th zpHqv_^(X3vrS7W+LE(1@&;5RM^Z`K6tD~cZ*tUuR?*{xh;Ddns@LFEv z2H$I=qdbB>j;V^D*ToDhCjr1+fbD?oSXGAs%ijb&2mCk_6alWm;p|4hyWbui9R&2? z?Pnk0F2Ezi@vi29eEx{QthbRmgUJdJ?QhDS=yX|`W&CVS!lBVpbes(r=0CTpGZobkbVm0 zk-rE0MHoANQ*cO;ITWjr{Cn9p#+cubjN_l-|3;YIU9RCg{e^nms zNuLq$l~dW1d~?Bf4ft+i9W&0fyOrvm9G`md?L7m&&EPu;z8y|^!8_dX+?+l-4TqBU z+6%tzusy%oNwsV2HQ6=hUzGE1de;K)THsv^yla8~*A^(6j&IO$f5^mTpWhS^4r$15 z5^#MbUI)wvo5Y&a({hH~%skDTgpzbBV|C2iIca zB=GYA`O7EIAXAWWG?IrKY(Em`If>^sToZ~lK=`~5N?ZiE7jkgDCx6w4>N4R)JJJq1 zUd{NKtiW+DavVzHI2MuT8qN3D0QvpBu6Q4Gc^G+WK-SMDob;ID{D)IU!Z2;uA9(q)I50qv-Q?dGXFVuyWg-7#NttfRAaK}V~QSbM0q zUHDqJbfcz%c2rUN_-$pRI}Ncwi-tSNuO50jZQ+w&yZY?#W<1MpUVYJs{A|V-ZnxG) zLtSC3y%jYLrfOIregUUynCA^GV1w{bS4RsPjzA#(_+%?eBEG{BzLrQAKW|mWIfK9S zA-I@4B01w4OjY_5lMflkZaL2ME#@JVNgo0vA9Fb}{fquUpJN^d6KQyqkiHi{W?k~p zN14^H@+d$eFVi*1#=q!W%r~RVw9ER;O~~{|KGP?e>+#HXSw_gzihLe2%jnz8^lc-L ze3&Al3)%2-E-;%p!+B)*`tVF$Imb9hndjiyB-1X>l!k8*Jj_Lg36QeMyA|2+G1i57 z2l{Lh`Iv4;HhlbEof)jDWZK=O`Pg6H%P_Aookf`!nQ0K2^2q0mUjZtUk@ru)3|}p7 za+!x&Nhia1KX8~<+EvEe_{PS7tcLGFJma$#$;UP9r3v_kz{7T_`Uv<&CgA%%=o}03 z$v7VHv7%{@kmLJ|Dpq{>M&LLu!!zwi-XA&mL;wf|EgRp@9eiA;rh<>}RVJDCUqk`h zr+)JT$lxXVCEX_7*0_Sz7r@ji9Ae%j$sme7YX6T#OM4k zL#7T>km>VIc|%L_&d3R^laXg|C*=CUq$0J{8liC2GS>oys}?xt6|OA6xvg+T;2c&s zM^w#Kg>%JHb5h~7sG55UXD`$oQ#fa=no9~-9WrqqZn?t>IX4ttDZ+W6aHR-+UE%at zwFfJlmQ#DM!Z|9+PZiD`RQaRAxsw8i-!Zw3M+GDbTpbMPM@(+SX)w`WnA~!QR?iBb zA;;I08)_`*egO0(n!XSCRH$v_y~?o$eX*u5f(sl0{y~j*IGmCC+Q2!lnOrz=>;PV`%pmpq z9PmL0{uSWn{6zh~2b}g{vo6?&aWY&_m|U18Zvy9;i;4U$xFFXhCKo(EQy(wrGv*n3 zf$#x$>Zd5`FZEvnx(F!Th4HHg9)P~NC}Ml-ft&GjVLYS2&G-_(4Y)b;xNy?i1>7Wh z*S-w=Rp2uMYAs?MkBbfIME+?R_=kWy2x^wy{NxA1OJo*m*+v?^F=9 z$fN$V)RLK!zYzG4cg#Po$)I;;;Qbl+L%^N>@k9pw&%lcUvN`nUV)?DE!c_kjswG<% z(H<)@@J|4D#;x6vL4OFibNrskpu4dJIOF6zz{l(}T@(O!#^E&pH)%E=A`YDTeG0fU z?$2>C;%jL^AV8KNol@S0$Z#!ZAcg**A5jKDe}!e$uL?Fce$=XNT3OXtbNxz&&}EaQ zf}AF-F+OOC(Imbe1m)o)|Ev-jS~8)$EWJ6)D6|PhD^<(XZI6lgk&!*>&L}t2JV^$zVmR)s94atx#;Uz-werXV?z6`pOnnpnKVvWDuu% zJw@P$9o-_-3vFwxs|%4-`t?>~GU_vp)v~HrRn`Tq;L7E6X{ot>UQv7fvdUWP`s(V2 zV58MoxvVxwj?Lv|zP7M!^|V-ad#rn-uX!^{5j2{T(b^la)P<<9mVb0*WnE1b28M(8 z*9O&`ahTfJrKpLcNsC5fFj^`??M&j7CJZwiAIOyvUz;@?mSJFlfQ-b^F*i^zO_Ypo zR8hHEd@wVF@@yhKCk}6OMs8~D5GTaRlr{90p^|42UU{nEV&xR$0^HuQcr>-pQcvv~X+{Jnsw#%(9Z0 z-Apgcj!4__Zm8o_$ND^R)V*U6%vUa{h|04Hv33rc39f|#X&pU%tUBW$mBF(t_NR#b zbpBrirgho1@!`)-MNbu`t(@zOqrbJ|I>qx63yZYXL(@6X7Buu SAI2s&151^$CyMNqn*1LU9(4Nv diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/linker.lock b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/linker.lock deleted file mode 100644 index e69de29..0000000 diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/obj.target/bufferutil.node b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/obj.target/bufferutil.node deleted file mode 100755 index 1b5f4072facd71ffb98197e0a6894be399b1e5e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18514 zcmeHP4|JSWm4A~7Wgwv`*p?zyr)|I%+G!?9)1*|KG@X<{Qeu;oYONoWWSXQ+GGX#f z+CmF0)36=K)CkqXF6&wkF5)h(x&m7j*OXSuzr~Em&Laa=C;_Zs8WhhNcQp3K;M!N~!RQbH!XS zQ(PkHhM#ceJeAKOGDS%G5uXr8u2#7g0_%|{X?hOeanO&0&MYfvdM;4rslZJx1kP+| z^}n%O_gyB0$$LO!HuR5x4s={%`%q7;0^O;f7i}@KK7eW;(2cxeWs~?~^yd3!d}Z3q z1y?q2TK_uZCyR%} zKmFQsH?5iZ$DO~w`#ZnBbL)Mt|Elov_Fw;VdH>y8tAam1?!GqX=RYX<*SDVd-rkpP z+;_5Q?xTel`Y!+7f30Xgc#m!-1+HW#bfS&UqcLDnNT=OQ^5P+65J2MF zq;sgkivWJ@sKEMO2c39`PNEa}Uv}W6&oo3pFY-AV`WQQsjr6q{{ri^;{`(#MV|#Nl z^!u)Z&i22FY!dl@N@vlD^iO8!yD_8wo(%cU0b%{GW$-^~gaeX(BBQrK%B2VnZ_y%SPag)ZU11@Jpq>Dtp zh(Mq1;I9Nu{)d1&>(`@xy?0C=ZP1Q2is>S8o>-bezZ>`v+S>s-<^2ldKR-Zj+V5hy z9tAED;sxNO{|@w`0I7=p4BFpynGjG(%n}!f7~tT=LW}^CpYy*5ow(G+_VdKg(&SGU zUjRNMfOP?U7mDfPYp}J0VvhI@tev6cR!WwG_^!_g+YqqAgXcvEoI zbt{Ye$}1|PZLzL!x7`~g7fSs8YeL+4rGSmhnMqLyUz z&}i|ZhOk{9kxVt+X^jLs>Z#ny((XuW*k7a+xgi?r@fY6^4sEOob#^v~S~dn{uZrr! z(O#Oh+pbyJ;I|g74t2)D!C+9yP+FGPg*Jv+cLLSw`|7LvptC<++L*A0MV8T@onBNI zif*jwZVmT@@dp+;WslP=U%o1|3B%ue8Y`vMSuRJ*;+Vs?)`vPevzn&_Bj6mHimJ|V zD0+%+XO*(NSjuQzJ>LFK6D+RjRU^L=Z7dIm?DkU|fo3aN-qG8GuB(ct;2$^g$^uzj zVo_6fG`-jUVx!q zvN_yZAH~Fr+8yEE;ASo@evZn5?Q18a<7IHF{)=kJZW-oscCVWY; znyRvSrwHwVX-nIL4zRpPD%;wr=6jkPMN)oTf#s$yY_~^RYiPYiwUL%kr(7}oW!16n z7P}+T-5Bob=?vLiJ%Yi$Myvk1milTgDrIWvOkZHI(1PSxXwCE(FHkPb6y=aKwzyDG znw*9bi=xq-RngGV)*Z5AQ7WZJZM=NHA5LI;ks8mk20Pl(-By8Jp2o-(V|hKRC+0K%fDDV@|H>)@|$C@*TjmI)pTP=#HL`HOKImXRa3?g ziv3U|Z68pZjZxUlsPXEimV9Zq>FbU7%82&Z z?a^?km3R^H7Dchbt(cmewSW#QEtja3(`F$m+=OXpAW{p+i zE5!-JnQ*W`avbwgn4(B>);~Ndy3Xn!`E$fD&O|)76(RS2pyNEgY2|oS*_4is3#iRx z;7pYN4b4y7o_8lGIbw#UKZ%1CAAhFduQYr^!`x|#o~PmaHS}q?NWC0S%wm@R)|LYdET50nUP~H(kTHhIeWB z4;p@1!~f9mKQ(+x!{;@8QA56iQ|?O|P7NsBtKnP?UxwXs&c|55E`&=ow9zl(-_`JO z=u7;M8eWQah<`!D0~)@fVI20&0qwXDN7q_y>geZ$g}fUn1XCLcB&CzbTwY`GB)D{1fR*a1ICVT8wvbmcxNhQXb%S z#BuJPHe10?;sru%BJ>Jzn}${FKk$2~H=v*T0^avN1wRd)h(ADn*z!?8SA`HiA&x$d z5Y7=|ln^hB(~gdGW|vwh@^v@75&;uzRlhy#`phwWxj zFTl@HFTmTV7vSHM4qLpf;mvFp_-{4bz;=PZ0J^JK2n*$eKhW@c(1{;o{X8M!)E{so z>jOTo;abW8UPwB0_!7$jr?MPykA@Z08#ce3;}2i^l7>UnANZd&tcLEyyEXi(hNa{O z&%bNFnSU2z2uxvJPEV_g6ao6RrKjBg#?k2?Vc3;=<9|_Bacu>Rp z39p1d6MhhSeHg#ror8B+LcHt0L70zuL^xT9KM@vU+yme*MZW>h1^*O6lsCkWdq#dB zV2A^shS+5M_~__p|B!vo2#g`(2R&;K0AhZ86O&Sm-pe(MY4lz+BHH?zB&PNpI_2W7D zvm-fcC*WK^n4DR7VEy3OKj_mi@(P;Uap22Wpkv3U4#XFt_P|~9@ps;E{N$ufli~-b zu3dK^8Gi$Ou)&GM)WXr>V@C(<%Z04}Wm&(?)MrgofB(sx#Qyz9Kj3=&*^@CND0z~C zo`4|qo5G$w_M3qRG1@}OyFtpkSjpS|9m*52!epFgLHm=FajaM(ky|+O`M->gj+CSL zu{gP0N>eH}@Cdv>%R5)fI|TPZ|B~?$RDzgk$@mE+FmK>4mdS2O2}dsjfkqlc|87_f zXQ&<6_IP4x;Xv%59Gros=fIt48j@I|v=CO$XM421hI9-yl*x4mK=LUSm47bI4u>fFaof0aA0PmS07WXzLXmp`!WIe4|Q|634YM<67c6cv*S_6(u% zwq%v3f2g2;I~v2#%rip+();?Kw>?QWEIL}BYlOrP&X>M1NK^GK{r}dF)Bb zM4X&xKw3B5stLLZ*1yyUAJN_FNY~*eqXYFcJniW`RyLltbe=R%NsU)62P^oT>4_Sa z-DOxhpzT22;Y8ij^z>x#=@d)sFc%%Y;OvAcs=;mW_$~0;;84Nt_b3tZk=#V^@nrCE z|64}Dq2Mqy!w4mU2Mc!Y!s9@n07r7$(+L~X63v-mPX=XM&XRSqM6U>J{Qv}*=?9oN zB)yK5e^ZqBV=h^QCCA+~EN4EJSjd#6u5H6t#SRwq-@--7(aTiJPV3Zp5-ukm^yozk zvwh%UG$#gvhtbbO@M+bglydaj*aY-Gl->kP16v;b1$UcPY+fS?{7Ks%mS!EF_v`VA z9hTNIi~lxh8$Iu6fdw2HjjNFvF4+A)P!og8k)dHt<#C2RrpzZh0wIY5@`+-fB}I!( zZX4eJYEJ)X!OjO!y8o4&#G?cG=fVKW9!a-9C;n(|#gnl&(e-50uTM?#GhZjr3S$4&r6fBwE0oZWo!3t+P^w?VBO)wx?x%|85}n5 z4WET$V_4(2dRzs&pHi&a+D^W427j2Nr9B&!a}oy%cH5@9oEOgOa9~50>O5 z@;?`U)K&3z?6v(b=D2?1dK5z)KjMy`%&|WbKk2rY#ZS8Ik2sajI?(Gp3HL+;UGVU- zoZ_mSUDX)sWv=2X*RE=ec22Q-*Q8_jalG}s8+OjSX6L+f4iG2Zap@1^lsfvY3Cg!l zP<|Q8N1nwI)@Y zY~@wT*wqE~1+N|hx`_?vsC40&bZ6rt<);)>X^GX$th zpHqv_^(X3vrS7W+LE(1@&;5RM^Z`K6tD~cZ*tUuR?*{xh;Ddns@LFEv z2H$I=qdbB>j;V^D*ToDhCjr1+fbD?oSXGAs%ijb&2mCk_6alWm;p|4hyWbui9R&2? z?Pnk0F2Ezi@vi29eEx{QthbRmgUJdJ?QhDS=yX|`W&CVS!lBVpbes(r=0CTpGZobkbVm0 zk-rE0MHoANQ*cO;ITWjr{Cn9p#+cubjN_l-|3;YIU9RCg{e^nms zNuLq$l~dW1d~?Bf4ft+i9W&0fyOrvm9G`md?L7m&&EPu;z8y|^!8_dX+?+l-4TqBU z+6%tzusy%oNwsV2HQ6=hUzGE1de;K)THsv^yla8~*A^(6j&IO$f5^mTpWhS^4r$15 z5^#MbUI)wvo5Y&a({hH~%skDTgpzbBV|C2iIca zB=GYA`O7EIAXAWWG?IrKY(Em`If>^sToZ~lK=`~5N?ZiE7jkgDCx6w4>N4R)JJJq1 zUd{NKtiW+DavVzHI2MuT8qN3D0QvpBu6Q4Gc^G+WK-SMDob;ID{D)IU!Z2;uA9(q)I50qv-Q?dGXFVuyWg-7#NttfRAaK}V~QSbM0q zUHDqJbfcz%c2rUN_-$pRI}Ncwi-tSNuO50jZQ+w&yZY?#W<1MpUVYJs{A|V-ZnxG) zLtSC3y%jYLrfOIregUUynCA^GV1w{bS4RsPjzA#(_+%?eBEG{BzLrQAKW|mWIfK9S zA-I@4B01w4OjY_5lMflkZaL2ME#@JVNgo0vA9Fb}{fquUpJN^d6KQyqkiHi{W?k~p zN14^H@+d$eFVi*1#=q!W%r~RVw9ER;O~~{|KGP?e>+#HXSw_gzihLe2%jnz8^lc-L ze3&Al3)%2-E-;%p!+B)*`tVF$Imb9hndjiyB-1X>l!k8*Jj_Lg36QeMyA|2+G1i57 z2l{Lh`Iv4;HhlbEof)jDWZK=O`Pg6H%P_Aookf`!nQ0K2^2q0mUjZtUk@ru)3|}p7 za+!x&Nhia1KX8~<+EvEe_{PS7tcLGFJma$#$;UP9r3v_kz{7T_`Uv<&CgA%%=o}03 z$v7VHv7%{@kmLJ|Dpq{>M&LLu!!zwi-XA&mL;wf|EgRp@9eiA;rh<>}RVJDCUqk`h zr+)JT$lxXVCEX_7*0_Sz7r@ji9Ae%j$sme7YX6T#OM4k zL#7T>km>VIc|%L_&d3R^laXg|C*=CUq$0J{8liC2GS>oys}?xt6|OA6xvg+T;2c&s zM^w#Kg>%JHb5h~7sG55UXD`$oQ#fa=no9~-9WrqqZn?t>IX4ttDZ+W6aHR-+UE%at zwFfJlmQ#DM!Z|9+PZiD`RQaRAxsw8i-!Zw3M+GDbTpbMPM@(+SX)w`WnA~!QR?iBb zA;;I08)_`*egO0(n!XSCRH$v_y~?o$eX*u5f(sl0{y~j*IGmCC+Q2!lnOrz=>;PV`%pmpq z9PmL0{uSWn{6zh~2b}g{vo6?&aWY&_m|U18Zvy9;i;4U$xFFXhCKo(EQy(wrGv*n3 zf$#x$>Zd5`FZEvnx(F!Th4HHg9)P~NC}Ml-ft&GjVLYS2&G-_(4Y)b;xNy?i1>7Wh z*S-w=Rp2uMYAs?MkBbfIME+?R_=kWy2x^wy{NxA1OJo*m*+v?^F=9 z$fN$V)RLK!zYzG4cg#Po$)I;;;Qbl+L%^N>@k9pw&%lcUvN`nUV)?DE!c_kjswG<% z(H<)@@J|4D#;x6vL4OFibNrskpu4dJIOF6zz{l(}T@(O!#^E&pH)%E=A`YDTeG0fU z?$2>C;%jL^AV8KNol@S0$Z#!ZAcg**A5jKDe}!e$uL?Fce$=XNT3OXtbNxz&&}EaQ zf}AF-F+OOC(Imbe1m)o)|Ev-jS~8)$EWJ6)D6|PhD^<(XZI6lgk&!*>&L}t2JV^$zVmR)s94atx#;Uz-werXV?z6`pOnnpnKVvWDuu% zJw@P$9o-_-3vFwxs|%4-`t?>~GU_vp)v~HrRn`Tq;L7E6X{ot>UQv7fvdUWP`s(V2 zV58MoxvVxwj?Lv|zP7M!^|V-ad#rn-uX!^{5j2{T(b^la)P<<9mVb0*WnE1b28M(8 z*9O&`ahTfJrKpLcNsC5fFj^`??M&j7CJZwiAIOyvUz;@?mSJFlfQ-b^F*i^zO_Ypo zR8hHEd@wVF@@yhKCk}6OMs8~D5GTaRlr{90p^|42UU{nEV&xR$0^HuQcr>-pQcvv~X+{Jnsw#%(9Z0 z-Apgcj!4__Zm8o_$ND^R)V*U6%vUa{h|04Hv33rc39f|#X&pU%tUBW$mBF(t_NR#b zbpBrirgho1@!`)-MNbu`t(@zOqrbJ|I>qx63yZYXL(@6X7Buu SAI2s&151^$CyMNqn*1LU9(4Nv diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/obj.target/bufferutil/src/bufferutil.o b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/obj.target/bufferutil/src/bufferutil.o deleted file mode 100644 index c37a49ff84692bd858df18df49ee254e78c0a37a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13856 zcmcgyeQ;dWb-(+8y~PGWF~k7})~-TrYOl5WvSfrKSy~yz9|%h_U?bKm>DgYq+7-KR zWgBd;S|53glqG&S_7HEc%@q+?^DeQ382O%m3c4LwQQN+)B9?zoj0=}cvl_R3Yk4Z%8^ zxLWL??4CVVTEYrFer=P3Z|9de9hmmZKFUr_x65J5PfxcyaTg?o$l^k~e{ziDm5*GM zniEq`j)$ivKDGmT5c8Y-`NOpVgo-hxhfbUh*ZTD^7NDXdY1~S9xRaam=h0L)D+~nk zUhN`ABX_QiVLt0;P8D-&6Rc=!=tqk-y4(q1G}M!cjE>odR<2SZWz9A#mhQ4*_CC~( z#}Zj9c+WjSjKG==s+CwSxwN$>6LmD^w!+wC?vtYi6vNyDR%}0NWLr5>+2m*}vtKxW ztn^+>Y?K2sV8;_86p}gM3{e&}q2Xas;y7Np_m`skgx~@hN*F1e#?>pi%VB5aAXLnOxF?=}wtoxpPZ)4ZbF8 z*iIDldvzfjC=4#1Jn}YHDJh@$7!Y;}AnAf=T~PDv6pZgJbOt7-Y9@}NDN=crPGyKb zH}Nw&Q1BrGFZcR2NbcNfIoD4!N>gY=j}JOjI)o@~1}iO2+IOO}F!bJ6O!e_{^;KHk z)HzVD^98NL{*~eh@Z((kbWn~@Wrt*ko?Mrk^-N6VI|KFtCq!Iq=_|BFc~tY9T8LsX zqk<|;;!s5s-K}F_ozSD}T4!ImPO6g5-f|sqDl>V9{y5JQ4p!uC-4kb6PBp_7cssfE zVt(rdt_+39g`!IKA|E2^0dgFn=!UlDb5CHNM5by^-Q+;zX8rld`9kD;_+t$)9hspA z2vg)-&GD1CogBwXcfN4sLf*zQ26KAY3lV9{tQnLwY6YeB*8rfGE71J33>GEdb|ksi zJ+i7WFy$MVkt-!0nZT5_o+C4NXV2A4Jb`&__OfW%jLz0T-edBSfO-gFb)0+&=EP*= zBKnz+TyRWEly_hGUp%Q_Zmg3o7>aghXX{$Isx2y5VUX;<& z5A!23Hfr860&6%jig!k4rsmZD03L(OkzrtU<2iwS4|>JGw$xrbNLOj?BFJ zfp_9^&G8pe`|5vq^Jga)FGK*GcockLZ|u)! zo4rAcFmO6OIhGwXS{%!Bg)Fz1p4W?$XnC3ZLikNN+V*F4J}*AquqeOytGTnD)=#n@ zzWOV#=Pl1!40Y}uU+$9EzCU-#XK&11^4RyA&Q~1h!9dl^r^YVU3S)}q&gOa%Pw`knc(?U1XequN$b+CNAMO>UdB`L zks#kN)~|Oqs}JA}WBq#mT{+&ee*L}jJ)@1cj(h|6Bc+nDV|IKvIJ_^GzDwaayVv#W zyJB|Cjj@BfX%j-V&%__MqP7cQilf=oCcEE$745NwOpb7_W4^2q1(?Lq9;q^HJ=03 zJloXSxjwjZU@KWUwpu`{2TvhJ?+;{!>^5tq|IML zjrQC&>5o8P`zy#~{~=>}gMYLg_>(HS6H|AQMbzJ-^#6oZ>np!}ogTxn9;ts==}YR? zUux=iN&Rmr{RVFZ{9~qm=OV`Q=SqLRcv8<#Je0@yNBhCJM~mH)XXaib*R>Z+TsTXUsy zFk1U8d#h#dOO5m}vQ1l3!?A>nX}GyNn;f>|sbs%3I+lpp7UCO;jQ2--HxKuAGwjXI ztwe#p5HuN5vNAI|yw`(4~ zXAC{|y;?t>HT1gX(fds+x=_aJgreGR z5C9!o2~^vC8uzB%y08!{QAfMn=V-ex;GVd8+=d`{61*;|d*ZK9Vd6aqyxpiH-mSPa z-Vbpv@l?ZiAdveF)U#;+UctSI_cHJh8i}_IRO9^;_a~9d4#@pe-6AOiq`#tEeXuRz%ymx^2 zN01Y51ul)py*Bvkt#aW7no4-94ZO`RycysfgIpKw-zFDcJMe-~qJR8`s{Q++ z!UK_I_w|_P41g*@MSr68l;TPl;=I)bX(7w&kehMYZP>*WDBArm7hZc6y#I9J9X0Tf z5=Fd)SfA*2o%BM82Z6`6SQpB8-JtYz{SoMyMR&bc>8b9DqtJU^Gibp0u>_%K_V*0@ zJBoV7SwD{$n;UUKwOCf(Bt(-@q3x0yX2cX8WV^8@aIe8<0qxRd+BBMrAST664M#K{ z)XIuk?-w6lHibU<#4FYK%643|2d9nVD|-S`esdAQd2ZDi+LV9B#V-}yE9{0-94k+8 z^c*!GR&xEU|7*}Q(C3_;tIw6XRD9xg!F6~F*H&EAZ$VpPX}mG;N5ONvD1RAz zzajqsd^>oKeDh@kWA4eI&b4%6}O`yt2mN&5Wg7&msrJC-5*e zim$i}&~iM?jN+3!s8WTmY$g)_+L91=zTz(+oNAxI;%*e5z+!3?pSWIpRdrz&^(&Cy ze{Xb&^YEgJ{};t`ZCs9czvq(I7$IQ$E*Jlp;(2zo0{Q!0m)viJjP09U{G%@ZX%~N5 z@f{L>sd&L9e@pR?O8GMJf#RM1gvCN*h-m+A7r$Tey8Us*b5FBE1jV1Z^k)>$J<1CF zyX2DJh_z1_+Plle$6WkD7ypcl|FMgoaq<7^;y+Y8_dF{we{WSO$UVyn>_j?@l%#)y zig)_IQatA3Clt>;#R{xKUw5_tMwxuI_`c$gN&S$xQ$J|I)7}Xe|7{olhKs*LO<}$Z z{VrDPT4PER?|v75%*Fpm@k^k4BcBhY--7U$A<>-`&X5{;nlI0V%=3t5=WvQg7U9-t zw0C=?zyG0V_rSK!{+|1`MWdCmoO7(IE#@9r@LVP|7E9Zq=E{g&;mCMZyb8Vfl*e6F zp&eJ7onyXc=Uc;^AQjKeoG!GMx^T4(ug-oWKbBm{dbn>R^}%1&HWkLU z2?uJf!_uw_byW^f(UNDCVds#nZ#Xq(bs`ynm^|<({`T)EJKJ*9RoaGI=Kk`{aR!j} zJ6ggmn-Zy^SOVXbaPn%Ut>my3>FwRt7j22FpUmkAz#gEHV(Xi5;MbdyN$mi$)M764(-7#NAQq>F%JPPFn=G4&a?l#-O=IGv?YNbR9CUt6 z+L2Dj4#^d%geU9tGAXM|bEW}c5zbg+9yPM^$`;hRJ1$18(c!T}3Zt<@5phj&j zemIOI&|gW4fH*Sddo@S_nnltJ7+zVcY&vTGb!Y~px$;N9s#91NeX$E6!OPGz3tAo3lAFK zMn0m>J75>LvcDKA;YBd^kS-G97E;8klN3t3NYUQ}DD503g`FHJ?3|>$9cRm+l)pd< z`QMU4{yk7{yAb~fO8GyLLS8nmkjr@VIA<)3Kl{n}Bc)`!jB3Yz5%(#|+lBZNC~==7 z1@6~LA^!_dZ@cmb@*jYw{46Qt)1cmV)jtf%P2|yUq=@jsIOFZz;+z3_acFda{5B!} zob)~+UQ~L-qu!gO7?htY{sU69yN3CBKk|=sJMw{a1LhAY;yOf%N%WMWUna#kJg2Dk ztB!c^3r(dxxFYS1s`@8XeSs8qzoPhWDE>oI*k3?gfZRd~`;**}KCTU(#PHJ!v0$9^#_ijilgrlESYPDg2UgfM2hWhhINc zl;>~c7kV9fhoWmq;cpG>e40GJTK!S_5Bz;sr9SF`L^h}SIMzhN%^k1@*r^*sC5DF<~DiweVX)oAzmg$r)O0?f9Fa$ s&n&$+qaEpIa0W`c6yHfnF)806#o`oToNvRqI_Wa3o1~wEJ}IvM1Ed0EJOBUy diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/obj.target/validation.node b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/obj.target/validation.node deleted file mode 100755 index e762158dde3d1d05c624026e6955fb4299e95eda..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18448 zcmeHPe{@_`oxhVz+kyU=QVLYSWhepK(oQo?+9sv8Nz+LQv?Vr43u1jvl1Vd=Wa7-5 zH1+VKIQ_vm1|y>Dk+afWJgci`kKILkP}$>PD->B3Q52Qc$`45-LJNppmgDT_bAL?U zyd-Vo(LZ)iZ_b_X``+*Oe((2w@Auw!-+k|!yTTjmJsyuRsZ^8-V#m)Hq7twsq$rgl zAf|~0;!^P*NjLn2Z(XJG6e6>Qq#p|kacqss8zHa}d8($D0FHn@0y?v-py^(q%yWU8 zTn3!k&>CO1+sjd4vJD!up}!w=pkor-hk9ZQ=uZ6tXp5Qk0aW{drN|pLw}`LKtiSc( zr+-*^|A9sK{b1*R+Tq1(?m7>&1)6snV2$VUsRyTCJpJR-Ja^x-v~dw>3y~KiFF{_4 zT#n47O)BlX9QX?4l_VflDIit@X1b0%@cW;Dv28==kq5N+0%)c3I?*=oa&UB#wvvOU3W(oAqv%Au!d0L4GbwObznA7;ZkQU4(qJ>bHdT>Z`99P{jIggI?~S{}k;XK%w54}$T=Fs?%uD=-kjh6`Vl)+)YLCAj&`cVD>&<7#kv?nZUM|Zr(O4^ZxZCS#K z^~7vpbpQyfp?QWTq)z%-OfJj&DqhP$g&)T9T z)OAIY$!JnoAJ`l!-wJwr#E!*#DmF)VhPT|Xd0Agob!}otsyo_aC&T1INhow(q^G?r z+SC^Bjn;+2eJJnQc`JUKw>pJr_7yj_-WqMQLsbnuP#HSZ$D&>Bb@5b>Evr)GvaMC2 zstsN7R;l5ZXa~C3(-sXkHg0aRs$#mLmSptM=(6QaQM)lNnHqYE8VSc5sodtuo_KpS zRIU`+mWcF*mTikhZmWxQb+ty?ZVSs^l{ZEcNt(6CZrI!uvX;Xfsc1MHRx*^9RhuHW zMOk+O)f)R6>-(T{s94&lu%_jf(Vv}OzA2Kpt)Ztq+8f0WEON>o7g@e)OJpa8KY1D} z71dcUN6X@v!?!vju`WGGp%wM1o;D7BbF{m+D`H2b3pCcFFDuk=!ziQOfNwNe4%Y}b zRai6{nW~#&J9;8^Dna8-C_l8Kp$9IGQ8q0WydhMnM#>PDg)qWJ1FO6T^P$*nL!pMG zbmErg`l^ZjcT8VHp$$>n7@(lWiY7Y|>)BC_xzMz$yEWbwZoHvQwh3RTGRjpzw{WqQ zbVc;un51%j#EwYZ3axBRVBRF`U9~pkx2EiReQJQ%|8Dsps0#m8bANX5! zT~{=cIEDX?J6qN-lQNpOj-5zGb^7wkhNPOpo6*MlXvFS3wKua)#rjyX7e1^io`Qc& z*OV)dGq;zw^dyRV9a?5IJ5A4>tC#L{(Xu#Uo9oM^h1$E+T2UlNkwO)*q}9g-)=JqO zRkt>_6->QiU8(~M9w%zj%n7+9jZQqrYQ$B;tt)XBkZbO+%H0bisCjK!HvE(nN;_AVPXAuhz#JelV=itCE^#@`*8nOj-0$Kb`GDkru$Uc>{x6jb-4&Q6D5C3^Aooh z-UmvFxLniU!5)y8=VBv8c%FvSu(u<=MZ?1y_FkmQpVDv&_FUw<2YXGz&uRFehCkNu zw;B#<_&oNOgnp4;13d}bHEhG4yoCE+4WGvN z5#L9-fDd7hOt>HRAp8XQJk>&ciu~}bUugIc;e0%Y62irQ3h233h*ycjrK{mDgfj@Q z7Gj%*O9=6B&`;>ca}D7YLS!{evY)`8qCS9IsR!VT8a_{b!TScF2QzUh`9YgUcqPsU z2=TxeW_`dY`at-shAr$L@N2>6!P&_m>_u45dboao_CtO@am=i*5(n%cjxlVY9)M30 zM_$Bs0I#Qfz;9`|itPaRgYF4IFO(BLsNrRx6TgJ@rwj40hS#z_@ULok4dnoDCOv@p z%W}Y%G;Ajwc#L}DdFmv~;b8qN2Yi$ebNttYu-OP9d|?{<0r)QQQXwuPjyA3$#KN+Y z5M$Xz2w%)=_#h$X{=X4o5&9k>o~3?4=)w9yKZ8skbnz^}_!F+i+C;brXFVFuC0vDP zP7MQuEAR+OxEy+}#n|GR`#2%iueS(ipnrt3pf}-F;KzLNEJHhh)4)HQ5amtj5#P{$ zA;jH>ci`+On;yyM^Lumllp#2+NFVXtau{$lNgF& z0`lF5pST7Jjm#ZL^K5J2(>&=~_;mW@)SXk)N9NwL{ctw@7Wkn1@yy(^{L`-v57<`; zS^rD2{(e)RHBJ4;PL^aIdu;eJ&(R;BOc_DhlN9tM1VK*<`|+zU4}2Zg5=!1SDQ~5c zxBJ_aCsJkEG`oTJXJymy1d;KU4gKNI`TS57iXTst%cC@5fUGY5i0lWlnvMp05% zD>x8+>y{5$+Ye{n9vu&9PpIR|ZlAF?=ihSz{r4X#y(j!eCOqOlv|C(3{Al$i-#y_s z`+}KYho0#e9H{lAPnHa~6)?OwgMZ%)TxD91U) zCI=3IOAOpuTA=TIA^p0?e`seubA0u8c0RlNjyL|`-_yp{_gyJpOgS+o|bBcfe4WQ-A26*44yQNQhQfdF8@Eg>m*1yk& zJzo7j^%+Q@&AI1$o__4u)Pb$IuB`AJ=k)~TU^w4%{2K27SBUrJ^RtD2|5cE-L_9|v zYmk56g}~F_^;Ea`{QLf$y{tUne`u=Pf-v8J_q^(`&%gga;NHW>=;J>N<%UzJuIC%D zB(TAW%Cq4SGz4{rE5X(=2rC>*&4E!K^zY}K8P4Kopbuu+lk;cpWXaq38Kl|#`yVGB z)A)n_eTRtOOdO;12rMYnQ1uDuaSrt`^KJFO_UDX~V-@4vl8*I6jht4QC!VNL^Gxny zvf&xo8t*`_7apDo|5S4B&E44-%I$sI_MuQYjkE(;dp z&5lbc9_plX-onJmw)iq7Mn!mY`p9Z_=DS|50W$*d3kuzUR@j$ zbZSq|UI&6fsUbL|hJ+3hE>V%jQg*MC22<1PAl6r6_;et+)O&p6rpirH<$?&R57%=2->Q*2MJR`-F^7-df`)hau5=gRbu zXKyZ3=d-6O6J&*)4+5U+)oQ5T%$)gR;QwW;gjVo`T9@pT3)8i5o0vBP$Kx z!nIp&yG9oPuy8yo%N#b{WLx(SWmoVj{`_{PPhY_XX6Asa$o;7Y>4kZ z{7KYHn~nU^&UklpDc+FaLSXS+ZvALHB}%fi(dhv55LuB54OA`i)GWCmL-}2JCpCH5!NnTIDgKIMenOyKGv- zMvu*fJV2M{THJ8$EOjwzWCV%V->(uA7H<#>nN!0pvkEBQ^q> z)EAGn2RH(&R;d$Gz7SfqioXl`s#dL1M}Vt&spxAKnyM1wrG*`93ncL>&9b#1b%MKU zl{)@(i-AQ`(Sj6RzpXQpSmdhCgV$46h6cL+MBQ+_*OH<}-)hM&DP0x^Sbb4($8<0I zVhKAH>5?4d*h!wQV?ZWMr>T!O5~r#ygsDGvi0&L6FD+s>X2tHnEaao5y92&=kUut| zV*f`7_;%-%sl=5^b@C!jL7HqgJ(rYT+lxv#QWJx(=kuQc%mG&7#t}G?&mRNc`$j(B zSOPkhyMw@Y{}E3mpg#@B?|^D>+v_Jk?)qN_JPyeB+aJbbK8|?BF~9|YAI7e65Reb= zOrDQ!5uV$9o=awUz4x#_%5ZEX-hC~fmkZu3U;V5Z*ZZg2-hQ$6;%gTzE1SO<^cv*n z-o%4Hps1bY+gq}3=9K#VrTe_;DJ9=H_i*jwwNKQ34?^pv%kOpAzbZWH^BVv+f9WdE zC_l&nBk2g{aB~?tH9q2n?L2`hunBUY(!s$r&Etk@XyBBoJtS!4TA3` z@O{K3x5O%lll|fY+riWD;fPHf1K&K@o8M#<`fvKR-O;ZN(@X!+D9@lMcj93ek<##Sl* z8kBqoutKr?#lQ0VdtLiyX!v)?b8D3DEdE)5zj!|$z&EjVb*lmkT3YcfW-3q_tO_n$ z5~@x~G_+6^2oX%~>b4`TfObN`PIJ{0x1+%wJ*i-8D%RD$B-Sn@))`55ieUS$9@JFO zPAEzrzp;$>6d@L9iD(!3)kSZYErRl^*PtEk$F=5f{R?Wk!m zRl|z#1143&T;JLTHVBV&$J)?v90KtZl&vU<_zXt`+v45)%vIXvOn&G?a4|mK6vZ`| zy7VWeATqYHa-8W~%#WZ<`Vb)bn5&TKUzA6mV}2S;q~TIR`dSS#>ynQ?%1qxhiM&kL zAshdqZ!v!qWu{%$XKq2JKk}MB$=rx*w#za?rgr3WkXc6GW~Of&dE}!S-N=TIbAj2+ z8O|fa$3uDQ$~ne4%6tW`O(Gu?pGgc~4m`}|lA?Yno4mIp8@}VfpcEr$^x9*3ReWqVTE%<)m&9LS1cjt zq{3-YHTM+GUZ^>yaL!mYmlUo##5tpI-eDoHfGb5f512}&Co5l9I6YR~gB4E8sc+B} z&QVc*s&L*xl|L#RlbSgEj;YjmREegM5*=7dY1wCJ$!GH-K}`#YB0J0q45Jt0u@Pq>={TT;N`iKK3y&Ox1Gu~;vT0%fk z>s&wai$~+3KINjn?84`$C8too!G(Vi_`Di*Z(#gX5AYm}JA@kZG5+_v_#blM(tZw{ z`v1U%|IUS2?cyH+?u_S}qL$P`dkbCoIv1V* z?zI0t7yVnn%WI@K%)X1ncU<%l7w%O{c%l6Y;*Rm#=%U{Z+!-&o5BO;RFBAj7o$+#C z0Pc*>djYsf^KtQK;LdorC60R{$Lo6F-1{*x{?GANkMH=b4~!GzQOUP;V`3ysd>8_4 zLe-YlxFy`&e6v;GvbnCg;l|Ajr5jI{ijkSH#@Lt_Mur4?5uAr_{Ku8ZFp&x6jnkV+ zMx#wev*EOqPoZNQL(AhG9m%MjtWU(db)nW?hpep7 z;U0{>7&lmD!e)!*sPL%CN@+{jNgMCHgK!e-`noOF#)hV5jPhuFq-A$oZH$mi;?1%O znRFCcR(ssqA%hOBb~~O(T9H)0z++%+74s%~o^mx{YCS^jED2 z?ugn}Z<}Rzrh0A*w)UeG!Jh>g?a8>M-nt8G{mq+eH#O8@1Z7anUl`>wsTjP`FrkV` zMi-5ZI~+e2ZxXRR<3?Id7`rw$RLd28J8rNn1HEc$WO$Aa#L@A&5 zc{fxayi6QA@35`;R;mzLIjQhkrw^FOR~Wshqo)rzXAGmh?TlGWP8IL%yhoWBTjd>R z9J)K!j4EiEW~3!1@!tj1|69-@n&bRWgE37_a{q>VxAXrojIQhq^K{L}GmB`SC{kVa GpR3P>x3{@mE}?@F(aHiEG>QM=xd@*W~w|zw)c; z>FIpWrR<6|*`BkK%RaE?LhG8v)Cct`>Lr!(T;}}5HE-5jj%o zjp{iIr&y?s7R?(UKKFcN-&@%m`LlF!(VsBKm)o~^s^FjeIoj_(?Ku(tARE5sKRqto zjX;+{wA}bKz^K2Kf|-$I-wQ^+85v7OM}k8rH-sW_W8;>NglVJ_ z(Rf?Th!3Xdb-={giJ-vSTZ42S$z-*cBI3@Bj(|? z>r}5WXQvTOwHi@#2)U!tc*Y1k@k9WfxN(arC00o;WelbxmWHF04Su%~JqR4BD?1m6 z==${2a!^1L49by$?AU-bF4*5sP{pAk4Ct?kYb&`pb$X}XGnY&>`CQo^-}kO^)u$uI zF>2|EXP^wK9r1Cn(h&-Qss*JQDpy@!R7C>yVRu=P+vm%*crSR^X;TIBDcxz41#>F| znq|e%C{}C}A&G(<4AP7XEz+`y^DCa)_m*WC3l`Vk4Y>^0-~7=_*wv(b>INXpBtTL* zQNPgtN&%H0$hG*eMo*2SD2CoTJ@g=YaO!>2m-Ar6Om})U$i(>#az>wI`!AyqEk0yX z?W#Vovc^2tO@O~r_}Qy=_0e+mCarGQ87tT6)jH+=yd>C$tT;Q|k#%87_t#hGL4j)$#FC)H-*o259 zXfcc?V*>&1HVqBd%CZ}~O+y2J*N)aTG(08uoJJ-s`4*liOCfDy?dcDsV=o#JY&Q~U ztK4Q98nzpW16T|lFuhzEizupm|4=lw-ch_YYDVWT3^P>uxtf7Rv?Usk_eJ{;N~lgF zm5!xNY>l!>mMt3sEWWU6l+@0nPZb$H_;6+$~pwBDYb4M5FGZ*!GpWE%5 zde8rI8GDth5LHP1T1ouC(K%-Zk9Wq&o5zzs@}9Y`3U)oYbZR_M?UNmX?OV z+MYg~mNS8xU|q0kW2inO+0Z&GgMjKfE?h6}60RdY*ZqsV-V^A=4Uj#cYP>?)e7A4P zy>-cgw&R{--iZb7H}86@`R(Ql&3}smEsLZ+ZD(jld8fXo!Bx_SIDmKrk)c`sDEywg zh#2NQVkP41lp*lYRm4Pc4dPkmA-upJZC~qz$GsP}5vAF(>nD^W{D?nVPq$-_tsPq} z{S~wy;qUpQ^?{o#!bVjpyoh$RD*gHFpk7?*ea3<7juhc!yI#2sy+&Z1gKu`72e=B~oYki{<(vm_9sgM*Bd`ltqVhDrLljrg6v=L8fpx zkBVSlIt?~Sh9yG58cRyOU}VqEP$l*vb#$-ZX^e$;ZQEHjT36q!ZgS~xdGSzr@fz+A zp~}*hP>r1>JZe+QB;v7yM*OfX3)Rjj*IHFpYBrTn74If`TMg69P-SUj?bz8Biqy)T zH5?9i+HIH(tyXTK&Pwg>xDAt9E9V6$O05nkcY(dCP^hDH@0+y?(4ndqBYV1gXZnxb zRIX#k7s3AIFfZl;*M8Fow(soOh!afzL93K86d6oKhYb-tkV^_U5QB(b6`gvVH(IZC9zDvmUSJ+Qu6bIob{@TMo8Gp0^!D2HR?VX~VAFeg9=*6t z@6+?>nKr#A=g~W2)8kvhTz;Ok>GA%o_4NDgLgX==L`>Sw=l955A^7flr%FqL4e1mT z?BB(R#G~JN6y@?&gn&TrX~>p(q>mul@lFAc`wQ{zM$~u}NE27%t)Rdb)RKvJYpY(C zXQ1BKtfc&9G3wGsqzk!5BfJa26)P!!b$eUD+3mXs`*`mr{xU@3(XKQi@pQds76@?; zybhEx9#d4;I}V38Yb8)!@8^-W*W0vFh_%QgKHuVXy>B2*T-|TykdS*a@)%U}#GfE- z#~T7(0C~jY%~<384bl=%6}%2Sxql*`LEHCDr0sYofLDn;;_(}S#`{;K?Rfj|Q2Rad z88qHMBW=e!13c|#jya820WdpW6Pz#40|Z0Rc#lKLj#r7rXB=|c$8Q!Iuh)Th4+_oJ z-dzs7Q^3>h<=oMDrUP#rc%Ok>2W{Vo1Mf2M>YzmXRv~J;4^+}Jy39Rt}%VXfj0!>0>~%cIz(;XCxHW1q47rM!21OB?BnHx4exOq z-e!eIUoe~i9{r&M>tf{l2B{8Tg`PcVS+}-N2~R<9E%J0=I~Y2VXSeT9VZeUmv%M9F zy1h%0)@vk^;u10p8=kJ0)RrywKY$F(^=c3dMTvJ0DC@N2?O%e+Otg1odHB^y|?!O<@TM1{Jr8i=#IlEYP!mLjPj3* zJn|XVBf7zV6|?|-uDLVyxx$r#2fHHIugi!#5NGN?DC&UKgvhZzQ_dBn6g+YTu=5XF zcNBIQFlLs2L>xmtKWwd(Do%eqCcX^We#jb>{NKR8j`U{5gA{{D&Y&U-|8NGBf=7-J zJ6|Ez*#{F!Y%SyU?qrqmh>fMfNR@wyCSO(WPSIG zj6;6j!QXK3>uoL~-c|?Ssd&B#EW>>4ame3v@IQ9&%aqHx*008>Znkv+>x((~V-Eg@ z4*rv>%bI0-@5P4_Bvc^YfZ|_3dNocMM-^}Rcb$0Eq5nMx|6h*s%hZtI*}O9uCzmj|k!Z>cZkipj zH54A56K|H*e8lI6j{>dVBIYc!y{ghoMPu<;;=tC!rjc$-rsNmm$e!(?+T`G1+Az~? zspPQARMu~@K8S3xzK6`{h~itxoYj`&)bPW|{{m%}zNy8tiR1C9b(Xw29;8r`Z$BYx zP<8buM~oJ9CJ+;2FW|Skx9si1Qdh$+R5$a#7%XD|S=Cz?s%wuY`!Kd&H1LvTq>Mzr z5$^2V*%hgasegaa1DGv9A;nhJb{S@8QYv*M$|?!R@EQf>8IN8caY(5OVP)Np=s|<8 zVRM+)IojDa3Y#78W2NV@uG&br1Q)8^5ltQJNDLSw27VIe9I&cHndj?vMaNp=$@DF} zR91#lPedZoblOOnkwFY>5lh5O4Zo=^lj!HaJ#-txBk`zd$Z^owh6a@ul2TjnV%Zh3 zJy?djsv~?0#A*|%?}{BrM9oafz;ZJuerQui0?%RSYF%S-NQ7#vyD^6A zTjKb?m3am+JvswLKFZGZ1X{!nZSF{0^SJoGG4l^;&iv}uSb78l*(x}X{!F8+)n}%) zdSO>1kF`{3%Wlzf`&d$qE*oFg9GcBTe07fO8HihpP8p6R3RTC_5xIXyGUj023!U7* zE#uXe!P%PDb7Jl#pT)Le09r$$t~;r=cDdTw1p2>+O2gSwtlo^V&SmG2F`!0b%t(h1 zS^s9%oJvIx%RNWpm6qC?>f0)&wmn_Awk;aRDy7-_9@IM+OBe&iEHziG)uuGP>cfZn zjS;R#_1%X@jBqNIOwBpVR8NO$x`$H9v0_PwesKf)i2QqO(EXO&`jfa9&it@ePg^NDV+ioyjq)*`7PP#>iNy?wZ_hcpiGHH{L z|2OEu+3_rS6z09xy;X>-q)mt}l!N>ZP|DYmw%}cXv|fl$DVhd#;o&iWdl2bo6@61t z9#4tGH)YqStal{xJe#r|e6Da;TJImO5dPngJRU=yA;lv`k`#{vp9OW{1Hduzn}ql+ zQe1k!LRu%pUy{PEi=edQ5-IK`ymyiQgmPS(S1CEFlKChq?SsptoG$|Iu#h)L;(S8s z$#Ss!QKiRs3s<}Kj_!U+y*Hp7{-nL#q#Z&Gk}eYBW29&=Tqvl|cMRGa2W34+NMYv$ zDe5^vIqYSBQT~RKe_hGHq2%9D@^_T{2TK0FlFRmN$D0N7;lFLnhyVJ?12;{IdS4_( zy`Q5T^&VI9FDd!&EBPNOxwHr6zoq2ol>CB{%l2)?|Kc+LBlzid^@mvx{5nM1dHeM^ z%b~b%VXX36ObQoBD#t5$j#K9Ienh$)l>NAYv`dJcr0DFuq&-%Dx_gBfQ#}3X-Yvuz zNp}hPe(%QM{%i6Wd~cIt9Q+gMvqJnQDe&*&yh6YDLEU>WZb{+PT2fTjLAnp~ofPGh zq$vNJq|f6W1C;&y$E3h{gA|QBMLGKSjFMke@^_T{`${hT@EdC0KCS%Fs{DXKB;{zl z^wXzj$^&f2Lfn-};kR+pJ7Etg`mI2U>*f_wboxrxyA=0TQaG9K>TWpwcS-S~q(BNB LJ}J5H6XJgWo;&96 diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/validation.node b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/build/Release/validation.node deleted file mode 100755 index e762158dde3d1d05c624026e6955fb4299e95eda..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18448 zcmeHPe{@_`oxhVz+kyU=QVLYSWhepK(oQo?+9sv8Nz+LQv?Vr43u1jvl1Vd=Wa7-5 zH1+VKIQ_vm1|y>Dk+afWJgci`kKILkP}$>PD->B3Q52Qc$`45-LJNppmgDT_bAL?U zyd-Vo(LZ)iZ_b_X``+*Oe((2w@Auw!-+k|!yTTjmJsyuRsZ^8-V#m)Hq7twsq$rgl zAf|~0;!^P*NjLn2Z(XJG6e6>Qq#p|kacqss8zHa}d8($D0FHn@0y?v-py^(q%yWU8 zTn3!k&>CO1+sjd4vJD!up}!w=pkor-hk9ZQ=uZ6tXp5Qk0aW{drN|pLw}`LKtiSc( zr+-*^|A9sK{b1*R+Tq1(?m7>&1)6snV2$VUsRyTCJpJR-Ja^x-v~dw>3y~KiFF{_4 zT#n47O)BlX9QX?4l_VflDIit@X1b0%@cW;Dv28==kq5N+0%)c3I?*=oa&UB#wvvOU3W(oAqv%Au!d0L4GbwObznA7;ZkQU4(qJ>bHdT>Z`99P{jIggI?~S{}k;XK%w54}$T=Fs?%uD=-kjh6`Vl)+)YLCAj&`cVD>&<7#kv?nZUM|Zr(O4^ZxZCS#K z^~7vpbpQyfp?QWTq)z%-OfJj&DqhP$g&)T9T z)OAIY$!JnoAJ`l!-wJwr#E!*#DmF)VhPT|Xd0Agob!}otsyo_aC&T1INhow(q^G?r z+SC^Bjn;+2eJJnQc`JUKw>pJr_7yj_-WqMQLsbnuP#HSZ$D&>Bb@5b>Evr)GvaMC2 zstsN7R;l5ZXa~C3(-sXkHg0aRs$#mLmSptM=(6QaQM)lNnHqYE8VSc5sodtuo_KpS zRIU`+mWcF*mTikhZmWxQb+ty?ZVSs^l{ZEcNt(6CZrI!uvX;Xfsc1MHRx*^9RhuHW zMOk+O)f)R6>-(T{s94&lu%_jf(Vv}OzA2Kpt)Ztq+8f0WEON>o7g@e)OJpa8KY1D} z71dcUN6X@v!?!vju`WGGp%wM1o;D7BbF{m+D`H2b3pCcFFDuk=!ziQOfNwNe4%Y}b zRai6{nW~#&J9;8^Dna8-C_l8Kp$9IGQ8q0WydhMnM#>PDg)qWJ1FO6T^P$*nL!pMG zbmErg`l^ZjcT8VHp$$>n7@(lWiY7Y|>)BC_xzMz$yEWbwZoHvQwh3RTGRjpzw{WqQ zbVc;un51%j#EwYZ3axBRVBRF`U9~pkx2EiReQJQ%|8Dsps0#m8bANX5! zT~{=cIEDX?J6qN-lQNpOj-5zGb^7wkhNPOpo6*MlXvFS3wKua)#rjyX7e1^io`Qc& z*OV)dGq;zw^dyRV9a?5IJ5A4>tC#L{(Xu#Uo9oM^h1$E+T2UlNkwO)*q}9g-)=JqO zRkt>_6->QiU8(~M9w%zj%n7+9jZQqrYQ$B;tt)XBkZbO+%H0bisCjK!HvE(nN;_AVPXAuhz#JelV=itCE^#@`*8nOj-0$Kb`GDkru$Uc>{x6jb-4&Q6D5C3^Aooh z-UmvFxLniU!5)y8=VBv8c%FvSu(u<=MZ?1y_FkmQpVDv&_FUw<2YXGz&uRFehCkNu zw;B#<_&oNOgnp4;13d}bHEhG4yoCE+4WGvN z5#L9-fDd7hOt>HRAp8XQJk>&ciu~}bUugIc;e0%Y62irQ3h233h*ycjrK{mDgfj@Q z7Gj%*O9=6B&`;>ca}D7YLS!{evY)`8qCS9IsR!VT8a_{b!TScF2QzUh`9YgUcqPsU z2=TxeW_`dY`at-shAr$L@N2>6!P&_m>_u45dboao_CtO@am=i*5(n%cjxlVY9)M30 zM_$Bs0I#Qfz;9`|itPaRgYF4IFO(BLsNrRx6TgJ@rwj40hS#z_@ULok4dnoDCOv@p z%W}Y%G;Ajwc#L}DdFmv~;b8qN2Yi$ebNttYu-OP9d|?{<0r)QQQXwuPjyA3$#KN+Y z5M$Xz2w%)=_#h$X{=X4o5&9k>o~3?4=)w9yKZ8skbnz^}_!F+i+C;brXFVFuC0vDP zP7MQuEAR+OxEy+}#n|GR`#2%iueS(ipnrt3pf}-F;KzLNEJHhh)4)HQ5amtj5#P{$ zA;jH>ci`+On;yyM^Lumllp#2+NFVXtau{$lNgF& z0`lF5pST7Jjm#ZL^K5J2(>&=~_;mW@)SXk)N9NwL{ctw@7Wkn1@yy(^{L`-v57<`; zS^rD2{(e)RHBJ4;PL^aIdu;eJ&(R;BOc_DhlN9tM1VK*<`|+zU4}2Zg5=!1SDQ~5c zxBJ_aCsJkEG`oTJXJymy1d;KU4gKNI`TS57iXTst%cC@5fUGY5i0lWlnvMp05% zD>x8+>y{5$+Ye{n9vu&9PpIR|ZlAF?=ihSz{r4X#y(j!eCOqOlv|C(3{Al$i-#y_s z`+}KYho0#e9H{lAPnHa~6)?OwgMZ%)TxD91U) zCI=3IOAOpuTA=TIA^p0?e`seubA0u8c0RlNjyL|`-_yp{_gyJpOgS+o|bBcfe4WQ-A26*44yQNQhQfdF8@Eg>m*1yk& zJzo7j^%+Q@&AI1$o__4u)Pb$IuB`AJ=k)~TU^w4%{2K27SBUrJ^RtD2|5cE-L_9|v zYmk56g}~F_^;Ea`{QLf$y{tUne`u=Pf-v8J_q^(`&%gga;NHW>=;J>N<%UzJuIC%D zB(TAW%Cq4SGz4{rE5X(=2rC>*&4E!K^zY}K8P4Kopbuu+lk;cpWXaq38Kl|#`yVGB z)A)n_eTRtOOdO;12rMYnQ1uDuaSrt`^KJFO_UDX~V-@4vl8*I6jht4QC!VNL^Gxny zvf&xo8t*`_7apDo|5S4B&E44-%I$sI_MuQYjkE(;dp z&5lbc9_plX-onJmw)iq7Mn!mY`p9Z_=DS|50W$*d3kuzUR@j$ zbZSq|UI&6fsUbL|hJ+3hE>V%jQg*MC22<1PAl6r6_;et+)O&p6rpirH<$?&R57%=2->Q*2MJR`-F^7-df`)hau5=gRbu zXKyZ3=d-6O6J&*)4+5U+)oQ5T%$)gR;QwW;gjVo`T9@pT3)8i5o0vBP$Kx z!nIp&yG9oPuy8yo%N#b{WLx(SWmoVj{`_{PPhY_XX6Asa$o;7Y>4kZ z{7KYHn~nU^&UklpDc+FaLSXS+ZvALHB}%fi(dhv55LuB54OA`i)GWCmL-}2JCpCH5!NnTIDgKIMenOyKGv- zMvu*fJV2M{THJ8$EOjwzWCV%V->(uA7H<#>nN!0pvkEBQ^q> z)EAGn2RH(&R;d$Gz7SfqioXl`s#dL1M}Vt&spxAKnyM1wrG*`93ncL>&9b#1b%MKU zl{)@(i-AQ`(Sj6RzpXQpSmdhCgV$46h6cL+MBQ+_*OH<}-)hM&DP0x^Sbb4($8<0I zVhKAH>5?4d*h!wQV?ZWMr>T!O5~r#ygsDGvi0&L6FD+s>X2tHnEaao5y92&=kUut| zV*f`7_;%-%sl=5^b@C!jL7HqgJ(rYT+lxv#QWJx(=kuQc%mG&7#t}G?&mRNc`$j(B zSOPkhyMw@Y{}E3mpg#@B?|^D>+v_Jk?)qN_JPyeB+aJbbK8|?BF~9|YAI7e65Reb= zOrDQ!5uV$9o=awUz4x#_%5ZEX-hC~fmkZu3U;V5Z*ZZg2-hQ$6;%gTzE1SO<^cv*n z-o%4Hps1bY+gq}3=9K#VrTe_;DJ9=H_i*jwwNKQ34?^pv%kOpAzbZWH^BVv+f9WdE zC_l&nBk2g{aB~?tH9q2n?L2`hunBUY(!s$r&Etk@XyBBoJtS!4TA3` z@O{K3x5O%lll|fY+riWD;fPHf1K&K@o8M#<`fvKR-O;ZN(@X!+D9@lMcj93ek<##Sl* z8kBqoutKr?#lQ0VdtLiyX!v)?b8D3DEdE)5zj!|$z&EjVb*lmkT3YcfW-3q_tO_n$ z5~@x~G_+6^2oX%~>b4`TfObN`PIJ{0x1+%wJ*i-8D%RD$B-Sn@))`55ieUS$9@JFO zPAEzrzp;$>6d@L9iD(!3)kSZYErRl^*PtEk$F=5f{R?Wk!m zRl|z#1143&T;JLTHVBV&$J)?v90KtZl&vU<_zXt`+v45)%vIXvOn&G?a4|mK6vZ`| zy7VWeATqYHa-8W~%#WZ<`Vb)bn5&TKUzA6mV}2S;q~TIR`dSS#>ynQ?%1qxhiM&kL zAshdqZ!v!qWu{%$XKq2JKk}MB$=rx*w#za?rgr3WkXc6GW~Of&dE}!S-N=TIbAj2+ z8O|fa$3uDQ$~ne4%6tW`O(Gu?pGgc~4m`}|lA?Yno4mIp8@}VfpcEr$^x9*3ReWqVTE%<)m&9LS1cjt zq{3-YHTM+GUZ^>yaL!mYmlUo##5tpI-eDoHfGb5f512}&Co5l9I6YR~gB4E8sc+B} z&QVc*s&L*xl|L#RlbSgEj;YjmREegM5*=7dY1wCJ$!GH-K}`#YB0J0q45Jt0u@Pq>={TT;N`iKK3y&Ox1Gu~;vT0%fk z>s&wai$~+3KINjn?84`$C8too!G(Vi_`Di*Z(#gX5AYm}JA@kZG5+_v_#blM(tZw{ z`v1U%|IUS2?cyH+?u_S}qL$P`dkbCoIv1V* z?zI0t7yVnn%WI@K%)X1ncU<%l7w%O{c%l6Y;*Rm#=%U{Z+!-&o5BO;RFBAj7o$+#C z0Pc*>djYsf^KtQK;LdorC60R{$Lo6F-1{*x{?GANkMH=b4~!GzQOUP;V`3ysd>8_4 zLe-YlxFy`&e6v;GvbnCg;l|Ajr5jI{ijkSH#@Lt_Mur4?5uAr_{Ku8ZFp&x6jnkV+ zMx#wev*EOqPoZNQL(AhG9m%MjtWU(db)nW?hpep7 z;U0{>7&lmD!e)!*sPL%CN@+{jNgMCHgK!e-`noOF#)hV5jPhuFq-A$oZH$mi;?1%O znRFCcR(ssqA%hOBb~~O(T9H)0z++%+74s%~o^mx{YCS^jED2 z?ugn}Z<}Rzrh0A*w)UeG!Jh>g?a8>M-nt8G{mq+eH#O8@1Z7anUl`>wsTjP`FrkV` zMi-5ZI~+e2ZxXRR<3?Id7`rw$RLd28J8rNn1HEc$WO$Aa#L@A&5 zc{fxayi6QA@35`;R;mzLIjQhkrw^FOR~Wshqo)rzXAGmh?TlGWP8IL%yhoWBTjd>R z9J)K!j4EiEW~3!1@!tj1|69-@n&bRWgE37_a{q>VxAXrojIQhq^K{L}GmB`SC{kVa G true when in the browser - -var ws = new WS('ws://example.com/resource', 'foo', 'http://example.com'); -// - In Node it creates an instance of websocket.W3CWebSocket. -// - In the browser it creates an instance of window.WebSocket (third parameter -// is ignored by the native WebSocket constructor). - -ws.onopen = function() { console.log('ws open'); }; -// etc. -``` - - -Constructor ------------ - -```javascript -new W3CWebSocket(requestUrl, requestedProtocols, [[[[origin], headers], requestOptions], clientConfig]) -``` - -**clientConfig** is the parameter of the [WebSocketClient](./WebSocketClient.md) constructor. - -**requestUrl**, **requestedProtocols**, **origin**, **headers** and **requestOptions** are parameters to be used in the `connect()` method of [WebSocketClient](./WebSocketClient.md). - -This constructor API makes it possible to use the W3C API and "browserify" the Node application into a valid browser library. - -When running in a browser (for example by using [browserify](http://browserify.org/)) the browser's native `WebSocket` implementation is used, and thus just the first and second arguments (`requestUrl` and `requestedProtocols`) are used (those allowed by the *W3C WebSocket API*). - - -Limitations ------------ - -* `bufferedAmount` attribute is always 0. -* `binaryType` is "arraybuffer" by default given that "blob" is not supported (Node does not implement the `Blob` class). -* `send()` method allows arguments of type `DOMString`, `ArrayBuffer`, `ArrayBufferView` (`Int8Array`, etc) or Node `Buffer`, but does not allow `Blob`. diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/WebSocketClient.md b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/WebSocketClient.md deleted file mode 100644 index 8120545..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/WebSocketClient.md +++ /dev/null @@ -1,108 +0,0 @@ -WebSocketClient -=============== - -* [Constructor](#constructor) -* [Config Options](#client-config-options) -* [Methods](#methods) -* [Events](#events) -* **Examples** - * [Connect using a Proxy Server](#connect-using-a-proxy-server) - -`var WebSocketClient = require('websocket').client` - -This object allows you to make client connections to a WebSocket server. - -Constructor ------------ -```javascript -new WebSocketClient([clientConfig]); -``` - -Client Config Options ---------------------- -**webSocketVersion** - uint - *Default: 13* -Which version of the WebSocket protocol to use when making the connection. Currently supported values are 8 and 13. -This option will be removed once the protocol is finalized by the IETF It is only available to ease the transition through the intermediate draft protocol versions. The only thing this affects the name of the Origin header. - -**maxReceivedFrameSize** - uint - *Default: 1MiB* -The maximum allowed received frame size in bytes. Single frame messages will also be limited to this maximum. - -**maxReceivedMessageSize** - uint - *Default: 8MiB* -The maximum allowed aggregate message size (for fragmented messages) in bytes. - -**fragmentOutgoingMessages** - Boolean - *Default: true* -Whether or not to fragment outgoing messages. If true, messages will be automatically fragmented into chunks of up to `fragmentationThreshold` bytes. - -**fragmentationThreshold** - uint - *Default: 16KiB* -The maximum size of a frame in bytes before it is automatically fragmented. - -**assembleFragments** - boolean - *Default: true* -If true, fragmented messages will be automatically assembled and the full message will be emitted via a `message` event. If false, each frame will be emitted on the WebSocketConnection object via a `frame` event and the application will be responsible for aggregating multiple fragmented frames. Single-frame messages will emit a `message` event in addition to the `frame` event. Most users will want to leave this set to `true`. - -**closeTimeout** - uint - *Default: 5000* -The number of milliseconds to wait after sending a close frame for an acknowledgement to come back before giving up and just closing the socket. - -**tlsOptions** - object - *Default: {}* -Options to pass to `https.request` if connecting via TLS. See [Node's HTTPS documentation](http://nodejs.org/api/https.html#https_https_request_options_callback) - - -Methods -------- -###connect(requestUrl, requestedProtocols, [[[origin], headers], requestOptions]) - -Will establish a connection to the given `requestUrl`. `requestedProtocols` indicates a list of multiple subprotocols supported by the client. The remote server will select the best subprotocol that it supports and send that back when establishing the connection. `origin` is an optional field that can be used in user-agent scenarios to identify the page containing any scripting content that caused the connection to be requested. (This seems unlikely in node.. probably should leave it null most of the time.) `requestUrl` should be a standard websocket url, such as: -`ws://www.mygreatapp.com:1234/websocketapp/` - -`headers` should be either `null` or an object specifying additional arbitrary HTTP request headers to send along with the request. This may be used to pass things like access tokens, etc. so that the server can verify authentication/authorization before deciding to accept and open the full WebSocket connection. - -`requestOptions` should be either `null` or an object specifying additional configuration options to be passed to `http.request` or `https.request`. This can be used to pass a custom `agent` to enable `WebSocketClient` usage from behind an HTTP or HTTPS proxy server using [koichik/node-tunnel](https://github.com/koichik/node-tunnel) or similar. - -`origin` must be specified if you want to pass `headers`, and both `origin` and `headers` must be specified if you want to pass `requestOptions`. The `origin` and `headers` parameters may be passed as `null`. - - -Events ------- -###connect -`function(webSocketConnection)` - -Emitted upon successfully negotiating the WebSocket handshake with the remote server. `webSocketConnection` is an instance of `WebSocketConnection` that can be used to send and receive messages with the remote server. - -###connectFailed -`function(errorDescription)` - -Emitted when there is an error connecting to the remote host or the handshake response sent by the server is invalid. - -###httpResponse -`function(response, webSocketClient)` - -Emitted when the server replies with anything other then "101 Switching Protocols". Provides an opportunity to handle redirects for example. The `response` parameter is an instance of the [http.IncomingMessage](http://nodejs.org/api/http.html#http_http_incomingmessage) class. This is not suitable for handling receiving of large response bodies, as the underlying socket will be immediately closed by WebSocket-Node as soon as all handlers for this event are executed. - -Normally, if the remote server sends an HTTP response with a response code other than 101, the `WebSocketClient` will automatically emit the `connectFailed` event with a description of what was received from the remote server. However, if there are one or more listeners attached to the `httpResponse` event, then the `connectFailed` event will not be emitted for non-101 responses received. `connectFailed` will still be emitted for non-HTTP errors, such as when the remote server is unreachable or not accepting TCP connections. - - -Examples -======== - -Connect using a Proxy Server ----------------------------- - -Using [koichik/node-tunnel](https://github.com/koichik/node-tunnel): - -```javascript -var WebSocketClient = require('websocket').client; -var client = new WebSocketClient(); -var tunnel = require('tunnel'); - -var tunnelingAgent = tunnel.httpOverHttp({ - proxy: { - host: 'proxy.host.com', - port: 8080 - } -}); - -var requestOptions = { - agent: tunnelingAgent -}; - -client.connect('ws://echo.websocket.org/', null, null, null, requestOptions); -``` diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/WebSocketConnection.md b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/WebSocketConnection.md deleted file mode 100644 index ceaccb6..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/WebSocketConnection.md +++ /dev/null @@ -1,131 +0,0 @@ -WebSocketConnection -=================== - -* [Constructor](#constructor) -* [Properties](#properties) -* [Methods](#methods) -* [Events](#events) - -This object provides the interface through which you can communicate with connected peers. It is used in both WebSocketServer and WebSocketClient situations. - -Constructor ------------ -This object is created internally by `WebSocketRequest`. - -Properties ----------- - -###closeDescription - -After the connection is closed, contains a textual description of the reason for the connection closure, or `null` if the connection is still open. - -###closeReasonCode - -After the connection is closed, contains the numeric close reason status code, or `-1` if the connection is still open. - -###socket - -The underlying net.Socket instance for the connection. - -###protocol - -The subprotocol that was chosen to be spoken on this connection. This field will have been converted to lower case. - -###extensions - -An array of extensions that were negotiated for this connection. Currently unused, will always be an empty array. - -###remoteAddress - -The IP address of the remote peer as a string. In the case of a server, the `X-Forwarded-For` header will be respected and preferred for the purposes of populating this field. If you need to get to the actual remote IP address, `webSocketConnection.socket.remoteAddress` will provide it. - -###webSocketVersion - -A number indicating the version of the WebSocket protocol being spoken on this connection. - -###connected - -A boolean value indicating whether or not the connection is still connected. *Read-only* - -Methods -------- -###close([reasonCode], [description]) - -Will gracefully close the connection. A close frame will be sent to the remote peer with the provided `reasonCode` and `description` indicating that we wish to close the connection, and we will then wait for up to `config.closeTimeout` milliseconds for an acknowledgment from the remote peer before terminating the underlying socket connection. The `closeTimeout` is passed as part of the `serverOptions` or `clientOptions` hashes to either the `WebSocketServer` or `WebSocketClient` constructors. Most of the time, you should call `close()` without arguments to initiate a normal connection closure. If you specify a `reasonCode` that is defined as one of the standard codes in the WebSocket protocol specification and do not provide a `description`, the default description for the given code will be used. If you would prefer not to send a description at all, pass an empty string `''`as the description parameter. - -###drop([reasonCode], [description]) - -Will send a close frame to the remote peer with the provided `reasonCode` and `description` and will immediately close the socket without waiting for a response. This should generally be used only in error conditions. The default `reasonCode` is 1002 (Protocol Error). Close reasons defined by the WebSocket protocol draft include: - -```javascript -WebSocketConnection.CLOSE_REASON_NORMAL = 1000; -WebSocketConnection.CLOSE_REASON_GOING_AWAY = 1001; -WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR = 1002; -WebSocketConnection.CLOSE_REASON_UNPROCESSABLE_INPUT = 1003; -WebSocketConnection.CLOSE_REASON_RESERVED = 1004; // Reserved value. Undefined meaning. -WebSocketConnection.CLOSE_REASON_NOT_PROVIDED = 1005; // Not to be used on the wire -WebSocketConnection.CLOSE_REASON_ABNORMAL = 1006; // Not to be used on the wire -WebSocketConnection.CLOSE_REASON_INVALID_DATA = 1007; -WebSocketConnection.CLOSE_REASON_POLICY_VIOLATION = 1008; -WebSocketConnection.CLOSE_REASON_MESSAGE_TOO_BIG = 1009; -WebSocketConnection.CLOSE_REASON_EXTENSION_REQUIRED = 1010; -``` -###sendUTF(string) - -Immediately sends the specified string as a UTF-8 WebSocket message to the remote peer. If `config.fragmentOutgoingMessages` is `true` the message may be sent as multiple fragments if it exceeds `config.fragmentationThreshold` bytes. Any object that implements the `toString()` method may be passed to `sendUTF()` - -###sendBytes(buffer) - -Immediately sends the specified Node `Buffer` object as a Binary WebSocket message to the remote peer. If `config.fragmentOutgoingMessages` is `true` the message may be sent as multiple fragments if it exceeds `config.fragmentationThreshold` bytes. - -###send(data) - -A convenience function that will auto-detect the data type and send the appropriate WebSocket message accordingly. Immediately sends the specified data as either a UTF-8 or Binary message. If `data` is a Node Buffer, a binary message will be sent. Otherwise, the object provided must implement the `toString()` method, and the result of calling `toString()` on the `data` object will be sent as a UTF-8 message. - -###ping(data) - -Sends a ping frame to the remote peer. `data` can be a Node `Buffer` or any object that implements `toString()`, such as a `string` or `number`. Ping frames must not exceed 125 bytes in length. - -###pong(buffer) - -Sends a pong frame to the remote peer. Pong frames may be sent unsolicited and such pong frames will trigger no action on the receiving peer. Pong frames sent in response to a ping frame must mirror the payload data of the ping frame exactly. The `WebSocketConnection` object handles this internally for you, so there should be no need to use this method to respond to pings. Pong frames must not exceed 125 bytes in length. - -###sendFrame(webSocketFrame) - -Serializes a `WebSocketFrame` object into binary data and immediately sends it to the remote peer. This is an advanced function, requiring you to manually compose your own `WebSocketFrame`. You should probably use `sendUTF` or `sendBytes` instead. - -Events ------- -###message -`function(message)` - -Emitted whenever a complete single-frame message is received, or if `config.assembleFragments` is `true` (the default), it will also be emitted with a complete message assembled from multiple fragmented frames. This is the primary event to listen for to receive messages from the remote peer. The `message` object looks like the following: - -```javascript -// For Text Frames: -{ - type: "utf8", - utf8Data: "A string containing the received message." -} - -// For Binary Frames: -{ - type: "binary", - binaryData: binaryDataBuffer // a Buffer object containing the binary message payload -} -``` - -###frame -`function(webSocketFrame)` - -This event is emitted only if `config.assembleFragments` is `false` (default is `true`). This allows you to handle individual fragments as they are received without waiting on `WebSocketConnection` to buffer them into a single `message` event for you. This may be desirable if you are working with streaming data, as it is possible to send fragments continually without ever stopping. `webSocketFrame` is an instance of `WebSocketFrame` which has properties that represent all the individual fields in WebSocket's binary framing protocol. - -###close -`function(reasonCode, description)` - -This event is emitted when the connection has been fully closed and the socket is no longer connected. `reasonCode` is the numeric reason code for the connection closure. `description` is a textual explanation for the connection closure, if available. - -###error -`function(error)` - -This event is emitted when there has been a socket error. If this occurs, a `close` event will also be emitted. diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/WebSocketFrame.md b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/WebSocketFrame.md deleted file mode 100644 index e3160d3..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/WebSocketFrame.md +++ /dev/null @@ -1,66 +0,0 @@ -WebSocketFrame -============== - -* [Constructor](#constructor) -* [Properties](#properties) - -`var WebSocketFrame = require('websocket').frame` - -This object represents the low level individual frame and is used to drive how the bytes are serialized onto the wire. - -Constructor ------------ -```javascript -new WebSocketFrame(); -``` - -Properties ----------- - -###fin -*Boolean* - -Indicates that this is either the only frame in a message, or the last frame in a fragmentation sequence. - -###rsv1 -*Boolean* - -Represents the RSV1 field in the framing, which is currently not used. Setting this to true will result in a Protocol Error on the receiving peer. - -###rsv2 -*Boolean* - -Represents the RSV2 field in the framing, which is currently not used. Setting this to true will result in a Protocol Error on the receiving peer. - -###rsv3 -*Boolean* - -Represents the RSV3 field in the framing, which is currently not used. Setting this to true will result in a Protocol Error on the receiving peer. - -###mask -*uint* - -Whether or not this frame is (or should be) masked. For outgoing frames, when connected as a client, this flag is automatically forced to `true` by WebSocketConnection. Outgoing frames sent from the server-side of a connection are not masked. - -###opcode -*uint* - -Identifies which kind of frame this is. List of Opcodes: - - Hex - Dec - Description - 0x00 - 0 - Continuation - 0x01 - 1 - Text Frame - 0x02 - 2 - Binary Frame - 0x08 - 8 - Close Frame - 0x09 - 9 - Ping Frame - 0x0A - 10 - Pong Frame - -###length -*Read-only, uint* - -Identifies the length of the payload data on a received frame. When sending a frame, the length will be automatically calculated from the `binaryPayload` object. - -###binaryPayload -*Buffer object* - -The binary payload data. **NOTE**: Even text frames are sent with a Buffer providing the binary payload data. When sending a UTF-8 Text Frame, you must serialize your string into a Buffer object before constructing your frame, and when receiving a UTF-8 Text Frame, you must deserialize the string from the provided Buffer object. Do not read UTF-8 data from fragmented Text Frames, as it may have fragmented the data in the middle of a UTF-8 encoded character. You should buffer all fragments of a text message before attempting to decode the UTF-8 data. diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/WebSocketRequest.md b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/WebSocketRequest.md deleted file mode 100644 index 11e6d60..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/WebSocketRequest.md +++ /dev/null @@ -1,113 +0,0 @@ -WebSocketRequest -================ - -* [Constructor](#constructor) -* [Properties](#properties) -* [Methods](#methods) -* [Events](#events) - -This object represents a client requesting to connect to the server, and allows you to accept or reject the connection based on whatever criteria you decide. - -Constructor ------------ -This object is created internally by `WebSocketServer`. - -However if you need to integrate WebSocket support without mounting an instance of `WebSocketServer` to your http server directly, you can handle the `upgrade` event yourself and pass the appropriate parameters to the `WebSocketRequest` constructor. **NOTE:** You *must* pass a complete set of config options to the constructor. See the section *'Server Config Options'* above. The only option that isn't required in this context is `httpServer`. - -```javascript -new WebSocketRequest(socket, httpRequest, config); -``` - -The constructor won't immediately parse and validate the handshake from the client, so you need to call `readHandshake()`, which will `throw` an error if the handshake from the client is invalid or if an error is encountered, so it must always be wrapped in a try/catch block. - -Properties ----------- -###httpRequest - -A reference to the original Node HTTP request object. This may be useful in combination with some other Node-based web server, such as Express, for accessing cookies or session data. - - -###host - -A string containing the contents of the `Host` header passed by the client. This will include the port number if a non-standard port is used. - -Examples: -``` -www.example.com -www.example.com:8080 -127.0.0.1:3000 -``` - -###resource - -A string containing the path that was requested by the client. - -###resourceURL - -A Node URL object containing the parsed `resource`, including the query string parameters. - -###remoteAddress - -The remote client's IP Address as a string. If an `X-Forwarded-For` header is present, the value will be taken from that header to facilitate WebSocket servers that live behind a reverse-proxy. - -###websocketVersion - -**Deprecated, renamed to webSocketVersion** - -###webSocketVersion - -A number indicating the version of the WebSocket protocol requested by the client. - -###origin - -If the client is a web browser, `origin` will be a string containing the URL of the page containing the script that opened the connection. If the client is **not** a web browser, `origin` may be `null` or "*". - -###requestedExtensions - -An array containing a list of extensions requested by the client. This is not currently used for anything. **Example:** - -```javascript -[ - { - name: "simple-extension"; - }, - { - name: "my-great-compression-extension", - params: [ - { - name: "compressionLevel", - value: "10"; - } - ] - } -] -``` - -###requestedProtocols - -An array containing a list of strings that indicate the subprotocols the client would like to speak. The server should select the best one that it can support from the list and pass it to the accept() function when accepting the connection. Note that all the strings in the `requestedProtocols` array will have been converted to lower case, so that acceptance of a subprotocol can be case-insensitive. - -Methods -------- - -###accept(acceptedProtocol, allowedOrigin) -*Returns: WebSocketConnection instance* - -After inspecting the WebSocketRequest's properties, call this function on the request object to accept the connection. If you don't have a particular subprotocol you wish to speak, you may pass `null` for the `acceptedProtocol` parameter. Note that the `acceptedProtocol` parameter is *case-insensitive*, and you must either pass a value that was originally requested by the client or `null`. For browser clients (in which the `origin` property would be non-null) you must pass that user's origin as the `allowedOrigin` parameter to confirm that you wish to accept connections from the given origin. The return value contains the established `WebSocketConnection` instance that can be used to communicate with the connected client. - -###reject([httpStatus], [reason]) - -If you decide to reject the connection, you must call `reject`. You may optionally pass in an HTTP Status code (such as 404) and a textual description that will be sent to the client in the form of an "X-WebSocket-Reject-Reason" header. The connection will then be closed. - -Events ------- - -###requestAccepted -`function(webSocketConnection)` - -Emitted by the WebSocketRequest object when the `accept` method has been called and the connection has been established. `webSocketConnection` is the established `WebSocketConnection` instance that can be used to communicate with the connected client. - -###requestRejected -`function()` - -Emitted by the WebSocketRequest object when the `reject` method has been called and the connection has been terminated. diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/WebSocketServer.md b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/WebSocketServer.md deleted file mode 100644 index 20154eb..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/WebSocketServer.md +++ /dev/null @@ -1,105 +0,0 @@ -WebSocketServer -=============== - -* [Constructor](#constructor) -* [Config Options](#server-config-options) -* [Properties](#properties) -* [Methods](#methods) -* [Events](#events) - -`var WebSocketServer = require('websocket').server` - -Constructor ------------ - -```javascript -new WebSocketServer([serverConfig]); -``` - -Methods -------- - -###mount(serverConfig) - -`mount` will attach the WebSocketServer instance to a Node http.Server instance. `serverConfig` is required, and is an object with configuration values. For those values, see **Server Config Options** below. If you passed `serverConfig` to the constructor, this function will automatically be invoked. - -###unmount() - -`unmount` will detach the WebSocketServer instance from the Node http.Server instance. All existing connections are left alone and will not be affected, but no new WebSocket connections will be accepted. - -###closeAllConnections() - -Will gracefully close all open WebSocket connections. - -###shutDown() - -Gracefully closes all open WebSocket connections and unmounts the server from the Node http.Server instance. - -Server Config Options ---------------------- -**httpServer** - (http.Server instance) **Required**. -The Node http or https server instance(s) to attach to. You can pass a single instance directly, or pass an array of instances to attach to multiple http/https servers. Passing an array is particularly useful when you want to accept encrypted and unencrypted WebSocket connections on both ws:// and wss:// protocols using the same WebSocketServer instance. - -**maxReceivedFrameSize** - uint - *Default: 64KiB* -The maximum allowed received frame size in bytes. Single frame messages will also be limited to this maximum. - -**maxReceivedMessageSize** - uint - *Default: 1MiB* -The maximum allowed aggregate message size (for fragmented messages) in bytes. - -**fragmentOutgoingMessages** - Boolean - *Default: true* -Whether or not to fragment outgoing messages. If true, messages will be automatically fragmented into chunks of up to `fragmentationThreshold` bytes. - -**fragmentationThreshold** - uint - *Default: 16KiB* -The maximum size of a frame in bytes before it is automatically fragmented. - -**keepalive** - boolean - *Default: true* -If true, the server will automatically send a ping to all clients every `keepaliveInterval` milliseconds. Each client has an independent keepalive timer, which is reset when any data is received from that client. - -**keepaliveInterval** - uint - *Default: 20000* -The interval in milliseconds to send keepalive pings to connected clients. - -**dropConnectionOnKeepaliveTimeout** - boolean - *Default: true* -If true, the server will consider any connection that has not received any data within the amount of time specified by `keepaliveGracePeriod` after a keepalive ping has been sent. Ignored if `keepalive` is false. - -**keepaliveGracePeriod** - uint - *Default: 10000* -The amount of time to wait after sending a keepalive ping before closing the connection if the connected peer does not respond. Ignored if `keepalive` or `dropConnectionOnKeepaliveTimeout` are false. The grace period timer is reset when any data is received from the client. - -**assembleFragments** - boolean - *Default: true* -If true, fragmented messages will be automatically assembled and the full message will be emitted via a `message` event. If false, each frame will be emitted on the WebSocketConnection object via a `frame` event and the application will be responsible for aggregating multiple fragmented frames. Single-frame messages will emit a `message` event in addition to the `frame` event. Most users will want to leave this set to `true`. - -**autoAcceptConnections** - boolean - *Default: false* -If this is true, websocket connections will be accepted regardless of the path and protocol specified by the client. The protocol accepted will be the first that was requested by the client. Clients from any origin will be accepted. This should only be used in the simplest of cases. You should probably leave this set to `false`; and inspect the request object to make sure it's acceptable before accepting it. - -**closeTimeout** - uint - *Default: 5000* -The number of milliseconds to wait after sending a close frame for an acknowledgement to come back before giving up and just closing the socket. - -**disableNagleAlgorithm** - boolean - *Default: true* -The Nagle Algorithm makes more efficient use of network resources by introducing a small delay before sending small packets so that multiple messages can be batched together before going onto the wire. This however comes at the cost of latency, so the default is to disable it. If you don't need low latency and are streaming lots of small messages, you can change this to 'false'; - -**ignoreXForwardedFor** - Boolean - *Default: false* -Whether or not the `X-Forwarded-For` header should be respected. -It's important to set this to 'true' when accepting connections -from untrusted clients, as a malicious client could spoof its -IP address by simply setting this header. It's meant to be added -by a trusted proxy or other intermediary within your own -infrastructure. -More info: [X-Forwarded-For on Wikipedia](http://en.wikipedia.org/wiki/X-Forwarded-For) - -Events ------- -There are three events emitted by a WebSocketServer instance that allow you to handle incoming requests, establish connections, and detect when a connection has been closed. - -###request -`function(webSocketRequest)` - -If `autoAcceptConnections` is set to `false`, a `request` event will be emitted by the server whenever a new WebSocket request is made. You should inspect the requested protocols and the user's origin to verify the connection, and then accept or reject it by calling webSocketRequest.accept('chosen-protocol', 'accepted-origin') or webSocketRequest.reject() - -###connect -`function(webSocketConnection)` - -Emitted whenever a new WebSocket connection is accepted. - -###close -`function(webSocketConnection, closeReason, description)` - -Whenever a connection is closed for any reason, the WebSocketServer instance will emit a `close` event, passing a reference to the WebSocketConnection instance that was closed. `closeReason` is the numeric reason status code for the connection closure, and `description` is a textual description of the close reason, if available. diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/index.md b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/index.md deleted file mode 100644 index d42a250..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/docs/index.md +++ /dev/null @@ -1,13 +0,0 @@ -WebSocket-Node Documentation -============================ - -WebSocket-Node includes both client and server functionality, available through WebSocketClient and WebSocketServer respectively. Once a connection is established, the API for sending and receiving messages is identical whether you're acting as a client or server. - -Click on one of the classes below to view its API documentation. - -* [WebSocketClient](./WebSocketClient.md) -* [WebSocketConnection](./WebSocketConnection.md) -* [WebSocketFrame](./WebSocketFrame.md) -* [WebSocketRequest](./WebSocketRequest.md) -* [WebSocketServer](./WebSocketServer.md) -* [W3CWebSocket](./W3CWebSocket.md) diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/gulpfile.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/gulpfile.js deleted file mode 100644 index b515b92..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/gulpfile.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Dependencies. - */ -var gulp = require('gulp'); -var jshint = require('gulp-jshint'); - -gulp.task('lint', function() { - return gulp.src(['gulpfile.js', 'lib/**/*.js', 'test/**/*.js']) - .pipe(jshint('.jshintrc')) - .pipe(jshint.reporter('jshint-stylish', {verbose: true})) - .pipe(jshint.reporter('fail')); -}); - -gulp.task('default', gulp.series('lint')); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/index.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/index.js deleted file mode 100644 index 573969f..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/websocket'); \ No newline at end of file diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/BufferUtil.fallback.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/BufferUtil.fallback.js deleted file mode 100644 index de18bfb..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/BufferUtil.fallback.js +++ /dev/null @@ -1,52 +0,0 @@ -/*! - * Copied from: - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -/* jshint -W086 */ - -module.exports.BufferUtil = { - merge: function(mergedBuffer, buffers) { - var offset = 0; - for (var i = 0, l = buffers.length; i < l; ++i) { - var buf = buffers[i]; - buf.copy(mergedBuffer, offset); - offset += buf.length; - } - }, - mask: function(source, mask, output, offset, length) { - var maskNum = mask.readUInt32LE(0, true); - var i = 0; - for (; i < length - 3; i += 4) { - var num = maskNum ^ source.readUInt32LE(i, true); - if (num < 0) { num = 4294967296 + num; } - output.writeUInt32LE(num, offset + i, true); - } - switch (length % 4) { - case 3: output[offset + i + 2] = source[i + 2] ^ mask[2]; - case 2: output[offset + i + 1] = source[i + 1] ^ mask[1]; - case 1: output[offset + i] = source[i] ^ mask[0]; - case 0: - } - }, - unmask: function(data, mask) { - var maskNum = mask.readUInt32LE(0, true); - var length = data.length; - var i = 0; - for (; i < length - 3; i += 4) { - var num = maskNum ^ data.readUInt32LE(i, true); - if (num < 0) { num = 4294967296 + num; } - data.writeUInt32LE(num, i, true); - } - switch (length % 4) { - case 3: data[i + 2] = data[i + 2] ^ mask[2]; - case 2: data[i + 1] = data[i + 1] ^ mask[1]; - case 1: data[i] = data[i] ^ mask[0]; - case 0: - } - } -}; - -/* jshint +W086 */ \ No newline at end of file diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/BufferUtil.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/BufferUtil.js deleted file mode 100644 index fa37c80..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/BufferUtil.js +++ /dev/null @@ -1,17 +0,0 @@ -/*! - * Copied from: - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -try { - module.exports = require('../build/Release/bufferutil'); -} catch (e) { try { - module.exports = require('../build/default/bufferutil'); -} catch (e) { try { - module.exports = require('./BufferUtil.fallback'); -} catch (e) { - console.error('bufferutil.node seems to not have been built. Run npm install.'); - throw e; -}}} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/Deprecation.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/Deprecation.js deleted file mode 100644 index f93f16f..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/Deprecation.js +++ /dev/null @@ -1,32 +0,0 @@ -/************************************************************************ - * Copyright 2010-2011 Worlize Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ***********************************************************************/ - -var Deprecation = { - disableWarnings: false, - - deprecationWarningMap: { - - }, - - warn: function(deprecationName) { - if (!this.disableWarnings && this.deprecationWarningMap[deprecationName]) { - console.warn('DEPRECATION WARNING: ' + this.deprecationWarningMap[deprecationName]); - this.deprecationWarningMap[deprecationName] = false; - } - } -}; - -module.exports = Deprecation; diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/Validation.fallback.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/Validation.fallback.js deleted file mode 100644 index 6160f88..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/Validation.fallback.js +++ /dev/null @@ -1,12 +0,0 @@ -/*! - * UTF-8 Validation Fallback Code originally from: - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -module.exports.Validation = { - isValidUTF8: function() { - return true; - } -}; diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/Validation.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/Validation.js deleted file mode 100644 index b4106e8..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/Validation.js +++ /dev/null @@ -1,17 +0,0 @@ -/*! - * UTF-8 Validation Code originally from: - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -try { - module.exports = require('../build/Release/validation'); -} catch (e) { try { - module.exports = require('../build/default/validation'); -} catch (e) { try { - module.exports = require('./Validation.fallback'); -} catch (e) { - console.error('validation.node seems not to have been built. Run npm install.'); - throw e; -}}} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/W3CWebSocket.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/W3CWebSocket.js deleted file mode 100644 index 5234352..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/W3CWebSocket.js +++ /dev/null @@ -1,264 +0,0 @@ -/************************************************************************ - * Copyright 2010-2014 Worlize Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ***********************************************************************/ - -var WebSocketClient = require('./WebSocketClient'); -var toBuffer = require('typedarray-to-buffer'); - - -const CONNECTING = 0; -const OPEN = 1; -const CLOSING = 2; -const CLOSED = 3; - - -function WebSocket(url, protocols, origin, headers, requestOptions, clientConfig) { - // Sanitize clientConfig. - clientConfig = clientConfig || {}; - clientConfig.assembleFragments = true; // Required in the W3C API. - - // W3C attributes and listeners. - this._listeners = { - onopen: undefined, - onerror: undefined, - onclose: undefined, - onmessage: undefined - }; - this._url = url; - this._readyState = CONNECTING; - this._protocol = undefined; - this._extensions = ''; - this._bufferedAmount = 0; // Hack, always 0. - this._binaryType = 'arraybuffer'; // TODO: Should be 'blob' by default, but Node has no Blob. - - // The WebSocketConnection instance. - this._connection = undefined; - - // WebSocketClient instance. - this._client = new WebSocketClient(clientConfig); - - this._client.on('connect', onConnect.bind(this)); - this._client.on('connectFailed', onConnectFailed.bind(this)); - - this._client.connect(url, protocols, origin, headers, requestOptions); -} - - -// Expose W3C listener setters/getters. -['onopen', 'onerror', 'onclose', 'onmessage'].forEach(function(method) { - Object.defineProperty(WebSocket.prototype, method, { - get: function() { - return this._listeners[method]; - }, - set: function(listener) { - if (typeof listener === 'function') { - this._listeners[method] = listener; - } - else { - this._listeners[method] = undefined; - } - } - }); -}); - - -// Expose W3C read only attributes. -Object.defineProperties(WebSocket.prototype, { - url: { get: function() { return this._url; } }, - readyState: { get: function() { return this._readyState; } }, - protocol: { get: function() { return this._protocol; } }, - extensions: { get: function() { return this._extensions; } }, - bufferedAmount: { get: function() { return this._bufferedAmount; } } -}); - - -// Expose W3C write/read attributes. -Object.defineProperties(WebSocket.prototype, { - binaryType: { - get: function() { - return this._binaryType; - }, - set: function(type) { - // TODO: Just 'arraybuffer' supported. - if (type !== 'arraybuffer') { - throw new SyntaxError('just "blob" type allowed for "binaryType" attribute'); - } - this._binaryType = type; - } - } -}); - - -// Expose W3C readyState constants. -[['CONNECTING',CONNECTING], ['OPEN',OPEN], ['CLOSING',CLOSING], ['CLOSED',CLOSED]].forEach(function(property) { - Object.defineProperty(WebSocket.prototype, property[0], { - get: function() { return property[1]; } - }); -}); - - -WebSocket.prototype.send = function(data) { - if (this._readyState !== OPEN) { - throw new Error('cannot call send() while not connected'); - } - - // Text. - if (typeof data === 'string' || data instanceof String) { - this._connection.sendUTF(data); - } - // Binary. - else { - // Node Buffer. - if (data instanceof Buffer) { - this._connection.sendBytes(data); - } - // If ArrayBuffer or ArrayBufferView convert it to Node Buffer. - else if (data.byteLength || data.byteLength === 0) { - data = toBuffer(data); - this._connection.sendBytes(data); - } - else { - throw new Error('unknown binary data:', data); - } - } -}; - - -WebSocket.prototype.close = function() { - switch(this._readyState) { - case CONNECTING: - // TODO: We don't have the WebSocketConnection instance yet so no - // way to close the TCP connection. - // Artificially invoke the onConnectFailed event. - onConnectFailed.call(this); - // And close if it connects after a while. - this._client.on('connect', function(connection) { - connection.close(); - }); - break; - case OPEN: - this._readyState = CLOSING; - this._connection.close(); - break; - case CLOSING: - case CLOSED: - break; - } -}; - - -/** - * Private API. - */ - - -function OpenEvent(target) { - this.type = 'open'; - this.target = target; -} - - -function ErrorEvent(target) { - this.type = 'error'; - this.target = target; -} - - -function CloseEvent(target, code, reason) { - this.type = 'close'; - this.target = target; - this.code = code; - this.reason = reason; - this.wasClean = (typeof code === 'undefined' || code === 1000); -} - - -function MessageEvent(target, data) { - this.type = 'message'; - this.target = target; - this.data = data; -} - - -function onConnect(connection) { - this._readyState = OPEN; - this._connection = connection; - this._protocol = connection.protocol; - this._extensions = connection.extensions; - - this._connection.on('close', onClose.bind(this)); - this._connection.on('message', onMessage.bind(this)); - - callListener.call(this, 'onopen', new OpenEvent(this)); -} - - -function onConnectFailed() { - destroy.call(this); - this._readyState = CLOSED; - - // Emit 'close' after 'error' even if 'error' listener throws. - global.setTimeout(function() { - callListener.call(this, 'onclose', new CloseEvent(this, 1006, 'connection failed')); - }.bind(this)); - callListener.call(this, 'onerror', new ErrorEvent(this)); -} - - -function onClose(code, reason) { - destroy.call(this); - this._readyState = CLOSED; - - callListener.call(this, 'onclose', new CloseEvent(this, code, reason || '')); -} - - -function onMessage(message) { - if (message.utf8Data) { - callListener.call(this, 'onmessage', new MessageEvent(this, message.utf8Data)); - } - else if (message.binaryData) { - // Must convert from Node Buffer to ArrayBuffer. - // TODO: or to a Blob (which does not exist in Node!). - if (this.binaryType === 'arraybuffer') { - var buffer = message.binaryData; - var arraybuffer = new ArrayBuffer(buffer.length); - var view = new Uint8Array(arraybuffer); - for (var i=0, len=buffer.length; i', '@', - ',', ';', ':', '\\', '\"', - '/', '[', ']', '?', '=', - '{', '}', ' ', String.fromCharCode(9) -]; - -function WebSocketClient(config) { - // Superclass Constructor - EventEmitter.call(this); - - // TODO: Implement extensions - - this.config = { - // 1MiB max frame size. - maxReceivedFrameSize: 0x100000, - - // 8MiB max message size, only applicable if - // assembleFragments is true - maxReceivedMessageSize: 0x800000, - - // Outgoing messages larger than fragmentationThreshold will be - // split into multiple fragments. - fragmentOutgoingMessages: true, - - // Outgoing frames are fragmented if they exceed this threshold. - // Default is 16KiB - fragmentationThreshold: 0x4000, - - // Which version of the protocol to use for this session. This - // option will be removed once the protocol is finalized by the IETF - // It is only available to ease the transition through the - // intermediate draft protocol versions. - // At present, it only affects the name of the Origin header. - webSocketVersion: 13, - - // If true, fragmented messages will be automatically assembled - // and the full message will be emitted via a 'message' event. - // If false, each frame will be emitted via a 'frame' event and - // the application will be responsible for aggregating multiple - // fragmented frames. Single-frame messages will emit a 'message' - // event in addition to the 'frame' event. - // Most users will want to leave this set to 'true' - assembleFragments: true, - - // The Nagle Algorithm makes more efficient use of network resources - // by introducing a small delay before sending small packets so that - // multiple messages can be batched together before going onto the - // wire. This however comes at the cost of latency, so the default - // is to disable it. If you don't need low latency and are streaming - // lots of small messages, you can change this to 'false' - disableNagleAlgorithm: true, - - // The number of milliseconds to wait after sending a close frame - // for an acknowledgement to come back before giving up and just - // closing the socket. - closeTimeout: 5000, - - // Options to pass to https.connect if connecting via TLS - tlsOptions: {} - }; - - if (config) { - var tlsOptions; - if (config.tlsOptions) { - tlsOptions = config.tlsOptions; - delete config.tlsOptions; - } - else { - tlsOptions = {}; - } - extend(this.config, config); - extend(this.config.tlsOptions, tlsOptions); - } - - this._req = null; - - switch (this.config.webSocketVersion) { - case 8: - case 13: - break; - default: - throw new Error('Requested webSocketVersion is not supported. Allowed values are 8 and 13.'); - } -} - -util.inherits(WebSocketClient, EventEmitter); - -WebSocketClient.prototype.connect = function(requestUrl, protocols, origin, headers, extraRequestOptions) { - var self = this; - if (typeof(protocols) === 'string') { - if (protocols.length > 0) { - protocols = [protocols]; - } - else { - protocols = []; - } - } - if (!(protocols instanceof Array)) { - protocols = []; - } - this.protocols = protocols; - this.origin = origin; - - if (typeof(requestUrl) === 'string') { - this.url = url.parse(requestUrl); - } - else { - this.url = requestUrl; // in case an already parsed url is passed in. - } - if (!this.url.protocol) { - throw new Error('You must specify a full WebSocket URL, including protocol.'); - } - if (!this.url.host) { - throw new Error('You must specify a full WebSocket URL, including hostname. Relative URLs are not supported.'); - } - - this.secure = (this.url.protocol === 'wss:'); - - // validate protocol characters: - this.protocols.forEach(function(protocol) { - for (var i=0; i < protocol.length; i ++) { - var charCode = protocol.charCodeAt(i); - var character = protocol.charAt(i); - if (charCode < 0x0021 || charCode > 0x007E || protocolSeparators.indexOf(character) !== -1) { - throw new Error('Protocol list contains invalid character "' + String.fromCharCode(charCode) + '"'); - } - } - }); - - var defaultPorts = { - 'ws:': '80', - 'wss:': '443' - }; - - if (!this.url.port) { - this.url.port = defaultPorts[this.url.protocol]; - } - - var nonce = new Buffer(16); - for (var i=0; i < 16; i++) { - nonce[i] = Math.round(Math.random()*0xFF); - } - this.base64nonce = nonce.toString('base64'); - - var hostHeaderValue = this.url.hostname; - if ((this.url.protocol === 'ws:' && this.url.port !== '80') || - (this.url.protocol === 'wss:' && this.url.port !== '443')) { - hostHeaderValue += (':' + this.url.port); - } - - var reqHeaders = headers || {}; - extend(reqHeaders, { - 'Upgrade': 'websocket', - 'Connection': 'Upgrade', - 'Sec-WebSocket-Version': this.config.webSocketVersion.toString(10), - 'Sec-WebSocket-Key': this.base64nonce, - 'Host': hostHeaderValue - }); - - if (this.protocols.length > 0) { - reqHeaders['Sec-WebSocket-Protocol'] = this.protocols.join(', '); - } - if (this.origin) { - if (this.config.webSocketVersion === 13) { - reqHeaders['Origin'] = this.origin; - } - else if (this.config.webSocketVersion === 8) { - reqHeaders['Sec-WebSocket-Origin'] = this.origin; - } - } - - // TODO: Implement extensions - - var pathAndQuery; - // Ensure it begins with '/'. - if (this.url.pathname) { - pathAndQuery = this.url.path; - } - else if (this.url.path) { - pathAndQuery = '/' + this.url.path; - } - else { - pathAndQuery = '/'; - } - - function handleRequestError(error) { - self._req = null; - self.emit('connectFailed', error); - } - - var requestOptions = { - agent: false - }; - if (extraRequestOptions) { - extend(requestOptions, extraRequestOptions); - } - // These options are always overridden by the library. The user is not - // allowed to specify these directly. - extend(requestOptions, { - hostname: this.url.hostname, - port: this.url.port, - method: 'GET', - path: pathAndQuery, - headers: reqHeaders - }); - if (this.secure) { - for (var key in self.config.tlsOptions) { - if (self.config.tlsOptions.hasOwnProperty(key)) { - requestOptions[key] = self.config.tlsOptions[key]; - } - } - } - - var req = this._req = (this.secure ? https : http).request(requestOptions); - req.on('upgrade', function handleRequestUpgrade(response, socket, head) { - self._req = null; - req.removeListener('error', handleRequestError); - self.socket = socket; - self.response = response; - self.firstDataChunk = head; - self.validateHandshake(); - }); - req.on('error', handleRequestError); - - req.on('response', function(response) { - self._req = null; - if (utils.eventEmitterListenerCount(self, 'httpResponse') > 0) { - self.emit('httpResponse', response, self); - if (response.socket) { - response.socket.end(); - } - } - else { - var headerDumpParts = []; - for (var headerName in response.headers) { - headerDumpParts.push(headerName + ': ' + response.headers[headerName]); - } - self.failHandshake( - 'Server responded with a non-101 status: ' + - response.statusCode + - '\nResponse Headers Follow:\n' + - headerDumpParts.join('\n') + '\n' - ); - } - }); - req.end(); -}; - -WebSocketClient.prototype.validateHandshake = function() { - var headers = this.response.headers; - - if (this.protocols.length > 0) { - this.protocol = headers['sec-websocket-protocol']; - if (this.protocol) { - if (this.protocols.indexOf(this.protocol) === -1) { - this.failHandshake('Server did not respond with a requested protocol.'); - return; - } - } - else { - this.failHandshake('Expected a Sec-WebSocket-Protocol header.'); - return; - } - } - - if (!(headers['connection'] && headers['connection'].toLocaleLowerCase() === 'upgrade')) { - this.failHandshake('Expected a Connection: Upgrade header from the server'); - return; - } - - if (!(headers['upgrade'] && headers['upgrade'].toLocaleLowerCase() === 'websocket')) { - this.failHandshake('Expected an Upgrade: websocket header from the server'); - return; - } - - var sha1 = crypto.createHash('sha1'); - sha1.update(this.base64nonce + '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'); - var expectedKey = sha1.digest('base64'); - - if (!headers['sec-websocket-accept']) { - this.failHandshake('Expected Sec-WebSocket-Accept header from server'); - return; - } - - if (headers['sec-websocket-accept'] !== expectedKey) { - this.failHandshake('Sec-WebSocket-Accept header from server didn\'t match expected value of ' + expectedKey); - return; - } - - // TODO: Support extensions - - this.succeedHandshake(); -}; - -WebSocketClient.prototype.failHandshake = function(errorDescription) { - if (this.socket && this.socket.writable) { - this.socket.end(); - } - this.emit('connectFailed', new Error(errorDescription)); -}; - -WebSocketClient.prototype.succeedHandshake = function() { - var connection = new WebSocketConnection(this.socket, [], this.protocol, true, this.config); - - connection.webSocketVersion = this.config.webSocketVersion; - connection._addSocketEventListeners(); - - this.emit('connect', connection); - if (this.firstDataChunk.length > 0) { - connection.handleSocketData(this.firstDataChunk); - } - this.firstDataChunk = null; -}; - -WebSocketClient.prototype.abort = function() { - if (this._req) { - this._req.abort(); - } -}; - -module.exports = WebSocketClient; diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketConnection.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketConnection.js deleted file mode 100644 index 901aedf..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketConnection.js +++ /dev/null @@ -1,858 +0,0 @@ -/************************************************************************ - * Copyright 2010-2011 Worlize Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ***********************************************************************/ - -var util = require('util'); -var utils = require('./utils'); -var EventEmitter = require('events').EventEmitter; -var WebSocketFrame = require('./WebSocketFrame'); -var BufferList = require('../vendor/FastBufferList'); -var Validation = require('./Validation').Validation; - -// Connected, fully-open, ready to send and receive frames -const STATE_OPEN = 'open'; -// Received a close frame from the remote peer -const STATE_PEER_REQUESTED_CLOSE = 'peer_requested_close'; -// Sent close frame to remote peer. No further data can be sent. -const STATE_ENDING = 'ending'; -// Connection is fully closed. No further data can be sent or received. -const STATE_CLOSED = 'closed'; - -var setImmediateImpl = ('setImmediate' in global) ? - global.setImmediate.bind(global) : - process.nextTick.bind(process); - -var idCounter = 0; - -function WebSocketConnection(socket, extensions, protocol, maskOutgoingPackets, config) { - this._debug = utils.BufferingLogger('websocket:connection', ++idCounter); - this._debug('constructor'); - - if (this._debug.enabled) { - instrumentSocketForDebugging(this, socket); - } - - // Superclass Constructor - EventEmitter.call(this); - - this.config = config; - this.socket = socket; - this.protocol = protocol; - this.extensions = extensions; - this.remoteAddress = socket.remoteAddress; - this.closeReasonCode = -1; - this.closeDescription = null; - this.closeEventEmitted = false; - - // We have to mask outgoing packets if we're acting as a WebSocket client. - this.maskOutgoingPackets = maskOutgoingPackets; - - // We re-use the same buffers for the mask and frame header for all frames - // received on each connection to avoid a small memory allocation for each - // frame. - this.maskBytes = new Buffer(4); - this.frameHeader = new Buffer(10); - - // the BufferList will handle the data streaming in - this.bufferList = new BufferList(); - - // Prepare for receiving first frame - this.currentFrame = new WebSocketFrame(this.maskBytes, this.frameHeader, this.config); - this.fragmentationSize = 0; // data received so far... - this.frameQueue = []; - - // Various bits of connection state - this.connected = true; - this.state = STATE_OPEN; - this.waitingForCloseResponse = false; - // Received TCP FIN, socket's readable stream is finished. - this.receivedEnd = false; - - this.closeTimeout = this.config.closeTimeout; - this.assembleFragments = this.config.assembleFragments; - this.maxReceivedMessageSize = this.config.maxReceivedMessageSize; - - this.outputBufferFull = false; - this.inputPaused = false; - this.receivedDataHandler = this.processReceivedData.bind(this); - this._closeTimerHandler = this.handleCloseTimer.bind(this); - - // Disable nagle algorithm? - this.socket.setNoDelay(this.config.disableNagleAlgorithm); - - // Make sure there is no socket inactivity timeout - this.socket.setTimeout(0); - - if (this.config.keepalive && !this.config.useNativeKeepalive) { - if (typeof(this.config.keepaliveInterval) !== 'number') { - throw new Error('keepaliveInterval must be specified and numeric ' + - 'if keepalive is true.'); - } - this._keepaliveTimerHandler = this.handleKeepaliveTimer.bind(this); - this.setKeepaliveTimer(); - - if (this.config.dropConnectionOnKeepaliveTimeout) { - if (typeof(this.config.keepaliveGracePeriod) !== 'number') { - throw new Error('keepaliveGracePeriod must be specified and ' + - 'numeric if dropConnectionOnKeepaliveTimeout ' + - 'is true.'); - } - this._gracePeriodTimerHandler = this.handleGracePeriodTimer.bind(this); - } - } - else if (this.config.keepalive && this.config.useNativeKeepalive) { - if (!('setKeepAlive' in this.socket)) { - throw new Error('Unable to use native keepalive: unsupported by ' + - 'this version of Node.'); - } - this.socket.setKeepAlive(true, this.config.keepaliveInterval); - } - - // The HTTP Client seems to subscribe to socket error events - // and re-dispatch them in such a way that doesn't make sense - // for users of our client, so we want to make sure nobody - // else is listening for error events on the socket besides us. - this.socket.removeAllListeners('error'); -} - -WebSocketConnection.CLOSE_REASON_NORMAL = 1000; -WebSocketConnection.CLOSE_REASON_GOING_AWAY = 1001; -WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR = 1002; -WebSocketConnection.CLOSE_REASON_UNPROCESSABLE_INPUT = 1003; -WebSocketConnection.CLOSE_REASON_RESERVED = 1004; // Reserved value. Undefined meaning. -WebSocketConnection.CLOSE_REASON_NOT_PROVIDED = 1005; // Not to be used on the wire -WebSocketConnection.CLOSE_REASON_ABNORMAL = 1006; // Not to be used on the wire -WebSocketConnection.CLOSE_REASON_INVALID_DATA = 1007; -WebSocketConnection.CLOSE_REASON_POLICY_VIOLATION = 1008; -WebSocketConnection.CLOSE_REASON_MESSAGE_TOO_BIG = 1009; -WebSocketConnection.CLOSE_REASON_EXTENSION_REQUIRED = 1010; -WebSocketConnection.CLOSE_REASON_INTERNAL_SERVER_ERROR = 1011; -WebSocketConnection.CLOSE_REASON_TLS_HANDSHAKE_FAILED = 1015; // Not to be used on the wire - -WebSocketConnection.CLOSE_DESCRIPTIONS = { - 1000: 'Normal connection closure', - 1001: 'Remote peer is going away', - 1002: 'Protocol error', - 1003: 'Unprocessable input', - 1004: 'Reserved', - 1005: 'Reason not provided', - 1006: 'Abnormal closure, no further detail available', - 1007: 'Invalid data received', - 1008: 'Policy violation', - 1009: 'Message too big', - 1010: 'Extension requested by client is required', - 1011: 'Internal Server Error', - 1015: 'TLS Handshake Failed' -}; - -function validateCloseReason(code) { - if (code < 1000) { - // Status codes in the range 0-999 are not used - return false; - } - if (code >= 1000 && code <= 2999) { - // Codes from 1000 - 2999 are reserved for use by the protocol. Only - // a few codes are defined, all others are currently illegal. - return [1000, 1001, 1002, 1003, 1007, 1008, 1009, 1010, 1011].indexOf(code) !== -1; - } - if (code >= 3000 && code <= 3999) { - // Reserved for use by libraries, frameworks, and applications. - // Should be registered with IANA. Interpretation of these codes is - // undefined by the WebSocket protocol. - return true; - } - if (code >= 4000 && code <= 4999) { - // Reserved for private use. Interpretation of these codes is - // undefined by the WebSocket protocol. - return true; - } - if (code >= 5000) { - return false; - } -} - -util.inherits(WebSocketConnection, EventEmitter); - -WebSocketConnection.prototype._addSocketEventListeners = function() { - this.socket.on('error', this.handleSocketError.bind(this)); - this.socket.on('end', this.handleSocketEnd.bind(this)); - this.socket.on('close', this.handleSocketClose.bind(this)); - this.socket.on('drain', this.handleSocketDrain.bind(this)); - this.socket.on('pause', this.handleSocketPause.bind(this)); - this.socket.on('resume', this.handleSocketResume.bind(this)); - this.socket.on('data', this.handleSocketData.bind(this)); -}; - -// set or reset the keepalive timer when data is received. -WebSocketConnection.prototype.setKeepaliveTimer = function() { - this._debug('setKeepaliveTimer'); - if (!this.config.keepalive) { return; } - this.clearKeepaliveTimer(); - this.clearGracePeriodTimer(); - this._keepaliveTimeoutID = setTimeout(this._keepaliveTimerHandler, this.config.keepaliveInterval); -}; - -WebSocketConnection.prototype.clearKeepaliveTimer = function() { - if (this._keepaliveTimeoutID) { - clearTimeout(this._keepaliveTimeoutID); - } -}; - -// No data has been received within config.keepaliveTimeout ms. -WebSocketConnection.prototype.handleKeepaliveTimer = function() { - this._debug('handleKeepaliveTimer'); - this._keepaliveTimeoutID = null; - this.ping(); - - // If we are configured to drop connections if the client doesn't respond - // then set the grace period timer. - if (this.config.dropConnectionOnKeepaliveTimeout) { - this.setGracePeriodTimer(); - } - else { - // Otherwise reset the keepalive timer to send the next ping. - this.setKeepaliveTimer(); - } -}; - -WebSocketConnection.prototype.setGracePeriodTimer = function() { - this._debug('setGracePeriodTimer'); - this.clearGracePeriodTimer(); - this._gracePeriodTimeoutID = setTimeout(this._gracePeriodTimerHandler, this.config.keepaliveGracePeriod); -}; - -WebSocketConnection.prototype.clearGracePeriodTimer = function() { - if (this._gracePeriodTimeoutID) { - clearTimeout(this._gracePeriodTimeoutID); - } -}; - -WebSocketConnection.prototype.handleGracePeriodTimer = function() { - this._debug('handleGracePeriodTimer'); - // If this is called, the client has not responded and is assumed dead. - this._gracePeriodTimeoutID = null; - this.drop(WebSocketConnection.CLOSE_REASON_ABNORMAL, 'Peer not responding.', true); -}; - -WebSocketConnection.prototype.handleSocketData = function(data) { - this._debug('handleSocketData'); - // Reset the keepalive timer when receiving data of any kind. - this.setKeepaliveTimer(); - - // Add received data to our bufferList, which efficiently holds received - // data chunks in a linked list of Buffer objects. - this.bufferList.write(data); - - this.processReceivedData(); -}; - -WebSocketConnection.prototype.processReceivedData = function() { - this._debug('processReceivedData'); - // If we're not connected, we should ignore any data remaining on the buffer. - if (!this.connected) { return; } - - // Receiving/parsing is expected to be halted when paused. - if (this.inputPaused) { return; } - - var frame = this.currentFrame; - - // WebSocketFrame.prototype.addData returns true if all data necessary to - // parse the frame was available. It returns false if we are waiting for - // more data to come in on the wire. - if (!frame.addData(this.bufferList)) { this._debug('-- insufficient data for frame'); return; } - - var self = this; - - // Handle possible parsing errors - if (frame.protocolError) { - // Something bad happened.. get rid of this client. - this._debug('-- protocol error'); - process.nextTick(function() { - self.drop(WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR, frame.dropReason); - }); - return; - } - else if (frame.frameTooLarge) { - this._debug('-- frame too large'); - process.nextTick(function() { - self.drop(WebSocketConnection.CLOSE_REASON_MESSAGE_TOO_BIG, frame.dropReason); - }); - return; - } - - // For now since we don't support extensions, all RSV bits are illegal - if (frame.rsv1 || frame.rsv2 || frame.rsv3) { - this._debug('-- illegal rsv flag'); - process.nextTick(function() { - self.drop(WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR, - 'Unsupported usage of rsv bits without negotiated extension.'); - }); - return; - } - - if (!this.assembleFragments) { - this._debug('-- emitting frame'); - process.nextTick(function() { self.emit('frame', frame); }); - } - - process.nextTick(function() { self.processFrame(frame); }); - - this.currentFrame = new WebSocketFrame(this.maskBytes, this.frameHeader, this.config); - - // If there's data remaining, schedule additional processing, but yield - // for now so that other connections have a chance to have their data - // processed. We use setImmediate here instead of process.nextTick to - // explicitly indicate that we wish for other I/O to be handled first. - if (this.bufferList.length > 0) { - setImmediateImpl(this.receivedDataHandler); - } -}; - -WebSocketConnection.prototype.handleSocketError = function(error) { - this._debug('handleSocketError: %j', error); - this.closeReasonCode = WebSocketConnection.CLOSE_REASON_ABNORMAL; - this.closeDescription = 'Socket Error: ' + error.syscall + ' ' + error.code; - this.connected = false; - this.state = STATE_CLOSED; - this.fragmentationSize = 0; - if (utils.eventEmitterListenerCount(this, 'error') > 0) { - this.emit('error', error); - } - this.socket.destroy(error); - this._debug.printOutput(); -}; - -WebSocketConnection.prototype.handleSocketEnd = function() { - this._debug('handleSocketEnd: received socket end. state = %s', this.state); - this.receivedEnd = true; - if (this.state === STATE_CLOSED) { - // When using the TLS module, sometimes the socket will emit 'end' - // after it emits 'close'. I don't think that's correct behavior, - // but we should deal with it gracefully by ignoring it. - this._debug(' --- Socket \'end\' after \'close\''); - return; - } - if (this.state !== STATE_PEER_REQUESTED_CLOSE && - this.state !== STATE_ENDING) { - this._debug(' --- UNEXPECTED socket end.'); - this.socket.end(); - } -}; - -WebSocketConnection.prototype.handleSocketClose = function(hadError) { - this._debug('handleSocketClose: received socket close'); - this.socketHadError = hadError; - this.connected = false; - this.state = STATE_CLOSED; - // If closeReasonCode is still set to -1 at this point then we must - // not have received a close frame!! - if (this.closeReasonCode === -1) { - this.closeReasonCode = WebSocketConnection.CLOSE_REASON_ABNORMAL; - this.closeDescription = 'Connection dropped by remote peer.'; - } - this.clearCloseTimer(); - this.clearKeepaliveTimer(); - this.clearGracePeriodTimer(); - if (!this.closeEventEmitted) { - this.closeEventEmitted = true; - this._debug('-- Emitting WebSocketConnection close event'); - this.emit('close', this.closeReasonCode, this.closeDescription); - } -}; - -WebSocketConnection.prototype.handleSocketDrain = function() { - this._debug('handleSocketDrain: socket drain event'); - this.outputBufferFull = false; - this.emit('drain'); -}; - -WebSocketConnection.prototype.handleSocketPause = function() { - this._debug('handleSocketPause: socket pause event'); - this.inputPaused = true; - this.emit('pause'); -}; - -WebSocketConnection.prototype.handleSocketResume = function() { - this._debug('handleSocketResume: socket resume event'); - this.inputPaused = false; - this.emit('resume'); - this.processReceivedData(); -}; - -WebSocketConnection.prototype.pause = function() { - this._debug('pause: pause requested'); - this.socket.pause(); -}; - -WebSocketConnection.prototype.resume = function() { - this._debug('resume: resume requested'); - this.socket.resume(); -}; - -WebSocketConnection.prototype.close = function(reasonCode, description) { - if (this.connected) { - this._debug('close: Initating clean WebSocket close sequence.'); - if ('number' !== typeof reasonCode) { - reasonCode = WebSocketConnection.CLOSE_REASON_NORMAL; - } - if (!validateCloseReason(reasonCode)) { - throw new Error('Close code ' + reasonCode + ' is not valid.'); - } - if ('string' !== typeof description) { - description = WebSocketConnection.CLOSE_DESCRIPTIONS[reasonCode]; - } - this.closeReasonCode = reasonCode; - this.closeDescription = description; - this.setCloseTimer(); - this.sendCloseFrame(this.closeReasonCode, this.closeDescription); - this.state = STATE_ENDING; - this.connected = false; - } -}; - -WebSocketConnection.prototype.drop = function(reasonCode, description, skipCloseFrame) { - this._debug('drop'); - if (typeof(reasonCode) !== 'number') { - reasonCode = WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR; - } - - if (typeof(description) !== 'string') { - // If no description is provided, try to look one up based on the - // specified reasonCode. - description = WebSocketConnection.CLOSE_DESCRIPTIONS[reasonCode]; - } - - this._debug('Forcefully dropping connection. skipCloseFrame: %s, code: %d, description: %s', - skipCloseFrame, reasonCode, description - ); - - this.closeReasonCode = reasonCode; - this.closeDescription = description; - this.frameQueue = []; - this.fragmentationSize = 0; - if (!skipCloseFrame) { - this.sendCloseFrame(reasonCode, description); - } - this.connected = false; - this.state = STATE_CLOSED; - this.clearCloseTimer(); - this.clearKeepaliveTimer(); - this.clearGracePeriodTimer(); - - if (!this.closeEventEmitted) { - this.closeEventEmitted = true; - this._debug('Emitting WebSocketConnection close event'); - this.emit('close', this.closeReasonCode, this.closeDescription); - } - - this._debug('Drop: destroying socket'); - this.socket.destroy(); -}; - -WebSocketConnection.prototype.setCloseTimer = function() { - this._debug('setCloseTimer'); - this.clearCloseTimer(); - this._debug('Setting close timer'); - this.waitingForCloseResponse = true; - this.closeTimer = setTimeout(this._closeTimerHandler, this.closeTimeout); -}; - -WebSocketConnection.prototype.clearCloseTimer = function() { - this._debug('clearCloseTimer'); - if (this.closeTimer) { - this._debug('Clearing close timer'); - clearTimeout(this.closeTimer); - this.waitingForCloseResponse = false; - this.closeTimer = null; - } -}; - -WebSocketConnection.prototype.handleCloseTimer = function() { - this._debug('handleCloseTimer'); - this.closeTimer = null; - if (this.waitingForCloseResponse) { - this._debug('Close response not received from client. Forcing socket end.'); - this.waitingForCloseResponse = false; - this.state = STATE_CLOSED; - this.socket.end(); - } -}; - -WebSocketConnection.prototype.processFrame = function(frame) { - this._debug('processFrame'); - this._debug(' -- frame: %s', frame); - - // Any non-control opcode besides 0x00 (continuation) received in the - // middle of a fragmented message is illegal. - if (this.frameQueue.length !== 0 && (frame.opcode > 0x00 && frame.opcode < 0x08)) { - this.drop(WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR, - 'Illegal frame opcode 0x' + frame.opcode.toString(16) + ' ' + - 'received in middle of fragmented message.'); - return; - } - - switch(frame.opcode) { - case 0x02: // WebSocketFrame.BINARY_FRAME - this._debug('-- Binary Frame'); - if (this.assembleFragments) { - if (frame.fin) { - // Complete single-frame message received - this._debug('---- Emitting \'message\' event'); - this.emit('message', { - type: 'binary', - binaryData: frame.binaryPayload - }); - } - else { - // beginning of a fragmented message - this.frameQueue.push(frame); - this.fragmentationSize = frame.length; - } - } - break; - case 0x01: // WebSocketFrame.TEXT_FRAME - this._debug('-- Text Frame'); - if (this.assembleFragments) { - if (frame.fin) { - if (!Validation.isValidUTF8(frame.binaryPayload)) { - this.drop(WebSocketConnection.CLOSE_REASON_INVALID_DATA, - 'Invalid UTF-8 Data Received'); - return; - } - // Complete single-frame message received - this._debug('---- Emitting \'message\' event'); - this.emit('message', { - type: 'utf8', - utf8Data: frame.binaryPayload.toString('utf8') - }); - } - else { - // beginning of a fragmented message - this.frameQueue.push(frame); - this.fragmentationSize = frame.length; - } - } - break; - case 0x00: // WebSocketFrame.CONTINUATION - this._debug('-- Continuation Frame'); - if (this.assembleFragments) { - if (this.frameQueue.length === 0) { - this.drop(WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR, - 'Unexpected Continuation Frame'); - return; - } - - this.fragmentationSize += frame.length; - - if (this.fragmentationSize > this.maxReceivedMessageSize) { - this.drop(WebSocketConnection.CLOSE_REASON_MESSAGE_TOO_BIG, - 'Maximum message size exceeded.'); - return; - } - - this.frameQueue.push(frame); - - if (frame.fin) { - // end of fragmented message, so we process the whole - // message now. We also have to decode the utf-8 data - // for text frames after combining all the fragments. - var bytesCopied = 0; - var binaryPayload = new Buffer(this.fragmentationSize); - var opcode = this.frameQueue[0].opcode; - this.frameQueue.forEach(function (currentFrame) { - currentFrame.binaryPayload.copy(binaryPayload, bytesCopied); - bytesCopied += currentFrame.binaryPayload.length; - }); - this.frameQueue = []; - this.fragmentationSize = 0; - - switch (opcode) { - case 0x02: // WebSocketOpcode.BINARY_FRAME - this.emit('message', { - type: 'binary', - binaryData: binaryPayload - }); - break; - case 0x01: // WebSocketOpcode.TEXT_FRAME - if (!Validation.isValidUTF8(binaryPayload)) { - this.drop(WebSocketConnection.CLOSE_REASON_INVALID_DATA, - 'Invalid UTF-8 Data Received'); - return; - } - this.emit('message', { - type: 'utf8', - utf8Data: binaryPayload.toString('utf8') - }); - break; - default: - this.drop(WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR, - 'Unexpected first opcode in fragmentation sequence: 0x' + opcode.toString(16)); - return; - } - } - } - break; - case 0x09: // WebSocketFrame.PING - this._debug('-- Ping Frame'); - this.pong(frame.binaryPayload); - break; - case 0x0A: // WebSocketFrame.PONG - this._debug('-- Pong Frame'); - break; - case 0x08: // WebSocketFrame.CONNECTION_CLOSE - this._debug('-- Close Frame'); - if (this.waitingForCloseResponse) { - // Got response to our request to close the connection. - // Close is complete, so we just hang up. - this._debug('---- Got close response from peer. Completing closing handshake.'); - this.clearCloseTimer(); - this.waitingForCloseResponse = false; - this.state = STATE_CLOSED; - this.socket.end(); - return; - } - - this._debug('---- Closing handshake initiated by peer.'); - // Got request from other party to close connection. - // Send back acknowledgement and then hang up. - this.state = STATE_PEER_REQUESTED_CLOSE; - var respondCloseReasonCode; - - // Make sure the close reason provided is legal according to - // the protocol spec. Providing no close status is legal. - // WebSocketFrame sets closeStatus to -1 by default, so if it - // is still -1, then no status was provided. - if (frame.invalidCloseFrameLength) { - this.closeReasonCode = 1005; // 1005 = No reason provided. - respondCloseReasonCode = WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR; - } - else if (frame.closeStatus === -1 || validateCloseReason(frame.closeStatus)) { - this.closeReasonCode = frame.closeStatus; - respondCloseReasonCode = WebSocketConnection.CLOSE_REASON_NORMAL; - } - else { - this.closeReasonCode = frame.closeStatus; - respondCloseReasonCode = WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR; - } - - // If there is a textual description in the close frame, extract it. - if (frame.binaryPayload.length > 1) { - if (!Validation.isValidUTF8(frame.binaryPayload)) { - this.drop(WebSocketConnection.CLOSE_REASON_INVALID_DATA, - 'Invalid UTF-8 Data Received'); - return; - } - this.closeDescription = frame.binaryPayload.toString('utf8'); - } - else { - this.closeDescription = WebSocketConnection.CLOSE_DESCRIPTIONS[this.closeReasonCode]; - } - this._debug( - '------ Remote peer %s - code: %d - %s - close frame payload length: %d', - this.remoteAddress, this.closeReasonCode, - this.closeDescription, frame.length - ); - this._debug('------ responding to remote peer\'s close request.'); - this.sendCloseFrame(respondCloseReasonCode, null); - this.connected = false; - break; - default: - this._debug('-- Unrecognized Opcode %d', frame.opcode); - this.drop(WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR, - 'Unrecognized Opcode: 0x' + frame.opcode.toString(16)); - break; - } -}; - -WebSocketConnection.prototype.send = function(data, cb) { - this._debug('send'); - if (Buffer.isBuffer(data)) { - this.sendBytes(data, cb); - } - else if (typeof(data['toString']) === 'function') { - this.sendUTF(data, cb); - } - else { - throw new Error('Data provided must either be a Node Buffer or implement toString()'); - } -}; - -WebSocketConnection.prototype.sendUTF = function(data, cb) { - this._debug('sendUTF: %s', data.slice(0,80) + '|...'); - var frame = new WebSocketFrame(this.maskBytes, this.frameHeader, this.config); - frame.opcode = 0x01; // WebSocketOpcode.TEXT_FRAME - frame.binaryPayload = new Buffer(data.toString(), 'utf8'); - this.fragmentAndSend(frame, cb); -}; - -WebSocketConnection.prototype.sendBytes = function(data, cb) { - this._debug('sendBytes'); - if (!Buffer.isBuffer(data)) { - throw new Error('You must pass a Node Buffer object to WebSocketConnection.prototype.sendBytes()'); - } - var frame = new WebSocketFrame(this.maskBytes, this.frameHeader, this.config); - frame.opcode = 0x02; // WebSocketOpcode.BINARY_FRAME - frame.binaryPayload = data; - this.fragmentAndSend(frame, cb); -}; - -WebSocketConnection.prototype.ping = function(data) { - this._debug('ping'); - var frame = new WebSocketFrame(this.maskBytes, this.frameHeader, this.config); - frame.opcode = 0x09; // WebSocketOpcode.PING - frame.fin = true; - if (data) { - if (!Buffer.isBuffer(data)) { - data = new Buffer(data.toString(), 'utf8'); - } - if (data.length > 125) { - this._debug('WebSocket: Data for ping is longer than 125 bytes. Truncating.'); - data = data.slice(0,124); - } - frame.binaryPayload = data; - } - this.sendFrame(frame); -}; - -// Pong frames have to echo back the contents of the data portion of the -// ping frame exactly, byte for byte. -WebSocketConnection.prototype.pong = function(binaryPayload) { - this._debug('pong'); - var frame = new WebSocketFrame(this.maskBytes, this.frameHeader, this.config); - frame.opcode = 0x0A; // WebSocketOpcode.PONG - if (Buffer.isBuffer(binaryPayload) && binaryPayload.length > 125) { - this._debug('WebSocket: Data for pong is longer than 125 bytes. Truncating.'); - binaryPayload = binaryPayload.slice(0,124); - } - frame.binaryPayload = binaryPayload; - frame.fin = true; - this.sendFrame(frame); -}; - -WebSocketConnection.prototype.fragmentAndSend = function(frame, cb) { - this._debug('fragmentAndSend'); - if (frame.opcode > 0x07) { - throw new Error('You cannot fragment control frames.'); - } - - var threshold = this.config.fragmentationThreshold; - var length = frame.binaryPayload.length; - - // Send immediately if fragmentation is disabled or the message is not - // larger than the fragmentation threshold. - if (!this.config.fragmentOutgoingMessages || (frame.binaryPayload && length <= threshold)) { - frame.fin = true; - this.sendFrame(frame, cb); - return; - } - - var numFragments = Math.ceil(length / threshold); - var sentFragments = 0; - var sentCallback = function fragmentSentCallback(err) { - if (err) { - if (typeof cb === 'function') { - // pass only the first error - cb(err); - cb = null; - } - return; - } - ++sentFragments; - if ((sentFragments === numFragments) && (typeof cb === 'function')) { - cb(); - } - }; - for (var i=1; i <= numFragments; i++) { - var currentFrame = new WebSocketFrame(this.maskBytes, this.frameHeader, this.config); - - // continuation opcode except for first frame. - currentFrame.opcode = (i === 1) ? frame.opcode : 0x00; - - // fin set on last frame only - currentFrame.fin = (i === numFragments); - - // length is likely to be shorter on the last fragment - var currentLength = (i === numFragments) ? length - (threshold * (i-1)) : threshold; - var sliceStart = threshold * (i-1); - - // Slice the right portion of the original payload - currentFrame.binaryPayload = frame.binaryPayload.slice(sliceStart, sliceStart + currentLength); - - this.sendFrame(currentFrame, sentCallback); - } -}; - -WebSocketConnection.prototype.sendCloseFrame = function(reasonCode, description, cb) { - if (typeof(reasonCode) !== 'number') { - reasonCode = WebSocketConnection.CLOSE_REASON_NORMAL; - } - - this._debug('sendCloseFrame state: %s, reasonCode: %d, description: %s', this.state, reasonCode, description); - - if (this.state !== STATE_OPEN && this.state !== STATE_PEER_REQUESTED_CLOSE) { return; } - - var frame = new WebSocketFrame(this.maskBytes, this.frameHeader, this.config); - frame.fin = true; - frame.opcode = 0x08; // WebSocketOpcode.CONNECTION_CLOSE - frame.closeStatus = reasonCode; - if (typeof(description) === 'string') { - frame.binaryPayload = new Buffer(description, 'utf8'); - } - - this.sendFrame(frame, cb); - this.socket.end(); -}; - -WebSocketConnection.prototype.sendFrame = function(frame, cb) { - this._debug('sendFrame'); - frame.mask = this.maskOutgoingPackets; - var flushed = this.socket.write(frame.toBuffer(), cb); - this.outputBufferFull = !flushed; - return flushed; -}; - -module.exports = WebSocketConnection; - - - -function instrumentSocketForDebugging(connection, socket) { - /* jshint loopfunc: true */ - if (!connection._debug.enabled) { return; } - - var originalSocketEmit = socket.emit; - socket.emit = function(event) { - connection._debug('||| Socket Event \'%s\'', event); - originalSocketEmit.apply(this, arguments); - }; - - for (var key in socket) { - if ('function' !== typeof(socket[key])) { continue; } - if (['emit'].indexOf(key) !== -1) { continue; } - (function(key) { - var original = socket[key]; - if (key === 'on') { - socket[key] = function proxyMethod__EventEmitter__On() { - connection._debug('||| Socket method called: %s (%s)', key, arguments[0]); - return original.apply(this, arguments); - }; - return; - } - socket[key] = function proxyMethod() { - connection._debug('||| Socket method called: %s', key); - return original.apply(this, arguments); - }; - })(key); - } -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketFrame.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketFrame.js deleted file mode 100644 index 3573c37..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketFrame.js +++ /dev/null @@ -1,279 +0,0 @@ -/************************************************************************ - * Copyright 2010-2011 Worlize Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ***********************************************************************/ - -var bufferUtil = require('./BufferUtil').BufferUtil; - -const DECODE_HEADER = 1; -const WAITING_FOR_16_BIT_LENGTH = 2; -const WAITING_FOR_64_BIT_LENGTH = 3; -const WAITING_FOR_MASK_KEY = 4; -const WAITING_FOR_PAYLOAD = 5; -const COMPLETE = 6; - -// WebSocketConnection will pass shared buffer objects for maskBytes and -// frameHeader into the constructor to avoid tons of small memory allocations -// for each frame we have to parse. This is only used for parsing frames -// we receive off the wire. -function WebSocketFrame(maskBytes, frameHeader, config) { - this.maskBytes = maskBytes; - this.frameHeader = frameHeader; - this.config = config; - this.maxReceivedFrameSize = config.maxReceivedFrameSize; - this.protocolError = false; - this.frameTooLarge = false; - this.invalidCloseFrameLength = false; - this.parseState = DECODE_HEADER; - this.closeStatus = -1; -} - -WebSocketFrame.prototype.addData = function(bufferList) { - if (this.parseState === DECODE_HEADER) { - if (bufferList.length >= 2) { - bufferList.joinInto(this.frameHeader, 0, 0, 2); - bufferList.advance(2); - var firstByte = this.frameHeader[0]; - var secondByte = this.frameHeader[1]; - - this.fin = Boolean(firstByte & 0x80); - this.rsv1 = Boolean(firstByte & 0x40); - this.rsv2 = Boolean(firstByte & 0x20); - this.rsv3 = Boolean(firstByte & 0x10); - this.mask = Boolean(secondByte & 0x80); - - this.opcode = firstByte & 0x0F; - this.length = secondByte & 0x7F; - - // Control frame sanity check - if (this.opcode >= 0x08) { - if (this.length > 125) { - this.protocolError = true; - this.dropReason = 'Illegal control frame longer than 125 bytes.'; - return true; - } - if (!this.fin) { - this.protocolError = true; - this.dropReason = 'Control frames must not be fragmented.'; - return true; - } - } - - if (this.length === 126) { - this.parseState = WAITING_FOR_16_BIT_LENGTH; - } - else if (this.length === 127) { - this.parseState = WAITING_FOR_64_BIT_LENGTH; - } - else { - this.parseState = WAITING_FOR_MASK_KEY; - } - } - } - if (this.parseState === WAITING_FOR_16_BIT_LENGTH) { - if (bufferList.length >= 2) { - bufferList.joinInto(this.frameHeader, 2, 0, 2); - bufferList.advance(2); - this.length = this.frameHeader.readUInt16BE(2, true); - this.parseState = WAITING_FOR_MASK_KEY; - } - } - else if (this.parseState === WAITING_FOR_64_BIT_LENGTH) { - if (bufferList.length >= 8) { - bufferList.joinInto(this.frameHeader, 2, 0, 8); - bufferList.advance(8); - var lengthPair = [ - this.frameHeader.readUInt32BE(2, true), - this.frameHeader.readUInt32BE(2+4, true) - ]; - - if (lengthPair[0] !== 0) { - this.protocolError = true; - this.dropReason = 'Unsupported 64-bit length frame received'; - return true; - } - this.length = lengthPair[1]; - this.parseState = WAITING_FOR_MASK_KEY; - } - } - - if (this.parseState === WAITING_FOR_MASK_KEY) { - if (this.mask) { - if (bufferList.length >= 4) { - bufferList.joinInto(this.maskBytes, 0, 0, 4); - bufferList.advance(4); - this.parseState = WAITING_FOR_PAYLOAD; - } - } - else { - this.parseState = WAITING_FOR_PAYLOAD; - } - } - - if (this.parseState === WAITING_FOR_PAYLOAD) { - if (this.length > this.maxReceivedFrameSize) { - this.frameTooLarge = true; - this.dropReason = 'Frame size of ' + this.length.toString(10) + - ' bytes exceeds maximum accepted frame size'; - return true; - } - - if (this.length === 0) { - this.binaryPayload = new Buffer(0); - this.parseState = COMPLETE; - return true; - } - if (bufferList.length >= this.length) { - this.binaryPayload = bufferList.take(this.length); - bufferList.advance(this.length); - if (this.mask) { - bufferUtil.unmask(this.binaryPayload, this.maskBytes); - // xor(this.binaryPayload, this.maskBytes, 0); - } - - if (this.opcode === 0x08) { // WebSocketOpcode.CONNECTION_CLOSE - if (this.length === 1) { - // Invalid length for a close frame. Must be zero or at least two. - this.binaryPayload = new Buffer(0); - this.invalidCloseFrameLength = true; - } - if (this.length >= 2) { - this.closeStatus = this.binaryPayload.readUInt16BE(0, true); - this.binaryPayload = this.binaryPayload.slice(2); - } - } - - this.parseState = COMPLETE; - return true; - } - } - return false; -}; - -WebSocketFrame.prototype.throwAwayPayload = function(bufferList) { - if (bufferList.length >= this.length) { - bufferList.advance(this.length); - this.parseState = COMPLETE; - return true; - } - return false; -}; - -WebSocketFrame.prototype.toBuffer = function(nullMask) { - var maskKey; - var headerLength = 2; - var data; - var outputPos; - var firstByte = 0x00; - var secondByte = 0x00; - - if (this.fin) { - firstByte |= 0x80; - } - if (this.rsv1) { - firstByte |= 0x40; - } - if (this.rsv2) { - firstByte |= 0x20; - } - if (this.rsv3) { - firstByte |= 0x10; - } - if (this.mask) { - secondByte |= 0x80; - } - - firstByte |= (this.opcode & 0x0F); - - // the close frame is a special case because the close reason is - // prepended to the payload data. - if (this.opcode === 0x08) { - this.length = 2; - if (this.binaryPayload) { - this.length += this.binaryPayload.length; - } - data = new Buffer(this.length); - data.writeUInt16BE(this.closeStatus, 0, true); - if (this.length > 2) { - this.binaryPayload.copy(data, 2); - } - } - else if (this.binaryPayload) { - data = this.binaryPayload; - this.length = data.length; - } - else { - this.length = 0; - } - - if (this.length <= 125) { - // encode the length directly into the two-byte frame header - secondByte |= (this.length & 0x7F); - } - else if (this.length > 125 && this.length <= 0xFFFF) { - // Use 16-bit length - secondByte |= 126; - headerLength += 2; - } - else if (this.length > 0xFFFF) { - // Use 64-bit length - secondByte |= 127; - headerLength += 8; - } - - var output = new Buffer(this.length + headerLength + (this.mask ? 4 : 0)); - - // write the frame header - output[0] = firstByte; - output[1] = secondByte; - - outputPos = 2; - - if (this.length > 125 && this.length <= 0xFFFF) { - // write 16-bit length - output.writeUInt16BE(this.length, outputPos, true); - outputPos += 2; - } - else if (this.length > 0xFFFF) { - // write 64-bit length - output.writeUInt32BE(0x00000000, outputPos, true); - output.writeUInt32BE(this.length, outputPos + 4, true); - outputPos += 8; - } - - if (this.mask) { - maskKey = nullMask ? 0 : (Math.random()*0xFFFFFFFF) | 0; - this.maskBytes.writeUInt32BE(maskKey, 0, true); - - // write the mask key - this.maskBytes.copy(output, outputPos); - outputPos += 4; - - if (data) { - bufferUtil.mask(data, this.maskBytes, output, outputPos, this.length); - } - } - else if (data) { - data.copy(output, outputPos); - } - - return output; -}; - -WebSocketFrame.prototype.toString = function() { - return 'Opcode: ' + this.opcode + ', fin: ' + this.fin + ', length: ' + this.length + ', hasPayload: ' + Boolean(this.binaryPayload) + ', masked: ' + this.mask; -}; - - -module.exports = WebSocketFrame; diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketRequest.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketRequest.js deleted file mode 100644 index c2145b9..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketRequest.js +++ /dev/null @@ -1,524 +0,0 @@ -/************************************************************************ - * Copyright 2010-2011 Worlize Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ***********************************************************************/ - -var crypto = require('crypto'); -var util = require('util'); -var url = require('url'); -var EventEmitter = require('events').EventEmitter; -var WebSocketConnection = require('./WebSocketConnection'); - -var headerValueSplitRegExp = /,\s*/; -var headerParamSplitRegExp = /;\s*/; -var headerSanitizeRegExp = /[\r\n]/g; -var xForwardedForSeparatorRegExp = /,\s*/; -var separators = [ - '(', ')', '<', '>', '@', - ',', ';', ':', '\\', '\"', - '/', '[', ']', '?', '=', - '{', '}', ' ', String.fromCharCode(9) -]; -var controlChars = [String.fromCharCode(127) /* DEL */]; -for (var i=0; i < 31; i ++) { - /* US-ASCII Control Characters */ - controlChars.push(String.fromCharCode(i)); -} - -var cookieNameValidateRegEx = /([\x00-\x20\x22\x28\x29\x2c\x2f\x3a-\x3f\x40\x5b-\x5e\x7b\x7d\x7f])/; -var cookieValueValidateRegEx = /[^\x21\x23-\x2b\x2d-\x3a\x3c-\x5b\x5d-\x7e]/; -var cookieValueDQuoteValidateRegEx = /^"[^"]*"$/; -var controlCharsAndSemicolonRegEx = /[\x00-\x20\x3b]/g; - -var cookieSeparatorRegEx = /[;,] */; - -var httpStatusDescriptions = { - 100: 'Continue', - 101: 'Switching Protocols', - 200: 'OK', - 201: 'Created', - 203: 'Non-Authoritative Information', - 204: 'No Content', - 205: 'Reset Content', - 206: 'Partial Content', - 300: 'Multiple Choices', - 301: 'Moved Permanently', - 302: 'Found', - 303: 'See Other', - 304: 'Not Modified', - 305: 'Use Proxy', - 307: 'Temporary Redirect', - 400: 'Bad Request', - 401: 'Unauthorized', - 402: 'Payment Required', - 403: 'Forbidden', - 404: 'Not Found', - 406: 'Not Acceptable', - 407: 'Proxy Authorization Required', - 408: 'Request Timeout', - 409: 'Conflict', - 410: 'Gone', - 411: 'Length Required', - 412: 'Precondition Failed', - 413: 'Request Entity Too Long', - 414: 'Request-URI Too Long', - 415: 'Unsupported Media Type', - 416: 'Requested Range Not Satisfiable', - 417: 'Expectation Failed', - 426: 'Upgrade Required', - 500: 'Internal Server Error', - 501: 'Not Implemented', - 502: 'Bad Gateway', - 503: 'Service Unavailable', - 504: 'Gateway Timeout', - 505: 'HTTP Version Not Supported' -}; - -function WebSocketRequest(socket, httpRequest, serverConfig) { - // Superclass Constructor - EventEmitter.call(this); - - this.socket = socket; - this.httpRequest = httpRequest; - this.resource = httpRequest.url; - this.remoteAddress = socket.remoteAddress; - this.remoteAddresses = [this.remoteAddress]; - this.serverConfig = serverConfig; - - // Watch for the underlying TCP socket closing before we call accept - this._socketIsClosing = false; - this._socketCloseHandler = this._handleSocketCloseBeforeAccept.bind(this); - this.socket.on('end', this._socketCloseHandler); - this.socket.on('close', this._socketCloseHandler); - - this._resolved = false; -} - -util.inherits(WebSocketRequest, EventEmitter); - -WebSocketRequest.prototype.readHandshake = function() { - var self = this; - var request = this.httpRequest; - - // Decode URL - this.resourceURL = url.parse(this.resource, true); - - this.host = request.headers['host']; - if (!this.host) { - throw new Error('Client must provide a Host header.'); - } - - this.key = request.headers['sec-websocket-key']; - if (!this.key) { - throw new Error('Client must provide a value for Sec-WebSocket-Key.'); - } - - this.webSocketVersion = parseInt(request.headers['sec-websocket-version'], 10); - - if (!this.webSocketVersion || isNaN(this.webSocketVersion)) { - throw new Error('Client must provide a value for Sec-WebSocket-Version.'); - } - - switch (this.webSocketVersion) { - case 8: - case 13: - break; - default: - var e = new Error('Unsupported websocket client version: ' + this.webSocketVersion + - 'Only versions 8 and 13 are supported.'); - e.httpCode = 426; - e.headers = { - 'Sec-WebSocket-Version': '13' - }; - throw e; - } - - if (this.webSocketVersion === 13) { - this.origin = request.headers['origin']; - } - else if (this.webSocketVersion === 8) { - this.origin = request.headers['sec-websocket-origin']; - } - - // Protocol is optional. - var protocolString = request.headers['sec-websocket-protocol']; - this.protocolFullCaseMap = {}; - this.requestedProtocols = []; - if (protocolString) { - var requestedProtocolsFullCase = protocolString.split(headerValueSplitRegExp); - requestedProtocolsFullCase.forEach(function(protocol) { - var lcProtocol = protocol.toLocaleLowerCase(); - self.requestedProtocols.push(lcProtocol); - self.protocolFullCaseMap[lcProtocol] = protocol; - }); - } - - if (!this.serverConfig.ignoreXForwardedFor && - request.headers['x-forwarded-for']) { - var immediatePeerIP = this.remoteAddress; - this.remoteAddresses = request.headers['x-forwarded-for'] - .split(xForwardedForSeparatorRegExp); - this.remoteAddresses.push(immediatePeerIP); - this.remoteAddress = this.remoteAddresses[0]; - } - - // Extensions are optional. - var extensionsString = request.headers['sec-websocket-extensions']; - this.requestedExtensions = this.parseExtensions(extensionsString); - - // Cookies are optional - var cookieString = request.headers['cookie']; - this.cookies = this.parseCookies(cookieString); -}; - -WebSocketRequest.prototype.parseExtensions = function(extensionsString) { - if (!extensionsString || extensionsString.length === 0) { - return []; - } - var extensions = extensionsString.toLocaleLowerCase().split(headerValueSplitRegExp); - extensions.forEach(function(extension, index, array) { - var params = extension.split(headerParamSplitRegExp); - var extensionName = params[0]; - var extensionParams = params.slice(1); - extensionParams.forEach(function(rawParam, index, array) { - var arr = rawParam.split('='); - var obj = { - name: arr[0], - value: arr[1] - }; - array.splice(index, 1, obj); - }); - var obj = { - name: extensionName, - params: extensionParams - }; - array.splice(index, 1, obj); - }); - return extensions; -}; - -// This function adapted from node-cookie -// https://github.com/shtylman/node-cookie -WebSocketRequest.prototype.parseCookies = function(str) { - // Sanity Check - if (!str || typeof(str) !== 'string') { - return []; - } - - var cookies = []; - var pairs = str.split(cookieSeparatorRegEx); - - pairs.forEach(function(pair) { - var eq_idx = pair.indexOf('='); - if (eq_idx === -1) { - cookies.push({ - name: pair, - value: null - }); - return; - } - - var key = pair.substr(0, eq_idx).trim(); - var val = pair.substr(++eq_idx, pair.length).trim(); - - // quoted values - if ('"' === val[0]) { - val = val.slice(1, -1); - } - - cookies.push({ - name: key, - value: decodeURIComponent(val) - }); - }); - - return cookies; -}; - -WebSocketRequest.prototype.accept = function(acceptedProtocol, allowedOrigin, cookies) { - this._verifyResolution(); - - // TODO: Handle extensions - - var protocolFullCase; - - if (acceptedProtocol) { - protocolFullCase = this.protocolFullCaseMap[acceptedProtocol.toLocaleLowerCase()]; - if (typeof(protocolFullCase) === 'undefined') { - protocolFullCase = acceptedProtocol; - } - } - else { - protocolFullCase = acceptedProtocol; - } - this.protocolFullCaseMap = null; - - // Create key validation hash - var sha1 = crypto.createHash('sha1'); - sha1.update(this.key + '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'); - var acceptKey = sha1.digest('base64'); - - var response = 'HTTP/1.1 101 Switching Protocols\r\n' + - 'Upgrade: websocket\r\n' + - 'Connection: Upgrade\r\n' + - 'Sec-WebSocket-Accept: ' + acceptKey + '\r\n'; - - if (protocolFullCase) { - // validate protocol - for (var i=0; i < protocolFullCase.length; i++) { - var charCode = protocolFullCase.charCodeAt(i); - var character = protocolFullCase.charAt(i); - if (charCode < 0x21 || charCode > 0x7E || separators.indexOf(character) !== -1) { - this.reject(500); - throw new Error('Illegal character "' + String.fromCharCode(character) + '" in subprotocol.'); - } - } - if (this.requestedProtocols.indexOf(acceptedProtocol) === -1) { - this.reject(500); - throw new Error('Specified protocol was not requested by the client.'); - } - - protocolFullCase = protocolFullCase.replace(headerSanitizeRegExp, ''); - response += 'Sec-WebSocket-Protocol: ' + protocolFullCase + '\r\n'; - } - this.requestedProtocols = null; - - if (allowedOrigin) { - allowedOrigin = allowedOrigin.replace(headerSanitizeRegExp, ''); - if (this.webSocketVersion === 13) { - response += 'Origin: ' + allowedOrigin + '\r\n'; - } - else if (this.webSocketVersion === 8) { - response += 'Sec-WebSocket-Origin: ' + allowedOrigin + '\r\n'; - } - } - - if (cookies) { - if (!Array.isArray(cookies)) { - this.reject(500); - throw new Error('Value supplied for "cookies" argument must be an array.'); - } - var seenCookies = {}; - cookies.forEach(function(cookie) { - if (!cookie.name || !cookie.value) { - this.reject(500); - throw new Error('Each cookie to set must at least provide a "name" and "value"'); - } - - // Make sure there are no \r\n sequences inserted - cookie.name = cookie.name.replace(controlCharsAndSemicolonRegEx, ''); - cookie.value = cookie.value.replace(controlCharsAndSemicolonRegEx, ''); - - if (seenCookies[cookie.name]) { - this.reject(500); - throw new Error('You may not specify the same cookie name twice.'); - } - seenCookies[cookie.name] = true; - - // token (RFC 2616, Section 2.2) - var invalidChar = cookie.name.match(cookieNameValidateRegEx); - if (invalidChar) { - this.reject(500); - throw new Error('Illegal character ' + invalidChar[0] + ' in cookie name'); - } - - // RFC 6265, Section 4.1.1 - // *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) | %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E - if (cookie.value.match(cookieValueDQuoteValidateRegEx)) { - invalidChar = cookie.value.slice(1, -1).match(cookieValueValidateRegEx); - } else { - invalidChar = cookie.value.match(cookieValueValidateRegEx); - } - if (invalidChar) { - this.reject(500); - throw new Error('Illegal character ' + invalidChar[0] + ' in cookie value'); - } - - var cookieParts = [cookie.name + '=' + cookie.value]; - - // RFC 6265, Section 4.1.1 - // 'Path=' path-value | - if(cookie.path){ - invalidChar = cookie.path.match(controlCharsAndSemicolonRegEx); - if (invalidChar) { - this.reject(500); - throw new Error('Illegal character ' + invalidChar[0] + ' in cookie path'); - } - cookieParts.push('Path=' + cookie.path); - } - - // RFC 6265, Section 4.1.2.3 - // 'Domain=' subdomain - if (cookie.domain) { - if (typeof(cookie.domain) !== 'string') { - this.reject(500); - throw new Error('Domain must be specified and must be a string.'); - } - invalidChar = cookie.domain.match(controlCharsAndSemicolonRegEx); - if (invalidChar) { - this.reject(500); - throw new Error('Illegal character ' + invalidChar[0] + ' in cookie domain'); - } - cookieParts.push('Domain=' + cookie.domain.toLowerCase()); - } - - // RFC 6265, Section 4.1.1 - //'Expires=' sane-cookie-date | Force Date object requirement by using only epoch - if (cookie.expires) { - if (!(cookie.expires instanceof Date)){ - this.reject(500); - throw new Error('Value supplied for cookie "expires" must be a vaild date object'); - } - cookieParts.push('Expires=' + cookie.expires.toGMTString()); - } - - // RFC 6265, Section 4.1.1 - //'Max-Age=' non-zero-digit *DIGIT - if (cookie.maxage) { - var maxage = cookie.maxage; - if (typeof(maxage) === 'string') { - maxage = parseInt(maxage, 10); - } - if (isNaN(maxage) || maxage <= 0 ) { - this.reject(500); - throw new Error('Value supplied for cookie "maxage" must be a non-zero number'); - } - maxage = Math.round(maxage); - cookieParts.push('Max-Age=' + maxage.toString(10)); - } - - // RFC 6265, Section 4.1.1 - //'Secure;' - if (cookie.secure) { - if (typeof(cookie.secure) !== 'boolean') { - this.reject(500); - throw new Error('Value supplied for cookie "secure" must be of type boolean'); - } - cookieParts.push('Secure'); - } - - // RFC 6265, Section 4.1.1 - //'HttpOnly;' - if (cookie.httponly) { - if (typeof(cookie.httponly) !== 'boolean') { - this.reject(500); - throw new Error('Value supplied for cookie "httponly" must be of type boolean'); - } - cookieParts.push('HttpOnly'); - } - - response += ('Set-Cookie: ' + cookieParts.join(';') + '\r\n'); - }.bind(this)); - } - - // TODO: handle negotiated extensions - // if (negotiatedExtensions) { - // response += 'Sec-WebSocket-Extensions: ' + negotiatedExtensions.join(', ') + '\r\n'; - // } - - // Mark the request resolved now so that the user can't call accept or - // reject a second time. - this._resolved = true; - this.emit('requestResolved', this); - - response += '\r\n'; - - var connection = new WebSocketConnection(this.socket, [], acceptedProtocol, false, this.serverConfig); - connection.webSocketVersion = this.webSocketVersion; - connection.remoteAddress = this.remoteAddress; - connection.remoteAddresses = this.remoteAddresses; - - var self = this; - - if (this._socketIsClosing) { - // Handle case when the client hangs up before we get a chance to - // accept the connection and send our side of the opening handshake. - cleanupFailedConnection(connection); - } - else { - this.socket.write(response, 'ascii', function(error) { - if (error) { - cleanupFailedConnection(connection); - return; - } - - self._removeSocketCloseListeners(); - connection._addSocketEventListeners(); - }); - } - - this.emit('requestAccepted', connection); - return connection; -}; - -WebSocketRequest.prototype.reject = function(status, reason, extraHeaders) { - this._verifyResolution(); - - // Mark the request resolved now so that the user can't call accept or - // reject a second time. - this._resolved = true; - this.emit('requestResolved', this); - - if (typeof(status) !== 'number') { - status = 403; - } - var response = 'HTTP/1.1 ' + status + ' ' + httpStatusDescriptions[status] + '\r\n' + - 'Connection: close\r\n'; - if (reason) { - reason = reason.replace(headerSanitizeRegExp, ''); - response += 'X-WebSocket-Reject-Reason: ' + reason + '\r\n'; - } - - if (extraHeaders) { - for (var key in extraHeaders) { - var sanitizedValue = extraHeaders[key].toString().replace(headerSanitizeRegExp, ''); - var sanitizedKey = key.replace(headerSanitizeRegExp, ''); - response += (sanitizedKey + ': ' + sanitizedValue + '\r\n'); - } - } - - response += '\r\n'; - this.socket.end(response, 'ascii'); - - this.emit('requestRejected', this); -}; - -WebSocketRequest.prototype._handleSocketCloseBeforeAccept = function() { - this._socketIsClosing = true; - this._removeSocketCloseListeners(); -}; - -WebSocketRequest.prototype._removeSocketCloseListeners = function() { - this.socket.removeListener('end', this._socketCloseHandler); - this.socket.removeListener('close', this._socketCloseHandler); -}; - -WebSocketRequest.prototype._verifyResolution = function() { - if (this._resolved) { - throw new Error('WebSocketRequest may only be accepted or rejected one time.'); - } -}; - -function cleanupFailedConnection(connection) { - // Since we have to return a connection object even if the socket is - // already dead in order not to break the API, we schedule a 'close' - // event on the connection object to occur immediately. - process.nextTick(function() { - // WebSocketConnection.CLOSE_REASON_ABNORMAL = 1006 - // Third param: Skip sending the close frame to a dead socket - connection.drop(1006, 'TCP connection lost before handshake completed.', true); - }); -} - -module.exports = WebSocketRequest; diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketRouter.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketRouter.js deleted file mode 100644 index 9d80a9a..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketRouter.js +++ /dev/null @@ -1,157 +0,0 @@ -/************************************************************************ - * Copyright 2010-2011 Worlize Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ***********************************************************************/ - -var extend = require('./utils').extend; -var util = require('util'); -var EventEmitter = require('events').EventEmitter; -var WebSocketRouterRequest = require('./WebSocketRouterRequest'); - -function WebSocketRouter(config) { - // Superclass Constructor - EventEmitter.call(this); - - this.config = { - // The WebSocketServer instance to attach to. - server: null - }; - if (config) { - extend(this.config, config); - } - this.handlers = []; - - this._requestHandler = this.handleRequest.bind(this); - if (this.config.server) { - this.attachServer(this.config.server); - } -} - -util.inherits(WebSocketRouter, EventEmitter); - -WebSocketRouter.prototype.attachServer = function(server) { - if (server) { - this.server = server; - this.server.on('request', this._requestHandler); - } - else { - throw new Error('You must specify a WebSocketServer instance to attach to.'); - } -}; - -WebSocketRouter.prototype.detachServer = function() { - if (this.server) { - this.server.removeListener('request', this._requestHandler); - this.server = null; - } - else { - throw new Error('Cannot detach from server: not attached.'); - } -}; - -WebSocketRouter.prototype.mount = function(path, protocol, callback) { - if (!path) { - throw new Error('You must specify a path for this handler.'); - } - if (!protocol) { - protocol = '____no_protocol____'; - } - if (!callback) { - throw new Error('You must specify a callback for this handler.'); - } - - path = this.pathToRegExp(path); - if (!(path instanceof RegExp)) { - throw new Error('Path must be specified as either a string or a RegExp.'); - } - var pathString = path.toString(); - - // normalize protocol to lower-case - protocol = protocol.toLocaleLowerCase(); - - if (this.findHandlerIndex(pathString, protocol) !== -1) { - throw new Error('You may only mount one handler per path/protocol combination.'); - } - - this.handlers.push({ - 'path': path, - 'pathString': pathString, - 'protocol': protocol, - 'callback': callback - }); -}; -WebSocketRouter.prototype.unmount = function(path, protocol) { - var index = this.findHandlerIndex(this.pathToRegExp(path).toString(), protocol); - if (index !== -1) { - this.handlers.splice(index, 1); - } - else { - throw new Error('Unable to find a route matching the specified path and protocol.'); - } -}; - -WebSocketRouter.prototype.findHandlerIndex = function(pathString, protocol) { - protocol = protocol.toLocaleLowerCase(); - for (var i=0, len=this.handlers.length; i < len; i++) { - var handler = this.handlers[i]; - if (handler.pathString === pathString && handler.protocol === protocol) { - return i; - } - } - return -1; -}; - -WebSocketRouter.prototype.pathToRegExp = function(path) { - if (typeof(path) === 'string') { - if (path === '*') { - path = /^.*$/; - } - else { - path = path.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); - path = new RegExp('^' + path + '$'); - } - } - return path; -}; - -WebSocketRouter.prototype.handleRequest = function(request) { - var requestedProtocols = request.requestedProtocols; - if (requestedProtocols.length === 0) { - requestedProtocols = ['____no_protocol____']; - } - - // Find a handler with the first requested protocol first - for (var i=0; i < requestedProtocols.length; i++) { - var requestedProtocol = requestedProtocols[i].toLocaleLowerCase(); - - // find the first handler that can process this request - for (var j=0, len=this.handlers.length; j < len; j++) { - var handler = this.handlers[j]; - if (handler.path.test(request.resourceURL.pathname)) { - if (requestedProtocol === handler.protocol || - handler.protocol === '*') - { - var routerRequest = new WebSocketRouterRequest(request, requestedProtocol); - handler.callback(routerRequest); - return; - } - } - } - } - - // If we get here we were unable to find a suitable handler. - request.reject(404, 'No handler is available for the given request.'); -}; - -module.exports = WebSocketRouter; diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketRouterRequest.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketRouterRequest.js deleted file mode 100644 index 7f5c9e4..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketRouterRequest.js +++ /dev/null @@ -1,54 +0,0 @@ -/************************************************************************ - * Copyright 2010-2011 Worlize Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ***********************************************************************/ - -var util = require('util'); -var EventEmitter = require('events').EventEmitter; - -function WebSocketRouterRequest(webSocketRequest, resolvedProtocol) { - // Superclass Constructor - EventEmitter.call(this); - - this.webSocketRequest = webSocketRequest; - if (resolvedProtocol === '____no_protocol____') { - this.protocol = null; - } - else { - this.protocol = resolvedProtocol; - } - this.origin = webSocketRequest.origin; - this.resource = webSocketRequest.resource; - this.resourceURL = webSocketRequest.resourceURL; - this.httpRequest = webSocketRequest.httpRequest; - this.remoteAddress = webSocketRequest.remoteAddress; - this.webSocketVersion = webSocketRequest.webSocketVersion; - this.requestedExtensions = webSocketRequest.requestedExtensions; - this.cookies = webSocketRequest.cookies; -} - -util.inherits(WebSocketRouterRequest, EventEmitter); - -WebSocketRouterRequest.prototype.accept = function(origin, cookies) { - var connection = this.webSocketRequest.accept(this.protocol, origin, cookies); - this.emit('requestAccepted', connection); - return connection; -}; - -WebSocketRouterRequest.prototype.reject = function(status, reason, extraHeaders) { - this.webSocketRequest.reject(status, reason, extraHeaders); - this.emit('requestRejected', this); -}; - -module.exports = WebSocketRouterRequest; diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketServer.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketServer.js deleted file mode 100644 index 62b1cc2..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketServer.js +++ /dev/null @@ -1,245 +0,0 @@ -/************************************************************************ - * Copyright 2010-2011 Worlize Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ***********************************************************************/ - -var extend = require('./utils').extend; -var utils = require('./utils'); -var util = require('util'); -var debug = require('debug')('websocket:server'); -var EventEmitter = require('events').EventEmitter; -var WebSocketRequest = require('./WebSocketRequest'); - -var WebSocketServer = function WebSocketServer(config) { - // Superclass Constructor - EventEmitter.call(this); - - this._handlers = { - upgrade: this.handleUpgrade.bind(this), - requestAccepted: this.handleRequestAccepted.bind(this), - requestResolved: this.handleRequestResolved.bind(this) - }; - this.connections = []; - this.pendingRequests = []; - if (config) { - this.mount(config); - } -}; - -util.inherits(WebSocketServer, EventEmitter); - -WebSocketServer.prototype.mount = function(config) { - this.config = { - // The http server instance to attach to. Required. - httpServer: null, - - // 64KiB max frame size. - maxReceivedFrameSize: 0x10000, - - // 1MiB max message size, only applicable if - // assembleFragments is true - maxReceivedMessageSize: 0x100000, - - // Outgoing messages larger than fragmentationThreshold will be - // split into multiple fragments. - fragmentOutgoingMessages: true, - - // Outgoing frames are fragmented if they exceed this threshold. - // Default is 16KiB - fragmentationThreshold: 0x4000, - - // If true, the server will automatically send a ping to all - // clients every 'keepaliveInterval' milliseconds. The timer is - // reset on any received data from the client. - keepalive: true, - - // The interval to send keepalive pings to connected clients if the - // connection is idle. Any received data will reset the counter. - keepaliveInterval: 20000, - - // If true, the server will consider any connection that has not - // received any data within the amount of time specified by - // 'keepaliveGracePeriod' after a keepalive ping has been sent to - // be dead, and will drop the connection. - // Ignored if keepalive is false. - dropConnectionOnKeepaliveTimeout: true, - - // The amount of time to wait after sending a keepalive ping before - // closing the connection if the connected peer does not respond. - // Ignored if keepalive is false. - keepaliveGracePeriod: 10000, - - // Whether to use native TCP keep-alive instead of WebSockets ping - // and pong packets. Native TCP keep-alive sends smaller packets - // on the wire and so uses bandwidth more efficiently. This may - // be more important when talking to mobile devices. - // If this value is set to true, then these values will be ignored: - // keepaliveGracePeriod - // dropConnectionOnKeepaliveTimeout - useNativeKeepalive: false, - - // If true, fragmented messages will be automatically assembled - // and the full message will be emitted via a 'message' event. - // If false, each frame will be emitted via a 'frame' event and - // the application will be responsible for aggregating multiple - // fragmented frames. Single-frame messages will emit a 'message' - // event in addition to the 'frame' event. - // Most users will want to leave this set to 'true' - assembleFragments: true, - - // If this is true, websocket connections will be accepted - // regardless of the path and protocol specified by the client. - // The protocol accepted will be the first that was requested - // by the client. Clients from any origin will be accepted. - // This should only be used in the simplest of cases. You should - // probably leave this set to 'false' and inspect the request - // object to make sure it's acceptable before accepting it. - autoAcceptConnections: false, - - // Whether or not the X-Forwarded-For header should be respected. - // It's important to set this to 'true' when accepting connections - // from untrusted clients, as a malicious client could spoof its - // IP address by simply setting this header. It's meant to be added - // by a trusted proxy or other intermediary within your own - // infrastructure. - // See: http://en.wikipedia.org/wiki/X-Forwarded-For - ignoreXForwardedFor: false, - - // The Nagle Algorithm makes more efficient use of network resources - // by introducing a small delay before sending small packets so that - // multiple messages can be batched together before going onto the - // wire. This however comes at the cost of latency, so the default - // is to disable it. If you don't need low latency and are streaming - // lots of small messages, you can change this to 'false' - disableNagleAlgorithm: true, - - // The number of milliseconds to wait after sending a close frame - // for an acknowledgement to come back before giving up and just - // closing the socket. - closeTimeout: 5000 - }; - extend(this.config, config); - - if (this.config.httpServer) { - if (!Array.isArray(this.config.httpServer)) { - this.config.httpServer = [this.config.httpServer]; - } - var upgradeHandler = this._handlers.upgrade; - this.config.httpServer.forEach(function(httpServer) { - httpServer.on('upgrade', upgradeHandler); - }); - } - else { - throw new Error('You must specify an httpServer on which to mount the WebSocket server.'); - } -}; - -WebSocketServer.prototype.unmount = function() { - var upgradeHandler = this._handlers.upgrade; - this.config.httpServer.forEach(function(httpServer) { - httpServer.removeListener('upgrade', upgradeHandler); - }); -}; - -WebSocketServer.prototype.closeAllConnections = function() { - this.connections.forEach(function(connection) { - connection.close(); - }); - this.pendingRequests.forEach(function(request) { - process.nextTick(function() { - request.reject(503); // HTTP 503 Service Unavailable - }); - }); -}; - -WebSocketServer.prototype.broadcast = function(data) { - if (Buffer.isBuffer(data)) { - this.broadcastBytes(data); - } - else if (typeof(data.toString) === 'function') { - this.broadcastUTF(data); - } -}; - -WebSocketServer.prototype.broadcastUTF = function(utfData) { - this.connections.forEach(function(connection) { - connection.sendUTF(utfData); - }); -}; - -WebSocketServer.prototype.broadcastBytes = function(binaryData) { - this.connections.forEach(function(connection) { - connection.sendBytes(binaryData); - }); -}; - -WebSocketServer.prototype.shutDown = function() { - this.unmount(); - this.closeAllConnections(); -}; - -WebSocketServer.prototype.handleUpgrade = function(request, socket) { - var wsRequest = new WebSocketRequest(socket, request, this.config); - try { - wsRequest.readHandshake(); - } - catch(e) { - wsRequest.reject( - e.httpCode ? e.httpCode : 400, - e.message, - e.headers - ); - debug('Invalid handshake: %s', e.message); - return; - } - - this.pendingRequests.push(wsRequest); - - wsRequest.once('requestAccepted', this._handlers.requestAccepted); - wsRequest.once('requestResolved', this._handlers.requestResolved); - - if (!this.config.autoAcceptConnections && utils.eventEmitterListenerCount(this, 'request') > 0) { - this.emit('request', wsRequest); - } - else if (this.config.autoAcceptConnections) { - wsRequest.accept(wsRequest.requestedProtocols[0], wsRequest.origin); - } - else { - wsRequest.reject(404, 'No handler is configured to accept the connection.'); - } -}; - -WebSocketServer.prototype.handleRequestAccepted = function(connection) { - var self = this; - connection.once('close', function(closeReason, description) { - self.handleConnectionClose(connection, closeReason, description); - }); - this.connections.push(connection); - this.emit('connect', connection); -}; - -WebSocketServer.prototype.handleConnectionClose = function(connection, closeReason, description) { - var index = this.connections.indexOf(connection); - if (index !== -1) { - this.connections.splice(index, 1); - } - this.emit('close', connection, closeReason, description); -}; - -WebSocketServer.prototype.handleRequestResolved = function(request) { - var index = this.pendingRequests.indexOf(request); - if (index !== -1) { this.pendingRequests.splice(index, 1); } -}; - -module.exports = WebSocketServer; diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/browser.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/browser.js deleted file mode 100644 index 7dce5a9..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/browser.js +++ /dev/null @@ -1,35 +0,0 @@ -var _global = (function() { return this; })(); -var nativeWebSocket = _global.WebSocket || _global.MozWebSocket; - - -/** - * Expose a W3C WebSocket class with just one or two arguments. - */ -function W3CWebSocket(uri, protocols) { - var native_instance; - - if (protocols) { - native_instance = new nativeWebSocket(uri, protocols); - } - else { - native_instance = new nativeWebSocket(uri); - } - - /** - * 'native_instance' is an instance of nativeWebSocket (the browser's WebSocket - * class). Since it is an Object it will be returned as it is when creating an - * instance of W3CWebSocket via 'new W3CWebSocket()'. - * - * ECMAScript 5: http://bclary.com/2004/11/07/#a-13.2.2 - */ - return native_instance; -} - - -/** - * Module exports. - */ -module.exports = { - 'w3cwebsocket' : nativeWebSocket ? W3CWebSocket : null, - 'version' : require('./version') -}; diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/utils.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/utils.js deleted file mode 100644 index 6506dc9..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/utils.js +++ /dev/null @@ -1,60 +0,0 @@ -var noop = exports.noop = function(){}; - -exports.extend = function extend(dest, source) { - for (var prop in source) { - dest[prop] = source[prop]; - } -}; - -exports.eventEmitterListenerCount = - require('events').EventEmitter.listenerCount || - function(emitter, type) { return emitter.listeners(type).length; }; - - - - - -exports.BufferingLogger = function createBufferingLogger(identifier, uniqueID) { - var logFunction = require('debug')(identifier); - if (logFunction.enabled) { - var logger = new BufferingLogger(identifier, uniqueID, logFunction); - var debug = logger.log.bind(logger); - debug.printOutput = logger.printOutput.bind(logger); - debug.enabled = logFunction.enabled; - return debug; - } - logFunction.printOutput = noop; - return logFunction; -}; - -function BufferingLogger(identifier, uniqueID, logFunction) { - this.logFunction = logFunction; - this.identifier = identifier; - this.uniqueID = uniqueID; - this.buffer = []; -} - -BufferingLogger.prototype.log = function() { - this.buffer.push([ new Date(), Array.prototype.slice.call(arguments) ]); - return this; -}; - -BufferingLogger.prototype.clear = function() { - this.buffer = []; - return this; -}; - -BufferingLogger.prototype.printOutput = function(logFunction) { - if (!logFunction) { logFunction = this.logFunction; } - var uniqueID = this.uniqueID; - this.buffer.forEach(function(entry) { - var date = entry[0].toLocaleString(); - var args = entry[1].slice(); - var formatString = args[0]; - if (formatString !== (void 0) && formatString !== null) { - formatString = '%s - %s - ' + formatString.toString(); - args.splice(0, 1, formatString, date, uniqueID); - logFunction.apply(global, args); - } - }); -}; diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/version.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/version.js deleted file mode 100644 index 81f6e78..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/version.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../package.json').version; diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/websocket.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/websocket.js deleted file mode 100644 index 6242d56..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/websocket.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - 'server' : require('./WebSocketServer'), - 'client' : require('./WebSocketClient'), - 'router' : require('./WebSocketRouter'), - 'frame' : require('./WebSocketFrame'), - 'request' : require('./WebSocketRequest'), - 'connection' : require('./WebSocketConnection'), - 'w3cwebsocket' : require('./W3CWebSocket'), - 'deprecation' : require('./Deprecation'), - 'version' : require('./version') -}; diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/.jshintrc b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/.jshintrc deleted file mode 100644 index 299877f..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/.jshintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "laxbreak": true -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/.npmignore b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/.npmignore deleted file mode 100644 index 7e6163d..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -support -test -examples -example -*.sock -dist diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/History.md b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/History.md deleted file mode 100644 index 2c40404..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/History.md +++ /dev/null @@ -1,166 +0,0 @@ - -2.1.1 / 2014-12-29 -================== - - * browser: use `typeof` to check for `console` existence - * browser: check for `console.log` truthiness (fix IE 8/9) - * browser: add support for Chrome apps - * Readme: added Windows usage remarks - * Add `bower.json` to properly support bower install - -2.1.0 / 2014-10-15 -================== - - * node: implement `DEBUG_FD` env variable support - * package: update "browserify" to v6.1.0 - * package: add "license" field to package.json (#135, @panuhorsmalahti) - -2.0.0 / 2014-09-01 -================== - - * package: update "browserify" to v5.11.0 - * node: use stderr rather than stdout for logging (#29, @stephenmathieson) - -1.0.4 / 2014-07-15 -================== - - * dist: recompile - * example: remove `console.info()` log usage - * example: add "Content-Type" UTF-8 header to browser example - * browser: place %c marker after the space character - * browser: reset the "content" color via `color: inherit` - * browser: add colors support for Firefox >= v31 - * debug: prefer an instance `log()` function over the global one (#119) - * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) - -1.0.3 / 2014-07-09 -================== - - * Add support for multiple wildcards in namespaces (#122, @seegno) - * browser: fix lint - -1.0.2 / 2014-06-10 -================== - - * browser: update color palette (#113, @gscottolson) - * common: make console logging function configurable (#108, @timoxley) - * node: fix %o colors on old node <= 0.8.x - * Makefile: find node path using shell/which (#109, @timoxley) - -1.0.1 / 2014-06-06 -================== - - * browser: use `removeItem()` to clear localStorage - * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) - * package: add "contributors" section - * node: fix comment typo - * README: list authors - -1.0.0 / 2014-06-04 -================== - - * make ms diff be global, not be scope - * debug: ignore empty strings in enable() - * node: make DEBUG_COLORS able to disable coloring - * *: export the `colors` array - * npmignore: don't publish the `dist` dir - * Makefile: refactor to use browserify - * package: add "browserify" as a dev dependency - * Readme: add Web Inspector Colors section - * node: reset terminal color for the debug content - * node: map "%o" to `util.inspect()` - * browser: map "%j" to `JSON.stringify()` - * debug: add custom "formatters" - * debug: use "ms" module for humanizing the diff - * Readme: add "bash" syntax highlighting - * browser: add Firebug color support - * browser: add colors for WebKit browsers - * node: apply log to `console` - * rewrite: abstract common logic for Node & browsers - * add .jshintrc file - -0.8.1 / 2014-04-14 -================== - - * package: re-add the "component" section - -0.8.0 / 2014-03-30 -================== - - * add `enable()` method for nodejs. Closes #27 - * change from stderr to stdout - * remove unnecessary index.js file - -0.7.4 / 2013-11-13 -================== - - * remove "browserify" key from package.json (fixes something in browserify) - -0.7.3 / 2013-10-30 -================== - - * fix: catch localStorage security error when cookies are blocked (Chrome) - * add debug(err) support. Closes #46 - * add .browser prop to package.json. Closes #42 - -0.7.2 / 2013-02-06 -================== - - * fix package.json - * fix: Mobile Safari (private mode) is broken with debug - * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript - -0.7.1 / 2013-02-05 -================== - - * add repository URL to package.json - * add DEBUG_COLORED to force colored output - * add browserify support - * fix component. Closes #24 - -0.7.0 / 2012-05-04 -================== - - * Added .component to package.json - * Added debug.component.js build - -0.6.0 / 2012-03-16 -================== - - * Added support for "-" prefix in DEBUG [Vinay Pulim] - * Added `.enabled` flag to the node version [TooTallNate] - -0.5.0 / 2012-02-02 -================== - - * Added: humanize diffs. Closes #8 - * Added `debug.disable()` to the CS variant - * Removed padding. Closes #10 - * Fixed: persist client-side variant again. Closes #9 - -0.4.0 / 2012-02-01 -================== - - * Added browser variant support for older browsers [TooTallNate] - * Added `debug.enable('project:*')` to browser variant [TooTallNate] - * Added padding to diff (moved it to the right) - -0.3.0 / 2012-01-26 -================== - - * Added millisecond diff when isatty, otherwise UTC string - -0.2.0 / 2012-01-22 -================== - - * Added wildcard support - -0.1.0 / 2011-12-02 -================== - - * Added: remove colors unless stderr isatty [TooTallNate] - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/Makefile b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/Makefile deleted file mode 100644 index b0bde6e..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/Makefile +++ /dev/null @@ -1,33 +0,0 @@ - -# get Makefile directory name: http://stackoverflow.com/a/5982798/376773 -THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) -THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) - -# BIN directory -BIN := $(THIS_DIR)/node_modules/.bin - -# applications -NODE ?= $(shell which node) -NPM ?= $(NODE) $(shell which npm) -BROWSERIFY ?= $(NODE) $(BIN)/browserify - -all: dist/debug.js - -install: node_modules - -clean: - @rm -rf node_modules dist - -dist: - @mkdir -p $@ - -dist/debug.js: node_modules browser.js debug.js dist - @$(BROWSERIFY) \ - --standalone debug \ - . > $@ - -node_modules: package.json - @NODE_ENV= $(NPM) install - @touch node_modules - -.PHONY: all install clean diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/Readme.md b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/Readme.md deleted file mode 100644 index e6a02d9..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/Readme.md +++ /dev/null @@ -1,166 +0,0 @@ -# debug - - tiny node.js debugging utility modelled after node core's debugging technique. - -## Installation - -```bash -$ npm install debug -``` - -## Usage - - With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility. - -Example _app.js_: - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %s', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example _worker.js_: - -```js -var debug = require('debug')('worker'); - -setInterval(function(){ - debug('doing some work'); -}, 1000); -``` - - The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: - - ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) - - ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) - -#### Windows note - - On Windows the environment variable is set using the `set` command. - - ```cmd - set DEBUG=*,-not_this - ``` - -Then, run the program to be debugged as ususal. - -## Millisecond diff - - When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) - - When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: - - ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) - -## Conventions - - If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". - -## Wildcards - - The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect.compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - - You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:". - -## Browser support - - Debug works in the browser as well, currently persisted by `localStorage`. For example if you have `worker:a` and `worker:b` as shown below, and wish to debug both type `debug.enable('worker:*')` in the console and refresh the page, this will remain until you disable with `debug.disable()`. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - b('doing some work'); -}, 1200); -``` - -#### Web Inspector Colors - - Colors are also enabled on "Web Inspectors" that understand the `%c` formatting - option. These are WebKit web inspectors, Firefox ([since version - 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) - and the Firebug plugin for Firefox (any version). - - Colored output looks something like: - - ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png) - -### stderr vs stdout - -You can set an alternative logging method per-namespace by overriding the `log` method on a per-namespace or globally: - -Example _stderr.js_: - -```js -var debug = require('../'); -var log = debug('app:log'); - -// by default console.log is used -log('goes to stdout!'); - -var error = debug('app:error'); -// set this namespace to log via console.error -error.log = console.error.bind(console); // don't forget to bind to console! -error('goes to stderr'); -log('still goes to stdout!'); - -// set all output to go via console.warn -// overrides all per-namespace log settings -debug.log = console.warn.bind(console); -log('now goes to stderr via console.warn'); -error('still goes to stderr, but via console.warn now'); -``` - -## Authors - - - TJ Holowaychuk - - Nathan Rajlich - -## License - -(The MIT License) - -Copyright (c) 2014 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. diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/bower.json b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/bower.json deleted file mode 100644 index c4fabd4..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/bower.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "visionmedia/debug", - "main": "dist/debug.js", - "version": "2.1.1", - "homepage": "https://github.com/visionmedia/debug", - "authors": [ - "TJ Holowaychuk " - ], - "description": "visionmedia/debug", - "moduleType": [ - "amd", - "es6", - "globals", - "node" - ], - "keywords": [ - "visionmedia", - "debug" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ] -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/browser.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/browser.js deleted file mode 100644 index 52c3d32..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/browser.js +++ /dev/null @@ -1,158 +0,0 @@ - -/** - * This is the web browser implementation of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = require('./debug'); -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; - -/** - * Use chrome.storage.local if we are in an app - */ - -var storage; - -if (typeof chrome !== 'undefined' && typeof chrome.storage !== 'undefined') - storage = chrome.storage.local; -else - storage = window.localStorage; - -/** - * Colors. - */ - -exports.colors = [ - 'lightseagreen', - 'forestgreen', - 'goldenrod', - 'dodgerblue', - 'darkorchid', - 'crimson' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -function useColors() { - // is webkit? http://stackoverflow.com/a/16459606/376773 - return ('WebkitAppearance' in document.documentElement.style) || - // is firebug? http://stackoverflow.com/a/398120/376773 - (window.console && (console.firebug || (console.exception && console.table))) || - // is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31); -} - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -exports.formatters.j = function(v) { - return JSON.stringify(v); -}; - - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs() { - var args = arguments; - var useColors = this.useColors; - - args[0] = (useColors ? '%c' : '') - + this.namespace - + (useColors ? ' %c' : ' ') - + args[0] - + (useColors ? '%c ' : ' ') - + '+' + exports.humanize(this.diff); - - if (!useColors) return args; - - var c = 'color: ' + this.color; - args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1)); - - // the final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - var index = 0; - var lastC = 0; - args[0].replace(/%[a-z%]/g, function(match) { - if ('%%' === match) return; - index++; - if ('%c' === match) { - // we only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); - return args; -} - -/** - * Invokes `console.log()` when available. - * No-op when `console.log` is not a "function". - * - * @api public - */ - -function log() { - // this hackery is required for IE8/9, where - // the `console.log` function doesn't have 'apply' - return 'object' === typeof console - && console.log - && Function.prototype.apply.call(console.log, console, arguments); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - -function save(namespaces) { - try { - if (null == namespaces) { - storage.removeItem('debug'); - } else { - storage.debug = namespaces; - } - } catch(e) {} -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - var r; - try { - r = storage.debug; - } catch(e) {} - return r; -} - -/** - * Enable namespaces listed in `localStorage.debug` initially. - */ - -exports.enable(load()); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/component.json b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/component.json deleted file mode 100644 index 71e1abb..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "debug", - "repo": "visionmedia/debug", - "description": "small debugging utility", - "version": "2.1.1", - "keywords": [ - "debug", - "log", - "debugger" - ], - "main": "browser.js", - "scripts": [ - "browser.js", - "debug.js" - ], - "dependencies": { - "guille/ms.js": "0.6.1" - } -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/debug.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/debug.js deleted file mode 100644 index 7571a86..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/debug.js +++ /dev/null @@ -1,197 +0,0 @@ - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = debug; -exports.coerce = coerce; -exports.disable = disable; -exports.enable = enable; -exports.enabled = enabled; -exports.humanize = require('ms'); - -/** - * The currently active debug mode names, and names to skip. - */ - -exports.names = []; -exports.skips = []; - -/** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lowercased letter, i.e. "n". - */ - -exports.formatters = {}; - -/** - * Previously assigned color. - */ - -var prevColor = 0; - -/** - * Previous log timestamp. - */ - -var prevTime; - -/** - * Select a color. - * - * @return {Number} - * @api private - */ - -function selectColor() { - return exports.colors[prevColor++ % exports.colors.length]; -} - -/** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - -function debug(namespace) { - - // define the `disabled` version - function disabled() { - } - disabled.enabled = false; - - // define the `enabled` version - function enabled() { - - var self = enabled; - - // set `diff` timestamp - var curr = +new Date(); - var ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - // add the `color` if not set - if (null == self.useColors) self.useColors = exports.useColors(); - if (null == self.color && self.useColors) self.color = selectColor(); - - var args = Array.prototype.slice.call(arguments); - - args[0] = exports.coerce(args[0]); - - if ('string' !== typeof args[0]) { - // anything else let's inspect with %o - args = ['%o'].concat(args); - } - - // apply any `formatters` transformations - var index = 0; - args[0] = args[0].replace(/%([a-z%])/g, function(match, format) { - // if we encounter an escaped % then don't increase the array index - if (match === '%%') return match; - index++; - var formatter = exports.formatters[format]; - if ('function' === typeof formatter) { - var val = args[index]; - match = formatter.call(self, val); - - // now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - if ('function' === typeof exports.formatArgs) { - args = exports.formatArgs.apply(self, args); - } - var logFn = enabled.log || exports.log || console.log.bind(console); - logFn.apply(self, args); - } - enabled.enabled = true; - - var fn = exports.enabled(namespace) ? enabled : disabled; - - fn.namespace = namespace; - - return fn; -} - -/** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - -function enable(namespaces) { - exports.save(namespaces); - - var split = (namespaces || '').split(/[\s,]+/); - var len = split.length; - - for (var i = 0; i < len; i++) { - if (!split[i]) continue; // ignore empty strings - namespaces = split[i].replace(/\*/g, '.*?'); - if (namespaces[0] === '-') { - exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - exports.names.push(new RegExp('^' + namespaces + '$')); - } - } -} - -/** - * Disable debug output. - * - * @api public - */ - -function disable() { - exports.enable(''); -} - -/** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - -function enabled(name) { - var i, len; - for (i = 0, len = exports.skips.length; i < len; i++) { - if (exports.skips[i].test(name)) { - return false; - } - } - for (i = 0, len = exports.names.length; i < len; i++) { - if (exports.names[i].test(name)) { - return true; - } - } - return false; -} - -/** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - -function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/node.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/node.js deleted file mode 100644 index 5dc999f..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/node.js +++ /dev/null @@ -1,209 +0,0 @@ - -/** - * Module dependencies. - */ - -var tty = require('tty'); -var util = require('util'); - -/** - * This is the Node.js implementation of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = require('./debug'); -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -/** - * The file descriptor to write the `debug()` calls to. - * Set the `DEBUG_FD` env variable to override with another value. i.e.: - * - * $ DEBUG_FD=3 node script.js 3>debug.log - */ - -var fd = parseInt(process.env.DEBUG_FD, 10) || 2; -var stream = 1 === fd ? process.stdout : - 2 === fd ? process.stderr : - createWritableStdioStream(fd); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - var debugColors = (process.env.DEBUG_COLORS || '').trim().toLowerCase(); - if (0 === debugColors.length) { - return tty.isatty(fd); - } else { - return '0' !== debugColors - && 'no' !== debugColors - && 'false' !== debugColors - && 'disabled' !== debugColors; - } -} - -/** - * Map %o to `util.inspect()`, since Node doesn't do that out of the box. - */ - -var inspect = (4 === util.inspect.length ? - // node <= 0.8.x - function (v, colors) { - return util.inspect(v, void 0, void 0, colors); - } : - // node > 0.8.x - function (v, colors) { - return util.inspect(v, { colors: colors }); - } -); - -exports.formatters.o = function(v) { - return inspect(v, this.useColors) - .replace(/\s*\n\s*/g, ' '); -}; - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs() { - var args = arguments; - var useColors = this.useColors; - var name = this.namespace; - - if (useColors) { - var c = this.color; - - args[0] = ' \u001b[9' + c + 'm' + name + ' ' - + '\u001b[0m' - + args[0] + '\u001b[3' + c + 'm' - + ' +' + exports.humanize(this.diff) + '\u001b[0m'; - } else { - args[0] = new Date().toUTCString() - + ' ' + name + ' ' + args[0]; - } - return args; -} - -/** - * Invokes `console.error()` with the specified arguments. - */ - -function log() { - return stream.write(util.format.apply(this, arguments) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - -function save(namespaces) { - if (null == namespaces) { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } else { - process.env.DEBUG = namespaces; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Copied from `node/src/node.js`. - * - * XXX: It's lame that node doesn't expose this API out-of-the-box. It also - * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. - */ - -function createWritableStdioStream (fd) { - var stream; - var tty_wrap = process.binding('tty_wrap'); - - // Note stream._type is used for test-module-load-list.js - - switch (tty_wrap.guessHandleType(fd)) { - case 'TTY': - stream = new tty.WriteStream(fd); - stream._type = 'tty'; - - // Hack to have stream not keep the event loop alive. - // See https://github.com/joyent/node/issues/1726 - if (stream._handle && stream._handle.unref) { - stream._handle.unref(); - } - break; - - case 'FILE': - var fs = require('fs'); - stream = new fs.SyncWriteStream(fd, { autoClose: false }); - stream._type = 'fs'; - break; - - case 'PIPE': - case 'TCP': - var net = require('net'); - stream = new net.Socket({ - fd: fd, - readable: false, - writable: true - }); - - // FIXME Should probably have an option in net.Socket to create a - // stream from an existing fd which is writable only. But for now - // we'll just add this hack and set the `readable` member to false. - // Test: ./node test/fixtures/echo.js < /etc/passwd - stream.readable = false; - stream.read = null; - stream._type = 'pipe'; - - // FIXME Hack to have stream not keep the event loop alive. - // See https://github.com/joyent/node/issues/1726 - if (stream._handle && stream._handle.unref) { - stream._handle.unref(); - } - break; - - default: - // Probably an error on in uv_guess_handle() - throw new Error('Implement me. Unknown stream file type!'); - } - - // For supporting legacy API we put the FD here. - stream.fd = fd; - - stream._isStdio = true; - - return stream; -} - -/** - * Enable namespaces listed in `process.env.DEBUG` initially. - */ - -exports.enable(load()); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/node_modules/ms/.npmignore b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/node_modules/ms/.npmignore deleted file mode 100644 index d1aa0ce..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/node_modules/ms/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules -test -History.md -Makefile -component.json diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/node_modules/ms/README.md b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/node_modules/ms/README.md deleted file mode 100644 index d4ab12a..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/node_modules/ms/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# ms.js: miliseconds conversion utility - -```js -ms('1d') // 86400000 -ms('10h') // 36000000 -ms('2h') // 7200000 -ms('1m') // 60000 -ms('5s') // 5000 -ms('100') // 100 -``` - -```js -ms(60000) // "1m" -ms(2 * 60000) // "2m" -ms(ms('10 hours')) // "10h" -``` - -```js -ms(60000, { long: true }) // "1 minute" -ms(2 * 60000, { long: true }) // "2 minutes" -ms(ms('10 hours', { long: true })) // "10 hours" -``` - -- Node/Browser compatible. Published as `ms` in NPM. -- If a number is supplied to `ms`, a string with a unit is returned. -- If a string that contains the number is supplied, it returns it as -a number (e.g: it returns `100` for `'100'`). -- If you pass a string with a number and a valid unit, the number of -equivalent ms is returned. - -## License - -MIT \ No newline at end of file diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/node_modules/ms/index.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/node_modules/ms/index.js deleted file mode 100644 index c5847f8..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/node_modules/ms/index.js +++ /dev/null @@ -1,111 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} options - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options){ - options = options || {}; - if ('string' == typeof val) return parse(val); - return options.long - ? long(val) - : short(val); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - var match = /^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(str); - if (!match) return; - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'y': - return n * y; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 's': - return n * s; - case 'ms': - return n; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function short(ms) { - if (ms >= d) return Math.round(ms / d) + 'd'; - if (ms >= h) return Math.round(ms / h) + 'h'; - if (ms >= m) return Math.round(ms / m) + 'm'; - if (ms >= s) return Math.round(ms / s) + 's'; - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function long(ms) { - return plural(ms, d, 'day') - || plural(ms, h, 'hour') - || plural(ms, m, 'minute') - || plural(ms, s, 'second') - || ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, n, name) { - if (ms < n) return; - if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name; - return Math.ceil(ms / n) + ' ' + name + 's'; -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/node_modules/ms/package.json b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/node_modules/ms/package.json deleted file mode 100644 index 0839b59..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/node_modules/ms/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "ms", - "version": "0.6.2", - "description": "Tiny ms conversion utility", - "repository": { - "type": "git", - "url": "git://github.com/guille/ms.js.git" - }, - "main": "./index", - "devDependencies": { - "mocha": "*", - "expect.js": "*", - "serve": "*" - }, - "component": { - "scripts": { - "ms/index.js": "index.js" - } - }, - "bugs": { - "url": "https://github.com/guille/ms.js/issues" - }, - "_id": "ms@0.6.2", - "dist": { - "shasum": "d89c2124c6fdc1353d65a8b77bf1aac4b193708c", - "tarball": "http://registry.npmjs.org/ms/-/ms-0.6.2.tgz" - }, - "_from": "ms@0.6.2", - "_npmVersion": "1.2.30", - "_npmUser": { - "name": "rauchg", - "email": "rauchg@gmail.com" - }, - "maintainers": [ - { - "name": "rauchg", - "email": "rauchg@gmail.com" - } - ], - "directories": {}, - "_shasum": "d89c2124c6fdc1353d65a8b77bf1aac4b193708c", - "_resolved": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz", - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/guille/ms.js" -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/package.json b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/package.json deleted file mode 100644 index 58f6ce2..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/debug/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "debug", - "version": "2.1.1", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" - }, - "description": "small debugging utility", - "keywords": [ - "debug", - "log", - "debugger" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "contributors": [ - { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io" - } - ], - "license": "MIT", - "dependencies": { - "ms": "0.6.2" - }, - "devDependencies": { - "browserify": "6.1.0", - "mocha": "*" - }, - "main": "./node.js", - "browser": "./browser.js", - "component": { - "scripts": { - "debug/index.js": "browser.js", - "debug/debug.js": "debug.js" - } - }, - "gitHead": "24cc5c04fc8886fa9afcadea4db439f9a6186ca4", - "bugs": { - "url": "https://github.com/visionmedia/debug/issues" - }, - "homepage": "https://github.com/visionmedia/debug", - "_id": "debug@2.1.1", - "scripts": {}, - "_shasum": "e0c548cc607adc22b537540dc3639c4236fdf90c", - "_from": "debug@>=2.1.0 <2.2.0", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - } - ], - "dist": { - "shasum": "e0c548cc607adc22b537540dc3639c4236fdf90c", - "tarball": "http://registry.npmjs.org/debug/-/debug-2.1.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/debug/-/debug-2.1.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/.dntrc b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/.dntrc deleted file mode 100644 index 1c3e624..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/.dntrc +++ /dev/null @@ -1,36 +0,0 @@ -## DNT config file -## see https://github.com/rvagg/dnt - -NODE_VERSIONS="\ - master \ - v0.11.13 \ - v0.11.10 \ - v0.11.9 \ - v0.11.8 \ - v0.11.7 \ - v0.11.6 \ - v0.11.5 \ - v0.11.4 \ - v0.10.26 \ - v0.10.25 \ - v0.10.24 \ - v0.10.23 \ - v0.10.22 \ - v0.10.21 \ - v0.10.20 \ - v0.10.19 \ - v0.10.18 \ - v0.8.26 \ - v0.8.25 \ - v0.8.24 \ - v0.8.23 \ - v0.8.22 \ -" -OUTPUT_PREFIX="nan-" -TEST_CMD="\ - cd /dnt/test/ && \ - npm install && \ - node_modules/.bin/node-gyp --nodedir /usr/src/node/ rebuild && \ - node_modules/.bin/tap --gc js/*-test.js; \ -" - diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/LICENSE b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/LICENSE deleted file mode 100644 index d502e18..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/LICENSE +++ /dev/null @@ -1,46 +0,0 @@ -Copyright 2013, NAN contributors: - - Rod Vagg - - Benjamin Byholm - - Trevor Norris - - Nathan Rajlich - - Brett Lawson - - Ben Noordhuis -(the "Original Author") -All rights reserved. - -MIT +no-false-attribs License - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -Distributions of all or part of the Software intended to be used -by the recipients as they would use the unmodified Software, -containing modifications that substantially alter, remove, or -disable functionality of the Software, outside of the documented -configuration mechanisms provided by the Software, shall be -modified such that the Original Author's bug reporting email -addresses and urls are either replaced with the contact information -of the parties responsible for the changes, or removed entirely. - -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. - - -Except where noted, this license applies to any and all software -programs and associated documentation files created by the -Original Author, when distributed with the Software. diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/README.md b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/README.md deleted file mode 100644 index 7c8d688..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/README.md +++ /dev/null @@ -1,947 +0,0 @@ -Native Abstractions for Node.js -=============================== - -**A header file filled with macro and utility goodness for making add-on development for Node.js easier across versions 0.8, 0.10 and 0.11, and eventually 0.12.** - -***Current version: 1.0.0*** *(See [nan.h](https://github.com/rvagg/nan/blob/master/nan.h) for complete ChangeLog)* - -[![NPM](https://nodei.co/npm/nan.png?downloads=true)](https://nodei.co/npm/nan/) [![NPM](https://nodei.co/npm-dl/nan.png?months=6)](https://nodei.co/npm/nan/) - -Thanks to the crazy changes in V8 (and some in Node core), keeping native addons compiling happily across versions, particularly 0.10 to 0.11/0.12, is a minor nightmare. The goal of this project is to store all logic necessary to develop native Node.js addons without having to inspect `NODE_MODULE_VERSION` and get yourself into a macro-tangle. - -This project also contains some helper utilities that make addon development a bit more pleasant. - - * **[News & Updates](#news)** - * **[Usage](#usage)** - * **[Example](#example)** - * **[API](#api)** - - -## News & Updates - -### May-2013: Major changes for V8 3.25 / Node 0.11.13 - -Node 0.11.11 and 0.11.12 were both broken releases for native add-ons, you simply can't properly compile against either of them for different reasons. But we now have a 0.11.13 release that jumps a couple of versions of V8 ahead and includes some more, major (traumatic) API changes. - -Because we are now nearing Node 0.12 and estimate that the version of V8 we are using in Node 0.11.13 will be close to the API we get for 0.12, we have taken the opportunity to not only *fix* NAN for 0.11.13 but make some major changes to improve the NAN API. - -We have **removed support for Node 0.11 versions prior to 0.11.13**, (although our tests are still passing for 0.11.10). As usual, our tests are run against (and pass) the last 5 versions of Node 0.8 and Node 0.10. We also include Node 0.11.13 obviously. - -The major change is something that [Benjamin Byholm](kkoopa) has put many hours in to. We now have a fantastic new `NanNew(args)` interface for creating new `Local`s, this replaces `NanNewLocal()` and much more. If you look in [./nan.h](nan.h) you'll see a large number of overloaded versions of this method. In general you should be able to `NanNew(arguments)` for any type you want to make a `Local` from. This includes `Persistent` types, so we now have a `Local NanNew(const Persistent arg)` to replace `NanPersistentToLocal()`. - -We also now have `NanUndefined()`, `NanNull()`, `NanTrue()` and `NanFalse()`. Mainly because of the new requirement for an `Isolate` argument for each of the native V8 versions of this. - -V8 has now introduced an `EscapableHandleScope` from which you `scope.Escape(Local value)` to *return* a value from a one scope to another. This replaces the standard `HandleScope` and `scope.Close(Local value)`, although `HandleScope` still exists for when you don't need to return a handle to the caller. For NAN we are exposing it as `NanEscapableScope()` and `NanEscapeScope()`, while `NanScope()` is still how you create a new scope that doesn't need to return handles. For older versions of Node/V8, it'll still map to the older `HandleScope` functionality. - -`NanFromV8String()` was deprecated and has now been removed. You should use `NanCString()` or `NanRawString()` instead. - -Because `node::MakeCallback()` now takes an `Isolate`, and because it doesn't exist in older versions of Node, we've introduced `NanMakeCallabck()`. You should *always* use this when calling a JavaScript function from C++. - -There's lots more, check out the Changelog in nan.h or look through [#86](https://github.com/rvagg/nan/pull/86) for all the gory details. - -### Dec-2013: NanCString and NanRawString - -Two new functions have been introduced to replace the functionality that's been provided by `NanFromV8String` until now. NanCString has sensible defaults so it's super easy to fetch a null-terminated c-style string out of a `v8::String`. `NanFromV8String` is still around and has defaults that allow you to pass a single handle to fetch a `char*` while `NanRawString` requires a little more attention to arguments. - -### Nov-2013: Node 0.11.9+ breaking V8 change - -The version of V8 that's shipping with Node 0.11.9+ has changed the signature for new `Local`s to: `v8::Local::New(isolate, value)`, i.e. introducing the `isolate` argument and therefore breaking all new `Local` declarations for previous versions. NAN 0.6+ now includes a `NanNewLocal(value)` that can be used in place to work around this incompatibility and maintain compatibility with 0.8->0.11.9+ (minus a few early 0.11 releases). - -For example, if you wanted to return a `null` on a callback you will have to change the argument from `v8::Local::New(v8::Null())` to `NanNewLocal(v8::Null())`. - -### Nov-2013: Change to binding.gyp `"include_dirs"` for NAN - -Inclusion of NAN in a project's binding.gyp is now greatly simplified. You can now just use `" -## Usage - -Simply add **NAN** as a dependency in the *package.json* of your Node addon: - -``` bash -$ npm install --save nan -``` - -Pull in the path to **NAN** in your *binding.gyp* so that you can use `#include ` in your *.cpp* files: - -``` python -"include_dirs" : [ - "` when compiling your addon. - - -## Example - -See **[LevelDOWN](https://github.com/rvagg/node-leveldown/pull/48)** for a full example of **NAN** in use. - -For a simpler example, see the **[async pi estimation example](https://github.com/rvagg/nan/tree/master/examples/async_pi_estimate)** in the examples directory for full code and an explanation of what this Monte Carlo Pi estimation example does. Below are just some parts of the full example that illustrate the use of **NAN**. - -Compare to the current 0.10 version of this example, found in the [node-addon-examples](https://github.com/rvagg/node-addon-examples/tree/master/9_async_work) repository and also a 0.11 version of the same found [here](https://github.com/kkoopa/node-addon-examples/tree/5c01f58fc993377a567812597e54a83af69686d7/9_async_work). - -Note that there is no embedded version sniffing going on here and also the async work is made much simpler, see below for details on the `NanAsyncWorker` class. - -```c++ -// addon.cc -#include -#include -// ... - -using v8::FunctionTemplate; -using v8::Handle; -using v8::Object; - -void InitAll(Handle exports) { - exports->Set(NanSymbol("calculateSync"), - NanNew(CalculateSync)->GetFunction()); - - exports->Set(NanSymbol("calculateAsync"), - NanNew(CalculateAsync)->GetFunction()); -} - -NODE_MODULE(addon, InitAll) -``` - -```c++ -// sync.h -#include -#include - -NAN_METHOD(CalculateSync); -``` - -```c++ -// sync.cc -#include -#include -#include "./sync.h" -// ... - -using v8::Number; - -// Simple synchronous access to the `Estimate()` function -NAN_METHOD(CalculateSync) { - NanScope(); - - // expect a number as the first argument - int points = args[0]->Uint32Value(); - double est = Estimate(points); - - NanReturnValue(NanNew(est)); -} -``` - -```c++ -// async.cc -#include -#include -#include "./async.h" - -// ... - -using v8::Function; -using v8::Local; -using v8::Null; -using v8::Number; -using v8::Value; - -class PiWorker : public NanAsyncWorker { - public: - PiWorker(NanCallback *callback, int points) - : NanAsyncWorker(callback), points(points) {} - ~PiWorker() {} - - // Executed inside the worker-thread. - // It is not safe to access V8, or V8 data structures - // here, so everything we need for input and output - // should go on `this`. - void Execute () { - estimate = Estimate(points); - } - - // Executed when the async work is complete - // this function will be run inside the main event loop - // so it is safe to use V8 again - void HandleOKCallback () { - NanScope(); - - Local argv[] = { - NanNew(NanNull()) - , NanNew(estimate) - }; - - callback->Call(2, argv); - }; - - private: - int points; - double estimate; -}; - -// Asynchronous access to the `Estimate()` function -NAN_METHOD(CalculateAsync) { - NanScope(); - - int points = args[0]->Uint32Value(); - NanCallback *callback = new NanCallback(args[1].As()); - - NanAsyncQueueWorker(new PiWorker(callback, points)); - NanReturnUndefined(); -} -``` - - -## API - - * NAN_METHOD - * NAN_GETTER - * NAN_SETTER - * NAN_PROPERTY_GETTER - * NAN_PROPERTY_SETTER - * NAN_PROPERTY_ENUMERATOR - * NAN_PROPERTY_DELETER - * NAN_PROPERTY_QUERY - * NAN_INDEX_GETTER - * NAN_INDEX_SETTER - * NAN_INDEX_ENUMERATOR - * NAN_INDEX_DELETER - * NAN_INDEX_QUERY - * NAN_WEAK_CALLBACK - * NAN_DEPRECATED - * NAN_INLINE - * NanNew - * NanUndefined - * NanNull - * NanTrue - * NanFalse - * NanReturnValue - * NanReturnUndefined - * NanReturnNull - * NanReturnEmptyString - * NanScope - * NanEscapableScope - * NanEscapeScope - * NanLocker - * NanUnlocker - * NanGetInternalFieldPointer - * NanSetInternalFieldPointer - * NanObjectWrapHandle - * NanSymbol - * NanGetPointerSafe - * NanSetPointerSafe - * NanRawString - * NanCString - * NanBooleanOptionValue - * NanUInt32OptionValue - * NanError, NanTypeError, NanRangeError - * NanThrowError, NanThrowTypeError, NanThrowRangeError, NanThrowError(Handle), NanThrowError(Handle, int) - * NanNewBufferHandle(char *, size_t, FreeCallback, void *), NanNewBufferHandle(char *, uint32_t), NanNewBufferHandle(uint32_t) - * NanBufferUse(char *, uint32_t) - * NanNewContextHandle - * NanGetCurrentContext - * NanHasInstance - * NanDisposePersistent - * NanAssignPersistent - * NanMakeWeakPersistent - * NanSetTemplate - * NanMakeCallback - * NanCompileScript - * NanRunScript - * NanAdjustExternalMemory - * NanAddGCEpilogueCallback - * NanAddGCPrologueCallback - * NanRemoveGCEpilogueCallback - * NanRemoveGCPrologueCallback - * NanGetHeapStatistics - * NanCallback - * NanAsyncWorker - * NanAsyncQueueWorker - - -### NAN_METHOD(methodname) - -Use `NAN_METHOD` to define your V8 accessible methods: - -```c++ -// .h: -class Foo : public node::ObjectWrap { - ... - - static NAN_METHOD(Bar); - static NAN_METHOD(Baz); -} - - -// .cc: -NAN_METHOD(Foo::Bar) { - ... -} - -NAN_METHOD(Foo::Baz) { - ... -} -``` - -The reason for this macro is because of the method signature change in 0.11: - -```c++ -// 0.10 and below: -Handle name(const Arguments& args) - -// 0.11 and above -void name(const FunctionCallbackInfo& args) -``` - -The introduction of `FunctionCallbackInfo` brings additional complications: - - -### NAN_GETTER(methodname) - -Use `NAN_GETTER` to declare your V8 accessible getters. You get a `Local` `property` and an appropriately typed `args` object that can act like the `args` argument to a `NAN_METHOD` call. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_GETTER`. - - -### NAN_SETTER(methodname) - -Use `NAN_SETTER` to declare your V8 accessible setters. Same as `NAN_GETTER` but you also get a `Local` `value` object to work with. - - -### NAN_PROPERTY_GETTER(cbname) -Use `NAN_PROPERTY_GETTER` to declare your V8 accessible property getters. You get a `Local` `property` and an appropriately typed `args` object that can act similar to the `args` argument to a `NAN_METHOD` call. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_GETTER`. - - -### NAN_PROPERTY_SETTER(cbname) -Use `NAN_PROPERTY_SETTER` to declare your V8 accessible property setters. Same as `NAN_PROPERTY_GETTER` but you also get a `Local` `value` object to work with. - - -### NAN_PROPERTY_ENUMERATOR(cbname) -Use `NAN_PROPERTY_ENUMERATOR` to declare your V8 accessible property enumerators. You get an appropriately typed `args` object like the `args` argument to a `NAN_PROPERTY_GETTER` call. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_ENUMERATOR`. - - -### NAN_PROPERTY_DELETER(cbname) -Use `NAN_PROPERTY_DELETER` to declare your V8 accessible property deleters. Same as `NAN_PROPERTY_GETTER`. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_DELETER`. - - -### NAN_PROPERTY_QUERY(cbname) -Use `NAN_PROPERTY_QUERY` to declare your V8 accessible property queries. Same as `NAN_PROPERTY_GETTER`. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_QUERY`. - - -### NAN_INDEX_GETTER(cbname) -Use `NAN_INDEX_GETTER` to declare your V8 accessible index getters. You get a `uint32_t` `index` and an appropriately typed `args` object that can act similar to the `args` argument to a `NAN_METHOD` call. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_GETTER`. - - -### NAN_INDEX_SETTER(cbname) -Use `NAN_INDEX_SETTER` to declare your V8 accessible index setters. Same as `NAN_INDEX_GETTER` but you also get a `Local` `value` object to work with. - - -### NAN_INDEX_ENUMERATOR(cbname) -Use `NAN_INDEX_ENUMERATOR` to declare your V8 accessible index enumerators. You get an appropriately typed `args` object like the `args` argument to a `NAN_INDEX_GETTER` call. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_ENUMERATOR`. - - -### NAN_INDEX_DELETER(cbname) -Use `NAN_INDEX_DELETER` to declare your V8 accessible index deleters. Same as `NAN_INDEX_GETTER`. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_DELETER`. - - -### NAN_INDEX_QUERY(cbname) -Use `NAN_INDEX_QUERY` to declare your V8 accessible index queries. Same as `NAN_INDEX_GETTER`. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_QUERY`. - - -### NAN_WEAK_CALLBACK(cbname) - -Use `NAN_WEAK_CALLBACK` to define your V8 WeakReference callbacks. Do not use for declaration. There is an argument object `const _NanWeakCallbackData &data` allowing access to the weak object and the supplied parameter through its `GetValue` and `GetParameter` methods. - -```c++ -NAN_WEAK_CALLBACK(weakCallback) { - int *parameter = data.GetParameter(); - NanMakeCallback(NanGetCurrentContext()->Global(), data.GetValue(), 0, NULL); - if ((*parameter)++ == 0) { - data.Revive(); - } else { - delete parameter; - data.Dispose(); - } -} -``` - - -### NAN_DEPRECATED -Declares a function as deprecated. - -```c++ -static NAN_DEPRECATED NAN_METHOD(foo) { - ... -} -``` - - -### NAN_INLINE -Inlines a function. - -```c++ -NAN_INLINE int foo(int bar) { - ... -} -``` - - -### Local<T> NanNew<T>( ... ) - -Use `NanNew` to construct almost all v8 objects and make new local handles. - -```c++ -Local s = NanNew("value"); - -... - -Persistent o; - -... - -Local lo = NanNew(o); - -``` - - -### Handle<Primitive> NanUndefined() - -Use instead of `Undefined()` - - -### Handle<Primitive> NanNull() - -Use instead of `Null()` - - -### Handle<Primitive> NanTrue() - -Use instead of `True()` - - -### Handle<Primitive> NanFalse() - -Use instead of `False()` - - -### NanReturnValue(Handle<Value>) - -Use `NanReturnValue` when you want to return a value from your V8 accessible method: - -```c++ -NAN_METHOD(Foo::Bar) { - ... - - NanReturnValue(NanNew("FooBar!")); -} -``` - -No `return` statement required. - - -### NanReturnUndefined() - -Use `NanReturnUndefined` when you don't want to return anything from your V8 accessible method: - -```c++ -NAN_METHOD(Foo::Baz) { - ... - - NanReturnUndefined(); -} -``` - - -### NanReturnNull() - -Use `NanReturnNull` when you want to return `Null` from your V8 accessible method: - -```c++ -NAN_METHOD(Foo::Baz) { - ... - - NanReturnNull(); -} -``` - - -### NanReturnEmptyString() - -Use `NanReturnEmptyString` when you want to return an empty `String` from your V8 accessible method: - -```c++ -NAN_METHOD(Foo::Baz) { - ... - - NanReturnEmptyString(); -} -``` - - -### NanScope() - -The introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanScope()` necessary, use it in place of `HandleScope scope`: - -```c++ -NAN_METHOD(Foo::Bar) { - NanScope(); - - NanReturnValue(NanNew("FooBar!")); -} -``` - - -### NanEscapableScope() - -The separation of handle scopes into escapable and inescapable scopes makes `NanEscapableScope()` necessary, use it in place of `HandleScope scope` when you later wish to `Close()` the scope: - -```c++ -Handle Foo::Bar() { - NanEscapableScope(); - - return NanEscapeScope(NanNew("FooBar!")); -} -``` - - -### Local<T> NanEscapeScope(Handle<T> value); -Use together with `NanEscapableScope` to escape the scope. Corresponds to `HandleScope::Close` or `EscapableHandleScope::Escape`. - - -### NanLocker() - -The introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanLocker()` necessary, use it in place of `Locker locker`: - -```c++ -NAN_METHOD(Foo::Bar) { - NanLocker(); - ... - NanUnlocker(); -} -``` - - -### NanUnlocker() - -The introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanUnlocker()` necessary, use it in place of `Unlocker unlocker`: - -```c++ -NAN_METHOD(Foo::Bar) { - NanLocker(); - ... - NanUnlocker(); -} -``` - - -### void * NanGetInternalFieldPointer(Handle<Object>, int) - -Gets a pointer to the internal field with at `index` from a V8 `Object` handle. - -```c++ -Local obj; -... -NanGetInternalFieldPointer(obj, 0); -``` - -### void NanSetInternalFieldPointer(Handle<Object>, int, void *) - -Sets the value of the internal field at `index` on a V8 `Object` handle. - -```c++ -static Persistent dataWrapperCtor; -... -Local wrapper = NanPersistentToLocal(dataWrapperCtor)->NewInstance(); -NanSetInternalFieldPointer(wrapper, 0, this); -``` - - -### Local<Object> NanObjectWrapHandle(Object) - -When you want to fetch the V8 object handle from a native object you've wrapped with Node's `ObjectWrap`, you should use `NanObjectWrapHandle`: - -```c++ -NanObjectWrapHandle(iterator)->Get(NanSymbol("end")) -``` - - -### String NanSymbol(char *) - -Use to create string symbol objects (i.e. `v8::String::NewSymbol(x)`), for getting and setting object properties, or names of objects. - -```c++ -bool foo = false; -if (obj->Has(NanSymbol("foo"))) - foo = optionsObj->Get(NanSymbol("foo"))->BooleanValue() -``` - - -### Type NanGetPointerSafe(Type *[, Type]) - -A helper for getting values from optional pointers. If the pointer is `NULL`, the function returns the optional default value, which defaults to `0`. Otherwise, the function returns the value the pointer points to. - -```c++ -char *plugh(uint32_t *optional) { - char res[] = "xyzzy"; - uint32_t param = NanGetPointerSafe(optional, 0x1337); - switch (param) { - ... - } - NanSetPointerSafe(optional, 0xDEADBEEF); -} -``` - - -### bool NanSetPointerSafe(Type *, Type) - -A helper for setting optional argument pointers. If the pointer is `NULL`, the function simply returns `false`. Otherwise, the value is assigned to the variable the pointer points to. - -```c++ -const char *plugh(size_t *outputsize) { - char res[] = "xyzzy"; - if !(NanSetPointerSafe(outputsize, strlen(res) + 1)) { - ... - } - - ... -} -``` - - -### void* NanRawString(Handle<Value>, enum Nan::Encoding, size_t *, void *, size_t, int) - -When you want to convert a V8 `String` to a `char*` buffer, use `NanRawString`. You have to supply an encoding as well as a pointer to a variable that will be assigned the number of bytes in the returned string. It is also possible to supply a buffer and its length to the function in order not to have a new buffer allocated. The final argument allows setting `String::WriteOptions`. -Just remember that you'll end up with an object that you'll need to `delete[]` at some point unless you supply your own buffer: - -```c++ -size_t count; -void* decoded = NanRawString(args[1], Nan::BASE64, &count, NULL, 0, String::HINT_MANY_WRITES_EXPECTED); -char param_copy[count]; -memcpy(param_copy, decoded, count); -delete[] decoded; -``` - - -### char* NanCString(Handle<Value>, size_t *[, char *, size_t, int]) - -When you want to convert a V8 `String` to a null-terminated C `char*` use `NanCString`. The resulting `char*` will be UTF-8-encoded, and you need to supply a pointer to a variable that will be assigned the number of bytes in the returned string. It is also possible to supply a buffer and its length to the function in order not to have a new buffer allocated. The final argument allows optionally setting `String::WriteOptions`, which default to `v8::String::NO_OPTIONS`. -Just remember that you'll end up with an object that you'll need to `delete[]` at some point unless you supply your own buffer: - -```c++ -size_t count; -char* name = NanCString(args[0], &count); -``` - - -### bool NanBooleanOptionValue(Handle<Value>, Handle<String>[, bool]) - -When you have an "options" object that you need to fetch properties from, boolean options can be fetched with this pair. They check first if the object exists (`IsEmpty`), then if the object has the given property (`Has`) then they get and convert/coerce the property to a `bool`. - -The optional last parameter is the *default* value, which is `false` if left off: - -```c++ -// `foo` is false unless the user supplies a truthy value for it -bool foo = NanBooleanOptionValue(optionsObj, NanSymbol("foo")); -// `bar` is true unless the user supplies a falsy value for it -bool bar = NanBooleanOptionValueDefTrue(optionsObj, NanSymbol("bar"), true); -``` - - -### uint32_t NanUInt32OptionValue(Handle<Value>, Handle<String>, uint32_t) - -Similar to `NanBooleanOptionValue`, use `NanUInt32OptionValue` to fetch an integer option from your options object. Can be any kind of JavaScript `Number` and it will be coerced to an unsigned 32-bit integer. - -Requires all 3 arguments as a default is not optional: - -```c++ -uint32_t count = NanUInt32OptionValue(optionsObj, NanSymbol("count"), 1024); -``` - - -### NanError(message), NanTypeError(message), NanRangeError(message) - -For making `Error`, `TypeError` and `RangeError` objects. - -```c++ -Local res = NanError("you must supply a callback argument"); -``` - - -### NanThrowError(message), NanThrowTypeError(message), NanThrowRangeError(message), NanThrowError(Local<Value>), NanThrowError(Local<Value>, int) - -For throwing `Error`, `TypeError` and `RangeError` objects. You should `return` this call: - -```c++ -return NanThrowError("you must supply a callback argument"); -``` - -Can also handle any custom object you may want to throw. If used with the error code argument, it will add the supplied error code to the error object as a property called `code`. - - -### Local<Object> NanNewBufferHandle(char *, uint32_t), Local<Object> NanNewBufferHandle(uint32_t) - -The `Buffer` API has changed a little in Node 0.11, this helper provides consistent access to `Buffer` creation: - -```c++ -NanNewBufferHandle((char*)value.data(), value.size()); -``` - -Can also be used to initialize a `Buffer` with just a `size` argument. - -Can also be supplied with a `NanFreeCallback` and a hint for the garbage collector. - - -### Local<Object> NanBufferUse(char*, uint32_t) - -`Buffer::New(char*, uint32_t)` prior to 0.11 would make a copy of the data. -While it was possible to get around this, it required a shim by passing a -callback. So the new API `Buffer::Use(char*, uint32_t)` was introduced to remove -needing to use this shim. - -`NanBufferUse` uses the `char*` passed as the backing data, and will free the -memory automatically when the weak callback is called. Keep this in mind, as -careless use can lead to "double free or corruption" and other cryptic failures. - - -### bool NanHasInstance(Persistent<FunctionTemplate>&, Handle<Value>) - -Can be used to check the type of an object to determine it is of a particular class you have already defined and have a `Persistent` handle for. - - -### Local<Context> NanNewContextHandle([ExtensionConfiguration*, Handle<ObjectTemplate>, Handle<Value>]) -Creates a new `Local` handle. - -```c++ -Local ftmpl = NanNew(); -Local otmpl = ftmpl->InstanceTemplate(); -Local ctx = NanNewContextHandle(NULL, otmpl); -``` - - -### Local NanGetCurrentContext() - -Gets the current context. - -```c++ -Local ctx = NanGetCurrentContext(); -``` - - -### void NanDisposePersistent(Persistent<T> &) - -Use `NanDisposePersistent` to dispose a `Persistent` handle. - -```c++ -NanDisposePersistent(persistentHandle); -``` - - -### NanAssignPersistent(type, handle, object) - -Use `NanAssignPersistent` to assign a non-`Persistent` handle to a `Persistent` one. You can no longer just declare a `Persistent` handle and assign directly to it later, you have to `Reset` it in Node 0.11, so this makes it easier. - -In general it is now better to place anything you want to protect from V8's garbage collector as properties of a generic `Object` and then assign that to a `Persistent`. This works in older versions of Node also if you use `NanAssignPersistent`: - -```c++ -Persistent persistentHandle; - -... - -Local obj = NanNew(); -obj->Set(NanSymbol("key"), keyHandle); // where keyHandle might be a Local -NanAssignPersistent(Object, persistentHandle, obj) -``` - - -### NanMakeWeakPersistent(Handle<T> handle, P* parameter, _NanWeakCallbackInfo<T, P>::Callback callback) - -Creates a weak persistent handle with the supplied parameter and `NAN_WEAK_CALLBACK`. The callback has to be fully specialized to work on all versions of Node. - -```c++ -NAN_WEAK_CALLBACK(weakCallback) { - -... - -} - -Local func; - -... - -int *parameter = new int(0); -NanMakeWeakPersistent(func, parameter, &weakCallback); -``` - - -### NanSetTemplate(templ, name, value) - -Use to add properties on object and function templates. - - -### NanMakeCallback(target, func, argc, argv) - -Use instead of `node::MakeCallback` to call javascript functions. This is the only proper way of calling functions. - - -### NanCompileScript(Handle s [, const ScriptOrigin& origin]) - -Use to create new scripts bound to the current context. - - -### NanRunScript(script) - -Use to run both bound and unbound scripts. - - -### NanAdjustExternalMemory(int change_in_bytes) - -Simply does `AdjustAmountOfExternalAllocatedMemory` - - -### NanAddGCEpilogueCallback(GCEpilogueCallback callback, GCType gc_type_filter=kGCTypeAll) - -Simply does `AddGCEpilogueCallback` - - -### NanAddGCPrologueCallback(GCPrologueCallback callback, GCType gc_type_filter=kGCTypeAll) - -Simply does `AddGCPrologueCallback` - - -### NanRemoveGCEpilogueCallback(GCEpilogueCallback callback) - -Simply does `RemoveGCEpilogueCallback` - - -### NanRemoveGCPrologueCallback(GCPrologueCallback callback) - -Simply does `RemoveGCPrologueCallback` - - -### NanGetHeapStatistics(HeapStatistics *heap_statistics) - -Simply does `GetHeapStatistics` - - -### NanCallback - -Because of the difficulties imposed by the changes to `Persistent` handles in V8 in Node 0.11, creating `Persistent` versions of your `Handle` is annoyingly tricky. `NanCallback` makes it easier by taking your handle, making it persistent until the `NanCallback` is deleted and even providing a handy `Call()` method to fetch and execute the callback `Function`. - -```c++ -Local callbackHandle = args[0].As(); -NanCallback *callback = new NanCallback(callbackHandle); -// pass `callback` around and it's safe from GC until you: -delete callback; -``` - -You can execute the callback like so: - -```c++ -// no arguments: -callback->Call(0, NULL); - -// an error argument: -Handle argv[] = { - NanError(NanNew("fail!")) -}; -callback->Call(1, argv); - -// a success argument: -Handle argv[] = { - NanNull(), - NanNew("w00t!") -}; -callback->Call(2, argv); -``` - -`NanCallback` also has a `Local GetCallback()` method that you can use -to fetch a local handle to the underlying callback function, as well as a -`void SetFunction(Handle)` for setting the callback on the -`NanCallback`. Additionally a generic constructor is available for using -`NanCallback` without performing heap allocations. - - -### NanAsyncWorker - -`NanAsyncWorker` is an abstract class that you can subclass to have much of the annoying async queuing and handling taken care of for you. It can even store arbitrary V8 objects for you and have them persist while the async work is in progress. - -See a rough outline of the implementation: - -```c++ -class NanAsyncWorker { -public: - NanAsyncWorker (NanCallback *callback); - - // Clean up persistent handles and delete the *callback - virtual ~NanAsyncWorker (); - - // Check the `char *errmsg` property and call HandleOKCallback() - // or HandleErrorCallback depending on whether it has been set or not - virtual void WorkComplete (); - - // You must implement this to do some async work. If there is an - // error then allocate `errmsg` to a message and the callback will - // be passed that string in an Error object - virtual void Execute (); - - // Save a V8 object in a Persistent handle to protect it from GC - void SavePersistent(const char *key, Local &obj); - - // Fetch a stored V8 object (don't call from within `Execute()`) - Local GetFromPersistent(const char *key); - -protected: - // Set this if there is an error, otherwise it's NULL - const char *errmsg; - - // Default implementation calls the callback function with no arguments. - // Override this to return meaningful data - virtual void HandleOKCallback (); - - // Default implementation calls the callback function with an Error object - // wrapping the `errmsg` string - virtual void HandleErrorCallback (); -}; -``` - - -### NanAsyncQueueWorker(NanAsyncWorker *) - -`NanAsyncQueueWorker` will run a `NanAsyncWorker` asynchronously via libuv. Both the *execute* and *after_work* steps are taken care of for you—most of the logic for this is embedded in `NanAsyncWorker`. - -### Contributors - -NAN is only possible due to the excellent work of the following contributors: - - - - - - - - -
Rod VaggGitHub/rvaggTwitter/@rvagg
Benjamin ByholmGitHub/kkoopa
Trevor NorrisGitHub/trevnorrisTwitter/@trevnorris
Nathan RajlichGitHub/TooTallNateTwitter/@TooTallNate
Brett LawsonGitHub/brett19Twitter/@brett19x
Ben NoordhuisGitHub/bnoordhuisTwitter/@bnoordhuis
- -Licence & copyright ------------------------ - -Copyright (c) 2014 NAN contributors (listed above). - -Native Abstractions for Node.js is licensed under an MIT +no-false-attribs license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/build/config.gypi b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/build/config.gypi deleted file mode 100644 index e085a50..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/build/config.gypi +++ /dev/null @@ -1,38 +0,0 @@ -# Do not edit. File was generated by node-gyp's "configure" step -{ - "target_defaults": { - "cflags": [], - "default_configuration": "Release", - "defines": [], - "include_dirs": [], - "libraries": [] - }, - "variables": { - "clang": 0, - "gcc_version": 47, - "host_arch": "x64", - "node_install_npm": "true", - "node_prefix": "", - "node_shared_cares": "false", - "node_shared_http_parser": "false", - "node_shared_libuv": "false", - "node_shared_openssl": "false", - "node_shared_v8": "false", - "node_shared_zlib": "false", - "node_tag": "", - "node_unsafe_optimizations": 0, - "node_use_dtrace": "false", - "node_use_etw": "false", - "node_use_openssl": "true", - "node_use_perfctr": "false", - "node_use_systemtap": "false", - "python": "/usr/bin/python", - "target_arch": "x64", - "v8_enable_gdbjit": 0, - "v8_no_strict_aliasing": 1, - "v8_use_snapshot": "true", - "nodedir": "/home/rvagg/.node-gyp/0.10.21", - "copy_dev_lib": "true", - "standalone_static_library": 1 - } -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/include_dirs.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/include_dirs.js deleted file mode 100644 index 4f1dfb4..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/include_dirs.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('path').relative('.', __dirname)); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/nan.h b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/nan.h deleted file mode 100644 index bc544f5..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/nan.h +++ /dev/null @@ -1,1910 +0,0 @@ -/********************************************************************************** - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2014 NAN contributors: - * - Rod Vagg - * - Benjamin Byholm - * - Trevor Norris - * - Nathan Rajlich - * - Brett Lawson - * - Ben Noordhuis - * - * MIT +no-false-attribs License - * - * Version 1.0.0 (current Node unstable: 0.11.13, Node stable: 0.10.28) - * - * ChangeLog: - * * 1.0.0 May 4 2014 - * - Heavy API changes for V8 3.25 / Node 0.11.13 - * - Use cpplint.py - * - Removed NanInitPersistent - * - Removed NanPersistentToLocal - * - Removed NanFromV8String - * - Removed NanMakeWeak - * - Removed NanNewLocal - * - Removed NAN_WEAK_CALLBACK_OBJECT - * - Removed NAN_WEAK_CALLBACK_DATA - * - Introduce NanNew, replaces NanNewLocal, NanPersistentToLocal, adds many overloaded typed versions - * - Introduce NanUndefined, NanNull, NanTrue and NanFalse - * - Introduce NanEscapableScope and NanEscapeScope - * - Introduce NanMakeWeakPersistent (requires a special callback to work on both old and new node) - * - Introduce NanMakeCallback for node::MakeCallback - * - Introduce NanSetTemplate - * - Introduce NanGetCurrentContext - * - Introduce NanCompileScript and NanRunScript - * - Introduce NanAdjustExternalMemory - * - Introduce NanAddGCEpilogueCallback, NanAddGCPrologueCallback, NanRemoveGCEpilogueCallback, NanRemoveGCPrologueCallback - * - Introduce NanGetHeapStatistics - * - Rename NanAsyncWorker#SavePersistent() to SaveToPersistent() - * - * * 0.8.0 Jan 9 2014 - * - NanDispose -> NanDisposePersistent, deprecate NanDispose - * - Extract _NAN_*_RETURN_TYPE, pull up NAN_*() - * - * * 0.7.1 Jan 9 2014 - * - Fixes to work against debug builds of Node - * - Safer NanPersistentToLocal (avoid reinterpret_cast) - * - Speed up common NanRawString case by only extracting flattened string when necessary - * - * * 0.7.0 Dec 17 2013 - * - New no-arg form of NanCallback() constructor. - * - NanCallback#Call takes Handle rather than Local - * - Removed deprecated NanCallback#Run method, use NanCallback#Call instead - * - Split off _NAN_*_ARGS_TYPE from _NAN_*_ARGS - * - Restore (unofficial) Node 0.6 compatibility at NanCallback#Call() - * - Introduce NanRawString() for char* (or appropriate void*) from v8::String - * (replacement for NanFromV8String) - * - Introduce NanCString() for null-terminated char* from v8::String - * - * * 0.6.0 Nov 21 2013 - * - Introduce NanNewLocal(v8::Handle value) for use in place of - * v8::Local::New(...) since v8 started requiring isolate in Node 0.11.9 - * - * * 0.5.2 Nov 16 2013 - * - Convert SavePersistent and GetFromPersistent in NanAsyncWorker from protected and public - * - * * 0.5.1 Nov 12 2013 - * - Use node::MakeCallback() instead of direct v8::Function::Call() - * - * * 0.5.0 Nov 11 2013 - * - Added @TooTallNate as collaborator - * - New, much simpler, "include_dirs" for binding.gyp - * - Added full range of NAN_INDEX_* macros to match NAN_PROPERTY_* macros - * - * * 0.4.4 Nov 2 2013 - * - Isolate argument from v8::Persistent::MakeWeak removed for 0.11.8+ - * - * * 0.4.3 Nov 2 2013 - * - Include node_object_wrap.h, removed from node.h for Node 0.11.8. - * - * * 0.4.2 Nov 2 2013 - * - Handle deprecation of v8::Persistent::Dispose(v8::Isolate* isolate)) for - * Node 0.11.8 release. - * - * * 0.4.1 Sep 16 2013 - * - Added explicit `#include ` as it was removed from node.h for v0.11.8 - * - * * 0.4.0 Sep 2 2013 - * - Added NAN_INLINE and NAN_DEPRECATED and made use of them - * - Added NanError, NanTypeError and NanRangeError - * - Cleaned up code - * - * * 0.3.2 Aug 30 2013 - * - Fix missing scope declaration in GetFromPersistent() and SaveToPersistent - * in NanAsyncWorker - * - * * 0.3.1 Aug 20 2013 - * - fix "not all control paths return a value" compile warning on some platforms - * - * * 0.3.0 Aug 19 2013 - * - Made NAN work with NPM - * - Lots of fixes to NanFromV8String, pulling in features from new Node core - * - Changed node::encoding to Nan::Encoding in NanFromV8String to unify the API - * - Added optional error number argument for NanThrowError() - * - Added NanInitPersistent() - * - Added NanReturnNull() and NanReturnEmptyString() - * - Added NanLocker and NanUnlocker - * - Added missing scopes - * - Made sure to clear disposed Persistent handles - * - Changed NanAsyncWorker to allocate error messages on the heap - * - Changed NanThrowError(Local) to NanThrowError(Handle) - * - Fixed leak in NanAsyncWorker when errmsg is used - * - * * 0.2.2 Aug 5 2013 - * - Fixed usage of undefined variable with node::BASE64 in NanFromV8String() - * - * * 0.2.1 Aug 5 2013 - * - Fixed 0.8 breakage, node::BUFFER encoding type not available in 0.8 for - * NanFromV8String() - * - * * 0.2.0 Aug 5 2013 - * - Added NAN_PROPERTY_GETTER, NAN_PROPERTY_SETTER, NAN_PROPERTY_ENUMERATOR, - * NAN_PROPERTY_DELETER, NAN_PROPERTY_QUERY - * - Extracted _NAN_METHOD_ARGS, _NAN_GETTER_ARGS, _NAN_SETTER_ARGS, - * _NAN_PROPERTY_GETTER_ARGS, _NAN_PROPERTY_SETTER_ARGS, - * _NAN_PROPERTY_ENUMERATOR_ARGS, _NAN_PROPERTY_DELETER_ARGS, - * _NAN_PROPERTY_QUERY_ARGS - * - Added NanGetInternalFieldPointer, NanSetInternalFieldPointer - * - Added NAN_WEAK_CALLBACK, NAN_WEAK_CALLBACK_OBJECT, - * NAN_WEAK_CALLBACK_DATA, NanMakeWeak - * - Renamed THROW_ERROR to _NAN_THROW_ERROR - * - Added NanNewBufferHandle(char*, size_t, node::smalloc::FreeCallback, void*) - * - Added NanBufferUse(char*, uint32_t) - * - Added NanNewContextHandle(v8::ExtensionConfiguration*, - * v8::Handle, v8::Handle) - * - Fixed broken NanCallback#GetFunction() - * - Added optional encoding and size arguments to NanFromV8String() - * - Added NanGetPointerSafe() and NanSetPointerSafe() - * - Added initial test suite (to be expanded) - * - Allow NanUInt32OptionValue to convert any Number object - * - * * 0.1.0 Jul 21 2013 - * - Added `NAN_GETTER`, `NAN_SETTER` - * - Added `NanThrowError` with single Local argument - * - Added `NanNewBufferHandle` with single uint32_t argument - * - Added `NanHasInstance(Persistent&, Handle)` - * - Added `Local NanCallback#GetFunction()` - * - Added `NanCallback#Call(int, Local[])` - * - Deprecated `NanCallback#Run(int, Local[])` in favour of Call - * - * See https://github.com/rvagg/nan for the latest update to this file - **********************************************************************************/ - -#ifndef NAN_H_ -#define NAN_H_ - -#include -#include -#include -#include -#include -#include - -#if defined(__GNUC__) && !defined(DEBUG) -# define NAN_INLINE inline __attribute__((always_inline)) -#elif defined(_MSC_VER) && !defined(DEBUG) -# define NAN_INLINE __forceinline -#else -# define NAN_INLINE inline -#endif - -#if defined(__GNUC__) && !V8_DISABLE_DEPRECATIONS -# define NAN_DEPRECATED __attribute__((deprecated)) -#elif defined(_MSC_VER) && !V8_DISABLE_DEPRECATIONS -# define NAN_DEPRECATED __declspec(deprecated) -#else -# define NAN_DEPRECATED -#endif - -// some generic helpers - -template NAN_INLINE bool NanSetPointerSafe( - T *var - , T val -) { - if (var) { - *var = val; - return true; - } else { - return false; - } -} - -template NAN_INLINE T NanGetPointerSafe( - T *var - , T fallback = reinterpret_cast(0) -) { - if (var) { - return *var; - } else { - return fallback; - } -} - -NAN_INLINE bool NanBooleanOptionValue( - v8::Local optionsObj - , v8::Handle opt, bool def -) { - if (def) { - return optionsObj.IsEmpty() - || !optionsObj->Has(opt) - || optionsObj->Get(opt)->BooleanValue(); - } else { - return !optionsObj.IsEmpty() - && optionsObj->Has(opt) - && optionsObj->Get(opt)->BooleanValue(); - } -} - -NAN_INLINE bool NanBooleanOptionValue( - v8::Local optionsObj - , v8::Handle opt -) { - return NanBooleanOptionValue(optionsObj, opt, false); -} - -NAN_INLINE uint32_t NanUInt32OptionValue( - v8::Local optionsObj - , v8::Handle opt - , uint32_t def -) { - return !optionsObj.IsEmpty() - && optionsObj->Has(opt) - && optionsObj->Get(opt)->IsNumber() - ? optionsObj->Get(opt)->Uint32Value() - : def; -} - -#if (NODE_MODULE_VERSION > 0x000B) -// Node 0.11+ (0.11.3 and below won't compile with these) - -# define _NAN_METHOD_ARGS_TYPE const v8::FunctionCallbackInfo& -# define _NAN_METHOD_ARGS _NAN_METHOD_ARGS_TYPE args -# define _NAN_METHOD_RETURN_TYPE void - -# define _NAN_GETTER_ARGS_TYPE const v8::PropertyCallbackInfo& -# define _NAN_GETTER_ARGS _NAN_GETTER_ARGS_TYPE args -# define _NAN_GETTER_RETURN_TYPE void - -# define _NAN_SETTER_ARGS_TYPE const v8::PropertyCallbackInfo& -# define _NAN_SETTER_ARGS _NAN_SETTER_ARGS_TYPE args -# define _NAN_SETTER_RETURN_TYPE void - -# define _NAN_PROPERTY_GETTER_ARGS_TYPE \ - const v8::PropertyCallbackInfo& -# define _NAN_PROPERTY_GETTER_ARGS _NAN_PROPERTY_GETTER_ARGS_TYPE args -# define _NAN_PROPERTY_GETTER_RETURN_TYPE void - -# define _NAN_PROPERTY_SETTER_ARGS_TYPE \ - const v8::PropertyCallbackInfo& -# define _NAN_PROPERTY_SETTER_ARGS _NAN_PROPERTY_SETTER_ARGS_TYPE args -# define _NAN_PROPERTY_SETTER_RETURN_TYPE void - -# define _NAN_PROPERTY_ENUMERATOR_ARGS_TYPE \ - const v8::PropertyCallbackInfo& -# define _NAN_PROPERTY_ENUMERATOR_ARGS _NAN_PROPERTY_ENUMERATOR_ARGS_TYPE args -# define _NAN_PROPERTY_ENUMERATOR_RETURN_TYPE void - -# define _NAN_PROPERTY_DELETER_ARGS_TYPE \ - const v8::PropertyCallbackInfo& -# define _NAN_PROPERTY_DELETER_ARGS \ - _NAN_PROPERTY_DELETER_ARGS_TYPE args -# define _NAN_PROPERTY_DELETER_RETURN_TYPE void - -# define _NAN_PROPERTY_QUERY_ARGS_TYPE \ - const v8::PropertyCallbackInfo& -# define _NAN_PROPERTY_QUERY_ARGS _NAN_PROPERTY_QUERY_ARGS_TYPE args -# define _NAN_PROPERTY_QUERY_RETURN_TYPE void - -# define _NAN_INDEX_GETTER_ARGS_TYPE \ - const v8::PropertyCallbackInfo& -# define _NAN_INDEX_GETTER_ARGS _NAN_INDEX_GETTER_ARGS_TYPE args -# define _NAN_INDEX_GETTER_RETURN_TYPE void - -# define _NAN_INDEX_SETTER_ARGS_TYPE \ - const v8::PropertyCallbackInfo& -# define _NAN_INDEX_SETTER_ARGS _NAN_INDEX_SETTER_ARGS_TYPE args -# define _NAN_INDEX_SETTER_RETURN_TYPE void - -# define _NAN_INDEX_ENUMERATOR_ARGS_TYPE \ - const v8::PropertyCallbackInfo& -# define _NAN_INDEX_ENUMERATOR_ARGS _NAN_INDEX_ENUMERATOR_ARGS_TYPE args -# define _NAN_INDEX_ENUMERATOR_RETURN_TYPE void - -# define _NAN_INDEX_DELETER_ARGS_TYPE \ - const v8::PropertyCallbackInfo& -# define _NAN_INDEX_DELETER_ARGS _NAN_INDEX_DELETER_ARGS_TYPE args -# define _NAN_INDEX_DELETER_RETURN_TYPE void - -# define _NAN_INDEX_QUERY_ARGS_TYPE \ - const v8::PropertyCallbackInfo& -# define _NAN_INDEX_QUERY_ARGS _NAN_INDEX_QUERY_ARGS_TYPE args -# define _NAN_INDEX_QUERY_RETURN_TYPE void - -typedef v8::FunctionCallback NanFunctionCallback; -static v8::Isolate* nan_isolate = v8::Isolate::GetCurrent(); - -# define NanUndefined() v8::Undefined(nan_isolate) -# define NanNull() v8::Null(nan_isolate) -# define NanTrue() v8::True(nan_isolate) -# define NanFalse() v8::False(nan_isolate) -# define NanAdjustExternalMemory(amount) \ - nan_isolate->AdjustAmountOfExternalAllocatedMemory(amount) -# define NanSetTemplate(templ, name, value) templ->Set(nan_isolate, name, value) -# define NanGetCurrentContext() nan_isolate->GetCurrentContext() -# define NanMakeCallback(target, func, argc, argv) \ - node::MakeCallback(nan_isolate, target, func, argc, argv) -# define NanGetInternalFieldPointer(object, index) \ - object->GetAlignedPointerFromInternalField(index) -# define NanSetInternalFieldPointer(object, index, value) \ - object->SetAlignedPointerInInternalField(index, value) - - template - NAN_INLINE v8::Local NanNew() { - return T::New(nan_isolate); - } - - template - NAN_INLINE v8::Local NanNew(P arg1) { - return T::New(nan_isolate, arg1); - } - - template - NAN_INLINE v8::Local NanNew( - v8::Handle receiver - , int argc - , v8::Handle argv[] = 0) { - return v8::Signature::New(nan_isolate, receiver, argc, argv); - } - - template - NAN_INLINE v8::Local NanNew( - NanFunctionCallback callback - , v8::Handle data = v8::Handle() - , v8::Handle signature = v8::Handle()) { - return T::New(nan_isolate, callback, data, signature); - } - - template - NAN_INLINE v8::Local NanNew(v8::Handle arg1) { - return v8::Local::New(nan_isolate, arg1); - } - - template - NAN_INLINE v8::Local NanNew(const v8::Persistent &arg1) { - return v8::Local::New(nan_isolate, arg1); - } - - template - NAN_INLINE v8::Local NanNew(P arg1, int arg2) { - return T::New(nan_isolate, arg1, arg2); - } - - template<> - NAN_INLINE v8::Local NanNew() { - return v8::Array::New(nan_isolate); - } - - template<> - NAN_INLINE v8::Local NanNew(int length) { - return v8::Array::New(nan_isolate, length); - } - - template<> - NAN_INLINE v8::Local NanNew(double time) { - return v8::Date::New(nan_isolate, time).As(); - } - - template<> - NAN_INLINE v8::Local NanNew(int time) { - return v8::Date::New(nan_isolate, time).As(); - } - - typedef v8::UnboundScript NanUnboundScript; - typedef v8::Script NanBoundScript; - - template - NAN_INLINE v8::Local NanNew( - P s - , const v8::ScriptOrigin& origin - ) { - v8::ScriptCompiler::Source source(s, origin); - return v8::ScriptCompiler::CompileUnbound(nan_isolate, &source); - } - - template<> - NAN_INLINE v8::Local NanNew( - v8::Local s - ) { - v8::ScriptCompiler::Source source(s); - return v8::ScriptCompiler::CompileUnbound(nan_isolate, &source); - } - - NAN_INLINE v8::Local NanNew( - v8::String::ExternalStringResource *resource) { - return v8::String::NewExternal(nan_isolate, resource); - } - - NAN_INLINE v8::Local NanNew( - v8::String::ExternalAsciiStringResource *resource) { - return v8::String::NewExternal(nan_isolate, resource); - } - - template<> - NAN_INLINE v8::Local NanNew(bool value) { - return v8::BooleanObject::New(value).As(); - } - - template<> - NAN_INLINE v8::Local - NanNew >( - v8::Local value) { - return v8::StringObject::New(value).As(); - } - - template<> - NAN_INLINE v8::Local - NanNew >( - v8::Handle value) { - return v8::StringObject::New(value).As(); - } - - template<> - NAN_INLINE v8::Local NanNew(double val) { - return v8::NumberObject::New(nan_isolate, val).As(); - } - - template - NAN_INLINE v8::Local NanNew( - v8::Handle pattern, v8::RegExp::Flags flags) { - return v8::RegExp::New(pattern, flags); - } - - template - NAN_INLINE v8::Local NanNew( - v8::Local pattern, v8::RegExp::Flags flags) { - return v8::RegExp::New(pattern, flags); - } - - template - NAN_INLINE v8::Local NanNew( - v8::Handle pattern, v8::RegExp::Flags flags) { - return v8::RegExp::New(pattern, flags); - } - - template - NAN_INLINE v8::Local NanNew( - v8::Local pattern, v8::RegExp::Flags flags) { - return v8::RegExp::New(pattern, flags); - } - - template<> - NAN_INLINE v8::Local NanNew(int32_t val) { - return v8::Uint32::NewFromUnsigned(nan_isolate, val)->ToUint32(); - } - - template<> - NAN_INLINE v8::Local NanNew(uint32_t val) { - return v8::Uint32::NewFromUnsigned(nan_isolate, val)->ToUint32(); - } - - template<> - NAN_INLINE v8::Local NanNew(int32_t val) { - return v8::Int32::New(nan_isolate, val)->ToInt32(); - } - - template<> - NAN_INLINE v8::Local NanNew(uint32_t val) { - return v8::Int32::New(nan_isolate, val)->ToInt32(); - } - - template<> - NAN_INLINE v8::Local NanNew( - char *arg - , int length) { - return v8::String::NewFromUtf8( - nan_isolate - , arg - , v8::String::kNormalString - , length); - } - - template<> - NAN_INLINE v8::Local NanNew( - const char *arg - , int length) { - return v8::String::NewFromUtf8( - nan_isolate - , arg - , v8::String::kNormalString - , length); - } - - template<> - NAN_INLINE v8::Local NanNew(char *arg) { - return v8::String::NewFromUtf8(nan_isolate, arg); - } - - template<> - NAN_INLINE v8::Local NanNew( - const char *arg) { - return v8::String::NewFromUtf8(nan_isolate, arg); - } - - template<> - NAN_INLINE v8::Local NanNew( - uint8_t *arg - , int length) { - return v8::String::NewFromOneByte( - nan_isolate - , arg - , v8::String::kNormalString - , length); - } - - template<> - NAN_INLINE v8::Local NanNew( - const uint8_t *arg - , int length) { - return v8::String::NewFromOneByte( - nan_isolate - , arg - , v8::String::kNormalString - , length); - } - - template<> - NAN_INLINE v8::Local NanNew(uint8_t *arg) { - return v8::String::NewFromOneByte(nan_isolate, arg); - } - - template<> - NAN_INLINE v8::Local NanNew( - const uint8_t *arg) { - return v8::String::NewFromOneByte(nan_isolate, arg); - } - - template<> - NAN_INLINE v8::Local NanNew( - uint16_t *arg - , int length) { - return v8::String::NewFromTwoByte( - nan_isolate - , arg - , v8::String::kNormalString - , length); - } - - template<> - NAN_INLINE v8::Local NanNew( - const uint16_t *arg - , int length) { - return v8::String::NewFromTwoByte( - nan_isolate - , arg - , v8::String::kNormalString - , length); - } - template<> - NAN_INLINE v8::Local NanNew( - uint16_t *arg) { - return v8::String::NewFromTwoByte(nan_isolate, arg); - } - - template<> - NAN_INLINE v8::Local NanNew( - const uint16_t *arg) { - return v8::String::NewFromTwoByte(nan_isolate, arg); - } - - template<> - NAN_INLINE v8::Local NanNew() { - return v8::String::Empty(nan_isolate); - } - - NAN_INLINE void NanAddGCEpilogueCallback( - v8::Isolate::GCEpilogueCallback callback - , v8::GCType gc_type_filter = v8::kGCTypeAll) { - nan_isolate->AddGCEpilogueCallback(callback, gc_type_filter); - } - - NAN_INLINE void NanRemoveGCEpilogueCallback( - v8::Isolate::GCEpilogueCallback callback) { - nan_isolate->RemoveGCEpilogueCallback(callback); - } - - NAN_INLINE void NanAddGCPrologueCallback( - v8::Isolate::GCPrologueCallback callback - , v8::GCType gc_type_filter = v8::kGCTypeAll) { - nan_isolate->AddGCPrologueCallback(callback, gc_type_filter); - } - - NAN_INLINE void NanRemoveGCPrologueCallback( - v8::Isolate::GCPrologueCallback callback) { - nan_isolate->RemoveGCPrologueCallback(callback); - } - - NAN_INLINE void NanGetHeapStatistics( - v8::HeapStatistics *heap_statistics) { - nan_isolate->GetHeapStatistics(heap_statistics); - } - -# define NanSymbol(value) NanNew(value) - - template - NAN_INLINE void NanAssignPersistent( - v8::Persistent& handle - , v8::Handle obj) { - handle.Reset(nan_isolate, obj); - } - - template - NAN_INLINE void NanAssignPersistent( - v8::Persistent& handle - , const v8::Persistent& obj) { - handle.Reset(nan_isolate, obj); - } - - template - struct _NanWeakCallbackInfo { - typedef void (*Callback)( - const v8::WeakCallbackData >& data); - _NanWeakCallbackInfo(v8::Handle handle, P* param, Callback cb) - : parameter(param), callback(cb) { - NanAssignPersistent(persistent, handle); - } - - ~_NanWeakCallbackInfo() { - persistent.Reset(); - } - - P* const parameter; - Callback const callback; - v8::Persistent persistent; - }; - - template - class _NanWeakCallbackData { - public: - _NanWeakCallbackData(_NanWeakCallbackInfo *info) - : info_(info) { } - - NAN_INLINE v8::Local GetValue() const { - return NanNew(info_->persistent); - } - NAN_INLINE P* GetParameter() const { return info_->parameter; } - NAN_INLINE void Revive() const { - info_->persistent.SetWeak(info_, info_->callback); - } - - NAN_INLINE void Dispose() const { - delete info_; - } - - private: - _NanWeakCallbackInfo* info_; - }; - -// do not use for declaration -# define NAN_WEAK_CALLBACK(name) \ - template \ - static void name( \ - const v8::WeakCallbackData > &data) { \ - _NanWeakCallbackData wcbd( \ - data.GetParameter()); \ - _Nan_Weak_Callback_ ## name(wcbd); \ - } \ - \ - template \ - NAN_INLINE void _Nan_Weak_Callback_ ## name( \ - const _NanWeakCallbackData &data) - -# define NanScope() v8::HandleScope scope(nan_isolate) -# define NanEscapableScope() v8::EscapableHandleScope scope(nan_isolate) -# define NanEscapeScope(val) scope.Escape(val) -# define NanLocker() v8::Locker locker(nan_isolate) -# define NanUnlocker() v8::Unlocker unlocker(nan_isolate) -# define NanReturnValue(value) return args.GetReturnValue().Set(value) -# define NanReturnUndefined() return -# define NanReturnNull() return args.GetReturnValue().SetNull() -# define NanReturnEmptyString() return args.GetReturnValue().SetEmptyString() - -# define NanObjectWrapHandle(obj) obj->handle() - -template -void NAN_INLINE NanMakeWeakPersistent( - v8::Handle handle - , P* parameter - , typename _NanWeakCallbackInfo::Callback callback) { - _NanWeakCallbackInfo *cbinfo = - new _NanWeakCallbackInfo(handle, parameter, callback); - cbinfo->persistent.SetWeak(cbinfo, callback); -} - -# define _NAN_ERROR(fun, errmsg) fun(NanNew(errmsg)) - -# define _NAN_THROW_ERROR(fun, errmsg) \ - do { \ - NanScope(); \ - nan_isolate->ThrowException(_NAN_ERROR(fun, errmsg)); \ - } while (0); - - NAN_INLINE v8::Local NanError(const char* errmsg) { - return _NAN_ERROR(v8::Exception::Error, errmsg); - } - - NAN_INLINE void NanThrowError(const char* errmsg) { - _NAN_THROW_ERROR(v8::Exception::Error, errmsg); - } - - NAN_INLINE void NanThrowError(v8::Handle error) { - NanScope(); - nan_isolate->ThrowException(error); - } - - NAN_INLINE v8::Local NanError( - const char *msg - , const int errorNumber - ) { - v8::Local err = v8::Exception::Error(NanNew(msg)); - v8::Local obj = err.As(); - obj->Set(NanSymbol("code"), NanNew(errorNumber)); - return err; - } - - NAN_INLINE void NanThrowError( - const char *msg - , const int errorNumber - ) { - NanThrowError(NanError(msg, errorNumber)); - } - - NAN_INLINE v8::Local NanTypeError(const char* errmsg) { - return _NAN_ERROR(v8::Exception::TypeError, errmsg); - } - - NAN_INLINE void NanThrowTypeError(const char* errmsg) { - _NAN_THROW_ERROR(v8::Exception::TypeError, errmsg); - } - - NAN_INLINE v8::Local NanRangeError(const char* errmsg) { - return _NAN_ERROR(v8::Exception::RangeError, errmsg); - } - - NAN_INLINE void NanThrowRangeError(const char* errmsg) { - _NAN_THROW_ERROR(v8::Exception::RangeError, errmsg); - } - - template NAN_INLINE void NanDisposePersistent( - v8::Persistent &handle - ) { - handle.Reset(); - } - - NAN_INLINE v8::Local NanNewBufferHandle ( - char *data - , size_t length - , node::smalloc::FreeCallback callback - , void *hint - ) { - return node::Buffer::New(nan_isolate, data, length, callback, hint); - } - - NAN_INLINE v8::Local NanNewBufferHandle ( - const char *data - , uint32_t size - ) { - return node::Buffer::New(nan_isolate, data, size); - } - - NAN_INLINE v8::Local NanNewBufferHandle (uint32_t size) { - return node::Buffer::New(nan_isolate, size); - } - - NAN_INLINE v8::Local NanBufferUse( - char* data - , uint32_t size - ) { - return node::Buffer::Use(nan_isolate, data, size); - } - - NAN_INLINE bool NanHasInstance( - v8::Persistent& function_template - , v8::Handle value - ) { - return NanNew(function_template)->HasInstance(value); - } - - NAN_INLINE v8::Local NanNewContextHandle( - v8::ExtensionConfiguration* extensions = NULL - , v8::Handle tmpl = v8::Handle() - , v8::Handle obj = v8::Handle() - ) { - return v8::Local::New( - nan_isolate - , v8::Context::New(nan_isolate, extensions, tmpl, obj) - ); - } - - NAN_INLINE v8::Local NanCompileScript( - v8::Local s - , const v8::ScriptOrigin& origin - ) { - v8::ScriptCompiler::Source source(s, origin); - return v8::ScriptCompiler::Compile(nan_isolate, &source); - } - - NAN_INLINE v8::Local NanCompileScript( - v8::Local s - ) { - v8::ScriptCompiler::Source source(s); - return v8::ScriptCompiler::Compile(nan_isolate, &source); - } - - NAN_INLINE v8::Local NanRunScript( - v8::Local script - ) { - return script->BindToCurrentContext()->Run(); - } - - NAN_INLINE v8::Local NanRunScript( - v8::Local script - ) { - return script->Run(); - } - -#else -// Node 0.8 and 0.10 - -# define _NAN_METHOD_ARGS_TYPE const v8::Arguments& -# define _NAN_METHOD_ARGS _NAN_METHOD_ARGS_TYPE args -# define _NAN_METHOD_RETURN_TYPE v8::Handle - -# define _NAN_GETTER_ARGS_TYPE const v8::AccessorInfo & -# define _NAN_GETTER_ARGS _NAN_GETTER_ARGS_TYPE args -# define _NAN_GETTER_RETURN_TYPE v8::Handle - -# define _NAN_SETTER_ARGS_TYPE const v8::AccessorInfo & -# define _NAN_SETTER_ARGS _NAN_SETTER_ARGS_TYPE args -# define _NAN_SETTER_RETURN_TYPE void - -# define _NAN_PROPERTY_GETTER_ARGS_TYPE const v8::AccessorInfo& -# define _NAN_PROPERTY_GETTER_ARGS _NAN_PROPERTY_GETTER_ARGS_TYPE args -# define _NAN_PROPERTY_GETTER_RETURN_TYPE v8::Handle - -# define _NAN_PROPERTY_SETTER_ARGS_TYPE const v8::AccessorInfo& -# define _NAN_PROPERTY_SETTER_ARGS _NAN_PROPERTY_SETTER_ARGS_TYPE args -# define _NAN_PROPERTY_SETTER_RETURN_TYPE v8::Handle - -# define _NAN_PROPERTY_ENUMERATOR_ARGS_TYPE const v8::AccessorInfo& -# define _NAN_PROPERTY_ENUMERATOR_ARGS _NAN_PROPERTY_ENUMERATOR_ARGS_TYPE args -# define _NAN_PROPERTY_ENUMERATOR_RETURN_TYPE v8::Handle - -# define _NAN_PROPERTY_DELETER_ARGS_TYPE const v8::AccessorInfo& -# define _NAN_PROPERTY_DELETER_ARGS _NAN_PROPERTY_DELETER_ARGS_TYPE args -# define _NAN_PROPERTY_DELETER_RETURN_TYPE v8::Handle - -# define _NAN_PROPERTY_QUERY_ARGS_TYPE const v8::AccessorInfo& -# define _NAN_PROPERTY_QUERY_ARGS _NAN_PROPERTY_QUERY_ARGS_TYPE args -# define _NAN_PROPERTY_QUERY_RETURN_TYPE v8::Handle - -# define _NAN_INDEX_GETTER_ARGS_TYPE const v8::AccessorInfo& -# define _NAN_INDEX_GETTER_ARGS _NAN_INDEX_GETTER_ARGS_TYPE args -# define _NAN_INDEX_GETTER_RETURN_TYPE v8::Handle - -# define _NAN_INDEX_SETTER_ARGS_TYPE const v8::AccessorInfo& -# define _NAN_INDEX_SETTER_ARGS _NAN_INDEX_SETTER_ARGS_TYPE args -# define _NAN_INDEX_SETTER_RETURN_TYPE v8::Handle - -# define _NAN_INDEX_ENUMERATOR_ARGS_TYPE const v8::AccessorInfo& -# define _NAN_INDEX_ENUMERATOR_ARGS _NAN_INDEX_ENUMERATOR_ARGS_TYPE args -# define _NAN_INDEX_ENUMERATOR_RETURN_TYPE v8::Handle - -# define _NAN_INDEX_DELETER_ARGS_TYPE const v8::AccessorInfo& -# define _NAN_INDEX_DELETER_ARGS _NAN_INDEX_DELETER_ARGS_TYPE args -# define _NAN_INDEX_DELETER_RETURN_TYPE v8::Handle - -# define _NAN_INDEX_QUERY_ARGS_TYPE const v8::AccessorInfo& -# define _NAN_INDEX_QUERY_ARGS _NAN_INDEX_QUERY_ARGS_TYPE args -# define _NAN_INDEX_QUERY_RETURN_TYPE v8::Handle - -typedef v8::InvocationCallback NanFunctionCallback; - -# define NanUndefined() v8::Undefined() -# define NanNull() v8::Null() -# define NanTrue() v8::True() -# define NanFalse() v8::False() -# define NanAdjustExternalMemory(amount) \ - v8::V8::AdjustAmountOfExternalAllocatedMemory(amount) -# define NanSetTemplate(templ, name, value) templ->Set(name, value) -# define NanGetCurrentContext() v8::Context::GetCurrent() -# if NODE_VERSION_AT_LEAST(0, 8, 0) -# define NanMakeCallback(target, func, argc, argv) \ - node::MakeCallback(target, func, argc, argv) -# else -# define NanMakeCallback(target, func, argc, argv) \ - do { \ - v8::TryCatch try_catch; \ - func->Call(target, argc, argv); \ - if (try_catch.HasCaught()) { \ - v8::FatalException(try_catch); \ - } \ - } while (0) -# endif - -# define NanSymbol(value) v8::String::NewSymbol(value) - - template - NAN_INLINE v8::Local NanNew() { - return v8::Local::New(T::New()); - } - - template - NAN_INLINE v8::Local NanNew(v8::Handle arg) { - return v8::Local::New(arg); - } - - template - NAN_INLINE v8::Local NanNew( - v8::Handle receiver - , int argc - , v8::Handle argv[] = 0) { - return v8::Signature::New(receiver, argc, argv); - } - - template - NAN_INLINE v8::Local NanNew( - NanFunctionCallback callback - , v8::Handle data = v8::Handle() - , v8::Handle signature = v8::Handle()) { - return T::New(callback, data, signature); - } - - template - NAN_INLINE v8::Local NanNew(const v8::Persistent &arg) { - return v8::Local::New(arg); - } - - template - NAN_INLINE v8::Local NanNew(P arg) { - return v8::Local::New(T::New(arg)); - } - - template - NAN_INLINE v8::Local NanNew(P arg, int length) { - return v8::Local::New(T::New(arg, length)); - } - - template - NAN_INLINE v8::Local NanNew( - v8::Handle pattern, v8::RegExp::Flags flags) { - return v8::RegExp::New(pattern, flags); - } - - template - NAN_INLINE v8::Local NanNew( - v8::Local pattern, v8::RegExp::Flags flags) { - return v8::RegExp::New(pattern, flags); - } - - template - NAN_INLINE v8::Local NanNew( - v8::Handle pattern, v8::RegExp::Flags flags) { - return v8::RegExp::New(pattern, flags); - } - - template - NAN_INLINE v8::Local NanNew( - v8::Local pattern, v8::RegExp::Flags flags) { - return v8::RegExp::New(pattern, flags); - } - - template<> - NAN_INLINE v8::Local NanNew() { - return v8::Array::New(); - } - - template<> - NAN_INLINE v8::Local NanNew(int length) { - return v8::Array::New(length); - } - - - template<> - NAN_INLINE v8::Local NanNew(double time) { - return v8::Date::New(time).As(); - } - - template<> - NAN_INLINE v8::Local NanNew(int time) { - return v8::Date::New(time).As(); - } - - typedef v8::Script NanUnboundScript; - typedef v8::Script NanBoundScript; - - template - NAN_INLINE v8::Local NanNew( - P s - , const v8::ScriptOrigin& origin - ) { - return v8::Script::New(s, const_cast(&origin)); - } - - template<> - NAN_INLINE v8::Local NanNew( - v8::Local s - ) { - return v8::Script::New(s); - } - - NAN_INLINE v8::Local NanNew( - v8::String::ExternalStringResource *resource) { - return v8::String::NewExternal(resource); - } - - NAN_INLINE v8::Local NanNew( - v8::String::ExternalAsciiStringResource *resource) { - return v8::String::NewExternal(resource); - } - - template<> - NAN_INLINE v8::Local NanNew(bool value) { - return v8::BooleanObject::New(value).As(); - } - - template<> - NAN_INLINE v8::Local - NanNew >( - v8::Local value) { - return v8::StringObject::New(value).As(); - } - - template<> - NAN_INLINE v8::Local - NanNew >( - v8::Handle value) { - return v8::StringObject::New(value).As(); - } - - template<> - NAN_INLINE v8::Local NanNew(double val) { - return v8::NumberObject::New(val).As(); - } - - template<> - NAN_INLINE v8::Local NanNew(int32_t val) { - return v8::Uint32::NewFromUnsigned(val)->ToUint32(); - } - - template<> - NAN_INLINE v8::Local NanNew(uint32_t val) { - return v8::Uint32::NewFromUnsigned(val)->ToUint32(); - } - - template<> - NAN_INLINE v8::Local NanNew(int32_t val) { - return v8::Int32::New(val)->ToInt32(); - } - - template<> - NAN_INLINE v8::Local NanNew(uint32_t val) { - return v8::Int32::New(val)->ToInt32(); - } - - template<> - NAN_INLINE v8::Local NanNew( - uint8_t *arg - , int length) { - uint16_t *warg = new uint16_t[length]; - for (int i = 0; i < length; i++) { - warg[i] = arg[i]; - } - v8::Local retval = v8::String::New(warg, length); - delete[] warg; - return retval; - } - - template<> - NAN_INLINE v8::Local NanNew( - const uint8_t *arg - , int length) { - uint16_t *warg = new uint16_t[length]; - for (int i = 0; i < length; i++) { - warg[i] = arg[i]; - } - v8::Local retval = v8::String::New(warg, length); - delete[] warg; - return retval; - } - - template<> - NAN_INLINE v8::Local NanNew(uint8_t *arg) { - int length = strlen(reinterpret_cast(arg)); - uint16_t *warg = new uint16_t[length]; - for (int i = 0; i < length; i++) { - warg[i] = arg[i]; - } - - v8::Local retval = v8::String::New(warg, length); - delete[] warg; - return retval; - } - - template<> - NAN_INLINE v8::Local NanNew( - const uint8_t *arg) { - int length = strlen(reinterpret_cast(arg)); - uint16_t *warg = new uint16_t[length]; - for (int i = 0; i < length; i++) { - warg[i] = arg[i]; - } - v8::Local retval = v8::String::New(warg, length); - delete[] warg; - return retval; - } - - template<> - NAN_INLINE v8::Local NanNew() { - return v8::String::Empty(); - } - - NAN_INLINE void NanAddGCEpilogueCallback( - v8::GCEpilogueCallback callback - , v8::GCType gc_type_filter = v8::kGCTypeAll) { - v8::V8::AddGCEpilogueCallback(callback, gc_type_filter); - } - NAN_INLINE void NanRemoveGCEpilogueCallback( - v8::GCEpilogueCallback callback) { - v8::V8::RemoveGCEpilogueCallback(callback); - } - NAN_INLINE void NanAddGCPrologueCallback( - v8::GCPrologueCallback callback - , v8::GCType gc_type_filter = v8::kGCTypeAll) { - v8::V8::AddGCPrologueCallback(callback, gc_type_filter); - } - NAN_INLINE void NanRemoveGCPrologueCallback( - v8::GCPrologueCallback callback) { - v8::V8::RemoveGCPrologueCallback(callback); - } - NAN_INLINE void NanGetHeapStatistics( - v8::HeapStatistics *heap_statistics) { - v8::V8::GetHeapStatistics(heap_statistics); - } - - template - NAN_INLINE void NanAssignPersistent( - v8::Persistent& handle - , v8::Handle obj) { - handle.Dispose(); - handle = v8::Persistent::New(obj); - } - - template - struct _NanWeakCallbackInfo { - typedef void (*Callback)(v8::Persistent object, void* parameter); - _NanWeakCallbackInfo(v8::Handle handle, P* param, Callback cb) : - parameter(param) - , callback(cb) - , persistent(v8::Persistent::New(handle)) { } - - ~_NanWeakCallbackInfo() { - persistent.Dispose(); - persistent.Clear(); - } - - P* const parameter; - Callback const callback; - v8::Persistent persistent; - }; - - template - class _NanWeakCallbackData { - public: - _NanWeakCallbackData(_NanWeakCallbackInfo *info) - : info_(info) { } - - NAN_INLINE v8::Local GetValue() const { - return NanNew(info_->persistent); - } - NAN_INLINE P* GetParameter() const { return info_->parameter; } - NAN_INLINE void Revive() const { - info_->persistent.MakeWeak(info_, info_->callback); - } - NAN_INLINE void Dispose() const { - delete info_; - } - - private: - _NanWeakCallbackInfo* info_; - }; - -# define NanGetInternalFieldPointer(object, index) \ - object->GetPointerFromInternalField(index) -# define NanSetInternalFieldPointer(object, index, value) \ - object->SetPointerInInternalField(index, value) - -// do not use for declaration -# define NAN_WEAK_CALLBACK(name) \ - template \ - static void name( \ - v8::Persistent object, void *data) { \ - _NanWeakCallbackData wcbd( \ - static_cast<_NanWeakCallbackInfo*>(data)); \ - _Nan_Weak_Callback_ ## name(wcbd); \ - } \ - \ - template \ - NAN_INLINE void _Nan_Weak_Callback_ ## name( \ - const _NanWeakCallbackData &data) - - template - NAN_INLINE void NanMakeWeakPersistent( - v8::Handle handle - , P* parameter - , typename _NanWeakCallbackInfo::Callback callback) { - _NanWeakCallbackInfo *cbinfo = - new _NanWeakCallbackInfo(handle, parameter, callback); - cbinfo->persistent.MakeWeak(cbinfo, callback); - } - -# define NanScope() v8::HandleScope scope -# define NanEscapableScope() v8::HandleScope scope -# define NanEscapeScope(val) scope.Close(val) -# define NanLocker() v8::Locker locker -# define NanUnlocker() v8::Unlocker unlocker -# define NanReturnValue(value) return scope.Close(value) -# define NanReturnUndefined() return v8::Undefined() -# define NanReturnNull() return v8::Null() -# define NanReturnEmptyString() return v8::String::Empty() -# define NanObjectWrapHandle(obj) v8::Local::New(obj->handle_) - -# define _NAN_ERROR(fun, errmsg) \ - fun(v8::String::New(errmsg)) - -# define _NAN_THROW_ERROR(fun, errmsg) \ - do { \ - NanScope(); \ - return v8::Local::New( \ - v8::ThrowException(_NAN_ERROR(fun, errmsg))); \ - } while (0); - - NAN_INLINE v8::Local NanError(const char* errmsg) { - return _NAN_ERROR(v8::Exception::Error, errmsg); - } - - NAN_INLINE v8::Local NanThrowError(const char* errmsg) { - _NAN_THROW_ERROR(v8::Exception::Error, errmsg); - } - - NAN_INLINE v8::Local NanThrowError( - v8::Handle error - ) { - NanScope(); - return v8::Local::New(v8::ThrowException(error)); - } - - NAN_INLINE v8::Local NanError( - const char *msg - , const int errorNumber - ) { - v8::Local err = v8::Exception::Error(v8::String::New(msg)); - v8::Local obj = err.As(); - obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber)); - return err; - } - - NAN_INLINE v8::Local NanThrowError( - const char *msg - , const int errorNumber - ) { - return NanThrowError(NanError(msg, errorNumber)); - } - - NAN_INLINE v8::Local NanTypeError(const char* errmsg) { - return _NAN_ERROR(v8::Exception::TypeError, errmsg); - } - - NAN_INLINE v8::Local NanThrowTypeError( - const char* errmsg - ) { - _NAN_THROW_ERROR(v8::Exception::TypeError, errmsg); - } - - NAN_INLINE v8::Local NanRangeError( - const char* errmsg - ) { - return _NAN_ERROR(v8::Exception::RangeError, errmsg); - } - - NAN_INLINE v8::Local NanThrowRangeError( - const char* errmsg - ) { - _NAN_THROW_ERROR(v8::Exception::RangeError, errmsg); - } - - template - NAN_INLINE void NanDisposePersistent( - v8::Persistent &handle) { // NOLINT(runtime/references) - handle.Dispose(); - handle.Clear(); - } - - NAN_INLINE v8::Local NanNewBufferHandle ( - char *data - , size_t length - , node::Buffer::free_callback callback - , void *hint - ) { - return NanNew( - node::Buffer::New(data, length, callback, hint)->handle_); - } - - NAN_INLINE v8::Local NanNewBufferHandle ( - const char *data - , uint32_t size - ) { -#if NODE_MODULE_VERSION >= 0x000B - return NanNew(node::Buffer::New(data, size)->handle_); -#else - return NanNew( - node::Buffer::New(const_cast(data), size)->handle_); -#endif - } - - NAN_INLINE v8::Local NanNewBufferHandle (uint32_t size) { - return NanNew(node::Buffer::New(size)->handle_); - } - - NAN_INLINE void FreeData(char *data, void *hint) { - delete[] data; - } - - NAN_INLINE v8::Local NanBufferUse( - char* data - , uint32_t size - ) { - return NanNew( - node::Buffer::New(data, size, FreeData, NULL)->handle_); - } - - NAN_INLINE bool NanHasInstance( - v8::Persistent& function_template - , v8::Handle value - ) { - return function_template->HasInstance(value); - } - - NAN_INLINE v8::Local NanNewContextHandle( - v8::ExtensionConfiguration* extensions = NULL - , v8::Handle tmpl = v8::Handle() - , v8::Handle obj = v8::Handle() - ) { - v8::Persistent ctx = v8::Context::New(extensions, tmpl, obj); - v8::Local lctx = NanNew(ctx); - ctx.Dispose(); - return lctx; - } - - NAN_INLINE v8::Local NanCompileScript( - v8::Local s - , const v8::ScriptOrigin& origin - ) { - return v8::Script::Compile(s, const_cast(&origin)); - } - - NAN_INLINE v8::Local NanCompileScript( - v8::Local s - ) { - return v8::Script::Compile(s); - } - - NAN_INLINE v8::Local NanRunScript(v8::Local script) { - return script->Run(); - } - -#endif // NODE_MODULE_VERSION - -typedef void (*NanFreeCallback)(char *data, void *hint); - -#define NAN_METHOD(name) _NAN_METHOD_RETURN_TYPE name(_NAN_METHOD_ARGS) -#define NAN_GETTER(name) \ - _NAN_GETTER_RETURN_TYPE name( \ - v8::Local property \ - , _NAN_GETTER_ARGS) -#define NAN_SETTER(name) \ - _NAN_SETTER_RETURN_TYPE name( \ - v8::Local property \ - , v8::Local value \ - , _NAN_SETTER_ARGS) -#define NAN_PROPERTY_GETTER(name) \ - _NAN_PROPERTY_GETTER_RETURN_TYPE name( \ - v8::Local property \ - , _NAN_PROPERTY_GETTER_ARGS) -#define NAN_PROPERTY_SETTER(name) \ - _NAN_PROPERTY_SETTER_RETURN_TYPE name( \ - v8::Local property \ - , v8::Local value \ - , _NAN_PROPERTY_SETTER_ARGS) -#define NAN_PROPERTY_ENUMERATOR(name) \ - _NAN_PROPERTY_ENUMERATOR_RETURN_TYPE name(_NAN_PROPERTY_ENUMERATOR_ARGS) -#define NAN_PROPERTY_DELETER(name) \ - _NAN_PROPERTY_DELETER_RETURN_TYPE name( \ - v8::Local property \ - , _NAN_PROPERTY_DELETER_ARGS) -#define NAN_PROPERTY_QUERY(name) \ - _NAN_PROPERTY_QUERY_RETURN_TYPE name( \ - v8::Local property \ - , _NAN_PROPERTY_QUERY_ARGS) -# define NAN_INDEX_GETTER(name) \ - _NAN_INDEX_GETTER_RETURN_TYPE name(uint32_t index, _NAN_INDEX_GETTER_ARGS) -#define NAN_INDEX_SETTER(name) \ - _NAN_INDEX_SETTER_RETURN_TYPE name( \ - uint32_t index \ - , v8::Local value \ - , _NAN_INDEX_SETTER_ARGS) -#define NAN_INDEX_ENUMERATOR(name) \ - _NAN_INDEX_ENUMERATOR_RETURN_TYPE name(_NAN_INDEX_ENUMERATOR_ARGS) -#define NAN_INDEX_DELETER(name) \ - _NAN_INDEX_DELETER_RETURN_TYPE name( \ - uint32_t index \ - , _NAN_INDEX_DELETER_ARGS) -#define NAN_INDEX_QUERY(name) \ - _NAN_INDEX_QUERY_RETURN_TYPE name(uint32_t index, _NAN_INDEX_QUERY_ARGS) - -class NanCallback { - public: - NanCallback() { - NanScope(); - v8::Local obj = NanNew(); - NanAssignPersistent(handle, obj); - } - - explicit NanCallback(const v8::Handle &fn) { - NanScope(); - v8::Local obj = NanNew(); - NanAssignPersistent(handle, obj); - SetFunction(fn); - } - - ~NanCallback() { - if (handle.IsEmpty()) return; - NanDisposePersistent(handle); - } - - NAN_INLINE void SetFunction(const v8::Handle &fn) { - NanScope(); - NanNew(handle)->Set(NanSymbol("callback"), fn); - } - - NAN_INLINE v8::Local GetFunction () { - return NanNew(handle)->Get(NanSymbol("callback")) - .As(); - } - - void Call(int argc, v8::Handle argv[]) { - NanScope(); -#if (NODE_MODULE_VERSION > 0x000B) // 0.11.12+ - v8::Local callback = NanNew(handle)-> - Get(NanSymbol("callback")).As(); - node::MakeCallback( - nan_isolate - , nan_isolate->GetCurrentContext()->Global() - , callback - , argc - , argv - ); -#else -#if NODE_VERSION_AT_LEAST(0, 8, 0) - v8::Local callback = NanNew(handle)-> - Get(NanSymbol("callback")).As(); - node::MakeCallback( - v8::Context::GetCurrent()->Global() - , callback - , argc - , argv - ); -#else - node::MakeCallback(handle, "callback", argc, argv); -#endif -#endif - } - - private: - v8::Persistent handle; -}; - -/* abstract */ class NanAsyncWorker { - public: - explicit NanAsyncWorker(NanCallback *callback) : callback(callback) { - request.data = this; - errmsg = NULL; - - NanScope(); - v8::Local obj = NanNew(); - NanAssignPersistent(persistentHandle, obj); - } - - virtual ~NanAsyncWorker() { - NanScope(); - - if (!persistentHandle.IsEmpty()) - NanDisposePersistent(persistentHandle); - if (callback) - delete callback; - if (errmsg) - delete errmsg; - } - - virtual void WorkComplete() { - NanScope(); - - if (errmsg == NULL) - HandleOKCallback(); - else - HandleErrorCallback(); - delete callback; - callback = NULL; - } - - NAN_INLINE void SaveToPersistent(const char *key, v8::Local &obj) { - v8::Local handle = NanNew(persistentHandle); - handle->Set(NanSymbol(key), obj); - } - - v8::Local GetFromPersistent(const char *key) { - NanEscapableScope(); - v8::Local handle = NanNew(persistentHandle); - return NanEscapeScope(handle->Get(NanSymbol(key)).As()); - } - - virtual void Execute() = 0; - - uv_work_t request; - - protected: - v8::Persistent persistentHandle; - NanCallback *callback; - const char *errmsg; - - virtual void HandleOKCallback() { - NanScope(); - - callback->Call(0, NULL); - } - - virtual void HandleErrorCallback() { - NanScope(); - - v8::Local argv[] = { - v8::Exception::Error(NanNew(errmsg)) - }; - callback->Call(1, argv); - } -}; - -NAN_INLINE void NanAsyncExecute (uv_work_t* req) { - NanAsyncWorker *worker = static_cast(req->data); - worker->Execute(); -} - -NAN_INLINE void NanAsyncExecuteComplete (uv_work_t* req) { - NanAsyncWorker* worker = static_cast(req->data); - worker->WorkComplete(); - delete worker; -} - -NAN_INLINE void NanAsyncQueueWorker (NanAsyncWorker* worker) { - uv_queue_work( - uv_default_loop() - , &worker->request - , NanAsyncExecute - , (uv_after_work_cb)NanAsyncExecuteComplete - ); -} - -//// Base 64 //// - -#define _nan_base64_encoded_size(size) ((size + 2 - ((size + 2) % 3)) / 3 * 4) - -// Doesn't check for padding at the end. Can be 1-2 bytes over. -NAN_INLINE size_t _nan_base64_decoded_size_fast(size_t size) { - size_t remainder = size % 4; - - size = (size / 4) * 3; - if (remainder) { - if (size == 0 && remainder == 1) { - // special case: 1-byte input cannot be decoded - size = 0; - } else { - // non-padded input, add 1 or 2 extra bytes - size += 1 + (remainder == 3); - } - } - - return size; -} - -template -NAN_INLINE size_t _nan_base64_decoded_size( - const T* src - , size_t size -) { - if (size == 0) - return 0; - - if (src[size - 1] == '=') - size--; - if (size > 0 && src[size - 1] == '=') - size--; - - return _nan_base64_decoded_size_fast(size); -} - -// supports regular and URL-safe base64 -static const int _nan_unbase64_table[] = { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -1, -1, -2, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, 62, -1, 63 - , 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1 - , -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 - , 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, 63 - , -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 - , 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 -}; - -#define _nan_unbase64(x) _nan_unbase64_table[(uint8_t)(x)] - -template static size_t _nan_base64_decode( - char* buf - , size_t len - , const T* src - , const size_t srcLen -) { - char* dst = buf; - char* dstEnd = buf + len; - const T* srcEnd = src + srcLen; - - while (src < srcEnd && dst < dstEnd) { - ptrdiff_t remaining = srcEnd - src; - char a, b, c, d; - - while (_nan_unbase64(*src) < 0 && src < srcEnd) src++, remaining--; - if (remaining == 0 || *src == '=') break; - a = _nan_unbase64(*src++); - - while (_nan_unbase64(*src) < 0 && src < srcEnd) src++, remaining--; - if (remaining <= 1 || *src == '=') break; - b = _nan_unbase64(*src++); - - *dst++ = (a << 2) | ((b & 0x30) >> 4); - if (dst == dstEnd) break; - - while (_nan_unbase64(*src) < 0 && src < srcEnd) src++, remaining--; - if (remaining <= 2 || *src == '=') break; - c = _nan_unbase64(*src++); - - *dst++ = ((b & 0x0F) << 4) | ((c & 0x3C) >> 2); - if (dst == dstEnd) break; - - while (_nan_unbase64(*src) < 0 && src < srcEnd) src++, remaining--; - if (remaining <= 3 || *src == '=') break; - d = _nan_unbase64(*src++); - - *dst++ = ((c & 0x03) << 6) | (d & 0x3F); - } - - return dst - buf; -} - -//// HEX //// - -template unsigned _nan_hex2bin(T c) { - if (c >= '0' && c <= '9') return c - '0'; - if (c >= 'A' && c <= 'F') return 10 + (c - 'A'); - if (c >= 'a' && c <= 'f') return 10 + (c - 'a'); - return static_cast(-1); -} - -template static size_t _nan_hex_decode( - char* buf - , size_t len - , const T* src - , const size_t srcLen -) { - size_t i; - for (i = 0; i < len && i * 2 + 1 < srcLen; ++i) { - unsigned a = _nan_hex2bin(src[i * 2 + 0]); - unsigned b = _nan_hex2bin(src[i * 2 + 1]); - if (!~a || !~b) return i; - buf[i] = a * 16 + b; - } - - return i; -} - -static bool _NanGetExternalParts( - v8::Handle val - , const char** data - , size_t* len -) { - if (node::Buffer::HasInstance(val)) { - *data = node::Buffer::Data(val.As()); - *len = node::Buffer::Length(val.As()); - return true; - } - - assert(val->IsString()); - v8::Local str = NanNew(val.As()); - - if (str->IsExternalAscii()) { - const v8::String::ExternalAsciiStringResource* ext; - ext = str->GetExternalAsciiStringResource(); - *data = ext->data(); - *len = ext->length(); - return true; - - } else if (str->IsExternal()) { - const v8::String::ExternalStringResource* ext; - ext = str->GetExternalStringResource(); - *data = reinterpret_cast(ext->data()); - *len = ext->length(); - return true; - } - - return false; -} - -namespace Nan { - enum Encoding {ASCII, UTF8, BASE64, UCS2, BINARY, HEX, BUFFER}; -} - -NAN_INLINE void* NanRawString( - v8::Handle from - , enum Nan::Encoding encoding - , size_t *datalen - , void *buf - , size_t buflen - , int flags -) { - NanScope(); - - size_t sz_; - size_t term_len = !(flags & v8::String::NO_NULL_TERMINATION); - char *data = NULL; - size_t len; - bool is_extern = _NanGetExternalParts( - from - , const_cast(&data) - , &len); - - if (is_extern && !term_len) { - NanSetPointerSafe(datalen, len); - return data; - } - - v8::Local toStr = from->ToString(); - - char *to = static_cast(buf); - - switch (encoding) { - case Nan::ASCII: -#if NODE_MODULE_VERSION < 0x000C - sz_ = toStr->Length(); - if (to == NULL) { - to = new char[sz_ + term_len]; - } else { - assert(buflen >= sz_ + term_len && "too small buffer"); - } - NanSetPointerSafe( - datalen - , toStr->WriteAscii(to, 0, static_cast(sz_ + term_len), flags)); - return to; -#endif - case Nan::BINARY: - case Nan::BUFFER: - sz_ = toStr->Length(); - if (to == NULL) { - to = new char[sz_ + term_len]; - } else { - assert(buflen >= sz_ + term_len && "too small buffer"); - } -#if NODE_MODULE_VERSION < 0x000C - { - uint16_t* twobytebuf = new uint16_t[sz_ + term_len]; - - size_t len = toStr->Write(twobytebuf, 0, - static_cast(sz_ + term_len), flags); - - for (size_t i = 0; i < sz_ + term_len && i < len + term_len; i++) { - unsigned char *b = reinterpret_cast(&twobytebuf[i]); - to[i] = *b; - } - - NanSetPointerSafe(datalen, len); - - delete[] twobytebuf; - return to; - } -#else - NanSetPointerSafe( - datalen, - toStr->WriteOneByte( - reinterpret_cast(to) - , 0 - , static_cast(sz_ + term_len) - , flags)); - return to; -#endif - case Nan::UTF8: - sz_ = toStr->Utf8Length(); - if (to == NULL) { - to = new char[sz_ + term_len]; - } else { - assert(buflen >= sz_ + term_len && "too small buffer"); - } - NanSetPointerSafe( - datalen - , toStr->WriteUtf8(to, static_cast(sz_ + term_len) - , NULL, flags) - - term_len); - return to; - case Nan::BASE64: - { - v8::String::Value value(toStr); - sz_ = _nan_base64_decoded_size(*value, value.length()); - if (to == NULL) { - to = new char[sz_ + term_len]; - } else { - assert(buflen >= sz_ + term_len); - } - NanSetPointerSafe( - datalen - , _nan_base64_decode(to, sz_, *value, value.length())); - if (term_len) { - to[sz_] = '\0'; - } - return to; - } - case Nan::UCS2: - { - sz_ = toStr->Length(); - if (to == NULL) { - to = new char[(sz_ + term_len) * 2]; - } else { - assert(buflen >= (sz_ + term_len) * 2 && "too small buffer"); - } - - int bc = 2 * toStr->Write( - reinterpret_cast(to) - , 0 - , static_cast(sz_ + term_len) - , flags); - NanSetPointerSafe(datalen, bc); - return to; - } - case Nan::HEX: - { - v8::String::Value value(toStr); - sz_ = value.length(); - assert(!(sz_ & 1) && "bad hex data"); - if (to == NULL) { - to = new char[sz_ / 2 + term_len]; - } else { - assert(buflen >= sz_ / 2 + term_len && "too small buffer"); - } - NanSetPointerSafe( - datalen - , _nan_hex_decode(to, sz_ / 2, *value, value.length())); - } - if (term_len) { - to[sz_ / 2] = '\0'; - } - return to; - default: - assert(0 && "unknown encoding"); - } - return to; -} - -NAN_INLINE char* NanCString( - v8::Handle from - , size_t *datalen - , char *buf = NULL - , size_t buflen = 0 - , int flags = v8::String::NO_OPTIONS -) { - return static_cast( - NanRawString(from, Nan::UTF8, datalen, buf, buflen, flags) - ); -} - -#endif // NAN_H_ diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/package.json b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/package.json deleted file mode 100644 index 4918de2..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/nan/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "nan", - "version": "1.0.0", - "description": "Native Abstractions for Node.js: C++ header for Node 0.8->0.12 compatibility", - "main": "include_dirs.js", - "repository": { - "type": "git", - "url": "git://github.com/rvagg/nan.git" - }, - "contributors": [ - { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - { - "name": "Benjamin Byholm", - "email": "bbyholm@abo.fi", - "url": "https://github.com/kkoopa/" - }, - { - "name": "Trevor Norris", - "email": "trev.norris@gmail.com", - "url": "https://github.com/trevnorris" - }, - { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "https://github.com/TooTallNate" - }, - { - "name": "Brett Lawson", - "email": "brett19@gmail.com", - "url": "https://github.com/brett19" - }, - { - "name": "Ben Noordhuis", - "email": "info@bnoordhuis.nl", - "url": "https://github.com/bnoordhuis" - } - ], - "license": "MIT", - "bugs": { - "url": "https://github.com/rvagg/nan/issues" - }, - "homepage": "https://github.com/rvagg/nan", - "_id": "nan@1.0.0", - "dist": { - "shasum": "ae24f8850818d662fcab5acf7f3b95bfaa2ccf38", - "tarball": "http://registry.npmjs.org/nan/-/nan-1.0.0.tgz" - }, - "_from": "nan@>=1.0.0 <1.1.0", - "_npmVersion": "1.4.3", - "_npmUser": { - "name": "rvagg", - "email": "rod@vagg.org" - }, - "maintainers": [ - { - "name": "rvagg", - "email": "rod@vagg.org" - } - ], - "directories": {}, - "_shasum": "ae24f8850818d662fcab5acf7f3b95bfaa2ccf38", - "_resolved": "https://registry.npmjs.org/nan/-/nan-1.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/.travis.yml b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/.travis.yml deleted file mode 100644 index b3da453..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: -- '0.10' -env: - global: - - secure: i51rE9rZGHbcZWlL58j3H1qtL23OIV2r0X4TcQKNI3pw2mubdHFJmfPNNO19ItfReu8wwQMxOehKamwaNvqMiKWyHfn/QcThFQysqzgGZ6AgnUbYx9od6XFNDeWd1sVBf7QBAL07y7KWlYGWCwFwWjabSVySzQhEBdisPcskfkI= - - secure: BKq6/5z9LK3KDkTjs7BGeBZ1KsWgz+MsAXZ4P64NSeVGFaBdXU45+ww1mwxXFt5l22/mhyOQZfebQl+kGVqRSZ+DEgQeCymkNZ6CD8c6w6cLuOJXiXwuu/cDM2DD0tfGeu2YZC7yEikP7BqEFwH3D324rRzSGLF2RSAAwkOI7bE= diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/.zuul.yml b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/.zuul.yml deleted file mode 100644 index 030d270..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/.zuul.yml +++ /dev/null @@ -1,18 +0,0 @@ -ui: tape -browsers: - - name: chrome - version: 26..latest - - name: firefox - version: 21..latest - - name: safari - version: 5..latest - - name: ie - version: 6..latest - - name: opera - version: 12..latest - - name: iphone - version: 5.0..latest - - name: ipad - version: 5.0..latest - - name: android - version: 4.0..latest diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/LICENSE b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/LICENSE deleted file mode 100644 index 0c068ce..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/README.md b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/README.md deleted file mode 100644 index efcff69..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# typedarray-to-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][npm-url] - -#### Convert a typed array to a [Buffer](https://github.com/feross/buffer) without a copy. - -[![saucelabs][saucelabs-image]][saucelabs-url] - -[travis-image]: https://img.shields.io/travis/feross/typedarray-to-buffer.svg?style=flat -[travis-url]: https://travis-ci.org/feross/typedarray-to-buffer -[npm-image]: https://img.shields.io/npm/v/typedarray-to-buffer.svg?style=flat -[npm-url]: https://npmjs.org/package/typedarray-to-buffer -[downloads-image]: https://img.shields.io/npm/dm/typedarray-to-buffer.svg?style=flat -[saucelabs-image]: https://saucelabs.com/browser-matrix/typedarray-to-buffer.svg -[saucelabs-url]: https://saucelabs.com/u/typedarray-to-buffer - -Say you're using the ['buffer'](https://github.com/feross/buffer) module on npm, or -[browserify](http://browserify.org/) and you're working with lots of binary data. - -Unfortunately, sometimes the browser or someone else's API gives you an `ArrayBuffer` -or a typed array like `Uint8Array` to work with and you need to convert it to a -`Buffer`. What do you do? - -Of course: `new Buffer(uint8array)` - -But, alas, every time you do `new Buffer(uint8array)` **the entire array gets copied**. -The `Buffer` constructor does a copy; this is -defined by the [node docs](http://nodejs.org/api/buffer.html) and the 'buffer' module -matches the node API exactly. - -So, how can we avoid this expensive copy in -[performance critical applications](https://github.com/feross/buffer/issues/22)? - -***Simply use this module, of course!*** - -## install - -```bash -npm install typedarray-to-buffer -``` - -## usage - -To convert a typed array to a `Buffer` **without a copy**, do this: - -```js -var toBuffer = require('typedarray-to-buffer') - -var arr = new Uint8Array([1, 2, 3]) -arr = toBuffer(arr) - -// arr is a buffer now! - -arr.toString() // '\u0001\u0002\u0003' -arr.readUInt16BE(0) // 258 -``` - -## how it works - -If the browser supports typed arrays, then `toBuffer` will **augment the typed array** you -pass in with the `Buffer` methods and return it. See [how does Buffer -work?](https://github.com/feross/buffer#how-does-it-work) for more about how augmentation -works. - -This module uses the typed array's underlying `ArrayBuffer` to back the new `Buffer`. This -respects the "view" on the `ArrayBuffer`, i.e. `byteOffset` and `byteLength`. In other -words, if you do `toBuffer(new Uint32Array([1, 2, 3]))`, then the new `Buffer` will -contain `[1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0]`, **not** `[1, 2, 3]`. And it still doesn't -require a copy. - -If the browser doesn't support typed arrays, then `toBuffer` will create a new `Buffer` -object, copy the data into it, and return it. There's no simple performance optimization -we can do for old browsers. Oh well. - -If this module is used in node, then it will just call `new Buffer`. This is just for -the convenience of modules that work in both node and the browser. - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org). diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/index.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/index.js deleted file mode 100644 index 674d513..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/index.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Convert a typed array to a Buffer without a copy - * - * Author: Feross Aboukhadijeh - * License: MIT - * - * `npm install typedarray-to-buffer` - */ - -var isTypedArray = require('is-typedarray').strict - -module.exports = function (arr) { - // If `Buffer` is the browser `buffer` module, and the browser supports typed arrays, - // then avoid a copy. Otherwise, create a `Buffer` with a copy. - var constructor = Buffer.TYPED_ARRAY_SUPPORT - ? Buffer._augment - : function (arr) { return new Buffer(arr) } - - if (arr instanceof Uint8Array) { - return constructor(arr) - } else if (arr instanceof ArrayBuffer) { - return constructor(new Uint8Array(arr)) - } else if (isTypedArray(arr)) { - // Use the typed array's underlying ArrayBuffer to back new Buffer. This respects - // the "view" on the ArrayBuffer, i.e. byteOffset and byteLength. No copy. - return constructor(new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength)) - } else { - // Unsupported type, just pass it through to the `Buffer` constructor. - return new Buffer(arr) - } -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray/LICENSE.md b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray/LICENSE.md deleted file mode 100644 index ee27ba4..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray/LICENSE.md +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray/README.md b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray/README.md deleted file mode 100644 index 2752863..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# is-typedarray [![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) - -Detect whether or not an object is a -[Typed Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays). - -## Usage - -[![NPM](https://nodei.co/npm/is-typedarray.png)](https://nodei.co/npm/is-typedarray/) - -### isTypedArray(array) - -Returns `true` when array is a Typed Array, and `false` when it is not. - -## License - -MIT. See [LICENSE.md](http://github.com/hughsk/is-typedarray/blob/master/LICENSE.md) for details. diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray/index.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray/index.js deleted file mode 100644 index 0631b85..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray/index.js +++ /dev/null @@ -1,39 +0,0 @@ -module.exports = isTypedArray -isTypedArray.strict = isStrictTypedArray -isTypedArray.loose = isLooseTypedArray - -var toString = Object.prototype.toString -var names = { - '[object Int8Array]': true - , '[object Int16Array]': true - , '[object Int32Array]': true - , '[object Uint8Array]': true - , '[object Uint16Array]': true - , '[object Uint32Array]': true - , '[object Float32Array]': true - , '[object Float64Array]': true -} - -function isTypedArray(arr) { - return ( - isStrictTypedArray(arr) - || isLooseTypedArray(arr) - ) -} - -function isStrictTypedArray(arr) { - return ( - arr instanceof Int8Array - || arr instanceof Int16Array - || arr instanceof Int32Array - || arr instanceof Uint8Array - || arr instanceof Uint16Array - || arr instanceof Uint32Array - || arr instanceof Float32Array - || arr instanceof Float64Array - ) -} - -function isLooseTypedArray(arr) { - return names[toString.call(arr)] -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray/package.json b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray/package.json deleted file mode 100644 index 51485ec..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "is-typedarray", - "version": "0.0.0", - "description": "Detect whether or not an object is a Typed Array", - "main": "index.js", - "scripts": { - "test": "node test" - }, - "author": { - "name": "Hugh Kennedy", - "email": "hughskennedy@gmail.com", - "url": "http://hughsk.io/" - }, - "license": "MIT", - "dependencies": {}, - "devDependencies": { - "tape": "^2.13.1" - }, - "repository": { - "type": "git", - "url": "git://github.com/hughsk/is-typedarray.git" - }, - "keywords": [ - "typed", - "array", - "detect", - "is", - "util" - ], - "bugs": { - "url": "https://github.com/hughsk/is-typedarray/issues" - }, - "homepage": "https://github.com/hughsk/is-typedarray", - "_id": "is-typedarray@0.0.0", - "_shasum": "9e5c50a8bf17b3051b48c5e5b678440821f756f4", - "_from": "is-typedarray@0.0.0", - "_npmVersion": "1.4.10", - "_npmUser": { - "name": "hughsk", - "email": "hughskennedy@gmail.com" - }, - "maintainers": [ - { - "name": "hughsk", - "email": "hughskennedy@gmail.com" - } - ], - "dist": { - "shasum": "9e5c50a8bf17b3051b48c5e5b678440821f756f4", - "tarball": "http://registry.npmjs.org/is-typedarray/-/is-typedarray-0.0.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-0.0.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray/test.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray/test.js deleted file mode 100644 index b0c176f..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray/test.js +++ /dev/null @@ -1,34 +0,0 @@ -var test = require('tape') -var ista = require('./') - -test('strict', function(t) { - t.ok(ista.strict(new Int8Array), 'Int8Array') - t.ok(ista.strict(new Int16Array), 'Int16Array') - t.ok(ista.strict(new Int32Array), 'Int32Array') - t.ok(ista.strict(new Uint8Array), 'Uint8Array') - t.ok(ista.strict(new Uint16Array), 'Uint16Array') - t.ok(ista.strict(new Uint32Array), 'Uint32Array') - t.ok(ista.strict(new Float32Array), 'Float32Array') - t.ok(ista.strict(new Float64Array), 'Float64Array') - - t.ok(!ista.strict(new Array), 'Array') - t.ok(!ista.strict([]), '[]') - - t.end() -}) - -test('loose', function(t) { - t.ok(ista.loose(new Int8Array), 'Int8Array') - t.ok(ista.loose(new Int16Array), 'Int16Array') - t.ok(ista.loose(new Int32Array), 'Int32Array') - t.ok(ista.loose(new Uint8Array), 'Uint8Array') - t.ok(ista.loose(new Uint16Array), 'Uint16Array') - t.ok(ista.loose(new Uint32Array), 'Uint32Array') - t.ok(ista.loose(new Float32Array), 'Float32Array') - t.ok(ista.loose(new Float64Array), 'Float64Array') - - t.ok(!ista.loose(new Array), 'Array') - t.ok(!ista.loose([]), '[]') - - t.end() -}) diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/package.json b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/package.json deleted file mode 100644 index 5ef6bd0..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "typedarray-to-buffer", - "description": "Convert a typed array to a Buffer without a copy", - "version": "3.0.1", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org/" - }, - "bugs": { - "url": "https://github.com/feross/typedarray-to-buffer/issues" - }, - "dependencies": { - "is-typedarray": "0.0.0" - }, - "devDependencies": { - "tape": "2.x", - "zuul": "^1.13.0" - }, - "homepage": "http://feross.org", - "keywords": [ - "buffer", - "typed array", - "convert", - "no copy", - "uint8array", - "uint16array", - "uint32array", - "int16array", - "int32array", - "float32array", - "float64array", - "browser", - "arraybuffer", - "dataview" - ], - "license": "MIT", - "main": "index.js", - "repository": { - "type": "git", - "url": "git://github.com/feross/typedarray-to-buffer.git" - }, - "scripts": { - "test": "npm run test-node && npm run test-browser", - "test-browser": "zuul -- test/*.js", - "test-browser-local": "zuul --local -- test/*.js", - "test-node": "tape test/*.js" - }, - "testling": { - "files": "test/*.js" - }, - "gitHead": "9eedd9f5ac9dd881a6ca0215b2eba45afa31691a", - "_id": "typedarray-to-buffer@3.0.1", - "_shasum": "de0a601da46a9475b1fc65922c93d9a7c1937f49", - "_from": "typedarray-to-buffer@>=3.0.0 <3.1.0", - "_npmVersion": "2.1.11", - "_nodeVersion": "0.10.32", - "_npmUser": { - "name": "feross", - "email": "feross@feross.org" - }, - "maintainers": [ - { - "name": "feross", - "email": "feross@feross.org" - } - ], - "dist": { - "shasum": "de0a601da46a9475b1fc65922c93d9a7c1937f49", - "tarball": "http://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.0.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.0.1.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/test/basic.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/test/basic.js deleted file mode 100644 index d1aa9de..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/node_modules/typedarray-to-buffer/test/basic.js +++ /dev/null @@ -1,52 +0,0 @@ -var test = require('tape') -var toBuffer = require('../') - -test('convert to buffer from Uint8Array', function (t) { - if (typeof Uint8Array !== 'undefined') { - var arr = new Uint8Array([1, 2, 3]) - arr = toBuffer(arr) - - t.deepEqual(arr, new Buffer([1, 2, 3]), 'contents equal') - t.ok(Buffer.isBuffer(arr), 'is buffer') - t.equal(arr.readUInt8(0), 1) - t.equal(arr.readUInt8(1), 2) - t.equal(arr.readUInt8(2), 3) - } else { - t.pass('browser lacks Uint8Array support, skip test') - } - t.end() -}) - -test('convert to buffer from another arrayview type (Uint32Array)', function (t) { - if (typeof Uint32Array !== 'undefined') { - var arr = new Uint32Array([1, 2, 3]) - arr = toBuffer(arr) - - t.deepEqual(arr, new Buffer([1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0]), 'contents equal') - t.ok(Buffer.isBuffer(arr), 'is buffer') - t.equal(arr.readUInt32LE(0), 1) - t.equal(arr.readUInt32LE(4), 2) - t.equal(arr.readUInt32LE(8), 3) - t.equal(arr instanceof Uint8Array, !!Buffer.TYPED_ARRAY_SUPPORT) - - } else { - t.pass('browser lacks Uint32Array support, skip test') - } - t.end() -}) - -test('convert to buffer from ArrayBuffer', function (t) { - if (typeof Uint32Array !== 'undefined') { - var arr = new Uint32Array([1, 2, 3]).subarray(1, 2) - arr = toBuffer(arr) - - t.deepEqual(arr, new Buffer([2, 0, 0, 0]), 'contents equal') - t.ok(Buffer.isBuffer(arr), 'is buffer') - t.equal(arr.readUInt32LE(0), 2) - t.equal(arr instanceof Uint8Array, !!Buffer.TYPED_ARRAY_SUPPORT) - - } else { - t.pass('browser lacks ArrayBuffer support, skip test') - } - t.end() -}) diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/package.json b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/package.json deleted file mode 100644 index ba06ac5..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "websocket", - "description": "Websocket Client & Server Library implementing the WebSocket protocol as specified in RFC 6455.", - "keywords": [ - "websocket", - "websockets", - "socket", - "networking", - "comet", - "push", - "RFC-6455", - "realtime", - "server", - "client" - ], - "author": { - "name": "Brian McKelvey", - "email": "brian@worlize.com", - "url": "https://www.worlize.com/" - }, - "version": "1.0.17", - "repository": { - "type": "git", - "url": "https://github.com/theturtle32/WebSocket-Node.git" - }, - "homepage": "https://github.com/theturtle32/WebSocket-Node", - "engines": { - "node": ">=0.8.0" - }, - "dependencies": { - "debug": "~2.1.0", - "nan": "~1.0.0", - "typedarray-to-buffer": "~3.0.0" - }, - "devDependencies": { - "buffer-equal": "0.0.1", - "faucet": "0.0.1", - "gulp": "git+https://github.com/gulpjs/gulp.git#4.0", - "gulp-jshint": "^1.9.0", - "jshint-stylish": "^1.0.0", - "tape": "^3.0.0" - }, - "config": { - "verbose": false - }, - "scripts": { - "install": "(node-gyp rebuild 2> builderror.log) || (exit 0)", - "test": "faucet test/unit", - "gulp": "gulp" - }, - "main": "index", - "directories": { - "lib": "./lib" - }, - "browser": "lib/browser.js", - "gitHead": "cda940b883aa884906ac13158fe514229a67f426", - "bugs": { - "url": "https://github.com/theturtle32/WebSocket-Node/issues" - }, - "_id": "websocket@1.0.17", - "_shasum": "8a572afc6ec120eb41473ca517d07d932f7b6a1c", - "_from": "websocket@>=1.0.17", - "_npmVersion": "1.4.28", - "_npmUser": { - "name": "theturtle32", - "email": "brian@worlize.com" - }, - "maintainers": [ - { - "name": "theturtle32", - "email": "brian@worlize.com" - } - ], - "dist": { - "shasum": "8a572afc6ec120eb41473ca517d07d932f7b6a1c", - "tarball": "http://registry.npmjs.org/websocket/-/websocket-1.0.17.tgz" - }, - "_resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.17.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/src/bufferutil.cc b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/src/bufferutil.cc deleted file mode 100644 index 916ec17..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/src/bufferutil.cc +++ /dev/null @@ -1,117 +0,0 @@ -/*! - * BufferUtil originally from: - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "nan.h" - -using namespace v8; -using namespace node; - -class BufferUtil : public ObjectWrap -{ -public: - - static void Initialize(v8::Handle target) - { - NanScope(); - Local t = NanNew(New); - t->InstanceTemplate()->SetInternalFieldCount(1); - NODE_SET_METHOD(t, "unmask", BufferUtil::Unmask); - NODE_SET_METHOD(t, "mask", BufferUtil::Mask); - NODE_SET_METHOD(t, "merge", BufferUtil::Merge); - target->Set(NanSymbol("BufferUtil"), t->GetFunction()); - } - -protected: - - static NAN_METHOD(New) - { - NanScope(); - BufferUtil* bufferUtil = new BufferUtil(); - bufferUtil->Wrap(args.This()); - NanReturnValue(args.This()); - } - - static NAN_METHOD(Merge) - { - NanScope(); - Local bufferObj = args[0]->ToObject(); - char* buffer = Buffer::Data(bufferObj); - Local array = Local::Cast(args[1]); - unsigned int arrayLength = array->Length(); - size_t offset = 0; - unsigned int i; - for (i = 0; i < arrayLength; ++i) { - Local src = array->Get(i)->ToObject(); - size_t length = Buffer::Length(src); - memcpy(buffer + offset, Buffer::Data(src), length); - offset += length; - } - NanReturnValue(NanTrue()); - } - - static NAN_METHOD(Unmask) - { - NanScope(); - Local buffer_obj = args[0]->ToObject(); - size_t length = Buffer::Length(buffer_obj); - Local mask_obj = args[1]->ToObject(); - unsigned int *mask = (unsigned int*)Buffer::Data(mask_obj); - unsigned int* from = (unsigned int*)Buffer::Data(buffer_obj); - size_t len32 = length / 4; - unsigned int i; - for (i = 0; i < len32; ++i) *(from + i) ^= *mask; - from += i; - switch (length % 4) { - case 3: *((unsigned char*)from+2) = *((unsigned char*)from+2) ^ ((unsigned char*)mask)[2]; - case 2: *((unsigned char*)from+1) = *((unsigned char*)from+1) ^ ((unsigned char*)mask)[1]; - case 1: *((unsigned char*)from ) = *((unsigned char*)from ) ^ ((unsigned char*)mask)[0]; - case 0:; - } - NanReturnValue(NanTrue()); - } - - static NAN_METHOD(Mask) - { - NanScope(); - Local buffer_obj = args[0]->ToObject(); - Local mask_obj = args[1]->ToObject(); - unsigned int *mask = (unsigned int*)Buffer::Data(mask_obj); - Local output_obj = args[2]->ToObject(); - unsigned int dataOffset = args[3]->Int32Value(); - unsigned int length = args[4]->Int32Value(); - unsigned int* to = (unsigned int*)(Buffer::Data(output_obj) + dataOffset); - unsigned int* from = (unsigned int*)Buffer::Data(buffer_obj); - unsigned int len32 = length / 4; - unsigned int i; - for (i = 0; i < len32; ++i) *(to + i) = *(from + i) ^ *mask; - to += i; - from += i; - switch (length % 4) { - case 3: *((unsigned char*)to+2) = *((unsigned char*)from+2) ^ *((unsigned char*)mask+2); - case 2: *((unsigned char*)to+1) = *((unsigned char*)from+1) ^ *((unsigned char*)mask+1); - case 1: *((unsigned char*)to ) = *((unsigned char*)from ) ^ *((unsigned char*)mask); - case 0:; - } - NanReturnValue(NanTrue()); - } -}; - -extern "C" void init (Handle target) -{ - NanScope(); - BufferUtil::Initialize(target); -} - -NODE_MODULE(bufferutil, init) diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/src/validation.cc b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/src/validation.cc deleted file mode 100644 index 755f290..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/src/validation.cc +++ /dev/null @@ -1,145 +0,0 @@ -/*! - * UTF-8 Validation Code originally from: - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -#include -#include -#include -#include -#include -#include -#include -#include "nan.h" - -using namespace v8; -using namespace node; - -#define UNI_SUR_HIGH_START (uint32_t) 0xD800 -#define UNI_SUR_LOW_END (uint32_t) 0xDFFF -#define UNI_REPLACEMENT_CHAR (uint32_t) 0x0000FFFD -#define UNI_MAX_LEGAL_UTF32 (uint32_t) 0x0010FFFF - -static const uint8_t trailingBytesForUTF8[256] = { - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 -}; - -static const uint32_t offsetsFromUTF8[6] = { - 0x00000000, 0x00003080, 0x000E2080, - 0x03C82080, 0xFA082080, 0x82082080 -}; - -static int isLegalUTF8(const uint8_t *source, const int length) -{ - uint8_t a; - const uint8_t *srcptr = source+length; - switch (length) { - default: return 0; - /* Everything else falls through when "true"... */ - /* RFC3629 makes 5 & 6 bytes UTF-8 illegal - case 6: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return 0; - case 5: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return 0; */ - case 4: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return 0; - case 3: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return 0; - case 2: if ((a = (*--srcptr)) > 0xBF) return 0; - switch (*source) { - /* no fall-through in this inner switch */ - case 0xE0: if (a < 0xA0) return 0; break; - case 0xED: if (a > 0x9F) return 0; break; - case 0xF0: if (a < 0x90) return 0; break; - case 0xF4: if (a > 0x8F) return 0; break; - default: if (a < 0x80) return 0; - } - - case 1: if (*source >= 0x80 && *source < 0xC2) return 0; - } - if (*source > 0xF4) return 0; - return 1; -} - -int is_valid_utf8 (size_t len, char *value) -{ - /* is the string valid UTF-8? */ - for (unsigned int i = 0; i < len; i++) { - uint32_t ch = 0; - uint8_t extrabytes = trailingBytesForUTF8[(uint8_t) value[i]]; - - if (extrabytes + i >= len) - return 0; - - if (isLegalUTF8 ((uint8_t *) (value + i), extrabytes + 1) == 0) return 0; - - switch (extrabytes) { - case 5 : ch += (uint8_t) value[i++]; ch <<= 6; - case 4 : ch += (uint8_t) value[i++]; ch <<= 6; - case 3 : ch += (uint8_t) value[i++]; ch <<= 6; - case 2 : ch += (uint8_t) value[i++]; ch <<= 6; - case 1 : ch += (uint8_t) value[i++]; ch <<= 6; - case 0 : ch += (uint8_t) value[i]; - } - - ch -= offsetsFromUTF8[extrabytes]; - - if (ch <= UNI_MAX_LEGAL_UTF32) { - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) - return 0; - } else { - return 0; - } - } - - return 1; -} - -class Validation : public ObjectWrap -{ -public: - - static void Initialize(v8::Handle target) - { - NanScope(); - Local t = NanNew(New); - t->InstanceTemplate()->SetInternalFieldCount(1); - NODE_SET_METHOD(t, "isValidUTF8", Validation::IsValidUTF8); - target->Set(NanSymbol("Validation"), t->GetFunction()); - } - -protected: - - static NAN_METHOD(New) - { - NanScope(); - Validation* validation = new Validation(); - validation->Wrap(args.This()); - NanReturnValue(args.This()); - } - - static NAN_METHOD(IsValidUTF8) - { - NanScope(); - if (!Buffer::HasInstance(args[0])) { - return NanThrowTypeError("First argument needs to be a buffer"); - } - Local buffer_obj = args[0]->ToObject(); - char *buffer_data = Buffer::Data(buffer_obj); - size_t buffer_length = Buffer::Length(buffer_obj); - NanReturnValue(is_valid_utf8(buffer_length, buffer_data) == 1 ? NanTrue() : NanFalse()); - } -}; - -extern "C" void init (Handle target) -{ - NanScope(); - Validation::Initialize(target); -} - -NODE_MODULE(validation, init) diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/vendor/FastBufferList.js b/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/vendor/FastBufferList.js deleted file mode 100644 index 695fc33..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/node_modules/websocket/vendor/FastBufferList.js +++ /dev/null @@ -1,192 +0,0 @@ -// This file was copied from https://github.com/substack/node-bufferlist -// and modified to be able to copy bytes from the bufferlist directly into -// a pre-existing fixed-size buffer without an additional memory allocation. - -// bufferlist.js -// Treat a linked list of buffers as a single variable-size buffer. -var Buffer = require('buffer').Buffer; -var EventEmitter = require('events').EventEmitter; - -module.exports = BufferList; -module.exports.BufferList = BufferList; // backwards compatibility - -function BufferList(opts) { - if (!(this instanceof BufferList)) return new BufferList(opts); - EventEmitter.call(this); - var self = this; - - if (typeof(opts) == 'undefined') opts = {}; - - // default encoding to use for take(). Leaving as 'undefined' - // makes take() return a Buffer instead. - self.encoding = opts.encoding; - - // constructor to use for Buffer-esque operations - self.construct = opts.construct || Buffer; - - var head = { next : null, buffer : null }; - var last = { next : null, buffer : null }; - - // length can get negative when advanced past the end - // and this is the desired behavior - var length = 0; - self.__defineGetter__('length', function () { - return length; - }); - - // keep an offset of the head to decide when to head = head.next - var offset = 0; - - // Write to the bufferlist. Emits 'write'. Always returns true. - self.write = function (buf) { - if (!head.buffer) { - head.buffer = buf; - last = head; - } - else { - last.next = { next : null, buffer : buf }; - last = last.next; - } - length += buf.length; - self.emit('write', buf); - return true; - }; - - self.end = function (buf) { - if (Buffer.isBuffer(buf)) self.write(buf); - }; - - // Push buffers to the end of the linked list. (deprecated) - // Return this (self). - self.push = function () { - var args = [].concat.apply([], arguments); - args.forEach(self.write); - return self; - }; - - // For each buffer, perform some action. - // If fn's result is a true value, cut out early. - // Returns this (self). - self.forEach = function (fn) { - if (!head.buffer) return new self.construct(0); - - if (head.buffer.length - offset <= 0) return self; - var firstBuf = head.buffer.slice(offset); - - var b = { buffer : firstBuf, next : head.next }; - - while (b && b.buffer) { - var r = fn(b.buffer); - if (r) break; - b = b.next; - } - - return self; - }; - - // Create a single Buffer out of all the chunks or some subset specified by - // start and one-past the end (like slice) in bytes. - self.join = function (start, end) { - if (!head.buffer) return new self.construct(0); - if (start == undefined) start = 0; - if (end == undefined) end = self.length; - - var big = new self.construct(end - start); - var ix = 0; - self.forEach(function (buffer) { - if (start < (ix + buffer.length) && ix < end) { - // at least partially contained in the range - buffer.copy( - big, - Math.max(0, ix - start), - Math.max(0, start - ix), - Math.min(buffer.length, end - ix) - ); - } - ix += buffer.length; - if (ix > end) return true; // stop processing past end - }); - - return big; - }; - - self.joinInto = function (targetBuffer, targetStart, sourceStart, sourceEnd) { - if (!head.buffer) return new self.construct(0); - if (sourceStart == undefined) sourceStart = 0; - if (sourceEnd == undefined) sourceEnd = self.length; - - var big = targetBuffer; - if (big.length - targetStart < sourceEnd - sourceStart) { - throw new Error("Insufficient space available in target Buffer."); - } - var ix = 0; - self.forEach(function (buffer) { - if (sourceStart < (ix + buffer.length) && ix < sourceEnd) { - // at least partially contained in the range - buffer.copy( - big, - Math.max(targetStart, targetStart + ix - sourceStart), - Math.max(0, sourceStart - ix), - Math.min(buffer.length, sourceEnd - ix) - ); - } - ix += buffer.length; - if (ix > sourceEnd) return true; // stop processing past end - }); - - return big; - }; - - // Advance the buffer stream by n bytes. - // If n the aggregate advance offset passes the end of the buffer list, - // operations such as .take() will return empty strings until enough data is - // pushed. - // Returns this (self). - self.advance = function (n) { - offset += n; - length -= n; - while (head.buffer && offset >= head.buffer.length) { - offset -= head.buffer.length; - head = head.next - ? head.next - : { buffer : null, next : null } - ; - } - self.emit('advance', n); - return self; - }; - - // Take n bytes from the start of the buffers. - // Returns a string. - // If there are less than n bytes in all the buffers or n is undefined, - // returns the entire concatenated buffer string. - self.take = function (n, encoding) { - if (n == undefined) n = self.length; - else if (typeof n !== 'number') { - encoding = n; - n = self.length; - } - var b = head; - if (!encoding) encoding = self.encoding; - if (encoding) { - var acc = ''; - self.forEach(function (buffer) { - if (n <= 0) return true; - acc += buffer.toString( - encoding, 0, Math.min(n,buffer.length) - ); - n -= buffer.length; - }); - return acc; - } else { - // If no 'encoding' is specified, then return a Buffer. - return self.join(0, n); - } - }; - - // The entire concatenated buffer as a string. - self.toString = function () { - return self.take('binary'); - }; -} -require('util').inherits(BufferList, EventEmitter); diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/package.json b/s4t-server-node/node_modules/node-reverse-wstunnel/package.json deleted file mode 100755 index 979ee95..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "node-reverse-wstunnel", - "version": "0.1.1", - "description": "Tools to establish a TCP socket tunnel over websocket connection, and to enstabilish a reverse tunnel over websocket connection, for circumventing the problems of direct connections to the host behind a strict firewalls or without a public IP.", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "dependencies": { - "websocket": ">=1.0.17", - "optimist": ">=0.6.1", - "under_score": ">=0.1.0" - }, - "repository": { - "type": "git", - "url": "git://github.com/MDSLab/wstunnel.git" - }, - "keywords": [ - "tunnel", - "reverse", - "WebSocket" - ], - "author": { - "name": "Andrea Rocco Lotronto", - "email": "alotronto@unime.it" - }, - "license": [ - { - "type": "MIT", - "url": "https://github.com/MDSLab/wstunnel/blob/master/LICENSE" - } - ], - "bugs": { - "url": "https://github.com/MDSLab/wstunnel/issues" - }, - "homepage": "https://github.com/MDSLab/wstunnel", - "readme": "#wstunnel\n\n\nTools to establish a TCP socket tunnel over websocket connection, and to enstabilish a reverse tunnel over websocket connection, for circumventing the problems of direct connections to the host behind a strict firewalls or without a public IP.\n\n##Usage in Node\n###Installation\nnpm install node-reverse-wstunnel\n\n###Server example\n```JavaScript \nvar wts = require(\"node-reverse-wstunnel\");\n\nserver = new wts.server(); \n//the port of the websocket server \nserver.start(port);\n``` \n###Client example\n```JavaScript \nvar wts = require(\"node-reverse-wstunnel\");\n\nclient = new wts.client();\n//localport is the opened port of the localhost for the tunnel\n//remotehost:port is the service that will be tunneled\nclient.start(localport,'ws://websocketserverhost:port', remotehost:port);\n```\n\n###Reverse Server example\n```JavaScript \nvar wts = require(\"node-reverse-wstunnel\");\n\nreverse_server = new wts.server_reverse(); \n//the port of the websocket server \nreverse_server.start(port);\n``` \n###Reverse Client example\n```JavaScript \nvar wts = require(\"node-reverse-wstunnel\");\n\nreverse_client = new wts.client_reverse();\n//portTunnel is the port that will be opened on the websocket server \n//remotehost:port is the service that will be reverse tunneled\nreverse_client.start(portTunnel, 'ws://websocketserverhost:port', remotehost:port);\n```\n\n##Using wstt.js executable\nUsing the *wstt.js* executable located in *bin* directory:\n\nFor running a websocket tunnel server: \n\n ./wstt.js -s 8080\n\n\nFor running a websocket tunnel client: \n\n ./wstt.js -tunnel 33:2.2.2.2:33 ws://host:8080\n\nIn the above example, client picks the final tunnel destination, similar to ssh tunnel. Alternatively for security reason, you can lock tunnel destination on the server end, example:\n\n**Server:**\n \n ./wstt.js -s 8080 -t 2.2.2.2:33\n\n**Client:**\n \n ./wstt.js -t 33 ws://server:8080\n\nIn both examples, connection to localhost:33 on client will be tunneled to 2.2.2.2:33 on server via websocket connection in between.\n\nFor running a websocket reverse tunnel server:\n\n ./wstt.js -r -s 8080\n\nFor running a websocket reverse tunnel client:\n\n ./wstt.js -r 6666:2.2.2.2:33 ws://server:8080\n\nIn the above example the client tells the server to open a TCP server on port 6666 and all connection on this port are tunneled to the client that is directely connected to 2.2.2.2:33\n\n## Use case\n\nFor tunneling over strict firewalls: WebSocket is a part of the HTML5 standard, any reasonable firewall will unlikely\nbe so strict as to break HTML5. \n\nThe tunnel server currently supports plain tcp socket only, for SSL support, use NGINX, shown below:\n\nOn server:\n ./wstt.js -s 8080\n\nOn server, run nginx (>=1.3.13) with sample configuration:\n\n server {\n listen 443;\n server_name mydomain.com;\n\n ssl on;\n ssl_certificate /path/to/my.crt\n ssl_certificate_key /path/to/my.key\n ssl_session_timeout 5m;\n ssl_protocols SSLv2 SSLv3 TLSv1;\n ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;\n ssl_prefer_server_ciphers on;\n\n location / {\n proxy_pass http://127.0.0.1:8080;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto $scheme;\n }\n }\n\nThen on client:\n\n ./wstt.js -t 99:targethost:targetport wss://mydomain.com\n\n\n### OpenVPN use case\n\nSuppose on the server you have OpenVpn installed on the default port 1194, then run wstunnel as such:\n\n ./wstt.js -s 8888 -t 127.0.0.1:1194\n \nNow on the server, you have a websocket server listening on 8888, any connection to 8888 will be forwarded to \n127.0.0.1:1194, the OpenVpn port.\n\nNow on client, you run:\n\n ./wstt.js -t 1194 ws://server:8888\n \nThen launch the OpenVpn client, connect to localhost:1194 will be same as connect to server's 1194 port.\n\nSuppose the firewall allows http traffic on target port 80 only, then setup a NGINX reverse proxy to listen on port 80,\nand proxy http traffic to localhost:8888 via host name.\n\n", - "readmeFilename": "readme.md", - "gitHead": "d80e42ebed36889935083a453074ee274a12e9d6", - "_id": "node-reverse-wstunnel@0.1.1", - "_shasum": "0dbd7385fde9528191f93846b834718c0714aefd", - "_from": "node-reverse-wstunnel@*" -} diff --git a/s4t-server-node/node_modules/node-reverse-wstunnel/readme.md b/s4t-server-node/node_modules/node-reverse-wstunnel/readme.md deleted file mode 100755 index 019d4fb..0000000 --- a/s4t-server-node/node_modules/node-reverse-wstunnel/readme.md +++ /dev/null @@ -1,138 +0,0 @@ -#wstunnel - - -Tools to establish a TCP socket tunnel over websocket connection, and to enstabilish a reverse tunnel over websocket connection, for circumventing the problems of direct connections to the host behind a strict firewalls or without a public IP. - -##Usage in Node -###Installation -npm install node-reverse-wstunnel - -###Server example -```JavaScript -var wts = require("node-reverse-wstunnel"); - -server = new wts.server(); -//the port of the websocket server -server.start(port); -``` -###Client example -```JavaScript -var wts = require("node-reverse-wstunnel"); - -client = new wts.client(); -//localport is the opened port of the localhost for the tunnel -//remotehost:port is the service that will be tunneled -client.start(localport,'ws://websocketserverhost:port', remotehost:port); -``` - -###Reverse Server example -```JavaScript -var wts = require("node-reverse-wstunnel"); - -reverse_server = new wts.server_reverse(); -//the port of the websocket server -reverse_server.start(port); -``` -###Reverse Client example -```JavaScript -var wts = require("node-reverse-wstunnel"); - -reverse_client = new wts.client_reverse(); -//portTunnel is the port that will be opened on the websocket server -//remotehost:port is the service that will be reverse tunneled -reverse_client.start(portTunnel, 'ws://websocketserverhost:port', remotehost:port); -``` - -##Using wstt.js executable -Using the *wstt.js* executable located in *bin* directory: - -For running a websocket tunnel server: - - ./wstt.js -s 8080 - - -For running a websocket tunnel client: - - ./wstt.js -tunnel 33:2.2.2.2:33 ws://host:8080 - -In the above example, client picks the final tunnel destination, similar to ssh tunnel. Alternatively for security reason, you can lock tunnel destination on the server end, example: - -**Server:** - - ./wstt.js -s 8080 -t 2.2.2.2:33 - -**Client:** - - ./wstt.js -t 33 ws://server:8080 - -In both examples, connection to localhost:33 on client will be tunneled to 2.2.2.2:33 on server via websocket connection in between. - -For running a websocket reverse tunnel server: - - ./wstt.js -r -s 8080 - -For running a websocket reverse tunnel client: - - ./wstt.js -r 6666:2.2.2.2:33 ws://server:8080 - -In the above example the client tells the server to open a TCP server on port 6666 and all connection on this port are tunneled to the client that is directely connected to 2.2.2.2:33 - -## Use case - -For tunneling over strict firewalls: WebSocket is a part of the HTML5 standard, any reasonable firewall will unlikely -be so strict as to break HTML5. - -The tunnel server currently supports plain tcp socket only, for SSL support, use NGINX, shown below: - -On server: - ./wstt.js -s 8080 - -On server, run nginx (>=1.3.13) with sample configuration: - - server { - listen 443; - server_name mydomain.com; - - ssl on; - ssl_certificate /path/to/my.crt - ssl_certificate_key /path/to/my.key - ssl_session_timeout 5m; - ssl_protocols SSLv2 SSLv3 TLSv1; - ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; - ssl_prefer_server_ciphers on; - - location / { - proxy_pass http://127.0.0.1:8080; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - } - } - -Then on client: - - ./wstt.js -t 99:targethost:targetport wss://mydomain.com - - -### OpenVPN use case - -Suppose on the server you have OpenVpn installed on the default port 1194, then run wstunnel as such: - - ./wstt.js -s 8888 -t 127.0.0.1:1194 - -Now on the server, you have a websocket server listening on 8888, any connection to 8888 will be forwarded to -127.0.0.1:1194, the OpenVpn port. - -Now on client, you run: - - ./wstt.js -t 1194 ws://server:8888 - -Then launch the OpenVpn client, connect to localhost:1194 will be same as connect to server's 1194 port. - -Suppose the firewall allows http traffic on target port 80 only, then setup a NGINX reverse proxy to listen on port 80, -and proxy http traffic to localhost:8888 via host name. - diff --git a/s4t-server-node/s4t-wamp-server.js b/s4t-server-node/s4t-wamp-server.js deleted file mode 100644 index 02fc5a5..0000000 --- a/s4t-server-node/s4t-wamp-server.js +++ /dev/null @@ -1,111 +0,0 @@ -/* -The MIT License (MIT) -Copyright (c) 2014 Andrea Rocco Lotronto -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -var autobahn = require('autobahn'); -var boards = {}; -var express = require('express'); - -var url_wamp_router = "ws://localhost:8080/ws"; //example of url wamp router - -var connection = new autobahn.Connection({ - url: url_wamp_router, - realm: "s4t" -}); - - - - -connection.onopen = function (session, details) { - - var rest = express(); - - rest.get('/', function (req, res){ - - console.log('POST::::'+req.originalUrl); - var board = req.query.board - var command = req.query.command - - if(boards[board] != undefined){ - //invia comando sul topic - console.log("corretto"); - //ricavo una porta random - var port = randomIntInc(6000,7000); - session.publish("board.command", [board, command, port]); - res.send("Command: "+command+" opening on port: "+port); - } - else - res.send("ERROR"); - - }); - - rest.get('/list/', function (req, res){ - - var board_list=''; - - for (var i in boards){ - board_list += boards[i]; - } - - res.send('List of the board: '+board_list); - }); - - rest.listen(6655); - - console.log("Connesso al router WAMP"); - // Publish, Subscribe, Call and Register - - var onBoardConnected = function (args){ - //registrare le schede che si connettono - if(args[1]=='connection'){ - boards[args[0]] = args[0]; - console.log("Connessa scehda:"+args[0]+" stato scheda:"+args[1]); - //DEBUGGG - console.log("Schede::"+boards.length); - for (var i in boards){ - console.log('Key: '+i+' value: '+boards[i]); - } - - } - if(args[1]=='disconnect'){ - delete boards[args[0]]; - console.log("Disconnessa scehda:"+args[0]+" stato scheda:"+args[1]); - - //DEBUGGG - console.log("Schede::"+boards.length); - for (var i in boards){ - console.log('Key: '+i+' value: '+boards[i]); - } - } - } - - session.subscribe("board.connection", onBoardConnected); - console.log("Inscritto al topic board.connection"); -}; - -connection.onclose = function (reason, details) { - // handle connection lost -} - -connection.open(); - -//Creare una funzione per un numero random della porta -function randomIntInc (low, high) { - return Math.floor(Math.random() * (high - low + 1) + low); -} \ No newline at end of file diff --git a/s4t-server-python/__init__.py b/s4t-server-python/__init__.py deleted file mode 100644 index 3cd06f8..0000000 --- a/s4t-server-python/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -######################################################################################### -## -## The MIT License (MIT) -## -## Copyright (c) 2014 Andrea Rocco Lotronto -## -## 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/s4t-server-python/s4t-wamp-server.py b/s4t-server-python/s4t-wamp-server.py index 3c05db5..5698916 100644 --- a/s4t-server-python/s4t-wamp-server.py +++ b/s4t-server-python/s4t-wamp-server.py @@ -23,12 +23,87 @@ ## SOFTWARE. ######################################################################################## -from autobahn.twisted.wamp import ApplicationSession, ApplicationRunner +from autobahn.twisted.wamp import ApplicationSession +from autobahn.twisted.wamp import ApplicationRunner +from twisted.internet.defer import inlineCallbacks -class s4t-wamp-server(ApplicationSession): +from twisted.internet import reactor + + +from flask import Flask +from flask.ext import restful + +import threading + +urlWampRouter = "ws://ip:port/ws" +realmWampRouter = "s4t" +topic = 'board.connection' + +class restServer(): + class Wellcome(restful.Resource): + def get(self): + return{'Wellcome'} + + def __init__(self): + self.app = Flask(__name__) + self.api = restful.Api(self.app) + self.api.add_resource(self.Wellcome, '/') + + def avvio(self): + self.app.run(port=5566, debug=True) + +@inlineCallbacks +def startREST(): + x = restServer() + x.avvio() + +class S4TWampServer(ApplicationSession): + + @inlineCallbacks + def onJoin(self, details): + + self.connectedBoard = {} + + print("Connect to WAMP Router") + + def onMessage(*args): + print args + if args[1] == 'connection': + print(args[0]+ " connessa") + self.connectedBoard[args[0]] = args[0] + print self.connectedBoard + + if args[1] == 'disconnect': + print(args[0]+ " disconnessa") + del self.connectedBoard[args[0]] + print self.connectedBoard + + + try: + + yield self.subscribe(onMessage, topic) + print ("subscribed to topic:: "+topic) + + except Exception as e: + print("could not subscribe to topic: {0}".format(e)) - def onConnect(): - self.join("s4t") if __name__ == '__main__': - runner = ApplicationRunner(url = u"ws://212.189.) \ No newline at end of file + #rest = serverRest() + #rest.start() + #t1 = threading.Thread(target=x.avvio()) + #t1.start() + #t1.join() + + #wamp = wampT() + #wamp.start() + + reactor.run(startREST()) + + runner = ApplicationRunner(url = urlWampRouter, realm = realmWampRouter) + runner.run(S4TWampServer) + + #serverRest().start() + + #runner = ApplicationRunner(url = urlWampRouter, realm = realmWampRouter) + #runner.run(S4TWampServer) \ No newline at end of file diff --git a/s4t-server-python/yos4t-wamp-server.py b/s4t-server-python/yos4t-wamp-server.py new file mode 100644 index 0000000..5aa21cc --- /dev/null +++ b/s4t-server-python/yos4t-wamp-server.py @@ -0,0 +1,125 @@ +######################################################################################### +## +## The MIT License (MIT) +## +## Copyright (c) 2014 Andrea Rocco Lotronto +## +## 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. +######################################################################################## + +from autobahn.twisted.wamp import ApplicationSession +from autobahn.twisted.wamp import ApplicationRunner +from twisted.internet.defer import inlineCallbacks + +from flask import Flask +from flask.ext import restful + +import threading +import multiprocessing + +urlWampRouter = "ws://ip:port/ws" +realmWampRouter = "s4t" +topic = 'board.connection' + +''' +class comevuoi_T(threading.Thread): + def __init__(self): + threading.Thread.__init__(self) + self.runner = ApplicationRunner(url = urlWampRouter, realm = realmWampRouter) + + def run(self): + self.runner.run(S4TWampServer) + +class serverRest(threading.Thread): + + class Wellcome(restful.Resource): + def get(self): + return{'Wellcome'} + + def __init__(self): + threading.Thread.__init__(self) + self.app = Flask(__name__) + self.api = restful.Api(self.app) + + + def run(self): + self.app.run(port=5566, debug=True) + +''' + +class serverRest(): + + class Wellcome(restful.Resource): + def get(self): + return{'Wellcome'} + + def __init__(self): + self.app = Flask(__name__) + self.api = restful.Api(self.app) + self.api.add_resource(self.Wellcome, '/') + + def avvio(self): + self.app.run(port=5566, debug=True) + + +class S4TWampServer(ApplicationSession): + + @inlineCallbacks + def onJoin(self, details): + + + self.connectedBoard = {} + + print("Connect to WAMP Router") + + def onMessage(*args): + print args + if args[1] == 'connection': + print(args[0]+ " connessa") + self.connectedBoard[args[0]] = args[0] + print self.connectedBoard + + if args[1] == 'disconnect': + print(args[0]+ " disconnessa") + del self.connectedBoard[args[0]] + print self.connectedBoard + + + try: + yield self.subscribe(onMessage, topic) + print ("subscribed to topic:: "+topic) + except Exception as e: + print("could not subscribe to topic: {0}".format(e)) + + + +x = serverRest() + +def worker(): + """worker function""" + x.avvio() + + +if __name__ == '__main__': + #rest = multiprocessing.Process(target=worker) + + #rest.start() + runner = ApplicationRunner(url = urlWampRouter, realm = realmWampRouter) + runner.run(S4TWampServer) + print ("Prova")