From 0f153bc41b11d2b9f46e00d471113b5a4dbcae18 Mon Sep 17 00:00:00 2001 From: Doro Wu Date: Sun, 26 Feb 2017 12:53:08 +0800 Subject: [PATCH] refactor: clean code --- Dockerfile | 14 +- README.md | 6 +- .../etc/nginx/sites-enabled/default | 2 +- .../etc/supervisor/conf.d/supervisord.conf | 6 +- gtkrc-2.0 => image/home/ubuntu/.gtkrc-2.0 | 0 startup.sh => image/startup.sh | 3 +- {noVNC => image/usr/lib/noVNC}/.gitlastcommit | 0 {noVNC => image/usr/lib/noVNC}/.npmignore | 0 {noVNC => image/usr/lib/noVNC}/.travis.yml | 0 .../usr/lib/noVNC}/CONTRIBUTING.md | 0 {noVNC => image/usr/lib/noVNC}/LICENSE.txt | 0 {noVNC => image/usr/lib/noVNC}/README.md | 0 .../usr/lib/noVNC}/app/images/alt.svg | 0 .../usr/lib/noVNC}/app/images/clipboard.svg | 0 .../usr/lib/noVNC}/app/images/connect.svg | 0 .../usr/lib/noVNC}/app/images/ctrl.svg | 0 .../usr/lib/noVNC}/app/images/ctrlaltdel.svg | 0 .../usr/lib/noVNC}/app/images/disconnect.svg | 0 .../usr/lib/noVNC}/app/images/drag.svg | 0 .../usr/lib/noVNC}/app/images/error.svg | 0 .../usr/lib/noVNC}/app/images/esc.svg | 0 .../usr/lib/noVNC}/app/images/expander.svg | 0 .../usr/lib/noVNC}/app/images/fullscreen.svg | 0 .../usr/lib/noVNC}/app/images/handle.svg | 0 .../usr/lib/noVNC}/app/images/handle_bg.svg | 0 .../usr/lib/noVNC}/app/images/icons/Makefile | 0 .../noVNC}/app/images/icons/novnc-120x120.png | Bin .../noVNC}/app/images/icons/novnc-144x144.png | Bin .../noVNC}/app/images/icons/novnc-152x152.png | Bin .../noVNC}/app/images/icons/novnc-16x16.png | Bin .../noVNC}/app/images/icons/novnc-192x192.png | Bin .../noVNC}/app/images/icons/novnc-24x24.png | Bin .../noVNC}/app/images/icons/novnc-32x32.png | Bin .../noVNC}/app/images/icons/novnc-48x48.png | Bin .../noVNC}/app/images/icons/novnc-60x60.png | Bin .../noVNC}/app/images/icons/novnc-64x64.png | Bin .../noVNC}/app/images/icons/novnc-72x72.png | Bin .../noVNC}/app/images/icons/novnc-76x76.png | Bin .../noVNC}/app/images/icons/novnc-96x96.png | Bin .../noVNC}/app/images/icons/novnc-icon-sm.svg | 0 .../noVNC}/app/images/icons/novnc-icon.svg | 0 .../usr/lib/noVNC}/app/images/info.svg | 0 .../usr/lib/noVNC}/app/images/keyboard.svg | 0 .../usr/lib/noVNC}/app/images/mouse_left.svg | 0 .../lib/noVNC}/app/images/mouse_middle.svg | 0 .../usr/lib/noVNC}/app/images/mouse_none.svg | 0 .../usr/lib/noVNC}/app/images/mouse_right.svg | 0 .../usr/lib/noVNC}/app/images/power.svg | 0 .../usr/lib/noVNC}/app/images/settings.svg | 0 .../usr/lib/noVNC}/app/images/tab.svg | 0 .../lib/noVNC}/app/images/toggleextrakeys.svg | 0 .../usr/lib/noVNC}/app/images/warning.svg | 0 .../usr/lib/noVNC}/app/locale/de.js | 0 .../usr/lib/noVNC}/app/locale/el.js | 0 .../usr/lib/noVNC}/app/locale/nl.js | 0 .../usr/lib/noVNC}/app/locale/sv.js | 0 .../usr/lib/noVNC}/app/sounds/CREDITS | 0 .../usr/lib/noVNC}/app/sounds/bell.mp3 | Bin .../usr/lib/noVNC}/app/sounds/bell.oga | Bin .../usr/lib/noVNC}/app/styles/Orbitron700.ttf | Bin .../lib/noVNC}/app/styles/Orbitron700.woff | Bin .../usr/lib/noVNC}/app/styles/auto.css | 0 .../usr/lib/noVNC}/app/styles/base.css | 0 {noVNC => image/usr/lib/noVNC}/app/ui.js | 0 {noVNC => image/usr/lib/noVNC}/app/webutil.js | 0 {noVNC => image/usr/lib/noVNC}/core/base64.js | 0 {noVNC => image/usr/lib/noVNC}/core/des.js | 0 .../usr/lib/noVNC}/core/display.js | 0 .../usr/lib/noVNC}/core/inflator.js | 0 .../usr/lib/noVNC}/core/inflator.mod.js | 0 .../usr/lib/noVNC}/core/input/devices.js | 0 .../usr/lib/noVNC}/core/input/keysym.js | 0 .../usr/lib/noVNC}/core/input/keysymdef.js | 0 .../usr/lib/noVNC}/core/input/util.js | 0 .../usr/lib/noVNC}/core/input/xtscancodes.js | 0 {noVNC => image/usr/lib/noVNC}/core/rfb.js | 0 {noVNC => image/usr/lib/noVNC}/core/util.js | 0 .../usr/lib/noVNC}/core/websock.js | 0 .../usr/lib/noVNC}/docs/LICENSE.Apache-2.0 | 0 .../usr/lib/noVNC}/docs/LICENSE.BSD-2-Clause | 0 .../usr/lib/noVNC}/docs/LICENSE.BSD-3-Clause | 0 .../usr/lib/noVNC}/docs/LICENSE.GPL-3 | 0 .../usr/lib/noVNC}/docs/LICENSE.LGPL-3 | 0 .../usr/lib/noVNC}/docs/LICENSE.MPL-2.0 | 0 .../usr/lib/noVNC}/docs/LICENSE.OFL-1.1 | 0 .../usr/lib/noVNC}/docs/LICENSE.pako | 0 .../usr/lib/noVNC}/docs/LICENSE.zlib | 0 {noVNC => image/usr/lib/noVNC}/docs/VERSION | 0 .../usr/lib/noVNC}/docs/flash_policy.txt | 0 {noVNC => image/usr/lib/noVNC}/docs/links | 0 {noVNC => image/usr/lib/noVNC}/docs/notes | 0 .../usr/lib/noVNC}/docs/release.txt | 0 {noVNC => image/usr/lib/noVNC}/docs/rfb_notes | 0 .../usr/lib/noVNC}/docs/rfbproto-3.3.pdf | Bin .../usr/lib/noVNC}/docs/rfbproto-3.7.pdf | Bin .../usr/lib/noVNC}/docs/rfbproto-3.8.pdf | Bin {noVNC => image/usr/lib/noVNC}/karma.conf.js | 0 {noVNC => image/usr/lib/noVNC}/package.json | 0 {noVNC => image/usr/lib/noVNC}/po/Makefile | 0 {noVNC => image/usr/lib/noVNC}/po/de.po | 0 {noVNC => image/usr/lib/noVNC}/po/el.po | 0 {noVNC => image/usr/lib/noVNC}/po/nl.po | 0 {noVNC => image/usr/lib/noVNC}/po/noVNC.pot | 0 {noVNC => image/usr/lib/noVNC}/po/po2js | 0 {noVNC => image/usr/lib/noVNC}/po/sv.po | 0 .../usr/lib/noVNC}/po/xgettext-html | 0 .../usr/lib/noVNC}/tests/assertions.js | 0 .../usr/lib/noVNC}/tests/fake.websocket.js | 0 .../usr/lib/noVNC}/tests/input.html | 0 .../usr/lib/noVNC}/tests/playback.js | 0 .../noVNC}/tests/run_from_console.casper.js | 0 .../usr/lib/noVNC}/tests/run_from_console.js | 0 .../noVNC}/tests/run_from_console.zombie.js | 0 .../usr/lib/noVNC}/tests/test.base64.js | 0 .../usr/lib/noVNC}/tests/test.display.js | 0 .../usr/lib/noVNC}/tests/test.helper.js | 0 .../usr/lib/noVNC}/tests/test.keyboard.js | 0 .../usr/lib/noVNC}/tests/test.rfb.js | 0 .../usr/lib/noVNC}/tests/test.util.js | 0 .../usr/lib/noVNC}/tests/test.websock.js | 0 .../usr/lib/noVNC}/tests/vnc_perf.html | 0 .../usr/lib/noVNC}/tests/vnc_playback.html | 0 .../usr/lib/noVNC}/utils/README.md | 0 .../usr/lib/noVNC}/utils/b64-to-binary.pl | 0 .../usr/lib/noVNC}/utils/img2js.py | 0 .../usr/lib/noVNC}/utils/json2graph.py | 0 .../usr/lib/noVNC}/utils/launch.sh | 2 +- .../lib/noVNC}/utils/make-module-transform.js | 0 {noVNC => image/usr/lib/noVNC}/utils/parse.js | 0 {noVNC => image/usr/lib/noVNC}/utils/u2x11 | 0 .../usr/lib/noVNC}/utils/use_require.js | 0 .../lib/noVNC}/utils/websockify/.travis.yml | 0 .../lib/noVNC}/utils/websockify/CHANGES.txt | 0 .../lib/noVNC}/utils/websockify/LICENSE.txt | 0 .../lib/noVNC}/utils/websockify/MANIFEST.in | 0 .../usr/lib/noVNC}/utils/websockify/Makefile | 0 .../usr/lib/noVNC}/utils/websockify/README.md | 0 .../Windows/Windows Service Readme.txt | 0 .../Program.cs | 0 .../ProjectInstaller.Designer.cs | 0 .../ProjectInstaller.cs | 0 .../ProjectInstaller.resx | 0 .../Properties/AssemblyInfo.cs | 0 .../Service1.Designer.cs | 0 .../Service1.cs | 0 .../noVNC Websocket.csproj | 0 .../noVNC Websocket.sln | 0 .../utils/websockify/docs/LICENSE.GPL-3 | 0 .../utils/websockify/docs/LICENSE.LGPL-3 | 0 .../utils/websockify/docs/LICENSE.MPL-2.0 | 0 .../usr/lib/noVNC}/utils/websockify/docs/TODO | 0 .../utils/websockify/docs/flash_policy.txt | 0 .../utils/websockify/docs/latency_results.txt | 0 .../lib/noVNC}/utils/websockify/docs/notes | 0 .../noVNC}/utils/websockify/docs/release.txt | 0 .../noVNC}/utils/websockify/docs/websockify.1 | 0 .../noVNC}/utils/websockify/include/VT100.js | 0 .../noVNC}/utils/websockify/include/keysym.js | 0 .../noVNC}/utils/websockify/include/util.js | 0 .../utils/websockify/include/websock.js | 0 .../utils/websockify/include/webutil.js | 0 .../noVNC}/utils/websockify/include/wsirc.js | 0 .../utils/websockify/include/wstelnet.js | 0 .../noVNC}/utils/websockify/other/Makefile | 0 .../noVNC}/utils/websockify/other/README.md | 0 .../utils/websockify/other/js/README.md | 0 .../utils/websockify/other/js/package.json | 0 .../utils/websockify/other/js/websockify.js | 0 .../noVNC}/utils/websockify/other/launch.sh | 0 .../noVNC}/utils/websockify/other/project.clj | 0 .../noVNC}/utils/websockify/other/websocket.c | 0 .../noVNC}/utils/websockify/other/websocket.h | 0 .../utils/websockify/other/websocket.rb | 0 .../utils/websockify/other/websockify.c | 0 .../utils/websockify/other/websockify.clj | 0 .../utils/websockify/other/websockify.rb | 0 .../lib/noVNC}/utils/websockify/other/wswrap | 0 .../usr/lib/noVNC}/utils/websockify/rebind | 0 .../usr/lib/noVNC}/utils/websockify/rebind.c | 0 .../usr/lib/noVNC}/utils/websockify/run | 0 .../usr/lib/noVNC}/utils/websockify/setup.py | 0 .../utils/websockify/test-requirements.txt | 0 .../noVNC}/utils/websockify/tests/echo.html | 0 .../lib/noVNC}/utils/websockify/tests/echo.py | 0 .../lib/noVNC}/utils/websockify/tests/echo.rb | 0 .../utils/websockify/tests/echo_client.py | 0 .../lib/noVNC}/utils/websockify/tests/include | 0 .../utils/websockify/tests/latency.html | 0 .../noVNC}/utils/websockify/tests/latency.py | 0 .../noVNC}/utils/websockify/tests/load.html | 0 .../lib/noVNC}/utils/websockify/tests/load.py | 0 .../utils/websockify/tests/plain_echo.html | 0 .../noVNC}/utils/websockify/tests/simple.html | 0 .../websockify/tests/test_auth_plugins.py | 0 .../utils/websockify/tests/test_websocket.py | 0 .../websockify/tests/test_websocketproxy.py | 0 .../websockify/tests/test_websockifyserver.py | 0 .../usr/lib/noVNC}/utils/websockify/tox.ini | 0 .../lib/noVNC}/utils/websockify/websockify.py | 0 .../utils/websockify/websockify/__init__.py | 0 .../websockify/websockify/auth_plugins.py | 0 .../websockify/websockify/token_plugins.py | 0 .../utils/websockify/websockify/websocket.py | 0 .../websockify/websockify/websocketproxy.py | 0 .../websockify/websockify/websocketserver.py | 0 .../websockify/websockify/websockifyserver.py | 0 .../lib/noVNC}/utils/websockify/wsirc.html | 0 .../lib/noVNC}/utils/websockify/wstelnet.html | 0 {noVNC => image/usr/lib/noVNC}/vnc.html | 0 {noVNC => image/usr/lib/noVNC}/vnc_auto.html | 0 {web => image/usr/lib/web}/config/__init__.py | 0 .../usr/lib/web}/lightop/__init__.py | 1 - {web/db => image/usr/lib/web/log}/__init__.py | 0 {web => image/usr/lib/web}/log/config.py | 0 {web => image/usr/lib/web}/requirements.txt | 0 {web => image/usr/lib/web}/run.py | 25 - .../usr/lib/web}/static/6df2b309.favicon.ico | Bin .../fonts/glyphicons-halflings-regular.eot | Bin .../fonts/glyphicons-halflings-regular.svg | 0 .../fonts/glyphicons-halflings-regular.ttf | Bin .../fonts/glyphicons-halflings-regular.woff | Bin {web => image/usr/lib/web}/static/index.html | 0 {web => image/usr/lib/web}/static/robots.txt | 0 .../lib/web}/static/scripts/046bbd30.main.js | 0 .../web}/static/scripts/2c80432f.plugins.js | 0 .../web}/static/scripts/9cd97fdd.vendor.js | 0 .../lib/web}/static/styles/536b3e9f.main.css | 0 .../web}/static/styles/57fdc80f.vendor.css | 0 .../usr/share/doro-lxde-wallpapers}/bg1.jpg | Bin .../usr/share/doro-lxde-wallpapers}/bg2.jpg | Bin .../usr/share/doro-lxde-wallpapers}/bg3.jpg | Bin .../usr/share/doro-lxde-wallpapers}/bg4.jpg | Bin .../desktop-items-0.conf | 0 repositories | 1 - tty.js/node_modules/.bin/tty.js | 1 - tty.js/node_modules/tty.js/.npmignore | 11 - tty.js/node_modules/tty.js/LICENSE | 19 - tty.js/node_modules/tty.js/README.md | 170 - tty.js/node_modules/tty.js/bin/tty.js | 10 - tty.js/node_modules/tty.js/index.js | 1 - tty.js/node_modules/tty.js/lib/config.js | 477 - tty.js/node_modules/tty.js/lib/logger.js | 61 - tty.js/node_modules/tty.js/lib/tty.js | 673 - tty.js/node_modules/tty.js/man/tty.js.1 | 39 - .../tty.js/node_modules/.bin/express | 1 - .../tty.js/node_modules/express/.npmignore | 9 - .../tty.js/node_modules/express/.travis.yml | 4 - .../tty.js/node_modules/express/History.md | 1091 - .../tty.js/node_modules/express/LICENSE | 22 - .../tty.js/node_modules/express/Makefile | 33 - .../tty.js/node_modules/express/Readme.md | 179 - .../tty.js/node_modules/express/bin/express | 422 - .../tty.js/node_modules/express/client.js | 25 - .../tty.js/node_modules/express/index.js | 4 - .../node_modules/express/lib/application.js | 534 - .../node_modules/express/lib/express.js | 92 - .../node_modules/express/lib/middleware.js | 33 - .../node_modules/express/lib/request.js | 493 - .../node_modules/express/lib/response.js | 754 - .../node_modules/express/lib/router/index.js | 273 - .../node_modules/express/lib/router/route.js | 72 - .../tty.js/node_modules/express/lib/utils.js | 282 - .../tty.js/node_modules/express/lib/view.js | 76 - .../node_modules/buffer-crc32/.npmignore | 1 - .../node_modules/buffer-crc32/.travis.yml | 8 - .../node_modules/buffer-crc32/README.md | 33 - .../node_modules/buffer-crc32/index.js | 84 - .../node_modules/buffer-crc32/package.json | 34 - .../buffer-crc32/tests/crc.test.js | 52 - .../express/node_modules/commander/.npmignore | 4 - .../node_modules/commander/.travis.yml | 4 - .../express/node_modules/commander/History.md | 107 - .../express/node_modules/commander/Makefile | 7 - .../express/node_modules/commander/Readme.md | 262 - .../express/node_modules/commander/index.js | 2 - .../node_modules/commander/lib/commander.js | 1026 - .../node_modules/commander/package.json | 39 - .../express/node_modules/connect/.npmignore | 12 - .../express/node_modules/connect/.travis.yml | 5 - .../express/node_modules/connect/LICENSE | 24 - .../express/node_modules/connect/Readme.md | 133 - .../express/node_modules/connect/index.js | 4 - .../node_modules/connect/lib-cov/cache.js | 68 - .../node_modules/connect/lib-cov/connect.js | 93 - .../node_modules/connect/lib-cov/index.js | 6 - .../connect/lib-cov/middleware/basicAuth.js | 128 - .../connect/lib-cov/middleware/bodyParser.js | 43 - .../connect/lib-cov/middleware/compress.js | 159 - .../lib-cov/middleware/cookieParser.js | 70 - .../lib-cov/middleware/cookieSession.js | 132 - .../connect/lib-cov/middleware/csrf.js | 51 - .../connect/lib-cov/middleware/directory.js | 256 - .../lib-cov/middleware/errorHandler.js | 104 - .../connect/lib-cov/middleware/favicon.js | 60 - .../connect/lib-cov/middleware/json.js | 117 - .../connect/lib-cov/middleware/limit.js | 63 - .../connect/lib-cov/middleware/logger.js | 312 - .../lib-cov/middleware/methodOverride.js | 42 - .../connect/lib-cov/middleware/multipart.js | 183 - .../connect/lib-cov/middleware/query.js | 27 - .../lib-cov/middleware/responseTime.js | 39 - .../connect/lib-cov/middleware/session.js | 321 - .../lib-cov/middleware/session/cookie.js | 65 - .../lib-cov/middleware/session/memory.js | 128 - .../lib-cov/middleware/session/session.js | 108 - .../lib-cov/middleware/session/store.js | 90 - .../connect/lib-cov/middleware/static.js | 92 - .../connect/lib-cov/middleware/staticCache.js | 276 - .../connect/lib-cov/middleware/timeout.js | 66 - .../connect/lib-cov/middleware/urlencoded.js | 98 - .../connect/lib-cov/middleware/vhost.js | 59 - .../node_modules/connect/lib-cov/patch.js | 85 - .../node_modules/connect/lib-cov/proto.js | 285 - .../connect/lib-cov/public/directory.html | 75 - .../connect/lib-cov/public/error.html | 13 - .../connect/lib-cov/public/favicon.ico | Bin 1406 -> 0 bytes .../connect/lib-cov/public/icons/page.png | Bin 635 -> 0 bytes .../connect/lib-cov/public/icons/page_add.png | Bin 739 -> 0 bytes .../lib-cov/public/icons/page_attach.png | Bin 794 -> 0 bytes .../lib-cov/public/icons/page_code.png | Bin 818 -> 0 bytes .../lib-cov/public/icons/page_copy.png | Bin 663 -> 0 bytes .../lib-cov/public/icons/page_delete.png | Bin 740 -> 0 bytes .../lib-cov/public/icons/page_edit.png | Bin 807 -> 0 bytes .../lib-cov/public/icons/page_error.png | Bin 793 -> 0 bytes .../lib-cov/public/icons/page_excel.png | Bin 817 -> 0 bytes .../lib-cov/public/icons/page_find.png | Bin 879 -> 0 bytes .../lib-cov/public/icons/page_gear.png | Bin 833 -> 0 bytes .../connect/lib-cov/public/icons/page_go.png | Bin 779 -> 0 bytes .../lib-cov/public/icons/page_green.png | Bin 621 -> 0 bytes .../connect/lib-cov/public/icons/page_key.png | Bin 801 -> 0 bytes .../lib-cov/public/icons/page_lightning.png | Bin 839 -> 0 bytes .../lib-cov/public/icons/page_link.png | Bin 830 -> 0 bytes .../lib-cov/public/icons/page_paintbrush.png | Bin 813 -> 0 bytes .../lib-cov/public/icons/page_paste.png | Bin 703 -> 0 bytes .../connect/lib-cov/public/icons/page_red.png | Bin 641 -> 0 bytes .../lib-cov/public/icons/page_refresh.png | Bin 858 -> 0 bytes .../lib-cov/public/icons/page_save.png | Bin 774 -> 0 bytes .../lib-cov/public/icons/page_white.png | Bin 294 -> 0 bytes .../public/icons/page_white_acrobat.png | Bin 591 -> 0 bytes .../public/icons/page_white_actionscript.png | Bin 664 -> 0 bytes .../lib-cov/public/icons/page_white_add.png | Bin 512 -> 0 bytes .../lib-cov/public/icons/page_white_c.png | Bin 587 -> 0 bytes .../public/icons/page_white_camera.png | Bin 656 -> 0 bytes .../lib-cov/public/icons/page_white_cd.png | Bin 666 -> 0 bytes .../lib-cov/public/icons/page_white_code.png | Bin 603 -> 0 bytes .../public/icons/page_white_code_red.png | Bin 587 -> 0 bytes .../public/icons/page_white_coldfusion.png | Bin 592 -> 0 bytes .../public/icons/page_white_compressed.png | Bin 724 -> 0 bytes .../lib-cov/public/icons/page_white_copy.png | Bin 309 -> 0 bytes .../public/icons/page_white_cplusplus.png | Bin 621 -> 0 bytes .../public/icons/page_white_csharp.png | Bin 700 -> 0 bytes .../lib-cov/public/icons/page_white_cup.png | Bin 639 -> 0 bytes .../public/icons/page_white_database.png | Bin 579 -> 0 bytes .../public/icons/page_white_delete.png | Bin 536 -> 0 bytes .../lib-cov/public/icons/page_white_dvd.png | Bin 638 -> 0 bytes .../lib-cov/public/icons/page_white_edit.png | Bin 618 -> 0 bytes .../lib-cov/public/icons/page_white_error.png | Bin 623 -> 0 bytes .../lib-cov/public/icons/page_white_excel.png | Bin 663 -> 0 bytes .../lib-cov/public/icons/page_white_find.png | Bin 676 -> 0 bytes .../lib-cov/public/icons/page_white_flash.png | Bin 582 -> 0 bytes .../public/icons/page_white_freehand.png | Bin 639 -> 0 bytes .../lib-cov/public/icons/page_white_gear.png | Bin 402 -> 0 bytes .../lib-cov/public/icons/page_white_get.png | Bin 516 -> 0 bytes .../lib-cov/public/icons/page_white_go.png | Bin 612 -> 0 bytes .../lib-cov/public/icons/page_white_h.png | Bin 603 -> 0 bytes .../public/icons/page_white_horizontal.png | Bin 296 -> 0 bytes .../lib-cov/public/icons/page_white_key.png | Bin 616 -> 0 bytes .../public/icons/page_white_lightning.png | Bin 669 -> 0 bytes .../lib-cov/public/icons/page_white_link.png | Bin 614 -> 0 bytes .../public/icons/page_white_magnify.png | Bin 554 -> 0 bytes .../lib-cov/public/icons/page_white_medal.png | Bin 706 -> 0 bytes .../public/icons/page_white_office.png | Bin 779 -> 0 bytes .../lib-cov/public/icons/page_white_paint.png | Bin 688 -> 0 bytes .../public/icons/page_white_paintbrush.png | Bin 618 -> 0 bytes .../lib-cov/public/icons/page_white_paste.png | Bin 620 -> 0 bytes .../lib-cov/public/icons/page_white_php.png | Bin 538 -> 0 bytes .../public/icons/page_white_picture.png | Bin 650 -> 0 bytes .../public/icons/page_white_powerpoint.png | Bin 588 -> 0 bytes .../lib-cov/public/icons/page_white_put.png | Bin 523 -> 0 bytes .../lib-cov/public/icons/page_white_ruby.png | Bin 626 -> 0 bytes .../lib-cov/public/icons/page_white_stack.png | Bin 317 -> 0 bytes .../lib-cov/public/icons/page_white_star.png | Bin 565 -> 0 bytes .../public/icons/page_white_swoosh.png | Bin 634 -> 0 bytes .../lib-cov/public/icons/page_white_text.png | Bin 342 -> 0 bytes .../public/icons/page_white_text_width.png | Bin 315 -> 0 bytes .../lib-cov/public/icons/page_white_tux.png | Bin 668 -> 0 bytes .../public/icons/page_white_vector.png | Bin 644 -> 0 bytes .../public/icons/page_white_visualstudio.png | Bin 702 -> 0 bytes .../lib-cov/public/icons/page_white_width.png | Bin 309 -> 0 bytes .../lib-cov/public/icons/page_white_word.png | Bin 651 -> 0 bytes .../lib-cov/public/icons/page_white_world.png | Bin 734 -> 0 bytes .../public/icons/page_white_wrench.png | Bin 613 -> 0 bytes .../lib-cov/public/icons/page_white_zip.png | Bin 386 -> 0 bytes .../lib-cov/public/icons/page_word.png | Bin 777 -> 0 bytes .../lib-cov/public/icons/page_world.png | Bin 903 -> 0 bytes .../connect/lib-cov/public/style.css | 141 - .../node_modules/connect/lib-cov/utils.js | 282 - .../express/node_modules/connect/lib/cache.js | 81 - .../node_modules/connect/lib/connect.js | 93 - .../express/node_modules/connect/lib/index.js | 50 - .../connect/lib/middleware/basicAuth.js | 103 - .../connect/lib/middleware/bodyParser.js | 61 - .../connect/lib/middleware/compress.js | 147 - .../connect/lib/middleware/cookieParser.js | 62 - .../connect/lib/middleware/cookieSession.js | 115 - .../connect/lib/middleware/csrf.js | 73 - .../connect/lib/middleware/directory.js | 228 - .../connect/lib/middleware/errorHandler.js | 86 - .../connect/lib/middleware/favicon.js | 81 - .../connect/lib/middleware/json.js | 86 - .../connect/lib/middleware/limit.js | 55 - .../connect/lib/middleware/logger.js | 339 - .../connect/lib/middleware/methodOverride.js | 40 - .../connect/lib/middleware/multipart.js | 133 - .../connect/lib/middleware/query.js | 46 - .../connect/lib/middleware/responseTime.js | 32 - .../connect/lib/middleware/session.js | 352 - .../connect/lib/middleware/session/cookie.js | 128 - .../connect/lib/middleware/session/memory.js | 129 - .../connect/lib/middleware/session/session.js | 116 - .../connect/lib/middleware/session/store.js | 84 - .../connect/lib/middleware/static.js | 94 - .../connect/lib/middleware/staticCache.js | 231 - .../connect/lib/middleware/timeout.js | 56 - .../connect/lib/middleware/urlencoded.js | 78 - .../connect/lib/middleware/vhost.js | 40 - .../express/node_modules/connect/lib/patch.js | 79 - .../express/node_modules/connect/lib/proto.js | 239 - .../connect/lib/public/directory.html | 81 - .../connect/lib/public/error.html | 14 - .../connect/lib/public/favicon.ico | Bin 1406 -> 0 bytes .../connect/lib/public/icons/page.png | Bin 635 -> 0 bytes .../connect/lib/public/icons/page_add.png | Bin 739 -> 0 bytes .../connect/lib/public/icons/page_attach.png | Bin 794 -> 0 bytes .../connect/lib/public/icons/page_code.png | Bin 818 -> 0 bytes .../connect/lib/public/icons/page_copy.png | Bin 663 -> 0 bytes .../connect/lib/public/icons/page_delete.png | Bin 740 -> 0 bytes .../connect/lib/public/icons/page_edit.png | Bin 807 -> 0 bytes .../connect/lib/public/icons/page_error.png | Bin 793 -> 0 bytes .../connect/lib/public/icons/page_excel.png | Bin 817 -> 0 bytes .../connect/lib/public/icons/page_find.png | Bin 879 -> 0 bytes .../connect/lib/public/icons/page_gear.png | Bin 833 -> 0 bytes .../connect/lib/public/icons/page_go.png | Bin 779 -> 0 bytes .../connect/lib/public/icons/page_green.png | Bin 621 -> 0 bytes .../connect/lib/public/icons/page_key.png | Bin 801 -> 0 bytes .../lib/public/icons/page_lightning.png | Bin 839 -> 0 bytes .../connect/lib/public/icons/page_link.png | Bin 830 -> 0 bytes .../lib/public/icons/page_paintbrush.png | Bin 813 -> 0 bytes .../connect/lib/public/icons/page_paste.png | Bin 703 -> 0 bytes .../connect/lib/public/icons/page_red.png | Bin 641 -> 0 bytes .../connect/lib/public/icons/page_refresh.png | Bin 858 -> 0 bytes .../connect/lib/public/icons/page_save.png | Bin 774 -> 0 bytes .../connect/lib/public/icons/page_white.png | Bin 294 -> 0 bytes .../lib/public/icons/page_white_acrobat.png | Bin 591 -> 0 bytes .../public/icons/page_white_actionscript.png | Bin 664 -> 0 bytes .../lib/public/icons/page_white_add.png | Bin 512 -> 0 bytes .../connect/lib/public/icons/page_white_c.png | Bin 587 -> 0 bytes .../lib/public/icons/page_white_camera.png | Bin 656 -> 0 bytes .../lib/public/icons/page_white_cd.png | Bin 666 -> 0 bytes .../lib/public/icons/page_white_code.png | Bin 603 -> 0 bytes .../lib/public/icons/page_white_code_red.png | Bin 587 -> 0 bytes .../public/icons/page_white_coldfusion.png | Bin 592 -> 0 bytes .../public/icons/page_white_compressed.png | Bin 724 -> 0 bytes .../lib/public/icons/page_white_copy.png | Bin 309 -> 0 bytes .../lib/public/icons/page_white_cplusplus.png | Bin 621 -> 0 bytes .../lib/public/icons/page_white_csharp.png | Bin 700 -> 0 bytes .../lib/public/icons/page_white_cup.png | Bin 639 -> 0 bytes .../lib/public/icons/page_white_database.png | Bin 579 -> 0 bytes .../lib/public/icons/page_white_delete.png | Bin 536 -> 0 bytes .../lib/public/icons/page_white_dvd.png | Bin 638 -> 0 bytes .../lib/public/icons/page_white_edit.png | Bin 618 -> 0 bytes .../lib/public/icons/page_white_error.png | Bin 623 -> 0 bytes .../lib/public/icons/page_white_excel.png | Bin 663 -> 0 bytes .../lib/public/icons/page_white_find.png | Bin 676 -> 0 bytes .../lib/public/icons/page_white_flash.png | Bin 582 -> 0 bytes .../lib/public/icons/page_white_freehand.png | Bin 639 -> 0 bytes .../lib/public/icons/page_white_gear.png | Bin 402 -> 0 bytes .../lib/public/icons/page_white_get.png | Bin 516 -> 0 bytes .../lib/public/icons/page_white_go.png | Bin 612 -> 0 bytes .../connect/lib/public/icons/page_white_h.png | Bin 603 -> 0 bytes .../public/icons/page_white_horizontal.png | Bin 296 -> 0 bytes .../lib/public/icons/page_white_key.png | Bin 616 -> 0 bytes .../lib/public/icons/page_white_lightning.png | Bin 669 -> 0 bytes .../lib/public/icons/page_white_link.png | Bin 614 -> 0 bytes .../lib/public/icons/page_white_magnify.png | Bin 554 -> 0 bytes .../lib/public/icons/page_white_medal.png | Bin 706 -> 0 bytes .../lib/public/icons/page_white_office.png | Bin 779 -> 0 bytes .../lib/public/icons/page_white_paint.png | Bin 688 -> 0 bytes .../public/icons/page_white_paintbrush.png | Bin 618 -> 0 bytes .../lib/public/icons/page_white_paste.png | Bin 620 -> 0 bytes .../lib/public/icons/page_white_php.png | Bin 538 -> 0 bytes .../lib/public/icons/page_white_picture.png | Bin 650 -> 0 bytes .../public/icons/page_white_powerpoint.png | Bin 588 -> 0 bytes .../lib/public/icons/page_white_put.png | Bin 523 -> 0 bytes .../lib/public/icons/page_white_ruby.png | Bin 626 -> 0 bytes .../lib/public/icons/page_white_stack.png | Bin 317 -> 0 bytes .../lib/public/icons/page_white_star.png | Bin 565 -> 0 bytes .../lib/public/icons/page_white_swoosh.png | Bin 634 -> 0 bytes .../lib/public/icons/page_white_text.png | Bin 342 -> 0 bytes .../public/icons/page_white_text_width.png | Bin 315 -> 0 bytes .../lib/public/icons/page_white_tux.png | Bin 668 -> 0 bytes .../lib/public/icons/page_white_vector.png | Bin 644 -> 0 bytes .../public/icons/page_white_visualstudio.png | Bin 702 -> 0 bytes .../lib/public/icons/page_white_width.png | Bin 309 -> 0 bytes .../lib/public/icons/page_white_word.png | Bin 651 -> 0 bytes .../lib/public/icons/page_white_world.png | Bin 734 -> 0 bytes .../lib/public/icons/page_white_wrench.png | Bin 613 -> 0 bytes .../lib/public/icons/page_white_zip.png | Bin 386 -> 0 bytes .../connect/lib/public/icons/page_word.png | Bin 777 -> 0 bytes .../connect/lib/public/icons/page_world.png | Bin 903 -> 0 bytes .../node_modules/connect/lib/public/style.css | 141 - .../express/node_modules/connect/lib/utils.js | 370 - .../connect/node_modules/bytes/.npmignore | 1 - .../connect/node_modules/bytes/History.md | 5 - .../connect/node_modules/bytes/Makefile | 7 - .../connect/node_modules/bytes/Readme.md | 51 - .../connect/node_modules/bytes/component.json | 7 - .../connect/node_modules/bytes/index.js | 39 - .../connect/node_modules/bytes/package.json | 25 - .../node_modules/formidable/.npmignore | 4 - .../node_modules/formidable/.travis.yml | 4 - .../connect/node_modules/formidable/Makefile | 14 - .../connect/node_modules/formidable/Readme.md | 311 - .../connect/node_modules/formidable/TODO | 3 - .../benchmark/bench-multipart-parser.js | 70 - .../node_modules/formidable/example/post.js | 43 - .../node_modules/formidable/example/upload.js | 48 - .../connect/node_modules/formidable/index.js | 1 - .../node_modules/formidable/lib/file.js | 73 - .../formidable/lib/incoming_form.js | 384 - .../node_modules/formidable/lib/index.js | 3 - .../formidable/lib/multipart_parser.js | 312 - .../formidable/lib/querystring_parser.js | 25 - .../node_modules/formidable/lib/util.js | 6 - .../formidable/node-gently/Makefile | 4 - .../formidable/node-gently/Readme.md | 167 - .../formidable/node-gently/example/dog.js | 22 - .../node-gently/example/event_emitter.js | 11 - .../formidable/node-gently/index.js | 1 - .../node-gently/lib/gently/gently.js | 184 - .../node-gently/lib/gently/index.js | 1 - .../formidable/node-gently/package.json | 14 - .../formidable/node-gently/test/common.js | 8 - .../node-gently/test/simple/test-gently.js | 348 - .../node_modules/formidable/package.json | 28 - .../node_modules/formidable/test/common.js | 19 - .../test/fixture/file/funkyfilename.txt | 1 - .../formidable/test/fixture/file/plain.txt | 1 - .../http/special-chars-in-filename/info.md | 3 - .../formidable/test/fixture/js/no-filename.js | 3 - .../fixture/js/special-chars-in-filename.js | 21 - .../formidable/test/fixture/multipart.js | 72 - .../test/integration/test-fixtures.js | 89 - .../formidable/test/legacy/common.js | 24 - .../integration/test-multipart-parser.js | 80 - .../test/legacy/simple/test-file.js | 104 - .../test/legacy/simple/test-incoming-form.js | 727 - .../legacy/simple/test-multipart-parser.js | 50 - .../legacy/simple/test-querystring-parser.js | 45 - .../legacy/system/test-multi-video-upload.js | 75 - .../node_modules/formidable/test/run.js | 2 - .../test/unit/test-incoming-form.js | 63 - .../node_modules/formidable/tool/record.js | 47 - .../connect/node_modules/pause/.npmignore | 4 - .../connect/node_modules/pause/History.md | 5 - .../connect/node_modules/pause/Makefile | 7 - .../connect/node_modules/pause/Readme.md | 29 - .../connect/node_modules/pause/index.js | 29 - .../connect/node_modules/pause/package.json | 20 - .../connect/node_modules/qs/.npmignore | 1 - .../connect/node_modules/qs/.travis.yml | 4 - .../connect/node_modules/qs/History.md | 83 - .../connect/node_modules/qs/Makefile | 12 - .../connect/node_modules/qs/Readme.md | 58 - .../connect/node_modules/qs/benchmark.js | 17 - .../connect/node_modules/qs/component.json | 6 - .../connect/node_modules/qs/examples.js | 51 - .../connect/node_modules/qs/index.js | 2 - .../connect/node_modules/qs/lib/head.js | 1 - .../node_modules/qs/lib/querystring.js | 262 - .../connect/node_modules/qs/lib/tail.js | 1 - .../connect/node_modules/qs/package.json | 40 - .../connect/node_modules/qs/querystring.js | 254 - .../node_modules/qs/test/browser/expect.js | 1202 - .../node_modules/qs/test/browser/index.html | 18 - .../node_modules/qs/test/browser/jquery.js | 8981 -- .../node_modules/qs/test/browser/mocha.css | 163 - .../node_modules/qs/test/browser/mocha.js | 4201 - .../node_modules/qs/test/browser/qs.css | 0 .../node_modules/qs/test/browser/qs.js | 351 - .../connect/node_modules/qs/test/parse.js | 147 - .../connect/node_modules/qs/test/stringify.js | 73 - .../express/node_modules/connect/package.json | 54 - .../express/node_modules/connect/test.js | 7 - .../node_modules/cookie-signature/.npmignore | 4 - .../node_modules/cookie-signature/History.md | 5 - .../node_modules/cookie-signature/Makefile | 7 - .../node_modules/cookie-signature/Readme.md | 42 - .../node_modules/cookie-signature/index.js | 42 - .../cookie-signature/package.json | 24 - .../express/node_modules/cookie/.npmignore | 1 - .../express/node_modules/cookie/.travis.yml | 4 - .../express/node_modules/cookie/README.md | 44 - .../express/node_modules/cookie/index.js | 61 - .../express/node_modules/cookie/package.json | 37 - .../node_modules/cookie/test/mocha.opts | 1 - .../express/node_modules/cookie/test/parse.js | 28 - .../node_modules/cookie/test/serialize.js | 59 - .../express/node_modules/debug/Readme.md | 115 - .../express/node_modules/debug/debug.js | 137 - .../express/node_modules/debug/index.js | 5 - .../express/node_modules/debug/lib/debug.js | 147 - .../express/node_modules/debug/package.json | 46 - .../express/node_modules/fresh/.npmignore | 1 - .../express/node_modules/fresh/Makefile | 7 - .../express/node_modules/fresh/Readme.md | 32 - .../express/node_modules/fresh/index.js | 49 - .../express/node_modules/fresh/package.json | 20 - .../express/node_modules/methods/index.js | 26 - .../express/node_modules/methods/package.json | 20 - .../express/node_modules/mkdirp/.npmignore | 2 - .../express/node_modules/mkdirp/.travis.yml | 4 - .../express/node_modules/mkdirp/LICENSE | 21 - .../node_modules/mkdirp/README.markdown | 61 - .../node_modules/mkdirp/examples/pow.js | 6 - .../node_modules/mkdirp/examples/pow.js.orig | 6 - .../node_modules/mkdirp/examples/pow.js.rej | 19 - .../express/node_modules/mkdirp/index.js | 94 - .../express/node_modules/mkdirp/package.json | 37 - .../express/node_modules/mkdirp/test/chmod.js | 38 - .../node_modules/mkdirp/test/clobber.js | 37 - .../node_modules/mkdirp/test/mkdirp.js | 28 - .../express/node_modules/mkdirp/test/perm.js | 32 - .../node_modules/mkdirp/test/perm_sync.js | 39 - .../express/node_modules/mkdirp/test/race.js | 41 - .../express/node_modules/mkdirp/test/rel.js | 32 - .../node_modules/mkdirp/test/return.js | 25 - .../node_modules/mkdirp/test/return_sync.js | 24 - .../express/node_modules/mkdirp/test/root.js | 18 - .../express/node_modules/mkdirp/test/sync.js | 32 - .../express/node_modules/mkdirp/test/umask.js | 28 - .../node_modules/mkdirp/test/umask_sync.js | 32 - .../node_modules/range-parser/.npmignore | 1 - .../node_modules/range-parser/History.md | 15 - .../node_modules/range-parser/Makefile | 7 - .../node_modules/range-parser/Readme.md | 28 - .../node_modules/range-parser/index.js | 49 - .../node_modules/range-parser/package.json | 20 - .../express/node_modules/send/.npmignore | 4 - .../express/node_modules/send/History.md | 25 - .../express/node_modules/send/Makefile | 8 - .../express/node_modules/send/Readme.md | 123 - .../express/node_modules/send/index.js | 2 - .../express/node_modules/send/lib/send.js | 473 - .../express/node_modules/send/lib/utils.js | 47 - .../send/node_modules/mime/LICENSE | 19 - .../send/node_modules/mime/README.md | 63 - .../send/node_modules/mime/mime.js | 104 - .../send/node_modules/mime/package.json | 36 - .../send/node_modules/mime/test.js | 55 - .../send/node_modules/mime/types/mime.types | 1510 - .../send/node_modules/mime/types/node.types | 65 - .../express/node_modules/send/package.json | 34 - .../tty.js/node_modules/express/package.json | 85 - .../tty.js/node_modules/express/test.js | 14 - .../tty.js/node_modules/pty.js/.npmignore | 10 - .../tty.js/node_modules/pty.js/LICENSE | 19 - .../tty.js/node_modules/pty.js/Makefile | 20 - .../tty.js/node_modules/pty.js/README.md | 45 - .../tty.js/node_modules/pty.js/binding.gyp | 34 - .../tty.js/node_modules/pty.js/build/Makefile | 332 - .../.deps/Release/obj.target/pty.node.d | 1 - .../Release/obj.target/pty/src/unix/pty.o.d | 21 - .../build/Release/.deps/Release/pty.node.d | 1 - .../pty.js/build/Release/linker.lock | 0 .../pty.js/build/Release/obj.target/pty.node | Bin 19249 -> 0 bytes .../Release/obj.target/pty/src/unix/pty.o | Bin 14864 -> 0 bytes .../pty.js/build/Release/pty.node | Bin 19249 -> 0 bytes .../pty.js/build/binding.Makefile | 6 - .../node_modules/pty.js/build/config.gypi | 116 - .../node_modules/pty.js/build/pty.target.mk | 131 - .../node_modules/pty.js/deps/winpty/LICENSE | 19 - .../node_modules/pty.js/deps/winpty/Makefile | 39 - .../node_modules/pty.js/deps/winpty/Notes.txt | 219 - .../pty.js/deps/winpty/README.rst | 90 - .../pty.js/deps/winpty/agent/Agent.cc | 517 - .../pty.js/deps/winpty/agent/Agent.h | 94 - .../pty.js/deps/winpty/agent/AgentAssert.cc | 35 - .../pty.js/deps/winpty/agent/AgentAssert.h | 28 - .../pty.js/deps/winpty/agent/ConsoleInput.cc | 485 - .../pty.js/deps/winpty/agent/ConsoleInput.h | 92 - .../pty.js/deps/winpty/agent/Coord.cc | 29 - .../pty.js/deps/winpty/agent/Coord.h | 79 - .../pty.js/deps/winpty/agent/DsrSender.h | 30 - .../pty.js/deps/winpty/agent/EventLoop.cc | 107 - .../pty.js/deps/winpty/agent/EventLoop.h | 48 - .../pty.js/deps/winpty/agent/Makefile | 58 - .../pty.js/deps/winpty/agent/NamedPipe.cc | 258 - .../pty.js/deps/winpty/agent/NamedPipe.h | 102 - .../pty.js/deps/winpty/agent/SmallRect.cc | 30 - .../pty.js/deps/winpty/agent/SmallRect.h | 114 - .../pty.js/deps/winpty/agent/Terminal.cc | 201 - .../pty.js/deps/winpty/agent/Terminal.h | 50 - .../pty.js/deps/winpty/agent/Win32Console.cc | 299 - .../pty.js/deps/winpty/agent/Win32Console.h | 64 - .../pty.js/deps/winpty/agent/main.cc | 51 - .../node_modules/pty.js/deps/winpty/config.mk | 43 - .../node_modules/pty.js/deps/winpty/configure | 85 - .../pty.js/deps/winpty/include/winpty.h | 108 - .../pty.js/deps/winpty/libwinpty/Makefile | 45 - .../pty.js/deps/winpty/libwinpty/winpty.cc | 520 - .../pty.js/deps/winpty/misc/DebugClient.py | 42 - .../pty.js/deps/winpty/misc/DebugServer.py | 63 - .../pty.js/deps/winpty/misc/FormatChar.h | 21 - .../pty.js/deps/winpty/misc/SelectAllTest.cc | 40 - .../pty.js/deps/winpty/misc/ShowArgv.cc | 12 - .../deps/winpty/misc/ShowConsoleInput.cc | 40 - .../pty.js/deps/winpty/misc/Spew.py | 5 - .../pty.js/deps/winpty/misc/UnixEcho.cc | 89 - .../pty.js/deps/winpty/misc/VkEscapeTest.cc | 56 - .../pty.js/deps/winpty/misc/Win32Echo1.cc | 26 - .../pty.js/deps/winpty/misc/Win32Echo2.cc | 19 - .../pty.js/deps/winpty/misc/Win32Test1.cc | 46 - .../pty.js/deps/winpty/misc/Win32Test2.cc | 70 - .../pty.js/deps/winpty/misc/Win32Test3.cc | 78 - .../pty.js/deps/winpty/misc/Win32Write1.cc | 44 - .../pty.js/deps/winpty/misc/build_win32.sh | 4 - .../pty.js/deps/winpty/shared/AgentMsg.h | 34 - .../pty.js/deps/winpty/shared/Buffer.h | 99 - .../pty.js/deps/winpty/shared/DebugClient.cc | 102 - .../pty.js/deps/winpty/shared/DebugClient.h | 27 - .../pty.js/deps/winpty/shared/c99_snprintf.h | 87 - .../pty.js/deps/winpty/unix-adapter/Makefile | 39 - .../pty.js/deps/winpty/unix-adapter/Shared.cc | 21 - .../pty.js/deps/winpty/unix-adapter/main.cc | 447 - .../pty.js/deps/winpty/winpty.gyp | 48 - .../tty.js/node_modules/pty.js/index.js | 2 - .../tty.js/node_modules/pty.js/lib/pty.js | 352 - .../tty.js/node_modules/pty.js/lib/pty_win.js | 358 - .../tty.js/node_modules/pty.js/package.json | 39 - .../node_modules/pty.js/src/unix/pty.cc | 562 - .../tty.js/node_modules/pty.js/src/win/pty.cc | 282 - .../tty.js/node_modules/pty.js/wscript | 17 - .../tty.js/node_modules/socket.io/.npmignore | 3 - .../tty.js/node_modules/socket.io/.travis.yml | 6 - .../tty.js/node_modules/socket.io/History.md | 310 - .../tty.js/node_modules/socket.io/LICENSE | 22 - .../tty.js/node_modules/socket.io/Makefile | 31 - .../tty.js/node_modules/socket.io/Readme.md | 364 - .../socket.io/benchmarks/decode.bench.js | 64 - .../socket.io/benchmarks/encode.bench.js | 90 - .../socket.io/benchmarks/runner.js | 55 - .../tty.js/node_modules/socket.io/index.js | 8 - .../node_modules/socket.io/lib/index.js | 131 - .../node_modules/socket.io/lib/logger.js | 97 - .../node_modules/socket.io/lib/manager.js | 1026 - .../node_modules/socket.io/lib/namespace.js | 355 - .../node_modules/socket.io/lib/parser.js | 249 - .../node_modules/socket.io/lib/socket.io.js | 143 - .../node_modules/socket.io/lib/socket.js | 369 - .../node_modules/socket.io/lib/static.js | 395 - .../node_modules/socket.io/lib/store.js | 98 - .../socket.io/lib/stores/memory.js | 143 - .../socket.io/lib/stores/redis.js | 269 - .../node_modules/socket.io/lib/transport.js | 534 - .../socket.io/lib/transports/flashsocket.js | 129 - .../socket.io/lib/transports/htmlfile.js | 82 - .../socket.io/lib/transports/http-polling.js | 147 - .../socket.io/lib/transports/http.js | 121 - .../socket.io/lib/transports/index.js | 12 - .../socket.io/lib/transports/jsonp-polling.js | 97 - .../socket.io/lib/transports/websocket.js | 36 - .../lib/transports/websocket/default.js | 362 - .../lib/transports/websocket/hybi-07-12.js | 622 - .../lib/transports/websocket/hybi-16.js | 622 - .../lib/transports/websocket/index.js | 11 - .../socket.io/lib/transports/xhr-polling.js | 69 - .../tty.js/node_modules/socket.io/lib/util.js | 50 - .../node_modules/base64id/.npmignore | 3 - .../socket.io/node_modules/base64id/README.md | 18 - .../node_modules/base64id/lib/base64id.js | 103 - .../node_modules/base64id/package.json | 25 - .../node_modules/policyfile/.npmignore | 1 - .../socket.io/node_modules/policyfile/LICENSE | 19 - .../node_modules/policyfile/Makefile | 7 - .../node_modules/policyfile/README.md | 98 - .../node_modules/policyfile/doc/index.html | 375 - .../policyfile/examples/basic.fallback.js | 8 - .../node_modules/policyfile/examples/basic.js | 5 - .../node_modules/policyfile/index.js | 1 - .../node_modules/policyfile/lib/server.js | 289 - .../node_modules/policyfile/package.json | 52 - .../node_modules/policyfile/tests/ssl/ssl.crt | 21 - .../policyfile/tests/ssl/ssl.private.key | 27 - .../policyfile/tests/unit.test.js | 231 - .../socket.io/node_modules/redis/.npmignore | 1 - .../socket.io/node_modules/redis/README.md | 691 - .../redis/benches/buffer_bench.js | 89 - .../redis/benches/hiredis_parser.js | 38 - .../node_modules/redis/benches/re_sub_test.js | 14 - .../redis/benches/reconnect_test.js | 29 - .../redis/benches/stress/codec.js | 16 - .../redis/benches/stress/pubsub/pub.js | 38 - .../redis/benches/stress/pubsub/run | 10 - .../redis/benches/stress/pubsub/server.js | 23 - .../redis/benches/stress/rpushblpop/pub.js | 49 - .../redis/benches/stress/rpushblpop/run | 6 - .../redis/benches/stress/rpushblpop/server.js | 30 - .../redis/benches/stress/speed/00 | 13 - .../redis/benches/stress/speed/plot | 13 - .../redis/benches/stress/speed/size-rate.png | Bin 6672 -> 0 bytes .../redis/benches/stress/speed/speed.js | 84 - .../redis/benches/sub_quit_test.js | 18 - .../socket.io/node_modules/redis/changelog.md | 219 - .../redis/diff_multi_bench_output.js | 87 - .../node_modules/redis/examples/auth.js | 5 - .../redis/examples/backpressure_drain.js | 33 - .../node_modules/redis/examples/eval.js | 9 - .../node_modules/redis/examples/extend.js | 24 - .../node_modules/redis/examples/file.js | 32 - .../node_modules/redis/examples/mget.js | 5 - .../node_modules/redis/examples/monitor.js | 10 - .../node_modules/redis/examples/multi.js | 46 - .../node_modules/redis/examples/multi2.js | 29 - .../node_modules/redis/examples/psubscribe.js | 33 - .../node_modules/redis/examples/pub_sub.js | 41 - .../node_modules/redis/examples/simple.js | 24 - .../node_modules/redis/examples/sort.js | 17 - .../node_modules/redis/examples/subqueries.js | 15 - .../node_modules/redis/examples/subquery.js | 19 - .../redis/examples/unix_socket.js | 29 - .../node_modules/redis/examples/web_server.js | 31 - .../node_modules/redis/generate_commands.js | 39 - .../socket.io/node_modules/redis/index.js | 1113 - .../node_modules/redis/lib/commands.js | 147 - .../node_modules/redis/lib/parser/hiredis.js | 46 - .../redis/lib/parser/javascript.js | 317 - .../socket.io/node_modules/redis/lib/queue.js | 61 - .../node_modules/redis/lib/to_array.js | 12 - .../socket.io/node_modules/redis/lib/util.js | 11 - .../socket.io/node_modules/redis/mem.js | 11 - .../node_modules/redis/multi_bench.js | 225 - .../socket.io/node_modules/redis/package.json | 35 - .../socket.io/node_modules/redis/test.js | 1618 - .../node_modules/socket.io-client/.npmignore | 2 - .../node_modules/socket.io-client/History.md | 226 - .../node_modules/socket.io-client/Makefile | 20 - .../node_modules/socket.io-client/README.md | 246 - .../socket.io-client/bin/builder.js | 303 - .../socket.io-client/dist/WebSocketMain.swf | Bin 175830 -> 0 bytes .../dist/WebSocketMainInsecure.swf | Bin 175953 -> 0 bytes .../socket.io-client/dist/socket.io.js | 3871 - .../socket.io-client/dist/socket.io.min.js | 2 - .../socket.io-client/lib/events.js | 182 - .../node_modules/socket.io-client/lib/io.js | 206 - .../node_modules/socket.io-client/lib/json.js | 322 - .../socket.io-client/lib/namespace.js | 242 - .../socket.io-client/lib/parser.js | 262 - .../socket.io-client/lib/socket.js | 579 - .../socket.io-client/lib/transport.js | 256 - .../lib/transports/flashsocket.js | 191 - .../lib/transports/htmlfile.js | 171 - .../lib/transports/jsonp-polling.js | 256 - .../lib/transports/websocket.js | 197 - .../lib/transports/xhr-polling.js | 177 - .../socket.io-client/lib/transports/xhr.js | 217 - .../node_modules/socket.io-client/lib/util.js | 365 - .../lib/vendor/web-socket-js/.npmignore | 1 - .../lib/vendor/web-socket-js/README.md | 157 - .../vendor/web-socket-js/WebSocketMain.swf | Bin 175830 -> 0 bytes .../web-socket-js/WebSocketMainInsecure.zip | Bin 166610 -> 0 bytes .../flash-src/IWebSocketLogger.as | 8 - .../web-socket-js/flash-src/WebSocket.as | 464 - .../web-socket-js/flash-src/WebSocketEvent.as | 33 - .../web-socket-js/flash-src/WebSocketMain.as | 150 - .../flash-src/WebSocketMainInsecure.as | 19 - .../vendor/web-socket-js/flash-src/build.sh | 10 - .../com/adobe/net/proxies/RFC2817Socket.as | 204 - .../flash-src/com/gsolo/encryption/MD5.as | 375 - .../flash-src/com/hurlant/crypto/Crypto.as | 287 - .../crypto/cert/MozillaRootCertificates.as | 3235 - .../hurlant/crypto/cert/X509Certificate.as | 218 - .../crypto/cert/X509CertificateCollection.as | 57 - .../flash-src/com/hurlant/crypto/hash/HMAC.as | 82 - .../com/hurlant/crypto/hash/IHMAC.as | 27 - .../com/hurlant/crypto/hash/IHash.as | 21 - .../flash-src/com/hurlant/crypto/hash/MAC.as | 137 - .../flash-src/com/hurlant/crypto/hash/MD2.as | 124 - .../flash-src/com/hurlant/crypto/hash/MD5.as | 204 - .../flash-src/com/hurlant/crypto/hash/SHA1.as | 106 - .../com/hurlant/crypto/hash/SHA224.as | 28 - .../com/hurlant/crypto/hash/SHA256.as | 115 - .../com/hurlant/crypto/hash/SHABase.as | 71 - .../flash-src/com/hurlant/crypto/prng/ARC4.as | 90 - .../com/hurlant/crypto/prng/IPRNG.as | 20 - .../com/hurlant/crypto/prng/Random.as | 119 - .../com/hurlant/crypto/prng/TLSPRF.as | 142 - .../com/hurlant/crypto/rsa/RSAKey.as | 339 - .../com/hurlant/crypto/symmetric/AESKey.as | 2797 - .../hurlant/crypto/symmetric/BlowFishKey.as | 375 - .../com/hurlant/crypto/symmetric/CBCMode.as | 55 - .../com/hurlant/crypto/symmetric/CFB8Mode.as | 61 - .../com/hurlant/crypto/symmetric/CFBMode.as | 64 - .../com/hurlant/crypto/symmetric/CTRMode.as | 58 - .../com/hurlant/crypto/symmetric/DESKey.as | 365 - .../com/hurlant/crypto/symmetric/ECBMode.as | 86 - .../com/hurlant/crypto/symmetric/ICipher.as | 21 - .../com/hurlant/crypto/symmetric/IMode.as | 15 - .../com/hurlant/crypto/symmetric/IPad.as | 32 - .../hurlant/crypto/symmetric/IStreamCipher.as | 21 - .../hurlant/crypto/symmetric/ISymmetricKey.as | 35 - .../com/hurlant/crypto/symmetric/IVMode.as | 110 - .../com/hurlant/crypto/symmetric/NullPad.as | 34 - .../com/hurlant/crypto/symmetric/OFBMode.as | 52 - .../com/hurlant/crypto/symmetric/PKCS5.as | 44 - .../com/hurlant/crypto/symmetric/SSLPad.as | 44 - .../hurlant/crypto/symmetric/SimpleIVMode.as | 60 - .../com/hurlant/crypto/symmetric/TLSPad.as | 42 - .../hurlant/crypto/symmetric/TripleDESKey.as | 88 - .../com/hurlant/crypto/symmetric/XTeaKey.as | 94 - .../com/hurlant/crypto/symmetric/aeskey.pl | 29 - .../com/hurlant/crypto/symmetric/dump.txt | 2304 - .../com/hurlant/crypto/tests/AESKeyTest.as | 1220 - .../com/hurlant/crypto/tests/ARC4Test.as | 58 - .../hurlant/crypto/tests/BigIntegerTest.as | 39 - .../hurlant/crypto/tests/BlowFishKeyTest.as | 148 - .../com/hurlant/crypto/tests/CBCModeTest.as | 160 - .../com/hurlant/crypto/tests/CFB8ModeTest.as | 71 - .../com/hurlant/crypto/tests/CFBModeTest.as | 98 - .../com/hurlant/crypto/tests/CTRModeTest.as | 109 - .../com/hurlant/crypto/tests/DESKeyTest.as | 112 - .../com/hurlant/crypto/tests/ECBModeTest.as | 151 - .../com/hurlant/crypto/tests/HMACTest.as | 184 - .../com/hurlant/crypto/tests/ITestHarness.as | 20 - .../com/hurlant/crypto/tests/MD2Test.as | 56 - .../com/hurlant/crypto/tests/MD5Test.as | 58 - .../com/hurlant/crypto/tests/OFBModeTest.as | 101 - .../com/hurlant/crypto/tests/RSAKeyTest.as | 92 - .../com/hurlant/crypto/tests/SHA1Test.as | 198 - .../com/hurlant/crypto/tests/SHA224Test.as | 58 - .../com/hurlant/crypto/tests/SHA256Test.as | 60 - .../com/hurlant/crypto/tests/TLSPRFTest.as | 51 - .../com/hurlant/crypto/tests/TestCase.as | 42 - .../hurlant/crypto/tests/TripleDESKeyTest.as | 59 - .../com/hurlant/crypto/tests/XTeaKeyTest.as | 66 - .../com/hurlant/crypto/tls/BulkCiphers.as | 102 - .../com/hurlant/crypto/tls/CipherSuites.as | 117 - .../hurlant/crypto/tls/IConnectionState.as | 14 - .../hurlant/crypto/tls/ISecurityParameters.as | 29 - .../com/hurlant/crypto/tls/KeyExchanges.as | 24 - .../flash-src/com/hurlant/crypto/tls/MACs.as | 38 - .../hurlant/crypto/tls/SSLConnectionState.as | 171 - .../com/hurlant/crypto/tls/SSLEvent.as | 26 - .../crypto/tls/SSLSecurityParameters.as | 340 - .../com/hurlant/crypto/tls/TLSConfig.as | 70 - .../hurlant/crypto/tls/TLSConnectionState.as | 151 - .../com/hurlant/crypto/tls/TLSEngine.as | 895 - .../com/hurlant/crypto/tls/TLSError.as | 39 - .../com/hurlant/crypto/tls/TLSEvent.as | 27 - .../crypto/tls/TLSSecurityParameters.as | 197 - .../com/hurlant/crypto/tls/TLSSocket.as | 370 - .../com/hurlant/crypto/tls/TLSSocketEvent.as | 26 - .../com/hurlant/crypto/tls/TLSTest.as | 180 - .../com/hurlant/math/BarrettReduction.as | 90 - .../flash-src/com/hurlant/math/BigInteger.as | 1543 - .../com/hurlant/math/ClassicReduction.as | 35 - .../flash-src/com/hurlant/math/IReduction.as | 11 - .../com/hurlant/math/MontgomeryReduction.as | 85 - .../com/hurlant/math/NullReduction.as | 34 - .../flash-src/com/hurlant/math/bi_internal.as | 11 - .../flash-src/com/hurlant/util/ArrayUtil.as | 25 - .../flash-src/com/hurlant/util/Base64.as | 189 - .../flash-src/com/hurlant/util/Hex.as | 66 - .../flash-src/com/hurlant/util/Memory.as | 28 - .../com/hurlant/util/der/ByteString.as | 43 - .../flash-src/com/hurlant/util/der/DER.as | 210 - .../com/hurlant/util/der/IAsn1Type.as | 21 - .../flash-src/com/hurlant/util/der/Integer.as | 44 - .../flash-src/com/hurlant/util/der/OID.as | 35 - .../com/hurlant/util/der/ObjectIdentifier.as | 112 - .../flash-src/com/hurlant/util/der/PEM.as | 118 - .../com/hurlant/util/der/PrintableString.as | 49 - .../com/hurlant/util/der/Sequence.as | 90 - .../flash-src/com/hurlant/util/der/Set.as | 27 - .../flash-src/com/hurlant/util/der/Type.as | 94 - .../flash-src/com/hurlant/util/der/UTCTime.as | 60 - .../lib/vendor/web-socket-js/sample.html | 75 - .../lib/vendor/web-socket-js/swfobject.js | 6 - .../lib/vendor/web-socket-js/web_socket.js | 349 - .../node_modules/.bin/uglifyjs | 1 - .../socket.io-client/node_modules/.bin/wscat | 1 - .../active-x-obfuscator/.npmignore | 2 - .../active-x-obfuscator/Readme.md | 33 - .../node_modules/active-x-obfuscator/index.js | 83 - .../node_modules/zeparser/.npmignore | 1 - .../node_modules/zeparser/LICENSE | 19 - .../node_modules/zeparser/README | 37 - .../node_modules/zeparser/Tokenizer.js | 646 - .../node_modules/zeparser/ZeParser.js | 2180 - .../node_modules/zeparser/benchmark.html | 111608 --------------- .../node_modules/zeparser/index.js | 1 - .../node_modules/zeparser/package.json | 27 - .../node_modules/zeparser/test-parser.html | 26 - .../node_modules/zeparser/test-tokenizer.html | 23 - .../node_modules/zeparser/tests.js | 478 - .../zeparser/unicodecategories.js | 49 - .../active-x-obfuscator/package.json | 34 - .../node_modules/active-x-obfuscator/test.js | 53 - .../node_modules/uglify-js/.npmignore | 4 - .../node_modules/uglify-js/README.html | 981 - .../node_modules/uglify-js/README.org | 574 - .../node_modules/uglify-js/bin/uglifyjs | 323 - .../node_modules/uglify-js/docstyle.css | 75 - .../node_modules/uglify-js/lib/object-ast.js | 75 - .../node_modules/uglify-js/lib/parse-js.js | 1342 - .../node_modules/uglify-js/lib/process.js | 2011 - .../uglify-js/lib/squeeze-more.js | 69 - .../node_modules/uglify-js/package.json | 26 - .../node_modules/uglify-js/package.json~ | 24 - .../node_modules/uglify-js/test/beautify.js | 28 - .../node_modules/uglify-js/test/testparser.js | 403 - .../test/unit/compress/expected/array1.js | 1 - .../test/unit/compress/expected/array2.js | 1 - .../test/unit/compress/expected/array3.js | 1 - .../test/unit/compress/expected/array4.js | 1 - .../test/unit/compress/expected/assignment.js | 1 - .../unit/compress/expected/concatstring.js | 1 - .../test/unit/compress/expected/const.js | 1 - .../unit/compress/expected/empty-blocks.js | 1 - .../unit/compress/expected/forstatement.js | 1 - .../test/unit/compress/expected/if.js | 1 - .../test/unit/compress/expected/ifreturn.js | 1 - .../test/unit/compress/expected/ifreturn2.js | 1 - .../test/unit/compress/expected/issue10.js | 1 - .../test/unit/compress/expected/issue11.js | 1 - .../test/unit/compress/expected/issue13.js | 1 - .../test/unit/compress/expected/issue14.js | 1 - .../test/unit/compress/expected/issue16.js | 1 - .../test/unit/compress/expected/issue17.js | 1 - .../test/unit/compress/expected/issue20.js | 1 - .../test/unit/compress/expected/issue21.js | 1 - .../test/unit/compress/expected/issue25.js | 1 - .../test/unit/compress/expected/issue27.js | 1 - .../test/unit/compress/expected/issue278.js | 1 - .../test/unit/compress/expected/issue28.js | 1 - .../test/unit/compress/expected/issue29.js | 1 - .../test/unit/compress/expected/issue30.js | 1 - .../test/unit/compress/expected/issue34.js | 1 - .../test/unit/compress/expected/issue4.js | 1 - .../test/unit/compress/expected/issue48.js | 1 - .../test/unit/compress/expected/issue50.js | 1 - .../test/unit/compress/expected/issue53.js | 1 - .../test/unit/compress/expected/issue54.1.js | 1 - .../test/unit/compress/expected/issue68.js | 1 - .../test/unit/compress/expected/issue69.js | 1 - .../test/unit/compress/expected/issue9.js | 1 - .../test/unit/compress/expected/mangle.js | 1 - .../unit/compress/expected/null_string.js | 1 - .../unit/compress/expected/strict-equals.js | 1 - .../test/unit/compress/expected/var.js | 1 - .../test/unit/compress/expected/whitespace.js | 1 - .../test/unit/compress/expected/with.js | 1 - .../test/unit/compress/test/array1.js | 3 - .../test/unit/compress/test/array2.js | 4 - .../test/unit/compress/test/array3.js | 4 - .../test/unit/compress/test/array4.js | 6 - .../test/unit/compress/test/assignment.js | 20 - .../test/unit/compress/test/concatstring.js | 3 - .../test/unit/compress/test/const.js | 5 - .../test/unit/compress/test/empty-blocks.js | 4 - .../test/unit/compress/test/forstatement.js | 10 - .../uglify-js/test/unit/compress/test/if.js | 6 - .../test/unit/compress/test/ifreturn.js | 9 - .../test/unit/compress/test/ifreturn2.js | 16 - .../test/unit/compress/test/issue10.js | 1 - .../test/unit/compress/test/issue11.js | 3 - .../test/unit/compress/test/issue13.js | 1 - .../test/unit/compress/test/issue14.js | 1 - .../test/unit/compress/test/issue16.js | 1 - .../test/unit/compress/test/issue17.js | 4 - .../test/unit/compress/test/issue20.js | 1 - .../test/unit/compress/test/issue21.js | 6 - .../test/unit/compress/test/issue25.js | 7 - .../test/unit/compress/test/issue27.js | 1 - .../test/unit/compress/test/issue278.js | 1 - .../test/unit/compress/test/issue28.js | 3 - .../test/unit/compress/test/issue29.js | 1 - .../test/unit/compress/test/issue30.js | 3 - .../test/unit/compress/test/issue34.js | 3 - .../test/unit/compress/test/issue4.js | 3 - .../test/unit/compress/test/issue48.js | 1 - .../test/unit/compress/test/issue50.js | 9 - .../test/unit/compress/test/issue53.js | 1 - .../test/unit/compress/test/issue54.1.js | 3 - .../test/unit/compress/test/issue68.js | 5 - .../test/unit/compress/test/issue69.js | 1 - .../test/unit/compress/test/issue9.js | 4 - .../test/unit/compress/test/mangle.js | 5 - .../test/unit/compress/test/null_string.js | 1 - .../test/unit/compress/test/strict-equals.js | 3 - .../uglify-js/test/unit/compress/test/var.js | 3 - .../test/unit/compress/test/whitespace.js | 21 - .../uglify-js/test/unit/compress/test/with.js | 2 - .../uglify-js/test/unit/scripts.js | 55 - .../node_modules/uglify-js/tmp/269.js | 13 - .../node_modules/uglify-js/tmp/app.js | 22315 --- .../uglify-js/tmp/embed-tokens.js | 15 - .../node_modules/uglify-js/tmp/goto.js | 26 - .../node_modules/uglify-js/tmp/goto2.js | 8 - .../node_modules/uglify-js/tmp/hoist.js | 33 - .../node_modules/uglify-js/tmp/instrument.js | 97 - .../node_modules/uglify-js/tmp/instrument2.js | 138 - .../node_modules/uglify-js/tmp/liftvars.js | 8 - .../node_modules/uglify-js/tmp/test.js | 30 - .../uglify-js/tmp/uglify-hangs.js | 3930 - .../uglify-js/tmp/uglify-hangs2.js | 166 - .../node_modules/uglify-js/uglify-js.js | 17 - .../node_modules/ws/.npmignore | 6 - .../node_modules/ws/.travis.yml | 6 - .../node_modules/ws/History.md | 312 - .../socket.io-client/node_modules/ws/Makefile | 40 - .../node_modules/ws/README.md | 171 - .../node_modules/ws/bench/parser.benchmark.js | 115 - .../node_modules/ws/bench/sender.benchmark.js | 66 - .../node_modules/ws/bench/speed.js | 105 - .../node_modules/ws/bench/util.js | 105 - .../node_modules/ws/bin/wscat | 190 - .../node_modules/ws/binding.gyp | 16 - .../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 | 27 - .../Release/obj.target/validation.node.d | 1 - .../obj.target/validation/src/validation.o.d | 27 - .../Release/.deps/Release/validation.node.d | 1 - .../ws/build/Release/bufferutil.node | Bin 20297 -> 0 bytes .../node_modules/ws/build/Release/linker.lock | 0 .../build/Release/obj.target/bufferutil.node | Bin 20297 -> 0 bytes .../obj.target/bufferutil/src/bufferutil.o | Bin 19504 -> 0 bytes .../build/Release/obj.target/validation.node | Bin 20230 -> 0 bytes .../obj.target/validation/src/validation.o | Bin 17344 -> 0 bytes .../ws/build/Release/validation.node | Bin 20230 -> 0 bytes .../node_modules/ws/build/binding.Makefile | 6 - .../ws/build/bufferutil.target.mk | 133 - .../node_modules/ws/build/config.gypi | 116 - .../ws/build/validation.target.mk | 133 - .../node_modules/ws/builderror.log | 2 - .../node_modules/ws/doc/ws.md | 181 - .../ws/examples/fileapi/.npmignore | 1 - .../ws/examples/fileapi/package.json | 18 - .../ws/examples/fileapi/public/app.js | 39 - .../ws/examples/fileapi/public/index.html | 22 - .../ws/examples/fileapi/public/uploader.js | 55 - .../ws/examples/fileapi/server.js | 103 - .../serverstats-express_3/package.json | 17 - .../serverstats-express_3/public/index.html | 33 - .../examples/serverstats-express_3/server.js | 21 - .../ws/examples/serverstats/package.json | 17 - .../ws/examples/serverstats/public/index.html | 33 - .../ws/examples/serverstats/server.js | 19 - .../node_modules/ws/examples/ssl.js | 59 - .../socket.io-client/node_modules/ws/index.js | 26 - .../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/Receiver.hixie.js | 180 - .../node_modules/ws/lib/Receiver.js | 591 - .../node_modules/ws/lib/Sender.hixie.js | 123 - .../node_modules/ws/lib/Sender.js | 227 - .../ws/lib/Validation.fallback.js | 12 - .../node_modules/ws/lib/Validation.js | 16 - .../node_modules/ws/lib/WebSocket.js | 818 - .../node_modules/ws/lib/WebSocketServer.js | 460 - .../node_modules/ws/lib/browser.js | 43 - .../ws/node_modules/commander/.npmignore | 4 - .../ws/node_modules/commander/.travis.yml | 4 - .../ws/node_modules/commander/History.md | 107 - .../ws/node_modules/commander/Makefile | 7 - .../ws/node_modules/commander/Readme.md | 262 - .../ws/node_modules/commander/index.js | 2 - .../node_modules/commander/lib/commander.js | 1026 - .../ws/node_modules/commander/package.json | 39 - .../ws/node_modules/nan/.index.js | 1 - .../node_modules/ws/node_modules/nan/LICENSE | 43 - .../ws/node_modules/nan/README.md | 705 - .../node_modules/ws/node_modules/nan/nan.h | 884 - .../ws/node_modules/nan/package.json | 36 - .../ws/node_modules/options/.npmignore | 5 - .../ws/node_modules/options/Makefile | 12 - .../ws/node_modules/options/README.md | 28 - .../ws/node_modules/options/lib/options.js | 86 - .../ws/node_modules/options/package.json | 33 - .../options/test/fixtures/test.conf | 4 - .../node_modules/options/test/options.test.js | 140 - .../ws/node_modules/tinycolor/.npmignore | 5 - .../ws/node_modules/tinycolor/README.md | 3 - .../ws/node_modules/tinycolor/example.js | 3 - .../ws/node_modules/tinycolor/package.json | 28 - .../ws/node_modules/tinycolor/tinycolor.js | 31 - .../node_modules/ws/package.json | 61 - .../node_modules/ws/src/bufferutil.cc | 117 - .../node_modules/ws/src/validation.cc | 145 - .../node_modules/ws/test/BufferPool.test.js | 63 - .../ws/test/Receiver.hixie.test.js | 158 - .../node_modules/ws/test/Receiver.test.js | 255 - .../node_modules/ws/test/Sender.hixie.test.js | 134 - .../node_modules/ws/test/Sender.test.js | 24 - .../node_modules/ws/test/Validation.test.js | 23 - .../ws/test/WebSocket.integration.js | 44 - .../node_modules/ws/test/WebSocket.test.js | 1724 - .../ws/test/WebSocketServer.test.js | 1103 - .../node_modules/ws/test/autobahn-server.js | 29 - .../node_modules/ws/test/autobahn.js | 52 - .../ws/test/fixtures/agent1-cert.pem | 16 - .../ws/test/fixtures/agent1-key.pem | 15 - .../ws/test/fixtures/ca1-cert.pem | 15 - .../node_modules/ws/test/fixtures/ca1-key.pem | 17 - .../ws/test/fixtures/certificate.pem | 13 - .../node_modules/ws/test/fixtures/key.pem | 15 - .../node_modules/ws/test/fixtures/request.pem | 11 - .../node_modules/ws/test/fixtures/textfile | 9 - .../node_modules/ws/test/hybi-common.js | 99 - .../node_modules/ws/test/testserver.js | 180 - .../node_modules/xmlhttprequest/README.md | 53 - .../xmlhttprequest/autotest.watchr | 8 - .../xmlhttprequest/example/demo.js | 16 - .../xmlhttprequest/lib/XMLHttpRequest.js | 548 - .../node_modules/xmlhttprequest/package.json | 39 - .../xmlhttprequest/tests/test-constants.js | 13 - .../xmlhttprequest/tests/test-events.js | 50 - .../xmlhttprequest/tests/test-exceptions.js | 62 - .../xmlhttprequest/tests/test-headers.js | 61 - .../tests/test-request-methods.js | 62 - .../tests/test-request-protocols.js | 34 - .../xmlhttprequest/tests/testdata.txt | 1 - .../socket.io-client/package.json | 67 - .../socket.io-client/test/events.test.js | 120 - .../socket.io-client/test/io.test.js | 31 - .../test/node/builder.common.js | 102 - .../test/node/builder.test.js | 131 - .../socket.io-client/test/parser.test.js | 360 - .../socket.io-client/test/socket.test.js | 422 - .../socket.io-client/test/util.test.js | 156 - .../socket.io-client/test/worker.js | 20 - .../node_modules/socket.io/package.json | 70 - .../tty.js/node_modules/term.js/.npmignore | 12 - .../tty.js/node_modules/term.js/LICENSE | 19 - .../tty.js/node_modules/term.js/Makefile | 12 - .../tty.js/node_modules/term.js/README.md | 75 - .../node_modules/term.js/example/index.html | 66 - .../node_modules/term.js/example/index.js | 124 - .../tty.js/node_modules/term.js/index.js | 1 - .../tty.js/node_modules/term.js/lib/index.js | 51 - .../tty.js/node_modules/term.js/package.json | 42 - .../tty.js/node_modules/term.js/src/term.js | 5726 - tty.js/node_modules/tty.js/package.json | 49 - tty.js/node_modules/tty.js/static/favicon.ico | Bin 1150 -> 0 bytes tty.js/node_modules/tty.js/static/index.html | 27 - tty.js/node_modules/tty.js/static/style.css | 183 - tty.js/node_modules/tty.js/static/tty.js | 923 - tty.js/tty-me.js | 15 - web/auth/__init__.py | 119 - web/db/sql.py | 96 - web/log/__init__.py | 0 web/nginx.conf | 40 - 1266 files changed, 15 insertions(+), 264743 deletions(-) rename nginx.conf => image/etc/nginx/sites-enabled/default (97%) rename supervisord.conf => image/etc/supervisor/conf.d/supervisord.conf (85%) rename gtkrc-2.0 => image/home/ubuntu/.gtkrc-2.0 (100%) rename startup.sh => image/startup.sh (85%) rename {noVNC => image/usr/lib/noVNC}/.gitlastcommit (100%) rename {noVNC => image/usr/lib/noVNC}/.npmignore (100%) rename {noVNC => image/usr/lib/noVNC}/.travis.yml (100%) rename {noVNC => image/usr/lib/noVNC}/CONTRIBUTING.md (100%) rename {noVNC => image/usr/lib/noVNC}/LICENSE.txt (100%) rename {noVNC => image/usr/lib/noVNC}/README.md (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/alt.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/clipboard.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/connect.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/ctrl.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/ctrlaltdel.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/disconnect.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/drag.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/error.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/esc.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/expander.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/fullscreen.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/handle.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/handle_bg.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/icons/Makefile (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/icons/novnc-120x120.png (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/icons/novnc-144x144.png (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/icons/novnc-152x152.png (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/icons/novnc-16x16.png (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/icons/novnc-192x192.png (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/icons/novnc-24x24.png (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/icons/novnc-32x32.png (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/icons/novnc-48x48.png (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/icons/novnc-60x60.png (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/icons/novnc-64x64.png (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/icons/novnc-72x72.png (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/icons/novnc-76x76.png (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/icons/novnc-96x96.png (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/icons/novnc-icon-sm.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/icons/novnc-icon.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/info.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/keyboard.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/mouse_left.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/mouse_middle.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/mouse_none.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/mouse_right.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/power.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/settings.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/tab.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/toggleextrakeys.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/images/warning.svg (100%) rename {noVNC => image/usr/lib/noVNC}/app/locale/de.js (100%) rename {noVNC => image/usr/lib/noVNC}/app/locale/el.js (100%) rename {noVNC => image/usr/lib/noVNC}/app/locale/nl.js (100%) rename {noVNC => image/usr/lib/noVNC}/app/locale/sv.js (100%) rename {noVNC => image/usr/lib/noVNC}/app/sounds/CREDITS (100%) rename {noVNC => image/usr/lib/noVNC}/app/sounds/bell.mp3 (100%) rename {noVNC => image/usr/lib/noVNC}/app/sounds/bell.oga (100%) rename {noVNC => image/usr/lib/noVNC}/app/styles/Orbitron700.ttf (100%) rename {noVNC => image/usr/lib/noVNC}/app/styles/Orbitron700.woff (100%) rename {noVNC => image/usr/lib/noVNC}/app/styles/auto.css (100%) rename {noVNC => image/usr/lib/noVNC}/app/styles/base.css (100%) rename {noVNC => image/usr/lib/noVNC}/app/ui.js (100%) rename {noVNC => image/usr/lib/noVNC}/app/webutil.js (100%) rename {noVNC => image/usr/lib/noVNC}/core/base64.js (100%) rename {noVNC => image/usr/lib/noVNC}/core/des.js (100%) rename {noVNC => image/usr/lib/noVNC}/core/display.js (100%) rename {noVNC => image/usr/lib/noVNC}/core/inflator.js (100%) rename {noVNC => image/usr/lib/noVNC}/core/inflator.mod.js (100%) rename {noVNC => image/usr/lib/noVNC}/core/input/devices.js (100%) rename {noVNC => image/usr/lib/noVNC}/core/input/keysym.js (100%) rename {noVNC => image/usr/lib/noVNC}/core/input/keysymdef.js (100%) rename {noVNC => image/usr/lib/noVNC}/core/input/util.js (100%) rename {noVNC => image/usr/lib/noVNC}/core/input/xtscancodes.js (100%) rename {noVNC => image/usr/lib/noVNC}/core/rfb.js (100%) rename {noVNC => image/usr/lib/noVNC}/core/util.js (100%) rename {noVNC => image/usr/lib/noVNC}/core/websock.js (100%) rename {noVNC => image/usr/lib/noVNC}/docs/LICENSE.Apache-2.0 (100%) rename {noVNC => image/usr/lib/noVNC}/docs/LICENSE.BSD-2-Clause (100%) rename {noVNC => image/usr/lib/noVNC}/docs/LICENSE.BSD-3-Clause (100%) rename {noVNC => image/usr/lib/noVNC}/docs/LICENSE.GPL-3 (100%) rename {noVNC => image/usr/lib/noVNC}/docs/LICENSE.LGPL-3 (100%) rename {noVNC => image/usr/lib/noVNC}/docs/LICENSE.MPL-2.0 (100%) rename {noVNC => image/usr/lib/noVNC}/docs/LICENSE.OFL-1.1 (100%) rename {noVNC => image/usr/lib/noVNC}/docs/LICENSE.pako (100%) rename {noVNC => image/usr/lib/noVNC}/docs/LICENSE.zlib (100%) rename {noVNC => image/usr/lib/noVNC}/docs/VERSION (100%) rename {noVNC => image/usr/lib/noVNC}/docs/flash_policy.txt (100%) rename {noVNC => image/usr/lib/noVNC}/docs/links (100%) rename {noVNC => image/usr/lib/noVNC}/docs/notes (100%) rename {noVNC => image/usr/lib/noVNC}/docs/release.txt (100%) rename {noVNC => image/usr/lib/noVNC}/docs/rfb_notes (100%) rename {noVNC => image/usr/lib/noVNC}/docs/rfbproto-3.3.pdf (100%) rename {noVNC => image/usr/lib/noVNC}/docs/rfbproto-3.7.pdf (100%) rename {noVNC => image/usr/lib/noVNC}/docs/rfbproto-3.8.pdf (100%) rename {noVNC => image/usr/lib/noVNC}/karma.conf.js (100%) rename {noVNC => image/usr/lib/noVNC}/package.json (100%) rename {noVNC => image/usr/lib/noVNC}/po/Makefile (100%) rename {noVNC => image/usr/lib/noVNC}/po/de.po (100%) rename {noVNC => image/usr/lib/noVNC}/po/el.po (100%) rename {noVNC => image/usr/lib/noVNC}/po/nl.po (100%) rename {noVNC => image/usr/lib/noVNC}/po/noVNC.pot (100%) rename {noVNC => image/usr/lib/noVNC}/po/po2js (100%) rename {noVNC => image/usr/lib/noVNC}/po/sv.po (100%) rename {noVNC => image/usr/lib/noVNC}/po/xgettext-html (100%) rename {noVNC => image/usr/lib/noVNC}/tests/assertions.js (100%) rename {noVNC => image/usr/lib/noVNC}/tests/fake.websocket.js (100%) rename {noVNC => image/usr/lib/noVNC}/tests/input.html (100%) rename {noVNC => image/usr/lib/noVNC}/tests/playback.js (100%) rename {noVNC => image/usr/lib/noVNC}/tests/run_from_console.casper.js (100%) rename {noVNC => image/usr/lib/noVNC}/tests/run_from_console.js (100%) rename {noVNC => image/usr/lib/noVNC}/tests/run_from_console.zombie.js (100%) rename {noVNC => image/usr/lib/noVNC}/tests/test.base64.js (100%) rename {noVNC => image/usr/lib/noVNC}/tests/test.display.js (100%) rename {noVNC => image/usr/lib/noVNC}/tests/test.helper.js (100%) rename {noVNC => image/usr/lib/noVNC}/tests/test.keyboard.js (100%) rename {noVNC => image/usr/lib/noVNC}/tests/test.rfb.js (100%) rename {noVNC => image/usr/lib/noVNC}/tests/test.util.js (100%) rename {noVNC => image/usr/lib/noVNC}/tests/test.websock.js (100%) rename {noVNC => image/usr/lib/noVNC}/tests/vnc_perf.html (100%) rename {noVNC => image/usr/lib/noVNC}/tests/vnc_playback.html (100%) rename {noVNC => image/usr/lib/noVNC}/utils/README.md (100%) rename {noVNC => image/usr/lib/noVNC}/utils/b64-to-binary.pl (100%) rename {noVNC => image/usr/lib/noVNC}/utils/img2js.py (100%) rename {noVNC => image/usr/lib/noVNC}/utils/json2graph.py (100%) rename {noVNC => image/usr/lib/noVNC}/utils/launch.sh (98%) rename {noVNC => image/usr/lib/noVNC}/utils/make-module-transform.js (100%) rename {noVNC => image/usr/lib/noVNC}/utils/parse.js (100%) rename {noVNC => image/usr/lib/noVNC}/utils/u2x11 (100%) rename {noVNC => image/usr/lib/noVNC}/utils/use_require.js (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/.travis.yml (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/CHANGES.txt (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/LICENSE.txt (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/MANIFEST.in (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/Makefile (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/README.md (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/Windows/Windows Service Readme.txt (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/Windows/noVNC Websocket Service Project/Program.cs (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.Designer.cs (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.cs (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.resx (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/Windows/noVNC Websocket Service Project/Properties/AssemblyInfo.cs (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/Windows/noVNC Websocket Service Project/Service1.Designer.cs (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/Windows/noVNC Websocket Service Project/Service1.cs (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/Windows/noVNC Websocket Service Project/noVNC Websocket.csproj (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/Windows/noVNC Websocket Service Project/noVNC Websocket.sln (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/docs/LICENSE.GPL-3 (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/docs/LICENSE.LGPL-3 (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/docs/LICENSE.MPL-2.0 (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/docs/TODO (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/docs/flash_policy.txt (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/docs/latency_results.txt (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/docs/notes (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/docs/release.txt (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/docs/websockify.1 (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/include/VT100.js (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/include/keysym.js (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/include/util.js (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/include/websock.js (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/include/webutil.js (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/include/wsirc.js (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/include/wstelnet.js (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/other/Makefile (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/other/README.md (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/other/js/README.md (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/other/js/package.json (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/other/js/websockify.js (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/other/launch.sh (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/other/project.clj (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/other/websocket.c (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/other/websocket.h (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/other/websocket.rb (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/other/websockify.c (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/other/websockify.clj (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/other/websockify.rb (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/other/wswrap (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/rebind (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/rebind.c (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/run (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/setup.py (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/test-requirements.txt (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/tests/echo.html (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/tests/echo.py (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/tests/echo.rb (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/tests/echo_client.py (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/tests/include (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/tests/latency.html (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/tests/latency.py (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/tests/load.html (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/tests/load.py (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/tests/plain_echo.html (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/tests/simple.html (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/tests/test_auth_plugins.py (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/tests/test_websocket.py (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/tests/test_websocketproxy.py (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/tests/test_websockifyserver.py (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/tox.ini (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/websockify.py (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/websockify/__init__.py (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/websockify/auth_plugins.py (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/websockify/token_plugins.py (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/websockify/websocket.py (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/websockify/websocketproxy.py (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/websockify/websocketserver.py (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/websockify/websockifyserver.py (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/wsirc.html (100%) rename {noVNC => image/usr/lib/noVNC}/utils/websockify/wstelnet.html (100%) rename {noVNC => image/usr/lib/noVNC}/vnc.html (100%) rename {noVNC => image/usr/lib/noVNC}/vnc_auto.html (100%) rename {web => image/usr/lib/web}/config/__init__.py (100%) rename {web => image/usr/lib/web}/lightop/__init__.py (98%) rename {web/db => image/usr/lib/web/log}/__init__.py (100%) rename {web => image/usr/lib/web}/log/config.py (100%) rename {web => image/usr/lib/web}/requirements.txt (100%) rename {web => image/usr/lib/web}/run.py (80%) rename {web => image/usr/lib/web}/static/6df2b309.favicon.ico (100%) rename {web => image/usr/lib/web}/static/fonts/glyphicons-halflings-regular.eot (100%) rename {web => image/usr/lib/web}/static/fonts/glyphicons-halflings-regular.svg (100%) rename {web => image/usr/lib/web}/static/fonts/glyphicons-halflings-regular.ttf (100%) rename {web => image/usr/lib/web}/static/fonts/glyphicons-halflings-regular.woff (100%) rename {web => image/usr/lib/web}/static/index.html (100%) rename {web => image/usr/lib/web}/static/robots.txt (100%) rename {web => image/usr/lib/web}/static/scripts/046bbd30.main.js (100%) rename {web => image/usr/lib/web}/static/scripts/2c80432f.plugins.js (100%) rename {web => image/usr/lib/web}/static/scripts/9cd97fdd.vendor.js (100%) rename {web => image/usr/lib/web}/static/styles/536b3e9f.main.css (100%) rename {web => image/usr/lib/web}/static/styles/57fdc80f.vendor.css (100%) rename {doro-lxde-wallpapers => image/usr/share/doro-lxde-wallpapers}/bg1.jpg (100%) rename {doro-lxde-wallpapers => image/usr/share/doro-lxde-wallpapers}/bg2.jpg (100%) rename {doro-lxde-wallpapers => image/usr/share/doro-lxde-wallpapers}/bg3.jpg (100%) rename {doro-lxde-wallpapers => image/usr/share/doro-lxde-wallpapers}/bg4.jpg (100%) rename {doro-lxde-wallpapers => image/usr/share/doro-lxde-wallpapers}/desktop-items-0.conf (100%) delete mode 100644 repositories delete mode 120000 tty.js/node_modules/.bin/tty.js delete mode 100644 tty.js/node_modules/tty.js/.npmignore delete mode 100644 tty.js/node_modules/tty.js/LICENSE delete mode 100644 tty.js/node_modules/tty.js/README.md delete mode 100755 tty.js/node_modules/tty.js/bin/tty.js delete mode 100644 tty.js/node_modules/tty.js/index.js delete mode 100644 tty.js/node_modules/tty.js/lib/config.js delete mode 100644 tty.js/node_modules/tty.js/lib/logger.js delete mode 100644 tty.js/node_modules/tty.js/lib/tty.js delete mode 100644 tty.js/node_modules/tty.js/man/tty.js.1 delete mode 120000 tty.js/node_modules/tty.js/node_modules/.bin/express delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/.travis.yml delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/History.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/LICENSE delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/Readme.md delete mode 100755 tty.js/node_modules/tty.js/node_modules/express/bin/express delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/client.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/lib/application.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/lib/express.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/lib/middleware.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/lib/request.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/lib/response.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/lib/router/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/lib/router/route.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/lib/utils.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/lib/view.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/.travis.yml delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/README.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/tests/crc.test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/.travis.yml delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/History.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/Readme.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/lib/commander.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/.travis.yml delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/LICENSE delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/Readme.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/cache.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/connect.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/basicAuth.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/bodyParser.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/compress.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/cookieParser.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/cookieSession.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/csrf.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/directory.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/errorHandler.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/favicon.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/json.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/limit.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/logger.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/methodOverride.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/multipart.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/query.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/responseTime.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/session.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/session/cookie.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/session/memory.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/session/session.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/session/store.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/static.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/staticCache.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/timeout.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/urlencoded.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/vhost.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/patch.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/proto.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/directory.html delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/error.html delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/favicon.ico delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_add.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_attach.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_code.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_copy.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_delete.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_edit.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_error.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_excel.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_find.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_gear.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_go.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_green.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_key.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_lightning.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_link.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_paintbrush.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_paste.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_red.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_refresh.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_save.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_acrobat.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_actionscript.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_add.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_c.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_camera.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_cd.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_code.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_code_red.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_coldfusion.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_compressed.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_copy.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_cplusplus.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_csharp.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_cup.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_database.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_delete.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_dvd.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_edit.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_error.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_excel.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_find.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_flash.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_freehand.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_gear.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_get.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_go.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_h.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_horizontal.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_key.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_lightning.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_link.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_magnify.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_medal.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_office.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_paint.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_paintbrush.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_paste.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_php.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_picture.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_powerpoint.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_put.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_ruby.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_stack.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_star.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_swoosh.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_text.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_text_width.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_tux.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_vector.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_visualstudio.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_width.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_word.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_world.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_wrench.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_zip.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_word.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_world.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/style.css delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/utils.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/cache.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/connect.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/basicAuth.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/compress.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/cookieParser.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/cookieSession.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/csrf.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/directory.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/errorHandler.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/favicon.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/json.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/limit.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/logger.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/methodOverride.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/multipart.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/query.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/responseTime.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/session.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/session/cookie.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/session/memory.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/session/session.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/session/store.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/static.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/staticCache.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/timeout.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/urlencoded.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/vhost.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/patch.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/proto.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/directory.html delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/error.html delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/favicon.ico delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_add.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_attach.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_code.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_copy.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_delete.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_edit.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_error.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_excel.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_find.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_gear.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_go.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_green.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_key.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_lightning.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_link.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_paintbrush.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_paste.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_red.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_refresh.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_save.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_acrobat.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_actionscript.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_add.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_c.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_camera.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_cd.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_code.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_code_red.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_coldfusion.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_compressed.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_copy.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_cplusplus.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_csharp.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_cup.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_database.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_delete.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_dvd.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_edit.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_error.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_excel.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_find.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_flash.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_freehand.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_gear.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_get.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_go.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_h.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_horizontal.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_key.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_lightning.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_link.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_magnify.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_medal.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_office.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_paint.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_paintbrush.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_paste.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_php.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_picture.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_powerpoint.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_put.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_ruby.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_stack.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_star.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_swoosh.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_text.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_text_width.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_tux.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_vector.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_visualstudio.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_width.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_word.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_world.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_wrench.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_zip.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_word.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_world.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/style.css delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/utils.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/History.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/Readme.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/component.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/.travis.yml delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/Readme.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/TODO delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/benchmark/bench-multipart-parser.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/example/post.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/example/upload.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/file.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/multipart_parser.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/querystring_parser.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/util.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/Readme.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/example/dog.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/example/event_emitter.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/lib/gently/gently.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/lib/gently/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/test/common.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/test/simple/test-gently.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/common.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/funkyfilename.txt delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/plain.txt delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/no-filename.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/special-chars-in-filename.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/multipart.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/integration/test-fixtures.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/common.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/integration/test-multipart-parser.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-file.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-multipart-parser.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-querystring-parser.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js delete mode 100755 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/run.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/tool/record.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/History.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/Readme.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/.travis.yml delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/History.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/Readme.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/benchmark.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/component.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/examples.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/lib/head.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/lib/querystring.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/lib/tail.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/querystring.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/test/browser/expect.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/test/browser/index.html delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/test/browser/jquery.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/test/browser/mocha.css delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/test/browser/mocha.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/test/browser/qs.css delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/test/browser/qs.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/test/parse.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/test/stringify.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/cookie-signature/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/cookie-signature/History.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/cookie-signature/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/cookie-signature/Readme.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/cookie-signature/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/cookie-signature/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/cookie/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/cookie/.travis.yml delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/cookie/README.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/cookie/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/cookie/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/cookie/test/mocha.opts delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/cookie/test/parse.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/cookie/test/serialize.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/debug/Readme.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/debug/debug.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/debug/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/debug/lib/debug.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/debug/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/fresh/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/fresh/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/fresh/Readme.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/fresh/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/fresh/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/methods/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/methods/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/.travis.yml delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/LICENSE delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/README.markdown delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/examples/pow.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/examples/pow.js.orig delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/examples/pow.js.rej delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/test/chmod.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/test/clobber.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/test/mkdirp.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/test/perm.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/test/perm_sync.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/test/race.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/test/rel.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/test/return.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/test/return_sync.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/test/root.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/test/sync.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/test/umask.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/mkdirp/test/umask_sync.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/range-parser/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/range-parser/History.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/range-parser/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/range-parser/Readme.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/range-parser/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/range-parser/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/send/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/send/History.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/send/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/send/Readme.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/send/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/send/lib/send.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/send/lib/utils.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/send/node_modules/mime/LICENSE delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/send/node_modules/mime/README.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/send/node_modules/mime/mime.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/send/node_modules/mime/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/send/node_modules/mime/test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/send/node_modules/mime/types/mime.types delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/send/node_modules/mime/types/node.types delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/node_modules/send/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/express/test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/LICENSE delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/README.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/binding.gyp delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/build/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/build/Release/.deps/Release/obj.target/pty.node.d delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/build/Release/.deps/Release/obj.target/pty/src/unix/pty.o.d delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/build/Release/.deps/Release/pty.node.d delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/build/Release/linker.lock delete mode 100755 tty.js/node_modules/tty.js/node_modules/pty.js/build/Release/obj.target/pty.node delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/build/Release/obj.target/pty/src/unix/pty.o delete mode 100755 tty.js/node_modules/tty.js/node_modules/pty.js/build/Release/pty.node delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/build/binding.Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/build/config.gypi delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/build/pty.target.mk delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/LICENSE delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/Notes.txt delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/README.rst delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/Agent.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/Agent.h delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/AgentAssert.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/AgentAssert.h delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/ConsoleInput.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/ConsoleInput.h delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/Coord.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/Coord.h delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/DsrSender.h delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/EventLoop.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/EventLoop.h delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/NamedPipe.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/NamedPipe.h delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/SmallRect.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/SmallRect.h delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/Terminal.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/Terminal.h delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/Win32Console.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/Win32Console.h delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/agent/main.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/config.mk delete mode 100755 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/configure delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/include/winpty.h delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/libwinpty/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/libwinpty/winpty.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/misc/DebugClient.py delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/misc/DebugServer.py delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/misc/FormatChar.h delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/misc/SelectAllTest.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/misc/ShowArgv.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/misc/ShowConsoleInput.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/misc/Spew.py delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/misc/UnixEcho.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/misc/VkEscapeTest.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/misc/Win32Echo1.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/misc/Win32Echo2.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/misc/Win32Test1.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/misc/Win32Test2.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/misc/Win32Test3.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/misc/Win32Write1.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/misc/build_win32.sh delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/shared/AgentMsg.h delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/shared/Buffer.h delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/shared/DebugClient.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/shared/DebugClient.h delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/shared/c99_snprintf.h delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/unix-adapter/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/unix-adapter/Shared.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/unix-adapter/main.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/deps/winpty/winpty.gyp delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/lib/pty.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/lib/pty_win.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/src/unix/pty.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/src/win/pty.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/pty.js/wscript delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/.travis.yml delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/History.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/LICENSE delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/Readme.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/benchmarks/decode.bench.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/benchmarks/encode.bench.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/benchmarks/runner.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/logger.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/manager.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/namespace.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/parser.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/socket.io.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/socket.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/static.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/store.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/stores/memory.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/stores/redis.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/transport.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/flashsocket.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/htmlfile.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/http-polling.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/http.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/jsonp-polling.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket/default.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket/hybi-07-12.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket/hybi-16.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/xhr-polling.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/lib/util.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/base64id/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/base64id/README.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/base64id/lib/base64id.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/base64id/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/LICENSE delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/README.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/doc/index.html delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/examples/basic.fallback.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/examples/basic.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/lib/server.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/tests/ssl/ssl.crt delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/tests/ssl/ssl.private.key delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/tests/unit.test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/README.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/buffer_bench.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/hiredis_parser.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/re_sub_test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/reconnect_test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/codec.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/pub.js delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/run delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/server.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/pub.js delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/run delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/server.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/speed/00 delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/speed/plot delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/speed/size-rate.png delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/speed/speed.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/sub_quit_test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/changelog.md delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/diff_multi_bench_output.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/auth.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/backpressure_drain.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/eval.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/extend.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/file.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/mget.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/monitor.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/multi.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/multi2.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/psubscribe.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/pub_sub.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/simple.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/sort.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/subqueries.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/subquery.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/unix_socket.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/web_server.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/generate_commands.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/commands.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/parser/hiredis.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/parser/javascript.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/queue.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/to_array.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/util.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/mem.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/multi_bench.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/History.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/README.md delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/bin/builder.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/dist/WebSocketMain.swf delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/dist/WebSocketMainInsecure.swf delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.min.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/events.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/io.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/json.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/namespace.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/parser.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/socket.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/transport.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/transports/flashsocket.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/transports/htmlfile.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/transports/jsonp-polling.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/transports/websocket.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/transports/xhr-polling.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/transports/xhr.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/util.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/README.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/WebSocketMain.swf delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/WebSocketMainInsecure.zip delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/IWebSocketLogger.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/WebSocket.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/WebSocketEvent.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/WebSocketMain.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/WebSocketMainInsecure.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/build.sh delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/adobe/net/proxies/RFC2817Socket.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/gsolo/encryption/MD5.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/Crypto.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/cert/MozillaRootCertificates.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/cert/X509Certificate.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/cert/X509CertificateCollection.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/HMAC.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/IHMAC.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/IHash.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/MAC.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/MD2.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/MD5.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/SHA1.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/SHA224.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/SHA256.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/hash/SHABase.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/prng/ARC4.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/prng/IPRNG.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/prng/Random.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/prng/TLSPRF.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/rsa/RSAKey.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/AESKey.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/BlowFishKey.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/CBCMode.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/CFB8Mode.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/CFBMode.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/CTRMode.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/DESKey.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/ECBMode.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/ICipher.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/IMode.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/IPad.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/IStreamCipher.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/ISymmetricKey.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/IVMode.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/NullPad.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/OFBMode.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/PKCS5.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/SSLPad.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/SimpleIVMode.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/TLSPad.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/TripleDESKey.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/XTeaKey.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/aeskey.pl delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/symmetric/dump.txt delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/AESKeyTest.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/ARC4Test.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/BigIntegerTest.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/BlowFishKeyTest.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/CBCModeTest.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/CFB8ModeTest.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/CFBModeTest.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/CTRModeTest.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/DESKeyTest.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/ECBModeTest.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/HMACTest.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/ITestHarness.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/MD2Test.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/MD5Test.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/OFBModeTest.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/RSAKeyTest.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/SHA1Test.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/SHA224Test.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/SHA256Test.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/TLSPRFTest.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/TestCase.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/TripleDESKeyTest.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/XTeaKeyTest.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/BulkCiphers.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/CipherSuites.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/IConnectionState.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/ISecurityParameters.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/KeyExchanges.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/MACs.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/SSLConnectionState.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/SSLEvent.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/SSLSecurityParameters.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/TLSConfig.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/TLSConnectionState.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/TLSEngine.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/TLSError.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/TLSEvent.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/TLSSecurityParameters.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/TLSSocket.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/TLSSocketEvent.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tls/TLSTest.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/math/BarrettReduction.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/math/BigInteger.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/math/ClassicReduction.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/math/IReduction.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/math/MontgomeryReduction.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/math/NullReduction.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/math/bi_internal.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/ArrayUtil.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/Base64.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/Hex.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/Memory.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/ByteString.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/DER.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/IAsn1Type.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/Integer.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/OID.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/ObjectIdentifier.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/PEM.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/PrintableString.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/Sequence.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/Set.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/Type.as delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/der/UTCTime.as delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/sample.html delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/swfobject.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/web_socket.js delete mode 120000 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/.bin/uglifyjs delete mode 120000 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/.bin/wscat delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/Readme.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/LICENSE delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/README delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/Tokenizer.js delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/ZeParser.js delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/benchmark.html delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/package.json delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/test-parser.html delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/test-tokenizer.html delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/tests.js delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/unicodecategories.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/README.html delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/README.org delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/bin/uglifyjs delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/docstyle.css delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/lib/object-ast.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/lib/parse-js.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/lib/process.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/lib/squeeze-more.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/package.json~ delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/beautify.js delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/testparser.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/array1.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/array2.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/array3.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/array4.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/assignment.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/concatstring.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/const.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/empty-blocks.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/forstatement.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/if.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/ifreturn.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/ifreturn2.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue10.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue11.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue13.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue14.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue16.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue17.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue20.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue21.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue25.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue27.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue278.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue28.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue29.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue30.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue34.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue4.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue48.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue50.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue53.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue54.1.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue68.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue69.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue9.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/mangle.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/null_string.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/strict-equals.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/var.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/whitespace.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/with.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/array1.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/array2.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/array3.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/array4.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/assignment.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/concatstring.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/const.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/empty-blocks.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/forstatement.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/if.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/ifreturn.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/ifreturn2.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue10.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue11.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue13.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue14.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue16.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue17.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue20.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue21.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue25.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue27.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue278.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue28.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue29.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue30.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue34.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue4.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue48.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue50.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue53.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue54.1.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue68.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue69.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue9.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/mangle.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/null_string.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/strict-equals.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/var.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/whitespace.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/with.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/scripts.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/269.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/app.js delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/embed-tokens.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/goto.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/goto2.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/hoist.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/instrument.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/instrument2.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/liftvars.js delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/uglify-hangs.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/uglify-hangs2.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/uglify-js.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/.travis.yml delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/History.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/README.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/parser.benchmark.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/sender.benchmark.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/speed.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/util.js delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bin/wscat delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/binding.gyp delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/bufferutil.node.d delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/obj.target/bufferutil.node.d delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/obj.target/validation.node.d delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/obj.target/validation/src/validation.o.d delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/validation.node.d delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/bufferutil.node delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/linker.lock delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/obj.target/bufferutil.node delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/obj.target/bufferutil/src/bufferutil.o delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/obj.target/validation.node delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/obj.target/validation/src/validation.o delete mode 100755 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/validation.node delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/binding.Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/bufferutil.target.mk delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/config.gypi delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/validation.target.mk delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/builderror.log delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/doc/ws.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/app.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/index.html delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/uploader.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/server.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/public/index.html delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/server.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/public/index.html delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/server.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/ssl.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/BufferPool.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/BufferUtil.fallback.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/BufferUtil.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/ErrorCodes.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Receiver.hixie.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Receiver.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Sender.hixie.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Sender.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Validation.fallback.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Validation.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/WebSocket.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/WebSocketServer.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/browser.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/.travis.yml delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/History.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/Readme.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/lib/commander.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/.index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/LICENSE delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/README.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/nan.h delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/README.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/lib/options.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/test/fixtures/test.conf delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/test/options.test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/README.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/example.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/tinycolor.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/src/bufferutil.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/src/validation.cc delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/BufferPool.test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Receiver.hixie.test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Receiver.test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Sender.hixie.test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Sender.test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Validation.test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocket.integration.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocket.test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocketServer.test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/autobahn-server.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/autobahn.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/agent1-cert.pem delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/agent1-key.pem delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/ca1-cert.pem delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/ca1-key.pem delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/certificate.pem delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/key.pem delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/request.pem delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/textfile delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/hybi-common.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/testserver.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/README.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/autotest.watchr delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/example/demo.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/lib/XMLHttpRequest.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-constants.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-events.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-exceptions.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-headers.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-request-methods.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-request-protocols.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/testdata.txt delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/events.test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/io.test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/node/builder.common.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/node/builder.test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/parser.test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/socket.test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/util.test.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/worker.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/socket.io/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/term.js/.npmignore delete mode 100644 tty.js/node_modules/tty.js/node_modules/term.js/LICENSE delete mode 100644 tty.js/node_modules/tty.js/node_modules/term.js/Makefile delete mode 100644 tty.js/node_modules/tty.js/node_modules/term.js/README.md delete mode 100644 tty.js/node_modules/tty.js/node_modules/term.js/example/index.html delete mode 100644 tty.js/node_modules/tty.js/node_modules/term.js/example/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/term.js/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/term.js/lib/index.js delete mode 100644 tty.js/node_modules/tty.js/node_modules/term.js/package.json delete mode 100644 tty.js/node_modules/tty.js/node_modules/term.js/src/term.js delete mode 100644 tty.js/node_modules/tty.js/package.json delete mode 100644 tty.js/node_modules/tty.js/static/favicon.ico delete mode 100644 tty.js/node_modules/tty.js/static/index.html delete mode 100644 tty.js/node_modules/tty.js/static/style.css delete mode 100644 tty.js/node_modules/tty.js/static/tty.js delete mode 100644 tty.js/tty-me.js delete mode 100644 web/auth/__init__.py delete mode 100644 web/db/sql.py delete mode 100644 web/log/__init__.py delete mode 100644 web/nginx.conf diff --git a/Dockerfile b/Dockerfile index b6329f5e..dca63956 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,8 @@ MAINTAINER Doro Wu ENV DEBIAN_FRONTEND noninteractive ENV HOME /home/ubuntu +RUN sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list + # built-in packages RUN apt-get update \ && apt-get install -y --force-yes --no-install-recommends software-properties-common curl \ @@ -28,21 +30,15 @@ RUN apt-get update \ && apt-get autoremove \ && rm -rf /var/lib/apt/lists/* -ADD web /web/ -RUN pip install setuptools wheel && pip install -r /web/requirements.txt # tini for subreap ENV TINI_VERSION v0.9.0 ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /bin/tini RUN chmod +x /bin/tini -ADD noVNC /noVNC/ -ADD nginx.conf /etc/nginx/sites-enabled/default -ADD startup.sh / -ADD supervisord.conf /etc/supervisor/conf.d/ -ADD doro-lxde-wallpapers /usr/share/doro-lxde-wallpapers/ -ADD gtkrc-2.0 /home/ubuntu/.gtkrc-2.0 +ADD image / +RUN pip install setuptools wheel && pip install -r /usr/lib/web/requirements.txt -EXPOSE 6080 +EXPOSE 80 WORKDIR /root ENTRYPOINT ["/startup.sh"] diff --git a/README.md b/README.md index ab72a471..7990c689 100644 --- a/README.md +++ b/README.md @@ -17,10 +17,10 @@ docker build --rm -t dorowu/ubuntu-desktop-lxde-vnc docker-ubuntu-vnc-desktop Run ``` -docker run -i -t -p 6080:6080 dorowu/ubuntu-desktop-lxde-vnc +docker run -it --rm -p 6080:80 dorowu/ubuntu-desktop-lxde-vnc ``` -Browse http://127.0.0.1:6080/vnc.html +Browse http://127.0.0.1:6080/ @@ -34,4 +34,4 @@ Troubleshooting License ================== -desktop-mirror is under the Apache 2.0 license. See the LICENSE file for details. +See the LICENSE file for details. diff --git a/nginx.conf b/image/etc/nginx/sites-enabled/default similarity index 97% rename from nginx.conf rename to image/etc/nginx/sites-enabled/default index f596cdfc..e9dd4d5a 100644 --- a/nginx.conf +++ b/image/etc/nginx/sites-enabled/default @@ -1,5 +1,5 @@ server { - listen 6080 default_server; + listen 80 default_server; #listen [::]:6080 default_server ipv6only=on; root /usr/share/nginx/html; diff --git a/supervisord.conf b/image/etc/supervisor/conf.d/supervisord.conf similarity index 85% rename from supervisord.conf rename to image/etc/supervisor/conf.d/supervisord.conf index 8f8a51b1..168cafa1 100644 --- a/supervisord.conf +++ b/image/etc/supervisor/conf.d/supervisord.conf @@ -24,7 +24,7 @@ redirect_stderr=true [program:x11vnc] priority=20 directory=/ -command=x11vnc -display :1 -xkb -forever +command=x11vnc -display :1 -xkb -forever -shared user=root autostart=true autorestart=true @@ -34,8 +34,8 @@ redirect_stderr=true [program:novnc] priority=25 -directory=/noVNC -command=/noVNC/utils/launch.sh --listen 6081 +directory=/usr/lib/noVNC/ +command=/usr/lib/noVNC/utils/launch.sh --listen 6081 user=root autostart=true autorestart=true diff --git a/gtkrc-2.0 b/image/home/ubuntu/.gtkrc-2.0 similarity index 100% rename from gtkrc-2.0 rename to image/home/ubuntu/.gtkrc-2.0 diff --git a/startup.sh b/image/startup.sh similarity index 85% rename from startup.sh rename to image/startup.sh index 2fc9dbd2..9ba357e5 100755 --- a/startup.sh +++ b/image/startup.sh @@ -8,9 +8,10 @@ PASS=ubuntu # echo "Username: ubuntu Password: $PASS" id -u ubuntu &>/dev/null || useradd --create-home --shell /bin/bash --user-group --groups adm,sudo ubuntu echo "ubuntu:$PASS" | chpasswd +chown -R ubuntu:ubuntu /home/ubuntu sudo -u ubuntu -i bash -c "mkdir -p /home/ubuntu/.config/pcmanfm/LXDE/ \ && cp /usr/share/doro-lxde-wallpapers/desktop-items-0.conf /home/ubuntu/.config/pcmanfm/LXDE/" -cd /web && ./run.py > /var/log/web.log 2>&1 & +cd /usr/lib/web && ./run.py > /var/log/web.log 2>&1 & nginx -c /etc/nginx/nginx.conf exec /bin/tini -- /usr/bin/supervisord -n diff --git a/noVNC/.gitlastcommit b/image/usr/lib/noVNC/.gitlastcommit similarity index 100% rename from noVNC/.gitlastcommit rename to image/usr/lib/noVNC/.gitlastcommit diff --git a/noVNC/.npmignore b/image/usr/lib/noVNC/.npmignore similarity index 100% rename from noVNC/.npmignore rename to image/usr/lib/noVNC/.npmignore diff --git a/noVNC/.travis.yml b/image/usr/lib/noVNC/.travis.yml similarity index 100% rename from noVNC/.travis.yml rename to image/usr/lib/noVNC/.travis.yml diff --git a/noVNC/CONTRIBUTING.md b/image/usr/lib/noVNC/CONTRIBUTING.md similarity index 100% rename from noVNC/CONTRIBUTING.md rename to image/usr/lib/noVNC/CONTRIBUTING.md diff --git a/noVNC/LICENSE.txt b/image/usr/lib/noVNC/LICENSE.txt similarity index 100% rename from noVNC/LICENSE.txt rename to image/usr/lib/noVNC/LICENSE.txt diff --git a/noVNC/README.md b/image/usr/lib/noVNC/README.md similarity index 100% rename from noVNC/README.md rename to image/usr/lib/noVNC/README.md diff --git a/noVNC/app/images/alt.svg b/image/usr/lib/noVNC/app/images/alt.svg similarity index 100% rename from noVNC/app/images/alt.svg rename to image/usr/lib/noVNC/app/images/alt.svg diff --git a/noVNC/app/images/clipboard.svg b/image/usr/lib/noVNC/app/images/clipboard.svg similarity index 100% rename from noVNC/app/images/clipboard.svg rename to image/usr/lib/noVNC/app/images/clipboard.svg diff --git a/noVNC/app/images/connect.svg b/image/usr/lib/noVNC/app/images/connect.svg similarity index 100% rename from noVNC/app/images/connect.svg rename to image/usr/lib/noVNC/app/images/connect.svg diff --git a/noVNC/app/images/ctrl.svg b/image/usr/lib/noVNC/app/images/ctrl.svg similarity index 100% rename from noVNC/app/images/ctrl.svg rename to image/usr/lib/noVNC/app/images/ctrl.svg diff --git a/noVNC/app/images/ctrlaltdel.svg b/image/usr/lib/noVNC/app/images/ctrlaltdel.svg similarity index 100% rename from noVNC/app/images/ctrlaltdel.svg rename to image/usr/lib/noVNC/app/images/ctrlaltdel.svg diff --git a/noVNC/app/images/disconnect.svg b/image/usr/lib/noVNC/app/images/disconnect.svg similarity index 100% rename from noVNC/app/images/disconnect.svg rename to image/usr/lib/noVNC/app/images/disconnect.svg diff --git a/noVNC/app/images/drag.svg b/image/usr/lib/noVNC/app/images/drag.svg similarity index 100% rename from noVNC/app/images/drag.svg rename to image/usr/lib/noVNC/app/images/drag.svg diff --git a/noVNC/app/images/error.svg b/image/usr/lib/noVNC/app/images/error.svg similarity index 100% rename from noVNC/app/images/error.svg rename to image/usr/lib/noVNC/app/images/error.svg diff --git a/noVNC/app/images/esc.svg b/image/usr/lib/noVNC/app/images/esc.svg similarity index 100% rename from noVNC/app/images/esc.svg rename to image/usr/lib/noVNC/app/images/esc.svg diff --git a/noVNC/app/images/expander.svg b/image/usr/lib/noVNC/app/images/expander.svg similarity index 100% rename from noVNC/app/images/expander.svg rename to image/usr/lib/noVNC/app/images/expander.svg diff --git a/noVNC/app/images/fullscreen.svg b/image/usr/lib/noVNC/app/images/fullscreen.svg similarity index 100% rename from noVNC/app/images/fullscreen.svg rename to image/usr/lib/noVNC/app/images/fullscreen.svg diff --git a/noVNC/app/images/handle.svg b/image/usr/lib/noVNC/app/images/handle.svg similarity index 100% rename from noVNC/app/images/handle.svg rename to image/usr/lib/noVNC/app/images/handle.svg diff --git a/noVNC/app/images/handle_bg.svg b/image/usr/lib/noVNC/app/images/handle_bg.svg similarity index 100% rename from noVNC/app/images/handle_bg.svg rename to image/usr/lib/noVNC/app/images/handle_bg.svg diff --git a/noVNC/app/images/icons/Makefile b/image/usr/lib/noVNC/app/images/icons/Makefile similarity index 100% rename from noVNC/app/images/icons/Makefile rename to image/usr/lib/noVNC/app/images/icons/Makefile diff --git a/noVNC/app/images/icons/novnc-120x120.png b/image/usr/lib/noVNC/app/images/icons/novnc-120x120.png similarity index 100% rename from noVNC/app/images/icons/novnc-120x120.png rename to image/usr/lib/noVNC/app/images/icons/novnc-120x120.png diff --git a/noVNC/app/images/icons/novnc-144x144.png b/image/usr/lib/noVNC/app/images/icons/novnc-144x144.png similarity index 100% rename from noVNC/app/images/icons/novnc-144x144.png rename to image/usr/lib/noVNC/app/images/icons/novnc-144x144.png diff --git a/noVNC/app/images/icons/novnc-152x152.png b/image/usr/lib/noVNC/app/images/icons/novnc-152x152.png similarity index 100% rename from noVNC/app/images/icons/novnc-152x152.png rename to image/usr/lib/noVNC/app/images/icons/novnc-152x152.png diff --git a/noVNC/app/images/icons/novnc-16x16.png b/image/usr/lib/noVNC/app/images/icons/novnc-16x16.png similarity index 100% rename from noVNC/app/images/icons/novnc-16x16.png rename to image/usr/lib/noVNC/app/images/icons/novnc-16x16.png diff --git a/noVNC/app/images/icons/novnc-192x192.png b/image/usr/lib/noVNC/app/images/icons/novnc-192x192.png similarity index 100% rename from noVNC/app/images/icons/novnc-192x192.png rename to image/usr/lib/noVNC/app/images/icons/novnc-192x192.png diff --git a/noVNC/app/images/icons/novnc-24x24.png b/image/usr/lib/noVNC/app/images/icons/novnc-24x24.png similarity index 100% rename from noVNC/app/images/icons/novnc-24x24.png rename to image/usr/lib/noVNC/app/images/icons/novnc-24x24.png diff --git a/noVNC/app/images/icons/novnc-32x32.png b/image/usr/lib/noVNC/app/images/icons/novnc-32x32.png similarity index 100% rename from noVNC/app/images/icons/novnc-32x32.png rename to image/usr/lib/noVNC/app/images/icons/novnc-32x32.png diff --git a/noVNC/app/images/icons/novnc-48x48.png b/image/usr/lib/noVNC/app/images/icons/novnc-48x48.png similarity index 100% rename from noVNC/app/images/icons/novnc-48x48.png rename to image/usr/lib/noVNC/app/images/icons/novnc-48x48.png diff --git a/noVNC/app/images/icons/novnc-60x60.png b/image/usr/lib/noVNC/app/images/icons/novnc-60x60.png similarity index 100% rename from noVNC/app/images/icons/novnc-60x60.png rename to image/usr/lib/noVNC/app/images/icons/novnc-60x60.png diff --git a/noVNC/app/images/icons/novnc-64x64.png b/image/usr/lib/noVNC/app/images/icons/novnc-64x64.png similarity index 100% rename from noVNC/app/images/icons/novnc-64x64.png rename to image/usr/lib/noVNC/app/images/icons/novnc-64x64.png diff --git a/noVNC/app/images/icons/novnc-72x72.png b/image/usr/lib/noVNC/app/images/icons/novnc-72x72.png similarity index 100% rename from noVNC/app/images/icons/novnc-72x72.png rename to image/usr/lib/noVNC/app/images/icons/novnc-72x72.png diff --git a/noVNC/app/images/icons/novnc-76x76.png b/image/usr/lib/noVNC/app/images/icons/novnc-76x76.png similarity index 100% rename from noVNC/app/images/icons/novnc-76x76.png rename to image/usr/lib/noVNC/app/images/icons/novnc-76x76.png diff --git a/noVNC/app/images/icons/novnc-96x96.png b/image/usr/lib/noVNC/app/images/icons/novnc-96x96.png similarity index 100% rename from noVNC/app/images/icons/novnc-96x96.png rename to image/usr/lib/noVNC/app/images/icons/novnc-96x96.png diff --git a/noVNC/app/images/icons/novnc-icon-sm.svg b/image/usr/lib/noVNC/app/images/icons/novnc-icon-sm.svg similarity index 100% rename from noVNC/app/images/icons/novnc-icon-sm.svg rename to image/usr/lib/noVNC/app/images/icons/novnc-icon-sm.svg diff --git a/noVNC/app/images/icons/novnc-icon.svg b/image/usr/lib/noVNC/app/images/icons/novnc-icon.svg similarity index 100% rename from noVNC/app/images/icons/novnc-icon.svg rename to image/usr/lib/noVNC/app/images/icons/novnc-icon.svg diff --git a/noVNC/app/images/info.svg b/image/usr/lib/noVNC/app/images/info.svg similarity index 100% rename from noVNC/app/images/info.svg rename to image/usr/lib/noVNC/app/images/info.svg diff --git a/noVNC/app/images/keyboard.svg b/image/usr/lib/noVNC/app/images/keyboard.svg similarity index 100% rename from noVNC/app/images/keyboard.svg rename to image/usr/lib/noVNC/app/images/keyboard.svg diff --git a/noVNC/app/images/mouse_left.svg b/image/usr/lib/noVNC/app/images/mouse_left.svg similarity index 100% rename from noVNC/app/images/mouse_left.svg rename to image/usr/lib/noVNC/app/images/mouse_left.svg diff --git a/noVNC/app/images/mouse_middle.svg b/image/usr/lib/noVNC/app/images/mouse_middle.svg similarity index 100% rename from noVNC/app/images/mouse_middle.svg rename to image/usr/lib/noVNC/app/images/mouse_middle.svg diff --git a/noVNC/app/images/mouse_none.svg b/image/usr/lib/noVNC/app/images/mouse_none.svg similarity index 100% rename from noVNC/app/images/mouse_none.svg rename to image/usr/lib/noVNC/app/images/mouse_none.svg diff --git a/noVNC/app/images/mouse_right.svg b/image/usr/lib/noVNC/app/images/mouse_right.svg similarity index 100% rename from noVNC/app/images/mouse_right.svg rename to image/usr/lib/noVNC/app/images/mouse_right.svg diff --git a/noVNC/app/images/power.svg b/image/usr/lib/noVNC/app/images/power.svg similarity index 100% rename from noVNC/app/images/power.svg rename to image/usr/lib/noVNC/app/images/power.svg diff --git a/noVNC/app/images/settings.svg b/image/usr/lib/noVNC/app/images/settings.svg similarity index 100% rename from noVNC/app/images/settings.svg rename to image/usr/lib/noVNC/app/images/settings.svg diff --git a/noVNC/app/images/tab.svg b/image/usr/lib/noVNC/app/images/tab.svg similarity index 100% rename from noVNC/app/images/tab.svg rename to image/usr/lib/noVNC/app/images/tab.svg diff --git a/noVNC/app/images/toggleextrakeys.svg b/image/usr/lib/noVNC/app/images/toggleextrakeys.svg similarity index 100% rename from noVNC/app/images/toggleextrakeys.svg rename to image/usr/lib/noVNC/app/images/toggleextrakeys.svg diff --git a/noVNC/app/images/warning.svg b/image/usr/lib/noVNC/app/images/warning.svg similarity index 100% rename from noVNC/app/images/warning.svg rename to image/usr/lib/noVNC/app/images/warning.svg diff --git a/noVNC/app/locale/de.js b/image/usr/lib/noVNC/app/locale/de.js similarity index 100% rename from noVNC/app/locale/de.js rename to image/usr/lib/noVNC/app/locale/de.js diff --git a/noVNC/app/locale/el.js b/image/usr/lib/noVNC/app/locale/el.js similarity index 100% rename from noVNC/app/locale/el.js rename to image/usr/lib/noVNC/app/locale/el.js diff --git a/noVNC/app/locale/nl.js b/image/usr/lib/noVNC/app/locale/nl.js similarity index 100% rename from noVNC/app/locale/nl.js rename to image/usr/lib/noVNC/app/locale/nl.js diff --git a/noVNC/app/locale/sv.js b/image/usr/lib/noVNC/app/locale/sv.js similarity index 100% rename from noVNC/app/locale/sv.js rename to image/usr/lib/noVNC/app/locale/sv.js diff --git a/noVNC/app/sounds/CREDITS b/image/usr/lib/noVNC/app/sounds/CREDITS similarity index 100% rename from noVNC/app/sounds/CREDITS rename to image/usr/lib/noVNC/app/sounds/CREDITS diff --git a/noVNC/app/sounds/bell.mp3 b/image/usr/lib/noVNC/app/sounds/bell.mp3 similarity index 100% rename from noVNC/app/sounds/bell.mp3 rename to image/usr/lib/noVNC/app/sounds/bell.mp3 diff --git a/noVNC/app/sounds/bell.oga b/image/usr/lib/noVNC/app/sounds/bell.oga similarity index 100% rename from noVNC/app/sounds/bell.oga rename to image/usr/lib/noVNC/app/sounds/bell.oga diff --git a/noVNC/app/styles/Orbitron700.ttf b/image/usr/lib/noVNC/app/styles/Orbitron700.ttf similarity index 100% rename from noVNC/app/styles/Orbitron700.ttf rename to image/usr/lib/noVNC/app/styles/Orbitron700.ttf diff --git a/noVNC/app/styles/Orbitron700.woff b/image/usr/lib/noVNC/app/styles/Orbitron700.woff similarity index 100% rename from noVNC/app/styles/Orbitron700.woff rename to image/usr/lib/noVNC/app/styles/Orbitron700.woff diff --git a/noVNC/app/styles/auto.css b/image/usr/lib/noVNC/app/styles/auto.css similarity index 100% rename from noVNC/app/styles/auto.css rename to image/usr/lib/noVNC/app/styles/auto.css diff --git a/noVNC/app/styles/base.css b/image/usr/lib/noVNC/app/styles/base.css similarity index 100% rename from noVNC/app/styles/base.css rename to image/usr/lib/noVNC/app/styles/base.css diff --git a/noVNC/app/ui.js b/image/usr/lib/noVNC/app/ui.js similarity index 100% rename from noVNC/app/ui.js rename to image/usr/lib/noVNC/app/ui.js diff --git a/noVNC/app/webutil.js b/image/usr/lib/noVNC/app/webutil.js similarity index 100% rename from noVNC/app/webutil.js rename to image/usr/lib/noVNC/app/webutil.js diff --git a/noVNC/core/base64.js b/image/usr/lib/noVNC/core/base64.js similarity index 100% rename from noVNC/core/base64.js rename to image/usr/lib/noVNC/core/base64.js diff --git a/noVNC/core/des.js b/image/usr/lib/noVNC/core/des.js similarity index 100% rename from noVNC/core/des.js rename to image/usr/lib/noVNC/core/des.js diff --git a/noVNC/core/display.js b/image/usr/lib/noVNC/core/display.js similarity index 100% rename from noVNC/core/display.js rename to image/usr/lib/noVNC/core/display.js diff --git a/noVNC/core/inflator.js b/image/usr/lib/noVNC/core/inflator.js similarity index 100% rename from noVNC/core/inflator.js rename to image/usr/lib/noVNC/core/inflator.js diff --git a/noVNC/core/inflator.mod.js b/image/usr/lib/noVNC/core/inflator.mod.js similarity index 100% rename from noVNC/core/inflator.mod.js rename to image/usr/lib/noVNC/core/inflator.mod.js diff --git a/noVNC/core/input/devices.js b/image/usr/lib/noVNC/core/input/devices.js similarity index 100% rename from noVNC/core/input/devices.js rename to image/usr/lib/noVNC/core/input/devices.js diff --git a/noVNC/core/input/keysym.js b/image/usr/lib/noVNC/core/input/keysym.js similarity index 100% rename from noVNC/core/input/keysym.js rename to image/usr/lib/noVNC/core/input/keysym.js diff --git a/noVNC/core/input/keysymdef.js b/image/usr/lib/noVNC/core/input/keysymdef.js similarity index 100% rename from noVNC/core/input/keysymdef.js rename to image/usr/lib/noVNC/core/input/keysymdef.js diff --git a/noVNC/core/input/util.js b/image/usr/lib/noVNC/core/input/util.js similarity index 100% rename from noVNC/core/input/util.js rename to image/usr/lib/noVNC/core/input/util.js diff --git a/noVNC/core/input/xtscancodes.js b/image/usr/lib/noVNC/core/input/xtscancodes.js similarity index 100% rename from noVNC/core/input/xtscancodes.js rename to image/usr/lib/noVNC/core/input/xtscancodes.js diff --git a/noVNC/core/rfb.js b/image/usr/lib/noVNC/core/rfb.js similarity index 100% rename from noVNC/core/rfb.js rename to image/usr/lib/noVNC/core/rfb.js diff --git a/noVNC/core/util.js b/image/usr/lib/noVNC/core/util.js similarity index 100% rename from noVNC/core/util.js rename to image/usr/lib/noVNC/core/util.js diff --git a/noVNC/core/websock.js b/image/usr/lib/noVNC/core/websock.js similarity index 100% rename from noVNC/core/websock.js rename to image/usr/lib/noVNC/core/websock.js diff --git a/noVNC/docs/LICENSE.Apache-2.0 b/image/usr/lib/noVNC/docs/LICENSE.Apache-2.0 similarity index 100% rename from noVNC/docs/LICENSE.Apache-2.0 rename to image/usr/lib/noVNC/docs/LICENSE.Apache-2.0 diff --git a/noVNC/docs/LICENSE.BSD-2-Clause b/image/usr/lib/noVNC/docs/LICENSE.BSD-2-Clause similarity index 100% rename from noVNC/docs/LICENSE.BSD-2-Clause rename to image/usr/lib/noVNC/docs/LICENSE.BSD-2-Clause diff --git a/noVNC/docs/LICENSE.BSD-3-Clause b/image/usr/lib/noVNC/docs/LICENSE.BSD-3-Clause similarity index 100% rename from noVNC/docs/LICENSE.BSD-3-Clause rename to image/usr/lib/noVNC/docs/LICENSE.BSD-3-Clause diff --git a/noVNC/docs/LICENSE.GPL-3 b/image/usr/lib/noVNC/docs/LICENSE.GPL-3 similarity index 100% rename from noVNC/docs/LICENSE.GPL-3 rename to image/usr/lib/noVNC/docs/LICENSE.GPL-3 diff --git a/noVNC/docs/LICENSE.LGPL-3 b/image/usr/lib/noVNC/docs/LICENSE.LGPL-3 similarity index 100% rename from noVNC/docs/LICENSE.LGPL-3 rename to image/usr/lib/noVNC/docs/LICENSE.LGPL-3 diff --git a/noVNC/docs/LICENSE.MPL-2.0 b/image/usr/lib/noVNC/docs/LICENSE.MPL-2.0 similarity index 100% rename from noVNC/docs/LICENSE.MPL-2.0 rename to image/usr/lib/noVNC/docs/LICENSE.MPL-2.0 diff --git a/noVNC/docs/LICENSE.OFL-1.1 b/image/usr/lib/noVNC/docs/LICENSE.OFL-1.1 similarity index 100% rename from noVNC/docs/LICENSE.OFL-1.1 rename to image/usr/lib/noVNC/docs/LICENSE.OFL-1.1 diff --git a/noVNC/docs/LICENSE.pako b/image/usr/lib/noVNC/docs/LICENSE.pako similarity index 100% rename from noVNC/docs/LICENSE.pako rename to image/usr/lib/noVNC/docs/LICENSE.pako diff --git a/noVNC/docs/LICENSE.zlib b/image/usr/lib/noVNC/docs/LICENSE.zlib similarity index 100% rename from noVNC/docs/LICENSE.zlib rename to image/usr/lib/noVNC/docs/LICENSE.zlib diff --git a/noVNC/docs/VERSION b/image/usr/lib/noVNC/docs/VERSION similarity index 100% rename from noVNC/docs/VERSION rename to image/usr/lib/noVNC/docs/VERSION diff --git a/noVNC/docs/flash_policy.txt b/image/usr/lib/noVNC/docs/flash_policy.txt similarity index 100% rename from noVNC/docs/flash_policy.txt rename to image/usr/lib/noVNC/docs/flash_policy.txt diff --git a/noVNC/docs/links b/image/usr/lib/noVNC/docs/links similarity index 100% rename from noVNC/docs/links rename to image/usr/lib/noVNC/docs/links diff --git a/noVNC/docs/notes b/image/usr/lib/noVNC/docs/notes similarity index 100% rename from noVNC/docs/notes rename to image/usr/lib/noVNC/docs/notes diff --git a/noVNC/docs/release.txt b/image/usr/lib/noVNC/docs/release.txt similarity index 100% rename from noVNC/docs/release.txt rename to image/usr/lib/noVNC/docs/release.txt diff --git a/noVNC/docs/rfb_notes b/image/usr/lib/noVNC/docs/rfb_notes similarity index 100% rename from noVNC/docs/rfb_notes rename to image/usr/lib/noVNC/docs/rfb_notes diff --git a/noVNC/docs/rfbproto-3.3.pdf b/image/usr/lib/noVNC/docs/rfbproto-3.3.pdf similarity index 100% rename from noVNC/docs/rfbproto-3.3.pdf rename to image/usr/lib/noVNC/docs/rfbproto-3.3.pdf diff --git a/noVNC/docs/rfbproto-3.7.pdf b/image/usr/lib/noVNC/docs/rfbproto-3.7.pdf similarity index 100% rename from noVNC/docs/rfbproto-3.7.pdf rename to image/usr/lib/noVNC/docs/rfbproto-3.7.pdf diff --git a/noVNC/docs/rfbproto-3.8.pdf b/image/usr/lib/noVNC/docs/rfbproto-3.8.pdf similarity index 100% rename from noVNC/docs/rfbproto-3.8.pdf rename to image/usr/lib/noVNC/docs/rfbproto-3.8.pdf diff --git a/noVNC/karma.conf.js b/image/usr/lib/noVNC/karma.conf.js similarity index 100% rename from noVNC/karma.conf.js rename to image/usr/lib/noVNC/karma.conf.js diff --git a/noVNC/package.json b/image/usr/lib/noVNC/package.json similarity index 100% rename from noVNC/package.json rename to image/usr/lib/noVNC/package.json diff --git a/noVNC/po/Makefile b/image/usr/lib/noVNC/po/Makefile similarity index 100% rename from noVNC/po/Makefile rename to image/usr/lib/noVNC/po/Makefile diff --git a/noVNC/po/de.po b/image/usr/lib/noVNC/po/de.po similarity index 100% rename from noVNC/po/de.po rename to image/usr/lib/noVNC/po/de.po diff --git a/noVNC/po/el.po b/image/usr/lib/noVNC/po/el.po similarity index 100% rename from noVNC/po/el.po rename to image/usr/lib/noVNC/po/el.po diff --git a/noVNC/po/nl.po b/image/usr/lib/noVNC/po/nl.po similarity index 100% rename from noVNC/po/nl.po rename to image/usr/lib/noVNC/po/nl.po diff --git a/noVNC/po/noVNC.pot b/image/usr/lib/noVNC/po/noVNC.pot similarity index 100% rename from noVNC/po/noVNC.pot rename to image/usr/lib/noVNC/po/noVNC.pot diff --git a/noVNC/po/po2js b/image/usr/lib/noVNC/po/po2js similarity index 100% rename from noVNC/po/po2js rename to image/usr/lib/noVNC/po/po2js diff --git a/noVNC/po/sv.po b/image/usr/lib/noVNC/po/sv.po similarity index 100% rename from noVNC/po/sv.po rename to image/usr/lib/noVNC/po/sv.po diff --git a/noVNC/po/xgettext-html b/image/usr/lib/noVNC/po/xgettext-html similarity index 100% rename from noVNC/po/xgettext-html rename to image/usr/lib/noVNC/po/xgettext-html diff --git a/noVNC/tests/assertions.js b/image/usr/lib/noVNC/tests/assertions.js similarity index 100% rename from noVNC/tests/assertions.js rename to image/usr/lib/noVNC/tests/assertions.js diff --git a/noVNC/tests/fake.websocket.js b/image/usr/lib/noVNC/tests/fake.websocket.js similarity index 100% rename from noVNC/tests/fake.websocket.js rename to image/usr/lib/noVNC/tests/fake.websocket.js diff --git a/noVNC/tests/input.html b/image/usr/lib/noVNC/tests/input.html similarity index 100% rename from noVNC/tests/input.html rename to image/usr/lib/noVNC/tests/input.html diff --git a/noVNC/tests/playback.js b/image/usr/lib/noVNC/tests/playback.js similarity index 100% rename from noVNC/tests/playback.js rename to image/usr/lib/noVNC/tests/playback.js diff --git a/noVNC/tests/run_from_console.casper.js b/image/usr/lib/noVNC/tests/run_from_console.casper.js similarity index 100% rename from noVNC/tests/run_from_console.casper.js rename to image/usr/lib/noVNC/tests/run_from_console.casper.js diff --git a/noVNC/tests/run_from_console.js b/image/usr/lib/noVNC/tests/run_from_console.js similarity index 100% rename from noVNC/tests/run_from_console.js rename to image/usr/lib/noVNC/tests/run_from_console.js diff --git a/noVNC/tests/run_from_console.zombie.js b/image/usr/lib/noVNC/tests/run_from_console.zombie.js similarity index 100% rename from noVNC/tests/run_from_console.zombie.js rename to image/usr/lib/noVNC/tests/run_from_console.zombie.js diff --git a/noVNC/tests/test.base64.js b/image/usr/lib/noVNC/tests/test.base64.js similarity index 100% rename from noVNC/tests/test.base64.js rename to image/usr/lib/noVNC/tests/test.base64.js diff --git a/noVNC/tests/test.display.js b/image/usr/lib/noVNC/tests/test.display.js similarity index 100% rename from noVNC/tests/test.display.js rename to image/usr/lib/noVNC/tests/test.display.js diff --git a/noVNC/tests/test.helper.js b/image/usr/lib/noVNC/tests/test.helper.js similarity index 100% rename from noVNC/tests/test.helper.js rename to image/usr/lib/noVNC/tests/test.helper.js diff --git a/noVNC/tests/test.keyboard.js b/image/usr/lib/noVNC/tests/test.keyboard.js similarity index 100% rename from noVNC/tests/test.keyboard.js rename to image/usr/lib/noVNC/tests/test.keyboard.js diff --git a/noVNC/tests/test.rfb.js b/image/usr/lib/noVNC/tests/test.rfb.js similarity index 100% rename from noVNC/tests/test.rfb.js rename to image/usr/lib/noVNC/tests/test.rfb.js diff --git a/noVNC/tests/test.util.js b/image/usr/lib/noVNC/tests/test.util.js similarity index 100% rename from noVNC/tests/test.util.js rename to image/usr/lib/noVNC/tests/test.util.js diff --git a/noVNC/tests/test.websock.js b/image/usr/lib/noVNC/tests/test.websock.js similarity index 100% rename from noVNC/tests/test.websock.js rename to image/usr/lib/noVNC/tests/test.websock.js diff --git a/noVNC/tests/vnc_perf.html b/image/usr/lib/noVNC/tests/vnc_perf.html similarity index 100% rename from noVNC/tests/vnc_perf.html rename to image/usr/lib/noVNC/tests/vnc_perf.html diff --git a/noVNC/tests/vnc_playback.html b/image/usr/lib/noVNC/tests/vnc_playback.html similarity index 100% rename from noVNC/tests/vnc_playback.html rename to image/usr/lib/noVNC/tests/vnc_playback.html diff --git a/noVNC/utils/README.md b/image/usr/lib/noVNC/utils/README.md similarity index 100% rename from noVNC/utils/README.md rename to image/usr/lib/noVNC/utils/README.md diff --git a/noVNC/utils/b64-to-binary.pl b/image/usr/lib/noVNC/utils/b64-to-binary.pl similarity index 100% rename from noVNC/utils/b64-to-binary.pl rename to image/usr/lib/noVNC/utils/b64-to-binary.pl diff --git a/noVNC/utils/img2js.py b/image/usr/lib/noVNC/utils/img2js.py similarity index 100% rename from noVNC/utils/img2js.py rename to image/usr/lib/noVNC/utils/img2js.py diff --git a/noVNC/utils/json2graph.py b/image/usr/lib/noVNC/utils/json2graph.py similarity index 100% rename from noVNC/utils/json2graph.py rename to image/usr/lib/noVNC/utils/json2graph.py diff --git a/noVNC/utils/launch.sh b/image/usr/lib/noVNC/utils/launch.sh similarity index 98% rename from noVNC/utils/launch.sh rename to image/usr/lib/noVNC/utils/launch.sh index de56758a..8c1cceda 100755 --- a/noVNC/utils/launch.sh +++ b/image/usr/lib/noVNC/utils/launch.sh @@ -142,7 +142,7 @@ fi echo "Starting webserver and WebSockets proxy on port ${PORT}" #${HERE}/websockify --web ${WEB} ${CERT:+--cert ${CERT}} ${PORT} ${VNC_DEST} & -${WEBSOCKIFY} ${SSLONLY} --web ${WEB} ${CERT:+--cert ${CERT}} ${PORT} ${VNC_DEST} & +exec ${WEBSOCKIFY} ${SSLONLY} --web ${WEB} ${CERT:+--cert ${CERT}} ${PORT} ${VNC_DEST} proxy_pid="$!" sleep 1 if ! ps -p ${proxy_pid} >/dev/null; then diff --git a/noVNC/utils/make-module-transform.js b/image/usr/lib/noVNC/utils/make-module-transform.js similarity index 100% rename from noVNC/utils/make-module-transform.js rename to image/usr/lib/noVNC/utils/make-module-transform.js diff --git a/noVNC/utils/parse.js b/image/usr/lib/noVNC/utils/parse.js similarity index 100% rename from noVNC/utils/parse.js rename to image/usr/lib/noVNC/utils/parse.js diff --git a/noVNC/utils/u2x11 b/image/usr/lib/noVNC/utils/u2x11 similarity index 100% rename from noVNC/utils/u2x11 rename to image/usr/lib/noVNC/utils/u2x11 diff --git a/noVNC/utils/use_require.js b/image/usr/lib/noVNC/utils/use_require.js similarity index 100% rename from noVNC/utils/use_require.js rename to image/usr/lib/noVNC/utils/use_require.js diff --git a/noVNC/utils/websockify/.travis.yml b/image/usr/lib/noVNC/utils/websockify/.travis.yml similarity index 100% rename from noVNC/utils/websockify/.travis.yml rename to image/usr/lib/noVNC/utils/websockify/.travis.yml diff --git a/noVNC/utils/websockify/CHANGES.txt b/image/usr/lib/noVNC/utils/websockify/CHANGES.txt similarity index 100% rename from noVNC/utils/websockify/CHANGES.txt rename to image/usr/lib/noVNC/utils/websockify/CHANGES.txt diff --git a/noVNC/utils/websockify/LICENSE.txt b/image/usr/lib/noVNC/utils/websockify/LICENSE.txt similarity index 100% rename from noVNC/utils/websockify/LICENSE.txt rename to image/usr/lib/noVNC/utils/websockify/LICENSE.txt diff --git a/noVNC/utils/websockify/MANIFEST.in b/image/usr/lib/noVNC/utils/websockify/MANIFEST.in similarity index 100% rename from noVNC/utils/websockify/MANIFEST.in rename to image/usr/lib/noVNC/utils/websockify/MANIFEST.in diff --git a/noVNC/utils/websockify/Makefile b/image/usr/lib/noVNC/utils/websockify/Makefile similarity index 100% rename from noVNC/utils/websockify/Makefile rename to image/usr/lib/noVNC/utils/websockify/Makefile diff --git a/noVNC/utils/websockify/README.md b/image/usr/lib/noVNC/utils/websockify/README.md similarity index 100% rename from noVNC/utils/websockify/README.md rename to image/usr/lib/noVNC/utils/websockify/README.md diff --git a/noVNC/utils/websockify/Windows/Windows Service Readme.txt b/image/usr/lib/noVNC/utils/websockify/Windows/Windows Service Readme.txt similarity index 100% rename from noVNC/utils/websockify/Windows/Windows Service Readme.txt rename to image/usr/lib/noVNC/utils/websockify/Windows/Windows Service Readme.txt diff --git a/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/Program.cs b/image/usr/lib/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/Program.cs similarity index 100% rename from noVNC/utils/websockify/Windows/noVNC Websocket Service Project/Program.cs rename to image/usr/lib/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/Program.cs diff --git a/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.Designer.cs b/image/usr/lib/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.Designer.cs similarity index 100% rename from noVNC/utils/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.Designer.cs rename to image/usr/lib/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.Designer.cs diff --git a/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.cs b/image/usr/lib/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.cs similarity index 100% rename from noVNC/utils/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.cs rename to image/usr/lib/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.cs diff --git a/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.resx b/image/usr/lib/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.resx similarity index 100% rename from noVNC/utils/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.resx rename to image/usr/lib/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.resx diff --git a/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/Properties/AssemblyInfo.cs b/image/usr/lib/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/Properties/AssemblyInfo.cs similarity index 100% rename from noVNC/utils/websockify/Windows/noVNC Websocket Service Project/Properties/AssemblyInfo.cs rename to image/usr/lib/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/Properties/AssemblyInfo.cs diff --git a/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/Service1.Designer.cs b/image/usr/lib/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/Service1.Designer.cs similarity index 100% rename from noVNC/utils/websockify/Windows/noVNC Websocket Service Project/Service1.Designer.cs rename to image/usr/lib/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/Service1.Designer.cs diff --git a/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/Service1.cs b/image/usr/lib/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/Service1.cs similarity index 100% rename from noVNC/utils/websockify/Windows/noVNC Websocket Service Project/Service1.cs rename to image/usr/lib/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/Service1.cs diff --git a/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/noVNC Websocket.csproj b/image/usr/lib/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/noVNC Websocket.csproj similarity index 100% rename from noVNC/utils/websockify/Windows/noVNC Websocket Service Project/noVNC Websocket.csproj rename to image/usr/lib/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/noVNC Websocket.csproj diff --git a/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/noVNC Websocket.sln b/image/usr/lib/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/noVNC Websocket.sln similarity index 100% rename from noVNC/utils/websockify/Windows/noVNC Websocket Service Project/noVNC Websocket.sln rename to image/usr/lib/noVNC/utils/websockify/Windows/noVNC Websocket Service Project/noVNC Websocket.sln diff --git a/noVNC/utils/websockify/docs/LICENSE.GPL-3 b/image/usr/lib/noVNC/utils/websockify/docs/LICENSE.GPL-3 similarity index 100% rename from noVNC/utils/websockify/docs/LICENSE.GPL-3 rename to image/usr/lib/noVNC/utils/websockify/docs/LICENSE.GPL-3 diff --git a/noVNC/utils/websockify/docs/LICENSE.LGPL-3 b/image/usr/lib/noVNC/utils/websockify/docs/LICENSE.LGPL-3 similarity index 100% rename from noVNC/utils/websockify/docs/LICENSE.LGPL-3 rename to image/usr/lib/noVNC/utils/websockify/docs/LICENSE.LGPL-3 diff --git a/noVNC/utils/websockify/docs/LICENSE.MPL-2.0 b/image/usr/lib/noVNC/utils/websockify/docs/LICENSE.MPL-2.0 similarity index 100% rename from noVNC/utils/websockify/docs/LICENSE.MPL-2.0 rename to image/usr/lib/noVNC/utils/websockify/docs/LICENSE.MPL-2.0 diff --git a/noVNC/utils/websockify/docs/TODO b/image/usr/lib/noVNC/utils/websockify/docs/TODO similarity index 100% rename from noVNC/utils/websockify/docs/TODO rename to image/usr/lib/noVNC/utils/websockify/docs/TODO diff --git a/noVNC/utils/websockify/docs/flash_policy.txt b/image/usr/lib/noVNC/utils/websockify/docs/flash_policy.txt similarity index 100% rename from noVNC/utils/websockify/docs/flash_policy.txt rename to image/usr/lib/noVNC/utils/websockify/docs/flash_policy.txt diff --git a/noVNC/utils/websockify/docs/latency_results.txt b/image/usr/lib/noVNC/utils/websockify/docs/latency_results.txt similarity index 100% rename from noVNC/utils/websockify/docs/latency_results.txt rename to image/usr/lib/noVNC/utils/websockify/docs/latency_results.txt diff --git a/noVNC/utils/websockify/docs/notes b/image/usr/lib/noVNC/utils/websockify/docs/notes similarity index 100% rename from noVNC/utils/websockify/docs/notes rename to image/usr/lib/noVNC/utils/websockify/docs/notes diff --git a/noVNC/utils/websockify/docs/release.txt b/image/usr/lib/noVNC/utils/websockify/docs/release.txt similarity index 100% rename from noVNC/utils/websockify/docs/release.txt rename to image/usr/lib/noVNC/utils/websockify/docs/release.txt diff --git a/noVNC/utils/websockify/docs/websockify.1 b/image/usr/lib/noVNC/utils/websockify/docs/websockify.1 similarity index 100% rename from noVNC/utils/websockify/docs/websockify.1 rename to image/usr/lib/noVNC/utils/websockify/docs/websockify.1 diff --git a/noVNC/utils/websockify/include/VT100.js b/image/usr/lib/noVNC/utils/websockify/include/VT100.js similarity index 100% rename from noVNC/utils/websockify/include/VT100.js rename to image/usr/lib/noVNC/utils/websockify/include/VT100.js diff --git a/noVNC/utils/websockify/include/keysym.js b/image/usr/lib/noVNC/utils/websockify/include/keysym.js similarity index 100% rename from noVNC/utils/websockify/include/keysym.js rename to image/usr/lib/noVNC/utils/websockify/include/keysym.js diff --git a/noVNC/utils/websockify/include/util.js b/image/usr/lib/noVNC/utils/websockify/include/util.js similarity index 100% rename from noVNC/utils/websockify/include/util.js rename to image/usr/lib/noVNC/utils/websockify/include/util.js diff --git a/noVNC/utils/websockify/include/websock.js b/image/usr/lib/noVNC/utils/websockify/include/websock.js similarity index 100% rename from noVNC/utils/websockify/include/websock.js rename to image/usr/lib/noVNC/utils/websockify/include/websock.js diff --git a/noVNC/utils/websockify/include/webutil.js b/image/usr/lib/noVNC/utils/websockify/include/webutil.js similarity index 100% rename from noVNC/utils/websockify/include/webutil.js rename to image/usr/lib/noVNC/utils/websockify/include/webutil.js diff --git a/noVNC/utils/websockify/include/wsirc.js b/image/usr/lib/noVNC/utils/websockify/include/wsirc.js similarity index 100% rename from noVNC/utils/websockify/include/wsirc.js rename to image/usr/lib/noVNC/utils/websockify/include/wsirc.js diff --git a/noVNC/utils/websockify/include/wstelnet.js b/image/usr/lib/noVNC/utils/websockify/include/wstelnet.js similarity index 100% rename from noVNC/utils/websockify/include/wstelnet.js rename to image/usr/lib/noVNC/utils/websockify/include/wstelnet.js diff --git a/noVNC/utils/websockify/other/Makefile b/image/usr/lib/noVNC/utils/websockify/other/Makefile similarity index 100% rename from noVNC/utils/websockify/other/Makefile rename to image/usr/lib/noVNC/utils/websockify/other/Makefile diff --git a/noVNC/utils/websockify/other/README.md b/image/usr/lib/noVNC/utils/websockify/other/README.md similarity index 100% rename from noVNC/utils/websockify/other/README.md rename to image/usr/lib/noVNC/utils/websockify/other/README.md diff --git a/noVNC/utils/websockify/other/js/README.md b/image/usr/lib/noVNC/utils/websockify/other/js/README.md similarity index 100% rename from noVNC/utils/websockify/other/js/README.md rename to image/usr/lib/noVNC/utils/websockify/other/js/README.md diff --git a/noVNC/utils/websockify/other/js/package.json b/image/usr/lib/noVNC/utils/websockify/other/js/package.json similarity index 100% rename from noVNC/utils/websockify/other/js/package.json rename to image/usr/lib/noVNC/utils/websockify/other/js/package.json diff --git a/noVNC/utils/websockify/other/js/websockify.js b/image/usr/lib/noVNC/utils/websockify/other/js/websockify.js similarity index 100% rename from noVNC/utils/websockify/other/js/websockify.js rename to image/usr/lib/noVNC/utils/websockify/other/js/websockify.js diff --git a/noVNC/utils/websockify/other/launch.sh b/image/usr/lib/noVNC/utils/websockify/other/launch.sh similarity index 100% rename from noVNC/utils/websockify/other/launch.sh rename to image/usr/lib/noVNC/utils/websockify/other/launch.sh diff --git a/noVNC/utils/websockify/other/project.clj b/image/usr/lib/noVNC/utils/websockify/other/project.clj similarity index 100% rename from noVNC/utils/websockify/other/project.clj rename to image/usr/lib/noVNC/utils/websockify/other/project.clj diff --git a/noVNC/utils/websockify/other/websocket.c b/image/usr/lib/noVNC/utils/websockify/other/websocket.c similarity index 100% rename from noVNC/utils/websockify/other/websocket.c rename to image/usr/lib/noVNC/utils/websockify/other/websocket.c diff --git a/noVNC/utils/websockify/other/websocket.h b/image/usr/lib/noVNC/utils/websockify/other/websocket.h similarity index 100% rename from noVNC/utils/websockify/other/websocket.h rename to image/usr/lib/noVNC/utils/websockify/other/websocket.h diff --git a/noVNC/utils/websockify/other/websocket.rb b/image/usr/lib/noVNC/utils/websockify/other/websocket.rb similarity index 100% rename from noVNC/utils/websockify/other/websocket.rb rename to image/usr/lib/noVNC/utils/websockify/other/websocket.rb diff --git a/noVNC/utils/websockify/other/websockify.c b/image/usr/lib/noVNC/utils/websockify/other/websockify.c similarity index 100% rename from noVNC/utils/websockify/other/websockify.c rename to image/usr/lib/noVNC/utils/websockify/other/websockify.c diff --git a/noVNC/utils/websockify/other/websockify.clj b/image/usr/lib/noVNC/utils/websockify/other/websockify.clj similarity index 100% rename from noVNC/utils/websockify/other/websockify.clj rename to image/usr/lib/noVNC/utils/websockify/other/websockify.clj diff --git a/noVNC/utils/websockify/other/websockify.rb b/image/usr/lib/noVNC/utils/websockify/other/websockify.rb similarity index 100% rename from noVNC/utils/websockify/other/websockify.rb rename to image/usr/lib/noVNC/utils/websockify/other/websockify.rb diff --git a/noVNC/utils/websockify/other/wswrap b/image/usr/lib/noVNC/utils/websockify/other/wswrap similarity index 100% rename from noVNC/utils/websockify/other/wswrap rename to image/usr/lib/noVNC/utils/websockify/other/wswrap diff --git a/noVNC/utils/websockify/rebind b/image/usr/lib/noVNC/utils/websockify/rebind similarity index 100% rename from noVNC/utils/websockify/rebind rename to image/usr/lib/noVNC/utils/websockify/rebind diff --git a/noVNC/utils/websockify/rebind.c b/image/usr/lib/noVNC/utils/websockify/rebind.c similarity index 100% rename from noVNC/utils/websockify/rebind.c rename to image/usr/lib/noVNC/utils/websockify/rebind.c diff --git a/noVNC/utils/websockify/run b/image/usr/lib/noVNC/utils/websockify/run similarity index 100% rename from noVNC/utils/websockify/run rename to image/usr/lib/noVNC/utils/websockify/run diff --git a/noVNC/utils/websockify/setup.py b/image/usr/lib/noVNC/utils/websockify/setup.py similarity index 100% rename from noVNC/utils/websockify/setup.py rename to image/usr/lib/noVNC/utils/websockify/setup.py diff --git a/noVNC/utils/websockify/test-requirements.txt b/image/usr/lib/noVNC/utils/websockify/test-requirements.txt similarity index 100% rename from noVNC/utils/websockify/test-requirements.txt rename to image/usr/lib/noVNC/utils/websockify/test-requirements.txt diff --git a/noVNC/utils/websockify/tests/echo.html b/image/usr/lib/noVNC/utils/websockify/tests/echo.html similarity index 100% rename from noVNC/utils/websockify/tests/echo.html rename to image/usr/lib/noVNC/utils/websockify/tests/echo.html diff --git a/noVNC/utils/websockify/tests/echo.py b/image/usr/lib/noVNC/utils/websockify/tests/echo.py similarity index 100% rename from noVNC/utils/websockify/tests/echo.py rename to image/usr/lib/noVNC/utils/websockify/tests/echo.py diff --git a/noVNC/utils/websockify/tests/echo.rb b/image/usr/lib/noVNC/utils/websockify/tests/echo.rb similarity index 100% rename from noVNC/utils/websockify/tests/echo.rb rename to image/usr/lib/noVNC/utils/websockify/tests/echo.rb diff --git a/noVNC/utils/websockify/tests/echo_client.py b/image/usr/lib/noVNC/utils/websockify/tests/echo_client.py similarity index 100% rename from noVNC/utils/websockify/tests/echo_client.py rename to image/usr/lib/noVNC/utils/websockify/tests/echo_client.py diff --git a/noVNC/utils/websockify/tests/include b/image/usr/lib/noVNC/utils/websockify/tests/include similarity index 100% rename from noVNC/utils/websockify/tests/include rename to image/usr/lib/noVNC/utils/websockify/tests/include diff --git a/noVNC/utils/websockify/tests/latency.html b/image/usr/lib/noVNC/utils/websockify/tests/latency.html similarity index 100% rename from noVNC/utils/websockify/tests/latency.html rename to image/usr/lib/noVNC/utils/websockify/tests/latency.html diff --git a/noVNC/utils/websockify/tests/latency.py b/image/usr/lib/noVNC/utils/websockify/tests/latency.py similarity index 100% rename from noVNC/utils/websockify/tests/latency.py rename to image/usr/lib/noVNC/utils/websockify/tests/latency.py diff --git a/noVNC/utils/websockify/tests/load.html b/image/usr/lib/noVNC/utils/websockify/tests/load.html similarity index 100% rename from noVNC/utils/websockify/tests/load.html rename to image/usr/lib/noVNC/utils/websockify/tests/load.html diff --git a/noVNC/utils/websockify/tests/load.py b/image/usr/lib/noVNC/utils/websockify/tests/load.py similarity index 100% rename from noVNC/utils/websockify/tests/load.py rename to image/usr/lib/noVNC/utils/websockify/tests/load.py diff --git a/noVNC/utils/websockify/tests/plain_echo.html b/image/usr/lib/noVNC/utils/websockify/tests/plain_echo.html similarity index 100% rename from noVNC/utils/websockify/tests/plain_echo.html rename to image/usr/lib/noVNC/utils/websockify/tests/plain_echo.html diff --git a/noVNC/utils/websockify/tests/simple.html b/image/usr/lib/noVNC/utils/websockify/tests/simple.html similarity index 100% rename from noVNC/utils/websockify/tests/simple.html rename to image/usr/lib/noVNC/utils/websockify/tests/simple.html diff --git a/noVNC/utils/websockify/tests/test_auth_plugins.py b/image/usr/lib/noVNC/utils/websockify/tests/test_auth_plugins.py similarity index 100% rename from noVNC/utils/websockify/tests/test_auth_plugins.py rename to image/usr/lib/noVNC/utils/websockify/tests/test_auth_plugins.py diff --git a/noVNC/utils/websockify/tests/test_websocket.py b/image/usr/lib/noVNC/utils/websockify/tests/test_websocket.py similarity index 100% rename from noVNC/utils/websockify/tests/test_websocket.py rename to image/usr/lib/noVNC/utils/websockify/tests/test_websocket.py diff --git a/noVNC/utils/websockify/tests/test_websocketproxy.py b/image/usr/lib/noVNC/utils/websockify/tests/test_websocketproxy.py similarity index 100% rename from noVNC/utils/websockify/tests/test_websocketproxy.py rename to image/usr/lib/noVNC/utils/websockify/tests/test_websocketproxy.py diff --git a/noVNC/utils/websockify/tests/test_websockifyserver.py b/image/usr/lib/noVNC/utils/websockify/tests/test_websockifyserver.py similarity index 100% rename from noVNC/utils/websockify/tests/test_websockifyserver.py rename to image/usr/lib/noVNC/utils/websockify/tests/test_websockifyserver.py diff --git a/noVNC/utils/websockify/tox.ini b/image/usr/lib/noVNC/utils/websockify/tox.ini similarity index 100% rename from noVNC/utils/websockify/tox.ini rename to image/usr/lib/noVNC/utils/websockify/tox.ini diff --git a/noVNC/utils/websockify/websockify.py b/image/usr/lib/noVNC/utils/websockify/websockify.py similarity index 100% rename from noVNC/utils/websockify/websockify.py rename to image/usr/lib/noVNC/utils/websockify/websockify.py diff --git a/noVNC/utils/websockify/websockify/__init__.py b/image/usr/lib/noVNC/utils/websockify/websockify/__init__.py similarity index 100% rename from noVNC/utils/websockify/websockify/__init__.py rename to image/usr/lib/noVNC/utils/websockify/websockify/__init__.py diff --git a/noVNC/utils/websockify/websockify/auth_plugins.py b/image/usr/lib/noVNC/utils/websockify/websockify/auth_plugins.py similarity index 100% rename from noVNC/utils/websockify/websockify/auth_plugins.py rename to image/usr/lib/noVNC/utils/websockify/websockify/auth_plugins.py diff --git a/noVNC/utils/websockify/websockify/token_plugins.py b/image/usr/lib/noVNC/utils/websockify/websockify/token_plugins.py similarity index 100% rename from noVNC/utils/websockify/websockify/token_plugins.py rename to image/usr/lib/noVNC/utils/websockify/websockify/token_plugins.py diff --git a/noVNC/utils/websockify/websockify/websocket.py b/image/usr/lib/noVNC/utils/websockify/websockify/websocket.py similarity index 100% rename from noVNC/utils/websockify/websockify/websocket.py rename to image/usr/lib/noVNC/utils/websockify/websockify/websocket.py diff --git a/noVNC/utils/websockify/websockify/websocketproxy.py b/image/usr/lib/noVNC/utils/websockify/websockify/websocketproxy.py similarity index 100% rename from noVNC/utils/websockify/websockify/websocketproxy.py rename to image/usr/lib/noVNC/utils/websockify/websockify/websocketproxy.py diff --git a/noVNC/utils/websockify/websockify/websocketserver.py b/image/usr/lib/noVNC/utils/websockify/websockify/websocketserver.py similarity index 100% rename from noVNC/utils/websockify/websockify/websocketserver.py rename to image/usr/lib/noVNC/utils/websockify/websockify/websocketserver.py diff --git a/noVNC/utils/websockify/websockify/websockifyserver.py b/image/usr/lib/noVNC/utils/websockify/websockify/websockifyserver.py similarity index 100% rename from noVNC/utils/websockify/websockify/websockifyserver.py rename to image/usr/lib/noVNC/utils/websockify/websockify/websockifyserver.py diff --git a/noVNC/utils/websockify/wsirc.html b/image/usr/lib/noVNC/utils/websockify/wsirc.html similarity index 100% rename from noVNC/utils/websockify/wsirc.html rename to image/usr/lib/noVNC/utils/websockify/wsirc.html diff --git a/noVNC/utils/websockify/wstelnet.html b/image/usr/lib/noVNC/utils/websockify/wstelnet.html similarity index 100% rename from noVNC/utils/websockify/wstelnet.html rename to image/usr/lib/noVNC/utils/websockify/wstelnet.html diff --git a/noVNC/vnc.html b/image/usr/lib/noVNC/vnc.html similarity index 100% rename from noVNC/vnc.html rename to image/usr/lib/noVNC/vnc.html diff --git a/noVNC/vnc_auto.html b/image/usr/lib/noVNC/vnc_auto.html similarity index 100% rename from noVNC/vnc_auto.html rename to image/usr/lib/noVNC/vnc_auto.html diff --git a/web/config/__init__.py b/image/usr/lib/web/config/__init__.py similarity index 100% rename from web/config/__init__.py rename to image/usr/lib/web/config/__init__.py diff --git a/web/lightop/__init__.py b/image/usr/lib/web/lightop/__init__.py similarity index 98% rename from web/lightop/__init__.py rename to image/usr/lib/web/lightop/__init__.py index 8fbd1741..8e2e19f1 100644 --- a/web/lightop/__init__.py +++ b/image/usr/lib/web/lightop/__init__.py @@ -12,7 +12,6 @@ CONFIG = os.environ.get('CONFIG') or 'config.Development' app.config.from_object('config.Default') app.config.from_object(CONFIG) -app.config.from_pyfile('application.cfg') # logging import logging diff --git a/web/db/__init__.py b/image/usr/lib/web/log/__init__.py similarity index 100% rename from web/db/__init__.py rename to image/usr/lib/web/log/__init__.py diff --git a/web/log/config.py b/image/usr/lib/web/log/config.py similarity index 100% rename from web/log/config.py rename to image/usr/lib/web/log/config.py diff --git a/web/requirements.txt b/image/usr/lib/web/requirements.txt similarity index 100% rename from web/requirements.txt rename to image/usr/lib/web/requirements.txt diff --git a/web/run.py b/image/usr/lib/web/run.py similarity index 80% rename from web/run.py rename to image/usr/lib/web/run.py index 7950aef8..bb602824 100755 --- a/web/run.py +++ b/image/usr/lib/web/run.py @@ -68,29 +68,7 @@ def killpg(pgid, send_signal=signal.SIGKILL): pass -def create_instance_config(): - if not os.path.exists('instance'): - os.makedirs('instance') - - with open(os.path.join('instance', 'application.cfg'), 'wb+') as f: - f.write('SECRET_KEY = \'') - f.write("".join("\\x{:02x}".format(ord(c)) for c in os.urandom(24))) - f.write('\'\n') - f.write('VERSION = \'') - if os.path.exists('version'): - with open('version') as fv: - version = fv.read().strip() - f.write(version) - else: - f.write('unknown') - f.write('\'\n') - if '--debug' not in sys.argv: - os.chmod(os.path.join('instance', 'application.cfg'), 0600) - - def main(): - create_instance_config() - def run_server(): import socket @@ -124,9 +102,6 @@ def run_server(): CONFIG = 'config.Staging' if STAGING else CONFIG PORT = 6079 PROGRAMS = tuple() - #PROGRAMS = (('sudo nginx -c ${PWD}/nginx.conf'),) - #PROGRAMS = ('python lxc-monitor.py', - # 'python docker-monitor.py') signal.signal(signal.SIGCHLD, signal.SIG_IGN) if DEBUG or STAGING: diff --git a/web/static/6df2b309.favicon.ico b/image/usr/lib/web/static/6df2b309.favicon.ico similarity index 100% rename from web/static/6df2b309.favicon.ico rename to image/usr/lib/web/static/6df2b309.favicon.ico diff --git a/web/static/fonts/glyphicons-halflings-regular.eot b/image/usr/lib/web/static/fonts/glyphicons-halflings-regular.eot similarity index 100% rename from web/static/fonts/glyphicons-halflings-regular.eot rename to image/usr/lib/web/static/fonts/glyphicons-halflings-regular.eot diff --git a/web/static/fonts/glyphicons-halflings-regular.svg b/image/usr/lib/web/static/fonts/glyphicons-halflings-regular.svg similarity index 100% rename from web/static/fonts/glyphicons-halflings-regular.svg rename to image/usr/lib/web/static/fonts/glyphicons-halflings-regular.svg diff --git a/web/static/fonts/glyphicons-halflings-regular.ttf b/image/usr/lib/web/static/fonts/glyphicons-halflings-regular.ttf similarity index 100% rename from web/static/fonts/glyphicons-halflings-regular.ttf rename to image/usr/lib/web/static/fonts/glyphicons-halflings-regular.ttf diff --git a/web/static/fonts/glyphicons-halflings-regular.woff b/image/usr/lib/web/static/fonts/glyphicons-halflings-regular.woff similarity index 100% rename from web/static/fonts/glyphicons-halflings-regular.woff rename to image/usr/lib/web/static/fonts/glyphicons-halflings-regular.woff diff --git a/web/static/index.html b/image/usr/lib/web/static/index.html similarity index 100% rename from web/static/index.html rename to image/usr/lib/web/static/index.html diff --git a/web/static/robots.txt b/image/usr/lib/web/static/robots.txt similarity index 100% rename from web/static/robots.txt rename to image/usr/lib/web/static/robots.txt diff --git a/web/static/scripts/046bbd30.main.js b/image/usr/lib/web/static/scripts/046bbd30.main.js similarity index 100% rename from web/static/scripts/046bbd30.main.js rename to image/usr/lib/web/static/scripts/046bbd30.main.js diff --git a/web/static/scripts/2c80432f.plugins.js b/image/usr/lib/web/static/scripts/2c80432f.plugins.js similarity index 100% rename from web/static/scripts/2c80432f.plugins.js rename to image/usr/lib/web/static/scripts/2c80432f.plugins.js diff --git a/web/static/scripts/9cd97fdd.vendor.js b/image/usr/lib/web/static/scripts/9cd97fdd.vendor.js similarity index 100% rename from web/static/scripts/9cd97fdd.vendor.js rename to image/usr/lib/web/static/scripts/9cd97fdd.vendor.js diff --git a/web/static/styles/536b3e9f.main.css b/image/usr/lib/web/static/styles/536b3e9f.main.css similarity index 100% rename from web/static/styles/536b3e9f.main.css rename to image/usr/lib/web/static/styles/536b3e9f.main.css diff --git a/web/static/styles/57fdc80f.vendor.css b/image/usr/lib/web/static/styles/57fdc80f.vendor.css similarity index 100% rename from web/static/styles/57fdc80f.vendor.css rename to image/usr/lib/web/static/styles/57fdc80f.vendor.css diff --git a/doro-lxde-wallpapers/bg1.jpg b/image/usr/share/doro-lxde-wallpapers/bg1.jpg similarity index 100% rename from doro-lxde-wallpapers/bg1.jpg rename to image/usr/share/doro-lxde-wallpapers/bg1.jpg diff --git a/doro-lxde-wallpapers/bg2.jpg b/image/usr/share/doro-lxde-wallpapers/bg2.jpg similarity index 100% rename from doro-lxde-wallpapers/bg2.jpg rename to image/usr/share/doro-lxde-wallpapers/bg2.jpg diff --git a/doro-lxde-wallpapers/bg3.jpg b/image/usr/share/doro-lxde-wallpapers/bg3.jpg similarity index 100% rename from doro-lxde-wallpapers/bg3.jpg rename to image/usr/share/doro-lxde-wallpapers/bg3.jpg diff --git a/doro-lxde-wallpapers/bg4.jpg b/image/usr/share/doro-lxde-wallpapers/bg4.jpg similarity index 100% rename from doro-lxde-wallpapers/bg4.jpg rename to image/usr/share/doro-lxde-wallpapers/bg4.jpg diff --git a/doro-lxde-wallpapers/desktop-items-0.conf b/image/usr/share/doro-lxde-wallpapers/desktop-items-0.conf similarity index 100% rename from doro-lxde-wallpapers/desktop-items-0.conf rename to image/usr/share/doro-lxde-wallpapers/desktop-items-0.conf diff --git a/repositories b/repositories deleted file mode 100644 index 1f8cb86a..00000000 --- a/repositories +++ /dev/null @@ -1 +0,0 @@ -{"qnap/ubuntu-vnc-desktop":{"latest":"57c819603da53817908a74d229c1a226df0c96fc47370bef06b176ba4d96c313"}} diff --git a/tty.js/node_modules/.bin/tty.js b/tty.js/node_modules/.bin/tty.js deleted file mode 120000 index bac305c5..00000000 --- a/tty.js/node_modules/.bin/tty.js +++ /dev/null @@ -1 +0,0 @@ -../tty.js/bin/tty.js \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/.npmignore b/tty.js/node_modules/tty.js/.npmignore deleted file mode 100644 index 7bf00685..00000000 --- a/tty.js/node_modules/tty.js/.npmignore +++ /dev/null @@ -1,11 +0,0 @@ -.git* -build/ -.lock-wscript -out/ -Makefile.gyp -*.Makefile -*.target.gyp.mk -node_modules/ -img/ -test/ -*.node diff --git a/tty.js/node_modules/tty.js/LICENSE b/tty.js/node_modules/tty.js/LICENSE deleted file mode 100644 index 259500c9..00000000 --- a/tty.js/node_modules/tty.js/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012-2013, Christopher Jeffrey (https://github.com/chjj/) - -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/tty.js/node_modules/tty.js/README.md b/tty.js/node_modules/tty.js/README.md deleted file mode 100644 index 74a751c0..00000000 --- a/tty.js/node_modules/tty.js/README.md +++ /dev/null @@ -1,170 +0,0 @@ -# tty.js - -A terminal in your browser using node.js and socket.io. Based on Fabrice -Bellard's vt100 for [jslinux](http://bellard.org/jslinux/). - -For the standalone web terminal, see -[**term.js**](https://github.com/chjj/term.js). - -For the lowlevel terminal spawner, see -[**pty.js**](https://github.com/chjj/pty.js). - -## Screenshots - -### irssi - -![](http://i.imgur.com/wqare.png) - -### vim & alsamixer - -![](http://i.imgur.com/Zg1Jq.png) - -### bash - -![](http://i.imgur.com/HimZb.png) - -## Features - -- Tabs, Stacking Windows, Maximizable Terminals -- Screen/Tmux-like keys (optional) -- Ability to efficiently render programs: vim, mc, irssi, vifm, etc. -- Support for xterm mouse events -- 256 color support -- Persistent sessions - -## Install - -``` bash -$ npm install tty.js -``` - -## Usage - -tty.js is an app, but it's also possible to hook into it programatically. - -``` js -var tty = require('tty.js'); - -var app = tty.createServer({ - shell: 'bash', - users: { - foo: 'bar' - }, - port: 8000 -}); - -app.get('/foo', function(req, res, next) { - res.send('bar'); -}); - -app.listen(); -``` - -## Configuration - -Configuration is stored in `~/.tty.js/config.json` or `~/.tty.js` as a single -JSON file. An example configuration file looks like: - -``` json -{ - "users": { - "hello": "world" - }, - "https": { - "key": "./server.key", - "cert": "./server.crt" - }, - "port": 8080, - "hostname": "127.0.0.1", - "shell": "sh", - "shellArgs": ["arg1", "arg2"], - "static": "./static", - "limitGlobal": 10000, - "limitPerUser": 1000, - "localOnly": false, - "cwd": ".", - "syncSession": false, - "sessionTimeout": 600000, - "log": true, - "io": { "log": false }, - "debug": false, - "term": { - "termName": "xterm", - "geometry": [80, 24], - "scrollback": 1000, - "visualBell": false, - "popOnBell": false, - "cursorBlink": false, - "screenKeys": false, - "colors": [ - "#2e3436", - "#cc0000", - "#4e9a06", - "#c4a000", - "#3465a4", - "#75507b", - "#06989a", - "#d3d7cf", - "#555753", - "#ef2929", - "#8ae234", - "#fce94f", - "#729fcf", - "#ad7fa8", - "#34e2e2", - "#eeeeec" - ] - } -} -``` - -Usernames and passwords can be plaintext or sha1 hashes. - -### 256 colors - -If tty.js fails to check your terminfo properly, you can force your `TERM` -to `xterm-256color` by setting `"termName": "xterm-256color"` in your config. - -## Security - -tty.js currently has https as an option. It also has express' default basic -auth middleware as an option, until it possibly gets something more robust. -It's ultimately up to you to make sure no one has access to your terminals -but you. - -## CLI - -- `tty.js --port 3000` - start and bind to port 3000. -- `tty.js --daemonize` - daemonize process. -- `tty.js --config ~/my-config.json` - specify config file. - -## TERM - -The main goal of tty.js is to eventually write a full xterm emulator. -This goal has almost been reached, but there are a few control sequences -not implemented fully. `TERM` should render everything fine when set to -`xterm`. - -## Portability - -tty.js should ultimately be able to work on any unix that implements unix98 -tty's and `forkpty(3)`. tty.js builds on linux and osx, and it *should* build -on NetBSD, FreeBSD, and OpenBSD as well. If you have trouble building, please -post an issue. - -## Todo - -The distance to go before full xterm compatibility. - -- VT52 codes for compatibility -- All vt400 rectangle sequences -- Remaining DEC private modes -- Miscellaneous sequences: cursor shape, window title -- Origin Mode, Insert Mode -- Proper Tab Setting - -## License - -Copyright (c) 2012-2013, Christopher Jeffrey (MIT License) - -[1]: http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#Mouse%20Tracking diff --git a/tty.js/node_modules/tty.js/bin/tty.js b/tty.js/node_modules/tty.js/bin/tty.js deleted file mode 100755 index e1c35ad5..00000000 --- a/tty.js/node_modules/tty.js/bin/tty.js +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env node - -process.title = 'tty.js'; - -var tty = require('../'); - -var conf = tty.config.readConfig() - , app = tty.createServer(conf); - -app.listen(); diff --git a/tty.js/node_modules/tty.js/index.js b/tty.js/node_modules/tty.js/index.js deleted file mode 100644 index 1773aed0..00000000 --- a/tty.js/node_modules/tty.js/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/tty.js'); diff --git a/tty.js/node_modules/tty.js/lib/config.js b/tty.js/node_modules/tty.js/lib/config.js deleted file mode 100644 index 119fcd97..00000000 --- a/tty.js/node_modules/tty.js/lib/config.js +++ /dev/null @@ -1,477 +0,0 @@ -/** - * tty.js: config.js - * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License) - */ - -var path = require('path') - , fs = require('fs') - , logger = require('./logger'); - -/** - * Options - */ - -var options; - -/** - * Read Config - */ - -function readConfig(file) { - var home = process.env.HOME - , conf = {} - , dir - , json; - - if (file || options.config) { - file = path.resolve(process.cwd(), file || options.config); - dir = path.dirname(file); - json = options.config; - } else { - dir = process.env.TTYJS_PATH || path.join(home, '.tty.js'); - json = path.join(dir, 'config.json'); - } - - if (exists(dir) && exists(json)) { - if (!fs.statSync(dir).isDirectory()) { - json = dir; - dir = home; - } - - conf = JSON.parse(fs.readFileSync(json, 'utf8')); - } else { - if (!exists(dir)) { - fs.mkdirSync(dir, 0700); - } - - fs.writeFileSync(json, JSON.stringify(conf, null, 2)); - fs.chmodSync(json, 0600); - } - - // expose paths - conf.dir = dir; - conf.json = json; - - // flag - conf.__read = true; - - return checkConfig(conf); -} - -function checkConfig(conf) { - if (typeof conf === 'string') { - return readConfig(conf); - } - - conf = clone(conf || {}); - - if (conf.config) { - var file = conf.config; - delete conf.config; - merge(conf, readConfig(file)); - } - - // flag - if (conf.__check) return conf; - conf.__check = true; - - // merge options - merge(conf, options.conf); - - // directory and config file - conf.dir = conf.dir || ''; - conf.json = conf.json || ''; - - // users - conf.users = conf.users || {}; - if (conf.auth && conf.auth.username && !conf.auth.disabled) { - conf.users[conf.auth.username] = conf.auth.password; - } - - // https - conf.https = conf.https || conf.ssl || conf.tls || {}; - conf.https = !conf.https.disabled && { - key: tryRead(conf.dir, conf.https.key || 'server.key') || conf.https.key, - cert: tryRead(conf.dir, conf.https.cert || 'server.crt') || conf.https.cert - }; - - // port - conf.port = conf.port || 8080; - - // hostname - conf.hostname; // '0.0.0.0' - - // shell, process name - if (conf.shell && ~conf.shell.indexOf('/')) { - conf.shell = path.resolve(conf.dir, conf.shell); - } - conf.shell = conf.shell || process.env.SHELL || 'sh'; - - // arguments to shell, if they exist - conf.shellArgs = conf.shellArgs || []; - - // static directory - conf.static = tryResolve(conf.dir, conf.static || 'static'); - - // limits - conf.limitPerUser = conf.limitPerUser || Infinity; - conf.limitGlobal = conf.limitGlobal || Infinity; - - // local - conf.localOnly = !!conf.localOnly; - - // sync session - conf.syncSession; // false - - // session timeout - if (typeof conf.sessionTimeout !== 'number') { - conf.sessionTimeout = 10 * 60 * 1000; - } - - // log - conf.log; // true - - // cwd - if (conf.cwd) { - conf.cwd = path.resolve(conf.dir, conf.cwd); - } - - // socket.io - conf.io; // null - - // term - conf.term = conf.term || {}; - - conf.termName = conf.termName || conf.term.termName || terminfo(); - conf.term.termName = conf.termName; - - conf.term.termName; // 'xterm' - conf.term.geometry; // [80, 24] - conf.term.visualBell; // false - conf.term.popOnBell; // false - conf.term.cursorBlink; // true - conf.term.scrollback; // 1000 - conf.term.screenKeys; // false - conf.term.colors; // [] - conf.term.programFeatures; // false - - conf.debug = conf.debug || conf.term.debug || false; - conf.term.debug = conf.debug; // false - - // check legacy features - checkLegacy(conf); - - return conf; -} - -/** - * Check Legacy - */ - -function checkLegacy(conf) { - var out = []; - - if (conf.auth) { - logger.error('`auth` is deprecated, please use `users` instead.'); - } - - if (conf.userScript) { - out.push('' - + '`userScript` is deprecated, please place ' - + '`user.js` in `~/.tty.js/static/user.js` instead.'); - } - - if (conf.userStylesheet) { - out.push('' - + '`userStylesheet` is deprecated, please ' - + 'place `user.js` in `~/.tty.js/static/user.js` instead.'); - } - - if (conf.stylesheet) { - out.push('' - + '`stylesheet` is deprecated, please place ' - + '`user.css` in `~/.tty.js/static/user.css` instead.'); - } - - if (conf.hooks) { - out.push('' - + '`hooks` is deprecated, please programmatically ' - + 'hook into your tty.js server instead.'); - } - - if (out.length) { - out.forEach(function(out) { - logger.error(out); - }); - logger.error('Exiting.'); - process.exit(1); - } -} - -/** - * Terminfo - */ - -function terminfo() { - // tput -Txterm-256color longname - var terminfo = exists('/usr/share/terminfo/x/xterm+256color') - || exists('/usr/share/terminfo/x/xterm-256color'); - - // Default $TERM - var TERM = terminfo - ? 'xterm-256color' - : 'xterm'; - - return TERM; -} - -/** - * Daemonize - */ - -function daemonize() { - if (process.env.IS_DAEMONIC) return; - - var spawn = require('child_process').spawn - , argv = process.argv.slice() - , code; - - argv = argv.map(function(arg) { - arg = arg.replace(/(["$\\])/g, '\\$1'); - return '"' + arg + '"'; - }).join(' '); - - code = '(IS_DAEMONIC=1 setsid ' + argv + ' > /dev/null 2>& 1 &)'; - spawn('/bin/sh', ['-c', code]).on('exit', function(code) { - process.exit(code || 0); - }); - - stop(); -} - -/** - * Help - */ - -function help() { - var spawn = require('child_process').spawn; - - var options = { - cwd: process.cwd(), - env: process.env, - setsid: false, - customFds: [0, 1, 2] - }; - - spawn('man', - [__dirname + '/../man/tty.js.1'], - options); - - stop(); -} - -/** - * Kill - */ - -function killall() { - var spawn = require('child_process').spawn; - - var options = { - cwd: process.cwd(), - env: process.env, - setsid: false, - customFds: [0, 1, 2] - }; - - spawn('/bin/sh', - ['-c', 'kill $(ps ax | grep -v grep | grep tty.js | awk \'{print $1}\')'], - options); - - stop(); -} - -/** - * Parse Arguments - */ - -function parseArg() { - var argv = process.argv.slice() - , opt = { conf: {} } - , arg; - - function getarg() { - var arg = argv.shift(); - - if (arg.indexOf('--') === 0) { - // e.g. --opt - arg = arg.split('='); - if (arg.length > 1) { - // e.g. --opt=val - argv.unshift(arg.slice(1).join('=')); - } - arg = arg[0]; - } else if (arg[0] === '-') { - if (arg.length > 2) { - // e.g. -abc - argv = arg.substring(1).split('').map(function(ch) { - return '-' + ch; - }).concat(argv); - arg = argv.shift(); - } else { - // e.g. -a - } - } else { - // e.g. foo - } - - return arg; - } - - while (argv.length) { - arg = getarg(); - switch (arg) { - case '-p': - case '--port': - opt.conf.port = +argv.shift(); - break; - case '-c': - case '--config': - opt.config = argv.shift(); - break; - case '--path': - break; - case '-h': - case '--help': - help(); - break; - case 'production': - case '--production': - case '-d': - case '--daemonize': - daemonize(); - break; - case '-k': - case '--kill': - killall(); - break; - default: - break; - } - } - - return opt; -} - -options = exports.options = parseArg(); - -/** - * Xresources - */ - -function readResources() { - var colors = [] - , defs = {} - , def - , color - , text; - - text = tryRead(process.env.HOME, '.Xresources'); - if (!text) return colors; - - def = /#\s*define\s+((?:[^\s]|\\\s)+)\s+((?:[^\n]|\\\n)+)/g; - text = text.replace(def, function(__, name, val) { - name = name.replace(/\\\s/g, ''); - defs[name] = val.replace(/\\\n/g, ''); - return ''; - }); - - text = text.replace(/[^\s]+/g, function(name) { - return defs[name] || name; - }); - - color = /(?:^|\n)[^\s]*(?:\*|\.)color(\d+):([^\n]+)/g; - text.replace(color, function(__, no, color) { - if (!colors[no]) colors[no] = color.trim(); - }); - - return colors; -} - -/** - * Helpers - */ - -function tryRequire() { - try { - return require(path.resolve.apply(path, arguments)); - } catch (e) { - ; - } -} - -function tryResolve() { - var file = path.resolve.apply(path, arguments); - if (exists(file)) return file; -} - -function tryRead() { - try { - var file = path.resolve.apply(path, arguments); - return fs.readFileSync(file, 'utf8'); - } catch (e) { - ; - } -} - -function exists(file) { - try { - fs.statSync(file); - return true; - } catch (e) { - return false; - } -} - -function merge(i, o) { - Object.keys(o).forEach(function(key) { - i[key] = o[key]; - }); - return i; -} - -function ensure(i, o) { - Object.keys(o).forEach(function(key) { - if (!i[key]) i[key] = o[key]; - }); - return i; -} - -function clone(obj) { - return merge({}, obj); -} - -function stop() { - process.once('uncaughtException', function() {}); - throw 'stop'; -} - -/** - * Expose - */ - -exports.readConfig = readConfig; -exports.checkConfig = checkConfig; -exports.xresources = readResources(); - -exports.helpers = { - tryRequire: tryRequire, - tryResolve: tryResolve, - tryRead: tryRead, - exists: exists, - merge: merge, - ensure: ensure, - clone: clone -}; - -merge(exports, exports.helpers); diff --git a/tty.js/node_modules/tty.js/lib/logger.js b/tty.js/node_modules/tty.js/lib/logger.js deleted file mode 100644 index f1f8843c..00000000 --- a/tty.js/node_modules/tty.js/lib/logger.js +++ /dev/null @@ -1,61 +0,0 @@ -/** - * tty.js: logger.js - * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License) - */ - -var slice = Array.prototype.slice - , isatty = require('tty').isatty; - -/** - * Logger - */ - -function logger(level) { - var args = slice.call(arguments, 1); - - if (typeof args[0] !== 'string') args.unshift(''); - - level = logger.levels[level]; - - args[0] = '\x1b[' - + level[0] - + 'm[' - + logger.prefix - + ']\x1b[m ' - + args[0]; - - if ((level[1] === 'log' && !logger.isatty[1]) - || (level[1] === 'error' && !logger.isatty[2])) { - args[0] = args[0].replace(/\x1b\[(?:\d+(?:;\d+)*)?m/g, ''); - } - - return console[level[1]].apply(console, args); -} - -logger.isatty = [isatty(0), isatty(1), isatty(2)]; - -logger.levels = { - 'log': [34, 'log'], - 'error': [41, 'error'], - 'warning': [31, 'error'] -}; - -logger.prefix = 'tty.js'; - -logger.log = function() { - return logger.apply(null, ['log'].concat(slice.call(arguments))); -}; - -logger.warning = function() { - return logger.apply(null, ['warning'].concat(slice.call(arguments))); -}; - -logger.error = function() { - return logger.apply(null, ['error'].concat(slice.call(arguments))); -}; - -/** - * Expose - */ - -module.exports = logger; diff --git a/tty.js/node_modules/tty.js/lib/tty.js b/tty.js/node_modules/tty.js/lib/tty.js deleted file mode 100644 index 2c97cf28..00000000 --- a/tty.js/node_modules/tty.js/lib/tty.js +++ /dev/null @@ -1,673 +0,0 @@ -/** - * tty.js - * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License) - */ - -/** - * Modules - */ - -var path = require('path') - , fs = require('fs') - , Stream = require('stream').Stream - , EventEmitter = require('events').EventEmitter; - -var express = require('express') - , io = require('socket.io') - , pty = require('pty.js') - , term = require('term.js'); - -var config = require('./config') - , logger = require('./logger'); - -/** - * Server - */ - -function Server(conf) { - if (!(this instanceof Server)) { - return new Server(conf); - } - - var self = this - , conf = config.checkConfig(conf); - - this.app = express(); - this.server = conf.https && conf.https.key - ? require('https').createServer(conf.https) - : require('http').createServer(); - this.server.on('request', this.app); - - this.sessions = {}; - this.conf = conf; - this._auth = this._basicAuth(); - this.io = io.listen(this.server, conf.io || { - log: false - }); - - this.on('listening', function() { - self.log('Listening on port \x1b[1m%s\x1b[m.', self.conf.port); - }); - - this.init(); -} - -Server.prototype.init = function() { - this.init = function() {}; - if (this.conf.localOnly) this.initLocal(); - this.initMiddleware(); - this.initRoutes(); - this.initIO(); -}; - -Server.prototype.initLocal = function() { - var self = this; - this.warning('Only accepting local connections.'), - this.server.on('connection', function(socket) { - var address = socket.remoteAddress; - if (address !== '127.0.0.1' && address !== '::1') { - try { - socket.destroy(); - } catch (e) { - ; - } - self.log('Attempted connection from %s. Refused.', address); - } - }); -}; - -Server.prototype.initMiddleware = function() { - var self = this - , conf = this.conf; - - this.use(function(req, res, next) { - var setHeader = res.setHeader; - res.setHeader = function(name) { - switch (name) { - case 'Cache-Control': - case 'Last-Modified': - case 'ETag': - return; - } - return setHeader.apply(res, arguments); - }; - next(); - }); - - this.use(function(req, res, next) { - return self._auth(req, res, next); - }); - - this.use(term.middleware()); - - if (conf.static) { - this.use(express.static(conf.static)); - } - - // If there is a custom favicon in the custom - // static directory, this will be ignored. - this.use(express.favicon(__dirname + '/../static/favicon.ico')); - - this.use(this.app.router); - - this.use(express.static(__dirname + '/../static')); -}; - -Server.prototype.setAuth = function(func) { - this._auth = func; -}; - -Server.prototype.initRoutes = function() { - var self = this; - this.get('/options.js', function(req, res, next) { - return self.handleOptions(req, res, next); - }); -}; - -Server.prototype.handleOptions = function(req, res, next) { - var self = this - , conf = this.conf; - - res.contentType('.js'); - fs.readFile(conf.json, 'utf8', function(err, data) { - try { - data = JSON.parse(data) || {}; - } catch(e) { - data = {}; - } - - if (data.term) { - Object.keys(data.term).forEach(function(key) { - conf.term[key] = data.term[key]; - }); - } - - res.send('Terminal._opts = ' - + JSON.stringify(conf.term, null, 2) - + ';\n' - + '(' - + applyConfig - + ')();'); - }); -}; - -Server.prototype.initIO = function() { - var self = this - , io = this.io; - - io.configure(function() { - io.disable('log'); - }); - - io.set('authorization', function(data, next) { - return self.handleAuth(data, next); - }); - - io.sockets.on('connection', function(socket) { - return self.handleConnection(socket); - }); -}; - -Server.prototype.handleAuth = function(data, next) { - var io = this.io; - data.__proto__ = Stream.prototype; - this._auth(data, null, function(err) { - data.user = data.remoteUser || data.user; - return !err - ? next(null, true) - : next(err); - }); -}; - -Server.prototype.handleConnection = function(socket) { - var session = new Session(this, socket); - - // XXX Possibly wrap socket events from inside Session - // constructor, and do: session.on('create') - // or session.on('create term'). - socket.on('create', function(cols, rows, func) { - return session.handleCreate(cols, rows, func); - }); - - socket.on('data', function(id, data) { - return session.handleData(id, data); - }); - - socket.on('kill', function(id) { - return session.handleKill(id); - }); - - socket.on('resize', function(id, cols, rows) { - return session.handleResize(id, cols, rows); - }); - - socket.on('process', function(id, func) { - return session.handleProcess(id, func); - }); - - socket.on('disconnect', function() { - return session.handleDisconnect(); - }); - - socket.on('request paste', function(func) { - return session.handlePaste(func); - }); -}; - -Server.prototype._basicAuth = function() { - var self = this - , conf = this.conf; - - if (!Object.keys(conf.users).length) { - return function(req, res, next) { - next(); - }; - } - - var crypto = require('crypto') - , users = conf.users - , hashedUsers = {} - , saidWarning; - - function sha1(text) { - return crypto - .createHash('sha1') - .update(text) - .digest('hex'); - } - - function hashed(hash) { - if (!hash) return; - return hash.length === 40 && !/[^a-f0-9]/.test(hash); - } - - function verify(user, pass, next) { - var username = sha1(user) - , password; - - if (!Object.hasOwnProperty.call(hashedUsers, username)) { - return next(); - } - - password = hashedUsers[username]; - - if (sha1(pass) !== password) return next(true); - - next(null, user); - } - - // Hash everything for consistency. - Object.keys(users).forEach(function(name) { - if (!saidWarning && !hashed(users[name])) { - self.warning('You should sha1 your user information.'); - saidWarning = true; - } - - var username = !hashed(name) - ? sha1(name) - : name; - - hashedUsers[username] = !hashed(users[name]) - ? sha1(users[name]) - : users[name]; - }); - - return express.basicAuth(verify); -}; - -Server.prototype.log = function() { - return this._log('log', slice.call(arguments)); -}; - -Server.prototype.error = function() { - return this._log('error', slice.call(arguments)); -}; - -Server.prototype.warning = function() { - return this._log('warning', slice.call(arguments)); -}; - -Server.prototype._log = function(level, args) { - if (this.conf.log === false) return; - args.unshift(level); - return logger.apply(null, args); -}; - -Server.prototype.listen = function(port, hostname, func) { - port = port || this.conf.port || 8080; - hostname = hostname || this.conf.hostname; - return this.server.listen(port, hostname, func); -}; - -/** - * Session - */ - -function Session(server, socket) { - this.server = server; - this.socket = socket; - this.terms = {}; - this.req = socket.handshake; - - var conf = this.server.conf - , terms = this.terms - , sessions = this.server.sessions - , req = socket.handshake; - - this.user = req.user; - this.id = req.user || this.uid(); - - // Kill/sync older session. - if (conf.syncSession) { - var stale = sessions[this.id]; - if (stale) { - // Possibly do something like this instead: - // if (!stale.socket.disconnected) - // return this.id += '~', sessions[this.id] = this; - stale.disconnect(); - stale.socket = socket; - stale.sync(); - stale.log('Session \x1b[1m%s\x1b[m resumed.', stale.id); - return stale; - } - } - - sessions[this.id] = this; - - this.log('Session \x1b[1m%s\x1b[m created.', this.id); -} - -Session.uid = 0; -Session.prototype.uid = function() { - if (this.server.conf.syncSession) { - var req = this.req; - return req.address.address - + '|' + req.address.port - + '|' + req.headers['user-agent']; - } - return Session.uid++ + ''; -}; - -Session.prototype.disconnect = function() { - try { - this.socket._events = {}; - this.socket.$emit = function() {}; - this.socket.disconnect(); - } catch (e) { - ; - } - this.clearTimeout(); -}; - -Session.prototype.log = function() { - return this._log('log', slice.call(arguments)); -}; - -Session.prototype.error = function() { - return this._log('error', slice.call(arguments)); -}; - -Session.prototype.warning = function() { - return this._log('warning', slice.call(arguments)); -}; - -Session.prototype._log = function(level, args) { - if (typeof args[0] !== 'string') args.unshift(''); - var id = this.id.split('|')[0]; - args[0] = '\x1b[1m' + id + '\x1b[m ' + args[0]; - return this.server._log(level, args); -}; - -Session.prototype.sync = function() { - var self = this - , terms = {} - , queue = []; - - Object.keys(this.terms).forEach(function(key) { - var term = self.terms[key]; - terms[key] = { - id: term.pty, - pty: term.pty, - cols: term.cols, - rows: term.rows, - process: sanitize(term.process) - }; - }); - - Object.keys(self.terms).forEach(function(key) { - var term = self.terms[key] - , cols = term.cols - , rows = term.rows; - - // A tricky way to get processes to redraw. - // Some programs won't redraw unless the - // terminal has actually been resized. - term.resize(cols + 1, rows + 1); - queue.push(function() { - term.resize(cols, rows); - }); - - // Send SIGWINCH to our processes, and hopefully - // they will redraw for our resumed session. - // self.terms[key].kill('SIGWINCH'); - }); - - setTimeout(function() { - queue.forEach(function(item) { - item(); - }); - }, 30); - - this.socket.emit('sync', terms); -}; - -Session.prototype.handleCreate = function(cols, rows, func) { - var self = this - , terms = this.terms - , conf = this.server.conf - , socket = this.socket; - - var len = Object.keys(terms).length - , term - , id; - - if (len >= conf.limitPerUser || pty.total >= conf.limitGlobal) { - this.warning('Terminal limit reached.'); - return func({ error: 'Terminal limit.' }); - } - - var shell = typeof conf.shell === 'function' - ? conf.shell(this) - : conf.shell; - - var shellArgs = typeof conf.shellArgs === 'function' - ? conf.shellArgs(this) - : conf.shellArgs; - - term = pty.fork(shell, shellArgs, { - name: conf.termName, - cols: cols, - rows: rows, - cwd: conf.cwd || process.env.HOME - }); - - id = term.pty; - terms[id] = term; - - term.on('data', function(data) { - self.socket.emit('data', id, data); - }); - - term.on('close', function() { - // Make sure it closes - // on the clientside. - self.socket.emit('kill', id); - - // Ensure removal. - if (terms[id]) delete terms[id]; - - self.log( - 'Closed pty (%s): %d.', - term.pty, term.fd); - }); - - this.log( - 'Created pty (id: %s, master: %d, pid: %d).', - id, term.fd, term.pid); - - return func(null, { - id: id, - pty: term.pty, - process: sanitize(conf.shell) - }); -}; - -Session.prototype.handleData = function(id, data) { - var terms = this.terms; - if (!terms[id]) { - this.warning('' - + 'Client attempting to' - + ' write to a non-existent terminal.' - + ' (id: %s)', id); - return; - } - terms[id].write(data); -}; - -Session.prototype.handleKill = function(id) { - var terms = this.terms; - if (!terms[id]) return; - terms[id].destroy(); - delete terms[id]; -}; - -Session.prototype.handleResize = function(id, cols, rows) { - var terms = this.terms; - if (!terms[id]) return; - terms[id].resize(cols, rows); -}; - -Session.prototype.handleProcess = function(id, func) { - var terms = this.terms; - if (!terms[id]) return; - var name = terms[id].process; - return func(null, sanitize(name)); -}; - -Session.prototype.handleDisconnect = function() { - var self = this - , terms = this.terms - , sessions = this.server.sessions - , conf = this.server.conf; - - // XXX Possibly create a second/different - // destroy function to accompany the one - // above? - function destroy() { - var key = Object.keys(terms) - , i = key.length - , term; - - while (i--) { - term = terms[key[i]]; - delete terms[key[i]]; - term.destroy(); - } - - if (sessions[self.id]) { - delete sessions[self.id]; - } - - self.log('Killing all pty\'s.'); - } - - this.log('Client disconnected.'); - - if (!conf.syncSession) { - return destroy(); - } - - if (conf.sessionTimeout <= 0 || conf.sessionTimeout === Infinity) { - return this.log('Preserving session forever.'); - } - - // XXX This could be done differently. - this.setTimeout(conf.sessionTimeout, destroy); - this.log( - 'Preserving session for %d minutes.', - conf.sessionTimeout / 1000 / 60 | 0); -}; - -Session.prototype.handlePaste = function(func) { - var execFile = require('child_process').execFile; - - function exec(args) { - var file = args.shift(); - return execFile(file, args, function(err, stdout, stderr) { - if (err) return func(err); - if (stderr && !stdout) return func(new Error(stderr)); - return func(null, stdout); - }); - } - - // X11: - return exec(['xsel', '-o', '-p'], function(err, text) { - if (!err) return func(null, text); - return exec(['xclip', '-o', '-selection', 'primary'], function(err, text) { - if (!err) return func(null, text); - // Mac: - return exec(['pbpaste'], function(err, text) { - if (!err) return func(null, text); - // Windows: - // return exec(['sfk', 'fromclip'], function(err, text) { - return func(new Error('Failed to get clipboard contents.')); - }); - }); - }); -}; - -Session.prototype.setTimeout = function(time, func) { - this.clearTimeout(); - this.timeout = setTimeout(func.bind(this), time); -}; - -Session.prototype.clearTimeout = function() { - if (!this.timeout) return; - clearTimeout(this.timeout); - delete this.timeout; -}; - -/** - * "Inherit" Express Methods - */ - -// Methods -Object.keys(express.application).forEach(function(key) { - if (Server.prototype[key]) return; - Server.prototype[key] = function() { - return this.app[key].apply(this.app, arguments); - }; -}); - -// Middleware -Object.getOwnPropertyNames(express).forEach(function(key) { - var prop = Object.getOwnPropertyDescriptor(express, key); - if (typeof prop.get !== 'function') return; - Object.defineProperty(Server, key, prop); -}); - -// Server Methods -Object.keys(EventEmitter.prototype).forEach(function(key) { - if (Server.prototype[key]) return; - Server.prototype[key] = function() { - return this.server[key].apply(this.server, arguments); - }; -}); - -/** - * Helpers - */ - -var slice = Array.prototype.slice; - -function sanitize(file) { - if (!file) return ''; - file = file.split(' ')[0] || ''; - return path.basename(file) || ''; -} - -function applyConfig() { - var hasOwnProperty = Object.prototype.hasOwnProperty; - - for (var key in Terminal._opts) { - if (!hasOwnProperty.call(Terminal._opts, key)) continue; - if (typeof Terminal._opts[key] === 'object' && Terminal._opts[key]) { - if (!Terminal[key]) { - Terminal[key] = Terminal._opts[key]; - continue; - } - for (var k in Terminal._opts[key]) { - if (hasOwnProperty.call(Terminal._opts[key], k)) { - Terminal[key][k] = Terminal._opts[key][k]; - } - } - } else { - Terminal[key] = Terminal._opts[key]; - } - } - - delete Terminal._opts; -} - -/** - * Expose - */ - -exports = Server; -exports.Server = Server; -exports.Session = Session; -exports.config = config; -exports.logger = logger; -exports.createServer = Server; - -module.exports = exports; diff --git a/tty.js/node_modules/tty.js/man/tty.js.1 b/tty.js/node_modules/tty.js/man/tty.js.1 deleted file mode 100644 index ea264854..00000000 --- a/tty.js/node_modules/tty.js/man/tty.js.1 +++ /dev/null @@ -1,39 +0,0 @@ -.ds q \N'34' -.TH tty.js 1 - -.SH NAME -tty.js \- a terminal for your browser - -.SH SYNOPSIS -.nf -.B tty.js [\-p port] [\-\-config file] [\-d] -.fi - -.SH DESCRIPTION -.B tty.js -is an xterm for your browser. - -.SH OPTIONS -.TP -.BI \-p,\ \-\-port\ [port] -Specify a port to bind to. The default port can also be specified in the config. -.TP -.BI \-\-config\ [file] -Specify a configuration file, overriding the default of ~/.tty.js/config.json. -.TP -.BI \-d,\ \-\-daemonize -Start the process as a daemon. -.TP -.BI \-h,\ \-\-help -Display help information. -.SH EXAMPLES -.TP -tty.js -d -p 3000 -.TP -tty.js --config ~/my_config.json - -.SH BUGS -Please report any bugs to https://github.com/chjj/tty.js. - -.SH LICENSE -Copyright (c) 2012-2013, Christopher Jeffrey (MIT License) diff --git a/tty.js/node_modules/tty.js/node_modules/.bin/express b/tty.js/node_modules/tty.js/node_modules/.bin/express deleted file mode 120000 index b741d99c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/.bin/express +++ /dev/null @@ -1 +0,0 @@ -../express/bin/express \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/.npmignore b/tty.js/node_modules/tty.js/node_modules/express/.npmignore deleted file mode 100644 index caf574de..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -.git* -docs/ -examples/ -support/ -test/ -testing.js -.DS_Store -coverage.html -lib-cov diff --git a/tty.js/node_modules/tty.js/node_modules/express/.travis.yml b/tty.js/node_modules/tty.js/node_modules/express/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/tty.js/node_modules/tty.js/node_modules/express/History.md b/tty.js/node_modules/tty.js/node_modules/express/History.md deleted file mode 100644 index 1a2b1710..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/History.md +++ /dev/null @@ -1,1091 +0,0 @@ - -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 reponse 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 independant 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/tty.js/node_modules/tty.js/node_modules/express/LICENSE b/tty.js/node_modules/tty.js/node_modules/express/LICENSE deleted file mode 100644 index 36075a3b..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2009-2011 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. \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/Makefile b/tty.js/node_modules/tty.js/node_modules/express/Makefile deleted file mode 100644 index e820e31c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/Makefile +++ /dev/null @@ -1,33 +0,0 @@ - -MOCHA_OPTS= -REPORTER = dot - -check: test - -test: test-unit test-acceptance - -test-unit: - @NODE_ENV=test ./node_modules/.bin/mocha \ - --reporter $(REPORTER) \ - $(MOCHA_OPTS) - -test-acceptance: - @NODE_ENV=test ./node_modules/.bin/mocha \ - --reporter $(REPORTER) \ - --bail \ - test/acceptance/*.js - -test-cov: lib-cov - @EXPRESS_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html - -lib-cov: - @jscoverage lib lib-cov - -benchmark: - @./support/bench - -clean: - rm -f coverage.html - rm -fr lib-cov - -.PHONY: test test-unit test-acceptance benchmark clean diff --git a/tty.js/node_modules/tty.js/node_modules/express/Readme.md b/tty.js/node_modules/tty.js/node_modules/express/Readme.md deleted file mode 100644 index 6bb8b95e..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/Readme.md +++ /dev/null @@ -1,179 +0,0 @@ -![express logo](http://f.cl.ly/items/0V2S1n0K1i3y1c122g04/Screen%20Shot%202012-04-11%20at%209.59.42%20AM.png) - - Fast, unopinionated, minimalist web framework for [node](http://nodejs.org). [![Build Status](https://secure.travis-ci.org/visionmedia/express.png)](http://travis-ci.org/visionmedia/express) - -```js -var express = require('express'); -var app = express(); - -app.get('/', function(req, res){ - res.send('Hello World'); -}); - -app.listen(3000); -``` - -## Installation - - $ npm install -g express - -## Quick Start - - The quickest way to get started with express is to utilize the executable `express(1)` to generate an application as shown below: - - Create the app: - - $ npm install -g express - $ express /tmp/foo && cd /tmp/foo - - Install dependencies: - - $ npm install - - Start the server: - - $ node app - -## Features - - * Built on [Connect](http://github.com/senchalabs/connect) - * Robust routing - * HTTP helpers (redirection, caching, etc) - * View system supporting 14+ template engines - * Content negotiation - * Focus on high performance - * Environment based configuration - * Executable for generating applications quickly - * High test coverage - -## 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. - - Built on Connect you can use _only_ what you need, and nothing more, applications - can be as big or as small as you like, even a single file. Express does - not force you to use any specific ORM or template engine. With support for over - 14 template engines via [Consolidate.js](http://github.com/visionmedia/consolidate.js) - you can quickly craft your perfect framework. - -## More Information - - * Join #express on freenode - * [Google Group](http://groups.google.com/group/express-js) for discussion - * Follow [tjholowaychuk](http://twitter.com/tjholowaychuk) on twitter for updates - * Visit the [Wiki](http://github.com/visionmedia/express/wiki) - * [日本語ドキュメンテーション](http://hideyukisaito.com/doc/expressjs/) by [hideyukisaito](https://github.com/hideyukisaito) - * [Русскоязычная документация](http://express-js.ru/) - -## Viewing Examples - -Clone the Express repo, then install the dev dependencies to install all the example / test suite deps: - - $ git clone git://github.com/visionmedia/express.git --depth 1 - $ cd express - $ npm install - -then run whichever tests you want: - - $ node examples/content-negotiation - -## Running Tests - -To run the test suite first invoke the following command within the repo, installing the development dependencies: - - $ npm install - -then run the tests: - - $ make test - -## Contributors - -``` -project: express -commits: 3559 -active : 468 days -files : 237 -authors: - 1891 Tj Holowaychuk 53.1% - 1285 visionmedia 36.1% - 182 TJ Holowaychuk 5.1% - 54 Aaron Heckmann 1.5% - 34 csausdev 1.0% - 26 ciaranj 0.7% - 21 Robert Sköld 0.6% - 6 Guillermo Rauch 0.2% - 3 Dav Glass 0.1% - 3 Nick Poulden 0.1% - 2 Randy Merrill 0.1% - 2 Benny Wong 0.1% - 2 Hunter Loftis 0.1% - 2 Jake Gordon 0.1% - 2 Brian McKinney 0.1% - 2 Roman Shtylman 0.1% - 2 Ben Weaver 0.1% - 2 Dave Hoover 0.1% - 2 Eivind Fjeldstad 0.1% - 2 Daniel Shaw 0.1% - 1 Matt Colyer 0.0% - 1 Pau Ramon 0.0% - 1 Pero Pejovic 0.0% - 1 Peter Rekdal Sunde 0.0% - 1 Raynos 0.0% - 1 Teng Siong Ong 0.0% - 1 Viktor Kelemen 0.0% - 1 ctide 0.0% - 1 8bitDesigner 0.0% - 1 isaacs 0.0% - 1 mgutz 0.0% - 1 pikeas 0.0% - 1 shuwatto 0.0% - 1 tstrimple 0.0% - 1 ewoudj 0.0% - 1 Adam Sanderson 0.0% - 1 Andrii Kostenko 0.0% - 1 Andy Hiew 0.0% - 1 Arpad Borsos 0.0% - 1 Ashwin Purohit 0.0% - 1 Benjen 0.0% - 1 Darren Torpey 0.0% - 1 Greg Ritter 0.0% - 1 Gregory Ritter 0.0% - 1 James Herdman 0.0% - 1 Jim Snodgrass 0.0% - 1 Joe McCann 0.0% - 1 Jonathan Dumaine 0.0% - 1 Jonathan Palardy 0.0% - 1 Jonathan Zacsh 0.0% - 1 Justin Lilly 0.0% - 1 Ken Sato 0.0% - 1 Maciej Małecki 0.0% - 1 Masahiro Hayashi 0.0% -``` - -## License - -(The MIT License) - -Copyright (c) 2009-2012 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tty.js/node_modules/tty.js/node_modules/express/bin/express b/tty.js/node_modules/tty.js/node_modules/express/bin/express deleted file mode 100755 index 3c0090c6..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/bin/express +++ /dev/null @@ -1,422 +0,0 @@ -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var exec = require('child_process').exec - , program = require('commander') - , mkdirp = require('mkdirp') - , pkg = require('../package.json') - , version = pkg.version - , os = require('os') - , fs = require('fs'); - -// CLI - -program - .version(version) - .option('-s, --sessions', 'add session support') - .option('-e, --ejs', 'add ejs engine support (defaults to jade)') - .option('-J, --jshtml', 'add jshtml engine support (defaults to jade)') - .option('-H, --hogan', 'add hogan.js engine support') - .option('-c, --css ', 'add stylesheet support (less|stylus) (defaults to plain css)') - .option('-f, --force', 'force on non-empty directory') - .parse(process.argv); - -// Path - -var path = program.args.shift() || '.'; - -// end-of-line code - -var eol = 'win32' == os.platform() ? '\r\n' : '\n' - -// Template engine - -program.template = 'jade'; -if (program.ejs) program.template = 'ejs'; -if (program.jshtml) program.template = 'jshtml'; -if (program.hogan) program.template = 'hjs'; - -/** - * Routes index template. - */ - -var index = [ - '' - , '/*' - , ' * GET home page.' - , ' */' - , '' - , 'exports.index = function(req, res){' - , ' res.render(\'index\', { title: \'Express\' });' - , '};' -].join(eol); - -/** - * Routes users template. - */ - -var users = [ - '' - , '/*' - , ' * GET users listing.' - , ' */' - , '' - , 'exports.list = function(req, res){' - , ' res.send("respond with a resource");' - , '};' -].join(eol); - -/** - * Jade layout template. - */ - -var jadeLayout = [ - 'doctype 5' - , 'html' - , ' head' - , ' title= title' - , ' link(rel=\'stylesheet\', href=\'/stylesheets/style.css\')' - , ' body' - , ' block content' -].join(eol); - -/** - * Jade index template. - */ - -var jadeIndex = [ - 'extends layout' - , '' - , 'block content' - , ' h1= title' - , ' p Welcome to #{title}' -].join(eol); - -/** - * EJS index template. - */ - -var ejsIndex = [ - '' - , '' - , ' ' - , ' <%= title %>' - , ' ' - , ' ' - , ' ' - , '

<%= title %>

' - , '

Welcome to <%= title %>

' - , ' ' - , '' -].join(eol); - -/** - * JSHTML layout template. - */ - -var jshtmlLayout = [ - '' - , '' - , ' ' - , ' @write(title) ' - , ' ' - , ' ' - , ' ' - , ' @write(body)' - , ' ' - , '' -].join(eol); - -/** - * JSHTML index template. - */ - -var jshtmlIndex = [ - '

@write(title)

' - , '

Welcome to @write(title)

' -].join(eol); - -/** - * Hogan.js index template. - */ -var hoganIndex = [ - '' - , '' - , ' ' - , ' {{ title }}' - , ' ' - , ' ' - , ' ' - , '

{{ title }}

' - , '

Welcome to {{ title }}

' - , ' ' - , '' -].join(eol); - -/** - * Default css template. - */ - -var css = [ - 'body {' - , ' padding: 50px;' - , ' font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;' - , '}' - , '' - , 'a {' - , ' color: #00B7FF;' - , '}' -].join(eol); - -/** - * Default less template. - */ - -var less = [ - 'body {' - , ' padding: 50px;' - , ' font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;' - , '}' - , '' - , 'a {' - , ' color: #00B7FF;' - , '}' -].join(eol); - -/** - * Default stylus template. - */ - -var stylus = [ - 'body' - , ' padding: 50px' - , ' font: 14px "Lucida Grande", Helvetica, Arial, sans-serif' - , 'a' - , ' color: #00B7FF' -].join(eol); - -/** - * App template. - */ - -var app = [ - '' - , '/**' - , ' * Module dependencies.' - , ' */' - , '' - , 'var express = require(\'express\')' - , ' , routes = require(\'./routes\')' - , ' , user = require(\'./routes/user\')' - , ' , http = require(\'http\')' - , ' , path = require(\'path\');' - , '' - , 'var app = express();' - , '' - , 'app.configure(function(){' - , ' app.set(\'port\', process.env.PORT || 3000);' - , ' app.set(\'views\', __dirname + \'/views\');' - , ' app.set(\'view engine\', \':TEMPLATE\');' - , ' app.use(express.favicon());' - , ' app.use(express.logger(\'dev\'));' - , ' app.use(express.bodyParser());' - , ' app.use(express.methodOverride());{sess}' - , ' app.use(app.router);{css}' - , ' app.use(express.static(path.join(__dirname, \'public\')));' - , '});' - , '' - , 'app.configure(\'development\', function(){' - , ' app.use(express.errorHandler());' - , '});' - , '' - , 'app.get(\'/\', routes.index);' - , 'app.get(\'/users\', user.list);' - , '' - , 'http.createServer(app).listen(app.get(\'port\'), function(){' - , ' console.log("Express server listening on port " + app.get(\'port\'));' - , '});' - , '' -].join(eol); - -// Generate application - -(function createApplication(path) { - emptyDirectory(path, function(empty){ - if (empty || program.force) { - createApplicationAt(path); - } else { - program.confirm('destination is not empty, continue? ', function(ok){ - if (ok) { - process.stdin.destroy(); - createApplicationAt(path); - } else { - abort('aborting'); - } - }); - } - }); -})(path); - -/** - * Create application at the given directory `path`. - * - * @param {String} path - */ - -function createApplicationAt(path) { - console.log(); - process.on('exit', function(){ - console.log(); - console.log(' install dependencies:'); - console.log(' $ cd %s && npm install', path); - console.log(); - console.log(' run the app:'); - console.log(' $ node app'); - console.log(); - }); - - mkdir(path, function(){ - mkdir(path + '/public'); - mkdir(path + '/public/javascripts'); - mkdir(path + '/public/images'); - mkdir(path + '/public/stylesheets', function(){ - switch (program.css) { - case 'less': - write(path + '/public/stylesheets/style.less', less); - break; - case 'stylus': - write(path + '/public/stylesheets/style.styl', stylus); - break; - default: - write(path + '/public/stylesheets/style.css', css); - } - }); - - mkdir(path + '/routes', function(){ - write(path + '/routes/index.js', index); - write(path + '/routes/user.js', users); - }); - - mkdir(path + '/views', function(){ - switch (program.template) { - case 'ejs': - write(path + '/views/index.ejs', ejsIndex); - break; - case 'jade': - write(path + '/views/layout.jade', jadeLayout); - write(path + '/views/index.jade', jadeIndex); - break; - case 'jshtml': - write(path + '/views/layout.jshtml', jshtmlLayout); - write(path + '/views/index.jshtml', jshtmlIndex); - break; - case 'hjs': - write(path + '/views/index.hjs', hoganIndex); - break; - - } - }); - - // CSS Engine support - switch (program.css) { - case 'less': - app = app.replace('{css}', eol + ' app.use(require(\'less-middleware\')({ src: __dirname + \'/public\' }));'); - break; - case 'stylus': - app = app.replace('{css}', eol + ' app.use(require(\'stylus\').middleware(__dirname + \'/public\'));'); - break; - default: - app = app.replace('{css}', ''); - } - - // Session support - app = app.replace('{sess}', program.sessions - ? eol + ' app.use(express.cookieParser(\'your secret here\'));' + eol + ' app.use(express.session());' - : ''); - - // Template support - app = app.replace(':TEMPLATE', program.template); - - // package.json - var pkg = { - name: 'application-name' - , version: '0.0.1' - , private: true - , scripts: { start: 'node app' } - , dependencies: { - express: version - } - } - - if (program.template) pkg.dependencies[program.template] = '*'; - - // CSS Engine support - switch (program.css) { - case 'less': - pkg.dependencies['less-middleware'] = '*'; - break; - default: - if (program.css) { - pkg.dependencies[program.css] = '*'; - } - } - - write(path + '/package.json', JSON.stringify(pkg, null, 2)); - write(path + '/app.js', app); - }); -} - -/** - * Check if the given directory `path` is empty. - * - * @param {String} path - * @param {Function} fn - */ - -function emptyDirectory(path, fn) { - fs.readdir(path, function(err, files){ - if (err && 'ENOENT' != err.code) throw err; - fn(!files || !files.length); - }); -} - -/** - * echo str > path. - * - * @param {String} path - * @param {String} str - */ - -function write(path, str) { - fs.writeFile(path, str); - console.log(' \x1b[36mcreate\x1b[0m : ' + path); -} - -/** - * Mkdir -p. - * - * @param {String} path - * @param {Function} fn - */ - -function mkdir(path, fn) { - mkdirp(path, 0755, function(err){ - if (err) throw err; - console.log(' \033[36mcreate\033[0m : ' + path); - fn && fn(); - }); -} - -/** - * Exit with the given `str`. - * - * @param {String} str - */ - -function abort(str) { - console.error(str); - process.exit(1); -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/client.js b/tty.js/node_modules/tty.js/node_modules/express/client.js deleted file mode 100644 index 8984c44d..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/client.js +++ /dev/null @@ -1,25 +0,0 @@ - -var http = require('http'); - -var times = 50; - -while (times--) { - var req = http.request({ - port: 3000 - , method: 'POST' - , headers: { 'Content-Type': 'application/x-www-form-urlencoded' } - }); - - req.on('response', function(res){ - console.log(res.statusCode); - }); - - var n = 500000; - while (n--) { - req.write('foo=bar&bar=baz&'); - } - - req.write('foo=bar&bar=baz'); - - req.end(); -} \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/index.js b/tty.js/node_modules/tty.js/node_modules/express/index.js deleted file mode 100644 index bfe99345..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/index.js +++ /dev/null @@ -1,4 +0,0 @@ - -module.exports = process.env.EXPRESS_COV - ? require('./lib-cov/express') - : require('./lib/express'); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/lib/application.js b/tty.js/node_modules/tty.js/node_modules/express/lib/application.js deleted file mode 100644 index 7ebc6f66..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/lib/application.js +++ /dev/null @@ -1,534 +0,0 @@ -/** - * Module dependencies. - */ - -var connect = require('connect') - , Router = require('./router') - , methods = require('methods') - , middleware = require('./middleware') - , debug = require('debug')('express:application') - , locals = require('./utils').locals - , View = require('./view') - , utils = connect.utils - , path = require('path') - , http = require('http') - , join = path.join; - -/** - * 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.viewCallbacks = []; - this.defaultConfiguration(); -}; - -/** - * Initialize application configuration. - * - * @api private - */ - -app.defaultConfiguration = function(){ - // default settings - this.enable('x-powered-by'); - this.set('env', process.env.NODE_ENV || 'development'); - this.set('subdomain offset', 2); - debug('booting in %s mode', this.get('env')); - - // implicit middleware - this.use(connect.query()); - this.use(middleware.init(this)); - - // inherit protos - this.on('mount', function(parent){ - this.request.__proto__ = parent.request; - this.response.__proto__ = parent.response; - this.engines.__proto__ = parent.engines; - }); - - // router - this._router = new Router(this); - this.routes = this._router.map; - this.__defineGetter__('router', function(){ - this._usedRouter = true; - this._router.caseSensitive = this.enabled('case sensitive routing'); - this._router.strict = this.enabled('strict routing'); - return this._router.middleware; - }); - - // setup locals - this.locals = locals(this); - - // default locals - this.locals.settings = this.settings; - - // default configuration - this.set('views', process.cwd() + '/views'); - this.set('jsonp callback name', 'callback'); - - this.configure('development', function(){ - this.set('json spaces', 2); - }); - - this.configure('production', function(){ - this.enable('view cache'); - }); -}; - -/** - * Proxy `connect#use()` to apply settings to - * mounted applications. - * - * @param {String|Function|Server} route - * @param {Function|Server} fn - * @return {app} for chaining - * @api public - */ - -app.use = function(route, fn){ - var app; - - // default route to '/' - if ('string' != typeof route) fn = route, route = '/'; - - // express app - if (fn.handle && fn.set) app = fn; - - // restore .app property on req and res - if (app) { - app.route = route; - fn = function(req, res, next) { - var orig = req.app; - app.handle(req, res, function(err){ - req.app = res.app = orig; - req.__proto__ = orig.request; - res.__proto__ = orig.response; - next(err); - }); - }; - } - - connect.proto.use.call(this, route, fn); - - // mounted an app - if (app) { - app.parent = this; - app.emit('mount', this); - } - - return this; -}; - -/** - * 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/visionmedia/consolidate.js) - * library was created to map all of node's popular template - * engines to follow this convention, thus allowing them to - * work seeessly 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; -}; - -/** - * Map the given param placeholder `name`(s) to the given callback(s). - * - * 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 samesignature as middleware, the only differencing - * 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. - * - * app.param('user_id', function(req, res, next, id){ - * User.find(id, function(err, user){ - * if (err) { - * next(err); - * } else if (user) { - * req.user = user; - * next(); - * } else { - * next(new Error('failed to load user')); - * } - * }); - * }); - * - * @param {String|Array} name - * @param {Function} fn - * @return {app} for chaining - * @api public - */ - -app.param = function(name, fn){ - var self = this - , fns = [].slice.call(arguments, 1); - - // array - if (Array.isArray(name)) { - name.forEach(function(name){ - fns.forEach(function(fn){ - self.param(name, fn); - }); - }); - // param logic - } else if ('function' == typeof name) { - this._router.param(name); - // single - } else { - if (':' == name[0]) name = name.substr(1); - fns.forEach(function(fn){ - self._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 {String} val - * @return {Server} for chaining - * @api public - */ - -app.set = function(setting, val){ - if (1 == arguments.length) { - if (this.settings.hasOwnProperty(setting)) { - return this.settings[setting]; - } else if (this.parent) { - return this.parent.set(setting); - } - } else { - this.settings[setting] = val; - 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.route - : ''; -}; - -/** - * 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); -}; - -/** - * Configure callback for zero or more envs, - * when no `env` is specified that callback will - * be invoked for all environments. Any combination - * can be used multiple times, in any order desired. - * - * Examples: - * - * app.configure(function(){ - * // executed for all envs - * }); - * - * app.configure('stage', function(){ - * // executed staging env - * }); - * - * app.configure('stage', 'production', function(){ - * // executed for stage and production - * }); - * - * Note: - * - * These callbacks are invoked immediately, and - * are effectively sugar for the following: - * - * var env = process.env.NODE_ENV || 'development'; - * - * switch (env) { - * case 'development': - * ... - * break; - * case 'stage': - * ... - * break; - * case 'production': - * ... - * break; - * } - * - * @param {String} env... - * @param {Function} fn - * @return {app} for chaining - * @api public - */ - -app.configure = function(env, fn){ - var envs = 'all' - , args = [].slice.call(arguments); - fn = args.pop(); - if (args.length) envs = args; - if ('all' == envs || ~envs.indexOf(this.settings.env)) fn.call(this); - return this; -}; - -/** - * Delegate `.VERB(...)` calls to `router.VERB(...)`. - */ - -methods.forEach(function(method){ - app[method] = function(path){ - if ('get' == method && 1 == arguments.length) return this.set(path); - - // if no router attacked yet, attach the router - if (!this._usedRouter) this.use(this.router); - - // setup route - this._router[method].apply(this._router, arguments); - 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){ - var args = arguments; - methods.forEach(function(method){ - app[method].apply(this, args); - }, this); - return this; -}; - -// del -> delete alias - -app.del = app.delete; - -/** - * 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 = {} - , cache = this.cache - , engines = this.engines - , view; - - // support callback function as second arg - if ('function' == typeof options) { - fn = options, options = {}; - } - - // merge app.locals - utils.merge(opts, this.locals); - - // merge options._locals - if (options._locals) utils.merge(opts, options._locals); - - // merge options - utils.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 View(name, { - defaultEngine: this.get('view engine'), - root: this.get('views'), - engines: engines - }); - - if (!view.path) { - var err = new Error('Failed to lookup view "' + name + '"'); - 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); -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/lib/express.js b/tty.js/node_modules/tty.js/node_modules/express/lib/express.js deleted file mode 100644 index 2a704b21..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/lib/express.js +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Module dependencies. - */ - -var connect = require('connect') - , proto = require('./application') - , Route = require('./router/route') - , Router = require('./router') - , req = require('./request') - , res = require('./response') - , utils = connect.utils; - -/** - * Expose `createApplication()`. - */ - -exports = module.exports = createApplication; - -/** - * Framework version. - */ - -exports.version = '3.1.0'; - -/** - * Expose mime. - */ - -exports.mime = connect.mime; - -/** - * Create an express application. - * - * @return {Function} - * @api public - */ - -function createApplication() { - var app = connect(); - utils.merge(app, proto); - app.request = { __proto__: req }; - app.response = { __proto__: res }; - app.init(); - return app; -} - -/** - * Expose connect.middleware as express.* - * for example `express.logger` etc. - */ - -for (var key in connect.middleware) { - Object.defineProperty( - exports - , key - , Object.getOwnPropertyDescriptor(connect.middleware, key)); -} - -/** - * Error on createServer(). - */ - -exports.createServer = function(){ - console.warn('Warning: express.createServer() is deprecated, express'); - console.warn('applications no longer inherit from http.Server,'); - console.warn('please use:'); - console.warn(''); - console.warn(' var express = require("express");'); - console.warn(' var app = express();'); - console.warn(''); - return createApplication(); -}; - -/** - * Expose the prototypes. - */ - -exports.application = proto; -exports.request = req; -exports.response = res; - -/** - * Expose constructors. - */ - -exports.Route = Route; -exports.Router = Router; - -// Error handler title - -exports.errorHandler.title = 'Express'; - diff --git a/tty.js/node_modules/tty.js/node_modules/express/lib/middleware.js b/tty.js/node_modules/tty.js/node_modules/express/lib/middleware.js deleted file mode 100644 index 308c5bb6..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/lib/middleware.js +++ /dev/null @@ -1,33 +0,0 @@ - -/** - * Module dependencies. - */ - -var utils = require('./utils'); - -/** - * Initialization middleware, exposing the - * request and response to eachother, 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){ - req.app = res.app = app; - 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 || utils.locals(res); - - next(); - } -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/lib/request.js b/tty.js/node_modules/tty.js/node_modules/express/lib/request.js deleted file mode 100644 index 1c6048d9..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/lib/request.js +++ /dev/null @@ -1,493 +0,0 @@ - -/** - * Module dependencies. - */ - -var http = require('http') - , utils = require('./utils') - , connect = require('connect') - , fresh = require('fresh') - , parseRange = require('range-parser') - , parse = connect.utils.parseUrl - , mime = connect.mime; - -/** - * 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]; - } -}; - -/** - * 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", - * 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'); - * // => "json" - * - * @param {String|Array} type(s) - * @return {String} - * @api public - */ - -req.accepts = function(type){ - return utils.accepts(type, this.get('Accept')); -}; - -/** - * Check if the given `charset` is acceptable, - * otherwise you should respond with 406 "Not Acceptable". - * - * @param {String} charset - * @return {Boolean} - * @api public - */ - -req.acceptsCharset = function(charset){ - var accepted = this.acceptedCharsets; - return accepted.length - ? ~accepted.indexOf(charset) - : true; -}; - -/** - * Check if the given `lang` is acceptable, - * otherwise you should respond with 406 "Not Acceptable". - * - * @param {String} lang - * @return {Boolean} - * @api public - */ - -req.acceptsLanguage = function(lang){ - var accepted = this.acceptedLanguages; - return accepted.length - ? ~accepted.indexOf(lang) - : true; -}; - -/** - * 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 an array of Accepted media types - * ordered from highest quality to lowest. - * - * Examples: - * - * [ { value: 'application/json', - * quality: 1, - * type: 'application', - * subtype: 'json' }, - * { value: 'text/html', - * quality: 0.5, - * type: 'text', - * subtype: 'html' } ] - * - * @return {Array} - * @api public - */ - -req.__defineGetter__('accepted', function(){ - var accept = this.get('Accept'); - return accept - ? utils.parseAccept(accept) - : []; -}); - -/** - * Return an array of Accepted languages - * ordered from highest quality to lowest. - * - * Examples: - * - * Accept-Language: en;q=.5, en-us - * ['en-us', 'en'] - * - * @return {Array} - * @api public - */ - -req.__defineGetter__('acceptedLanguages', function(){ - var accept = this.get('Accept-Language'); - return accept - ? utils - .parseQuality(accept) - .map(function(obj){ - return obj.value; - }) - : []; -}); - -/** - * Return an array of Accepted charsets - * ordered from highest quality to lowest. - * - * Examples: - * - * Accept-Charset: iso-8859-5;q=.2, unicode-1-1;q=0.8 - * ['unicode-1-1', 'iso-8859-5'] - * - * @return {Array} - * @api public - */ - -req.__defineGetter__('acceptedCharsets', function(){ - var accept = this.get('Accept-Charset'); - return accept - ? utils - .parseQuality(accept) - .map(function(obj){ - return obj.value; - }) - : []; -}); - -/** - * 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 `connect.bodyParser()` middleware. - * - * @param {String} name - * @param {Mixed} defaultValue - * @return {String} - * @api public - */ - -req.param = function(name, defaultValue){ - var params = this.params || {}; - var body = this.body || {}; - var query = this.query || {}; - 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(type){ - var ct = this.get('Content-Type'); - if (!ct) return false; - ct = ct.split(';')[0]; - if (!~type.indexOf('/')) type = mime.lookup(type); - if (~type.indexOf('*')) { - type = type.split('/'); - ct = ct.split('/'); - if ('*' == type[0] && type[1] == ct[1]) return true; - if ('*' == type[1] && type[0] == ct[0]) return true; - return false; - } - return !! ~ct.indexOf(type); -}; - -/** - * Return the protocol string "http" or "https" - * when requested with TLS. When the "trust proxy" - * setting is enabled the "X-Forwarded-Proto" header - * field will be trusted. If you're running behind - * a reverse proxy that supplies https for you this - * may be enabled. - * - * @return {String} - * @api public - */ - -req.__defineGetter__('protocol', function(){ - var trustProxy = this.app.get('trust proxy'); - return this.connection.encrypted - ? 'https' - : trustProxy - ? (this.get('X-Forwarded-Proto') || 'http') - : 'http'; -}); - -/** - * Short-hand for: - * - * req.protocol == 'https' - * - * @return {Boolean} - * @api public - */ - -req.__defineGetter__('secure', function(){ - return 'https' == this.protocol; -}); - -/** - * Return the remote address, or when - * "trust proxy" is `true` return - * the upstream addr. - * - * @return {String} - * @api public - */ - -req.__defineGetter__('ip', function(){ - return this.ips[0] || this.connection.remoteAddress; -}); - -/** - * When "trust proxy" is `true`, parse - * the "X-Forwarded-For" ip address list. - * - * For example if the value were "client, proxy1, proxy2" - * you would receive the array `["client", "proxy1", "proxy2"]` - * where "proxy2" is the furthest down-stream. - * - * @return {Array} - * @api public - */ - -req.__defineGetter__('ips', function(){ - var trustProxy = this.app.get('trust proxy'); - var val = this.get('X-Forwarded-For'); - return trustProxy && val - ? val.split(/ *, */) - : []; -}); - -/** - * Return basic auth credentials. - * - * Examples: - * - * // http://tobi:hello@example.com - * req.auth - * // => { username: 'tobi', password: 'hello' } - * - * @return {Object} or undefined - * @api public - */ - -req.__defineGetter__('auth', function(){ - // missing - var auth = this.get('Authorization'); - if (!auth) return; - - // malformed - var parts = auth.split(' '); - if ('basic' != parts[0].toLowerCase()) return; - if (!parts[1]) return; - auth = parts[1]; - - // credentials - auth = new Buffer(auth, 'base64').toString().match(/^([^:]*):(.*)$/); - if (!auth) return; - return { username: auth[1], password: auth[2] }; -}); - -/** - * 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 - */ - -req.__defineGetter__('subdomains', function(){ - var offset = this.app.get('subdomain offset'); - return this.get('Host') - .split('.') - .reverse() - .slice(offset); -}); - -/** - * Short-hand for `url.parse(req.url).pathname`. - * - * @return {String} - * @api public - */ - -req.__defineGetter__('path', function(){ - return parse(this).pathname; -}); - -/** - * Parse the "Host" header field hostname. - * - * @return {String} - * @api public - */ - -req.__defineGetter__('host', function(){ - return this.get('Host').split(':')[0]; -}); - -/** - * Check if the request is fresh, aka - * Last-Modified and/or the ETag - * still match. - * - * @return {Boolean} - * @api public - */ - -req.__defineGetter__('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 - */ - -req.__defineGetter__('stale', function(){ - return !this.fresh; -}); - -/** - * Check if the request was an _XMLHttpRequest_. - * - * @return {Boolean} - * @api public - */ - -req.__defineGetter__('xhr', function(){ - var val = this.get('X-Requested-With') || ''; - return 'xmlhttprequest' == val.toLowerCase(); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/express/lib/response.js b/tty.js/node_modules/tty.js/node_modules/express/lib/response.js deleted file mode 100644 index 2b66c88e..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/lib/response.js +++ /dev/null @@ -1,754 +0,0 @@ -/** - * Module dependencies. - */ - -var http = require('http') - , path = require('path') - , connect = require('connect') - , utils = connect.utils - , sign = require('cookie-signature').sign - , normalizeType = require('./utils').normalizeType - , normalizeTypes = require('./utils').normalizeTypes - , etag = require('./utils').etag - , statusCodes = http.STATUS_CODES - , cookie = require('cookie') - , send = require('send') - , mime = connect.mime - , basename = path.basename - , extname = path.extname - , join = path.join; - -/** - * 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){ - return this.set('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

'); - * res.send(404, 'Sorry, cant find that'); - * res.send(404); - * - * @param {Mixed} body or status - * @param {Mixed} body - * @return {ServerResponse} - * @api public - */ - -res.send = function(body){ - var req = this.req - , head = 'HEAD' == req.method - , len; - - // allow status / body - if (2 == arguments.length) { - // res.send(body, status) backwards compat - if ('number' != typeof body && 'number' == typeof arguments[1]) { - this.statusCode = arguments[1]; - } else { - this.statusCode = body; - body = arguments[1]; - } - } - - switch (typeof body) { - // response status - case 'number': - this.get('Content-Type') || this.type('txt'); - this.statusCode = body; - body = http.STATUS_CODES[body]; - break; - // string defaulting to html - case 'string': - if (!this.get('Content-Type')) { - this.charset = this.charset || 'utf-8'; - this.type('html'); - } - break; - case 'boolean': - case 'object': - if (null == body) { - body = ''; - } else if (Buffer.isBuffer(body)) { - this.get('Content-Type') || this.type('bin'); - } else { - return this.json(body); - } - break; - } - - // populate Content-Length - if (undefined !== body && !this.get('Content-Length')) { - this.set('Content-Length', len = Buffer.isBuffer(body) - ? body.length - : Buffer.byteLength(body)); - } - - // ETag support - // TODO: W/ support - if (len > 1024) { - if (!this.get('ETag')) { - this.set('ETag', etag(body)); - } - } - - // 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'); - body = ''; - } - - // respond - this.end(head ? null : body); - return this; -}; - -/** - * Send JSON response. - * - * Examples: - * - * res.json(null); - * res.json({ user: 'tj' }); - * res.json(500, 'oh noes!'); - * res.json(404, 'I dont have that'); - * - * @param {Mixed} obj or status - * @param {Mixed} obj - * @return {ServerResponse} - * @api public - */ - -res.json = function(obj){ - // allow status / body - if (2 == arguments.length) { - // res.json(body, status) backwards compat - if ('number' == typeof arguments[1]) { - this.statusCode = arguments[1]; - } else { - this.statusCode = obj; - obj = arguments[1]; - } - } - - // settings - var app = this.app; - var replacer = app.get('json replacer'); - var spaces = app.get('json spaces'); - var body = JSON.stringify(obj, replacer, spaces); - - // content-type - this.charset = this.charset || 'utf-8'; - 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' }); - * res.jsonp(500, 'oh noes!'); - * res.jsonp(404, 'I dont have that'); - * - * @param {Mixed} obj or status - * @param {Mixed} obj - * @return {ServerResponse} - * @api public - */ - -res.jsonp = function(obj){ - // allow status / body - if (2 == arguments.length) { - // res.json(body, status) backwards compat - if ('number' == typeof arguments[1]) { - this.statusCode = arguments[1]; - } else { - this.statusCode = obj; - obj = arguments[1]; - } - } - - // settings - var app = this.app; - var replacer = app.get('json replacer'); - var spaces = app.get('json spaces'); - var body = JSON.stringify(obj, replacer, spaces) - .replace(/\u2028/g, '\\u2028') - .replace(/\u2029/g, '\\u2029'); - var callback = this.req.query[app.get('jsonp callback name')]; - - // content-type - this.charset = this.charset || 'utf-8'; - this.set('Content-Type', 'application/json'); - - // jsonp - if (callback) { - this.set('Content-Type', 'text/javascript'); - var cb = callback.replace(/[^\[\]\w$.]/g, ''); - body = cb + ' && ' + cb + '(' + body + ');'; - } - - 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 - * - `root` root directory for relative filenames - * - * 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.'); - * } - * }); - * }); - * - * @param {String} path - * @param {Object|Function} options or fn - * @param {Function} fn - * @api public - */ - -res.sendfile = function(path, options, fn){ - var self = this - , req = self.req - , next = this.req.next - , options = options || {} - , done; - - // support function as second arg - if ('function' == typeof options) { - fn = options; - options = {}; - } - - // socket errors - req.socket.on('error', error); - - // errors - function error(err) { - if (done) return; - done = true; - - // clean up - cleanup(); - if (!self.headerSent) self.removeHeader('Content-Disposition'); - - // callback available - if (fn) return fn(err); - - // list in limbo if there's no callback - if (self.headerSent) return; - - // delegate - next(err); - } - - // streaming - function stream() { - if (done) return; - cleanup(); - if (fn) self.on('finish', fn); - } - - // cleanup - function cleanup() { - req.socket.removeListener('error', error); - } - - // transfer - var file = send(req, path); - if (options.root) file.root(options.root); - file.maxage(options.maxAge || 0); - file.on('error', error); - file.on('directory', next); - file.on('stream', stream); - file.pipe(this); - this.on('finish', cleanup); -}; - -/** - * 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.headerSent` if you plan to respond. - * - * This method uses `res.sendfile()`. - * - * @param {String} path - * @param {String|Function} filename or fn - * @param {Function} fn - * @api public - */ - -res.download = function(path, filename, fn){ - // support function as second arg - if ('function' == typeof filename) { - fn = filename; - filename = null; - } - - filename = filename || path; - this.set('Content-Disposition', 'attachment; filename="' + basename(filename) + '"'); - return this.sendfile(path, 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 - , next = req.next; - - var fn = obj.default; - if (fn) delete obj.default; - var keys = Object.keys(obj); - - var key = req.accepts(keys); - - this.set('Vary', 'Accept'); - - if (key) { - this.set('Content-Type', normalizeType(key)); - obj[key](req, this, next); - } else if (fn) { - fn(); - } else { - var err = new Error('Not Acceptable'); - err.status = 406; - err.types = normalizeTypes(keys); - next(err); - } - - return this; -}; - -/** - * Set _Content-Disposition_ header to _attachment_ with optional `filename`. - * - * @param {String} filename - * @return {ServerResponse} - * @api public - */ - -res.attachment = function(filename){ - if (filename) this.type(extname(filename)); - this.set('Content-Disposition', filename - ? 'attachment; filename="' + basename(filename) + '"' - : 'attachment'); - return this; -}; - -/** - * 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(field, val){ - if (2 == arguments.length) { - if (Array.isArray(val)) val = val.map(String); - else val = String(val); - 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 - * @param {ServerResponse} for chaining - * @api public - */ - -res.clearCookie = function(name, options){ - var opts = { expires: new Date(1), path: '/' }; - return this.cookie(name, '', options - ? utils.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 - * @api public - */ - -res.cookie = function(name, val, options){ - options = utils.merge({}, options); - var secret = this.req.secret; - var signed = options.signed; - if (signed && !secret) throw new Error('connect.cookieParser("secret") required for signed cookies'); - 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 = '/'; - this.set('Set-Cookie', cookie.serialize(name, String(val), options)); - return this; -}; - - -/** - * Set the location header to `url`. - * - * The given `url` can also be the name of a mapped url, for - * example by default express supports "back" which redirects - * to the _Referrer_ or _Referer_ headers or "/". - * - * Examples: - * - * res.location('/foo/bar').; - * res.location('http://example.com'); - * res.location('../login'); // /blog/post/1 -> /blog/login - * - * Mounting: - * - * When an application is mounted and `res.location()` - * is given a path that does _not_ lead with "/" it becomes - * relative to the mount-point. For example if the application - * is mounted at "/blog", the following would become "/blog/login". - * - * res.location('login'); - * - * While the leading slash would result in a location of "/login": - * - * res.location('/login'); - * - * @param {String} url - * @api public - */ - -res.location = function(url){ - var app = this.app - , req = this.req; - - // setup redirect map - var map = { back: req.get('Referrer') || '/' }; - - // perform redirect - url = map[url] || url; - - // relative - if (!~url.indexOf('://') && 0 != url.indexOf('//')) { - var path = app.path(); - - // relative to path - if ('.' == url[0]) { - url = req.path + '/' + url; - // relative to mount-point - } else if ('/' != url[0]) { - url = path + '/' + url; - } - } - - // 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('http://example.com', 301); - * res.redirect('../login'); // /blog/post/1 -> /blog/login - * - * @param {String} url - * @param {Number} code - * @api public - */ - -res.redirect = function(url){ - var app = this.app - , head = 'HEAD' == this.req.method - , status = 302 - , body; - - // allow status / url - if (2 == arguments.length) { - if ('number' == typeof url) { - status = url; - url = arguments[1]; - } else { - status = arguments[1]; - } - } - - // Set location header - this.location(url); - url = this.get('Location'); - - // Support text/{plain,html} by default - this.format({ - text: function(){ - body = statusCodes[status] + '. Redirecting to ' + encodeURI(url); - }, - - html: function(){ - var u = utils.escape(url); - body = '

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

'; - }, - - default: function(){ - body = ''; - } - }); - - // Respond - this.statusCode = status; - this.set('Content-Length', Buffer.byteLength(body)); - this.end(head ? null : body); -}; - -/** - * 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 - * - * @param {String} view - * @param {Object|Function} options or callback function - * @param {Function} fn - * @api public - */ - -res.render = function(view, options, fn){ - var self = this - , options = options || {} - , req = this.req - , 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); -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/lib/router/index.js b/tty.js/node_modules/tty.js/node_modules/express/lib/router/index.js deleted file mode 100644 index 662dc29b..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/lib/router/index.js +++ /dev/null @@ -1,273 +0,0 @@ -/** - * Module dependencies. - */ - -var Route = require('./route') - , utils = require('../utils') - , methods = require('methods') - , debug = require('debug')('express:router') - , parse = require('connect').utils.parseUrl; - -/** - * Expose `Router` constructor. - */ - -exports = module.exports = Router; - -/** - * Initialize a new `Router` with the given `options`. - * - * @param {Object} options - * @api private - */ - -function Router(options) { - options = options || {}; - var self = this; - this.map = {}; - this.params = {}; - this._params = []; - this.caseSensitive = options.caseSensitive; - this.strict = options.strict; - this.middleware = function router(req, res, next){ - self._dispatch(req, res, next); - }; -} - -/** - * Register a param callback `fn` for the given `name`. - * - * @param {String|Function} name - * @param {Function} fn - * @return {Router} for chaining - * @api public - */ - -Router.prototype.param = function(name, fn){ - // param logic - if ('function' == typeof name) { - this._params.push(name); - return; - } - - // apply param functions - var params = this._params - , len = params.length - , ret; - - 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; -}; - -/** - * Route dispatcher aka the route "middleware". - * - * @param {IncomingMessage} req - * @param {ServerResponse} res - * @param {Function} next - * @api private - */ - -Router.prototype._dispatch = function(req, res, next){ - var params = this.params - , self = this; - - debug('dispatching %s %s (%s)', req.method, req.url, req.originalUrl); - - // route dispatch - (function pass(i, err){ - var paramCallbacks - , paramIndex = 0 - , paramVal - , route - , keys - , key; - - // match next route - function nextRoute(err) { - pass(req._route_index + 1, err); - } - - // match route - req.route = route = self.matchRequest(req, i); - - // no route - if (!route) return next(err); - debug('matched %s %s', route.method, route.path); - - // we have a route - // start at param 0 - req.params = route.params; - keys = route.keys; - i = 0; - - // param callbacks - function param(err) { - paramIndex = 0; - key = keys[i++]; - paramVal = key && req.params[key.name]; - paramCallbacks = key && params[key.name]; - - try { - if ('route' == err) { - nextRoute(); - } else if (err) { - i = 0; - callbacks(err); - } else if (paramCallbacks && undefined !== paramVal) { - paramCallback(); - } else if (key) { - param(); - } else { - i = 0; - callbacks(); - } - } catch (err) { - param(err); - } - }; - - param(err); - - // single param callbacks - function paramCallback(err) { - var fn = paramCallbacks[paramIndex++]; - if (err || !fn) return param(err); - fn(req, res, paramCallback, paramVal, key.name); - } - - // invoke route callbacks - function callbacks(err) { - var fn = route.callbacks[i++]; - try { - if ('route' == err) { - nextRoute(); - } else if (err && fn) { - if (fn.length < 4) return callbacks(err); - fn(err, req, res, callbacks); - } else if (fn) { - if (fn.length < 4) return fn(req, res, callbacks); - callbacks(); - } else { - nextRoute(err); - } - } catch (err) { - callbacks(err); - } - } - })(0); -}; - -/** - * Attempt to match a route for `req` - * with optional starting index of `i` - * defaulting to 0. - * - * @param {IncomingMessage} req - * @param {Number} i - * @return {Route} - * @api private - */ - -Router.prototype.matchRequest = function(req, i, head){ - var method = req.method.toLowerCase() - , url = parse(req) - , path = url.pathname - , routes = this.map - , i = i || 0 - , route; - - // HEAD support - if (!head && 'head' == method) { - route = this.matchRequest(req, i, true); - if (route) return route; - method = 'get'; - } - - // routes for this method - if (routes = routes[method]) { - - // matching routes - for (var len = routes.length; i < len; ++i) { - route = routes[i]; - if (route.match(path)) { - req._route_index = i; - return route; - } - } - } -}; - -/** - * Attempt to match a route for `method` - * and `url` with optional starting - * index of `i` defaulting to 0. - * - * @param {String} method - * @param {String} url - * @param {Number} i - * @return {Route} - * @api private - */ - -Router.prototype.match = function(method, url, i, head){ - var req = { method: method, url: url }; - return this.matchRequest(req, i, head); -}; - -/** - * Route `method`, `path`, and one or more callbacks. - * - * @param {String} method - * @param {String} path - * @param {Function} callback... - * @return {Router} for chaining - * @api private - */ - -Router.prototype.route = function(method, path, callbacks){ - var method = method.toLowerCase() - , callbacks = utils.flatten([].slice.call(arguments, 2)); - - // ensure path was given - if (!path) throw new Error('Router#' + method + '() requires a path'); - - // ensure all callbacks are functions - callbacks.forEach(function(fn, i){ - if ('function' == typeof fn) return; - var type = {}.toString.call(fn); - var msg = '.' + method + '() requires callback functions but got a ' + type; - throw new Error(msg); - }); - - // create the route - debug('defined %s %s', method, path); - var route = new Route(method, path, callbacks, { - sensitive: this.caseSensitive, - strict: this.strict - }); - - // add it - (this.map[method] = this.map[method] || []).push(route); - return this; -}; - -methods.forEach(function(method){ - Router.prototype[method] = function(path){ - var args = [method].concat([].slice.call(arguments)); - this.route.apply(this, args); - return this; - }; -}); diff --git a/tty.js/node_modules/tty.js/node_modules/express/lib/router/route.js b/tty.js/node_modules/tty.js/node_modules/express/lib/router/route.js deleted file mode 100644 index c1a0b5ea..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/lib/router/route.js +++ /dev/null @@ -1,72 +0,0 @@ - -/** - * Module dependencies. - */ - -var utils = require('../utils'); - -/** - * Expose `Route`. - */ - -module.exports = Route; - -/** - * Initialize `Route` with the given HTTP `method`, `path`, - * and an array of `callbacks` and `options`. - * - * Options: - * - * - `sensitive` enable case-sensitive routes - * - `strict` enable strict matching for trailing slashes - * - * @param {String} method - * @param {String} path - * @param {Array} callbacks - * @param {Object} options. - * @api private - */ - -function Route(method, path, callbacks, options) { - options = options || {}; - this.path = path; - this.method = method; - this.callbacks = callbacks; - this.regexp = utils.pathRegexp(path - , this.keys = [] - , options.sensitive - , options.strict); -} - -/** - * Check if this route matches `path`, if so - * populate `.params`. - * - * @param {String} path - * @return {Boolean} - * @api private - */ - -Route.prototype.match = function(path){ - var keys = this.keys - , params = this.params = [] - , m = this.regexp.exec(path); - - if (!m) return false; - - for (var i = 1, len = m.length; i < len; ++i) { - var key = keys[i - 1]; - - var val = 'string' == typeof m[i] - ? decodeURIComponent(m[i]) - : m[i]; - - if (key) { - params[key.name] = val; - } else { - params.push(val); - } - } - - return true; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/lib/utils.js b/tty.js/node_modules/tty.js/node_modules/express/lib/utils.js deleted file mode 100644 index 8b1da1ac..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/lib/utils.js +++ /dev/null @@ -1,282 +0,0 @@ - -/** - * Module dependencies. - */ - -var mime = require('connect').mime - , crc32 = require('buffer-crc32'); - -/** - * Return ETag for `body`. - * - * @param {String|Buffer} body - * @return {String} - * @api private - */ - -exports.etag = function(body){ - return '"' + crc32.signed(body) + '"'; -}; - -/** - * Make `locals()` bound to the given `obj`. - * - * This is used for `app.locals` and `res.locals`. - * - * @param {Object} obj - * @return {Function} - * @api private - */ - -exports.locals = function(obj){ - obj.viewCallbacks = obj.viewCallbacks || []; - - function locals(obj){ - for (var key in obj) locals[key] = obj[key]; - return obj; - }; - - return locals; -}; - -/** - * 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; -}; - -/** - * Flatten the given `arr`. - * - * @param {Array} arr - * @return {Array} - * @api private - */ - -exports.flatten = function(arr, ret){ - var ret = ret || [] - , 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 {String} - * @api private - */ - -exports.normalizeType = function(type){ - return ~type.indexOf('/') ? type : mime.lookup(type); -}; - -/** - * 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(~types[i].indexOf('/') - ? types[i] - : mime.lookup(types[i])); - } - - return ret; -}; - -/** - * Return the acceptable type in `types`, if any. - * - * @param {Array} types - * @param {String} str - * @return {String} - * @api private - */ - -exports.acceptsArray = function(types, str){ - // accept anything when Accept is not present - if (!str) return types[0]; - - // parse - var accepted = exports.parseAccept(str) - , normalized = exports.normalizeTypes(types) - , len = accepted.length; - - for (var i = 0; i < len; ++i) { - for (var j = 0, jlen = types.length; j < jlen; ++j) { - if (exports.accept(normalized[j].split('/'), accepted[i])) { - return types[j]; - } - } - } -}; - -/** - * Check if `type(s)` are acceptable based on - * the given `str`. - * - * @param {String|Array} type(s) - * @param {String} str - * @return {Boolean|String} - * @api private - */ - -exports.accepts = function(type, str){ - if ('string' == typeof type) type = type.split(/ *, */); - return exports.acceptsArray(type, str); -}; - -/** - * Check if `type` array is acceptable for `other`. - * - * @param {Array} type - * @param {Object} other - * @return {Boolean} - * @api private - */ - -exports.accept = function(type, other){ - return (type[0] == other.type || '*' == other.type) - && (type[1] == other.subtype || '*' == other.subtype); -}; - -/** - * Parse accept `str`, returning - * an array objects containing - * `.type` and `.subtype` along - * with the values provided by - * `parseQuality()`. - * - * @param {Type} name - * @return {Type} - * @api private - */ - -exports.parseAccept = function(str){ - return exports - .parseQuality(str) - .map(function(obj){ - var parts = obj.value.split('/'); - obj.type = parts[0]; - obj.subtype = parts[1]; - return obj; - }); -}; - -/** - * Parse quality `str`, returning an - * array of objects with `.value` and - * `.quality`. - * - * @param {Type} name - * @return {Type} - * @api private - */ - -exports.parseQuality = function(str){ - return str - .split(/ *, */) - .map(quality) - .filter(function(obj){ - return obj.quality; - }) - .sort(function(a, b){ - return b.quality - a.quality; - }); -}; - -/** - * Parse quality `str` returning an - * object with `.value` and `.quality`. - * - * @param {String} str - * @return {Object} - * @api private - */ - -function quality(str) { - var parts = str.split(/ *; */) - , val = parts[0]; - - var q = parts[1] - ? parseFloat(parts[1].split(/ *= */)[1]) - : 1; - - return { value: val, quality: q }; -} - -/** - * Escape special characters in the given string of html. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function(html) { - return String(html) - .replace(/&/g, '&') - .replace(/"/g, '"') - .replace(//g, '>'); -}; - -/** - * 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 {Boolean} sensitive - * @param {Boolean} strict - * @return {RegExp} - * @api private - */ - -exports.pathRegexp = function(path, keys, sensitive, strict) { - if (path instanceof RegExp) return path; - if (Array.isArray(path)) path = '(' + path.join('|') + ')'; - path = path - .concat(strict ? '' : '/?') - .replace(/\/\(/g, '(?:/') - .replace(/(\/)?(\.)?:(\w+)(?:(\(.*?\)))?(\?)?(\*)?/g, function(_, slash, format, key, capture, optional, star){ - keys.push({ name: key, optional: !! optional }); - slash = slash || ''; - return '' - + (optional ? '' : slash) - + '(?:' - + (optional ? slash : '') - + (format || '') + (capture || (format && '([^/.]+?)' || '([^/]+?)')) + ')' - + (optional || '') - + (star ? '(/*)?' : ''); - }) - .replace(/([\/.])/g, '\\$1') - .replace(/\*/g, '(.*)'); - return new RegExp('^' + path + '$', sensitive ? '' : 'i'); -} \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/lib/view.js b/tty.js/node_modules/tty.js/node_modules/express/lib/view.js deleted file mode 100644 index c7399a44..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/lib/view.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Module dependencies. - */ - -var path = require('path') - , fs = require('fs') - , utils = require('./utils') - , dirname = path.dirname - , basename = path.basename - , extname = path.extname - , exists = fs.existsSync || path.existsSync - , join = path.join; - -/** - * 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) 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 `path` - * - * @param {String} path - * @return {String} - * @api private - */ - -View.prototype.lookup = function(path){ - var ext = this.ext; - - // . - if (!utils.isAbsolute(path)) path = join(this.root, path); - if (exists(path)) return path; - - // /index. - path = join(dirname(path), basename(path, ext), 'index' + ext); - if (exists(path)) return path; -}; - -/** - * Render with the given `options` and callback `fn(err, str)`. - * - * @param {Object} options - * @param {Function} fn - * @api private - */ - -View.prototype.render = function(options, fn){ - this.engine(this.path, options, fn); -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/.npmignore b/tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/.travis.yml b/tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/.travis.yml deleted file mode 100644 index 7a902e8c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 -notifications: - email: - recipients: - - brianloveswords@gmail.com \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/README.md b/tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/README.md deleted file mode 100644 index 4ad5d646..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# buffer-crc32 - -[![Build Status](https://secure.travis-ci.org/brianloveswords/buffer-crc32.png?branch=master)](http://travis-ci.org/brianloveswords/buffer-crc32) - -crc32 that works with binary data and fancy character sets, outputs -buffer, signed or unsigned data and has tests. - -Derived from the sample CRC implementation in the PNG specification: http://www.w3.org/TR/PNG/#D-CRCAppendix - -# install -``` -npm install buffer-crc32 -``` - -# example -```js -var crc32 = require('buffer-crc32'); -// works with buffers -var buf = Buffer([[0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00]) -crc32(buf) // -> - -// has convenience methods for getting signed or unsigned ints -crc32.signed(buf) // -> -1805997238 -crc32.unsigned(buf) // -> 2488970058 - -// will cast to buffer if given a string, so you can -// directly use foreign characters safely -crc32('自動販売機') // -> -``` - -# tests -This was tested against the output of zlib's crc32 method. You can run -the tests with`npm test` (requires tap) diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/index.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/index.js deleted file mode 100644 index ab0e19e5..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/index.js +++ /dev/null @@ -1,84 +0,0 @@ -var Buffer = require('buffer').Buffer; - -var CRC_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 -]; - -function bufferizeInt(num) { - var tmp = Buffer(4); - tmp.writeInt32BE(num, 0); - return tmp; -} - -function _crc32(buf) { - if (!Buffer.isBuffer(buf)) - buf = Buffer(buf); - var crc = 0xffffffff; - for (var n = 0; n < buf.length; n++) { - crc = CRC_TABLE[(crc ^ buf[n]) & 0xff] ^ (crc >>> 8); - } - return (crc ^ 0xffffffff); -} - -function crc32() { - return bufferizeInt(_crc32.apply(null, arguments)); -} -crc32.signed = function () { - return _crc32.apply(null, arguments); -}; -crc32.unsigned = function () { - return crc32.apply(null, arguments).readUInt32BE(0); -}; - -module.exports = crc32; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/package.json b/tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/package.json deleted file mode 100644 index f4df3196..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "author": { - "name": "Brian J. Brennan", - "email": "brianloveswords@gmail.com", - "url": "http://bjb.io" - }, - "name": "buffer-crc32", - "description": "A pure javascript CRC32 algorithm that plays nice with binary data", - "version": "0.1.1", - "homepage": "https://github.com/brianloveswords/buffer-crc32", - "repository": { - "type": "git", - "url": "git://github.com/brianloveswords/buffer-crc32.git" - }, - "main": "index.js", - "scripts": { - "test": "tap tests/*.test.js" - }, - "dependencies": {}, - "devDependencies": { - "tap": "~0.2.5" - }, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "readme": "# buffer-crc32\n\n[![Build Status](https://secure.travis-ci.org/brianloveswords/buffer-crc32.png?branch=master)](http://travis-ci.org/brianloveswords/buffer-crc32)\n\ncrc32 that works with binary data and fancy character sets, outputs\nbuffer, signed or unsigned data and has tests.\n\nDerived from the sample CRC implementation in the PNG specification: http://www.w3.org/TR/PNG/#D-CRCAppendix\n\n# install\n```\nnpm install buffer-crc32\n```\n\n# example\n```js\nvar crc32 = require('buffer-crc32');\n// works with buffers\nvar buf = Buffer([[0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00])\ncrc32(buf) // -> \n\n// has convenience methods for getting signed or unsigned ints\ncrc32.signed(buf) // -> -1805997238\ncrc32.unsigned(buf) // -> 2488970058\n\n// will cast to buffer if given a string, so you can\n// directly use foreign characters safely\ncrc32('自動販売機') // -> \n```\n\n# tests\nThis was tested against the output of zlib's crc32 method. You can run\nthe tests with`npm test` (requires tap)\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/brianloveswords/buffer-crc32/issues" - }, - "_id": "buffer-crc32@0.1.1", - "_from": "buffer-crc32@0.1.1" -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/tests/crc.test.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/tests/crc.test.js deleted file mode 100644 index d4767e3b..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/buffer-crc32/tests/crc.test.js +++ /dev/null @@ -1,52 +0,0 @@ -var crc32 = require('..'); -var test = require('tap').test; - -test('simple crc32 is no problem', function (t) { - var input = Buffer('hey sup bros'); - var expected = Buffer([0x47, 0xfa, 0x55, 0x70]); - t.same(crc32(input), expected); - t.end(); -}); - -test('another simple one', function (t) { - var input = Buffer('IEND'); - var expected = Buffer([0xae, 0x42, 0x60, 0x82]); - t.same(crc32(input), expected); - t.end(); -}); - -test('slightly more complex', function (t) { - var input = Buffer([0x00, 0x00, 0x00]); - var expected = Buffer([0xff, 0x41, 0xd9, 0x12]); - t.same(crc32(input), expected); - t.end(); -}); - -test('complex crc32 gets calculated like a champ', function (t) { - var input = Buffer('शीर्षक'); - var expected = Buffer([0x17, 0xb8, 0xaf, 0xf1]); - t.same(crc32(input), expected); - t.end(); -}); - -test('casts to buffer if necessary', function (t) { - var input = 'शीर्षक'; - var expected = Buffer([0x17, 0xb8, 0xaf, 0xf1]); - t.same(crc32(input), expected); - t.end(); -}); - -test('can do unsigned', function (t) { - var input = 'ham sandwich'; - var expected = -1891873021; - t.same(crc32.signed(input), expected); - t.end(); -}); - -test('can do signed', function (t) { - var input = 'bear sandwich'; - var expected = 3711466352; - t.same(crc32.unsigned(input), expected); - t.end(); -}); - diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/.npmignore b/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/.travis.yml b/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/.travis.yml deleted file mode 100644 index f1d0f13c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/History.md b/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/History.md deleted file mode 100644 index 4961d2e2..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/History.md +++ /dev/null @@ -1,107 +0,0 @@ - -0.6.1 / 2012-06-01 -================== - - * Added: append (yes or no) on confirmation - * Added: allow node.js v0.7.x - -0.6.0 / 2012-04-10 -================== - - * Added `.prompt(obj, callback)` support. Closes #49 - * Added default support to .choose(). Closes #41 - * Fixed the choice example - -0.5.1 / 2011-12-20 -================== - - * Fixed `password()` for recent nodes. Closes #36 - -0.5.0 / 2011-12-04 -================== - - * Added sub-command option support [itay] - -0.4.3 / 2011-12-04 -================== - - * Fixed custom help ordering. Closes #32 - -0.4.2 / 2011-11-24 -================== - - * Added travis support - * Fixed: line-buffered input automatically trimmed. Closes #31 - -0.4.1 / 2011-11-18 -================== - - * Removed listening for "close" on --help - -0.4.0 / 2011-11-15 -================== - - * Added support for `--`. Closes #24 - -0.3.3 / 2011-11-14 -================== - - * Fixed: wait for close event when writing help info [Jerry Hamlet] - -0.3.2 / 2011-11-01 -================== - - * Fixed long flag definitions with values [felixge] - -0.3.1 / 2011-10-31 -================== - - * Changed `--version` short flag to `-V` from `-v` - * Changed `.version()` so it's configurable [felixge] - -0.3.0 / 2011-10-31 -================== - - * Added support for long flags only. Closes #18 - -0.2.1 / 2011-10-24 -================== - - * "node": ">= 0.4.x < 0.7.0". Closes #20 - -0.2.0 / 2011-09-26 -================== - - * Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs] - -0.1.0 / 2011-08-24 -================== - - * Added support for custom `--help` output - -0.0.5 / 2011-08-18 -================== - - * Changed: when the user enters nothing prompt for password again - * Fixed issue with passwords beginning with numbers [NuckChorris] - -0.0.4 / 2011-08-15 -================== - - * Fixed `Commander#args` - -0.0.3 / 2011-08-15 -================== - - * Added default option value support - -0.0.2 / 2011-08-15 -================== - - * Added mask support to `Command#password(str[, mask], fn)` - * Added `Command#password(str, fn)` - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/Makefile b/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/Makefile deleted file mode 100644 index 00746255..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -TESTS = $(shell find test/test.*.js) - -test: - @./test/run $(TESTS) - -.PHONY: test \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/Readme.md b/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/Readme.md deleted file mode 100644 index b8328c37..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/Readme.md +++ /dev/null @@ -1,262 +0,0 @@ -# Commander.js - - The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander). - - [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js) - -## Installation - - $ npm install commander - -## Option parsing - - Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander'); - -program - .version('0.0.1') - .option('-p, --peppers', 'Add peppers') - .option('-P, --pineapple', 'Add pineapple') - .option('-b, --bbq', 'Add bbq sauce') - .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble') - .parse(process.argv); - -console.log('you ordered a pizza with:'); -if (program.peppers) console.log(' - peppers'); -if (program.pineapple) console.log(' - pineappe'); -if (program.bbq) console.log(' - bbq'); -console.log(' - %s cheese', program.cheese); -``` - - Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. - -## Automated --help - - The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free: - -``` - $ ./examples/pizza --help - - Usage: pizza [options] - - Options: - - -V, --version output the version number - -p, --peppers Add peppers - -P, --pineapple Add pineappe - -b, --bbq Add bbq sauce - -c, --cheese Add the specified type of cheese [marble] - -h, --help output usage information - -``` - -## Coercion - -```js -function range(val) { - return val.split('..').map(Number); -} - -function list(val) { - return val.split(','); -} - -program - .version('0.0.1') - .usage('[options] ') - .option('-i, --integer ', 'An integer argument', parseInt) - .option('-f, --float ', 'A float argument', parseFloat) - .option('-r, --range ..', 'A range', range) - .option('-l, --list ', 'A list', list) - .option('-o, --optional [value]', 'An optional value') - .parse(process.argv); - -console.log(' int: %j', program.integer); -console.log(' float: %j', program.float); -console.log(' optional: %j', program.optional); -program.range = program.range || []; -console.log(' range: %j..%j', program.range[0], program.range[1]); -console.log(' list: %j', program.list); -console.log(' args: %j', program.args); -``` - -## Custom help - - You can display arbitrary `-h, --help` information - by listening for "--help". Commander will automatically - exit once you are done so that the remainder of your program - does not execute causing undesired behaviours, for example - in the following executable "stuff" will not output when - `--help` is used. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('../'); - -function list(val) { - return val.split(',').map(Number); -} - -program - .version('0.0.1') - .option('-f, --foo', 'enable some foo') - .option('-b, --bar', 'enable some bar') - .option('-B, --baz', 'enable some baz'); - -// must be before .parse() since -// node's emit() is immediate - -program.on('--help', function(){ - console.log(' Examples:'); - console.log(''); - console.log(' $ custom-help --help'); - console.log(' $ custom-help -h'); - console.log(''); -}); - -program.parse(process.argv); - -console.log('stuff'); -``` - -yielding the following help output: - -``` - -Usage: custom-help [options] - -Options: - - -h, --help output usage information - -V, --version output the version number - -f, --foo enable some foo - -b, --bar enable some bar - -B, --baz enable some baz - -Examples: - - $ custom-help --help - $ custom-help -h - -``` - -## .prompt(msg, fn) - - Single-line prompt: - -```js -program.prompt('name: ', function(name){ - console.log('hi %s', name); -}); -``` - - Multi-line prompt: - -```js -program.prompt('description:', function(name){ - console.log('hi %s', name); -}); -``` - - Coercion: - -```js -program.prompt('Age: ', Number, function(age){ - console.log('age: %j', age); -}); -``` - -```js -program.prompt('Birthdate: ', Date, function(date){ - console.log('date: %s', date); -}); -``` - -## .password(msg[, mask], fn) - -Prompt for password without echoing: - -```js -program.password('Password: ', function(pass){ - console.log('got "%s"', pass); - process.stdin.destroy(); -}); -``` - -Prompt for password with mask char "*": - -```js -program.password('Password: ', '*', function(pass){ - console.log('got "%s"', pass); - process.stdin.destroy(); -}); -``` - -## .confirm(msg, fn) - - Confirm with the given `msg`: - -```js -program.confirm('continue? ', function(ok){ - console.log(' got %j', ok); -}); -``` - -## .choose(list, fn) - - Let the user choose from a `list`: - -```js -var list = ['tobi', 'loki', 'jane', 'manny', 'luna']; - -console.log('Choose the coolest pet:'); -program.choose(list, function(i){ - console.log('you chose %d "%s"', i, list[i]); -}); -``` - -## Links - - - [API documentation](http://visionmedia.github.com/commander.js/) - - [ascii tables](https://github.com/LearnBoost/cli-table) - - [progress bars](https://github.com/visionmedia/node-progress) - - [more progress bars](https://github.com/substack/node-multimeter) - - [examples](https://github.com/visionmedia/commander.js/tree/master/examples) - -## License - -(The MIT License) - -Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/index.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/index.js deleted file mode 100644 index 06ec1e4b..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/index.js +++ /dev/null @@ -1,2 +0,0 @@ - -module.exports = require('./lib/commander'); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/lib/commander.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/lib/commander.js deleted file mode 100644 index 5ba87ebb..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/lib/commander.js +++ /dev/null @@ -1,1026 +0,0 @@ - -/*! - * commander - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , path = require('path') - , tty = require('tty') - , basename = path.basename; - -/** - * Expose the root command. - */ - -exports = module.exports = new Command; - -/** - * Expose `Command`. - */ - -exports.Command = Command; - -/** - * Expose `Option`. - */ - -exports.Option = Option; - -/** - * Initialize a new `Option` with the given `flags` and `description`. - * - * @param {String} flags - * @param {String} description - * @api public - */ - -function Option(flags, description) { - this.flags = flags; - this.required = ~flags.indexOf('<'); - this.optional = ~flags.indexOf('['); - this.bool = !~flags.indexOf('-no-'); - flags = flags.split(/[ ,|]+/); - if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift(); - this.long = flags.shift(); - this.description = description; -} - -/** - * Return option name. - * - * @return {String} - * @api private - */ - -Option.prototype.name = function(){ - return this.long - .replace('--', '') - .replace('no-', ''); -}; - -/** - * Check if `arg` matches the short or long flag. - * - * @param {String} arg - * @return {Boolean} - * @api private - */ - -Option.prototype.is = function(arg){ - return arg == this.short - || arg == this.long; -}; - -/** - * Initialize a new `Command`. - * - * @param {String} name - * @api public - */ - -function Command(name) { - this.commands = []; - this.options = []; - this.args = []; - this.name = name; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Command.prototype.__proto__ = EventEmitter.prototype; - -/** - * Add command `name`. - * - * The `.action()` callback is invoked when the - * command `name` is specified via __ARGV__, - * and the remaining arguments are applied to the - * function for access. - * - * When the `name` is "*" an un-matched command - * will be passed as the first arg, followed by - * the rest of __ARGV__ remaining. - * - * Examples: - * - * program - * .version('0.0.1') - * .option('-C, --chdir ', 'change the working directory') - * .option('-c, --config ', 'set config path. defaults to ./deploy.conf') - * .option('-T, --no-tests', 'ignore test hook') - * - * program - * .command('setup') - * .description('run remote setup commands') - * .action(function(){ - * console.log('setup'); - * }); - * - * program - * .command('exec ') - * .description('run the given remote command') - * .action(function(cmd){ - * console.log('exec "%s"', cmd); - * }); - * - * program - * .command('*') - * .description('deploy the given env') - * .action(function(env){ - * console.log('deploying "%s"', env); - * }); - * - * program.parse(process.argv); - * - * @param {String} name - * @return {Command} the new command - * @api public - */ - -Command.prototype.command = function(name){ - var args = name.split(/ +/); - var cmd = new Command(args.shift()); - this.commands.push(cmd); - cmd.parseExpectedArgs(args); - cmd.parent = this; - return cmd; -}; - -/** - * Parse expected `args`. - * - * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. - * - * @param {Array} args - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parseExpectedArgs = function(args){ - if (!args.length) return; - var self = this; - args.forEach(function(arg){ - switch (arg[0]) { - case '<': - self.args.push({ required: true, name: arg.slice(1, -1) }); - break; - case '[': - self.args.push({ required: false, name: arg.slice(1, -1) }); - break; - } - }); - return this; -}; - -/** - * Register callback `fn` for the command. - * - * Examples: - * - * program - * .command('help') - * .description('display verbose help') - * .action(function(){ - * // output help here - * }); - * - * @param {Function} fn - * @return {Command} for chaining - * @api public - */ - -Command.prototype.action = function(fn){ - var self = this; - this.parent.on(this.name, function(args, unknown){ - // Parse any so-far unknown options - unknown = unknown || []; - var parsed = self.parseOptions(unknown); - - // Output help if necessary - outputHelpIfNecessary(self, parsed.unknown); - - // If there are still any unknown options, then we simply - // die, unless someone asked for help, in which case we give it - // to them, and then we die. - if (parsed.unknown.length > 0) { - self.unknownOption(parsed.unknown[0]); - } - - self.args.forEach(function(arg, i){ - if (arg.required && null == args[i]) { - self.missingArgument(arg.name); - } - }); - - // Always append ourselves to the end of the arguments, - // to make sure we match the number of arguments the user - // expects - if (self.args.length) { - args[self.args.length] = self; - } else { - args.push(self); - } - - fn.apply(this, args); - }); - return this; -}; - -/** - * Define option with `flags`, `description` and optional - * coercion `fn`. - * - * The `flags` string should contain both the short and long flags, - * separated by comma, a pipe or space. The following are all valid - * all will output this way when `--help` is used. - * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" - * - * Examples: - * - * // simple boolean defaulting to false - * program.option('-p, --pepper', 'add pepper'); - * - * --pepper - * program.pepper - * // => Boolean - * - * // simple boolean defaulting to false - * program.option('-C, --no-cheese', 'remove cheese'); - * - * program.cheese - * // => true - * - * --no-cheese - * program.cheese - * // => true - * - * // required argument - * program.option('-C, --chdir ', 'change the working directory'); - * - * --chdir /tmp - * program.chdir - * // => "/tmp" - * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); - * - * @param {String} flags - * @param {String} description - * @param {Function|Mixed} fn or default - * @param {Mixed} defaultValue - * @return {Command} for chaining - * @api public - */ - -Command.prototype.option = function(flags, description, fn, defaultValue){ - var self = this - , option = new Option(flags, description) - , oname = option.name() - , name = camelcase(oname); - - // default as 3rd arg - if ('function' != typeof fn) defaultValue = fn, fn = null; - - // preassign default value only for --no-*, [optional], or - if (false == option.bool || option.optional || option.required) { - // when --no-* we make sure default is true - if (false == option.bool) defaultValue = true; - // preassign only if we have a default - if (undefined !== defaultValue) self[name] = defaultValue; - } - - // register the option - this.options.push(option); - - // when it's passed assign the value - // and conditionally invoke the callback - this.on(oname, function(val){ - // coercion - if (null != val && fn) val = fn(val); - - // unassigned or bool - if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) { - // if no value, bool true, and we have a default, then use it! - if (null == val) { - self[name] = option.bool - ? defaultValue || true - : false; - } else { - self[name] = val; - } - } else if (null !== val) { - // reassign - self[name] = val; - } - }); - - return this; -}; - -/** - * Parse `argv`, settings options and invoking commands when defined. - * - * @param {Array} argv - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parse = function(argv){ - // store raw args - this.rawArgs = argv; - - // guess name - if (!this.name) this.name = basename(argv[1]); - - // process argv - var parsed = this.parseOptions(this.normalize(argv.slice(2))); - this.args = parsed.args; - return this.parseArgs(this.args, parsed.unknown); -}; - -/** - * Normalize `args`, splitting joined short flags. For example - * the arg "-abc" is equivalent to "-a -b -c". - * - * @param {Array} args - * @return {Array} - * @api private - */ - -Command.prototype.normalize = function(args){ - var ret = [] - , arg; - - for (var i = 0, len = args.length; i < len; ++i) { - arg = args[i]; - if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) { - arg.slice(1).split('').forEach(function(c){ - ret.push('-' + c); - }); - } else { - ret.push(arg); - } - } - - return ret; -}; - -/** - * Parse command `args`. - * - * When listener(s) are available those - * callbacks are invoked, otherwise the "*" - * event is emitted and those actions are invoked. - * - * @param {Array} args - * @return {Command} for chaining - * @api private - */ - -Command.prototype.parseArgs = function(args, unknown){ - var cmds = this.commands - , len = cmds.length - , name; - - if (args.length) { - name = args[0]; - if (this.listeners(name).length) { - this.emit(args.shift(), args, unknown); - } else { - this.emit('*', args); - } - } else { - outputHelpIfNecessary(this, unknown); - - // If there were no args and we have unknown options, - // then they are extraneous and we need to error. - if (unknown.length > 0) { - this.unknownOption(unknown[0]); - } - } - - return this; -}; - -/** - * Return an option matching `arg` if any. - * - * @param {String} arg - * @return {Option} - * @api private - */ - -Command.prototype.optionFor = function(arg){ - for (var i = 0, len = this.options.length; i < len; ++i) { - if (this.options[i].is(arg)) { - return this.options[i]; - } - } -}; - -/** - * Parse options from `argv` returning `argv` - * void of these options. - * - * @param {Array} argv - * @return {Array} - * @api public - */ - -Command.prototype.parseOptions = function(argv){ - var args = [] - , len = argv.length - , literal - , option - , arg; - - var unknownOptions = []; - - // parse options - for (var i = 0; i < len; ++i) { - arg = argv[i]; - - // literal args after -- - if ('--' == arg) { - literal = true; - continue; - } - - if (literal) { - args.push(arg); - continue; - } - - // find matching Option - option = this.optionFor(arg); - - // option is defined - if (option) { - // requires arg - if (option.required) { - arg = argv[++i]; - if (null == arg) return this.optionMissingArgument(option); - if ('-' == arg[0]) return this.optionMissingArgument(option, arg); - this.emit(option.name(), arg); - // optional arg - } else if (option.optional) { - arg = argv[i+1]; - if (null == arg || '-' == arg[0]) { - arg = null; - } else { - ++i; - } - this.emit(option.name(), arg); - // bool - } else { - this.emit(option.name()); - } - continue; - } - - // looks like an option - if (arg.length > 1 && '-' == arg[0]) { - unknownOptions.push(arg); - - // If the next argument looks like it might be - // an argument for this option, we pass it on. - // If it isn't, then it'll simply be ignored - if (argv[i+1] && '-' != argv[i+1][0]) { - unknownOptions.push(argv[++i]); - } - continue; - } - - // arg - args.push(arg); - } - - return { args: args, unknown: unknownOptions }; -}; - -/** - * Argument `name` is missing. - * - * @param {String} name - * @api private - */ - -Command.prototype.missingArgument = function(name){ - console.error(); - console.error(" error: missing required argument `%s'", name); - console.error(); - process.exit(1); -}; - -/** - * `Option` is missing an argument, but received `flag` or nothing. - * - * @param {String} option - * @param {String} flag - * @api private - */ - -Command.prototype.optionMissingArgument = function(option, flag){ - console.error(); - if (flag) { - console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag); - } else { - console.error(" error: option `%s' argument missing", option.flags); - } - console.error(); - process.exit(1); -}; - -/** - * Unknown option `flag`. - * - * @param {String} flag - * @api private - */ - -Command.prototype.unknownOption = function(flag){ - console.error(); - console.error(" error: unknown option `%s'", flag); - console.error(); - process.exit(1); -}; - -/** - * Set the program version to `str`. - * - * This method auto-registers the "-V, --version" flag - * which will print the version number when passed. - * - * @param {String} str - * @param {String} flags - * @return {Command} for chaining - * @api public - */ - -Command.prototype.version = function(str, flags){ - if (0 == arguments.length) return this._version; - this._version = str; - flags = flags || '-V, --version'; - this.option(flags, 'output the version number'); - this.on('version', function(){ - console.log(str); - process.exit(0); - }); - return this; -}; - -/** - * Set the description `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.description = function(str){ - if (0 == arguments.length) return this._description; - this._description = str; - return this; -}; - -/** - * Set / get the command usage `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.usage = function(str){ - var args = this.args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }); - - var usage = '[options' - + (this.commands.length ? '] [command' : '') - + ']' - + (this.args.length ? ' ' + args : ''); - if (0 == arguments.length) return this._usage || usage; - this._usage = str; - - return this; -}; - -/** - * Return the largest option length. - * - * @return {Number} - * @api private - */ - -Command.prototype.largestOptionLength = function(){ - return this.options.reduce(function(max, option){ - return Math.max(max, option.flags.length); - }, 0); -}; - -/** - * Return help for options. - * - * @return {String} - * @api private - */ - -Command.prototype.optionHelp = function(){ - var width = this.largestOptionLength(); - - // Prepend the help information - return [pad('-h, --help', width) + ' ' + 'output usage information'] - .concat(this.options.map(function(option){ - return pad(option.flags, width) - + ' ' + option.description; - })) - .join('\n'); -}; - -/** - * Return command help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.commandHelp = function(){ - if (!this.commands.length) return ''; - return [ - '' - , ' Commands:' - , '' - , this.commands.map(function(cmd){ - var args = cmd.args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }).join(' '); - - return cmd.name - + (cmd.options.length - ? ' [options]' - : '') + ' ' + args - + (cmd.description() - ? '\n' + cmd.description() - : ''); - }).join('\n\n').replace(/^/gm, ' ') - , '' - ].join('\n'); -}; - -/** - * Return program help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.helpInformation = function(){ - return [ - '' - , ' Usage: ' + this.name + ' ' + this.usage() - , '' + this.commandHelp() - , ' Options:' - , '' - , '' + this.optionHelp().replace(/^/gm, ' ') - , '' - , '' - ].join('\n'); -}; - -/** - * Prompt for a `Number`. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptForNumber = function(str, fn){ - var self = this; - this.promptSingleLine(str, function parseNumber(val){ - val = Number(val); - if (isNaN(val)) return self.promptSingleLine(str + '(must be a number) ', parseNumber); - fn(val); - }); -}; - -/** - * Prompt for a `Date`. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptForDate = function(str, fn){ - var self = this; - this.promptSingleLine(str, function parseDate(val){ - val = new Date(val); - if (isNaN(val.getTime())) return self.promptSingleLine(str + '(must be a date) ', parseDate); - fn(val); - }); -}; - -/** - * Single-line prompt. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptSingleLine = function(str, fn){ - if ('function' == typeof arguments[2]) { - return this['promptFor' + (fn.name || fn)](str, arguments[2]); - } - - process.stdout.write(str); - process.stdin.setEncoding('utf8'); - process.stdin.once('data', function(val){ - fn(val.trim()); - }).resume(); -}; - -/** - * Multi-line prompt. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptMultiLine = function(str, fn){ - var buf = []; - console.log(str); - process.stdin.setEncoding('utf8'); - process.stdin.on('data', function(val){ - if ('\n' == val || '\r\n' == val) { - process.stdin.removeAllListeners('data'); - fn(buf.join('\n')); - } else { - buf.push(val.trimRight()); - } - }).resume(); -}; - -/** - * Prompt `str` and callback `fn(val)` - * - * Commander supports single-line and multi-line prompts. - * To issue a single-line prompt simply add white-space - * to the end of `str`, something like "name: ", whereas - * for a multi-line prompt omit this "description:". - * - * - * Examples: - * - * program.prompt('Username: ', function(name){ - * console.log('hi %s', name); - * }); - * - * program.prompt('Description:', function(desc){ - * console.log('description was "%s"', desc.trim()); - * }); - * - * @param {String|Object} str - * @param {Function} fn - * @api public - */ - -Command.prototype.prompt = function(str, fn){ - var self = this; - - if ('string' == typeof str) { - if (/ $/.test(str)) return this.promptSingleLine.apply(this, arguments); - this.promptMultiLine(str, fn); - } else { - var keys = Object.keys(str) - , obj = {}; - - function next() { - var key = keys.shift() - , label = str[key]; - - if (!key) return fn(obj); - self.prompt(label, function(val){ - obj[key] = val; - next(); - }); - } - - next(); - } -}; - -/** - * Prompt for password with `str`, `mask` char and callback `fn(val)`. - * - * The mask string defaults to '', aka no output is - * written while typing, you may want to use "*" etc. - * - * Examples: - * - * program.password('Password: ', function(pass){ - * console.log('got "%s"', pass); - * process.stdin.destroy(); - * }); - * - * program.password('Password: ', '*', function(pass){ - * console.log('got "%s"', pass); - * process.stdin.destroy(); - * }); - * - * @param {String} str - * @param {String} mask - * @param {Function} fn - * @api public - */ - -Command.prototype.password = function(str, mask, fn){ - var self = this - , buf = ''; - - // default mask - if ('function' == typeof mask) { - fn = mask; - mask = ''; - } - - process.stdin.resume(); - tty.setRawMode(true); - process.stdout.write(str); - - // keypress - process.stdin.on('keypress', function(c, key){ - if (key && 'enter' == key.name) { - console.log(); - process.stdin.removeAllListeners('keypress'); - tty.setRawMode(false); - if (!buf.trim().length) return self.password(str, mask, fn); - fn(buf); - return; - } - - if (key && key.ctrl && 'c' == key.name) { - console.log('%s', buf); - process.exit(); - } - - process.stdout.write(mask); - buf += c; - }).resume(); -}; - -/** - * Confirmation prompt with `str` and callback `fn(bool)` - * - * Examples: - * - * program.confirm('continue? ', function(ok){ - * console.log(' got %j', ok); - * process.stdin.destroy(); - * }); - * - * @param {String} str - * @param {Function} fn - * @api public - */ - - -Command.prototype.confirm = function(str, fn, verbose){ - var self = this; - this.prompt(str, function(ok){ - if (!ok.trim()) { - if (!verbose) str += '(yes or no) '; - return self.confirm(str, fn, true); - } - fn(parseBool(ok)); - }); -}; - -/** - * Choice prompt with `list` of items and callback `fn(index, item)` - * - * Examples: - * - * var list = ['tobi', 'loki', 'jane', 'manny', 'luna']; - * - * console.log('Choose the coolest pet:'); - * program.choose(list, function(i){ - * console.log('you chose %d "%s"', i, list[i]); - * process.stdin.destroy(); - * }); - * - * @param {Array} list - * @param {Number|Function} index or fn - * @param {Function} fn - * @api public - */ - -Command.prototype.choose = function(list, index, fn){ - var self = this - , hasDefault = 'number' == typeof index; - - if (!hasDefault) { - fn = index; - index = null; - } - - list.forEach(function(item, i){ - if (hasDefault && i == index) { - console.log('* %d) %s', i + 1, item); - } else { - console.log(' %d) %s', i + 1, item); - } - }); - - function again() { - self.prompt(' : ', function(val){ - val = parseInt(val, 10) - 1; - if (hasDefault && isNaN(val)) val = index; - - if (null == list[val]) { - again(); - } else { - fn(val, list[val]); - } - }); - } - - again(); -}; - -/** - * Camel-case the given `flag` - * - * @param {String} flag - * @return {String} - * @api private - */ - -function camelcase(flag) { - return flag.split('-').reduce(function(str, word){ - return str + word[0].toUpperCase() + word.slice(1); - }); -} - -/** - * Parse a boolean `str`. - * - * @param {String} str - * @return {Boolean} - * @api private - */ - -function parseBool(str) { - return /^y|yes|ok|true$/i.test(str); -} - -/** - * Pad `str` to `width`. - * - * @param {String} str - * @param {Number} width - * @return {String} - * @api private - */ - -function pad(str, width) { - var len = Math.max(0, width - str.length); - return str + Array(len + 1).join(' '); -} - -/** - * Output help information if necessary - * - * @param {Command} command to output help for - * @param {Array} array of options to search for -h or --help - * @api private - */ - -function outputHelpIfNecessary(cmd, options) { - options = options || []; - for (var i = 0; i < options.length; i++) { - if (options[i] == '--help' || options[i] == '-h') { - process.stdout.write(cmd.helpInformation()); - cmd.emit('--help'); - process.exit(0); - } - } -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/package.json b/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/package.json deleted file mode 100644 index 92f2ed79..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/commander/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "commander", - "version": "0.6.1", - "description": "the complete solution for node.js command-line programs", - "keywords": [ - "command", - "option", - "parser", - "prompt", - "stdin" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "repository": { - "type": "git", - "url": "https://github.com/visionmedia/commander.js.git" - }, - "dependencies": {}, - "devDependencies": { - "should": ">= 0.0.1" - }, - "scripts": { - "test": "make test" - }, - "main": "index", - "engines": { - "node": ">= 0.4.x" - }, - "readme": "# Commander.js\n\n The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander).\n\n [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js)\n\n## Installation\n\n $ npm install commander\n\n## Option parsing\n\n Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('commander');\n\nprogram\n .version('0.0.1')\n .option('-p, --peppers', 'Add peppers')\n .option('-P, --pineapple', 'Add pineapple')\n .option('-b, --bbq', 'Add bbq sauce')\n .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble')\n .parse(process.argv);\n\nconsole.log('you ordered a pizza with:');\nif (program.peppers) console.log(' - peppers');\nif (program.pineapple) console.log(' - pineappe');\nif (program.bbq) console.log(' - bbq');\nconsole.log(' - %s cheese', program.cheese);\n```\n\n Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as \"--template-engine\" are camel-cased, becoming `program.templateEngine` etc.\n\n## Automated --help\n\n The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:\n\n``` \n $ ./examples/pizza --help\n\n Usage: pizza [options]\n\n Options:\n\n -V, --version output the version number\n -p, --peppers Add peppers\n -P, --pineapple Add pineappe\n -b, --bbq Add bbq sauce\n -c, --cheese Add the specified type of cheese [marble]\n -h, --help output usage information\n\n```\n\n## Coercion\n\n```js\nfunction range(val) {\n return val.split('..').map(Number);\n}\n\nfunction list(val) {\n return val.split(',');\n}\n\nprogram\n .version('0.0.1')\n .usage('[options] ')\n .option('-i, --integer ', 'An integer argument', parseInt)\n .option('-f, --float ', 'A float argument', parseFloat)\n .option('-r, --range ..', 'A range', range)\n .option('-l, --list ', 'A list', list)\n .option('-o, --optional [value]', 'An optional value')\n .parse(process.argv);\n\nconsole.log(' int: %j', program.integer);\nconsole.log(' float: %j', program.float);\nconsole.log(' optional: %j', program.optional);\nprogram.range = program.range || [];\nconsole.log(' range: %j..%j', program.range[0], program.range[1]);\nconsole.log(' list: %j', program.list);\nconsole.log(' args: %j', program.args);\n```\n\n## Custom help\n\n You can display arbitrary `-h, --help` information\n by listening for \"--help\". Commander will automatically\n exit once you are done so that the remainder of your program\n does not execute causing undesired behaviours, for example\n in the following executable \"stuff\" will not output when\n `--help` is used.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('../');\n\nfunction list(val) {\n return val.split(',').map(Number);\n}\n\nprogram\n .version('0.0.1')\n .option('-f, --foo', 'enable some foo')\n .option('-b, --bar', 'enable some bar')\n .option('-B, --baz', 'enable some baz');\n\n// must be before .parse() since\n// node's emit() is immediate\n\nprogram.on('--help', function(){\n console.log(' Examples:');\n console.log('');\n console.log(' $ custom-help --help');\n console.log(' $ custom-help -h');\n console.log('');\n});\n\nprogram.parse(process.argv);\n\nconsole.log('stuff');\n```\n\nyielding the following help output:\n\n```\n\nUsage: custom-help [options]\n\nOptions:\n\n -h, --help output usage information\n -V, --version output the version number\n -f, --foo enable some foo\n -b, --bar enable some bar\n -B, --baz enable some baz\n\nExamples:\n\n $ custom-help --help\n $ custom-help -h\n\n```\n\n## .prompt(msg, fn)\n\n Single-line prompt:\n\n```js\nprogram.prompt('name: ', function(name){\n console.log('hi %s', name);\n});\n```\n\n Multi-line prompt:\n\n```js\nprogram.prompt('description:', function(name){\n console.log('hi %s', name);\n});\n```\n\n Coercion:\n\n```js\nprogram.prompt('Age: ', Number, function(age){\n console.log('age: %j', age);\n});\n```\n\n```js\nprogram.prompt('Birthdate: ', Date, function(date){\n console.log('date: %s', date);\n});\n```\n\n## .password(msg[, mask], fn)\n\nPrompt for password without echoing:\n\n```js\nprogram.password('Password: ', function(pass){\n console.log('got \"%s\"', pass);\n process.stdin.destroy();\n});\n```\n\nPrompt for password with mask char \"*\":\n\n```js\nprogram.password('Password: ', '*', function(pass){\n console.log('got \"%s\"', pass);\n process.stdin.destroy();\n});\n```\n\n## .confirm(msg, fn)\n\n Confirm with the given `msg`:\n\n```js\nprogram.confirm('continue? ', function(ok){\n console.log(' got %j', ok);\n});\n```\n\n## .choose(list, fn)\n\n Let the user choose from a `list`:\n\n```js\nvar list = ['tobi', 'loki', 'jane', 'manny', 'luna'];\n\nconsole.log('Choose the coolest pet:');\nprogram.choose(list, function(i){\n console.log('you chose %d \"%s\"', i, list[i]);\n});\n```\n\n## Links\n\n - [API documentation](http://visionmedia.github.com/commander.js/)\n - [ascii tables](https://github.com/LearnBoost/cli-table)\n - [progress bars](https://github.com/visionmedia/node-progress)\n - [more progress bars](https://github.com/substack/node-multimeter)\n - [examples](https://github.com/visionmedia/commander.js/tree/master/examples)\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/commander.js/issues" - }, - "homepage": "https://github.com/visionmedia/commander.js", - "_id": "commander@0.6.1", - "_from": "commander@0.6.1" -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/.npmignore b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/.npmignore deleted file mode 100644 index 9046dde5..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/.npmignore +++ /dev/null @@ -1,12 +0,0 @@ -*.markdown -*.md -.git* -Makefile -benchmarks/ -docs/ -examples/ -install.sh -support/ -test/ -.DS_Store -coverage.html diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/.travis.yml b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/.travis.yml deleted file mode 100644 index 3aeb3c54..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - 0.9 \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/LICENSE b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/LICENSE deleted file mode 100644 index 0c5d22d9..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2010 Sencha Inc. -Copyright (c) 2011 LearnBoost -Copyright (c) 2011 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. \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/Readme.md b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/Readme.md deleted file mode 100644 index 7d65f9c1..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/Readme.md +++ /dev/null @@ -1,133 +0,0 @@ -[![build status](https://secure.travis-ci.org/senchalabs/connect.png)](http://travis-ci.org/senchalabs/connect) -# Connect - - Connect is an extensible HTTP server framework for [node](http://nodejs.org), providing high performance "plugins" known as _middleware_. - - Connect is bundled with over _20_ commonly used middleware, including - a logger, session support, cookie parser, and [more](http://senchalabs.github.com/connect). Be sure to view the 2.x [documentation](http://senchalabs.github.com/connect/). - -```js -var connect = require('connect') - , http = require('http'); - -var app = connect() - .use(connect.favicon()) - .use(connect.logger('dev')) - .use(connect.static('public')) - .use(connect.directory('public')) - .use(connect.cookieParser()) - .use(connect.session({ secret: 'my secret here' })) - .use(function(req, res){ - res.end('Hello from Connect!\n'); - }); - -http.createServer(app).listen(3000); -``` - -## Middleware - - - [csrf](http://www.senchalabs.org/connect/csrf.html) - - [basicAuth](http://www.senchalabs.org/connect/basicAuth.html) - - [bodyParser](http://www.senchalabs.org/connect/bodyParser.html) - - [json](http://www.senchalabs.org/connect/json.html) - - [multipart](http://www.senchalabs.org/connect/multipart.html) - - [urlencoded](http://www.senchalabs.org/connect/urlencoded.html) - - [cookieParser](http://www.senchalabs.org/connect/cookieParser.html) - - [directory](http://www.senchalabs.org/connect/directory.html) - - [compress](http://www.senchalabs.org/connect/compress.html) - - [errorHandler](http://www.senchalabs.org/connect/errorHandler.html) - - [favicon](http://www.senchalabs.org/connect/favicon.html) - - [limit](http://www.senchalabs.org/connect/limit.html) - - [logger](http://www.senchalabs.org/connect/logger.html) - - [methodOverride](http://www.senchalabs.org/connect/methodOverride.html) - - [query](http://www.senchalabs.org/connect/query.html) - - [responseTime](http://www.senchalabs.org/connect/responseTime.html) - - [session](http://www.senchalabs.org/connect/session.html) - - [static](http://www.senchalabs.org/connect/static.html) - - [staticCache](http://www.senchalabs.org/connect/staticCache.html) - - [vhost](http://www.senchalabs.org/connect/vhost.html) - - [subdomains](http://www.senchalabs.org/connect/subdomains.html) - - [cookieSession](http://www.senchalabs.org/connect/cookieSession.html) - -## Running Tests - -first: - - $ npm install -d - -then: - - $ make test - -## Authors - - Below is the output from [git-summary](http://github.com/visionmedia/git-extras). - - - project: connect - commits: 2033 - active : 301 days - files : 171 - authors: - 1414 Tj Holowaychuk 69.6% - 298 visionmedia 14.7% - 191 Tim Caswell 9.4% - 51 TJ Holowaychuk 2.5% - 10 Ryan Olds 0.5% - 8 Astro 0.4% - 5 Nathan Rajlich 0.2% - 5 Jakub Nešetřil 0.2% - 3 Daniel Dickison 0.1% - 3 David Rio Deiros 0.1% - 3 Alexander Simmerl 0.1% - 3 Andreas Lind Petersen 0.1% - 2 Aaron Heckmann 0.1% - 2 Jacques Crocker 0.1% - 2 Fabian Jakobs 0.1% - 2 Brian J Brennan 0.1% - 2 Adam Malcontenti-Wilson 0.1% - 2 Glen Mailer 0.1% - 2 James Campos 0.1% - 1 Trent Mick 0.0% - 1 Troy Kruthoff 0.0% - 1 Wei Zhu 0.0% - 1 comerc 0.0% - 1 darobin 0.0% - 1 nateps 0.0% - 1 Marco Sanson 0.0% - 1 Arthur Taylor 0.0% - 1 Aseem Kishore 0.0% - 1 Bart Teeuwisse 0.0% - 1 Cameron Howey 0.0% - 1 Chad Weider 0.0% - 1 Craig Barnes 0.0% - 1 Eran Hammer-Lahav 0.0% - 1 Gregory McWhirter 0.0% - 1 Guillermo Rauch 0.0% - 1 Jae Kwon 0.0% - 1 Jakub Nesetril 0.0% - 1 Joshua Peek 0.0% - 1 Jxck 0.0% - 1 AJ ONeal 0.0% - 1 Michael Hemesath 0.0% - 1 Morten Siebuhr 0.0% - 1 Samori Gorse 0.0% - 1 Tom Jensen 0.0% - -## Node Compatibility - - Connect `< 1.x` is compatible with node 0.2.x - - - Connect `1.x` is compatible with node 0.4.x - - - Connect (_master_) `2.x` is compatible with node 0.6.x - -## CLA - - [http://sencha.com/cla](http://sencha.com/cla) - -## License - -View the [LICENSE](https://github.com/senchalabs/connect/blob/master/LICENSE) file. The [Silk](http://www.famfamfam.com/lab/icons/silk/) icons used by the `directory` middleware created by/copyright of [FAMFAMFAM](http://www.famfamfam.com/). diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/index.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/index.js deleted file mode 100644 index 23240eed..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/index.js +++ /dev/null @@ -1,4 +0,0 @@ - -module.exports = process.env.CONNECT_COV - ? require('./lib-cov/connect') - : require('./lib/connect'); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/cache.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/cache.js deleted file mode 100644 index af6cd2f6..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/cache.js +++ /dev/null @@ -1,68 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['cache.js']) { - _$jscoverage['cache.js'] = []; - _$jscoverage['cache.js'][12] = 0; - _$jscoverage['cache.js'][21] = 0; - _$jscoverage['cache.js'][22] = 0; - _$jscoverage['cache.js'][23] = 0; - _$jscoverage['cache.js'][24] = 0; - _$jscoverage['cache.js'][35] = 0; - _$jscoverage['cache.js'][36] = 0; - _$jscoverage['cache.js'][37] = 0; - _$jscoverage['cache.js'][47] = 0; - _$jscoverage['cache.js'][48] = 0; - _$jscoverage['cache.js'][59] = 0; - _$jscoverage['cache.js'][60] = 0; - _$jscoverage['cache.js'][71] = 0; - _$jscoverage['cache.js'][73] = 0; - _$jscoverage['cache.js'][76] = 0; - _$jscoverage['cache.js'][78] = 0; - _$jscoverage['cache.js'][79] = 0; - _$jscoverage['cache.js'][80] = 0; -} -_$jscoverage['cache.js'][12]++; -module.exports = Cache; -_$jscoverage['cache.js'][21]++; -function Cache(limit) { - _$jscoverage['cache.js'][22]++; - this.store = {}; - _$jscoverage['cache.js'][23]++; - this.keys = []; - _$jscoverage['cache.js'][24]++; - this.limit = limit; -} -_$jscoverage['cache.js'][35]++; -Cache.prototype.touch = (function (key, i) { - _$jscoverage['cache.js'][36]++; - this.keys.splice(i, 1); - _$jscoverage['cache.js'][37]++; - this.keys.push(key); -}); -_$jscoverage['cache.js'][47]++; -Cache.prototype.remove = (function (key) { - _$jscoverage['cache.js'][48]++; - delete this.store[key]; -}); -_$jscoverage['cache.js'][59]++; -Cache.prototype.get = (function (key) { - _$jscoverage['cache.js'][60]++; - return this.store[key]; -}); -_$jscoverage['cache.js'][71]++; -Cache.prototype.add = (function (key) { - _$jscoverage['cache.js'][73]++; - var len = this.keys.push(key); - _$jscoverage['cache.js'][76]++; - if (len > this.limit) { - _$jscoverage['cache.js'][76]++; - this.remove(this.keys.shift()); - } - _$jscoverage['cache.js'][78]++; - var arr = this.store[key] = []; - _$jscoverage['cache.js'][79]++; - arr.createdAt = new Date(); - _$jscoverage['cache.js'][80]++; - return arr; -}); -_$jscoverage['cache.js'].source = ["","/*!"," * Connect - Cache"," * Copyright(c) 2011 Sencha Inc."," * MIT Licensed"," */","","/**"," * Expose `Cache`."," */","","module.exports = Cache;","","/**"," * LRU cache store."," *"," * @param {Number} limit"," * @api private"," */","","function Cache(limit) {"," this.store = {};"," this.keys = [];"," this.limit = limit;","}","","/**"," * Touch `key`, promoting the object."," *"," * @param {String} key"," * @param {Number} i"," * @api private"," */","","Cache.prototype.touch = function(key, i){"," this.keys.splice(i,1);"," this.keys.push(key);","};","","/**"," * Remove `key`."," *"," * @param {String} key"," * @api private"," */","","Cache.prototype.remove = function(key){"," delete this.store[key];","};","","/**"," * Get the object stored for `key`."," *"," * @param {String} key"," * @return {Array}"," * @api private"," */","","Cache.prototype.get = function(key){"," return this.store[key];","};","","/**"," * Add a cache `key`."," *"," * @param {String} key"," * @return {Array}"," * @api private"," */","","Cache.prototype.add = function(key){"," // initialize store"," var len = this.keys.push(key);",""," // limit reached, invalidate LRU"," if (len > this.limit) this.remove(this.keys.shift());",""," var arr = this.store[key] = [];"," arr.createdAt = new Date;"," return arr;","};"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/connect.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/connect.js deleted file mode 100644 index f811bb88..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/connect.js +++ /dev/null @@ -1,93 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['connect.js']) { - _$jscoverage['connect.js'] = []; - _$jscoverage['connect.js'][13] = 0; - _$jscoverage['connect.js'][22] = 0; - _$jscoverage['connect.js'][26] = 0; - _$jscoverage['connect.js'][32] = 0; - _$jscoverage['connect.js'][38] = 0; - _$jscoverage['connect.js'][44] = 0; - _$jscoverage['connect.js'][50] = 0; - _$jscoverage['connect.js'][56] = 0; - _$jscoverage['connect.js'][65] = 0; - _$jscoverage['connect.js'][66] = 0; - _$jscoverage['connect.js'][67] = 0; - _$jscoverage['connect.js'][68] = 0; - _$jscoverage['connect.js'][69] = 0; - _$jscoverage['connect.js'][70] = 0; - _$jscoverage['connect.js'][71] = 0; - _$jscoverage['connect.js'][72] = 0; - _$jscoverage['connect.js'][74] = 0; - _$jscoverage['connect.js'][75] = 0; - _$jscoverage['connect.js'][81] = 0; - _$jscoverage['connect.js'][87] = 0; - _$jscoverage['connect.js'][88] = 0; - _$jscoverage['connect.js'][89] = 0; - _$jscoverage['connect.js'][90] = 0; - _$jscoverage['connect.js'][91] = 0; - _$jscoverage['connect.js'][92] = 0; -} -_$jscoverage['connect.js'][13]++; -var EventEmitter = require("events").EventEmitter, proto = require("./proto"), utils = require("./utils"), path = require("path"), basename = path.basename, fs = require("fs"); -_$jscoverage['connect.js'][22]++; -require("./patch"); -_$jscoverage['connect.js'][26]++; -exports = module.exports = createServer; -_$jscoverage['connect.js'][32]++; -exports.version = "2.6.1"; -_$jscoverage['connect.js'][38]++; -exports.mime = require("./middleware/static").mime; -_$jscoverage['connect.js'][44]++; -exports.proto = proto; -_$jscoverage['connect.js'][50]++; -exports.middleware = {}; -_$jscoverage['connect.js'][56]++; -exports.utils = utils; -_$jscoverage['connect.js'][65]++; -function createServer() { - _$jscoverage['connect.js'][66]++; - function app(req, res) { - _$jscoverage['connect.js'][66]++; - app.handle(req, res); -} - _$jscoverage['connect.js'][67]++; - utils.merge(app, proto); - _$jscoverage['connect.js'][68]++; - utils.merge(app, EventEmitter.prototype); - _$jscoverage['connect.js'][69]++; - app.route = "/"; - _$jscoverage['connect.js'][70]++; - app.stack = []; - _$jscoverage['connect.js'][71]++; - for (var i = 0; i < arguments.length; ++i) { - _$jscoverage['connect.js'][72]++; - app.use(arguments[i]); -} - _$jscoverage['connect.js'][74]++; - return app; -} -_$jscoverage['connect.js'][75]++; -; -_$jscoverage['connect.js'][81]++; -createServer.createServer = createServer; -_$jscoverage['connect.js'][87]++; -fs.readdirSync(__dirname + "/middleware").forEach((function (filename) { - _$jscoverage['connect.js'][88]++; - if (! /\.js$/.test(filename)) { - _$jscoverage['connect.js'][88]++; - return; - } - _$jscoverage['connect.js'][89]++; - var name = basename(filename, ".js"); - _$jscoverage['connect.js'][90]++; - function load() { - _$jscoverage['connect.js'][90]++; - return require("./middleware/" + name); -} - _$jscoverage['connect.js'][91]++; - exports.middleware.__defineGetter__(name, load); - _$jscoverage['connect.js'][92]++; - exports.__defineGetter__(name, load); -})); -_$jscoverage['connect.js'].source = ["","/*!"," * Connect"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var EventEmitter = require('events').EventEmitter"," , proto = require('./proto')"," , utils = require('./utils')"," , path = require('path')"," , basename = path.basename"," , fs = require('fs');","","// node patches","","require('./patch');","","// expose createServer() as the module","","exports = module.exports = createServer;","","/**"," * Framework version."," */","","exports.version = '2.6.1';","","/**"," * Expose mime module."," */","","exports.mime = require('./middleware/static').mime;","","/**"," * Expose the prototype."," */","","exports.proto = proto;","","/**"," * Auto-load middleware getters."," */","","exports.middleware = {};","","/**"," * Expose utilities."," */","","exports.utils = utils;","","/**"," * Create a new connect server."," *"," * @return {Function}"," * @api public"," */","","function createServer() {"," function app(req, res){ app.handle(req, res); }"," utils.merge(app, proto);"," utils.merge(app, EventEmitter.prototype);"," app.route = '/';"," app.stack = [];"," for (var i = 0; i < arguments.length; ++i) {"," app.use(arguments[i]);"," }"," return app;","};","","/**"," * Support old `.createServer()` method."," */","","createServer.createServer = createServer;","","/**"," * Auto-load bundled middleware with getters."," */","","fs.readdirSync(__dirname + '/middleware').forEach(function(filename){"," if (!/\\.js$/.test(filename)) return;"," var name = basename(filename, '.js');"," function load(){ return require('./middleware/' + name); }"," exports.middleware.__defineGetter__(name, load);"," exports.__defineGetter__(name, load);","});"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/index.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/index.js deleted file mode 100644 index e6bb1c70..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/index.js +++ /dev/null @@ -1,6 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['index.js']) { - _$jscoverage['index.js'] = []; -} -_$jscoverage['index.js'].source = ["","/**"," * Connect is a middleware framework for node,"," * shipping with over 18 bundled middleware and a rich selection of"," * 3rd-party middleware."," *"," * var app = connect()"," * .use(connect.logger('dev'))"," * .use(connect.static('public'))"," * .use(function(req, res){"," * res.end('hello world\\n');"," * })"," * .listen(3000);"," * "," * Installation:"," * "," * $ npm install connect"," *"," * Middleware:"," *"," * - [logger](logger.html) request logger with custom format support"," * - [csrf](csrf.html) Cross-site request forgery protection"," * - [compress](compress.html) Gzip compression middleware"," * - [basicAuth](basicAuth.html) basic http authentication"," * - [bodyParser](bodyParser.html) extensible request body parser"," * - [json](json.html) application/json parser"," * - [urlencoded](urlencoded.html) application/x-www-form-urlencoded parser"," * - [multipart](multipart.html) multipart/form-data parser"," * - [timeout](timeout.html) request timeouts"," * - [cookieParser](cookieParser.html) cookie parser"," * - [session](session.html) session management support with bundled MemoryStore"," * - [cookieSession](cookieSession.html) cookie-based session support"," * - [methodOverride](methodOverride.html) faux HTTP method support"," * - [responseTime](responseTime.html) calculates response-time and exposes via X-Response-Time"," * - [staticCache](staticCache.html) memory cache layer for the static() middleware"," * - [static](static.html) streaming static file server supporting `Range` and more"," * - [directory](directory.html) directory listing middleware"," * - [vhost](vhost.html) virtual host sub-domain mapping middleware"," * - [favicon](favicon.html) efficient favicon server (with default icon)"," * - [limit](limit.html) limit the bytesize of request bodies"," * - [query](query.html) automatic querystring parser, populating `req.query`"," * - [errorHandler](errorHandler.html) flexible error handler"," *"," * Links:"," * "," * - list of [3rd-party](https://github.com/senchalabs/connect/wiki) middleware"," * - GitHub [repository](http://github.com/senchalabs/connect)"," * - [test documentation](https://github.com/senchalabs/connect/blob/gh-pages/tests.md)"," * "," */"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/basicAuth.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/basicAuth.js deleted file mode 100644 index c9e7d63a..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/basicAuth.js +++ /dev/null @@ -1,128 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/basicAuth.js']) { - _$jscoverage['middleware/basicAuth.js'] = []; - _$jscoverage['middleware/basicAuth.js'][13] = 0; - _$jscoverage['middleware/basicAuth.js'][48] = 0; - _$jscoverage['middleware/basicAuth.js'][49] = 0; - _$jscoverage['middleware/basicAuth.js'][52] = 0; - _$jscoverage['middleware/basicAuth.js'][53] = 0; - _$jscoverage['middleware/basicAuth.js'][54] = 0; - _$jscoverage['middleware/basicAuth.js'][55] = 0; - _$jscoverage['middleware/basicAuth.js'][56] = 0; - _$jscoverage['middleware/basicAuth.js'][57] = 0; - _$jscoverage['middleware/basicAuth.js'][58] = 0; - _$jscoverage['middleware/basicAuth.js'][62] = 0; - _$jscoverage['middleware/basicAuth.js'][64] = 0; - _$jscoverage['middleware/basicAuth.js'][65] = 0; - _$jscoverage['middleware/basicAuth.js'][67] = 0; - _$jscoverage['middleware/basicAuth.js'][68] = 0; - _$jscoverage['middleware/basicAuth.js'][70] = 0; - _$jscoverage['middleware/basicAuth.js'][72] = 0; - _$jscoverage['middleware/basicAuth.js'][74] = 0; - _$jscoverage['middleware/basicAuth.js'][78] = 0; - _$jscoverage['middleware/basicAuth.js'][80] = 0; - _$jscoverage['middleware/basicAuth.js'][84] = 0; - _$jscoverage['middleware/basicAuth.js'][85] = 0; - _$jscoverage['middleware/basicAuth.js'][86] = 0; - _$jscoverage['middleware/basicAuth.js'][87] = 0; - _$jscoverage['middleware/basicAuth.js'][88] = 0; - _$jscoverage['middleware/basicAuth.js'][89] = 0; - _$jscoverage['middleware/basicAuth.js'][90] = 0; - _$jscoverage['middleware/basicAuth.js'][94] = 0; - _$jscoverage['middleware/basicAuth.js'][95] = 0; - _$jscoverage['middleware/basicAuth.js'][96] = 0; - _$jscoverage['middleware/basicAuth.js'][98] = 0; -} -_$jscoverage['middleware/basicAuth.js'][13]++; -var utils = require("../utils"), unauthorized = utils.unauthorized; -_$jscoverage['middleware/basicAuth.js'][48]++; -module.exports = (function basicAuth(callback, realm) { - _$jscoverage['middleware/basicAuth.js'][49]++; - var username, password; - _$jscoverage['middleware/basicAuth.js'][52]++; - if ("string" == typeof callback) { - _$jscoverage['middleware/basicAuth.js'][53]++; - username = callback; - _$jscoverage['middleware/basicAuth.js'][54]++; - password = realm; - _$jscoverage['middleware/basicAuth.js'][55]++; - if ("string" != typeof password) { - _$jscoverage['middleware/basicAuth.js'][55]++; - throw new Error("password argument required"); - } - _$jscoverage['middleware/basicAuth.js'][56]++; - realm = arguments[2]; - _$jscoverage['middleware/basicAuth.js'][57]++; - callback = (function (user, pass) { - _$jscoverage['middleware/basicAuth.js'][58]++; - return user == username && pass == password; -}); - } - _$jscoverage['middleware/basicAuth.js'][62]++; - realm = realm || "Authorization Required"; - _$jscoverage['middleware/basicAuth.js'][64]++; - return (function (req, res, next) { - _$jscoverage['middleware/basicAuth.js'][65]++; - var authorization = req.headers.authorization; - _$jscoverage['middleware/basicAuth.js'][67]++; - if (req.user) { - _$jscoverage['middleware/basicAuth.js'][67]++; - return next(); - } - _$jscoverage['middleware/basicAuth.js'][68]++; - if (! authorization) { - _$jscoverage['middleware/basicAuth.js'][68]++; - return unauthorized(res, realm); - } - _$jscoverage['middleware/basicAuth.js'][70]++; - var parts = authorization.split(" "); - _$jscoverage['middleware/basicAuth.js'][72]++; - if (parts.length !== 2) { - _$jscoverage['middleware/basicAuth.js'][72]++; - return next(utils.error(400)); - } - _$jscoverage['middleware/basicAuth.js'][74]++; - var scheme = parts[0], credentials = new Buffer(parts[1], "base64").toString(), index = credentials.indexOf(":"); - _$jscoverage['middleware/basicAuth.js'][78]++; - if ("Basic" != scheme || index < 0) { - _$jscoverage['middleware/basicAuth.js'][78]++; - return next(utils.error(400)); - } - _$jscoverage['middleware/basicAuth.js'][80]++; - var user = credentials.slice(0, index), pass = credentials.slice(index + 1); - _$jscoverage['middleware/basicAuth.js'][84]++; - if (callback.length >= 3) { - _$jscoverage['middleware/basicAuth.js'][85]++; - var pause = utils.pause(req); - _$jscoverage['middleware/basicAuth.js'][86]++; - callback(user, pass, (function (err, user) { - _$jscoverage['middleware/basicAuth.js'][87]++; - if (err || ! user) { - _$jscoverage['middleware/basicAuth.js'][87]++; - return unauthorized(res, realm); - } - _$jscoverage['middleware/basicAuth.js'][88]++; - req.user = req.remoteUser = user; - _$jscoverage['middleware/basicAuth.js'][89]++; - next(); - _$jscoverage['middleware/basicAuth.js'][90]++; - pause.resume(); -})); - } - else { - _$jscoverage['middleware/basicAuth.js'][94]++; - if (callback(user, pass)) { - _$jscoverage['middleware/basicAuth.js'][95]++; - req.user = req.remoteUser = user; - _$jscoverage['middleware/basicAuth.js'][96]++; - next(); - } - else { - _$jscoverage['middleware/basicAuth.js'][98]++; - unauthorized(res, realm); - } - } -}); -}); -_$jscoverage['middleware/basicAuth.js'].source = ["","/*!"," * Connect - basicAuth"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var utils = require('../utils')"," , unauthorized = utils.unauthorized;","","/**"," * Basic Auth:"," *"," * Enfore basic authentication by providing a `callback(user, pass)`,"," * which must return `true` in order to gain access. Alternatively an async"," * method is provided as well, invoking `callback(user, pass, callback)`. Populates"," * `req.user`. The final alternative is simply passing username / password"," * strings."," *"," * Simple username and password"," *"," * connect(connect.basicAuth('username', 'password'));"," *"," * Callback verification"," *"," * connect()"," * .use(connect.basicAuth(function(user, pass){"," * return 'tj' == user & 'wahoo' == pass;"," * }))"," *"," * Async callback verification, accepting `fn(err, user)`."," *"," * connect()"," * .use(connect.basicAuth(function(user, pass, fn){"," * User.authenticate({ user: user, pass: pass }, fn);"," * }))"," *"," * @param {Function|String} callback or username"," * @param {String} realm"," * @api public"," */","","module.exports = function basicAuth(callback, realm) {"," var username, password;",""," // user / pass strings"," if ('string' == typeof callback) {"," username = callback;"," password = realm;"," if ('string' != typeof password) throw new Error('password argument required');"," realm = arguments[2];"," callback = function(user, pass){"," return user == username && pass == password;"," }"," }",""," realm = realm || 'Authorization Required';",""," return function(req, res, next) {"," var authorization = req.headers.authorization;",""," if (req.user) return next();"," if (!authorization) return unauthorized(res, realm);",""," var parts = authorization.split(' ');",""," if (parts.length !== 2) return next(utils.error(400));",""," var scheme = parts[0]"," , credentials = new Buffer(parts[1], 'base64').toString()"," , index = credentials.indexOf(':');",""," if ('Basic' != scheme || index < 0) return next(utils.error(400));"," "," var user = credentials.slice(0, index)"," , pass = credentials.slice(index + 1);",""," // async"," if (callback.length >= 3) {"," var pause = utils.pause(req);"," callback(user, pass, function(err, user){"," if (err || !user) return unauthorized(res, realm);"," req.user = req.remoteUser = user;"," next();"," pause.resume();"," });"," // sync"," } else {"," if (callback(user, pass)) {"," req.user = req.remoteUser = user;"," next();"," } else {"," unauthorized(res, realm);"," }"," }"," }","};",""]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/bodyParser.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/bodyParser.js deleted file mode 100644 index a108b97a..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/bodyParser.js +++ /dev/null @@ -1,43 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/bodyParser.js']) { - _$jscoverage['middleware/bodyParser.js'] = []; - _$jscoverage['middleware/bodyParser.js'][13] = 0; - _$jscoverage['middleware/bodyParser.js'][47] = 0; - _$jscoverage['middleware/bodyParser.js'][48] = 0; - _$jscoverage['middleware/bodyParser.js'][52] = 0; - _$jscoverage['middleware/bodyParser.js'][53] = 0; - _$jscoverage['middleware/bodyParser.js'][54] = 0; - _$jscoverage['middleware/bodyParser.js'][55] = 0; - _$jscoverage['middleware/bodyParser.js'][56] = 0; - _$jscoverage['middleware/bodyParser.js'][57] = 0; -} -_$jscoverage['middleware/bodyParser.js'][13]++; -var multipart = require("./multipart"), urlencoded = require("./urlencoded"), json = require("./json"); -_$jscoverage['middleware/bodyParser.js'][47]++; -exports = module.exports = (function bodyParser(options) { - _$jscoverage['middleware/bodyParser.js'][48]++; - var _urlencoded = urlencoded(options), _multipart = multipart(options), _json = json(options); - _$jscoverage['middleware/bodyParser.js'][52]++; - return (function bodyParser(req, res, next) { - _$jscoverage['middleware/bodyParser.js'][53]++; - _json(req, res, (function (err) { - _$jscoverage['middleware/bodyParser.js'][54]++; - if (err) { - _$jscoverage['middleware/bodyParser.js'][54]++; - return next(err); - } - _$jscoverage['middleware/bodyParser.js'][55]++; - _urlencoded(req, res, (function (err) { - _$jscoverage['middleware/bodyParser.js'][56]++; - if (err) { - _$jscoverage['middleware/bodyParser.js'][56]++; - return next(err); - } - _$jscoverage['middleware/bodyParser.js'][57]++; - _multipart(req, res, next); -})); -})); -}); -}); -_$jscoverage['middleware/bodyParser.js'].source = ["","/*!"," * Connect - bodyParser"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var multipart = require('./multipart')"," , urlencoded = require('./urlencoded')"," , json = require('./json');","","/**"," * Body parser:"," * "," * Parse request bodies, supports _application/json_,"," * _application/x-www-form-urlencoded_, and _multipart/form-data_."," *"," * This is equivalent to: "," *"," * app.use(connect.json());"," * app.use(connect.urlencoded());"," * app.use(connect.multipart());"," *"," * Examples:"," *"," * connect()"," * .use(connect.bodyParser())"," * .use(function(req, res) {"," * res.end('viewing user ' + req.body.user.name);"," * });"," *"," * $ curl -d 'user[name]=tj' http://local/"," * $ curl -d '{\"user\":{\"name\":\"tj\"}}' -H \"Content-Type: application/json\" http://local/"," *"," * View [json](json.html), [urlencoded](urlencoded.html), and [multipart](multipart.html) for more info."," *"," * @param {Object} options"," * @return {Function}"," * @api public"," */","","exports = module.exports = function bodyParser(options){"," var _urlencoded = urlencoded(options)"," , _multipart = multipart(options)"," , _json = json(options);",""," return function bodyParser(req, res, next) {"," _json(req, res, function(err){"," if (err) return next(err);"," _urlencoded(req, res, function(err){"," if (err) return next(err);"," _multipart(req, res, next);"," });"," });"," }","};"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/compress.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/compress.js deleted file mode 100644 index aebd5f13..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/compress.js +++ /dev/null @@ -1,159 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/compress.js']) { - _$jscoverage['middleware/compress.js'] = []; - _$jscoverage['middleware/compress.js'][12] = 0; - _$jscoverage['middleware/compress.js'][18] = 0; - _$jscoverage['middleware/compress.js'][27] = 0; - _$jscoverage['middleware/compress.js'][28] = 0; - _$jscoverage['middleware/compress.js'][61] = 0; - _$jscoverage['middleware/compress.js'][62] = 0; - _$jscoverage['middleware/compress.js'][63] = 0; - _$jscoverage['middleware/compress.js'][66] = 0; - _$jscoverage['middleware/compress.js'][67] = 0; - _$jscoverage['middleware/compress.js'][74] = 0; - _$jscoverage['middleware/compress.js'][78] = 0; - _$jscoverage['middleware/compress.js'][79] = 0; - _$jscoverage['middleware/compress.js'][80] = 0; - _$jscoverage['middleware/compress.js'][85] = 0; - _$jscoverage['middleware/compress.js'][86] = 0; - _$jscoverage['middleware/compress.js'][87] = 0; - _$jscoverage['middleware/compress.js'][92] = 0; - _$jscoverage['middleware/compress.js'][93] = 0; - _$jscoverage['middleware/compress.js'][96] = 0; - _$jscoverage['middleware/compress.js'][99] = 0; - _$jscoverage['middleware/compress.js'][102] = 0; - _$jscoverage['middleware/compress.js'][105] = 0; - _$jscoverage['middleware/compress.js'][108] = 0; - _$jscoverage['middleware/compress.js'][111] = 0; - _$jscoverage['middleware/compress.js'][112] = 0; - _$jscoverage['middleware/compress.js'][113] = 0; - _$jscoverage['middleware/compress.js'][114] = 0; - _$jscoverage['middleware/compress.js'][115] = 0; - _$jscoverage['middleware/compress.js'][121] = 0; - _$jscoverage['middleware/compress.js'][124] = 0; - _$jscoverage['middleware/compress.js'][127] = 0; - _$jscoverage['middleware/compress.js'][128] = 0; - _$jscoverage['middleware/compress.js'][132] = 0; - _$jscoverage['middleware/compress.js'][133] = 0; - _$jscoverage['middleware/compress.js'][136] = 0; - _$jscoverage['middleware/compress.js'][137] = 0; - _$jscoverage['middleware/compress.js'][140] = 0; - _$jscoverage['middleware/compress.js'][141] = 0; - _$jscoverage['middleware/compress.js'][145] = 0; -} -_$jscoverage['middleware/compress.js'][12]++; -var zlib = require("zlib"); -_$jscoverage['middleware/compress.js'][18]++; -exports.methods = {gzip: zlib.createGzip, deflate: zlib.createDeflate}; -_$jscoverage['middleware/compress.js'][27]++; -exports.filter = (function (req, res) { - _$jscoverage['middleware/compress.js'][28]++; - return /json|text|javascript/.test(res.getHeader("Content-Type")); -}); -_$jscoverage['middleware/compress.js'][61]++; -module.exports = (function compress(options) { - _$jscoverage['middleware/compress.js'][62]++; - options = options || {}; - _$jscoverage['middleware/compress.js'][63]++; - var names = Object.keys(exports.methods), filter = options.filter || exports.filter; - _$jscoverage['middleware/compress.js'][66]++; - return (function (req, res, next) { - _$jscoverage['middleware/compress.js'][67]++; - var accept = req.headers["accept-encoding"], write = res.write, end = res.end, stream, method; - _$jscoverage['middleware/compress.js'][74]++; - res.setHeader("Vary", "Accept-Encoding"); - _$jscoverage['middleware/compress.js'][78]++; - res.write = (function (chunk, encoding) { - _$jscoverage['middleware/compress.js'][79]++; - if (! this.headerSent) { - _$jscoverage['middleware/compress.js'][79]++; - this._implicitHeader(); - } - _$jscoverage['middleware/compress.js'][80]++; - return stream? stream.write(new Buffer(chunk, encoding)): write.call(res, chunk, encoding); -}); - _$jscoverage['middleware/compress.js'][85]++; - res.end = (function (chunk, encoding) { - _$jscoverage['middleware/compress.js'][86]++; - if (chunk) { - _$jscoverage['middleware/compress.js'][86]++; - this.write(chunk, encoding); - } - _$jscoverage['middleware/compress.js'][87]++; - return stream? stream.end(): end.call(res); -}); - _$jscoverage['middleware/compress.js'][92]++; - res.on("header", (function () { - _$jscoverage['middleware/compress.js'][93]++; - var encoding = res.getHeader("Content-Encoding") || "identity"; - _$jscoverage['middleware/compress.js'][96]++; - if ("identity" != encoding) { - _$jscoverage['middleware/compress.js'][96]++; - return; - } - _$jscoverage['middleware/compress.js'][99]++; - if (! filter(req, res)) { - _$jscoverage['middleware/compress.js'][99]++; - return; - } - _$jscoverage['middleware/compress.js'][102]++; - if (! accept) { - _$jscoverage['middleware/compress.js'][102]++; - return; - } - _$jscoverage['middleware/compress.js'][105]++; - if ("HEAD" == req.method) { - _$jscoverage['middleware/compress.js'][105]++; - return; - } - _$jscoverage['middleware/compress.js'][108]++; - if ("*" == accept.trim()) { - _$jscoverage['middleware/compress.js'][108]++; - method = "gzip"; - } - _$jscoverage['middleware/compress.js'][111]++; - if (! method) { - _$jscoverage['middleware/compress.js'][112]++; - for (var i = 0, len = names.length; i < len; ++i) { - _$jscoverage['middleware/compress.js'][113]++; - if (~ accept.indexOf(names[i])) { - _$jscoverage['middleware/compress.js'][114]++; - method = names[i]; - _$jscoverage['middleware/compress.js'][115]++; - break; - } -} - } - _$jscoverage['middleware/compress.js'][121]++; - if (! method) { - _$jscoverage['middleware/compress.js'][121]++; - return; - } - _$jscoverage['middleware/compress.js'][124]++; - stream = exports.methods[method](options); - _$jscoverage['middleware/compress.js'][127]++; - res.setHeader("Content-Encoding", method); - _$jscoverage['middleware/compress.js'][128]++; - res.removeHeader("Content-Length"); - _$jscoverage['middleware/compress.js'][132]++; - stream.on("data", (function (chunk) { - _$jscoverage['middleware/compress.js'][133]++; - write.call(res, chunk); -})); - _$jscoverage['middleware/compress.js'][136]++; - stream.on("end", (function () { - _$jscoverage['middleware/compress.js'][137]++; - end.call(res); -})); - _$jscoverage['middleware/compress.js'][140]++; - stream.on("drain", (function () { - _$jscoverage['middleware/compress.js'][141]++; - res.emit("drain"); -})); -})); - _$jscoverage['middleware/compress.js'][145]++; - next(); -}); -}); -_$jscoverage['middleware/compress.js'].source = ["/*!"," * Connect - compress"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var zlib = require('zlib');","","/**"," * Supported content-encoding methods."," */","","exports.methods = {"," gzip: zlib.createGzip"," , deflate: zlib.createDeflate","};","","/**"," * Default filter function."," */","","exports.filter = function(req, res){"," return /json|text|javascript/.test(res.getHeader('Content-Type'));","};","","/**"," * Compress:"," *"," * Compress response data with gzip/deflate."," *"," * Filter:"," *"," * A `filter` callback function may be passed to"," * replace the default logic of:"," *"," * exports.filter = function(req, res){"," * return /json|text|javascript/.test(res.getHeader('Content-Type'));"," * };"," *"," * Options:"," *"," * All remaining options are passed to the gzip/deflate"," * creation functions. Consult node's docs for additional details."," *"," * - `chunkSize` (default: 16*1024)"," * - `windowBits`"," * - `level`: 0-9 where 0 is no compression, and 9 is slow but best compression"," * - `memLevel`: 1-9 low is slower but uses less memory, high is fast but uses more"," * - `strategy`: compression strategy"," *"," * @param {Object} options"," * @return {Function}"," * @api public"," */","","module.exports = function compress(options) {"," options = options || {};"," var names = Object.keys(exports.methods)"," , filter = options.filter || exports.filter;",""," return function(req, res, next){"," var accept = req.headers['accept-encoding']"," , write = res.write"," , end = res.end"," , stream"," , method;",""," // vary"," res.setHeader('Vary', 'Accept-Encoding');",""," // proxy",""," res.write = function(chunk, encoding){"," if (!this.headerSent) this._implicitHeader();"," return stream"," ? stream.write(new Buffer(chunk, encoding))"," : write.call(res, chunk, encoding);"," };",""," res.end = function(chunk, encoding){"," if (chunk) this.write(chunk, encoding);"," return stream"," ? stream.end()"," : end.call(res);"," };",""," res.on('header', function(){"," var encoding = res.getHeader('Content-Encoding') || 'identity';",""," // already encoded"," if ('identity' != encoding) return; ",""," // default request filter"," if (!filter(req, res)) return;",""," // SHOULD use identity"," if (!accept) return;",""," // head"," if ('HEAD' == req.method) return;",""," // default to gzip"," if ('*' == accept.trim()) method = 'gzip';",""," // compression method"," if (!method) {"," for (var i = 0, len = names.length; i < len; ++i) {"," if (~accept.indexOf(names[i])) {"," method = names[i];"," break;"," }"," }"," }",""," // compression method"," if (!method) return;",""," // compression stream"," stream = exports.methods[method](options);",""," // header fields"," res.setHeader('Content-Encoding', method);"," res.removeHeader('Content-Length');",""," // compression",""," stream.on('data', function(chunk){"," write.call(res, chunk);"," });",""," stream.on('end', function(){"," end.call(res);"," });",""," stream.on('drain', function() {"," res.emit('drain');"," });"," });",""," next();"," };","};"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/cookieParser.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/cookieParser.js deleted file mode 100644 index 7f462d18..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/cookieParser.js +++ /dev/null @@ -1,70 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/cookieParser.js']) { - _$jscoverage['middleware/cookieParser.js'] = []; - _$jscoverage['middleware/cookieParser.js'][13] = 0; - _$jscoverage['middleware/cookieParser.js'][38] = 0; - _$jscoverage['middleware/cookieParser.js'][39] = 0; - _$jscoverage['middleware/cookieParser.js'][40] = 0; - _$jscoverage['middleware/cookieParser.js'][41] = 0; - _$jscoverage['middleware/cookieParser.js'][43] = 0; - _$jscoverage['middleware/cookieParser.js'][44] = 0; - _$jscoverage['middleware/cookieParser.js'][45] = 0; - _$jscoverage['middleware/cookieParser.js'][47] = 0; - _$jscoverage['middleware/cookieParser.js'][48] = 0; - _$jscoverage['middleware/cookieParser.js'][49] = 0; - _$jscoverage['middleware/cookieParser.js'][50] = 0; - _$jscoverage['middleware/cookieParser.js'][51] = 0; - _$jscoverage['middleware/cookieParser.js'][52] = 0; - _$jscoverage['middleware/cookieParser.js'][54] = 0; - _$jscoverage['middleware/cookieParser.js'][56] = 0; - _$jscoverage['middleware/cookieParser.js'][57] = 0; - _$jscoverage['middleware/cookieParser.js'][60] = 0; -} -_$jscoverage['middleware/cookieParser.js'][13]++; -var utils = require("./../utils"), cookie = require("cookie"); -_$jscoverage['middleware/cookieParser.js'][38]++; -module.exports = (function cookieParser(secret) { - _$jscoverage['middleware/cookieParser.js'][39]++; - return (function cookieParser(req, res, next) { - _$jscoverage['middleware/cookieParser.js'][40]++; - if (req.cookies) { - _$jscoverage['middleware/cookieParser.js'][40]++; - return next(); - } - _$jscoverage['middleware/cookieParser.js'][41]++; - var cookies = req.headers.cookie; - _$jscoverage['middleware/cookieParser.js'][43]++; - req.secret = secret; - _$jscoverage['middleware/cookieParser.js'][44]++; - req.cookies = {}; - _$jscoverage['middleware/cookieParser.js'][45]++; - req.signedCookies = {}; - _$jscoverage['middleware/cookieParser.js'][47]++; - if (cookies) { - _$jscoverage['middleware/cookieParser.js'][48]++; - try { - _$jscoverage['middleware/cookieParser.js'][49]++; - req.cookies = cookie.parse(cookies); - _$jscoverage['middleware/cookieParser.js'][50]++; - if (secret) { - _$jscoverage['middleware/cookieParser.js'][51]++; - req.signedCookies = utils.parseSignedCookies(req.cookies, secret); - _$jscoverage['middleware/cookieParser.js'][52]++; - req.signedCookies = utils.parseJSONCookies(req.signedCookies); - } - _$jscoverage['middleware/cookieParser.js'][54]++; - req.cookies = utils.parseJSONCookies(req.cookies); - } - catch (err) { - _$jscoverage['middleware/cookieParser.js'][56]++; - err.status = 400; - _$jscoverage['middleware/cookieParser.js'][57]++; - return next(err); - } - } - _$jscoverage['middleware/cookieParser.js'][60]++; - next(); -}); -}); -_$jscoverage['middleware/cookieParser.js'].source = ["","/*!"," * Connect - cookieParser"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var utils = require('./../utils')"," , cookie = require('cookie');","","/**"," * Cookie parser:"," *"," * Parse _Cookie_ header and populate `req.cookies`"," * with an object keyed by the cookie names. Optionally"," * you may enabled signed cookie support by passing"," * a `secret` string, which assigns `req.secret` so"," * it may be used by other middleware."," *"," * Examples:"," *"," * connect()"," * .use(connect.cookieParser('optional secret string'))"," * .use(function(req, res, next){"," * res.end(JSON.stringify(req.cookies));"," * })"," *"," * @param {String} secret"," * @return {Function}"," * @api public"," */","","module.exports = function cookieParser(secret){"," return function cookieParser(req, res, next) {"," if (req.cookies) return next();"," var cookies = req.headers.cookie;",""," req.secret = secret;"," req.cookies = {};"," req.signedCookies = {};",""," if (cookies) {"," try {"," req.cookies = cookie.parse(cookies);"," if (secret) {"," req.signedCookies = utils.parseSignedCookies(req.cookies, secret);"," req.signedCookies = utils.parseJSONCookies(req.signedCookies);"," }"," req.cookies = utils.parseJSONCookies(req.cookies);"," } catch (err) {"," err.status = 400;"," return next(err);"," }"," }"," next();"," };","};"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/cookieSession.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/cookieSession.js deleted file mode 100644 index e54fa471..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/cookieSession.js +++ /dev/null @@ -1,132 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/cookieSession.js']) { - _$jscoverage['middleware/cookieSession.js'] = []; - _$jscoverage['middleware/cookieSession.js'][12] = 0; - _$jscoverage['middleware/cookieSession.js'][46] = 0; - _$jscoverage['middleware/cookieSession.js'][48] = 0; - _$jscoverage['middleware/cookieSession.js'][49] = 0; - _$jscoverage['middleware/cookieSession.js'][52] = 0; - _$jscoverage['middleware/cookieSession.js'][55] = 0; - _$jscoverage['middleware/cookieSession.js'][56] = 0; - _$jscoverage['middleware/cookieSession.js'][59] = 0; - _$jscoverage['middleware/cookieSession.js'][60] = 0; - _$jscoverage['middleware/cookieSession.js'][63] = 0; - _$jscoverage['middleware/cookieSession.js'][66] = 0; - _$jscoverage['middleware/cookieSession.js'][67] = 0; - _$jscoverage['middleware/cookieSession.js'][70] = 0; - _$jscoverage['middleware/cookieSession.js'][71] = 0; - _$jscoverage['middleware/cookieSession.js'][72] = 0; - _$jscoverage['middleware/cookieSession.js'][73] = 0; - _$jscoverage['middleware/cookieSession.js'][74] = 0; - _$jscoverage['middleware/cookieSession.js'][75] = 0; - _$jscoverage['middleware/cookieSession.js'][80] = 0; - _$jscoverage['middleware/cookieSession.js'][82] = 0; - _$jscoverage['middleware/cookieSession.js'][83] = 0; - _$jscoverage['middleware/cookieSession.js'][84] = 0; - _$jscoverage['middleware/cookieSession.js'][85] = 0; - _$jscoverage['middleware/cookieSession.js'][86] = 0; - _$jscoverage['middleware/cookieSession.js'][89] = 0; - _$jscoverage['middleware/cookieSession.js'][92] = 0; - _$jscoverage['middleware/cookieSession.js'][97] = 0; - _$jscoverage['middleware/cookieSession.js'][100] = 0; - _$jscoverage['middleware/cookieSession.js'][101] = 0; - _$jscoverage['middleware/cookieSession.js'][104] = 0; - _$jscoverage['middleware/cookieSession.js'][107] = 0; - _$jscoverage['middleware/cookieSession.js'][108] = 0; - _$jscoverage['middleware/cookieSession.js'][109] = 0; - _$jscoverage['middleware/cookieSession.js'][110] = 0; - _$jscoverage['middleware/cookieSession.js'][113] = 0; -} -_$jscoverage['middleware/cookieSession.js'][12]++; -var utils = require("./../utils"), Cookie = require("./session/cookie"), debug = require("debug")("connect:cookieSession"), signature = require("cookie-signature"), crc16 = require("crc").crc16; -_$jscoverage['middleware/cookieSession.js'][46]++; -module.exports = (function cookieSession(options) { - _$jscoverage['middleware/cookieSession.js'][48]++; - options = options || {}; - _$jscoverage['middleware/cookieSession.js'][49]++; - var key = options.key || "connect.sess", trustProxy = options.proxy; - _$jscoverage['middleware/cookieSession.js'][52]++; - return (function cookieSession(req, res, next) { - _$jscoverage['middleware/cookieSession.js'][55]++; - var secret = options.secret || req.secret; - _$jscoverage['middleware/cookieSession.js'][56]++; - if (! secret) { - _$jscoverage['middleware/cookieSession.js'][56]++; - throw new Error("`secret` option required for cookie sessions"); - } - _$jscoverage['middleware/cookieSession.js'][59]++; - req.session = {}; - _$jscoverage['middleware/cookieSession.js'][60]++; - var cookie = req.session.cookie = new Cookie(options.cookie); - _$jscoverage['middleware/cookieSession.js'][63]++; - if (0 != req.originalUrl.indexOf(cookie.path)) { - _$jscoverage['middleware/cookieSession.js'][63]++; - return next(); - } - _$jscoverage['middleware/cookieSession.js'][66]++; - if (! options.secret && req.secret) { - _$jscoverage['middleware/cookieSession.js'][67]++; - req.session = req.signedCookies[key] || {}; - } - else { - _$jscoverage['middleware/cookieSession.js'][70]++; - var rawCookie = req.cookies[key]; - _$jscoverage['middleware/cookieSession.js'][71]++; - if (rawCookie) { - _$jscoverage['middleware/cookieSession.js'][72]++; - var unsigned = utils.parseSignedCookie(rawCookie, secret); - _$jscoverage['middleware/cookieSession.js'][73]++; - if (unsigned) { - _$jscoverage['middleware/cookieSession.js'][74]++; - var originalHash = crc16(unsigned); - _$jscoverage['middleware/cookieSession.js'][75]++; - req.session = utils.parseJSONCookie(unsigned) || {}; - } - } - } - _$jscoverage['middleware/cookieSession.js'][80]++; - res.on("header", (function () { - _$jscoverage['middleware/cookieSession.js'][82]++; - if (! req.session) { - _$jscoverage['middleware/cookieSession.js'][83]++; - debug("clear session"); - _$jscoverage['middleware/cookieSession.js'][84]++; - cookie.expires = new Date(0); - _$jscoverage['middleware/cookieSession.js'][85]++; - res.setHeader("Set-Cookie", cookie.serialize(key, "")); - _$jscoverage['middleware/cookieSession.js'][86]++; - return; - } - _$jscoverage['middleware/cookieSession.js'][89]++; - delete req.session.cookie; - _$jscoverage['middleware/cookieSession.js'][92]++; - var proto = (req.headers["x-forwarded-proto"] || "").toLowerCase(), tls = req.connection.encrypted || (trustProxy && "https" == proto), secured = cookie.secure && tls; - _$jscoverage['middleware/cookieSession.js'][97]++; - if (cookie.secure && ! secured) { - _$jscoverage['middleware/cookieSession.js'][97]++; - return debug("not secured"); - } - _$jscoverage['middleware/cookieSession.js'][100]++; - debug("serializing %j", req.session); - _$jscoverage['middleware/cookieSession.js'][101]++; - var val = "j:" + JSON.stringify(req.session); - _$jscoverage['middleware/cookieSession.js'][104]++; - if (originalHash == crc16(val)) { - _$jscoverage['middleware/cookieSession.js'][104]++; - return debug("unmodified session"); - } - _$jscoverage['middleware/cookieSession.js'][107]++; - val = "s:" + signature.sign(val, secret); - _$jscoverage['middleware/cookieSession.js'][108]++; - val = cookie.serialize(key, val); - _$jscoverage['middleware/cookieSession.js'][109]++; - debug("set-cookie %j", cookie); - _$jscoverage['middleware/cookieSession.js'][110]++; - res.setHeader("Set-Cookie", val); -})); - _$jscoverage['middleware/cookieSession.js'][113]++; - next(); -}); -}); -_$jscoverage['middleware/cookieSession.js'].source = ["","/*!"," * Connect - cookieSession"," * Copyright(c) 2011 Sencha Inc."," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var utils = require('./../utils')"," , Cookie = require('./session/cookie')"," , debug = require('debug')('connect:cookieSession')"," , signature = require('cookie-signature')"," , crc16 = require('crc').crc16;","","/**"," * Cookie Session:"," *"," * Cookie session middleware."," *"," * var app = connect();"," * app.use(connect.cookieParser());"," * app.use(connect.cookieSession({ secret: 'tobo!', cookie: { maxAge: 60 * 60 * 1000 }}));"," *"," * Options:"," *"," * - `key` cookie name defaulting to `connect.sess`"," * - `secret` prevents cookie tampering"," * - `cookie` session cookie settings, defaulting to `{ path: '/', httpOnly: true, maxAge: null }`"," * - `proxy` trust the reverse proxy when setting secure cookies (via \"x-forwarded-proto\")"," *"," * Clearing sessions:"," *"," * To clear the session simply set its value to `null`,"," * `cookieSession()` will then respond with a 1970 Set-Cookie."," *"," * req.session = null;"," *"," * @param {Object} options"," * @return {Function}"," * @api public"," */","","module.exports = function cookieSession(options){"," // TODO: utilize Session/Cookie to unify API"," options = options || {};"," var key = options.key || 'connect.sess'"," , trustProxy = options.proxy;",""," return function cookieSession(req, res, next) {",""," // req.secret is for backwards compatibility"," var secret = options.secret || req.secret;"," if (!secret) throw new Error('`secret` option required for cookie sessions');",""," // default session"," req.session = {};"," var cookie = req.session.cookie = new Cookie(options.cookie);",""," // pathname mismatch"," if (0 != req.originalUrl.indexOf(cookie.path)) return next();",""," // cookieParser secret"," if (!options.secret && req.secret) {"," req.session = req.signedCookies[key] || {};"," } else {"," // TODO: refactor"," var rawCookie = req.cookies[key];"," if (rawCookie) {"," var unsigned = utils.parseSignedCookie(rawCookie, secret);"," if (unsigned) {"," var originalHash = crc16(unsigned);"," req.session = utils.parseJSONCookie(unsigned) || {};"," }"," }"," }",""," res.on('header', function(){"," // removed"," if (!req.session) {"," debug('clear session');"," cookie.expires = new Date(0);"," res.setHeader('Set-Cookie', cookie.serialize(key, ''));"," return;"," }",""," delete req.session.cookie;",""," // check security"," var proto = (req.headers['x-forwarded-proto'] || '').toLowerCase()"," , tls = req.connection.encrypted || (trustProxy && 'https' == proto)"," , secured = cookie.secure && tls;",""," // only send secure cookies via https"," if (cookie.secure && !secured) return debug('not secured');",""," // serialize"," debug('serializing %j', req.session);"," var val = 'j:' + JSON.stringify(req.session);",""," // compare hashes, no need to set-cookie if unchanged"," if (originalHash == crc16(val)) return debug('unmodified session');",""," // set-cookie"," val = 's:' + signature.sign(val, secret);"," val = cookie.serialize(key, val);"," debug('set-cookie %j', cookie);"," res.setHeader('Set-Cookie', val);"," });",""," next();"," };","};"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/csrf.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/csrf.js deleted file mode 100644 index f3919ed4..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/csrf.js +++ /dev/null @@ -1,51 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/csrf.js']) { - _$jscoverage['middleware/csrf.js'] = []; - _$jscoverage['middleware/csrf.js'][11] = 0; - _$jscoverage['middleware/csrf.js'][39] = 0; - _$jscoverage['middleware/csrf.js'][40] = 0; - _$jscoverage['middleware/csrf.js'][41] = 0; - _$jscoverage['middleware/csrf.js'][43] = 0; - _$jscoverage['middleware/csrf.js'][45] = 0; - _$jscoverage['middleware/csrf.js'][48] = 0; - _$jscoverage['middleware/csrf.js'][51] = 0; - _$jscoverage['middleware/csrf.js'][54] = 0; - _$jscoverage['middleware/csrf.js'][56] = 0; - _$jscoverage['middleware/csrf.js'][69] = 0; - _$jscoverage['middleware/csrf.js'][70] = 0; -} -_$jscoverage['middleware/csrf.js'][11]++; -var utils = require("../utils"); -_$jscoverage['middleware/csrf.js'][39]++; -module.exports = (function csrf(options) { - _$jscoverage['middleware/csrf.js'][40]++; - options = options || {}; - _$jscoverage['middleware/csrf.js'][41]++; - var value = options.value || defaultValue; - _$jscoverage['middleware/csrf.js'][43]++; - return (function (req, res, next) { - _$jscoverage['middleware/csrf.js'][45]++; - var token = req.session._csrf || (req.session._csrf = utils.uid(24)); - _$jscoverage['middleware/csrf.js'][48]++; - if ("GET" == req.method || "HEAD" == req.method || "OPTIONS" == req.method) { - _$jscoverage['middleware/csrf.js'][48]++; - return next(); - } - _$jscoverage['middleware/csrf.js'][51]++; - var val = value(req); - _$jscoverage['middleware/csrf.js'][54]++; - if (val != token) { - _$jscoverage['middleware/csrf.js'][54]++; - return next(utils.error(403)); - } - _$jscoverage['middleware/csrf.js'][56]++; - next(); -}); -}); -_$jscoverage['middleware/csrf.js'][69]++; -function defaultValue(req) { - _$jscoverage['middleware/csrf.js'][70]++; - return (req.body && req.body._csrf) || (req.query && req.query._csrf) || req.headers["x-csrf-token"]; -} -_$jscoverage['middleware/csrf.js'].source = ["/*!"," * Connect - csrf"," * Copyright(c) 2011 Sencha Inc."," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var utils = require('../utils');","","/**"," * Anti CSRF:"," *"," * CRSF protection middleware."," *"," * By default this middleware generates a token named \"_csrf\""," * which should be added to requests which mutate"," * state, within a hidden form field, query-string etc. This"," * token is validated against the visitor's `req.session._csrf`"," * property."," *"," * The default `value` function checks `req.body` generated"," * by the `bodyParser()` middleware, `req.query` generated"," * by `query()`, and the \"X-CSRF-Token\" header field."," *"," * This middleware requires session support, thus should be added"," * somewhere _below_ `session()` and `cookieParser()`."," *"," * Options:"," *"," * - `value` a function accepting the request, returning the token "," *"," * @param {Object} options"," * @api public"," */","","module.exports = function csrf(options) {"," options = options || {};"," var value = options.value || defaultValue;",""," return function(req, res, next){"," // generate CSRF token"," var token = req.session._csrf || (req.session._csrf = utils.uid(24));",""," // ignore these methods"," if ('GET' == req.method || 'HEAD' == req.method || 'OPTIONS' == req.method) return next();",""," // determine value"," var val = value(req);",""," // check"," if (val != token) return next(utils.error(403));"," "," next();"," }","};","","/**"," * Default value function, checking the `req.body`"," * and `req.query` for the CSRF token."," *"," * @param {IncomingMessage} req"," * @return {String}"," * @api private"," */","","function defaultValue(req) {"," return (req.body && req.body._csrf)"," || (req.query && req.query._csrf)"," || (req.headers['x-csrf-token']);","}"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/directory.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/directory.js deleted file mode 100644 index bc86b606..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/directory.js +++ /dev/null @@ -1,256 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/directory.js']) { - _$jscoverage['middleware/directory.js'] = []; - _$jscoverage['middleware/directory.js'][17] = 0; - _$jscoverage['middleware/directory.js'][29] = 0; - _$jscoverage['middleware/directory.js'][48] = 0; - _$jscoverage['middleware/directory.js'][49] = 0; - _$jscoverage['middleware/directory.js'][52] = 0; - _$jscoverage['middleware/directory.js'][53] = 0; - _$jscoverage['middleware/directory.js'][58] = 0; - _$jscoverage['middleware/directory.js'][59] = 0; - _$jscoverage['middleware/directory.js'][61] = 0; - _$jscoverage['middleware/directory.js'][70] = 0; - _$jscoverage['middleware/directory.js'][73] = 0; - _$jscoverage['middleware/directory.js'][76] = 0; - _$jscoverage['middleware/directory.js'][77] = 0; - _$jscoverage['middleware/directory.js'][81] = 0; - _$jscoverage['middleware/directory.js'][84] = 0; - _$jscoverage['middleware/directory.js'][85] = 0; - _$jscoverage['middleware/directory.js'][86] = 0; - _$jscoverage['middleware/directory.js'][87] = 0; - _$jscoverage['middleware/directory.js'][88] = 0; - _$jscoverage['middleware/directory.js'][91] = 0; - _$jscoverage['middleware/directory.js'][92] = 0; - _$jscoverage['middleware/directory.js'][93] = 0; - _$jscoverage['middleware/directory.js'][94] = 0; - _$jscoverage['middleware/directory.js'][99] = 0; - _$jscoverage['middleware/directory.js'][109] = 0; - _$jscoverage['middleware/directory.js'][110] = 0; - _$jscoverage['middleware/directory.js'][111] = 0; - _$jscoverage['middleware/directory.js'][112] = 0; - _$jscoverage['middleware/directory.js'][113] = 0; - _$jscoverage['middleware/directory.js'][114] = 0; - _$jscoverage['middleware/directory.js'][115] = 0; - _$jscoverage['middleware/directory.js'][120] = 0; - _$jscoverage['middleware/directory.js'][121] = 0; - _$jscoverage['middleware/directory.js'][122] = 0; - _$jscoverage['middleware/directory.js'][131] = 0; - _$jscoverage['middleware/directory.js'][132] = 0; - _$jscoverage['middleware/directory.js'][133] = 0; - _$jscoverage['middleware/directory.js'][134] = 0; - _$jscoverage['middleware/directory.js'][135] = 0; - _$jscoverage['middleware/directory.js'][142] = 0; - _$jscoverage['middleware/directory.js'][143] = 0; - _$jscoverage['middleware/directory.js'][144] = 0; - _$jscoverage['middleware/directory.js'][145] = 0; - _$jscoverage['middleware/directory.js'][146] = 0; - _$jscoverage['middleware/directory.js'][153] = 0; - _$jscoverage['middleware/directory.js'][154] = 0; - _$jscoverage['middleware/directory.js'][155] = 0; - _$jscoverage['middleware/directory.js'][156] = 0; - _$jscoverage['middleware/directory.js'][157] = 0; - _$jscoverage['middleware/directory.js'][165] = 0; - _$jscoverage['middleware/directory.js'][166] = 0; - _$jscoverage['middleware/directory.js'][167] = 0; - _$jscoverage['middleware/directory.js'][170] = 0; - _$jscoverage['middleware/directory.js'][171] = 0; - _$jscoverage['middleware/directory.js'][172] = 0; - _$jscoverage['middleware/directory.js'][173] = 0; - _$jscoverage['middleware/directory.js'][176] = 0; - _$jscoverage['middleware/directory.js'][194] = 0; - _$jscoverage['middleware/directory.js'][195] = 0; - _$jscoverage['middleware/directory.js'][196] = 0; - _$jscoverage['middleware/directory.js'][208] = 0; - _$jscoverage['middleware/directory.js'][209] = 0; - _$jscoverage['middleware/directory.js'][210] = 0; - _$jscoverage['middleware/directory.js'][218] = 0; -} -_$jscoverage['middleware/directory.js'][17]++; -var fs = require("fs"), parse = require("url").parse, utils = require("../utils"), path = require("path"), normalize = path.normalize, extname = path.extname, join = path.join; -_$jscoverage['middleware/directory.js'][29]++; -var cache = {}; -_$jscoverage['middleware/directory.js'][48]++; -exports = module.exports = (function directory(root, options) { - _$jscoverage['middleware/directory.js'][49]++; - options = options || {}; - _$jscoverage['middleware/directory.js'][52]++; - if (! root) { - _$jscoverage['middleware/directory.js'][52]++; - throw new Error("directory() root path required"); - } - _$jscoverage['middleware/directory.js'][53]++; - var hidden = options.hidden, icons = options.icons, filter = options.filter, root = normalize(root); - _$jscoverage['middleware/directory.js'][58]++; - return (function directory(req, res, next) { - _$jscoverage['middleware/directory.js'][59]++; - if ("GET" != req.method && "HEAD" != req.method) { - _$jscoverage['middleware/directory.js'][59]++; - return next(); - } - _$jscoverage['middleware/directory.js'][61]++; - var accept = req.headers.accept || "text/plain", url = parse(req.url), dir = decodeURIComponent(url.pathname), path = normalize(join(root, dir)), originalUrl = parse(req.originalUrl), originalDir = decodeURIComponent(originalUrl.pathname), showUp = path != root && path != root + "/"; - _$jscoverage['middleware/directory.js'][70]++; - if (~ path.indexOf("\u0000")) { - _$jscoverage['middleware/directory.js'][70]++; - return next(utils.error(400)); - } - _$jscoverage['middleware/directory.js'][73]++; - if (0 != path.indexOf(root)) { - _$jscoverage['middleware/directory.js'][73]++; - return next(utils.error(403)); - } - _$jscoverage['middleware/directory.js'][76]++; - fs.stat(path, (function (err, stat) { - _$jscoverage['middleware/directory.js'][77]++; - if (err) { - _$jscoverage['middleware/directory.js'][77]++; - return "ENOENT" == err.code? next(): next(err); - } - _$jscoverage['middleware/directory.js'][81]++; - if (! stat.isDirectory()) { - _$jscoverage['middleware/directory.js'][81]++; - return next(); - } - _$jscoverage['middleware/directory.js'][84]++; - fs.readdir(path, (function (err, files) { - _$jscoverage['middleware/directory.js'][85]++; - if (err) { - _$jscoverage['middleware/directory.js'][85]++; - return next(err); - } - _$jscoverage['middleware/directory.js'][86]++; - if (! hidden) { - _$jscoverage['middleware/directory.js'][86]++; - files = removeHidden(files); - } - _$jscoverage['middleware/directory.js'][87]++; - if (filter) { - _$jscoverage['middleware/directory.js'][87]++; - files = files.filter(filter); - } - _$jscoverage['middleware/directory.js'][88]++; - files.sort(); - _$jscoverage['middleware/directory.js'][91]++; - for (var key in exports) { - _$jscoverage['middleware/directory.js'][92]++; - if (~ accept.indexOf(key) || ~ accept.indexOf("*/*")) { - _$jscoverage['middleware/directory.js'][93]++; - exports[key](req, res, files, next, originalDir, showUp, icons); - _$jscoverage['middleware/directory.js'][94]++; - return; - } -} - _$jscoverage['middleware/directory.js'][99]++; - next(utils.error(406)); -})); -})); -}); -}); -_$jscoverage['middleware/directory.js'][109]++; -exports.html = (function (req, res, files, next, dir, showUp, icons) { - _$jscoverage['middleware/directory.js'][110]++; - fs.readFile(__dirname + "/../public/directory.html", "utf8", (function (err, str) { - _$jscoverage['middleware/directory.js'][111]++; - if (err) { - _$jscoverage['middleware/directory.js'][111]++; - return next(err); - } - _$jscoverage['middleware/directory.js'][112]++; - fs.readFile(__dirname + "/../public/style.css", "utf8", (function (err, style) { - _$jscoverage['middleware/directory.js'][113]++; - if (err) { - _$jscoverage['middleware/directory.js'][113]++; - return next(err); - } - _$jscoverage['middleware/directory.js'][114]++; - if (showUp) { - _$jscoverage['middleware/directory.js'][114]++; - files.unshift(".."); - } - _$jscoverage['middleware/directory.js'][115]++; - str = str.replace("{style}", style).replace("{files}", html(files, dir, icons)).replace("{directory}", dir).replace("{linked-path}", htmlPath(dir)); - _$jscoverage['middleware/directory.js'][120]++; - res.setHeader("Content-Type", "text/html"); - _$jscoverage['middleware/directory.js'][121]++; - res.setHeader("Content-Length", str.length); - _$jscoverage['middleware/directory.js'][122]++; - res.end(str); -})); -})); -}); -_$jscoverage['middleware/directory.js'][131]++; -exports.json = (function (req, res, files) { - _$jscoverage['middleware/directory.js'][132]++; - files = JSON.stringify(files); - _$jscoverage['middleware/directory.js'][133]++; - res.setHeader("Content-Type", "application/json"); - _$jscoverage['middleware/directory.js'][134]++; - res.setHeader("Content-Length", files.length); - _$jscoverage['middleware/directory.js'][135]++; - res.end(files); -}); -_$jscoverage['middleware/directory.js'][142]++; -exports.plain = (function (req, res, files) { - _$jscoverage['middleware/directory.js'][143]++; - files = files.join("\n") + "\n"; - _$jscoverage['middleware/directory.js'][144]++; - res.setHeader("Content-Type", "text/plain"); - _$jscoverage['middleware/directory.js'][145]++; - res.setHeader("Content-Length", files.length); - _$jscoverage['middleware/directory.js'][146]++; - res.end(files); -}); -_$jscoverage['middleware/directory.js'][153]++; -function htmlPath(dir) { - _$jscoverage['middleware/directory.js'][154]++; - var curr = []; - _$jscoverage['middleware/directory.js'][155]++; - return dir.split("/").map((function (part) { - _$jscoverage['middleware/directory.js'][156]++; - curr.push(part); - _$jscoverage['middleware/directory.js'][157]++; - return "" + part + ""; -})).join(" / "); -} -_$jscoverage['middleware/directory.js'][165]++; -function html(files, dir, useIcons) { - _$jscoverage['middleware/directory.js'][166]++; - return "
    " + files.map((function (file) { - _$jscoverage['middleware/directory.js'][167]++; - var icon = "", classes = []; - _$jscoverage['middleware/directory.js'][170]++; - if (useIcons && ".." != file) { - _$jscoverage['middleware/directory.js'][171]++; - icon = icons[extname(file)] || icons["default"]; - _$jscoverage['middleware/directory.js'][172]++; - icon = ""; - _$jscoverage['middleware/directory.js'][173]++; - classes.push("icon"); - } - _$jscoverage['middleware/directory.js'][176]++; - return "
  • " + icon + file + "
  • "; -})).join("\n") + "
"; -} -_$jscoverage['middleware/directory.js'][194]++; -function load(icon) { - _$jscoverage['middleware/directory.js'][195]++; - if (cache[icon]) { - _$jscoverage['middleware/directory.js'][195]++; - return cache[icon]; - } - _$jscoverage['middleware/directory.js'][196]++; - return cache[icon] = fs.readFileSync(__dirname + "/../public/icons/" + icon, "base64"); -} -_$jscoverage['middleware/directory.js'][208]++; -function removeHidden(files) { - _$jscoverage['middleware/directory.js'][209]++; - return files.filter((function (file) { - _$jscoverage['middleware/directory.js'][210]++; - return "." != file[0]; -})); -} -_$jscoverage['middleware/directory.js'][218]++; -var icons = {".js": "page_white_code_red.png", ".c": "page_white_c.png", ".h": "page_white_h.png", ".cc": "page_white_cplusplus.png", ".php": "page_white_php.png", ".rb": "page_white_ruby.png", ".cpp": "page_white_cplusplus.png", ".swf": "page_white_flash.png", ".pdf": "page_white_acrobat.png", "default": "page_white.png"}; -_$jscoverage['middleware/directory.js'].source = ["","/*!"," * Connect - directory"," * Copyright(c) 2011 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","// TODO: icon / style for directories","// TODO: arrow key navigation","// TODO: make icons extensible","","/**"," * Module dependencies."," */","","var fs = require('fs')"," , parse = require('url').parse"," , utils = require('../utils')"," , path = require('path')"," , normalize = path.normalize"," , extname = path.extname"," , join = path.join;","","/*!"," * Icon cache."," */","","var cache = {};","","/**"," * Directory:"," *"," * Serve directory listings with the given `root` path."," *"," * Options:"," *"," * - `hidden` display hidden (dot) files. Defaults to false."," * - `icons` display icons. Defaults to false."," * - `filter` Apply this filter function to files. Defaults to false."," *"," * @param {String} root"," * @param {Object} options"," * @return {Function}"," * @api public"," */","","exports = module.exports = function directory(root, options){"," options = options || {};",""," // root required"," if (!root) throw new Error('directory() root path required');"," var hidden = options.hidden"," , icons = options.icons"," , filter = options.filter"," , root = normalize(root);",""," return function directory(req, res, next) {"," if ('GET' != req.method && 'HEAD' != req.method) return next();",""," var accept = req.headers.accept || 'text/plain'"," , url = parse(req.url)"," , dir = decodeURIComponent(url.pathname)"," , path = normalize(join(root, dir))"," , originalUrl = parse(req.originalUrl)"," , originalDir = decodeURIComponent(originalUrl.pathname)"," , showUp = path != root && path != root + '/';",""," // null byte(s), bad request"," if (~path.indexOf('\\0')) return next(utils.error(400));",""," // malicious path, forbidden"," if (0 != path.indexOf(root)) return next(utils.error(403));",""," // check if we have a directory"," fs.stat(path, function(err, stat){"," if (err) return 'ENOENT' == err.code"," ? next()"," : next(err);",""," if (!stat.isDirectory()) return next();",""," // fetch files"," fs.readdir(path, function(err, files){"," if (err) return next(err);"," if (!hidden) files = removeHidden(files);"," if (filter) files = files.filter(filter);"," files.sort();",""," // content-negotiation"," for (var key in exports) {"," if (~accept.indexOf(key) || ~accept.indexOf('*/*')) {"," exports[key](req, res, files, next, originalDir, showUp, icons);"," return;"," }"," }",""," // not acceptable"," next(utils.error(406));"," });"," });"," };","};","","/**"," * Respond with text/html."," */","","exports.html = function(req, res, files, next, dir, showUp, icons){"," fs.readFile(__dirname + '/../public/directory.html', 'utf8', function(err, str){"," if (err) return next(err);"," fs.readFile(__dirname + '/../public/style.css', 'utf8', function(err, style){"," if (err) return next(err);"," if (showUp) files.unshift('..');"," str = str"," .replace('{style}', style)"," .replace('{files}', html(files, dir, icons))"," .replace('{directory}', dir)"," .replace('{linked-path}', htmlPath(dir));"," res.setHeader('Content-Type', 'text/html');"," res.setHeader('Content-Length', str.length);"," res.end(str);"," });"," });","};","","/**"," * Respond with application/json."," */","","exports.json = function(req, res, files){"," files = JSON.stringify(files);"," res.setHeader('Content-Type', 'application/json');"," res.setHeader('Content-Length', files.length);"," res.end(files);","};","","/**"," * Respond with text/plain."," */","","exports.plain = function(req, res, files){"," files = files.join('\\n') + '\\n';"," res.setHeader('Content-Type', 'text/plain');"," res.setHeader('Content-Length', files.length);"," res.end(files);","};","","/**"," * Map html `dir`, returning a linked path."," */","","function htmlPath(dir) {"," var curr = [];"," return dir.split('/').map(function(part){"," curr.push(part);"," return '<a href=\"' + curr.join('/') + '\">' + part + '</a>';"," }).join(' / ');","}","","/**"," * Map html `files`, returning an html unordered list."," */","","function html(files, dir, useIcons) {"," return '<ul id=\"files\">' + files.map(function(file){"," var icon = ''"," , classes = [];",""," if (useIcons && '..' != file) {"," icon = icons[extname(file)] || icons.default;"," icon = '<img src=\"data:image/png;base64,' + load(icon) + '\" />';"," classes.push('icon');"," }",""," return '<li><a href=\"'"," + join(dir, file)"," + '\" class=\"'"," + classes.join(' ') + '\"'"," + ' title=\"' + file + '\">'"," + icon + file + '</a></li>';",""," }).join('\\n') + '</ul>';","}","","/**"," * Load and cache the given `icon`."," *"," * @param {String} icon"," * @return {String}"," * @api private"," */","","function load(icon) {"," if (cache[icon]) return cache[icon];"," return cache[icon] = fs.readFileSync(__dirname + '/../public/icons/' + icon, 'base64');","}","","/**"," * Filter \"hidden\" `files`, aka files"," * beginning with a `.`."," *"," * @param {Array} files"," * @return {Array}"," * @api private"," */","","function removeHidden(files) {"," return files.filter(function(file){"," return '.' != file[0];"," });","}","","/**"," * Icon map."," */","","var icons = {"," '.js': 'page_white_code_red.png'"," , '.c': 'page_white_c.png'"," , '.h': 'page_white_h.png'"," , '.cc': 'page_white_cplusplus.png'"," , '.php': 'page_white_php.png'"," , '.rb': 'page_white_ruby.png'"," , '.cpp': 'page_white_cplusplus.png'"," , '.swf': 'page_white_flash.png'"," , '.pdf': 'page_white_acrobat.png'"," , 'default': 'page_white.png'","};"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/errorHandler.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/errorHandler.js deleted file mode 100644 index 9a87bfae..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/errorHandler.js +++ /dev/null @@ -1,104 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/errorHandler.js']) { - _$jscoverage['middleware/errorHandler.js'] = []; - _$jscoverage['middleware/errorHandler.js'][12] = 0; - _$jscoverage['middleware/errorHandler.js'][17] = 0; - _$jscoverage['middleware/errorHandler.js'][44] = 0; - _$jscoverage['middleware/errorHandler.js'][45] = 0; - _$jscoverage['middleware/errorHandler.js'][46] = 0; - _$jscoverage['middleware/errorHandler.js'][47] = 0; - _$jscoverage['middleware/errorHandler.js'][48] = 0; - _$jscoverage['middleware/errorHandler.js'][49] = 0; - _$jscoverage['middleware/errorHandler.js'][51] = 0; - _$jscoverage['middleware/errorHandler.js'][52] = 0; - _$jscoverage['middleware/errorHandler.js'][53] = 0; - _$jscoverage['middleware/errorHandler.js'][54] = 0; - _$jscoverage['middleware/errorHandler.js'][56] = 0; - _$jscoverage['middleware/errorHandler.js'][57] = 0; - _$jscoverage['middleware/errorHandler.js'][63] = 0; - _$jscoverage['middleware/errorHandler.js'][64] = 0; - _$jscoverage['middleware/errorHandler.js'][68] = 0; - _$jscoverage['middleware/errorHandler.js'][69] = 0; - _$jscoverage['middleware/errorHandler.js'][70] = 0; - _$jscoverage['middleware/errorHandler.js'][71] = 0; - _$jscoverage['middleware/errorHandler.js'][72] = 0; - _$jscoverage['middleware/errorHandler.js'][73] = 0; - _$jscoverage['middleware/errorHandler.js'][76] = 0; - _$jscoverage['middleware/errorHandler.js'][77] = 0; - _$jscoverage['middleware/errorHandler.js'][86] = 0; -} -_$jscoverage['middleware/errorHandler.js'][12]++; -var utils = require("../utils"), fs = require("fs"); -_$jscoverage['middleware/errorHandler.js'][17]++; -var env = process.env.NODE_ENV || "development"; -_$jscoverage['middleware/errorHandler.js'][44]++; -exports = module.exports = (function errorHandler() { - _$jscoverage['middleware/errorHandler.js'][45]++; - return (function errorHandler(err, req, res, next) { - _$jscoverage['middleware/errorHandler.js'][46]++; - if (err.status) { - _$jscoverage['middleware/errorHandler.js'][46]++; - res.statusCode = err.status; - } - _$jscoverage['middleware/errorHandler.js'][47]++; - if (res.statusCode < 400) { - _$jscoverage['middleware/errorHandler.js'][47]++; - res.statusCode = 500; - } - _$jscoverage['middleware/errorHandler.js'][48]++; - if ("test" != env) { - _$jscoverage['middleware/errorHandler.js'][48]++; - console.error(err.stack); - } - _$jscoverage['middleware/errorHandler.js'][49]++; - var accept = req.headers.accept || ""; - _$jscoverage['middleware/errorHandler.js'][51]++; - if (~ accept.indexOf("html")) { - _$jscoverage['middleware/errorHandler.js'][52]++; - fs.readFile(__dirname + "/../public/style.css", "utf8", (function (e, style) { - _$jscoverage['middleware/errorHandler.js'][53]++; - fs.readFile(__dirname + "/../public/error.html", "utf8", (function (e, html) { - _$jscoverage['middleware/errorHandler.js'][54]++; - var stack = (err.stack || "").split("\n").slice(1).map((function (v) { - _$jscoverage['middleware/errorHandler.js'][56]++; - return "
  • " + v + "
  • "; -})).join(""); - _$jscoverage['middleware/errorHandler.js'][57]++; - html = html.replace("{style}", style).replace("{stack}", stack).replace("{title}", exports.title).replace("{statusCode}", res.statusCode).replace(/\{error\}/g, utils.escape(err.toString())); - _$jscoverage['middleware/errorHandler.js'][63]++; - res.setHeader("Content-Type", "text/html; charset=utf-8"); - _$jscoverage['middleware/errorHandler.js'][64]++; - res.end(html); -})); -})); - } - else { - _$jscoverage['middleware/errorHandler.js'][68]++; - if (~ accept.indexOf("json")) { - _$jscoverage['middleware/errorHandler.js'][69]++; - var error = {message: err.message, stack: err.stack}; - _$jscoverage['middleware/errorHandler.js'][70]++; - for (var prop in err) { - _$jscoverage['middleware/errorHandler.js'][70]++; - error[prop] = err[prop]; -} - _$jscoverage['middleware/errorHandler.js'][71]++; - var json = JSON.stringify({error: error}); - _$jscoverage['middleware/errorHandler.js'][72]++; - res.setHeader("Content-Type", "application/json"); - _$jscoverage['middleware/errorHandler.js'][73]++; - res.end(json); - } - else { - _$jscoverage['middleware/errorHandler.js'][76]++; - res.writeHead(res.statusCode, {"Content-Type": "text/plain"}); - _$jscoverage['middleware/errorHandler.js'][77]++; - res.end(err.stack); - } - } -}); -}); -_$jscoverage['middleware/errorHandler.js'][86]++; -exports.title = "Connect"; -_$jscoverage['middleware/errorHandler.js'].source = ["/*!"," * Connect - errorHandler"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var utils = require('../utils')"," , fs = require('fs');","","// environment","","var env = process.env.NODE_ENV || 'development';","","/**"," * Error handler:"," *"," * Development error handler, providing stack traces"," * and error message responses for requests accepting text, html,"," * or json."," *"," * Text:"," *"," * By default, and when _text/plain_ is accepted a simple stack trace"," * or error message will be returned."," *"," * JSON:"," *"," * When _application/json_ is accepted, connect will respond with"," * an object in the form of `{ \"error\": error }`."," *"," * HTML:"," *"," * When accepted connect will output a nice html stack trace."," *"," * @return {Function}"," * @api public"," */","","exports = module.exports = function errorHandler(){"," return function errorHandler(err, req, res, next){"," if (err.status) res.statusCode = err.status;"," if (res.statusCode < 400) res.statusCode = 500;"," if ('test' != env) console.error(err.stack);"," var accept = req.headers.accept || '';"," // html"," if (~accept.indexOf('html')) {"," fs.readFile(__dirname + '/../public/style.css', 'utf8', function(e, style){"," fs.readFile(__dirname + '/../public/error.html', 'utf8', function(e, html){"," var stack = (err.stack || '')"," .split('\\n').slice(1)"," .map(function(v){ return '<li>' + v + '</li>'; }).join('');"," html = html"," .replace('{style}', style)"," .replace('{stack}', stack)"," .replace('{title}', exports.title)"," .replace('{statusCode}', res.statusCode)"," .replace(/\\{error\\}/g, utils.escape(err.toString()));"," res.setHeader('Content-Type', 'text/html; charset=utf-8');"," res.end(html);"," });"," });"," // json"," } else if (~accept.indexOf('json')) {"," var error = { message: err.message, stack: err.stack };"," for (var prop in err) error[prop] = err[prop];"," var json = JSON.stringify({ error: error });"," res.setHeader('Content-Type', 'application/json');"," res.end(json);"," // plain text"," } else {"," res.writeHead(res.statusCode, { 'Content-Type': 'text/plain' });"," res.end(err.stack);"," }"," };","};","","/**"," * Template title, framework authors may override this value."," */","","exports.title = 'Connect';"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/favicon.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/favicon.js deleted file mode 100644 index 62280797..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/favicon.js +++ /dev/null @@ -1,60 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/favicon.js']) { - _$jscoverage['middleware/favicon.js'] = []; - _$jscoverage['middleware/favicon.js'][13] = 0; - _$jscoverage['middleware/favicon.js'][50] = 0; - _$jscoverage['middleware/favicon.js'][51] = 0; - _$jscoverage['middleware/favicon.js'][56] = 0; - _$jscoverage['middleware/favicon.js'][57] = 0; - _$jscoverage['middleware/favicon.js'][58] = 0; - _$jscoverage['middleware/favicon.js'][59] = 0; - _$jscoverage['middleware/favicon.js'][60] = 0; - _$jscoverage['middleware/favicon.js'][62] = 0; - _$jscoverage['middleware/favicon.js'][63] = 0; - _$jscoverage['middleware/favicon.js'][64] = 0; - _$jscoverage['middleware/favicon.js'][73] = 0; - _$jscoverage['middleware/favicon.js'][74] = 0; - _$jscoverage['middleware/favicon.js'][78] = 0; -} -_$jscoverage['middleware/favicon.js'][13]++; -var fs = require("fs"), utils = require("../utils"); -_$jscoverage['middleware/favicon.js'][50]++; -module.exports = (function favicon(path, options) { - _$jscoverage['middleware/favicon.js'][51]++; - var options = options || {}, path = path || __dirname + "/../public/favicon.ico", maxAge = options.maxAge || 86400000, icon; - _$jscoverage['middleware/favicon.js'][56]++; - return (function favicon(req, res, next) { - _$jscoverage['middleware/favicon.js'][57]++; - if ("/favicon.ico" == req.url) { - _$jscoverage['middleware/favicon.js'][58]++; - if (icon) { - _$jscoverage['middleware/favicon.js'][59]++; - res.writeHead(200, icon.headers); - _$jscoverage['middleware/favicon.js'][60]++; - res.end(icon.body); - } - else { - _$jscoverage['middleware/favicon.js'][62]++; - fs.readFile(path, (function (err, buf) { - _$jscoverage['middleware/favicon.js'][63]++; - if (err) { - _$jscoverage['middleware/favicon.js'][63]++; - return next(err); - } - _$jscoverage['middleware/favicon.js'][64]++; - icon = {headers: {"Content-Type": "image/x-icon", "Content-Length": buf.length, "ETag": "\"" + utils.md5(buf) + "\"", "Cache-Control": "public, max-age=" + (maxAge / 1000)}, body: buf}; - _$jscoverage['middleware/favicon.js'][73]++; - res.writeHead(200, icon.headers); - _$jscoverage['middleware/favicon.js'][74]++; - res.end(icon.body); -})); - } - } - else { - _$jscoverage['middleware/favicon.js'][78]++; - next(); - } -}); -}); -_$jscoverage['middleware/favicon.js'].source = ["","/*!"," * Connect - favicon"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var fs = require('fs')"," , utils = require('../utils');","","/**"," * Favicon:"," *"," * By default serves the connect favicon, or the favicon"," * located by the given `path`."," *"," * Options:"," *"," * - `maxAge` cache-control max-age directive, defaulting to 1 day"," *"," * Examples:"," *"," * Serve default favicon:"," *"," * connect()"," * .use(connect.favicon())"," *"," * Serve favicon before logging for brevity:"," *"," * connect()"," * .use(connect.favicon())"," * .use(connect.logger('dev'))"," *"," * Serve custom favicon:"," *"," * connect()"," * .use(connect.favicon('public/favicon.ico))"," *"," * @param {String} path"," * @param {Object} options"," * @return {Function}"," * @api public"," */","","module.exports = function favicon(path, options){"," var options = options || {}"," , path = path || __dirname + '/../public/favicon.ico'"," , maxAge = options.maxAge || 86400000"," , icon; // favicon cache",""," return function favicon(req, res, next){"," if ('/favicon.ico' == req.url) {"," if (icon) {"," res.writeHead(200, icon.headers);"," res.end(icon.body);"," } else {"," fs.readFile(path, function(err, buf){"," if (err) return next(err);"," icon = {"," headers: {"," 'Content-Type': 'image/x-icon'"," , 'Content-Length': buf.length"," , 'ETag': '\"' + utils.md5(buf) + '\"'"," , 'Cache-Control': 'public, max-age=' + (maxAge / 1000)"," },"," body: buf"," };"," res.writeHead(200, icon.headers);"," res.end(icon.body);"," });"," }"," } else {"," next();"," }"," };","};"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/json.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/json.js deleted file mode 100644 index 87236cff..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/json.js +++ /dev/null @@ -1,117 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/json.js']) { - _$jscoverage['middleware/json.js'] = []; - _$jscoverage['middleware/json.js'][13] = 0; - _$jscoverage['middleware/json.js'][20] = 0; - _$jscoverage['middleware/json.js'][21] = 0; - _$jscoverage['middleware/json.js'][41] = 0; - _$jscoverage['middleware/json.js'][42] = 0; - _$jscoverage['middleware/json.js'][45] = 0; - _$jscoverage['middleware/json.js'][49] = 0; - _$jscoverage['middleware/json.js'][50] = 0; - _$jscoverage['middleware/json.js'][51] = 0; - _$jscoverage['middleware/json.js'][53] = 0; - _$jscoverage['middleware/json.js'][56] = 0; - _$jscoverage['middleware/json.js'][59] = 0; - _$jscoverage['middleware/json.js'][62] = 0; - _$jscoverage['middleware/json.js'][63] = 0; - _$jscoverage['middleware/json.js'][64] = 0; - _$jscoverage['middleware/json.js'][65] = 0; - _$jscoverage['middleware/json.js'][66] = 0; - _$jscoverage['middleware/json.js'][67] = 0; - _$jscoverage['middleware/json.js'][68] = 0; - _$jscoverage['middleware/json.js'][70] = 0; - _$jscoverage['middleware/json.js'][71] = 0; - _$jscoverage['middleware/json.js'][74] = 0; - _$jscoverage['middleware/json.js'][75] = 0; - _$jscoverage['middleware/json.js'][76] = 0; - _$jscoverage['middleware/json.js'][77] = 0; - _$jscoverage['middleware/json.js'][79] = 0; - _$jscoverage['middleware/json.js'][80] = 0; - _$jscoverage['middleware/json.js'][81] = 0; -} -_$jscoverage['middleware/json.js'][13]++; -var utils = require("../utils"), _limit = require("./limit"); -_$jscoverage['middleware/json.js'][20]++; -function noop(req, res, next) { - _$jscoverage['middleware/json.js'][21]++; - next(); -} -_$jscoverage['middleware/json.js'][41]++; -exports = module.exports = (function (options) { - _$jscoverage['middleware/json.js'][42]++; - var options = options || {}, strict = options.strict !== false; - _$jscoverage['middleware/json.js'][45]++; - var limit = options.limit? _limit(options.limit): noop; - _$jscoverage['middleware/json.js'][49]++; - return (function json(req, res, next) { - _$jscoverage['middleware/json.js'][50]++; - if (req._body) { - _$jscoverage['middleware/json.js'][50]++; - return next(); - } - _$jscoverage['middleware/json.js'][51]++; - req.body = req.body || {}; - _$jscoverage['middleware/json.js'][53]++; - if (! utils.hasBody(req)) { - _$jscoverage['middleware/json.js'][53]++; - return next(); - } - _$jscoverage['middleware/json.js'][56]++; - if ("application/json" != utils.mime(req)) { - _$jscoverage['middleware/json.js'][56]++; - return next(); - } - _$jscoverage['middleware/json.js'][59]++; - req._body = true; - _$jscoverage['middleware/json.js'][62]++; - limit(req, res, (function (err) { - _$jscoverage['middleware/json.js'][63]++; - if (err) { - _$jscoverage['middleware/json.js'][63]++; - return next(err); - } - _$jscoverage['middleware/json.js'][64]++; - var buf = ""; - _$jscoverage['middleware/json.js'][65]++; - req.setEncoding("utf8"); - _$jscoverage['middleware/json.js'][66]++; - req.on("data", (function (chunk) { - _$jscoverage['middleware/json.js'][66]++; - buf += chunk; -})); - _$jscoverage['middleware/json.js'][67]++; - req.on("end", (function () { - _$jscoverage['middleware/json.js'][68]++; - var first = buf.trim()[0]; - _$jscoverage['middleware/json.js'][70]++; - if (0 == buf.length) { - _$jscoverage['middleware/json.js'][71]++; - return next(utils.error(400, "invalid json, empty body")); - } - _$jscoverage['middleware/json.js'][74]++; - if (strict && "{" != first && "[" != first) { - _$jscoverage['middleware/json.js'][74]++; - return next(utils.error(400, "invalid json")); - } - _$jscoverage['middleware/json.js'][75]++; - try { - _$jscoverage['middleware/json.js'][76]++; - req.body = JSON.parse(buf, options.reviver); - _$jscoverage['middleware/json.js'][77]++; - next(); - } - catch (err) { - _$jscoverage['middleware/json.js'][79]++; - err.body = buf; - _$jscoverage['middleware/json.js'][80]++; - err.status = 400; - _$jscoverage['middleware/json.js'][81]++; - next(err); - } -})); -})); -}); -}); -_$jscoverage['middleware/json.js'].source = ["","/*!"," * Connect - json"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var utils = require('../utils')"," , _limit = require('./limit');","","/**"," * noop middleware."," */","","function noop(req, res, next) {"," next();","}","","/**"," * JSON:"," *"," * Parse JSON request bodies, providing the"," * parsed object as `req.body`."," *"," * Options:"," *"," * - `strict` when `false` anything `JSON.parse()` accepts will be parsed"," * - `reviver` used as the second \"reviver\" argument for JSON.parse"," * - `limit` byte limit disabled by default"," *"," * @param {Object} options"," * @return {Function}"," * @api public"," */","","exports = module.exports = function(options){"," var options = options || {}"," , strict = options.strict !== false;",""," var limit = options.limit"," ? _limit(options.limit)"," : noop;",""," return function json(req, res, next) {"," if (req._body) return next();"," req.body = req.body || {};",""," if (!utils.hasBody(req)) return next();",""," // check Content-Type"," if ('application/json' != utils.mime(req)) return next();",""," // flag as parsed"," req._body = true;",""," // parse"," limit(req, res, function(err){"," if (err) return next(err);"," var buf = '';"," req.setEncoding('utf8');"," req.on('data', function(chunk){ buf += chunk });"," req.on('end', function(){"," var first = buf.trim()[0];",""," if (0 == buf.length) {"," return next(utils.error(400, 'invalid json, empty body'));"," }"," "," if (strict && '{' != first && '[' != first) return next(utils.error(400, 'invalid json'));"," try {"," req.body = JSON.parse(buf, options.reviver);"," next();"," } catch (err){"," err.body = buf;"," err.status = 400;"," next(err);"," }"," });"," });"," }","};"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/limit.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/limit.js deleted file mode 100644 index fa8ea344..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/limit.js +++ /dev/null @@ -1,63 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/limit.js']) { - _$jscoverage['middleware/limit.js'] = []; - _$jscoverage['middleware/limit.js'][12] = 0; - _$jscoverage['middleware/limit.js'][31] = 0; - _$jscoverage['middleware/limit.js'][32] = 0; - _$jscoverage['middleware/limit.js'][33] = 0; - _$jscoverage['middleware/limit.js'][34] = 0; - _$jscoverage['middleware/limit.js'][35] = 0; - _$jscoverage['middleware/limit.js'][41] = 0; - _$jscoverage['middleware/limit.js'][42] = 0; - _$jscoverage['middleware/limit.js'][45] = 0; - _$jscoverage['middleware/limit.js'][48] = 0; - _$jscoverage['middleware/limit.js'][49] = 0; - _$jscoverage['middleware/limit.js'][50] = 0; - _$jscoverage['middleware/limit.js'][53] = 0; -} -_$jscoverage['middleware/limit.js'][12]++; -var utils = require("../utils"); -_$jscoverage['middleware/limit.js'][31]++; -module.exports = (function limit(bytes) { - _$jscoverage['middleware/limit.js'][32]++; - if ("string" == typeof bytes) { - _$jscoverage['middleware/limit.js'][32]++; - bytes = utils.parseBytes(bytes); - } - _$jscoverage['middleware/limit.js'][33]++; - if ("number" != typeof bytes) { - _$jscoverage['middleware/limit.js'][33]++; - throw new Error("limit() bytes required"); - } - _$jscoverage['middleware/limit.js'][34]++; - return (function limit(req, res, next) { - _$jscoverage['middleware/limit.js'][35]++; - var received = 0, len = req.headers["content-length"]? parseInt(req.headers["content-length"], 10): null; - _$jscoverage['middleware/limit.js'][41]++; - if (req._limit) { - _$jscoverage['middleware/limit.js'][41]++; - return next(); - } - _$jscoverage['middleware/limit.js'][42]++; - req._limit = true; - _$jscoverage['middleware/limit.js'][45]++; - if (len && len > bytes) { - _$jscoverage['middleware/limit.js'][45]++; - return next(utils.error(413)); - } - _$jscoverage['middleware/limit.js'][48]++; - req.on("data", (function (chunk) { - _$jscoverage['middleware/limit.js'][49]++; - received += chunk.length; - _$jscoverage['middleware/limit.js'][50]++; - if (received > bytes) { - _$jscoverage['middleware/limit.js'][50]++; - req.destroy(); - } -})); - _$jscoverage['middleware/limit.js'][53]++; - next(); -}); -}); -_$jscoverage['middleware/limit.js'].source = ["","/*!"," * Connect - limit"," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var utils = require('../utils');","","/**"," * Limit:"," *"," * Limit request bodies to the given size in `bytes`."," *"," * A string representation of the bytesize may also be passed,"," * for example \"5mb\", \"200kb\", \"1gb\", etc."," *"," * connect()"," * .use(connect.limit('5.5mb'))"," * .use(handleImageUpload)"," *"," * @param {Number|String} bytes"," * @return {Function}"," * @api public"," */","","module.exports = function limit(bytes){"," if ('string' == typeof bytes) bytes = utils.parseBytes(bytes);"," if ('number' != typeof bytes) throw new Error('limit() bytes required');"," return function limit(req, res, next){"," var received = 0"," , len = req.headers['content-length']"," ? parseInt(req.headers['content-length'], 10)"," : null;",""," // self-awareness"," if (req._limit) return next();"," req._limit = true;",""," // limit by content-length"," if (len && len > bytes) return next(utils.error(413));",""," // limit"," req.on('data', function(chunk){"," received += chunk.length;"," if (received > bytes) req.destroy();"," });",""," next();"," };","};"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/logger.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/logger.js deleted file mode 100644 index 75c7a006..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/logger.js +++ /dev/null @@ -1,312 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/logger.js']) { - _$jscoverage['middleware/logger.js'] = []; - _$jscoverage['middleware/logger.js'][12] = 0; - _$jscoverage['middleware/logger.js'][18] = 0; - _$jscoverage['middleware/logger.js'][24] = 0; - _$jscoverage['middleware/logger.js'][90] = 0; - _$jscoverage['middleware/logger.js'][91] = 0; - _$jscoverage['middleware/logger.js'][92] = 0; - _$jscoverage['middleware/logger.js'][93] = 0; - _$jscoverage['middleware/logger.js'][94] = 0; - _$jscoverage['middleware/logger.js'][96] = 0; - _$jscoverage['middleware/logger.js'][100] = 0; - _$jscoverage['middleware/logger.js'][103] = 0; - _$jscoverage['middleware/logger.js'][106] = 0; - _$jscoverage['middleware/logger.js'][109] = 0; - _$jscoverage['middleware/logger.js'][113] = 0; - _$jscoverage['middleware/logger.js'][114] = 0; - _$jscoverage['middleware/logger.js'][120] = 0; - _$jscoverage['middleware/logger.js'][121] = 0; - _$jscoverage['middleware/logger.js'][122] = 0; - _$jscoverage['middleware/logger.js'][123] = 0; - _$jscoverage['middleware/logger.js'][128] = 0; - _$jscoverage['middleware/logger.js'][130] = 0; - _$jscoverage['middleware/logger.js'][135] = 0; - _$jscoverage['middleware/logger.js'][136] = 0; - _$jscoverage['middleware/logger.js'][139] = 0; - _$jscoverage['middleware/logger.js'][140] = 0; - _$jscoverage['middleware/logger.js'][141] = 0; - _$jscoverage['middleware/logger.js'][142] = 0; - _$jscoverage['middleware/logger.js'][145] = 0; - _$jscoverage['middleware/logger.js'][146] = 0; - _$jscoverage['middleware/logger.js'][147] = 0; - _$jscoverage['middleware/logger.js'][148] = 0; - _$jscoverage['middleware/logger.js'][149] = 0; - _$jscoverage['middleware/logger.js'][150] = 0; - _$jscoverage['middleware/logger.js'][151] = 0; - _$jscoverage['middleware/logger.js'][156] = 0; - _$jscoverage['middleware/logger.js'][168] = 0; - _$jscoverage['middleware/logger.js'][169] = 0; - _$jscoverage['middleware/logger.js'][170] = 0; - _$jscoverage['middleware/logger.js'][171] = 0; - _$jscoverage['middleware/logger.js'][173] = 0; - _$jscoverage['middleware/logger.js'][174] = 0; - _$jscoverage['middleware/logger.js'][186] = 0; - _$jscoverage['middleware/logger.js'][187] = 0; - _$jscoverage['middleware/logger.js'][188] = 0; - _$jscoverage['middleware/logger.js'][200] = 0; - _$jscoverage['middleware/logger.js'][201] = 0; - _$jscoverage['middleware/logger.js'][202] = 0; - _$jscoverage['middleware/logger.js'][209] = 0; - _$jscoverage['middleware/logger.js'][215] = 0; - _$jscoverage['middleware/logger.js'][221] = 0; - _$jscoverage['middleware/logger.js'][227] = 0; - _$jscoverage['middleware/logger.js'][228] = 0; - _$jscoverage['middleware/logger.js'][232] = 0; - _$jscoverage['middleware/logger.js'][233] = 0; - _$jscoverage['middleware/logger.js'][234] = 0; - _$jscoverage['middleware/logger.js'][236] = 0; - _$jscoverage['middleware/logger.js'][240] = 0; - _$jscoverage['middleware/logger.js'][253] = 0; - _$jscoverage['middleware/logger.js'][254] = 0; - _$jscoverage['middleware/logger.js'][261] = 0; - _$jscoverage['middleware/logger.js'][262] = 0; - _$jscoverage['middleware/logger.js'][269] = 0; - _$jscoverage['middleware/logger.js'][270] = 0; - _$jscoverage['middleware/logger.js'][277] = 0; - _$jscoverage['middleware/logger.js'][278] = 0; - _$jscoverage['middleware/logger.js'][285] = 0; - _$jscoverage['middleware/logger.js'][286] = 0; - _$jscoverage['middleware/logger.js'][293] = 0; - _$jscoverage['middleware/logger.js'][294] = 0; - _$jscoverage['middleware/logger.js'][301] = 0; - _$jscoverage['middleware/logger.js'][302] = 0; - _$jscoverage['middleware/logger.js'][303] = 0; - _$jscoverage['middleware/logger.js'][304] = 0; - _$jscoverage['middleware/logger.js'][305] = 0; - _$jscoverage['middleware/logger.js'][312] = 0; - _$jscoverage['middleware/logger.js'][313] = 0; - _$jscoverage['middleware/logger.js'][320] = 0; - _$jscoverage['middleware/logger.js'][321] = 0; - _$jscoverage['middleware/logger.js'][328] = 0; - _$jscoverage['middleware/logger.js'][329] = 0; - _$jscoverage['middleware/logger.js'][336] = 0; - _$jscoverage['middleware/logger.js'][337] = 0; -} -_$jscoverage['middleware/logger.js'][12]++; -var bytes = require("bytes"); -_$jscoverage['middleware/logger.js'][18]++; -var buf = []; -_$jscoverage['middleware/logger.js'][24]++; -var defaultBufferDuration = 1000; -_$jscoverage['middleware/logger.js'][90]++; -exports = module.exports = (function logger(options) { - _$jscoverage['middleware/logger.js'][91]++; - if ("object" == typeof options) { - _$jscoverage['middleware/logger.js'][92]++; - options = options || {}; - } - else { - _$jscoverage['middleware/logger.js'][93]++; - if (options) { - _$jscoverage['middleware/logger.js'][94]++; - options = {format: options}; - } - else { - _$jscoverage['middleware/logger.js'][96]++; - options = {}; - } - } - _$jscoverage['middleware/logger.js'][100]++; - var immediate = options.immediate; - _$jscoverage['middleware/logger.js'][103]++; - var fmt = exports[options.format] || options.format || exports["default"]; - _$jscoverage['middleware/logger.js'][106]++; - if ("function" != typeof fmt) { - _$jscoverage['middleware/logger.js'][106]++; - fmt = compile(fmt); - } - _$jscoverage['middleware/logger.js'][109]++; - var stream = options.stream || process.stdout, buffer = options.buffer; - _$jscoverage['middleware/logger.js'][113]++; - if (buffer) { - _$jscoverage['middleware/logger.js'][114]++; - var realStream = stream, interval = "number" == typeof buffer? buffer: defaultBufferDuration; - _$jscoverage['middleware/logger.js'][120]++; - setInterval((function () { - _$jscoverage['middleware/logger.js'][121]++; - if (buf.length) { - _$jscoverage['middleware/logger.js'][122]++; - realStream.write(buf.join("")); - _$jscoverage['middleware/logger.js'][123]++; - buf.length = 0; - } -}), interval); - _$jscoverage['middleware/logger.js'][128]++; - stream = {write: (function (str) { - _$jscoverage['middleware/logger.js'][130]++; - buf.push(str); -})}; - } - _$jscoverage['middleware/logger.js'][135]++; - return (function logger(req, res, next) { - _$jscoverage['middleware/logger.js'][136]++; - req._startTime = new Date(); - _$jscoverage['middleware/logger.js'][139]++; - if (immediate) { - _$jscoverage['middleware/logger.js'][140]++; - var line = fmt(exports, req, res); - _$jscoverage['middleware/logger.js'][141]++; - if (null == line) { - _$jscoverage['middleware/logger.js'][141]++; - return; - } - _$jscoverage['middleware/logger.js'][142]++; - stream.write(line + "\n"); - } - else { - _$jscoverage['middleware/logger.js'][145]++; - var end = res.end; - _$jscoverage['middleware/logger.js'][146]++; - res.end = (function (chunk, encoding) { - _$jscoverage['middleware/logger.js'][147]++; - res.end = end; - _$jscoverage['middleware/logger.js'][148]++; - res.end(chunk, encoding); - _$jscoverage['middleware/logger.js'][149]++; - var line = fmt(exports, req, res); - _$jscoverage['middleware/logger.js'][150]++; - if (null == line) { - _$jscoverage['middleware/logger.js'][150]++; - return; - } - _$jscoverage['middleware/logger.js'][151]++; - stream.write(line + "\n"); -}); - } - _$jscoverage['middleware/logger.js'][156]++; - next(); -}); -}); -_$jscoverage['middleware/logger.js'][168]++; -function compile(fmt) { - _$jscoverage['middleware/logger.js'][169]++; - fmt = fmt.replace(/"/g, "\\\""); - _$jscoverage['middleware/logger.js'][170]++; - var js = " return \"" + fmt.replace(/:([-\w]{2,})(?:\[([^\]]+)\])?/g, (function (_, name, arg) { - _$jscoverage['middleware/logger.js'][171]++; - return "\"\n + (tokens[\"" + name + "\"](req, res, \"" + arg + "\") || \"-\") + \""; -})) + "\";"; - _$jscoverage['middleware/logger.js'][173]++; - return new Function("tokens, req, res", js); -} -_$jscoverage['middleware/logger.js'][174]++; -; -_$jscoverage['middleware/logger.js'][186]++; -exports.token = (function (name, fn) { - _$jscoverage['middleware/logger.js'][187]++; - exports[name] = fn; - _$jscoverage['middleware/logger.js'][188]++; - return this; -}); -_$jscoverage['middleware/logger.js'][200]++; -exports.format = (function (name, str) { - _$jscoverage['middleware/logger.js'][201]++; - exports[name] = str; - _$jscoverage['middleware/logger.js'][202]++; - return this; -}); -_$jscoverage['middleware/logger.js'][209]++; -exports.format("default", ":remote-addr - - [:date] \":method :url HTTP/:http-version\" :status :res[content-length] \":referrer\" \":user-agent\""); -_$jscoverage['middleware/logger.js'][215]++; -exports.format("short", ":remote-addr - :method :url HTTP/:http-version :status :res[content-length] - :response-time ms"); -_$jscoverage['middleware/logger.js'][221]++; -exports.format("tiny", ":method :url :status :res[content-length] - :response-time ms"); -_$jscoverage['middleware/logger.js'][227]++; -exports.format("dev", (function (tokens, req, res) { - _$jscoverage['middleware/logger.js'][228]++; - var status = res.statusCode, len = parseInt(res.getHeader("Content-Length"), 10), color = 32; - _$jscoverage['middleware/logger.js'][232]++; - if (status >= 500) { - _$jscoverage['middleware/logger.js'][232]++; - color = 31; - } - else { - _$jscoverage['middleware/logger.js'][233]++; - if (status >= 400) { - _$jscoverage['middleware/logger.js'][233]++; - color = 33; - } - else { - _$jscoverage['middleware/logger.js'][234]++; - if (status >= 300) { - _$jscoverage['middleware/logger.js'][234]++; - color = 36; - } - } - } - _$jscoverage['middleware/logger.js'][236]++; - len = isNaN(len)? "": len = " - " + bytes(len); - _$jscoverage['middleware/logger.js'][240]++; - return "\u001b[90m" + req.method + " " + req.originalUrl + " " + "\u001b[" + color + "m" + res.statusCode + " \u001b[90m" + (new Date() - req._startTime) + "ms" + len + "\u001b[0m"; -})); -_$jscoverage['middleware/logger.js'][253]++; -exports.token("url", (function (req) { - _$jscoverage['middleware/logger.js'][254]++; - return req.originalUrl || req.url; -})); -_$jscoverage['middleware/logger.js'][261]++; -exports.token("method", (function (req) { - _$jscoverage['middleware/logger.js'][262]++; - return req.method; -})); -_$jscoverage['middleware/logger.js'][269]++; -exports.token("response-time", (function (req) { - _$jscoverage['middleware/logger.js'][270]++; - return new Date() - req._startTime; -})); -_$jscoverage['middleware/logger.js'][277]++; -exports.token("date", (function () { - _$jscoverage['middleware/logger.js'][278]++; - return new Date().toUTCString(); -})); -_$jscoverage['middleware/logger.js'][285]++; -exports.token("status", (function (req, res) { - _$jscoverage['middleware/logger.js'][286]++; - return res.statusCode; -})); -_$jscoverage['middleware/logger.js'][293]++; -exports.token("referrer", (function (req) { - _$jscoverage['middleware/logger.js'][294]++; - return req.headers.referer || req.headers.referrer; -})); -_$jscoverage['middleware/logger.js'][301]++; -exports.token("remote-addr", (function (req) { - _$jscoverage['middleware/logger.js'][302]++; - if (req.ip) { - _$jscoverage['middleware/logger.js'][302]++; - return req.ip; - } - _$jscoverage['middleware/logger.js'][303]++; - var sock = req.socket; - _$jscoverage['middleware/logger.js'][304]++; - if (sock.socket) { - _$jscoverage['middleware/logger.js'][304]++; - return sock.socket.remoteAddress; - } - _$jscoverage['middleware/logger.js'][305]++; - return sock.remoteAddress; -})); -_$jscoverage['middleware/logger.js'][312]++; -exports.token("http-version", (function (req) { - _$jscoverage['middleware/logger.js'][313]++; - return req.httpVersionMajor + "." + req.httpVersionMinor; -})); -_$jscoverage['middleware/logger.js'][320]++; -exports.token("user-agent", (function (req) { - _$jscoverage['middleware/logger.js'][321]++; - return req.headers["user-agent"]; -})); -_$jscoverage['middleware/logger.js'][328]++; -exports.token("req", (function (req, res, field) { - _$jscoverage['middleware/logger.js'][329]++; - return req.headers[field.toLowerCase()]; -})); -_$jscoverage['middleware/logger.js'][336]++; -exports.token("res", (function (req, res, field) { - _$jscoverage['middleware/logger.js'][337]++; - return (res._headers || {})[field.toLowerCase()]; -})); -_$jscoverage['middleware/logger.js'].source = ["/*!"," * Connect - logger"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var bytes = require('bytes');","","/*!"," * Log buffer."," */","","var buf = [];","","/*!"," * Default log buffer duration."," */","","var defaultBufferDuration = 1000;","","/**"," * Logger:"," *"," * Log requests with the given `options` or a `format` string."," *"," * Options:"," *"," * - `format` Format string, see below for tokens"," * - `stream` Output stream, defaults to _stdout_"," * - `buffer` Buffer duration, defaults to 1000ms when _true_"," * - `immediate` Write log line on request instead of response (for response times)"," *"," * Tokens:"," *"," * - `:req[header]` ex: `:req[Accept]`"," * - `:res[header]` ex: `:res[Content-Length]`"," * - `:http-version`"," * - `:response-time`"," * - `:remote-addr`"," * - `:date`"," * - `:method`"," * - `:url`"," * - `:referrer`"," * - `:user-agent`"," * - `:status`"," *"," * Formats:"," *"," * Pre-defined formats that ship with connect:"," *"," * - `default` ':remote-addr - - [:date] \":method :url HTTP/:http-version\" :status :res[content-length] \":referrer\" \":user-agent\"'"," * - `short` ':remote-addr - :method :url HTTP/:http-version :status :res[content-length] - :response-time ms'"," * - `tiny` ':method :url :status :res[content-length] - :response-time ms'"," * - `dev` concise output colored by response status for development use"," *"," * Examples:"," *"," * connect.logger() // default"," * connect.logger('short')"," * connect.logger('tiny')"," * connect.logger({ immediate: true, format: 'dev' })"," * connect.logger(':method :url - :referrer')"," * connect.logger(':req[content-type] -> :res[content-type]')"," * connect.logger(function(tokens, req, res){ return 'some format string' })"," *"," * Defining Tokens:"," *"," * To define a token, simply invoke `connect.logger.token()` with the"," * name and a callback function. The value returned is then available"," * as \":type\" in this case."," *"," * connect.logger.token('type', function(req, res){ return req.headers['content-type']; })"," *"," * Defining Formats:"," *"," * All default formats are defined this way, however it's public API as well:"," *"," * connect.logger.format('name', 'string or function')"," *"," * @param {String|Function|Object} format or options"," * @return {Function}"," * @api public"," */","","exports = module.exports = function logger(options) {"," if ('object' == typeof options) {"," options = options || {};"," } else if (options) {"," options = { format: options };"," } else {"," options = {};"," }",""," // output on request instead of response"," var immediate = options.immediate;",""," // format name"," var fmt = exports[options.format] || options.format || exports.default;",""," // compile format"," if ('function' != typeof fmt) fmt = compile(fmt);",""," // options"," var stream = options.stream || process.stdout"," , buffer = options.buffer;",""," // buffering support"," if (buffer) {"," var realStream = stream"," , interval = 'number' == typeof buffer"," ? buffer"," : defaultBufferDuration;",""," // flush interval"," setInterval(function(){"," if (buf.length) {"," realStream.write(buf.join(''));"," buf.length = 0;"," }"," }, interval); ",""," // swap the stream"," stream = {"," write: function(str){"," buf.push(str);"," }"," };"," }",""," return function logger(req, res, next) {"," req._startTime = new Date;",""," // immediate"," if (immediate) {"," var line = fmt(exports, req, res);"," if (null == line) return;"," stream.write(line + '\\n');"," // proxy end to output logging"," } else {"," var end = res.end;"," res.end = function(chunk, encoding){"," res.end = end;"," res.end(chunk, encoding);"," var line = fmt(exports, req, res);"," if (null == line) return;"," stream.write(line + '\\n');"," };"," }","",""," next();"," };","};","","/**"," * Compile `fmt` into a function."," *"," * @param {String} fmt"," * @return {Function}"," * @api private"," */","","function compile(fmt) {"," fmt = fmt.replace(/\"/g, '\\\\\"');"," var js = ' return \"' + fmt.replace(/:([-\\w]{2,})(?:\\[([^\\]]+)\\])?/g, function(_, name, arg){"," return '\"\\n + (tokens[\"' + name + '\"](req, res, \"' + arg + '\") || \"-\") + \"';"," }) + '\";'"," return new Function('tokens, req, res', js);","};","","/**"," * Define a token function with the given `name`,"," * and callback `fn(req, res)`."," *"," * @param {String} name"," * @param {Function} fn"," * @return {Object} exports for chaining"," * @api public"," */","","exports.token = function(name, fn) {"," exports[name] = fn;"," return this;","};","","/**"," * Define a `fmt` with the given `name`."," *"," * @param {String} name"," * @param {String|Function} fmt"," * @return {Object} exports for chaining"," * @api public"," */","","exports.format = function(name, str){"," exports[name] = str;"," return this;","};","","/**"," * Default format."," */","","exports.format('default', ':remote-addr - - [:date] \":method :url HTTP/:http-version\" :status :res[content-length] \":referrer\" \":user-agent\"');","","/**"," * Short format."," */","","exports.format('short', ':remote-addr - :method :url HTTP/:http-version :status :res[content-length] - :response-time ms');","","/**"," * Tiny format."," */","","exports.format('tiny', ':method :url :status :res[content-length] - :response-time ms');","","/**"," * dev (colored)"," */","","exports.format('dev', function(tokens, req, res){"," var status = res.statusCode"," , len = parseInt(res.getHeader('Content-Length'), 10)"," , color = 32;",""," if (status >= 500) color = 31"," else if (status >= 400) color = 33"," else if (status >= 300) color = 36;",""," len = isNaN(len)"," ? ''"," : len = ' - ' + bytes(len);",""," return '\\033[90m' + req.method"," + ' ' + req.originalUrl + ' '"," + '\\033[' + color + 'm' + res.statusCode"," + ' \\033[90m'"," + (new Date - req._startTime)"," + 'ms' + len"," + '\\033[0m';","});","","/**"," * request url"," */","","exports.token('url', function(req){"," return req.originalUrl || req.url;","});","","/**"," * request method"," */","","exports.token('method', function(req){"," return req.method;","});","","/**"," * response time in milliseconds"," */","","exports.token('response-time', function(req){"," return new Date - req._startTime;","});","","/**"," * UTC date"," */","","exports.token('date', function(){"," return new Date().toUTCString();","});","","/**"," * response status code"," */","","exports.token('status', function(req, res){"," return res.statusCode;","});","","/**"," * normalized referrer"," */","","exports.token('referrer', function(req){"," return req.headers['referer'] || req.headers['referrer'];","});","","/**"," * remote address"," */","","exports.token('remote-addr', function(req){"," if (req.ip) return req.ip;"," var sock = req.socket;"," if (sock.socket) return sock.socket.remoteAddress;"," return sock.remoteAddress;","});","","/**"," * HTTP version"," */","","exports.token('http-version', function(req){"," return req.httpVersionMajor + '.' + req.httpVersionMinor;","});","","/**"," * UA string"," */","","exports.token('user-agent', function(req){"," return req.headers['user-agent'];","});","","/**"," * request header"," */","","exports.token('req', function(req, res, field){"," return req.headers[field.toLowerCase()];","});","","/**"," * response header"," */","","exports.token('res', function(req, res, field){"," return (res._headers || {})[field.toLowerCase()];","});",""]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/methodOverride.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/methodOverride.js deleted file mode 100644 index 0a9118c2..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/methodOverride.js +++ /dev/null @@ -1,42 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/methodOverride.js']) { - _$jscoverage['middleware/methodOverride.js'] = []; - _$jscoverage['middleware/methodOverride.js'][23] = 0; - _$jscoverage['middleware/methodOverride.js'][24] = 0; - _$jscoverage['middleware/methodOverride.js'][25] = 0; - _$jscoverage['middleware/methodOverride.js'][26] = 0; - _$jscoverage['middleware/methodOverride.js'][29] = 0; - _$jscoverage['middleware/methodOverride.js'][30] = 0; - _$jscoverage['middleware/methodOverride.js'][31] = 0; - _$jscoverage['middleware/methodOverride.js'][33] = 0; - _$jscoverage['middleware/methodOverride.js'][34] = 0; - _$jscoverage['middleware/methodOverride.js'][37] = 0; -} -_$jscoverage['middleware/methodOverride.js'][23]++; -module.exports = (function methodOverride(key) { - _$jscoverage['middleware/methodOverride.js'][24]++; - key = key || "_method"; - _$jscoverage['middleware/methodOverride.js'][25]++; - return (function methodOverride(req, res, next) { - _$jscoverage['middleware/methodOverride.js'][26]++; - req.originalMethod = req.originalMethod || req.method; - _$jscoverage['middleware/methodOverride.js'][29]++; - if (req.body && key in req.body) { - _$jscoverage['middleware/methodOverride.js'][30]++; - req.method = req.body[key].toUpperCase(); - _$jscoverage['middleware/methodOverride.js'][31]++; - delete req.body[key]; - } - else { - _$jscoverage['middleware/methodOverride.js'][33]++; - if (req.headers["x-http-method-override"]) { - _$jscoverage['middleware/methodOverride.js'][34]++; - req.method = req.headers["x-http-method-override"].toUpperCase(); - } - } - _$jscoverage['middleware/methodOverride.js'][37]++; - next(); -}); -}); -_$jscoverage['middleware/methodOverride.js'].source = ["","/*!"," * Connect - methodOverride"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Method Override:"," * "," * Provides faux HTTP method support."," * "," * Pass an optional `key` to use when checking for"," * a method override, othewise defaults to _\\_method_."," * The original method is available via `req.originalMethod`."," *"," * @param {String} key"," * @return {Function}"," * @api public"," */","","module.exports = function methodOverride(key){"," key = key || \"_method\";"," return function methodOverride(req, res, next) {"," req.originalMethod = req.originalMethod || req.method;",""," // req.body"," if (req.body && key in req.body) {"," req.method = req.body[key].toUpperCase();"," delete req.body[key];"," // check X-HTTP-Method-Override"," } else if (req.headers['x-http-method-override']) {"," req.method = req.headers['x-http-method-override'].toUpperCase();"," }"," "," next();"," };","};",""]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/multipart.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/multipart.js deleted file mode 100644 index dfcde09a..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/multipart.js +++ /dev/null @@ -1,183 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/multipart.js']) { - _$jscoverage['middleware/multipart.js'] = []; - _$jscoverage['middleware/multipart.js'][12] = 0; - _$jscoverage['middleware/multipart.js'][21] = 0; - _$jscoverage['middleware/multipart.js'][22] = 0; - _$jscoverage['middleware/multipart.js'][52] = 0; - _$jscoverage['middleware/multipart.js'][53] = 0; - _$jscoverage['middleware/multipart.js'][55] = 0; - _$jscoverage['middleware/multipart.js'][59] = 0; - _$jscoverage['middleware/multipart.js'][60] = 0; - _$jscoverage['middleware/multipart.js'][61] = 0; - _$jscoverage['middleware/multipart.js'][62] = 0; - _$jscoverage['middleware/multipart.js'][64] = 0; - _$jscoverage['middleware/multipart.js'][67] = 0; - _$jscoverage['middleware/multipart.js'][70] = 0; - _$jscoverage['middleware/multipart.js'][73] = 0; - _$jscoverage['middleware/multipart.js'][76] = 0; - _$jscoverage['middleware/multipart.js'][77] = 0; - _$jscoverage['middleware/multipart.js'][79] = 0; - _$jscoverage['middleware/multipart.js'][84] = 0; - _$jscoverage['middleware/multipart.js'][85] = 0; - _$jscoverage['middleware/multipart.js'][88] = 0; - _$jscoverage['middleware/multipart.js'][89] = 0; - _$jscoverage['middleware/multipart.js'][90] = 0; - _$jscoverage['middleware/multipart.js'][91] = 0; - _$jscoverage['middleware/multipart.js'][92] = 0; - _$jscoverage['middleware/multipart.js'][94] = 0; - _$jscoverage['middleware/multipart.js'][98] = 0; - _$jscoverage['middleware/multipart.js'][99] = 0; - _$jscoverage['middleware/multipart.js'][102] = 0; - _$jscoverage['middleware/multipart.js'][103] = 0; - _$jscoverage['middleware/multipart.js'][106] = 0; - _$jscoverage['middleware/multipart.js'][107] = 0; - _$jscoverage['middleware/multipart.js'][108] = 0; - _$jscoverage['middleware/multipart.js'][109] = 0; - _$jscoverage['middleware/multipart.js'][111] = 0; - _$jscoverage['middleware/multipart.js'][114] = 0; - _$jscoverage['middleware/multipart.js'][115] = 0; - _$jscoverage['middleware/multipart.js'][116] = 0; - _$jscoverage['middleware/multipart.js'][117] = 0; - _$jscoverage['middleware/multipart.js'][118] = 0; - _$jscoverage['middleware/multipart.js'][119] = 0; - _$jscoverage['middleware/multipart.js'][121] = 0; - _$jscoverage['middleware/multipart.js'][125] = 0; - _$jscoverage['middleware/multipart.js'][127] = 0; - _$jscoverage['middleware/multipart.js'][128] = 0; - _$jscoverage['middleware/multipart.js'][129] = 0; -} -_$jscoverage['middleware/multipart.js'][12]++; -var formidable = require("formidable"), _limit = require("./limit"), utils = require("../utils"), qs = require("qs"); -_$jscoverage['middleware/multipart.js'][21]++; -function noop(req, res, next) { - _$jscoverage['middleware/multipart.js'][22]++; - next(); -} -_$jscoverage['middleware/multipart.js'][52]++; -exports = module.exports = (function (options) { - _$jscoverage['middleware/multipart.js'][53]++; - options = options || {}; - _$jscoverage['middleware/multipart.js'][55]++; - var limit = options.limit? _limit(options.limit): noop; - _$jscoverage['middleware/multipart.js'][59]++; - return (function multipart(req, res, next) { - _$jscoverage['middleware/multipart.js'][60]++; - if (req._body) { - _$jscoverage['middleware/multipart.js'][60]++; - return next(); - } - _$jscoverage['middleware/multipart.js'][61]++; - req.body = req.body || {}; - _$jscoverage['middleware/multipart.js'][62]++; - req.files = req.files || {}; - _$jscoverage['middleware/multipart.js'][64]++; - if (! utils.hasBody(req)) { - _$jscoverage['middleware/multipart.js'][64]++; - return next(); - } - _$jscoverage['middleware/multipart.js'][67]++; - if ("GET" == req.method || "HEAD" == req.method) { - _$jscoverage['middleware/multipart.js'][67]++; - return next(); - } - _$jscoverage['middleware/multipart.js'][70]++; - if ("multipart/form-data" != utils.mime(req)) { - _$jscoverage['middleware/multipart.js'][70]++; - return next(); - } - _$jscoverage['middleware/multipart.js'][73]++; - req._body = true; - _$jscoverage['middleware/multipart.js'][76]++; - limit(req, res, (function (err) { - _$jscoverage['middleware/multipart.js'][77]++; - if (err) { - _$jscoverage['middleware/multipart.js'][77]++; - return next(err); - } - _$jscoverage['middleware/multipart.js'][79]++; - var form = new formidable.IncomingForm(), data = {}, files = {}, done; - _$jscoverage['middleware/multipart.js'][84]++; - Object.keys(options).forEach((function (key) { - _$jscoverage['middleware/multipart.js'][85]++; - form[key] = options[key]; -})); - _$jscoverage['middleware/multipart.js'][88]++; - function ondata(name, val, data) { - _$jscoverage['middleware/multipart.js'][89]++; - if (Array.isArray(data[name])) { - _$jscoverage['middleware/multipart.js'][90]++; - data[name].push(val); - } - else { - _$jscoverage['middleware/multipart.js'][91]++; - if (data[name]) { - _$jscoverage['middleware/multipart.js'][92]++; - data[name] = [data[name], val]; - } - else { - _$jscoverage['middleware/multipart.js'][94]++; - data[name] = val; - } - } -} - _$jscoverage['middleware/multipart.js'][98]++; - form.on("field", (function (name, val) { - _$jscoverage['middleware/multipart.js'][99]++; - ondata(name, val, data); -})); - _$jscoverage['middleware/multipart.js'][102]++; - form.on("file", (function (name, val) { - _$jscoverage['middleware/multipart.js'][103]++; - ondata(name, val, files); -})); - _$jscoverage['middleware/multipart.js'][106]++; - form.on("error", (function (err) { - _$jscoverage['middleware/multipart.js'][107]++; - if (! options.defer) { - _$jscoverage['middleware/multipart.js'][108]++; - err.status = 400; - _$jscoverage['middleware/multipart.js'][109]++; - next(err); - } - _$jscoverage['middleware/multipart.js'][111]++; - done = true; -})); - _$jscoverage['middleware/multipart.js'][114]++; - form.on("end", (function () { - _$jscoverage['middleware/multipart.js'][115]++; - if (done) { - _$jscoverage['middleware/multipart.js'][115]++; - return; - } - _$jscoverage['middleware/multipart.js'][116]++; - try { - _$jscoverage['middleware/multipart.js'][117]++; - req.body = qs.parse(data); - _$jscoverage['middleware/multipart.js'][118]++; - req.files = qs.parse(files); - _$jscoverage['middleware/multipart.js'][119]++; - if (! options.defer) { - _$jscoverage['middleware/multipart.js'][119]++; - next(); - } - } - catch (err) { - _$jscoverage['middleware/multipart.js'][121]++; - form.emit("error", err); - } -})); - _$jscoverage['middleware/multipart.js'][125]++; - form.parse(req); - _$jscoverage['middleware/multipart.js'][127]++; - if (options.defer) { - _$jscoverage['middleware/multipart.js'][128]++; - req.form = form; - _$jscoverage['middleware/multipart.js'][129]++; - next(); - } -})); -}); -}); -_$jscoverage['middleware/multipart.js'].source = ["/*!"," * Connect - multipart"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var formidable = require('formidable')"," , _limit = require('./limit')"," , utils = require('../utils')"," , qs = require('qs');","","/**"," * noop middleware."," */","","function noop(req, res, next) {"," next();","}","","/**"," * Multipart:"," * "," * Parse multipart/form-data request bodies,"," * providing the parsed object as `req.body`"," * and `req.files`."," *"," * Configuration:"," *"," * The options passed are merged with [formidable](https://github.com/felixge/node-formidable)'s"," * `IncomingForm` object, allowing you to configure the upload directory,"," * size limits, etc. For example if you wish to change the upload dir do the following."," *"," * app.use(connect.multipart({ uploadDir: path }));"," *"," * Options:"," *"," * - `limit` byte limit defaulting to none"," * - `defer` defers processing and exposes the Formidable form object as `req.form`."," * `next()` is called without waiting for the form's \"end\" event."," * This option is useful if you need to bind to the \"progress\" event, for example."," *"," * @param {Object} options"," * @return {Function}"," * @api public"," */","","exports = module.exports = function(options){"," options = options || {};",""," var limit = options.limit"," ? _limit(options.limit)"," : noop;",""," return function multipart(req, res, next) {"," if (req._body) return next();"," req.body = req.body || {};"," req.files = req.files || {};",""," if (!utils.hasBody(req)) return next();",""," // ignore GET"," if ('GET' == req.method || 'HEAD' == req.method) return next();",""," // check Content-Type"," if ('multipart/form-data' != utils.mime(req)) return next();",""," // flag as parsed"," req._body = true;",""," // parse"," limit(req, res, function(err){"," if (err) return next(err);",""," var form = new formidable.IncomingForm"," , data = {}"," , files = {}"," , done;",""," Object.keys(options).forEach(function(key){"," form[key] = options[key];"," });",""," function ondata(name, val, data){"," if (Array.isArray(data[name])) {"," data[name].push(val);"," } else if (data[name]) {"," data[name] = [data[name], val];"," } else {"," data[name] = val;"," }"," }",""," form.on('field', function(name, val){"," ondata(name, val, data);"," });",""," form.on('file', function(name, val){"," ondata(name, val, files);"," });",""," form.on('error', function(err){"," if (!options.defer) {"," err.status = 400;"," next(err);"," }"," done = true;"," });",""," form.on('end', function(){"," if (done) return;"," try {"," req.body = qs.parse(data);"," req.files = qs.parse(files);"," if (!options.defer) next();"," } catch (err) {"," form.emit('error', err);"," }"," });",""," form.parse(req);",""," if (options.defer) {"," req.form = form;"," next();"," }"," });"," }","};"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/query.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/query.js deleted file mode 100644 index bd27ff62..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/query.js +++ /dev/null @@ -1,27 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/query.js']) { - _$jscoverage['middleware/query.js'] = []; - _$jscoverage['middleware/query.js'][12] = 0; - _$jscoverage['middleware/query.js'][36] = 0; - _$jscoverage['middleware/query.js'][37] = 0; - _$jscoverage['middleware/query.js'][38] = 0; - _$jscoverage['middleware/query.js'][39] = 0; - _$jscoverage['middleware/query.js'][44] = 0; -} -_$jscoverage['middleware/query.js'][12]++; -var qs = require("qs"), parse = require("../utils").parseUrl; -_$jscoverage['middleware/query.js'][36]++; -module.exports = (function query(options) { - _$jscoverage['middleware/query.js'][37]++; - return (function query(req, res, next) { - _$jscoverage['middleware/query.js'][38]++; - if (! req.query) { - _$jscoverage['middleware/query.js'][39]++; - req.query = ~ req.url.indexOf("?")? qs.parse(parse(req).query, options): {}; - } - _$jscoverage['middleware/query.js'][44]++; - next(); -}); -}); -_$jscoverage['middleware/query.js'].source = ["/*!"," * Connect - query"," * Copyright(c) 2011 TJ Holowaychuk"," * Copyright(c) 2011 Sencha Inc."," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var qs = require('qs')"," , parse = require('../utils').parseUrl;","","/**"," * Query:"," *"," * Automatically parse the query-string when available,"," * populating the `req.query` object."," *"," * Examples:"," *"," * connect()"," * .use(connect.query())"," * .use(function(req, res){"," * res.end(JSON.stringify(req.query));"," * });"," *"," * The `options` passed are provided to qs.parse function."," *"," * @param {Object} options"," * @return {Function}"," * @api public"," */","","module.exports = function query(options){"," return function query(req, res, next){"," if (!req.query) {"," req.query = ~req.url.indexOf('?')"," ? qs.parse(parse(req).query, options)"," : {};"," }",""," next();"," };","};"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/responseTime.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/responseTime.js deleted file mode 100644 index 954e040f..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/responseTime.js +++ /dev/null @@ -1,39 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/responseTime.js']) { - _$jscoverage['middleware/responseTime.js'] = []; - _$jscoverage['middleware/responseTime.js'][18] = 0; - _$jscoverage['middleware/responseTime.js'][19] = 0; - _$jscoverage['middleware/responseTime.js'][20] = 0; - _$jscoverage['middleware/responseTime.js'][22] = 0; - _$jscoverage['middleware/responseTime.js'][23] = 0; - _$jscoverage['middleware/responseTime.js'][25] = 0; - _$jscoverage['middleware/responseTime.js'][26] = 0; - _$jscoverage['middleware/responseTime.js'][27] = 0; - _$jscoverage['middleware/responseTime.js'][30] = 0; -} -_$jscoverage['middleware/responseTime.js'][18]++; -module.exports = (function responseTime() { - _$jscoverage['middleware/responseTime.js'][19]++; - return (function (req, res, next) { - _$jscoverage['middleware/responseTime.js'][20]++; - var start = new Date(); - _$jscoverage['middleware/responseTime.js'][22]++; - if (res._responseTime) { - _$jscoverage['middleware/responseTime.js'][22]++; - return next(); - } - _$jscoverage['middleware/responseTime.js'][23]++; - res._responseTime = true; - _$jscoverage['middleware/responseTime.js'][25]++; - res.on("header", (function () { - _$jscoverage['middleware/responseTime.js'][26]++; - var duration = new Date() - start; - _$jscoverage['middleware/responseTime.js'][27]++; - res.setHeader("X-Response-Time", duration + "ms"); -})); - _$jscoverage['middleware/responseTime.js'][30]++; - next(); -}); -}); -_$jscoverage['middleware/responseTime.js'].source = ["","/*!"," * Connect - responseTime"," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Reponse time:"," *"," * Adds the `X-Response-Time` header displaying the response"," * duration in milliseconds."," *"," * @return {Function}"," * @api public"," */","","module.exports = function responseTime(){"," return function(req, res, next){"," var start = new Date;",""," if (res._responseTime) return next();"," res._responseTime = true;",""," res.on('header', function(){"," var duration = new Date - start;"," res.setHeader('X-Response-Time', duration + 'ms');"," });",""," next();"," };","};"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/session.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/session.js deleted file mode 100644 index 5ff99f8c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/session.js +++ /dev/null @@ -1,321 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/session.js']) { - _$jscoverage['middleware/session.js'] = []; - _$jscoverage['middleware/session.js'][13] = 0; - _$jscoverage['middleware/session.js'][25] = 0; - _$jscoverage['middleware/session.js'][31] = 0; - _$jscoverage['middleware/session.js'][37] = 0; - _$jscoverage['middleware/session.js'][38] = 0; - _$jscoverage['middleware/session.js'][39] = 0; - _$jscoverage['middleware/session.js'][40] = 0; - _$jscoverage['middleware/session.js'][46] = 0; - _$jscoverage['middleware/session.js'][188] = 0; - _$jscoverage['middleware/session.js'][189] = 0; - _$jscoverage['middleware/session.js'][198] = 0; - _$jscoverage['middleware/session.js'][199] = 0; - _$jscoverage['middleware/session.js'][203] = 0; - _$jscoverage['middleware/session.js'][204] = 0; - _$jscoverage['middleware/session.js'][205] = 0; - _$jscoverage['middleware/session.js'][206] = 0; - _$jscoverage['middleware/session.js'][209] = 0; - _$jscoverage['middleware/session.js'][210] = 0; - _$jscoverage['middleware/session.js'][212] = 0; - _$jscoverage['middleware/session.js'][214] = 0; - _$jscoverage['middleware/session.js'][218] = 0; - _$jscoverage['middleware/session.js'][221] = 0; - _$jscoverage['middleware/session.js'][225] = 0; - _$jscoverage['middleware/session.js'][228] = 0; - _$jscoverage['middleware/session.js'][231] = 0; - _$jscoverage['middleware/session.js'][235] = 0; - _$jscoverage['middleware/session.js'][238] = 0; - _$jscoverage['middleware/session.js'][241] = 0; - _$jscoverage['middleware/session.js'][243] = 0; - _$jscoverage['middleware/session.js'][244] = 0; - _$jscoverage['middleware/session.js'][248] = 0; - _$jscoverage['middleware/session.js'][249] = 0; - _$jscoverage['middleware/session.js'][250] = 0; - _$jscoverage['middleware/session.js'][257] = 0; - _$jscoverage['middleware/session.js'][260] = 0; - _$jscoverage['middleware/session.js'][261] = 0; - _$jscoverage['middleware/session.js'][263] = 0; - _$jscoverage['middleware/session.js'][264] = 0; - _$jscoverage['middleware/session.js'][267] = 0; - _$jscoverage['middleware/session.js'][268] = 0; - _$jscoverage['middleware/session.js'][269] = 0; - _$jscoverage['middleware/session.js'][270] = 0; - _$jscoverage['middleware/session.js'][274] = 0; - _$jscoverage['middleware/session.js'][275] = 0; - _$jscoverage['middleware/session.js'][276] = 0; - _$jscoverage['middleware/session.js'][277] = 0; - _$jscoverage['middleware/session.js'][278] = 0; - _$jscoverage['middleware/session.js'][279] = 0; - _$jscoverage['middleware/session.js'][280] = 0; - _$jscoverage['middleware/session.js'][281] = 0; - _$jscoverage['middleware/session.js'][282] = 0; - _$jscoverage['middleware/session.js'][287] = 0; - _$jscoverage['middleware/session.js'][288] = 0; - _$jscoverage['middleware/session.js'][292] = 0; - _$jscoverage['middleware/session.js'][295] = 0; - _$jscoverage['middleware/session.js'][296] = 0; - _$jscoverage['middleware/session.js'][297] = 0; - _$jscoverage['middleware/session.js'][298] = 0; - _$jscoverage['middleware/session.js'][299] = 0; - _$jscoverage['middleware/session.js'][303] = 0; - _$jscoverage['middleware/session.js'][304] = 0; - _$jscoverage['middleware/session.js'][305] = 0; - _$jscoverage['middleware/session.js'][307] = 0; - _$jscoverage['middleware/session.js'][308] = 0; - _$jscoverage['middleware/session.js'][309] = 0; - _$jscoverage['middleware/session.js'][310] = 0; - _$jscoverage['middleware/session.js'][314] = 0; - _$jscoverage['middleware/session.js'][315] = 0; - _$jscoverage['middleware/session.js'][316] = 0; - _$jscoverage['middleware/session.js'][317] = 0; - _$jscoverage['middleware/session.js'][318] = 0; - _$jscoverage['middleware/session.js'][320] = 0; - _$jscoverage['middleware/session.js'][323] = 0; - _$jscoverage['middleware/session.js'][324] = 0; - _$jscoverage['middleware/session.js'][325] = 0; - _$jscoverage['middleware/session.js'][326] = 0; - _$jscoverage['middleware/session.js'][329] = 0; - _$jscoverage['middleware/session.js'][330] = 0; - _$jscoverage['middleware/session.js'][331] = 0; - _$jscoverage['middleware/session.js'][332] = 0; - _$jscoverage['middleware/session.js'][333] = 0; - _$jscoverage['middleware/session.js'][337] = 0; - _$jscoverage['middleware/session.js'][348] = 0; - _$jscoverage['middleware/session.js'][349] = 0; - _$jscoverage['middleware/session.js'][350] = 0; -} -_$jscoverage['middleware/session.js'][13]++; -var Session = require("./session/session"), debug = require("debug")("connect:session"), MemoryStore = require("./session/memory"), signature = require("cookie-signature"), Cookie = require("./session/cookie"), Store = require("./session/store"), utils = require("./../utils"), parse = utils.parseUrl, crc16 = require("crc").crc16; -_$jscoverage['middleware/session.js'][25]++; -var env = process.env.NODE_ENV; -_$jscoverage['middleware/session.js'][31]++; -exports = module.exports = session; -_$jscoverage['middleware/session.js'][37]++; -exports.Store = Store; -_$jscoverage['middleware/session.js'][38]++; -exports.Cookie = Cookie; -_$jscoverage['middleware/session.js'][39]++; -exports.Session = Session; -_$jscoverage['middleware/session.js'][40]++; -exports.MemoryStore = MemoryStore; -_$jscoverage['middleware/session.js'][46]++; -var warning = "Warning: connection.session() MemoryStore is not\ndesigned for a production environment, as it will leak\nmemory, and will not scale past a single process."; -_$jscoverage['middleware/session.js'][188]++; -function session(options) { - _$jscoverage['middleware/session.js'][189]++; - var options = options || {}, key = options.key || "connect.sid", store = options.store || new MemoryStore(), cookie = options.cookie || {}, trustProxy = options.proxy, storeReady = true; - _$jscoverage['middleware/session.js'][198]++; - if ("production" == env && store instanceof MemoryStore) { - _$jscoverage['middleware/session.js'][199]++; - console.warn(warning); - } - _$jscoverage['middleware/session.js'][203]++; - store.generate = (function (req) { - _$jscoverage['middleware/session.js'][204]++; - req.sessionID = utils.uid(24); - _$jscoverage['middleware/session.js'][205]++; - req.session = new Session(req); - _$jscoverage['middleware/session.js'][206]++; - req.session.cookie = new Cookie(cookie); -}); - _$jscoverage['middleware/session.js'][209]++; - store.on("disconnect", (function () { - _$jscoverage['middleware/session.js'][209]++; - storeReady = false; -})); - _$jscoverage['middleware/session.js'][210]++; - store.on("connect", (function () { - _$jscoverage['middleware/session.js'][210]++; - storeReady = true; -})); - _$jscoverage['middleware/session.js'][212]++; - return (function session(req, res, next) { - _$jscoverage['middleware/session.js'][214]++; - if (req.session) { - _$jscoverage['middleware/session.js'][214]++; - return next(); - } - _$jscoverage['middleware/session.js'][218]++; - if (! storeReady) { - _$jscoverage['middleware/session.js'][218]++; - return debug("store is disconnected"), next(); - } - _$jscoverage['middleware/session.js'][221]++; - if (0 != req.originalUrl.indexOf(cookie.path || "/")) { - _$jscoverage['middleware/session.js'][221]++; - return next(); - } - _$jscoverage['middleware/session.js'][225]++; - var secret = options.secret || req.secret; - _$jscoverage['middleware/session.js'][228]++; - if (! secret) { - _$jscoverage['middleware/session.js'][228]++; - throw new Error("`secret` option required for sessions"); - } - _$jscoverage['middleware/session.js'][231]++; - var originalHash, originalId; - _$jscoverage['middleware/session.js'][235]++; - req.sessionStore = store; - _$jscoverage['middleware/session.js'][238]++; - var rawCookie = req.cookies[key]; - _$jscoverage['middleware/session.js'][241]++; - var unsignedCookie = req.signedCookies[key]; - _$jscoverage['middleware/session.js'][243]++; - if (! unsignedCookie && rawCookie) { - _$jscoverage['middleware/session.js'][244]++; - unsignedCookie = utils.parseSignedCookie(rawCookie, secret); - } - _$jscoverage['middleware/session.js'][248]++; - res.on("header", (function () { - _$jscoverage['middleware/session.js'][249]++; - if (! req.session) { - _$jscoverage['middleware/session.js'][249]++; - return; - } - _$jscoverage['middleware/session.js'][250]++; - var cookie = req.session.cookie, proto = (req.headers["x-forwarded-proto"] || "").toLowerCase(), tls = req.connection.encrypted || (trustProxy && "https" == proto), secured = cookie.secure && tls, isNew = unsignedCookie != req.sessionID; - _$jscoverage['middleware/session.js'][257]++; - if (cookie.secure && ! secured) { - _$jscoverage['middleware/session.js'][257]++; - return debug("not secured"); - } - _$jscoverage['middleware/session.js'][260]++; - if (null == cookie.expires) { - _$jscoverage['middleware/session.js'][261]++; - if (! isNew) { - _$jscoverage['middleware/session.js'][261]++; - return debug("already set browser-session cookie"); - } - } - else { - _$jscoverage['middleware/session.js'][263]++; - if (originalHash == hash(req.session) && originalId == req.session.id) { - _$jscoverage['middleware/session.js'][264]++; - return debug("unmodified session"); - } - } - _$jscoverage['middleware/session.js'][267]++; - var val = "s:" + signature.sign(req.sessionID, secret); - _$jscoverage['middleware/session.js'][268]++; - val = cookie.serialize(key, val); - _$jscoverage['middleware/session.js'][269]++; - debug("set-cookie %s", val); - _$jscoverage['middleware/session.js'][270]++; - res.setHeader("Set-Cookie", val); -})); - _$jscoverage['middleware/session.js'][274]++; - var end = res.end; - _$jscoverage['middleware/session.js'][275]++; - res.end = (function (data, encoding) { - _$jscoverage['middleware/session.js'][276]++; - res.end = end; - _$jscoverage['middleware/session.js'][277]++; - if (! req.session) { - _$jscoverage['middleware/session.js'][277]++; - return res.end(data, encoding); - } - _$jscoverage['middleware/session.js'][278]++; - debug("saving"); - _$jscoverage['middleware/session.js'][279]++; - req.session.resetMaxAge(); - _$jscoverage['middleware/session.js'][280]++; - req.session.save((function () { - _$jscoverage['middleware/session.js'][281]++; - debug("saved"); - _$jscoverage['middleware/session.js'][282]++; - res.end(data, encoding); -})); -}); - _$jscoverage['middleware/session.js'][287]++; - function generate() { - _$jscoverage['middleware/session.js'][288]++; - store.generate(req); -} - _$jscoverage['middleware/session.js'][292]++; - req.sessionID = unsignedCookie; - _$jscoverage['middleware/session.js'][295]++; - if (! req.sessionID) { - _$jscoverage['middleware/session.js'][296]++; - debug("no SID sent, generating session"); - _$jscoverage['middleware/session.js'][297]++; - generate(); - _$jscoverage['middleware/session.js'][298]++; - next(); - _$jscoverage['middleware/session.js'][299]++; - return; - } - _$jscoverage['middleware/session.js'][303]++; - var pause = utils.pause(req); - _$jscoverage['middleware/session.js'][304]++; - debug("fetching %s", req.sessionID); - _$jscoverage['middleware/session.js'][305]++; - store.get(req.sessionID, (function (err, sess) { - _$jscoverage['middleware/session.js'][307]++; - var _next = next; - _$jscoverage['middleware/session.js'][308]++; - next = (function (err) { - _$jscoverage['middleware/session.js'][309]++; - _next(err); - _$jscoverage['middleware/session.js'][310]++; - pause.resume(); -}); - _$jscoverage['middleware/session.js'][314]++; - if (err) { - _$jscoverage['middleware/session.js'][315]++; - debug("error"); - _$jscoverage['middleware/session.js'][316]++; - if ("ENOENT" == err.code) { - _$jscoverage['middleware/session.js'][317]++; - generate(); - _$jscoverage['middleware/session.js'][318]++; - next(); - } - else { - _$jscoverage['middleware/session.js'][320]++; - next(err); - } - } - else { - _$jscoverage['middleware/session.js'][323]++; - if (! sess) { - _$jscoverage['middleware/session.js'][324]++; - debug("no session found"); - _$jscoverage['middleware/session.js'][325]++; - generate(); - _$jscoverage['middleware/session.js'][326]++; - next(); - } - else { - _$jscoverage['middleware/session.js'][329]++; - debug("session found"); - _$jscoverage['middleware/session.js'][330]++; - store.createSession(req, sess); - _$jscoverage['middleware/session.js'][331]++; - originalId = req.sessionID; - _$jscoverage['middleware/session.js'][332]++; - originalHash = hash(sess); - _$jscoverage['middleware/session.js'][333]++; - next(); - } - } -})); -}); -} -_$jscoverage['middleware/session.js'][337]++; -; -_$jscoverage['middleware/session.js'][348]++; -function hash(sess) { - _$jscoverage['middleware/session.js'][349]++; - return crc16(JSON.stringify(sess, (function (key, val) { - _$jscoverage['middleware/session.js'][350]++; - if ("cookie" != key) { - _$jscoverage['middleware/session.js'][350]++; - return val; - } -}))); -} -_$jscoverage['middleware/session.js'].source = ["","/*!"," * Connect - session"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var Session = require('./session/session')"," , debug = require('debug')('connect:session')"," , MemoryStore = require('./session/memory')"," , signature = require('cookie-signature')"," , Cookie = require('./session/cookie')"," , Store = require('./session/store')"," , utils = require('./../utils')"," , parse = utils.parseUrl"," , crc16 = require('crc').crc16;","","// environment","","var env = process.env.NODE_ENV;","","/**"," * Expose the middleware."," */","","exports = module.exports = session;","","/**"," * Expose constructors."," */","","exports.Store = Store;","exports.Cookie = Cookie;","exports.Session = Session;","exports.MemoryStore = MemoryStore;","","/**"," * Warning message for `MemoryStore` usage in production."," */","","var warning = 'Warning: connection.session() MemoryStore is not\\n'"," + 'designed for a production environment, as it will leak\\n'"," + 'memory, and will not scale past a single process.';","","/**"," * Session:"," * "," * Setup session store with the given `options`."," *"," * Session data is _not_ saved in the cookie itself, however"," * cookies are used, so we must use the [cookieParser()](cookieParser.html)"," * middleware _before_ `session()`."," *"," * Examples:"," *"," * connect()"," * .use(connect.cookieParser())"," * .use(connect.session({ secret: 'keyboard cat', key: 'sid', cookie: { secure: true }}))"," *"," * Options:"," *"," * - `key` cookie name defaulting to `connect.sid`"," * - `store` session store instance"," * - `secret` session cookie is signed with this secret to prevent tampering"," * - `cookie` session cookie settings, defaulting to `{ path: '/', httpOnly: true, maxAge: null }`"," * - `proxy` trust the reverse proxy when setting secure cookies (via \"x-forwarded-proto\")"," *"," * Cookie option:"," *"," * By default `cookie.maxAge` is `null`, meaning no \"expires\" parameter is set"," * so the cookie becomes a browser-session cookie. When the user closes the "," * browser the cookie (and session) will be removed."," *"," * ## req.session"," *"," * To store or access session data, simply use the request property `req.session`,"," * which is (generally) serialized as JSON by the store, so nested objects "," * are typically fine. For example below is a user-specific view counter:"," *"," * connect()"," * .use(connect.favicon())"," * .use(connect.cookieParser())"," * .use(connect.session({ secret: 'keyboard cat', cookie: { maxAge: 60000 }}))"," * .use(function(req, res, next){"," * var sess = req.session;"," * if (sess.views) {"," * res.setHeader('Content-Type', 'text/html');"," * res.write('<p>views: ' + sess.views + '</p>');"," * res.write('<p>expires in: ' + (sess.cookie.maxAge / 1000) + 's</p>');"," * res.end();"," * sess.views++;"," * } else {"," * sess.views = 1;"," * res.end('welcome to the session demo. refresh!');"," * }"," * }"," * )).listen(3000);"," *"," * ## Session#regenerate()"," *"," * To regenerate the session simply invoke the method, once complete"," * a new SID and `Session` instance will be initialized at `req.session`."," *"," * req.session.regenerate(function(err){"," * // will have a new session here"," * });"," *"," * ## Session#destroy()"," *"," * Destroys the session, removing `req.session`, will be re-generated next request."," *"," * req.session.destroy(function(err){"," * // cannot access session here"," * });"," * "," * ## Session#reload()"," *"," * Reloads the session data."," *"," * req.session.reload(function(err){"," * // session updated"," * });"," *"," * ## Session#save()"," *"," * Save the session."," *"," * req.session.save(function(err){"," * // session saved"," * });"," *"," * ## Session#touch()"," *"," * Updates the `.maxAge` property. Typically this is"," * not necessary to call, as the session middleware does this for you."," *"," * ## Session#cookie"," *"," * Each session has a unique cookie object accompany it. This allows"," * you to alter the session cookie per visitor. For example we can"," * set `req.session.cookie.expires` to `false` to enable the cookie"," * to remain for only the duration of the user-agent."," *"," * ## Session#maxAge"," *"," * Alternatively `req.session.cookie.maxAge` will return the time"," * remaining in milliseconds, which we may also re-assign a new value"," * to adjust the `.expires` property appropriately. The following"," * are essentially equivalent"," *"," * var hour = 3600000;"," * req.session.cookie.expires = new Date(Date.now() + hour);"," * req.session.cookie.maxAge = hour;"," *"," * For example when `maxAge` is set to `60000` (one minute), and 30 seconds"," * has elapsed it will return `30000` until the current request has completed,"," * at which time `req.session.touch()` is called to reset `req.session.maxAge`"," * to its original value."," *"," * req.session.cookie.maxAge;"," * // => 30000"," *"," * Session Store Implementation:"," *"," * Every session store _must_ implement the following methods"," *"," * - `.get(sid, callback)`"," * - `.set(sid, session, callback)`"," * - `.destroy(sid, callback)`"," *"," * Recommended methods include, but are not limited to:"," *"," * - `.length(callback)`"," * - `.clear(callback)`"," *"," * For an example implementation view the [connect-redis](http://github.com/visionmedia/connect-redis) repo."," *"," * @param {Object} options"," * @return {Function}"," * @api public"," */","","function session(options){"," var options = options || {}"," , key = options.key || 'connect.sid'"," , store = options.store || new MemoryStore"," , cookie = options.cookie || {}"," , trustProxy = options.proxy"," , storeReady = true;",""," // notify user that this store is not"," // meant for a production environment"," if ('production' == env && store instanceof MemoryStore) {"," console.warn(warning);"," }",""," // generates the new session"," store.generate = function(req){"," req.sessionID = utils.uid(24);"," req.session = new Session(req);"," req.session.cookie = new Cookie(cookie);"," };",""," store.on('disconnect', function(){ storeReady = false; });"," store.on('connect', function(){ storeReady = true; });",""," return function session(req, res, next) {"," // self-awareness"," if (req.session) return next();",""," // Handle connection as if there is no session if"," // the store has temporarily disconnected etc"," if (!storeReady) return debug('store is disconnected'), next();",""," // pathname mismatch"," if (0 != req.originalUrl.indexOf(cookie.path || '/')) return next();",""," // backwards compatibility for signed cookies"," // req.secret is passed from the cookie parser middleware"," var secret = options.secret || req.secret;",""," // ensure secret is available or bail"," if (!secret) throw new Error('`secret` option required for sessions');",""," // parse url"," var originalHash"," , originalId;",""," // expose store"," req.sessionStore = store;",""," // grab the session cookie value and check the signature"," var rawCookie = req.cookies[key];",""," // get signedCookies for backwards compat with signed cookies"," var unsignedCookie = req.signedCookies[key];",""," if (!unsignedCookie && rawCookie) {"," unsignedCookie = utils.parseSignedCookie(rawCookie, secret);"," }",""," // set-cookie"," res.on('header', function(){"," if (!req.session) return;"," var cookie = req.session.cookie"," , proto = (req.headers['x-forwarded-proto'] || '').toLowerCase()"," , tls = req.connection.encrypted || (trustProxy && 'https' == proto)"," , secured = cookie.secure && tls"," , isNew = unsignedCookie != req.sessionID;",""," // only send secure cookies via https"," if (cookie.secure && !secured) return debug('not secured');",""," // browser-session length cookie"," if (null == cookie.expires) {"," if (!isNew) return debug('already set browser-session cookie');"," // compare hashes and ids"," } else if (originalHash == hash(req.session) && originalId == req.session.id) {"," return debug('unmodified session');"," }",""," var val = 's:' + signature.sign(req.sessionID, secret);"," val = cookie.serialize(key, val);"," debug('set-cookie %s', val);"," res.setHeader('Set-Cookie', val);"," });",""," // proxy end() to commit the session"," var end = res.end;"," res.end = function(data, encoding){"," res.end = end;"," if (!req.session) return res.end(data, encoding);"," debug('saving');"," req.session.resetMaxAge();"," req.session.save(function(){"," debug('saved');"," res.end(data, encoding);"," });"," };",""," // generate the session"," function generate() {"," store.generate(req);"," }",""," // get the sessionID from the cookie"," req.sessionID = unsignedCookie;",""," // generate a session if the browser doesn't send a sessionID"," if (!req.sessionID) {"," debug('no SID sent, generating session');"," generate();"," next();"," return;"," }",""," // generate the session object"," var pause = utils.pause(req);"," debug('fetching %s', req.sessionID);"," store.get(req.sessionID, function(err, sess){"," // proxy to resume() events"," var _next = next;"," next = function(err){"," _next(err);"," pause.resume();"," };",""," // error handling"," if (err) {"," debug('error');"," if ('ENOENT' == err.code) {"," generate();"," next();"," } else {"," next(err);"," }"," // no session"," } else if (!sess) {"," debug('no session found');"," generate();"," next();"," // populate req.session"," } else {"," debug('session found');"," store.createSession(req, sess);"," originalId = req.sessionID;"," originalHash = hash(sess);"," next();"," }"," });"," };","};","","/**"," * Hash the given `sess` object omitting changes"," * to `.cookie`."," *"," * @param {Object} sess"," * @return {String}"," * @api private"," */","","function hash(sess) {"," return crc16(JSON.stringify(sess, function(key, val){"," if ('cookie' != key) return val;"," }));","}"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/session/cookie.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/session/cookie.js deleted file mode 100644 index 279afe5f..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/session/cookie.js +++ /dev/null @@ -1,65 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/session/cookie.js']) { - _$jscoverage['middleware/session/cookie.js'] = []; - _$jscoverage['middleware/session/cookie.js'][13] = 0; - _$jscoverage['middleware/session/cookie.js'][24] = 0; - _$jscoverage['middleware/session/cookie.js'][25] = 0; - _$jscoverage['middleware/session/cookie.js'][26] = 0; - _$jscoverage['middleware/session/cookie.js'][27] = 0; - _$jscoverage['middleware/session/cookie.js'][28] = 0; - _$jscoverage['middleware/session/cookie.js'][29] = 0; - _$jscoverage['middleware/session/cookie.js'][38] = 0; - _$jscoverage['middleware/session/cookie.js'][48] = 0; - _$jscoverage['middleware/session/cookie.js'][49] = 0; - _$jscoverage['middleware/session/cookie.js'][60] = 0; - _$jscoverage['middleware/session/cookie.js'][71] = 0; - _$jscoverage['middleware/session/cookie.js'][84] = 0; - _$jscoverage['middleware/session/cookie.js'][97] = 0; - _$jscoverage['middleware/session/cookie.js'][115] = 0; - _$jscoverage['middleware/session/cookie.js'][126] = 0; -} -_$jscoverage['middleware/session/cookie.js'][13]++; -var utils = require("../../utils"), cookie = require("cookie"); -_$jscoverage['middleware/session/cookie.js'][24]++; -var Cookie = module.exports = (function Cookie(options) { - _$jscoverage['middleware/session/cookie.js'][25]++; - this.path = "/"; - _$jscoverage['middleware/session/cookie.js'][26]++; - this.maxAge = null; - _$jscoverage['middleware/session/cookie.js'][27]++; - this.httpOnly = true; - _$jscoverage['middleware/session/cookie.js'][28]++; - if (options) { - _$jscoverage['middleware/session/cookie.js'][28]++; - utils.merge(this, options); - } - _$jscoverage['middleware/session/cookie.js'][29]++; - this.originalMaxAge = undefined == this.originalMaxAge? this.maxAge: this.originalMaxAge; -}); -_$jscoverage['middleware/session/cookie.js'][38]++; -Cookie.prototype = {set expires (date) { - _$jscoverage['middleware/session/cookie.js'][48]++; - this._expires = date; - _$jscoverage['middleware/session/cookie.js'][49]++; - this.originalMaxAge = this.maxAge; -}, get expires () { - _$jscoverage['middleware/session/cookie.js'][60]++; - return this._expires; -}, set maxAge (ms) { - _$jscoverage['middleware/session/cookie.js'][71]++; - this.expires = "number" == typeof ms? new Date(Date.now() + ms): ms; -}, get maxAge () { - _$jscoverage['middleware/session/cookie.js'][84]++; - return this.expires instanceof Date? this.expires.valueOf() - Date.now(): this.expires; -}, get data () { - _$jscoverage['middleware/session/cookie.js'][97]++; - return ({originalMaxAge: this.originalMaxAge, expires: this._expires, secure: this.secure, httpOnly: this.httpOnly, domain: this.domain, path: this.path}); -}, serialize: (function (name, val) { - _$jscoverage['middleware/session/cookie.js'][115]++; - return cookie.serialize(name, val, this.data); -}), toJSON: (function () { - _$jscoverage['middleware/session/cookie.js'][126]++; - return this.data; -})}; -_$jscoverage['middleware/session/cookie.js'].source = ["","/*!"," * Connect - session - Cookie"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var utils = require('../../utils')"," , cookie = require('cookie');","","/**"," * Initialize a new `Cookie` with the given `options`."," *"," * @param {IncomingMessage} req"," * @param {Object} options"," * @api private"," */","","var Cookie = module.exports = function Cookie(options) {"," this.path = '/';"," this.maxAge = null;"," this.httpOnly = true;"," if (options) utils.merge(this, options);"," this.originalMaxAge = undefined == this.originalMaxAge"," ? this.maxAge"," : this.originalMaxAge;","};","","/*!"," * Prototype."," */","","Cookie.prototype = {",""," /**"," * Set expires `date`."," *"," * @param {Date} date"," * @api public"," */"," "," set expires(date) {"," this._expires = date;"," this.originalMaxAge = this.maxAge;"," },",""," /**"," * Get expires `date`."," *"," * @return {Date}"," * @api public"," */",""," get expires() {"," return this._expires;"," },"," "," /**"," * Set expires via max-age in `ms`."," *"," * @param {Number} ms"," * @api public"," */"," "," set maxAge(ms) {"," this.expires = 'number' == typeof ms"," ? new Date(Date.now() + ms)"," : ms;"," },",""," /**"," * Get expires max-age in `ms`."," *"," * @return {Number}"," * @api public"," */",""," get maxAge() {"," return this.expires instanceof Date"," ? this.expires.valueOf() - Date.now()"," : this.expires;"," },",""," /**"," * Return cookie data object."," *"," * @return {Object}"," * @api private"," */",""," get data() {"," return {"," originalMaxAge: this.originalMaxAge"," , expires: this._expires"," , secure: this.secure"," , httpOnly: this.httpOnly"," , domain: this.domain"," , path: this.path"," }"," },",""," /**"," * Return a serialized cookie string."," *"," * @return {String}"," * @api public"," */",""," serialize: function(name, val){"," return cookie.serialize(name, val, this.data);"," },",""," /**"," * Return JSON representation of this cookie."," *"," * @return {Object}"," * @api private"," */"," "," toJSON: function(){"," return this.data;"," }","};"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/session/memory.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/session/memory.js deleted file mode 100644 index f140187c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/session/memory.js +++ /dev/null @@ -1,128 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/session/memory.js']) { - _$jscoverage['middleware/session/memory.js'] = []; - _$jscoverage['middleware/session/memory.js'][13] = 0; - _$jscoverage['middleware/session/memory.js'][21] = 0; - _$jscoverage['middleware/session/memory.js'][22] = 0; - _$jscoverage['middleware/session/memory.js'][29] = 0; - _$jscoverage['middleware/session/memory.js'][39] = 0; - _$jscoverage['middleware/session/memory.js'][40] = 0; - _$jscoverage['middleware/session/memory.js'][41] = 0; - _$jscoverage['middleware/session/memory.js'][42] = 0; - _$jscoverage['middleware/session/memory.js'][44] = 0; - _$jscoverage['middleware/session/memory.js'][45] = 0; - _$jscoverage['middleware/session/memory.js'][46] = 0; - _$jscoverage['middleware/session/memory.js'][49] = 0; - _$jscoverage['middleware/session/memory.js'][50] = 0; - _$jscoverage['middleware/session/memory.js'][52] = 0; - _$jscoverage['middleware/session/memory.js'][55] = 0; - _$jscoverage['middleware/session/memory.js'][69] = 0; - _$jscoverage['middleware/session/memory.js'][70] = 0; - _$jscoverage['middleware/session/memory.js'][71] = 0; - _$jscoverage['middleware/session/memory.js'][72] = 0; - _$jscoverage['middleware/session/memory.js'][73] = 0; - _$jscoverage['middleware/session/memory.js'][84] = 0; - _$jscoverage['middleware/session/memory.js'][85] = 0; - _$jscoverage['middleware/session/memory.js'][86] = 0; - _$jscoverage['middleware/session/memory.js'][87] = 0; - _$jscoverage['middleware/session/memory.js'][88] = 0; - _$jscoverage['middleware/session/memory.js'][99] = 0; - _$jscoverage['middleware/session/memory.js'][100] = 0; - _$jscoverage['middleware/session/memory.js'][102] = 0; - _$jscoverage['middleware/session/memory.js'][103] = 0; - _$jscoverage['middleware/session/memory.js'][105] = 0; - _$jscoverage['middleware/session/memory.js'][115] = 0; - _$jscoverage['middleware/session/memory.js'][116] = 0; - _$jscoverage['middleware/session/memory.js'][117] = 0; - _$jscoverage['middleware/session/memory.js'][127] = 0; - _$jscoverage['middleware/session/memory.js'][128] = 0; -} -_$jscoverage['middleware/session/memory.js'][13]++; -var Store = require("./store"); -_$jscoverage['middleware/session/memory.js'][21]++; -var MemoryStore = module.exports = (function MemoryStore() { - _$jscoverage['middleware/session/memory.js'][22]++; - this.sessions = {}; -}); -_$jscoverage['middleware/session/memory.js'][29]++; -MemoryStore.prototype.__proto__ = Store.prototype; -_$jscoverage['middleware/session/memory.js'][39]++; -MemoryStore.prototype.get = (function (sid, fn) { - _$jscoverage['middleware/session/memory.js'][40]++; - var self = this; - _$jscoverage['middleware/session/memory.js'][41]++; - process.nextTick((function () { - _$jscoverage['middleware/session/memory.js'][42]++; - var expires, sess = self.sessions[sid]; - _$jscoverage['middleware/session/memory.js'][44]++; - if (sess) { - _$jscoverage['middleware/session/memory.js'][45]++; - sess = JSON.parse(sess); - _$jscoverage['middleware/session/memory.js'][46]++; - expires = "string" == typeof sess.cookie.expires? new Date(sess.cookie.expires): sess.cookie.expires; - _$jscoverage['middleware/session/memory.js'][49]++; - if (! expires || new Date() < expires) { - _$jscoverage['middleware/session/memory.js'][50]++; - fn(null, sess); - } - else { - _$jscoverage['middleware/session/memory.js'][52]++; - self.destroy(sid, fn); - } - } - else { - _$jscoverage['middleware/session/memory.js'][55]++; - fn(); - } -})); -}); -_$jscoverage['middleware/session/memory.js'][69]++; -MemoryStore.prototype.set = (function (sid, sess, fn) { - _$jscoverage['middleware/session/memory.js'][70]++; - var self = this; - _$jscoverage['middleware/session/memory.js'][71]++; - process.nextTick((function () { - _$jscoverage['middleware/session/memory.js'][72]++; - self.sessions[sid] = JSON.stringify(sess); - _$jscoverage['middleware/session/memory.js'][73]++; - fn && fn(); -})); -}); -_$jscoverage['middleware/session/memory.js'][84]++; -MemoryStore.prototype.destroy = (function (sid, fn) { - _$jscoverage['middleware/session/memory.js'][85]++; - var self = this; - _$jscoverage['middleware/session/memory.js'][86]++; - process.nextTick((function () { - _$jscoverage['middleware/session/memory.js'][87]++; - delete self.sessions[sid]; - _$jscoverage['middleware/session/memory.js'][88]++; - fn && fn(); -})); -}); -_$jscoverage['middleware/session/memory.js'][99]++; -MemoryStore.prototype.all = (function (fn) { - _$jscoverage['middleware/session/memory.js'][100]++; - var arr = [], keys = Object.keys(this.sessions); - _$jscoverage['middleware/session/memory.js'][102]++; - for (var i = 0, len = keys.length; i < len; ++i) { - _$jscoverage['middleware/session/memory.js'][103]++; - arr.push(this.sessions[keys[i]]); -} - _$jscoverage['middleware/session/memory.js'][105]++; - fn(null, arr); -}); -_$jscoverage['middleware/session/memory.js'][115]++; -MemoryStore.prototype.clear = (function (fn) { - _$jscoverage['middleware/session/memory.js'][116]++; - this.sessions = {}; - _$jscoverage['middleware/session/memory.js'][117]++; - fn && fn(); -}); -_$jscoverage['middleware/session/memory.js'][127]++; -MemoryStore.prototype.length = (function (fn) { - _$jscoverage['middleware/session/memory.js'][128]++; - fn(null, Object.keys(this.sessions).length); -}); -_$jscoverage['middleware/session/memory.js'].source = ["","/*!"," * Connect - session - MemoryStore"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var Store = require('./store');","","/**"," * Initialize a new `MemoryStore`."," *"," * @api public"," */","","var MemoryStore = module.exports = function MemoryStore() {"," this.sessions = {};","};","","/**"," * Inherit from `Store.prototype`."," */","","MemoryStore.prototype.__proto__ = Store.prototype;","","/**"," * Attempt to fetch session by the given `sid`."," *"," * @param {String} sid"," * @param {Function} fn"," * @api public"," */","","MemoryStore.prototype.get = function(sid, fn){"," var self = this;"," process.nextTick(function(){"," var expires"," , sess = self.sessions[sid];"," if (sess) {"," sess = JSON.parse(sess);"," expires = 'string' == typeof sess.cookie.expires"," ? new Date(sess.cookie.expires)"," : sess.cookie.expires;"," if (!expires || new Date < expires) {"," fn(null, sess);"," } else {"," self.destroy(sid, fn);"," }"," } else {"," fn();"," }"," });","};","","/**"," * Commit the given `sess` object associated with the given `sid`."," *"," * @param {String} sid"," * @param {Session} sess"," * @param {Function} fn"," * @api public"," */","","MemoryStore.prototype.set = function(sid, sess, fn){"," var self = this;"," process.nextTick(function(){"," self.sessions[sid] = JSON.stringify(sess);"," fn && fn();"," });","};","","/**"," * Destroy the session associated with the given `sid`."," *"," * @param {String} sid"," * @api public"," */","","MemoryStore.prototype.destroy = function(sid, fn){"," var self = this;"," process.nextTick(function(){"," delete self.sessions[sid];"," fn && fn();"," });","};","","/**"," * Invoke the given callback `fn` with all active sessions."," *"," * @param {Function} fn"," * @api public"," */","","MemoryStore.prototype.all = function(fn){"," var arr = []"," , keys = Object.keys(this.sessions);"," for (var i = 0, len = keys.length; i < len; ++i) {"," arr.push(this.sessions[keys[i]]);"," }"," fn(null, arr);","};","","/**"," * Clear all sessions."," *"," * @param {Function} fn"," * @api public"," */","","MemoryStore.prototype.clear = function(fn){"," this.sessions = {};"," fn && fn();","};","","/**"," * Fetch number of sessions."," *"," * @param {Function} fn"," * @api public"," */","","MemoryStore.prototype.length = function(fn){"," fn(null, Object.keys(this.sessions).length);","};"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/session/session.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/session/session.js deleted file mode 100644 index 73e85e0b..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/session/session.js +++ /dev/null @@ -1,108 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/session/session.js']) { - _$jscoverage['middleware/session/session.js'] = []; - _$jscoverage['middleware/session/session.js'][13] = 0; - _$jscoverage['middleware/session/session.js'][23] = 0; - _$jscoverage['middleware/session/session.js'][24] = 0; - _$jscoverage['middleware/session/session.js'][25] = 0; - _$jscoverage['middleware/session/session.js'][26] = 0; - _$jscoverage['middleware/session/session.js'][38] = 0; - _$jscoverage['middleware/session/session.js'][39] = 0; - _$jscoverage['middleware/session/session.js'][49] = 0; - _$jscoverage['middleware/session/session.js'][50] = 0; - _$jscoverage['middleware/session/session.js'][51] = 0; - _$jscoverage['middleware/session/session.js'][62] = 0; - _$jscoverage['middleware/session/session.js'][63] = 0; - _$jscoverage['middleware/session/session.js'][64] = 0; - _$jscoverage['middleware/session/session.js'][79] = 0; - _$jscoverage['middleware/session/session.js'][80] = 0; - _$jscoverage['middleware/session/session.js'][82] = 0; - _$jscoverage['middleware/session/session.js'][83] = 0; - _$jscoverage['middleware/session/session.js'][84] = 0; - _$jscoverage['middleware/session/session.js'][85] = 0; - _$jscoverage['middleware/session/session.js'][86] = 0; - _$jscoverage['middleware/session/session.js'][88] = 0; - _$jscoverage['middleware/session/session.js'][99] = 0; - _$jscoverage['middleware/session/session.js'][100] = 0; - _$jscoverage['middleware/session/session.js'][101] = 0; - _$jscoverage['middleware/session/session.js'][102] = 0; - _$jscoverage['middleware/session/session.js'][113] = 0; - _$jscoverage['middleware/session/session.js'][114] = 0; - _$jscoverage['middleware/session/session.js'][115] = 0; -} -_$jscoverage['middleware/session/session.js'][13]++; -var utils = require("../../utils"); -_$jscoverage['middleware/session/session.js'][23]++; -var Session = module.exports = (function Session(req, data) { - _$jscoverage['middleware/session/session.js'][24]++; - Object.defineProperty(this, "req", {value: req}); - _$jscoverage['middleware/session/session.js'][25]++; - Object.defineProperty(this, "id", {value: req.sessionID}); - _$jscoverage['middleware/session/session.js'][26]++; - if ("object" == typeof data) { - _$jscoverage['middleware/session/session.js'][26]++; - utils.merge(this, data); - } -}); -_$jscoverage['middleware/session/session.js'][38]++; -Session.prototype.touch = (function () { - _$jscoverage['middleware/session/session.js'][39]++; - return this.resetMaxAge(); -}); -_$jscoverage['middleware/session/session.js'][49]++; -Session.prototype.resetMaxAge = (function () { - _$jscoverage['middleware/session/session.js'][50]++; - this.cookie.maxAge = this.cookie.originalMaxAge; - _$jscoverage['middleware/session/session.js'][51]++; - return this; -}); -_$jscoverage['middleware/session/session.js'][62]++; -Session.prototype.save = (function (fn) { - _$jscoverage['middleware/session/session.js'][63]++; - this.req.sessionStore.set(this.id, this, fn || (function () { -})); - _$jscoverage['middleware/session/session.js'][64]++; - return this; -}); -_$jscoverage['middleware/session/session.js'][79]++; -Session.prototype.reload = (function (fn) { - _$jscoverage['middleware/session/session.js'][80]++; - var req = this.req, store = this.req.sessionStore; - _$jscoverage['middleware/session/session.js'][82]++; - store.get(this.id, (function (err, sess) { - _$jscoverage['middleware/session/session.js'][83]++; - if (err) { - _$jscoverage['middleware/session/session.js'][83]++; - return fn(err); - } - _$jscoverage['middleware/session/session.js'][84]++; - if (! sess) { - _$jscoverage['middleware/session/session.js'][84]++; - return fn(new Error("failed to load session")); - } - _$jscoverage['middleware/session/session.js'][85]++; - store.createSession(req, sess); - _$jscoverage['middleware/session/session.js'][86]++; - fn(); -})); - _$jscoverage['middleware/session/session.js'][88]++; - return this; -}); -_$jscoverage['middleware/session/session.js'][99]++; -Session.prototype.destroy = (function (fn) { - _$jscoverage['middleware/session/session.js'][100]++; - delete this.req.session; - _$jscoverage['middleware/session/session.js'][101]++; - this.req.sessionStore.destroy(this.id, fn); - _$jscoverage['middleware/session/session.js'][102]++; - return this; -}); -_$jscoverage['middleware/session/session.js'][113]++; -Session.prototype.regenerate = (function (fn) { - _$jscoverage['middleware/session/session.js'][114]++; - this.req.sessionStore.regenerate(this.req, fn); - _$jscoverage['middleware/session/session.js'][115]++; - return this; -}); -_$jscoverage['middleware/session/session.js'].source = ["","/*!"," * Connect - session - Session"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var utils = require('../../utils');","","/**"," * Create a new `Session` with the given request and `data`."," *"," * @param {IncomingRequest} req"," * @param {Object} data"," * @api private"," */","","var Session = module.exports = function Session(req, data) {"," Object.defineProperty(this, 'req', { value: req });"," Object.defineProperty(this, 'id', { value: req.sessionID });"," if ('object' == typeof data) utils.merge(this, data);","};","","/**"," * Update reset `.cookie.maxAge` to prevent"," * the cookie from expiring when the"," * session is still active."," *"," * @return {Session} for chaining"," * @api public"," */","","Session.prototype.touch = function(){"," return this.resetMaxAge();","};","","/**"," * Reset `.maxAge` to `.originalMaxAge`."," *"," * @return {Session} for chaining"," * @api public"," */","","Session.prototype.resetMaxAge = function(){"," this.cookie.maxAge = this.cookie.originalMaxAge;"," return this;","};","","/**"," * Save the session data with optional callback `fn(err)`."," *"," * @param {Function} fn"," * @return {Session} for chaining"," * @api public"," */","","Session.prototype.save = function(fn){"," this.req.sessionStore.set(this.id, this, fn || function(){});"," return this;","};","","/**"," * Re-loads the session data _without_ altering"," * the maxAge properties. Invokes the callback `fn(err)`,"," * after which time if no exception has occurred the"," * `req.session` property will be a new `Session` object,"," * although representing the same session."," *"," * @param {Function} fn"," * @return {Session} for chaining"," * @api public"," */","","Session.prototype.reload = function(fn){"," var req = this.req"," , store = this.req.sessionStore;"," store.get(this.id, function(err, sess){"," if (err) return fn(err);"," if (!sess) return fn(new Error('failed to load session'));"," store.createSession(req, sess);"," fn();"," });"," return this;","};","","/**"," * Destroy `this` session."," *"," * @param {Function} fn"," * @return {Session} for chaining"," * @api public"," */","","Session.prototype.destroy = function(fn){"," delete this.req.session;"," this.req.sessionStore.destroy(this.id, fn);"," return this;","};","","/**"," * Regenerate this request's session."," *"," * @param {Function} fn"," * @return {Session} for chaining"," * @api public"," */","","Session.prototype.regenerate = function(fn){"," this.req.sessionStore.regenerate(this.req, fn);"," return this;","};"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/session/store.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/session/store.js deleted file mode 100644 index 2d79aa26..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/session/store.js +++ /dev/null @@ -1,90 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/session/store.js']) { - _$jscoverage['middleware/session/store.js'] = []; - _$jscoverage['middleware/session/store.js'][13] = 0; - _$jscoverage['middleware/session/store.js'][23] = 0; - _$jscoverage['middleware/session/store.js'][29] = 0; - _$jscoverage['middleware/session/store.js'][39] = 0; - _$jscoverage['middleware/session/store.js'][40] = 0; - _$jscoverage['middleware/session/store.js'][41] = 0; - _$jscoverage['middleware/session/store.js'][42] = 0; - _$jscoverage['middleware/session/store.js'][43] = 0; - _$jscoverage['middleware/session/store.js'][56] = 0; - _$jscoverage['middleware/session/store.js'][57] = 0; - _$jscoverage['middleware/session/store.js'][58] = 0; - _$jscoverage['middleware/session/store.js'][59] = 0; - _$jscoverage['middleware/session/store.js'][60] = 0; - _$jscoverage['middleware/session/store.js'][61] = 0; - _$jscoverage['middleware/session/store.js'][62] = 0; - _$jscoverage['middleware/session/store.js'][63] = 0; - _$jscoverage['middleware/session/store.js'][76] = 0; - _$jscoverage['middleware/session/store.js'][77] = 0; - _$jscoverage['middleware/session/store.js'][79] = 0; - _$jscoverage['middleware/session/store.js'][80] = 0; - _$jscoverage['middleware/session/store.js'][81] = 0; - _$jscoverage['middleware/session/store.js'][82] = 0; - _$jscoverage['middleware/session/store.js'][83] = 0; -} -_$jscoverage['middleware/session/store.js'][13]++; -var EventEmitter = require("events").EventEmitter, Session = require("./session"), Cookie = require("./cookie"); -_$jscoverage['middleware/session/store.js'][23]++; -var Store = module.exports = (function Store(options) { -}); -_$jscoverage['middleware/session/store.js'][29]++; -Store.prototype.__proto__ = EventEmitter.prototype; -_$jscoverage['middleware/session/store.js'][39]++; -Store.prototype.regenerate = (function (req, fn) { - _$jscoverage['middleware/session/store.js'][40]++; - var self = this; - _$jscoverage['middleware/session/store.js'][41]++; - this.destroy(req.sessionID, (function (err) { - _$jscoverage['middleware/session/store.js'][42]++; - self.generate(req); - _$jscoverage['middleware/session/store.js'][43]++; - fn(err); -})); -}); -_$jscoverage['middleware/session/store.js'][56]++; -Store.prototype.load = (function (sid, fn) { - _$jscoverage['middleware/session/store.js'][57]++; - var self = this; - _$jscoverage['middleware/session/store.js'][58]++; - this.get(sid, (function (err, sess) { - _$jscoverage['middleware/session/store.js'][59]++; - if (err) { - _$jscoverage['middleware/session/store.js'][59]++; - return fn(err); - } - _$jscoverage['middleware/session/store.js'][60]++; - if (! sess) { - _$jscoverage['middleware/session/store.js'][60]++; - return fn(); - } - _$jscoverage['middleware/session/store.js'][61]++; - var req = {sessionID: sid, sessionStore: self}; - _$jscoverage['middleware/session/store.js'][62]++; - sess = self.createSession(req, sess); - _$jscoverage['middleware/session/store.js'][63]++; - fn(null, sess); -})); -}); -_$jscoverage['middleware/session/store.js'][76]++; -Store.prototype.createSession = (function (req, sess) { - _$jscoverage['middleware/session/store.js'][77]++; - var expires = sess.cookie.expires, orig = sess.cookie.originalMaxAge; - _$jscoverage['middleware/session/store.js'][79]++; - sess.cookie = new Cookie(sess.cookie); - _$jscoverage['middleware/session/store.js'][80]++; - if ("string" == typeof expires) { - _$jscoverage['middleware/session/store.js'][80]++; - sess.cookie.expires = new Date(expires); - } - _$jscoverage['middleware/session/store.js'][81]++; - sess.cookie.originalMaxAge = orig; - _$jscoverage['middleware/session/store.js'][82]++; - req.session = new Session(req, sess); - _$jscoverage['middleware/session/store.js'][83]++; - return req.session; -}); -_$jscoverage['middleware/session/store.js'].source = ["","/*!"," * Connect - session - Store"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var EventEmitter = require('events').EventEmitter"," , Session = require('./session')"," , Cookie = require('./cookie');","","/**"," * Initialize abstract `Store`."," *"," * @api private"," */","","var Store = module.exports = function Store(options){};","","/**"," * Inherit from `EventEmitter.prototype`."," */","","Store.prototype.__proto__ = EventEmitter.prototype;","","/**"," * Re-generate the given requests's session."," *"," * @param {IncomingRequest} req"," * @return {Function} fn"," * @api public"," */","","Store.prototype.regenerate = function(req, fn){"," var self = this;"," this.destroy(req.sessionID, function(err){"," self.generate(req);"," fn(err);"," });","};","","/**"," * Load a `Session` instance via the given `sid`"," * and invoke the callback `fn(err, sess)`."," *"," * @param {String} sid"," * @param {Function} fn"," * @api public"," */","","Store.prototype.load = function(sid, fn){"," var self = this;"," this.get(sid, function(err, sess){"," if (err) return fn(err);"," if (!sess) return fn();"," var req = { sessionID: sid, sessionStore: self };"," sess = self.createSession(req, sess);"," fn(null, sess);"," });","};","","/**"," * Create session from JSON `sess` data."," *"," * @param {IncomingRequest} req"," * @param {Object} sess"," * @return {Session}"," * @api private"," */","","Store.prototype.createSession = function(req, sess){"," var expires = sess.cookie.expires"," , orig = sess.cookie.originalMaxAge;"," sess.cookie = new Cookie(sess.cookie);"," if ('string' == typeof expires) sess.cookie.expires = new Date(expires);"," sess.cookie.originalMaxAge = orig;"," req.session = new Session(req, sess);"," return req.session;","};"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/static.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/static.js deleted file mode 100644 index c52b1c02..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/static.js +++ /dev/null @@ -1,92 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/static.js']) { - _$jscoverage['middleware/static.js'] = []; - _$jscoverage['middleware/static.js'][13] = 0; - _$jscoverage['middleware/static.js'][45] = 0; - _$jscoverage['middleware/static.js'][46] = 0; - _$jscoverage['middleware/static.js'][49] = 0; - _$jscoverage['middleware/static.js'][52] = 0; - _$jscoverage['middleware/static.js'][54] = 0; - _$jscoverage['middleware/static.js'][55] = 0; - _$jscoverage['middleware/static.js'][56] = 0; - _$jscoverage['middleware/static.js'][57] = 0; - _$jscoverage['middleware/static.js'][59] = 0; - _$jscoverage['middleware/static.js'][60] = 0; - _$jscoverage['middleware/static.js'][61] = 0; - _$jscoverage['middleware/static.js'][64] = 0; - _$jscoverage['middleware/static.js'][65] = 0; - _$jscoverage['middleware/static.js'][66] = 0; - _$jscoverage['middleware/static.js'][67] = 0; - _$jscoverage['middleware/static.js'][68] = 0; - _$jscoverage['middleware/static.js'][69] = 0; - _$jscoverage['middleware/static.js'][72] = 0; - _$jscoverage['middleware/static.js'][73] = 0; - _$jscoverage['middleware/static.js'][74] = 0; - _$jscoverage['middleware/static.js'][77] = 0; - _$jscoverage['middleware/static.js'][94] = 0; -} -_$jscoverage['middleware/static.js'][13]++; -var send = require("send"), utils = require("../utils"), parse = utils.parseUrl, url = require("url"); -_$jscoverage['middleware/static.js'][45]++; -exports = module.exports = (function static(root, options) { - _$jscoverage['middleware/static.js'][46]++; - options = options || {}; - _$jscoverage['middleware/static.js'][49]++; - if (! root) { - _$jscoverage['middleware/static.js'][49]++; - throw new Error("static() root path required"); - } - _$jscoverage['middleware/static.js'][52]++; - var redirect = false !== options.redirect; - _$jscoverage['middleware/static.js'][54]++; - return (function static(req, res, next) { - _$jscoverage['middleware/static.js'][55]++; - if ("GET" != req.method && "HEAD" != req.method) { - _$jscoverage['middleware/static.js'][55]++; - return next(); - } - _$jscoverage['middleware/static.js'][56]++; - var path = parse(req).pathname; - _$jscoverage['middleware/static.js'][57]++; - var pause = utils.pause(req); - _$jscoverage['middleware/static.js'][59]++; - function resume() { - _$jscoverage['middleware/static.js'][60]++; - next(); - _$jscoverage['middleware/static.js'][61]++; - pause.resume(); -} - _$jscoverage['middleware/static.js'][64]++; - function directory() { - _$jscoverage['middleware/static.js'][65]++; - if (! redirect) { - _$jscoverage['middleware/static.js'][65]++; - return resume(); - } - _$jscoverage['middleware/static.js'][66]++; - var pathname = url.parse(req.originalUrl).pathname; - _$jscoverage['middleware/static.js'][67]++; - res.statusCode = 301; - _$jscoverage['middleware/static.js'][68]++; - res.setHeader("Location", pathname + "/"); - _$jscoverage['middleware/static.js'][69]++; - res.end("Redirecting to " + utils.escape(pathname) + "/"); -} - _$jscoverage['middleware/static.js'][72]++; - function error(err) { - _$jscoverage['middleware/static.js'][73]++; - if (404 == err.status) { - _$jscoverage['middleware/static.js'][73]++; - return resume(); - } - _$jscoverage['middleware/static.js'][74]++; - next(err); -} - _$jscoverage['middleware/static.js'][77]++; - send(req, path).maxage(options.maxAge || 0).root(root).hidden(options.hidden).on("error", error).on("directory", directory).pipe(res); -}); -}); -_$jscoverage['middleware/static.js'][94]++; -exports.mime = send.mime; -_$jscoverage['middleware/static.js'].source = ["","/*!"," * Connect - static"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var send = require('send')"," , utils = require('../utils')"," , parse = utils.parseUrl"," , url = require('url');","","/**"," * Static:"," *"," * Static file server with the given `root` path."," *"," * Examples:"," *"," * var oneDay = 86400000;"," *"," * connect()"," * .use(connect.static(__dirname + '/public'))"," *"," * connect()"," * .use(connect.static(__dirname + '/public', { maxAge: oneDay }))"," *"," * Options:"," *"," * - `maxAge` Browser cache maxAge in milliseconds. defaults to 0"," * - `hidden` Allow transfer of hidden files. defaults to false"," * - `redirect` Redirect to trailing \"/\" when the pathname is a dir. defaults to true"," *"," * @param {String} root"," * @param {Object} options"," * @return {Function}"," * @api public"," */","","exports = module.exports = function static(root, options){"," options = options || {};",""," // root required"," if (!root) throw new Error('static() root path required');",""," // default redirect"," var redirect = false !== options.redirect;",""," return function static(req, res, next) {"," if ('GET' != req.method && 'HEAD' != req.method) return next();"," var path = parse(req).pathname;"," var pause = utils.pause(req);",""," function resume() {"," next();"," pause.resume();"," }",""," function directory() {"," if (!redirect) return resume();"," var pathname = url.parse(req.originalUrl).pathname;"," res.statusCode = 301;"," res.setHeader('Location', pathname + '/');"," res.end('Redirecting to ' + utils.escape(pathname) + '/');"," }",""," function error(err) {"," if (404 == err.status) return resume();"," next(err);"," }",""," send(req, path)"," .maxage(options.maxAge || 0)"," .root(root)"," .hidden(options.hidden)"," .on('error', error)"," .on('directory', directory)"," .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;"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/staticCache.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/staticCache.js deleted file mode 100644 index e8c29406..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/staticCache.js +++ /dev/null @@ -1,276 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/staticCache.js']) { - _$jscoverage['middleware/staticCache.js'] = []; - _$jscoverage['middleware/staticCache.js'][12] = 0; - _$jscoverage['middleware/staticCache.js'][51] = 0; - _$jscoverage['middleware/staticCache.js'][52] = 0; - _$jscoverage['middleware/staticCache.js'][56] = 0; - _$jscoverage['middleware/staticCache.js'][57] = 0; - _$jscoverage['middleware/staticCache.js'][59] = 0; - _$jscoverage['middleware/staticCache.js'][60] = 0; - _$jscoverage['middleware/staticCache.js'][68] = 0; - _$jscoverage['middleware/staticCache.js'][69] = 0; - _$jscoverage['middleware/staticCache.js'][75] = 0; - _$jscoverage['middleware/staticCache.js'][78] = 0; - _$jscoverage['middleware/staticCache.js'][81] = 0; - _$jscoverage['middleware/staticCache.js'][84] = 0; - _$jscoverage['middleware/staticCache.js'][88] = 0; - _$jscoverage['middleware/staticCache.js'][91] = 0; - _$jscoverage['middleware/staticCache.js'][94] = 0; - _$jscoverage['middleware/staticCache.js'][95] = 0; - _$jscoverage['middleware/staticCache.js'][96] = 0; - _$jscoverage['middleware/staticCache.js'][97] = 0; - _$jscoverage['middleware/staticCache.js'][99] = 0; - _$jscoverage['middleware/staticCache.js'][104] = 0; - _$jscoverage['middleware/staticCache.js'][107] = 0; - _$jscoverage['middleware/staticCache.js'][110] = 0; - _$jscoverage['middleware/staticCache.js'][111] = 0; - _$jscoverage['middleware/staticCache.js'][115] = 0; - _$jscoverage['middleware/staticCache.js'][116] = 0; - _$jscoverage['middleware/staticCache.js'][117] = 0; - _$jscoverage['middleware/staticCache.js'][118] = 0; - _$jscoverage['middleware/staticCache.js'][119] = 0; - _$jscoverage['middleware/staticCache.js'][120] = 0; - _$jscoverage['middleware/staticCache.js'][124] = 0; - _$jscoverage['middleware/staticCache.js'][125] = 0; - _$jscoverage['middleware/staticCache.js'][126] = 0; - _$jscoverage['middleware/staticCache.js'][127] = 0; - _$jscoverage['middleware/staticCache.js'][128] = 0; - _$jscoverage['middleware/staticCache.js'][129] = 0; - _$jscoverage['middleware/staticCache.js'][131] = 0; - _$jscoverage['middleware/staticCache.js'][132] = 0; - _$jscoverage['middleware/staticCache.js'][135] = 0; - _$jscoverage['middleware/staticCache.js'][151] = 0; - _$jscoverage['middleware/staticCache.js'][152] = 0; - _$jscoverage['middleware/staticCache.js'][156] = 0; - _$jscoverage['middleware/staticCache.js'][158] = 0; - _$jscoverage['middleware/staticCache.js'][160] = 0; - _$jscoverage['middleware/staticCache.js'][161] = 0; - _$jscoverage['middleware/staticCache.js'][162] = 0; - _$jscoverage['middleware/staticCache.js'][164] = 0; - _$jscoverage['middleware/staticCache.js'][165] = 0; - _$jscoverage['middleware/staticCache.js'][166] = 0; - _$jscoverage['middleware/staticCache.js'][167] = 0; - _$jscoverage['middleware/staticCache.js'][169] = 0; - _$jscoverage['middleware/staticCache.js'][171] = 0; - _$jscoverage['middleware/staticCache.js'][172] = 0; - _$jscoverage['middleware/staticCache.js'][173] = 0; - _$jscoverage['middleware/staticCache.js'][174] = 0; - _$jscoverage['middleware/staticCache.js'][175] = 0; - _$jscoverage['middleware/staticCache.js'][178] = 0; - _$jscoverage['middleware/staticCache.js'][181] = 0; - _$jscoverage['middleware/staticCache.js'][183] = 0; - _$jscoverage['middleware/staticCache.js'][186] = 0; - _$jscoverage['middleware/staticCache.js'][187] = 0; - _$jscoverage['middleware/staticCache.js'][200] = 0; - _$jscoverage['middleware/staticCache.js'][201] = 0; - _$jscoverage['middleware/staticCache.js'][206] = 0; - _$jscoverage['middleware/staticCache.js'][208] = 0; - _$jscoverage['middleware/staticCache.js'][210] = 0; - _$jscoverage['middleware/staticCache.js'][212] = 0; - _$jscoverage['middleware/staticCache.js'][214] = 0; - _$jscoverage['middleware/staticCache.js'][216] = 0; - _$jscoverage['middleware/staticCache.js'][229] = 0; - _$jscoverage['middleware/staticCache.js'][230] = 0; -} -_$jscoverage['middleware/staticCache.js'][12]++; -var utils = require("../utils"), Cache = require("../cache"), fresh = require("fresh"); -_$jscoverage['middleware/staticCache.js'][51]++; -module.exports = (function staticCache(options) { - _$jscoverage['middleware/staticCache.js'][52]++; - var options = options || {}, cache = new Cache(options.maxObjects || 128), maxlen = options.maxLength || 262144; - _$jscoverage['middleware/staticCache.js'][56]++; - console.warn("connect.staticCache() is deprecated and will be removed in 3.0"); - _$jscoverage['middleware/staticCache.js'][57]++; - console.warn("use varnish or similar reverse proxy caches."); - _$jscoverage['middleware/staticCache.js'][59]++; - return (function staticCache(req, res, next) { - _$jscoverage['middleware/staticCache.js'][60]++; - var key = cacheKey(req), ranges = req.headers.range, hasCookies = req.headers.cookie, hit = cache.get(key); - _$jscoverage['middleware/staticCache.js'][68]++; - req.on("static", (function (stream) { - _$jscoverage['middleware/staticCache.js'][69]++; - var headers = res._headers, cc = utils.parseCacheControl(headers["cache-control"] || ""), contentLength = headers["content-length"], hit; - _$jscoverage['middleware/staticCache.js'][75]++; - if (headers["set-cookie"]) { - _$jscoverage['middleware/staticCache.js'][75]++; - return hasCookies = true; - } - _$jscoverage['middleware/staticCache.js'][78]++; - if (hasCookies) { - _$jscoverage['middleware/staticCache.js'][78]++; - return; - } - _$jscoverage['middleware/staticCache.js'][81]++; - if (! contentLength || contentLength > maxlen) { - _$jscoverage['middleware/staticCache.js'][81]++; - return; - } - _$jscoverage['middleware/staticCache.js'][84]++; - if (headers["content-range"]) { - _$jscoverage['middleware/staticCache.js'][84]++; - return; - } - _$jscoverage['middleware/staticCache.js'][88]++; - if (cc["no-cache"] || cc["no-store"] || cc["private"] || cc["must-revalidate"]) { - _$jscoverage['middleware/staticCache.js'][91]++; - return; - } - _$jscoverage['middleware/staticCache.js'][94]++; - if (hit = cache.get(key)) { - _$jscoverage['middleware/staticCache.js'][95]++; - if (headers.etag == hit[0].etag) { - _$jscoverage['middleware/staticCache.js'][96]++; - hit[0].date = new Date(); - _$jscoverage['middleware/staticCache.js'][97]++; - return; - } - else { - _$jscoverage['middleware/staticCache.js'][99]++; - cache.remove(key); - } - } - _$jscoverage['middleware/staticCache.js'][104]++; - if (null == stream) { - _$jscoverage['middleware/staticCache.js'][104]++; - return; - } - _$jscoverage['middleware/staticCache.js'][107]++; - var arr = []; - _$jscoverage['middleware/staticCache.js'][110]++; - stream.on("data", (function (chunk) { - _$jscoverage['middleware/staticCache.js'][111]++; - arr.push(chunk); -})); - _$jscoverage['middleware/staticCache.js'][115]++; - stream.on("end", (function () { - _$jscoverage['middleware/staticCache.js'][116]++; - var cacheEntry = cache.add(key); - _$jscoverage['middleware/staticCache.js'][117]++; - delete headers["x-cache"]; - _$jscoverage['middleware/staticCache.js'][118]++; - cacheEntry.push(200); - _$jscoverage['middleware/staticCache.js'][119]++; - cacheEntry.push(headers); - _$jscoverage['middleware/staticCache.js'][120]++; - cacheEntry.push.apply(cacheEntry, arr); -})); -})); - _$jscoverage['middleware/staticCache.js'][124]++; - if (req.method == "GET" || req.method == "HEAD") { - _$jscoverage['middleware/staticCache.js'][125]++; - if (ranges) { - _$jscoverage['middleware/staticCache.js'][126]++; - next(); - } - else { - _$jscoverage['middleware/staticCache.js'][127]++; - if (! hasCookies && hit && ! mustRevalidate(req, hit)) { - _$jscoverage['middleware/staticCache.js'][128]++; - res.setHeader("X-Cache", "HIT"); - _$jscoverage['middleware/staticCache.js'][129]++; - respondFromCache(req, res, hit); - } - else { - _$jscoverage['middleware/staticCache.js'][131]++; - res.setHeader("X-Cache", "MISS"); - _$jscoverage['middleware/staticCache.js'][132]++; - next(); - } - } - } - else { - _$jscoverage['middleware/staticCache.js'][135]++; - next(); - } -}); -}); -_$jscoverage['middleware/staticCache.js'][151]++; -function respondFromCache(req, res, cacheEntry) { - _$jscoverage['middleware/staticCache.js'][152]++; - var status = cacheEntry[0], headers = utils.merge({}, cacheEntry[1]), content = cacheEntry.slice(2); - _$jscoverage['middleware/staticCache.js'][156]++; - headers.age = (new Date() - new Date(headers.date)) / 1000 || 0; - _$jscoverage['middleware/staticCache.js'][158]++; - switch (req.method) { - case "HEAD": - _$jscoverage['middleware/staticCache.js'][160]++; - res.writeHead(status, headers); - _$jscoverage['middleware/staticCache.js'][161]++; - res.end(); - _$jscoverage['middleware/staticCache.js'][162]++; - break; - case "GET": - _$jscoverage['middleware/staticCache.js'][164]++; - if (utils.conditionalGET(req) && fresh(req.headers, headers)) { - _$jscoverage['middleware/staticCache.js'][165]++; - headers["content-length"] = 0; - _$jscoverage['middleware/staticCache.js'][166]++; - res.writeHead(304, headers); - _$jscoverage['middleware/staticCache.js'][167]++; - res.end(); - } - else { - _$jscoverage['middleware/staticCache.js'][169]++; - res.writeHead(status, headers); - _$jscoverage['middleware/staticCache.js'][171]++; - function write() { - _$jscoverage['middleware/staticCache.js'][172]++; - while (content.length) { - _$jscoverage['middleware/staticCache.js'][173]++; - if (false === res.write(content.shift())) { - _$jscoverage['middleware/staticCache.js'][174]++; - res.once("drain", write); - _$jscoverage['middleware/staticCache.js'][175]++; - return; - } -} - _$jscoverage['middleware/staticCache.js'][178]++; - res.end(); -} - _$jscoverage['middleware/staticCache.js'][181]++; - write(); - } - _$jscoverage['middleware/staticCache.js'][183]++; - break; - default: - _$jscoverage['middleware/staticCache.js'][186]++; - res.writeHead(500, ""); - _$jscoverage['middleware/staticCache.js'][187]++; - res.end(); - } -} -_$jscoverage['middleware/staticCache.js'][200]++; -function mustRevalidate(req, cacheEntry) { - _$jscoverage['middleware/staticCache.js'][201]++; - var cacheHeaders = cacheEntry[1], reqCC = utils.parseCacheControl(req.headers["cache-control"] || ""), cacheCC = utils.parseCacheControl(cacheHeaders["cache-control"] || ""), cacheAge = (new Date() - new Date(cacheHeaders.date)) / 1000 || 0; - _$jscoverage['middleware/staticCache.js'][206]++; - if (cacheCC["no-cache"] || cacheCC["must-revalidate"] || cacheCC["proxy-revalidate"]) { - _$jscoverage['middleware/staticCache.js'][208]++; - return true; - } - _$jscoverage['middleware/staticCache.js'][210]++; - if (reqCC["no-cache"]) { - _$jscoverage['middleware/staticCache.js'][210]++; - return true; - } - _$jscoverage['middleware/staticCache.js'][212]++; - if (null != reqCC["max-age"]) { - _$jscoverage['middleware/staticCache.js'][212]++; - return reqCC["max-age"] < cacheAge; - } - _$jscoverage['middleware/staticCache.js'][214]++; - if (null != cacheCC["max-age"]) { - _$jscoverage['middleware/staticCache.js'][214]++; - return cacheCC["max-age"] < cacheAge; - } - _$jscoverage['middleware/staticCache.js'][216]++; - return false; -} -_$jscoverage['middleware/staticCache.js'][229]++; -function cacheKey(req) { - _$jscoverage['middleware/staticCache.js'][230]++; - return utils.parseUrl(req).path; -} -_$jscoverage['middleware/staticCache.js'].source = ["","/*!"," * Connect - staticCache"," * Copyright(c) 2011 Sencha Inc."," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var utils = require('../utils')"," , Cache = require('../cache')"," , fresh = require('fresh');","","/**"," * Static cache:"," *"," * Enables a memory cache layer on top of"," * the `static()` middleware, serving popular"," * static files."," *"," * By default a maximum of 128 objects are"," * held in cache, with a max of 256k each,"," * totalling ~32mb."," *"," * A Least-Recently-Used (LRU) cache algo"," * is implemented through the `Cache` object,"," * simply rotating cache objects as they are"," * hit. This means that increasingly popular"," * objects maintain their positions while"," * others get shoved out of the stack and"," * garbage collected."," *"," * Benchmarks:"," *"," * static(): 2700 rps"," * node-static: 5300 rps"," * static() + staticCache(): 7500 rps"," *"," * Options:"," *"," * - `maxObjects` max cache objects [128]"," * - `maxLength` max cache object length 256kb"," *"," * @param {Object} options"," * @return {Function}"," * @api public"," */","","module.exports = function staticCache(options){"," var options = options || {}"," , cache = new Cache(options.maxObjects || 128)"," , maxlen = options.maxLength || 1024 * 256;",""," console.warn('connect.staticCache() is deprecated and will be removed in 3.0');"," console.warn('use varnish or similar reverse proxy caches.');",""," return function staticCache(req, res, next){"," var key = cacheKey(req)"," , ranges = req.headers.range"," , hasCookies = req.headers.cookie"," , hit = cache.get(key);",""," // cache static"," // TODO: change from staticCache() -> cache()"," // and make this work for any request"," req.on('static', function(stream){"," var headers = res._headers"," , cc = utils.parseCacheControl(headers['cache-control'] || '')"," , contentLength = headers['content-length']"," , hit;",""," // dont cache set-cookie responses"," if (headers['set-cookie']) return hasCookies = true;",""," // dont cache when cookies are present"," if (hasCookies) return;",""," // ignore larger files"," if (!contentLength || contentLength > maxlen) return;",""," // don't cache partial files"," if (headers['content-range']) return;",""," // dont cache items we shouldn't be"," // TODO: real support for must-revalidate / no-cache"," if ( cc['no-cache']"," || cc['no-store']"," || cc['private']"," || cc['must-revalidate']) return;",""," // if already in cache then validate"," if (hit = cache.get(key)){"," if (headers.etag == hit[0].etag) {"," hit[0].date = new Date;"," return;"," } else {"," cache.remove(key);"," }"," }",""," // validation notifiactions don't contain a steam"," if (null == stream) return;",""," // add the cache object"," var arr = [];",""," // store the chunks"," stream.on('data', function(chunk){"," arr.push(chunk);"," });",""," // flag it as complete"," stream.on('end', function(){"," var cacheEntry = cache.add(key);"," delete headers['x-cache']; // Clean up (TODO: others)"," cacheEntry.push(200);"," cacheEntry.push(headers);"," cacheEntry.push.apply(cacheEntry, arr);"," });"," });",""," if (req.method == 'GET' || req.method == 'HEAD') {"," if (ranges) {"," next();"," } else if (!hasCookies && hit && !mustRevalidate(req, hit)) {"," res.setHeader('X-Cache', 'HIT');"," respondFromCache(req, res, hit);"," } else {"," res.setHeader('X-Cache', 'MISS');"," next();"," }"," } else {"," next();"," }"," }","};","","/**"," * Respond with the provided cached value."," * TODO: Assume 200 code, that's iffy."," *"," * @param {Object} req"," * @param {Object} res"," * @param {Object} cacheEntry"," * @return {String}"," * @api private"," */","","function respondFromCache(req, res, cacheEntry) {"," var status = cacheEntry[0]"," , headers = utils.merge({}, cacheEntry[1])"," , content = cacheEntry.slice(2);",""," headers.age = (new Date - new Date(headers.date)) / 1000 || 0;",""," switch (req.method) {"," case 'HEAD':"," res.writeHead(status, headers);"," res.end();"," break;"," case 'GET':"," if (utils.conditionalGET(req) && fresh(req.headers, headers)) {"," headers['content-length'] = 0;"," res.writeHead(304, headers);"," res.end();"," } else {"," res.writeHead(status, headers);",""," function write() {"," while (content.length) {"," if (false === res.write(content.shift())) {"," res.once('drain', write);"," return;"," }"," }"," res.end();"," }",""," write();"," }"," break;"," default:"," // This should never happen."," res.writeHead(500, '');"," res.end();"," }","}","","/**"," * Determine whether or not a cached value must be revalidated."," *"," * @param {Object} req"," * @param {Object} cacheEntry"," * @return {String}"," * @api private"," */","","function mustRevalidate(req, cacheEntry) {"," var cacheHeaders = cacheEntry[1]"," , reqCC = utils.parseCacheControl(req.headers['cache-control'] || '')"," , cacheCC = utils.parseCacheControl(cacheHeaders['cache-control'] || '')"," , cacheAge = (new Date - new Date(cacheHeaders.date)) / 1000 || 0;",""," if ( cacheCC['no-cache']"," || cacheCC['must-revalidate']"," || cacheCC['proxy-revalidate']) return true;",""," if (reqCC['no-cache']) return true;",""," if (null != reqCC['max-age']) return reqCC['max-age'] < cacheAge;",""," if (null != cacheCC['max-age']) return cacheCC['max-age'] < cacheAge;",""," return false;","}","","/**"," * The key to use in the cache. For now, this is the URL path and query."," *"," * 'http://example.com?key=value' -> '/?key=value'"," *"," * @param {Object} req"," * @return {String}"," * @api private"," */","","function cacheKey(req) {"," return utils.parseUrl(req).path;","}"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/timeout.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/timeout.js deleted file mode 100644 index de0e573b..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/timeout.js +++ /dev/null @@ -1,66 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/timeout.js']) { - _$jscoverage['middleware/timeout.js'] = []; - _$jscoverage['middleware/timeout.js'][12] = 0; - _$jscoverage['middleware/timeout.js'][30] = 0; - _$jscoverage['middleware/timeout.js'][31] = 0; - _$jscoverage['middleware/timeout.js'][33] = 0; - _$jscoverage['middleware/timeout.js'][34] = 0; - _$jscoverage['middleware/timeout.js'][35] = 0; - _$jscoverage['middleware/timeout.js'][38] = 0; - _$jscoverage['middleware/timeout.js'][39] = 0; - _$jscoverage['middleware/timeout.js'][40] = 0; - _$jscoverage['middleware/timeout.js'][41] = 0; - _$jscoverage['middleware/timeout.js'][42] = 0; - _$jscoverage['middleware/timeout.js'][43] = 0; - _$jscoverage['middleware/timeout.js'][46] = 0; - _$jscoverage['middleware/timeout.js'][47] = 0; - _$jscoverage['middleware/timeout.js'][50] = 0; - _$jscoverage['middleware/timeout.js'][51] = 0; - _$jscoverage['middleware/timeout.js'][54] = 0; -} -_$jscoverage['middleware/timeout.js'][12]++; -var debug = require("debug")("connect:timeout"); -_$jscoverage['middleware/timeout.js'][30]++; -module.exports = (function timeout(ms) { - _$jscoverage['middleware/timeout.js'][31]++; - ms = ms || 5000; - _$jscoverage['middleware/timeout.js'][33]++; - return (function (req, res, next) { - _$jscoverage['middleware/timeout.js'][34]++; - var id = setTimeout((function () { - _$jscoverage['middleware/timeout.js'][35]++; - req.emit("timeout", ms); -}), ms); - _$jscoverage['middleware/timeout.js'][38]++; - req.on("timeout", (function () { - _$jscoverage['middleware/timeout.js'][39]++; - if (req.headerSent) { - _$jscoverage['middleware/timeout.js'][39]++; - return debug("response started, cannot timeout"); - } - _$jscoverage['middleware/timeout.js'][40]++; - var err = new Error("Request timeout"); - _$jscoverage['middleware/timeout.js'][41]++; - err.timeout = ms; - _$jscoverage['middleware/timeout.js'][42]++; - err.status = 408; - _$jscoverage['middleware/timeout.js'][43]++; - next(err); -})); - _$jscoverage['middleware/timeout.js'][46]++; - req.clearTimeout = (function () { - _$jscoverage['middleware/timeout.js'][47]++; - clearTimeout(id); -}); - _$jscoverage['middleware/timeout.js'][50]++; - res.on("header", (function () { - _$jscoverage['middleware/timeout.js'][51]++; - clearTimeout(id); -})); - _$jscoverage['middleware/timeout.js'][54]++; - next(); -}); -}); -_$jscoverage['middleware/timeout.js'].source = ["","/*!"," * Connect - timeout"," * Ported from https://github.com/LearnBoost/connect-timeout"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var debug = require('debug')('connect:timeout');","","/**"," * Timeout:"," *"," * Times out the request in `ms`, defaulting to `5000`. The"," * method `req.clearTimeout()` is added to revert this behaviour"," * programmatically within your application's middleware, routes, etc."," *"," * The timeout error is passed to `next()` so that you may customize"," * the response behaviour. This error has the `.timeout` property as"," * well as `.status == 408`."," *"," * @param {Number} ms"," * @return {Function}"," * @api public"," */","","module.exports = function timeout(ms) {"," ms = ms || 5000;",""," return function(req, res, next) {"," var id = setTimeout(function(){"," req.emit('timeout', ms);"," }, ms);",""," req.on('timeout', function(){"," if (req.headerSent) return debug('response started, cannot timeout');"," var err = new Error('Request timeout');"," err.timeout = ms;"," err.status = 408;"," next(err);"," });",""," req.clearTimeout = function(){"," clearTimeout(id);"," };",""," res.on('header', function(){"," clearTimeout(id);"," });",""," next();"," };","};"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/urlencoded.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/urlencoded.js deleted file mode 100644 index c8dbcef9..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/urlencoded.js +++ /dev/null @@ -1,98 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/urlencoded.js']) { - _$jscoverage['middleware/urlencoded.js'] = []; - _$jscoverage['middleware/urlencoded.js'][13] = 0; - _$jscoverage['middleware/urlencoded.js'][21] = 0; - _$jscoverage['middleware/urlencoded.js'][22] = 0; - _$jscoverage['middleware/urlencoded.js'][40] = 0; - _$jscoverage['middleware/urlencoded.js'][41] = 0; - _$jscoverage['middleware/urlencoded.js'][43] = 0; - _$jscoverage['middleware/urlencoded.js'][47] = 0; - _$jscoverage['middleware/urlencoded.js'][48] = 0; - _$jscoverage['middleware/urlencoded.js'][49] = 0; - _$jscoverage['middleware/urlencoded.js'][51] = 0; - _$jscoverage['middleware/urlencoded.js'][54] = 0; - _$jscoverage['middleware/urlencoded.js'][57] = 0; - _$jscoverage['middleware/urlencoded.js'][60] = 0; - _$jscoverage['middleware/urlencoded.js'][61] = 0; - _$jscoverage['middleware/urlencoded.js'][62] = 0; - _$jscoverage['middleware/urlencoded.js'][63] = 0; - _$jscoverage['middleware/urlencoded.js'][64] = 0; - _$jscoverage['middleware/urlencoded.js'][65] = 0; - _$jscoverage['middleware/urlencoded.js'][66] = 0; - _$jscoverage['middleware/urlencoded.js'][67] = 0; - _$jscoverage['middleware/urlencoded.js'][70] = 0; - _$jscoverage['middleware/urlencoded.js'][72] = 0; - _$jscoverage['middleware/urlencoded.js'][73] = 0; -} -_$jscoverage['middleware/urlencoded.js'][13]++; -var utils = require("../utils"), _limit = require("./limit"), qs = require("qs"); -_$jscoverage['middleware/urlencoded.js'][21]++; -function noop(req, res, next) { - _$jscoverage['middleware/urlencoded.js'][22]++; - next(); -} -_$jscoverage['middleware/urlencoded.js'][40]++; -exports = module.exports = (function (options) { - _$jscoverage['middleware/urlencoded.js'][41]++; - options = options || {}; - _$jscoverage['middleware/urlencoded.js'][43]++; - var limit = options.limit? _limit(options.limit): noop; - _$jscoverage['middleware/urlencoded.js'][47]++; - return (function urlencoded(req, res, next) { - _$jscoverage['middleware/urlencoded.js'][48]++; - if (req._body) { - _$jscoverage['middleware/urlencoded.js'][48]++; - return next(); - } - _$jscoverage['middleware/urlencoded.js'][49]++; - req.body = req.body || {}; - _$jscoverage['middleware/urlencoded.js'][51]++; - if (! utils.hasBody(req)) { - _$jscoverage['middleware/urlencoded.js'][51]++; - return next(); - } - _$jscoverage['middleware/urlencoded.js'][54]++; - if ("application/x-www-form-urlencoded" != utils.mime(req)) { - _$jscoverage['middleware/urlencoded.js'][54]++; - return next(); - } - _$jscoverage['middleware/urlencoded.js'][57]++; - req._body = true; - _$jscoverage['middleware/urlencoded.js'][60]++; - limit(req, res, (function (err) { - _$jscoverage['middleware/urlencoded.js'][61]++; - if (err) { - _$jscoverage['middleware/urlencoded.js'][61]++; - return next(err); - } - _$jscoverage['middleware/urlencoded.js'][62]++; - var buf = ""; - _$jscoverage['middleware/urlencoded.js'][63]++; - req.setEncoding("utf8"); - _$jscoverage['middleware/urlencoded.js'][64]++; - req.on("data", (function (chunk) { - _$jscoverage['middleware/urlencoded.js'][64]++; - buf += chunk; -})); - _$jscoverage['middleware/urlencoded.js'][65]++; - req.on("end", (function () { - _$jscoverage['middleware/urlencoded.js'][66]++; - try { - _$jscoverage['middleware/urlencoded.js'][67]++; - req.body = buf.length? qs.parse(buf, options): {}; - _$jscoverage['middleware/urlencoded.js'][70]++; - next(); - } - catch (err) { - _$jscoverage['middleware/urlencoded.js'][72]++; - err.body = buf; - _$jscoverage['middleware/urlencoded.js'][73]++; - next(err); - } -})); -})); -}); -}); -_$jscoverage['middleware/urlencoded.js'].source = ["","/*!"," * Connect - urlencoded"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var utils = require('../utils')"," , _limit = require('./limit')"," , qs = require('qs');","","/**"," * noop middleware."," */","","function noop(req, res, next) {"," next();","}","","/**"," * Urlencoded:"," * "," * Parse x-ww-form-urlencoded request bodies,"," * providing the parsed object as `req.body`."," *"," * Options:"," *"," * - `limit` byte limit disabled by default"," *"," * @param {Object} options"," * @return {Function}"," * @api public"," */","","exports = module.exports = function(options){"," options = options || {};",""," var limit = options.limit"," ? _limit(options.limit)"," : noop;",""," return function urlencoded(req, res, next) {"," if (req._body) return next();"," req.body = req.body || {};",""," if (!utils.hasBody(req)) return next();",""," // check Content-Type"," if ('application/x-www-form-urlencoded' != utils.mime(req)) return next();",""," // flag as parsed"," req._body = true;",""," // parse"," limit(req, res, function(err){"," if (err) return next(err);"," var buf = '';"," req.setEncoding('utf8');"," req.on('data', function(chunk){ buf += chunk });"," req.on('end', function(){"," try {"," req.body = buf.length"," ? qs.parse(buf, options)"," : {};"," next();"," } catch (err){"," err.body = buf;"," next(err);"," }"," });"," });"," }","};"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/vhost.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/vhost.js deleted file mode 100644 index b069e5ce..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/middleware/vhost.js +++ /dev/null @@ -1,59 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['middleware/vhost.js']) { - _$jscoverage['middleware/vhost.js'] = []; - _$jscoverage['middleware/vhost.js'][28] = 0; - _$jscoverage['middleware/vhost.js'][29] = 0; - _$jscoverage['middleware/vhost.js'][30] = 0; - _$jscoverage['middleware/vhost.js'][31] = 0; - _$jscoverage['middleware/vhost.js'][32] = 0; - _$jscoverage['middleware/vhost.js'][33] = 0; - _$jscoverage['middleware/vhost.js'][34] = 0; - _$jscoverage['middleware/vhost.js'][35] = 0; - _$jscoverage['middleware/vhost.js'][36] = 0; - _$jscoverage['middleware/vhost.js'][37] = 0; - _$jscoverage['middleware/vhost.js'][38] = 0; -} -_$jscoverage['middleware/vhost.js'][28]++; -module.exports = (function vhost(hostname, server) { - _$jscoverage['middleware/vhost.js'][29]++; - if (! hostname) { - _$jscoverage['middleware/vhost.js'][29]++; - throw new Error("vhost hostname required"); - } - _$jscoverage['middleware/vhost.js'][30]++; - if (! server) { - _$jscoverage['middleware/vhost.js'][30]++; - throw new Error("vhost server required"); - } - _$jscoverage['middleware/vhost.js'][31]++; - var regexp = new RegExp("^" + hostname.replace(/[*]/g, "(.*?)") + "$", "i"); - _$jscoverage['middleware/vhost.js'][32]++; - if (server.onvhost) { - _$jscoverage['middleware/vhost.js'][32]++; - server.onvhost(hostname); - } - _$jscoverage['middleware/vhost.js'][33]++; - return (function vhost(req, res, next) { - _$jscoverage['middleware/vhost.js'][34]++; - if (! req.headers.host) { - _$jscoverage['middleware/vhost.js'][34]++; - return next(); - } - _$jscoverage['middleware/vhost.js'][35]++; - var host = req.headers.host.split(":")[0]; - _$jscoverage['middleware/vhost.js'][36]++; - if (! regexp.test(host)) { - _$jscoverage['middleware/vhost.js'][36]++; - return next(); - } - _$jscoverage['middleware/vhost.js'][37]++; - if ("function" == typeof server) { - _$jscoverage['middleware/vhost.js'][37]++; - return server(req, res, next); - } - _$jscoverage['middleware/vhost.js'][38]++; - server.emit("request", req, res); -}); -}); -_$jscoverage['middleware/vhost.js'].source = ["","/*!"," * Connect - vhost"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Vhost:"," * "," * Setup vhost for the given `hostname` and `server`."," *"," * connect()"," * .use(connect.vhost('foo.com', fooApp))"," * .use(connect.vhost('bar.com', barApp))"," * .use(connect.vhost('*.com', mainApp))"," *"," * The `server` may be a Connect server or"," * a regular Node `http.Server`. "," *"," * @param {String} hostname"," * @param {Server} server"," * @return {Function}"," * @api public"," */","","module.exports = function vhost(hostname, server){"," if (!hostname) throw new Error('vhost hostname required');"," if (!server) throw new Error('vhost server required');"," var regexp = new RegExp('^' + hostname.replace(/[*]/g, '(.*?)') + '$', 'i');"," if (server.onvhost) server.onvhost(hostname);"," return function vhost(req, res, next){"," if (!req.headers.host) return next();"," var host = req.headers.host.split(':')[0];"," if (!regexp.test(host)) return next();"," if ('function' == typeof server) return server(req, res, next);"," server.emit('request', req, res);"," };","};"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/patch.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/patch.js deleted file mode 100644 index 7d596432..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/patch.js +++ /dev/null @@ -1,85 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['patch.js']) { - _$jscoverage['patch.js'] = []; - _$jscoverage['patch.js'][12] = 0; - _$jscoverage['patch.js'][20] = 0; - _$jscoverage['patch.js'][30] = 0; - _$jscoverage['patch.js'][31] = 0; - _$jscoverage['patch.js'][43] = 0; - _$jscoverage['patch.js'][44] = 0; - _$jscoverage['patch.js'][48] = 0; - _$jscoverage['patch.js'][49] = 0; - _$jscoverage['patch.js'][50] = 0; - _$jscoverage['patch.js'][55] = 0; - _$jscoverage['patch.js'][56] = 0; - _$jscoverage['patch.js'][59] = 0; - _$jscoverage['patch.js'][66] = 0; - _$jscoverage['patch.js'][67] = 0; - _$jscoverage['patch.js'][68] = 0; - _$jscoverage['patch.js'][69] = 0; - _$jscoverage['patch.js'][72] = 0; - _$jscoverage['patch.js'][73] = 0; - _$jscoverage['patch.js'][74] = 0; - _$jscoverage['patch.js'][75] = 0; - _$jscoverage['patch.js'][78] = 0; -} -_$jscoverage['patch.js'][12]++; -var http = require("http"), res = http.ServerResponse.prototype, setHeader = res.setHeader, _renderHeaders = res._renderHeaders, writeHead = res.writeHead; -_$jscoverage['patch.js'][20]++; -if (! res._hasConnectPatch) { - _$jscoverage['patch.js'][30]++; - res.__defineGetter__("headerSent", (function () { - _$jscoverage['patch.js'][31]++; - return this._header; -})); - _$jscoverage['patch.js'][43]++; - res.setHeader = (function (field, val) { - _$jscoverage['patch.js'][44]++; - var key = field.toLowerCase(), prev; - _$jscoverage['patch.js'][48]++; - if (this._headers && "set-cookie" == key) { - _$jscoverage['patch.js'][49]++; - if (prev = this.getHeader(field)) { - _$jscoverage['patch.js'][50]++; - val = Array.isArray(prev)? prev.concat(val): [prev, val]; - } - } - else { - _$jscoverage['patch.js'][55]++; - if ("content-type" == key && this.charset) { - _$jscoverage['patch.js'][56]++; - val += "; charset=" + this.charset; - } - } - _$jscoverage['patch.js'][59]++; - return setHeader.call(this, field, val); -}); - _$jscoverage['patch.js'][66]++; - res._renderHeaders = (function () { - _$jscoverage['patch.js'][67]++; - if (! this._emittedHeader) { - _$jscoverage['patch.js'][67]++; - this.emit("header"); - } - _$jscoverage['patch.js'][68]++; - this._emittedHeader = true; - _$jscoverage['patch.js'][69]++; - return _renderHeaders.call(this); -}); - _$jscoverage['patch.js'][72]++; - res.writeHead = (function () { - _$jscoverage['patch.js'][73]++; - if (! this._emittedHeader) { - _$jscoverage['patch.js'][73]++; - this.emit("header"); - } - _$jscoverage['patch.js'][74]++; - this._emittedHeader = true; - _$jscoverage['patch.js'][75]++; - return writeHead.apply(this, arguments); -}); - _$jscoverage['patch.js'][78]++; - res._hasConnectPatch = true; -} -_$jscoverage['patch.js'].source = ["","/*!"," * Connect"," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var http = require('http')"," , res = http.ServerResponse.prototype"," , setHeader = res.setHeader"," , _renderHeaders = res._renderHeaders"," , writeHead = res.writeHead;","","// apply only once","","if (!res._hasConnectPatch) {",""," /**"," * Provide a public \"header sent\" flag"," * until node does."," *"," * @return {Boolean}"," * @api public"," */",""," res.__defineGetter__('headerSent', function(){"," return this._header;"," });",""," /**"," * Set header `field` to `val`, special-casing"," * the `Set-Cookie` field for multiple support."," *"," * @param {String} field"," * @param {String} val"," * @api public"," */",""," res.setHeader = function(field, val){"," var key = field.toLowerCase()"," , prev;",""," // special-case Set-Cookie"," if (this._headers && 'set-cookie' == key) {"," if (prev = this.getHeader(field)) {"," val = Array.isArray(prev)"," ? prev.concat(val)"," : [prev, val];"," }"," // charset"," } else if ('content-type' == key && this.charset) {"," val += '; charset=' + this.charset;"," }",""," return setHeader.call(this, field, val);"," };",""," /**"," * Proxy to emit \"header\" event."," */",""," res._renderHeaders = function(){"," if (!this._emittedHeader) this.emit('header');"," this._emittedHeader = true;"," return _renderHeaders.call(this);"," };",""," res.writeHead = function(){"," if (!this._emittedHeader) this.emit('header');"," this._emittedHeader = true;"," return writeHead.apply(this, arguments);"," };",""," res._hasConnectPatch = true;","}"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/proto.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/proto.js deleted file mode 100644 index e8ecb993..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/proto.js +++ /dev/null @@ -1,285 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['proto.js']) { - _$jscoverage['proto.js'] = []; - _$jscoverage['proto.js'][13] = 0; - _$jscoverage['proto.js'][19] = 0; - _$jscoverage['proto.js'][23] = 0; - _$jscoverage['proto.js'][62] = 0; - _$jscoverage['proto.js'][64] = 0; - _$jscoverage['proto.js'][65] = 0; - _$jscoverage['proto.js'][66] = 0; - _$jscoverage['proto.js'][70] = 0; - _$jscoverage['proto.js'][71] = 0; - _$jscoverage['proto.js'][72] = 0; - _$jscoverage['proto.js'][73] = 0; - _$jscoverage['proto.js'][74] = 0; - _$jscoverage['proto.js'][79] = 0; - _$jscoverage['proto.js'][80] = 0; - _$jscoverage['proto.js'][84] = 0; - _$jscoverage['proto.js'][85] = 0; - _$jscoverage['proto.js'][89] = 0; - _$jscoverage['proto.js'][90] = 0; - _$jscoverage['proto.js'][92] = 0; - _$jscoverage['proto.js'][102] = 0; - _$jscoverage['proto.js'][103] = 0; - _$jscoverage['proto.js'][109] = 0; - _$jscoverage['proto.js'][110] = 0; - _$jscoverage['proto.js'][112] = 0; - _$jscoverage['proto.js'][113] = 0; - _$jscoverage['proto.js'][114] = 0; - _$jscoverage['proto.js'][117] = 0; - _$jscoverage['proto.js'][118] = 0; - _$jscoverage['proto.js'][119] = 0; - _$jscoverage['proto.js'][122] = 0; - _$jscoverage['proto.js'][125] = 0; - _$jscoverage['proto.js'][127] = 0; - _$jscoverage['proto.js'][130] = 0; - _$jscoverage['proto.js'][132] = 0; - _$jscoverage['proto.js'][133] = 0; - _$jscoverage['proto.js'][136] = 0; - _$jscoverage['proto.js'][139] = 0; - _$jscoverage['proto.js'][144] = 0; - _$jscoverage['proto.js'][145] = 0; - _$jscoverage['proto.js'][146] = 0; - _$jscoverage['proto.js'][147] = 0; - _$jscoverage['proto.js'][148] = 0; - _$jscoverage['proto.js'][149] = 0; - _$jscoverage['proto.js'][151] = 0; - _$jscoverage['proto.js'][152] = 0; - _$jscoverage['proto.js'][153] = 0; - _$jscoverage['proto.js'][154] = 0; - _$jscoverage['proto.js'][155] = 0; - _$jscoverage['proto.js'][157] = 0; - _$jscoverage['proto.js'][160] = 0; - _$jscoverage['proto.js'][161] = 0; - _$jscoverage['proto.js'][162] = 0; - _$jscoverage['proto.js'][165] = 0; - _$jscoverage['proto.js'][167] = 0; - _$jscoverage['proto.js'][168] = 0; - _$jscoverage['proto.js'][172] = 0; - _$jscoverage['proto.js'][173] = 0; - _$jscoverage['proto.js'][176] = 0; - _$jscoverage['proto.js'][177] = 0; - _$jscoverage['proto.js'][178] = 0; - _$jscoverage['proto.js'][181] = 0; - _$jscoverage['proto.js'][182] = 0; - _$jscoverage['proto.js'][183] = 0; - _$jscoverage['proto.js'][184] = 0; - _$jscoverage['proto.js'][185] = 0; - _$jscoverage['proto.js'][187] = 0; - _$jscoverage['proto.js'][189] = 0; - _$jscoverage['proto.js'][190] = 0; - _$jscoverage['proto.js'][192] = 0; - _$jscoverage['proto.js'][195] = 0; - _$jscoverage['proto.js'][198] = 0; - _$jscoverage['proto.js'][227] = 0; - _$jscoverage['proto.js'][228] = 0; - _$jscoverage['proto.js'][229] = 0; -} -_$jscoverage['proto.js'][13]++; -var http = require("http"), utils = require("./utils"), debug = require("debug")("connect:dispatcher"); -_$jscoverage['proto.js'][19]++; -var app = module.exports = {}; -_$jscoverage['proto.js'][23]++; -var env = process.env.NODE_ENV || "development"; -_$jscoverage['proto.js'][62]++; -app.use = (function (route, fn) { - _$jscoverage['proto.js'][64]++; - if ("string" != typeof route) { - _$jscoverage['proto.js'][65]++; - fn = route; - _$jscoverage['proto.js'][66]++; - route = "/"; - } - _$jscoverage['proto.js'][70]++; - if ("function" == typeof fn.handle) { - _$jscoverage['proto.js'][71]++; - var server = fn; - _$jscoverage['proto.js'][72]++; - fn.route = route; - _$jscoverage['proto.js'][73]++; - fn = (function (req, res, next) { - _$jscoverage['proto.js'][74]++; - server.handle(req, res, next); -}); - } - _$jscoverage['proto.js'][79]++; - if (fn instanceof http.Server) { - _$jscoverage['proto.js'][80]++; - fn = fn.listeners("request")[0]; - } - _$jscoverage['proto.js'][84]++; - if ("/" == route[route.length - 1]) { - _$jscoverage['proto.js'][85]++; - route = route.slice(0, -1); - } - _$jscoverage['proto.js'][89]++; - debug("use %s %s", route || "/", fn.name || "anonymous"); - _$jscoverage['proto.js'][90]++; - this.stack.push({route: route, handle: fn}); - _$jscoverage['proto.js'][92]++; - return this; -}); -_$jscoverage['proto.js'][102]++; -app.handle = (function (req, res, out) { - _$jscoverage['proto.js'][103]++; - var stack = this.stack, fqdn = ~ req.url.indexOf("://"), removed = "", slashAdded = false, index = 0; - _$jscoverage['proto.js'][109]++; - function next(err) { - _$jscoverage['proto.js'][110]++; - var layer, path, status, c; - _$jscoverage['proto.js'][112]++; - if (slashAdded) { - _$jscoverage['proto.js'][113]++; - req.url = req.url.substr(1); - _$jscoverage['proto.js'][114]++; - slashAdded = false; - } - _$jscoverage['proto.js'][117]++; - req.url = removed + req.url; - _$jscoverage['proto.js'][118]++; - req.originalUrl = req.originalUrl || req.url; - _$jscoverage['proto.js'][119]++; - removed = ""; - _$jscoverage['proto.js'][122]++; - layer = stack[index++]; - _$jscoverage['proto.js'][125]++; - if (! layer || res.headerSent) { - _$jscoverage['proto.js'][127]++; - if (out) { - _$jscoverage['proto.js'][127]++; - return out(err); - } - _$jscoverage['proto.js'][130]++; - if (err) { - _$jscoverage['proto.js'][132]++; - if (res.statusCode < 400) { - _$jscoverage['proto.js'][132]++; - res.statusCode = 500; - } - _$jscoverage['proto.js'][133]++; - debug("default %s", res.statusCode); - _$jscoverage['proto.js'][136]++; - if (err.status) { - _$jscoverage['proto.js'][136]++; - res.statusCode = err.status; - } - _$jscoverage['proto.js'][139]++; - var msg = "production" == env? http.STATUS_CODES[res.statusCode]: err.stack || err.toString(); - _$jscoverage['proto.js'][144]++; - if ("test" != env) { - _$jscoverage['proto.js'][144]++; - console.error(err.stack || err.toString()); - } - _$jscoverage['proto.js'][145]++; - if (res.headerSent) { - _$jscoverage['proto.js'][145]++; - return req.socket.destroy(); - } - _$jscoverage['proto.js'][146]++; - res.setHeader("Content-Type", "text/plain"); - _$jscoverage['proto.js'][147]++; - res.setHeader("Content-Length", Buffer.byteLength(msg)); - _$jscoverage['proto.js'][148]++; - if ("HEAD" == req.method) { - _$jscoverage['proto.js'][148]++; - return res.end(); - } - _$jscoverage['proto.js'][149]++; - res.end(msg); - } - else { - _$jscoverage['proto.js'][151]++; - debug("default 404"); - _$jscoverage['proto.js'][152]++; - res.statusCode = 404; - _$jscoverage['proto.js'][153]++; - res.setHeader("Content-Type", "text/plain"); - _$jscoverage['proto.js'][154]++; - if ("HEAD" == req.method) { - _$jscoverage['proto.js'][154]++; - return res.end(); - } - _$jscoverage['proto.js'][155]++; - res.end("Cannot " + req.method + " " + utils.escape(req.originalUrl)); - } - _$jscoverage['proto.js'][157]++; - return; - } - _$jscoverage['proto.js'][160]++; - try { - _$jscoverage['proto.js'][161]++; - path = utils.parseUrl(req).pathname; - _$jscoverage['proto.js'][162]++; - if (undefined == path) { - _$jscoverage['proto.js'][162]++; - path = "/"; - } - _$jscoverage['proto.js'][165]++; - if (0 != path.toLowerCase().indexOf(layer.route.toLowerCase())) { - _$jscoverage['proto.js'][165]++; - return next(err); - } - _$jscoverage['proto.js'][167]++; - c = path[layer.route.length]; - _$jscoverage['proto.js'][168]++; - if (c && "/" != c && "." != c) { - _$jscoverage['proto.js'][168]++; - return next(err); - } - _$jscoverage['proto.js'][172]++; - removed = layer.route; - _$jscoverage['proto.js'][173]++; - req.url = req.url.substr(removed.length); - _$jscoverage['proto.js'][176]++; - if (! fqdn && "/" != req.url[0]) { - _$jscoverage['proto.js'][177]++; - req.url = "/" + req.url; - _$jscoverage['proto.js'][178]++; - slashAdded = true; - } - _$jscoverage['proto.js'][181]++; - debug("%s", layer.handle.name || "anonymous"); - _$jscoverage['proto.js'][182]++; - var arity = layer.handle.length; - _$jscoverage['proto.js'][183]++; - if (err) { - _$jscoverage['proto.js'][184]++; - if (arity === 4) { - _$jscoverage['proto.js'][185]++; - layer.handle(err, req, res, next); - } - else { - _$jscoverage['proto.js'][187]++; - next(err); - } - } - else { - _$jscoverage['proto.js'][189]++; - if (arity < 4) { - _$jscoverage['proto.js'][190]++; - layer.handle(req, res, next); - } - else { - _$jscoverage['proto.js'][192]++; - next(); - } - } - } - catch (e) { - _$jscoverage['proto.js'][195]++; - next(e); - } -} - _$jscoverage['proto.js'][198]++; - next(); -}); -_$jscoverage['proto.js'][227]++; -app.listen = (function () { - _$jscoverage['proto.js'][228]++; - var server = http.createServer(this); - _$jscoverage['proto.js'][229]++; - return server.listen.apply(server, arguments); -}); -_$jscoverage['proto.js'].source = ["","/*!"," * Connect - HTTPServer"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var http = require('http')"," , utils = require('./utils')"," , debug = require('debug')('connect:dispatcher');","","// prototype","","var app = module.exports = {};","","// environment","","var env = process.env.NODE_ENV || 'development';","","/**"," * Utilize the given middleware `handle` to the given `route`,"," * defaulting to _/_. This \"route\" is the mount-point for the"," * middleware, when given a value other than _/_ the middleware"," * is only effective when that segment is present in the request's"," * pathname."," *"," * For example if we were to mount a function at _/admin_, it would"," * be invoked on _/admin_, and _/admin/settings_, however it would"," * not be invoked for _/_, or _/posts_."," *"," * Examples:"," *"," * var app = connect();"," * app.use(connect.favicon());"," * app.use(connect.logger());"," * app.use(connect.static(__dirname + '/public'));"," *"," * If we wanted to prefix static files with _/public_, we could"," * \"mount\" the `static()` middleware:"," *"," * app.use('/public', connect.static(__dirname + '/public'));"," *"," * This api is chainable, so the following is valid:"," *"," * connect()"," * .use(connect.favicon())"," * .use(connect.logger())"," * .use(connect.static(__dirname + '/public'))"," * .listen(3000);"," *"," * @param {String|Function|Server} route, callback or server"," * @param {Function|Server} callback or server"," * @return {Server} for chaining"," * @api public"," */","","app.use = function(route, fn){"," // default route to '/'"," if ('string' != typeof route) {"," fn = route;"," route = '/';"," }",""," // wrap sub-apps"," if ('function' == typeof fn.handle) {"," var server = fn;"," fn.route = route;"," fn = function(req, res, next){"," server.handle(req, res, next);"," };"," }",""," // wrap vanilla http.Servers"," if (fn instanceof http.Server) {"," fn = fn.listeners('request')[0];"," }",""," // strip trailing slash"," if ('/' == route[route.length - 1]) {"," route = route.slice(0, -1);"," }",""," // add the middleware"," debug('use %s %s', route || '/', fn.name || 'anonymous');"," this.stack.push({ route: route, handle: fn });",""," return this;","};","","/**"," * Handle server requests, punting them down"," * the middleware stack."," *"," * @api private"," */","","app.handle = function(req, res, out) {"," var stack = this.stack"," , fqdn = ~req.url.indexOf('://')"," , removed = ''"," , slashAdded = false"," , index = 0;",""," function next(err) {"," var layer, path, status, c;",""," if (slashAdded) {"," req.url = req.url.substr(1);"," slashAdded = false;"," }",""," req.url = removed + req.url;"," req.originalUrl = req.originalUrl || req.url;"," removed = '';",""," // next callback"," layer = stack[index++];",""," // all done"," if (!layer || res.headerSent) {"," // delegate to parent"," if (out) return out(err);",""," // unhandled error"," if (err) {"," // default to 500"," if (res.statusCode < 400) res.statusCode = 500;"," debug('default %s', res.statusCode);",""," // respect err.status"," if (err.status) res.statusCode = err.status;",""," // production gets a basic error message"," var msg = 'production' == env"," ? http.STATUS_CODES[res.statusCode]"," : err.stack || err.toString();",""," // log to stderr in a non-test env"," if ('test' != env) console.error(err.stack || err.toString());"," if (res.headerSent) return req.socket.destroy();"," res.setHeader('Content-Type', 'text/plain');"," res.setHeader('Content-Length', Buffer.byteLength(msg));"," if ('HEAD' == req.method) return res.end();"," res.end(msg);"," } else {"," debug('default 404');"," res.statusCode = 404;"," res.setHeader('Content-Type', 'text/plain');"," if ('HEAD' == req.method) return res.end();"," res.end('Cannot ' + req.method + ' ' + utils.escape(req.originalUrl));"," }"," return;"," }",""," try {"," path = utils.parseUrl(req).pathname;"," if (undefined == path) path = '/';",""," // skip this layer if the route doesn't match."," if (0 != path.toLowerCase().indexOf(layer.route.toLowerCase())) return next(err);",""," c = path[layer.route.length];"," if (c && '/' != c && '.' != c) return next(err);",""," // Call the layer handler"," // Trim off the part of the url that matches the route"," removed = layer.route;"," req.url = req.url.substr(removed.length);",""," // Ensure leading slash"," if (!fqdn && '/' != req.url[0]) {"," req.url = '/' + req.url;"," slashAdded = true;"," }",""," debug('%s', layer.handle.name || 'anonymous');"," var arity = layer.handle.length;"," if (err) {"," if (arity === 4) {"," layer.handle(err, req, res, next);"," } else {"," next(err);"," }"," } else if (arity < 4) {"," layer.handle(req, res, next);"," } else {"," next();"," }"," } catch (e) {"," next(e);"," }"," }"," next();","};","","/**"," * Listen for connections."," *"," * This method takes the same arguments"," * as node's `http.Server#listen()`. "," *"," * HTTP and HTTPS:"," *"," * If you run your application both as HTTP"," * and HTTPS you may wrap them individually,"," * since your Connect \"server\" is really just"," * a JavaScript `Function`."," *"," * var connect = require('connect')"," * , http = require('http')"," * , https = require('https');"," * "," * var app = connect();"," * "," * http.createServer(app).listen(80);"," * https.createServer(options, app).listen(443);"," *"," * @return {http.Server}"," * @api public"," */","","app.listen = function(){"," var server = http.createServer(this);"," return server.listen.apply(server, arguments);","};"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/directory.html b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/directory.html deleted file mode 100644 index 15164bba..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/directory.html +++ /dev/null @@ -1,75 +0,0 @@ - - - listing directory {directory} - - - - - -
    -

    {linked-path}

    - {files} -
    - - \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/error.html b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/error.html deleted file mode 100644 index c5ae73a0..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/error.html +++ /dev/null @@ -1,13 +0,0 @@ - - - {error} - - - -
    -

    {title}

    -

    {statusCode} {error}

    -
      {stack}
    -
    - - diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/favicon.ico b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/favicon.ico deleted file mode 100644 index 895fc96a76b68b4924f1c51d022e1b82fa0f461f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1406 zcmZQzU<5(|0R}M0U}azs1F|%L7$l?s#Ec9aKoZP=&}i&OouUjIY8@C}uZw4x5z5N2 zvEG^C^vXtt_xtJ?p3O32c(KTx;lsgZhW%5M85Sf}k-mf`L80)|7ga~M{a znlL=>m1Q`#uoPkbC~GtXMnhnDh5$DU1D6mx+;2QAKt3ZQFH}H~1y~00GcqzVg9QXw z_<%(a7y$V|wJgF=E>MgE#Aid|14}IyCM5MhEnxFF;pTzOK(>#80puP=gnOXwAd33` mpMe2}f66m3eB@_fcnmb^7!b1nO#opK8zcsj1F30)+jEP);68^d)m`eN0o>(5%D`Q(1;j>g@G;xlf`0VBQ`PFY?6)!N&f?*K}$p; zB!U=NBn{eB8${1}&-2_L*HuZp@ZP1@clS@cHp)4iM1ewzw59vko7eMM{e9z|%NNdX z0V;`?KKSzTCvTm5bc{L^CIKLUxc2X{i{ISz$8Sgf{q)1nXTP{`{s?9mQ$4&hPiKC- zY8q7(Y1Xu5iCf33=O4Vy(+|zQ?rW#gkKB0f%}?+6{G*qT22|DQB-73`YzA{N4W^=s zq0kQYcbtFfz zLz)H<&|z(Y4kBG67=JY6c|L1R-#TR>fC$3^Y%QEnYO1xHsf)+GU`3F<{J0kR(;pbF3)zyg$H+idfnl-wl5Wkh!vUH z4Z32YP=l_}1rZd1W_D&^$A($A+&a0e&P?xx0!ctY2}*<#p+qPVN*B(YzvAWXa*%bzq z7Fz41LKILT(GWohi9|LgIzSZBhb*Zf6R6O}WYQ4GOi&71s9lmll0x6;8&ILOl$j(c z0Z1T(6Tg09{?wd{moFHNN6PS?$|e>1MxSJ(0Z7o2)J-Zv|>acY@f`(Y@g7GwsEj5NLQo+q|HsxQ5}XSX_d@*^A9ZT9=A{W~j+$GyI1 zc4oqTHx@1FlRjw4XWyPN5i2~l_F3@aBk!0yu^aoRDvXy}8@HCjUVQUsuSH4$T5|r< zzZOn^?Wfa6y|Q($Hx4{ws+)wX6-HP4zo!S?4KJ@7PG@G3G{CjXs(p*kIrj6rHs7_y z+=<-=Q62s9FuWa^X~WKgJIAAZJR&XBB002ovPDHLkV1jCMPILeO diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_attach.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_attach.png deleted file mode 100644 index 89ee2da0753040d1ba0a3487473a715a8fe89322..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 794 zcmV+#1LgdQP)i_t#ewV_0K6;=bl;e_Jt7$~$sQ)q$+ia<4Ec+jeaGt9oWH@O|2`W6&O0t!k{B9sUvLWxkCaPsd9W(`fa z;j-|^ZI^2XnzhgZWYRW-kP&J>DWPo`%;JaBX}or79k=+Jo@h%4Eo72tqev+cB?PjP zO<|ByL#>Tehyq$jR74O$B9WDW1`tK`LzYyL3A9iAcRxLkJ`I)n}v%Od-3H>j$OTBtk>(k-9o?8PqI=0 zB&f-+KOXVnjyKJlf4iHOtnuiE_4+ZVJ$dHjU<^o^YCjQ-wt^!;rPpBv(@pFO{9rdw98 z_s@3+yta93oyfL>7AD5}r=|`zS3Gm$_|(iSl8XBd9k%=91J0j2=ivT5cJ18ZmDjh{ z$-RMd{jQ#X79#Sc diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_code.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_code.png deleted file mode 100644 index f7ea90419d950f9e69d977a1f5847456d96a5f0b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 818 zcmV-21I_%2P)@LCln44|RX7Ti z0HI3&7jPq){odH{?_{%nYVq_;n_c4WbUpvU(&Cvnj!vq|kVC-vpF6vp^;;e0mm6HW z+WPzA`AZ|;pPp$&dNjzrc??4rt`k%Q1l*u-BPD0MQ}Fbm8jnsyezNt7+u{23>t7Em zJtETY?ja9KrVs^!LJ$xEMF3-bAZO;-IQJavE60KA7fO$VY_%N)R6s>g5mW>fL4&aR z*EVgKKTBXm!=L?S0?xM zYqL@C$|EDF2q*3zWW7;PDZ}SK*IE8;i!3U62=qn80C&*I1Le7WwNP5EcX;_oh2dJn zf#HgBe4@r$GcjHjmj2vAfT%(YN?}kK=(*+1*DkNNc1H5R++vfBMhACi<5uFUU+N4+ z<&U*CPmWi}REa7C6-t>2im1CWv5Jkefxa6>)dEj-CAW wWa{_}BJ!}~75?MkfaCnj>Dn=~vkLS70Pk`;z)@TQj{pDw07*qoM6N<$f@imYHUIzs diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_copy.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_copy.png deleted file mode 100644 index 195dc6d6c365d298e466026b37c1959d96119ea7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 663 zcmV;I0%-k-P)^@R5;6Z z(>-WZK@^7J_sq=QY_e{46@P+~LNG}sRzZsxQHvCsN*h5ir6^j7pq-$xu$N#V1gx}9 zClV7;5)7zih-s3DB)G=7|99>ji@So7-P24n=VQ(@GctDX!^_@$bj%oviY6e4Dh;od zooe%Wvs8LEKQ&&bL&@bwi=STIAI@!-gB2jC5+?y?VR~VkrNxam-`6*8&po|RZ5LpS zNKdJ%c4bTX`XjKsnecf%W>1%6WT?pKNdLLq{=(f(Col?P1+oq@R>)W(n=x!|*BIIh z6DJGw_w`)u6yN|vAhMteYK5#b%r5^v+VCFl1IGssaclZZMS{vs-LJ2$)n7DAr6==K z<29#%AXsBsDoO}SBaXR#_Ap!JKx)(1)3O2pj0_dYWz5By*X74fRT01$Fk%P_RzOMDtV?GU{nsYq#K8iy zb6qzLYDj`_f5$BwC*WE(t0m#xYJ*=jC2|HQYHh=pf#QG7oowi`h!L!{DB$8|qY{~X zu8@sU1tWq;n$XThR0%;45mdqXM892|{CJ@0DS*}>?ami06Q_^tvM~Y3K(_-`#m!8f z8f!QIrH4y#61;0Ym0cCoLl8{IPombPHtnn7%SbTdI&G-d>ZQo!_wBMF9nzX!g8HVY xYTJPGciz9XMh3w2fmZ(7v{)r*QZD48?mrio{~IaoqP z|1Ep}yDQG09bP~E^Dk?@JiKQJ z6-pO(3~IOP)IYisL6D6;oAEd;E%zR}{U$rMRNuD6nQV7nesKS>)yLo7JuDCrD>Abi zbj3uW23?^GA}9jQ{M^8v?ejL?HaT7AX5WPZNkBmfN`w-jL?{tT7ykZt$%Yln?p_m~ z-?>&d(LD(jAd}h=LPltPQbO$*Wbyl@G-_k5jXbb#qffHY03>M1jfEqoPJQ6Mr=Byp=^jfzePZV1 zLjCmNi31hdIJHa%e;5g=1(`u3BRzfeExY%=VCu{loOr{`%2hUR*x>tL^W_TTaj);0 zpPR6CUD1+0>4TQ6zVfH3TQ;%l6#(_%yspK@3gcmG#Q4!WCPyLU93nMKk7E2pcA=l45({2jNho>sdF*A~bA zxX?-cp~y_z_kFf+yqu3m#QiB}03?Z&9vvR5TNgj<)($Vm)xq5G>|o2sFMag&6aNF+ WAT1?sQBYt20000iHtsh1EzPArg^Q zIZrOk#rNsfjaSbMAL;<4h;Z=jvu8dzyz8N&Nb7=z03ZUw?9z%8KQEa6yM5=kUnka& z3?FJk2}L7q>na=T#;<7U*P91xfF`;`6%pVgWgRy0?1ZryL@%z52=-!fGXWGEn4M351L4<+7eDgwo|moqXT+s1&Kmn>-uQQ8mL7XY)w5Zk*(g+<3Y3tmkR!bL zOUKaUtj_pX26sH+=Iorwu}MGd`_%O-_sS}8VpG#fJA)Fcs#ezwtZf?q?Ac70mDv`rVs{$od?VPKeqf<-kUjNtS6ecB*mq<&M97K^6IVsDO zt2$Ru!b+>2S<}_H>$RcInusU_8PMNdf(W{sNlJ3FkrwMJPeBPO#d}Y^a{9TH(#{Y) l0D?dWAV4eUJX#h`!2gmISk&ZKd4B)^002ovPDHLkV1g&sd|Lnj diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_error.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_error.png deleted file mode 100644 index f07f449a44ff2761bfc7b752db3d08d0e1238b02..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 793 zcmV+!1LpjRP)lHwhvrAu0-@MQwt}+5~MQTtu}C0%;W( z1<{R?aHBz*g;pk%AyQVBR_Zu5m~;ES_vxI-O!vIF|H*|T{l`n#garr?$RMk>)?Y48 z(ZF2yTneKb};DNWF+jK)IF`6_IfJ{i|F3o%Q+l&4_HGBD|ACE8na_6>L z=s{^>-C(a7J$6=8A_%h5W!1K6dcL!D?XX+Ndk)oei?UundDpX_E&1Y&`)3P8#Ny0s z2Ag7_&ZPhyGj%)g&S6V2LNun1;iBQm#Fwlfv zgyESZR$X}2P;=RW!2zid1r$hBL{K7>2qi*f7>pT1=RdT3@-anEoH{ z={KFOO;Dh#bV*jaN>}M>RZqQd`S=6O9C3KpI~I>l%QFYfo;jqQYe5fcn`)+)zMm6P z4X&L(>gnN0!%J4^rhX->?$S5bY<=GEU%jc!KLL8sww-Eg;h z`H-yBHa)yfojYT}&G*GFc$<(Yja_q=lZvj66DC^O5%$B)|Z(CeD=n`|eM04SP; z>-=-l+xdJjA~vR6^xB#o{ehf~tSM`iwaQv$O<8NIHA}W_WOw*~ XD^gE}t;YAo00000NkvXXu0mjfl6ZQ> diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_excel.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_excel.png deleted file mode 100644 index eb6158eb5ca9c4b64c81e70e0fd894dbc8e2bed9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 817 zcmV-11J3-3P)hdKqhFO_H1|Vn1E?(=|cjAh_&P}y{{^`u< zcYD@PK?$)4i~7o9*6F_$F$4lR(d4AAvrez^(88Hk+)+B7E)M3jc=Ewl4$S^`_qwSF zA%qz@=c2EOsz@0qB1IqsqJU)HaG&+}%`-OM8YqW{K85hqj@4&V9vz!Cm_n0-W#f;# zeEpJde%vdgRn5?(+PY=W*z~|lT2-mtown({ll8&3S5+lWz5K}LTRW{k{eJn3Qz!SU zQ`@qI_n2;K?RG~pYJ9=dj-RWgG;P&wEuoAxL~Q)<>x0b=dED^Outj&xQ^rA;u3pw| zca_ClTh_d9cxXg_U!lLRl0`xU@$=UXO|_dRdtXfKwPawmnf(LC7u}-U>8k6}3u|{8 zs9LHr>MIJZGD^r9h|q2yF24Wuh+PM^yMN9GP1$khlDkdyCY}D{kg}jEf-(kW5jBY> z0rB29ZhG-r=i_R{;+1k0?A-sBM;AP6(k1i9ZuixR4?MqXOvphQgCYj~RnXKKL~J9Q zIDNz~XMfO{ZhUg&BTtMyXJqDVqc<x643?SvKHx004lTvR=0a5$dUw z>Xb470000$S;ka1sfH4I-R8njUol7M4dtApOahDylptpYswf1hD#CwFoz6oEA>(SIECU&IQ%a}GXdnC!9$70`0uH1B00000NkvXXu0mjf!8w72 diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_find.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_find.png deleted file mode 100644 index 2f193889f7ea091c292acdd684c595dcb206b5c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 879 zcmV-#1CacQP)@+1&aazfGU7ezSm^v zpACwO+tu0su66!(dT=`e05DeeCnCFJW(8|RKtKa{4LGONnx2V85A4m%PEQ?MEtR-esdM$pB-`H542D0)N2zSC6Imf)4L8?>%ZrW+H>xCKi$unm zvGZq-*Q%Aahx;C*=l+K%-?>XB)6TB$-L$r*`RUvlA`xP1NG2?)ge8@TQ4EN|Jks0u zcDg;oFC#-#R`YbWB`D?Q`1#y7l$LXhjSLf8AvQuB84}i#j0^!#g{VE#(K7h@5pFHy zSenl=@XBEdxp`h2Ji>CR%=qXJ7!e|?paKet-~;#ok#jETyeB(5&Bkhp;!+;51~G=) zH?L7xmDUu_h+a$+xuWom;AWW!mS$%%+436Rjc@}y?l1134kgD0AOf$OmjOR zstUlshZk$ZC!bAyIg{Y29z#&@3SJ;6D4+_eFume9^#TmMccC5u0J!ZCTnO6m$lnD| z5JeFHf`Xs~1vP>RLKI1GKDY<~pjr2&bi(fX;6Nj-ss@Ds0CcoO0H{JsEQkm{q03skAA);_bv3q{k31qwVo&s-q`Z?_e+j^w(WL? zl+uETs5+~xBU2};OqEE9ETLGwsMGe1%iTRNue)9}|0~E4B*@5#oRXZ9oRXZ9TqRep zPrGZuoOON4n@=uPbyP1y4G=+HktC6l(gZoFD>@_lXDrN?wo+zozGt3P=Qh+3L7+}q z2!WK7geXLnO3Vw;o12Skp%_E#+N#9;DDWP?Q-VS3B$v~Ha)dDzWn0zG~O(^_1!n0HYp-( z+;wPIdoFgQlpYV!10V>5@a)1LyGBMvoa}miyp(bxbMTM-FYNyx;V@TfYddyT00000 LNkvXXu0mjf90!wr diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_go.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_go.png deleted file mode 100644 index 80fe1ed0cc75fbb67e9398ae686641f8fb287238..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 779 zcmV+m1N8ifP)JNR2Ufr z!Apo%Wf%b9=l#x^8AolrB&K9H?Pg_|78WA8(M3toqE%3B#7*srcF`i*xhupr27%Nr ziguah1+mN)U5GNmyEfQ3-e%_i&-vb-Co#(>FJ+EhQEwjRYVQ(&UYy{U@%vbY||>@4x=B^vIqabI?L* z;-S&DS^V3-ni4^fl|HMkOEbgX)(390>A}|VIypb5Xee4g;7ck zwKh^A3Mi1Mh@eC$5lV!}Fw%sP623U`g3pd_Hr5sunLvTskx4}&Gm%Q6L}(l4x}jCe z*81q1_4-O*ffi~_nMslo?EQ8t*&Ec(pzEw$vc}pKn_Qp0>D7Jr>ATNC3w@9f|Y+U&+)#!t7l&wKp+nP{PQsb+fb=Yf!Fu&5j8vpRj{FT>jD z>d>$sx;A&+`n$HcF}&sYKSyR;=(=9tvvOj@hUG;~4qTYk^_@E=?$*^_pVh_bGnOt~ z;pEw)j{SK$XVc;qy181rT655gW9NG{(yeablViIL>cDI_ux8m>Pp{tY$J0lgo4#ax za?j0EA3s0S!f>{~ykN9h_RhM&g3K(E`q(dE(Rd49+%xMeR9{qlWnmd{s#(SQ>PmFtSQqUjAtB;_Vvt6}AS_5YgM`Uqu`yva+H8^=4U$e4gHb}u zAQ2N{V3A%pO|?Pv?tb6z=jC}SiRa$G^v3q?*6XcYz$p|cq{uLj@#~Fi`J(>5{@&&N zy%T^+;>8cXx%|o77anP?&W1?1A(>-T49z9pyeCl@7YI+Si zKti7=B~``}TImz(G{0PnlQA3P#MAd}sorMjkP!50B7$nAkU^%#nl{Q9lW0@}9fE-> zN(q7tRuiC_T1r|BBtVBTlQ2+70$Rf;eF`Z;lx46Cpu-rEgb)EBKq(b^W8l<^We(`D z43?0=01z<3G6+UUv6`CsWCk6^93!#+<;ws7007{zS3k2k9-zZKFO~(k`>s0y006+1 zgF_jyIhsL-`FMf~JL~C=cV75(CrJ|q;MVO961G=O zm9d)YpJg5g(4i_HKL75eSE}mq$Y}r}hyVdcV~p>6a}oXr80q`oj%+s700000NkvXX Hu0mjfPs|!l diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_key.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_key.png deleted file mode 100644 index d6626cb09eb11a298b90a8a27b0d8eab41f49a82..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 801 zcmV++1K#|JP)$lC4gU2-`f*>nhR-;k6IP7e>YO!0^w)WK%3$w02v-#>5Ep64PCP| zJihT#O|N+nT7XR2h7dAB?UEAOhJF^mol1i`QtQB`HSY}RE7=r! z)zaVIHr5?>v2Gz&fdYw&2ug$!p+txby(aWZ7(4QT)l2`jX7eMQ{>)lG6ev(fWKxmH zOr%mM5$6B%u~qGtCf40#`mbGj3s!n+^%wnJ&#rl>g<4Z)lB5J6f!?|AP275)Zswr* z%T}4~{;_(?waU!#?JabbF3Cy-kf0{R{z}6$e=5yMQKt3BPcl2>zoTPMqMwF;3!_n|>sT?~bK_-2O_m+o>GJ6h zt=+g$4n7y%1qVJI7*5Yw(hqM=JusY{d}*?U(Oj*gT655eZ>Ksn(qrd7v3}DX1}C>` z+X+8@+4-pVq_fxG zlU}~Ye!0+%>J+pPk+0wV{GM$QaYM?5ux)w2z59=S&H2+K?;gH$bZGzL&g5>G ft+noNiyiPkP9r@8gT|RZ00000NkvXXu0mjfuqTIu diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_lightning.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_lightning.png deleted file mode 100644 index 7e568703d6432c530224e443771a04fc1e2e59c6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 839 zcmV-N1GxN&P)73{`^;G#xwAtHz%LU)4b zqTRU=ve1RNa3QT=ZM7C`iJ~QFQ*9t7<~pX$d^7W%^M8FFCkcQj-~0ZRTBCB(J0^iD z-~e!d9LR`f3#|=(>$bPvx_D-~2jC%pJ=n_e_OK zeJ_2b-KdDDh@@UlzBSMC;EPygH_MwjWBnPGQegihBV73D?-x9PlHL9A=(Vg=8^d<4 z<9r=UkxuIm)*CO=9e###7PztDxUv}e?$0)rQicmYhV`pQ%S!g@;K(?TVfhM#E?bM| z=B0gfb6h@a8bf5FVT-SV~6}?X}9lK@@Yynoty&1zdZP@?RfODsl=2XzzU% zS8gIN43How+9%bK2S@Xbc`O>`z5`%^;pXGy8^4f>9^3!Sp@|O&)m;dOa3q6d;4P-l zca|=H_{G&m?D_+&-}r{u-J$5T=(X4R&)q|O^gN8cgv;s#@5sEPT5_Z)oFo9Ac>l+I zc4ng5zHpps|9)<_Rw>5bKzE(M1j)dFWI_%OH$BJSz0?T+02W0)_a>#vFqb!*d|5wB zzBUN|M&ty51O@=i?kiDrjQ{{}e|^rU?OS|RdxxP1p5mAw36cX72#`R6UsoeCQFI~! z0ATITp!vfeYyQ?Dr=^5BAshfEa0nB~JG?nUa2Aur006MC*<9`)86SPS(W^`H2n+xi ztOWohsFfVfVWrI7PSKW}BmkyPoj(-|J?ES|BGd-}fIxr{00@ANnO*ZR`#)pee4I5T Rmm>fG002ovPDHLkV1i|Hc$okI diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_link.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_link.png deleted file mode 100644 index 312eab0914ab59271384686255d1be913a6b3add..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 830 zcmV-E1Ht@>P)VWgGzD=Y79#JI$lhEn`|2MpRa?Bt#-nSD~P0P(mbVe{KrOBoKnSsk>m|ML{6l zBosu@om4j#WzNLRAk+{k1JRvL(MfE&vvbb->v>W{*z*1_uMP}0cIRX*?mz+wk%*#O z%0D-+$B*g1nRkvI+_3E8Pr1NC6@5M&4vWaLCnNlr;lNlr4i91z&)eBGqL{L{GNu;Fof}GS9{gM5BJuH;2QWk8yuOZdB3pGR#s8bd~ zAmt<>3Q=YH$t5YJ5;7@+8Uh6=ktBgY6#6Pa%2F?h910?U8cLT43KAj$Z1*==ra&gILO{WkHfs(--F=bly9l~${z@AT>V$oat!YAD@M zBE0v_F{`g#^wOSP-u~!wvlmXdd*uqFqoZ0^{&nEMDU+=!>({S0wrQhFmoB}Yq1)~0 z^{A)L8Xjzdr(W4_exYO6u3a{4*kIeXZMJUR>Q=ksjW_p!rAwDKYUs90>6Q|C>56o@ zbrSq^Xk7Gq#>dAsn@un`Hz$?w$;Ss`%jV7L%9ShgHFV~C)6M>B`Tp%|nqPc&G*A3| z)Qe+}vT4-x^t1~XE@(6wR;^lPWMo9n*~E!cy~)YRsT2{`?fqeIw-e7N@mOA%UcCIq z_kH(_EK7|>pM*1Wt2^DaDAp|cvp*@(ZZDKpYkKC^?97(`0sb&XTXy7N#sB~S07*qo IM6N<$f;YmCWB>pF diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_paintbrush.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_paintbrush.png deleted file mode 100644 index 246a2f0b426faa0c7f5ba009e32b1deaf88d1288..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 813 zcmV+|1JeA7P)otxGRZMDZ!_a~nK|b_-`n%VosaL{KDuPV10`(1LIen8kX2Xff$3BE zah#djvFGJ&eE^89Pk*-O^+&d>FC~^GjRYVQ(uuPJyS|-v?9lxA-+tM5>1Qu*n+Ir1 z6KhA>X4$XDH6?-|E5oe1E?pQ5-M;2xw_ex!x}I2+b=}mPFW$U%^;o(Zg*LP!K^1kP%8ynsD^= z1y^6xD1#GLjO{VLdh@0GKY7;d$+NGukV)GRLPn^=q=dF%B#XaJrNP`0E6=}e&Gj3d zKJbQre*WXt!60_DnIzgMQc6S#fvjXxsE1v7;T;njHkdy2miIqAS(nX~o%cO+q+b#h z5tIleLWvL=dQE8OC#{%y*Tnku&K`Tuub&_ELI0t_ea{@3f>Jv&sYqld(%}3_GY3Dm z;O{3*Y?v^A`a|D;^qrM=ykI)U6QHd%WhO~VF!SGjGn0GOZrc3mGZudNl9{Q#X5&-F zuGwVReFLBjE5jr!!^-5*L%!I%PkYH#Hs5rMrEBl^)9)9XTD;xjHFxVZMc3~Dw6#k$ z(-S}RE$bgMHv6Z`mS5|u$$78sp4G-8b@lVkl`HtEv+MGn!F&bKcHPi$$oP_;=BrPf z$(~b3&p3CsuQxhoV$%jIR;`lB-s7FDX)xCTXuJ7ZyIQk96uIR=HBt%-P?N*bp`)EF zq14c}QM+O70NTOa@V~_)&GMZ$^cQDlkyOCa(H3Mf+6xhCuZh`VSN{cQBl5Ys9{cp( rh`2H3A^=GuC6HjQ*7|*0>;m{7QlnX3z3MSD00000NkvXXu0mjfR5FYo diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_paste.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_paste.png deleted file mode 100644 index 968f073fdddc1cc0f0800b1ac4001cd9a55f053d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 703 zcmV;w0zmzVP)AVs!l4K}n~L(tL`6d4Up4iSWnZ3Qg~4n+_J zDGk-qQdogO5JUtO-d5pRp7Nd7_r1^a|M&Zq%mn9Oe((|e0sw%Ur!K7T1pojj=U#f? zQM`qbQrM^DPkwa?DK_be^~z<~RgSMIa<`xP_4P7gg2jCwJ{9^k!fsU=#Ti|%I3p;>90Qd+7|~0h&mIklA#nb>ATL2+v$&u)OBgB z;nsHb)I&QRKeX40H~~cIZxCd}5C} z=79lXoXK%6YlyLtsV$~bSm?Upq|DJh#{|*a7XMm`4QJWZ>s6nL2R1|&J z0VPEwJ9?!n`o5PKAjc->P1Gi8BY*%!5&FVp=#)$mMJYul1Jton}gujiUf??eOy!x&!tsjxy;=Q3_DdcXx=a^OBhW0N~`A@4xB0a*%F? l+@c^sQA%W+?pa#c`9H5UNfS6T{e=Jk002ovPDHLkV1grvM=byV diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_red.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_red.png deleted file mode 100644 index 0b18247da5850f3c2486373a3e179acd2772e8aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 641 zcmV-{0)G98P);68^@7JE5sw#jpE*579S@TLkU(6yap1yN*Zuy>-hV%Q_v4Ar&!63c8OBr(ZRhFu z_kWs36-AmgZCT>x!RqM;Zu9tqvoHI~k@UmYo_g(*J3c%2{N8}7I+|qKPQzv}7t>%W zsu&9G)UmCzkDYSw{fBnuW4j;1fKV_nicw`$8C6D=F_qu`zUiK$2Oc?5UVY+D(`I@R zW`KlwqLftWHH3Z2_XVNfKn>VgT~k=@- z+N>c>0|@A_HbI9Jn`v0~7cfIF(TS69zaomDS1QtgvaBBfGEPLHccO2~3jc>n^6}^HAEh-2#VxC7YYcDXv!L9X= z-R*SOUvIs;n`8(LxP4~^2|JsiN^hq6cU}5dn4v1~Kl{eT7pm&f$PoY`hyVe%y8G*S bxB&kH@RuR86sIAS00000NkvXXu0mjfZBi!% diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_refresh.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_refresh.png deleted file mode 100644 index cf347c7d4685128a4a447abb9fb8e939417644f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 858 zcmV-g1Eu_lP)`6pHR2Ufr z!EI=jWf;Km|8+n2IrHqe<9xxFVk)&(Nh?w$Xk`TAyvb=#e=0aySC z00NkRDM597_LiNIJ2M^qhuTvB004REvvU8@of{r?P8tmo3;+Pk0F0@*jAMhdOkS&1 zhJPPfQa;pP0|4+Yk%#j>X}o-s#EF1_DMV93FsfPP`G*>Ks>L&)Q}w2g%slu0kBfW1 z+*$*0BC^oTl6>OGIq(9BgG4|C90Dk-N_mPazGrQ7uHZ|>BLD!-KmZ)z1e^#?1Sf(M z!6m}K(^b|i%$TcA5bC}r$tAA?0C)g1@CgWliJ;NAk&ZF+-w#}$`-3nZ32C6IVKrHp zr+(!L2hRfF&AsTw>_@ z1y23;E%Oz}?q^Q2d($ayO;-sON2t7$w(Z|o0Pw1YnSp^}0PI+I5HnDNsFCA?oorkG z5sUIGIq=FSyxcj+xlhkm0en=52Bx3@02o12gdAU$_i?v6iyFMuc7P9#zQ-Hf; zVuV$t9P5`m)F2w1?t6{<8%wk{w-PP#Sj#%1MbsjrSI6n;D_@8q9`~W98dNQf$j=iI z6~hpgww&be%X_HI50Hhx@W==u4TLPB;ei-J-1}G8wH}|{i#Lk-WZAyfv}k4y0|fvU zZTy^$u6L>2nWo(NDSV2@MRD}JQ4(c%G%=dG@_vxH?>gcH#*Ue2HC}9sapf8X?R$Z;XEnm&g zW99mh)5jNw008mK8)r^`_{yH0rNn%u1|SpC(tjf#om=+r#lh+?Kb>DVb9`|C0Bvbv zN3U(>f4-tAC1hosRoA7p(b(hL*V}(j>ug<`&U)|l$6o$)!>PBQ9RQSwn9asj2p*|xhU*R^vq?*Twb0t!lm5}`yW5lRy-U0ZYK?8to!;o!r!XeOE$ z0HB3T+6EEoI4PlR=wonwqJ+TvCoWh&$?CAPVYcU= zD{DS0?AkOtb@-hh^ZLq~FMjxYf19X?pa_YqtgZGvv2TaxcF#KT?O%=_*a-kW_;N|D zakkWsOe!)HsT5WRBiC+p;N-c>0Qwy(1D2MDBC595oXSiR07)sKNk-%9*rDBOO^HUD zZW#;)R&EZpqha<(HK$(tZYU#V29<@0qCXgU{gXeGpc_|pTqQD-WO|}%yKZbeX7k*H z2W~CK$v8NBAq~czrc5A(v51g0Wma7`G8}f=ZcuAiYYxZan@gP(;Ku66M6?bquGiHe z3Q0ya)%Lvk@kLixZfZyU@#UFbv+>pYhcj8TRKSr_sWG8i^X~UA**LvbD3(_Lba3xm ziYcpup*A9qJ$?AA=Og05lndxfwr`!C+O~h|B~4 z01q8H`StcY);%&mId7_+)76ovRpeNWRp&4M?#jx@|E-)x%P*A6t^fc407*qoM6N<$ Ef@ddc(f|Me diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white.png deleted file mode 100644 index 8b8b1ca0000bc8fa8d0379926736029f8fabe364..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 294 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^zbpD<_bdI{u9mbgZg z1m~xflqVLYGB~E>C#5QQ<|d}62BjvZR2H60wE-&H;pyTSqH(@-Vl>|&1p(LP>kg~E zYiz5X^`c$+%8#zC{u)yfe-5 zmgid={Z3k(ERKCKrE7DF;=x4^O+ pzO8rLO8p|Ip=x)jHOtWj`bJBmKdh_V<`47(gQu&X%Q~loCIFbEay|e6 diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_acrobat.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_acrobat.png deleted file mode 100644 index 8f8095e46fa4965700afe1f9d065d8a37b101676..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 591 zcmV-V0~O9lw>B8WRlD)Gm}Jrz31u-X&&gn2lvjs=i{7nIaL6v2==uw+8Lcs(8j27 z;|c`rmSv@Lx!heopGP^^Ieb3f=R!%Lpp$}iMS-&P3EJ)s48wrJ_Ni0~k|c47D2nj= z{jS6bt|kFpFf|p5cM`_&0Zh|`rfEp0(}=}lT#(6RpzAsUfxv^LSYX>WlAaN$>)*J5 z0#sE+JRUD8iT9*fz{)_^7@6P&!sEjTcD+I9Z4YjT1`wH@fV{cEvneYGFU%maIEU2s55&K(LixD|{p-uiS@?KNj zk-Go8G$hH6g002ovPDHLkV1hVj1#|!a diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_actionscript.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_actionscript.png deleted file mode 100644 index 159b24075191fc259cfd80c797a1b0d74c168422..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 664 zcmV;J0%!e+P)7Z7t2}reCh0o`+ zAlt$F2tW%oO@m<=(B8a-_VgLl#~yUMUDWG!0qFPppd^03e+x1WpkO1NhIaKD2A)-@ z=Py8(Wi%R%JtYZG#sTKH@6Z+&!S3Edf8jFJJNKuva#KJQD3X^7;H^fd2di znEN&c58aUG>`>P{Vqq$kLb+TP{?I!d4(|o59X_%|nVEZq2Rk60n7072SWJ{64CV?3 zgS!EB=eYxwQ>P2&$}(iT6UMvuFgHHIEdNA29!EBtg=v~X!DxxEH~}L2zn|52%xalaq@DTdhh{EVwv0IaQ=!?daer zTKp4I`l8SDt;d{8Q`5Ko;BXUi&oAG1l4}59P-{|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9pJ8Kn?(M734H_63WHtf}6SQQ_MXEP!#0|&@>J8dL5TfG&tBw z#tYn{TCGZvAr>cca%YYn^!t73tg8OOJ2FvJ(`YpCyVZi*?Ur+1uUA$hAg8-aK)c;e zQ<)!XwHh|n&ND=$@^)>aF-`~n}#*WMkD*M|f8r$i*z7+W! qF|A!t*4fE(R`<_YIkN&?Jng?3oQ|aAqClPi0000t>5xmo{nArfL4CJwMMm+N`pQ3p^Le$?rMud6Rbxz!-yG7bz2z$^USP5(;udf(gfQ zG~f68y^)EvcNWp#bUoDt2=h+^%o-?-|mo~iieWqLNP<0m@2PTB7ftyb= z@H`K$>v9Pr5X`L|rw&CEN2(9SB7A2SE;d|j9@*F}sd(@*2l|P*fWfK>1drZUrtUA7 zNXO~pKn1cjf~~TLbje1g>EPPzN2GH#UIBxJ{}S9=E`{zs-w#hO?vcH+hJxroI5v?j zD!4lP0WXq8zUx3RAP@|Gq$}6wXCjFLZY^YSWBxN9#&g)ro$%5}aYn#y=tJ_aIT%4d z5d4u`rlp!};XGmbZkJE*kYJoi&N0pd*yxY{0${xD;;Q1h^8f$<07*qoM6N<$f(}t7 Ae*gdg diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_code.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_code.png deleted file mode 100644 index 0c76bd1297751b66230f74719504b2adb02b1615..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 603 zcmV-h0;K(kP)^~*-1fljz_B$LUvK}k?BNXe#Y!m=zM!!V#}8bncK5m;8VP zw86G*RI63?Cd%b9bX|ueNlZ|wR6rj|r_)VIP@r2imh3?SN+^{|kY%~8B{maJ@F*OK z&VH9LwOeGt#DRjj0~v~8`>iO7!Ybi;zE$va`A^T#yW`y44;k^#O~K5*jD=qcUhPSc zvyy~q;5H_1WT1l~cqje9yfa+l!hu6xjdOJ8s;8E^+=QQ$tw p?%p!Hy#YapB=@+^9(46X{{RQg%9y;OKjr`c002ovPDHLkV1g7l326WT diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_code_red.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_code_red.png deleted file mode 100644 index 87a69145075afd8f8fd8b391c5da1249ec8b2889..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 587 zcmV-R0<`^!P)LWh{^|hy<@Q*xw+qo|KpY<+vaXbbW{L4q( zTsjXEJvb}e%bgb=o%W0h?4u1;^bWTqH8}5Th002ovPDHLkV1nrS0P+9; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_coldfusion.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_coldfusion.png deleted file mode 100644 index c66011fb0fbdcbf210483d676b7131542a0e282b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 592 zcmV-W0k7R5;6x zlV4BMP#DI+Z{WQcKZBTk0lfkj5F$ztWhP#lcuyb@0@rA^#Kpu5KLA&Rgc}o#aSmis zrZC__xY^&#cI&!!{c|4Q_tcec*#b>|Y15wPcY2=o3;-Bl=(t4;6Ok*pL)-{*A;GX^ zS(@WGp6j~k1wBVR9)BB_gar`}HyRBXh7nM!)u5^>N~MyN6bc0-5{W?44iB<`2biXb zR;wk?jIQg@G!5l)SqhrXCU}x$GU-dY1sra}0uCq@153FUULT=jNwSk}0WBjKz}Jdu z<5gB*<^XtpAmp3m^ZEXQZWd1krhft}CoYaF4cSMvTJ01}X3X37KYdx-D0$c{doUe8 ztY{vlGr-e*;N!WAV%_hgUawyYrhegW>^F)pv%uUTFslHn; zvJ)l{%w(~{!O4`KTmK{Q{zCYltLfs&4?nz|6IdlqHCvX;|HGv~!QW?8P~_d#e0$v$ z)5XHEz{3>qMiH`1+qNYf?huS+@L`J9_$cjJF)Hf?@pu;)`9}BXwGUM{2!{y-4|Z{L zG>z?O%Cp8P5T#j1DID7u_*(Jg?7iss8AZQ+&;u_J{FmILf((9eoiL5nGUe>Fgq*U$z0000 zJ3A|*qoWOonz+4ZQ0KNhDB07SX1?#FrNy8%K)_l}y&kh`*KYdy`Y99&tgNgMLSSrc z?B?+B@HO@P-jS~z2Rgc6yy~Y~%>oJpBxsb$5<&nRLqiuR7K=@0SZj~jTs|sv_jWVX zGe?WflejOaq|Vec=s9+ahmXbyJ|T)Sl*?s82sr2H?Ce~HD5WI+Sz&tmWrN()wI2}+ zKqg92t*l^-#ae~;9%KFlWkmwnY=-UK`_|%ICZ#P1gdjK<2n38VXsuC7{WiU!fZFmm zW~Sda9(Qi@pxO}$ARY+;t##Ao27usOqNt7Hwq6K7G1il@xitj=LIM&{N&#SuX;x4x zmG6FhCg-$PI;hQ=;1iZ>F>^~@)IPi;l}fX?SZ!QiO=X<|pSVkNpJuLHzW(FT_~W-v z?vFpkyE>8ee4d=7wKauH5~dd_M7d2Aa=ICC{Nj7Blqv&DQEP#j_VeWV&WXL>c=LLK zsmYg^_JiDb;%U!UxO%qjFAvsDFj-kzT2$GbV(ZopPM$i$z`!7jvEk07BcC=6FMt4` z*0u3Sy`0b~%#(0000K diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_copy.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_copy.png deleted file mode 100644 index a9f31a278e17993d8d4e13beac2f9d5f7b42d08f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 309 zcmV-50m}Y~P)sF~CC`eaI+m%Y8jfzomMvZQaNUIT3LIrJ$h)_W{ zwF|LDNlB-g`Hb_G$;>3F$9JF3WYR|3fy2C+_wH}*xp!_4fF2UN4lt#d26oXwru}hT z0+0%Vz-l&|Tdh_L-Ng1G2*RBtBncRx;99K)&+}s0whhxXp{go}$g&Jk6k|vfypI5M z!1sNGVaV?!*L7i87Bo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r zvJi{K_&f+q^Pv4MK$hhS4TgFj_FD*rLOePdE-E^T7ZzTFCRUB`*?9&h(a#C!-v8lWG#k3AOJQaUey6Oasked^kDPe=Khg@7s584 zg`XfS1)&u*_c;I76#%`kkBfiZgKKo@0)9d6vZw=ExQUtV?eW{Y1Xv}=4X(2zy85d> Y0C^(qLv?Ui{{R3007*qoM6N<$f-gW7od5s; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_edit.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_edit.png deleted file mode 100644 index b93e77600def75c9a144d3d0a5088a62c02cbb0b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 618 zcmV-w0+s!VP)$>5Y&axjp2O=VLu>*f>1L;s0)kkvKC!*u?s6CVL=HJ6oP~pNfZc; zsKr=bq;7MITw8NXw{SZm%59TId2x_9BQ zV86`NuvGI!>o^V!Na!=$7GJE{Cq`b+XwknM{UcGHFTTfmuS+ zm-zYC!P3+zmY;SG$?!fYkOih`QYaLxyF}A86h$GGN}kFj)_o*0e zjPMP%zTG7FYMAfO2Nn1D`D0Cj?Wl>5q%@CE10nX)KxpNmwk+!IWkzywiYD( zqUXiYYIq3qcRyMGJ;IY`(Gz~E$J$zu2+R{)xGlE*88b3WK6V*J>}2iPY1HH|tER0W z_+^^FdppY?o)Gt5M2`%xwRDH@R3G}^i1l4|6uchm0X0f!@&YdVLB5K&dd7Rv{)DXX zt^&vP;}kqj3f>94j+4xd93>s|Q!Ezi>?r8(Il$P}PFxSqu{d*!Y%*#cX(R0f|Juz# z3o0_xI14Al->1uky@W-rCI_%l&>PK^TXNSN{byMk2AI5vbwp!K-%-@!-vPR3iikL1L7HA!^!~ChCFU#lnGzp88=I z67V8PHBo4(l$u?-AKmT8?#_0rKW9dUNRbpLc`}piywAM9$xZ-3fR1C75T(BjCn-l* zjUcci2oXXo-}iqun@#)+`W@kL_-U&|2>MxZy~3IdmRm&8b)9!2%ksg3R)nNnT*TJOC=6{2hG86Dz+<^p6qfG5$i^UNUh+u)CD7O2 zK>Ioazn;U|+X0x$=feveYZL1W*Fm%e5P1sajd#eW#^5(ddx76*pt$^)b}$Q4oPabL zLc^HF>Z{8za;f$LtN0P$6C?1{X*jtXkRJ8IEeyiSzencvH3Ux_y>y^}wfJrRCQN#9 z?&e+C>sSAfrE%mZD5RfZ`gSndD)=P?+nG5Oq$zmY&-v+gc7R6c0u8^Ke#|XOq?gF@othF3zFpM8Il<8BJrWqBtF>b#_ye4{0)Xbu6j&@UIhRE002ov JPDHLkV1nWI9dZBw diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_excel.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_excel.png deleted file mode 100644 index b977d7e52e2446ea01201c5c7209ac3a05f12c9f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 663 zcmV;I0%-k-P)^@R5;6x zlTS!gQ5431_q{u#M2 zg&W%y6a}>qj1Z|7Vu&-DW6d~k-n;jnHsjb-q#u0C^W!_5^C=MlKq<8oNCQ6qS00!X z5eI;XP=g!^f}j{hku}E1zZ?XCjE;`p19k(Rh%^AQQ54xysU+ocx$c#f61Z4HnT#3u~FR(3>BnZniMIF4DouI8Hi4u>cAK%EN)5PO(ip3(% zIgBx+QYirR){Z8QwV$9Z(Mpt=L-Or3#bf-G@66}txq0yc*T(zNTBDT0T8rO^JeNbSI-Tzf5!pBioy4NwAN^?iN#{;fH1Jke4Xa`^fR8m z%h6dq%xX)S?7`zae))(Xst^Scp6B8FejQW?RLTM8@0=vnnntuRGBM2dpo>gbCnTD= z^<;=JuqdSf@O>Z8^XdR?s+KEfhDdB_#ahFj^giCtzT(s8kA$AViyTqaAR;KGaLzUU z<=GqA4bRwpX|IG~*x>pZ!@zLr`XQ`od>m(`;jz|M_*1GDO#$7;n74ppb8=eiqh760 x0yt}J1#p`gw$`o!R{d7zU9~!Un@nJV{4bstt4Au+Up@c;002ovPDHLkV1kWhGjjj{ diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_find.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_find.png deleted file mode 100644 index 581843637079359a6a58fcdccf0763690c67b063..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 676 zcmV;V0$crwP)_k3`4d{s8lK_6bi^@vq&To98fNoK}7)fx$e2^Y&@<^jR_Ee+8}KG;X`@ z@bCyiolqX>bb1ZIs%QGnjzFU~L8H~d?e;*XP(h(S262}XyZ3a0h07r{KV?E70l+e- zE`%3x|M5#q+;HOC(h@A^M)7Rn13dm0&>K$j%k_F4wOWlsNCIH+!c_#{eS&TL8v4yc zcpnPEY`cQzZ$ILq{U-MA6Z6Z|1p!FZjQ}tXSb25J@HphEqX-6Hqo?-_Zn@{d#>2Ml zJGhxTAd&emK$lV-QK&VM&ix0Xy{GyS3Wp(+E1^8BhD3T0a)m-Lw@Lu4zQRrP)9(3F z^>$hh@N>OAXrmPYunLi|fJ$_*5i`46;M>~*5D{bp>-OL3{+!MJa`3kv~Q#QfQ%c z)1s}QE<_XaYBG;IuRF=td#+}fi4h(6HgoUyJLi0t(*dA^B)%@8kkG&bdM5P5^Z5WF z%d%>m^SbN0XeV)wbUOXn5Ag#A$gJx+7-OCkMM1S%MWIlTkbFLmOeW(&n&wUd&;`>p zVcRy$Z{K0=?SpNnP^;BYEEXleFbq(UY&LrXX$6qkJ~)8+b{=jj3HEXds;Z(?D%}}L zX3`39&dy=Zyar!ehA}e>w)(*vrCct{PI9^2Jpj&OZS8<3-@{0(gNv%1{)zAiLY+_^ zl}e>Ofd4&#Irj#7>=o=Uhv5IJ@?sN0^J|(WL2Uun$4}si6}TG-s3T#p&6GE<<2W)O zf{^Y2HlO#*QDvTp3v&d@;8*}aUC4lisG9(w7@d5Y8y)}U#FwCkqp*Mcgme4{&gGRf zlBfd`nF9cQBKB2_L{F8G2)7pAf$i)Ds`|}-c>pc^LRW{w4SQ)3N^BbZx)6BlCZts! zKph%`(m#xg-q3I7=(us;9<)*2%iuQ1J`oV3gU6V~T}^JU5714JN33&GwEEru0d}Uo U{MPL+lmGw#07*qoM6N<$f^vibe*gdg diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_freehand.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_freehand.png deleted file mode 100644 index 8d719df5205f7415ce657e5c277db4533c82f346..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 639 zcmV-_0)YLAP)p{{sC7)XB-g4w*W1a1)XtvxrMYa1o?wn&v~3 zHnC|#(>B_M1d`_7gfzLiHy=0c<2kQQdXu*33(xYN_xYW39(cz9jEVT%VokB8|DoF~ z8u%Q5sdl@4VB7X#uh+v_;yOGY&pRi?378ghv)P1cngiAAb<}D#l*?rWDV0j_dc6Zk z-|P~AJZQCA=yWcQjG8fYnimzj*3KqTfN0Cy!G^$7)+bQ$+mHVd1J zvwOR^5Lm<|R+uyB1Nu4vL?d4qa3tn?9H7SZH@~u=fFHEDfSH|bHU6kh0O3%cLdyny z{`9S2Sw~WMy0MPy!64i`jdk4Z3>^+KIL_fN2V_d&ywBt`^IJpxUI$=YAph~5`;xCe Z{s%Y0vkUXDnO6V+002ovPDHLkV1loX8z=w( diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_gear.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_gear.png deleted file mode 100644 index 106f5aa3611a4807ec8c21701c631730275089a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 402 zcmV;D0d4+?P)<@FR}JvtGRKa0_WfK^c7uXaFH3q@Y!Hnl8VySc`OtkPN3;#l*y*l23+99h*9JzA00}rAC!#M1dZ#v9YOBH|eC*${MmzzYjBu!!-< zK8tujf&(6i)1biy*F>4{f*Kd(IU-JsG&#b_@NgTnx@40)2@2%c;*=?-2Za=}O}7&( w%_K#(S>e1j&gfY?mR})n>>0+8p`iTe2d1K2h8#$+)&Kwi07*qoM6N<$f(2cptN;K2 diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_get.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_get.png deleted file mode 100644 index e4a1ecba1b60e54f3777717ed105cdde745b7184..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 516 zcmV+f0{i`mP)o)wchR-92qq~y6`XqbKmElbB3z{pkZs0VPF`CFvS?7jDn^mFo>d9Y&06* z&1MsS!M-CH3ee+h_sy)Ms%B*ec3R0RpVi9?*mU84yoq(Bw8 z<4(999dJJE!V%pWT~HGRIAb;(#O%2K3?uRpz}AfgE8e9q&OSdr^e^}lC$QXZz;S2A z)w>^oHy>?v)q--`!pmuBe96PxP0u*inQvyFW(llfv9 zXV1s*Jh`y2H%B3ZTA(AzpsQ?hb6_PyZ=c1?_B4fbl>G%!@ubJln=!)x0000#DY{xaiib^#X=YT4@yE_&2#eBulEdzjE`u&@G%2(&u{J-<}d(^uY4W_kMfEX z@!X)AR9F&FL?RJyJRUzvBoeqN{5kY`z3wcM0+du73~_0|*lac! z42Dw(Eg1o{Ash}P8jXrqN+1w`*XxDD;ShmPCZC7#4;wWbHoMvBl$=zF-`?*9j*Nbjd=v@OWt_BgKxP-3wd zy37?ATx&$b+&zRM!K;BD%Okw`Sb@&Pak8$KRX19jWZmC0&n*Ggv%j8nvSPDFw zEkV65AGOoBQ8kf`R|}Px*&INNS%osq9b{Fq2I(x6@xM>tg=vRLF?I`0rWzHyRc>}g~)F_Qn`A>)C_iwK%Z zrIJ;xR)UI1Y4Ozts|-Nho;q zVk9-bX)%F~!;63iu$Fk=VJn3~fmb5S@@)ZqjBT2{f`vT`b2}zxb0$o;EF@G3&BHK^ zc)`1kUzo^Qkk$?KFKHNBD?nP-MJ3b@&4fg;g5l2wMi^g?9qj+~@b;62o_U1_S1J`g z7m^UMg25FX1MJ5AQxAJ5F5WDt=$=-@JV-!LHA2vuxl9kN>PS8x??^AINH6LjF*#nbk4}=n3gfWp$kEX5IpHS zYiQ{@d7Nl&d$#+7-TckP&Q}N91e-C#5QQ<|d}62BjvZR2H60wE-&H<>}%WqH(_V;zPbB1rgSSSC(0? zWlQ#?N3UgnJ9m2C29w!SwoOo5_2Iq!<8vCyEoDoj@#oV($oJEg6Bj@;nD|2g8 s%L|>IZ381yx9RvPhV4J)*SeoEV4lyr#k*`nfWBbxboFyt=akR{0DpOPi2wiq diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_key.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_key.png deleted file mode 100644 index d61648452284da1bc28b10385f95b5d2bf027901..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 616 zcmV-u0+;=XP)-tZUVHjYHp;RjQ0M0pRlXN=mLv{hk9Ebp9&~+Wj-T9IkpzWPWd#fZ)d=zV^~S`;LE*!&u-?g42^wwN&Xr1~#d5ifl_2*B1OoS}CDno^8a50ArfE8;stQF>AP54J@H~%T zFz84s;dO!QJKD36(~!QOg!t_^gfFcSKDU4yK0+Ypg$NT^mIYcQ6bk*3P(lBLh7Df_ zTu=2xC#+-_%)|{Cv8zz0t|0y4D5M`xAc{gwOKc`ou<*&VjUREFHs1qd<_xSkKeTBt zgyCi=@jj;&Ns^GsWWaIUl0Y2azcDlF@u{(P*!+EH;lnU~b|Lv{4|4Hdkh!qoQHiE$ zY#y>KFA0QEw=4Z|uV{0A^`Y=D}hB$GP&<$bi8q(u;p^0(my3Rz7fP}|# zGZ&#uor4@c3q9r|f?H6-UZmfgKx(iV(MQ`MPWB>iC~SxnN5H*zb*A3#zWwgu&c|}3 zn^g87H{pdeasl%Lhmab&jC?lES}7C?4BFDNA<}20hoY@w_IU%i*T;}}wh!589}7~7 z#Ug`-R~4j&+K_y4kW@X7qLr-)S5qVKU)tO;+kXJ++{vPI@{hVK|PhMVVx_`)vx~zUs}c9O-Ok{00000NkvXXu0mjf DS5_-g diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_link.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_link.png deleted file mode 100644 index bf7bd1c9bfd78d689c73ba67cf914182933ee68c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 614 zcmV-s0-61ZP)OOAS;jTeL{ZSdz-%)SMH9tDF;N4B6%j=d15J&5qy`F#vB?Ar zqS1nH@%ny_XSI*Y>) z1f5QYdmzT>YciP<3WehS<{GovEaLGv27>{*-7f0&I$yJ^L%ZGPv1YT$V|u;*+ZCWz ztHI~CDVsuy($SfR6-`N~K?9GTB#l%%0h7 z-q`K-y~E)+s8lMyTrPL8^_pUo)9G|SluG5pPqw6!LJB_PzyJUM07*qoM6N<$f^=yZ AYybcN diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_magnify.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_magnify.png deleted file mode 100644 index f6b74cc40f82fc83e4dfa6e9647ccc1b34e6ed7e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 554 zcmV+_0@eMAP)Vb2f>2}Fa82O3m(Ob=t*sniin`NpInLyMJgI`saru@YOPfh zy4g0#G*cV!#N%;Gq9_VH9?v%kjS3Rb1j8^;C={$Gp=lbj z*(?%?geA!5^Pok%UauwjA)v4g2`HedDw4_Mk4hhBQt?e7YJ5(hcj|3dNu^TOPGnjB zTTsqd3GIZ=Bb`n=7no)dflv&K(lsWw?lH6T1Yht0F9qgIuzh}ym0%n<3d3EBWB*pg z+G!I0lbAEXyd>k|QNuwr4=KX1D+tLPv)j@C1=N4sA4NF9A>HcO3G47*Y6!+SrUH-7 z1hb;^#S=r|`aMh>J#dWruAEf}gcR(DRUC`ZUev&$Sbh0SgLiTXeeHEU<$_YV;9281 zym`igIE%Sm8DpDw7@71Tv^EB5xSdUR*0$Mqp+Wq8OoaZtOg52&)zZ;;M=7#C1Yd6x svjx>8ad4e2x|*xHHwRjcjs6zA0XLDUqKT6dS^xk507*qoM6N<$f*wetruo^Ag2=LamM1T#~4RmC^m`_ zs}H7d&XJ}mg+hU?tu0noRvyjI&o2SRAeYZFesYkts79I^jJ7!A7%6nJwq8O?iT55M z1OQ` zbL{!Cp5o*IRmE9PInMCSPjTwfT~J+EYkz}tjxY=fg5Yf6EQ@DG$0kMJ9h^&$W}9BU zP1oj2;?MWVkKIEl)r=Y;L^Cx2q|>!)qJJ8zE7-V*-Cf7V8_2#1c0N975t~+&QUpQJ z5(uo(-O_`%Rj@U@t>JYAgd!>L?0Idxtd#oW2gc!jinsAEva8|kF4#Ic**mmml_{d^$s}Q5Q)KCys4sfck5bP1SyeHwh2`A<@N&t2j0^lgHC_^(pAAPCNjwl+>AN%C4Ll>_8Hjda%9 oS~i=#*e)>KsPlg0=2)Qg6BCqJ=F8HdGXMYp07*qoM6N<$f@i)wr~m)} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_office.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_office.png deleted file mode 100644 index a65bcb3e1e9613cd9e4950850db43d7025a5fdf9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 779 zcmV+m1N8ifP)JNR5;6x zll@CmQ5eTZ^k*a#RQf}fVOdd`5NJh6S(>6Cf$wEW#f&JyAR#GAn9>Gml;nOf3WCDa z5({5&UB$(IF?G#$x4X@Ickg!Y-HU!Z_rzX=qAq-XI_LS^=lOCT0|0{#{kBkYDS7{3 zD`iu%E=`cDX_^#^#n$5SIQ|4Zhsk8>N|zXHXG@*41$i-7`Jr{8`3S_OEcmY|RF48wXkk?WpdVM4OePBSbfh z#4_=eXJg@3epx~gi>QbUmO}Bm(ENN3+@c?jWiKvSrm(o|W}Ud*?vy~fn1!V~Cl4kB zI-;c!8f~-v)jX82%EG($>?;KSD$64f2&4qQ#=Yyrcpy$57RAVuV#vKMP)0hT$r6m# zc^F^XaJ8R9Q|}x^NoJYIvYZkq-z}Tnj@UJK2l2H zG}p+VvtjP2Z%bsb$~7QLJ9#pC0dKi`ppOd^_V;ME6tdzC0PtV|r=@e@37O`%0k^=5^`%cf$eu00N17Ro!{^30krz>a%3j34C?*{Mt2^a4~ zK=P+Qq%|f;Tc&+9ps;@Mw`EE%rgs&#y=j6BUGg96oIqdwj9-fiy*N(|@o)eD002ov JPDHLkV1j#pUPb@_ diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_paint.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_paint.png deleted file mode 100644 index 23a37b891c2f5faa3b8128d45373ceab794ca609..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 688 zcmV;h0#E&kP)PK^TXt2QS_@2qt2T|9~baC-vaPn=ziepcfAwB$0!O2Q)E}1e8!q+9)KT5JVKU z7HNY}h##OS-BxWHWjD0wrPDeEfUClHs%Q6&2u@FTOJkKMQN|_Rlw6rQz$gPzqGNtj z#ruSeFeh835JJFiM6vp@6M5bXj%k7CMt%SIwfbF_fD-3*Os`9Ly_Q3WQ_SX33E{pX z9_WIeeTCGQ3wYALpBcK+P-iuw;3i&7xCua37k5# z`>c`M@sGeC7cdsdz`aE9lOz!hPholbyz%T85LYf6O*@SA+9&+^7k>+4M8$A8iNQq{ zQvn8k?-+dU`Z@gK0z$EtPV#+`^OH`R@cE-cuE&_!D)SZGxmQxeobP_Zwq zMEgi6ePN45N`|V1so0uE8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ules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_picture.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_picture.png deleted file mode 100644 index 134b6693687b2fa5fe36d48a9c0b8001f937c741..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 650 zcmV;50(Jd~P)VHAd+bMNh~)LLRqN>D)-jd9UvB%+hyKX5U|&4t0)fzgD-MPpQ$nHU%yoz=vI zMGb>1Xu!6Hw$NT~@Au<4P-+{9;Uw?&oj31uzH>xX0T7Xkz!(tn|Ed9-s_FqyReC13 z(ll)vW1O{Ck5ihay12Ob2ABc@RUI;zHpaMiyRDs0r>|D4rHw{ItJSJnYjt~jTbGuW z`X(~}?!&86q40R8<4zYw;$qi0^3ec=c&<&H;r`8W%H=Xymf^i;Wo6~<+}zx2UMzpC z*6MZN?(FMv`n|KO3(KFiUaucP0;Z!@LcUNa%8#vGK5aZ>wDgB0Gi=t*argWJcdlMQ z2#MpEX0wU+9&0U?N(F#OgpviU_Y{jYMsj65U3|PjwUOY}lUYj?MTiK_Il}NCVx-Eh zDx-TzMk7se+M#W_>?A1-x}ZXw3kkyz5kW)_hkjsi@RhKadN#H$Hq)$07*qoM6N<$f}lhwPXGV_ diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_powerpoint.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_powerpoint.png deleted file mode 100644 index c4eff0387d5888c638ba09473ba6d2369f7b56f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 588 zcmV-S0<-;zP)HU2HvUSp%6 z*n}iP63IK?dpo;h@sj9~pcxo;VVTc-XLiP@DgefqE#NE=@oyUd-&HjLpsLIuSFXV-EMck)oQ(A`s%*^&wf0(rNiNHsU%=0Rw;WC z(kbc37l6fo`-0uR!pYkYv8U^3?nsh^@pw!K0TH3uYyx1_2>|JbXPmfskJ|1YAw9w! z9`N)1^Aesr;y5Nr5-ODn)oOL|CGi}f9!&iVwpK$khlIX10X$H6^A_stBJqvLhU$?V`QXqKme*s~gVDJ4A;LTs_e15jhc1;By a82kqHEPVYFAD2!50000JNR5;6( zlS@kiVHAe7MZY2;Xi-5)WxDDgv@tCUl*&p14T@Z~3ThM5LP4tuQfLu@EnG;nXc<8S z6&3BN?fx-cv-Kp6>HRiNTHE>$X( zD&=w+?GWC>?RLAGC6Yix;an~UmSt)tSf}1VS6N1N2ONORdD? zaj}w6DAZZdOud9Ep?M?{iQWbE5^9HLLZZF|1kdy0Tu4InEuboP9@nvbZ-P0n4AZTy zyMRIxRDmUE#LdqYuD=-Qz4N^bC`_#S7vcLn1M}{J(Wl3#c4VWczu&)AjUlh(11>gp>f`wv{KnjF%!aA*Jk N002ovPDHLkV1kkt*XsZP diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_ruby.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_ruby.png deleted file mode 100644 index f59b7c4365fa1720af1aa04eb47167ddaa6eeed4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 626 zcmV-&0*(ENP)ZS(e|#C2>JN4>y}l*tQ*E7zP@R2CCJnkW?xa6bgk%(hgtZ z0=~d?U3i`+Mvi4!&~+WPT1^NX#{u6&QIx+DE(oR{&T5&-ovF?@wGw)P&AtpHZa|G%V*GUUqL@@!d4V$`8=##4)ytY959JG zdc&Kho)&AL70^i z!PEmeeDWCB-UbK(*4JST44^tV2z_J(dn~+vBMJT97_7rzFio=~XczIv?PQ5$v%u~y zu(bteXb5I1h2zCV{Jc2~V{{yzZipgsP6;k264$*#5q?GzCm|CPa9CKqm4b116h3Pu z?+%Cm52plC8|5P0@igf2GV1KkCfk{Zecu=G@VNrf>s%g9c5D%@cfxVb6$nY`1IW=4 zt10QqSps_2JLp0f3I0j0u>#qA;v!+T))KEbCg|mo3q0pG{OR}p0fPds8+K~d>Hq)$ M07*qoM6N<$g1S2e3jhEB diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_stack.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_stack.png deleted file mode 100644 index 44084add79b9a0fc3354d16bbd4b4b5ff8095da7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 317 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^zbpD<_bdI{u9mbgZg z1m~xflqVLYGB~E>C#5QQ<|d}62BjvZR2H60wE-$R@9E+gqH(@-qA%AW0|7U8+xDRI z0k`B18}ImRw2g{jTGP$Pmx3yI6F_2s&$|`cJ!i0UN zB3H;=r{#{FwLaNVJ&hZl9+MTHGx1T^-A=Q0?hRb#8a~x50X%;`b6ik3cw=#XdxWy= zgrpBoDjpwP&g9<9h3x!k_B!?vuTJVkmIJ-U N;OXk;vd$@?2>|rNdMN+^ diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_star.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_star.png deleted file mode 100644 index 3a1441c9a12062a4bb3d706000d3ca14399aebca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 565 zcmV-50?Pe~P)SCZIX8XZzY2l?gCw6LlgWJ5Avz#QX4|&mI8LN)w~J1vgL=KLAhlWz*=#m~gyvxa z&;iC6gb?aZvMdXxX`<0+D1hs_pqJ!wxqlEH;CJ)je~uL(gpi@v>!I0f_Kl=E(E+Tq z26na*9gribxx-Oft(HnstyXUUy!39&E-cI%J5Rsy;(PGZH{g{ty!HVC&yGPT3H8x# zw{^gBPW)O0FMoh{k%l<`1a|To_Wl&u&-GXm8izU|&<&utILc4wc6s@u1bmTz6x{qg zTw@7=FQRcg&r`h+gcR$*Jbv+*DPk7v)B@e0o2 z6IlBXW&8xh@9)YKiV~2>+z&XKd24JT55YWz&JtfvCg4r^~bLP79-yS@n$OW00000NkvXXu0mjf DStt2z diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_swoosh.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_swoosh.png deleted file mode 100644 index e7708292adabf4821612bfca032cbd019c63180b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 634 zcmV-=0)_pFP)KrcWDBzIw9XCtIF5G<@j zP(;CSqHxUrerI>~wKyloM4~t_Ofl@UFEj6$Bmm6p1aK6H{5zI_FOn(%k{CiRq?CT< zoV}Ey-7=-5nVFes;1m!f?EqZLIs4k$n%39XN4dPbtX{9DZnvvaiWV0aH9I>yf;2<< zHmo7WNC<&iE4ji-iKJpsBApDKiAiqWy8R$FV|M@E-RCB03vjWNGQZJxKCc-cSB=dq z#v3snoDMC=4<2BDgiZrv0Veh~mz(X=S@;fbe>CJO_5|oe2o3=wgfW(StLzI-qr&kc zhXEJ?9=`nWXzrUKL_p*Kr9u@95MU9EKqp2vi+%&1&gUn&>Ut_d3>wiyiAJg5G7j%G z#$sf%Kqau!AAHP&4Q?edl!FWqpT=C{D}$15WC#5QQ<|d}62BjvZR2H60wE-%6;pyTSA|c6o&@eC9QG)Hj&ExYL zO&oVL^)+cM^qd@ApywS>pwx0H@RDN}hq;7mU-SKczYQ-hnrr=;iDAQMZQ+*g=YOM= z!QlMQEn7FbaD->uKAYgo_j9)W&$$zS*W9}m(ey0q$&7l-XEWO0Y(9M=SnhLbwy;d>@~SY$Ku*0xPvIOQeV1x7u_z-2-X>_74(yfh7C znXL|3GZ+d2`3re2hs?MKC#5QQ<|d}62BjvZR2H60wE-$R>*?YcqH(@;f-l!01CbW>s1Izr z3LkoHh<3E?TVANoG4CX|$empRCCS=R(U(hVJfm~E?IkDKRK&NP2|n`v>d(vV;W1uY zrFGVdwn;4b{qUtE`?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KRU)>Os_1L3pl5mK*|?X3#a}K+EVZt&w?w zefXKP^ZqnW-3y9AhYJZ~r4m*!Z3OSz3d}2Q`nDM_f_u>L%8Cb}8`?bl)x?gwAy>zp z06y57kT6sry1g2l{|V%UW?)JwnbzUugbvpOF3=oZDo}spfs2EWKOH{_^59;ue!o^A z@e7dWS|QI`Ff-E$USJ`LqDF}zH%R}YOlMiv63A=qK^d}n!5_(fW%^k4U_D`_meIDi kNMKea>saR;>gt<+0gk_zsk5>Xc>n+a07*qoM6N<$f>Jg*?*IS* diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_width.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_width.png deleted file mode 100644 index 1eb880947ddf3e745c29e8d9dc90f09c7e6e323c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 309 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^zbpD<_bdI{u9mbgZg z1m~xflqVLYGB~E>C#5QQ<|d}62BjvZR2H60wE-$R?&;zfqH(@;q9b3Efq-lM(nr^( z=EYR73-9e)UYMWsXy%?aZsD68Yyv^2$~6QgEcljw%kx>O(f-gQ?@fOOx3A-0+Qw?O zRx~W)kn~Qe2d6f9nMG#g9Q04Mk==M~N!Dglvxk!fgVh#w@ZV$IY1+Xc`d{d2UcaP~ zfWp)_Ivqj}l2SPy^9ZWy6rG9Yx4v67_uA&&9|XA~5-#3)W3%em1peD8RWH^#O%XoM zxMPud%}GTj#~*+7JMxTd!`{^Q+>(D3*|@KV`*G2;{QnANOxu1$r2xIe;OXk;vd$@? F2>@zac~<}c diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_word.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_word.png deleted file mode 100644 index ae8ecbf47672a874c0958d0d113a56162c2bd364..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 651 zcmV;60(AX}P)hkjP zNW|QGv-YFNLN^qH@tJycPNG5ti6B7;r4mEr#lr@*T8*M85D`{ZR^BWwF23T<%MYIh zdC)S*p=|xk^!~H=+HSZ183~y8v4|mYmZxt&)5{{~>J`>E223Q5>T$=~mtA71q-jdG z+eJhOAyBW^0k9Gk1+rX8)zFx((CG^&tDY>6XaS~Fy!WJON|Gdujg5^~Vzt@o%BcYLiNiTQSD`zL^ociBz_>bDlpw3kriQ@Z`bVsGz-_6N>$&gTDiKDTKR^ z-hB*tHa^>!oD~5TK^0UK5rZ}RBm50Bv}S-yA%s=Ha5RYb{)!z2N&$&64gfhybBu8p lh~_|?8^bu;BRYt{<}Yrwd83Y=s?Goa002ovPDHLkV1l%3CP4rI diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_world.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_world.png deleted file mode 100644 index 6ed2490ed1432d5d667a76235360824a1088e928..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 734 zcmV<40wMj0P)JT{hN;C#tgf#9krG=I>5!<*aE1_(spcgF}<`n4i zJi-}^6UUeU4jUFwdCiVPDm%`Zx^UBa8J(mnR6wEgz^}o8;)M*Y(@l_!Kfv)}4+NuM zaPXE50z)r)9=D=SR|RIqfQ^j}Hu!fzMeQBo+@PZk1G8hOw|vBTvkx`HM)Xe9q3xao z@`p0`NO!2904FHSLA6E@Y-O6zH$DQzvq@aHsz}}<(!v(Z_+EodX%R&NZW75g+nENo zV0020rxE^;7d!067AN>6*+&YLp$9uH6F-=In`XC{Cn%+o|5)b&boEPr02w@|P*oGm QmjD0&07*qoM6N<$g78X0Q~&?~ diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_wrench.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_wrench.png deleted file mode 100644 index fecadd08afed92536be91ab12d8e37b6bf410d5d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 613 zcmV-r0-F7aP)wK%m(L+9IV|s|#(WRl-O^4GvaQsnHq|OstfO zIJ3}3<01}YGARE4m!7=)QisvlHUo!Qymx-@-t*p_129Ko-#pVI)6#!*kLj-AGXWNR zyA_{wKii_amK7^YT-v z6#plaNm#8`-kz@OvjIt^4%IN{@J3bR zRI}ME1Mv85p|%;RK>ViR>APPLB4;;BpCtqE@P+*7!G>I4UjNx~e>r3HA^tWCQ@S)l z{BslcSwL-CxQ&_ZZSv_g0Tu{yi*X){Mt|W7)lbE`SQxFP00000NkvXXu0mjf;)M*S diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_zip.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/icons/page_white_zip.png deleted file mode 100644 index fd4bbccdf1643f4ff5022fbc59b82546e259317e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 386 zcmV-|0e$|7P)_QM!1S$Bhw4w+iRuFWf;tfR6D%SMJrb+tx zC9R6{2>Ou6#juIy6u(I?|;&Owi$sRB4^20apB5xE2 z#B9XekY66S6lzfCL!eEQRgo0LokTA55@Y#%_wN!TXPw^Q4IIXsG~v#u_4t;x_HM16EQ@QRY+rut&97&UefsPmLrQ5P zBC2kcbux9L%2bJz$P$XV$*zSxb2e@6_3O#;&!FD<&hLjGn%~%en;7)djE^d6!t$lW7GyIOKlQ46hr`Z zjLNuRDP_53dNoN?wd&HMgL^m1DXFU<5dQsrceN>fSz00000)O9XRTN^$%%`*Fg>ryDtc(lF@?b>dE!20r+y z#Q*>(wbV5H`-E4Do={CJp7=ERhw15hgZi)?jRG88 zzVz(5;g?Td1izJyO33bhjg2Qc7FVY@f9!o)Gu?DII~vm-Dc?}3M!fsgjP?F(7`rgg z+xOk8XD)e?Zl=5+un`5!7kr?F=eq)K-5uqr%yU$1hLv){Vlm=)*5~`lwMciiXFu*g z)*Jkz6AF>#zb(Vx`Iv{bdGZHtlW)v(y5k^|xgSUc9%0}S20nrYrO}78ofk?bV!5)4 z=Ngz@+$9N1>>mA%IWx`Fqa240bWkiW;2TZgd8CZS0U}@mknC;!2;wi$eI@`h0y2JS`Eae0CW}q(2(%!m8 zWq$`PDU>LT1_y*bBv#P5<@q0@ttz$hIH}YMDvAigCc=y*)jY-VOpTd;A8@3t7Xh4r z0KTWOk;N2Ox4!&&^4B*no$WtTX!BXB)rg!y8dvGgKBQKLJNXRRp0}Bsjd1|LNQX~c zbC~fjrk2iL@4dYF*vt;}dFn(%h)n_-vzEIHMOKRkdF%3Lq|zBgKm_h>TEq!))nWjq zzn;B!?!(dQcHu$#=JF`cS&W~C`WHFW^B!~MI#k)>1Vk&eQy8P1O`J6V04{D@|7d6^ zyBABnh-d^H0FX&L07M||E0n_dp4v&Q%PSE9p#R#Hq)`5I_(B5CE#q dxjPz0{s-<+c#AC!i7@~G002ovPDHLkV1iPlpuqqD diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/style.css b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/style.css deleted file mode 100644 index 32b65071..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/public/style.css +++ /dev/null @@ -1,141 +0,0 @@ -body { - margin: 0; - padding: 80px 100px; - font: 13px "Helvetica Neue", "Lucida Grande", "Arial"; - background: #ECE9E9 -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#ECE9E9)); - background: #ECE9E9 -moz-linear-gradient(top, #fff, #ECE9E9); - background-repeat: no-repeat; - color: #555; - -webkit-font-smoothing: antialiased; -} -h1, h2, h3 { - margin: 0; - font-size: 22px; - color: #343434; -} -h1 em, h2 em { - padding: 0 5px; - font-weight: normal; -} -h1 { - font-size: 60px; -} -h2 { - margin-top: 10px; -} -h3 { - margin: 5px 0 10px 0; - padding-bottom: 5px; - border-bottom: 1px solid #eee; - font-size: 18px; -} -ul { - margin: 0; - padding: 0; -} -ul li { - margin: 5px 0; - padding: 3px 8px; - list-style: none; -} -ul li:hover { - cursor: pointer; - color: #2e2e2e; -} -ul li .path { - padding-left: 5px; - font-weight: bold; -} -ul li .line { - padding-right: 5px; - font-style: italic; -} -ul li:first-child .path { - padding-left: 0; -} -p { - line-height: 1.5; -} -a { - color: #555; - text-decoration: none; -} -a:hover { - color: #303030; -} -#stacktrace { - margin-top: 15px; -} -.directory h1 { - margin-bottom: 15px; - font-size: 18px; -} -ul#files { - width: 100%; - height: 500px; -} -ul#files li { - padding: 0; -} -ul#files li img { - position: absolute; - top: 5px; - left: 5px; -} -ul#files li a { - position: relative; - display: block; - margin: 1px; - width: 30%; - height: 25px; - line-height: 25px; - text-indent: 8px; - float: left; - border: 1px solid transparent; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; - overflow: hidden; - text-overflow: ellipsis; -} -ul#files li a.icon { - text-indent: 25px; -} -ul#files li a:focus, -ul#files li a:hover { - outline: none; - background: rgba(255,255,255,0.65); - border: 1px solid #ececec; -} -ul#files li a.highlight { - -webkit-transition: background .4s ease-in-out; - background: #ffff4f; - border-color: #E9DC51; -} -#search { - display: block; - position: fixed; - top: 20px; - right: 20px; - width: 90px; - -webkit-transition: width ease 0.2s, opacity ease 0.4s; - -moz-transition: width ease 0.2s, opacity ease 0.4s; - -webkit-border-radius: 32px; - -moz-border-radius: 32px; - -webkit-box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.25), inset 0px 1px 3px rgba(0, 0, 0, 0.7), 0px 1px 0px rgba(255, 255, 255, 0.03); - -moz-box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.25), inset 0px 1px 3px rgba(0, 0, 0, 0.7), 0px 1px 0px rgba(255, 255, 255, 0.03); - -webkit-font-smoothing: antialiased; - text-align: left; - font: 13px "Helvetica Neue", Arial, sans-serif; - padding: 4px 10px; - border: none; - background: transparent; - margin-bottom: 0; - outline: none; - opacity: 0.7; - color: #888; -} -#search:focus { - width: 120px; - opacity: 1.0; -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/utils.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/utils.js deleted file mode 100644 index 2200dcef..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib-cov/utils.js +++ /dev/null @@ -1,282 +0,0 @@ -/* automatically generated by JSCoverage - do not edit */ -if (typeof _$jscoverage === 'undefined') _$jscoverage = {}; -if (! _$jscoverage['utils.js']) { - _$jscoverage['utils.js'] = []; - _$jscoverage['utils.js'][13] = 0; - _$jscoverage['utils.js'][26] = 0; - _$jscoverage['utils.js'][27] = 0; - _$jscoverage['utils.js'][39] = 0; - _$jscoverage['utils.js'][40] = 0; - _$jscoverage['utils.js'][41] = 0; - _$jscoverage['utils.js'][54] = 0; - _$jscoverage['utils.js'][55] = 0; - _$jscoverage['utils.js'][56] = 0; - _$jscoverage['utils.js'][57] = 0; - _$jscoverage['utils.js'][73] = 0; - _$jscoverage['utils.js'][74] = 0; - _$jscoverage['utils.js'][95] = 0; - _$jscoverage['utils.js'][96] = 0; - _$jscoverage['utils.js'][97] = 0; - _$jscoverage['utils.js'][98] = 0; - _$jscoverage['utils.js'][101] = 0; - _$jscoverage['utils.js'][112] = 0; - _$jscoverage['utils.js'][113] = 0; - _$jscoverage['utils.js'][132] = 0; - _$jscoverage['utils.js'][133] = 0; - _$jscoverage['utils.js'][147] = 0; - _$jscoverage['utils.js'][148] = 0; - _$jscoverage['utils.js'][149] = 0; - _$jscoverage['utils.js'][166] = 0; - _$jscoverage['utils.js'][167] = 0; - _$jscoverage['utils.js'][168] = 0; - _$jscoverage['utils.js'][169] = 0; - _$jscoverage['utils.js'][184] = 0; - _$jscoverage['utils.js'][185] = 0; - _$jscoverage['utils.js'][186] = 0; - _$jscoverage['utils.js'][187] = 0; - _$jscoverage['utils.js'][188] = 0; - _$jscoverage['utils.js'][189] = 0; - _$jscoverage['utils.js'][190] = 0; - _$jscoverage['utils.js'][191] = 0; - _$jscoverage['utils.js'][192] = 0; - _$jscoverage['utils.js'][196] = 0; - _$jscoverage['utils.js'][208] = 0; - _$jscoverage['utils.js'][209] = 0; - _$jscoverage['utils.js'][222] = 0; - _$jscoverage['utils.js'][223] = 0; - _$jscoverage['utils.js'][224] = 0; - _$jscoverage['utils.js'][225] = 0; - _$jscoverage['utils.js'][226] = 0; - _$jscoverage['utils.js'][228] = 0; - _$jscoverage['utils.js'][239] = 0; - _$jscoverage['utils.js'][240] = 0; - _$jscoverage['utils.js'][241] = 0; - _$jscoverage['utils.js'][242] = 0; - _$jscoverage['utils.js'][267] = 0; - _$jscoverage['utils.js'][276] = 0; - _$jscoverage['utils.js'][277] = 0; - _$jscoverage['utils.js'][278] = 0; - _$jscoverage['utils.js'][279] = 0; - _$jscoverage['utils.js'][292] = 0; - _$jscoverage['utils.js'][293] = 0; - _$jscoverage['utils.js'][305] = 0; - _$jscoverage['utils.js'][306] = 0; - _$jscoverage['utils.js'][307] = 0; - _$jscoverage['utils.js'][308] = 0; - _$jscoverage['utils.js'][319] = 0; - _$jscoverage['utils.js'][320] = 0; - _$jscoverage['utils.js'][321] = 0; - _$jscoverage['utils.js'][322] = 0; - _$jscoverage['utils.js'][334] = 0; - _$jscoverage['utils.js'][335] = 0; - _$jscoverage['utils.js'][346] = 0; - _$jscoverage['utils.js'][347] = 0; - _$jscoverage['utils.js'][350] = 0; - _$jscoverage['utils.js'][351] = 0; - _$jscoverage['utils.js'][355] = 0; - _$jscoverage['utils.js'][358] = 0; - _$jscoverage['utils.js'][369] = 0; - _$jscoverage['utils.js'][370] = 0; - _$jscoverage['utils.js'][371] = 0; - _$jscoverage['utils.js'][372] = 0; - _$jscoverage['utils.js'][374] = 0; - _$jscoverage['utils.js'][386] = 0; -} -_$jscoverage['utils.js'][13]++; -var http = require("http"), crypto = require("crypto"), parse = require("url").parse, signature = require("cookie-signature"); -_$jscoverage['utils.js'][26]++; -exports.hasBody = (function (req) { - _$jscoverage['utils.js'][27]++; - return "transfer-encoding" in req.headers || "content-length" in req.headers; -}); -_$jscoverage['utils.js'][39]++; -exports.mime = (function (req) { - _$jscoverage['utils.js'][40]++; - var str = req.headers["content-type"] || ""; - _$jscoverage['utils.js'][41]++; - return str.split(";")[0]; -}); -_$jscoverage['utils.js'][54]++; -exports.error = (function (code, msg) { - _$jscoverage['utils.js'][55]++; - var err = new Error(msg || http.STATUS_CODES[code]); - _$jscoverage['utils.js'][56]++; - err.status = code; - _$jscoverage['utils.js'][57]++; - return err; -}); -_$jscoverage['utils.js'][73]++; -exports.md5 = (function (str, encoding) { - _$jscoverage['utils.js'][74]++; - return crypto.createHash("md5").update(str).digest(encoding || "hex"); -}); -_$jscoverage['utils.js'][95]++; -exports.merge = (function (a, b) { - _$jscoverage['utils.js'][96]++; - if (a && b) { - _$jscoverage['utils.js'][97]++; - for (var key in b) { - _$jscoverage['utils.js'][98]++; - a[key] = b[key]; -} - } - _$jscoverage['utils.js'][101]++; - return a; -}); -_$jscoverage['utils.js'][112]++; -exports.escape = (function (html) { - _$jscoverage['utils.js'][113]++; - return String(html).replace(/&(?!\w+;)/g, "&").replace(//g, ">").replace(/"/g, """); -}); -_$jscoverage['utils.js'][132]++; -exports.uid = (function (len) { - _$jscoverage['utils.js'][133]++; - return crypto.randomBytes(Math.ceil(len * 3 / 4)).toString("base64").slice(0, len); -}); -_$jscoverage['utils.js'][147]++; -exports.sign = (function (val, secret) { - _$jscoverage['utils.js'][148]++; - console.warn("do not use utils.sign(), use https://github.com/visionmedia/node-cookie-signature"); - _$jscoverage['utils.js'][149]++; - return val + "." + crypto.createHmac("sha256", secret).update(val).digest("base64").replace(/=+$/, ""); -}); -_$jscoverage['utils.js'][166]++; -exports.unsign = (function (val, secret) { - _$jscoverage['utils.js'][167]++; - console.warn("do not use utils.unsign(), use https://github.com/visionmedia/node-cookie-signature"); - _$jscoverage['utils.js'][168]++; - var str = val.slice(0, val.lastIndexOf(".")); - _$jscoverage['utils.js'][169]++; - return exports.sign(str, secret) == val? str: false; -}); -_$jscoverage['utils.js'][184]++; -exports.parseSignedCookies = (function (obj, secret) { - _$jscoverage['utils.js'][185]++; - var ret = {}; - _$jscoverage['utils.js'][186]++; - Object.keys(obj).forEach((function (key) { - _$jscoverage['utils.js'][187]++; - var val = obj[key]; - _$jscoverage['utils.js'][188]++; - if (0 == val.indexOf("s:")) { - _$jscoverage['utils.js'][189]++; - val = signature.unsign(val.slice(2), secret); - _$jscoverage['utils.js'][190]++; - if (val) { - _$jscoverage['utils.js'][191]++; - ret[key] = val; - _$jscoverage['utils.js'][192]++; - delete obj[key]; - } - } -})); - _$jscoverage['utils.js'][196]++; - return ret; -}); -_$jscoverage['utils.js'][208]++; -exports.parseSignedCookie = (function (str, secret) { - _$jscoverage['utils.js'][209]++; - return 0 == str.indexOf("s:")? signature.unsign(str.slice(2), secret): str; -}); -_$jscoverage['utils.js'][222]++; -exports.parseJSONCookies = (function (obj) { - _$jscoverage['utils.js'][223]++; - Object.keys(obj).forEach((function (key) { - _$jscoverage['utils.js'][224]++; - var val = obj[key]; - _$jscoverage['utils.js'][225]++; - var res = exports.parseJSONCookie(val); - _$jscoverage['utils.js'][226]++; - if (res) { - _$jscoverage['utils.js'][226]++; - obj[key] = res; - } -})); - _$jscoverage['utils.js'][228]++; - return obj; -}); -_$jscoverage['utils.js'][239]++; -exports.parseJSONCookie = (function (str) { - _$jscoverage['utils.js'][240]++; - if (0 == str.indexOf("j:")) { - _$jscoverage['utils.js'][241]++; - try { - _$jscoverage['utils.js'][242]++; - return JSON.parse(str.slice(2)); - } - catch (err) { - } - } -}); -_$jscoverage['utils.js'][267]++; -exports.pause = require("pause"); -_$jscoverage['utils.js'][276]++; -exports.removeContentHeaders = (function (res) { - _$jscoverage['utils.js'][277]++; - Object.keys(res._headers).forEach((function (field) { - _$jscoverage['utils.js'][278]++; - if (0 == field.indexOf("content")) { - _$jscoverage['utils.js'][279]++; - res.removeHeader(field); - } -})); -}); -_$jscoverage['utils.js'][292]++; -exports.conditionalGET = (function (req) { - _$jscoverage['utils.js'][293]++; - return req.headers["if-modified-since"] || req.headers["if-none-match"]; -}); -_$jscoverage['utils.js'][305]++; -exports.unauthorized = (function (res, realm) { - _$jscoverage['utils.js'][306]++; - res.statusCode = 401; - _$jscoverage['utils.js'][307]++; - res.setHeader("WWW-Authenticate", "Basic realm=\"" + realm + "\""); - _$jscoverage['utils.js'][308]++; - res.end("Unauthorized"); -}); -_$jscoverage['utils.js'][319]++; -exports.notModified = (function (res) { - _$jscoverage['utils.js'][320]++; - exports.removeContentHeaders(res); - _$jscoverage['utils.js'][321]++; - res.statusCode = 304; - _$jscoverage['utils.js'][322]++; - res.end(); -}); -_$jscoverage['utils.js'][334]++; -exports.etag = (function (stat) { - _$jscoverage['utils.js'][335]++; - return "\"" + stat.size + "-" + Number(stat.mtime) + "\""; -}); -_$jscoverage['utils.js'][346]++; -exports.parseCacheControl = (function (str) { - _$jscoverage['utils.js'][347]++; - var directives = str.split(","), obj = {}; - _$jscoverage['utils.js'][350]++; - for (var i = 0, len = directives.length; i < len; i++) { - _$jscoverage['utils.js'][351]++; - var parts = directives[i].split("="), key = parts.shift().trim(), val = parseInt(parts.shift(), 10); - _$jscoverage['utils.js'][355]++; - obj[key] = isNaN(val)? true: val; -} - _$jscoverage['utils.js'][358]++; - return obj; -}); -_$jscoverage['utils.js'][369]++; -exports.parseUrl = (function (req) { - _$jscoverage['utils.js'][370]++; - var parsed = req._parsedUrl; - _$jscoverage['utils.js'][371]++; - if (parsed && parsed.href == req.url) { - _$jscoverage['utils.js'][372]++; - return parsed; - } - else { - _$jscoverage['utils.js'][374]++; - return req._parsedUrl = parse(req.url); - } -}); -_$jscoverage['utils.js'][386]++; -exports.parseBytes = require("bytes"); -_$jscoverage['utils.js'].source = ["","/*!"," * Connect - utils"," * Copyright(c) 2010 Sencha Inc."," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var http = require('http')"," , crypto = require('crypto')"," , parse = require('url').parse"," , signature = require('cookie-signature');","","/**"," * Return `true` if the request has a body, otherwise return `false`."," *"," * @param {IncomingMessage} req"," * @return {Boolean}"," * @api private"," */","","exports.hasBody = function(req) {"," return 'transfer-encoding' in req.headers || 'content-length' in req.headers;","};","","/**"," * Extract the mime type from the given request's"," * _Content-Type_ header."," *"," * @param {IncomingMessage} req"," * @return {String}"," * @api private"," */","","exports.mime = function(req) {"," var str = req.headers['content-type'] || '';"," return str.split(';')[0];","};","","/**"," * Generate an `Error` from the given status `code`"," * and optional `msg`."," *"," * @param {Number} code"," * @param {String} msg"," * @return {Error}"," * @api private"," */","","exports.error = function(code, msg){"," var err = new Error(msg || http.STATUS_CODES[code]);"," err.status = code;"," return err;","};","","/**"," * Return md5 hash of the given string and optional encoding,"," * defaulting to hex."," *"," * utils.md5('wahoo');"," * // => \"e493298061761236c96b02ea6aa8a2ad\""," *"," * @param {String} str"," * @param {String} encoding"," * @return {String}"," * @api private"," */","","exports.md5 = function(str, encoding){"," return crypto"," .createHash('md5')"," .update(str)"," .digest(encoding || 'hex');","};","","/**"," * Merge object b with object a."," *"," * var a = { foo: 'bar' }"," * , b = { bar: 'baz' };"," * "," * utils.merge(a, b);"," * // => { foo: 'bar', bar: 'baz' }"," *"," * @param {Object} a"," * @param {Object} b"," * @return {Object}"," * @api private"," */","","exports.merge = function(a, b){"," if (a && b) {"," for (var key in b) {"," a[key] = b[key];"," }"," }"," return a;","};","","/**"," * Escape the given string of `html`."," *"," * @param {String} html"," * @return {String}"," * @api private"," */","","exports.escape = function(html){"," return String(html)"," .replace(/&(?!\\w+;)/g, '&amp;')"," .replace(/</g, '&lt;')"," .replace(/>/g, '&gt;')"," .replace(/\"/g, '&quot;');","};","","","/**"," * Return a unique identifier with the given `len`."," *"," * utils.uid(10);"," * // => \"FDaS435D2z\""," *"," * @param {Number} len"," * @return {String}"," * @api private"," */","","exports.uid = function(len) {"," return crypto.randomBytes(Math.ceil(len * 3 / 4))"," .toString('base64')"," .slice(0, len);","};","","/**"," * Sign the given `val` with `secret`."," *"," * @param {String} val"," * @param {String} secret"," * @return {String}"," * @api private"," */","","exports.sign = function(val, secret){"," console.warn('do not use utils.sign(), use https://github.com/visionmedia/node-cookie-signature')"," 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){"," console.warn('do not use utils.unsign(), use https://github.com/visionmedia/node-cookie-signature')"," var str = val.slice(0, val.lastIndexOf('.'));"," return exports.sign(str, secret) == val"," ? str"," : false;","};","","/**"," * Parse signed cookies, returning an object"," * containing the decoded key/value pairs,"," * while removing the signed key from `obj`."," *"," * @param {Object} obj"," * @return {Object}"," * @api private"," */","","exports.parseSignedCookies = function(obj, secret){"," var ret = {};"," Object.keys(obj).forEach(function(key){"," var val = obj[key];"," if (0 == val.indexOf('s:')) {"," val = signature.unsign(val.slice(2), secret);"," if (val) {"," ret[key] = val;"," delete obj[key];"," }"," }"," });"," return ret;","};","","/**"," * Parse a signed cookie string, return the decoded value"," *"," * @param {String} str signed cookie string"," * @param {String} secret"," * @return {String} decoded value"," * @api private"," */","","exports.parseSignedCookie = function(str, secret){"," return 0 == str.indexOf('s:')"," ? signature.unsign(str.slice(2), secret)"," : str;","};","","/**"," * Parse JSON cookies."," *"," * @param {Object} obj"," * @return {Object}"," * @api private"," */","","exports.parseJSONCookies = function(obj){"," Object.keys(obj).forEach(function(key){"," var val = obj[key];"," var res = exports.parseJSONCookie(val);"," if (res) obj[key] = res;"," });"," return obj;","};","","/**"," * Parse JSON cookie string"," *"," * @param {String} str"," * @return {Object} Parsed object or null if not json cookie"," * @api private"," */","","exports.parseJSONCookie = function(str) {"," if (0 == str.indexOf('j:')) {"," try {"," return JSON.parse(str.slice(2));"," } catch (err) {"," // no op"," }"," }","};","","/**"," * Pause `data` and `end` events on the given `obj`."," * Middleware performing async tasks _should_ utilize"," * this utility (or similar), to re-emit data once"," * the async operation has completed, otherwise these"," * events may be lost."," *"," * var pause = utils.pause(req);"," * fs.readFile(path, function(){"," * next();"," * pause.resume();"," * });"," *"," * @param {Object} obj"," * @return {Object}"," * @api private"," */","","exports.pause = require('pause');","","/**"," * Strip `Content-*` headers from `res`."," *"," * @param {ServerResponse} res"," * @api private"," */","","exports.removeContentHeaders = function(res){"," Object.keys(res._headers).forEach(function(field){"," if (0 == field.indexOf('content')) {"," res.removeHeader(field);"," }"," });","};","","/**"," * Check if `req` is a conditional GET request."," *"," * @param {IncomingMessage} req"," * @return {Boolean}"," * @api private"," */","","exports.conditionalGET = function(req) {"," return req.headers['if-modified-since']"," || req.headers['if-none-match'];","};","","/**"," * Respond with 401 \"Unauthorized\"."," *"," * @param {ServerResponse} res"," * @param {String} realm"," * @api private"," */","","exports.unauthorized = function(res, realm) {"," res.statusCode = 401;"," res.setHeader('WWW-Authenticate', 'Basic realm=\"' + realm + '\"');"," res.end('Unauthorized');","};","","/**"," * Respond with 304 \"Not Modified\"."," *"," * @param {ServerResponse} res"," * @param {Object} headers"," * @api private"," */","","exports.notModified = function(res) {"," exports.removeContentHeaders(res);"," res.statusCode = 304;"," res.end();","};","","/**"," * Return an ETag in the form of `\"<size>-<mtime>\"`"," * from the given `stat`."," *"," * @param {Object} stat"," * @return {String}"," * @api private"," */","","exports.etag = function(stat) {"," return '\"' + stat.size + '-' + Number(stat.mtime) + '\"';","};","","/**"," * Parse the given Cache-Control `str`."," *"," * @param {String} str"," * @return {Object}"," * @api private"," */","","exports.parseCacheControl = function(str){"," var directives = str.split(',')"," , obj = {};",""," for(var i = 0, len = directives.length; i < len; i++) {"," var parts = directives[i].split('=')"," , key = parts.shift().trim()"," , val = parseInt(parts.shift(), 10);",""," obj[key] = isNaN(val) ? true : val;"," }",""," return obj;","};","","/**"," * Parse the `req` url with memoization."," *"," * @param {ServerRequest} req"," * @return {Object}"," * @api private"," */","","exports.parseUrl = function(req){"," var parsed = req._parsedUrl;"," if (parsed && parsed.href == req.url) {"," return parsed;"," } else {"," return req._parsedUrl = parse(req.url);"," }","};","","/**"," * Parse byte `size` string."," *"," * @param {String} size"," * @return {Number}"," * @api private"," */","","exports.parseBytes = require('bytes');"]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/cache.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/cache.js deleted file mode 100644 index 052fcdb3..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/cache.js +++ /dev/null @@ -1,81 +0,0 @@ - -/*! - * Connect - Cache - * Copyright(c) 2011 Sencha Inc. - * MIT Licensed - */ - -/** - * Expose `Cache`. - */ - -module.exports = Cache; - -/** - * LRU cache store. - * - * @param {Number} limit - * @api private - */ - -function Cache(limit) { - this.store = {}; - this.keys = []; - this.limit = limit; -} - -/** - * Touch `key`, promoting the object. - * - * @param {String} key - * @param {Number} i - * @api private - */ - -Cache.prototype.touch = function(key, i){ - this.keys.splice(i,1); - this.keys.push(key); -}; - -/** - * Remove `key`. - * - * @param {String} key - * @api private - */ - -Cache.prototype.remove = function(key){ - delete this.store[key]; -}; - -/** - * Get the object stored for `key`. - * - * @param {String} key - * @return {Array} - * @api private - */ - -Cache.prototype.get = function(key){ - return this.store[key]; -}; - -/** - * Add a cache `key`. - * - * @param {String} key - * @return {Array} - * @api private - */ - -Cache.prototype.add = function(key){ - // initialize store - var len = this.keys.push(key); - - // limit reached, invalidate LRU - if (len > this.limit) this.remove(this.keys.shift()); - - var arr = this.store[key] = []; - arr.createdAt = new Date; - return arr; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/connect.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/connect.js deleted file mode 100644 index a067e249..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/connect.js +++ /dev/null @@ -1,93 +0,0 @@ - -/*! - * Connect - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , proto = require('./proto') - , utils = require('./utils') - , path = require('path') - , basename = path.basename - , fs = require('fs'); - -// node patches - -require('./patch'); - -// expose createServer() as the module - -exports = module.exports = createServer; - -/** - * Framework version. - */ - -exports.version = '2.7.2'; - -/** - * Expose mime module. - */ - -exports.mime = require('./middleware/static').mime; - -/** - * Expose the prototype. - */ - -exports.proto = proto; - -/** - * Auto-load middleware getters. - */ - -exports.middleware = {}; - -/** - * Expose utilities. - */ - -exports.utils = utils; - -/** - * Create a new connect server. - * - * @return {Function} - * @api public - */ - -function createServer() { - function app(req, res){ app.handle(req, res); } - utils.merge(app, proto); - utils.merge(app, EventEmitter.prototype); - app.route = '/'; - app.stack = []; - for (var i = 0; i < arguments.length; ++i) { - app.use(arguments[i]); - } - return app; -}; - -/** - * Support old `.createServer()` method. - */ - -createServer.createServer = createServer; - -/** - * Auto-load bundled middleware with getters. - */ - -fs.readdirSync(__dirname + '/middleware').forEach(function(filename){ - if (!/\.js$/.test(filename)) return; - var name = basename(filename, '.js'); - function load(){ return require('./middleware/' + name); } - exports.middleware.__defineGetter__(name, load); - exports.__defineGetter__(name, load); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/index.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/index.js deleted file mode 100644 index 2618ddca..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/index.js +++ /dev/null @@ -1,50 +0,0 @@ - -/** - * Connect is a middleware framework for node, - * shipping with over 18 bundled middleware and a rich selection of - * 3rd-party middleware. - * - * var app = connect() - * .use(connect.logger('dev')) - * .use(connect.static('public')) - * .use(function(req, res){ - * res.end('hello world\n'); - * }) - * .listen(3000); - * - * Installation: - * - * $ npm install connect - * - * Middleware: - * - * - [logger](logger.html) request logger with custom format support - * - [csrf](csrf.html) Cross-site request forgery protection - * - [compress](compress.html) Gzip compression middleware - * - [basicAuth](basicAuth.html) basic http authentication - * - [bodyParser](bodyParser.html) extensible request body parser - * - [json](json.html) application/json parser - * - [urlencoded](urlencoded.html) application/x-www-form-urlencoded parser - * - [multipart](multipart.html) multipart/form-data parser - * - [timeout](timeout.html) request timeouts - * - [cookieParser](cookieParser.html) cookie parser - * - [session](session.html) session management support with bundled MemoryStore - * - [cookieSession](cookieSession.html) cookie-based session support - * - [methodOverride](methodOverride.html) faux HTTP method support - * - [responseTime](responseTime.html) calculates response-time and exposes via X-Response-Time - * - [staticCache](staticCache.html) memory cache layer for the static() middleware - * - [static](static.html) streaming static file server supporting `Range` and more - * - [directory](directory.html) directory listing middleware - * - [vhost](vhost.html) virtual host sub-domain mapping middleware - * - [favicon](favicon.html) efficient favicon server (with default icon) - * - [limit](limit.html) limit the bytesize of request bodies - * - [query](query.html) automatic querystring parser, populating `req.query` - * - [errorHandler](errorHandler.html) flexible error handler - * - * Links: - * - * - list of [3rd-party](https://github.com/senchalabs/connect/wiki) middleware - * - GitHub [repository](http://github.com/senchalabs/connect) - * - [test documentation](https://github.com/senchalabs/connect/blob/gh-pages/tests.md) - * - */ \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/basicAuth.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/basicAuth.js deleted file mode 100644 index 0205812f..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/basicAuth.js +++ /dev/null @@ -1,103 +0,0 @@ - -/*! - * Connect - basicAuth - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils') - , unauthorized = utils.unauthorized; - -/** - * Basic Auth: - * - * Enfore basic authentication by providing a `callback(user, pass)`, - * which must return `true` in order to gain access. Alternatively an async - * method is provided as well, invoking `callback(user, pass, callback)`. Populates - * `req.user`. The final alternative is simply passing username / password - * strings. - * - * Simple username and password - * - * connect(connect.basicAuth('username', 'password')); - * - * Callback verification - * - * connect() - * .use(connect.basicAuth(function(user, pass){ - * return 'tj' == user & 'wahoo' == pass; - * })) - * - * Async callback verification, accepting `fn(err, user)`. - * - * connect() - * .use(connect.basicAuth(function(user, pass, fn){ - * User.authenticate({ user: user, pass: pass }, fn); - * })) - * - * @param {Function|String} callback or username - * @param {String} realm - * @api public - */ - -module.exports = function basicAuth(callback, realm) { - var username, password; - - // user / pass strings - if ('string' == typeof callback) { - username = callback; - password = realm; - if ('string' != typeof password) throw new Error('password argument required'); - realm = arguments[2]; - callback = function(user, pass){ - return user == username && pass == password; - } - } - - realm = realm || 'Authorization Required'; - - return function(req, res, next) { - var authorization = req.headers.authorization; - - if (req.user) return next(); - if (!authorization) return unauthorized(res, realm); - - var parts = authorization.split(' '); - - if (parts.length !== 2) return next(400); - - var scheme = parts[0] - , credentials = new Buffer(parts[1], 'base64').toString() - , index = credentials.indexOf(':'); - - if ('Basic' != scheme || index < 0) return next(400); - - var user = credentials.slice(0, index) - , pass = credentials.slice(index + 1); - - // async - if (callback.length >= 3) { - var pause = utils.pause(req); - callback(user, pass, function(err, user){ - if (err || !user) return unauthorized(res, realm); - req.user = req.remoteUser = user; - next(); - pause.resume(); - }); - // sync - } else { - if (callback(user, pass)) { - req.user = req.remoteUser = user; - next(); - } else { - unauthorized(res, realm); - } - } - } -}; - diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js deleted file mode 100644 index 9f692cdc..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js +++ /dev/null @@ -1,61 +0,0 @@ - -/*! - * Connect - bodyParser - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var multipart = require('./multipart') - , urlencoded = require('./urlencoded') - , json = require('./json'); - -/** - * Body parser: - * - * Parse request bodies, supports _application/json_, - * _application/x-www-form-urlencoded_, and _multipart/form-data_. - * - * This is equivalent to: - * - * app.use(connect.json()); - * app.use(connect.urlencoded()); - * app.use(connect.multipart()); - * - * Examples: - * - * connect() - * .use(connect.bodyParser()) - * .use(function(req, res) { - * res.end('viewing user ' + req.body.user.name); - * }); - * - * $ curl -d 'user[name]=tj' http://local/ - * $ curl -d '{"user":{"name":"tj"}}' -H "Content-Type: application/json" http://local/ - * - * View [json](json.html), [urlencoded](urlencoded.html), and [multipart](multipart.html) for more info. - * - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function bodyParser(options){ - var _urlencoded = urlencoded(options) - , _multipart = multipart(options) - , _json = json(options); - - return function bodyParser(req, res, next) { - _json(req, res, function(err){ - if (err) return next(err); - _urlencoded(req, res, function(err){ - if (err) return next(err); - _multipart(req, res, next); - }); - }); - } -}; \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/compress.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/compress.js deleted file mode 100644 index 2dc64371..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/compress.js +++ /dev/null @@ -1,147 +0,0 @@ -/*! - * Connect - compress - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var zlib = require('zlib'); - -/** - * Supported content-encoding methods. - */ - -exports.methods = { - gzip: zlib.createGzip - , deflate: zlib.createDeflate -}; - -/** - * Default filter function. - */ - -exports.filter = function(req, res){ - return /json|text|javascript/.test(res.getHeader('Content-Type')); -}; - -/** - * Compress: - * - * Compress response data with gzip/deflate. - * - * Filter: - * - * A `filter` callback function may be passed to - * replace the default logic of: - * - * exports.filter = function(req, res){ - * return /json|text|javascript/.test(res.getHeader('Content-Type')); - * }; - * - * Options: - * - * All remaining options are passed to the gzip/deflate - * creation functions. Consult node's docs for additional details. - * - * - `chunkSize` (default: 16*1024) - * - `windowBits` - * - `level`: 0-9 where 0 is no compression, and 9 is slow but best compression - * - `memLevel`: 1-9 low is slower but uses less memory, high is fast but uses more - * - `strategy`: compression strategy - * - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function compress(options) { - options = options || {}; - var names = Object.keys(exports.methods) - , filter = options.filter || exports.filter; - - return function(req, res, next){ - var accept = req.headers['accept-encoding'] - , write = res.write - , end = res.end - , stream - , method; - - // vary - res.setHeader('Vary', 'Accept-Encoding'); - - // proxy - - res.write = function(chunk, encoding){ - if (!this.headerSent) this._implicitHeader(); - return stream - ? stream.write(new Buffer(chunk, encoding)) - : write.call(res, chunk, encoding); - }; - - res.end = function(chunk, encoding){ - if (chunk) this.write(chunk, encoding); - return stream - ? stream.end() - : end.call(res); - }; - - res.on('header', function(){ - var encoding = res.getHeader('Content-Encoding') || 'identity'; - - // already encoded - if ('identity' != encoding) return; - - // default request filter - if (!filter(req, res)) return; - - // SHOULD use identity - if (!accept) return; - - // head - if ('HEAD' == req.method) return; - - // default to gzip - if ('*' == accept.trim()) method = 'gzip'; - - // compression method - if (!method) { - for (var i = 0, len = names.length; i < len; ++i) { - if (~accept.indexOf(names[i])) { - method = names[i]; - break; - } - } - } - - // compression method - if (!method) return; - - // compression stream - stream = exports.methods[method](options); - - // header fields - res.setHeader('Content-Encoding', method); - res.removeHeader('Content-Length'); - - // compression - - stream.on('data', function(chunk){ - write.call(res, chunk); - }); - - stream.on('end', function(){ - end.call(res); - }); - - stream.on('drain', function() { - res.emit('drain'); - }); - }); - - next(); - }; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/cookieParser.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/cookieParser.js deleted file mode 100644 index 5da23f25..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/cookieParser.js +++ /dev/null @@ -1,62 +0,0 @@ - -/*! - * Connect - cookieParser - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('./../utils') - , cookie = require('cookie'); - -/** - * Cookie parser: - * - * Parse _Cookie_ header and populate `req.cookies` - * with an object keyed by the cookie names. Optionally - * you may enabled signed cookie support by passing - * a `secret` string, which assigns `req.secret` so - * it may be used by other middleware. - * - * Examples: - * - * connect() - * .use(connect.cookieParser('optional secret string')) - * .use(function(req, res, next){ - * res.end(JSON.stringify(req.cookies)); - * }) - * - * @param {String} secret - * @return {Function} - * @api public - */ - -module.exports = function cookieParser(secret){ - return function cookieParser(req, res, next) { - if (req.cookies) return next(); - var cookies = req.headers.cookie; - - req.secret = secret; - req.cookies = {}; - req.signedCookies = {}; - - if (cookies) { - try { - req.cookies = cookie.parse(cookies); - if (secret) { - req.signedCookies = utils.parseSignedCookies(req.cookies, secret); - req.signedCookies = utils.parseJSONCookies(req.signedCookies); - } - req.cookies = utils.parseJSONCookies(req.cookies); - } catch (err) { - err.status = 400; - return next(err); - } - } - next(); - }; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/cookieSession.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/cookieSession.js deleted file mode 100644 index 1a23d57a..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/cookieSession.js +++ /dev/null @@ -1,115 +0,0 @@ - -/*! - * Connect - cookieSession - * Copyright(c) 2011 Sencha Inc. - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('./../utils') - , Cookie = require('./session/cookie') - , debug = require('debug')('connect:cookieSession') - , signature = require('cookie-signature') - , crc32 = require('buffer-crc32'); - -/** - * Cookie Session: - * - * Cookie session middleware. - * - * var app = connect(); - * app.use(connect.cookieParser()); - * app.use(connect.cookieSession({ secret: 'tobo!', cookie: { maxAge: 60 * 60 * 1000 }})); - * - * Options: - * - * - `key` cookie name defaulting to `connect.sess` - * - `secret` prevents cookie tampering - * - `cookie` session cookie settings, defaulting to `{ path: '/', httpOnly: true, maxAge: null }` - * - `proxy` trust the reverse proxy when setting secure cookies (via "x-forwarded-proto") - * - * Clearing sessions: - * - * To clear the session simply set its value to `null`, - * `cookieSession()` will then respond with a 1970 Set-Cookie. - * - * req.session = null; - * - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function cookieSession(options){ - // TODO: utilize Session/Cookie to unify API - options = options || {}; - var key = options.key || 'connect.sess' - , trustProxy = options.proxy; - - return function cookieSession(req, res, next) { - - // req.secret is for backwards compatibility - var secret = options.secret || req.secret; - if (!secret) throw new Error('`secret` option required for cookie sessions'); - - // default session - req.session = {}; - var cookie = req.session.cookie = new Cookie(options.cookie); - - // pathname mismatch - if (0 != req.originalUrl.indexOf(cookie.path)) return next(); - - // cookieParser secret - if (!options.secret && req.secret) { - req.session = req.signedCookies[key] || {}; - } else { - // TODO: refactor - var rawCookie = req.cookies[key]; - if (rawCookie) { - var unsigned = utils.parseSignedCookie(rawCookie, secret); - if (unsigned) { - var originalHash = crc32.signed(unsigned); - req.session = utils.parseJSONCookie(unsigned) || {}; - } - } - } - - res.on('header', function(){ - // removed - if (!req.session) { - debug('clear session'); - cookie.expires = new Date(0); - res.setHeader('Set-Cookie', cookie.serialize(key, '')); - return; - } - - delete req.session.cookie; - - // check security - var proto = (req.headers['x-forwarded-proto'] || '').toLowerCase() - , tls = req.connection.encrypted || (trustProxy && 'https' == proto) - , secured = cookie.secure && tls; - - // only send secure cookies via https - if (cookie.secure && !secured) return debug('not secured'); - - // serialize - debug('serializing %j', req.session); - var val = 'j:' + JSON.stringify(req.session); - - // compare hashes, no need to set-cookie if unchanged - if (originalHash == crc32.signed(val)) return debug('unmodified session'); - - // set-cookie - val = 's:' + signature.sign(val, secret); - val = cookie.serialize(key, val); - debug('set-cookie %j', cookie); - res.setHeader('Set-Cookie', val); - }); - - next(); - }; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/csrf.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/csrf.js deleted file mode 100644 index 5d5e7c63..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/csrf.js +++ /dev/null @@ -1,73 +0,0 @@ -/*! - * Connect - csrf - * Copyright(c) 2011 Sencha Inc. - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils'); - -/** - * Anti CSRF: - * - * CRSF protection middleware. - * - * By default this middleware generates a token named "_csrf" - * which should be added to requests which mutate - * state, within a hidden form field, query-string etc. This - * token is validated against the visitor's `req.session._csrf` - * property. - * - * The default `value` function checks `req.body` generated - * by the `bodyParser()` middleware, `req.query` generated - * by `query()`, and the "X-CSRF-Token" header field. - * - * This middleware requires session support, thus should be added - * somewhere _below_ `session()` and `cookieParser()`. - * - * Options: - * - * - `value` a function accepting the request, returning the token - * - * @param {Object} options - * @api public - */ - -module.exports = function csrf(options) { - options = options || {}; - var value = options.value || defaultValue; - - return function(req, res, next){ - // generate CSRF token - var token = req.session._csrf || (req.session._csrf = utils.uid(24)); - - // ignore these methods - if ('GET' == req.method || 'HEAD' == req.method || 'OPTIONS' == req.method) return next(); - - // determine value - var val = value(req); - - // check - if (val != token) return next(403); - - next(); - } -}; - -/** - * Default value function, checking the `req.body` - * and `req.query` for the CSRF token. - * - * @param {IncomingMessage} req - * @return {String} - * @api private - */ - -function defaultValue(req) { - return (req.body && req.body._csrf) - || (req.query && req.query._csrf) - || (req.headers['x-csrf-token']); -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/directory.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/directory.js deleted file mode 100644 index 8fa008cb..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/directory.js +++ /dev/null @@ -1,228 +0,0 @@ - -/*! - * Connect - directory - * Copyright(c) 2011 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -// TODO: icon / style for directories -// TODO: arrow key navigation -// TODO: make icons extensible - -/** - * Module dependencies. - */ - -var fs = require('fs') - , parse = require('url').parse - , path = require('path') - , normalize = path.normalize - , extname = path.extname - , join = path.join; - -/*! - * Icon cache. - */ - -var cache = {}; - -/** - * Directory: - * - * Serve directory listings with the given `root` path. - * - * Options: - * - * - `hidden` display hidden (dot) files. Defaults to false. - * - `icons` display icons. Defaults to false. - * - `filter` Apply this filter function to files. Defaults to false. - * - * @param {String} root - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function directory(root, options){ - options = options || {}; - - // root required - if (!root) throw new Error('directory() root path required'); - var hidden = options.hidden - , icons = options.icons - , filter = options.filter - , root = normalize(root); - - return function directory(req, res, next) { - if ('GET' != req.method && 'HEAD' != req.method) return next(); - - var accept = req.headers.accept || 'text/plain' - , url = parse(req.url) - , dir = decodeURIComponent(url.pathname) - , path = normalize(join(root, dir)) - , originalUrl = parse(req.originalUrl) - , originalDir = decodeURIComponent(originalUrl.pathname) - , showUp = path != root && path != root + '/'; - - // null byte(s), bad request - if (~path.indexOf('\0')) return next(400); - - // malicious path, forbidden - if (0 != path.indexOf(root)) return next(403); - - // check if we have a directory - fs.stat(path, function(err, stat){ - if (err) return 'ENOENT' == err.code - ? next() - : next(err); - - if (!stat.isDirectory()) return next(); - - // fetch files - fs.readdir(path, function(err, files){ - if (err) return next(err); - if (!hidden) files = removeHidden(files); - if (filter) files = files.filter(filter); - files.sort(); - - // content-negotiation - for (var key in exports) { - if (~accept.indexOf(key) || ~accept.indexOf('*/*')) { - exports[key](req, res, files, next, originalDir, showUp, icons); - return; - } - } - - // not acceptable - next(406); - }); - }); - }; -}; - -/** - * Respond with text/html. - */ - -exports.html = function(req, res, files, next, dir, showUp, icons){ - fs.readFile(__dirname + '/../public/directory.html', 'utf8', function(err, str){ - if (err) return next(err); - fs.readFile(__dirname + '/../public/style.css', 'utf8', function(err, style){ - if (err) return next(err); - if (showUp) files.unshift('..'); - str = str - .replace('{style}', style) - .replace('{files}', html(files, dir, icons)) - .replace('{directory}', dir) - .replace('{linked-path}', htmlPath(dir)); - res.setHeader('Content-Type', 'text/html'); - res.setHeader('Content-Length', str.length); - res.end(str); - }); - }); -}; - -/** - * Respond with application/json. - */ - -exports.json = function(req, res, files){ - files = JSON.stringify(files); - res.setHeader('Content-Type', 'application/json'); - res.setHeader('Content-Length', files.length); - res.end(files); -}; - -/** - * Respond with text/plain. - */ - -exports.plain = function(req, res, files){ - files = files.join('\n') + '\n'; - res.setHeader('Content-Type', 'text/plain'); - res.setHeader('Content-Length', files.length); - res.end(files); -}; - -/** - * Map html `dir`, returning a linked path. - */ - -function htmlPath(dir) { - var curr = []; - return dir.split('/').map(function(part){ - curr.push(part); - return '' + part + ''; - }).join(' / '); -} - -/** - * Map html `files`, returning an html unordered list. - */ - -function html(files, dir, useIcons) { - return '
      ' + files.map(function(file){ - var icon = '' - , classes = []; - - if (useIcons && '..' != file) { - icon = icons[extname(file)] || icons.default; - icon = ''; - classes.push('icon'); - } - - return '
    • ' - + icon + file + '
    • '; - - }).join('\n') + '
    '; -} - -/** - * Load and cache the given `icon`. - * - * @param {String} icon - * @return {String} - * @api private - */ - -function load(icon) { - if (cache[icon]) return cache[icon]; - return cache[icon] = fs.readFileSync(__dirname + '/../public/icons/' + icon, 'base64'); -} - -/** - * Filter "hidden" `files`, aka files - * beginning with a `.`. - * - * @param {Array} files - * @return {Array} - * @api private - */ - -function removeHidden(files) { - return files.filter(function(file){ - return '.' != file[0]; - }); -} - -/** - * Icon map. - */ - -var icons = { - '.js': 'page_white_code_red.png' - , '.c': 'page_white_c.png' - , '.h': 'page_white_h.png' - , '.cc': 'page_white_cplusplus.png' - , '.php': 'page_white_php.png' - , '.rb': 'page_white_ruby.png' - , '.cpp': 'page_white_cplusplus.png' - , '.swf': 'page_white_flash.png' - , '.pdf': 'page_white_acrobat.png' - , 'default': 'page_white.png' -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/errorHandler.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/errorHandler.js deleted file mode 100644 index 4a84edca..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/errorHandler.js +++ /dev/null @@ -1,86 +0,0 @@ -/*! - * Connect - errorHandler - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils') - , fs = require('fs'); - -// environment - -var env = process.env.NODE_ENV || 'development'; - -/** - * Error handler: - * - * Development error handler, providing stack traces - * and error message responses for requests accepting text, html, - * or json. - * - * Text: - * - * By default, and when _text/plain_ is accepted a simple stack trace - * or error message will be returned. - * - * JSON: - * - * When _application/json_ is accepted, connect will respond with - * an object in the form of `{ "error": error }`. - * - * HTML: - * - * When accepted connect will output a nice html stack trace. - * - * @return {Function} - * @api public - */ - -exports = module.exports = function errorHandler(){ - return function errorHandler(err, req, res, next){ - if (err.status) res.statusCode = err.status; - if (res.statusCode < 400) res.statusCode = 500; - if ('test' != env) console.error(err.stack); - var accept = req.headers.accept || ''; - // html - if (~accept.indexOf('html')) { - fs.readFile(__dirname + '/../public/style.css', 'utf8', function(e, style){ - fs.readFile(__dirname + '/../public/error.html', 'utf8', function(e, html){ - var stack = (err.stack || '') - .split('\n').slice(1) - .map(function(v){ return '
  • ' + v + '
  • '; }).join(''); - html = html - .replace('{style}', style) - .replace('{stack}', stack) - .replace('{title}', exports.title) - .replace('{statusCode}', res.statusCode) - .replace(/\{error\}/g, utils.escape(err.toString())); - res.setHeader('Content-Type', 'text/html; charset=utf-8'); - res.end(html); - }); - }); - // json - } else if (~accept.indexOf('json')) { - var error = { message: err.message, stack: err.stack }; - for (var prop in err) error[prop] = err[prop]; - var json = JSON.stringify({ error: error }); - res.setHeader('Content-Type', 'application/json'); - res.end(json); - // plain text - } else { - res.writeHead(res.statusCode, { 'Content-Type': 'text/plain' }); - res.end(err.stack); - } - }; -}; - -/** - * Template title, framework authors may override this value. - */ - -exports.title = 'Connect'; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/favicon.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/favicon.js deleted file mode 100644 index c57bf348..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/favicon.js +++ /dev/null @@ -1,81 +0,0 @@ - -/*! - * Connect - favicon - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var fs = require('fs') - , utils = require('../utils'); - -/** - * Favicon: - * - * By default serves the connect favicon, or the favicon - * located by the given `path`. - * - * Options: - * - * - `maxAge` cache-control max-age directive, defaulting to 1 day - * - * Examples: - * - * Serve default favicon: - * - * connect() - * .use(connect.favicon()) - * - * Serve favicon before logging for brevity: - * - * connect() - * .use(connect.favicon()) - * .use(connect.logger('dev')) - * - * Serve custom favicon: - * - * connect() - * .use(connect.favicon('public/favicon.ico)) - * - * @param {String} path - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function favicon(path, options){ - var options = options || {} - , path = path || __dirname + '/../public/favicon.ico' - , maxAge = options.maxAge || 86400000 - , icon; // favicon cache - - return function favicon(req, res, next){ - if ('/favicon.ico' == req.url) { - if (icon) { - res.writeHead(200, icon.headers); - res.end(icon.body); - } else { - fs.readFile(path, function(err, buf){ - if (err) return next(err); - icon = { - headers: { - 'Content-Type': 'image/x-icon' - , 'Content-Length': buf.length - , 'ETag': '"' + utils.md5(buf) + '"' - , 'Cache-Control': 'public, max-age=' + (maxAge / 1000) - }, - body: buf - }; - res.writeHead(200, icon.headers); - res.end(icon.body); - }); - } - } else { - next(); - } - }; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/json.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/json.js deleted file mode 100644 index 200006b7..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/json.js +++ /dev/null @@ -1,86 +0,0 @@ - -/*! - * Connect - json - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils') - , _limit = require('./limit'); - -/** - * noop middleware. - */ - -function noop(req, res, next) { - next(); -} - -/** - * JSON: - * - * Parse JSON request bodies, providing the - * parsed object as `req.body`. - * - * Options: - * - * - `strict` when `false` anything `JSON.parse()` accepts will be parsed - * - `reviver` used as the second "reviver" argument for JSON.parse - * - `limit` byte limit disabled by default - * - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function(options){ - var options = options || {} - , strict = options.strict !== false; - - var limit = options.limit - ? _limit(options.limit) - : noop; - - return function json(req, res, next) { - if (req._body) return next(); - req.body = req.body || {}; - - if (!utils.hasBody(req)) return next(); - - // check Content-Type - if ('application/json' != utils.mime(req)) return next(); - - // flag as parsed - req._body = true; - - // parse - limit(req, res, function(err){ - if (err) return next(err); - var buf = ''; - req.setEncoding('utf8'); - req.on('data', function(chunk){ buf += chunk }); - req.on('end', function(){ - var first = buf.trim()[0]; - - if (0 == buf.length) { - return next(400, 'invalid json, empty body'); - } - - if (strict && '{' != first && '[' != first) return next(400, 'invalid json'); - try { - req.body = JSON.parse(buf, options.reviver); - next(); - } catch (err){ - err.body = buf; - err.status = 400; - next(err); - } - }); - }); - } -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/limit.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/limit.js deleted file mode 100644 index 614787df..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/limit.js +++ /dev/null @@ -1,55 +0,0 @@ - -/*! - * Connect - limit - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils'); - -/** - * Limit: - * - * Limit request bodies to the given size in `bytes`. - * - * A string representation of the bytesize may also be passed, - * for example "5mb", "200kb", "1gb", etc. - * - * connect() - * .use(connect.limit('5.5mb')) - * .use(handleImageUpload) - * - * @param {Number|String} bytes - * @return {Function} - * @api public - */ - -module.exports = function limit(bytes){ - if ('string' == typeof bytes) bytes = utils.parseBytes(bytes); - if ('number' != typeof bytes) throw new Error('limit() bytes required'); - return function limit(req, res, next){ - var received = 0 - , len = req.headers['content-length'] - ? parseInt(req.headers['content-length'], 10) - : null; - - // self-awareness - if (req._limit) return next(); - req._limit = true; - - // limit by content-length - if (len && len > bytes) return next(413); - - // limit - req.on('data', function(chunk){ - received += chunk.length; - if (received > bytes) req.destroy(); - }); - - next(); - }; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/logger.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/logger.js deleted file mode 100644 index de722449..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/logger.js +++ /dev/null @@ -1,339 +0,0 @@ -/*! - * Connect - logger - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var bytes = require('bytes'); - -/*! - * Log buffer. - */ - -var buf = []; - -/*! - * Default log buffer duration. - */ - -var defaultBufferDuration = 1000; - -/** - * Logger: - * - * Log requests with the given `options` or a `format` string. - * - * Options: - * - * - `format` Format string, see below for tokens - * - `stream` Output stream, defaults to _stdout_ - * - `buffer` Buffer duration, defaults to 1000ms when _true_ - * - `immediate` Write log line on request instead of response (for response times) - * - * Tokens: - * - * - `:req[header]` ex: `:req[Accept]` - * - `:res[header]` ex: `:res[Content-Length]` - * - `:http-version` - * - `:response-time` - * - `:remote-addr` - * - `:date` - * - `:method` - * - `:url` - * - `:referrer` - * - `:user-agent` - * - `:status` - * - * Formats: - * - * Pre-defined formats that ship with connect: - * - * - `default` ':remote-addr - - [:date] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"' - * - `short` ':remote-addr - :method :url HTTP/:http-version :status :res[content-length] - :response-time ms' - * - `tiny` ':method :url :status :res[content-length] - :response-time ms' - * - `dev` concise output colored by response status for development use - * - * Examples: - * - * connect.logger() // default - * connect.logger('short') - * connect.logger('tiny') - * connect.logger({ immediate: true, format: 'dev' }) - * connect.logger(':method :url - :referrer') - * connect.logger(':req[content-type] -> :res[content-type]') - * connect.logger(function(tokens, req, res){ return 'some format string' }) - * - * Defining Tokens: - * - * To define a token, simply invoke `connect.logger.token()` with the - * name and a callback function. The value returned is then available - * as ":type" in this case. - * - * connect.logger.token('type', function(req, res){ return req.headers['content-type']; }) - * - * Defining Formats: - * - * All default formats are defined this way, however it's public API as well: - * - * connect.logger.format('name', 'string or function') - * - * @param {String|Function|Object} format or options - * @return {Function} - * @api public - */ - -exports = module.exports = function logger(options) { - if ('object' == typeof options) { - options = options || {}; - } else if (options) { - options = { format: options }; - } else { - options = {}; - } - - // output on request instead of response - var immediate = options.immediate; - - // format name - var fmt = exports[options.format] || options.format || exports.default; - - // compile format - if ('function' != typeof fmt) fmt = compile(fmt); - - // options - var stream = options.stream || process.stdout - , buffer = options.buffer; - - // buffering support - if (buffer) { - var realStream = stream - , interval = 'number' == typeof buffer - ? buffer - : defaultBufferDuration; - - // flush interval - setInterval(function(){ - if (buf.length) { - realStream.write(buf.join('')); - buf.length = 0; - } - }, interval); - - // swap the stream - stream = { - write: function(str){ - buf.push(str); - } - }; - } - - return function logger(req, res, next) { - req._startTime = new Date; - - // immediate - if (immediate) { - var line = fmt(exports, req, res); - if (null == line) return; - stream.write(line + '\n'); - // proxy end to output logging - } else { - var end = res.end; - res.end = function(chunk, encoding){ - res.end = end; - res.end(chunk, encoding); - var line = fmt(exports, req, res); - if (null == line) return; - stream.write(line + '\n'); - }; - } - - - next(); - }; -}; - -/** - * Compile `fmt` into a function. - * - * @param {String} fmt - * @return {Function} - * @api private - */ - -function compile(fmt) { - fmt = fmt.replace(/"/g, '\\"'); - var js = ' return "' + fmt.replace(/:([-\w]{2,})(?:\[([^\]]+)\])?/g, function(_, name, arg){ - return '"\n + (tokens["' + name + '"](req, res, "' + arg + '") || "-") + "'; - }) + '";' - return new Function('tokens, req, res', js); -}; - -/** - * Define a token function with the given `name`, - * and callback `fn(req, res)`. - * - * @param {String} name - * @param {Function} fn - * @return {Object} exports for chaining - * @api public - */ - -exports.token = function(name, fn) { - exports[name] = fn; - return this; -}; - -/** - * Define a `fmt` with the given `name`. - * - * @param {String} name - * @param {String|Function} fmt - * @return {Object} exports for chaining - * @api public - */ - -exports.format = function(name, str){ - exports[name] = str; - return this; -}; - -/** - * Default format. - */ - -exports.format('default', ':remote-addr - - [:date] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"'); - -/** - * Short format. - */ - -exports.format('short', ':remote-addr - :method :url HTTP/:http-version :status :res[content-length] - :response-time ms'); - -/** - * Tiny format. - */ - -exports.format('tiny', ':method :url :status :res[content-length] - :response-time ms'); - -/** - * dev (colored) - */ - -exports.format('dev', function(tokens, req, res){ - var status = res.statusCode - , len = parseInt(res.getHeader('Content-Length'), 10) - , color = 32; - - if (status >= 500) color = 31 - else if (status >= 400) color = 33 - else if (status >= 300) color = 36; - - len = isNaN(len) - ? '' - : len = ' - ' + bytes(len); - - return '\033[90m' + req.method - + ' ' + req.originalUrl + ' ' - + '\033[' + color + 'm' + res.statusCode - + ' \033[90m' - + (new Date - req._startTime) - + 'ms' + len - + '\033[0m'; -}); - -/** - * request url - */ - -exports.token('url', function(req){ - return req.originalUrl || req.url; -}); - -/** - * request method - */ - -exports.token('method', function(req){ - return req.method; -}); - -/** - * response time in milliseconds - */ - -exports.token('response-time', function(req){ - return new Date - req._startTime; -}); - -/** - * UTC date - */ - -exports.token('date', function(){ - return new Date().toUTCString(); -}); - -/** - * response status code - */ - -exports.token('status', function(req, res){ - return res.statusCode; -}); - -/** - * normalized referrer - */ - -exports.token('referrer', function(req){ - return req.headers['referer'] || req.headers['referrer']; -}); - -/** - * remote address - */ - -exports.token('remote-addr', function(req){ - if (req.ip) return req.ip; - var sock = req.socket; - if (sock.socket) return sock.socket.remoteAddress; - return sock.remoteAddress; -}); - -/** - * HTTP version - */ - -exports.token('http-version', function(req){ - return req.httpVersionMajor + '.' + req.httpVersionMinor; -}); - -/** - * UA string - */ - -exports.token('user-agent', function(req){ - return req.headers['user-agent']; -}); - -/** - * request header - */ - -exports.token('req', function(req, res, field){ - return req.headers[field.toLowerCase()]; -}); - -/** - * response header - */ - -exports.token('res', function(req, res, field){ - return (res._headers || {})[field.toLowerCase()]; -}); - diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/methodOverride.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/methodOverride.js deleted file mode 100644 index aaf4014f..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/methodOverride.js +++ /dev/null @@ -1,40 +0,0 @@ - -/*! - * Connect - methodOverride - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Method Override: - * - * Provides faux HTTP method support. - * - * Pass an optional `key` to use when checking for - * a method override, othewise defaults to _\_method_. - * The original method is available via `req.originalMethod`. - * - * @param {String} key - * @return {Function} - * @api public - */ - -module.exports = function methodOverride(key){ - key = key || "_method"; - return function methodOverride(req, res, next) { - req.originalMethod = req.originalMethod || req.method; - - // req.body - if (req.body && key in req.body) { - req.method = req.body[key].toUpperCase(); - delete req.body[key]; - // check X-HTTP-Method-Override - } else if (req.headers['x-http-method-override']) { - req.method = req.headers['x-http-method-override'].toUpperCase(); - } - - next(); - }; -}; - diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/multipart.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/multipart.js deleted file mode 100644 index 7b26fae8..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/multipart.js +++ /dev/null @@ -1,133 +0,0 @@ -/*! - * Connect - multipart - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var formidable = require('formidable') - , _limit = require('./limit') - , utils = require('../utils') - , qs = require('qs'); - -/** - * noop middleware. - */ - -function noop(req, res, next) { - next(); -} - -/** - * Multipart: - * - * Parse multipart/form-data request bodies, - * providing the parsed object as `req.body` - * and `req.files`. - * - * Configuration: - * - * The options passed are merged with [formidable](https://github.com/felixge/node-formidable)'s - * `IncomingForm` object, allowing you to configure the upload directory, - * size limits, etc. For example if you wish to change the upload dir do the following. - * - * app.use(connect.multipart({ uploadDir: path })); - * - * Options: - * - * - `limit` byte limit defaulting to none - * - `defer` defers processing and exposes the Formidable form object as `req.form`. - * `next()` is called without waiting for the form's "end" event. - * This option is useful if you need to bind to the "progress" event, for example. - * - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function(options){ - options = options || {}; - - var limit = options.limit - ? _limit(options.limit) - : noop; - - return function multipart(req, res, next) { - if (req._body) return next(); - req.body = req.body || {}; - req.files = req.files || {}; - - if (!utils.hasBody(req)) return next(); - - // ignore GET - if ('GET' == req.method || 'HEAD' == req.method) return next(); - - // check Content-Type - if ('multipart/form-data' != utils.mime(req)) return next(); - - // flag as parsed - req._body = true; - - // parse - limit(req, res, function(err){ - if (err) return next(err); - - var form = new formidable.IncomingForm - , data = {} - , files = {} - , done; - - Object.keys(options).forEach(function(key){ - form[key] = options[key]; - }); - - function ondata(name, val, data){ - if (Array.isArray(data[name])) { - data[name].push(val); - } else if (data[name]) { - data[name] = [data[name], val]; - } else { - data[name] = val; - } - } - - form.on('field', function(name, val){ - ondata(name, val, data); - }); - - form.on('file', function(name, val){ - ondata(name, val, files); - }); - - form.on('error', function(err){ - if (!options.defer) { - err.status = 400; - next(err); - } - done = true; - }); - - form.on('end', function(){ - if (done) return; - try { - req.body = qs.parse(data); - req.files = qs.parse(files); - if (!options.defer) next(); - } catch (err) { - form.emit('error', err); - } - }); - - form.parse(req); - - if (options.defer) { - req.form = form; - next(); - } - }); - } -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/query.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/query.js deleted file mode 100644 index 93fc5d34..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/query.js +++ /dev/null @@ -1,46 +0,0 @@ -/*! - * Connect - query - * Copyright(c) 2011 TJ Holowaychuk - * Copyright(c) 2011 Sencha Inc. - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var qs = require('qs') - , parse = require('../utils').parseUrl; - -/** - * Query: - * - * Automatically parse the query-string when available, - * populating the `req.query` object. - * - * Examples: - * - * connect() - * .use(connect.query()) - * .use(function(req, res){ - * res.end(JSON.stringify(req.query)); - * }); - * - * The `options` passed are provided to qs.parse function. - * - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function query(options){ - return function query(req, res, next){ - if (!req.query) { - req.query = ~req.url.indexOf('?') - ? qs.parse(parse(req).query, options) - : {}; - } - - next(); - }; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/responseTime.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/responseTime.js deleted file mode 100644 index 62abc049..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/responseTime.js +++ /dev/null @@ -1,32 +0,0 @@ - -/*! - * Connect - responseTime - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Reponse time: - * - * Adds the `X-Response-Time` header displaying the response - * duration in milliseconds. - * - * @return {Function} - * @api public - */ - -module.exports = function responseTime(){ - return function(req, res, next){ - var start = new Date; - - if (res._responseTime) return next(); - res._responseTime = true; - - res.on('header', function(){ - var duration = new Date - start; - res.setHeader('X-Response-Time', duration + 'ms'); - }); - - next(); - }; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/session.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/session.js deleted file mode 100644 index f97b8d6e..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/session.js +++ /dev/null @@ -1,352 +0,0 @@ - -/*! - * Connect - session - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Session = require('./session/session') - , debug = require('debug')('connect:session') - , MemoryStore = require('./session/memory') - , signature = require('cookie-signature') - , Cookie = require('./session/cookie') - , Store = require('./session/store') - , utils = require('./../utils') - , parse = utils.parseUrl - , crc32 = require('buffer-crc32'); - -// environment - -var env = process.env.NODE_ENV; - -/** - * Expose the middleware. - */ - -exports = module.exports = session; - -/** - * Expose constructors. - */ - -exports.Store = Store; -exports.Cookie = Cookie; -exports.Session = Session; -exports.MemoryStore = MemoryStore; - -/** - * Warning message for `MemoryStore` usage in production. - */ - -var warning = 'Warning: connection.session() MemoryStore is not\n' - + 'designed for a production environment, as it will leak\n' - + 'memory, and will not scale past a single process.'; - -/** - * Session: - * - * Setup session store with the given `options`. - * - * Session data is _not_ saved in the cookie itself, however - * cookies are used, so we must use the [cookieParser()](cookieParser.html) - * middleware _before_ `session()`. - * - * Examples: - * - * connect() - * .use(connect.cookieParser()) - * .use(connect.session({ secret: 'keyboard cat', key: 'sid', cookie: { secure: true }})) - * - * Options: - * - * - `key` cookie name defaulting to `connect.sid` - * - `store` session store instance - * - `secret` session cookie is signed with this secret to prevent tampering - * - `cookie` session cookie settings, defaulting to `{ path: '/', httpOnly: true, maxAge: null }` - * - `proxy` trust the reverse proxy when setting secure cookies (via "x-forwarded-proto") - * - * Cookie option: - * - * By default `cookie.maxAge` is `null`, meaning no "expires" parameter is set - * so the cookie becomes a browser-session cookie. When the user closes the - * browser the cookie (and session) will be removed. - * - * ## req.session - * - * To store or access session data, simply use the request property `req.session`, - * which is (generally) serialized as JSON by the store, so nested objects - * are typically fine. For example below is a user-specific view counter: - * - * connect() - * .use(connect.favicon()) - * .use(connect.cookieParser()) - * .use(connect.session({ secret: 'keyboard cat', cookie: { maxAge: 60000 }})) - * .use(function(req, res, next){ - * var sess = req.session; - * if (sess.views) { - * res.setHeader('Content-Type', 'text/html'); - * res.write('

    views: ' + sess.views + '

    '); - * res.write('

    expires in: ' + (sess.cookie.maxAge / 1000) + 's

    '); - * res.end(); - * sess.views++; - * } else { - * sess.views = 1; - * res.end('welcome to the session demo. refresh!'); - * } - * } - * )).listen(3000); - * - * ## Session#regenerate() - * - * To regenerate the session simply invoke the method, once complete - * a new SID and `Session` instance will be initialized at `req.session`. - * - * req.session.regenerate(function(err){ - * // will have a new session here - * }); - * - * ## Session#destroy() - * - * Destroys the session, removing `req.session`, will be re-generated next request. - * - * req.session.destroy(function(err){ - * // cannot access session here - * }); - * - * ## Session#reload() - * - * Reloads the session data. - * - * req.session.reload(function(err){ - * // session updated - * }); - * - * ## Session#save() - * - * Save the session. - * - * req.session.save(function(err){ - * // session saved - * }); - * - * ## Session#touch() - * - * Updates the `.maxAge` property. Typically this is - * not necessary to call, as the session middleware does this for you. - * - * ## Session#cookie - * - * Each session has a unique cookie object accompany it. This allows - * you to alter the session cookie per visitor. For example we can - * set `req.session.cookie.expires` to `false` to enable the cookie - * to remain for only the duration of the user-agent. - * - * ## Session#maxAge - * - * Alternatively `req.session.cookie.maxAge` will return the time - * remaining in milliseconds, which we may also re-assign a new value - * to adjust the `.expires` property appropriately. The following - * are essentially equivalent - * - * var hour = 3600000; - * req.session.cookie.expires = new Date(Date.now() + hour); - * req.session.cookie.maxAge = hour; - * - * For example when `maxAge` is set to `60000` (one minute), and 30 seconds - * has elapsed it will return `30000` until the current request has completed, - * at which time `req.session.touch()` is called to reset `req.session.maxAge` - * to its original value. - * - * req.session.cookie.maxAge; - * // => 30000 - * - * Session Store Implementation: - * - * Every session store _must_ implement the following methods - * - * - `.get(sid, callback)` - * - `.set(sid, session, callback)` - * - `.destroy(sid, callback)` - * - * Recommended methods include, but are not limited to: - * - * - `.length(callback)` - * - `.clear(callback)` - * - * For an example implementation view the [connect-redis](http://github.com/visionmedia/connect-redis) repo. - * - * @param {Object} options - * @return {Function} - * @api public - */ - -function session(options){ - var options = options || {} - , key = options.key || 'connect.sid' - , store = options.store || new MemoryStore - , cookie = options.cookie || {} - , trustProxy = options.proxy - , storeReady = true; - - // notify user that this store is not - // meant for a production environment - if ('production' == env && store instanceof MemoryStore) { - console.warn(warning); - } - - // generates the new session - store.generate = function(req){ - req.sessionID = utils.uid(24); - req.session = new Session(req); - req.session.cookie = new Cookie(cookie); - }; - - store.on('disconnect', function(){ storeReady = false; }); - store.on('connect', function(){ storeReady = true; }); - - return function session(req, res, next) { - // self-awareness - if (req.session) return next(); - - // Handle connection as if there is no session if - // the store has temporarily disconnected etc - if (!storeReady) return debug('store is disconnected'), next(); - - // pathname mismatch - if (0 != req.originalUrl.indexOf(cookie.path || '/')) return next(); - - // backwards compatibility for signed cookies - // req.secret is passed from the cookie parser middleware - var secret = options.secret || req.secret; - - // ensure secret is available or bail - if (!secret) throw new Error('`secret` option required for sessions'); - - // parse url - var originalHash - , originalId; - - // expose store - req.sessionStore = store; - - // grab the session cookie value and check the signature - var rawCookie = req.cookies[key]; - - // get signedCookies for backwards compat with signed cookies - var unsignedCookie = req.signedCookies[key]; - - if (!unsignedCookie && rawCookie) { - unsignedCookie = utils.parseSignedCookie(rawCookie, secret); - } - - // set-cookie - res.on('header', function(){ - if (!req.session) return; - var cookie = req.session.cookie - , proto = (req.headers['x-forwarded-proto'] || '').toLowerCase() - , tls = req.connection.encrypted || (trustProxy && 'https' == proto) - , secured = cookie.secure && tls - , isNew = unsignedCookie != req.sessionID; - - // only send secure cookies via https - if (cookie.secure && !secured) return debug('not secured'); - - // browser-session length cookie - if (null == cookie.expires) { - if (!isNew) return debug('already set browser-session cookie'); - // compare hashes and ids - } else if (originalHash == hash(req.session) && originalId == req.session.id) { - return debug('unmodified session'); - } - - var val = 's:' + signature.sign(req.sessionID, secret); - val = cookie.serialize(key, val); - debug('set-cookie %s', val); - res.setHeader('Set-Cookie', val); - }); - - // proxy end() to commit the session - var end = res.end; - res.end = function(data, encoding){ - res.end = end; - if (!req.session) return res.end(data, encoding); - debug('saving'); - req.session.resetMaxAge(); - req.session.save(function(){ - debug('saved'); - res.end(data, encoding); - }); - }; - - // generate the session - function generate() { - store.generate(req); - } - - // get the sessionID from the cookie - req.sessionID = unsignedCookie; - - // generate a session if the browser doesn't send a sessionID - if (!req.sessionID) { - debug('no SID sent, generating session'); - generate(); - next(); - return; - } - - // generate the session object - var pause = utils.pause(req); - debug('fetching %s', req.sessionID); - store.get(req.sessionID, function(err, sess){ - // proxy to resume() events - var _next = next; - next = function(err){ - _next(err); - pause.resume(); - }; - - // error handling - if (err) { - debug('error'); - if ('ENOENT' == err.code) { - generate(); - next(); - } else { - next(err); - } - // no session - } else if (!sess) { - debug('no session found'); - generate(); - next(); - // populate req.session - } else { - debug('session found'); - store.createSession(req, sess); - originalId = req.sessionID; - originalHash = hash(sess); - next(); - } - }); - }; -}; - -/** - * Hash the given `sess` object omitting changes - * to `.cookie`. - * - * @param {Object} sess - * @return {String} - * @api private - */ - -function hash(sess) { - return crc32.signed(JSON.stringify(sess, function(key, val){ - if ('cookie' != key) return val; - })); -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/session/cookie.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/session/cookie.js deleted file mode 100644 index e8ff8625..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/session/cookie.js +++ /dev/null @@ -1,128 +0,0 @@ - -/*! - * Connect - session - Cookie - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../../utils') - , cookie = require('cookie'); - -/** - * Initialize a new `Cookie` with the given `options`. - * - * @param {IncomingMessage} req - * @param {Object} options - * @api private - */ - -var Cookie = module.exports = function Cookie(options) { - this.path = '/'; - this.maxAge = null; - this.httpOnly = true; - if (options) utils.merge(this, options); - this.originalMaxAge = undefined == this.originalMaxAge - ? this.maxAge - : this.originalMaxAge; -}; - -/*! - * Prototype. - */ - -Cookie.prototype = { - - /** - * Set expires `date`. - * - * @param {Date} date - * @api public - */ - - set expires(date) { - this._expires = date; - this.originalMaxAge = this.maxAge; - }, - - /** - * Get expires `date`. - * - * @return {Date} - * @api public - */ - - get expires() { - return this._expires; - }, - - /** - * Set expires via max-age in `ms`. - * - * @param {Number} ms - * @api public - */ - - set maxAge(ms) { - this.expires = 'number' == typeof ms - ? new Date(Date.now() + ms) - : ms; - }, - - /** - * Get expires max-age in `ms`. - * - * @return {Number} - * @api public - */ - - get maxAge() { - return this.expires instanceof Date - ? this.expires.valueOf() - Date.now() - : this.expires; - }, - - /** - * Return cookie data object. - * - * @return {Object} - * @api private - */ - - get data() { - return { - originalMaxAge: this.originalMaxAge - , expires: this._expires - , secure: this.secure - , httpOnly: this.httpOnly - , domain: this.domain - , path: this.path - } - }, - - /** - * Return a serialized cookie string. - * - * @return {String} - * @api public - */ - - serialize: function(name, val){ - return cookie.serialize(name, val, this.data); - }, - - /** - * Return JSON representation of this cookie. - * - * @return {Object} - * @api private - */ - - toJSON: function(){ - return this.data; - } -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/session/memory.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/session/memory.js deleted file mode 100644 index fb939392..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/session/memory.js +++ /dev/null @@ -1,129 +0,0 @@ - -/*! - * Connect - session - MemoryStore - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Store = require('./store'); - -/** - * Initialize a new `MemoryStore`. - * - * @api public - */ - -var MemoryStore = module.exports = function MemoryStore() { - this.sessions = {}; -}; - -/** - * Inherit from `Store.prototype`. - */ - -MemoryStore.prototype.__proto__ = Store.prototype; - -/** - * Attempt to fetch session by the given `sid`. - * - * @param {String} sid - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.get = function(sid, fn){ - var self = this; - process.nextTick(function(){ - var expires - , sess = self.sessions[sid]; - if (sess) { - sess = JSON.parse(sess); - expires = 'string' == typeof sess.cookie.expires - ? new Date(sess.cookie.expires) - : sess.cookie.expires; - if (!expires || new Date < expires) { - fn(null, sess); - } else { - self.destroy(sid, fn); - } - } else { - fn(); - } - }); -}; - -/** - * Commit the given `sess` object associated with the given `sid`. - * - * @param {String} sid - * @param {Session} sess - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.set = function(sid, sess, fn){ - var self = this; - process.nextTick(function(){ - self.sessions[sid] = JSON.stringify(sess); - fn && fn(); - }); -}; - -/** - * Destroy the session associated with the given `sid`. - * - * @param {String} sid - * @api public - */ - -MemoryStore.prototype.destroy = function(sid, fn){ - var self = this; - process.nextTick(function(){ - delete self.sessions[sid]; - fn && fn(); - }); -}; - -/** - * Invoke the given callback `fn` with all active sessions. - * - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.all = function(fn){ - var arr = [] - , keys = Object.keys(this.sessions); - for (var i = 0, len = keys.length; i < len; ++i) { - arr.push(this.sessions[keys[i]]); - } - fn(null, arr); -}; - -/** - * Clear all sessions. - * - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.clear = function(fn){ - this.sessions = {}; - fn && fn(); -}; - -/** - * Fetch number of sessions. - * - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.length = function(fn){ - fn(null, Object.keys(this.sessions).length); -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/session/session.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/session/session.js deleted file mode 100644 index 0dd4b400..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/session/session.js +++ /dev/null @@ -1,116 +0,0 @@ - -/*! - * Connect - session - Session - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../../utils'); - -/** - * Create a new `Session` with the given request and `data`. - * - * @param {IncomingRequest} req - * @param {Object} data - * @api private - */ - -var Session = module.exports = function Session(req, data) { - Object.defineProperty(this, 'req', { value: req }); - Object.defineProperty(this, 'id', { value: req.sessionID }); - if ('object' == typeof data) utils.merge(this, data); -}; - -/** - * Update reset `.cookie.maxAge` to prevent - * the cookie from expiring when the - * session is still active. - * - * @return {Session} for chaining - * @api public - */ - -Session.prototype.touch = function(){ - return this.resetMaxAge(); -}; - -/** - * Reset `.maxAge` to `.originalMaxAge`. - * - * @return {Session} for chaining - * @api public - */ - -Session.prototype.resetMaxAge = function(){ - this.cookie.maxAge = this.cookie.originalMaxAge; - return this; -}; - -/** - * Save the session data with optional callback `fn(err)`. - * - * @param {Function} fn - * @return {Session} for chaining - * @api public - */ - -Session.prototype.save = function(fn){ - this.req.sessionStore.set(this.id, this, fn || function(){}); - return this; -}; - -/** - * Re-loads the session data _without_ altering - * the maxAge properties. Invokes the callback `fn(err)`, - * after which time if no exception has occurred the - * `req.session` property will be a new `Session` object, - * although representing the same session. - * - * @param {Function} fn - * @return {Session} for chaining - * @api public - */ - -Session.prototype.reload = function(fn){ - var req = this.req - , store = this.req.sessionStore; - store.get(this.id, function(err, sess){ - if (err) return fn(err); - if (!sess) return fn(new Error('failed to load session')); - store.createSession(req, sess); - fn(); - }); - return this; -}; - -/** - * Destroy `this` session. - * - * @param {Function} fn - * @return {Session} for chaining - * @api public - */ - -Session.prototype.destroy = function(fn){ - delete this.req.session; - this.req.sessionStore.destroy(this.id, fn); - return this; -}; - -/** - * Regenerate this request's session. - * - * @param {Function} fn - * @return {Session} for chaining - * @api public - */ - -Session.prototype.regenerate = function(fn){ - this.req.sessionStore.regenerate(this.req, fn); - return this; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/session/store.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/session/store.js deleted file mode 100644 index 54294cbd..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/session/store.js +++ /dev/null @@ -1,84 +0,0 @@ - -/*! - * Connect - session - Store - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , Session = require('./session') - , Cookie = require('./cookie'); - -/** - * Initialize abstract `Store`. - * - * @api private - */ - -var Store = module.exports = function Store(options){}; - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Store.prototype.__proto__ = EventEmitter.prototype; - -/** - * Re-generate the given requests's session. - * - * @param {IncomingRequest} req - * @return {Function} fn - * @api public - */ - -Store.prototype.regenerate = function(req, fn){ - var self = this; - this.destroy(req.sessionID, function(err){ - self.generate(req); - fn(err); - }); -}; - -/** - * Load a `Session` instance via the given `sid` - * and invoke the callback `fn(err, sess)`. - * - * @param {String} sid - * @param {Function} fn - * @api public - */ - -Store.prototype.load = function(sid, fn){ - var self = this; - this.get(sid, function(err, sess){ - if (err) return fn(err); - if (!sess) return fn(); - var req = { sessionID: sid, sessionStore: self }; - sess = self.createSession(req, sess); - fn(null, sess); - }); -}; - -/** - * Create session from JSON `sess` data. - * - * @param {IncomingRequest} req - * @param {Object} sess - * @return {Session} - * @api private - */ - -Store.prototype.createSession = function(req, sess){ - var expires = sess.cookie.expires - , orig = sess.cookie.originalMaxAge; - sess.cookie = new Cookie(sess.cookie); - if ('string' == typeof expires) sess.cookie.expires = new Date(expires); - sess.cookie.originalMaxAge = orig; - req.session = new Session(req, sess); - return req.session; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/static.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/static.js deleted file mode 100644 index bb29d072..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/static.js +++ /dev/null @@ -1,94 +0,0 @@ - -/*! - * Connect - static - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var send = require('send') - , utils = require('../utils') - , parse = utils.parseUrl - , url = require('url'); - -/** - * Static: - * - * Static file server with the given `root` path. - * - * Examples: - * - * var oneDay = 86400000; - * - * connect() - * .use(connect.static(__dirname + '/public')) - * - * connect() - * .use(connect.static(__dirname + '/public', { maxAge: oneDay })) - * - * Options: - * - * - `maxAge` Browser cache maxAge in milliseconds. defaults to 0 - * - `hidden` Allow transfer of hidden files. defaults to false - * - `redirect` Redirect to trailing "/" when the pathname is a dir. defaults to true - * - * @param {String} root - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function static(root, options){ - options = options || {}; - - // root required - if (!root) throw new Error('static() root path required'); - - // default redirect - var redirect = false !== options.redirect; - - return function static(req, res, next) { - if ('GET' != req.method && 'HEAD' != req.method) return next(); - var path = parse(req).pathname; - var pause = utils.pause(req); - - function resume() { - next(); - pause.resume(); - } - - function directory() { - if (!redirect) return resume(); - var pathname = url.parse(req.originalUrl).pathname; - res.statusCode = 301; - res.setHeader('Location', pathname + '/'); - res.end('Redirecting to ' + utils.escape(pathname) + '/'); - } - - function error(err) { - if (404 == err.status) return resume(); - next(err); - } - - send(req, path) - .maxage(options.maxAge || 0) - .root(root) - .hidden(options.hidden) - .on('error', error) - .on('directory', directory) - .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; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/staticCache.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/staticCache.js deleted file mode 100644 index 7354a8ff..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/staticCache.js +++ /dev/null @@ -1,231 +0,0 @@ - -/*! - * Connect - staticCache - * Copyright(c) 2011 Sencha Inc. - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils') - , Cache = require('../cache') - , fresh = require('fresh'); - -/** - * Static cache: - * - * Enables a memory cache layer on top of - * the `static()` middleware, serving popular - * static files. - * - * By default a maximum of 128 objects are - * held in cache, with a max of 256k each, - * totalling ~32mb. - * - * A Least-Recently-Used (LRU) cache algo - * is implemented through the `Cache` object, - * simply rotating cache objects as they are - * hit. This means that increasingly popular - * objects maintain their positions while - * others get shoved out of the stack and - * garbage collected. - * - * Benchmarks: - * - * static(): 2700 rps - * node-static: 5300 rps - * static() + staticCache(): 7500 rps - * - * Options: - * - * - `maxObjects` max cache objects [128] - * - `maxLength` max cache object length 256kb - * - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function staticCache(options){ - var options = options || {} - , cache = new Cache(options.maxObjects || 128) - , maxlen = options.maxLength || 1024 * 256; - - console.warn('connect.staticCache() is deprecated and will be removed in 3.0'); - console.warn('use varnish or similar reverse proxy caches.'); - - return function staticCache(req, res, next){ - var key = cacheKey(req) - , ranges = req.headers.range - , hasCookies = req.headers.cookie - , hit = cache.get(key); - - // cache static - // TODO: change from staticCache() -> cache() - // and make this work for any request - req.on('static', function(stream){ - var headers = res._headers - , cc = utils.parseCacheControl(headers['cache-control'] || '') - , contentLength = headers['content-length'] - , hit; - - // dont cache set-cookie responses - if (headers['set-cookie']) return hasCookies = true; - - // dont cache when cookies are present - if (hasCookies) return; - - // ignore larger files - if (!contentLength || contentLength > maxlen) return; - - // don't cache partial files - if (headers['content-range']) return; - - // dont cache items we shouldn't be - // TODO: real support for must-revalidate / no-cache - if ( cc['no-cache'] - || cc['no-store'] - || cc['private'] - || cc['must-revalidate']) return; - - // if already in cache then validate - if (hit = cache.get(key)){ - if (headers.etag == hit[0].etag) { - hit[0].date = new Date; - return; - } else { - cache.remove(key); - } - } - - // validation notifiactions don't contain a steam - if (null == stream) return; - - // add the cache object - var arr = []; - - // store the chunks - stream.on('data', function(chunk){ - arr.push(chunk); - }); - - // flag it as complete - stream.on('end', function(){ - var cacheEntry = cache.add(key); - delete headers['x-cache']; // Clean up (TODO: others) - cacheEntry.push(200); - cacheEntry.push(headers); - cacheEntry.push.apply(cacheEntry, arr); - }); - }); - - if (req.method == 'GET' || req.method == 'HEAD') { - if (ranges) { - next(); - } else if (!hasCookies && hit && !mustRevalidate(req, hit)) { - res.setHeader('X-Cache', 'HIT'); - respondFromCache(req, res, hit); - } else { - res.setHeader('X-Cache', 'MISS'); - next(); - } - } else { - next(); - } - } -}; - -/** - * Respond with the provided cached value. - * TODO: Assume 200 code, that's iffy. - * - * @param {Object} req - * @param {Object} res - * @param {Object} cacheEntry - * @return {String} - * @api private - */ - -function respondFromCache(req, res, cacheEntry) { - var status = cacheEntry[0] - , headers = utils.merge({}, cacheEntry[1]) - , content = cacheEntry.slice(2); - - headers.age = (new Date - new Date(headers.date)) / 1000 || 0; - - switch (req.method) { - case 'HEAD': - res.writeHead(status, headers); - res.end(); - break; - case 'GET': - if (utils.conditionalGET(req) && fresh(req.headers, headers)) { - headers['content-length'] = 0; - res.writeHead(304, headers); - res.end(); - } else { - res.writeHead(status, headers); - - function write() { - while (content.length) { - if (false === res.write(content.shift())) { - res.once('drain', write); - return; - } - } - res.end(); - } - - write(); - } - break; - default: - // This should never happen. - res.writeHead(500, ''); - res.end(); - } -} - -/** - * Determine whether or not a cached value must be revalidated. - * - * @param {Object} req - * @param {Object} cacheEntry - * @return {String} - * @api private - */ - -function mustRevalidate(req, cacheEntry) { - var cacheHeaders = cacheEntry[1] - , reqCC = utils.parseCacheControl(req.headers['cache-control'] || '') - , cacheCC = utils.parseCacheControl(cacheHeaders['cache-control'] || '') - , cacheAge = (new Date - new Date(cacheHeaders.date)) / 1000 || 0; - - if ( cacheCC['no-cache'] - || cacheCC['must-revalidate'] - || cacheCC['proxy-revalidate']) return true; - - if (reqCC['no-cache']) return true; - - if (null != reqCC['max-age']) return reqCC['max-age'] < cacheAge; - - if (null != cacheCC['max-age']) return cacheCC['max-age'] < cacheAge; - - return false; -} - -/** - * The key to use in the cache. For now, this is the URL path and query. - * - * 'http://example.com?key=value' -> '/?key=value' - * - * @param {Object} req - * @return {String} - * @api private - */ - -function cacheKey(req) { - return utils.parseUrl(req).path; -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/timeout.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/timeout.js deleted file mode 100644 index a6dc0871..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/timeout.js +++ /dev/null @@ -1,56 +0,0 @@ - -/*! - * Connect - timeout - * Ported from https://github.com/LearnBoost/connect-timeout - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var debug = require('debug')('connect:timeout'); - -/** - * Timeout: - * - * Times out the request in `ms`, defaulting to `5000`. The - * method `req.clearTimeout()` is added to revert this behaviour - * programmatically within your application's middleware, routes, etc. - * - * The timeout error is passed to `next()` so that you may customize - * the response behaviour. This error has the `.timeout` property as - * well as `.status == 408`. - * - * @param {Number} ms - * @return {Function} - * @api public - */ - -module.exports = function timeout(ms) { - ms = ms || 5000; - - return function(req, res, next) { - var id = setTimeout(function(){ - req.emit('timeout', ms); - }, ms); - - req.on('timeout', function(){ - if (req.headerSent) return debug('response started, cannot timeout'); - var err = new Error('Response timeout'); - err.timeout = ms; - err.status = 503; - next(err); - }); - - req.clearTimeout = function(){ - clearTimeout(id); - }; - - res.on('header', function(){ - clearTimeout(id); - }); - - next(); - }; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/urlencoded.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/urlencoded.js deleted file mode 100644 index cceafc0c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/urlencoded.js +++ /dev/null @@ -1,78 +0,0 @@ - -/*! - * Connect - urlencoded - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils') - , _limit = require('./limit') - , qs = require('qs'); - -/** - * noop middleware. - */ - -function noop(req, res, next) { - next(); -} - -/** - * Urlencoded: - * - * Parse x-ww-form-urlencoded request bodies, - * providing the parsed object as `req.body`. - * - * Options: - * - * - `limit` byte limit disabled by default - * - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function(options){ - options = options || {}; - - var limit = options.limit - ? _limit(options.limit) - : noop; - - return function urlencoded(req, res, next) { - if (req._body) return next(); - req.body = req.body || {}; - - if (!utils.hasBody(req)) return next(); - - // check Content-Type - if ('application/x-www-form-urlencoded' != utils.mime(req)) return next(); - - // flag as parsed - req._body = true; - - // parse - limit(req, res, function(err){ - if (err) return next(err); - var buf = ''; - req.setEncoding('utf8'); - req.on('data', function(chunk){ buf += chunk }); - req.on('end', function(){ - try { - req.body = buf.length - ? qs.parse(buf, options) - : {}; - next(); - } catch (err){ - err.body = buf; - next(err); - } - }); - }); - } -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/vhost.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/vhost.js deleted file mode 100644 index 897a9d89..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/middleware/vhost.js +++ /dev/null @@ -1,40 +0,0 @@ - -/*! - * Connect - vhost - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Vhost: - * - * Setup vhost for the given `hostname` and `server`. - * - * connect() - * .use(connect.vhost('foo.com', fooApp)) - * .use(connect.vhost('bar.com', barApp)) - * .use(connect.vhost('*.com', mainApp)) - * - * The `server` may be a Connect server or - * a regular Node `http.Server`. - * - * @param {String} hostname - * @param {Server} server - * @return {Function} - * @api public - */ - -module.exports = function vhost(hostname, server){ - if (!hostname) throw new Error('vhost hostname required'); - if (!server) throw new Error('vhost server required'); - var regexp = new RegExp('^' + hostname.replace(/[*]/g, '(.*?)') + '$', 'i'); - if (server.onvhost) server.onvhost(hostname); - return function vhost(req, res, next){ - if (!req.headers.host) return next(); - var host = req.headers.host.split(':')[0]; - if (!regexp.test(host)) return next(); - if ('function' == typeof server) return server(req, res, next); - server.emit('request', req, res); - }; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/patch.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/patch.js deleted file mode 100644 index 7cf00125..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/patch.js +++ /dev/null @@ -1,79 +0,0 @@ - -/*! - * Connect - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var http = require('http') - , res = http.ServerResponse.prototype - , setHeader = res.setHeader - , _renderHeaders = res._renderHeaders - , writeHead = res.writeHead; - -// apply only once - -if (!res._hasConnectPatch) { - - /** - * Provide a public "header sent" flag - * until node does. - * - * @return {Boolean} - * @api public - */ - - res.__defineGetter__('headerSent', function(){ - return this._header; - }); - - /** - * Set header `field` to `val`, special-casing - * the `Set-Cookie` field for multiple support. - * - * @param {String} field - * @param {String} val - * @api public - */ - - res.setHeader = function(field, val){ - var key = field.toLowerCase() - , prev; - - // special-case Set-Cookie - if (this._headers && 'set-cookie' == key) { - if (prev = this.getHeader(field)) { - val = Array.isArray(prev) - ? prev.concat(val) - : [prev, val]; - } - // charset - } else if ('content-type' == key && this.charset) { - val += '; charset=' + this.charset; - } - - return setHeader.call(this, field, val); - }; - - /** - * Proxy to emit "header" event. - */ - - res._renderHeaders = function(){ - if (!this._emittedHeader) this.emit('header'); - this._emittedHeader = true; - return _renderHeaders.call(this); - }; - - res.writeHead = function(){ - if (!this._emittedHeader) this.emit('header'); - this._emittedHeader = true; - return writeHead.apply(this, arguments); - }; - - res._hasConnectPatch = true; -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/proto.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/proto.js deleted file mode 100644 index 889c2372..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/proto.js +++ /dev/null @@ -1,239 +0,0 @@ - -/*! - * Connect - HTTPServer - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var http = require('http') - , utils = require('./utils') - , debug = require('debug')('connect:dispatcher'); - -// prototype - -var app = module.exports = {}; - -// environment - -var env = process.env.NODE_ENV || 'development'; - -/** - * Utilize the given middleware `handle` to the given `route`, - * defaulting to _/_. This "route" is the mount-point for the - * middleware, when given a value other than _/_ the middleware - * is only effective when that segment is present in the request's - * pathname. - * - * For example if we were to mount a function at _/admin_, it would - * be invoked on _/admin_, and _/admin/settings_, however it would - * not be invoked for _/_, or _/posts_. - * - * Examples: - * - * var app = connect(); - * app.use(connect.favicon()); - * app.use(connect.logger()); - * app.use(connect.static(__dirname + '/public')); - * - * If we wanted to prefix static files with _/public_, we could - * "mount" the `static()` middleware: - * - * app.use('/public', connect.static(__dirname + '/public')); - * - * This api is chainable, so the following is valid: - * - * connect() - * .use(connect.favicon()) - * .use(connect.logger()) - * .use(connect.static(__dirname + '/public')) - * .listen(3000); - * - * @param {String|Function|Server} route, callback or server - * @param {Function|Server} callback or server - * @return {Server} for chaining - * @api public - */ - -app.use = function(route, fn){ - // default route to '/' - if ('string' != typeof route) { - fn = route; - route = '/'; - } - - // wrap sub-apps - if ('function' == typeof fn.handle) { - var server = fn; - fn.route = route; - fn = function(req, res, next){ - server.handle(req, res, next); - }; - } - - // wrap vanilla http.Servers - if (fn instanceof http.Server) { - fn = fn.listeners('request')[0]; - } - - // strip trailing slash - if ('/' == route[route.length - 1]) { - route = route.slice(0, -1); - } - - // add the middleware - debug('use %s %s', route || '/', fn.name || 'anonymous'); - this.stack.push({ route: route, handle: fn }); - - return this; -}; - -/** - * Handle server requests, punting them down - * the middleware stack. - * - * @api private - */ - -app.handle = function(req, res, out) { - var stack = this.stack - , fqdn = ~req.url.indexOf('://') - , removed = '' - , slashAdded = false - , index = 0; - - function next(err, msg) { - var layer, path, status, c; - - if (slashAdded) { - req.url = req.url.substr(1); - slashAdded = false; - } - - req.url = removed + req.url; - req.originalUrl = req.originalUrl || req.url; - removed = ''; - - // next(status, msg) support - if (typeof err === 'number') { - var status = err; - var name = http.STATUS_CODES[status]; - err = new Error(msg || name); - err.name = name; - err.status = status; - } - - // next callback - layer = stack[index++]; - - // all done - if (!layer || res.headerSent) { - // delegate to parent - if (out) return out(err); - - // unhandled error - if (err) { - // default to 500 - if (res.statusCode < 400) res.statusCode = 500; - debug('default %s', res.statusCode); - - // respect err.status - if (err.status) res.statusCode = err.status; - - // production gets a basic error message - var msg = 'production' == env - ? http.STATUS_CODES[res.statusCode] - : err.stack || err.toString(); - - // log to stderr in a non-test env - if ('test' != env) console.error(err.stack || err.toString()); - if (res.headerSent) return req.socket.destroy(); - res.setHeader('Content-Type', 'text/plain'); - res.setHeader('Content-Length', Buffer.byteLength(msg)); - if ('HEAD' == req.method) return res.end(); - res.end(msg); - } else { - debug('default 404'); - res.statusCode = 404; - res.setHeader('Content-Type', 'text/plain'); - if ('HEAD' == req.method) return res.end(); - res.end('Cannot ' + req.method + ' ' + utils.escape(req.originalUrl)); - } - return; - } - - try { - path = utils.parseUrl(req).pathname; - if (undefined == path) path = '/'; - - // skip this layer if the route doesn't match. - if (0 != path.toLowerCase().indexOf(layer.route.toLowerCase())) return next(err); - - c = path[layer.route.length]; - if (c && '/' != c && '.' != c) return next(err); - - // Call the layer handler - // Trim off the part of the url that matches the route - removed = layer.route; - req.url = req.url.substr(removed.length); - - // Ensure leading slash - if (!fqdn && '/' != req.url[0]) { - req.url = '/' + req.url; - slashAdded = true; - } - - debug('%s', layer.handle.name || 'anonymous'); - var arity = layer.handle.length; - if (err) { - if (arity === 4) { - layer.handle(err, req, res, next); - } else { - next(err); - } - } else if (arity < 4) { - layer.handle(req, res, next); - } else { - next(); - } - } catch (e) { - next(e); - } - } - next(); -}; - -/** - * Listen for connections. - * - * This method takes the same arguments - * as node's `http.Server#listen()`. - * - * HTTP and HTTPS: - * - * If you run your application both as HTTP - * and HTTPS you may wrap them individually, - * since your Connect "server" is really just - * a JavaScript `Function`. - * - * var connect = require('connect') - * , http = require('http') - * , https = require('https'); - * - * var app = connect(); - * - * http.createServer(app).listen(80); - * https.createServer(options, app).listen(443); - * - * @return {http.Server} - * @api public - */ - -app.listen = function(){ - var server = http.createServer(this); - return server.listen.apply(server, arguments); -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/directory.html b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/directory.html deleted file mode 100644 index 2d637042..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/directory.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - listing directory {directory} - - - - - -
    -

    {linked-path}

    - {files} -
    - - \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/error.html b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/error.html deleted file mode 100644 index a6d3fafd..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/error.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - {error} - - - -
    -

    {title}

    -

    {statusCode} {error}

    -
      {stack}
    -
    - - diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/favicon.ico b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/favicon.ico deleted file mode 100644 index 895fc96a76b68b4924f1c51d022e1b82fa0f461f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1406 zcmZQzU<5(|0R}M0U}azs1F|%L7$l?s#Ec9aKoZP=&}i&OouUjIY8@C}uZw4x5z5N2 zvEG^C^vXtt_xtJ?p3O32c(KTx;lsgZhW%5M85Sf}k-mf`L80)|7ga~M{a znlL=>m1Q`#uoPkbC~GtXMnhnDh5$DU1D6mx+;2QAKt3ZQFH}H~1y~00GcqzVg9QXw z_<%(a7y$V|wJgF=E>MgE#Aid|14}IyCM5MhEnxFF;pTzOK(>#80puP=gnOXwAd33` mpMe2}f66m3eB@_fcnmb^7!b1nO#opK8zcsj1F30)+jEP);68^d)m`eN0o>(5%D`Q(1;j>g@G;xlf`0VBQ`PFY?6)!N&f?*K}$p; zB!U=NBn{eB8${1}&-2_L*HuZp@ZP1@clS@cHp)4iM1ewzw59vko7eMM{e9z|%NNdX z0V;`?KKSzTCvTm5bc{L^CIKLUxc2X{i{ISz$8Sgf{q)1nXTP{`{s?9mQ$4&hPiKC- zY8q7(Y1Xu5iCf33=O4Vy(+|zQ?rW#gkKB0f%}?+6{G*qT22|DQB-73`YzA{N4W^=s zq0kQYcbtFfz zLz)H<&|z(Y4kBG67=JY6c|L1R-#TR>fC$3^Y%QEnYO1xHsf)+GU`3F<{J0kR(;pbF3)zyg$H+idfnl-wl5Wkh!vUH z4Z32YP=l_}1rZd1W_D&^$A($A+&a0e&P?xx0!ctY2}*<#p+qPVN*B(YzvAWXa*%bzq z7Fz41LKILT(GWohi9|LgIzSZBhb*Zf6R6O}WYQ4GOi&71s9lmll0x6;8&ILOl$j(c z0Z1T(6Tg09{?wd{moFHNN6PS?$|e>1MxSJ(0Z7o2)J-Zv|>acY@f`(Y@g7GwsEj5NLQo+q|HsxQ5}XSX_d@*^A9ZT9=A{W~j+$GyI1 zc4oqTHx@1FlRjw4XWyPN5i2~l_F3@aBk!0yu^aoRDvXy}8@HCjUVQUsuSH4$T5|r< zzZOn^?Wfa6y|Q($Hx4{ws+)wX6-HP4zo!S?4KJ@7PG@G3G{CjXs(p*kIrj6rHs7_y z+=<-=Q62s9FuWa^X~WKgJIAAZJR&XBB002ovPDHLkV1jCMPILeO diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_attach.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_attach.png deleted file mode 100644 index 89ee2da0753040d1ba0a3487473a715a8fe89322..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 794 zcmV+#1LgdQP)i_t#ewV_0K6;=bl;e_Jt7$~$sQ)q$+ia<4Ec+jeaGt9oWH@O|2`W6&O0t!k{B9sUvLWxkCaPsd9W(`fa z;j-|^ZI^2XnzhgZWYRW-kP&J>DWPo`%;JaBX}or79k=+Jo@h%4Eo72tqev+cB?PjP zO<|ByL#>Tehyq$jR74O$B9WDW1`tK`LzYyL3A9iAcRxLkJ`I)n}v%Od-3H>j$OTBtk>(k-9o?8PqI=0 zB&f-+KOXVnjyKJlf4iHOtnuiE_4+ZVJ$dHjU<^o^YCjQ-wt^!;rPpBv(@pFO{9rdw98 z_s@3+yta93oyfL>7AD5}r=|`zS3Gm$_|(iSl8XBd9k%=91J0j2=ivT5cJ18ZmDjh{ z$-RMd{jQ#X79#Sc diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_code.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_code.png deleted file mode 100644 index f7ea90419d950f9e69d977a1f5847456d96a5f0b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 818 zcmV-21I_%2P)@LCln44|RX7Ti z0HI3&7jPq){odH{?_{%nYVq_;n_c4WbUpvU(&Cvnj!vq|kVC-vpF6vp^;;e0mm6HW z+WPzA`AZ|;pPp$&dNjzrc??4rt`k%Q1l*u-BPD0MQ}Fbm8jnsyezNt7+u{23>t7Em zJtETY?ja9KrVs^!LJ$xEMF3-bAZO;-IQJavE60KA7fO$VY_%N)R6s>g5mW>fL4&aR z*EVgKKTBXm!=L?S0?xM zYqL@C$|EDF2q*3zWW7;PDZ}SK*IE8;i!3U62=qn80C&*I1Le7WwNP5EcX;_oh2dJn zf#HgBe4@r$GcjHjmj2vAfT%(YN?}kK=(*+1*DkNNc1H5R++vfBMhACi<5uFUU+N4+ z<&U*CPmWi}REa7C6-t>2im1CWv5Jkefxa6>)dEj-CAW wWa{_}BJ!}~75?MkfaCnj>Dn=~vkLS70Pk`;z)@TQj{pDw07*qoM6N<$f@imYHUIzs diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_copy.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_copy.png deleted file mode 100644 index 195dc6d6c365d298e466026b37c1959d96119ea7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 663 zcmV;I0%-k-P)^@R5;6Z z(>-WZK@^7J_sq=QY_e{46@P+~LNG}sRzZsxQHvCsN*h5ir6^j7pq-$xu$N#V1gx}9 zClV7;5)7zih-s3DB)G=7|99>ji@So7-P24n=VQ(@GctDX!^_@$bj%oviY6e4Dh;od zooe%Wvs8LEKQ&&bL&@bwi=STIAI@!-gB2jC5+?y?VR~VkrNxam-`6*8&po|RZ5LpS zNKdJ%c4bTX`XjKsnecf%W>1%6WT?pKNdLLq{=(f(Col?P1+oq@R>)W(n=x!|*BIIh z6DJGw_w`)u6yN|vAhMteYK5#b%r5^v+VCFl1IGssaclZZMS{vs-LJ2$)n7DAr6==K z<29#%AXsBsDoO}SBaXR#_Ap!JKx)(1)3O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ecB*mq<&M97K^6IVsDO zt2$Ru!b+>2S<}_H>$RcInusU_8PMNdf(W{sNlJ3FkrwMJPeBPO#d}Y^a{9TH(#{Y) l0D?dWAV4eUJX#h`!2gmISk&ZKd4B)^002ovPDHLkV1g&sd|Lnj diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_error.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_error.png deleted file mode 100644 index f07f449a44ff2761bfc7b752db3d08d0e1238b02..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 793 zcmV+!1LpjRP)lHwhvrAu0-@MQwt}+5~MQTtu}C0%;W( z1<{R?aHBz*g;pk%AyQVBR_Zu5m~;ES_vxI-O!vIF|H*|T{l`n#garr?$RMk>)?Y48 z(ZF2yTneKb};DNWF+jK)IF`6_IfJ{i|F3o%Q+l&4_HGBD|ACE8na_6>L z=s{^>-C(a7J$6=8A_%h5W!1K6dcL!D?XX+Ndk)oei?UundDpX_E&1Y&`)3P8#Ny0s z2Ag7_&ZPhyGj%)g&S6V2LNun1;iBQm#Fwlfv zgyESZR$X}2P;=RW!2zid1r$hBL{K7>2qi*f7>pT1=RdT3@-anEoH{ z={KFOO;Dh#bV*jaN>}M>RZqQd`S=6O9C3KpI~I>l%QFYfo;jqQYe5fcn`)+)zMm6P z4X&L(>gnN0!%J4^rhX->?$S5bY<=GEU%jc!KLL8sww-Eg;h z`H-yBHa)yfojYT}&G*GFc$<(Yja_q=lZvj66DC^O5%$B)|Z(CeD=n`|eM04SP; z>-=-l+xdJjA~vR6^xB#o{ehf~tSM`iwaQv$O<8NIHA}W_WOw*~ XD^gE}t;YAo00000NkvXXu0mjfl6ZQ> diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_excel.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_excel.png deleted file mode 100644 index eb6158eb5ca9c4b64c81e70e0fd894dbc8e2bed9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 817 zcmV-11J3-3P)hdKqhFO_H1|Vn1E?(=|cjAh_&P}y{{^`u< zcYD@PK?$)4i~7o9*6F_$F$4lR(d4AAvrez^(88Hk+)+B7E)M3jc=Ewl4$S^`_qwSF zA%qz@=c2EOsz@0qB1IqsqJU)HaG&+}%`-OM8YqW{K85hqj@4&V9vz!Cm_n0-W#f;# zeEpJde%vdgRn5?(+PY=W*z~|lT2-mtown({ll8&3S5+lWz5K}LTRW{k{eJn3Qz!SU zQ`@qI_n2;K?RG~pYJ9=dj-RWgG;P&wEuoAxL~Q)<>x0b=dED^Outj&xQ^rA;u3pw| zca_ClTh_d9cxXg_U!lLRl0`xU@$=UXO|_dRdtXfKwPawmnf(LC7u}-U>8k6}3u|{8 zs9LHr>MIJZGD^r9h|q2yF24Wuh+PM^yMN9GP1$khlDkdyCY}D{kg}jEf-(kW5jBY> z0rB29ZhG-r=i_R{;+1k0?A-sBM;AP6(k1i9ZuixR4?MqXOvphQgCYj~RnXKKL~J9Q zIDNz~XMfO{ZhUg&BTtMyXJqDVqc<x643?SvKHx004lTvR=0a5$dUw z>Xb470000$S;ka1sfH4I-R8njUol7M4dtApOahDylptpYswf1hD#CwFoz6oEA>(SIECU&IQ%a}GXdnC!9$70`0uH1B00000NkvXXu0mjf!8w72 diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_find.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_find.png deleted file mode 100644 index 2f193889f7ea091c292acdd684c595dcb206b5c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 879 zcmV-#1CacQP)@+1&aazfGU7ezSm^v zpACwO+tu0su66!(dT=`e05DeeCnCFJW(8|RKtKa{4LGONnx2V85A4m%PEQ?MEtR-esdM$pB-`H542D0)N2zSC6Imf)4L8?>%ZrW+H>xCKi$unm zvGZq-*Q%Aahx;C*=l+K%-?>XB)6TB$-L$r*`RUvlA`xP1NG2?)ge8@TQ4EN|Jks0u zcDg;oFC#-#R`YbWB`D?Q`1#y7l$LXhjSLf8AvQuB84}i#j0^!#g{VE#(K7h@5pFHy zSenl=@XBEdxp`h2Ji>CR%=qXJ7!e|?paKet-~;#ok#jETyeB(5&Bkhp;!+;51~G=) zH?L7xmDUu_h+a$+xuWom;AWW!mS$%%+436Rjc@}y?l1134kgD0AOf$OmjOR zstUlshZk$ZC!bAyIg{Y29z#&@3SJ;6D4+_eFume9^#TmMccC5u0J!ZCTnO6m$lnD| z5JeFHf`Xs~1vP>RLKI1GKDY<~pjr2&bi(fX;6Nj-ss@Ds0CcoO0H{JsEQkm{q03skAA);_bv3q{k31qwVo&s-q`Z?_e+j^w(WL? zl+uETs5+~xBU2};OqEE9ETLGwsMGe1%iTRNue)9}|0~E4B*@5#oRXZ9oRXZ9TqRep zPrGZuoOON4n@=uPbyP1y4G=+HktC6l(gZoFD>@_lXDrN?wo+zozGt3P=Qh+3L7+}q z2!WK7geXLnO3Vw;o12Skp%_E#+N#9;DDWP?Q-VS3B$v~Ha)dDzWn0zG~O(^_1!n0HYp-( z+;wPIdoFgQlpYV!10V>5@a)1LyGBMvoa}miyp(bxbMTM-FYNyx;V@TfYddyT00000 LNkvXXu0mjf90!wr diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_go.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_go.png deleted file mode 100644 index 80fe1ed0cc75fbb67e9398ae686641f8fb287238..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 779 zcmV+m1N8ifP)JNR2Ufr z!Apo%Wf%b9=l#x^8AolrB&K9H?Pg_|78WA8(M3toqE%3B#7*srcF`i*xhupr27%Nr ziguah1+mN)U5GNmyEfQ3-e%_i&-vb-Co#(>FJ+EhQEwjRYVQ(&UYy{U@%vbY||>@4x=B^vIqabI?L* z;-S&DS^V3-ni4^fl|HMkOEbgX)(390>A}|VIypb5Xee4g;7ck zwKh^A3Mi1Mh@eC$5lV!}Fw%sP623U`g3pd_Hr5sunLvTskx4}&Gm%Q6L}(l4x}jCe z*81q1_4-O*ffi~_nMslo?EQ8t*&Ec(pzEw$vc}pKn_Qp0>D7Jr>ATNC3w@9f|Y+U&+)#!t7l&wKp+nP{PQsb+fb=Yf!Fu&5j8vpRj{FT>jD z>d>$sx;A&+`n$HcF}&sYKSyR;=(=9tvvOj@hUG;~4qTYk^_@E=?$*^_pVh_bGnOt~ z;pEw)j{SK$XVc;qy181rT655gW9NG{(yeablViIL>cDI_ux8m>Pp{tY$J0lgo4#ax za?j0EA3s0S!f>{~ykN9h_RhM&g3K(E`q(dE(Rd49+%xMeR9{qlWnmd{s#(SQ>PmFtSQqUjAtB;_Vvt6}AS_5YgM`Uqu`yva+H8^=4U$e4gHb}u zAQ2N{V3A%pO|?Pv?tb6z=jC}SiRa$G^v3q?*6XcYz$p|cq{uLj@#~Fi`J(>5{@&&N zy%T^+;>8cXx%|o77anP?&W1?1A(>-T49z9pyeCl@7YI+Si zKti7=B~``}TImz(G{0PnlQA3P#MAd}sorMjkP!50B7$nAkU^%#nl{Q9lW0@}9fE-> zN(q7tRuiC_T1r|BBtVBTlQ2+70$Rf;eF`Z;lx46Cpu-rEgb)EBKq(b^W8l<^We(`D z43?0=01z<3G6+UUv6`CsWCk6^93!#+<;ws7007{zS3k2k9-zZKFO~(k`>s0y006+1 zgF_jyIhsL-`FMf~JL~C=cV75(CrJ|q;MVO961G=O zm9d)YpJg5g(4i_HKL75eSE}mq$Y}r}hyVdcV~p>6a}oXr80q`oj%+s700000NkvXX Hu0mjfPs|!l diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_key.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_key.png deleted file mode 100644 index d6626cb09eb11a298b90a8a27b0d8eab41f49a82..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 801 zcmV++1K#|JP)$lC4gU2-`f*>nhR-;k6IP7e>YO!0^w)WK%3$w02v-#>5Ep64PCP| zJihT#O|N+nT7XR2h7dAB?UEAOhJF^mol1i`QtQB`HSY}RE7=r! z)zaVIHr5?>v2Gz&fdYw&2ug$!p+txby(aWZ7(4QT)l2`jX7eMQ{>)lG6ev(fWKxmH zOr%mM5$6B%u~qGtCf40#`mbGj3s!n+^%wnJ&#rl>g<4Z)lB5J6f!?|AP275)Zswr* z%T}4~{;_(?waU!#?JabbF3Cy-kf0{R{z}6$e=5yMQKt3BPcl2>zoTPMqMwF;3!_n|>sT?~bK_-2O_m+o>GJ6h zt=+g$4n7y%1qVJI7*5Yw(hqM=JusY{d}*?U(Oj*gT655eZ>Ksn(qrd7v3}DX1}C>` z+X+8@+4-pVq_fxG zlU}~Ye!0+%>J+pPk+0wV{GM$QaYM?5ux)w2z59=S&H2+K?;gH$bZGzL&g5>G ft+noNiyiPkP9r@8gT|RZ00000NkvXXu0mjfuqTIu diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_lightning.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_lightning.png deleted file mode 100644 index 7e568703d6432c530224e443771a04fc1e2e59c6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 839 zcmV-N1GxN&P)73{`^;G#xwAtHz%LU)4b zqTRU=ve1RNa3QT=ZM7C`iJ~QFQ*9t7<~pX$d^7W%^M8FFCkcQj-~0ZRTBCB(J0^iD z-~e!d9LR`f3#|=(>$bPvx_D-~2jC%pJ=n_e_OK zeJ_2b-KdDDh@@UlzBSMC;EPygH_MwjWBnPGQegihBV73D?-x9PlHL9A=(Vg=8^d<4 z<9r=UkxuIm)*CO=9e###7PztDxUv}e?$0)rQicmYhV`pQ%S!g@;K(?TVfhM#E?bM| z=B0gfb6h@a8bf5FVT-SV~6}?X}9lK@@Yynoty&1zdZP@?RfODsl=2XzzU% zS8gIN43How+9%bK2S@Xbc`O>`z5`%^;pXGy8^4f>9^3!Sp@|O&)m;dOa3q6d;4P-l zca|=H_{G&m?D_+&-}r{u-J$5T=(X4R&)q|O^gN8cgv;s#@5sEPT5_Z)oFo9Ac>l+I zc4ng5zHpps|9)<_Rw>5bKzE(M1j)dFWI_%OH$BJSz0?T+02W0)_a>#vFqb!*d|5wB zzBUN|M&ty51O@=i?kiDrjQ{{}e|^rU?OS|RdxxP1p5mAw36cX72#`R6UsoeCQFI~! z0ATITp!vfeYyQ?Dr=^5BAshfEa0nB~JG?nUa2Aur006MC*<9`)86SPS(W^`H2n+xi ztOWohsFfVfVWrI7PSKW}BmkyPoj(-|J?ES|BGd-}fIxr{00@ANnO*ZR`#)pee4I5T Rmm>fG002ovPDHLkV1i|Hc$okI diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_link.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_link.png deleted file mode 100644 index 312eab0914ab59271384686255d1be913a6b3add..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 830 zcmV-E1Ht@>P)VWgGzD=Y79#JI$lhEn`|2MpRa?Bt#-nSD~P0P(mbVe{KrOBoKnSsk>m|ML{6l zBosu@om4j#WzNLRAk+{k1JRvL(MfE&vvbb->v>W{*z*1_uMP}0cIRX*?mz+wk%*#O z%0D-+$B*g1nRkvI+_3E8Pr1NC6@5M&4vWaLCnNlr;lNlr4i91z&)eBGqL{L{GNu;Fof}GS9{gM5BJuH;2QWk8yuOZdB3pGR#s8bd~ zAmt<>3Q=YH$t5YJ5;7@+8Uh6=ktBgY6#6Pa%2F?h910?U8cLT43KAj$Z1*==ra&gILO{WkHfs(--F=bly9l~${z@AT>V$oat!YAD@M zBE0v_F{`g#^wOSP-u~!wvlmXdd*uqFqoZ0^{&nEMDU+=!>({S0wrQhFmoB}Yq1)~0 z^{A)L8Xjzdr(W4_exYO6u3a{4*kIeXZMJUR>Q=ksjW_p!rAwDKYUs90>6Q|C>56o@ zbrSq^Xk7Gq#>dAsn@un`Hz$?w$;Ss`%jV7L%9ShgHFV~C)6M>B`Tp%|nqPc&G*A3| z)Qe+}vT4-x^t1~XE@(6wR;^lPWMo9n*~E!cy~)YRsT2{`?fqeIw-e7N@mOA%UcCIq z_kH(_EK7|>pM*1Wt2^DaDAp|cvp*@(ZZDKpYkKC^?97(`0sb&XTXy7N#sB~S07*qo IM6N<$f;YmCWB>pF diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_paintbrush.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_paintbrush.png deleted file mode 100644 index 246a2f0b426faa0c7f5ba009e32b1deaf88d1288..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 813 zcmV+|1JeA7P)otxGRZMDZ!_a~nK|b_-`n%VosaL{KDuPV10`(1LIen8kX2Xff$3BE zah#djvFGJ&eE^89Pk*-O^+&d>FC~^GjRYVQ(uuPJyS|-v?9lxA-+tM5>1Qu*n+Ir1 z6KhA>X4$XDH6?-|E5oe1E?pQ5-M;2xw_ex!x}I2+b=}mPFW$U%^;o(Zg*LP!K^1kP%8ynsD^= z1y^6xD1#GLjO{VLdh@0GKY7;d$+NGukV)GRLPn^=q=dF%B#XaJrNP`0E6=}e&Gj3d zKJbQre*WXt!60_DnIzgMQc6S#fvjXxsE1v7;T;njHkdy2miIqAS(nX~o%cO+q+b#h z5tIleLWvL=dQE8OC#{%y*Tnku&K`Tuub&_ELI0t_ea{@3f>Jv&sYqld(%}3_GY3Dm z;O{3*Y?v^A`a|D;^qrM=ykI)U6QHd%WhO~VF!SGjGn0GOZrc3mGZudNl9{Q#X5&-F zuGwVReFLBjE5jr!!^-5*L%!I%PkYH#Hs5rMrEBl^)9)9XTD;xjHFxVZMc3~Dw6#k$ z(-S}RE$bgMHv6Z`mS5|u$$78sp4G-8b@lVkl`HtEv+MGn!F&bKcHPi$$oP_;=BrPf z$(~b3&p3CsuQxhoV$%jIR;`lB-s7FDX)xCTXuJ7ZyIQk96uIR=HBt%-P?N*bp`)EF zq14c}QM+O70NTOa@V~_)&GMZ$^cQDlkyOCa(H3Mf+6xhCuZh`VSN{cQBl5Ys9{cp( rh`2H3A^=GuC6HjQ*7|*0>;m{7QlnX3z3MSD00000NkvXXu0mjfR5FYo diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_paste.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_paste.png deleted file mode 100644 index 968f073fdddc1cc0f0800b1ac4001cd9a55f053d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 703 zcmV;w0zmzVP)AVs!l4K}n~L(tL`6d4Up4iSWnZ3Qg~4n+_J zDGk-qQdogO5JUtO-d5pRp7Nd7_r1^a|M&Zq%mn9Oe((|e0sw%Ur!K7T1pojj=U#f? zQM`qbQrM^DPkwa?DK_be^~z<~RgSMIa<`xP_4P7gg2jCwJ{9^k!fsU=#Ti|%I3p;>90Qd+7|~0h&mIklA#nb>ATL2+v$&u)OBgB z;nsHb)I&QRKeX40H~~cIZxCd}5C} z=79lXoXK%6YlyLtsV$~bSm?Upq|DJh#{|*a7XMm`4QJWZ>s6nL2R1|&J z0VPEwJ9?!n`o5PKAjc->P1Gi8BY*%!5&FVp=#)$mMJYul1Jton}gujiUf??eOy!x&!tsjxy;=Q3_DdcXx=a^OBhW0N~`A@4xB0a*%F? l+@c^sQA%W+?pa#c`9H5UNfS6T{e=Jk002ovPDHLkV1grvM=byV diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_red.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_red.png deleted file mode 100644 index 0b18247da5850f3c2486373a3e179acd2772e8aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 641 zcmV-{0)G98P);68^@7JE5sw#jpE*579S@TLkU(6yap1yN*Zuy>-hV%Q_v4Ar&!63c8OBr(ZRhFu z_kWs36-AmgZCT>x!RqM;Zu9tqvoHI~k@UmYo_g(*J3c%2{N8}7I+|qKPQzv}7t>%W zsu&9G)UmCzkDYSw{fBnuW4j;1fKV_nicw`$8C6D=F_qu`zUiK$2Oc?5UVY+D(`I@R zW`KlwqLftWHH3Z2_XVNfKn>VgT~k=@- z+N>c>0|@A_HbI9Jn`v0~7cfIF(TS69zaomDS1QtgvaBBfGEPLHccO2~3jc>n^6}^HAEh-2#VxC7YYcDXv!L9X= z-R*SOUvIs;n`8(LxP4~^2|JsiN^hq6cU}5dn4v1~Kl{eT7pm&f$PoY`hyVe%y8G*S bxB&kH@RuR86sIAS00000NkvXXu0mjfZBi!% diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_refresh.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_refresh.png deleted file mode 100644 index cf347c7d4685128a4a447abb9fb8e939417644f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 858 zcmV-g1Eu_lP)`6pHR2Ufr z!EI=jWf;Km|8+n2IrHqe<9xxFVk)&(Nh?w$Xk`TAyvb=#e=0aySC z00NkRDM597_LiNIJ2M^qhuTvB004REvvU8@of{r?P8tmo3;+Pk0F0@*jAMhdOkS&1 zhJPPfQa;pP0|4+Yk%#j>X}o-s#EF1_DMV93FsfPP`G*>Ks>L&)Q}w2g%slu0kBfW1 z+*$*0BC^oTl6>OGIq(9BgG4|C90Dk-N_mPazGrQ7uHZ|>BLD!-KmZ)z1e^#?1Sf(M z!6m}K(^b|i%$TcA5bC}r$tAA?0C)g1@CgWliJ;NAk&ZF+-w#}$`-3nZ32C6IVKrHp zr+(!L2hRfF&AsTw>_@ z1y23;E%Oz}?q^Q2d($ayO;-sON2t7$w(Z|o0Pw1YnSp^}0PI+I5HnDNsFCA?oorkG z5sUIGIq=FSyxcj+xlhkm0en=52Bx3@02o12gdAU$_i?v6iyFMuc7P9#zQ-Hf; zVuV$t9P5`m)F2w1?t6{<8%wk{w-PP#Sj#%1MbsjrSI6n;D_@8q9`~W98dNQf$j=iI z6~hpgww&be%X_HI50Hhx@W==u4TLPB;ei-J-1}G8wH}|{i#Lk-WZAyfv}k4y0|fvU zZTy^$u6L>2nWo(NDSV2@MRD}JQ4(c%G%=dG@_vxH?>gcH#*Ue2HC}9sapf8X?R$Z;XEnm&g zW99mh)5jNw008mK8)r^`_{yH0rNn%u1|SpC(tjf#om=+r#lh+?Kb>DVb9`|C0Bvbv zN3U(>f4-tAC1hosRoA7p(b(hL*V}(j>ug<`&U)|l$6o$)!>PBQ9RQSwn9asj2p*|xhU*R^vq?*Twb0t!lm5}`yW5lRy-U0ZYK?8to!;o!r!XeOE$ z0HB3T+6EEoI4PlR=wonwqJ+TvCoWh&$?CAPVYcU= zD{DS0?AkOtb@-hh^ZLq~FMjxYf19X?pa_YqtgZGvv2TaxcF#KT?O%=_*a-kW_;N|D zakkWsOe!)HsT5WRBiC+p;N-c>0Qwy(1D2MDBC595oXSiR07)sKNk-%9*rDBOO^HUD zZW#;)R&EZpqha<(HK$(tZYU#V29<@0qCXgU{gXeGpc_|pTqQD-WO|}%yKZbeX7k*H z2W~CK$v8NBAq~czrc5A(v51g0Wma7`G8}f=ZcuAiYYxZan@gP(;Ku66M6?bquGiHe z3Q0ya)%Lvk@kLixZfZyU@#UFbv+>pYhcj8TRKSr_sWG8i^X~UA**LvbD3(_Lba3xm ziYcpup*A9qJ$?AA=Og05lndxfwr`!C+O~h|B~4 z01q8H`StcY);%&mId7_+)76ovRpeNWRp&4M?#jx@|E-)x%P*A6t^fc407*qoM6N<$ Ef@ddc(f|Me diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white.png deleted file mode 100644 index 8b8b1ca0000bc8fa8d0379926736029f8fabe364..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 294 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^zbpD<_bdI{u9mbgZg z1m~xflqVLYGB~E>C#5QQ<|d}62BjvZR2H60wE-&H;pyTSqH(@-Vl>|&1p(LP>kg~E zYiz5X^`c$+%8#zC{u)yfe-5 zmgid={Z3k(ERKCKrE7DF;=x4^O+ pzO8rLO8p|Ip=x)jHOtWj`bJBmKdh_V<`47(gQu&X%Q~loCIFbEay|e6 diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_acrobat.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_acrobat.png deleted file mode 100644 index 8f8095e46fa4965700afe1f9d065d8a37b101676..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 591 zcmV-V0~O9lw>B8WRlD)Gm}Jrz31u-X&&gn2lvjs=i{7nIaL6v2==uw+8Lcs(8j27 z;|c`rmSv@Lx!heopGP^^Ieb3f=R!%Lpp$}iMS-&P3EJ)s48wrJ_Ni0~k|c47D2nj= z{jS6bt|kFpFf|p5cM`_&0Zh|`rfEp0(}=}lT#(6RpzAsUfxv^LSYX>WlAaN$>)*J5 z0#sE+JRUD8iT9*fz{)_^7@6P&!sEjTcD+I9Z4YjT1`wH@fV{cEvneYGFU%maIEU2s55&K(LixD|{p-uiS@?KNj zk-Go8G$hH6g002ovPDHLkV1hVj1#|!a diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_actionscript.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_actionscript.png deleted file mode 100644 index 159b24075191fc259cfd80c797a1b0d74c168422..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 664 zcmV;J0%!e+P)7Z7t2}reCh0o`+ zAlt$F2tW%oO@m<=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p zDk^c;sHj}OKUc4lGZU}6umlGVNAJx0%sKDOFwQx|V2pVvxhYKe|L9TNk!~md3BVrm zYPDL8Hk*yU-ER3~LGwJ7N`0ZV&nOhBI{~~A;@ND*=kxg?#^W&`4u`zk?Mg_e)8XlK z`T#M+OaR1!<#Nf_>$S`xrqd}OjYhoJ>q)?3vEX8pY&I()ERjfjrXM$k7e+-Qs3Ihj zNyOuEQ2EGYG7ro!o6VOBQEwuV2z)*tR8>WxP{616FY)p1Pn1d}#9}cxolZC$4n(6- z35hJq0;FlHC{ zp*iF(lgUK(E`($(s9pJ8Kn?(M734H_63WHtf}6SQQ_MXEP!#0|&@>J8dL5TfG&tBw z#tYn{TCGZvAr>cca%YYn^!t73tg8OOJ2FvJ(`YpCyVZi*?Ur+1uUA$hAg8-aK)c;e zQ<)!XwHh|n&ND=$@^)>aF-`~n}#*WMkD*M|f8r$i*z7+W! qF|A!t*4fE(R`<_YIkN&?Jng?3oQ|aAqClPi0000t>5xmo{nArfL4CJwMMm+N`pQ3p^Le$?rMud6Rbxz!-yG7bz2z$^USP5(;udf(gfQ zG~f68y^)EvcNWp#bUoDt2=h+^%o-?-|mo~iieWqLNP<0m@2PTB7ftyb= z@H`K$>v9Pr5X`L|rw&CEN2(9SB7A2SE;d|j9@*F}sd(@*2l|P*fWfK>1drZUrtUA7 zNXO~pKn1cjf~~TLbje1g>EPPzN2GH#UIBxJ{}S9=E`{zs-w#hO?vcH+hJxroI5v?j zD!4lP0WXq8zUx3RAP@|Gq$}6wXCjFLZY^YSWBxN9#&g)ro$%5}aYn#y=tJ_aIT%4d z5d4u`rlp!};XGmbZkJE*kYJoi&N0pd*yxY{0${xD;;Q1h^8f$<07*qoM6N<$f(}t7 Ae*gdg diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_code.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_code.png deleted file mode 100644 index 0c76bd1297751b66230f74719504b2adb02b1615..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 603 zcmV-h0;K(kP)^~*-1fljz_B$LUvK}k?BNXe#Y!m=zM!!V#}8bncK5m;8VP zw86G*RI63?Cd%b9bX|ueNlZ|wR6rj|r_)VIP@r2imh3?SN+^{|kY%~8B{maJ@F*OK z&VH9LwOeGt#DRjj0~v~8`>iO7!Ybi;zE$va`A^T#yW`y44;k^#O~K5*jD=qcUhPSc zvyy~q;5H_1WT1l~cqje9yfa+l!hu6xjdOJ8s;8E^+=QQ$tw p?%p!Hy#YapB=@+^9(46X{{RQg%9y;OKjr`c002ovPDHLkV1g7l326WT diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_code_red.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_code_red.png deleted file mode 100644 index 87a69145075afd8f8fd8b391c5da1249ec8b2889..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 587 zcmV-R0<`^!P)LWh{^|hy<@Q*xw+qo|KpY<+vaXbbW{L4q( zTsjXEJvb}e%bgb=o%W0h?4u1;^bWTqH8}5Th002ovPDHLkV1nrS0P+9; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_coldfusion.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_coldfusion.png deleted file mode 100644 index c66011fb0fbdcbf210483d676b7131542a0e282b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 592 zcmV-W0k7R5;6x zlV4BMP#DI+Z{WQcKZBTk0lfkj5F$ztWhP#lcuyb@0@rA^#Kpu5KLA&Rgc}o#aSmis zrZC__xY^&#cI&!!{c|4Q_tcec*#b>|Y15wPcY2=o3;-Bl=(t4;6Ok*pL)-{*A;GX^ zS(@WGp6j~k1wBVR9)BB_gar`}HyRBXh7nM!)u5^>N~MyN6bc0-5{W?44iB<`2biXb zR;wk?jIQg@G!5l)SqhrXCU}x$GU-dY1sra}0uCq@153FUULT=jNwSk}0WBjKz}Jdu z<5gB*<^XtpAmp3m^ZEXQZWd1krhft}CoYaF4cSMvTJ01}X3X37KYdx-D0$c{doUe8 ztY{vlGr-e*;N!WAV%_hgUawyYrhegW>^F)pv%uUTFslHn; zvJ)l{%w(~{!O4`KTmK{Q{zCYltLfs&4?nz|6IdlqHCvX;|HGv~!QW?8P~_d#e0$v$ z)5XHEz{3>qMiH`1+qNYf?huS+@L`J9_$cjJF)Hf?@pu;)`9}BXwGUM{2!{y-4|Z{L zG>z?O%Cp8P5T#j1DID7u_*(Jg?7iss8AZQ+&;u_J{FmILf((9eoiL5nGUe>Fgq*U$z0000 zJ3A|*qoWOonz+4ZQ0KNhDB07SX1?#FrNy8%K)_l}y&kh`*KYdy`Y99&tgNgMLSSrc z?B?+B@HO@P-jS~z2Rgc6yy~Y~%>oJpBxsb$5<&nRLqiuR7K=@0SZj~jTs|sv_jWVX zGe?WflejOaq|Vec=s9+ahmXbyJ|T)Sl*?s82sr2H?Ce~HD5WI+Sz&tmWrN()wI2}+ zKqg92t*l^-#ae~;9%KFlWkmwnY=-UK`_|%ICZ#P1gdjK<2n38VXsuC7{WiU!fZFmm zW~Sda9(Qi@pxO}$ARY+;t##Ao27usOqNt7Hwq6K7G1il@xitj=LIM&{N&#SuX;x4x zmG6FhCg-$PI;hQ=;1iZ>F>^~@)IPi;l}fX?SZ!QiO=X<|pSVkNpJuLHzW(FT_~W-v z?vFpkyE>8ee4d=7wKauH5~dd_M7d2Aa=ICC{Nj7Blqv&DQEP#j_VeWV&WXL>c=LLK zsmYg^_JiDb;%U!UxO%qjFAvsDFj-kzT2$GbV(ZopPM$i$z`!7jvEk07BcC=6FMt4` z*0u3Sy`0b~%#(0000K diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_copy.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_copy.png deleted file mode 100644 index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0+E@$K`QkFV+DTlI$w{GJ;zid{*v9xeIe_ z$|Bp`@iKkgoFK3{4Z)#DWKV~W4K@5WZN+Ql_7%YxNqSx7%cWud&cX>)_PvD*UzxZg a%Kia9Rjz_59@~-t0000)l$0ECbfb-0$}>7z|u>IvuoHEmW&j4lzv=KA+EpIObc7e7{sGA)QVmnM@*^ z%|h38^m;wC+ilpk%>l#V5LCqP_y2_Cayd^XlX;j*r54R*lW!zbqtSpQNyz8(JVmWm zyV4S$2{Uhyc{Cb0QQbf{ZGT{Kr zvJi{K_&f+q^Pv4MK$hhS4TgFj_FD*rLOePdE-E^T7ZzTFCRUB`*?9&h(a#C!-v8lWG#k3AOJQaUey6Oasked^kDPe=Khg@7s584 zg`XfS1)&u*_c;I76#%`kkBfiZgKKo@0)9d6vZw=ExQUtV?eW{Y1Xv}=4X(2zy85d> Y0C^(qLv?Ui{{R3007*qoM6N<$f-gW7od5s; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_edit.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_edit.png deleted file mode 100644 index b93e77600def75c9a144d3d0a5088a62c02cbb0b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 618 zcmV-w0+s!VP)$>5Y&axjp2O=VLu>*f>1L;s0)kkvKC!*u?s6CVL=HJ6oP~pNfZc; zsKr=bq;7MITw8NXw{SZm%59TId2x_9BQ zV86`NuvGI!>o^V!Na!=$7GJE{Cq`b+XwknM{UcGHFTTfmuS+ zm-zYC!P3+zmY;SG$?!fYkOih`QYaLxyF}A86h$GGN}kFj)_o*0e zjPMP%zTG7FYMAfO2Nn1D`D0Cj?Wl>5q%@CE10nX)KxpNmwk+!IWkzywiYD( zqUXiYYIq3qcRyMGJ;IY`(Gz~E$J$zu2+R{)xGlE*88b3WK6V*J>}2iPY1HH|tER0W z_+^^FdppY?o)Gt5M2`%xwRDH@R3G}^i1l4|6uchm0X0f!@&YdVLB5K&dd7Rv{)DXX zt^&vP;}kqj3f>94j+4xd93>s|Q!Ezi>?r8(Il$P}PFxSqu{d*!Y%*#cX(R0f|Juz# z3o0_xI14Al->1uky@W-rCI_%l&>PK^TXNSN{byMk2AI5vbwp!K-%-@!-vPR3iikL1L7HA!^!~ChCFU#lnGzp88=I z67V8PHBo4(l$u?-AKmT8?#_0rKW9dUNRbpLc`}piywAM9$xZ-3fR1C75T(BjCn-l* zjUcci2oXXo-}iqun@#)+`W@kL_-U&|2>MxZy~3IdmRm&8b)9!2%ksg3R)nNnT*TJOC=6{2hG86Dz+<^p6qfG5$i^UNUh+u)CD7O2 zK>Ioazn;U|+X0x$=feveYZL1W*Fm%e5P1sajd#eW#^5(ddx76*pt$^)b}$Q4oPabL zLc^HF>Z{8za;f$LtN0P$6C?1{X*jtXkRJ8IEeyiSzencvH3Ux_y>y^}wfJrRCQN#9 z?&e+C>sSAfrE%mZD5RfZ`gSndD)=P?+nG5Oq$zmY&-v+gc7R6c0u8^Ke#|XOq?gF@othF3zFpM8Il<8BJrWqBtF>b#_ye4{0)Xbu6j&@UIhRE002ov JPDHLkV1nWI9dZBw diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_excel.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_excel.png deleted file mode 100644 index b977d7e52e2446ea01201c5c7209ac3a05f12c9f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 663 zcmV;I0%-k-P)^@R5;6x zlTS!gQ5431_q{u#M2 zg&W%y6a}>qj1Z|7Vu&-DW6d~k-n;jnHsjb-q#u0C^W!_5^C=MlKq<8oNCQ6qS00!X z5eI;XP=g!^f}j{hku}E1zZ?XCjE;`p19k(Rh%^AQQ54xysU+ocx$c#f61Z4HnT#3u~FR(3>BnZniMIF4DouI8Hi4u>cAK%EN)5PO(ip3(% zIgBx+QYirR){Z8QwV$9Z(Mpt=L-Or3#bf-G@66}txq0yc*T(zNTBDT0T8rO^JeNbSI-Tzf5!pBioy4NwAN^?iN#{;fH1Jke4Xa`^fR8m z%h6dq%xX)S?7`zae))(Xst^Scp6B8FejQW?RLTM8@0=vnnntuRGBM2dpo>gbCnTD= z^<;=JuqdSf@O>Z8^XdR?s+KEfhDdB_#ahFj^giCtzT(s8kA$AViyTqaAR;KGaLzUU z<=GqA4bRwpX|IG~*x>pZ!@zLr`XQ`od>m(`;jz|M_*1GDO#$7;n74ppb8=eiqh760 x0yt}J1#p`gw$`o!R{d7zU9~!Un@nJV{4bstt4Au+Up@c;002ovPDHLkV1kWhGjjj{ diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_find.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_find.png deleted file mode 100644 index 581843637079359a6a58fcdccf0763690c67b063..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 676 zcmV;V0$crwP)_k3`4d{s8lK_6bi^@vq&To98fNoK}7)fx$e2^Y&@<^jR_Ee+8}KG;X`@ z@bCyiolqX>bb1ZIs%QGnjzFU~L8H~d?e;*XP(h(S262}XyZ3a0h07r{KV?E70l+e- zE`%3x|M5#q+;HOC(h@A^M)7Rn13dm0&>K$j%k_F4wOWlsNCIH+!c_#{eS&TL8v4yc zcpnPEY`cQzZ$ILq{U-MA6Z6Z|1p!FZjQ}tXSb25J@HphEqX-6Hqo?-_Zn@{d#>2Ml zJGhxTAd&emK$lV-QK&VM&ix0Xy{GyS3Wp(+E1^8BhD3T0a)m-Lw@Lu4zQRrP)9(3F z^>$hh@N>OAXrmPYunLi|fJ$_*5i`46;M>~*5D{bp>-OL3{+!MJa`3kv~Q#QfQ%c z)1s}QE<_XaYBG;IuRF=td#+}fi4h(6HgoUyJLi0t(*dA^B)%@8kkG&bdM5P5^Z5WF z%d%>m^SbN0XeV)wbUOXn5Ag#A$gJx+7-OCkMM1S%MWIlTkbFLmOeW(&n&wUd&;`>p zVcRy$Z{K0=?SpNnP^;BYEEXleFbq(UY&LrXX$6qkJ~)8+b{=jj3HEXds;Z(?D%}}L zX3`39&dy=Zyar!ehA}e>w)(*vrCct{PI9^2Jpj&OZS8<3-@{0(gNv%1{)zAiLY+_^ zl}e>Ofd4&#Irj#7>=o=Uhv5IJ@?sN0^J|(WL2Uun$4}si6}TG-s3T#p&6GE<<2W)O zf{^Y2HlO#*QDvTp3v&d@;8*}aUC4lisG9(w7@d5Y8y)}U#FwCkqp*Mcgme4{&gGRf zlBfd`nF9cQBKB2_L{F8G2)7pAf$i)Ds`|}-c>pc^LRW{w4SQ)3N^BbZx)6BlCZts! zKph%`(m#xg-q3I7=(us;9<)*2%iuQ1J`oV3gU6V~T}^JU5714JN33&GwEEru0d}Uo U{MPL+lmGw#07*qoM6N<$f^vibe*gdg diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_freehand.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_freehand.png deleted file mode 100644 index 8d719df5205f7415ce657e5c277db4533c82f346..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 639 zcmV-_0)YLAP)p{{sC7)XB-g4w*W1a1)XtvxrMYa1o?wn&v~3 zHnC|#(>B_M1d`_7gfzLiHy=0c<2kQQdXu*33(xYN_xYW39(cz9jEVT%VokB8|DoF~ z8u%Q5sdl@4VB7X#uh+v_;yOGY&pRi?378ghv)P1cngiAAb<}D#l*?rWDV0j_dc6Zk z-|P~AJZQCA=yWcQjG8fYnimzj*3KqTfN0Cy!G^$7)+bQ$+mHVd1J zvwOR^5Lm<|R+uyB1Nu4vL?d4qa3tn?9H7SZH@~u=fFHEDfSH|bHU6kh0O3%cLdyny z{`9S2Sw~WMy0MPy!64i`jdk4Z3>^+KIL_fN2V_d&ywBt`^IJpxUI$=YAph~5`;xCe Z{s%Y0vkUXDnO6V+002ovPDHLkV1loX8z=w( diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_gear.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_gear.png deleted file mode 100644 index 106f5aa3611a4807ec8c21701c631730275089a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 402 zcmV;D0d4+?P)<@FR}JvtGRKa0_WfK^c7uXaFH3q@Y!Hnl8VySc`OtkPN3;#l*y*l23+99h*9JzA00}rAC!#M1dZ#v9YOBH|eC*${MmzzYjBu!!-< zK8tujf&(6i)1biy*F>4{f*Kd(IU-JsG&#b_@NgTnx@40)2@2%c;*=?-2Za=}O}7&( w%_K#(S>e1j&gfY?mR})n>>0+8p`iTe2d1K2h8#$+)&Kwi07*qoM6N<$f(2cptN;K2 diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_get.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_get.png deleted file mode 100644 index e4a1ecba1b60e54f3777717ed105cdde745b7184..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 516 zcmV+f0{i`mP)o)wchR-92qq~y6`XqbKmElbB3z{pkZs0VPF`CFvS?7jDn^mFo>d9Y&06* z&1MsS!M-CH3ee+h_sy)Ms%B*ec3R0RpVi9?*mU84yoq(Bw8 z<4(999dJJE!V%pWT~HGRIAb;(#O%2K3?uRpz}AfgE8e9q&OSdr^e^}lC$QXZz;S2A z)w>^oHy>?v)q--`!pmuBe96PxP0u*inQvyFW(llfv9 zXV1s*Jh`y2H%B3ZTA(AzpsQ?hb6_PyZ=c1?_B4fbl>G%!@ubJln=!)x0000#DY{xaiib^#X=YT4@yE_&2#eBulEdzjE`u&@G%2(&u{J-<}d(^uY4W_kMfEX z@!X)AR9F&FL?RJyJRUzvBoeqN{5kY`z3wcM0+du73~_0|*lac! z42Dw(Eg1o{Ash}P8jXrqN+1w`*XxDD;ShmPCZC7#4;wWbHoMvBl$=zF-`?*9j*Nbjd=v@OWt_BgKxP-3wd zy37?ATx&$b+&zRM!K;BD%Okw`Sb@&Pak8$KRX19jWZmC0&n*Ggv%j8nvSPDFw zEkV65AGOoBQ8kf`R|}Px*&INNS%osq9b{Fq2I(x6@xM>tg=vRLF?I`0rWzHyRc>}g~)F_Qn`A>)C_iwK%Z zrIJ;xR)UI1Y4Ozts|-Nho;q zVk9-bX)%F~!;63iu$Fk=VJn3~fmb5S@@)ZqjBT2{f`vT`b2}zxb0$o;EF@G3&BHK^ zc)`1kUzo^Qkk$?KFKHNBD?nP-MJ3b@&4fg;g5l2wMi^g?9qj+~@b;62o_U1_S1J`g z7m^UMg25FX1MJ5AQxAJ5F5WDt=$=-@JV-!LHA2vuxl9kN>PS8x??^AINH6LjF*#nbk4}=n3gfWp$kEX5IpHS zYiQ{@d7Nl&d$#+7-TckP&Q}N91e-C#5QQ<|d}62BjvZR2H60wE-&H<>}%WqH(_V;zPbB1rgSSSC(0? zWlQ#?N3UgnJ9m2C29w!SwoOo5_2Iq!<8vCyEoDoj@#oV($oJEg6Bj@;nD|2g8 s%L|>IZ381yx9RvPhV4J)*SeoEV4lyr#k*`nfWBbxboFyt=akR{0DpOPi2wiq diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_key.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_key.png deleted file mode 100644 index d61648452284da1bc28b10385f95b5d2bf027901..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 616 zcmV-u0+;=XP)-tZUVHjYHp;RjQ0M0pRlXN=mLv{hk9Ebp9&~+Wj-T9IkpzWPWd#fZ)d=zV^~S`;LE*!&u-?g42^wwN&Xr1~#d5ifl_2*B1OoS}CDno^8a50ArfE8;stQF>AP54J@H~%T zFz84s;dO!QJKD36(~!QOg!t_^gfFcSKDU4yK0+Ypg$NT^mIYcQ6bk*3P(lBLh7Df_ zTu=2xC#+-_%)|{Cv8zz0t|0y4D5M`xAc{gwOKc`ou<*&VjUREFHs1qd<_xSkKeTBt zgyCi=@jj;&Ns^GsWWaIUl0Y2azcDlF@u{(P*!+EH;lnU~b|Lv{4|4Hdkh!qoQHiE$ zY#y>KFA0QEw=4Z|uV{0A^`Y=D}hB$GP&<$bi8q(u;p^0(my3Rz7fP}|# zGZ&#uor4@c3q9r|f?H6-UZmfgKx(iV(MQ`MPWB>iC~SxnN5H*zb*A3#zWwgu&c|}3 zn^g87H{pdeasl%Lhmab&jC?lES}7C?4BFDNA<}20hoY@w_IU%i*T;}}wh!589}7~7 z#Ug`-R~4j&+K_y4kW@X7qLr-)S5qVKU)tO;+kXJ++{vPI@{hVK|PhMVVx_`)vx~zUs}c9O-Ok{00000NkvXXu0mjf DS5_-g diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_link.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_link.png deleted file mode 100644 index bf7bd1c9bfd78d689c73ba67cf914182933ee68c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 614 zcmV-s0-61ZP)OOAS;jTeL{ZSdz-%)SMH9tDF;N4B6%j=d15J&5qy`F#vB?Ar zqS1nH@%ny_XSI*Y>) z1f5QYdmzT>YciP<3WehS<{GovEaLGv27>{*-7f0&I$yJ^L%ZGPv1YT$V|u;*+ZCWz ztHI~CDVsuy($SfR6-`N~K?9GTB#l%%0h7 z-q`K-y~E)+s8lMyTrPL8^_pUo)9G|SluG5pPqw6!LJB_PzyJUM07*qoM6N<$f^=yZ AYybcN diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_magnify.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_magnify.png deleted file mode 100644 index f6b74cc40f82fc83e4dfa6e9647ccc1b34e6ed7e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 554 zcmV+_0@eMAP)Vb2f>2}Fa82O3m(Ob=t*sniin`NpInLyMJgI`saru@YOPfh zy4g0#G*cV!#N%;Gq9_VH9?v%kjS3Rb1j8^;C={$Gp=lbj z*(?%?geA!5^Pok%UauwjA)v4g2`HedDw4_Mk4hhBQt?e7YJ5(hcj|3dNu^TOPGnjB zTTsqd3GIZ=Bb`n=7no)dflv&K(lsWw?lH6T1Yht0F9qgIuzh}ym0%n<3d3EBWB*pg z+G!I0lbAEXyd>k|QNuwr4=KX1D+tLPv)j@C1=N4sA4NF9A>HcO3G47*Y6!+SrUH-7 z1hb;^#S=r|`aMh>J#dWruAEf}gcR(DRUC`ZUev&$Sbh0SgLiTXeeHEU<$_YV;9281 zym`igIE%Sm8DpDw7@71Tv^EB5xSdUR*0$Mqp+Wq8OoaZtOg52&)zZ;;M=7#C1Yd6x svjx>8ad4e2x|*xHHwRjcjs6zA0XLDUqKT6dS^xk507*qoM6N<$f*wetruo^Ag2=LamM1T#~4RmC^m`_ zs}H7d&XJ}mg+hU?tu0noRvyjI&o2SRAeYZFesYkts79I^jJ7!A7%6nJwq8O?iT55M z1OQ` zbL{!Cp5o*IRmE9PInMCSPjTwfT~J+EYkz}tjxY=fg5Yf6EQ@DG$0kMJ9h^&$W}9BU zP1oj2;?MWVkKIEl)r=Y;L^Cx2q|>!)qJJ8zE7-V*-Cf7V8_2#1c0N975t~+&QUpQJ z5(uo(-O_`%Rj@U@t>JYAgd!>L?0Idxtd#oW2gc!jinsAEva8|kF4#Ic**mmml_{d^$s}Q5Q)KCys4sfck5bP1SyeHwh2`A<@N&t2j0^lgHC_^(pAAPCNjwl+>AN%C4Ll>_8Hjda%9 oS~i=#*e)>KsPlg0=2)Qg6BCqJ=F8HdGXMYp07*qoM6N<$f@i)wr~m)} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_office.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_office.png deleted file mode 100644 index a65bcb3e1e9613cd9e4950850db43d7025a5fdf9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 779 zcmV+m1N8ifP)JNR5;6x zll@CmQ5eTZ^k*a#RQf}fVOdd`5NJh6S(>6Cf$wEW#f&JyAR#GAn9>Gml;nOf3WCDa z5({5&UB$(IF?G#$x4X@Ickg!Y-HU!Z_rzX=qAq-XI_LS^=lOCT0|0{#{kBkYDS7{3 zD`iu%E=`cDX_^#^#n$5SIQ|4Zhsk8>N|zXHXG@*41$i-7`Jr{8`3S_OEcmY|RF48wXkk?WpdVM4OePBSbfh z#4_=eXJg@3epx~gi>QbUmO}Bm(ENN3+@c?jWiKvSrm(o|W}Ud*?vy~fn1!V~Cl4kB zI-;c!8f~-v)jX82%EG($>?;KSD$64f2&4qQ#=Yyrcpy$57RAVuV#vKMP)0hT$r6m# zc^F^XaJ8R9Q|}x^NoJYIvYZkq-z}Tnj@UJK2l2H zG}p+VvtjP2Z%bsb$~7QLJ9#pC0dKi`ppOd^_V;ME6tdzC0PtV|r=@e@37O`%0k^=5^`%cf$eu00N17Ro!{^30krz>a%3j34C?*{Mt2^a4~ zK=P+Qq%|f;Tc&+9ps;@Mw`EE%rgs&#y=j6BUGg96oIqdwj9-fiy*N(|@o)eD002ov JPDHLkV1j#pUPb@_ diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_paint.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_paint.png deleted file mode 100644 index 23a37b891c2f5faa3b8128d45373ceab794ca609..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 688 zcmV;h0#E&kP)PK^TXt2QS_@2qt2T|9~baC-vaPn=ziepcfAwB$0!O2Q)E}1e8!q+9)KT5JVKU z7HNY}h##OS-BxWHWjD0wrPDeEfUClHs%Q6&2u@FTOJkKMQN|_Rlw6rQz$gPzqGNtj z#ruSeFeh835JJFiM6vp@6M5bXj%k7CMt%SIwfbF_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ZqF=0((gR5-zL$kC*b)!fwu{Euru|XrG<$^n#@)7i_>rCmRxnDq>$Y%gJaCkRd|tE*a2x05Pe!I^e13o69#&RQZ36s0 zB=O|K2Yi(jsMqThn}9t?f5E-)L^naZ+db$&%M$!bCdm=jv7?t_lB?3&%Ltq(>ESw? c;MI421LCcoDG!2@;{X5v07*qoM6N<$f`UZt7XSbN diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_picture.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_picture.png deleted file mode 100644 index 134b6693687b2fa5fe36d48a9c0b8001f937c741..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 650 zcmV;50(Jd~P)VHAd+bMNh~)LLRqN>D)-jd9UvB%+hyKX5U|&4t0)fzgD-MPpQ$nHU%yoz=vI zMGb>1Xu!6Hw$NT~@Au<4P-+{9;Uw?&oj31uzH>xX0T7Xkz!(tn|Ed9-s_FqyReC13 z(ll)vW1O{Ck5ihay12Ob2ABc@RUI;zHpaMiyRDs0r>|D4rHw{ItJSJnYjt~jTbGuW z`X(~}?!&86q40R8<4zYw;$qi0^3ec=c&<&H;r`8W%H=Xymf^i;Wo6~<+}zx2UMzpC z*6MZN?(FMv`n|KO3(KFiUaucP0;Z!@LcUNa%8#vGK5aZ>wDgB0Gi=t*argWJcdlMQ z2#MpEX0wU+9&0U?N(F#OgpviU_Y{jYMsj65U3|PjwUOY}lUYj?MTiK_Il}NCVx-Eh zDx-TzMk7se+M#W_>?A1-x}ZXw3kkyz5kW)_hkjsi@RhKadN#H$Hq)$07*qoM6N<$f}lhwPXGV_ diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_powerpoint.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_powerpoint.png deleted file mode 100644 index c4eff0387d5888c638ba09473ba6d2369f7b56f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 588 zcmV-S0<-;zP)HU2HvUSp%6 z*n}iP63IK?dpo;h@sj9~pcxo;VVTc-XLiP@DgefqE#NE=@oyUd-&HjLpsLIuSFXV-EMck)oQ(A`s%*^&wf0(rNiNHsU%=0Rw;WC z(kbc37l6fo`-0uR!pYkYv8U^3?nsh^@pw!K0TH3uYyx1_2>|JbXPmfskJ|1YAw9w! z9`N)1^Aesr;y5Nr5-ODn)oOL|CGi}f9!&iVwpK$khlIX10X$H6^A_stBJqvLhU$?V`QXqKme*s~gVDJ4A;LTs_e15jhc1;By a82kqHEPVYFAD2!50000JNR5;6( zlS@kiVHAe7MZY2;Xi-5)WxDDgv@tCUl*&p14T@Z~3ThM5LP4tuQfLu@EnG;nXc<8S z6&3BN?fx-cv-Kp6>HRiNTHE>$X( zD&=w+?GWC>?RLAGC6Yix;an~UmSt)tSf}1VS6N1N2ONORdD? zaj}w6DAZZdOud9Ep?M?{iQWbE5^9HLLZZF|1kdy0Tu4InEuboP9@nvbZ-P0n4AZTy zyMRIxRDmUE#LdqYuD=-Qz4N^bC`_#S7vcLn1M}{J(Wl3#c4VWczu&)AjUlh(11>gp>f`wv{KnjF%!aA*Jk N002ovPDHLkV1kkt*XsZP diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_ruby.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_ruby.png deleted file mode 100644 index f59b7c4365fa1720af1aa04eb47167ddaa6eeed4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 626 zcmV-&0*(ENP)ZS(e|#C2>JN4>y}l*tQ*E7zP@R2CCJnkW?xa6bgk%(hgtZ z0=~d?U3i`+Mvi4!&~+WPT1^NX#{u6&QIx+DE(oR{&T5&-ovF?@wGw)P&AtpHZa|G%V*GUUqL@@!d4V$`8=##4)ytY959JG zdc&Kho)&AL70^i z!PEmeeDWCB-UbK(*4JST44^tV2z_J(dn~+vBMJT97_7rzFio=~XczIv?PQ5$v%u~y zu(bteXb5I1h2zCV{Jc2~V{{yzZipgsP6;k264$*#5q?GzCm|CPa9CKqm4b116h3Pu z?+%Cm52plC8|5P0@igf2GV1KkCfk{Zecu=G@VNrf>s%g9c5D%@cfxVb6$nY`1IW=4 zt10QqSps_2JLp0f3I0j0u>#qA;v!+T))KEbCg|mo3q0pG{OR}p0fPds8+K~d>Hq)$ M07*qoM6N<$g1S2e3jhEB diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_stack.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_stack.png deleted file mode 100644 index 44084add79b9a0fc3354d16bbd4b4b5ff8095da7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 317 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^zbpD<_bdI{u9mbgZg z1m~xflqVLYGB~E>C#5QQ<|d}62BjvZR2H60wE-$R@9E+gqH(@-qA%AW0|7U8+xDRI z0k`B18}ImRw2g{jTGP$Pmx3yI6F_2s&$|`cJ!i0UN zB3H;=r{#{FwLaNVJ&hZl9+MTHGx1T^-A=Q0?hRb#8a~x50X%;`b6ik3cw=#XdxWy= zgrpBoDjpwP&g9<9h3x!k_B!?vuTJVkmIJ-U N;OXk;vd$@?2>|rNdMN+^ diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_star.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_star.png deleted file mode 100644 index 3a1441c9a12062a4bb3d706000d3ca14399aebca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 565 zcmV-50?Pe~P)SCZIX8XZzY2l?gCw6LlgWJ5Avz#QX4|&mI8LN)w~J1vgL=KLAhlWz*=#m~gyvxa z&;iC6gb?aZvMdXxX`<0+D1hs_pqJ!wxqlEH;CJ)je~uL(gpi@v>!I0f_Kl=E(E+Tq z26na*9gribxx-Oft(HnstyXUUy!39&E-cI%J5Rsy;(PGZH{g{ty!HVC&yGPT3H8x# zw{^gBPW)O0FMoh{k%l<`1a|To_Wl&u&-GXm8izU|&<&utILc4wc6s@u1bmTz6x{qg zTw@7=FQRcg&r`h+gcR$*Jbv+*DPk7v)B@e0o2 z6IlBXW&8xh@9)YKiV~2>+z&XKd24JT55YWz&JtfvCg4r^~bLP79-yS@n$OW00000NkvXXu0mjf DStt2z diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_swoosh.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_swoosh.png deleted file mode 100644 index e7708292adabf4821612bfca032cbd019c63180b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 634 zcmV-=0)_pFP)KrcWDBzIw9XCtIF5G<@j zP(;CSqHxUrerI>~wKyloM4~t_Ofl@UFEj6$Bmm6p1aK6H{5zI_FOn(%k{CiRq?CT< zoV}Ey-7=-5nVFes;1m!f?EqZLIs4k$n%39XN4dPbtX{9DZnvvaiWV0aH9I>yf;2<< zHmo7WNC<&iE4ji-iKJpsBApDKiAiqWy8R$FV|M@E-RCB03vjWNGQZJxKCc-cSB=dq z#v3snoDMC=4<2BDgiZrv0Veh~mz(X=S@;fbe>CJO_5|oe2o3=wgfW(StLzI-qr&kc zhXEJ?9=`nWXzrUKL_p*Kr9u@95MU9EKqp2vi+%&1&gUn&>Ut_d3>wiyiAJg5G7j%G z#$sf%Kqau!AAHP&4Q?edl!FWqpT=C{D}$15WC#5QQ<|d}62BjvZR2H60wE-%6;pyTSA|c6o&@eC9QG)Hj&ExYL zO&oVL^)+cM^qd@ApywS>pwx0H@RDN}hq;7mU-SKczYQ-hnrr=;iDAQMZQ+*g=YOM= z!QlMQEn7FbaD->uKAYgo_j9)W&$$zS*W9}m(ey0q$&7l-XEWO0Y(9M=SnhLbwy;d>@~SY$Ku*0xPvI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pYB;$&ydfdZG#(j;(iB#^yRlqv#C*LO zXWXM0cpKKBlj#L6awm|;A38Zs3mg;sQZmCAZT8m@X{AlP6 zVI=SsiA16x=>2%^XV3U0y4~G+MNE!B{!#;~%L2l(14PX>EblXb{rnCSlVKe0dyf-O zuY#uOf}m&2xq80;4d3i|cuNw}U@sg3VKRU)>Os_1L3pl5mK*|?X3#a}K+EVZt&w?w zefXKP^ZqnW-3y9AhYJZ~r4m*!Z3OSz3d}2Q`nDM_f_u>L%8Cb}8`?bl)x?gwAy>zp z06y57kT6sry1g2l{|V%UW?)JwnbzUugbvpOF3=oZDo}spfs2EWKOH{_^59;ue!o^A z@e7dWS|QI`Ff-E$USJ`LqDF}zH%R}YOlMiv63A=qK^d}n!5_(fW%^k4U_D`_meIDi kNMKea>saR;>gt<+0gk_zsk5>Xc>n+a07*qoM6N<$f>Jg*?*IS* diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_width.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_width.png deleted file mode 100644 index 1eb880947ddf3e745c29e8d9dc90f09c7e6e323c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 309 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^zbpD<_bdI{u9mbgZg z1m~xflqVLYGB~E>C#5QQ<|d}62BjvZR2H60wE-$R?&;zfqH(@;q9b3Efq-lM(nr^( z=EYR73-9e)UYMWsXy%?aZsD68Yyv^2$~6QgEcljw%kx>O(f-gQ?@fOOx3A-0+Qw?O zRx~W)kn~Qe2d6f9nMG#g9Q04Mk==M~N!Dglvxk!fgVh#w@ZV$IY1+Xc`d{d2UcaP~ zfWp)_Ivqj}l2SPy^9ZWy6rG9Yx4v67_uA&&9|XA~5-#3)W3%em1peD8RWH^#O%XoM zxMPud%}GTj#~*+7JMxTd!`{^Q+>(D3*|@KV`*G2;{QnANOxu1$r2xIe;OXk;vd$@? F2>@zac~<}c diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_word.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_word.png deleted file mode 100644 index ae8ecbf47672a874c0958d0d113a56162c2bd364..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 651 zcmV;60(AX}P)hkjP zNW|QGv-YFNLN^qH@tJycPNG5ti6B7;r4mEr#lr@*T8*M85D`{ZR^BWwF23T<%MYIh zdC)S*p=|xk^!~H=+HSZ183~y8v4|mYmZxt&)5{{~>J`>E223Q5>T$=~mtA71q-jdG z+eJhOAyBW^0k9Gk1+rX8)zFx((CG^&tDY>6XaS~Fy!WJON|Gdujg5^~Vzt@o%BcYLiNiTQSD`zL^ociBz_>bDlpw3kriQ@Z`bVsGz-_6N>$&gTDiKDTKR^ z-hB*tHa^>!oD~5TK^0UK5rZ}RBm50Bv}S-yA%s=Ha5RYb{)!z2N&$&64gfhybBu8p lh~_|?8^bu;BRYt{<}Yrwd83Y=s?Goa002ovPDHLkV1l%3CP4rI diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_world.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_world.png deleted file mode 100644 index 6ed2490ed1432d5d667a76235360824a1088e928..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 734 zcmV<40wMj0P)JT{hN;C#tgf#9krG=I>5!<*aE1_(spcgF}<`n4i zJi-}^6UUeU4jUFwdCiVPDm%`Zx^UBa8J(mnR6wEgz^}o8;)M*Y(@l_!Kfv)}4+NuM zaPXE50z)r)9=D=SR|RIqfQ^j}Hu!fzMeQBo+@PZk1G8hOw|vBTvkx`HM)Xe9q3xao z@`p0`NO!2904FHSLA6E@Y-O6zH$DQzvq@aHsz}}<(!v(Z_+EodX%R&NZW75g+nENo zV0020rxE^;7d!067AN>6*+&YLp$9uH6F-=In`XC{Cn%+o|5)b&boEPr02w@|P*oGm QmjD0&07*qoM6N<$g78X0Q~&?~ diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_wrench.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_wrench.png deleted file mode 100644 index fecadd08afed92536be91ab12d8e37b6bf410d5d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 613 zcmV-r0-F7aP)wK%m(L+9IV|s|#(WRl-O^4GvaQsnHq|OstfO zIJ3}3<01}YGARE4m!7=)QisvlHUo!Qymx-@-t*p_129Ko-#pVI)6#!*kLj-AGXWNR zyA_{wKii_amK7^YT-v z6#plaNm#8`-kz@OvjIt^4%IN{@J3bR zRI}ME1Mv85p|%;RK>ViR>APPLB4;;BpCtqE@P+*7!G>I4UjNx~e>r3HA^tWCQ@S)l z{BslcSwL-CxQ&_ZZSv_g0Tu{yi*X){Mt|W7)lbE`SQxFP00000NkvXXu0mjf;)M*S diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_zip.png b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/icons/page_white_zip.png deleted file mode 100644 index fd4bbccdf1643f4ff5022fbc59b82546e259317e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 386 zcmV-|0e$|7P)_QM!1S$Bhw4w+iRuFWf;tfR6D%SMJrb+tx zC9R6{2>Ou6#juIy6u(I?|;&Owi$sRB4^20apB5xE2 z#B9XekY66S6lzfCL!eEQRgo0LokTA55@Y#%_wN!TXPw^Q4IIXsG~v#u_4t;x_HM16EQ@QRY+rut&97&UefsPmLrQ5P zBC2kcbux9L%2bJz$P$XV$*zSxb2e@6_3O#;&!FD<&hLjGn%~%en;7)djE^d6!t$lW7GyIOKlQ46hr`Z zjLNuRDP_53dNoN?wd&HMgL^m1DXFU<5dQsrceN>fSz00000)O9XRTN^$%%`*Fg>ryDtc(lF@?b>dE!20r+y z#Q*>(wbV5H`-E4Do={CJp7=ERhw15hgZi)?jRG88 zzVz(5;g?Td1izJyO33bhjg2Qc7FVY@f9!o)Gu?DII~vm-Dc?}3M!fsgjP?F(7`rgg z+xOk8XD)e?Zl=5+un`5!7kr?F=eq)K-5uqr%yU$1hLv){Vlm=)*5~`lwMciiXFu*g z)*Jkz6AF>#zb(Vx`Iv{bdGZHtlW)v(y5k^|xgSUc9%0}S20nrYrO}78ofk?bV!5)4 z=Ngz@+$9N1>>mA%IWx`Fqa240bWkiW;2TZgd8CZS0U}@mknC;!2;wi$eI@`h0y2JS`Eae0CW}q(2(%!m8 zWq$`PDU>LT1_y*bBv#P5<@q0@ttz$hIH}YMDvAigCc=y*)jY-VOpTd;A8@3t7Xh4r z0KTWOk;N2Ox4!&&^4B*no$WtTX!BXB)rg!y8dvGgKBQKLJNXRRp0}Bsjd1|LNQX~c zbC~fjrk2iL@4dYF*vt;}dFn(%h)n_-vzEIHMOKRkdF%3Lq|zBgKm_h>TEq!))nWjq zzn;B!?!(dQcHu$#=JF`cS&W~C`WHFW^B!~MI#k)>1Vk&eQy8P1O`J6V04{D@|7d6^ zyBABnh-d^H0FX&L07M||E0n_dp4v&Q%PSE9p#R#Hq)`5I_(B5CE#q dxjPz0{s-<+c#AC!i7@~G002ovPDHLkV1iPlpuqqD diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/style.css b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/style.css deleted file mode 100644 index 32b65071..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/public/style.css +++ /dev/null @@ -1,141 +0,0 @@ -body { - margin: 0; - padding: 80px 100px; - font: 13px "Helvetica Neue", "Lucida Grande", "Arial"; - background: #ECE9E9 -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#ECE9E9)); - background: #ECE9E9 -moz-linear-gradient(top, #fff, #ECE9E9); - background-repeat: no-repeat; - color: #555; - -webkit-font-smoothing: antialiased; -} -h1, h2, h3 { - margin: 0; - font-size: 22px; - color: #343434; -} -h1 em, h2 em { - padding: 0 5px; - font-weight: normal; -} -h1 { - font-size: 60px; -} -h2 { - margin-top: 10px; -} -h3 { - margin: 5px 0 10px 0; - padding-bottom: 5px; - border-bottom: 1px solid #eee; - font-size: 18px; -} -ul { - margin: 0; - padding: 0; -} -ul li { - margin: 5px 0; - padding: 3px 8px; - list-style: none; -} -ul li:hover { - cursor: pointer; - color: #2e2e2e; -} -ul li .path { - padding-left: 5px; - font-weight: bold; -} -ul li .line { - padding-right: 5px; - font-style: italic; -} -ul li:first-child .path { - padding-left: 0; -} -p { - line-height: 1.5; -} -a { - color: #555; - text-decoration: none; -} -a:hover { - color: #303030; -} -#stacktrace { - margin-top: 15px; -} -.directory h1 { - margin-bottom: 15px; - font-size: 18px; -} -ul#files { - width: 100%; - height: 500px; -} -ul#files li { - padding: 0; -} -ul#files li img { - position: absolute; - top: 5px; - left: 5px; -} -ul#files li a { - position: relative; - display: block; - margin: 1px; - width: 30%; - height: 25px; - line-height: 25px; - text-indent: 8px; - float: left; - border: 1px solid transparent; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; - overflow: hidden; - text-overflow: ellipsis; -} -ul#files li a.icon { - text-indent: 25px; -} -ul#files li a:focus, -ul#files li a:hover { - outline: none; - background: rgba(255,255,255,0.65); - border: 1px solid #ececec; -} -ul#files li a.highlight { - -webkit-transition: background .4s ease-in-out; - background: #ffff4f; - border-color: #E9DC51; -} -#search { - display: block; - position: fixed; - top: 20px; - right: 20px; - width: 90px; - -webkit-transition: width ease 0.2s, opacity ease 0.4s; - -moz-transition: width ease 0.2s, opacity ease 0.4s; - -webkit-border-radius: 32px; - -moz-border-radius: 32px; - -webkit-box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.25), inset 0px 1px 3px rgba(0, 0, 0, 0.7), 0px 1px 0px rgba(255, 255, 255, 0.03); - -moz-box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.25), inset 0px 1px 3px rgba(0, 0, 0, 0.7), 0px 1px 0px rgba(255, 255, 255, 0.03); - -webkit-font-smoothing: antialiased; - text-align: left; - font: 13px "Helvetica Neue", Arial, sans-serif; - padding: 4px 10px; - border: none; - background: transparent; - margin-bottom: 0; - outline: none; - opacity: 0.7; - color: #888; -} -#search:focus { - width: 120px; - opacity: 1.0; -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/utils.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/utils.js deleted file mode 100644 index 47b30e0e..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/lib/utils.js +++ /dev/null @@ -1,370 +0,0 @@ - -/*! - * Connect - utils - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var http = require('http') - , crypto = require('crypto') - , parse = require('url').parse - , signature = require('cookie-signature'); - -/** - * Return `true` if the request has a body, otherwise return `false`. - * - * @param {IncomingMessage} req - * @return {Boolean} - * @api private - */ - -exports.hasBody = function(req) { - return 'transfer-encoding' in req.headers || 'content-length' in req.headers; -}; - -/** - * Extract the mime type from the given request's - * _Content-Type_ header. - * - * @param {IncomingMessage} req - * @return {String} - * @api private - */ - -exports.mime = function(req) { - var str = req.headers['content-type'] || ''; - return str.split(';')[0]; -}; - -/** - * Return md5 hash of the given string and optional encoding, - * defaulting to hex. - * - * utils.md5('wahoo'); - * // => "e493298061761236c96b02ea6aa8a2ad" - * - * @param {String} str - * @param {String} encoding - * @return {String} - * @api private - */ - -exports.md5 = function(str, encoding){ - return crypto - .createHash('md5') - .update(str) - .digest(encoding || 'hex'); -}; - -/** - * Merge object b with object a. - * - * var a = { foo: 'bar' } - * , b = { bar: 'baz' }; - * - * utils.merge(a, b); - * // => { foo: 'bar', bar: 'baz' } - * - * @param {Object} a - * @param {Object} b - * @return {Object} - * @api private - */ - -exports.merge = function(a, b){ - if (a && b) { - for (var key in b) { - a[key] = b[key]; - } - } - return a; -}; - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function(html){ - return String(html) - .replace(/&(?!\w+;)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -}; - - -/** - * Return a unique identifier with the given `len`. - * - * utils.uid(10); - * // => "FDaS435D2z" - * - * @param {Number} len - * @return {String} - * @api private - */ - -exports.uid = function(len) { - return crypto.randomBytes(Math.ceil(len * 3 / 4)) - .toString('base64') - .slice(0, len); -}; - -/** - * Sign the given `val` with `secret`. - * - * @param {String} val - * @param {String} secret - * @return {String} - * @api private - */ - -exports.sign = function(val, secret){ - console.warn('do not use utils.sign(), use https://github.com/visionmedia/node-cookie-signature') - 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){ - console.warn('do not use utils.unsign(), use https://github.com/visionmedia/node-cookie-signature') - var str = val.slice(0, val.lastIndexOf('.')); - return exports.sign(str, secret) == val - ? str - : false; -}; - -/** - * Parse signed cookies, returning an object - * containing the decoded key/value pairs, - * while removing the signed key from `obj`. - * - * @param {Object} obj - * @return {Object} - * @api private - */ - -exports.parseSignedCookies = function(obj, secret){ - var ret = {}; - Object.keys(obj).forEach(function(key){ - var val = obj[key]; - if (0 == val.indexOf('s:')) { - val = signature.unsign(val.slice(2), secret); - if (val) { - ret[key] = val; - delete obj[key]; - } - } - }); - return ret; -}; - -/** - * Parse a signed cookie string, return the decoded value - * - * @param {String} str signed cookie string - * @param {String} secret - * @return {String} decoded value - * @api private - */ - -exports.parseSignedCookie = function(str, secret){ - return 0 == str.indexOf('s:') - ? signature.unsign(str.slice(2), secret) - : str; -}; - -/** - * Parse JSON cookies. - * - * @param {Object} obj - * @return {Object} - * @api private - */ - -exports.parseJSONCookies = function(obj){ - Object.keys(obj).forEach(function(key){ - var val = obj[key]; - var res = exports.parseJSONCookie(val); - if (res) obj[key] = res; - }); - return obj; -}; - -/** - * Parse JSON cookie string - * - * @param {String} str - * @return {Object} Parsed object or null if not json cookie - * @api private - */ - -exports.parseJSONCookie = function(str) { - if (0 == str.indexOf('j:')) { - try { - return JSON.parse(str.slice(2)); - } catch (err) { - // no op - } - } -}; - -/** - * Pause `data` and `end` events on the given `obj`. - * Middleware performing async tasks _should_ utilize - * this utility (or similar), to re-emit data once - * the async operation has completed, otherwise these - * events may be lost. - * - * var pause = utils.pause(req); - * fs.readFile(path, function(){ - * next(); - * pause.resume(); - * }); - * - * @param {Object} obj - * @return {Object} - * @api private - */ - -exports.pause = require('pause'); - -/** - * Strip `Content-*` headers from `res`. - * - * @param {ServerResponse} res - * @api private - */ - -exports.removeContentHeaders = function(res){ - Object.keys(res._headers).forEach(function(field){ - if (0 == field.indexOf('content')) { - res.removeHeader(field); - } - }); -}; - -/** - * Check if `req` is a conditional GET request. - * - * @param {IncomingMessage} req - * @return {Boolean} - * @api private - */ - -exports.conditionalGET = function(req) { - return req.headers['if-modified-since'] - || req.headers['if-none-match']; -}; - -/** - * Respond with 401 "Unauthorized". - * - * @param {ServerResponse} res - * @param {String} realm - * @api private - */ - -exports.unauthorized = function(res, realm) { - res.statusCode = 401; - res.setHeader('WWW-Authenticate', 'Basic realm="' + realm + '"'); - res.end('Unauthorized'); -}; - -/** - * Respond with 304 "Not Modified". - * - * @param {ServerResponse} res - * @param {Object} headers - * @api private - */ - -exports.notModified = function(res) { - exports.removeContentHeaders(res); - res.statusCode = 304; - res.end(); -}; - -/** - * Return an ETag in the form of `"-"` - * from the given `stat`. - * - * @param {Object} stat - * @return {String} - * @api private - */ - -exports.etag = function(stat) { - return '"' + stat.size + '-' + Number(stat.mtime) + '"'; -}; - -/** - * Parse the given Cache-Control `str`. - * - * @param {String} str - * @return {Object} - * @api private - */ - -exports.parseCacheControl = function(str){ - var directives = str.split(',') - , obj = {}; - - for(var i = 0, len = directives.length; i < len; i++) { - var parts = directives[i].split('=') - , key = parts.shift().trim() - , val = parseInt(parts.shift(), 10); - - obj[key] = isNaN(val) ? true : val; - } - - return obj; -}; - -/** - * Parse the `req` url with memoization. - * - * @param {ServerRequest} req - * @return {Object} - * @api private - */ - -exports.parseUrl = function(req){ - var parsed = req._parsedUrl; - if (parsed && parsed.href == req.url) { - return parsed; - } else { - return req._parsedUrl = parse(req.url); - } -}; - -/** - * Parse byte `size` string. - * - * @param {String} size - * @return {Number} - * @api private - */ - -exports.parseBytes = require('bytes'); diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/.npmignore b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/.npmignore deleted file mode 100644 index 9daeafb9..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/History.md b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/History.md deleted file mode 100644 index db1f7594..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/History.md +++ /dev/null @@ -1,5 +0,0 @@ - -0.1.0 / 2012-07-04 -================== - - * add bytes to string conversion [yields] diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/Makefile b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/Makefile deleted file mode 100644 index 8e8640f2..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --reporter spec \ - --require should - -.PHONY: test \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/Readme.md b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/Readme.md deleted file mode 100644 index 9325d5bf..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/Readme.md +++ /dev/null @@ -1,51 +0,0 @@ -# node-bytes - - Byte string parser / formatter. - -## Example: - -```js -bytes('1kb') -// => 1024 - -bytes('2mb') -// => 2097152 - -bytes('1gb') -// => 1073741824 - -bytes(1073741824) -// => 1gb -``` - -## Installation - -``` -$ npm install bytes -$ component install visionmedia/bytes.js -``` - -## License - -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/component.json b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/component.json deleted file mode 100644 index 76a6057b..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/component.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "bytes", - "description": "byte size string parser / serializer", - "keywords": ["bytes", "utility"], - "version": "0.1.0", - "scripts": ["index.js"] -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/index.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/index.js deleted file mode 100644 index 3eaafc74..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/index.js +++ /dev/null @@ -1,39 +0,0 @@ - -/** - * Parse byte `size` string. - * - * @param {String} size - * @return {Number} - * @api public - */ - -module.exports = function(size) { - if ('number' == typeof size) return convert(size); - var parts = size.match(/^(\d+(?:\.\d+)?) *(kb|mb|gb)$/) - , n = parseFloat(parts[1]) - , type = parts[2]; - - var map = { - kb: 1 << 10 - , mb: 1 << 20 - , gb: 1 << 30 - }; - - return map[type] * n; -}; - -/** - * convert bytes into string. - * - * @param {Number} b - bytes to convert - * @return {String}i - * @api public - */ - -function convert (b) { - var gb = 1 << 30, mb = 1 << 20, kb = 1 << 10; - if (b >= gb) return (Math.round(b / gb * 100) / 100) + 'gb'; - if (b >= mb) return (Math.round(b / mb * 100) / 100) + 'mb'; - if (b >= kb) return (Math.round(b / kb * 100) / 100) + 'kb'; - return b; -} \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/package.json b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/package.json deleted file mode 100644 index b284b09a..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/bytes/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "bytes", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "description": "byte size string parser / serializer", - "version": "0.1.0", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "component": { - "scripts": { - "bytes": "index.js" - } - }, - "readme": "# node-bytes\n\n Byte string parser / formatter.\n\n## Example:\n\n```js\nbytes('1kb')\n// => 1024\n\nbytes('2mb')\n// => 2097152\n\nbytes('1gb')\n// => 1073741824\n\nbytes(1073741824)\n// => 1gb\n```\n\n## Installation\n\n```\n$ npm install bytes\n$ component install visionmedia/bytes.js\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "_id": "bytes@0.1.0", - "_from": "bytes@0.1.0" -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/.npmignore b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/.npmignore deleted file mode 100644 index 4fbabb33..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -/test/tmp/ -*.upload -*.un~ -*.http diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/.travis.yml b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/.travis.yml deleted file mode 100644 index f1d0f13c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/Makefile b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/Makefile deleted file mode 100644 index 89458724..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -SHELL := /bin/bash - -test: - @./test/run.js - -build: npm test - -npm: - npm install . - -clean: - rm test/tmp/* - -.PHONY: test clean build diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/Readme.md b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/Readme.md deleted file mode 100644 index a5ca104b..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/Readme.md +++ /dev/null @@ -1,311 +0,0 @@ -# Formidable - -[![Build Status](https://secure.travis-ci.org/felixge/node-formidable.png?branch=master)](http://travis-ci.org/felixge/node-formidable) - -## Purpose - -A node.js module for parsing form data, especially file uploads. - -## Current status - -This module was developed for [Transloadit](http://transloadit.com/), a service focused on uploading -and encoding images and videos. It has been battle-tested against hundreds of GB of file uploads from -a large variety of clients and is considered production-ready. - -## Features - -* Fast (~500mb/sec), non-buffering multipart parser -* Automatically writing file uploads to disk -* Low memory footprint -* Graceful error handling -* Very high test coverage - -## Changelog - -### v1.0.9 - -* Emit progress when content length header parsed (Tim Koschützki) -* Fix Readme syntax due to GitHub changes (goob) -* Replace references to old 'sys' module in Readme with 'util' (Peter Sugihara) - -### v1.0.8 - -* Strip potentially unsafe characters when using `keepExtensions: true`. -* Switch to utest / urun for testing -* Add travis build - -### v1.0.7 - -* Remove file from package that was causing problems when installing on windows. (#102) -* Fix typos in Readme (Jason Davies). - -### v1.0.6 - -* Do not default to the default to the field name for file uploads where - filename="". - -### v1.0.5 - -* Support filename="" in multipart parts -* Explain unexpected end() errors in parser better - -**Note:** Starting with this version, formidable emits 'file' events for empty -file input fields. Previously those were incorrectly emitted as regular file -input fields with value = "". - -### v1.0.4 - -* Detect a good default tmp directory regardless of platform. (#88) - -### v1.0.3 - -* Fix problems with utf8 characters (#84) / semicolons in filenames (#58) -* Small performance improvements -* New test suite and fixture system - -### v1.0.2 - -* Exclude node\_modules folder from git -* Implement new `'aborted'` event -* Fix files in example folder to work with recent node versions -* Make gently a devDependency - -[See Commits](https://github.com/felixge/node-formidable/compare/v1.0.1...v1.0.2) - -### v1.0.1 - -* Fix package.json to refer to proper main directory. (#68, Dean Landolt) - -[See Commits](https://github.com/felixge/node-formidable/compare/v1.0.0...v1.0.1) - -### v1.0.0 - -* Add support for multipart boundaries that are quoted strings. (Jeff Craig) - -This marks the beginning of development on version 2.0 which will include -several architectural improvements. - -[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.11...v1.0.0) - -### v0.9.11 - -* Emit `'progress'` event when receiving data, regardless of parsing it. (Tim Koschützki) -* Use [W3C FileAPI Draft](http://dev.w3.org/2006/webapi/FileAPI/) properties for File class - -**Important:** The old property names of the File class will be removed in a -future release. - -[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.10...v0.9.11) - -### Older releases - -These releases were done before starting to maintain the above Changelog: - -* [v0.9.10](https://github.com/felixge/node-formidable/compare/v0.9.9...v0.9.10) -* [v0.9.9](https://github.com/felixge/node-formidable/compare/v0.9.8...v0.9.9) -* [v0.9.8](https://github.com/felixge/node-formidable/compare/v0.9.7...v0.9.8) -* [v0.9.7](https://github.com/felixge/node-formidable/compare/v0.9.6...v0.9.7) -* [v0.9.6](https://github.com/felixge/node-formidable/compare/v0.9.5...v0.9.6) -* [v0.9.5](https://github.com/felixge/node-formidable/compare/v0.9.4...v0.9.5) -* [v0.9.4](https://github.com/felixge/node-formidable/compare/v0.9.3...v0.9.4) -* [v0.9.3](https://github.com/felixge/node-formidable/compare/v0.9.2...v0.9.3) -* [v0.9.2](https://github.com/felixge/node-formidable/compare/v0.9.1...v0.9.2) -* [v0.9.1](https://github.com/felixge/node-formidable/compare/v0.9.0...v0.9.1) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.1.0](https://github.com/felixge/node-formidable/commits/v0.1.0) - -## Installation - -Via [npm](http://github.com/isaacs/npm): - - npm install formidable@latest - -Manually: - - git clone git://github.com/felixge/node-formidable.git formidable - vim my.js - # var formidable = require('./formidable'); - -Note: Formidable requires [gently](http://github.com/felixge/node-gently) to run the unit tests, but you won't need it for just using the library. - -## Example - -Parse an incoming file upload. - - var formidable = require('formidable'), - http = require('http'), - - util = require('util'); - - http.createServer(function(req, res) { - if (req.url == '/upload' && req.method.toLowerCase() == 'post') { - // parse a file upload - var form = new formidable.IncomingForm(); - form.parse(req, function(err, fields, files) { - res.writeHead(200, {'content-type': 'text/plain'}); - res.write('received upload:\n\n'); - res.end(util.inspect({fields: fields, files: files})); - }); - return; - } - - // show a file upload form - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
    '+ - '
    '+ - '
    '+ - ''+ - '
    ' - ); - }).listen(80); - -## API - -### formidable.IncomingForm - -__new formidable.IncomingForm()__ - -Creates a new incoming form. - -__incomingForm.encoding = 'utf-8'__ - -The encoding to use for incoming form fields. - -__incomingForm.uploadDir = process.env.TMP || '/tmp' || process.cwd()__ - -The directory for placing file uploads in. You can move them later on using -`fs.rename()`. The default directory is picked at module load time depending on -the first existing directory from those listed above. - -__incomingForm.keepExtensions = false__ - -If you want the files written to `incomingForm.uploadDir` to include the extensions of the original files, set this property to `true`. - -__incomingForm.type__ - -Either 'multipart' or 'urlencoded' depending on the incoming request. - -__incomingForm.maxFieldsSize = 2 * 1024 * 1024__ - -Limits the amount of memory a field (not file) can allocate in bytes. -If this value is exceeded, an `'error'` event is emitted. The default -size is 2MB. - -__incomingForm.hash = false__ - -If you want checksums calculated for incoming files, set this to either `'sha1'` or `'md5'`. - -__incomingForm.bytesReceived__ - -The amount of bytes received for this form so far. - -__incomingForm.bytesExpected__ - -The expected number of bytes in this form. - -__incomingForm.parse(request, [cb])__ - -Parses an incoming node.js `request` containing form data. If `cb` is provided, all fields an files are collected and passed to the callback: - - incomingForm.parse(req, function(err, fields, files) { - // ... - }); - -__incomingForm.onPart(part)__ - -You may overwrite this method if you are interested in directly accessing the multipart stream. Doing so will disable any `'field'` / `'file'` events processing which would occur otherwise, making you fully responsible for handling the processing. - - incomingForm.onPart = function(part) { - part.addListener('data', function() { - // ... - }); - } - -If you want to use formidable to only handle certain parts for you, you can do so: - - incomingForm.onPart = function(part) { - if (!part.filename) { - // let formidable handle all non-file parts - incomingForm.handlePart(part); - } - } - -Check the code in this method for further inspiration. - -__Event: 'progress' (bytesReceived, bytesExpected)__ - -Emitted after each incoming chunk of data that has been parsed. Can be used to roll your own progress bar. - -__Event: 'field' (name, value)__ - -Emitted whenever a field / value pair has been received. - -__Event: 'fileBegin' (name, file)__ - -Emitted whenever a new file is detected in the upload stream. Use this even if -you want to stream the file to somewhere else while buffering the upload on -the file system. - -__Event: 'file' (name, file)__ - -Emitted whenever a field / file pair has been received. `file` is an instance of `File`. - -__Event: 'error' (err)__ - -Emitted when there is an error processing the incoming form. A request that experiences an error is automatically paused, you will have to manually call `request.resume()` if you want the request to continue firing `'data'` events. - -__Event: 'aborted'__ - -Emitted when the request was aborted by the user. Right now this can be due to a 'timeout' or 'close' event on the socket. In the future there will be a separate 'timeout' event (needs a change in the node core). - -__Event: 'end' ()__ - -Emitted when the entire request has been received, and all contained files have finished flushing to disk. This is a great place for you to send your response. - -### formidable.File - -__file.size = 0__ - -The size of the uploaded file in bytes. If the file is still being uploaded (see `'fileBegin'` event), this property says how many bytes of the file have been written to disk yet. - -__file.path = null__ - -The path this file is being written to. You can modify this in the `'fileBegin'` event in -case you are unhappy with the way formidable generates a temporary path for your files. - -__file.name = null__ - -The name this file had according to the uploading client. - -__file.type = null__ - -The mime type of this file, according to the uploading client. - -__file.lastModifiedDate = null__ - -A date object (or `null`) containing the time this file was last written to. Mostly -here for compatibility with the [W3C File API Draft](http://dev.w3.org/2006/webapi/FileAPI/). - -__file.hash = null__ - -If hash calculation was set, you can read the hex digest out of this var. - -## License - -Formidable is licensed under the MIT license. - -## Ports - -* [multipart-parser](http://github.com/FooBarWidget/multipart-parser): a C++ parser based on formidable - -## Credits - -* [Ryan Dahl](http://twitter.com/ryah) for his work on [http-parser](http://github.com/ry/http-parser) which heavily inspired multipart_parser.js diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/TODO b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/TODO deleted file mode 100644 index e1107f2a..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/TODO +++ /dev/null @@ -1,3 +0,0 @@ -- Better bufferMaxSize handling approach -- Add tests for JSON parser pull request and merge it -- Implement QuerystringParser the same way as MultipartParser diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/benchmark/bench-multipart-parser.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/benchmark/bench-multipart-parser.js deleted file mode 100644 index bff41f15..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/benchmark/bench-multipart-parser.js +++ /dev/null @@ -1,70 +0,0 @@ -require('../test/common'); -var multipartParser = require('../lib/multipart_parser'), - MultipartParser = multipartParser.MultipartParser, - parser = new MultipartParser(), - Buffer = require('buffer').Buffer, - boundary = '-----------------------------168072824752491622650073', - mb = 100, - buffer = createMultipartBuffer(boundary, mb * 1024 * 1024), - callbacks = - { partBegin: -1, - partEnd: -1, - headerField: -1, - headerValue: -1, - partData: -1, - end: -1, - }; - - -parser.initWithBoundary(boundary); -parser.onHeaderField = function() { - callbacks.headerField++; -}; - -parser.onHeaderValue = function() { - callbacks.headerValue++; -}; - -parser.onPartBegin = function() { - callbacks.partBegin++; -}; - -parser.onPartData = function() { - callbacks.partData++; -}; - -parser.onPartEnd = function() { - callbacks.partEnd++; -}; - -parser.onEnd = function() { - callbacks.end++; -}; - -var start = +new Date(), - nparsed = parser.write(buffer), - duration = +new Date - start, - mbPerSec = (mb / (duration / 1000)).toFixed(2); - -console.log(mbPerSec+' mb/sec'); - -assert.equal(nparsed, buffer.length); - -function createMultipartBuffer(boundary, size) { - var head = - '--'+boundary+'\r\n' - + 'content-disposition: form-data; name="field1"\r\n' - + '\r\n' - , tail = '\r\n--'+boundary+'--\r\n' - , buffer = new Buffer(size); - - buffer.write(head, 'ascii', 0); - buffer.write(tail, 'ascii', buffer.length - tail.length); - return buffer; -} - -process.on('exit', function() { - for (var k in callbacks) { - assert.equal(0, callbacks[k], k+' count off by '+callbacks[k]); - } -}); diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/example/post.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/example/post.js deleted file mode 100644 index f6c15a64..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/example/post.js +++ /dev/null @@ -1,43 +0,0 @@ -require('../test/common'); -var http = require('http'), - util = require('util'), - formidable = require('formidable'), - server; - -server = http.createServer(function(req, res) { - if (req.url == '/') { - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
    '+ - '
    '+ - '
    '+ - ''+ - '
    ' - ); - } else if (req.url == '/post') { - var form = new formidable.IncomingForm(), - fields = []; - - form - .on('error', function(err) { - res.writeHead(200, {'content-type': 'text/plain'}); - res.end('error:\n\n'+util.inspect(err)); - }) - .on('field', function(field, value) { - console.log(field, value); - fields.push([field, value]); - }) - .on('end', function() { - console.log('-> post done'); - res.writeHead(200, {'content-type': 'text/plain'}); - res.end('received fields:\n\n '+util.inspect(fields)); - }); - form.parse(req); - } else { - res.writeHead(404, {'content-type': 'text/plain'}); - res.end('404'); - } -}); -server.listen(TEST_PORT); - -console.log('listening on http://localhost:'+TEST_PORT+'/'); diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/example/upload.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/example/upload.js deleted file mode 100644 index 050cdd9d..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/example/upload.js +++ /dev/null @@ -1,48 +0,0 @@ -require('../test/common'); -var http = require('http'), - util = require('util'), - formidable = require('formidable'), - server; - -server = http.createServer(function(req, res) { - if (req.url == '/') { - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
    '+ - '
    '+ - '
    '+ - ''+ - '
    ' - ); - } else if (req.url == '/upload') { - var form = new formidable.IncomingForm(), - files = [], - fields = []; - - form.uploadDir = TEST_TMP; - - form - .on('field', function(field, value) { - console.log(field, value); - fields.push([field, value]); - }) - .on('file', function(field, file) { - console.log(field, file); - files.push([field, file]); - }) - .on('end', function() { - console.log('-> upload done'); - res.writeHead(200, {'content-type': 'text/plain'}); - res.write('received fields:\n\n '+util.inspect(fields)); - res.write('\n\n'); - res.end('received files:\n\n '+util.inspect(files)); - }); - form.parse(req); - } else { - res.writeHead(404, {'content-type': 'text/plain'}); - res.end('404'); - } -}); -server.listen(TEST_PORT); - -console.log('listening on http://localhost:'+TEST_PORT+'/'); diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/index.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/index.js deleted file mode 100644 index be410325..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/formidable'); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/file.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/file.js deleted file mode 100644 index dad8d5f7..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/file.js +++ /dev/null @@ -1,73 +0,0 @@ -if (global.GENTLY) require = GENTLY.hijack(require); - -var util = require('./util'), - WriteStream = require('fs').WriteStream, - EventEmitter = require('events').EventEmitter, - crypto = require('crypto'); - -function File(properties) { - EventEmitter.call(this); - - this.size = 0; - this.path = null; - this.name = null; - this.type = null; - this.hash = null; - this.lastModifiedDate = null; - - this._writeStream = null; - - for (var key in properties) { - this[key] = properties[key]; - } - - if(typeof this.hash === 'string') { - this.hash = crypto.createHash(properties.hash); - } - - this._backwardsCompatibility(); -} -module.exports = File; -util.inherits(File, EventEmitter); - -// @todo Next release: Show error messages when accessing these -File.prototype._backwardsCompatibility = function() { - var self = this; - this.__defineGetter__('length', function() { - return self.size; - }); - this.__defineGetter__('filename', function() { - return self.name; - }); - this.__defineGetter__('mime', function() { - return self.type; - }); -}; - -File.prototype.open = function() { - this._writeStream = new WriteStream(this.path); -}; - -File.prototype.write = function(buffer, cb) { - var self = this; - this._writeStream.write(buffer, function() { - if(self.hash) { - self.hash.update(buffer); - } - self.lastModifiedDate = new Date(); - self.size += buffer.length; - self.emit('progress', self.size); - cb(); - }); -}; - -File.prototype.end = function(cb) { - var self = this; - this._writeStream.end(function() { - if(self.hash) { - self.hash = self.hash.digest('hex'); - } - self.emit('end'); - cb(); - }); -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js deleted file mode 100644 index 060eac29..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js +++ /dev/null @@ -1,384 +0,0 @@ -if (global.GENTLY) require = GENTLY.hijack(require); - -var fs = require('fs'); -var util = require('./util'), - path = require('path'), - File = require('./file'), - MultipartParser = require('./multipart_parser').MultipartParser, - QuerystringParser = require('./querystring_parser').QuerystringParser, - StringDecoder = require('string_decoder').StringDecoder, - EventEmitter = require('events').EventEmitter, - Stream = require('stream').Stream; - -function IncomingForm(opts) { - if (!(this instanceof IncomingForm)) return new IncomingForm; - EventEmitter.call(this); - - opts=opts||{}; - - this.error = null; - this.ended = false; - - this.maxFieldsSize = opts.maxFieldsSize || 2 * 1024 * 1024; - this.keepExtensions = opts.keepExtensions || false; - this.uploadDir = opts.uploadDir || IncomingForm.UPLOAD_DIR; - this.encoding = opts.encoding || 'utf-8'; - this.headers = null; - this.type = null; - this.hash = false; - - this.bytesReceived = null; - this.bytesExpected = null; - - this._parser = null; - this._flushing = 0; - this._fieldsSize = 0; -}; -util.inherits(IncomingForm, EventEmitter); -exports.IncomingForm = IncomingForm; - -IncomingForm.UPLOAD_DIR = (function() { - var dirs = [process.env.TMP, '/tmp', process.cwd()]; - for (var i = 0; i < dirs.length; i++) { - var dir = dirs[i]; - var isDirectory = false; - - try { - isDirectory = fs.statSync(dir).isDirectory(); - } catch (e) {} - - if (isDirectory) return dir; - } -})(); - -IncomingForm.prototype.parse = function(req, cb) { - this.pause = function() { - try { - req.pause(); - } catch (err) { - // the stream was destroyed - if (!this.ended) { - // before it was completed, crash & burn - this._error(err); - } - return false; - } - return true; - }; - - this.resume = function() { - try { - req.resume(); - } catch (err) { - // the stream was destroyed - if (!this.ended) { - // before it was completed, crash & burn - this._error(err); - } - return false; - } - - return true; - }; - - this.writeHeaders(req.headers); - - var self = this; - req - .on('error', function(err) { - self._error(err); - }) - .on('aborted', function() { - self.emit('aborted'); - }) - .on('data', function(buffer) { - self.write(buffer); - }) - .on('end', function() { - if (self.error) { - return; - } - - var err = self._parser.end(); - if (err) { - self._error(err); - } - }); - - if (cb) { - var fields = {}, files = {}; - this - .on('field', function(name, value) { - fields[name] = value; - }) - .on('file', function(name, file) { - files[name] = file; - }) - .on('error', function(err) { - cb(err, fields, files); - }) - .on('end', function() { - cb(null, fields, files); - }); - } - - return this; -}; - -IncomingForm.prototype.writeHeaders = function(headers) { - this.headers = headers; - this._parseContentLength(); - this._parseContentType(); -}; - -IncomingForm.prototype.write = function(buffer) { - if (!this._parser) { - this._error(new Error('unintialized parser')); - return; - } - - this.bytesReceived += buffer.length; - this.emit('progress', this.bytesReceived, this.bytesExpected); - - var bytesParsed = this._parser.write(buffer); - if (bytesParsed !== buffer.length) { - this._error(new Error('parser error, '+bytesParsed+' of '+buffer.length+' bytes parsed')); - } - - return bytesParsed; -}; - -IncomingForm.prototype.pause = function() { - // this does nothing, unless overwritten in IncomingForm.parse - return false; -}; - -IncomingForm.prototype.resume = function() { - // this does nothing, unless overwritten in IncomingForm.parse - return false; -}; - -IncomingForm.prototype.onPart = function(part) { - // this method can be overwritten by the user - this.handlePart(part); -}; - -IncomingForm.prototype.handlePart = function(part) { - var self = this; - - if (part.filename === undefined) { - var value = '' - , decoder = new StringDecoder(this.encoding); - - part.on('data', function(buffer) { - self._fieldsSize += buffer.length; - if (self._fieldsSize > self.maxFieldsSize) { - self._error(new Error('maxFieldsSize exceeded, received '+self._fieldsSize+' bytes of field data')); - return; - } - value += decoder.write(buffer); - }); - - part.on('end', function() { - self.emit('field', part.name, value); - }); - return; - } - - this._flushing++; - - var file = new File({ - path: this._uploadPath(part.filename), - name: part.filename, - type: part.mime, - hash: self.hash - }); - - this.emit('fileBegin', part.name, file); - - file.open(); - - part.on('data', function(buffer) { - self.pause(); - file.write(buffer, function() { - self.resume(); - }); - }); - - part.on('end', function() { - file.end(function() { - self._flushing--; - self.emit('file', part.name, file); - self._maybeEnd(); - }); - }); -}; - -IncomingForm.prototype._parseContentType = function() { - if (!this.headers['content-type']) { - this._error(new Error('bad content-type header, no content-type')); - return; - } - - if (this.headers['content-type'].match(/urlencoded/i)) { - this._initUrlencoded(); - return; - } - - if (this.headers['content-type'].match(/multipart/i)) { - var m; - if (m = this.headers['content-type'].match(/boundary=(?:"([^"]+)"|([^;]+))/i)) { - this._initMultipart(m[1] || m[2]); - } else { - this._error(new Error('bad content-type header, no multipart boundary')); - } - return; - } - - this._error(new Error('bad content-type header, unknown content-type: '+this.headers['content-type'])); -}; - -IncomingForm.prototype._error = function(err) { - if (this.error) { - return; - } - - this.error = err; - this.pause(); - this.emit('error', err); -}; - -IncomingForm.prototype._parseContentLength = function() { - if (this.headers['content-length']) { - this.bytesReceived = 0; - this.bytesExpected = parseInt(this.headers['content-length'], 10); - this.emit('progress', this.bytesReceived, this.bytesExpected); - } -}; - -IncomingForm.prototype._newParser = function() { - return new MultipartParser(); -}; - -IncomingForm.prototype._initMultipart = function(boundary) { - this.type = 'multipart'; - - var parser = new MultipartParser(), - self = this, - headerField, - headerValue, - part; - - parser.initWithBoundary(boundary); - - parser.onPartBegin = function() { - part = new Stream(); - part.readable = true; - part.headers = {}; - part.name = null; - part.filename = null; - part.mime = null; - headerField = ''; - headerValue = ''; - }; - - parser.onHeaderField = function(b, start, end) { - headerField += b.toString(self.encoding, start, end); - }; - - parser.onHeaderValue = function(b, start, end) { - headerValue += b.toString(self.encoding, start, end); - }; - - parser.onHeaderEnd = function() { - headerField = headerField.toLowerCase(); - part.headers[headerField] = headerValue; - - var m; - if (headerField == 'content-disposition') { - if (m = headerValue.match(/name="([^"]+)"/i)) { - part.name = m[1]; - } - - part.filename = self._fileName(headerValue); - } else if (headerField == 'content-type') { - part.mime = headerValue; - } - - headerField = ''; - headerValue = ''; - }; - - parser.onHeadersEnd = function() { - self.onPart(part); - }; - - parser.onPartData = function(b, start, end) { - part.emit('data', b.slice(start, end)); - }; - - parser.onPartEnd = function() { - part.emit('end'); - }; - - parser.onEnd = function() { - self.ended = true; - self._maybeEnd(); - }; - - this._parser = parser; -}; - -IncomingForm.prototype._fileName = function(headerValue) { - var m = headerValue.match(/filename="(.*?)"($|; )/i) - if (!m) return; - - var filename = m[1].substr(m[1].lastIndexOf('\\') + 1); - filename = filename.replace(/%22/g, '"'); - filename = filename.replace(/&#([\d]{4});/g, function(m, code) { - return String.fromCharCode(code); - }); - return filename; -}; - -IncomingForm.prototype._initUrlencoded = function() { - this.type = 'urlencoded'; - - var parser = new QuerystringParser() - , self = this; - - parser.onField = function(key, val) { - self.emit('field', key, val); - }; - - parser.onEnd = function() { - self.ended = true; - self._maybeEnd(); - }; - - this._parser = parser; -}; - -IncomingForm.prototype._uploadPath = function(filename) { - var name = ''; - for (var i = 0; i < 32; i++) { - name += Math.floor(Math.random() * 16).toString(16); - } - - if (this.keepExtensions) { - var ext = path.extname(filename); - ext = ext.replace(/(\.[a-z0-9]+).*/, '$1') - - name += ext; - } - - return path.join(this.uploadDir, name); -}; - -IncomingForm.prototype._maybeEnd = function() { - if (!this.ended || this._flushing) { - return; - } - - this.emit('end'); -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/index.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/index.js deleted file mode 100644 index 7a6e3e10..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/index.js +++ /dev/null @@ -1,3 +0,0 @@ -var IncomingForm = require('./incoming_form').IncomingForm; -IncomingForm.IncomingForm = IncomingForm; -module.exports = IncomingForm; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/multipart_parser.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/multipart_parser.js deleted file mode 100644 index 9ca567cd..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/multipart_parser.js +++ /dev/null @@ -1,312 +0,0 @@ -var Buffer = require('buffer').Buffer, - s = 0, - S = - { PARSER_UNINITIALIZED: s++, - START: s++, - START_BOUNDARY: s++, - HEADER_FIELD_START: s++, - HEADER_FIELD: s++, - HEADER_VALUE_START: s++, - HEADER_VALUE: s++, - HEADER_VALUE_ALMOST_DONE: s++, - HEADERS_ALMOST_DONE: s++, - PART_DATA_START: s++, - PART_DATA: s++, - PART_END: s++, - END: s++, - }, - - f = 1, - F = - { PART_BOUNDARY: f, - LAST_BOUNDARY: f *= 2, - }, - - LF = 10, - CR = 13, - SPACE = 32, - HYPHEN = 45, - COLON = 58, - A = 97, - Z = 122, - - lower = function(c) { - return c | 0x20; - }; - -for (var s in S) { - exports[s] = S[s]; -} - -function MultipartParser() { - this.boundary = null; - this.boundaryChars = null; - this.lookbehind = null; - this.state = S.PARSER_UNINITIALIZED; - - this.index = null; - this.flags = 0; -}; -exports.MultipartParser = MultipartParser; - -MultipartParser.stateToString = function(stateNumber) { - for (var state in S) { - var number = S[state]; - if (number === stateNumber) return state; - } -}; - -MultipartParser.prototype.initWithBoundary = function(str) { - this.boundary = new Buffer(str.length+4); - this.boundary.write('\r\n--', 'ascii', 0); - this.boundary.write(str, 'ascii', 4); - this.lookbehind = new Buffer(this.boundary.length+8); - this.state = S.START; - - this.boundaryChars = {}; - for (var i = 0; i < this.boundary.length; i++) { - this.boundaryChars[this.boundary[i]] = true; - } -}; - -MultipartParser.prototype.write = function(buffer) { - var self = this, - i = 0, - len = buffer.length, - prevIndex = this.index, - index = this.index, - state = this.state, - flags = this.flags, - lookbehind = this.lookbehind, - boundary = this.boundary, - boundaryChars = this.boundaryChars, - boundaryLength = this.boundary.length, - boundaryEnd = boundaryLength - 1, - bufferLength = buffer.length, - c, - cl, - - mark = function(name) { - self[name+'Mark'] = i; - }, - clear = function(name) { - delete self[name+'Mark']; - }, - callback = function(name, buffer, start, end) { - if (start !== undefined && start === end) { - return; - } - - var callbackSymbol = 'on'+name.substr(0, 1).toUpperCase()+name.substr(1); - if (callbackSymbol in self) { - self[callbackSymbol](buffer, start, end); - } - }, - dataCallback = function(name, clear) { - var markSymbol = name+'Mark'; - if (!(markSymbol in self)) { - return; - } - - if (!clear) { - callback(name, buffer, self[markSymbol], buffer.length); - self[markSymbol] = 0; - } else { - callback(name, buffer, self[markSymbol], i); - delete self[markSymbol]; - } - }; - - for (i = 0; i < len; i++) { - c = buffer[i]; - switch (state) { - case S.PARSER_UNINITIALIZED: - return i; - case S.START: - index = 0; - state = S.START_BOUNDARY; - case S.START_BOUNDARY: - if (index == boundary.length - 2) { - if (c != CR) { - return i; - } - index++; - break; - } else if (index - 1 == boundary.length - 2) { - if (c != LF) { - return i; - } - index = 0; - callback('partBegin'); - state = S.HEADER_FIELD_START; - break; - } - - if (c != boundary[index+2]) { - return i; - } - index++; - break; - case S.HEADER_FIELD_START: - state = S.HEADER_FIELD; - mark('headerField'); - index = 0; - case S.HEADER_FIELD: - if (c == CR) { - clear('headerField'); - state = S.HEADERS_ALMOST_DONE; - break; - } - - index++; - if (c == HYPHEN) { - break; - } - - if (c == COLON) { - if (index == 1) { - // empty header field - return i; - } - dataCallback('headerField', true); - state = S.HEADER_VALUE_START; - break; - } - - cl = lower(c); - if (cl < A || cl > Z) { - return i; - } - break; - case S.HEADER_VALUE_START: - if (c == SPACE) { - break; - } - - mark('headerValue'); - state = S.HEADER_VALUE; - case S.HEADER_VALUE: - if (c == CR) { - dataCallback('headerValue', true); - callback('headerEnd'); - state = S.HEADER_VALUE_ALMOST_DONE; - } - break; - case S.HEADER_VALUE_ALMOST_DONE: - if (c != LF) { - return i; - } - state = S.HEADER_FIELD_START; - break; - case S.HEADERS_ALMOST_DONE: - if (c != LF) { - return i; - } - - callback('headersEnd'); - state = S.PART_DATA_START; - break; - case S.PART_DATA_START: - state = S.PART_DATA - mark('partData'); - case S.PART_DATA: - prevIndex = index; - - if (index == 0) { - // boyer-moore derrived algorithm to safely skip non-boundary data - i += boundaryEnd; - while (i < bufferLength && !(buffer[i] in boundaryChars)) { - i += boundaryLength; - } - i -= boundaryEnd; - c = buffer[i]; - } - - if (index < boundary.length) { - if (boundary[index] == c) { - if (index == 0) { - dataCallback('partData', true); - } - index++; - } else { - index = 0; - } - } else if (index == boundary.length) { - index++; - if (c == CR) { - // CR = part boundary - flags |= F.PART_BOUNDARY; - } else if (c == HYPHEN) { - // HYPHEN = end boundary - flags |= F.LAST_BOUNDARY; - } else { - index = 0; - } - } else if (index - 1 == boundary.length) { - if (flags & F.PART_BOUNDARY) { - index = 0; - if (c == LF) { - // unset the PART_BOUNDARY flag - flags &= ~F.PART_BOUNDARY; - callback('partEnd'); - callback('partBegin'); - state = S.HEADER_FIELD_START; - break; - } - } else if (flags & F.LAST_BOUNDARY) { - if (c == HYPHEN) { - callback('partEnd'); - callback('end'); - state = S.END; - } else { - index = 0; - } - } else { - index = 0; - } - } - - if (index > 0) { - // when matching a possible boundary, keep a lookbehind reference - // in case it turns out to be a false lead - lookbehind[index-1] = c; - } else if (prevIndex > 0) { - // if our boundary turned out to be rubbish, the captured lookbehind - // belongs to partData - callback('partData', lookbehind, 0, prevIndex); - prevIndex = 0; - mark('partData'); - - // reconsider the current character even so it interrupted the sequence - // it could be the beginning of a new sequence - i--; - } - - break; - case S.END: - break; - default: - return i; - } - } - - dataCallback('headerField'); - dataCallback('headerValue'); - dataCallback('partData'); - - this.index = index; - this.state = state; - this.flags = flags; - - return len; -}; - -MultipartParser.prototype.end = function() { - if (this.state != S.END) { - return new Error('MultipartParser.end(): stream ended unexpectedly: ' + this.explain()); - } -}; - -MultipartParser.prototype.explain = function() { - return 'state = ' + MultipartParser.stateToString(this.state); -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/querystring_parser.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/querystring_parser.js deleted file mode 100644 index 63f109ec..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/querystring_parser.js +++ /dev/null @@ -1,25 +0,0 @@ -if (global.GENTLY) require = GENTLY.hijack(require); - -// This is a buffering parser, not quite as nice as the multipart one. -// If I find time I'll rewrite this to be fully streaming as well -var querystring = require('querystring'); - -function QuerystringParser() { - this.buffer = ''; -}; -exports.QuerystringParser = QuerystringParser; - -QuerystringParser.prototype.write = function(buffer) { - this.buffer += buffer.toString('ascii'); - return buffer.length; -}; - -QuerystringParser.prototype.end = function() { - var fields = querystring.parse(this.buffer); - for (var field in fields) { - this.onField(field, fields[field]); - } - this.buffer = ''; - - this.onEnd(); -}; \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/util.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/util.js deleted file mode 100644 index e9493e9b..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/lib/util.js +++ /dev/null @@ -1,6 +0,0 @@ -// Backwards compatibility ... -try { - module.exports = require('util'); -} catch (e) { - module.exports = require('sys'); -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/Makefile b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/Makefile deleted file mode 100644 index 01f71404..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -test: - @find test/simple/test-*.js | xargs -n 1 -t node - -.PHONY: test \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/Readme.md b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/Readme.md deleted file mode 100644 index f8f0c664..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/Readme.md +++ /dev/null @@ -1,167 +0,0 @@ -# Gently - -## Purpose - -A node.js module that helps with stubbing and behavior verification. It allows you to test the most remote and nested corners of your code while keeping being fully unobtrusive. - -## Features - -* Overwrite and stub individual object functions -* Verify that all expected calls have been made in the expected order -* Restore stubbed functions to their original behavior -* Detect object / class names from obj.constructor.name and obj.toString() -* Hijack any required module function or class constructor - -## Installation - -Via [npm](http://github.com/isaacs/npm): - - npm install gently@latest - -## Example - -Make sure your dog is working properly: - - function Dog() {} - - Dog.prototype.seeCat = function() { - this.bark('whuf, whuf'); - this.run(); - } - - Dog.prototype.bark = function(bark) { - require('sys').puts(bark); - } - - var gently = new (require('gently')) - , assert = require('assert') - , dog = new Dog(); - - gently.expect(dog, 'bark', function(bark) { - assert.equal(bark, 'whuf, whuf'); - }); - gently.expect(dog, 'run'); - - dog.seeCat(); - -You can also easily test event emitters with this, for example a simple sequence of 2 events emitted by `fs.WriteStream`: - - var gently = new (require('gently')) - , stream = new (require('fs').WriteStream)('my_file.txt'); - - gently.expect(stream, 'emit', function(event) { - assert.equal(event, 'open'); - }); - - gently.expect(stream, 'emit', function(event) { - assert.equal(event, 'drain'); - }); - -For a full read world example, check out this test case: [test-incoming-form.js](http://github.com/felixge/node-formidable/blob/master/test/simple/test-incoming-form.js) (in [node-formdiable](http://github.com/felixge/node-formidable)). - -## API - -### Gently - -#### new Gently() - -Creates a new gently instance. It listens to the process `'exit'` event to make sure all expectations have been verified. - -#### gently.expect(obj, method, [[count], stubFn]) - -Creates an expectation for an objects method to be called. You can optionally specify the call `count` you are expecting, as well as `stubFn` function that will run instead of the original function. - -Returns a reference to the function that is getting overwritten. - -#### gently.expect([count], stubFn) - -Returns a function that is supposed to be executed `count` times, delegating any calls to the provided `stubFn` function. Naming your stubFn closure will help to properly diagnose errors that are being thrown: - - childProcess.exec('ls', gently.expect(function lsCallback(code) { - assert.equal(0, code); - })); - -#### gently.restore(obj, method) - -Restores an object method that has been previously overwritten using `gently.expect()`. - -#### gently.hijack(realRequire) - -Returns a new require functions that catches a reference to all required modules into `gently.hijacked`. - -To use this function, include a line like this in your `'my-module.js'`. - - if (global.GENTLY) require = GENTLY.hijack(require); - - var sys = require('sys'); - exports.hello = function() { - sys.log('world'); - }; - -Now you can write a test for the module above: - - var gently = global.GENTLY = new (require('gently')) - , myModule = require('./my-module'); - - gently.expect(gently.hijacked.sys, 'log', function(str) { - assert.equal(str, 'world'); - }); - - myModule.hello(); - -#### gently.stub(location, [exportsName]) - -Returns a stub class that will be used instead of the real class from the module at `location` with the given `exportsName`. - -This allows to test an OOP version of the previous example, where `'my-module.js'`. - - if (global.GENTLY) require = GENTLY.hijack(require); - - var World = require('./world'); - - exports.hello = function() { - var world = new World(); - world.hello(); - } - -And `world.js` looks like this: - - var sys = require('sys'); - - function World() { - - } - module.exports = World; - - World.prototype.hello = function() { - sys.log('world'); - }; - -Testing `'my-module.js'` can now easily be accomplished: - - var gently = global.GENTLY = new (require('gently')) - , WorldStub = gently.stub('./world') - , myModule = require('./my-module') - , WORLD; - - gently.expect(WorldStub, 'new', function() { - WORLD = this; - }); - - gently.expect(WORLD, 'hello'); - - myModule.hello(); - -#### gently.hijacked - -An object that holds the references to all hijacked modules. - -#### gently.verify([msg]) - -Verifies that all expectations of this gently instance have been satisfied. If not called manually, this method is called when the process `'exit'` event is fired. - -If `msg` is given, it will appear in any error that might be thrown. - -## License - -Gently is licensed under the MIT license. \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/example/dog.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/example/dog.js deleted file mode 100644 index 022fae0c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/example/dog.js +++ /dev/null @@ -1,22 +0,0 @@ -require('../test/common'); -function Dog() {} - -Dog.prototype.seeCat = function() { - this.bark('whuf, whuf'); - this.run(); -} - -Dog.prototype.bark = function(bark) { - require('sys').puts(bark); -} - -var gently = new (require('gently')) - , assert = require('assert') - , dog = new Dog(); - -gently.expect(dog, 'bark', function(bark) { - assert.equal(bark, 'whuf, whuf'); -}); -gently.expect(dog, 'run'); - -dog.seeCat(); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/example/event_emitter.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/example/event_emitter.js deleted file mode 100644 index 7def134f..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/example/event_emitter.js +++ /dev/null @@ -1,11 +0,0 @@ -require('../test/common'); -var gently = new (require('gently')) - , stream = new (require('fs').WriteStream)('my_file.txt'); - -gently.expect(stream, 'emit', function(event) { - assert.equal(event, 'open'); -}); - -gently.expect(stream, 'emit', function(event) { - assert.equal(event, 'drain'); -}); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/index.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/index.js deleted file mode 100644 index 69122bdb..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/gently'); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/lib/gently/gently.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/lib/gently/gently.js deleted file mode 100644 index 8af0e1ec..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/lib/gently/gently.js +++ /dev/null @@ -1,184 +0,0 @@ -var path = require('path'); - -function Gently() { - this.expectations = []; - this.hijacked = {}; - - var self = this; - process.addListener('exit', function() { - self.verify('process exit'); - }); -}; -module.exports = Gently; - -Gently.prototype.stub = function(location, exportsName) { - function Stub() { - return Stub['new'].apply(this, arguments); - }; - - Stub['new'] = function () {}; - - var stubName = 'require('+JSON.stringify(location)+')'; - if (exportsName) { - stubName += '.'+exportsName; - } - - Stub.prototype.toString = Stub.toString = function() { - return stubName; - }; - - var exports = this.hijacked[location] || {}; - if (exportsName) { - exports[exportsName] = Stub; - } else { - exports = Stub; - } - - this.hijacked[location] = exports; - return Stub; -}; - -Gently.prototype.hijack = function(realRequire) { - var self = this; - return function(location) { - return self.hijacked[location] = (self.hijacked[location]) - ? self.hijacked[location] - : realRequire(location); - }; -}; - -Gently.prototype.expect = function(obj, method, count, stubFn) { - if (typeof obj != 'function' && typeof obj != 'object' && typeof obj != 'number') { - throw new Error - ( 'Bad 1st argument for gently.expect(), ' - + 'object, function, or number expected, got: '+(typeof obj) - ); - } else if (typeof obj == 'function' && (typeof method != 'string')) { - // expect(stubFn) interface - stubFn = obj; - obj = null; - method = null; - count = 1; - } else if (typeof method == 'function') { - // expect(count, stubFn) interface - count = obj; - stubFn = method; - obj = null; - method = null; - } else if (typeof count == 'function') { - // expect(obj, method, stubFn) interface - stubFn = count; - count = 1; - } else if (count === undefined) { - // expect(obj, method) interface - count = 1; - } - - var name = this._name(obj, method, stubFn); - this.expectations.push({obj: obj, method: method, stubFn: stubFn, name: name, count: count}); - - var self = this; - function delegate() { - return self._stubFn(this, obj, method, name, Array.prototype.slice.call(arguments)); - } - - if (!obj) { - return delegate; - } - - var original = (obj[method]) - ? obj[method]._original || obj[method] - : undefined; - - obj[method] = delegate; - return obj[method]._original = original; -}; - -Gently.prototype.restore = function(obj, method) { - if (!obj[method] || !obj[method]._original) { - throw new Error(this._name(obj, method)+' is not gently stubbed'); - } - obj[method] = obj[method]._original; -}; - -Gently.prototype.verify = function(msg) { - if (!this.expectations.length) { - return; - } - - var validExpectations = []; - for (var i = 0, l = this.expectations.length; i < l; i++) { - var expectation = this.expectations[i]; - - if (expectation.count > 0) { - validExpectations.push(expectation); - } - } - - this.expectations = []; // reset so that no duplicate verification attempts are made - - if (!validExpectations.length) { - return; - } - - var expectation = validExpectations[0]; - - throw new Error - ( 'Expected call to '+expectation.name+' did not happen' - + ( (msg) - ? ' ('+msg+')' - : '' - ) - ); -}; - -Gently.prototype._stubFn = function(self, obj, method, name, args) { - var expectation = this.expectations[0], obj, method; - - if (!expectation) { - throw new Error('Unexpected call to '+name+', no call was expected'); - } - - if (expectation.obj !== obj || expectation.method !== method) { - throw new Error('Unexpected call to '+name+', expected call to '+ expectation.name); - } - - expectation.count -= 1; - if (expectation.count === 0) { - this.expectations.shift(); - - // autorestore original if its not a closure - // and no more expectations on that object - var has_more_expectations = this.expectations.reduce(function (memo, expectation) { - return memo || (expectation.obj === obj && expectation.method === method); - }, false); - if (obj !== null && method !== null && !has_more_expectations) { - if (typeof obj[method]._original !== 'undefined') { - obj[method] = obj[method]._original; - delete obj[method]._original; - } else { - delete obj[method]; - } - } - } - - if (expectation.stubFn) { - return expectation.stubFn.apply(self, args); - } -}; - -Gently.prototype._name = function(obj, method, stubFn) { - if (obj) { - var objectName = obj.toString(); - if (objectName == '[object Object]' && obj.constructor.name) { - objectName = '['+obj.constructor.name+']'; - } - return (objectName)+'.'+method+'()'; - } - - if (stubFn.name) { - return stubFn.name+'()'; - } - - return '>> '+stubFn.toString()+' <<'; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/lib/gently/index.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/lib/gently/index.js deleted file mode 100644 index 64c1977b..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/lib/gently/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./gently'); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/package.json b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/package.json deleted file mode 100644 index 9c1b7a00..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "gently", - "version": "0.9.2", - "directories": { - "lib": "./lib/gently" - }, - "main": "./lib/gently/index", - "dependencies": {}, - "devDependencies": {}, - "engines": { - "node": "*" - }, - "optionalDependencies": {} -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/test/common.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/test/common.js deleted file mode 100644 index 978b5c53..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/test/common.js +++ /dev/null @@ -1,8 +0,0 @@ -var path = require('path') - , sys = require('sys'); - -require.paths.unshift(path.dirname(__dirname)+'/lib'); - -global.puts = sys.puts; -global.p = function() {sys.error(sys.inspect.apply(null, arguments))};; -global.assert = require('assert'); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/test/simple/test-gently.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/test/simple/test-gently.js deleted file mode 100644 index 4f8fe2dd..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/node-gently/test/simple/test-gently.js +++ /dev/null @@ -1,348 +0,0 @@ -require('../common'); -var Gently = require('gently') - , gently; - -function test(test) { - process.removeAllListeners('exit'); - gently = new Gently(); - test(); -} - -test(function constructor() { - assert.deepEqual(gently.expectations, []); - assert.deepEqual(gently.hijacked, {}); - assert.equal(gently.constructor.name, 'Gently'); -}); - -test(function expectBadArgs() { - var BAD_ARG = 'oh no'; - try { - gently.expect(BAD_ARG); - assert.ok(false, 'throw needs to happen'); - } catch (e) { - assert.equal(e.message, 'Bad 1st argument for gently.expect(), object, function, or number expected, got: '+(typeof BAD_ARG)); - } -}); - -test(function expectObjMethod() { - var OBJ = {}, NAME = 'foobar'; - OBJ.foo = function(x) { - return x; - }; - - gently._name = function() { - return NAME; - }; - - var original = OBJ.foo - , stubFn = function() {}; - - (function testAddOne() { - assert.strictEqual(gently.expect(OBJ, 'foo', stubFn), original); - - assert.equal(gently.expectations.length, 1); - var expectation = gently.expectations[0]; - assert.strictEqual(expectation.obj, OBJ); - assert.strictEqual(expectation.method, 'foo'); - assert.strictEqual(expectation.stubFn, stubFn); - assert.strictEqual(expectation.name, NAME); - assert.strictEqual(OBJ.foo._original, original); - })(); - - (function testAddTwo() { - gently.expect(OBJ, 'foo', 2, stubFn); - assert.equal(gently.expectations.length, 2); - assert.strictEqual(OBJ.foo._original, original); - })(); - - (function testAddOneWithoutMock() { - gently.expect(OBJ, 'foo'); - assert.equal(gently.expectations.length, 3); - })(); - - var stubFnCalled = 0, SELF = {}; - gently._stubFn = function(self, obj, method, name, args) { - stubFnCalled++; - assert.strictEqual(self, SELF); - assert.strictEqual(obj, OBJ); - assert.strictEqual(method, 'foo'); - assert.strictEqual(name, NAME); - assert.deepEqual(args, [1, 2]); - return 23; - }; - assert.equal(OBJ.foo.apply(SELF, [1, 2]), 23); - assert.equal(stubFnCalled, 1); -}); - -test(function expectClosure() { - var NAME = 'MY CLOSURE'; - function closureFn() {}; - - gently._name = function() { - return NAME; - }; - - var fn = gently.expect(closureFn); - assert.equal(gently.expectations.length, 1); - var expectation = gently.expectations[0]; - assert.strictEqual(expectation.obj, null); - assert.strictEqual(expectation.method, null); - assert.strictEqual(expectation.stubFn, closureFn); - assert.strictEqual(expectation.name, NAME); - - var stubFnCalled = 0, SELF = {}; - gently._stubFn = function(self, obj, method, name, args) { - stubFnCalled++; - assert.strictEqual(self, SELF); - assert.strictEqual(obj, null); - assert.strictEqual(method, null); - assert.strictEqual(name, NAME); - assert.deepEqual(args, [1, 2]); - return 23; - }; - assert.equal(fn.apply(SELF, [1, 2]), 23); - assert.equal(stubFnCalled, 1); -}); - -test(function expectClosureCount() { - var stubFnCalled = 0; - function closureFn() {stubFnCalled++}; - - var fn = gently.expect(2, closureFn); - assert.equal(gently.expectations.length, 1); - fn(); - assert.equal(gently.expectations.length, 1); - fn(); - assert.equal(stubFnCalled, 2); -}); - -test(function restore() { - var OBJ = {}, NAME = '[my object].myFn()'; - OBJ.foo = function(x) { - return x; - }; - - gently._name = function() { - return NAME; - }; - - var original = OBJ.foo; - gently.expect(OBJ, 'foo'); - gently.restore(OBJ, 'foo'); - assert.strictEqual(OBJ.foo, original); - - (function testError() { - try { - gently.restore(OBJ, 'foo'); - assert.ok(false, 'throw needs to happen'); - } catch (e) { - assert.equal(e.message, NAME+' is not gently stubbed'); - } - })(); -}); - -test(function _stubFn() { - var OBJ1 = {toString: function() {return '[OBJ 1]'}} - , OBJ2 = {toString: function() {return '[OBJ 2]'}, foo: function () {return 'bar';}} - , SELF = {}; - - gently.expect(OBJ1, 'foo', function(x) { - assert.strictEqual(this, SELF); - return x * 2; - }); - - assert.equal(gently._stubFn(SELF, OBJ1, 'foo', 'dummy_name', [5]), 10); - - (function testAutorestore() { - assert.equal(OBJ2.foo(), 'bar'); - - gently.expect(OBJ2, 'foo', function() { - return 'stubbed foo'; - }); - - gently.expect(OBJ2, 'foo', function() { - return "didn't restore yet"; - }); - - assert.equal(gently._stubFn(SELF, OBJ2, 'foo', 'dummy_name', []), 'stubbed foo'); - assert.equal(gently._stubFn(SELF, OBJ2, 'foo', 'dummy_name', []), "didn't restore yet"); - assert.equal(OBJ2.foo(), 'bar'); - assert.deepEqual(gently.expectations, []); - })(); - - (function testNoMoreCallExpected() { - try { - gently._stubFn(SELF, OBJ1, 'foo', 'dummy_name', [5]); - assert.ok(false, 'throw needs to happen'); - } catch (e) { - assert.equal(e.message, 'Unexpected call to dummy_name, no call was expected'); - } - })(); - - (function testDifferentCallExpected() { - gently.expect(OBJ2, 'bar'); - try { - gently._stubFn(SELF, OBJ1, 'foo', 'dummy_name', [5]); - assert.ok(false, 'throw needs to happen'); - } catch (e) { - assert.equal(e.message, 'Unexpected call to dummy_name, expected call to '+gently._name(OBJ2, 'bar')); - } - - assert.equal(gently.expectations.length, 1); - })(); - - (function testNoMockCallback() { - OBJ2.bar(); - assert.equal(gently.expectations.length, 0); - })(); -}); - -test(function stub() { - var LOCATION = './my_class'; - - (function testRegular() { - var Stub = gently.stub(LOCATION); - assert.ok(Stub instanceof Function); - assert.strictEqual(gently.hijacked[LOCATION], Stub); - assert.ok(Stub['new'] instanceof Function); - assert.equal(Stub.toString(), 'require('+JSON.stringify(LOCATION)+')'); - - (function testConstructor() { - var newCalled = 0 - , STUB - , ARGS = ['foo', 'bar']; - - Stub['new'] = function(a, b) { - assert.equal(a, ARGS[0]); - assert.equal(b, ARGS[1]); - newCalled++; - STUB = this; - }; - - var stub = new Stub(ARGS[0], ARGS[1]); - assert.strictEqual(stub, STUB); - assert.equal(newCalled, 1); - assert.equal(stub.toString(), 'require('+JSON.stringify(LOCATION)+')'); - })(); - - (function testUseReturnValueAsInstance() { - var R = {}; - - Stub['new'] = function() { - return R; - }; - - var stub = new Stub(); - assert.strictEqual(stub, R); - - })(); - })(); - - var EXPORTS_NAME = 'MyClass'; - test(function testExportsName() { - var Stub = gently.stub(LOCATION, EXPORTS_NAME); - assert.strictEqual(gently.hijacked[LOCATION][EXPORTS_NAME], Stub); - assert.equal(Stub.toString(), 'require('+JSON.stringify(LOCATION)+').'+EXPORTS_NAME); - - (function testConstructor() { - var stub = new Stub(); - assert.equal(Stub.toString(), 'require('+JSON.stringify(LOCATION)+').'+EXPORTS_NAME); - })(); - }); -}); - -test(function hijack() { - var LOCATION = './foo' - , REQUIRE_CALLS = 0 - , EXPORTS = {} - , REQUIRE = function() { - REQUIRE_CALLS++; - return EXPORTS; - }; - - var hijackedRequire = gently.hijack(REQUIRE); - hijackedRequire(LOCATION); - assert.strictEqual(gently.hijacked[LOCATION], EXPORTS); - - assert.equal(REQUIRE_CALLS, 1); - - // make sure we are caching the hijacked module - hijackedRequire(LOCATION); - assert.equal(REQUIRE_CALLS, 1); -}); - -test(function verify() { - var OBJ = {toString: function() {return '[OBJ]'}}; - gently.verify(); - - gently.expect(OBJ, 'foo'); - try { - gently.verify(); - assert.ok(false, 'throw needs to happen'); - } catch (e) { - assert.equal(e.message, 'Expected call to [OBJ].foo() did not happen'); - } - - try { - gently.verify('foo'); - assert.ok(false, 'throw needs to happen'); - } catch (e) { - assert.equal(e.message, 'Expected call to [OBJ].foo() did not happen (foo)'); - } -}); - -test(function processExit() { - var verifyCalled = 0; - gently.verify = function(msg) { - verifyCalled++; - assert.equal(msg, 'process exit'); - }; - - process.emit('exit'); - assert.equal(verifyCalled, 1); -}); - -test(function _name() { - (function testNamedClass() { - function Foo() {}; - var foo = new Foo(); - assert.equal(gently._name(foo, 'bar'), '[Foo].bar()'); - })(); - - (function testToStringPreference() { - function Foo() {}; - Foo.prototype.toString = function() { - return '[Superman 123]'; - }; - var foo = new Foo(); - assert.equal(gently._name(foo, 'bar'), '[Superman 123].bar()'); - })(); - - (function testUnamedClass() { - var Foo = function() {}; - var foo = new Foo(); - assert.equal(gently._name(foo, 'bar'), foo.toString()+'.bar()'); - })(); - - (function testNamedClosure() { - function myClosure() {}; - assert.equal(gently._name(null, null, myClosure), myClosure.name+'()'); - })(); - - (function testUnamedClosure() { - var myClosure = function() {2+2 == 5}; - assert.equal(gently._name(null, null, myClosure), '>> '+myClosure.toString()+' <<'); - })(); -}); - -test(function verifyExpectNone() { - var OBJ = {toString: function() {return '[OBJ]'}}; - gently.verify(); - - gently.expect(OBJ, 'foo', 0); - try { - gently.verify(); - } catch (e) { - assert.fail('Exception should not have been thrown'); - } -}); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/package.json b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/package.json deleted file mode 100644 index 177f84f0..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "formidable", - "version": "1.0.11", - "dependencies": {}, - "devDependencies": { - "gently": "0.8.0", - "findit": "0.1.1", - "hashish": "0.0.4", - "urun": "0.0.4", - "utest": "0.0.3" - }, - "directories": { - "lib": "./lib" - }, - "main": "./lib/index", - "scripts": { - "test": "make test" - }, - "engines": { - "node": "*" - }, - "optionalDependencies": {}, - "readme": "# Formidable\n\n[![Build Status](https://secure.travis-ci.org/felixge/node-formidable.png?branch=master)](http://travis-ci.org/felixge/node-formidable)\n\n## Purpose\n\nA node.js module for parsing form data, especially file uploads.\n\n## Current status\n\nThis module was developed for [Transloadit](http://transloadit.com/), a service focused on uploading\nand encoding images and videos. It has been battle-tested against hundreds of GB of file uploads from\na large variety of clients and is considered production-ready.\n\n## Features\n\n* Fast (~500mb/sec), non-buffering multipart parser\n* Automatically writing file uploads to disk\n* Low memory footprint\n* Graceful error handling\n* Very high test coverage\n\n## Changelog\n\n### v1.0.9\n\n* Emit progress when content length header parsed (Tim Koschützki)\n* Fix Readme syntax due to GitHub changes (goob)\n* Replace references to old 'sys' module in Readme with 'util' (Peter Sugihara)\n\n### v1.0.8\n\n* Strip potentially unsafe characters when using `keepExtensions: true`.\n* Switch to utest / urun for testing\n* Add travis build\n\n### v1.0.7\n\n* Remove file from package that was causing problems when installing on windows. (#102)\n* Fix typos in Readme (Jason Davies).\n\n### v1.0.6\n\n* Do not default to the default to the field name for file uploads where\n filename=\"\".\n\n### v1.0.5\n\n* Support filename=\"\" in multipart parts\n* Explain unexpected end() errors in parser better\n\n**Note:** Starting with this version, formidable emits 'file' events for empty\nfile input fields. Previously those were incorrectly emitted as regular file\ninput fields with value = \"\".\n\n### v1.0.4\n\n* Detect a good default tmp directory regardless of platform. (#88)\n\n### v1.0.3\n\n* Fix problems with utf8 characters (#84) / semicolons in filenames (#58)\n* Small performance improvements\n* New test suite and fixture system\n\n### v1.0.2\n\n* Exclude node\\_modules folder from git\n* Implement new `'aborted'` event\n* Fix files in example folder to work with recent node versions\n* Make gently a devDependency\n\n[See Commits](https://github.com/felixge/node-formidable/compare/v1.0.1...v1.0.2)\n\n### v1.0.1\n\n* Fix package.json to refer to proper main directory. (#68, Dean Landolt)\n\n[See Commits](https://github.com/felixge/node-formidable/compare/v1.0.0...v1.0.1)\n\n### v1.0.0\n\n* Add support for multipart boundaries that are quoted strings. (Jeff Craig)\n\nThis marks the beginning of development on version 2.0 which will include\nseveral architectural improvements.\n\n[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.11...v1.0.0)\n\n### v0.9.11\n\n* Emit `'progress'` event when receiving data, regardless of parsing it. (Tim Koschützki)\n* Use [W3C FileAPI Draft](http://dev.w3.org/2006/webapi/FileAPI/) properties for File class\n\n**Important:** The old property names of the File class will be removed in a\nfuture release.\n\n[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.10...v0.9.11)\n\n### Older releases\n\nThese releases were done before starting to maintain the above Changelog:\n\n* [v0.9.10](https://github.com/felixge/node-formidable/compare/v0.9.9...v0.9.10)\n* [v0.9.9](https://github.com/felixge/node-formidable/compare/v0.9.8...v0.9.9)\n* [v0.9.8](https://github.com/felixge/node-formidable/compare/v0.9.7...v0.9.8)\n* [v0.9.7](https://github.com/felixge/node-formidable/compare/v0.9.6...v0.9.7)\n* [v0.9.6](https://github.com/felixge/node-formidable/compare/v0.9.5...v0.9.6)\n* [v0.9.5](https://github.com/felixge/node-formidable/compare/v0.9.4...v0.9.5)\n* [v0.9.4](https://github.com/felixge/node-formidable/compare/v0.9.3...v0.9.4)\n* [v0.9.3](https://github.com/felixge/node-formidable/compare/v0.9.2...v0.9.3)\n* [v0.9.2](https://github.com/felixge/node-formidable/compare/v0.9.1...v0.9.2)\n* [v0.9.1](https://github.com/felixge/node-formidable/compare/v0.9.0...v0.9.1)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.1.0](https://github.com/felixge/node-formidable/commits/v0.1.0)\n\n## Installation\n\nVia [npm](http://github.com/isaacs/npm):\n\n npm install formidable@latest\n\nManually:\n\n git clone git://github.com/felixge/node-formidable.git formidable\n vim my.js\n # var formidable = require('./formidable');\n\nNote: Formidable requires [gently](http://github.com/felixge/node-gently) to run the unit tests, but you won't need it for just using the library.\n\n## Example\n\nParse an incoming file upload.\n\n var formidable = require('formidable'),\n http = require('http'),\n\n util = require('util');\n\n http.createServer(function(req, res) {\n if (req.url == '/upload' && req.method.toLowerCase() == 'post') {\n // parse a file upload\n var form = new formidable.IncomingForm();\n form.parse(req, function(err, fields, files) {\n res.writeHead(200, {'content-type': 'text/plain'});\n res.write('received upload:\\n\\n');\n res.end(util.inspect({fields: fields, files: files}));\n });\n return;\n }\n\n // show a file upload form\n res.writeHead(200, {'content-type': 'text/html'});\n res.end(\n '
    '+\n '
    '+\n '
    '+\n ''+\n '
    '\n );\n }).listen(80);\n\n## API\n\n### formidable.IncomingForm\n\n__new formidable.IncomingForm()__\n\nCreates a new incoming form.\n\n__incomingForm.encoding = 'utf-8'__\n\nThe encoding to use for incoming form fields.\n\n__incomingForm.uploadDir = process.env.TMP || '/tmp' || process.cwd()__\n\nThe directory for placing file uploads in. You can move them later on using\n`fs.rename()`. The default directory is picked at module load time depending on\nthe first existing directory from those listed above.\n\n__incomingForm.keepExtensions = false__\n\nIf you want the files written to `incomingForm.uploadDir` to include the extensions of the original files, set this property to `true`.\n\n__incomingForm.type__\n\nEither 'multipart' or 'urlencoded' depending on the incoming request.\n\n__incomingForm.maxFieldsSize = 2 * 1024 * 1024__\n\nLimits the amount of memory a field (not file) can allocate in bytes.\nIf this value is exceeded, an `'error'` event is emitted. The default\nsize is 2MB.\n\n__incomingForm.hash = false__\n\nIf you want checksums calculated for incoming files, set this to either `'sha1'` or `'md5'`.\n\n__incomingForm.bytesReceived__\n\nThe amount of bytes received for this form so far.\n\n__incomingForm.bytesExpected__\n\nThe expected number of bytes in this form.\n\n__incomingForm.parse(request, [cb])__\n\nParses an incoming node.js `request` containing form data. If `cb` is provided, all fields an files are collected and passed to the callback:\n\n incomingForm.parse(req, function(err, fields, files) {\n // ...\n });\n\n__incomingForm.onPart(part)__\n\nYou may overwrite this method if you are interested in directly accessing the multipart stream. Doing so will disable any `'field'` / `'file'` events processing which would occur otherwise, making you fully responsible for handling the processing.\n\n incomingForm.onPart = function(part) {\n part.addListener('data', function() {\n // ...\n });\n }\n\nIf you want to use formidable to only handle certain parts for you, you can do so:\n\n incomingForm.onPart = function(part) {\n if (!part.filename) {\n // let formidable handle all non-file parts\n incomingForm.handlePart(part);\n }\n }\n\nCheck the code in this method for further inspiration.\n\n__Event: 'progress' (bytesReceived, bytesExpected)__\n\nEmitted after each incoming chunk of data that has been parsed. Can be used to roll your own progress bar.\n\n__Event: 'field' (name, value)__\n\nEmitted whenever a field / value pair has been received.\n\n__Event: 'fileBegin' (name, file)__\n\nEmitted whenever a new file is detected in the upload stream. Use this even if\nyou want to stream the file to somewhere else while buffering the upload on\nthe file system.\n\n__Event: 'file' (name, file)__\n\nEmitted whenever a field / file pair has been received. `file` is an instance of `File`.\n\n__Event: 'error' (err)__\n\nEmitted when there is an error processing the incoming form. A request that experiences an error is automatically paused, you will have to manually call `request.resume()` if you want the request to continue firing `'data'` events.\n\n__Event: 'aborted'__\n\nEmitted when the request was aborted by the user. Right now this can be due to a 'timeout' or 'close' event on the socket. In the future there will be a separate 'timeout' event (needs a change in the node core).\n\n__Event: 'end' ()__\n\nEmitted when the entire request has been received, and all contained files have finished flushing to disk. This is a great place for you to send your response.\n\n### formidable.File\n\n__file.size = 0__\n\nThe size of the uploaded file in bytes. If the file is still being uploaded (see `'fileBegin'` event), this property says how many bytes of the file have been written to disk yet.\n\n__file.path = null__\n\nThe path this file is being written to. You can modify this in the `'fileBegin'` event in\ncase you are unhappy with the way formidable generates a temporary path for your files.\n\n__file.name = null__\n\nThe name this file had according to the uploading client.\n\n__file.type = null__\n\nThe mime type of this file, according to the uploading client.\n\n__file.lastModifiedDate = null__\n\nA date object (or `null`) containing the time this file was last written to. Mostly\nhere for compatibility with the [W3C File API Draft](http://dev.w3.org/2006/webapi/FileAPI/).\n\n__file.hash = null__\n\nIf hash calculation was set, you can read the hex digest out of this var.\n\n## License\n\nFormidable is licensed under the MIT license.\n\n## Ports\n\n* [multipart-parser](http://github.com/FooBarWidget/multipart-parser): a C++ parser based on formidable\n\n## Credits\n\n* [Ryan Dahl](http://twitter.com/ryah) for his work on [http-parser](http://github.com/ry/http-parser) which heavily inspired multipart_parser.js\n", - "readmeFilename": "Readme.md", - "description": "[![Build Status](https://secure.travis-ci.org/felixge/node-formidable.png?branch=master)](http://travis-ci.org/felixge/node-formidable)", - "_id": "formidable@1.0.11", - "_from": "formidable@1.0.11" -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/common.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/common.js deleted file mode 100644 index eb432ad6..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/common.js +++ /dev/null @@ -1,19 +0,0 @@ -var mysql = require('..'); -var path = require('path'); - -var root = path.join(__dirname, '../'); -exports.dir = { - root : root, - lib : root + '/lib', - fixture : root + '/test/fixture', - tmp : root + '/test/tmp', -}; - -exports.port = 13532; - -exports.formidable = require('..'); -exports.assert = require('assert'); - -exports.require = function(lib) { - return require(exports.dir.lib + '/' + lib); -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/funkyfilename.txt b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/funkyfilename.txt deleted file mode 100644 index e7a4785e..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/funkyfilename.txt +++ /dev/null @@ -1 +0,0 @@ -I am a text file with a funky name! diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/plain.txt b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/plain.txt deleted file mode 100644 index 9b6903e2..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/plain.txt +++ /dev/null @@ -1 +0,0 @@ -I am a plain text file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md deleted file mode 100644 index 3c9dbe3d..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md +++ /dev/null @@ -1,3 +0,0 @@ -* Opera does not allow submitting this file, it shows a warning to the - user that the file could not be found instead. Tested in 9.8, 11.51 on OSX. - Reported to Opera on 08.09.2011 (tracking email DSK-346009@bugs.opera.com). diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/no-filename.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/no-filename.js deleted file mode 100644 index 0bae4494..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/no-filename.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports['generic.http'] = [ - {type: 'file', name: 'upload', filename: '', fixture: 'plain.txt'}, -]; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/special-chars-in-filename.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/special-chars-in-filename.js deleted file mode 100644 index eb76fdc1..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/special-chars-in-filename.js +++ /dev/null @@ -1,21 +0,0 @@ -var properFilename = 'funkyfilename.txt'; - -function expect(filename) { - return [ - {type: 'field', name: 'title', value: 'Weird filename'}, - {type: 'file', name: 'upload', filename: filename, fixture: properFilename}, - ]; -}; - -var webkit = " ? % * | \" < > . ? ; ' @ # $ ^ & ( ) - _ = + { } [ ] ` ~.txt"; -var ffOrIe = " ? % * | \" < > . ☃ ; ' @ # $ ^ & ( ) - _ = + { } [ ] ` ~.txt"; - -module.exports = { - 'osx-chrome-13.http' : expect(webkit), - 'osx-firefox-3.6.http' : expect(ffOrIe), - 'osx-safari-5.http' : expect(webkit), - 'xp-chrome-12.http' : expect(webkit), - 'xp-ie-7.http' : expect(ffOrIe), - 'xp-ie-8.http' : expect(ffOrIe), - 'xp-safari-5.http' : expect(webkit), -}; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/multipart.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/multipart.js deleted file mode 100644 index a4761699..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/multipart.js +++ /dev/null @@ -1,72 +0,0 @@ -exports['rfc1867'] = - { boundary: 'AaB03x', - raw: - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="field1"\r\n'+ - '\r\n'+ - 'Joe Blow\r\nalmost tricked you!\r\n'+ - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="pics"; filename="file1.txt"\r\n'+ - 'Content-Type: text/plain\r\n'+ - '\r\n'+ - '... contents of file1.txt ...\r\r\n'+ - '--AaB03x--\r\n', - parts: - [ { headers: { - 'content-disposition': 'form-data; name="field1"', - }, - data: 'Joe Blow\r\nalmost tricked you!', - }, - { headers: { - 'content-disposition': 'form-data; name="pics"; filename="file1.txt"', - 'Content-Type': 'text/plain', - }, - data: '... contents of file1.txt ...\r', - } - ] - }; - -exports['noTrailing\r\n'] = - { boundary: 'AaB03x', - raw: - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="field1"\r\n'+ - '\r\n'+ - 'Joe Blow\r\nalmost tricked you!\r\n'+ - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="pics"; filename="file1.txt"\r\n'+ - 'Content-Type: text/plain\r\n'+ - '\r\n'+ - '... contents of file1.txt ...\r\r\n'+ - '--AaB03x--', - parts: - [ { headers: { - 'content-disposition': 'form-data; name="field1"', - }, - data: 'Joe Blow\r\nalmost tricked you!', - }, - { headers: { - 'content-disposition': 'form-data; name="pics"; filename="file1.txt"', - 'Content-Type': 'text/plain', - }, - data: '... contents of file1.txt ...\r', - } - ] - }; - -exports['emptyHeader'] = - { boundary: 'AaB03x', - raw: - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="field1"\r\n'+ - ': foo\r\n'+ - '\r\n'+ - 'Joe Blow\r\nalmost tricked you!\r\n'+ - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="pics"; filename="file1.txt"\r\n'+ - 'Content-Type: text/plain\r\n'+ - '\r\n'+ - '... contents of file1.txt ...\r\r\n'+ - '--AaB03x--\r\n', - expectError: true, - }; diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/integration/test-fixtures.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/integration/test-fixtures.js deleted file mode 100644 index 66ad259e..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/integration/test-fixtures.js +++ /dev/null @@ -1,89 +0,0 @@ -var hashish = require('hashish'); -var fs = require('fs'); -var findit = require('findit'); -var path = require('path'); -var http = require('http'); -var net = require('net'); -var assert = require('assert'); - -var common = require('../common'); -var formidable = common.formidable; - -var server = http.createServer(); -server.listen(common.port, findFixtures); - -function findFixtures() { - var fixtures = []; - findit - .sync(common.dir.fixture + '/js') - .forEach(function(jsPath) { - if (!/\.js$/.test(jsPath)) return; - - var group = path.basename(jsPath, '.js'); - hashish.forEach(require(jsPath), function(fixture, name) { - fixtures.push({ - name : group + '/' + name, - fixture : fixture, - }); - }); - }); - - testNext(fixtures); -} - -function testNext(fixtures) { - var fixture = fixtures.shift(); - if (!fixture) return server.close(); - - var name = fixture.name; - var fixture = fixture.fixture; - - uploadFixture(name, function(err, parts) { - if (err) throw err; - - fixture.forEach(function(expectedPart, i) { - var parsedPart = parts[i]; - assert.equal(parsedPart.type, expectedPart.type); - assert.equal(parsedPart.name, expectedPart.name); - - if (parsedPart.type === 'file') { - var filename = parsedPart.value.name; - assert.equal(filename, expectedPart.filename); - } - }); - - testNext(fixtures); - }); -}; - -function uploadFixture(name, cb) { - server.once('request', function(req, res) { - var form = new formidable.IncomingForm(); - form.uploadDir = common.dir.tmp; - form.parse(req); - - function callback() { - var realCallback = cb; - cb = function() {}; - realCallback.apply(null, arguments); - } - - var parts = []; - form - .on('error', callback) - .on('fileBegin', function(name, value) { - parts.push({type: 'file', name: name, value: value}); - }) - .on('field', function(name, value) { - parts.push({type: 'field', name: name, value: value}); - }) - .on('end', function() { - callback(null, parts); - }); - }); - - var socket = net.createConnection(common.port); - var file = fs.createReadStream(common.dir.fixture + '/http/' + name); - - file.pipe(socket); -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/common.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/common.js deleted file mode 100644 index 2b985981..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/common.js +++ /dev/null @@ -1,24 +0,0 @@ -var path = require('path'), - fs = require('fs'); - -try { - global.Gently = require('gently'); -} catch (e) { - throw new Error('this test suite requires node-gently'); -} - -exports.lib = path.join(__dirname, '../../lib'); - -global.GENTLY = new Gently(); - -global.assert = require('assert'); -global.TEST_PORT = 13532; -global.TEST_FIXTURES = path.join(__dirname, '../fixture'); -global.TEST_TMP = path.join(__dirname, '../tmp'); - -// Stupid new feature in node that complains about gently attaching too many -// listeners to process 'exit'. This is a workaround until I can think of a -// better way to deal with this. -if (process.setMaxListeners) { - process.setMaxListeners(10000); -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/integration/test-multipart-parser.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/integration/test-multipart-parser.js deleted file mode 100644 index 75232aa4..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/integration/test-multipart-parser.js +++ /dev/null @@ -1,80 +0,0 @@ -var common = require('../common'); -var CHUNK_LENGTH = 10, - multipartParser = require(common.lib + '/multipart_parser'), - MultipartParser = multipartParser.MultipartParser, - parser = new MultipartParser(), - fixtures = require(TEST_FIXTURES + '/multipart'), - Buffer = require('buffer').Buffer; - -Object.keys(fixtures).forEach(function(name) { - var fixture = fixtures[name], - buffer = new Buffer(Buffer.byteLength(fixture.raw, 'binary')), - offset = 0, - chunk, - nparsed, - - parts = [], - part = null, - headerField, - headerValue, - endCalled = ''; - - parser.initWithBoundary(fixture.boundary); - parser.onPartBegin = function() { - part = {headers: {}, data: ''}; - parts.push(part); - headerField = ''; - headerValue = ''; - }; - - parser.onHeaderField = function(b, start, end) { - headerField += b.toString('ascii', start, end); - }; - - parser.onHeaderValue = function(b, start, end) { - headerValue += b.toString('ascii', start, end); - } - - parser.onHeaderEnd = function() { - part.headers[headerField] = headerValue; - headerField = ''; - headerValue = ''; - }; - - parser.onPartData = function(b, start, end) { - var str = b.toString('ascii', start, end); - part.data += b.slice(start, end); - } - - parser.onEnd = function() { - endCalled = true; - } - - buffer.write(fixture.raw, 'binary', 0); - - while (offset < buffer.length) { - if (offset + CHUNK_LENGTH < buffer.length) { - chunk = buffer.slice(offset, offset+CHUNK_LENGTH); - } else { - chunk = buffer.slice(offset, buffer.length); - } - offset = offset + CHUNK_LENGTH; - - nparsed = parser.write(chunk); - if (nparsed != chunk.length) { - if (fixture.expectError) { - return; - } - puts('-- ERROR --'); - p(chunk.toString('ascii')); - throw new Error(chunk.length+' bytes written, but only '+nparsed+' bytes parsed!'); - } - } - - if (fixture.expectError) { - throw new Error('expected parse error did not happen'); - } - - assert.ok(endCalled); - assert.deepEqual(parts, fixture.parts); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-file.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-file.js deleted file mode 100644 index 52ceedb4..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-file.js +++ /dev/null @@ -1,104 +0,0 @@ -var common = require('../common'); -var WriteStreamStub = GENTLY.stub('fs', 'WriteStream'); - -var File = require(common.lib + '/file'), - EventEmitter = require('events').EventEmitter, - file, - gently; - -function test(test) { - gently = new Gently(); - file = new File(); - test(); - gently.verify(test.name); -} - -test(function constructor() { - assert.ok(file instanceof EventEmitter); - assert.strictEqual(file.size, 0); - assert.strictEqual(file.path, null); - assert.strictEqual(file.name, null); - assert.strictEqual(file.type, null); - assert.strictEqual(file.lastModifiedDate, null); - - assert.strictEqual(file._writeStream, null); - - (function testSetProperties() { - var file2 = new File({foo: 'bar'}); - assert.equal(file2.foo, 'bar'); - })(); -}); - -test(function open() { - var WRITE_STREAM; - file.path = '/foo'; - - gently.expect(WriteStreamStub, 'new', function (path) { - WRITE_STREAM = this; - assert.strictEqual(path, file.path); - }); - - file.open(); - assert.strictEqual(file._writeStream, WRITE_STREAM); -}); - -test(function write() { - var BUFFER = {length: 10}, - CB_STUB, - CB = function() { - CB_STUB.apply(this, arguments); - }; - - file._writeStream = {}; - - gently.expect(file._writeStream, 'write', function (buffer, cb) { - assert.strictEqual(buffer, BUFFER); - - gently.expect(file, 'emit', function (event, bytesWritten) { - assert.ok(file.lastModifiedDate instanceof Date); - assert.equal(event, 'progress'); - assert.equal(bytesWritten, file.size); - }); - - CB_STUB = gently.expect(function writeCb() { - assert.equal(file.size, 10); - }); - - cb(); - - gently.expect(file, 'emit', function (event, bytesWritten) { - assert.equal(event, 'progress'); - assert.equal(bytesWritten, file.size); - }); - - CB_STUB = gently.expect(function writeCb() { - assert.equal(file.size, 20); - }); - - cb(); - }); - - file.write(BUFFER, CB); -}); - -test(function end() { - var CB_STUB, - CB = function() { - CB_STUB.apply(this, arguments); - }; - - file._writeStream = {}; - - gently.expect(file._writeStream, 'end', function (cb) { - gently.expect(file, 'emit', function (event) { - assert.equal(event, 'end'); - }); - - CB_STUB = gently.expect(function endCb() { - }); - - cb(); - }); - - file.end(CB); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js deleted file mode 100644 index 84de439e..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js +++ /dev/null @@ -1,727 +0,0 @@ -var common = require('../common'); -var MultipartParserStub = GENTLY.stub('./multipart_parser', 'MultipartParser'), - QuerystringParserStub = GENTLY.stub('./querystring_parser', 'QuerystringParser'), - EventEmitterStub = GENTLY.stub('events', 'EventEmitter'), - StreamStub = GENTLY.stub('stream', 'Stream'), - FileStub = GENTLY.stub('./file'); - -var formidable = require(common.lib + '/index'), - IncomingForm = formidable.IncomingForm, - events = require('events'), - fs = require('fs'), - path = require('path'), - Buffer = require('buffer').Buffer, - fixtures = require(TEST_FIXTURES + '/multipart'), - form, - gently; - -function test(test) { - gently = new Gently(); - gently.expect(EventEmitterStub, 'call'); - form = new IncomingForm(); - test(); - gently.verify(test.name); -} - -test(function constructor() { - assert.strictEqual(form.error, null); - assert.strictEqual(form.ended, false); - assert.strictEqual(form.type, null); - assert.strictEqual(form.headers, null); - assert.strictEqual(form.keepExtensions, false); - assert.strictEqual(form.uploadDir, '/tmp'); - assert.strictEqual(form.encoding, 'utf-8'); - assert.strictEqual(form.bytesReceived, null); - assert.strictEqual(form.bytesExpected, null); - assert.strictEqual(form.maxFieldsSize, 2 * 1024 * 1024); - assert.strictEqual(form._parser, null); - assert.strictEqual(form._flushing, 0); - assert.strictEqual(form._fieldsSize, 0); - assert.ok(form instanceof EventEmitterStub); - assert.equal(form.constructor.name, 'IncomingForm'); - - (function testSimpleConstructor() { - gently.expect(EventEmitterStub, 'call'); - var form = IncomingForm(); - assert.ok(form instanceof IncomingForm); - })(); - - (function testSimpleConstructorShortcut() { - gently.expect(EventEmitterStub, 'call'); - var form = formidable(); - assert.ok(form instanceof IncomingForm); - })(); -}); - -test(function parse() { - var REQ = {headers: {}} - , emit = {}; - - gently.expect(form, 'writeHeaders', function(headers) { - assert.strictEqual(headers, REQ.headers); - }); - - var events = ['error', 'aborted', 'data', 'end']; - gently.expect(REQ, 'on', events.length, function(event, fn) { - assert.equal(event, events.shift()); - emit[event] = fn; - return this; - }); - - form.parse(REQ); - - (function testPause() { - gently.expect(REQ, 'pause'); - assert.strictEqual(form.pause(), true); - })(); - - (function testPauseCriticalException() { - form.ended = false; - - var ERR = new Error('dasdsa'); - gently.expect(REQ, 'pause', function() { - throw ERR; - }); - - gently.expect(form, '_error', function(err) { - assert.strictEqual(err, ERR); - }); - - assert.strictEqual(form.pause(), false); - })(); - - (function testPauseHarmlessException() { - form.ended = true; - - var ERR = new Error('dasdsa'); - gently.expect(REQ, 'pause', function() { - throw ERR; - }); - - assert.strictEqual(form.pause(), false); - })(); - - (function testResume() { - gently.expect(REQ, 'resume'); - assert.strictEqual(form.resume(), true); - })(); - - (function testResumeCriticalException() { - form.ended = false; - - var ERR = new Error('dasdsa'); - gently.expect(REQ, 'resume', function() { - throw ERR; - }); - - gently.expect(form, '_error', function(err) { - assert.strictEqual(err, ERR); - }); - - assert.strictEqual(form.resume(), false); - })(); - - (function testResumeHarmlessException() { - form.ended = true; - - var ERR = new Error('dasdsa'); - gently.expect(REQ, 'resume', function() { - throw ERR; - }); - - assert.strictEqual(form.resume(), false); - })(); - - (function testEmitError() { - var ERR = new Error('something bad happened'); - gently.expect(form, '_error',function(err) { - assert.strictEqual(err, ERR); - }); - emit.error(ERR); - })(); - - (function testEmitAborted() { - gently.expect(form, 'emit',function(event) { - assert.equal(event, 'aborted'); - }); - - emit.aborted(); - })(); - - - (function testEmitData() { - var BUFFER = [1, 2, 3]; - gently.expect(form, 'write', function(buffer) { - assert.strictEqual(buffer, BUFFER); - }); - emit.data(BUFFER); - })(); - - (function testEmitEnd() { - form._parser = {}; - - (function testWithError() { - var ERR = new Error('haha'); - gently.expect(form._parser, 'end', function() { - return ERR; - }); - - gently.expect(form, '_error', function(err) { - assert.strictEqual(err, ERR); - }); - - emit.end(); - })(); - - (function testWithoutError() { - gently.expect(form._parser, 'end'); - emit.end(); - })(); - - (function testAfterError() { - form.error = true; - emit.end(); - })(); - })(); - - (function testWithCallback() { - gently.expect(EventEmitterStub, 'call'); - var form = new IncomingForm(), - REQ = {headers: {}}, - parseCalled = 0; - - gently.expect(form, 'writeHeaders'); - gently.expect(REQ, 'on', 4, function() { - return this; - }); - - gently.expect(form, 'on', 4, function(event, fn) { - if (event == 'field') { - fn('field1', 'foo'); - fn('field1', 'bar'); - fn('field2', 'nice'); - } - - if (event == 'file') { - fn('file1', '1'); - fn('file1', '2'); - fn('file2', '3'); - } - - if (event == 'end') { - fn(); - } - return this; - }); - - form.parse(REQ, gently.expect(function parseCbOk(err, fields, files) { - assert.deepEqual(fields, {field1: 'bar', field2: 'nice'}); - assert.deepEqual(files, {file1: '2', file2: '3'}); - })); - - gently.expect(form, 'writeHeaders'); - gently.expect(REQ, 'on', 4, function() { - return this; - }); - - var ERR = new Error('test'); - gently.expect(form, 'on', 3, function(event, fn) { - if (event == 'field') { - fn('foo', 'bar'); - } - - if (event == 'error') { - fn(ERR); - gently.expect(form, 'on'); - } - return this; - }); - - form.parse(REQ, gently.expect(function parseCbErr(err, fields, files) { - assert.strictEqual(err, ERR); - assert.deepEqual(fields, {foo: 'bar'}); - })); - })(); -}); - -test(function pause() { - assert.strictEqual(form.pause(), false); -}); - -test(function resume() { - assert.strictEqual(form.resume(), false); -}); - - -test(function writeHeaders() { - var HEADERS = {}; - gently.expect(form, '_parseContentLength'); - gently.expect(form, '_parseContentType'); - - form.writeHeaders(HEADERS); - assert.strictEqual(form.headers, HEADERS); -}); - -test(function write() { - var parser = {}, - BUFFER = [1, 2, 3]; - - form._parser = parser; - form.bytesExpected = 523423; - - (function testBasic() { - gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) { - assert.equal(event, 'progress'); - assert.equal(bytesReceived, BUFFER.length); - assert.equal(bytesExpected, form.bytesExpected); - }); - - gently.expect(parser, 'write', function(buffer) { - assert.strictEqual(buffer, BUFFER); - return buffer.length; - }); - - assert.equal(form.write(BUFFER), BUFFER.length); - assert.equal(form.bytesReceived, BUFFER.length); - })(); - - (function testParserError() { - gently.expect(form, 'emit'); - - gently.expect(parser, 'write', function(buffer) { - assert.strictEqual(buffer, BUFFER); - return buffer.length - 1; - }); - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/parser error/i)); - }); - - assert.equal(form.write(BUFFER), BUFFER.length - 1); - assert.equal(form.bytesReceived, BUFFER.length + BUFFER.length); - })(); - - (function testUninitialized() { - delete form._parser; - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/unintialized parser/i)); - }); - form.write(BUFFER); - })(); -}); - -test(function parseContentType() { - var HEADERS = {}; - - form.headers = {'content-type': 'application/x-www-form-urlencoded'}; - gently.expect(form, '_initUrlencoded'); - form._parseContentType(); - - // accept anything that has 'urlencoded' in it - form.headers = {'content-type': 'broken-client/urlencoded-stupid'}; - gently.expect(form, '_initUrlencoded'); - form._parseContentType(); - - var BOUNDARY = '---------------------------57814261102167618332366269'; - form.headers = {'content-type': 'multipart/form-data; boundary='+BOUNDARY}; - - gently.expect(form, '_initMultipart', function(boundary) { - assert.equal(boundary, BOUNDARY); - }); - form._parseContentType(); - - (function testQuotedBoundary() { - form.headers = {'content-type': 'multipart/form-data; boundary="' + BOUNDARY + '"'}; - - gently.expect(form, '_initMultipart', function(boundary) { - assert.equal(boundary, BOUNDARY); - }); - form._parseContentType(); - })(); - - (function testNoBoundary() { - form.headers = {'content-type': 'multipart/form-data'}; - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/no multipart boundary/i)); - }); - form._parseContentType(); - })(); - - (function testNoContentType() { - form.headers = {}; - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/no content-type/i)); - }); - form._parseContentType(); - })(); - - (function testUnknownContentType() { - form.headers = {'content-type': 'invalid'}; - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/unknown content-type/i)); - }); - form._parseContentType(); - })(); -}); - -test(function parseContentLength() { - var HEADERS = {}; - - form.headers = {}; - form._parseContentLength(); - assert.strictEqual(form.bytesReceived, null); - assert.strictEqual(form.bytesExpected, null); - - form.headers['content-length'] = '8'; - gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) { - assert.equal(event, 'progress'); - assert.equal(bytesReceived, 0); - assert.equal(bytesExpected, 8); - }); - form._parseContentLength(); - assert.strictEqual(form.bytesReceived, 0); - assert.strictEqual(form.bytesExpected, 8); - - // JS can be evil, lets make sure we are not - form.headers['content-length'] = '08'; - gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) { - assert.equal(event, 'progress'); - assert.equal(bytesReceived, 0); - assert.equal(bytesExpected, 8); - }); - form._parseContentLength(); - assert.strictEqual(form.bytesExpected, 8); -}); - -test(function _initMultipart() { - var BOUNDARY = '123', - PARSER; - - gently.expect(MultipartParserStub, 'new', function() { - PARSER = this; - }); - - gently.expect(MultipartParserStub.prototype, 'initWithBoundary', function(boundary) { - assert.equal(boundary, BOUNDARY); - }); - - form._initMultipart(BOUNDARY); - assert.equal(form.type, 'multipart'); - assert.strictEqual(form._parser, PARSER); - - (function testRegularField() { - var PART; - gently.expect(StreamStub, 'new', function() { - PART = this; - }); - - gently.expect(form, 'onPart', function(part) { - assert.strictEqual(part, PART); - assert.deepEqual - ( part.headers - , { 'content-disposition': 'form-data; name="field1"' - , 'foo': 'bar' - } - ); - assert.equal(part.name, 'field1'); - - var strings = ['hello', ' world']; - gently.expect(part, 'emit', 2, function(event, b) { - assert.equal(event, 'data'); - assert.equal(b.toString(), strings.shift()); - }); - - gently.expect(part, 'emit', function(event, b) { - assert.equal(event, 'end'); - }); - }); - - PARSER.onPartBegin(); - PARSER.onHeaderField(new Buffer('content-disposition'), 0, 10); - PARSER.onHeaderField(new Buffer('content-disposition'), 10, 19); - PARSER.onHeaderValue(new Buffer('form-data; name="field1"'), 0, 14); - PARSER.onHeaderValue(new Buffer('form-data; name="field1"'), 14, 24); - PARSER.onHeaderEnd(); - PARSER.onHeaderField(new Buffer('foo'), 0, 3); - PARSER.onHeaderValue(new Buffer('bar'), 0, 3); - PARSER.onHeaderEnd(); - PARSER.onHeadersEnd(); - PARSER.onPartData(new Buffer('hello world'), 0, 5); - PARSER.onPartData(new Buffer('hello world'), 5, 11); - PARSER.onPartEnd(); - })(); - - (function testFileField() { - var PART; - gently.expect(StreamStub, 'new', function() { - PART = this; - }); - - gently.expect(form, 'onPart', function(part) { - assert.deepEqual - ( part.headers - , { 'content-disposition': 'form-data; name="field2"; filename="C:\\Documents and Settings\\IE\\Must\\Die\\Sun"et.jpg"' - , 'content-type': 'text/plain' - } - ); - assert.equal(part.name, 'field2'); - assert.equal(part.filename, 'Sun"et.jpg'); - assert.equal(part.mime, 'text/plain'); - - gently.expect(part, 'emit', function(event, b) { - assert.equal(event, 'data'); - assert.equal(b.toString(), '... contents of file1.txt ...'); - }); - - gently.expect(part, 'emit', function(event, b) { - assert.equal(event, 'end'); - }); - }); - - PARSER.onPartBegin(); - PARSER.onHeaderField(new Buffer('content-disposition'), 0, 19); - PARSER.onHeaderValue(new Buffer('form-data; name="field2"; filename="C:\\Documents and Settings\\IE\\Must\\Die\\Sun"et.jpg"'), 0, 85); - PARSER.onHeaderEnd(); - PARSER.onHeaderField(new Buffer('Content-Type'), 0, 12); - PARSER.onHeaderValue(new Buffer('text/plain'), 0, 10); - PARSER.onHeaderEnd(); - PARSER.onHeadersEnd(); - PARSER.onPartData(new Buffer('... contents of file1.txt ...'), 0, 29); - PARSER.onPartEnd(); - })(); - - (function testEnd() { - gently.expect(form, '_maybeEnd'); - PARSER.onEnd(); - assert.ok(form.ended); - })(); -}); - -test(function _fileName() { - // TODO - return; -}); - -test(function _initUrlencoded() { - var PARSER; - - gently.expect(QuerystringParserStub, 'new', function() { - PARSER = this; - }); - - form._initUrlencoded(); - assert.equal(form.type, 'urlencoded'); - assert.strictEqual(form._parser, PARSER); - - (function testOnField() { - var KEY = 'KEY', VAL = 'VAL'; - gently.expect(form, 'emit', function(field, key, val) { - assert.equal(field, 'field'); - assert.equal(key, KEY); - assert.equal(val, VAL); - }); - - PARSER.onField(KEY, VAL); - })(); - - (function testOnEnd() { - gently.expect(form, '_maybeEnd'); - - PARSER.onEnd(); - assert.equal(form.ended, true); - })(); -}); - -test(function _error() { - var ERR = new Error('bla'); - - gently.expect(form, 'pause'); - gently.expect(form, 'emit', function(event, err) { - assert.equal(event, 'error'); - assert.strictEqual(err, ERR); - }); - - form._error(ERR); - assert.strictEqual(form.error, ERR); - - // make sure _error only does its thing once - form._error(ERR); -}); - -test(function onPart() { - var PART = {}; - gently.expect(form, 'handlePart', function(part) { - assert.strictEqual(part, PART); - }); - - form.onPart(PART); -}); - -test(function handlePart() { - (function testUtf8Field() { - var PART = new events.EventEmitter(); - PART.name = 'my_field'; - - gently.expect(form, 'emit', function(event, field, value) { - assert.equal(event, 'field'); - assert.equal(field, 'my_field'); - assert.equal(value, 'hello world: €'); - }); - - form.handlePart(PART); - PART.emit('data', new Buffer('hello')); - PART.emit('data', new Buffer(' world: ')); - PART.emit('data', new Buffer([0xE2])); - PART.emit('data', new Buffer([0x82, 0xAC])); - PART.emit('end'); - })(); - - (function testBinaryField() { - var PART = new events.EventEmitter(); - PART.name = 'my_field2'; - - gently.expect(form, 'emit', function(event, field, value) { - assert.equal(event, 'field'); - assert.equal(field, 'my_field2'); - assert.equal(value, 'hello world: '+new Buffer([0xE2, 0x82, 0xAC]).toString('binary')); - }); - - form.encoding = 'binary'; - form.handlePart(PART); - PART.emit('data', new Buffer('hello')); - PART.emit('data', new Buffer(' world: ')); - PART.emit('data', new Buffer([0xE2])); - PART.emit('data', new Buffer([0x82, 0xAC])); - PART.emit('end'); - })(); - - (function testFieldSize() { - form.maxFieldsSize = 8; - var PART = new events.EventEmitter(); - PART.name = 'my_field'; - - gently.expect(form, '_error', function(err) { - assert.equal(err.message, 'maxFieldsSize exceeded, received 9 bytes of field data'); - }); - - form.handlePart(PART); - form._fieldsSize = 1; - PART.emit('data', new Buffer(7)); - PART.emit('data', new Buffer(1)); - })(); - - (function testFilePart() { - var PART = new events.EventEmitter(), - FILE = new events.EventEmitter(), - PATH = '/foo/bar'; - - PART.name = 'my_file'; - PART.filename = 'sweet.txt'; - PART.mime = 'sweet.txt'; - - gently.expect(form, '_uploadPath', function(filename) { - assert.equal(filename, PART.filename); - return PATH; - }); - - gently.expect(FileStub, 'new', function(properties) { - assert.equal(properties.path, PATH); - assert.equal(properties.name, PART.filename); - assert.equal(properties.type, PART.mime); - FILE = this; - - gently.expect(form, 'emit', function (event, field, file) { - assert.equal(event, 'fileBegin'); - assert.strictEqual(field, PART.name); - assert.strictEqual(file, FILE); - }); - - gently.expect(FILE, 'open'); - }); - - form.handlePart(PART); - assert.equal(form._flushing, 1); - - var BUFFER; - gently.expect(form, 'pause'); - gently.expect(FILE, 'write', function(buffer, cb) { - assert.strictEqual(buffer, BUFFER); - gently.expect(form, 'resume'); - // @todo handle cb(new Err) - cb(); - }); - - PART.emit('data', BUFFER = new Buffer('test')); - - gently.expect(FILE, 'end', function(cb) { - gently.expect(form, 'emit', function(event, field, file) { - assert.equal(event, 'file'); - assert.strictEqual(file, FILE); - }); - - gently.expect(form, '_maybeEnd'); - - cb(); - assert.equal(form._flushing, 0); - }); - - PART.emit('end'); - })(); -}); - -test(function _uploadPath() { - (function testUniqueId() { - var UUID_A, UUID_B; - gently.expect(GENTLY.hijacked.path, 'join', function(uploadDir, uuid) { - assert.equal(uploadDir, form.uploadDir); - UUID_A = uuid; - }); - form._uploadPath(); - - gently.expect(GENTLY.hijacked.path, 'join', function(uploadDir, uuid) { - UUID_B = uuid; - }); - form._uploadPath(); - - assert.notEqual(UUID_A, UUID_B); - })(); - - (function testFileExtension() { - form.keepExtensions = true; - var FILENAME = 'foo.jpg', - EXT = '.bar'; - - gently.expect(GENTLY.hijacked.path, 'extname', function(filename) { - assert.equal(filename, FILENAME); - gently.restore(path, 'extname'); - - return EXT; - }); - - gently.expect(GENTLY.hijacked.path, 'join', function(uploadDir, name) { - assert.equal(path.extname(name), EXT); - }); - form._uploadPath(FILENAME); - })(); -}); - -test(function _maybeEnd() { - gently.expect(form, 'emit', 0); - form._maybeEnd(); - - form.ended = true; - form._flushing = 1; - form._maybeEnd(); - - gently.expect(form, 'emit', function(event) { - assert.equal(event, 'end'); - }); - - form.ended = true; - form._flushing = 0; - form._maybeEnd(); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-multipart-parser.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-multipart-parser.js deleted file mode 100644 index d8dc968c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-multipart-parser.js +++ /dev/null @@ -1,50 +0,0 @@ -var common = require('../common'); -var multipartParser = require(common.lib + '/multipart_parser'), - MultipartParser = multipartParser.MultipartParser, - events = require('events'), - Buffer = require('buffer').Buffer, - parser; - -function test(test) { - parser = new MultipartParser(); - test(); -} - -test(function constructor() { - assert.equal(parser.boundary, null); - assert.equal(parser.state, 0); - assert.equal(parser.flags, 0); - assert.equal(parser.boundaryChars, null); - assert.equal(parser.index, null); - assert.equal(parser.lookbehind, null); - assert.equal(parser.constructor.name, 'MultipartParser'); -}); - -test(function initWithBoundary() { - var boundary = 'abc'; - parser.initWithBoundary(boundary); - assert.deepEqual(Array.prototype.slice.call(parser.boundary), [13, 10, 45, 45, 97, 98, 99]); - assert.equal(parser.state, multipartParser.START); - - assert.deepEqual(parser.boundaryChars, {10: true, 13: true, 45: true, 97: true, 98: true, 99: true}); -}); - -test(function parserError() { - var boundary = 'abc', - buffer = new Buffer(5); - - parser.initWithBoundary(boundary); - buffer.write('--ad', 'ascii', 0); - assert.equal(parser.write(buffer), 3); -}); - -test(function end() { - (function testError() { - assert.equal(parser.end().message, 'MultipartParser.end(): stream ended unexpectedly: ' + parser.explain()); - })(); - - (function testRegular() { - parser.state = multipartParser.END; - assert.strictEqual(parser.end(), undefined); - })(); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-querystring-parser.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-querystring-parser.js deleted file mode 100644 index 54d3e2d5..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-querystring-parser.js +++ /dev/null @@ -1,45 +0,0 @@ -var common = require('../common'); -var QuerystringParser = require(common.lib + '/querystring_parser').QuerystringParser, - Buffer = require('buffer').Buffer, - gently, - parser; - -function test(test) { - gently = new Gently(); - parser = new QuerystringParser(); - test(); - gently.verify(test.name); -} - -test(function constructor() { - assert.equal(parser.buffer, ''); - assert.equal(parser.constructor.name, 'QuerystringParser'); -}); - -test(function write() { - var a = new Buffer('a=1'); - assert.equal(parser.write(a), a.length); - - var b = new Buffer('&b=2'); - parser.write(b); - assert.equal(parser.buffer, a + b); -}); - -test(function end() { - var FIELDS = {a: ['b', {c: 'd'}], e: 'f'}; - - gently.expect(GENTLY.hijacked.querystring, 'parse', function(str) { - assert.equal(str, parser.buffer); - return FIELDS; - }); - - gently.expect(parser, 'onField', Object.keys(FIELDS).length, function(key, val) { - assert.deepEqual(FIELDS[key], val); - }); - - gently.expect(parser, 'onEnd'); - - parser.buffer = 'my buffer'; - parser.end(); - assert.equal(parser.buffer, ''); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js deleted file mode 100644 index 479e46d6..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js +++ /dev/null @@ -1,75 +0,0 @@ -var common = require('../common'); -var BOUNDARY = '---------------------------10102754414578508781458777923', - FIXTURE = TEST_FIXTURES+'/multi_video.upload', - fs = require('fs'), - util = require(common.lib + '/util'), - http = require('http'), - formidable = require(common.lib + '/index'), - server = http.createServer(); - -server.on('request', function(req, res) { - var form = new formidable.IncomingForm(), - uploads = {}; - - form.uploadDir = TEST_TMP; - form.hash = 'sha1'; - form.parse(req); - - form - .on('fileBegin', function(field, file) { - assert.equal(field, 'upload'); - - var tracker = {file: file, progress: [], ended: false}; - uploads[file.filename] = tracker; - file - .on('progress', function(bytesReceived) { - tracker.progress.push(bytesReceived); - assert.equal(bytesReceived, file.length); - }) - .on('end', function() { - tracker.ended = true; - }); - }) - .on('field', function(field, value) { - assert.equal(field, 'title'); - assert.equal(value, ''); - }) - .on('file', function(field, file) { - assert.equal(field, 'upload'); - assert.strictEqual(uploads[file.filename].file, file); - }) - .on('end', function() { - assert.ok(uploads['shortest_video.flv']); - assert.ok(uploads['shortest_video.flv'].ended); - assert.ok(uploads['shortest_video.flv'].progress.length > 3); - assert.equal(uploads['shortest_video.flv'].file.hash, 'd6a17616c7143d1b1438ceeef6836d1a09186b3a'); - assert.equal(uploads['shortest_video.flv'].progress.slice(-1), uploads['shortest_video.flv'].file.length); - assert.ok(uploads['shortest_video.mp4']); - assert.ok(uploads['shortest_video.mp4'].ended); - assert.ok(uploads['shortest_video.mp4'].progress.length > 3); - assert.equal(uploads['shortest_video.mp4'].file.hash, '937dfd4db263f4887ceae19341dcc8d63bcd557f'); - - server.close(); - res.writeHead(200); - res.end('good'); - }); -}); - -server.listen(TEST_PORT, function() { - var client = http.createClient(TEST_PORT), - stat = fs.statSync(FIXTURE), - headers = { - 'content-type': 'multipart/form-data; boundary='+BOUNDARY, - 'content-length': stat.size, - } - request = client.request('POST', '/', headers), - fixture = new fs.ReadStream(FIXTURE); - - fixture - .on('data', function(b) { - request.write(b); - }) - .on('end', function() { - request.end(); - }); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/run.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/run.js deleted file mode 100755 index 50b23610..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/run.js +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -require('urun')(__dirname) diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js deleted file mode 100644 index fe2ac1c6..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js +++ /dev/null @@ -1,63 +0,0 @@ -var common = require('../common'); -var test = require('utest'); -var assert = common.assert; -var IncomingForm = common.require('incoming_form').IncomingForm; -var path = require('path'); - -var form; -test('IncomingForm', { - before: function() { - form = new IncomingForm(); - }, - - '#_fileName with regular characters': function() { - var filename = 'foo.txt'; - assert.equal(form._fileName(makeHeader(filename)), 'foo.txt'); - }, - - '#_fileName with unescaped quote': function() { - var filename = 'my".txt'; - assert.equal(form._fileName(makeHeader(filename)), 'my".txt'); - }, - - '#_fileName with escaped quote': function() { - var filename = 'my%22.txt'; - assert.equal(form._fileName(makeHeader(filename)), 'my".txt'); - }, - - '#_fileName with bad quote and additional sub-header': function() { - var filename = 'my".txt'; - var header = makeHeader(filename) + '; foo="bar"'; - assert.equal(form._fileName(header), filename); - }, - - '#_fileName with semicolon': function() { - var filename = 'my;.txt'; - assert.equal(form._fileName(makeHeader(filename)), 'my;.txt'); - }, - - '#_fileName with utf8 character': function() { - var filename = 'my☃.txt'; - assert.equal(form._fileName(makeHeader(filename)), 'my☃.txt'); - }, - - '#_uploadPath strips harmful characters from extension when keepExtensions': function() { - form.keepExtensions = true; - - var ext = path.extname(form._uploadPath('fine.jpg?foo=bar')); - assert.equal(ext, '.jpg'); - - var ext = path.extname(form._uploadPath('fine?foo=bar')); - assert.equal(ext, ''); - - var ext = path.extname(form._uploadPath('super.cr2+dsad')); - assert.equal(ext, '.cr2'); - - var ext = path.extname(form._uploadPath('super.bar')); - assert.equal(ext, '.bar'); - }, -}); - -function makeHeader(filename) { - return 'Content-Disposition: form-data; name="upload"; filename="' + filename + '"'; -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/tool/record.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/tool/record.js deleted file mode 100644 index 9f1cef86..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/formidable/tool/record.js +++ /dev/null @@ -1,47 +0,0 @@ -var http = require('http'); -var fs = require('fs'); -var connections = 0; - -var server = http.createServer(function(req, res) { - var socket = req.socket; - console.log('Request: %s %s -> %s', req.method, req.url, socket.filename); - - req.on('end', function() { - if (req.url !== '/') { - res.end(JSON.stringify({ - method: req.method, - url: req.url, - filename: socket.filename, - })); - return; - } - - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
    '+ - '
    '+ - '
    '+ - ''+ - '
    ' - ); - }); -}); - -server.on('connection', function(socket) { - connections++; - - socket.id = connections; - socket.filename = 'connection-' + socket.id + '.http'; - socket.file = fs.createWriteStream(socket.filename); - socket.pipe(socket.file); - - console.log('--> %s', socket.filename); - socket.on('close', function() { - console.log('<-- %s', socket.filename); - }); -}); - -var port = process.env.PORT || 8080; -server.listen(port, function() { - console.log('Recording connections on port %s', port); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/.npmignore b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/History.md b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/History.md deleted file mode 100644 index c8aa68fa..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/History.md +++ /dev/null @@ -1,5 +0,0 @@ - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/Makefile b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/Makefile deleted file mode 100644 index 4e9c8d36..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/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/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/Readme.md b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/Readme.md deleted file mode 100644 index 1cdd68a2..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/Readme.md +++ /dev/null @@ -1,29 +0,0 @@ - -# pause - - Pause streams... - -## License - -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/index.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/index.js deleted file mode 100644 index 1b7b3794..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/index.js +++ /dev/null @@ -1,29 +0,0 @@ - -module.exports = function(obj){ - var onData - , onEnd - , events = []; - - // buffer data - obj.on('data', onData = function(data, encoding){ - events.push(['data', data, encoding]); - }); - - // buffer end - obj.on('end', onEnd = function(data, encoding){ - events.push(['end', data, encoding]); - }); - - return { - end: function(){ - obj.removeListener('data', onData); - obj.removeListener('end', onEnd); - }, - resume: function(){ - this.end(); - for (var i = 0, len = events.length; i < len; ++i) { - obj.emit.apply(obj, events[i]); - } - } - }; -}; \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/package.json b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/package.json deleted file mode 100644 index 73cfe400..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/pause/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "pause", - "version": "0.0.1", - "description": "Pause streams...", - "keywords": [], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "main": "index", - "readme": "\n# pause\n\n Pause streams...\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "_id": "pause@0.0.1", - "_from": "pause@0.0.1" -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/.npmignore b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/.travis.yml b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/.travis.yml deleted file mode 100644 index 2c0a8f63..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.4 \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/History.md b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/History.md deleted file mode 100644 index 1feef459..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/History.md +++ /dev/null @@ -1,83 +0,0 @@ - -0.5.1 / 2012-09-18 -================== - - * fix encoded `=`. Closes #43 - -0.5.0 / 2012-05-04 -================== - - * Added component support - -0.4.2 / 2012-02-08 -================== - - * Fixed: ensure objects are created when appropriate not arrays [aheckmann] - -0.4.1 / 2012-01-26 -================== - - * Fixed stringify()ing numbers. Closes #23 - -0.4.0 / 2011-11-21 -================== - - * Allow parsing of an existing object (for `bodyParser()`) [jackyz] - * Replaced expresso with mocha - -0.3.2 / 2011-11-08 -================== - - * Fixed global variable leak - -0.3.1 / 2011-08-17 -================== - - * Added `try/catch` around malformed uri components - * Add test coverage for Array native method bleed-though - -0.3.0 / 2011-07-19 -================== - - * Allow `array[index]` and `object[property]` syntaxes [Aria Stewart] - -0.2.0 / 2011-06-29 -================== - - * Added `qs.stringify()` [Cory Forsyth] - -0.1.0 / 2011-04-13 -================== - - * Added jQuery-ish array support - -0.0.7 / 2011-03-13 -================== - - * Fixed; handle empty string and `== null` in `qs.parse()` [dmit] - allows for convenient `qs.parse(url.parse(str).query)` - -0.0.6 / 2011-02-14 -================== - - * Fixed; support for implicit arrays - -0.0.4 / 2011-02-09 -================== - - * Fixed `+` as a space - -0.0.3 / 2011-02-08 -================== - - * Fixed case when right-hand value contains "]" - -0.0.2 / 2011-02-07 -================== - - * Fixed "=" presence in key - -0.0.1 / 2011-02-07 -================== - - * Initial release \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/Makefile b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/Makefile deleted file mode 100644 index 0a21cf73..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/Makefile +++ /dev/null @@ -1,12 +0,0 @@ - -test/browser/qs.js: querystring.js - component build package.json test/browser/qs - -querystring.js: lib/head.js lib/querystring.js lib/tail.js - cat $^ > $@ - -test: - @./node_modules/.bin/mocha \ - --ui bdd - -.PHONY: test \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/Readme.md b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/Readme.md deleted file mode 100644 index 27e54a4a..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/Readme.md +++ /dev/null @@ -1,58 +0,0 @@ -# node-querystring - - query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others. - -## Installation - - $ npm install qs - -## Examples - -```js -var qs = require('qs'); - -qs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com'); -// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } } - -qs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }}) -// => user[name]=Tobi&user[email]=tobi%40learnboost.com -``` - -## Testing - -Install dev dependencies: - - $ npm install -d - -and execute: - - $ make test - -browser: - - $ open test/browser/index.html - -## License - -(The MIT License) - -Copyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/benchmark.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/benchmark.js deleted file mode 100644 index 97e2c93e..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/benchmark.js +++ /dev/null @@ -1,17 +0,0 @@ - -var qs = require('./'); - -var times = 100000 - , start = new Date - , n = times; - -console.log('times: %d', times); - -while (n--) qs.parse('foo=bar'); -console.log('simple: %dms', new Date - start); - -var start = new Date - , n = times; - -while (n--) qs.parse('user[name][first]=tj&user[name][last]=holowaychuk'); -console.log('nested: %dms', new Date - start); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/component.json b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/component.json deleted file mode 100644 index ba34eadd..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/component.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "querystring", - "description": "Querystring parser / stringifier with nesting support", - "keywords": ["querystring", "query", "parser"], - "main": "lib/querystring.js" -} \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/examples.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/examples.js deleted file mode 100644 index 27617b75..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/examples.js +++ /dev/null @@ -1,51 +0,0 @@ - -/** - * Module dependencies. - */ - -var qs = require('./'); - -var obj = qs.parse('foo'); -console.log(obj) - -var obj = qs.parse('foo=bar=baz'); -console.log(obj) - -var obj = qs.parse('users[]'); -console.log(obj) - -var obj = qs.parse('name=tj&email=tj@vision-media.ca'); -console.log(obj) - -var obj = qs.parse('users[]=tj&users[]=tobi&users[]=jane'); -console.log(obj) - -var obj = qs.parse('user[name][first]=tj&user[name][last]=holowaychuk'); -console.log(obj) - -var obj = qs.parse('users[][name][first]=tj&users[][name][last]=holowaychuk'); -console.log(obj) - -var obj = qs.parse('a=a&a=b&a=c'); -console.log(obj) - -var obj = qs.parse('user[tj]=tj&user[tj]=TJ'); -console.log(obj) - -var obj = qs.parse('user[names]=tj&user[names]=TJ&user[names]=Tyler'); -console.log(obj) - -var obj = qs.parse('user[name][first]=tj&user[name][first]=TJ'); -console.log(obj) - -var obj = qs.parse('user[0]=tj&user[1]=TJ'); -console.log(obj) - -var obj = qs.parse('user[0]=tj&user[]=TJ'); -console.log(obj) - -var obj = qs.parse('user[0]=tj&user[foo]=TJ'); -console.log(obj) - -var str = qs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }}); -console.log(str); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/index.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/index.js deleted file mode 100644 index d177d209..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/index.js +++ /dev/null @@ -1,2 +0,0 @@ - -module.exports = require('./lib/querystring'); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/lib/head.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/lib/head.js deleted file mode 100644 index 55d38175..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/lib/head.js +++ /dev/null @@ -1 +0,0 @@ -;(function(){ diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/lib/querystring.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/lib/querystring.js deleted file mode 100644 index d3689bbd..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/lib/querystring.js +++ /dev/null @@ -1,262 +0,0 @@ - -/** - * Object#toString() ref for stringify(). - */ - -var toString = Object.prototype.toString; - -/** - * Cache non-integer test regexp. - */ - -var isint = /^[0-9]+$/; - -function promote(parent, key) { - if (parent[key].length == 0) return parent[key] = {}; - var t = {}; - for (var i in parent[key]) t[i] = parent[key][i]; - parent[key] = t; - return t; -} - -function parse(parts, parent, key, val) { - var part = parts.shift(); - // end - if (!part) { - if (Array.isArray(parent[key])) { - parent[key].push(val); - } else if ('object' == typeof parent[key]) { - parent[key] = val; - } else if ('undefined' == typeof parent[key]) { - parent[key] = val; - } else { - parent[key] = [parent[key], val]; - } - // array - } else { - var obj = parent[key] = parent[key] || []; - if (']' == part) { - if (Array.isArray(obj)) { - if ('' != val) obj.push(val); - } else if ('object' == typeof obj) { - obj[Object.keys(obj).length] = val; - } else { - obj = parent[key] = [parent[key], val]; - } - // prop - } else if (~part.indexOf(']')) { - part = part.substr(0, part.length - 1); - if (!isint.test(part) && Array.isArray(obj)) obj = promote(parent, key); - parse(parts, obj, part, val); - // key - } else { - if (!isint.test(part) && Array.isArray(obj)) obj = promote(parent, key); - parse(parts, obj, part, val); - } - } -} - -/** - * Merge parent key/val pair. - */ - -function merge(parent, key, val){ - if (~key.indexOf(']')) { - var parts = key.split('[') - , len = parts.length - , last = len - 1; - parse(parts, parent, 'base', val); - // optimize - } else { - if (!isint.test(key) && Array.isArray(parent.base)) { - var t = {}; - for (var k in parent.base) t[k] = parent.base[k]; - parent.base = t; - } - set(parent.base, key, val); - } - - return parent; -} - -/** - * Parse the given obj. - */ - -function parseObject(obj){ - var ret = { base: {} }; - Object.keys(obj).forEach(function(name){ - merge(ret, name, obj[name]); - }); - return ret.base; -} - -/** - * Parse the given str. - */ - -function parseString(str){ - return String(str) - .split('&') - .reduce(function(ret, pair){ - var eql = pair.indexOf('=') - , brace = lastBraceInKey(pair) - , key = pair.substr(0, brace || eql) - , val = pair.substr(brace || eql, pair.length) - , val = val.substr(val.indexOf('=') + 1, val.length); - - // ?foo - if ('' == key) key = pair, val = ''; - - return merge(ret, decode(key), decode(val)); - }, { base: {} }).base; -} - -/** - * Parse the given query `str` or `obj`, returning an object. - * - * @param {String} str | {Object} obj - * @return {Object} - * @api public - */ - -exports.parse = function(str){ - if (null == str || '' == str) return {}; - return 'object' == typeof str - ? parseObject(str) - : parseString(str); -}; - -/** - * Turn the given `obj` into a query string - * - * @param {Object} obj - * @return {String} - * @api public - */ - -var stringify = exports.stringify = function(obj, prefix) { - if (Array.isArray(obj)) { - return stringifyArray(obj, prefix); - } else if ('[object Object]' == toString.call(obj)) { - return stringifyObject(obj, prefix); - } else if ('string' == typeof obj) { - return stringifyString(obj, prefix); - } else { - return prefix + '=' + obj; - } -}; - -/** - * Stringify the given `str`. - * - * @param {String} str - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyString(str, prefix) { - if (!prefix) throw new TypeError('stringify expects an object'); - return prefix + '=' + encodeURIComponent(str); -} - -/** - * Stringify the given `arr`. - * - * @param {Array} arr - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyArray(arr, prefix) { - var ret = []; - if (!prefix) throw new TypeError('stringify expects an object'); - for (var i = 0; i < arr.length; i++) { - ret.push(stringify(arr[i], prefix + '['+i+']')); - } - return ret.join('&'); -} - -/** - * Stringify the given `obj`. - * - * @param {Object} obj - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyObject(obj, prefix) { - var ret = [] - , keys = Object.keys(obj) - , key; - - for (var i = 0, len = keys.length; i < len; ++i) { - key = keys[i]; - ret.push(stringify(obj[key], prefix - ? prefix + '[' + encodeURIComponent(key) + ']' - : encodeURIComponent(key))); - } - - return ret.join('&'); -} - -/** - * Set `obj`'s `key` to `val` respecting - * the weird and wonderful syntax of a qs, - * where "foo=bar&foo=baz" becomes an array. - * - * @param {Object} obj - * @param {String} key - * @param {String} val - * @api private - */ - -function set(obj, key, val) { - var v = obj[key]; - if (undefined === v) { - obj[key] = val; - } else if (Array.isArray(v)) { - v.push(val); - } else { - obj[key] = [v, val]; - } -} - -/** - * Locate last brace in `str` within the key. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function lastBraceInKey(str) { - var len = str.length - , brace - , c; - for (var i = 0; i < len; ++i) { - c = str[i]; - if (']' == c) brace = false; - if ('[' == c) brace = true; - if ('=' == c && !brace) return i; - } -} - -/** - * Decode `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -function decode(str) { - try { - return decodeURIComponent(str.replace(/\+/g, ' ')); - } catch (err) { - return str; - } -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/lib/tail.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/lib/tail.js deleted file mode 100644 index 158693a0..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/lib/tail.js +++ /dev/null @@ -1 +0,0 @@ -})(); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/package.json b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/package.json deleted file mode 100644 index 9d2e120b..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "qs", - "description": "querystring parser", - "version": "0.5.1", - "keywords": [ - "query string", - "parser", - "component" - ], - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/node-querystring.git" - }, - "devDependencies": { - "mocha": "*", - "expect.js": "*" - }, - "component": { - "scripts": { - "querystring": "querystring.js" - } - }, - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "main": "index", - "engines": { - "node": "*" - }, - "readme": "# node-querystring\n\n query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others.\n\n## Installation\n\n $ npm install qs\n\n## Examples\n\n```js\nvar qs = require('qs');\n\nqs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com');\n// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } }\n\nqs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }})\n// => user[name]=Tobi&user[email]=tobi%40learnboost.com\n```\n\n## Testing\n\nInstall dev dependencies:\n\n $ npm install -d\n\nand execute:\n\n $ make test\n\nbrowser:\n\n $ open test/browser/index.html\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/node-querystring/issues" - }, - "homepage": "https://github.com/visionmedia/node-querystring", - "_id": "qs@0.5.1", - "_from": "qs@0.5.1" -} diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/querystring.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/querystring.js deleted file mode 100644 index 7466b068..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/querystring.js +++ /dev/null @@ -1,254 +0,0 @@ -;(function(){ - -/** - * Object#toString() ref for stringify(). - */ - -var toString = Object.prototype.toString; - -/** - * Cache non-integer test regexp. - */ - -var isint = /^[0-9]+$/; - -function promote(parent, key) { - if (parent[key].length == 0) return parent[key] = {}; - var t = {}; - for (var i in parent[key]) t[i] = parent[key][i]; - parent[key] = t; - return t; -} - -function parse(parts, parent, key, val) { - var part = parts.shift(); - // end - if (!part) { - if (Array.isArray(parent[key])) { - parent[key].push(val); - } else if ('object' == typeof parent[key]) { - parent[key] = val; - } else if ('undefined' == typeof parent[key]) { - parent[key] = val; - } else { - parent[key] = [parent[key], val]; - } - // array - } else { - var obj = parent[key] = parent[key] || []; - if (']' == part) { - if (Array.isArray(obj)) { - if ('' != val) obj.push(val); - } else if ('object' == typeof obj) { - obj[Object.keys(obj).length] = val; - } else { - obj = parent[key] = [parent[key], val]; - } - // prop - } else if (~part.indexOf(']')) { - part = part.substr(0, part.length - 1); - if (!isint.test(part) && Array.isArray(obj)) obj = promote(parent, key); - parse(parts, obj, part, val); - // key - } else { - if (!isint.test(part) && Array.isArray(obj)) obj = promote(parent, key); - parse(parts, obj, part, val); - } - } -} - -/** - * Merge parent key/val pair. - */ - -function merge(parent, key, val){ - if (~key.indexOf(']')) { - var parts = key.split('[') - , len = parts.length - , last = len - 1; - parse(parts, parent, 'base', val); - // optimize - } else { - if (!isint.test(key) && Array.isArray(parent.base)) { - var t = {}; - for (var k in parent.base) t[k] = parent.base[k]; - parent.base = t; - } - set(parent.base, key, val); - } - - return parent; -} - -/** - * Parse the given obj. - */ - -function parseObject(obj){ - var ret = { base: {} }; - Object.keys(obj).forEach(function(name){ - merge(ret, name, obj[name]); - }); - return ret.base; -} - -/** - * Parse the given str. - */ - -function parseString(str){ - return String(str) - .split('&') - .reduce(function(ret, pair){ - try{ - pair = decodeURIComponent(pair.replace(/\+/g, ' ')); - } catch(e) { - // ignore - } - - var eql = pair.indexOf('=') - , brace = lastBraceInKey(pair) - , key = pair.substr(0, brace || eql) - , val = pair.substr(brace || eql, pair.length) - , val = val.substr(val.indexOf('=') + 1, val.length); - - // ?foo - if ('' == key) key = pair, val = ''; - - return merge(ret, key, val); - }, { base: {} }).base; -} - -/** - * Parse the given query `str` or `obj`, returning an object. - * - * @param {String} str | {Object} obj - * @return {Object} - * @api public - */ - -exports.parse = function(str){ - if (null == str || '' == str) return {}; - return 'object' == typeof str - ? parseObject(str) - : parseString(str); -}; - -/** - * Turn the given `obj` into a query string - * - * @param {Object} obj - * @return {String} - * @api public - */ - -var stringify = exports.stringify = function(obj, prefix) { - if (Array.isArray(obj)) { - return stringifyArray(obj, prefix); - } else if ('[object Object]' == toString.call(obj)) { - return stringifyObject(obj, prefix); - } else if ('string' == typeof obj) { - return stringifyString(obj, prefix); - } else { - return prefix + '=' + obj; - } -}; - -/** - * Stringify the given `str`. - * - * @param {String} str - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyString(str, prefix) { - if (!prefix) throw new TypeError('stringify expects an object'); - return prefix + '=' + encodeURIComponent(str); -} - -/** - * Stringify the given `arr`. - * - * @param {Array} arr - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyArray(arr, prefix) { - var ret = []; - if (!prefix) throw new TypeError('stringify expects an object'); - for (var i = 0; i < arr.length; i++) { - ret.push(stringify(arr[i], prefix + '['+i+']')); - } - return ret.join('&'); -} - -/** - * Stringify the given `obj`. - * - * @param {Object} obj - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyObject(obj, prefix) { - var ret = [] - , keys = Object.keys(obj) - , key; - - for (var i = 0, len = keys.length; i < len; ++i) { - key = keys[i]; - ret.push(stringify(obj[key], prefix - ? prefix + '[' + encodeURIComponent(key) + ']' - : encodeURIComponent(key))); - } - - return ret.join('&'); -} - -/** - * Set `obj`'s `key` to `val` respecting - * the weird and wonderful syntax of a qs, - * where "foo=bar&foo=baz" becomes an array. - * - * @param {Object} obj - * @param {String} key - * @param {String} val - * @api private - */ - -function set(obj, key, val) { - var v = obj[key]; - if (undefined === v) { - obj[key] = val; - } else if (Array.isArray(v)) { - v.push(val); - } else { - obj[key] = [v, val]; - } -} - -/** - * Locate last brace in `str` within the key. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function lastBraceInKey(str) { - var len = str.length - , brace - , c; - for (var i = 0; i < len; ++i) { - c = str[i]; - if (']' == c) brace = false; - if ('[' == c) brace = true; - if ('=' == c && !brace) return i; - } -} -})(); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/test/browser/expect.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/test/browser/expect.js deleted file mode 100644 index 76aa4e84..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/test/browser/expect.js +++ /dev/null @@ -1,1202 +0,0 @@ - -(function (global, module) { - - if ('undefined' == typeof module) { - var module = { exports: {} } - , exports = module.exports - } - - /** - * Exports. - */ - - module.exports = expect; - expect.Assertion = Assertion; - - /** - * Exports version. - */ - - expect.version = '0.1.2'; - - /** - * Possible assertion flags. - */ - - var flags = { - not: ['to', 'be', 'have', 'include', 'only'] - , to: ['be', 'have', 'include', 'only', 'not'] - , only: ['have'] - , have: ['own'] - , be: ['an'] - }; - - function expect (obj) { - return new Assertion(obj); - } - - /** - * Constructor - * - * @api private - */ - - function Assertion (obj, flag, parent) { - this.obj = obj; - this.flags = {}; - - if (undefined != parent) { - this.flags[flag] = true; - - for (var i in parent.flags) { - if (parent.flags.hasOwnProperty(i)) { - this.flags[i] = true; - } - } - } - - var $flags = flag ? flags[flag] : keys(flags) - , self = this - - if ($flags) { - for (var i = 0, l = $flags.length; i < l; i++) { - // avoid recursion - if (this.flags[$flags[i]]) continue; - - var name = $flags[i] - , assertion = new Assertion(this.obj, name, this) - - if ('function' == typeof Assertion.prototype[name]) { - // clone the function, make sure we dont touch the prot reference - var old = this[name]; - this[name] = function () { - return old.apply(self, arguments); - } - - for (var fn in Assertion.prototype) { - if (Assertion.prototype.hasOwnProperty(fn) && fn != name) { - this[name][fn] = bind(assertion[fn], assertion); - } - } - } else { - this[name] = assertion; - } - } - } - }; - - /** - * Performs an assertion - * - * @api private - */ - - Assertion.prototype.assert = function (truth, msg, error) { - var msg = this.flags.not ? error : msg - , ok = this.flags.not ? !truth : truth; - - if (!ok) { - throw new Error(msg); - } - - this.and = new Assertion(this.obj); - }; - - /** - * Check if the value is truthy - * - * @api public - */ - - Assertion.prototype.ok = function () { - this.assert( - !!this.obj - , 'expected ' + i(this.obj) + ' to be truthy' - , 'expected ' + i(this.obj) + ' to be falsy'); - }; - - /** - * Assert that the function throws. - * - * @param {Function|RegExp} callback, or regexp to match error string against - * @api public - */ - - Assertion.prototype.throwError = - Assertion.prototype.throwException = function (fn) { - expect(this.obj).to.be.a('function'); - - var thrown = false - , not = this.flags.not - - try { - this.obj(); - } catch (e) { - if ('function' == typeof fn) { - fn(e); - } else if ('object' == typeof fn) { - var subject = 'string' == typeof e ? e : e.message; - if (not) { - expect(subject).to.not.match(fn); - } else { - expect(subject).to.match(fn); - } - } - thrown = true; - } - - if ('object' == typeof fn && not) { - // in the presence of a matcher, ensure the `not` only applies to - // the matching. - this.flags.not = false; - } - - var name = this.obj.name || 'fn'; - this.assert( - thrown - , 'expected ' + name + ' to throw an exception' - , 'expected ' + name + ' not to throw an exception'); - }; - - /** - * Checks if the array is empty. - * - * @api public - */ - - Assertion.prototype.empty = function () { - var expectation; - - if ('object' == typeof this.obj && null !== this.obj && !isArray(this.obj)) { - if ('number' == typeof this.obj.length) { - expectation = !this.obj.length; - } else { - expectation = !keys(this.obj).length; - } - } else { - if ('string' != typeof this.obj) { - expect(this.obj).to.be.an('object'); - } - - expect(this.obj).to.have.property('length'); - expectation = !this.obj.length; - } - - this.assert( - expectation - , 'expected ' + i(this.obj) + ' to be empty' - , 'expected ' + i(this.obj) + ' to not be empty'); - return this; - }; - - /** - * Checks if the obj exactly equals another. - * - * @api public - */ - - Assertion.prototype.be = - Assertion.prototype.equal = function (obj) { - this.assert( - obj === this.obj - , 'expected ' + i(this.obj) + ' to equal ' + i(obj) - , 'expected ' + i(this.obj) + ' to not equal ' + i(obj)); - return this; - }; - - /** - * Checks if the obj sortof equals another. - * - * @api public - */ - - Assertion.prototype.eql = function (obj) { - this.assert( - expect.eql(obj, this.obj) - , 'expected ' + i(this.obj) + ' to sort of equal ' + i(obj) - , 'expected ' + i(this.obj) + ' to sort of not equal ' + i(obj)); - return this; - }; - - /** - * Assert within start to finish (inclusive). - * - * @param {Number} start - * @param {Number} finish - * @api public - */ - - Assertion.prototype.within = function (start, finish) { - var range = start + '..' + finish; - this.assert( - this.obj >= start && this.obj <= finish - , 'expected ' + i(this.obj) + ' to be within ' + range - , 'expected ' + i(this.obj) + ' to not be within ' + range); - return this; - }; - - /** - * Assert typeof / instance of - * - * @api public - */ - - Assertion.prototype.a = - Assertion.prototype.an = function (type) { - if ('string' == typeof type) { - // proper english in error msg - var n = /^[aeiou]/.test(type) ? 'n' : ''; - - // typeof with support for 'array' - this.assert( - 'array' == type ? isArray(this.obj) : - 'object' == type - ? 'object' == typeof this.obj && null !== this.obj - : type == typeof this.obj - , 'expected ' + i(this.obj) + ' to be a' + n + ' ' + type - , 'expected ' + i(this.obj) + ' not to be a' + n + ' ' + type); - } else { - // instanceof - var name = type.name || 'supplied constructor'; - this.assert( - this.obj instanceof type - , 'expected ' + i(this.obj) + ' to be an instance of ' + name - , 'expected ' + i(this.obj) + ' not to be an instance of ' + name); - } - - return this; - }; - - /** - * Assert numeric value above _n_. - * - * @param {Number} n - * @api public - */ - - Assertion.prototype.greaterThan = - Assertion.prototype.above = function (n) { - this.assert( - this.obj > n - , 'expected ' + i(this.obj) + ' to be above ' + n - , 'expected ' + i(this.obj) + ' to be below ' + n); - return this; - }; - - /** - * Assert numeric value below _n_. - * - * @param {Number} n - * @api public - */ - - Assertion.prototype.lessThan = - Assertion.prototype.below = function (n) { - this.assert( - this.obj < n - , 'expected ' + i(this.obj) + ' to be below ' + n - , 'expected ' + i(this.obj) + ' to be above ' + n); - return this; - }; - - /** - * Assert string value matches _regexp_. - * - * @param {RegExp} regexp - * @api public - */ - - Assertion.prototype.match = function (regexp) { - this.assert( - regexp.exec(this.obj) - , 'expected ' + i(this.obj) + ' to match ' + regexp - , 'expected ' + i(this.obj) + ' not to match ' + regexp); - return this; - }; - - /** - * Assert property "length" exists and has value of _n_. - * - * @param {Number} n - * @api public - */ - - Assertion.prototype.length = function (n) { - expect(this.obj).to.have.property('length'); - var len = this.obj.length; - this.assert( - n == len - , 'expected ' + i(this.obj) + ' to have a length of ' + n + ' but got ' + len - , 'expected ' + i(this.obj) + ' to not have a length of ' + len); - return this; - }; - - /** - * Assert property _name_ exists, with optional _val_. - * - * @param {String} name - * @param {Mixed} val - * @api public - */ - - Assertion.prototype.property = function (name, val) { - if (this.flags.own) { - this.assert( - Object.prototype.hasOwnProperty.call(this.obj, name) - , 'expected ' + i(this.obj) + ' to have own property ' + i(name) - , 'expected ' + i(this.obj) + ' to not have own property ' + i(name)); - return this; - } - - if (this.flags.not && undefined !== val) { - if (undefined === this.obj[name]) { - throw new Error(i(this.obj) + ' has no property ' + i(name)); - } - } else { - var hasProp; - try { - hasProp = name in this.obj - } catch (e) { - hasProp = undefined !== this.obj[name] - } - - this.assert( - hasProp - , 'expected ' + i(this.obj) + ' to have a property ' + i(name) - , 'expected ' + i(this.obj) + ' to not have a property ' + i(name)); - } - - if (undefined !== val) { - this.assert( - val === this.obj[name] - , 'expected ' + i(this.obj) + ' to have a property ' + i(name) - + ' of ' + i(val) + ', but got ' + i(this.obj[name]) - , 'expected ' + i(this.obj) + ' to not have a property ' + i(name) - + ' of ' + i(val)); - } - - this.obj = this.obj[name]; - return this; - }; - - /** - * Assert that the array contains _obj_ or string contains _obj_. - * - * @param {Mixed} obj|string - * @api public - */ - - Assertion.prototype.string = - Assertion.prototype.contain = function (obj) { - if ('string' == typeof this.obj) { - this.assert( - ~this.obj.indexOf(obj) - , 'expected ' + i(this.obj) + ' to contain ' + i(obj) - , 'expected ' + i(this.obj) + ' to not contain ' + i(obj)); - } else { - this.assert( - ~indexOf(this.obj, obj) - , 'expected ' + i(this.obj) + ' to contain ' + i(obj) - , 'expected ' + i(this.obj) + ' to not contain ' + i(obj)); - } - return this; - }; - - /** - * Assert exact keys or inclusion of keys by using - * the `.own` modifier. - * - * @param {Array|String ...} keys - * @api public - */ - - Assertion.prototype.key = - Assertion.prototype.keys = function ($keys) { - var str - , ok = true; - - $keys = isArray($keys) - ? $keys - : Array.prototype.slice.call(arguments); - - if (!$keys.length) throw new Error('keys required'); - - var actual = keys(this.obj) - , len = $keys.length; - - // Inclusion - ok = every($keys, function (key) { - return ~indexOf(actual, key); - }); - - // Strict - if (!this.flags.not && this.flags.only) { - ok = ok && $keys.length == actual.length; - } - - // Key string - if (len > 1) { - $keys = map($keys, function (key) { - return i(key); - }); - var last = $keys.pop(); - str = $keys.join(', ') + ', and ' + last; - } else { - str = i($keys[0]); - } - - // Form - str = (len > 1 ? 'keys ' : 'key ') + str; - - // Have / include - str = (!this.flags.only ? 'include ' : 'only have ') + str; - - // Assertion - this.assert( - ok - , 'expected ' + i(this.obj) + ' to ' + str - , 'expected ' + i(this.obj) + ' to not ' + str); - - return this; - }; - - /** - * Function bind implementation. - */ - - function bind (fn, scope) { - return function () { - return fn.apply(scope, arguments); - } - } - - /** - * Array every compatibility - * - * @see bit.ly/5Fq1N2 - * @api public - */ - - function every (arr, fn, thisObj) { - var scope = thisObj || global; - for (var i = 0, j = arr.length; i < j; ++i) { - if (!fn.call(scope, arr[i], i, arr)) { - return false; - } - } - return true; - }; - - /** - * Array indexOf compatibility. - * - * @see bit.ly/a5Dxa2 - * @api public - */ - - function indexOf (arr, o, i) { - if (Array.prototype.indexOf) { - return Array.prototype.indexOf.call(arr, o, i); - } - - if (arr.length === undefined) { - return -1; - } - - for (var j = arr.length, i = i < 0 ? i + j < 0 ? 0 : i + j : i || 0 - ; i < j && arr[i] !== o; i++); - - return j <= i ? -1 : i; - }; - - /** - * Inspects an object. - * - * @see taken from node.js `util` module (copyright Joyent, MIT license) - * @api private - */ - - function i (obj, showHidden, depth) { - var seen = []; - - function stylize (str) { - return str; - }; - - function format (value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (value && typeof value.inspect === 'function' && - // Filter out the util module, it's inspect function is special - value !== exports && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - return value.inspect(recurseTimes); - } - - // Primitive types cannot have properties - switch (typeof value) { - case 'undefined': - return stylize('undefined', 'undefined'); - - case 'string': - var simple = '\'' + json.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return stylize(simple, 'string'); - - case 'number': - return stylize('' + value, 'number'); - - case 'boolean': - return stylize('' + value, 'boolean'); - } - // For some reason typeof null is "object", so special case here. - if (value === null) { - return stylize('null', 'null'); - } - - // Look up the keys of the object. - var visible_keys = keys(value); - var $keys = showHidden ? Object.getOwnPropertyNames(value) : visible_keys; - - // Functions without properties can be shortcutted. - if (typeof value === 'function' && $keys.length === 0) { - if (isRegExp(value)) { - return stylize('' + value, 'regexp'); - } else { - var name = value.name ? ': ' + value.name : ''; - return stylize('[Function' + name + ']', 'special'); - } - } - - // Dates without properties can be shortcutted - if (isDate(value) && $keys.length === 0) { - return stylize(value.toUTCString(), 'date'); - } - - var base, type, braces; - // Determine the object type - if (isArray(value)) { - type = 'Array'; - braces = ['[', ']']; - } else { - type = 'Object'; - braces = ['{', '}']; - } - - // Make functions say that they are functions - if (typeof value === 'function') { - var n = value.name ? ': ' + value.name : ''; - base = (isRegExp(value)) ? ' ' + value : ' [Function' + n + ']'; - } else { - base = ''; - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + value.toUTCString(); - } - - if ($keys.length === 0) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return stylize('' + value, 'regexp'); - } else { - return stylize('[Object]', 'special'); - } - } - - seen.push(value); - - var output = map($keys, function (key) { - var name, str; - if (value.__lookupGetter__) { - if (value.__lookupGetter__(key)) { - if (value.__lookupSetter__(key)) { - str = stylize('[Getter/Setter]', 'special'); - } else { - str = stylize('[Getter]', 'special'); - } - } else { - if (value.__lookupSetter__(key)) { - str = stylize('[Setter]', 'special'); - } - } - } - if (indexOf(visible_keys, key) < 0) { - name = '[' + key + ']'; - } - if (!str) { - if (indexOf(seen, value[key]) < 0) { - if (recurseTimes === null) { - str = format(value[key]); - } else { - str = format(value[key], recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (isArray(value)) { - str = map(str.split('\n'), function (line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + map(str.split('\n'), function (line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = stylize('[Circular]', 'special'); - } - } - if (typeof name === 'undefined') { - if (type === 'Array' && key.match(/^\d+$/)) { - return str; - } - name = json.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = stylize(name, 'string'); - } - } - - return name + ': ' + str; - }); - - seen.pop(); - - var numLinesEst = 0; - var length = reduce(output, function (prev, cur) { - numLinesEst++; - if (indexOf(cur, '\n') >= 0) numLinesEst++; - return prev + cur.length + 1; - }, 0); - - if (length > 50) { - output = braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - - } else { - output = braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; - } - - return output; - } - return format(obj, (typeof depth === 'undefined' ? 2 : depth)); - }; - - function isArray (ar) { - return Object.prototype.toString.call(ar) == '[object Array]'; - }; - - function isRegExp(re) { - var s = '' + re; - return re instanceof RegExp || // easy case - // duck-type for context-switching evalcx case - typeof(re) === 'function' && - re.constructor.name === 'RegExp' && - re.compile && - re.test && - re.exec && - s.match(/^\/.*\/[gim]{0,3}$/); - }; - - function isDate(d) { - if (d instanceof Date) return true; - return false; - }; - - function keys (obj) { - if (Object.keys) { - return Object.keys(obj); - } - - var keys = []; - - for (var i in obj) { - if (Object.prototype.hasOwnProperty.call(obj, i)) { - keys.push(i); - } - } - - return keys; - } - - function map (arr, mapper, that) { - if (Array.prototype.map) { - return Array.prototype.map.call(arr, mapper, that); - } - - var other= new Array(arr.length); - - for (var i= 0, n = arr.length; i= 2) { - var rv = arguments[1]; - } else { - do { - if (i in this) { - rv = this[i++]; - break; - } - - // if array contains no values, no initial value to return - if (++i >= len) - throw new TypeError(); - } while (true); - } - - for (; i < len; i++) { - if (i in this) - rv = fun.call(null, rv, this[i], i, this); - } - - return rv; - }; - - /** - * Asserts deep equality - * - * @see taken from node.js `assert` module (copyright Joyent, MIT license) - * @api private - */ - - expect.eql = function eql (actual, expected) { - // 7.1. All identical values are equivalent, as determined by ===. - if (actual === expected) { - return true; - } else if ('undefined' != typeof Buffer - && Buffer.isBuffer(actual) && Buffer.isBuffer(expected)) { - if (actual.length != expected.length) return false; - - for (var i = 0; i < actual.length; i++) { - if (actual[i] !== expected[i]) return false; - } - - return true; - - // 7.2. If the expected value is a Date object, the actual value is - // equivalent if it is also a Date object that refers to the same time. - } else if (actual instanceof Date && expected instanceof Date) { - return actual.getTime() === expected.getTime(); - - // 7.3. Other pairs that do not both pass typeof value == "object", - // equivalence is determined by ==. - } else if (typeof actual != 'object' && typeof expected != 'object') { - return actual == expected; - - // 7.4. For all other Object pairs, including Array objects, equivalence is - // determined by having the same number of owned properties (as verified - // with Object.prototype.hasOwnProperty.call), the same set of keys - // (although not necessarily the same order), equivalent values for every - // corresponding key, and an identical "prototype" property. Note: this - // accounts for both named and indexed properties on Arrays. - } else { - return objEquiv(actual, expected); - } - } - - function isUndefinedOrNull (value) { - return value === null || value === undefined; - } - - function isArguments (object) { - return Object.prototype.toString.call(object) == '[object Arguments]'; - } - - function objEquiv (a, b) { - if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) - return false; - // an identical "prototype" property. - if (a.prototype !== b.prototype) return false; - //~~~I've managed to break Object.keys through screwy arguments passing. - // Converting to array solves the problem. - if (isArguments(a)) { - if (!isArguments(b)) { - return false; - } - a = pSlice.call(a); - b = pSlice.call(b); - return expect.eql(a, b); - } - try{ - var ka = keys(a), - kb = keys(b), - key, i; - } catch (e) {//happens when one is a string literal and the other isn't - return false; - } - // having the same number of owned properties (keys incorporates hasOwnProperty) - if (ka.length != kb.length) - return false; - //the same set of keys (although not necessarily the same order), - ka.sort(); - kb.sort(); - //~~~cheap key test - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] != kb[i]) - return false; - } - //equivalent values for every corresponding key, and - //~~~possibly expensive deep test - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!expect.eql(a[key], b[key])) - return false; - } - return true; - } - - var json = (function () { - "use strict"; - - if ('object' == typeof JSON && JSON.parse && JSON.stringify) { - return { - parse: nativeJSON.parse - , stringify: nativeJSON.stringify - } - } - - var JSON = {}; - - function f(n) { - // Format integers to have at least two digits. - return n < 10 ? '0' + n : n; - } - - function date(d, key) { - return isFinite(d.valueOf()) ? - d.getUTCFullYear() + '-' + - f(d.getUTCMonth() + 1) + '-' + - f(d.getUTCDate()) + 'T' + - f(d.getUTCHours()) + ':' + - f(d.getUTCMinutes()) + ':' + - f(d.getUTCSeconds()) + 'Z' : null; - }; - - var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - gap, - indent, - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }, - 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 instanceof Date) { - value = date(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. - - 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. - - 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'); - }; - - return JSON; - })(); - - if ('undefined' != typeof window) { - window.expect = module.exports; - } - -})( - this - , 'undefined' != typeof module ? module : {} - , 'undefined' != typeof exports ? exports : {} -); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/test/browser/index.html b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/test/browser/index.html deleted file mode 100644 index c73147aa..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/test/browser/index.html +++ /dev/null @@ -1,18 +0,0 @@ - - - Mocha - - - - - - - - - - - - -
    - - diff --git a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/test/browser/jquery.js b/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/test/browser/jquery.js deleted file mode 100644 index f3201aac..00000000 --- a/tty.js/node_modules/tty.js/node_modules/express/node_modules/connect/node_modules/qs/test/browser/jquery.js +++ /dev/null @@ -1,8981 +0,0 @@ -/*! - * jQuery JavaScript Library v1.6.2 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Thu Jun 30 14:16:56 2011 -0400 - */ -(function( window, undefined ) { - -// Use the correct document accordingly with window argument (sandbox) -var document = window.document, - navigator = window.navigator, - location = window.location; -var jQuery = (function() { - -// Define a local copy of jQuery -var jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context, rootjQuery ); - }, - - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - - // Map over the $ in case of overwrite - _$ = window.$, - - // A central reference to the root jQuery(document) - rootjQuery, - - // A simple way to check for HTML strings or ID strings - // (both of which we optimize for) - quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, - - // Check if a string has a non-whitespace character in it - rnotwhite = /\S/, - - // Used for trimming whitespace - trimLeft = /^\s+/, - trimRight = /\s+$/, - - // Check for digits - rdigit = /\d/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, - rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - - // Useragent RegExp - rwebkit = /(webkit)[ \/]([\w.]+)/, - ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, - rmsie = /(msie) ([\w.]+)/, - rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, - - // Matches dashed string for camelizing - rdashAlpha = /-([a-z])/ig, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }, - - // Keep a UserAgent string for use with jQuery.browser - userAgent = navigator.userAgent, - - // For matching the engine and version of the browser - browserMatch, - - // The deferred used on DOM ready - readyList, - - // The ready event handler - DOMContentLoaded, - - // Save a reference to some core methods - toString = Object.prototype.toString, - hasOwn = Object.prototype.hasOwnProperty, - push = Array.prototype.push, - slice = Array.prototype.slice, - trim = String.prototype.trim, - indexOf = Array.prototype.indexOf, - - // [[Class]] -> type pairs - class2type = {}; - -jQuery.fn = jQuery.prototype = { - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem, ret, doc; - - // Handle $(""), $(null), or $(undefined) - if ( !selector ) { - return this; - } - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - } - - // The body element only exists once, optimize finding it - if ( selector === "body" && !context && document.body ) { - this.context = document; - this[0] = document.body; - this.selector = selector; - this.length = 1; - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - // Are we dealing with HTML string or an ID? - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = quickExpr.exec( selector ); - } - - // Verify a match, and that no context was specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - doc = (context ? context.ownerDocument || context : document); - - // If a single string is passed in and it's a single tag - // just do a createElement and skip the rest - ret = rsingleTag.exec( selector ); - - if ( ret ) { - if ( jQuery.isPlainObject( context ) ) { - selector = [ document.createElement( ret[1] ) ]; - jQuery.fn.attr.call( selector, context, true ); - - } else { - selector = [ doc.createElement( ret[1] ) ]; - } - - } else { - ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); - selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes; - } - - return jQuery.merge( this, selector ); - - // HANDLE: $("#id") - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return (context || rootjQuery).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if (selector.selector !== undefined) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.6.2", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return slice.call( this, 0 ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - // Build a new jQuery matched element set - var ret = this.constructor(); - - if ( jQuery.isArray( elems ) ) { - push.apply( ret, elems ); - - } else { - jQuery.merge( ret, elems ); - } - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) { - ret.selector = this.selector + (this.selector ? " " : "") + selector; - } else if ( name ) { - ret.selector = this.selector + "." + name + "(" + selector + ")"; - } - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Attach the listeners - jQuery.bindReady(); - - // Add the callback - readyList.done( fn ); - - return this; - }, - - eq: function( i ) { - return i === -1 ? - this.slice( i ) : - this.slice( i, +i + 1 ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ), - "slice", slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - // Either a released hold or an DOMready/load event and not yet ready - if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready, 1 ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger( "ready" ).unbind( "ready" ); - } - } - }, - - bindReady: function() { - if ( readyList ) { - return; - } - - readyList = jQuery._Deferred(); - - // Catch cases where $(document).ready() is called after the - // browser event has already occurred. - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - return setTimeout( jQuery.ready, 1 ); - } - - // Mozilla, Opera and webkit nightlies currently support this event - if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", jQuery.ready, false ); - - // If IE event model is used - } else if ( document.attachEvent ) { - // ensure firing before onload, - // maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", DOMContentLoaded ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", jQuery.ready ); - - // If IE and not a frame - // continually check to see if the document is ready - var toplevel = false; - - try { - toplevel = window.frameElement == null; - } catch(e) {} - - if ( document.documentElement.doScroll && toplevel ) { - doScrollCheck(); - } - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - // A crude way of determining if an object is a window - isWindow: function( obj ) { - return obj && typeof obj === "object" && "setInterval" in obj; - }, - - isNaN: function( obj ) { - return obj == null || !rdigit.test( obj ) || isNaN( obj ); - }, - - type: function( obj ) { - return obj == null ? - String( obj ) : - class2type[ toString.call(obj) ] || "object"; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - // Not own constructor property must be Object - if ( obj.constructor && - !hasOwn.call(obj, "constructor") && - !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - for ( var name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw msg; - }, - - parseJSON: function( data ) { - if ( typeof data !== "string" || !data ) { - return null; - } - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return (new Function( "return " + data ))(); - - } - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - // (xml & tmp used internally) - parseXML: function( data , xml , tmp ) { - - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - - tmp = xml.documentElement; - - if ( ! tmp || ! tmp.nodeName || tmp.nodeName === "parsererror" ) { - jQuery.error( "Invalid XML: " + data ); - } - - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && rnotwhite.test( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Converts a dashed string to camelCased string; - // Used by both the css and data modules - camelCase: function( string ) { - return string.replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); - }, - - // args is for internal usage only - each: function( object, callback, args ) { - var name, i = 0, - length = object.length, - isObj = length === undefined || jQuery.isFunction( object ); - - if ( args ) { - if ( isObj ) { - for ( name in object ) { - if ( callback.apply( object[ name ], args ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.apply( object[ i++ ], args ) === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isObj ) { - for ( name in object ) { - if ( callback.call( object[ name ], name, object[ name ] ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) { - break; - } - } - } - } - - return object; - }, - - // Use native String.trim function wherever possible - trim: trim ? - function( text ) { - return text == null ? - "" : - trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); - }, - - // results is for internal usage only - makeArray: function( array, results ) { - var ret = results || []; - - if ( array != null ) { - // The window, strings (and functions) also have 'length' - // The extra typeof function check is to prevent crashes - // in Safari 2 (See: #3039) - // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 - var type = jQuery.type( array ); - - if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { - push.call( ret, array ); - } else { - jQuery.merge( ret, array ); - } - } - - return ret; - }, - - inArray: function( elem, array ) { - - if ( indexOf ) { - return indexOf.call( array, elem ); - } - - for ( var i = 0, length = array.length; i < length; i++ ) { - if ( array[ i ] === elem ) { - return i; - } - } - - return -1; - }, - - merge: function( first, second ) { - var i = first.length, - j = 0; - - if ( typeof second.length === "number" ) { - for ( var l = second.length; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var ret = [], retVal; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( var i = 0, length = elems.length; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, key, ret = [], - i = 0, - length = elems.length, - // jquery objects are treated as arrays - isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( key in elems ) { - value = callback( elems[ key ], key, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return ret.concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - if ( typeof context === "string" ) { - var tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - var args = slice.call( arguments, 2 ), - proxy = function() { - return fn.apply( context, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; - - return proxy; - }, - - // Mutifunctional method to get and set values to a collection - // The value/s can optionally be executed if it's a function - access: function( elems, key, value, exec, fn, pass ) { - var length = elems.length; - - // Setting many attributes - if ( typeof key === "object" ) { - for ( var k in key ) { - jQuery.access( elems, k, key[k], exec, fn, value ); - } - return elems; - } - - // Setting one attribute - if ( value !== undefined ) { - // Optionally, function values get executed if exec is true - exec = !pass && exec && jQuery.isFunction(value); - - for ( var i = 0; i < length; i++ ) { - fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); - } - - return elems; - } - - // Getting an attribute - return length ? fn( elems[0], key ) : undefined; - }, - - now: function() { - return (new Date()).getTime(); - }, - - // Use of jQuery.browser is frowned upon. - // More details: http://docs.jquery.com/Utilities/jQuery.browser - uaMatch: function( ua ) { - ua = ua.toLowerCase(); - - var match = rwebkit.exec( ua ) || - ropera.exec( ua ) || - rmsie.exec( ua ) || - ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || - []; - - return { browser: match[1] || "", version: match[2] || "0" }; - }, - - sub: function() { - function jQuerySub( selector, context ) { - return new jQuerySub.fn.init( selector, context ); - } - jQuery.extend( true, jQuerySub, this ); - jQuerySub.superclass = this; - jQuerySub.fn = jQuerySub.prototype = this(); - jQuerySub.fn.constructor = jQuerySub; - jQuerySub.sub = this.sub; - jQuerySub.fn.init = function init( selector, context ) { - if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { - context = jQuerySub( context ); - } - - return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); - }; - jQuerySub.fn.init.prototype = jQuerySub.fn; - var rootjQuerySub = jQuerySub(document); - return jQuerySub; - }, - - browser: {} -}); - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -browserMatch = jQuery.uaMatch( userAgent ); -if ( browserMatch.browser ) { - jQuery.browser[ browserMatch.browser ] = true; - jQuery.browser.version = browserMatch.version; -} - -// Deprecated, use jQuery.browser.webkit instead -if ( jQuery.browser.webkit ) { - jQuery.browser.safari = true; -} - -// IE doesn't match non-breaking spaces with \s -if ( rnotwhite.test( "\xA0" ) ) { - trimLeft = /^[\s\xA0]+/; - trimRight = /[\s\xA0]+$/; -} - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); - -// Cleanup functions for the document ready method -if ( document.addEventListener ) { - DOMContentLoaded = function() { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - }; - -} else if ( document.attachEvent ) { - DOMContentLoaded = function() { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( document.readyState === "complete" ) { - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); - } - }; -} - -// The DOM ready check for Internet Explorer -function doScrollCheck() { - if ( jQuery.isReady ) { - return; - } - - try { - // If IE is used, use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - document.documentElement.doScroll("left"); - } catch(e) { - setTimeout( doScrollCheck, 1 ); - return; - } - - // and execute any waiting functions - jQuery.ready(); -} - -return jQuery; - -})(); - - -var // Promise methods - promiseMethods = "done fail isResolved isRejected promise then always pipe".split( " " ), - // Static reference to slice - sliceDeferred = [].slice; - -jQuery.extend({ - // Create a simple deferred (one callbacks list) - _Deferred: function() { - var // callbacks list - callbacks = [], - // stored [ context , args ] - fired, - // to avoid firing when already doing so - firing, - // flag to know if the deferred has been cancelled - cancelled, - // the deferred itself - deferred = { - - // done( f1, f2, ...) - done: function() { - if ( !cancelled ) { - var args = arguments, - i, - length, - elem, - type, - _fired; - if ( fired ) { - _fired = fired; - fired = 0; - } - for ( i = 0, length = args.length; i < length; i++ ) { - elem = args[ i ]; - type = jQuery.type( elem ); - if ( type === "array" ) { - deferred.done.apply( deferred, elem ); - } else if ( type === "function" ) { - callbacks.push( elem ); - } - } - if ( _fired ) { - deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] ); - } - } - return this; - }, - - // resolve with given context and args - resolveWith: function( context, args ) { - if ( !cancelled && !fired && !firing ) { - // make sure args are available (#8421) - args = args || []; - firing = 1; - try { - while( callbacks[ 0 ] ) { - callbacks.shift().apply( context, args ); - } - } - finally { - fired = [ context, args ]; - firing = 0; - } - } - return this; - }, - - // resolve with this as context and given arguments - resolve: function() { - deferred.resolveWith( this, arguments ); - return this; - }, - - // Has this deferred been resolved? - isResolved: function() { - return !!( firing || fired ); - }, - - // Cancel - cancel: function() { - cancelled = 1; - callbacks = []; - return this; - } - }; - - return deferred; - }, - - // Full fledged deferred (two callbacks list) - Deferred: function( func ) { - var deferred = jQuery._Deferred(), - failDeferred = jQuery._Deferred(), - promise; - // Add errorDeferred methods, then and promise - jQuery.extend( deferred, { - then: function( doneCallbacks, failCallbacks ) { - deferred.done( doneCallbacks ).fail( failCallbacks ); - return this; - }, - always: function() { - return deferred.done.apply( deferred, arguments ).fail.apply( this, arguments ); - }, - fail: failDeferred.done, - rejectWith: failDeferred.resolveWith, - reject: failDeferred.resolve, - isRejected: failDeferred.isResolved, - pipe: function( fnDone, fnFail ) { - return jQuery.Deferred(function( newDefer ) { - jQuery.each( { - done: [ fnDone, "resolve" ], - fail: [ fnFail, "reject" ] - }, function( handler, data ) { - var fn = data[ 0 ], - action = data[ 1 ], - returned; - if ( jQuery.isFunction( fn ) ) { - deferred[ handler ](function() { - returned = fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise().then( newDefer.resolve, newDefer.reject ); - } else { - newDefer[ action ]( returned ); - } - }); - } else { - deferred[ handler ]( newDefer[ action ] ); - } - }); - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - if ( obj == null ) { - if ( promise ) { - return promise; - } - promise = obj = {}; - } - var i = promiseMethods.length; - while( i-- ) { - obj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ]; - } - return obj; - } - }); - // Make sure only one callback list will be used - deferred.done( failDeferred.cancel ).fail( deferred.cancel ); - // Unexpose cancel - delete deferred.cancel; - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - return deferred; - }, - - // Deferred helper - when: function( firstParam ) { - var args = arguments, - i = 0, - length = args.length, - count = length, - deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? - firstParam : - jQuery.Deferred(); - function resolveFunc( i ) { - return function( value ) { - args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; - if ( !( --count ) ) { - // Strange bug in FF4: - // Values changed onto the arguments object sometimes end up as undefined values - // outside the $.when method. Cloning the object into a fresh array solves the issue - deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) ); - } - }; - } - if ( length > 1 ) { - for( ; i < length; i++ ) { - if ( args[ i ] && jQuery.isFunction( args[ i ].promise ) ) { - args[ i ].promise().then( resolveFunc(i), deferred.reject ); - } else { - --count; - } - } - if ( !count ) { - deferred.resolveWith( deferred, args ); - } - } else if ( deferred !== firstParam ) { - deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); - } - return deferred.promise(); - } -}); - - - -jQuery.support = (function() { - - var div = document.createElement( "div" ), - documentElement = document.documentElement, - all, - a, - select, - opt, - input, - marginDiv, - support, - fragment, - body, - testElementParent, - testElement, - testElementStyle, - tds, - events, - eventName, - i, - isSupported; - - // Preliminary tests - div.setAttribute("className", "t"); - div.innerHTML = "
    a"; - - all = div.getElementsByTagName( "*" ); - a = div.getElementsByTagName( "a" )[ 0 ]; - - // Can't get basic test support - if ( !all || !all.length || !a ) { - return {}; - } - - // First batch of supports tests - select = document.createElement( "select" ); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName( "input" )[ 0 ]; - - support = { - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: ( div.firstChild.nodeType === 3 ), - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName( "tbody" ).length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName( "link" ).length, - - // Get the style information from getAttribute - // (IE uses .cssText instead) - style: /top/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: ( a.getAttribute( "href" ) === "/a" ), - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.55$/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Make sure that if no value is specified for a checkbox - // that it defaults to "on". - // (WebKit defaults to "" instead) - checkOn: ( input.value === "on" ), - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - getSetAttribute: div.className !== "t", - - // Will be defined later - submitBubbles: true, - changeBubbles: true, - focusinBubbles: false, - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true - }; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Test to see if it's possible to delete an expando from an element - // Fails in Internet Explorer - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { - div.attachEvent( "onclick", function() { - // Cloning a node shouldn't copy over any - // bound event handlers (IE does this) - support.noCloneEvent = false; - }); - div.cloneNode( true ).fireEvent( "onclick" ); - } - - // Check if a radio maintains it's value - // after being appended to the DOM - input = document.createElement("input"); - input.value = "t"; - input.setAttribute("type", "radio"); - support.radioValue = input.value === "t"; - - input.setAttribute("checked", "checked"); - div.appendChild( input ); - fragment = document.createDocumentFragment(); - fragment.appendChild( div.firstChild ); - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - div.innerHTML = ""; - - // Figure out if the W3C box model works as expected - div.style.width = div.style.paddingLeft = "1px"; - - body = document.getElementsByTagName( "body" )[ 0 ]; - // We use our own, invisible, body unless the body is already present - // in which case we use a div (#9239) - testElement = document.createElement( body ? "div" : "body" ); - testElementStyle = { - visibility: "hidden", - width: 0, - height: 0, - border: 0, - margin: 0 - }; - if ( body ) { - jQuery.extend( testElementStyle, { - position: "absolute", - left: -1000, - top: -1000 - }); - } - for ( i in testElementStyle ) { - testElement.style[ i ] = testElementStyle[ i ]; - } - testElement.appendChild( div ); - testElementParent = body || documentElement; - testElementParent.insertBefore( testElement, testElementParent.firstChild ); - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - support.boxModel = div.offsetWidth === 2; - - if ( "zoom" in div.style ) { - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - // (IE < 8 does this) - div.style.display = "inline"; - div.style.zoom = 1; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 ); - - // Check if elements with layout shrink-wrap their children - // (IE 6 does this) - div.style.display = ""; - div.innerHTML = "
    "; - support.shrinkWrapBlocks = ( div.offsetWidth !== 2 ); - } - - div.innerHTML = "
    t
    "; - tds = div.getElementsByTagName( "td" ); - - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - // (only IE 8 fails this test) - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Check if empty table cells still have offsetWidth/Height - // (IE < 8 fail this test) - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - div.innerHTML = ""; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. For more - // info see bug #3333 - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - if ( document.defaultView && document.defaultView.getComputedStyle ) { - marginDiv = document.createElement( "div" ); - marginDiv.style.width = "0"; - marginDiv.style.marginRight = "0"; - div.appendChild( marginDiv ); - support.reliableMarginRight = - ( parseInt( ( document.defaultView.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0; - } - - // Remove the body element we added - testElement.innerHTML = ""; - testElementParent.removeChild( testElement ); - - // Technique from Juriy Zaytsev - // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/ - // We only care about the case where non-standard event systems - // are used, namely in IE. Short-circuiting here helps us to - // avoid an eval call (in setAttribute) which can cause CSP - // to go haywire. See: https://developer.mozilla.org/en/Security/CSP - if ( div.attachEvent ) { - for( i in { - submit: 1, - change: 1, - focusin: 1 - } ) { - eventName = "on" + i; - isSupported = ( eventName in div ); - if ( !isSupported ) { - div.setAttribute( eventName, "return;" ); - isSupported = ( typeof div[ eventName ] === "function" ); - } - support[ i + "Bubbles" ] = isSupported; - } - } - - // Null connected elements to avoid leaks in IE - testElement = fragment = select = opt = body = marginDiv = div = input = null; - - return support; -})(); - -// Keep track of boxModel -jQuery.boxModel = jQuery.support.boxModel; - - - - -var rbrace = /^(?:\{.*\}|\[.*\])$/, - rmultiDash = /([a-z])([A-Z])/g; - -jQuery.extend({ - cache: {}, - - // Please use with caution - uuid: 0, - - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var internalKey = jQuery.expando, getByName = typeof name === "string", thisCache, - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || (pvt && id && !cache[ id ][ internalKey ])) && getByName && data === undefined ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ jQuery.expando ] = id = ++jQuery.uuid; - } else { - id = jQuery.expando; - } - } - - if ( !cache[ id ] ) { - cache[ id ] = {}; - - // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery - // metadata on plain JS objects when the object is serialized using - // JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name); - } else { - cache[ id ] = jQuery.extend(cache[ id ], name); - } - } - - thisCache = cache[ id ]; - - // Internal jQuery data is stored in a separate object inside the object's data - // cache in order to avoid key collisions between internal data and user-defined - // data - if ( pvt ) { - if ( !thisCache[ internalKey ] ) { - thisCache[ internalKey ] = {}; - } - - thisCache = thisCache[ internalKey ]; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should - // not attempt to inspect the internal events object using jQuery.data, as this - // internal data object is undocumented and subject to change. - if ( name === "events" && !thisCache[name] ) { - return thisCache[ internalKey ] && thisCache[ internalKey ].events; - } - - return getByName ? - // Check for both converted-to-camel and non-converted data property names - thisCache[ jQuery.camelCase( name ) ] || thisCache[ name ] : - thisCache; - }, - - removeData: function( elem, name, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var internalKey = jQuery.expando, isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - - // See jQuery.data for more information - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - var thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ]; - - if ( thisCache ) { - delete thisCache[ name ]; - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !isEmptyDataObject(thisCache) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( pvt ) { - delete cache[ id ][ internalKey ]; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject(cache[ id ]) ) { - return; - } - } - - var internalCache = cache[ id ][ internalKey ]; - - // Browsers that fail expando deletion also refuse to delete expandos on - // the window, but it will allow it on all other JS objects; other browsers - // don't care - if ( jQuery.support.deleteExpando || cache != window ) { - delete cache[ id ]; - } else { - cache[ id ] = null; - } - - // We destroyed the entire user cache at once because it's faster than - // iterating through each key, but we need to continue to persist internal - // data if it existed - if ( internalCache ) { - cache[ id ] = {}; - // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery - // metadata on plain JS objects when the object is serialized using - // JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - - cache[ id ][ internalKey ] = internalCache; - - // Otherwise, we need to eliminate the expando on the node to avoid - // false lookups in the cache for entries that no longer exist - } else if ( isNode ) { - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( jQuery.support.deleteExpando ) { - delete elem[ jQuery.expando ]; - } else if ( elem.removeAttribute ) { - elem.removeAttribute( jQuery.expando ); - } else { - elem[ jQuery.expando ] = null; - } - } - }, - - // For internal use only. - _data: function( elem, name, data ) { - return jQuery.data( elem, name, data, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - if ( elem.nodeName ) { - var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; - - if ( match ) { - return !(match === true || elem.getAttribute("classid") !== match); - } - } - - return true; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var data = null; - - if ( typeof key === "undefined" ) { - if ( this.length ) { - data = jQuery.data( this[0] ); - - if ( this[0].nodeType === 1 ) { - var attr = this[0].attributes, name; - for ( var i = 0, l = attr.length; i < l; i++ ) { - name = attr[i].name; - - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.substring(5) ); - - dataAttr( this[0], name, data[ name ] ); - } - } - } - } - - return data; - - } else if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - var parts = key.split("."); - parts[1] = parts[1] ? "." + parts[1] : ""; - - if ( value === undefined ) { - data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); - - // Try to fetch any internally stored data first - if ( data === undefined && this.length ) { - data = jQuery.data( this[0], key ); - data = dataAttr( this[0], key, data ); - } - - return data === undefined && parts[1] ? - this.data( parts[0] ) : - data; - - } else { - return this.each(function() { - var $this = jQuery( this ), - args = [ parts[0], value ]; - - $this.triggerHandler( "setData" + parts[1] + "!", args ); - jQuery.data( this, key, value ); - $this.triggerHandler( "changeData" + parts[1] + "!", args ); - }); - } - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - var name = "data-" + key.replace( rmultiDash, "$1-$2" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - !jQuery.isNaN( data ) ? parseFloat( data ) : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// TODO: This is a hack for 1.5 ONLY to allow objects with a single toJSON -// property to be considered empty objects; this property always exists in -// order to make sure JSON.stringify does not expose internal metadata -function isEmptyDataObject( obj ) { - for ( var name in obj ) { - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} - - - - -function handleQueueMarkDefer( elem, type, src ) { - var deferDataKey = type + "defer", - queueDataKey = type + "queue", - markDataKey = type + "mark", - defer = jQuery.data( elem, deferDataKey, undefined, true ); - if ( defer && - ( src === "queue" || !jQuery.data( elem, queueDataKey, undefined, true ) ) && - ( src === "mark" || !jQuery.data( elem, markDataKey, undefined, true ) ) ) { - // Give room for hard-coded callbacks to fire first - // and eventually mark/queue something else on the element - setTimeout( function() { - if ( !jQuery.data( elem, queueDataKey, undefined, true ) && - !jQuery.data( elem, markDataKey, undefined, true ) ) { - jQuery.removeData( elem, deferDataKey, true ); - defer.resolve(); - } - }, 0 ); - } -} - -jQuery.extend({ - - _mark: function( elem, type ) { - if ( elem ) { - type = (type || "fx") + "mark"; - jQuery.data( elem, type, (jQuery.data(elem,type,undefined,true) || 0) + 1, true ); - } - }, - - _unmark: function( force, elem, type ) { - if ( force !== true ) { - type = elem; - elem = force; - force = false; - } - if ( elem ) { - type = type || "fx"; - var key = type + "mark", - count = force ? 0 : ( (jQuery.data( elem, key, undefined, true) || 1 ) - 1 ); - if ( count ) { - jQuery.data( elem, key, count, true ); - } else { - jQuery.removeData( elem, key, true ); - handleQueueMarkDefer( elem, type, "mark" ); - } - } - }, - - queue: function( elem, type, data ) { - if ( elem ) { - type = (type || "fx") + "queue"; - var q = jQuery.data( elem, type, undefined, true ); - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !q || jQuery.isArray(data) ) { - q = jQuery.data( elem, type, jQuery.makeArray(data), true ); - } else { - q.push( data ); - } - } - return q || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - fn = queue.shift(), - defer; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - } - - if ( fn ) { - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift("inprogress"); - } - - fn.call(elem, function() { - jQuery.dequeue(elem, type); - }); - } - - if ( !queue.length ) { - jQuery.removeData( elem, type + "queue", true ); - handleQueueMarkDefer( elem, type, "queue" ); - } - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - } - - if ( data === undefined ) { - return jQuery.queue( this[0], type ); - } - return this.each(function() { - var queue = jQuery.queue( this, type, data ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; - type = type || "fx"; - - return this.queue( type, function() { - var elem = this; - setTimeout(function() { - jQuery.dequeue( elem, type ); - }, time ); - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, object ) { - if ( typeof type !== "string" ) { - object = type; - type = undefined; - } - type = type || "fx"; - var defer = jQuery.Deferred(), - elements = this, - i = elements.length, - count = 1, - deferDataKey = type + "defer", - queueDataKey = type + "queue", - markDataKey = type + "mark", - tmp; - function resolve() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - } - while( i-- ) { - if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) || - ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) || - jQuery.data( elements[ i ], markDataKey, undefined, true ) ) && - jQuery.data( elements[ i ], deferDataKey, jQuery._Deferred(), true ) )) { - count++; - tmp.done( resolve ); - } - } - resolve(); - return defer.promise(); - } -}); - - - - -var rclass = /[\n\t\r]/g, - rspace = /\s+/, - rreturn = /\r/g, - rtype = /^(?:button|input)$/i, - rfocusable = /^(?:button|input|object|select|textarea)$/i, - rclickable = /^a(?:rea)?$/i, - rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, - rinvalidChar = /\:|^on/, - formHook, boolHook; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, name, value, true, jQuery.attr ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, name, value, true, jQuery.prop ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classNames, i, l, elem, - setClass, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call(this, j, this.className) ); - }); - } - - if ( value && typeof value === "string" ) { - classNames = value.split( rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 ) { - if ( !elem.className && classNames.length === 1 ) { - elem.className = value; - - } else { - setClass = " " + elem.className + " "; - - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { - setClass += classNames[ c ] + " "; - } - } - elem.className = jQuery.trim( setClass ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classNames, i, l, elem, className, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call(this, j, this.className) ); - }); - } - - if ( (value && typeof value === "string") || value === undefined ) { - classNames = (value || "").split( rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 && elem.className ) { - if ( value ) { - className = (" " + elem.className + " ").replace( rclass, " " ); - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - className = className.replace(" " + classNames[ c ] + " ", " "); - } - elem.className = jQuery.trim( className ); - - } else { - elem.className = ""; - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.split( rspace ); - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space seperated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - } else if ( type === "undefined" || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // toggle whole className - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " "; - for ( var i = 0, l = this.length; i < l; i++ ) { - if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var hooks, ret, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return undefined; - } - - var isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var self = jQuery(this), val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, self.val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - }, - select: { - get: function( elem ) { - var value, - index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type === "select-one"; - - // Nothing was selected - if ( index < 0 ) { - return null; - } - - // Loop through all the selected options - for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { - var option = options[ i ]; - - // Don't return options that are disabled or in a disabled optgroup - if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && - (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - // Fixes Bug #2551 -- select.val() broken in IE after form.reset() - if ( one && !values.length && options.length ) { - return jQuery( options[ index ] ).val(); - } - - return values; - }, - - set: function( elem, value ) { - var values = jQuery.makeArray( value ); - - jQuery(elem).find("option").each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - attrFn: { - val: true, - css: true, - html: true, - text: true, - data: true, - width: true, - height: true, - offset: true - }, - - attrFix: { - // Always normalize to ensure hook usage - tabindex: "tabIndex" - }, - - attr: function( elem, name, value, pass ) { - var nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return undefined; - } - - if ( pass && name in jQuery.attrFn ) { - return jQuery( elem )[ name ]( value ); - } - - // Fallback to prop when attributes are not supported - if ( !("getAttribute" in elem) ) { - return jQuery.prop( elem, name, value ); - } - - var ret, hooks, - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - // Normalize the name if needed - if ( notxml ) { - name = jQuery.attrFix[ name ] || name; - - hooks = jQuery.attrHooks[ name ]; - - if ( !hooks ) { - // Use boolHook for boolean attributes - if ( rboolean.test( name ) ) { - - hooks = boolHook; - - // Use formHook for forms and if the name contains certain characters - } else if ( formHook && name !== "className" && - (jQuery.nodeName( elem, "form" ) || rinvalidChar.test( name )) ) { - - hooks = formHook; - } - } - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return undefined; - - } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, "" + value ); - return value; - } - - } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - - ret = elem.getAttribute( name ); - - // Non-existent attributes return null, we normalize to undefined - return ret === null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, name ) { - var propName; - if ( elem.nodeType === 1 ) { - name = jQuery.attrFix[ name ] || name; - - if ( jQuery.support.getSetAttribute ) { - // Use removeAttribute in browsers that support it - elem.removeAttribute( name ); - } else { - jQuery.attr( elem, name, "" ); - elem.removeAttributeNode( elem.getAttributeNode( name ) ); - } - - // Set corresponding property to false for boolean attributes - if ( rboolean.test( name ) && (propName = jQuery.propFix[ name ] || name) in elem ) { - elem[ propName ] = false; - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - // We can't allow the type property to be changed (since it causes problems in IE) - if ( rtype.test( elem.nodeName ) && elem.parentNode ) { - jQuery.error( "type property can't be changed" ); - } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to it's default in case type is set after value - // This is for element creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - }, - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - var attributeNode = elem.getAttributeNode("tabIndex"); - - return attributeNode && attributeNode.specified ? - parseInt( attributeNode.value, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - }, - // Use the value property for back compat - // Use the formHook for button elements in IE6/7 (#1954) - value: { - get: function( elem, name ) { - if ( formHook && jQuery.nodeName( elem, "button" ) ) { - return formHook.get( elem, name ); - } - return name in elem ? - elem.value : - null; - }, - set: function( elem, value, name ) { - if ( formHook && jQuery.nodeName( elem, "button" ) ) { - return formHook.set( elem, value, name ); - } - // Does not return so that setAttribute is also used - elem.value = value; - } - } - }, - - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - - prop: function( elem, name, value ) { - var nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return undefined; - } - - var ret, hooks, - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - return (elem[ name ] = value); - } - - } else { - if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== undefined ) { - return ret; - - } else { - return elem[ name ]; - } - } - }, - - propHooks: {} -}); - -// Hook for boolean attributes -boolHook = { - get: function( elem, name ) { - // Align boolean attributes with corresponding properties - return jQuery.prop( elem, name ) ? - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - var propName; - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - // value is true since we know at this point it's type boolean and not false - // Set boolean attributes to the same name and set the DOM property - propName = jQuery.propFix[ name ] || name; - if ( propName in elem ) { - // Only set the IDL specifically if it already exists on the element - elem[ propName ] = true; - } - - elem.setAttribute( name, name.toLowerCase() ); - } - return name; - } -}; - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !jQuery.support.getSetAttribute ) { - - // propFix is more comprehensive and contains all fixes - jQuery.attrFix = jQuery.propFix; - - // Use this for any attribute on a form in IE6/7 - formHook = jQuery.attrHooks.name = jQuery.attrHooks.title = jQuery.valHooks.button = { - get: function( elem, name ) { - var ret; - ret = elem.getAttributeNode( name ); - // Return undefined if nodeValue is empty string - return ret && ret.nodeValue !== "" ? - ret.nodeValue : - undefined; - }, - set: function( elem, value, name ) { - // Check form objects in IE (multiple bugs related) - // Only use nodeValue if the attribute node exists on the form - var ret = elem.getAttributeNode( name ); - if ( ret ) { - ret.nodeValue = value; - return value; - } - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }); - }); -} - - -// Some attributes require a special call on IE -if ( !jQuery.support.hrefNormalized ) { - jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - get: function( elem ) { - var ret = elem.getAttribute( name, 2 ); - return ret === null ? undefined : ret; - } - }); - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Normalize to lowercase since IE uppercases css property names - return elem.style.cssText.toLowerCase() || undefined; - }, - set: function( elem, value ) { - return (elem.style.cssText = "" + value); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - } - }); -} - -// Radios and checkboxes getter/setter -if ( !jQuery.support.checkOn ) { - jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - get: function( elem ) { - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); -} -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return (elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0); - } - } - }); -}); - - - - -var rnamespaces = /\.(.*)$/, - rformElems = /^(?:textarea|input|select)$/i, - rperiod = /\./g, - rspaces = / /g, - rescape = /[^\w\s.|`]/g, - fcleanup = function( nm ) { - return nm.replace(rescape, "\\$&"); - }; - -/* - * A number of helper functions used for managing events. - * Many of the ideas behind this code originated from - * Dean Edwards' addEvent library. - */ -jQuery.event = { - - // Bind an event to an element - // Original by Dean Edwards - add: function( elem, types, handler, data ) { - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - if ( handler === false ) { - handler = returnFalse; - } else if ( !handler ) { - // Fixes bug #7229. Fix recommended by jdalton - return; - } - - var handleObjIn, handleObj; - - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - } - - // Make sure that the function being executed has a unique ID - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure - var elemData = jQuery._data( elem ); - - // If no elemData is found then we must be trying to bind to one of the - // banned noData elements - if ( !elemData ) { - return; - } - - var events = elemData.events, - eventHandle = elemData.handle; - - if ( !events ) { - elemData.events = events = {}; - } - - if ( !eventHandle ) { - elemData.handle = eventHandle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.handle.apply( eventHandle.elem, arguments ) : - undefined; - }; - } - - // Add elem as a property of the handle function - // This is to prevent a memory leak with non-native events in IE. - eventHandle.elem = elem; - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = types.split(" "); - - var type, i = 0, namespaces; - - while ( (type = types[ i++ ]) ) { - handleObj = handleObjIn ? - jQuery.extend({}, handleObjIn) : - { handler: handler, data: data }; - - // Namespaced event handlers - if ( type.indexOf(".") > -1 ) { - namespaces = type.split("."); - type = namespaces.shift(); - handleObj.namespace = namespaces.slice(0).sort().join("."); - - } else { - namespaces = []; - handleObj.namespace = ""; - } - - handleObj.type = type; - if ( !handleObj.guid ) { - handleObj.guid = handler.guid; - } - - // Get the current list of functions bound to this event - var handlers = events[ type ], - special = jQuery.event.special[ type ] || {}; - - // Init the event handler queue - if ( !handlers ) { - handlers = events[ type ] = []; - - // Check for a special event handler - // Only use addEventListener/attachEvent if the special - // events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add the function to the element's handler list - handlers.push( handleObj ); - - // Keep track of which events have been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - global: {}, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, pos ) { - // don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - if ( handler === false ) { - handler = returnFalse; - } - - var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ), - events = elemData && elemData.events; - - if ( !elemData || !events ) { - return; - } - - // types is actually an event object here - if ( types && types.type ) { - handler = types.handler; - types = types.type; - } - - // Unbind all events for the element - if ( !types || typeof types === "string" && types.charAt(0) === "." ) { - types = types || ""; - - for ( type in events ) { - jQuery.event.remove( elem, type + types ); - } - - return; - } - - // Handle multiple events separated by a space - // jQuery(...).unbind("mouseover mouseout", fn); - types = types.split(" "); - - while ( (type = types[ i++ ]) ) { - origType = type; - handleObj = null; - all = type.indexOf(".") < 0; - namespaces = []; - - if ( !all ) { - // Namespaced event handlers - namespaces = type.split("."); - type = namespaces.shift(); - - namespace = new RegExp("(^|\\.)" + - jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)"); - } - - eventType = events[ type ]; - - if ( !eventType ) { - continue; - } - - if ( !handler ) { - for ( j = 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( all || namespace.test( handleObj.namespace ) ) { - jQuery.event.remove( elem, origType, handleObj.handler, j ); - eventType.splice( j--, 1 ); - } - } - - continue; - } - - special = jQuery.event.special[ type ] || {}; - - for ( j = pos || 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( handler.guid === handleObj.guid ) { - // remove the given handler for the given type - if ( all || namespace.test( handleObj.namespace ) ) { - if ( pos == null ) { - eventType.splice( j--, 1 ); - } - - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - - if ( pos != null ) { - break; - } - } - } - - // remove generic event handler if no more handlers exist - if ( eventType.length === 0 || pos != null && eventType.length === 1 ) { - if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - ret = null; - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - var handle = elemData.handle; - if ( handle ) { - handle.elem = null; - } - - delete elemData.events; - delete elemData.handle; - - if ( jQuery.isEmptyObject( elemData ) ) { - jQuery.removeData( elem, undefined, true ); - } - } - }, - - // Events that are safe to short-circuit if no handlers are attached. - // Native DOM events should not be added, they may have inline handlers. - customEvent: { - "getData": true, - "setData": true, - "changeData": true - }, - - trigger: function( event, data, elem, onlyHandlers ) { - // Event object or event type - var type = event.type || event, - namespaces = [], - exclusive; - - if ( type.indexOf("!") >= 0 ) { - // Exclusive events trigger only for the exact event (no namespaces) - type = type.slice(0, -1); - exclusive = true; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - - if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { - // No jQuery handlers for this event type, and it can't have inline handlers - return; - } - - // Caller can pass in an Event, Object, or just an event type string - event = typeof event === "object" ? - // jQuery.Event object - event[ jQuery.expando ] ? event : - // Object literal - new jQuery.Event( type, event ) : - // Just the event type (string) - new jQuery.Event( type ); - - event.type = type; - event.exclusive = exclusive; - event.namespace = namespaces.join("."); - event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)"); - - // triggerHandler() and global events don't bubble or run the default action - if ( onlyHandlers || !elem ) { - event.preventDefault(); - event.stopPropagation(); - } - - // Handle a global trigger - if ( !elem ) { - // TODO: Stop taunting the data cache; remove global events and always attach to document - jQuery.each( jQuery.cache, function() { - // internalKey variable is just used to make it easier to find - // and potentially change this stuff later; currently it just - // points to jQuery.expando - var internalKey = jQuery.expando, - internalCache = this[ internalKey ]; - if ( internalCache && internalCache.events && internalCache.events[ type ] ) { - jQuery.event.trigger( event, data, internalCache.handle.elem ); - } - }); - return; - } - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // Clean up the event in case it is being reused - event.result = undefined; - event.target = elem; - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data != null ? jQuery.makeArray( data ) : []; - data.unshift( event ); - - var cur = elem, - // IE doesn't like method names with a colon (#3533, #8272) - ontype = type.indexOf(":") < 0 ? "on" + type : ""; - - // Fire event on the current element, then bubble up the DOM tree - do { - var handle = jQuery._data( cur, "handle" ); - - event.currentTarget = cur; - if ( handle ) { - handle.apply( cur, data ); - } - - // Trigger an inline bound script - if ( ontype && jQuery.acceptData( cur ) && cur[ ontype ] && cur[ ontype ].apply( cur, data ) === false ) { - event.result = false; - event.preventDefault(); - } - - // Bubble up to document, then to window - cur = cur.parentNode || cur.ownerDocument || cur === event.target.ownerDocument && window; - } while ( cur && !event.isPropagationStopped() ); - - // If nobody prevented the default action, do it now - if ( !event.isDefaultPrevented() ) { - var old, - special = jQuery.event.special[ type ] || {}; - - if ( (!special._default || special._default.call( elem.ownerDocument, event ) === false) && - !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction)() check here because IE6/7 fails that test. - // IE<9 dies on focus to hidden element (#1486), may want to revisit a try/catch. - try { - if ( ontype && elem[ type ] ) { - // Don't re-trigger an onFOO event when we call its FOO() method - old = elem[ ontype ]; - - if ( old ) { - elem[ ontype ] = null; - } - - jQuery.event.triggered = type; - elem[ type ](); - } - } catch ( ieError ) {} - - if ( old ) { - elem[ ontype ] = old; - } - - jQuery.event.triggered = undefined; - } - } - - return event.result; - }, - - handle: function( event ) { - event = jQuery.event.fix( event || window.event ); - // Snapshot the handlers list since a called handler may add/remove events. - var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []).slice(0), - run_all = !event.exclusive && !event.namespace, - args = Array.prototype.slice.call( arguments, 0 ); - - // Use the fix-ed Event rather than the (read-only) native event - args[0] = event; - event.currentTarget = this; - - for ( var j = 0, l = handlers.length; j < l; j++ ) { - var handleObj = handlers[ j ]; - - // Triggered event must 1) be non-exclusive and have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event. - if ( run_all || event.namespace_re.test( handleObj.namespace ) ) { - // Pass in a reference to the handler function itself - // So that we can later remove it - event.handler = handleObj.handler; - event.data = handleObj.data; - event.handleObj = handleObj; - - var ret = handleObj.handler.apply( this, args ); - - if ( ret !== undefined ) { - event.result = ret; - if ( ret === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - - if ( event.isImmediatePropagationStopped() ) { - break; - } - } - } - return event.result; - }, - - props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // store a copy of the original event object - // and "clone" to set read-only properties - var originalEvent = event; - event = jQuery.Event( originalEvent ); - - for ( var i = this.props.length, prop; i; ) { - prop = this.props[ --i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Fix target property, if necessary - if ( !event.target ) { - // Fixes #1925 where srcElement might not be defined either - event.target = event.srcElement || document; - } - - // check if target is a textnode (safari) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && event.fromElement ) { - event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement; - } - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && event.clientX != null ) { - var eventDocument = event.target.ownerDocument || document, - doc = eventDocument.documentElement, - body = eventDocument.body; - - event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); - event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); - } - - // Add which for key events - if ( event.which == null && (event.charCode != null || event.keyCode != null) ) { - event.which = event.charCode != null ? event.charCode : event.keyCode; - } - - // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) - if ( !event.metaKey && event.ctrlKey ) { - event.metaKey = event.ctrlKey; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && event.button !== undefined ) { - event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); - } - - return event; - }, - - // Deprecated, use jQuery.guid instead - guid: 1E8, - - // Deprecated, use jQuery.proxy instead - proxy: jQuery.proxy, - - special: { - ready: { - // Make sure the ready event is setup - setup: jQuery.bindReady, - teardown: jQuery.noop - }, - - live: { - add: function( handleObj ) { - jQuery.event.add( this, - liveConvert( handleObj.origType, handleObj.selector ), - jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) ); - }, - - remove: function( handleObj ) { - jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj ); - } - }, - - beforeunload: { - setup: function( data, namespaces, eventHandle ) { - // We only want to do this special case on windows - if ( jQuery.isWindow( this ) ) { - this.onbeforeunload = eventHandle; - } - }, - - teardown: function( namespaces, eventHandle ) { - if ( this.onbeforeunload === eventHandle ) { - this.onbeforeunload = null; - } - } - } - } -}; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - if ( elem.detachEvent ) { - elem.detachEvent( "on" + type, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !this.preventDefault ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // timeStamp is buggy for some events on Firefox(#3843) - // So we won't rely on the native value - this.timeStamp = jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -function returnFalse() { - return false; -} -function returnTrue() { - return true; -} - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - preventDefault: function() { - this.isDefaultPrevented = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - - // if preventDefault exists run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // otherwise set the returnValue property of the original event to false (IE) - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - this.isPropagationStopped = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - // if stopPropagation exists run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - // otherwise set the cancelBubble property of the original event to true (IE) - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - }, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse -}; - -// Checks if an event happened on an element within another element -// Used in jQuery.event.special.mouseenter and mouseleave handlers -var withinElement = function( event ) { - - // Check if mouse(over|out) are still within the same parent element - var related = event.relatedTarget, - inside = false, - eventType = event.type; - - event.type = event.data; - - if ( related !== this ) { - - if ( related ) { - inside = jQuery.contains( this, related ); - } - - if ( !inside ) { - - jQuery.event.handle.apply( this, arguments ); - - event.type = eventType; - } - } -}, - -// In case of event delegation, we only need to rename the event.type, -// liveHandler will take care of the rest. -delegate = function( event ) { - event.type = event.data; - jQuery.event.handle.apply( this, arguments ); -}; - -// Create mouseenter and mouseleave events -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - setup: function( data ) { - jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig ); - }, - teardown: function( data ) { - jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement ); - } - }; -}); - -// submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function( data, namespaces ) { - if ( !jQuery.nodeName( this, "form" ) ) { - jQuery.event.add(this, "click.specialSubmit", function( e ) { - var elem = e.target, - type = elem.type; - - if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) { - trigger( "submit", this, arguments ); - } - }); - - jQuery.event.add(this, "keypress.specialSubmit", function( e ) { - var elem = e.target, - type = elem.type; - - if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) { - trigger( "submit", this, arguments ); - } - }); - - } else { - return false; - } - }, - - teardown: function( namespaces ) { - jQuery.event.remove( this, ".specialSubmit" ); - } - }; - -} - -// change delegation, happens here so we have bind. -if ( !jQuery.support.changeBubbles ) { - - var changeFilters, - - getVal = function( elem ) { - var type = elem.type, val = elem.value; - - if ( type === "radio" || type === "checkbox" ) { - val = elem.checked; - - } else if ( type === "select-multiple" ) { - val = elem.selectedIndex > -1 ? - jQuery.map( elem.options, function( elem ) { - return elem.selected; - }).join("-") : - ""; - - } else if ( jQuery.nodeName( elem, "select" ) ) { - val = elem.selectedIndex; - } - - return val; - }, - - testChange = function testChange( e ) { - var elem = e.target, data, val; - - if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) { - return; - } - - data = jQuery._data( elem, "_change_data" ); - val = getVal(elem); - - // the current data will be also retrieved by beforeactivate - if ( e.type !== "focusout" || elem.type !== "radio" ) { - jQuery._data( elem, "_change_data", val ); - } - - if ( data === undefined || val === data ) { - return; - } - - if ( data != null || val ) { - e.type = "change"; - e.liveFired = undefined; - jQuery.event.trigger( e, arguments[1], elem ); - } - }; - - jQuery.event.special.change = { - filters: { - focusout: testChange, - - beforedeactivate: testChange, - - click: function( e ) { - var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : ""; - - if ( type === "radio" || type === "checkbox" || jQuery.nodeName( elem, "select" ) ) { - testChange.call( this, e ); - } - }, - - // Change has to be called before submit - // Keydown will be called before keypress, which is used in submit-event delegation - keydown: function( e ) { - var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : ""; - - if ( (e.keyCode === 13 && !jQuery.nodeName( elem, "textarea" ) ) || - (e.keyCode === 32 && (type === "checkbox" || type === "radio")) || - type === "select-multiple" ) { - testChange.call( this, e ); - } - }, - - // Beforeactivate happens also before the previous element is blurred - // with this event you can't trigger a change event, but you can store - // information - beforeactivate: function( e ) { - var elem = e.target; - jQuery._data( elem, "_change_data", getVal(elem) ); - } - }, - - setup: function( data, namespaces ) { - if ( this.type === "file" ) { - return false; - } - - for ( var type in changeFilters ) { - jQuery.event.add( this, type + ".specialChange", changeFilters[type] ); - } - - return rformElems.test( this.nodeName ); - }, - - teardown: function( namespaces ) { - jQuery.event.remove( this, ".specialChange" ); - - return rformElems.test( this.nodeName ); - } - }; - - changeFilters = jQuery.event.special.change.filters; - - // Handle when the input is .focus()'d - changeFilters.focus = changeFilters.beforeactivate; -} - -function trigger( type, elem, args ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - // Don't pass args or remember liveFired; they apply to the donor event. - var event = jQuery.extend( {}, args[ 0 ] ); - event.type = type; - event.originalEvent = {}; - event.liveFired = undefined; - jQuery.event.handle.call( elem, event ); - if ( event.isDefaultPrevented() ) { - args[ 0 ].preventDefault(); - } -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - - function handler( donor ) { - // Donor event is always a native one; fix it and switch its type. - // Let focusin/out handler cancel the donor focus/blur event. - var e = jQuery.event.fix( donor ); - e.type = fix; - e.originalEvent = {}; - jQuery.event.trigger( e, null, e.target ); - if ( e.isDefaultPrevented() ) { - donor.preventDefault(); - } - } - }); -} - -jQuery.each(["bind", "one"], function( i, name ) { - jQuery.fn[ name ] = function( type, data, fn ) { - var handler; - - // Handle object literals - if ( typeof type === "object" ) { - for ( var key in type ) { - this[ name ](key, data, type[key], fn); - } - return this; - } - - if ( arguments.length === 2 || data === false ) { - fn = data; - data = undefined; - } - - if ( name === "one" ) { - handler = function( event ) { - jQuery( this ).unbind( event, handler ); - return fn.apply( this, arguments ); - }; - handler.guid = fn.guid || jQuery.guid++; - } else { - handler = fn; - } - - if ( type === "unload" && name !== "one" ) { - this.one( type, data, fn ); - - } else { - for ( var i = 0, l = this.length; i < l; i++ ) { - jQuery.event.add( this[i], type, handler, data ); - } - } - - return this; - }; -}); - -jQuery.fn.extend({ - unbind: function( type, fn ) { - // Handle object literals - if ( typeof type === "object" && !type.preventDefault ) { - for ( var key in type ) { - this.unbind(key, type[key]); - } - - } else { - for ( var i = 0, l = this.length; i < l; i++ ) { - jQuery.event.remove( this[i], type, fn ); - } - } - - return this; - }, - - delegate: function( selector, types, data, fn ) { - return this.live( types, data, fn, selector ); - }, - - undelegate: function( selector, types, fn ) { - if ( arguments.length === 0 ) { - return this.unbind( "live" ); - - } else { - return this.die( types, null, fn, selector ); - } - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - - triggerHandler: function( type, data ) { - if ( this[0] ) { - return jQuery.event.trigger( type, data, this[0], true ); - } - }, - - toggle: function( fn ) { - // Save reference to arguments for access in closure - var args = arguments, - guid = fn.guid || jQuery.guid++, - i = 0, - toggler = function( event ) { - // Figure out which function to execute - var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i; - jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 ); - - // Make sure that clicks stop - event.preventDefault(); - - // and execute the function - return args[ lastToggle ].apply( this, arguments ) || false; - }; - - // link all the functions, so any of them can unbind this click handler - toggler.guid = guid; - while ( i < args.length ) { - args[ i++ ].guid = guid; - } - - return this.click( toggler ); - }, - - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -}); - -var liveMap = { - focus: "focusin", - blur: "focusout", - mouseenter: "mouseover", - mouseleave: "mouseout" -}; - -jQuery.each(["live", "die"], function( i, name ) { - jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) { - var type, i = 0, match, namespaces, preType, - selector = origSelector || this.selector, - context = origSelector ? this : jQuery( this.context ); - - if ( typeof types === "object" && !types.preventDefault ) { - for ( var key in types ) { - context[ name ]( key, data, types[key], selector ); - } - - return this; - } - - if ( name === "die" && !types && - origSelector && origSelector.charAt(0) === "." ) { - - context.unbind( origSelector ); - - return this; - } - - if ( data === false || jQuery.isFunction( data ) ) { - fn = data || returnFalse; - data = undefined; - } - - types = (types || "").split(" "); - - while ( (type = types[ i++ ]) != null ) { - match = rnamespaces.exec( type ); - namespaces = ""; - - if ( match ) { - namespaces = match[0]; - type = type.replace( rnamespaces, "" ); - } - - if ( type === "hover" ) { - types.push( "mouseenter" + namespaces, "mouseleave" + namespaces ); - continue; - } - - preType = type; - - if ( liveMap[ type ] ) { - types.push( liveMap[ type ] + namespaces ); - type = type + namespaces; - - } else { - type = (liveMap[ type ] || type) + namespaces; - } - - if ( name === "live" ) { - // bind live handler - for ( var j = 0, l = context.length; j < l; j++ ) { - jQuery.event.add( context[j], "live." + liveConvert( type, selector ), - { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } ); - } - - } else { - // unbind live handler - context.unbind( "live." + liveConvert( type, selector ), fn ); - } - } - - return this; - }; -}); - -function liveHandler( event ) { - var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret, - elems = [], - selectors = [], - events = jQuery._data( this, "events" ); - - // Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911) - if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) { - return; - } - - if ( event.namespace ) { - namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)"); - } - - event.liveFired = this; - - var live = events.live.slice(0); - - for ( j = 0; j < live.length; j++ ) { - handleObj = live[j]; - - if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) { - selectors.push( handleObj.selector ); - - } else { - live.splice( j--, 1 ); - } - } - - match = jQuery( event.target ).closest( selectors, event.currentTarget ); - - for ( i = 0, l = match.length; i < l; i++ ) { - close = match[i]; - - for ( j = 0; j < live.length; j++ ) { - handleObj = live[j]; - - if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) && !close.elem.disabled ) { - elem = close.elem; - related = null; - - // Those two events require additional checking - if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) { - event.type = handleObj.preType; - related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0]; - - // Make sure not to accidentally match a child element with the same selector - if ( related && jQuery.contains( elem, related ) ) { - related = elem; - } - } - - if ( !related || related !== elem ) { - elems.push({ elem: elem, handleObj: handleObj, level: close.level }); - } - } - } - } - - for ( i = 0, l = elems.length; i < l; i++ ) { - match = elems[i]; - - if ( maxLevel && match.level > maxLevel ) { - break; - } - - event.currentTarget = match.elem; - event.data = match.handleObj.data; - event.handleObj = match.handleObj; - - ret = match.handleObj.origHandler.apply( match.elem, arguments ); - - if ( ret === false || event.isPropagationStopped() ) { - maxLevel = match.level; - - if ( ret === false ) { - stop = false; - } - if ( event.isImmediatePropagationStopped() ) { - break; - } - } - } - - return stop; -} - -function liveConvert( type, selector ) { - return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspaces, "&"); -} - -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error").split(" "), function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - if ( fn == null ) { - fn = data; - data = null; - } - - return arguments.length > 0 ? - this.bind( name, data, fn ) : - this.trigger( name ); - }; - - if ( jQuery.attrFn ) { - jQuery.attrFn[ name ] = true; - } -}); - - - -/*! - * Sizzle CSS Selector Engine - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){ - -var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, - done = 0, - toString = Object.prototype.toString, - hasDuplicate = false, - baseHasDuplicate = true, - rBackslash = /\\/g, - rNonWord = /\W/; - -// Here we check if the JavaScript engine is using some sort of -// optimization where it does not always call our comparision -// function. If that is the case, discard the hasDuplicate value. -// Thus far that includes Google Chrome. -[0, 0].sort(function() { - baseHasDuplicate = false; - return 0; -}); - -var Sizzle = function( selector, context, results, seed ) { - results = results || []; - context = context || document; - - var origContext = context; - - if ( context.nodeType !== 1 && context.nodeType !== 9 ) { - return []; - } - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - var m, set, checkSet, extra, ret, cur, pop, i, - prune = true, - contextXML = Sizzle.isXML( context ), - parts = [], - soFar = selector; - - // Reset the position of the chunker regexp (start from head) - do { - chunker.exec( "" ); - m = chunker.exec( soFar ); - - if ( m ) { - soFar = m[3]; - - parts.push( m[1] ); - - if ( m[2] ) { - extra = m[3]; - break; - } - } - } while ( m ); - - if ( parts.length > 1 && origPOS.exec( selector ) ) { - - if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { - set = posProcess( parts[0] + parts[1], context ); - - } else { - set = Expr.relative[ parts[0] ] ? - [ context ] : - Sizzle( parts.shift(), context ); - - while ( parts.length ) { - selector = parts.shift(); - - if ( Expr.relative[ selector ] ) { - selector += parts.shift(); - } - - set = posProcess( selector, set ); - } - } - - } else { - // Take a shortcut and set the context if the root selector is an ID - // (but not if it'll be faster if the inner selector is an ID) - if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && - Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { - - ret = Sizzle.find( parts.shift(), context, contextXML ); - context = ret.expr ? - Sizzle.filter( ret.expr, ret.set )[0] : - ret.set[0]; - } - - if ( context ) { - ret = seed ? - { expr: parts.pop(), set: makeArray(seed) } : - Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); - - set = ret.expr ? - Sizzle.filter( ret.expr, ret.set ) : - ret.set; - - if ( parts.length > 0 ) { - checkSet = makeArray( set ); - - } else { - prune = false; - } - - while ( parts.length ) { - cur = parts.pop(); - pop = cur; - - if ( !Expr.relative[ cur ] ) { - cur = ""; - } else { - pop = parts.pop(); - } - - if ( pop == null ) { - pop = context; - } - - Expr.relative[ cur ]( checkSet, pop, contextXML ); - } - - } else { - checkSet = parts = []; - } - } - - if ( !checkSet ) { - checkSet = set; - } - - if ( !checkSet ) { - Sizzle.error( cur || selector ); - } - - if ( toString.call(checkSet) === "[object Array]" ) { - if ( !prune ) { - results.push.apply( results, checkSet ); - - } else if ( context && context.nodeType === 1 ) { - for ( i = 0; checkSet[i] != null; i++ ) { - if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { - results.push( set[i] ); - } - } - - } else { - for ( i = 0; checkSet[i] != null; i++ ) { - if ( checkSet[i] && checkSet[i].nodeType === 1 ) { - results.push( set[i] ); - } - } - } - - } else { - makeArray( checkSet, results ); - } - - if ( extra ) { - Sizzle( extra, origContext, results, seed ); - Sizzle.uniqueSort( results ); - } - - return results; -}; - -Sizzle.uniqueSort = function( results ) { - if ( sortOrder ) { - hasDuplicate = baseHasDuplicate; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( var i = 1; i < results.length; i++ ) { - if ( results[i] === results[ i - 1 ] ) { - results.splice( i--, 1 ); - } - } - } - } - - return results; -}; - -Sizzle.matches = function( expr, set ) { - return Sizzle( expr, null, null, set ); -}; - -Sizzle.matchesSelector = function( node, expr ) { - return Sizzle( expr, null, null, [node] ).length > 0; -}; - -Sizzle.find = function( expr, context, isXML ) { - var set; - - if ( !expr ) { - return []; - } - - for ( var i = 0, l = Expr.order.length; i < l; i++ ) { - var match, - type = Expr.order[i]; - - if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { - var left = match[1]; - match.splice( 1, 1 ); - - if ( left.substr( left.length - 1 ) !== "\\" ) { - match[1] = (match[1] || "").replace( rBackslash, "" ); - set = Expr.find[ type ]( match, context, isXML ); - - if ( set != null ) { - expr = expr.replace( Expr.match[ type ], "" ); - break; - } - } - } - } - - if ( !set ) { - set = typeof context.getElementsByTagName !== "undefined" ? - context.getElementsByTagName( "*" ) : - []; - } - - return { set: set, expr: expr }; -}; - -Sizzle.filter = function( expr, set, inplace, not ) { - var match, anyFound, - old = expr, - result = [], - curLoop = set, - isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); - - while ( expr && set.length ) { - for ( var type in Expr.filter ) { - if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { - var found, item, - filter = Expr.filter[ type ], - left = match[1]; - - anyFound = false; - - match.splice(1,1); - - if ( left.substr( left.length - 1 ) === "\\" ) { - continue; - } - - if ( curLoop === result ) { - result = []; - } - - if ( Expr.preFilter[ type ] ) { - match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); - - if ( !match ) { - anyFound = found = true; - - } else if ( match === true ) { - continue; - } - } - - if ( match ) { - for ( var i = 0; (item = curLoop[i]) != null; i++ ) { - if ( item ) { - found = filter( item, match, i, curLoop ); - var pass = not ^ !!found; - - if ( inplace && found != null ) { - if ( pass ) { - anyFound = true; - - } else { - curLoop[i] = false; - } - - } else if ( pass ) { - result.push( item ); - anyFound = true; - } - } - } - } - - if ( found !== undefined ) { - if ( !inplace ) { - curLoop = result; - } - - expr = expr.replace( Expr.match[ type ], "" ); - - if ( !anyFound ) { - return []; - } - - break; - } - } - } - - // Improper expression - if ( expr === old ) { - if ( anyFound == null ) { - Sizzle.error( expr ); - - } else { - break; - } - } - - old = expr; - } - - return curLoop; -}; - -Sizzle.error = function( msg ) { - throw "Syntax error, unrecognized expression: " + msg; -}; - -var Expr = Sizzle.selectors = { - order: [ "ID", "NAME", "TAG" ], - - match: { - ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, - ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, - TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, - CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, - POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, - PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ - }, - - leftMatch: {}, - - attrMap: { - "class": "className", - "for": "htmlFor" - }, - - attrHandle: { - href: function( elem ) { - return elem.getAttribute( "href" ); - }, - type: function( elem ) { - return elem.getAttribute( "type" ); - } - }, - - relative: { - "+": function(checkSet, part){ - var isPartStr = typeof part === "string", - isTag = isPartStr && !rNonWord.test( part ), - isPartStrNotTag = isPartStr && !isTag; - - if ( isTag ) { - part = part.toLowerCase(); - } - - for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { - if ( (elem = checkSet[i]) ) { - while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} - - checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? - elem || false : - elem === part; - } - } - - if ( isPartStrNotTag ) { - Sizzle.filter( part, checkSet, true ); - } - }, - - ">": function( checkSet, part ) { - var elem, - isPartStr = typeof part === "string", - i = 0, - l = checkSet.length; - - if ( isPartStr && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - - for ( ; i < l; i++ ) { - elem = checkSet[i]; - - if ( elem ) { - var parent = elem.parentNode; - checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; - } - } - - } else { - for ( ; i < l; i++ ) { - elem = checkSet[i]; - - if ( elem ) { - checkSet[i] = isPartStr ? - elem.parentNode : - elem.parentNode === part; - } - } - - if ( isPartStr ) { - Sizzle.filter( part, checkSet, true ); - } - } - }, - - "": function(checkSet, part, isXML){ - var nodeCheck, - doneName = done++, - checkFn = dirCheck; - - if ( typeof part === "string" && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - - checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); - }, - - "~": function( checkSet, part, isXML ) { - var nodeCheck, - doneName = done++, - checkFn = dirCheck; - - if ( typeof part === "string" && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - - checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); - } - }, - - find: { - ID: function( match, context, isXML ) { - if ( typeof context.getElementById !== "undefined" && !isXML ) { - var m = context.getElementById(match[1]); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }, - - NAME: function( match, context ) { - if ( typeof context.getElementsByName !== "undefined" ) { - var ret = [], - results = context.getElementsByName( match[1] ); - - for ( var i = 0, l = results.length; i < l; i++ ) { - if ( results[i].getAttribute("name") === match[1] ) { - ret.push( results[i] ); - } - } - - return ret.length === 0 ? null : ret; - } - }, - - TAG: function( match, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( match[1] ); - } - } - }, - preFilter: { - CLASS: function( match, curLoop, inplace, result, not, isXML ) { - match = " " + match[1].replace( rBackslash, "" ) + " "; - - if ( isXML ) { - return match; - } - - for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { - if ( elem ) { - if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { - if ( !inplace ) { - result.push( elem ); - } - - } else if ( inplace ) { - curLoop[i] = false; - } - } - } - - return false; - }, - - ID: function( match ) { - return match[1].replace( rBackslash, "" ); - }, - - TAG: function( match, curLoop ) { - return match[1].replace( rBackslash, "" ).toLowerCase(); - }, - - CHILD: function( match ) { - if ( match[1] === "nth" ) { - if ( !match[2] ) { - Sizzle.error( match[0] ); - } - - match[2] = match[2].replace(/^\+|\s*/g, ''); - - // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' - var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( - match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || - !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); - - // calculate the numbers (first)n+(last) including if they are negative - match[2] = (test[1] + (test[2] || 1)) - 0; - match[3] = test[3] - 0; - } - else if ( match[2] ) { - Sizzle.error( match[0] ); - } - - // TODO: Move to normal caching system - match[0] = done++; - - return match; - }, - - ATTR: function( match, curLoop, inplace, result, not, isXML ) { - var name = match[1] = match[1].replace( rBackslash, "" ); - - if ( !isXML && Expr.attrMap[name] ) { - match[1] = Expr.attrMap[name]; - } - - // Handle if an un-quoted value was used - match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); - - if ( match[2] === "~=" ) { - match[4] = " " + match[4] + " "; - } - - return match; - }, - - PSEUDO: function( match, curLoop, inplace, result, not ) { - if ( match[1] === "not" ) { - // If we're dealing with a complex expression, or a simple one - if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { - match[3] = Sizzle(match[3], null, null, curLoop); - - } else { - var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); - - if ( !inplace ) { - result.push.apply( result, ret ); - } - - return false; - } - - } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { - return true; - } - - return match; - }, - - POS: function( match ) { - match.unshift( true ); - - return match; - } - }, - - filters: { - enabled: function( elem ) { - return elem.disabled === false && elem.type !== "hidden"; - }, - - disabled: function( elem ) { - return elem.disabled === true; - }, - - checked: function( elem ) { - return elem.checked === true; - }, - - selected: function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - parent: function( elem ) { - return !!elem.firstChild; - }, - - empty: function( elem ) { - return !elem.firstChild; - }, - - has: function( elem, i, match ) { - return !!Sizzle( match[3], elem ).length; - }, - - header: function( elem ) { - return (/h\d/i).test( elem.nodeName ); - }, - - text: function( elem ) { - var attr = elem.getAttribute( "type" ), type = elem.type; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); - }, - - radio: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; - }, - - checkbox: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; - }, - - file: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; - }, - - password: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; - }, - - submit: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && "submit" === elem.type; - }, - - image: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; - }, - - reset: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && "reset" === elem.type; - }, - - button: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && "button" === elem.type || name === "button"; - }, - - input: function( elem ) { - return (/input|select|textarea|button/i).test( elem.nodeName ); - }, - - focus: function( elem ) { - return elem === elem.ownerDocument.activeElement; - } - }, - setFilters: { - first: function( elem, i ) { - return i === 0; - }, - - last: function( elem, i, match, array ) { - return i === array.length - 1; - }, - - even: function( elem, i ) { - return i % 2 === 0; - }, - - odd: function( elem, i ) { - return i % 2 === 1; - }, - - lt: function( elem, i, match ) { - return i < match[3] - 0; - }, - - gt: function( elem, i, match ) { - return i > match[3] - 0; - }, - - nth: function( elem, i, match ) { - return match[3] - 0 === i; - }, - - eq: function( elem, i, match ) { - return match[3] - 0 === i; - } - }, - filter: { - PSEUDO: function( elem, match, i, array ) { - var name = match[1], - filter = Expr.filters[ name ]; - - if ( filter ) { - return filter( elem, i, match, array ); - - } else if ( name === "contains" ) { - return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0; - - } else if ( name === "not" ) { - var not = match[3]; - - for ( var j = 0, l = not.length; j < l; j++ ) { - if ( not[j] === elem ) { - return false; - } - } - - return true; - - } else { - Sizzle.error( name ); - } - }, - - CHILD: function( elem, match ) { - var type = match[1], - node = elem; - - switch ( type ) { - case "only": - case "first": - while ( (node = node.previousSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - if ( type === "first" ) { - return true; - } - - node = elem; - - case "last": - while ( (node = node.nextSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - return true; - - case "nth": - var first = match[2], - last = match[3]; - - if ( first === 1 && last === 0 ) { - return true; - } - - var doneName = match[0], - parent = elem.parentNode; - - if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { - var count = 0; - - for ( node = parent.firstChild; node; node = node.nextSibling ) { - if ( node.nodeType === 1 ) { - node.nodeIndex = ++count; - } - } - - parent.sizcache = doneName; - } - - var diff = elem.nodeIndex - last; - - if ( first === 0 ) { - return diff === 0; - - } else { - return ( diff % first === 0 && diff / first >= 0 ); - } - } - }, - - ID: function( elem, match ) { - return elem.nodeType === 1 && elem.getAttribute("id") === match; - }, - - TAG: function( elem, match ) { - return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match; - }, - - CLASS: function( elem, match ) { - return (" " + (elem.className || elem.getAttribute("class")) + " ") - .indexOf( match ) > -1; - }, - - ATTR: function( elem, match ) { - var name = match[1], - result = Expr.attrHandle[ name ] ? - Expr.attrHandle[ name ]( elem ) : - elem[ name ] != null ? - elem[ name ] : - elem.getAttribute( name ), - value = result + "", - type = match[2], - check = match[4]; - - return result == null ? - type === "!=" : - type === "=" ? - value === check : - type === "*=" ? - value.indexOf(check) >= 0 : - type === "~=" ? - (" " + value + " ").indexOf(check) >= 0 : - !check ? - value && result !== false : - type === "!=" ? - value !== check : - type === "^=" ? - value.indexOf(check) === 0 : - type === "$=" ? - value.substr(value.length - check.length) === check : - type === "|=" ? - value === check || value.substr(0, check.length + 1) === check + "-" : - false; - }, - - POS: function( elem, match, i, array ) { - var name = match[2], - filter = Expr.setFilters[ name ]; - - if ( filter ) { - return filter( elem, i, match, array ); - } - } - } -}; - -var origPOS = Expr.match.POS, - fescape = function(all, num){ - return "\\" + (num - 0 + 1); - }; - -for ( var type in Expr.match ) { - Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); - Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); -} - -var makeArray = function( array, results ) { - array = Array.prototype.slice.call( array, 0 ); - - if ( results ) { - results.push.apply( results, array ); - return results; - } - - return array; -}; - -// Perform a simple check to determine if the browser is capable of -// converting a NodeList to an array using builtin methods. -// Also verifies that the returned array holds DOM nodes -// (which is not the case in the Blackberry browser) -try { - Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; - -// Provide a fallback method if it does not work -} catch( e ) { - makeArray = function( array, results ) { - var i = 0, - ret = results || []; - - if ( toString.call(array) === "[object Array]" ) { - Array.prototype.push.apply( ret, array ); - - } else { - if ( typeof array.length === "number" ) { - for ( var l = array.length; i < l; i++ ) { - ret.push( array[i] ); - } - - } else { - for ( ; array[i]; i++ ) { - ret.push( array[i] ); - } - } - } - - return ret; - }; -} - -var sortOrder, siblingCheck; - -if ( document.documentElement.compareDocumentPosition ) { - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { - return a.compareDocumentPosition ? -1 : 1; - } - - return a.compareDocumentPosition(b) & 4 ? -1 : 1; - }; - -} else { - sortOrder = function( a, b ) { - // The nodes are identical, we can exit early - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Fallback to using sourceIndex (in IE) if it's available on both nodes - } else if ( a.sourceIndex && b.sourceIndex ) { - return a.sourceIndex - b.sourceIndex; - } - - var al, bl, - ap = [], - bp = [], - aup = a.parentNode, - bup = b.parentNode, - cur = aup; - - // If the nodes are siblings (or identical) we can do a quick check - if ( aup === bup ) { - return siblingCheck( a, b ); - - // If no parents were found then the nodes are disconnected - } else if ( !aup ) { - return -1; - - } else if ( !bup ) { - return 1; - } - - // Otherwise they're somewhere else in the tree so we need - // to build up a full list of the parentNodes for comparison - while ( cur ) { - ap.unshift( cur ); - cur = cur.parentNode; - } - - cur = bup; - - while ( cur ) { - bp.unshift( cur ); - cur = cur.parentNode; - } - - al = ap.length; - bl = bp.length; - - // Start walking down the tree looking for a discrepancy - for ( var i = 0; i < al && i < bl; i++ ) { - if ( ap[i] !== bp[i] ) { - return siblingCheck( ap[i], bp[i] ); - } - } - - // We ended someplace up the tree so do a sibling check - return i === al ? - siblingCheck( a, bp[i], -1 ) : - siblingCheck( ap[i], b, 1 ); - }; - - siblingCheck = function( a, b, ret ) { - if ( a === b ) { - return ret; - } - - var cur = a.nextSibling; - - while ( cur ) { - if ( cur === b ) { - return -1; - } - - cur = cur.nextSibling; - } - - return 1; - }; -} - -// Utility function for retreiving the text value of an array of DOM nodes -Sizzle.getText = function( elems ) { - var ret = "", elem; - - for ( var i = 0; elems[i]; i++ ) { - elem = elems[i]; - - // Get the text from text nodes and CDATA nodes - if ( elem.nodeType === 3 || elem.nodeType === 4 ) { - ret += elem.nodeValue; - - // Traverse everything else, except comment nodes - } else if ( elem.nodeType !== 8 ) { - ret += Sizzle.getText( elem.childNodes ); - } - } - - return ret; -}; - -// Check to see if the browser returns elements by name when -// querying by getElementById (and provide a workaround) -(function(){ - // We're going to inject a fake input element with a specified name - var form = document.createElement("div"), - id = "script" + (new Date()).getTime(), - root = document.documentElement; - - form.innerHTML = ""; - - // Inject it into the root element, check its status, and remove it quickly - root.insertBefore( form, root.firstChild ); - - // The workaround has to do additional checks after a getElementById - // Which slows things down for other browsers (hence the branching) - if ( document.getElementById( id ) ) { - Expr.find.ID = function( match, context, isXML ) { - if ( typeof context.getElementById !== "undefined" && !isXML ) { - var m = context.getElementById(match[1]); - - return m ? - m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? - [m] : - undefined : - []; - } - }; - - Expr.filter.ID = function( elem, match ) { - var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); - - return elem.nodeType === 1 && node && node.nodeValue === match; - }; - } - - root.removeChild( form ); - - // release memory in IE - root = form = null; -})(); - -(function(){ - // Check to see if the browser returns only elements - // when doing getElementsByTagName("*") - - // Create a fake element - var div = document.createElement("div"); - div.appendChild( document.createComment("") ); - - // Make sure no comments are found - if ( div.getElementsByTagName("*").length > 0 ) { - Expr.find.TAG = function( match, context ) { - var results = context.getElementsByTagName( match[1] ); - - // Filter out possible comments - if ( match[1] === "*" ) { - var tmp = []; - - for ( var i = 0; results[i]; i++ ) { - if ( results[i].nodeType === 1 ) { - tmp.push( results[i] ); - } - } - - results = tmp; - } - - return results; - }; - } - - // Check to see if an attribute returns normalized href attributes - div.innerHTML = ""; - - if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && - div.firstChild.getAttribute("href") !== "#" ) { - - Expr.attrHandle.href = function( elem ) { - return elem.getAttribute( "href", 2 ); - }; - } - - // release memory in IE - div = null; -})(); - -if ( document.querySelectorAll ) { - (function(){ - var oldSizzle = Sizzle, - div = document.createElement("div"), - id = "__sizzle__"; - - div.innerHTML = "

    "; - - // Safari can't handle uppercase or unicode characters when - // in quirks mode. - if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { - return; - } - - Sizzle = function( query, context, extra, seed ) { - context = context || document; - - // Only use querySelectorAll on non-XML documents - // (ID selectors don't work in non-HTML documents) - if ( !seed && !Sizzle.isXML(context) ) { - // See if we find a selector to speed up - var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); - - if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { - // Speed-up: Sizzle("TAG") - if ( match[1] ) { - return makeArray( context.getElementsByTagName( query ), extra ); - - // Speed-up: Sizzle(".CLASS") - } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { - return makeArray( context.getElementsByClassName( match[2] ), extra ); - } - } - - if ( context.nodeType === 9 ) { - // Speed-up: Sizzle("body") - // The body element only exists once, optimize finding it - if ( query === "body" && context.body ) { - return makeArray( [ context.body ], extra ); - - // Speed-up: Sizzle("#ID") - } else if ( match && match[3] ) { - var elem = context.getElementById( match[3] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id === match[3] ) { - return makeArray( [ elem ], extra ); - } - - } else { - return makeArray( [], extra ); - } - } - - try { - return makeArray( context.querySelectorAll(query), extra ); - } catch(qsaError) {} - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - var oldContext = context, - old = context.getAttribute( "id" ), - nid = old || id, - hasParent = context.parentNode, - relativeHierarchySelector = /^\s*[+~]/.test( query ); - - if ( !old ) { - context.setAttribute( "id", nid ); - } else { - nid = nid.replace( /'/g, "\\$&" ); - } - if ( relativeHierarchySelector && hasParent ) { - context = context.parentNode; - } - - try { - if ( !relativeHierarchySelector || hasParent ) { - return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); - } - - } catch(pseudoError) { - } finally { - if ( !old ) { - oldContext.removeAttribute( "id" ); - } - } - } - } - - return oldSizzle(query, context, extra, seed); - }; - - for ( var prop in oldSizzle ) { - Sizzle[ prop ] = oldSizzle[ prop ]; - } - - // release memory in IE - div = null; - })(); -} - -(function(){ - var html = document.documentElement, - matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; - - if ( matches ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9 fails this) - var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), - pseudoWorks = false; - - try { - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( document.documentElement, "[test!='']:sizzle" ); - - } catch( pseudoError ) { - pseudoWorks = true; - } - - Sizzle.matchesSelector = function( node, expr ) { - // Make sure that attribute selectors are quoted - expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); - - if ( !Sizzle.isXML( node ) ) { - try { - if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { - var ret = matches.call( node, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || !disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9, so check for that - node.document && node.document.nodeType !== 11 ) { - return ret; - } - } - } catch(e) {} - } - - return Sizzle(expr, null, null, [node]).length > 0; - }; - } -})(); - -(function(){ - var div = document.createElement("div"); - - div.innerHTML = "
    "; - - // Opera can't find a second classname (in 9.6) - // Also, make sure that getElementsByClassName actually exists - if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { - return; - } - - // Safari caches class attributes, doesn't catch changes (in 3.2) - div.lastChild.className = "e"; - - if ( div.getElementsByClassName("e").length === 1 ) { - return; - } - - Expr.order.splice(1, 0, "CLASS"); - Expr.find.CLASS = function( match, context, isXML ) { - if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { - return context.getElementsByClassName(match[1]); - } - }; - - // release memory in IE - div = null; -})(); - -function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { - for ( var i = 0, l = checkSet.length; i < l; i++ ) { - var elem = checkSet[i]; - - if ( elem ) { - var match = false; - - elem = elem[dir]; - - while ( elem ) { - if ( elem.sizcache === doneName ) { - match = checkSet[elem.sizset]; - break; - } - - if ( elem.nodeType === 1 && !isXML ){ - elem.sizcache = doneName; - elem.sizset = i; - } - - if ( elem.nodeName.toLowerCase() === cur ) { - match = elem; - break; - } - - elem = elem[dir]; - } - - checkSet[i] = match; - } - } -} - -function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { - for ( var i = 0, l = checkSet.length; i < l; i++ ) { - var elem = checkSet[i]; - - if ( elem ) { - var match = false; - - elem = elem[dir]; - - while ( elem ) { - if ( elem.sizcache === doneName ) { - match = checkSet[elem.sizset]; - break; - } - - if ( elem.nodeType === 1 ) { - if ( !isXML ) { - elem.sizcache = doneName; - elem.sizset = i; - } - - if ( typeof cur !== "string" ) { - if ( elem === cur ) { - match = true; - break; - } - - } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { - match = elem; - break; - } - } - - elem = elem[dir]; - } - - checkSet[i] = match; - } - } -} - -if ( document.documentElement.contains ) { - Sizzle.contains = function( a, b ) { - return a !== b && (a.contains ? a.contains(b) : true); - }; - -} else if ( document.documentElement.compareDocumentPosition ) { - Sizzle.contains = function( a, b ) { - return !!(a.compareDocumentPosition(b) & 16); - }; - -} else { - Sizzle.contains = function() { - return false; - }; -} - -Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; - - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -var posProcess = function( selector, context ) { - var match, - tmpSet = [], - later = "", - root = context.nodeType ? [context] : context; - - // Position selectors must be done after the filter - // And so must :not(positional) so we move all PSEUDOs to the end - while ( (match = Expr.match.PSEUDO.exec( selector )) ) { - later += match[0]; - selector = selector.replace( Expr.match.PSEUDO, "" ); - } - - selector = Expr.relative[selector] ? selector + "*" : selector; - - for ( var i = 0, l = root.length; i < l; i++ ) { - Sizzle( selector, root[i], tmpSet ); - } - - return Sizzle.filter( later, tmpSet ); -}; - -// EXPOSE -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.filters; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})(); - - -var runtil = /Until$/, - rparentsprev = /^(?:parents|prevUntil|prevAll)/, - // Note: This RegExp should be improved, or likely pulled from Sizzle - rmultiselector = /,/, - isSimple = /^.[^:#\[\.,]*$/, - slice = Array.prototype.slice, - POS = jQuery.expr.match.POS, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var self = this, - i, l; - - if ( typeof selector !== "string" ) { - return jQuery( selector ).filter(function() { - for ( i = 0, l = self.length; i < l; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }); - } - - var ret = this.pushStack( "", "find", selector ), - length, n, r; - - for ( i = 0, l = this.length; i < l; i++ ) { - length = ret.length; - jQuery.find( selector, this[i], ret ); - - if ( i > 0 ) { - // Make sure that the results are unique - for ( n = length; n < ret.length; n++ ) { - for ( r = 0; r < length; r++ ) { - if ( ret[r] === ret[n] ) { - ret.splice(n--, 1); - break; - } - } - } - } - } - - return ret; - }, - - has: function( target ) { - var targets = jQuery( target ); - return this.filter(function() { - for ( var i = 0, l = targets.length; i < l; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false), "not", selector); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true), "filter", selector ); - }, - - is: function( selector ) { - return !!selector && ( typeof selector === "string" ? - jQuery.filter( selector, this ).length > 0 : - this.filter( selector ).length > 0 ); - }, - - closest: function( selectors, context ) { - var ret = [], i, l, cur = this[0]; - - // Array - if ( jQuery.isArray( selectors ) ) { - var match, selector, - matches = {}, - level = 1; - - if ( cur && selectors.length ) { - for ( i = 0, l = selectors.length; i < l; i++ ) { - selector = selectors[i]; - - if ( !matches[ selector ] ) { - matches[ selector ] = POS.test( selector ) ? - jQuery( selector, context || this.context ) : - selector; - } - } - - while ( cur && cur.ownerDocument && cur !== context ) { - for ( selector in matches ) { - match = matches[ selector ]; - - if ( match.jquery ? match.index( cur ) > -1 : jQuery( cur ).is( match ) ) { - ret.push({ selector: selector, elem: cur, level: level }); - } - } - - cur = cur.parentNode; - level++; - } - } - - return ret; - } - - // String - var pos = POS.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( i = 0, l = this.length; i < l; i++ ) { - cur = this[i]; - - while ( cur ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - - } else { - cur = cur.parentNode; - if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) { - break; - } - } - } - } - - ret = ret.length > 1 ? jQuery.unique( ret ) : ret; - - return this.pushStack( ret, "closest", selectors ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - if ( !elem || typeof elem === "string" ) { - return jQuery.inArray( this[0], - // If it receives a string, the selector is used - // If it receives nothing, the siblings are used - elem ? jQuery( elem ) : this.parent().children() ); - } - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? - all : - jQuery.unique( all ) ); - }, - - andSelf: function() { - return this.add( this.prevObject ); - } -}); - -// A painfully simple check to see if an element is disconnected -// from a document (should be improved, where feasible). -function isDisconnected( node ) { - return !node || !node.parentNode || node.parentNode.nodeType === 11; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return jQuery.nth( elem, 2, "nextSibling" ); - }, - prev: function( elem ) { - return jQuery.nth( elem, 2, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( elem.parentNode.firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.makeArray( elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ), - // The variable 'args' was introduced in - // https://github.com/jquery/jquery/commit/52a0238 - // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed. - // http://code.google.com/p/v8/issues/detail?id=1050 - args = slice.call(arguments); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; - - if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret, name, args.join(",") ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - nth: function( cur, result, dir, elem ) { - result = result || 1; - var num = 0; - - for ( ; cur; cur = cur[dir] ) { - if ( cur.nodeType === 1 && ++num === result ) { - break; - } - } - - return cur; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - - // Can't pass null or undefined to indexOf in Firefox 4 - // Set to 0 to skip string check - qualifier = qualifier || 0; - - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem, i ) { - return (elem === qualifier) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem, i ) { - return (jQuery.inArray( elem, qualifier ) >= 0) === keep; - }); -} - - - - -var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, - rtagName = /<([\w:]+)/, - rtbody = /", "" ], - legend: [ 1, "
    ", "
    " ], - thead: [ 1, "", "
    " ], - tr: [ 2, "", "
    " ], - td: [ 3, "", "
    " ], - col: [ 2, "", "
    " ], - area: [ 1, "", "" ], - _default: [ 0, "", "" ] - }; - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// IE can't serialize and - -``` - -For more thorough examples, look at the `examples/` directory. - -## Short recipes - -### Sending and receiving events. - -Socket.IO allows you to emit and receive custom events. -Besides `connect`, `message` and `disconnect`, you can emit custom events: - -```js -// note, io.listen() will create a http server for you -var io = require('socket.io').listen(80); - -io.sockets.on('connection', function (socket) { - io.sockets.emit('this', { will: 'be received by everyone' }); - - socket.on('private message', function (from, msg) { - console.log('I received a private message by ', from, ' saying ', msg); - }); - - socket.on('disconnect', function () { - io.sockets.emit('user disconnected'); - }); -}); -``` - -### Storing data associated to a client - -Sometimes it's necessary to store data associated with a client that's -necessary for the duration of the session. - -#### Server side - -```js -var io = require('socket.io').listen(80); - -io.sockets.on('connection', function (socket) { - socket.on('set nickname', function (name) { - socket.set('nickname', name, function () { socket.emit('ready'); }); - }); - - socket.on('msg', function () { - socket.get('nickname', function (err, name) { - console.log('Chat message by ', name); - }); - }); -}); -``` - -#### Client side - -```html - -``` - -### Restricting yourself to a namespace - -If you have control over all the messages and events emitted for a particular -application, using the default `/` namespace works. - -If you want to leverage 3rd-party code, or produce code to share with others, -socket.io provides a way of namespacing a `socket`. - -This has the benefit of `multiplexing` a single connection. Instead of -socket.io using two `WebSocket` connections, it'll use one. - -The following example defines a socket that listens on '/chat' and one for -'/news': - -#### Server side - -```js -var io = require('socket.io').listen(80); - -var chat = io - .of('/chat') - .on('connection', function (socket) { - socket.emit('a message', { that: 'only', '/chat': 'will get' }); - chat.emit('a message', { everyone: 'in', '/chat': 'will get' }); - }); - -var news = io - .of('/news'); - .on('connection', function (socket) { - socket.emit('item', { news: 'item' }); - }); -``` - -#### Client side: - -```html - -``` - -### Sending volatile messages. - -Sometimes certain messages can be dropped. Let's say you have an app that -shows realtime tweets for the keyword `bieber`. - -If a certain client is not ready to receive messages (because of network slowness -or other issues, or because he's connected through long polling and is in the -middle of a request-response cycle), if he doesn't receive ALL the tweets related -to bieber your application won't suffer. - -In that case, you might want to send those messages as volatile messages. - -#### Server side - -```js -var io = require('socket.io').listen(80); - -io.sockets.on('connection', function (socket) { - var tweets = setInterval(function () { - getBieberTweet(function (tweet) { - socket.volatile.emit('bieber tweet', tweet); - }); - }, 100); - - socket.on('disconnect', function () { - clearInterval(tweets); - }); -}); -``` - -#### Client side - -In the client side, messages are received the same way whether they're volatile -or not. - -### Getting acknowledgements - -Sometimes, you might want to get a callback when the client confirmed the message -reception. - -To do this, simply pass a function as the last parameter of `.send` or `.emit`. -What's more, when you use `.emit`, the acknowledgement is done by you, which -means you can also pass data along: - -#### Server side - -```js -var io = require('socket.io').listen(80); - -io.sockets.on('connection', function (socket) { - socket.on('ferret', function (name, fn) { - fn('woot'); - }); -}); -``` - -#### Client side - -```html - -``` - -### Broadcasting messages - -To broadcast, simply add a `broadcast` flag to `emit` and `send` method calls. -Broadcasting means sending a message to everyone else except for the socket -that starts it. - -#### Server side - -```js -var io = require('socket.io').listen(80); - -io.sockets.on('connection', function (socket) { - socket.broadcast.emit('user connected'); - socket.broadcast.json.send({ a: 'message' }); -}); -``` - -### Rooms - -Sometimes you want to put certain sockets in the same room, so that it's easy -to broadcast to all of them together. - -Think of this as built-in channels for sockets. Sockets `join` and `leave` -rooms in each socket. - -#### Server side - -```js -var io = require('socket.io').listen(80); - -io.sockets.on('connection', function (socket) { - socket.join('justin bieber fans'); - socket.broadcast.to('justin bieber fans').emit('new fan'); - io.sockets.in('rammstein fans').emit('new non-fan'); -}); -``` - -### Using it just as a cross-browser WebSocket - -If you just want the WebSocket semantics, you can do that too. -Simply leverage `send` and listen on the `message` event: - -#### Server side - -```js -var io = require('socket.io').listen(80); - -io.sockets.on('connection', function (socket) { - socket.on('message', function () { }); - socket.on('disconnect', function () { }); -}); -``` - -#### Client side - -```html - -``` - -### Changing configuration - -Configuration in socket.io is TJ-style: - -#### Server side - -```js -var io = require('socket.io').listen(80); - -io.configure(function () { - io.set('transports', ['websocket', 'flashsocket', 'xhr-polling']); -}); - -io.configure('development', function () { - io.set('transports', ['websocket', 'xhr-polling']); - io.enable('log'); -}); -``` - -## License - -(The MIT License) - -Copyright (c) 2011 Guillermo Rauch <guillermo@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. diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/benchmarks/decode.bench.js b/tty.js/node_modules/tty.js/node_modules/socket.io/benchmarks/decode.bench.js deleted file mode 100644 index 4855d805..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/benchmarks/decode.bench.js +++ /dev/null @@ -1,64 +0,0 @@ - -/** - * Module dependencies. - */ - -var benchmark = require('benchmark') - , colors = require('colors') - , io = require('../') - , parser = io.parser - , suite = new benchmark.Suite('Decode packet'); - -suite.add('string', function () { - parser.decodePacket('4:::"2"'); -}); - -suite.add('event', function () { - parser.decodePacket('5:::{"name":"woot"}'); -}); - -suite.add('event+ack', function () { - parser.decodePacket('5:1+::{"name":"tobi"}'); -}); - -suite.add('event+data', function () { - parser.decodePacket('5:::{"name":"edwald","args":[{"a": "b"},2,"3"]}'); -}); - -suite.add('heartbeat', function () { - parser.decodePacket('2:::'); -}); - -suite.add('error', function () { - parser.decodePacket('7:::2+0'); -}); - -var payload = parser.encodePayload([ - parser.encodePacket({ type: 'message', data: '5', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: '53d', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: 'foobar', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: 'foobarbaz', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: 'foobarbazfoobarbaz', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: 'foobarbaz', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: 'foobar', endpoint: '' }) -]); - -suite.add('payload', function () { - parser.decodePayload(payload); -}); - -suite.on('cycle', function (bench, details) { - console.log('\n' + suite.name.grey, details.name.white.bold); - console.log([ - details.hz.toFixed(2).cyan + ' ops/sec'.grey - , details.count.toString().white + ' times executed'.grey - , 'benchmark took '.grey + details.times.elapsed.toString().white + ' sec.'.grey - , - ].join(', '.grey)); -}); - -if (!module.parent) { - suite.run(); -} else { - module.exports = suite; -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/benchmarks/encode.bench.js b/tty.js/node_modules/tty.js/node_modules/socket.io/benchmarks/encode.bench.js deleted file mode 100644 index 5037702d..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/benchmarks/encode.bench.js +++ /dev/null @@ -1,90 +0,0 @@ - -/** - * Module dependencies. - */ - -var benchmark = require('benchmark') - , colors = require('colors') - , io = require('../') - , parser = io.parser - , suite = new benchmark.Suite('Encode packet'); - -suite.add('string', function () { - parser.encodePacket({ - type: 'json' - , endpoint: '' - , data: '2' - }); -}); - -suite.add('event', function () { - parser.encodePacket({ - type: 'event' - , name: 'woot' - , endpoint: '' - , args: [] - }); -}); - -suite.add('event+ack', function () { - parser.encodePacket({ - type: 'json' - , id: 1 - , ack: 'data' - , endpoint: '' - , data: { a: 'b' } - }); -}); - -suite.add('event+data', function () { - parser.encodePacket({ - type: 'event' - , name: 'edwald' - , endpoint: '' - , args: [{a: 'b'}, 2, '3'] - }); -}); - -suite.add('heartbeat', function () { - parser.encodePacket({ - type: 'heartbeat' - , endpoint: '' - }) -}); - -suite.add('error', function () { - parser.encodePacket({ - type: 'error' - , reason: 'unauthorized' - , advice: 'reconnect' - , endpoint: '' - }) -}) - -suite.add('payload', function () { - parser.encodePayload([ - parser.encodePacket({ type: 'message', data: '5', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: '53d', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: 'foobar', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: 'foobarbaz', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: 'foobarbazfoobarbaz', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: 'foobarbaz', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: 'foobar', endpoint: '' }) - ]); -}); - -suite.on('cycle', function (bench, details) { - console.log('\n' + suite.name.grey, details.name.white.bold); - console.log([ - details.hz.toFixed(2).cyan + ' ops/sec'.grey - , details.count.toString().white + ' times executed'.grey - , 'benchmark took '.grey + details.times.elapsed.toString().white + ' sec.'.grey - , - ].join(', '.grey)); -}); - -if (!module.parent) { - suite.run(); -} else { - module.exports = suite; -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/benchmarks/runner.js b/tty.js/node_modules/tty.js/node_modules/socket.io/benchmarks/runner.js deleted file mode 100644 index 81e55cae..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/benchmarks/runner.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Benchmark runner dependencies - */ - -var colors = require('colors') - , path = require('path'); - -/** - * Find all the benchmarks - */ - -var benchmarks_files = process.env.BENCHMARKS.split(' ') - , all = [].concat(benchmarks_files) - , first = all.shift() - , benchmarks = {}; - -// find the benchmarks and load them all in our obj -benchmarks_files.forEach(function (file) { - benchmarks[file] = require(path.join(__dirname, '..', file)); -}); - -// setup the complete listeners -benchmarks_files.forEach(function (file) { - var benchmark = benchmarks[file] - , next_file = all.shift() - , next = benchmarks[next_file]; - - /** - * Generate a oncomplete function for the tests, either we are done or we - * have more benchmarks to process. - */ - - function complete () { - if (!next) { - console.log( - '\n\nBenchmark completed in'.grey - , (Date.now() - start).toString().green + ' ms'.grey - ); - } else { - console.log('\nStarting benchmark '.grey + next_file.yellow); - next.run(); - } - } - - // attach the listener - benchmark.on('complete', complete); -}); - -/** - * Start the benchmark - */ - -var start = Date.now(); -console.log('Starting benchmark '.grey + first.yellow); -benchmarks[first].run(); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/index.js b/tty.js/node_modules/tty.js/node_modules/socket.io/index.js deleted file mode 100644 index cc00c103..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/index.js +++ /dev/null @@ -1,8 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -module.exports = require('./lib/socket.io'); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/index.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/index.js deleted file mode 100644 index d19bf850..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/index.js +++ /dev/null @@ -1,131 +0,0 @@ - -/** - * Module dependencies. - */ - -var http = require('http') - , engine = require('engine.io') - , Client = require('./client') - , Namespace = require('./namespace') - , debug = require('debug')('socket.io:server'); - -/** - * Read client - */ - -var client = { - source: require('socket.io-client').source, - version: require('socket.io-client/package').version -}; - -/** - * Server constructor. - * - * @param {http.Server|Number|Object} http server, port or options - * @param {Object} options - * @api public - */ - -function Server(srv, opts){ - if (!(this instanceof Server)) return new Server(srv, opts); - if ('object' == typeof srv && !srv.listen) { - opts = srv; - srv = null; - } - opts = opts || {}; - if (srv) this.attach(srv, opts); - this.sockets = this.of('/'); - this.client(true); -} - -/** - * Serve client code. - * - * @api public - */ - - - -/** - * Attaches socket.io to a server or port. - * - * @param {http.Server|Number} server or port - * @param {Object} options - * @api public - */ - -Server.prototype.attach = function(srv, opts){ - if ('number' == typeof srv) { - debug('creating engine.io on port %d', srv); - srv = engine.listen(srv, opts); - } else { - debug('creating engine.io instance', opts); - srv = engine.attach(srv, opts); - } - this.bind(srv); -}; - -/** - * Binds socket.io to an engine.io instance. - * - * @param {engine.Server} engine.io (or compatible) server - * @api public - */ - -Server.prototype.bind = function(engine){ - this.engine = engine; - this.engine.on('connection', this.onconnection.bind(this)); -}; - -/** - * Called with each incoming transport connection. - * - * @api public - */ - -Server.prototype.onconnection = function(conn){ - debug('incoming connection with id %s', conn.id); - var client = new Client(this, conn); - client.connect('/'); - this.emit('client', client); -}; - -/** - * Looks up a namespace. - * - * @param {String} nsp name - * @api public - */ - -Server.prototype.of = function(name){ - if (!this.nsps[name]) { - debug('initializing namespace %s', name); - var nsp = new Namespace(this, name); - this.nsps[name] = nsp; - } - return this.nsps[name]; -}; - -/** - * Expose main namespace (/). - */ - -['use', 'to', 'in', 'emit', 'send', 'write'].forEach(function(name){ - Server.prototype[name] = function(){ - var nsp = this.sockets[name]; - return nsp.apply(this.sockets, arguments); - }; -}); - -Namespace.flags.forEach(function(flag){ - Server.prototype.__defineGetter__(flag, function(name){ - this.flags.push(name); - return this; - }); -}); - -/** - * BC with `io.listen` - */ - -Server.listen = Server; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/logger.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/logger.js deleted file mode 100644 index 49d02c98..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/logger.js +++ /dev/null @@ -1,97 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var util = require('./util') - , toArray = util.toArray; - -/** - * Log levels. - */ - -var levels = [ - 'error' - , 'warn' - , 'info' - , 'debug' -]; - -/** - * Colors for log levels. - */ - -var colors = [ - 31 - , 33 - , 36 - , 90 -]; - -/** - * Pads the nice output to the longest log level. - */ - -function pad (str) { - var max = 0; - - for (var i = 0, l = levels.length; i < l; i++) - max = Math.max(max, levels[i].length); - - if (str.length < max) - return str + new Array(max - str.length + 1).join(' '); - - return str; -}; - -/** - * Logger (console). - * - * @api public - */ - -var Logger = module.exports = function (opts) { - opts = opts || {} - this.colors = false !== opts.colors; - this.level = 3; - this.enabled = true; -}; - -/** - * Log method. - * - * @api public - */ - -Logger.prototype.log = function (type) { - var index = levels.indexOf(type); - - if (index > this.level || !this.enabled) - return this; - - console.log.apply( - console - , [this.colors - ? ' \033[' + colors[index] + 'm' + pad(type) + ' -\033[39m' - : type + ':' - ].concat(toArray(arguments).slice(1)) - ); - - return this; -}; - -/** - * Generate methods. - */ - -levels.forEach(function (name) { - Logger.prototype[name] = function () { - this.log.apply(this, [name].concat(toArray(arguments))); - }; -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/manager.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/manager.js deleted file mode 100644 index b3ea7d92..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/manager.js +++ /dev/null @@ -1,1026 +0,0 @@ -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var fs = require('fs') - , url = require('url') - , tty = require('tty') - , crypto = require('crypto') - , util = require('./util') - , store = require('./store') - , client = require('socket.io-client') - , transports = require('./transports') - , Logger = require('./logger') - , Socket = require('./socket') - , MemoryStore = require('./stores/memory') - , SocketNamespace = require('./namespace') - , Static = require('./static') - , EventEmitter = process.EventEmitter; - -/** - * Export the constructor. - */ - -exports = module.exports = Manager; - -/** - * Default transports. - */ - -var defaultTransports = exports.defaultTransports = [ - 'websocket' - , 'htmlfile' - , 'xhr-polling' - , 'jsonp-polling' -]; - -/** - * Inherited defaults. - */ - -var parent = module.parent.exports - , protocol = parent.protocol - , jsonpolling_re = /^\d+$/; - -/** - * Manager constructor. - * - * @param {HTTPServer} server - * @param {Object} options, optional - * @api public - */ - -function Manager (server, options) { - this.server = server; - this.namespaces = {}; - this.sockets = this.of(''); - this.settings = { - origins: '*:*' - , log: true - , store: new MemoryStore - , logger: new Logger - , static: new Static(this) - , heartbeats: true - , resource: '/socket.io' - , transports: defaultTransports - , authorization: false - , blacklist: ['disconnect'] - , 'log level': 3 - , 'log colors': tty.isatty(process.stdout.fd) - , 'close timeout': 60 - , 'heartbeat interval': 25 - , 'heartbeat timeout': 60 - , 'polling duration': 20 - , 'flash policy server': true - , 'flash policy port': 10843 - , 'destroy upgrade': true - , 'destroy buffer size': 10E7 - , 'browser client': true - , 'browser client cache': true - , 'browser client minification': false - , 'browser client etag': false - , 'browser client expires': 315360000 - , 'browser client gzip': false - , 'browser client handler': false - , 'client store expiration': 15 - , 'match origin protocol': false - }; - - for (var i in options) { - if (options.hasOwnProperty(i)) { - this.settings[i] = options[i]; - } - } - - var self = this; - - // default error handler - server.on('error', function(err) { - self.log.warn('error raised: ' + err); - }); - - this.initStore(); - - this.on('set:store', function() { - self.initStore(); - }); - - // reset listeners - this.oldListeners = server.listeners('request').splice(0); - server.removeAllListeners('request'); - - server.on('request', function (req, res) { - self.handleRequest(req, res); - }); - - server.on('upgrade', function (req, socket, head) { - self.handleUpgrade(req, socket, head); - }); - - server.on('close', function () { - clearInterval(self.gc); - }); - - server.once('listening', function () { - self.gc = setInterval(self.garbageCollection.bind(self), 10000); - }); - - for (var i in transports) { - if (transports.hasOwnProperty(i)) { - if (transports[i].init) { - transports[i].init(this); - } - } - } - - // forward-compatibility with 1.0 - var self = this; - this.sockets.on('connection', function (conn) { - self.emit('connection', conn); - }); - - this.sequenceNumber = Date.now() | 0; - - this.log.info('socket.io started'); -}; - -Manager.prototype.__proto__ = EventEmitter.prototype - -/** - * Store accessor shortcut. - * - * @api public - */ - -Manager.prototype.__defineGetter__('store', function () { - var store = this.get('store'); - store.manager = this; - return store; -}); - -/** - * Logger accessor. - * - * @api public - */ - -Manager.prototype.__defineGetter__('log', function () { - var logger = this.get('logger'); - - logger.level = this.get('log level') || -1; - logger.colors = this.get('log colors'); - logger.enabled = this.enabled('log'); - - return logger; -}); - -/** - * Static accessor. - * - * @api public - */ - -Manager.prototype.__defineGetter__('static', function () { - return this.get('static'); -}); - -/** - * Get settings. - * - * @api public - */ - -Manager.prototype.get = function (key) { - return this.settings[key]; -}; - -/** - * Set settings - * - * @api public - */ - -Manager.prototype.set = function (key, value) { - if (arguments.length == 1) return this.get(key); - this.settings[key] = value; - this.emit('set:' + key, this.settings[key], key); - return this; -}; - -/** - * Enable a setting - * - * @api public - */ - -Manager.prototype.enable = function (key) { - this.settings[key] = true; - this.emit('set:' + key, this.settings[key], key); - return this; -}; - -/** - * Disable a setting - * - * @api public - */ - -Manager.prototype.disable = function (key) { - this.settings[key] = false; - this.emit('set:' + key, this.settings[key], key); - return this; -}; - -/** - * Checks if a setting is enabled - * - * @api public - */ - -Manager.prototype.enabled = function (key) { - return !!this.settings[key]; -}; - -/** - * Checks if a setting is disabled - * - * @api public - */ - -Manager.prototype.disabled = function (key) { - return !this.settings[key]; -}; - -/** - * Configure callbacks. - * - * @api public - */ - -Manager.prototype.configure = function (env, fn) { - if ('function' == typeof env) { - env.call(this); - } else if (env == (process.env.NODE_ENV || 'development')) { - fn.call(this); - } - - return this; -}; - -/** - * Initializes everything related to the message dispatcher. - * - * @api private - */ - -Manager.prototype.initStore = function () { - this.handshaken = {}; - this.connected = {}; - this.open = {}; - this.closed = {}; - this.rooms = {}; - this.roomClients = {}; - - var self = this; - - this.store.subscribe('handshake', function (id, data) { - self.onHandshake(id, data); - }); - - this.store.subscribe('connect', function (id) { - self.onConnect(id); - }); - - this.store.subscribe('open', function (id) { - self.onOpen(id); - }); - - this.store.subscribe('join', function (id, room) { - self.onJoin(id, room); - }); - - this.store.subscribe('leave', function (id, room) { - self.onLeave(id, room); - }); - - this.store.subscribe('close', function (id) { - self.onClose(id); - }); - - this.store.subscribe('dispatch', function (room, packet, volatile, exceptions) { - self.onDispatch(room, packet, volatile, exceptions); - }); - - this.store.subscribe('disconnect', function (id) { - self.onDisconnect(id); - }); -}; - -/** - * Called when a client handshakes. - * - * @param text - */ - -Manager.prototype.onHandshake = function (id, data) { - this.handshaken[id] = data; -}; - -/** - * Called when a client connects (ie: transport first opens) - * - * @api private - */ - -Manager.prototype.onConnect = function (id) { - this.connected[id] = true; -}; - -/** - * Called when a client opens a request in a different node. - * - * @api private - */ - -Manager.prototype.onOpen = function (id) { - this.open[id] = true; - - if (this.closed[id]) { - var self = this; - - this.store.unsubscribe('dispatch:' + id, function () { - var transport = self.transports[id]; - if (self.closed[id] && self.closed[id].length && transport) { - - // if we have buffered messages that accumulate between calling - // onOpen an this async callback, send them if the transport is - // still open, otherwise leave them buffered - if (transport.open) { - transport.payload(self.closed[id]); - self.closed[id] = []; - } - } - }); - } - - // clear the current transport - if (this.transports[id]) { - this.transports[id].discard(); - this.transports[id] = null; - } -}; - -/** - * Called when a message is sent to a namespace and/or room. - * - * @api private - */ - -Manager.prototype.onDispatch = function (room, packet, volatile, exceptions) { - if (this.rooms[room]) { - for (var i = 0, l = this.rooms[room].length; i < l; i++) { - var id = this.rooms[room][i]; - - if (!~exceptions.indexOf(id)) { - if (this.transports[id] && this.transports[id].open) { - this.transports[id].onDispatch(packet, volatile); - } else if (!volatile) { - this.onClientDispatch(id, packet); - } - } - } - } -}; - -/** - * Called when a client joins a nsp / room. - * - * @api private - */ - -Manager.prototype.onJoin = function (id, name) { - if (!this.roomClients[id]) { - this.roomClients[id] = {}; - } - - if (!this.rooms[name]) { - this.rooms[name] = []; - } - - if (!~this.rooms[name].indexOf(id)) { - this.rooms[name].push(id); - this.roomClients[id][name] = true; - } -}; - -/** - * Called when a client leaves a nsp / room. - * - * @param private - */ - -Manager.prototype.onLeave = function (id, room) { - if (this.rooms[room]) { - var index = this.rooms[room].indexOf(id); - - if (index >= 0) { - this.rooms[room].splice(index, 1); - } - - if (!this.rooms[room].length) { - delete this.rooms[room]; - } - - if (this.roomClients[id]) { - delete this.roomClients[id][room]; - } - } -}; - -/** - * Called when a client closes a request in different node. - * - * @api private - */ - -Manager.prototype.onClose = function (id) { - if (this.open[id]) { - delete this.open[id]; - } - - this.closed[id] = []; - - var self = this; - - this.store.subscribe('dispatch:' + id, function (packet, volatile) { - if (!volatile) { - self.onClientDispatch(id, packet); - } - }); -}; - -/** - * Dispatches a message for a closed client. - * - * @api private - */ - -Manager.prototype.onClientDispatch = function (id, packet) { - if (this.closed[id]) { - this.closed[id].push(packet); - } -}; - -/** - * Receives a message for a client. - * - * @api private - */ - -Manager.prototype.onClientMessage = function (id, packet) { - if (this.namespaces[packet.endpoint]) { - this.namespaces[packet.endpoint].handlePacket(id, packet); - } -}; - -/** - * Fired when a client disconnects (not triggered). - * - * @api private - */ - -Manager.prototype.onClientDisconnect = function (id, reason) { - for (var name in this.namespaces) { - if (this.namespaces.hasOwnProperty(name)) { - this.namespaces[name].handleDisconnect(id, reason, typeof this.roomClients[id] !== 'undefined' && - typeof this.roomClients[id][name] !== 'undefined'); - } - } - - this.onDisconnect(id); -}; - -/** - * Called when a client disconnects. - * - * @param text - */ - -Manager.prototype.onDisconnect = function (id, local) { - delete this.handshaken[id]; - - if (this.open[id]) { - delete this.open[id]; - } - - if (this.connected[id]) { - delete this.connected[id]; - } - - if (this.transports[id]) { - this.transports[id].discard(); - delete this.transports[id]; - } - - if (this.closed[id]) { - delete this.closed[id]; - } - - if (this.roomClients[id]) { - for (var room in this.roomClients[id]) { - if (this.roomClients[id].hasOwnProperty(room)) { - this.onLeave(id, room); - } - } - delete this.roomClients[id] - } - - this.store.destroyClient(id, this.get('client store expiration')); - - this.store.unsubscribe('dispatch:' + id); - - if (local) { - this.store.unsubscribe('message:' + id); - this.store.unsubscribe('disconnect:' + id); - } -}; - -/** - * Handles an HTTP request. - * - * @api private - */ - -Manager.prototype.handleRequest = function (req, res) { - var data = this.checkRequest(req); - - if (!data) { - for (var i = 0, l = this.oldListeners.length; i < l; i++) { - this.oldListeners[i].call(this.server, req, res); - } - - return; - } - - if (data.static || !data.transport && !data.protocol) { - if (data.static && this.enabled('browser client')) { - this.static.write(data.path, req, res); - } else { - res.writeHead(200); - res.end('Welcome to socket.io.'); - - this.log.info('unhandled socket.io url'); - } - - return; - } - - if (data.protocol != protocol) { - res.writeHead(500); - res.end('Protocol version not supported.'); - - this.log.info('client protocol version unsupported'); - } else { - if (data.id) { - this.handleHTTPRequest(data, req, res); - } else { - this.handleHandshake(data, req, res); - } - } -}; - -/** - * Handles an HTTP Upgrade. - * - * @api private - */ - -Manager.prototype.handleUpgrade = function (req, socket, head) { - var data = this.checkRequest(req) - , self = this; - - if (!data) { - if (this.enabled('destroy upgrade')) { - socket.end(); - this.log.debug('destroying non-socket.io upgrade'); - } - - return; - } - - req.head = head; - this.handleClient(data, req); -}; - -/** - * Handles a normal handshaken HTTP request (eg: long-polling) - * - * @api private - */ - -Manager.prototype.handleHTTPRequest = function (data, req, res) { - req.res = res; - this.handleClient(data, req); -}; - -/** - * Intantiantes a new client. - * - * @api private - */ - -Manager.prototype.handleClient = function (data, req) { - var socket = req.socket - , store = this.store - , self = this; - - // handle sync disconnect xhrs - if (undefined != data.query.disconnect) { - if (this.transports[data.id] && this.transports[data.id].open) { - this.transports[data.id].onForcedDisconnect(); - } else { - this.store.publish('disconnect-force:' + data.id); - } - req.res.writeHead(200); - req.res.end(); - return; - } - - if (!~this.get('transports').indexOf(data.transport)) { - this.log.warn('unknown transport: "' + data.transport + '"'); - req.connection.end(); - return; - } - - var transport = new transports[data.transport](this, data, req) - , handshaken = this.handshaken[data.id]; - - if (transport.disconnected) { - // failed during transport setup - req.connection.end(); - return; - } - if (handshaken) { - if (transport.open) { - if (this.closed[data.id] && this.closed[data.id].length) { - transport.payload(this.closed[data.id]); - this.closed[data.id] = []; - } - - this.onOpen(data.id); - this.store.publish('open', data.id); - this.transports[data.id] = transport; - } - - if (!this.connected[data.id]) { - this.onConnect(data.id); - this.store.publish('connect', data.id); - - // flag as used - delete handshaken.issued; - this.onHandshake(data.id, handshaken); - this.store.publish('handshake', data.id, handshaken); - - // initialize the socket for all namespaces - for (var i in this.namespaces) { - if (this.namespaces.hasOwnProperty(i)) { - var socket = this.namespaces[i].socket(data.id, true); - - // echo back connect packet and fire connection event - if (i === '') { - this.namespaces[i].handlePacket(data.id, { type: 'connect' }); - } - } - } - - this.store.subscribe('message:' + data.id, function (packet) { - self.onClientMessage(data.id, packet); - }); - - this.store.subscribe('disconnect:' + data.id, function (reason) { - self.onClientDisconnect(data.id, reason); - }); - } - } else { - if (transport.open) { - transport.error('client not handshaken', 'reconnect'); - } - - transport.discard(); - } -}; - -/** - * Generates a session id. - * - * @api private - */ - -Manager.prototype.generateId = function () { - var rand = new Buffer(15); // multiple of 3 for base64 - if (!rand.writeInt32BE) { - return Math.abs(Math.random() * Math.random() * Date.now() | 0).toString() - + Math.abs(Math.random() * Math.random() * Date.now() | 0).toString(); - } - this.sequenceNumber = (this.sequenceNumber + 1) | 0; - rand.writeInt32BE(this.sequenceNumber, 11); - if (crypto.randomBytes) { - crypto.randomBytes(12).copy(rand); - } else { - // not secure for node 0.4 - [0, 4, 8].forEach(function(i) { - rand.writeInt32BE(Math.random() * Math.pow(2, 32) | 0, i); - }); - } - return rand.toString('base64').replace(/\//g, '_').replace(/\+/g, '-'); -}; - -/** - * Handles a handshake request. - * - * @api private - */ - -Manager.prototype.handleHandshake = function (data, req, res) { - var self = this - , origin = req.headers.origin - , headers = { - 'Content-Type': 'text/plain' - }; - - function writeErr (status, message) { - if (data.query.jsonp && jsonpolling_re.test(data.query.jsonp)) { - res.writeHead(200, { 'Content-Type': 'application/javascript' }); - res.end('io.j[' + data.query.jsonp + '](new Error("' + message + '"));'); - } else { - res.writeHead(status, headers); - res.end(message); - } - }; - - function error (err) { - writeErr(500, 'handshake error'); - self.log.warn('handshake error ' + err); - }; - - if (!this.verifyOrigin(req)) { - writeErr(403, 'handshake bad origin'); - return; - } - - var handshakeData = this.handshakeData(data); - - if (origin) { - // https://developer.mozilla.org/En/HTTP_Access_Control - headers['Access-Control-Allow-Origin'] = origin; - headers['Access-Control-Allow-Credentials'] = 'true'; - } - - this.authorize(handshakeData, function (err, authorized, newData) { - if (err) return error(err); - - if (authorized) { - var id = self.generateId() - , hs = [ - id - , self.enabled('heartbeats') ? self.get('heartbeat timeout') || '' : '' - , self.get('close timeout') || '' - , self.transports(data).join(',') - ].join(':'); - - if (data.query.jsonp && jsonpolling_re.test(data.query.jsonp)) { - hs = 'io.j[' + data.query.jsonp + '](' + JSON.stringify(hs) + ');'; - res.writeHead(200, { 'Content-Type': 'application/javascript' }); - } else { - res.writeHead(200, headers); - } - - res.end(hs); - - self.onHandshake(id, newData || handshakeData); - self.store.publish('handshake', id, newData || handshakeData); - - self.log.info('handshake authorized', id); - } else { - writeErr(403, 'handshake unauthorized'); - self.log.info('handshake unauthorized'); - } - }) -}; - -/** - * Gets normalized handshake data - * - * @api private - */ - -Manager.prototype.handshakeData = function (data) { - var connection = data.request.connection - , connectionAddress - , date = new Date; - - if (connection.remoteAddress) { - connectionAddress = { - address: connection.remoteAddress - , port: connection.remotePort - }; - } else if (connection.socket && connection.socket.remoteAddress) { - connectionAddress = { - address: connection.socket.remoteAddress - , port: connection.socket.remotePort - }; - } - - return { - headers: data.headers - , address: connectionAddress - , time: date.toString() - , query: data.query - , url: data.request.url - , xdomain: !!data.request.headers.origin - , secure: data.request.connection.secure - , issued: +date - }; -}; - -/** - * Verifies the origin of a request. - * - * @api private - */ - -Manager.prototype.verifyOrigin = function (request) { - var origin = request.headers.origin || request.headers.referer - , origins = this.get('origins'); - - if (origin === 'null') origin = '*'; - - if (origins.indexOf('*:*') !== -1) { - return true; - } - - if (origin) { - try { - var parts = url.parse(origin); - parts.port = parts.port || 80; - var ok = - ~origins.indexOf(parts.hostname + ':' + parts.port) || - ~origins.indexOf(parts.hostname + ':*') || - ~origins.indexOf('*:' + parts.port); - if (!ok) this.log.warn('illegal origin: ' + origin); - return ok; - } catch (ex) { - this.log.warn('error parsing origin'); - } - } - else { - this.log.warn('origin missing from handshake, yet required by config'); - } - return false; -}; - -/** - * Handles an incoming packet. - * - * @api private - */ - -Manager.prototype.handlePacket = function (sessid, packet) { - this.of(packet.endpoint || '').handlePacket(sessid, packet); -}; - -/** - * Performs authentication. - * - * @param Object client request data - * @api private - */ - -Manager.prototype.authorize = function (data, fn) { - if (this.get('authorization')) { - var self = this; - - this.get('authorization').call(this, data, function (err, authorized) { - self.log.debug('client ' + authorized ? 'authorized' : 'unauthorized'); - fn(err, authorized); - }); - } else { - this.log.debug('client authorized'); - fn(null, true); - } - - return this; -}; - -/** - * Retrieves the transports adviced to the user. - * - * @api private - */ - -Manager.prototype.transports = function (data) { - var transp = this.get('transports') - , ret = []; - - for (var i = 0, l = transp.length; i < l; i++) { - var transport = transp[i]; - - if (transport) { - if (!transport.checkClient || transport.checkClient(data)) { - ret.push(transport); - } - } - } - - return ret; -}; - -/** - * Checks whether a request is a socket.io one. - * - * @return {Object} a client request data object or `false` - * @api private - */ - -var regexp = /^\/([^\/]+)\/?([^\/]+)?\/?([^\/]+)?\/?$/ - -Manager.prototype.checkRequest = function (req) { - var resource = this.get('resource'); - - var match; - if (typeof resource === 'string') { - match = req.url.substr(0, resource.length); - if (match !== resource) match = null; - } else { - match = resource.exec(req.url); - if (match) match = match[0]; - } - - if (match) { - var uri = url.parse(req.url.substr(match.length), true) - , path = uri.pathname || '' - , pieces = path.match(regexp); - - // client request data - var data = { - query: uri.query || {} - , headers: req.headers - , request: req - , path: path - }; - - if (pieces) { - data.protocol = Number(pieces[1]); - data.transport = pieces[2]; - data.id = pieces[3]; - data.static = !!this.static.has(path); - }; - - return data; - } - - return false; -}; - -/** - * Declares a socket namespace - * - * @api public - */ - -Manager.prototype.of = function (nsp) { - if (this.namespaces[nsp]) { - return this.namespaces[nsp]; - } - - return this.namespaces[nsp] = new SocketNamespace(this, nsp); -}; - -/** - * Perform garbage collection on long living objects and properties that cannot - * be removed automatically. - * - * @api private - */ - -Manager.prototype.garbageCollection = function () { - // clean up unused handshakes - var ids = Object.keys(this.handshaken) - , i = ids.length - , now = Date.now() - , handshake; - - while (i--) { - handshake = this.handshaken[ids[i]]; - - if ('issued' in handshake && (now - handshake.issued) >= 3E4) { - this.onDisconnect(ids[i]); - } - } -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/namespace.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/namespace.js deleted file mode 100644 index 6e1e1c92..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/namespace.js +++ /dev/null @@ -1,355 +0,0 @@ -/** - * Module dependencies. - */ - -var Socket = require('./socket') - , EventEmitter = process.EventEmitter - , parser = require('./parser') - , util = require('./util'); - -/** - * Exports the constructor. - */ - -exports = module.exports = SocketNamespace; - -/** - * Constructor. - * - * @api public. - */ - -function SocketNamespace (mgr, name) { - this.manager = mgr; - this.name = name || ''; - this.sockets = {}; - this.auth = false; - this.setFlags(); -}; - -/** - * Inherits from EventEmitter. - */ - -SocketNamespace.prototype.__proto__ = EventEmitter.prototype; - -/** - * Copies emit since we override it. - * - * @api private - */ - -SocketNamespace.prototype.$emit = EventEmitter.prototype.emit; - -/** - * Retrieves all clients as Socket instances as an array. - * - * @api public - */ - -SocketNamespace.prototype.clients = function (room) { - var room = this.name + (room !== undefined ? - '/' + room : ''); - - if (!this.manager.rooms[room]) { - return []; - } - - return this.manager.rooms[room].map(function (id) { - return this.socket(id); - }, this); -}; - -/** - * Access logger interface. - * - * @api public - */ - -SocketNamespace.prototype.__defineGetter__('log', function () { - return this.manager.log; -}); - -/** - * Access store. - * - * @api public - */ - -SocketNamespace.prototype.__defineGetter__('store', function () { - return this.manager.store; -}); - -/** - * JSON message flag. - * - * @api public - */ - -SocketNamespace.prototype.__defineGetter__('json', function () { - this.flags.json = true; - return this; -}); - -/** - * Volatile message flag. - * - * @api public - */ - -SocketNamespace.prototype.__defineGetter__('volatile', function () { - this.flags.volatile = true; - return this; -}); - -/** - * Overrides the room to relay messages to (flag). - * - * @api public - */ - -SocketNamespace.prototype.in = SocketNamespace.prototype.to = function (room) { - this.flags.endpoint = this.name + (room ? '/' + room : ''); - return this; -}; - -/** - * Adds a session id we should prevent relaying messages to (flag). - * - * @api public - */ - -SocketNamespace.prototype.except = function (id) { - this.flags.exceptions.push(id); - return this; -}; - -/** - * Sets the default flags. - * - * @api private - */ - -SocketNamespace.prototype.setFlags = function () { - this.flags = { - endpoint: this.name - , exceptions: [] - }; - return this; -}; - -/** - * Sends out a packet. - * - * @api private - */ - -SocketNamespace.prototype.packet = function (packet) { - packet.endpoint = this.name; - - var store = this.store - , log = this.log - , volatile = this.flags.volatile - , exceptions = this.flags.exceptions - , packet = parser.encodePacket(packet); - - this.manager.onDispatch(this.flags.endpoint, packet, volatile, exceptions); - this.store.publish('dispatch', this.flags.endpoint, packet, volatile, exceptions); - - this.setFlags(); - - return this; -}; - -/** - * Sends to everyone. - * - * @api public - */ - -SocketNamespace.prototype.send = function (data) { - return this.packet({ - type: this.flags.json ? 'json' : 'message' - , data: data - }); -}; - -/** - * Emits to everyone (override). - * - * @api public - */ - -SocketNamespace.prototype.emit = function (name) { - if (name == 'newListener') { - return this.$emit.apply(this, arguments); - } - - return this.packet({ - type: 'event' - , name: name - , args: util.toArray(arguments).slice(1) - }); -}; - -/** - * Retrieves or creates a write-only socket for a client, unless specified. - * - * @param {Boolean} whether the socket will be readable when initialized - * @api public - */ - -SocketNamespace.prototype.socket = function (sid, readable) { - if (!this.sockets[sid]) { - this.sockets[sid] = new Socket(this.manager, sid, this, readable); - } - - return this.sockets[sid]; -}; - -/** - * Sets authorization for this namespace. - * - * @api public - */ - -SocketNamespace.prototype.authorization = function (fn) { - this.auth = fn; - return this; -}; - -/** - * Called when a socket disconnects entirely. - * - * @api private - */ - -SocketNamespace.prototype.handleDisconnect = function (sid, reason, raiseOnDisconnect) { - if (this.sockets[sid] && this.sockets[sid].readable) { - if (raiseOnDisconnect) this.sockets[sid].onDisconnect(reason); - delete this.sockets[sid]; - } -}; - -/** - * Performs authentication. - * - * @param Object client request data - * @api private - */ - -SocketNamespace.prototype.authorize = function (data, fn) { - if (this.auth) { - var self = this; - - this.auth.call(this, data, function (err, authorized) { - self.log.debug('client ' + - (authorized ? '' : 'un') + 'authorized for ' + self.name); - fn(err, authorized); - }); - } else { - this.log.debug('client authorized for ' + this.name); - fn(null, true); - } - - return this; -}; - -/** - * Handles a packet. - * - * @api private - */ - -SocketNamespace.prototype.handlePacket = function (sessid, packet) { - var socket = this.socket(sessid) - , dataAck = packet.ack == 'data' - , manager = this.manager - , self = this; - - function ack () { - self.log.debug('sending data ack packet'); - socket.packet({ - type: 'ack' - , args: util.toArray(arguments) - , ackId: packet.id - }); - }; - - function error (err) { - self.log.warn('handshake error ' + err + ' for ' + self.name); - socket.packet({ type: 'error', reason: err }); - }; - - function connect () { - self.manager.onJoin(sessid, self.name); - self.store.publish('join', sessid, self.name); - - // packet echo - socket.packet({ type: 'connect' }); - - // emit connection event - self.$emit('connection', socket); - }; - - switch (packet.type) { - case 'connect': - if (packet.endpoint == '') { - connect(); - } else { - var handshakeData = manager.handshaken[sessid]; - - this.authorize(handshakeData, function (err, authorized, newData) { - if (err) return error(err); - - if (authorized) { - manager.onHandshake(sessid, newData || handshakeData); - self.store.publish('handshake', sessid, newData || handshakeData); - connect(); - } else { - error('unauthorized'); - } - }); - } - break; - - case 'ack': - if (socket.acks[packet.ackId]) { - socket.acks[packet.ackId].apply(socket, packet.args); - } else { - this.log.info('unknown ack packet'); - } - break; - - case 'event': - // check if the emitted event is not blacklisted - if (-~manager.get('blacklist').indexOf(packet.name)) { - this.log.debug('ignoring blacklisted event `' + packet.name + '`'); - } else { - var params = [packet.name].concat(packet.args); - - if (dataAck) { - params.push(ack); - } - - socket.$emit.apply(socket, params); - } - break; - - case 'disconnect': - this.manager.onLeave(sessid, this.name); - this.store.publish('leave', sessid, this.name); - - socket.$emit('disconnect', packet.reason || 'packet'); - break; - - case 'json': - case 'message': - var params = ['message', packet.data]; - - if (dataAck) - params.push(ack); - - socket.$emit.apply(socket, params); - }; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/parser.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/parser.js deleted file mode 100644 index d56b5500..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/parser.js +++ /dev/null @@ -1,249 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -/** - * Packet types. - */ - -var packets = exports.packets = { - 'disconnect': 0 - , 'connect': 1 - , 'heartbeat': 2 - , 'message': 3 - , 'json': 4 - , 'event': 5 - , 'ack': 6 - , 'error': 7 - , 'noop': 8 - } - , packetslist = Object.keys(packets); - -/** - * Errors reasons. - */ - -var reasons = exports.reasons = { - 'transport not supported': 0 - , 'client not handshaken': 1 - , 'unauthorized': 2 - } - , reasonslist = Object.keys(reasons); - -/** - * Errors advice. - */ - -var advice = exports.advice = { - 'reconnect': 0 - } - , advicelist = Object.keys(advice); - -/** - * Encodes a packet. - * - * @api private - */ - -exports.encodePacket = function (packet) { - var type = packets[packet.type] - , id = packet.id || '' - , endpoint = packet.endpoint || '' - , ack = packet.ack - , data = null; - - switch (packet.type) { - case 'message': - if (packet.data !== '') - data = packet.data; - break; - - case 'event': - var ev = { name: packet.name }; - - if (packet.args && packet.args.length) { - ev.args = packet.args; - } - - data = JSON.stringify(ev); - break; - - case 'json': - data = JSON.stringify(packet.data); - break; - - case 'ack': - data = packet.ackId - + (packet.args && packet.args.length - ? '+' + JSON.stringify(packet.args) : ''); - break; - - case 'connect': - if (packet.qs) - data = packet.qs; - break; - - case 'error': - var reason = packet.reason ? reasons[packet.reason] : '' - , adv = packet.advice ? advice[packet.advice] : '' - - if (reason !== '' || adv !== '') - data = reason + (adv !== '' ? ('+' + adv) : '') - - break; - } - - // construct packet with required fragments - var encoded = type + ':' + id + (ack == 'data' ? '+' : '') + ':' + endpoint; - - // data fragment is optional - if (data !== null && data !== undefined) - encoded += ':' + data; - - return encoded; -}; - -/** - * Encodes multiple messages (payload). - * - * @param {Array} messages - * @api private - */ - -exports.encodePayload = function (packets) { - var decoded = ''; - - if (packets.length == 1) - return packets[0]; - - for (var i = 0, l = packets.length; i < l; i++) { - var packet = packets[i]; - decoded += '\ufffd' + packet.length + '\ufffd' + packets[i] - } - - return decoded; -}; - -/** - * Decodes a packet - * - * @api private - */ - -var regexp = /([^:]+):([0-9]+)?(\+)?:([^:]+)?:?([\s\S]*)?/; - -/** - * Wrap the JSON.parse in a seperate function the crankshaft optimizer will - * only punish this function for the usage for try catch - * - * @api private - */ - -function parse (data) { - try { return JSON.parse(data) } - catch (e) { return false } -} - -exports.decodePacket = function (data) { - var pieces = data.match(regexp); - - if (!pieces) return {}; - - var id = pieces[2] || '' - , data = pieces[5] || '' - , packet = { - type: packetslist[pieces[1]] - , endpoint: pieces[4] || '' - }; - - // whether we need to acknowledge the packet - if (id) { - packet.id = id; - if (pieces[3]) - packet.ack = 'data'; - else - packet.ack = true; - } - - // handle different packet types - switch (packet.type) { - case 'message': - packet.data = data || ''; - break; - - case 'event': - pieces = parse(data); - if (pieces) { - packet.name = pieces.name; - packet.args = pieces.args; - } - - packet.args = packet.args || []; - break; - - case 'json': - packet.data = parse(data); - break; - - case 'connect': - packet.qs = data || ''; - break; - - case 'ack': - pieces = data.match(/^([0-9]+)(\+)?(.*)/); - if (pieces) { - packet.ackId = pieces[1]; - packet.args = []; - - if (pieces[3]) { - packet.args = parse(pieces[3]) || []; - } - } - break; - - case 'error': - pieces = data.split('+'); - packet.reason = reasonslist[pieces[0]] || ''; - packet.advice = advicelist[pieces[1]] || ''; - } - - return packet; -}; - -/** - * Decodes data payload. Detects multiple messages - * - * @return {Array} messages - * @api public - */ - -exports.decodePayload = function (data) { - if (undefined == data || null == data) { - return []; - } - - if (data[0] == '\ufffd') { - var ret = []; - - for (var i = 1, length = ''; i < data.length; i++) { - if (data[i] == '\ufffd') { - ret.push(exports.decodePacket(data.substr(i + 1, length))); - i += Number(length) + 1; - length = ''; - } else { - length += data[i]; - } - } - - return ret; - } else { - return [exports.decodePacket(data)]; - } -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/socket.io.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/socket.io.js deleted file mode 100644 index bf590364..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/socket.io.js +++ /dev/null @@ -1,143 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var client = require('socket.io-client'); - -/** - * Version. - */ - -exports.version = '0.9.11'; - -/** - * Supported protocol version. - */ - -exports.protocol = 1; - -/** - * Client that we serve. - */ - -exports.clientVersion = client.version; - -/** - * Attaches a manager - * - * @param {HTTPServer/Number} a HTTP/S server or a port number to listen on. - * @param {Object} opts to be passed to Manager and/or http server - * @param {Function} callback if a port is supplied - * @api public - */ - -exports.listen = function (server, options, fn) { - if ('function' == typeof server) { - console.warn('Socket.IO\'s `listen()` method expects an `http.Server` instance\n' - + 'as its first parameter. Are you migrating from Express 2.x to 3.x?\n' - + 'If so, check out the "Socket.IO compatibility" section at:\n' - + 'https://github.com/visionmedia/express/wiki/Migrating-from-2.x-to-3.x'); - } - - if ('function' == typeof options) { - fn = options; - options = {}; - } - - if ('undefined' == typeof server) { - // create a server that listens on port 80 - server = 80; - } - - if ('number' == typeof server) { - // if a port number is passed - var port = server; - - if (options && options.key) - server = require('https').createServer(options); - else - server = require('http').createServer(); - - // default response - server.on('request', function (req, res) { - res.writeHead(200); - res.end('Welcome to socket.io.'); - }); - - server.listen(port, fn); - } - - // otherwise assume a http/s server - return new exports.Manager(server, options); -}; - -/** - * Manager constructor. - * - * @api public - */ - -exports.Manager = require('./manager'); - -/** - * Transport constructor. - * - * @api public - */ - -exports.Transport = require('./transport'); - -/** - * Socket constructor. - * - * @api public - */ - -exports.Socket = require('./socket'); - -/** - * Static constructor. - * - * @api public - */ - -exports.Static = require('./static'); - -/** - * Store constructor. - * - * @api public - */ - -exports.Store = require('./store'); - -/** - * Memory Store constructor. - * - * @api public - */ - -exports.MemoryStore = require('./stores/memory'); - -/** - * Redis Store constructor. - * - * @api public - */ - -exports.RedisStore = require('./stores/redis'); - -/** - * Parser. - * - * @api public - */ - -exports.parser = require('./parser'); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/socket.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/socket.js deleted file mode 100644 index d9807f6d..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/socket.js +++ /dev/null @@ -1,369 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var parser = require('./parser') - , util = require('./util') - , EventEmitter = process.EventEmitter - -/** - * Export the constructor. - */ - -exports = module.exports = Socket; - -/** - * Default error event listener to prevent uncaught exceptions. - */ - -var defaultError = function () {}; - -/** - * Socket constructor. - * - * @param {Manager} manager instance - * @param {String} session id - * @param {Namespace} namespace the socket belongs to - * @param {Boolean} whether the - * @api public - */ - -function Socket (manager, id, nsp, readable) { - this.id = id; - this.namespace = nsp; - this.manager = manager; - this.disconnected = false; - this.ackPackets = 0; - this.acks = {}; - this.setFlags(); - this.readable = readable; - this.store = this.manager.store.client(this.id); - this.on('error', defaultError); -}; - -/** - * Inherits from EventEmitter. - */ - -Socket.prototype.__proto__ = EventEmitter.prototype; - -/** - * Accessor shortcut for the handshake data - * - * @api private - */ - -Socket.prototype.__defineGetter__('handshake', function () { - return this.manager.handshaken[this.id]; -}); - -/** - * Accessor shortcut for the transport type - * - * @api private - */ - -Socket.prototype.__defineGetter__('transport', function () { - return this.manager.transports[this.id].name; -}); - -/** - * Accessor shortcut for the logger. - * - * @api private - */ - -Socket.prototype.__defineGetter__('log', function () { - return this.manager.log; -}); - -/** - * JSON message flag. - * - * @api public - */ - -Socket.prototype.__defineGetter__('json', function () { - this.flags.json = true; - return this; -}); - -/** - * Volatile message flag. - * - * @api public - */ - -Socket.prototype.__defineGetter__('volatile', function () { - this.flags.volatile = true; - return this; -}); - -/** - * Broadcast message flag. - * - * @api public - */ - -Socket.prototype.__defineGetter__('broadcast', function () { - this.flags.broadcast = true; - return this; -}); - -/** - * Overrides the room to broadcast messages to (flag) - * - * @api public - */ - -Socket.prototype.to = Socket.prototype.in = function (room) { - this.flags.room = room; - return this; -}; - -/** - * Resets flags - * - * @api private - */ - -Socket.prototype.setFlags = function () { - this.flags = { - endpoint: this.namespace.name - , room: '' - }; - return this; -}; - -/** - * Triggered on disconnect - * - * @api private - */ - -Socket.prototype.onDisconnect = function (reason) { - if (!this.disconnected) { - this.$emit('disconnect', reason); - this.disconnected = true; - } -}; - -/** - * Joins a user to a room. - * - * @api public - */ - -Socket.prototype.join = function (name, fn) { - var nsp = this.namespace.name - , name = (nsp + '/') + name; - - this.manager.onJoin(this.id, name); - this.manager.store.publish('join', this.id, name); - - if (fn) { - this.log.warn('Client#join callback is deprecated'); - fn(); - } - - return this; -}; - -/** - * Un-joins a user from a room. - * - * @api public - */ - -Socket.prototype.leave = function (name, fn) { - var nsp = this.namespace.name - , name = (nsp + '/') + name; - - this.manager.onLeave(this.id, name); - this.manager.store.publish('leave', this.id, name); - - if (fn) { - this.log.warn('Client#leave callback is deprecated'); - fn(); - } - - return this; -}; - -/** - * Transmits a packet. - * - * @api private - */ - -Socket.prototype.packet = function (packet) { - if (this.flags.broadcast) { - this.log.debug('broadcasting packet'); - this.namespace.in(this.flags.room).except(this.id).packet(packet); - } else { - packet.endpoint = this.flags.endpoint; - packet = parser.encodePacket(packet); - - this.dispatch(packet, this.flags.volatile); - } - - this.setFlags(); - - return this; -}; - -/** - * Dispatches a packet - * - * @api private - */ - -Socket.prototype.dispatch = function (packet, volatile) { - if (this.manager.transports[this.id] && this.manager.transports[this.id].open) { - this.manager.transports[this.id].onDispatch(packet, volatile); - } else { - if (!volatile) { - this.manager.onClientDispatch(this.id, packet, volatile); - } - - this.manager.store.publish('dispatch:' + this.id, packet, volatile); - } -}; - -/** - * Stores data for the client. - * - * @api public - */ - -Socket.prototype.set = function (key, value, fn) { - this.store.set(key, value, fn); - return this; -}; - -/** - * Retrieves data for the client - * - * @api public - */ - -Socket.prototype.get = function (key, fn) { - this.store.get(key, fn); - return this; -}; - -/** - * Checks data for the client - * - * @api public - */ - -Socket.prototype.has = function (key, fn) { - this.store.has(key, fn); - return this; -}; - -/** - * Deletes data for the client - * - * @api public - */ - -Socket.prototype.del = function (key, fn) { - this.store.del(key, fn); - return this; -}; - -/** - * Kicks client - * - * @api public - */ - -Socket.prototype.disconnect = function () { - if (!this.disconnected) { - this.log.info('booting client'); - - if ('' === this.namespace.name) { - if (this.manager.transports[this.id] && this.manager.transports[this.id].open) { - this.manager.transports[this.id].onForcedDisconnect(); - } else { - this.manager.onClientDisconnect(this.id); - this.manager.store.publish('disconnect:' + this.id); - } - } else { - this.packet({type: 'disconnect'}); - this.manager.onLeave(this.id, this.namespace.name); - this.$emit('disconnect', 'booted'); - } - - } - - return this; -}; - -/** - * Send a message. - * - * @api public - */ - -Socket.prototype.send = function (data, fn) { - var packet = { - type: this.flags.json ? 'json' : 'message' - , data: data - }; - - if (fn) { - packet.id = ++this.ackPackets; - packet.ack = true; - this.acks[packet.id] = fn; - } - - return this.packet(packet); -}; - -/** - * Original emit function. - * - * @api private - */ - -Socket.prototype.$emit = EventEmitter.prototype.emit; - -/** - * Emit override for custom events. - * - * @api public - */ - -Socket.prototype.emit = function (ev) { - if (ev == 'newListener') { - return this.$emit.apply(this, arguments); - } - - var args = util.toArray(arguments).slice(1) - , lastArg = args[args.length - 1] - , packet = { - type: 'event' - , name: ev - }; - - if ('function' == typeof lastArg) { - packet.id = ++this.ackPackets; - packet.ack = lastArg.length ? 'data' : true; - this.acks[packet.id] = lastArg; - args = args.slice(0, args.length - 1); - } - - packet.args = args; - - return this.packet(packet); -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/static.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/static.js deleted file mode 100644 index fe505937..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/static.js +++ /dev/null @@ -1,395 +0,0 @@ - -/*! -* socket.io-node -* Copyright(c) 2011 LearnBoost -* MIT Licensed -*/ - -/** - * Module dependencies. - */ - -var client = require('socket.io-client') - , cp = require('child_process') - , fs = require('fs') - , util = require('./util'); - -/** - * File type details. - * - * @api private - */ - -var mime = { - js: { - type: 'application/javascript' - , encoding: 'utf8' - , gzip: true - } - , swf: { - type: 'application/x-shockwave-flash' - , encoding: 'binary' - , gzip: false - } -}; - -/** - * Regexp for matching custom transport patterns. Users can configure their own - * socket.io bundle based on the url structure. Different transport names are - * concatinated using the `+` char. /socket.io/socket.io+websocket.js should - * create a bundle that only contains support for the websocket. - * - * @api private - */ - -var bundle = /\+((?:\+)?[\w\-]+)*(?:\.v\d+\.\d+\.\d+)?(?:\.js)$/ - , versioning = /\.v\d+\.\d+\.\d+(?:\.js)$/; - -/** - * Export the constructor - */ - -exports = module.exports = Static; - -/** - * Static constructor - * - * @api public - */ - -function Static (manager) { - this.manager = manager; - this.cache = {}; - this.paths = {}; - - this.init(); -} - -/** - * Initialize the Static by adding default file paths. - * - * @api public - */ - -Static.prototype.init = function () { - /** - * Generates a unique id based the supplied transports array - * - * @param {Array} transports The array with transport types - * @api private - */ - function id (transports) { - var id = transports.join('').split('').map(function (char) { - return ('' + char.charCodeAt(0)).split('').pop(); - }).reduce(function (char, id) { - return char +id; - }); - - return client.version + ':' + id; - } - - /** - * Generates a socket.io-client file based on the supplied transports. - * - * @param {Array} transports The array with transport types - * @param {Function} callback Callback for the static.write - * @api private - */ - - function build (transports, callback) { - client.builder(transports, { - minify: self.manager.enabled('browser client minification') - }, function (err, content) { - callback(err, content ? new Buffer(content) : null, id(transports)); - } - ); - } - - var self = this; - - // add our default static files - this.add('/static/flashsocket/WebSocketMain.swf', { - file: client.dist + '/WebSocketMain.swf' - }); - - this.add('/static/flashsocket/WebSocketMainInsecure.swf', { - file: client.dist + '/WebSocketMainInsecure.swf' - }); - - // generates dedicated build based on the available transports - this.add('/socket.io.js', function (path, callback) { - build(self.manager.get('transports'), callback); - }); - - this.add('/socket.io.v', { mime: mime.js }, function (path, callback) { - build(self.manager.get('transports'), callback); - }); - - // allow custom builds based on url paths - this.add('/socket.io+', { mime: mime.js }, function (path, callback) { - var available = self.manager.get('transports') - , matches = path.match(bundle) - , transports = []; - - if (!matches) return callback('No valid transports'); - - // make sure they valid transports - matches[0].split('.')[0].split('+').slice(1).forEach(function (transport) { - if (!!~available.indexOf(transport)) { - transports.push(transport); - } - }); - - if (!transports.length) return callback('No valid transports'); - build(transports, callback); - }); - - // clear cache when transports change - this.manager.on('set:transports', function (key, value) { - delete self.cache['/socket.io.js']; - Object.keys(self.cache).forEach(function (key) { - if (bundle.test(key)) { - delete self.cache[key]; - } - }); - }); -}; - -/** - * Gzip compress buffers. - * - * @param {Buffer} data The buffer that needs gzip compression - * @param {Function} callback - * @api public - */ - -Static.prototype.gzip = function (data, callback) { - var gzip = cp.spawn('gzip', ['-9', '-c', '-f', '-n']) - , encoding = Buffer.isBuffer(data) ? 'binary' : 'utf8' - , buffer = [] - , err; - - gzip.stdout.on('data', function (data) { - buffer.push(data); - }); - - gzip.stderr.on('data', function (data) { - err = data +''; - buffer.length = 0; - }); - - gzip.on('close', function () { - if (err) return callback(err); - - var size = 0 - , index = 0 - , i = buffer.length - , content; - - while (i--) { - size += buffer[i].length; - } - - content = new Buffer(size); - i = buffer.length; - - buffer.forEach(function (buffer) { - var length = buffer.length; - - buffer.copy(content, index, 0, length); - index += length; - }); - - buffer.length = 0; - callback(null, content); - }); - - gzip.stdin.end(data, encoding); -}; - -/** - * Is the path a static file? - * - * @param {String} path The path that needs to be checked - * @api public - */ - -Static.prototype.has = function (path) { - // fast case - if (this.paths[path]) return this.paths[path]; - - var keys = Object.keys(this.paths) - , i = keys.length; - - while (i--) { - if (-~path.indexOf(keys[i])) return this.paths[keys[i]]; - } - - return false; -}; - -/** - * Add new paths new paths that can be served using the static provider. - * - * @param {String} path The path to respond to - * @param {Options} options Options for writing out the response - * @param {Function} [callback] Optional callback if no options.file is - * supplied this would be called instead. - * @api public - */ - -Static.prototype.add = function (path, options, callback) { - var extension = /(?:\.(\w{1,4}))$/.exec(path); - - if (!callback && typeof options == 'function') { - callback = options; - options = {}; - } - - options.mime = options.mime || (extension ? mime[extension[1]] : false); - - if (callback) options.callback = callback; - if (!(options.file || options.callback) || !options.mime) return false; - - this.paths[path] = options; - - return true; -}; - -/** - * Writes a static response. - * - * @param {String} path The path for the static content - * @param {HTTPRequest} req The request object - * @param {HTTPResponse} res The response object - * @api public - */ - -Static.prototype.write = function (path, req, res) { - /** - * Write a response without throwing errors because can throw error if the - * response is no longer writable etc. - * - * @api private - */ - - function write (status, headers, content, encoding) { - try { - res.writeHead(status, headers || undefined); - - // only write content if it's not a HEAD request and we actually have - // some content to write (304's doesn't have content). - res.end( - req.method !== 'HEAD' && content ? content : '' - , encoding || undefined - ); - } catch (e) {} - } - - /** - * Answers requests depending on the request properties and the reply object. - * - * @param {Object} reply The details and content to reply the response with - * @api private - */ - - function answer (reply) { - var cached = req.headers['if-none-match'] === reply.etag; - if (cached && self.manager.enabled('browser client etag')) { - return write(304); - } - - var accept = req.headers['accept-encoding'] || '' - , gzip = !!~accept.toLowerCase().indexOf('gzip') - , mime = reply.mime - , versioned = reply.versioned - , headers = { - 'Content-Type': mime.type - }; - - // check if we can add a etag - if (self.manager.enabled('browser client etag') && reply.etag && !versioned) { - headers['Etag'] = reply.etag; - } - - // see if we need to set Expire headers because the path is versioned - if (versioned) { - var expires = self.manager.get('browser client expires'); - headers['Cache-Control'] = 'private, x-gzip-ok="", max-age=' + expires; - headers['Date'] = new Date().toUTCString(); - headers['Expires'] = new Date(Date.now() + (expires * 1000)).toUTCString(); - } - - if (gzip && reply.gzip) { - headers['Content-Length'] = reply.gzip.length; - headers['Content-Encoding'] = 'gzip'; - headers['Vary'] = 'Accept-Encoding'; - write(200, headers, reply.gzip.content, mime.encoding); - } else { - headers['Content-Length'] = reply.length; - write(200, headers, reply.content, mime.encoding); - } - - self.manager.log.debug('served static content ' + path); - } - - var self = this - , details; - - // most common case first - if (this.manager.enabled('browser client cache') && this.cache[path]) { - return answer(this.cache[path]); - } else if (this.manager.get('browser client handler')) { - return this.manager.get('browser client handler').call(this, req, res); - } else if ((details = this.has(path))) { - /** - * A small helper function that will let us deal with fs and dynamic files - * - * @param {Object} err Optional error - * @param {Buffer} content The data - * @api private - */ - - function ready (err, content, etag) { - if (err) { - self.manager.log.warn('Unable to serve file. ' + (err.message || err)); - return write(500, null, 'Error serving static ' + path); - } - - // store the result in the cache - var reply = self.cache[path] = { - content: content - , length: content.length - , mime: details.mime - , etag: etag || client.version - , versioned: versioning.test(path) - }; - - // check if gzip is enabled - if (details.mime.gzip && self.manager.enabled('browser client gzip')) { - self.gzip(content, function (err, content) { - if (!err) { - reply.gzip = { - content: content - , length: content.length - } - } - - answer(reply); - }); - } else { - answer(reply); - } - } - - if (details.file) { - fs.readFile(details.file, ready); - } else if(details.callback) { - details.callback.call(this, path, ready); - } else { - write(404, null, 'File handle not found'); - } - } else { - write(404, null, 'File not found'); - } -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/store.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/store.js deleted file mode 100644 index 06c0389a..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/store.js +++ /dev/null @@ -1,98 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Expose the constructor. - */ - -exports = module.exports = Store; - -/** - * Module dependencies. - */ - -var EventEmitter = process.EventEmitter; - -/** - * Store interface - * - * @api public - */ - -function Store (options) { - this.options = options; - this.clients = {}; -}; - -/** - * Inherit from EventEmitter. - */ - -Store.prototype.__proto__ = EventEmitter.prototype; - -/** - * Initializes a client store - * - * @param {String} id - * @api public - */ - -Store.prototype.client = function (id) { - if (!this.clients[id]) { - this.clients[id] = new (this.constructor.Client)(this, id); - } - - return this.clients[id]; -}; - -/** - * Destroys a client - * - * @api {String} sid - * @param {Number} number of seconds to expire client data - * @api private - */ - -Store.prototype.destroyClient = function (id, expiration) { - if (this.clients[id]) { - this.clients[id].destroy(expiration); - delete this.clients[id]; - } - - return this; -}; - -/** - * Destroys the store - * - * @param {Number} number of seconds to expire client data - * @api private - */ - -Store.prototype.destroy = function (clientExpiration) { - var keys = Object.keys(this.clients) - , count = keys.length; - - for (var i = 0, l = count; i < l; i++) { - this.destroyClient(keys[i], clientExpiration); - } - - this.clients = {}; - - return this; -}; - -/** - * Client. - * - * @api public - */ - -Store.Client = function (store, id) { - this.store = store; - this.id = id; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/stores/memory.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/stores/memory.js deleted file mode 100644 index 8b731a79..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/stores/memory.js +++ /dev/null @@ -1,143 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var crypto = require('crypto') - , Store = require('../store'); - -/** - * Exports the constructor. - */ - -exports = module.exports = Memory; -Memory.Client = Client; - -/** - * Memory store - * - * @api public - */ - -function Memory (opts) { - Store.call(this, opts); -}; - -/** - * Inherits from Store. - */ - -Memory.prototype.__proto__ = Store.prototype; - -/** - * Publishes a message. - * - * @api private - */ - -Memory.prototype.publish = function () { }; - -/** - * Subscribes to a channel - * - * @api private - */ - -Memory.prototype.subscribe = function () { }; - -/** - * Unsubscribes - * - * @api private - */ - -Memory.prototype.unsubscribe = function () { }; - -/** - * Client constructor - * - * @api private - */ - -function Client () { - Store.Client.apply(this, arguments); - this.data = {}; -}; - -/** - * Inherits from Store.Client - */ - -Client.prototype.__proto__ = Store.Client; - -/** - * Gets a key - * - * @api public - */ - -Client.prototype.get = function (key, fn) { - fn(null, this.data[key] === undefined ? null : this.data[key]); - return this; -}; - -/** - * Sets a key - * - * @api public - */ - -Client.prototype.set = function (key, value, fn) { - this.data[key] = value; - fn && fn(null); - return this; -}; - -/** - * Has a key - * - * @api public - */ - -Client.prototype.has = function (key, fn) { - fn(null, key in this.data); -}; - -/** - * Deletes a key - * - * @api public - */ - -Client.prototype.del = function (key, fn) { - delete this.data[key]; - fn && fn(null); - return this; -}; - -/** - * Destroys the client. - * - * @param {Number} number of seconds to expire data - * @api private - */ - -Client.prototype.destroy = function (expiration) { - if ('number' != typeof expiration) { - this.data = {}; - } else { - var self = this; - - setTimeout(function () { - self.data = {}; - }, expiration * 1000); - } - - return this; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/stores/redis.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/stores/redis.js deleted file mode 100644 index 8fea235f..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/stores/redis.js +++ /dev/null @@ -1,269 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var crypto = require('crypto') - , Store = require('../store') - , assert = require('assert'); - -/** - * Exports the constructor. - */ - -exports = module.exports = Redis; -Redis.Client = Client; - -/** - * Redis store. - * Options: - * - nodeId (fn) gets an id that uniquely identifies this node - * - redis (fn) redis constructor, defaults to redis - * - redisPub (object) options to pass to the pub redis client - * - redisSub (object) options to pass to the sub redis client - * - redisClient (object) options to pass to the general redis client - * - pack (fn) custom packing, defaults to JSON or msgpack if installed - * - unpack (fn) custom packing, defaults to JSON or msgpack if installed - * - * @api public - */ - -function Redis (opts) { - opts = opts || {}; - - // node id to uniquely identify this node - var nodeId = opts.nodeId || function () { - // by default, we generate a random id - return Math.abs(Math.random() * Math.random() * Date.now() | 0); - }; - - this.nodeId = nodeId(); - - // packing / unpacking mechanism - if (opts.pack) { - this.pack = opts.pack; - this.unpack = opts.unpack; - } else { - try { - var msgpack = require('msgpack'); - this.pack = msgpack.pack; - this.unpack = msgpack.unpack; - } catch (e) { - this.pack = JSON.stringify; - this.unpack = JSON.parse; - } - } - - var redis = opts.redis || require('redis') - , RedisClient = redis.RedisClient; - - // initialize a pubsub client and a regular client - if (opts.redisPub instanceof RedisClient) { - this.pub = opts.redisPub; - } else { - opts.redisPub || (opts.redisPub = {}); - this.pub = redis.createClient(opts.redisPub.port, opts.redisPub.host, opts.redisPub); - } - if (opts.redisSub instanceof RedisClient) { - this.sub = opts.redisSub; - } else { - opts.redisSub || (opts.redisSub = {}); - this.sub = redis.createClient(opts.redisSub.port, opts.redisSub.host, opts.redisSub); - } - if (opts.redisClient instanceof RedisClient) { - this.cmd = opts.redisClient; - } else { - opts.redisClient || (opts.redisClient = {}); - this.cmd = redis.createClient(opts.redisClient.port, opts.redisClient.host, opts.redisClient); - } - - Store.call(this, opts); - - this.sub.setMaxListeners(0); - this.setMaxListeners(0); -}; - -/** - * Inherits from Store. - */ - -Redis.prototype.__proto__ = Store.prototype; - -/** - * Publishes a message. - * - * @api private - */ - -Redis.prototype.publish = function (name) { - var args = Array.prototype.slice.call(arguments, 1); - this.pub.publish(name, this.pack({ nodeId: this.nodeId, args: args })); - this.emit.apply(this, ['publish', name].concat(args)); -}; - -/** - * Subscribes to a channel - * - * @api private - */ - -Redis.prototype.subscribe = function (name, consumer, fn) { - this.sub.subscribe(name); - - if (consumer || fn) { - var self = this; - - self.sub.on('subscribe', function subscribe (ch) { - if (name == ch) { - function message (ch, msg) { - if (name == ch) { - msg = self.unpack(msg); - - // we check that the message consumed wasnt emitted by this node - if (self.nodeId != msg.nodeId) { - consumer.apply(null, msg.args); - } - } - }; - - self.sub.on('message', message); - - self.on('unsubscribe', function unsubscribe (ch) { - if (name == ch) { - self.sub.removeListener('message', message); - self.removeListener('unsubscribe', unsubscribe); - } - }); - - self.sub.removeListener('subscribe', subscribe); - - fn && fn(); - } - }); - } - - this.emit('subscribe', name, consumer, fn); -}; - -/** - * Unsubscribes - * - * @api private - */ - -Redis.prototype.unsubscribe = function (name, fn) { - this.sub.unsubscribe(name); - - if (fn) { - var client = this.sub; - - client.on('unsubscribe', function unsubscribe (ch) { - if (name == ch) { - fn(); - client.removeListener('unsubscribe', unsubscribe); - } - }); - } - - this.emit('unsubscribe', name, fn); -}; - -/** - * Destroys the store - * - * @api public - */ - -Redis.prototype.destroy = function () { - Store.prototype.destroy.call(this); - - this.pub.end(); - this.sub.end(); - this.cmd.end(); -}; - -/** - * Client constructor - * - * @api private - */ - -function Client (store, id) { - Store.Client.call(this, store, id); -}; - -/** - * Inherits from Store.Client - */ - -Client.prototype.__proto__ = Store.Client; - -/** - * Redis hash get - * - * @api private - */ - -Client.prototype.get = function (key, fn) { - this.store.cmd.hget(this.id, key, fn); - return this; -}; - -/** - * Redis hash set - * - * @api private - */ - -Client.prototype.set = function (key, value, fn) { - this.store.cmd.hset(this.id, key, value, fn); - return this; -}; - -/** - * Redis hash del - * - * @api private - */ - -Client.prototype.del = function (key, fn) { - this.store.cmd.hdel(this.id, key, fn); - return this; -}; - -/** - * Redis hash has - * - * @api private - */ - -Client.prototype.has = function (key, fn) { - this.store.cmd.hexists(this.id, key, function (err, has) { - if (err) return fn(err); - fn(null, !!has); - }); - return this; -}; - -/** - * Destroys client - * - * @param {Number} number of seconds to expire data - * @api private - */ - -Client.prototype.destroy = function (expiration) { - if ('number' != typeof expiration) { - this.store.cmd.del(this.id); - } else { - this.store.cmd.expire(this.id, expiration); - } - - return this; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transport.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transport.js deleted file mode 100644 index 2e4c08bd..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transport.js +++ /dev/null @@ -1,534 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var parser = require('./parser'); - -/** - * Expose the constructor. - */ - -exports = module.exports = Transport; - -/** - * Transport constructor. - * - * @api public - */ - -function Transport (mng, data, req) { - this.manager = mng; - this.id = data.id; - this.disconnected = false; - this.drained = true; - this.handleRequest(req); -}; - -/** - * Access the logger. - * - * @api public - */ - -Transport.prototype.__defineGetter__('log', function () { - return this.manager.log; -}); - -/** - * Access the store. - * - * @api public - */ - -Transport.prototype.__defineGetter__('store', function () { - return this.manager.store; -}); - -/** - * Handles a request when it's set. - * - * @api private - */ - -Transport.prototype.handleRequest = function (req) { - this.log.debug('setting request', req.method, req.url); - this.req = req; - - if (req.method == 'GET') { - this.socket = req.socket; - this.open = true; - this.drained = true; - this.setHeartbeatInterval(); - - this.setHandlers(); - this.onSocketConnect(); - } -}; - -/** - * Called when a connection is first set. - * - * @api private - */ - -Transport.prototype.onSocketConnect = function () { }; - -/** - * Sets transport handlers - * - * @api private - */ - -Transport.prototype.setHandlers = function () { - var self = this; - - // we need to do this in a pub/sub way since the client can POST the message - // over a different socket (ie: different Transport instance) - this.store.subscribe('heartbeat-clear:' + this.id, function () { - self.onHeartbeatClear(); - }); - - this.store.subscribe('disconnect-force:' + this.id, function () { - self.onForcedDisconnect(); - }); - - this.store.subscribe('dispatch:' + this.id, function (packet, volatile) { - self.onDispatch(packet, volatile); - }); - - this.bound = { - end: this.onSocketEnd.bind(this) - , close: this.onSocketClose.bind(this) - , error: this.onSocketError.bind(this) - , drain: this.onSocketDrain.bind(this) - }; - - this.socket.on('end', this.bound.end); - this.socket.on('close', this.bound.close); - this.socket.on('error', this.bound.error); - this.socket.on('drain', this.bound.drain); - - this.handlersSet = true; -}; - -/** - * Removes transport handlers - * - * @api private - */ - -Transport.prototype.clearHandlers = function () { - if (this.handlersSet) { - this.store.unsubscribe('disconnect-force:' + this.id); - this.store.unsubscribe('heartbeat-clear:' + this.id); - this.store.unsubscribe('dispatch:' + this.id); - - this.socket.removeListener('end', this.bound.end); - this.socket.removeListener('close', this.bound.close); - this.socket.removeListener('error', this.bound.error); - this.socket.removeListener('drain', this.bound.drain); - } -}; - -/** - * Called when the connection dies - * - * @api private - */ - -Transport.prototype.onSocketEnd = function () { - this.end('socket end'); -}; - -/** - * Called when the connection dies - * - * @api private - */ - -Transport.prototype.onSocketClose = function (error) { - this.end(error ? 'socket error' : 'socket close'); -}; - -/** - * Called when the connection has an error. - * - * @api private - */ - -Transport.prototype.onSocketError = function (err) { - if (this.open) { - this.socket.destroy(); - this.onClose(); - } - - this.log.info('socket error ' + err.stack); -}; - -/** - * Called when the connection is drained. - * - * @api private - */ - -Transport.prototype.onSocketDrain = function () { - this.drained = true; -}; - -/** - * Called upon receiving a heartbeat packet. - * - * @api private - */ - -Transport.prototype.onHeartbeatClear = function () { - this.clearHeartbeatTimeout(); - this.setHeartbeatInterval(); -}; - -/** - * Called upon a forced disconnection. - * - * @api private - */ - -Transport.prototype.onForcedDisconnect = function () { - if (!this.disconnected) { - this.log.info('transport end by forced client disconnection'); - if (this.open) { - this.packet({ type: 'disconnect' }); - } - this.end('booted'); - } -}; - -/** - * Dispatches a packet. - * - * @api private - */ - -Transport.prototype.onDispatch = function (packet, volatile) { - if (volatile) { - this.writeVolatile(packet); - } else { - this.write(packet); - } -}; - -/** - * Sets the close timeout. - */ - -Transport.prototype.setCloseTimeout = function () { - if (!this.closeTimeout) { - var self = this; - - this.closeTimeout = setTimeout(function () { - self.log.debug('fired close timeout for client', self.id); - self.closeTimeout = null; - self.end('close timeout'); - }, this.manager.get('close timeout') * 1000); - - this.log.debug('set close timeout for client', this.id); - } -}; - -/** - * Clears the close timeout. - */ - -Transport.prototype.clearCloseTimeout = function () { - if (this.closeTimeout) { - clearTimeout(this.closeTimeout); - this.closeTimeout = null; - - this.log.debug('cleared close timeout for client', this.id); - } -}; - -/** - * Sets the heartbeat timeout - */ - -Transport.prototype.setHeartbeatTimeout = function () { - if (!this.heartbeatTimeout && this.manager.enabled('heartbeats')) { - var self = this; - - this.heartbeatTimeout = setTimeout(function () { - self.log.debug('fired heartbeat timeout for client', self.id); - self.heartbeatTimeout = null; - self.end('heartbeat timeout'); - }, this.manager.get('heartbeat timeout') * 1000); - - this.log.debug('set heartbeat timeout for client', this.id); - } -}; - -/** - * Clears the heartbeat timeout - * - * @param text - */ - -Transport.prototype.clearHeartbeatTimeout = function () { - if (this.heartbeatTimeout && this.manager.enabled('heartbeats')) { - clearTimeout(this.heartbeatTimeout); - this.heartbeatTimeout = null; - this.log.debug('cleared heartbeat timeout for client', this.id); - } -}; - -/** - * Sets the heartbeat interval. To be called when a connection opens and when - * a heartbeat is received. - * - * @api private - */ - -Transport.prototype.setHeartbeatInterval = function () { - if (!this.heartbeatInterval && this.manager.enabled('heartbeats')) { - var self = this; - - this.heartbeatInterval = setTimeout(function () { - self.heartbeat(); - self.heartbeatInterval = null; - }, this.manager.get('heartbeat interval') * 1000); - - this.log.debug('set heartbeat interval for client', this.id); - } -}; - -/** - * Clears all timeouts. - * - * @api private - */ - -Transport.prototype.clearTimeouts = function () { - this.clearCloseTimeout(); - this.clearHeartbeatTimeout(); - this.clearHeartbeatInterval(); -}; - -/** - * Sends a heartbeat - * - * @api private - */ - -Transport.prototype.heartbeat = function () { - if (this.open) { - this.log.debug('emitting heartbeat for client', this.id); - this.packet({ type: 'heartbeat' }); - this.setHeartbeatTimeout(); - } - - return this; -}; - -/** - * Handles a message. - * - * @param {Object} packet object - * @api private - */ - -Transport.prototype.onMessage = function (packet) { - var current = this.manager.transports[this.id]; - - if ('heartbeat' == packet.type) { - this.log.debug('got heartbeat packet'); - - if (current && current.open) { - current.onHeartbeatClear(); - } else { - this.store.publish('heartbeat-clear:' + this.id); - } - } else { - if ('disconnect' == packet.type && packet.endpoint == '') { - this.log.debug('got disconnection packet'); - - if (current) { - current.onForcedDisconnect(); - } else { - this.store.publish('disconnect-force:' + this.id); - } - - return; - } - - if (packet.id && packet.ack != 'data') { - this.log.debug('acknowledging packet automatically'); - - var ack = parser.encodePacket({ - type: 'ack' - , ackId: packet.id - , endpoint: packet.endpoint || '' - }); - - if (current && current.open) { - current.onDispatch(ack); - } else { - this.manager.onClientDispatch(this.id, ack); - this.store.publish('dispatch:' + this.id, ack); - } - } - - // handle packet locally or publish it - if (current) { - this.manager.onClientMessage(this.id, packet); - } else { - this.store.publish('message:' + this.id, packet); - } - } -}; - -/** - * Clears the heartbeat interval - * - * @api private - */ - -Transport.prototype.clearHeartbeatInterval = function () { - if (this.heartbeatInterval && this.manager.enabled('heartbeats')) { - clearTimeout(this.heartbeatInterval); - this.heartbeatInterval = null; - this.log.debug('cleared heartbeat interval for client', this.id); - } -}; - -/** - * Finishes the connection and makes sure client doesn't reopen - * - * @api private - */ - -Transport.prototype.disconnect = function (reason) { - this.packet({ type: 'disconnect' }); - this.end(reason); - - return this; -}; - -/** - * Closes the connection. - * - * @api private - */ - -Transport.prototype.close = function () { - if (this.open) { - this.doClose(); - this.onClose(); - } -}; - -/** - * Called upon a connection close. - * - * @api private - */ - -Transport.prototype.onClose = function () { - if (this.open) { - this.setCloseTimeout(); - this.clearHandlers(); - this.open = false; - this.manager.onClose(this.id); - this.store.publish('close', this.id); - } -}; - -/** - * Cleans up the connection, considers the client disconnected. - * - * @api private - */ - -Transport.prototype.end = function (reason) { - if (!this.disconnected) { - this.log.info('transport end (' + reason + ')'); - - var local = this.manager.transports[this.id]; - - this.close(); - this.clearTimeouts(); - this.disconnected = true; - - if (local) { - this.manager.onClientDisconnect(this.id, reason, true); - } else { - this.store.publish('disconnect:' + this.id, reason); - } - } -}; - -/** - * Signals that the transport should pause and buffer data. - * - * @api public - */ - -Transport.prototype.discard = function () { - this.log.debug('discarding transport'); - this.discarded = true; - this.clearTimeouts(); - this.clearHandlers(); - - return this; -}; - -/** - * Writes an error packet with the specified reason and advice. - * - * @param {Number} advice - * @param {Number} reason - * @api public - */ - -Transport.prototype.error = function (reason, advice) { - this.packet({ - type: 'error' - , reason: reason - , advice: advice - }); - - this.log.warn(reason, advice ? ('client should ' + advice) : ''); - this.end('error'); -}; - -/** - * Write a packet. - * - * @api public - */ - -Transport.prototype.packet = function (obj) { - return this.write(parser.encodePacket(obj)); -}; - -/** - * Writes a volatile message. - * - * @api private - */ - -Transport.prototype.writeVolatile = function (msg) { - if (this.open) { - if (this.drained) { - this.write(msg); - } else { - this.log.debug('ignoring volatile packet, buffer not drained'); - } - } else { - this.log.debug('ignoring volatile packet, transport not open'); - } -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/flashsocket.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/flashsocket.js deleted file mode 100644 index dc2d78b4..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/flashsocket.js +++ /dev/null @@ -1,129 +0,0 @@ -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module requirements. - */ -var WebSocket = require('./websocket'); - -/** - * Export the constructor. - */ - -exports = module.exports = FlashSocket; - -/** - * The FlashSocket transport is just a proxy - * for WebSocket connections. - * - * @api public - */ - -function FlashSocket (mng, data, req) { - return WebSocket.call(this, mng, data, req); -} - -/** - * Inherits from WebSocket. - */ - -FlashSocket.prototype.__proto__ = WebSocket.prototype; - -/** - * Transport name - * - * @api public - */ - -FlashSocket.prototype.name = 'flashsocket'; - -/** - * Listens for new configuration changes of the Manager - * this way we can enable and disable the flash server. - * - * @param {Manager} Manager instance. - * @api private - */ - - -FlashSocket.init = function (manager) { - var server; - function create () { - - // Drop out immediately if the user has - // disabled the flash policy server - if (!manager.get('flash policy server')) { - return; - } - - server = require('policyfile').createServer({ - log: function(msg){ - manager.log.info(msg); - } - }, manager.get('origins')); - - server.on('close', function (e) { - server = null; - }); - - server.listen(manager.get('flash policy port'), manager.server); - - manager.flashPolicyServer = server; - } - - // listen for origin changes, so we can update the server - manager.on('set:origins', function (value, key) { - if (!server) return; - - // update the origins and compile a new response buffer - server.origins = Array.isArray(value) ? value : [value]; - server.compile(); - }); - - // destory the server and create a new server - manager.on('set:flash policy port', function (value, key) { - var transports = manager.get('transports'); - if (~transports.indexOf('flashsocket')) { - if (server) { - if (server.port === value) return; - // destroy the server and rebuild it on a new port - try { - server.close(); - } - catch (e) { /* ignore exception. could e.g. be that the server isn't started yet */ } - } - create(); - } - }); - - // create or destroy the server - manager.on('set:flash policy server', function (value, key) { - var transports = manager.get('transports'); - if (~transports.indexOf('flashsocket')) { - if (server && !value) { - // destroy the server - try { - server.close(); - } - catch (e) { /* ignore exception. could e.g. be that the server isn't started yet */ } - } - } else if (!server && value) { - // create the server - create(); - } - }); - - // only start the server - manager.on('set:transports', function (value, key){ - if (!server && ~manager.get('transports').indexOf('flashsocket')) { - create(); - } - }); - // check if we need to initialize at start - if (~manager.get('transports').indexOf('flashsocket')){ - create(); - } -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/htmlfile.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/htmlfile.js deleted file mode 100644 index e8709a31..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/htmlfile.js +++ /dev/null @@ -1,82 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module requirements. - */ - -var HTTPTransport = require('./http'); - -/** - * Export the constructor. - */ - -exports = module.exports = HTMLFile; - -/** - * HTMLFile transport constructor. - * - * @api public - */ - -function HTMLFile (mng, data, req) { - HTTPTransport.call(this, mng, data, req); -}; - -/** - * Inherits from Transport. - */ - -HTMLFile.prototype.__proto__ = HTTPTransport.prototype; - -/** - * Transport name - * - * @api public - */ - -HTMLFile.prototype.name = 'htmlfile'; - -/** - * Handles the request. - * - * @api private - */ - -HTMLFile.prototype.handleRequest = function (req) { - HTTPTransport.prototype.handleRequest.call(this, req); - - if (req.method == 'GET') { - req.res.writeHead(200, { - 'Content-Type': 'text/html; charset=UTF-8' - , 'Connection': 'keep-alive' - , 'Transfer-Encoding': 'chunked' - }); - - req.res.write( - '' - + '' - + new Array(174).join(' ') - ); - } -}; - -/** - * Performs the write. - * - * @api private - */ - -HTMLFile.prototype.write = function (data) { - data = ''; - - if (this.response.write(data)) { - this.drained = true; - } - - this.log.debug(this.name + ' writing', data); -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/http-polling.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/http-polling.js deleted file mode 100644 index 89b7e042..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/http-polling.js +++ /dev/null @@ -1,147 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module requirements. - */ - -var HTTPTransport = require('./http'); - -/** - * Exports the constructor. - */ - -exports = module.exports = HTTPPolling; - -/** - * HTTP polling constructor. - * - * @api public. - */ - -function HTTPPolling (mng, data, req) { - HTTPTransport.call(this, mng, data, req); -}; - -/** - * Inherits from HTTPTransport. - * - * @api public. - */ - -HTTPPolling.prototype.__proto__ = HTTPTransport.prototype; - -/** - * Transport name - * - * @api public - */ - -HTTPPolling.prototype.name = 'httppolling'; - -/** - * Override setHandlers - * - * @api private - */ - -HTTPPolling.prototype.setHandlers = function () { - HTTPTransport.prototype.setHandlers.call(this); - this.socket.removeListener('end', this.bound.end); - this.socket.removeListener('close', this.bound.close); -}; - -/** - * Removes heartbeat timeouts for polling. - */ - -HTTPPolling.prototype.setHeartbeatInterval = function () { - return this; -}; - -/** - * Handles a request - * - * @api private - */ - -HTTPPolling.prototype.handleRequest = function (req) { - HTTPTransport.prototype.handleRequest.call(this, req); - - if (req.method == 'GET') { - var self = this; - - this.pollTimeout = setTimeout(function () { - self.packet({ type: 'noop' }); - self.log.debug(self.name + ' closed due to exceeded duration'); - }, this.manager.get('polling duration') * 1000); - - this.log.debug('setting poll timeout'); - } -}; - -/** - * Clears polling timeout - * - * @api private - */ - -HTTPPolling.prototype.clearPollTimeout = function () { - if (this.pollTimeout) { - clearTimeout(this.pollTimeout); - this.pollTimeout = null; - this.log.debug('clearing poll timeout'); - } - - return this; -}; - -/** - * Override clear timeouts to clear the poll timeout - * - * @api private - */ - -HTTPPolling.prototype.clearTimeouts = function () { - HTTPTransport.prototype.clearTimeouts.call(this); - - this.clearPollTimeout(); -}; - -/** - * doWrite to clear poll timeout - * - * @api private - */ - -HTTPPolling.prototype.doWrite = function () { - this.clearPollTimeout(); -}; - -/** - * Performs a write. - * - * @api private. - */ - -HTTPPolling.prototype.write = function (data, close) { - this.doWrite(data); - this.response.end(); - this.onClose(); -}; - -/** - * Override end. - * - * @api private - */ - -HTTPPolling.prototype.end = function (reason) { - this.clearPollTimeout(); - return HTTPTransport.prototype.end.call(this, reason); -}; - diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/http.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/http.js deleted file mode 100644 index 28db794d..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/http.js +++ /dev/null @@ -1,121 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module requirements. - */ - -var Transport = require('../transport') - , parser = require('../parser') - , qs = require('querystring'); - -/** - * Export the constructor. - */ - -exports = module.exports = HTTPTransport; - -/** - * HTTP interface constructor. For all non-websocket transports. - * - * @api public - */ - -function HTTPTransport (mng, data, req) { - Transport.call(this, mng, data, req); -}; - -/** - * Inherits from Transport. - */ - -HTTPTransport.prototype.__proto__ = Transport.prototype; - -/** - * Handles a request. - * - * @api private - */ - -HTTPTransport.prototype.handleRequest = function (req) { - - // Always set the response in case an error is returned to the client - this.response = req.res; - - if (req.method == 'POST') { - var buffer = '' - , res = req.res - , origin = req.headers.origin - , headers = { 'Content-Length': 1, 'Content-Type': 'text/plain; charset=UTF-8' } - , self = this; - - req.on('data', function (data) { - buffer += data; - - if (Buffer.byteLength(buffer) >= self.manager.get('destroy buffer size')) { - buffer = ''; - req.connection.destroy(); - } - }); - - req.on('end', function () { - res.writeHead(200, headers); - res.end('1'); - - self.onData(self.postEncoded ? qs.parse(buffer).d : buffer); - }); - - // prevent memory leaks for uncompleted requests - req.on('close', function () { - buffer = ''; - self.onClose(); - }); - - if (origin) { - // https://developer.mozilla.org/En/HTTP_Access_Control - headers['Access-Control-Allow-Origin'] = origin; - headers['Access-Control-Allow-Credentials'] = 'true'; - } - } else { - Transport.prototype.handleRequest.call(this, req); - } -}; - -/** - * Handles data payload. - * - * @api private - */ - -HTTPTransport.prototype.onData = function (data) { - var messages = parser.decodePayload(data); - this.log.debug(this.name + ' received data packet', data); - - for (var i = 0, l = messages.length; i < l; i++) { - this.onMessage(messages[i]); - } -}; - -/** - * Closes the request-response cycle - * - * @api private - */ - -HTTPTransport.prototype.doClose = function () { - this.response.end(); -}; - -/** - * Writes a payload of messages - * - * @api private - */ - -HTTPTransport.prototype.payload = function (msgs) { - this.write(parser.encodePayload(msgs)); -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/index.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/index.js deleted file mode 100644 index b8655594..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/index.js +++ /dev/null @@ -1,12 +0,0 @@ - -/** - * Export transports. - */ - -module.exports = { - websocket: require('./websocket') - , flashsocket: require('./flashsocket') - , htmlfile: require('./htmlfile') - , 'xhr-polling': require('./xhr-polling') - , 'jsonp-polling': require('./jsonp-polling') -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/jsonp-polling.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/jsonp-polling.js deleted file mode 100644 index ad7d5aff..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/jsonp-polling.js +++ /dev/null @@ -1,97 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module requirements. - */ - -var HTTPPolling = require('./http-polling'); -var jsonpolling_re = /^\d+$/ - -/** - * Export the constructor. - */ - -exports = module.exports = JSONPPolling; - -/** - * JSON-P polling transport. - * - * @api public - */ - -function JSONPPolling (mng, data, req) { - HTTPPolling.call(this, mng, data, req); - - this.head = 'io.j[0]('; - this.foot = ');'; - - if (data.query.i && jsonpolling_re.test(data.query.i)) { - this.head = 'io.j[' + data.query.i + ']('; - } -}; - -/** - * Inherits from Transport. - */ - -JSONPPolling.prototype.__proto__ = HTTPPolling.prototype; - -/** - * Transport name - * - * @api public - */ - -JSONPPolling.prototype.name = 'jsonppolling'; - -/** - * Make sure POST are decoded. - */ - -JSONPPolling.prototype.postEncoded = true; - -/** - * Handles incoming data. - * Due to a bug in \n handling by browsers, we expect a JSONified string. - * - * @api private - */ - -JSONPPolling.prototype.onData = function (data) { - try { - data = JSON.parse(data); - } catch (e) { - this.error('parse', 'reconnect'); - return; - } - - HTTPPolling.prototype.onData.call(this, data); -}; - -/** - * Performs the write. - * - * @api private - */ - -JSONPPolling.prototype.doWrite = function (data) { - HTTPPolling.prototype.doWrite.call(this); - - var data = data === undefined - ? '' : this.head + JSON.stringify(data) + this.foot; - - this.response.writeHead(200, { - 'Content-Type': 'text/javascript; charset=UTF-8' - , 'Content-Length': Buffer.byteLength(data) - , 'Connection': 'Keep-Alive' - , 'X-XSS-Protection': '0' - }); - - this.response.write(data); - this.log.debug(this.name + ' writing', data); -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket.js deleted file mode 100644 index 78a43043..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket.js +++ /dev/null @@ -1,36 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module requirements. - */ - -var protocolVersions = require('./websocket/'); - -/** - * Export the constructor. - */ - -exports = module.exports = WebSocket; - -/** - * HTTP interface constructor. Interface compatible with all transports that - * depend on request-response cycles. - * - * @api public - */ - -function WebSocket (mng, data, req) { - var transport - , version = req.headers['sec-websocket-version']; - if (typeof version !== 'undefined' && typeof protocolVersions[version] !== 'undefined') { - transport = new protocolVersions[version](mng, data, req); - } - else transport = new protocolVersions['default'](mng, data, req); - if (typeof this.name !== 'undefined') transport.name = this.name; - return transport; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket/default.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket/default.js deleted file mode 100644 index 091fdd44..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket/default.js +++ /dev/null @@ -1,362 +0,0 @@ -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module requirements. - */ - -var Transport = require('../../transport') - , EventEmitter = process.EventEmitter - , crypto = require('crypto') - , parser = require('../../parser'); - -/** - * Export the constructor. - */ - -exports = module.exports = WebSocket; - -/** - * HTTP interface constructor. Interface compatible with all transports that - * depend on request-response cycles. - * - * @api public - */ - -function WebSocket (mng, data, req) { - // parser - var self = this; - - this.parser = new Parser(); - this.parser.on('data', function (packet) { - self.log.debug(self.name + ' received data packet', packet); - self.onMessage(parser.decodePacket(packet)); - }); - this.parser.on('close', function () { - self.end(); - }); - this.parser.on('error', function () { - self.end(); - }); - - Transport.call(this, mng, data, req); -}; - -/** - * Inherits from Transport. - */ - -WebSocket.prototype.__proto__ = Transport.prototype; - -/** - * Transport name - * - * @api public - */ - -WebSocket.prototype.name = 'websocket'; - -/** - * Websocket draft version - * - * @api public - */ - -WebSocket.prototype.protocolVersion = 'hixie-76'; - -/** - * Called when the socket connects. - * - * @api private - */ - -WebSocket.prototype.onSocketConnect = function () { - var self = this; - - this.socket.setNoDelay(true); - - this.buffer = true; - this.buffered = []; - - if (this.req.headers.upgrade !== 'WebSocket') { - this.log.warn(this.name + ' connection invalid'); - this.end(); - return; - } - - var origin = this.req.headers['origin'] - , waitingForNonce = false; - if(this.manager.settings['match origin protocol']){ - location = (origin.indexOf('https')>-1 ? 'wss' : 'ws') + '://' + this.req.headers.host + this.req.url; - }else if(this.socket.encrypted){ - location = 'wss://' + this.req.headers.host + this.req.url; - }else{ - location = 'ws://' + this.req.headers.host + this.req.url; - } - - if (this.req.headers['sec-websocket-key1']) { - // If we don't have the nonce yet, wait for it (HAProxy compatibility). - if (! (this.req.head && this.req.head.length >= 8)) { - waitingForNonce = true; - } - - var headers = [ - 'HTTP/1.1 101 WebSocket Protocol Handshake' - , 'Upgrade: WebSocket' - , 'Connection: Upgrade' - , 'Sec-WebSocket-Origin: ' + origin - , 'Sec-WebSocket-Location: ' + location - ]; - - if (this.req.headers['sec-websocket-protocol']){ - headers.push('Sec-WebSocket-Protocol: ' - + this.req.headers['sec-websocket-protocol']); - } - } else { - var headers = [ - 'HTTP/1.1 101 Web Socket Protocol Handshake' - , 'Upgrade: WebSocket' - , 'Connection: Upgrade' - , 'WebSocket-Origin: ' + origin - , 'WebSocket-Location: ' + location - ]; - } - - try { - this.socket.write(headers.concat('', '').join('\r\n')); - this.socket.setTimeout(0); - this.socket.setNoDelay(true); - this.socket.setEncoding('utf8'); - } catch (e) { - this.end(); - return; - } - - if (waitingForNonce) { - this.socket.setEncoding('binary'); - } else if (this.proveReception(headers)) { - self.flush(); - } - - var headBuffer = ''; - - this.socket.on('data', function (data) { - if (waitingForNonce) { - headBuffer += data; - - if (headBuffer.length < 8) { - return; - } - - // Restore the connection to utf8 encoding after receiving the nonce - self.socket.setEncoding('utf8'); - waitingForNonce = false; - - // Stuff the nonce into the location where it's expected to be - self.req.head = headBuffer.substr(0, 8); - headBuffer = ''; - - if (self.proveReception(headers)) { - self.flush(); - } - - return; - } - - self.parser.add(data); - }); -}; - -/** - * Writes to the socket. - * - * @api private - */ - -WebSocket.prototype.write = function (data) { - if (this.open) { - this.drained = false; - - if (this.buffer) { - this.buffered.push(data); - return this; - } - - var length = Buffer.byteLength(data) - , buffer = new Buffer(2 + length); - - buffer.write('\x00', 'binary'); - buffer.write(data, 1, 'utf8'); - buffer.write('\xff', 1 + length, 'binary'); - - try { - if (this.socket.write(buffer)) { - this.drained = true; - } - } catch (e) { - this.end(); - } - - this.log.debug(this.name + ' writing', data); - } -}; - -/** - * Flushes the internal buffer - * - * @api private - */ - -WebSocket.prototype.flush = function () { - this.buffer = false; - - for (var i = 0, l = this.buffered.length; i < l; i++) { - this.write(this.buffered.splice(0, 1)[0]); - } -}; - -/** - * Finishes the handshake. - * - * @api private - */ - -WebSocket.prototype.proveReception = function (headers) { - var self = this - , k1 = this.req.headers['sec-websocket-key1'] - , k2 = this.req.headers['sec-websocket-key2']; - - if (k1 && k2){ - var 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){ - self.log.warn('Invalid ' + self.name + ' key: "' + k + '".'); - self.end(); - return false; - } - - n /= spaces; - - md5.update(String.fromCharCode( - n >> 24 & 0xFF, - n >> 16 & 0xFF, - n >> 8 & 0xFF, - n & 0xFF)); - }); - - md5.update(this.req.head.toString('binary')); - - try { - this.socket.write(md5.digest('binary'), 'binary'); - } catch (e) { - this.end(); - } - } - - return true; -}; - -/** - * Writes a payload. - * - * @api private - */ - -WebSocket.prototype.payload = function (msgs) { - for (var i = 0, l = msgs.length; i < l; i++) { - this.write(msgs[i]); - } - - return this; -}; - -/** - * Closes the connection. - * - * @api private - */ - -WebSocket.prototype.doClose = function () { - this.socket.end(); -}; - -/** - * WebSocket parser - * - * @api public - */ - -function Parser () { - this.buffer = ''; - this.i = 0; -}; - -/** - * Inherits from EventEmitter. - */ - -Parser.prototype.__proto__ = EventEmitter.prototype; - -/** - * Adds data to the buffer. - * - * @api public - */ - -Parser.prototype.add = function (data) { - this.buffer += data; - this.parse(); -}; - -/** - * Parses the buffer. - * - * @api private - */ - -Parser.prototype.parse = function () { - for (var i = this.i, chr, l = this.buffer.length; i < l; i++){ - chr = this.buffer[i]; - - if (this.buffer.length == 2 && this.buffer[1] == '\u0000') { - this.emit('close'); - this.buffer = ''; - this.i = 0; - return; - } - - if (i === 0){ - if (chr != '\u0000') - this.error('Bad framing. Expected null byte as first frame'); - else - continue; - } - - if (chr == '\ufffd'){ - this.emit('data', this.buffer.substr(1, i - 1)); - this.buffer = this.buffer.substr(i + 1); - this.i = 0; - return this.parse(); - } - } -}; - -/** - * Handles an error - * - * @api private - */ - -Parser.prototype.error = function (reason) { - this.buffer = ''; - this.i = 0; - this.emit('error', reason); - return this; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket/hybi-07-12.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket/hybi-07-12.js deleted file mode 100644 index 44f666a5..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket/hybi-07-12.js +++ /dev/null @@ -1,622 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module requirements. - */ - -var Transport = require('../../transport') - , EventEmitter = process.EventEmitter - , crypto = require('crypto') - , url = require('url') - , parser = require('../../parser') - , util = require('../../util'); - -/** - * Export the constructor. - */ - -exports = module.exports = WebSocket; -exports.Parser = Parser; - -/** - * HTTP interface constructor. Interface compatible with all transports that - * depend on request-response cycles. - * - * @api public - */ - -function WebSocket (mng, data, req) { - // parser - var self = this; - - this.manager = mng; - this.parser = new Parser(); - this.parser.on('data', function (packet) { - self.onMessage(parser.decodePacket(packet)); - }); - this.parser.on('ping', function () { - // version 8 ping => pong - try { - self.socket.write('\u008a\u0000'); - } - catch (e) { - self.end(); - return; - } - }); - this.parser.on('close', function () { - self.end(); - }); - this.parser.on('error', function (reason) { - self.log.warn(self.name + ' parser error: ' + reason); - self.end(); - }); - - Transport.call(this, mng, data, req); -}; - -/** - * Inherits from Transport. - */ - -WebSocket.prototype.__proto__ = Transport.prototype; - -/** - * Transport name - * - * @api public - */ - -WebSocket.prototype.name = 'websocket'; - -/** - * Websocket draft version - * - * @api public - */ - -WebSocket.prototype.protocolVersion = '07-12'; - -/** - * Called when the socket connects. - * - * @api private - */ - -WebSocket.prototype.onSocketConnect = function () { - var self = this; - - if (typeof this.req.headers.upgrade === 'undefined' || - this.req.headers.upgrade.toLowerCase() !== 'websocket') { - this.log.warn(this.name + ' connection invalid'); - this.end(); - return; - } - - var origin = this.req.headers['sec-websocket-origin'] - , location = ((this.manager.settings['match origin protocol'] ? - origin.match(/^https/) : this.socket.encrypted) ? - 'wss' : 'ws') - + '://' + this.req.headers.host + this.req.url; - - if (!this.verifyOrigin(origin)) { - this.log.warn(this.name + ' connection invalid: origin mismatch'); - this.end(); - return; - } - - if (!this.req.headers['sec-websocket-key']) { - this.log.warn(this.name + ' connection invalid: received no key'); - this.end(); - return; - } - - // calc key - var key = this.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 - ]; - - try { - this.socket.write(headers.concat('', '').join('\r\n')); - this.socket.setTimeout(0); - this.socket.setNoDelay(true); - } catch (e) { - this.end(); - return; - } - - this.socket.on('data', function (data) { - self.parser.add(data); - }); -}; - -/** - * Verifies the origin of a request. - * - * @api private - */ - -WebSocket.prototype.verifyOrigin = function (origin) { - var origins = this.manager.get('origins'); - - if (origin === 'null') origin = '*'; - - if (origins.indexOf('*:*') !== -1) { - return true; - } - - if (origin) { - try { - var parts = url.parse(origin); - parts.port = parts.port || 80; - var ok = - ~origins.indexOf(parts.hostname + ':' + parts.port) || - ~origins.indexOf(parts.hostname + ':*') || - ~origins.indexOf('*:' + parts.port); - if (!ok) this.log.warn('illegal origin: ' + origin); - return ok; - } catch (ex) { - this.log.warn('error parsing origin'); - } - } - else { - this.log.warn('origin missing from websocket call, yet required by config'); - } - return false; -}; - -/** - * Writes to the socket. - * - * @api private - */ - -WebSocket.prototype.write = function (data) { - if (this.open) { - var buf = this.frame(0x81, data); - try { - this.socket.write(buf, 'binary'); - } - catch (e) { - this.end(); - return; - } - this.log.debug(this.name + ' writing', data); - } -}; - -/** - * Writes a payload. - * - * @api private - */ - -WebSocket.prototype.payload = function (msgs) { - for (var i = 0, l = msgs.length; i < l; i++) { - this.write(msgs[i]); - } - - return this; -}; - -/** - * Frame server-to-client output as a text packet. - * - * @api private - */ - -WebSocket.prototype.frame = function (opcode, str) { - var dataBuffer = new Buffer(str) - , dataLength = dataBuffer.length - , startOffset = 2 - , secondByte = dataLength; - if (dataLength > 65536) { - startOffset = 10; - secondByte = 127; - } - else if (dataLength > 125) { - startOffset = 4; - secondByte = 126; - } - var outputBuffer = new Buffer(dataLength + startOffset); - outputBuffer[0] = opcode; - outputBuffer[1] = secondByte; - dataBuffer.copy(outputBuffer, startOffset); - switch (secondByte) { - case 126: - outputBuffer[2] = dataLength >>> 8; - outputBuffer[3] = dataLength % 256; - break; - case 127: - var l = dataLength; - for (var i = 1; i <= 8; ++i) { - outputBuffer[startOffset - i] = l & 0xff; - l >>>= 8; - } - } - return outputBuffer; -}; - -/** - * Closes the connection. - * - * @api private - */ - -WebSocket.prototype.doClose = function () { - this.socket.end(); -}; - -/** - * WebSocket parser - * - * @api public - */ - -function Parser () { - this.state = { - activeFragmentedOperation: null, - lastFragment: false, - masked: false, - opcode: 0 - }; - this.overflow = null; - this.expectOffset = 0; - this.expectBuffer = null; - this.expectHandler = null; - this.currentMessage = ''; - - var self = this; - this.opcodeHandlers = { - // text - '1': function(data) { - var finish = function(mask, data) { - self.currentMessage += self.unmask(mask, data); - if (self.state.lastFragment) { - self.emit('data', self.currentMessage); - self.currentMessage = ''; - } - self.endPacket(); - } - - var expectData = function(length) { - if (self.state.masked) { - self.expect('Mask', 4, function(data) { - var mask = data; - self.expect('Data', length, function(data) { - finish(mask, data); - }); - }); - } - else { - self.expect('Data', length, function(data) { - finish(null, data); - }); - } - } - - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength < 126) { - expectData(firstLength); - } - else if (firstLength == 126) { - self.expect('Length', 2, function(data) { - expectData(util.unpack(data)); - }); - } - else if (firstLength == 127) { - self.expect('Length', 8, function(data) { - if (util.unpack(data.slice(0, 4)) != 0) { - self.error('packets with length spanning more than 32 bit is currently not supported'); - return; - } - var lengthBytes = data.slice(4); // note: cap to 32 bit length - expectData(util.unpack(data)); - }); - } - }, - // binary - '2': function(data) { - var finish = function(mask, data) { - if (typeof self.currentMessage == 'string') self.currentMessage = []; // build a buffer list - self.currentMessage.push(self.unmask(mask, data, true)); - if (self.state.lastFragment) { - self.emit('binary', self.concatBuffers(self.currentMessage)); - self.currentMessage = ''; - } - self.endPacket(); - } - - var expectData = function(length) { - if (self.state.masked) { - self.expect('Mask', 4, function(data) { - var mask = data; - self.expect('Data', length, function(data) { - finish(mask, data); - }); - }); - } - else { - self.expect('Data', length, function(data) { - finish(null, data); - }); - } - } - - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength < 126) { - expectData(firstLength); - } - else if (firstLength == 126) { - self.expect('Length', 2, function(data) { - expectData(util.unpack(data)); - }); - } - else if (firstLength == 127) { - self.expect('Length', 8, function(data) { - if (util.unpack(data.slice(0, 4)) != 0) { - self.error('packets with length spanning more than 32 bit is currently not supported'); - return; - } - var lengthBytes = data.slice(4); // note: cap to 32 bit length - expectData(util.unpack(data)); - }); - } - }, - // close - '8': function(data) { - self.emit('close'); - self.reset(); - }, - // ping - '9': function(data) { - if (self.state.lastFragment == false) { - self.error('fragmented ping is not supported'); - return; - } - - var finish = function(mask, data) { - self.emit('ping', self.unmask(mask, data)); - self.endPacket(); - } - - var expectData = function(length) { - if (self.state.masked) { - self.expect('Mask', 4, function(data) { - var mask = data; - self.expect('Data', length, function(data) { - finish(mask, data); - }); - }); - } - else { - self.expect('Data', length, function(data) { - finish(null, data); - }); - } - } - - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength == 0) { - finish(null, null); - } - else if (firstLength < 126) { - expectData(firstLength); - } - else if (firstLength == 126) { - self.expect('Length', 2, function(data) { - expectData(util.unpack(data)); - }); - } - else if (firstLength == 127) { - self.expect('Length', 8, function(data) { - expectData(util.unpack(data)); - }); - } - } - } - - this.expect('Opcode', 2, this.processPacket); -}; - -/** - * Inherits from EventEmitter. - */ - -Parser.prototype.__proto__ = EventEmitter.prototype; - -/** - * Add new data to the parser. - * - * @api public - */ - -Parser.prototype.add = function(data) { - if (this.expectBuffer == null) { - this.addToOverflow(data); - return; - } - var toRead = Math.min(data.length, this.expectBuffer.length - this.expectOffset); - data.copy(this.expectBuffer, this.expectOffset, 0, toRead); - this.expectOffset += toRead; - if (toRead < data.length) { - // at this point the overflow buffer shouldn't at all exist - this.overflow = new Buffer(data.length - toRead); - data.copy(this.overflow, 0, toRead, toRead + this.overflow.length); - } - if (this.expectOffset == this.expectBuffer.length) { - var bufferForHandler = this.expectBuffer; - this.expectBuffer = null; - this.expectOffset = 0; - this.expectHandler.call(this, bufferForHandler); - } -} - -/** - * Adds a piece of data to the overflow. - * - * @api private - */ - -Parser.prototype.addToOverflow = function(data) { - if (this.overflow == null) this.overflow = data; - else { - var prevOverflow = this.overflow; - this.overflow = new Buffer(this.overflow.length + data.length); - prevOverflow.copy(this.overflow, 0); - data.copy(this.overflow, prevOverflow.length); - } -} - -/** - * Waits for a certain amount of bytes to be available, then fires a callback. - * - * @api private - */ - -Parser.prototype.expect = function(what, length, handler) { - this.expectBuffer = new Buffer(length); - this.expectOffset = 0; - this.expectHandler = handler; - if (this.overflow != null) { - var toOverflow = this.overflow; - this.overflow = null; - this.add(toOverflow); - } -} - -/** - * Start processing a new packet. - * - * @api private - */ - -Parser.prototype.processPacket = function (data) { - if ((data[0] & 0x70) != 0) { - this.error('reserved fields must be empty'); - } - this.state.lastFragment = (data[0] & 0x80) == 0x80; - this.state.masked = (data[1] & 0x80) == 0x80; - var opcode = data[0] & 0xf; - if (opcode == 0) { - // continuation frame - this.state.opcode = this.state.activeFragmentedOperation; - if (!(this.state.opcode == 1 || this.state.opcode == 2)) { - this.error('continuation frame cannot follow current opcode') - return; - } - } - else { - this.state.opcode = opcode; - if (this.state.lastFragment === false) { - this.state.activeFragmentedOperation = opcode; - } - } - var handler = this.opcodeHandlers[this.state.opcode]; - if (typeof handler == 'undefined') this.error('no handler for opcode ' + this.state.opcode); - else handler(data); -} - -/** - * Endprocessing a packet. - * - * @api private - */ - -Parser.prototype.endPacket = function() { - 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.expect('Opcode', 2, this.processPacket); -} - -/** - * Reset the parser state. - * - * @api private - */ - -Parser.prototype.reset = function() { - this.state = { - activeFragmentedOperation: null, - lastFragment: false, - masked: false, - opcode: 0 - }; - this.expectOffset = 0; - this.expectBuffer = null; - this.expectHandler = null; - this.overflow = null; - this.currentMessage = ''; -} - -/** - * Unmask received data. - * - * @api private - */ - -Parser.prototype.unmask = function (mask, buf, binary) { - if (mask != null) { - for (var i = 0, ll = buf.length; i < ll; i++) { - buf[i] ^= mask[i % 4]; - } - } - if (binary) return buf; - return buf != null ? buf.toString('utf8') : ''; -} - -/** - * Concatenates a list of buffers. - * - * @api private - */ - -Parser.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); - var offset = 0; - for (var i = 0, l = buffers.length; i < l; ++i) { - buffers[i].copy(mergedBuffer, offset); - offset += buffers[i].length; - } - return mergedBuffer; -} - -/** - * Handles an error - * - * @api private - */ - -Parser.prototype.error = function (reason) { - this.reset(); - this.emit('error', reason); - return this; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket/hybi-16.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket/hybi-16.js deleted file mode 100644 index 69967dad..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket/hybi-16.js +++ /dev/null @@ -1,622 +0,0 @@ -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module requirements. - */ - -var Transport = require('../../transport') - , EventEmitter = process.EventEmitter - , crypto = require('crypto') - , url = require('url') - , parser = require('../../parser') - , util = require('../../util'); - -/** - * Export the constructor. - */ - -exports = module.exports = WebSocket; -exports.Parser = Parser; - -/** - * HTTP interface constructor. Interface compatible with all transports that - * depend on request-response cycles. - * - * @api public - */ - -function WebSocket (mng, data, req) { - // parser - var self = this; - - this.manager = mng; - this.parser = new Parser(); - this.parser.on('data', function (packet) { - self.onMessage(parser.decodePacket(packet)); - }); - this.parser.on('ping', function () { - // version 8 ping => pong - try { - self.socket.write('\u008a\u0000'); - } - catch (e) { - self.end(); - return; - } - }); - this.parser.on('close', function () { - self.end(); - }); - this.parser.on('error', function (reason) { - self.log.warn(self.name + ' parser error: ' + reason); - self.end(); - }); - - Transport.call(this, mng, data, req); -}; - -/** - * Inherits from Transport. - */ - -WebSocket.prototype.__proto__ = Transport.prototype; - -/** - * Transport name - * - * @api public - */ - -WebSocket.prototype.name = 'websocket'; - -/** - * Websocket draft version - * - * @api public - */ - -WebSocket.prototype.protocolVersion = '16'; - -/** - * Called when the socket connects. - * - * @api private - */ - -WebSocket.prototype.onSocketConnect = function () { - var self = this; - - if (typeof this.req.headers.upgrade === 'undefined' || - this.req.headers.upgrade.toLowerCase() !== 'websocket') { - this.log.warn(this.name + ' connection invalid'); - this.end(); - return; - } - - var origin = this.req.headers['origin'] || '' - , location = ((this.manager.settings['match origin protocol'] ? - origin.match(/^https/) : this.socket.encrypted) ? - 'wss' : 'ws') - + '://' + this.req.headers.host + this.req.url; - - if (!this.verifyOrigin(origin)) { - this.log.warn(this.name + ' connection invalid: origin mismatch'); - this.end(); - return; - } - - if (!this.req.headers['sec-websocket-key']) { - this.log.warn(this.name + ' connection invalid: received no key'); - this.end(); - return; - } - - // calc key - var key = this.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 - ]; - - try { - this.socket.write(headers.concat('', '').join('\r\n')); - this.socket.setTimeout(0); - this.socket.setNoDelay(true); - } catch (e) { - this.end(); - return; - } - - this.socket.on('data', function (data) { - self.parser.add(data); - }); -}; - -/** - * Verifies the origin of a request. - * - * @api private - */ - -WebSocket.prototype.verifyOrigin = function (origin) { - var origins = this.manager.get('origins'); - - if (origin === 'null') origin = '*'; - - if (origins.indexOf('*:*') !== -1) { - return true; - } - - if (origin) { - try { - var parts = url.parse(origin); - parts.port = parts.port || 80; - var ok = - ~origins.indexOf(parts.hostname + ':' + parts.port) || - ~origins.indexOf(parts.hostname + ':*') || - ~origins.indexOf('*:' + parts.port); - if (!ok) this.log.warn('illegal origin: ' + origin); - return ok; - } catch (ex) { - this.log.warn('error parsing origin'); - } - } - else { - this.log.warn('origin missing from websocket call, yet required by config'); - } - return false; -}; - -/** - * Writes to the socket. - * - * @api private - */ - -WebSocket.prototype.write = function (data) { - if (this.open) { - var buf = this.frame(0x81, data); - try { - this.socket.write(buf, 'binary'); - } - catch (e) { - this.end(); - return; - } - this.log.debug(this.name + ' writing', data); - } -}; - -/** - * Writes a payload. - * - * @api private - */ - -WebSocket.prototype.payload = function (msgs) { - for (var i = 0, l = msgs.length; i < l; i++) { - this.write(msgs[i]); - } - - return this; -}; - -/** - * Frame server-to-client output as a text packet. - * - * @api private - */ - -WebSocket.prototype.frame = function (opcode, str) { - var dataBuffer = new Buffer(str) - , dataLength = dataBuffer.length - , startOffset = 2 - , secondByte = dataLength; - if (dataLength > 65536) { - startOffset = 10; - secondByte = 127; - } - else if (dataLength > 125) { - startOffset = 4; - secondByte = 126; - } - var outputBuffer = new Buffer(dataLength + startOffset); - outputBuffer[0] = opcode; - outputBuffer[1] = secondByte; - dataBuffer.copy(outputBuffer, startOffset); - switch (secondByte) { - case 126: - outputBuffer[2] = dataLength >>> 8; - outputBuffer[3] = dataLength % 256; - break; - case 127: - var l = dataLength; - for (var i = 1; i <= 8; ++i) { - outputBuffer[startOffset - i] = l & 0xff; - l >>>= 8; - } - } - return outputBuffer; -}; - -/** - * Closes the connection. - * - * @api private - */ - -WebSocket.prototype.doClose = function () { - this.socket.end(); -}; - -/** - * WebSocket parser - * - * @api public - */ - -function Parser () { - this.state = { - activeFragmentedOperation: null, - lastFragment: false, - masked: false, - opcode: 0 - }; - this.overflow = null; - this.expectOffset = 0; - this.expectBuffer = null; - this.expectHandler = null; - this.currentMessage = ''; - - var self = this; - this.opcodeHandlers = { - // text - '1': function(data) { - var finish = function(mask, data) { - self.currentMessage += self.unmask(mask, data); - if (self.state.lastFragment) { - self.emit('data', self.currentMessage); - self.currentMessage = ''; - } - self.endPacket(); - } - - var expectData = function(length) { - if (self.state.masked) { - self.expect('Mask', 4, function(data) { - var mask = data; - self.expect('Data', length, function(data) { - finish(mask, data); - }); - }); - } - else { - self.expect('Data', length, function(data) { - finish(null, data); - }); - } - } - - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength < 126) { - expectData(firstLength); - } - else if (firstLength == 126) { - self.expect('Length', 2, function(data) { - expectData(util.unpack(data)); - }); - } - else if (firstLength == 127) { - self.expect('Length', 8, function(data) { - if (util.unpack(data.slice(0, 4)) != 0) { - self.error('packets with length spanning more than 32 bit is currently not supported'); - return; - } - var lengthBytes = data.slice(4); // note: cap to 32 bit length - expectData(util.unpack(data)); - }); - } - }, - // binary - '2': function(data) { - var finish = function(mask, data) { - if (typeof self.currentMessage == 'string') self.currentMessage = []; // build a buffer list - self.currentMessage.push(self.unmask(mask, data, true)); - if (self.state.lastFragment) { - self.emit('binary', self.concatBuffers(self.currentMessage)); - self.currentMessage = ''; - } - self.endPacket(); - } - - var expectData = function(length) { - if (self.state.masked) { - self.expect('Mask', 4, function(data) { - var mask = data; - self.expect('Data', length, function(data) { - finish(mask, data); - }); - }); - } - else { - self.expect('Data', length, function(data) { - finish(null, data); - }); - } - } - - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength < 126) { - expectData(firstLength); - } - else if (firstLength == 126) { - self.expect('Length', 2, function(data) { - expectData(util.unpack(data)); - }); - } - else if (firstLength == 127) { - self.expect('Length', 8, function(data) { - if (util.unpack(data.slice(0, 4)) != 0) { - self.error('packets with length spanning more than 32 bit is currently not supported'); - return; - } - var lengthBytes = data.slice(4); // note: cap to 32 bit length - expectData(util.unpack(data)); - }); - } - }, - // close - '8': function(data) { - self.emit('close'); - self.reset(); - }, - // ping - '9': function(data) { - if (self.state.lastFragment == false) { - self.error('fragmented ping is not supported'); - return; - } - - var finish = function(mask, data) { - self.emit('ping', self.unmask(mask, data)); - self.endPacket(); - } - - var expectData = function(length) { - if (self.state.masked) { - self.expect('Mask', 4, function(data) { - var mask = data; - self.expect('Data', length, function(data) { - finish(mask, data); - }); - }); - } - else { - self.expect('Data', length, function(data) { - finish(null, data); - }); - } - } - - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength == 0) { - finish(null, null); - } - else if (firstLength < 126) { - expectData(firstLength); - } - else if (firstLength == 126) { - self.expect('Length', 2, function(data) { - expectData(util.unpack(data)); - }); - } - else if (firstLength == 127) { - self.expect('Length', 8, function(data) { - expectData(util.unpack(data)); - }); - } - } - } - - this.expect('Opcode', 2, this.processPacket); -}; - -/** - * Inherits from EventEmitter. - */ - -Parser.prototype.__proto__ = EventEmitter.prototype; - -/** - * Add new data to the parser. - * - * @api public - */ - -Parser.prototype.add = function(data) { - if (this.expectBuffer == null) { - this.addToOverflow(data); - return; - } - var toRead = Math.min(data.length, this.expectBuffer.length - this.expectOffset); - data.copy(this.expectBuffer, this.expectOffset, 0, toRead); - this.expectOffset += toRead; - if (toRead < data.length) { - // at this point the overflow buffer shouldn't at all exist - this.overflow = new Buffer(data.length - toRead); - data.copy(this.overflow, 0, toRead, toRead + this.overflow.length); - } - if (this.expectOffset == this.expectBuffer.length) { - var bufferForHandler = this.expectBuffer; - this.expectBuffer = null; - this.expectOffset = 0; - this.expectHandler.call(this, bufferForHandler); - } -} - -/** - * Adds a piece of data to the overflow. - * - * @api private - */ - -Parser.prototype.addToOverflow = function(data) { - if (this.overflow == null) this.overflow = data; - else { - var prevOverflow = this.overflow; - this.overflow = new Buffer(this.overflow.length + data.length); - prevOverflow.copy(this.overflow, 0); - data.copy(this.overflow, prevOverflow.length); - } -} - -/** - * Waits for a certain amount of bytes to be available, then fires a callback. - * - * @api private - */ - -Parser.prototype.expect = function(what, length, handler) { - this.expectBuffer = new Buffer(length); - this.expectOffset = 0; - this.expectHandler = handler; - if (this.overflow != null) { - var toOverflow = this.overflow; - this.overflow = null; - this.add(toOverflow); - } -} - -/** - * Start processing a new packet. - * - * @api private - */ - -Parser.prototype.processPacket = function (data) { - if ((data[0] & 0x70) != 0) { - this.error('reserved fields must be empty'); - return; - } - this.state.lastFragment = (data[0] & 0x80) == 0x80; - this.state.masked = (data[1] & 0x80) == 0x80; - var opcode = data[0] & 0xf; - if (opcode == 0) { - // continuation frame - this.state.opcode = this.state.activeFragmentedOperation; - if (!(this.state.opcode == 1 || this.state.opcode == 2)) { - this.error('continuation frame cannot follow current opcode') - return; - } - } - else { - this.state.opcode = opcode; - if (this.state.lastFragment === false) { - this.state.activeFragmentedOperation = opcode; - } - } - var handler = this.opcodeHandlers[this.state.opcode]; - if (typeof handler == 'undefined') this.error('no handler for opcode ' + this.state.opcode); - else handler(data); -} - -/** - * Endprocessing a packet. - * - * @api private - */ - -Parser.prototype.endPacket = function() { - 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.expect('Opcode', 2, this.processPacket); -} - -/** - * Reset the parser state. - * - * @api private - */ - -Parser.prototype.reset = function() { - this.state = { - activeFragmentedOperation: null, - lastFragment: false, - masked: false, - opcode: 0 - }; - this.expectOffset = 0; - this.expectBuffer = null; - this.expectHandler = null; - this.overflow = null; - this.currentMessage = ''; -} - -/** - * Unmask received data. - * - * @api private - */ - -Parser.prototype.unmask = function (mask, buf, binary) { - if (mask != null) { - for (var i = 0, ll = buf.length; i < ll; i++) { - buf[i] ^= mask[i % 4]; - } - } - if (binary) return buf; - return buf != null ? buf.toString('utf8') : ''; -} - -/** - * Concatenates a list of buffers. - * - * @api private - */ - -Parser.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); - var offset = 0; - for (var i = 0, l = buffers.length; i < l; ++i) { - buffers[i].copy(mergedBuffer, offset); - offset += buffers[i].length; - } - return mergedBuffer; -} - -/** - * Handles an error - * - * @api private - */ - -Parser.prototype.error = function (reason) { - this.reset(); - this.emit('error', reason); - return this; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket/index.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket/index.js deleted file mode 100644 index 3a952b75..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket/index.js +++ /dev/null @@ -1,11 +0,0 @@ - -/** - * Export websocket versions. - */ - -module.exports = { - 7: require('./hybi-07-12'), - 8: require('./hybi-07-12'), - 13: require('./hybi-16'), - default: require('./default') -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/xhr-polling.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/xhr-polling.js deleted file mode 100644 index 1db5aeee..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/transports/xhr-polling.js +++ /dev/null @@ -1,69 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module requirements. - */ - -var HTTPPolling = require('./http-polling'); - -/** - * Export the constructor. - */ - -exports = module.exports = XHRPolling; - -/** - * Ajax polling transport. - * - * @api public - */ - -function XHRPolling (mng, data, req) { - HTTPPolling.call(this, mng, data, req); -}; - -/** - * Inherits from Transport. - */ - -XHRPolling.prototype.__proto__ = HTTPPolling.prototype; - -/** - * Transport name - * - * @api public - */ - -XHRPolling.prototype.name = 'xhr-polling'; - -/** - * Frames data prior to write. - * - * @api private - */ - -XHRPolling.prototype.doWrite = function (data) { - HTTPPolling.prototype.doWrite.call(this); - - var origin = this.req.headers.origin - , headers = { - 'Content-Type': 'text/plain; charset=UTF-8' - , 'Content-Length': data === undefined ? 0 : Buffer.byteLength(data) - , 'Connection': 'Keep-Alive' - }; - - if (origin) { - // https://developer.mozilla.org/En/HTTP_Access_Control - headers['Access-Control-Allow-Origin'] = origin; - headers['Access-Control-Allow-Credentials'] = 'true'; - } - - this.response.writeHead(200, headers); - this.response.write(data); - this.log.debug(this.name + ' writing', data); -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/util.js b/tty.js/node_modules/tty.js/node_modules/socket.io/lib/util.js deleted file mode 100644 index f7d9f2b4..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/lib/util.js +++ /dev/null @@ -1,50 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -/** - * Converts an enumerable to an array. - * - * @api public - */ - -exports.toArray = function (enu) { - var arr = []; - - for (var i = 0, l = enu.length; i < l; i++) - arr.push(enu[i]); - - return arr; -}; - -/** - * Unpacks a buffer to a number. - * - * @api public - */ - -exports.unpack = function (buffer) { - var n = 0; - for (var i = 0; i < buffer.length; ++i) { - n = (i == 0) ? buffer[i] : (n * 256) + buffer[i]; - } - return n; -} - -/** - * Left pads a string. - * - * @api public - */ - -exports.padl = function (s,n,c) { - return new Array(1 + n - s.length).join(c) + s; -} - diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/base64id/.npmignore b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/base64id/.npmignore deleted file mode 100644 index 39e9864f..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/base64id/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -support -test -examples diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/base64id/README.md b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/base64id/README.md deleted file mode 100644 index b4361c15..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/base64id/README.md +++ /dev/null @@ -1,18 +0,0 @@ -base64id -======== - -Node.js module that generates a base64 id. - -Uses crypto.randomBytes when available, falls back to unsafe methods for node.js <= 0.4. - -To increase performance, random bytes are buffered to minimize the number of synchronous calls to crypto.randomBytes. - -## Installation - - $ npm install mongoose - -## Usage - - var base64id = require('base64id'); - - var id = base64id.generateId(); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/base64id/lib/base64id.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/base64id/lib/base64id.js deleted file mode 100644 index f6881597..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/base64id/lib/base64id.js +++ /dev/null @@ -1,103 +0,0 @@ -/*! - * base64id v0.1.0 - */ - -/** - * Module dependencies - */ - -var crypto = require('crypto'); - -/** - * Constructor - */ - -var Base64Id = function() { }; - -/** - * Get random bytes - * - * Uses a buffer if available, falls back to crypto.randomBytes - */ - -Base64Id.prototype.getRandomBytes = function(bytes) { - - var BUFFER_SIZE = 4096 - var self = this; - - bytes = bytes || 12; - - if (bytes > BUFFER_SIZE) { - return crypto.randomBytes(bytes); - } - - var bytesInBuffer = parseInt(BUFFER_SIZE/bytes); - var threshold = parseInt(bytesInBuffer*0.85); - - if (!threshold) { - return crypto.randomBytes(bytes); - } - - if (this.bytesBufferIndex == null) { - this.bytesBufferIndex = -1; - } - - if (this.bytesBufferIndex == bytesInBuffer) { - this.bytesBuffer = null; - this.bytesBufferIndex = -1; - } - - // No buffered bytes available or index above threshold - if (this.bytesBufferIndex == -1 || this.bytesBufferIndex > threshold) { - - if (!this.isGeneratingBytes) { - this.isGeneratingBytes = true; - crypto.randomBytes(BUFFER_SIZE, function(err, bytes) { - self.bytesBuffer = bytes; - self.bytesBufferIndex = 0; - self.isGeneratingBytes = false; - }); - } - - // Fall back to sync call when no buffered bytes are available - if (this.bytesBufferIndex == -1) { - return crypto.randomBytes(bytes); - } - } - - var result = this.bytesBuffer.slice(bytes*this.bytesBufferIndex, bytes*(this.bytesBufferIndex+1)); - this.bytesBufferIndex++; - - return result; -} - -/** - * Generates a base64 id - * - * (Original version from socket.io ) - */ - -Base64Id.prototype.generateId = function () { - var rand = new Buffer(15); // multiple of 3 for base64 - if (!rand.writeInt32BE) { - return Math.abs(Math.random() * Math.random() * Date.now() | 0).toString() - + Math.abs(Math.random() * Math.random() * Date.now() | 0).toString(); - } - this.sequenceNumber = (this.sequenceNumber + 1) | 0; - rand.writeInt32BE(this.sequenceNumber, 11); - if (crypto.randomBytes) { - this.getRandomBytes(12).copy(rand); - } else { - // not secure for node 0.4 - [0, 4, 8].forEach(function(i) { - rand.writeInt32BE(Math.random() * Math.pow(2, 32) | 0, i); - }); - } - return rand.toString('base64').replace(/\//g, '_').replace(/\+/g, '-'); -}; - -/** - * Export - */ - -exports = module.exports = new Base64Id(); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/base64id/package.json b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/base64id/package.json deleted file mode 100644 index cbf12981..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/base64id/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "base64id", - "version": "0.1.0", - "description": "Generates a base64 id", - "author": { - "name": "Kristian Faeldt", - "email": "faeldt_kristian@cyberagent.co.jp" - }, - "repository": { - "type": "git", - "url": "https://github.com/faeldt/base64id.git" - }, - "main": "./lib/base64id.js", - "engines": { - "node": ">= 0.4.0" - }, - "readme": "base64id\n========\n\nNode.js module that generates a base64 id.\n\nUses crypto.randomBytes when available, falls back to unsafe methods for node.js <= 0.4.\n\nTo increase performance, random bytes are buffered to minimize the number of synchronous calls to crypto.randomBytes.\n\n## Installation\n\n $ npm install mongoose\n\n## Usage\n\n var base64id = require('base64id');\n\n var id = base64id.generateId();\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/faeldt/base64id/issues" - }, - "homepage": "https://github.com/faeldt/base64id", - "_id": "base64id@0.1.0", - "_from": "base64id@0.1.0" -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/.npmignore b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/LICENSE b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/LICENSE deleted file mode 100644 index bdb8f617..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Arnout Kazemier,3rd-Eden - -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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/Makefile b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/Makefile deleted file mode 100644 index 1362d66a..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -doc: - dox --title "FlashPolicyFileServer" lib/* > doc/index.html - -test: - expresso -I lib $(TESTFLAGS) tests/*.test.js - -.PHONY: test doc \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/README.md b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/README.md deleted file mode 100644 index 527921ee..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/README.md +++ /dev/null @@ -1,98 +0,0 @@ -## LOL, WUT? -It basically allows you to allow or disallow Flash Player sockets from accessing your site. - -## Installation - -```bash -npm install policyfile -``` -## Usage - -The server is based on the regular and know `net` and `http` server patterns. So it you can just listen -for all the events that a `net` based server emits etc. But there is one extra event, the `connect_failed` -event. This event is triggered when we are unable to listen on the supplied port number. - -### createServer -Creates a new server instance and accepts 2 optional arguments: - -- `options` **Object** Options to configure the server instance - - `log` **Boolean** Enable logging to STDOUT and STDERR (defaults to true) -- `origins` **Array** An Array of origins that are allowed by the server (defaults to *:*) - -```js -var pf = require('policyfile'); -pf.createServer(); -pf.listen(); -``` - -#### server.listen -Start listening on the server and it takes 3 optional arguments - -- `port` **Number** On which port number should we listen? (defaults to 843, which is the first port number the FlashPlayer checks) -- `server` **Server** A http server, if we are unable to accept requests or run the server we can also answer the policy requests inline over the supplied HTTP server. -- `callback` **Function** A callback function that is called when listening to the server was successful. - -```js -var pf = require('policyfile'); -pf.createServer(); -pf.listen(1337, function(){ - console.log(':3 yay') -}); -``` - -Changing port numbers can be handy if you do not want to run your server as root and have port 843 forward to a non root port number (aka a number above 1024). - -```js -var pf = require('policyfile') - , http = require('http'); - -server = http.createServer(function(q,r){r.writeHead(200);r.end('hello world')}); -server.listen(80); - -pf.createServer(); -pf.listen(1337, server, function(){ - console.log(':3 yay') -}); -``` - -Support for serving inline requests over a existing HTTP connection as the FlashPlayer will first check port 843, but if it's unable to get a response there it will send a policy file request over port 80, which is usually your http server. - -#### server.add -Adds more origins to the policy file you can add as many arguments as you like. - -```js -var pf = require('policyfile'); -pf.createServer(['google.com:80']); -pf.listen(); -pf.add('blog.3rd-Eden.com:80', 'blog.3rd-Eden.com:8080'); // now has 3 origins -``` - -#### server.add -Adds more origins to the policy file you can add as many arguments as you like. - -```js -var pf = require('policyfile'); -pf.createServer(['blog.3rd-Eden.com:80', 'blog.3rd-Eden.com:8080']); -pf.listen(); -pf.remove('blog.3rd-Eden.com:8080'); // only contains the :80 version now -``` - -#### server.close -Shuts down the server - -```js -var pf = require('policyfile'); -pf.createServer(); -pf.listen(); -pf.close(); // OH NVM. -``` - -## API -http://3rd-eden.com/FlashPolicyFileServer/ - -## Examples -See https://github.com/3rd-Eden/FlashPolicyFileServer/tree/master/examples for examples - -## Licence - -MIT see LICENSE file in the repository \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/doc/index.html b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/doc/index.html deleted file mode 100644 index 743fcdaf..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/doc/index.html +++ /dev/null @@ -1,375 +0,0 @@ - - - FlashPolicyFileServer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    FlashPolicyFileServer

    server

    lib/server.js
    -

    Module dependencies and cached references. -

    -
    -
    var slice = Array.prototype.slice
    -  , net = require('net');
    -
    -

    The server that does the Policy File severing

    - -

    Options

    - -
    • log false or a function that can output log information, defaults to console.log?
    - -

    - -
    • param: Object options Options to customize the servers functionality.

    • param: Array origins The origins that are allowed on this server, defaults to *:*.

    • api: public

    -
    -
    function Server(options, origins){
    -  var me = this;
    -  
    -  this.origins = origins || ['*:*'];
    -  this.port = 843;
    -  this.log = console.log;
    -  
    -  // merge `this` with the options
    -  Object.keys(options).forEach(function(key){
    -    me[key] &amp;&amp; (me[key] = options[key])
    -  });
    -  
    -  // create the net server
    -  this.socket = net.createServer(function createServer(socket){
    -    socket.on('error', function socketError(){ me.responder.call(me, socket) });
    -    me.responder.call(me, socket);
    -  });
    -  
    -  // Listen for errors as the port might be blocked because we do not have root priv.
    -  this.socket.on('error', function serverError(err){
    -    // Special and common case error handling
    -    if (err.errno == 13){
    -      me.log &amp;&amp; me.log(
    -        'Unable to listen to port `' + me.port + '` as your Node.js instance does not have root privileges. ' +
    -        (
    -          me.server
    -          ? 'The Flash Policy file will now be served inline over the supplied HTTP server, Flash Policy files request will suffer.'
    -          : 'No fallback server supplied.'
    -        )
    -      );
    -      
    -      me.socket.removeAllListeners();
    -      delete me.socket;
    -
    -      me.emit('connect_failed', err);
    -    } else {
    -      me.log &amp;&amp; me.log('FlashPolicyFileServer received a error event:\n' + (err.message ? err.message : err));
    -    }
    -  });
    -  
    -  this.socket.on('timeout', function serverTimeout(){});
    -  this.socket.on('close', function serverClosed(err){
    -    err &amp;&amp; me.log &amp;&amp; me.log('Server closing due to an error: \n' + (err.message ? err.message : err));
    -    
    -    if (me.server){
    -      // not online anymore
    -      delete me.server.online;
    -      
    -      // Remove the inline policy listener if we close down
    -      // but only when the server was `online` (see listen prototype)
    -      if( me.server['@'] &amp;&amp; me.server.online){
    -        me.server.removeListener('connection', me.server['@']);
    -      }
    -    }
    -    me.log &amp;&amp; me.log('Shutting down FlashPolicyFileServer');
    -  });
    -  
    -  // Compile the initial `buffer`
    -  this.compile();
    -}
    -
    -

    Start listening for requests

    - -

    - -
    • param: Number port The port number it should be listening to.

    • param: Server server A HTTP server instance, this will be used to listen for inline requests

    • param: Function cb The callback needs to be called once server is ready

    • api: public

    -
    -
    Server.prototype.listen = function listen(port, server, cb){
    -  var me = this
    -    , args = slice.call(arguments, 0)
    -    , callback;
    -  
    -  // assign the correct vars, for flexible arguments
    -  args.forEach(function args(arg){
    -    var type = typeof arg;
    -    
    -    if (type === 'number') me.port = arg;
    -    if (type === 'function') callback = arg;
    -    if (type === 'object') me.server = arg;
    -  });
    -  
    -  if (this.server){
    -    
    -    // no one in their right mind would ever create a `@` prototype, so Im just gonna store
    -    // my function on the server, so I can remove it later again once the server(s) closes
    -    this.server['@'] = function connection(socket){
    -      socket.once('data', function requestData(data){
    -        // if it's a Flash policy request, and we can write to the 
    -        if (
    -             data
    -          &amp;&amp; data[0] === 60
    -          &amp;&amp; data.toString() === '<policy-file-request/>\0'
    -          &amp;&amp; socket
    -          &amp;&amp; (socket.readyState === 'open' || socket.readyState === 'writeOnly')
    -        ){
    -          // send the buffer
    -          socket.end(me.buffer);
    -        }
    -      });
    -    };
    -    // attach it
    -    this.server.on('connection', this.server['@']);
    -  }
    -  
    -  // We add a callback method, so we can set a flag for when the server is `enabled` or `online`.
    -  // this flag is needed because if a error occurs and the we cannot boot up the server the
    -  // fallback functionality should not be removed during the `close` event
    -  this.socket.listen(this.port, function serverListening(){
    -   me.socket.online = true;
    -   
    -   if (callback) callback(), callback = undefined;
    -   
    -  });
    -  
    -  return this;
    -};
    -
    -

    Adds a new origin to the Flash Policy File.

    - -

    - -
    • param: Arguments The origins that need to be added.

    • api: public

    -
    -
    Server.prototype.add = function add(){
    -  var args = slice.call(arguments, 0)
    -    , i = args.length;
    -  
    -  // flag duplicates
    -  while (i--){
    -    if (this.origins.indexOf(args[i]) &gt;= 0){
    -      args[i] = null;
    -    }
    -  }
    -  
    -  // Add all the arguments to the array
    -  // but first we want to remove all `falsy` values from the args
    -  Array.prototype.push.apply(
    -    this.origins
    -  , args.filter(function(value){ return !!value })
    -  );
    -  
    -  this.compile();
    -  return this;
    -};
    -
    -

    Removes a origin from the Flash Policy File.

    - -

    - -
    • param: String origin The origin that needs to be removed from the server

    • api: public

    -
    -
    Server.prototype.remove = function remove(origin){
    -  var position = this.origins.indexOf(origin);
    -  
    -  // only remove and recompile if we have a match
    -  if (position &gt; 0){
    -    this.origins.splice(position,1);
    -    this.compile();
    -  }
    -  
    -  return this;
    -};
    -
    -

    Closes and cleans up the server

    - -
    • api: public

    -
    -
    Server.prototype.close = function close(){
    -  this.socket.removeAllListeners();
    -  this.socket.close();
    -  
    -  return this;
    -};
    -
    -

    Proxy the event listener requests to the created Net server -

    -
    -
    Object.keys(process.EventEmitter.prototype).forEach(function proxy(key){
    -  Server.prototype[key] = Server.prototype[key] || function (){
    -    if (this.socket) this.socket[key].apply(this.socket, arguments);
    -    return this;
    -  };
    -});
    -
    -

    Creates a new server instance.

    - -

    - -
    • param: Object options A options object to override the default config

    • param: Array origins The origins that should be allowed by the server

    • api: public

    -
    -
    exports.createServer = function createServer(options, origins){
    -  origins = Array.isArray(origins) ? origins : (Array.isArray(options) ? options : false);
    -  options = !Array.isArray(options) &amp;&amp; options ? options : {};
    -  
    -  return new Server(options, origins);
    -};
    -
    -

    Provide a hook to the original server, so it can be extended if needed. -

    -
    -
    exports.Server = Server;
    -
    -

    Module version -

    -
    -
    exports.version = '0.0.2';
    -
    -
    \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/examples/basic.fallback.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/examples/basic.fallback.js deleted file mode 100644 index b439449a..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/examples/basic.fallback.js +++ /dev/null @@ -1,8 +0,0 @@ -var http = require('http') - , fspfs = require('../'); - -var server = http.createServer(function(q,r){ r.writeHead(200); r.end(':3') }) - , flash = fspfs.createServer(); - -server.listen(8080); -flash.listen(8081,server); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/examples/basic.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/examples/basic.js deleted file mode 100644 index 5e2290f7..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/examples/basic.js +++ /dev/null @@ -1,5 +0,0 @@ -var http = require('http') - , fspfs = require('../'); - -var flash = fspfs.createServer(); -flash.listen(); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/index.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/index.js deleted file mode 100644 index 60cf2989..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/server.js'); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/lib/server.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/lib/server.js deleted file mode 100644 index a525772b..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/lib/server.js +++ /dev/null @@ -1,289 +0,0 @@ -/** - * Module dependencies and cached references. - */ - -var slice = Array.prototype.slice - , net = require('net'); - -/** - * The server that does the Policy File severing - * - * Options: - * - `log` false or a function that can output log information, defaults to console.log? - * - * @param {Object} options Options to customize the servers functionality. - * @param {Array} origins The origins that are allowed on this server, defaults to `*:*`. - * @api public - */ - -function Server (options, origins) { - var me = this; - - this.origins = origins || ['*:*']; - this.port = 843; - this.log = console.log; - - // merge `this` with the options - Object.keys(options).forEach(function (key) { - me[key] && (me[key] = options[key]) - }); - - // create the net server - this.socket = net.createServer(function createServer (socket) { - socket.on('error', function socketError () { - me.responder.call(me, socket); - }); - - me.responder.call(me, socket); - }); - - // Listen for errors as the port might be blocked because we do not have root priv. - this.socket.on('error', function serverError (err) { - // Special and common case error handling - if (err.errno == 13) { - me.log && me.log( - 'Unable to listen to port `' + me.port + '` as your Node.js instance does not have root privileges. ' + - ( - me.server - ? 'The Flash Policy File requests will only be served inline over the supplied HTTP server. Inline serving is slower than a dedicated server instance.' - : 'No fallback server supplied, we will be unable to answer Flash Policy File requests.' - ) - ); - - me.emit('connect_failed', err); - me.socket.removeAllListeners(); - delete me.socket; - } else { - me.log && me.log('FlashPolicyFileServer received an error event:\n' + (err.message ? err.message : err)); - } - }); - - this.socket.on('timeout', function serverTimeout () {}); - this.socket.on('close', function serverClosed (err) { - err && me.log && me.log('Server closing due to an error: \n' + (err.message ? err.message : err)); - - if (me.server) { - // Remove the inline policy listener if we close down - // but only when the server was `online` (see listen prototype) - if (me.server['@'] && me.server.online) { - me.server.removeListener('connection', me.server['@']); - } - - // not online anymore - delete me.server.online; - } - }); - - // Compile the initial `buffer` - this.compile(); -} - -/** - * Start listening for requests - * - * @param {Number} port The port number it should be listening to. - * @param {Server} server A HTTP server instance, this will be used to listen for inline requests - * @param {Function} cb The callback needs to be called once server is ready - * @api public - */ - -Server.prototype.listen = function listen (port, server, cb){ - var me = this - , args = slice.call(arguments, 0) - , callback; - - // assign the correct vars, for flexible arguments - args.forEach(function args (arg){ - var type = typeof arg; - - if (type === 'number') me.port = arg; - if (type === 'function') callback = arg; - if (type === 'object') me.server = arg; - }); - - if (this.server) { - - // no one in their right mind would ever create a `@` prototype, so Im just gonna store - // my function on the server, so I can remove it later again once the server(s) closes - this.server['@'] = function connection (socket) { - socket.once('data', function requestData (data) { - // if it's a Flash policy request, and we can write to the - if ( - data - && data[0] === 60 - && data.toString() === '\0' - && socket - && (socket.readyState === 'open' || socket.readyState === 'writeOnly') - ){ - // send the buffer - try { - socket.end(me.buffer); - } catch (e) {} - } - }); - }; - - // attach it - this.server.on('connection', this.server['@']); - } - - // We add a callback method, so we can set a flag for when the server is `enabled` or `online`. - // this flag is needed because if a error occurs and the we cannot boot up the server the - // fallback functionality should not be removed during the `close` event - this.port >= 0 && this.socket.listen(this.port, function serverListening () { - me.socket.online = true; - if (callback) { - callback.call(me); - callback = undefined; - } - }); - - return this; -}; - -/** - * Responds to socket connects and writes the compile policy file. - * - * @param {net.Socket} socket The socket that needs to receive the message - * @api private - */ - -Server.prototype.responder = function responder (socket){ - if (socket && socket.readyState == 'open' && socket.end) { - try { - socket.end(this.buffer); - } catch (e) {} - } -}; - -/** - * Compiles the supplied origins to a Flash Policy File format and stores it in a Node.js Buffer - * this way it can be send over the wire without any performance loss. - * - * @api private - */ - -Server.prototype.compile = function compile (){ - var xml = [ - '' - , '' - , '' - ]; - - // add the allow access element - this.origins.forEach(function origin (origin){ - var parts = origin.split(':'); - xml.push(''); - }); - - xml.push(''); - - // store the result in a buffer so we don't have to re-generate it all the time - this.buffer = new Buffer(xml.join(''), 'utf8'); - - return this; -}; - -/** - * Adds a new origin to the Flash Policy File. - * - * @param {Arguments} The origins that need to be added. - * @api public - */ - -Server.prototype.add = function add(){ - var args = slice.call(arguments, 0) - , i = args.length; - - // flag duplicates - while (i--) { - if (this.origins.indexOf(args[i]) >= 0){ - args[i] = null; - } - } - - // Add all the arguments to the array - // but first we want to remove all `falsy` values from the args - Array.prototype.push.apply( - this.origins - , args.filter(function filter (value) { - return !!value; - }) - ); - - this.compile(); - return this; -}; - -/** - * Removes a origin from the Flash Policy File. - * - * @param {String} origin The origin that needs to be removed from the server - * @api public - */ - -Server.prototype.remove = function remove (origin){ - var position = this.origins.indexOf(origin); - - // only remove and recompile if we have a match - if (position > 0) { - this.origins.splice(position,1); - this.compile(); - } - - return this; -}; - -/** - * Closes and cleans up the server - * - * @api public - */ - -Server.prototype.close = function close () { - this.socket.removeAllListeners(); - this.socket.close(); - - return this; -}; - -/** - * Proxy the event listener requests to the created Net server - */ - -Object.keys(process.EventEmitter.prototype).forEach(function proxy (key){ - Server.prototype[key] = Server.prototype[key] || function () { - if (this.socket) { - this.socket[key].apply(this.socket, arguments); - } - - return this; - }; -}); - -/** - * Creates a new server instance. - * - * @param {Object} options A options object to override the default config - * @param {Array} origins The origins that should be allowed by the server - * @api public - */ - -exports.createServer = function createServer(options, origins){ - origins = Array.isArray(origins) ? origins : (Array.isArray(options) ? options : false); - options = !Array.isArray(options) && options ? options : {}; - - return new Server(options, origins); -}; - -/** - * Provide a hook to the original server, so it can be extended if needed. - */ - -exports.Server = Server; - -/** - * Module version - */ - -exports.version = '0.0.4'; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/package.json b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/package.json deleted file mode 100644 index 2b12e88c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "policyfile", - "version": "0.0.4", - "author": { - "name": "Arnout Kazemier" - }, - "description": "Flash Socket Policy File Server. A server to respond to Flash Socket Policy requests, both inline and through a dedicated server instance.", - "main": "index", - "keywords": [ - "flash", - "socket", - "policy", - "file", - "server", - "Flash Socket Policy File Server", - "cross domain" - ], - "directories": { - "lib": "./lib" - }, - "maintainers": [ - { - "name": "Arnout Kazemier", - "email": "info@3rd-Eden.com", - "url": "http://blog.3rd-Eden.com" - } - ], - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/3rd-Eden/FlashPolicyFileServer/blob/master/LICENSE" - } - ], - "repositories": [ - { - "type": "git", - "url": "https://github.com/3rd-Eden/FlashPolicyFileServer.git" - } - ], - "readme": "## LOL, WUT?\nIt basically allows you to allow or disallow Flash Player sockets from accessing your site.\n\n## Installation\n\n```bash\nnpm install policyfile\n```\n## Usage\n\nThe server is based on the regular and know `net` and `http` server patterns. So it you can just listen\nfor all the events that a `net` based server emits etc. But there is one extra event, the `connect_failed`\nevent. This event is triggered when we are unable to listen on the supplied port number.\n\n### createServer\nCreates a new server instance and accepts 2 optional arguments:\n\n- `options` **Object** Options to configure the server instance\n - `log` **Boolean** Enable logging to STDOUT and STDERR (defaults to true)\n- `origins` **Array** An Array of origins that are allowed by the server (defaults to *:*)\n\n```js\nvar pf = require('policyfile');\npf.createServer();\npf.listen();\n```\n\n#### server.listen\nStart listening on the server and it takes 3 optional arguments\n\n- `port` **Number** On which port number should we listen? (defaults to 843, which is the first port number the FlashPlayer checks)\n- `server` **Server** A http server, if we are unable to accept requests or run the server we can also answer the policy requests inline over the supplied HTTP server.\n- `callback` **Function** A callback function that is called when listening to the server was successful.\n\n```js\nvar pf = require('policyfile');\npf.createServer();\npf.listen(1337, function(){\n console.log(':3 yay')\n});\n```\n\nChanging port numbers can be handy if you do not want to run your server as root and have port 843 forward to a non root port number (aka a number above 1024).\n\n```js\nvar pf = require('policyfile')\n , http = require('http');\n\nserver = http.createServer(function(q,r){r.writeHead(200);r.end('hello world')});\nserver.listen(80);\n\npf.createServer();\npf.listen(1337, server, function(){\n console.log(':3 yay')\n});\n```\n\nSupport for serving inline requests over a existing HTTP connection as the FlashPlayer will first check port 843, but if it's unable to get a response there it will send a policy file request over port 80, which is usually your http server.\n\n#### server.add\nAdds more origins to the policy file you can add as many arguments as you like.\n\n```js\nvar pf = require('policyfile');\npf.createServer(['google.com:80']);\npf.listen();\npf.add('blog.3rd-Eden.com:80', 'blog.3rd-Eden.com:8080'); // now has 3 origins\n```\n\n#### server.add\nAdds more origins to the policy file you can add as many arguments as you like.\n\n```js\nvar pf = require('policyfile');\npf.createServer(['blog.3rd-Eden.com:80', 'blog.3rd-Eden.com:8080']);\npf.listen();\npf.remove('blog.3rd-Eden.com:8080'); // only contains the :80 version now\n```\n\n#### server.close\nShuts down the server\n\n```js\nvar pf = require('policyfile');\npf.createServer();\npf.listen();\npf.close(); // OH NVM.\n```\n\n## API\nhttp://3rd-eden.com/FlashPolicyFileServer/\n\n## Examples\nSee https://github.com/3rd-Eden/FlashPolicyFileServer/tree/master/examples for examples\n\n## Licence\n\nMIT see LICENSE file in the repository", - "readmeFilename": "README.md", - "repository": { - "type": "git", - "url": "https://github.com/3rd-Eden/FlashPolicyFileServer.git" - }, - "bugs": { - "url": "https://github.com/3rd-Eden/FlashPolicyFileServer/issues" - }, - "homepage": "https://github.com/3rd-Eden/FlashPolicyFileServer", - "_id": "policyfile@0.0.4", - "_from": "policyfile@0.0.4" -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/tests/ssl/ssl.crt b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/tests/ssl/ssl.crt deleted file mode 100644 index 5883cd44..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/tests/ssl/ssl.crt +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDXTCCAkWgAwIBAgIJAMUSOvlaeyQHMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV -BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX -aWRnaXRzIFB0eSBMdGQwHhcNMTAxMTE2MDkzMjQ5WhcNMTMxMTE1MDkzMjQ5WjBF -MQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50 -ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEAz+LXZOjcQCJq3+ZKUFabj71oo/ex/XsBcFqtBThjjTw9CVEVwfPQQp4X -wtPiB204vnYXwQ1/R2NdTQqCZu47l79LssL/u2a5Y9+0NEU3nQA5qdt+1FAE0c5o -exPimXOrR3GWfKz7PmZ2O0117IeCUUXPG5U8umhDe/4mDF4ZNJiKc404WthquTqg -S7rLQZHhZ6D0EnGnOkzlmxJMYPNHSOY1/6ivdNUUcC87awNEA3lgfhy25IyBK3QJ -c+aYKNTbt70Lery3bu2wWLFGtmNiGlQTS4JsxImRsECTI727ObS7/FWAQsqW+COL -0Sa5BuMFrFIpjPrEe0ih7vRRbdmXRwIDAQABo1AwTjAdBgNVHQ4EFgQUDnV4d6mD -tOnluLoCjkUHTX/n4agwHwYDVR0jBBgwFoAUDnV4d6mDtOnluLoCjkUHTX/n4agw -DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAFwV4MQfTo+qMv9JMiyno -IEiqfOz4RgtmBqRnXUffcjS2dhc7/z+FPZnM79Kej8eLHoVfxCyWRHFlzm93vEdv -wxOCrD13EDOi08OOZfxWyIlCa6Bg8cMAKqQzd2OvQOWqlRWBTThBJIhWflU33izX -Qn5GdmYqhfpc+9ZHHGhvXNydtRQkdxVK2dZNzLBvBlLlRmtoClU7xm3A+/5dddeP -AQHEPtyFlUw49VYtZ3ru6KqPms7MKvcRhYLsy9rwSfuuniMlx4d0bDR7TOkw0QQS -A0N8MGQRQpzl4mw4jLzyM5d5QtuGBh2P6hPGa0YQxtI3RPT/p6ENzzBiAKXiSfzo -xw== ------END CERTIFICATE----- diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/tests/ssl/ssl.private.key b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/tests/ssl/ssl.private.key deleted file mode 100644 index f31ff3d9..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/tests/ssl/ssl.private.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEAz+LXZOjcQCJq3+ZKUFabj71oo/ex/XsBcFqtBThjjTw9CVEV -wfPQQp4XwtPiB204vnYXwQ1/R2NdTQqCZu47l79LssL/u2a5Y9+0NEU3nQA5qdt+ -1FAE0c5oexPimXOrR3GWfKz7PmZ2O0117IeCUUXPG5U8umhDe/4mDF4ZNJiKc404 -WthquTqgS7rLQZHhZ6D0EnGnOkzlmxJMYPNHSOY1/6ivdNUUcC87awNEA3lgfhy2 -5IyBK3QJc+aYKNTbt70Lery3bu2wWLFGtmNiGlQTS4JsxImRsECTI727ObS7/FWA -QsqW+COL0Sa5BuMFrFIpjPrEe0ih7vRRbdmXR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IGSan+G6YdS -7sdmwwKBgBc2qj0wvGXDF2kCLwSGfWoMf8CS1+5fIiUIdT1e/+7MfDdbmLMIFVjF -QKS3zVViXCbrG5SY6wS9hxoc57f6E2A8vcaX6zy2xkZlGHQCpWRtEM5R01OWJQaH -HsHMmQZGUQVoDm1oRkDhrTFK4K3ukc3rAxzeTZ96utOQN8/KJsTv ------END RSA PRIVATE KEY----- diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/tests/unit.test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/tests/unit.test.js deleted file mode 100644 index 932b3c14..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/policyfile/tests/unit.test.js +++ /dev/null @@ -1,231 +0,0 @@ -var fspfs = require('../') - , fs = require('fs') - , http = require('http') - , https = require('https') - , net = require('net') - , should = require('should') - , assert = require('assert'); - -module.exports = { - // Library version should be Semver compatible - 'Library version': function(){ - fspfs.version.should.match(/^\d+\.\d+\.\d+$/); - } - - // Creating a server instace should not cause any problems - // either using the new Server or createServer method. -, 'Create Server instance': function(){ - var server = fspfs.createServer() - , server2 = new fspfs.Server({log:false}, ['blog.3rd-Eden.com:1337']); - - // server 2 options test - server2.log.should.be.false; - server2.origins.length.should.equal(1); - server2.origins[0].should.equal('blog.3rd-Eden.com:1337'); - - // server defaults - (typeof server.log).should.be.equal('function'); - server.origins.length.should.equal(1); - server.origins[0].should.equal('*:*'); - - // instance checking, sanity check - assert.ok(server instanceof fspfs.Server); - assert.ok(!!server.buffer); - - // more options testing - server = fspfs.createServer(['blog.3rd-Eden.com:80']); - server.origins.length.should.equal(1); - server.origins[0].should.equal('blog.3rd-Eden.com:80'); - - server = fspfs.createServer({log:false},['blog.3rd-Eden.com:80']); - server.log.should.be.false; - server.origins.length.should.equal(1); - server.origins[0].should.equal('blog.3rd-Eden.com:80'); - - } - -, 'Add origin': function(){ - var server = fspfs.createServer(); - server.add('google.com:80', 'blog.3rd-Eden.com:1337'); - - server.origins.length.should.equal(3); - server.origins.indexOf('google.com:80').should.be.above(0); - - // don't allow duplicates - server.add('google.com:80', 'google.com:80'); - - var i = server.origins.length - , count = 0; - - while(i--){ - if (server.origins[i] === 'google.com:80'){ - count++; - } - } - - count.should.equal(1); - } - -, 'Remove origin': function(){ - var server = fspfs.createServer(); - server.add('google.com:80', 'blog.3rd-Eden.com:1337'); - server.origins.length.should.equal(3); - - server.remove('google.com:80'); - server.origins.length.should.equal(2); - server.origins.indexOf('google.com:80').should.equal(-1); - } - -, 'Buffer': function(){ - var server = fspfs.createServer(); - - Buffer.isBuffer(server.buffer).should.be.true; - server.buffer.toString().indexOf('to-ports="*"').should.be.above(0); - server.buffer.toString().indexOf('domain="*"').should.be.above(0); - server.buffer.toString().indexOf('domain="google.com"').should.equal(-1); - - // The buffers should be rebuild when new origins are added - server.add('google.com:80'); - server.buffer.toString().indexOf('to-ports="80"').should.be.above(0); - server.buffer.toString().indexOf('domain="google.com"').should.be.above(0); - - server.remove('google.com:80'); - server.buffer.toString().indexOf('to-ports="80"').should.equal(-1); - server.buffer.toString().indexOf('domain="google.com"').should.equal(-1); - } - -, 'Responder': function(){ - var server = fspfs.createServer() - , calls = 0 - // dummy socket to emulate a `real` socket - , dummySocket = { - readyState: 'open' - , end: function(buffer){ - calls++; - Buffer.isBuffer(buffer).should.be.true; - buffer.toString().should.equal(server.buffer.toString()); - } - }; - - server.responder(dummySocket); - calls.should.equal(1); - } - -, 'Event proxy': function(){ - var server = fspfs.createServer() - , calls = 0; - - Object.keys(process.EventEmitter.prototype).forEach(function proxy(key){ - assert.ok(!!server[key] && typeof server[key] === 'function'); - }); - - // test if it works by calling a none default event - server.on('pew', function(){ - calls++; - }); - - server.emit('pew'); - calls.should.equal(1); - } - -, 'inline response http': function(){ - var port = 1335 - , httpserver = http.createServer(function(q,r){r.writeHead(200);r.end(':3')}) - , server = fspfs.createServer(); - - httpserver.listen(port, function(){ - server.listen(port + 1, httpserver, function(){ - var client = net.createConnection(port); - client.write('\0'); - client.on('error', function(err){ - assert.ok(!err, err) - }); - client.on('data', function(data){ - - var response = data.toString(); - console.log(response); - - response.indexOf('to-ports="*"').should.be.above(0); - response.indexOf('domain="*"').should.be.above(0); - response.indexOf('domain="google.com"').should.equal(-1); - - // clean up - client.destroy(); - server.close(); - httpserver.close(); - }); - }); - }); - } - -, 'server response': function(){ - var port = 1340 - , server = fspfs.createServer(); - - server.listen(port, function(){ - var client = net.createConnection(port); - client.write('\0'); - client.on('error', function(err){ - assert.ok(!err, err) - }); - client.on('data', function(data){ - - var response = data.toString(); - - response.indexOf('to-ports="*"').should.be.above(0); - response.indexOf('domain="*"').should.be.above(0); - response.indexOf('domain="google.com"').should.equal(-1); - - // clean up - client.destroy(); - server.close(); - }); - }); - } - -, 'inline response https': function(){ - var port = 1345 - , ssl = { - key: fs.readFileSync(__dirname + '/ssl/ssl.private.key').toString() - , cert: fs.readFileSync(__dirname + '/ssl/ssl.crt').toString() - } - , httpserver = https.createServer(ssl, function(q,r){r.writeHead(200);r.end(':3')}) - , server = fspfs.createServer(); - - httpserver.listen(port, function(){ - server.listen(port + 1, httpserver, function(){ - var client = net.createConnection(port); - client.write('\0'); - client.on('error', function(err){ - assert.ok(!err, err) - }); - client.on('data', function(data){ - - var response = data.toString(); - - response.indexOf('to-ports="*"').should.be.above(0); - response.indexOf('domain="*"').should.be.above(0); - response.indexOf('domain="google.com"').should.equal(-1); - - // clean up - client.destroy(); - server.close(); - httpserver.close(); - }); - }); - }); - } - -, 'connect_failed': function(){ - var server = fspfs.createServer(); - - server.on('connect_failed', function(){ - assert.ok(true); - }); - - server.listen(function(){ - assert.ok(false, 'Run this test without root access'); - server.close(); - }); - } -}; \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/.npmignore b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/README.md b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/README.md deleted file mode 100644 index 46e7018c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/README.md +++ /dev/null @@ -1,691 +0,0 @@ -redis - a node.js redis client -=========================== - -This is a complete Redis client for node.js. It supports all Redis commands, including many recently added commands like EVAL from -experimental Redis server branches. - - -Install with: - - npm install redis - -Pieter Noordhuis has provided a binding to the official `hiredis` C library, which is non-blocking and fast. To use `hiredis`, do: - - npm install hiredis redis - -If `hiredis` is installed, `node_redis` will use it by default. Otherwise, a pure JavaScript parser will be used. - -If you use `hiredis`, be sure to rebuild it whenever you upgrade your version of node. There are mysterious failures that can -happen between node and native code modules after a node upgrade. - - -## Usage - -Simple example, included as `examples/simple.js`: - -```js - var redis = require("redis"), - client = redis.createClient(); - - // if you'd like to select database 3, instead of 0 (default), call - // client.select(3, function() { /* ... */ }); - - client.on("error", function (err) { - console.log("Error " + err); - }); - - client.set("string key", "string val", redis.print); - client.hset("hash key", "hashtest 1", "some value", redis.print); - client.hset(["hash key", "hashtest 2", "some other value"], redis.print); - client.hkeys("hash key", function (err, replies) { - console.log(replies.length + " replies:"); - replies.forEach(function (reply, i) { - console.log(" " + i + ": " + reply); - }); - client.quit(); - }); -``` - -This will display: - - mjr:~/work/node_redis (master)$ node example.js - Reply: OK - Reply: 0 - Reply: 0 - 2 replies: - 0: hashtest 1 - 1: hashtest 2 - mjr:~/work/node_redis (master)$ - - -## Performance - -Here are typical results of `multi_bench.js` which is similar to `redis-benchmark` from the Redis distribution. -It uses 50 concurrent connections with no pipelining. - -JavaScript parser: - - PING: 20000 ops 42283.30 ops/sec 0/5/1.182 - SET: 20000 ops 32948.93 ops/sec 1/7/1.515 - GET: 20000 ops 28694.40 ops/sec 0/9/1.740 - INCR: 20000 ops 39370.08 ops/sec 0/8/1.269 - LPUSH: 20000 ops 36429.87 ops/sec 0/8/1.370 - LRANGE (10 elements): 20000 ops 9891.20 ops/sec 1/9/5.048 - LRANGE (100 elements): 20000 ops 1384.56 ops/sec 10/91/36.072 - -hiredis parser: - - PING: 20000 ops 46189.38 ops/sec 1/4/1.082 - SET: 20000 ops 41237.11 ops/sec 0/6/1.210 - GET: 20000 ops 39682.54 ops/sec 1/7/1.257 - INCR: 20000 ops 40080.16 ops/sec 0/8/1.242 - LPUSH: 20000 ops 41152.26 ops/sec 0/3/1.212 - LRANGE (10 elements): 20000 ops 36563.07 ops/sec 1/8/1.363 - LRANGE (100 elements): 20000 ops 21834.06 ops/sec 0/9/2.287 - -The performance of `node_redis` improves dramatically with pipelining, which happens automatically in most normal programs. - - -### Sending Commands - -Each Redis command is exposed as a function on the `client` object. -All functions take either an `args` Array plus optional `callback` Function or -a variable number of individual arguments followed by an optional callback. -Here is an example of passing an array of arguments and a callback: - - client.mset(["test keys 1", "test val 1", "test keys 2", "test val 2"], function (err, res) {}); - -Here is that same call in the second style: - - client.mset("test keys 1", "test val 1", "test keys 2", "test val 2", function (err, res) {}); - -Note that in either form the `callback` is optional: - - client.set("some key", "some val"); - client.set(["some other key", "some val"]); - -If the key is missing, reply will be null (probably): - - client.get("missingkey", function(err, reply) { - // reply is null when the key is missing - console.log(reply); - }); - -For a list of Redis commands, see [Redis Command Reference](http://redis.io/commands) - -The commands can be specified in uppercase or lowercase for convenience. `client.get()` is the same as `client.GET()`. - -Minimal parsing is done on the replies. Commands that return a single line reply return JavaScript Strings, -integer replies return JavaScript Numbers, "bulk" replies return node Buffers, and "multi bulk" replies return a -JavaScript Array of node Buffers. `HGETALL` returns an Object with Buffers keyed by the hash keys. - -# API - -## Connection Events - -`client` will emit some events about the state of the connection to the Redis server. - -### "ready" - -`client` will emit `ready` a connection is established to the Redis server and the server reports -that it is ready to receive commands. Commands issued before the `ready` event are queued, -then replayed just before this event is emitted. - -### "connect" - -`client` will emit `connect` at the same time as it emits `ready` unless `client.options.no_ready_check` -is set. If this options is set, `connect` will be emitted when the stream is connected, and then -you are free to try to send commands. - -### "error" - -`client` will emit `error` when encountering an error connecting to the Redis server. - -Note that "error" is a special event type in node. If there are no listeners for an -"error" event, node will exit. This is usually what you want, but it can lead to some -cryptic error messages like this: - - mjr:~/work/node_redis (master)$ node example.js - - node.js:50 - throw e; - ^ - Error: ECONNREFUSED, Connection refused - at IOWatcher.callback (net:870:22) - at node.js:607:9 - -Not very useful in diagnosing the problem, but if your program isn't ready to handle this, -it is probably the right thing to just exit. - -`client` will also emit `error` if an exception is thrown inside of `node_redis` for whatever reason. -It would be nice to distinguish these two cases. - -### "end" - -`client` will emit `end` when an established Redis server connection has closed. - -### "drain" - -`client` will emit `drain` when the TCP connection to the Redis server has been buffering, but is now -writable. This event can be used to stream commands in to Redis and adapt to backpressure. Right now, -you need to check `client.command_queue.length` to decide when to reduce your send rate. Then you can -resume sending when you get `drain`. - -### "idle" - -`client` will emit `idle` when there are no outstanding commands that are awaiting a response. - -## redis.createClient(port, host, options) - -Create a new client connection. `port` defaults to `6379` and `host` defaults -to `127.0.0.1`. If you have `redis-server` running on the same computer as node, then the defaults for -port and host are probably fine. `options` in an object with the following possible properties: - -* `parser`: which Redis protocol reply parser to use. Defaults to `hiredis` if that module is installed. -This may also be set to `javascript`. -* `return_buffers`: defaults to `false`. If set to `true`, then all replies will be sent to callbacks as node Buffer -objects instead of JavaScript Strings. -* `detect_buffers`: default to `false`. If set to `true`, then replies will be sent to callbacks as node Buffer objects -if any of the input arguments to the original command were Buffer objects. -This option lets you switch between Buffers and Strings on a per-command basis, whereas `return_buffers` applies to -every command on a client. -* `socket_nodelay`: defaults to `true`. Whether to call setNoDelay() on the TCP stream, which disables the -Nagle algorithm on the underlying socket. Setting this option to `false` can result in additional throughput at the -cost of more latency. Most applications will want this set to `true`. -* `no_ready_check`: defaults to `false`. When a connection is established to the Redis server, the server might still -be loading the database from disk. While loading, the server not respond to any commands. To work around this, -`node_redis` has a "ready check" which sends the `INFO` command to the server. The response from the `INFO` command -indicates whether the server is ready for more commands. When ready, `node_redis` emits a `ready` event. -Setting `no_ready_check` to `true` will inhibit this check. -* `enable_offline_queue`: defaults to `true`. By default, if there is no active -connection to the redis server, commands are added to a queue and are executed -once the connection has been established. Setting `enable_offline_queue` to -`false` will disable this feature and the callback will be execute immediately -with an error, or an error will be thrown if no callback is specified. - -```js - var redis = require("redis"), - client = redis.createClient(null, null, {detect_buffers: true}); - - client.set("foo_rand000000000000", "OK"); - - // This will return a JavaScript String - client.get("foo_rand000000000000", function (err, reply) { - console.log(reply.toString()); // Will print `OK` - }); - - // This will return a Buffer since original key is specified as a Buffer - client.get(new Buffer("foo_rand000000000000"), function (err, reply) { - console.log(reply.toString()); // Will print `` - }); - client.end(); -``` - -`createClient()` returns a `RedisClient` object that is named `client` in all of the examples here. - -## client.auth(password, callback) - -When connecting to Redis servers that require authentication, the `AUTH` command must be sent as the -first command after connecting. This can be tricky to coordinate with reconnections, the ready check, -etc. To make this easier, `client.auth()` stashes `password` and will send it after each connection, -including reconnections. `callback` is invoked only once, after the response to the very first -`AUTH` command sent. -NOTE: Your call to `client.auth()` should not be inside the ready handler. If -you are doing this wrong, `client` will emit an error that looks -something like this `Error: Ready check failed: ERR operation not permitted`. - -## client.end() - -Forcibly close the connection to the Redis server. Note that this does not wait until all replies have been parsed. -If you want to exit cleanly, call `client.quit()` to send the `QUIT` command after you have handled all replies. - -This example closes the connection to the Redis server before the replies have been read. You probably don't -want to do this: - -```js - var redis = require("redis"), - client = redis.createClient(); - - client.set("foo_rand000000000000", "some fantastic value"); - client.get("foo_rand000000000000", function (err, reply) { - console.log(reply.toString()); - }); - client.end(); -``` - -`client.end()` is useful for timeout cases where something is stuck or taking too long and you want -to start over. - -## Friendlier hash commands - -Most Redis commands take a single String or an Array of Strings as arguments, and replies are sent back as a single String or an Array of Strings. -When dealing with hash values, there are a couple of useful exceptions to this. - -### client.hgetall(hash) - -The reply from an HGETALL command will be converted into a JavaScript Object by `node_redis`. That way you can interact -with the responses using JavaScript syntax. - -Example: - - client.hmset("hosts", "mjr", "1", "another", "23", "home", "1234"); - client.hgetall("hosts", function (err, obj) { - console.dir(obj); - }); - -Output: - - { mjr: '1', another: '23', home: '1234' } - -### client.hmset(hash, obj, [callback]) - -Multiple values in a hash can be set by supplying an object: - - client.HMSET(key2, { - "0123456789": "abcdefghij", // NOTE: the key and value must both be strings - "some manner of key": "a type of value" - }); - -The properties and values of this Object will be set as keys and values in the Redis hash. - -### client.hmset(hash, key1, val1, ... keyn, valn, [callback]) - -Multiple values may also be set by supplying a list: - - client.HMSET(key1, "0123456789", "abcdefghij", "some manner of key", "a type of value"); - - -## Publish / Subscribe - -Here is a simple example of the API for publish / subscribe. This program opens two -client connections, subscribes to a channel on one of them, and publishes to that -channel on the other: - -```js - var redis = require("redis"), - client1 = redis.createClient(), client2 = redis.createClient(), - msg_count = 0; - - client1.on("subscribe", function (channel, count) { - client2.publish("a nice channel", "I am sending a message."); - client2.publish("a nice channel", "I am sending a second message."); - client2.publish("a nice channel", "I am sending my last message."); - }); - - client1.on("message", function (channel, message) { - console.log("client1 channel " + channel + ": " + message); - msg_count += 1; - if (msg_count === 3) { - client1.unsubscribe(); - client1.end(); - client2.end(); - } - }); - - client1.incr("did a thing"); - client1.subscribe("a nice channel"); -``` - -When a client issues a `SUBSCRIBE` or `PSUBSCRIBE`, that connection is put into "pub/sub" mode. -At that point, only commands that modify the subscription set are valid. When the subscription -set is empty, the connection is put back into regular mode. - -If you need to send regular commands to Redis while in pub/sub mode, just open another connection. - -## Pub / Sub Events - -If a client has subscriptions active, it may emit these events: - -### "message" (channel, message) - -Client will emit `message` for every message received that matches an active subscription. -Listeners are passed the channel name as `channel` and the message Buffer as `message`. - -### "pmessage" (pattern, channel, message) - -Client will emit `pmessage` for every message received that matches an active subscription pattern. -Listeners are passed the original pattern used with `PSUBSCRIBE` as `pattern`, the sending channel -name as `channel`, and the message Buffer as `message`. - -### "subscribe" (channel, count) - -Client will emit `subscribe` in response to a `SUBSCRIBE` command. Listeners are passed the -channel name as `channel` and the new count of subscriptions for this client as `count`. - -### "psubscribe" (pattern, count) - -Client will emit `psubscribe` in response to a `PSUBSCRIBE` command. Listeners are passed the -original pattern as `pattern`, and the new count of subscriptions for this client as `count`. - -### "unsubscribe" (channel, count) - -Client will emit `unsubscribe` in response to a `UNSUBSCRIBE` command. Listeners are passed the -channel name as `channel` and the new count of subscriptions for this client as `count`. When -`count` is 0, this client has left pub/sub mode and no more pub/sub events will be emitted. - -### "punsubscribe" (pattern, count) - -Client will emit `punsubscribe` in response to a `PUNSUBSCRIBE` command. Listeners are passed the -channel name as `channel` and the new count of subscriptions for this client as `count`. When -`count` is 0, this client has left pub/sub mode and no more pub/sub events will be emitted. - -## client.multi([commands]) - -`MULTI` commands are queued up until an `EXEC` is issued, and then all commands are run atomically by -Redis. The interface in `node_redis` is to return an individual `Multi` object by calling `client.multi()`. - -```js - var redis = require("./index"), - client = redis.createClient(), set_size = 20; - - client.sadd("bigset", "a member"); - client.sadd("bigset", "another member"); - - while (set_size > 0) { - client.sadd("bigset", "member " + set_size); - set_size -= 1; - } - - // multi chain with an individual callback - client.multi() - .scard("bigset") - .smembers("bigset") - .keys("*", function (err, replies) { - // NOTE: code in this callback is NOT atomic - // this only happens after the the .exec call finishes. - client.mget(replies, redis.print); - }) - .dbsize() - .exec(function (err, replies) { - console.log("MULTI got " + replies.length + " replies"); - replies.forEach(function (reply, index) { - console.log("Reply " + index + ": " + reply.toString()); - }); - }); -``` - -`client.multi()` is a constructor that returns a `Multi` object. `Multi` objects share all of the -same command methods as `client` objects do. Commands are queued up inside the `Multi` object -until `Multi.exec()` is invoked. - -You can either chain together `MULTI` commands as in the above example, or you can queue individual -commands while still sending regular client command as in this example: - -```js - var redis = require("redis"), - client = redis.createClient(), multi; - - // start a separate multi command queue - multi = client.multi(); - multi.incr("incr thing", redis.print); - multi.incr("incr other thing", redis.print); - - // runs immediately - client.mset("incr thing", 100, "incr other thing", 1, redis.print); - - // drains multi queue and runs atomically - multi.exec(function (err, replies) { - console.log(replies); // 101, 2 - }); - - // you can re-run the same transaction if you like - multi.exec(function (err, replies) { - console.log(replies); // 102, 3 - client.quit(); - }); -``` - -In addition to adding commands to the `MULTI` queue individually, you can also pass an array -of commands and arguments to the constructor: - -```js - var redis = require("redis"), - client = redis.createClient(), multi; - - client.multi([ - ["mget", "multifoo", "multibar", redis.print], - ["incr", "multifoo"], - ["incr", "multibar"] - ]).exec(function (err, replies) { - console.log(replies); - }); -``` - - -## Monitor mode - -Redis supports the `MONITOR` command, which lets you see all commands received by the Redis server -across all client connections, including from other client libraries and other computers. - -After you send the `MONITOR` command, no other commands are valid on that connection. `node_redis` -will emit a `monitor` event for every new monitor message that comes across. The callback for the -`monitor` event takes a timestamp from the Redis server and an array of command arguments. - -Here is a simple example: - -```js - var client = require("redis").createClient(), - util = require("util"); - - client.monitor(function (err, res) { - console.log("Entering monitoring mode."); - }); - - client.on("monitor", function (time, args) { - console.log(time + ": " + util.inspect(args)); - }); -``` - -# Extras - -Some other things you might like to know about. - -## client.server_info - -After the ready probe completes, the results from the INFO command are saved in the `client.server_info` -object. - -The `versions` key contains an array of the elements of the version string for easy comparison. - - > client.server_info.redis_version - '2.3.0' - > client.server_info.versions - [ 2, 3, 0 ] - -## redis.print() - -A handy callback function for displaying return values when testing. Example: - -```js - var redis = require("redis"), - client = redis.createClient(); - - client.on("connect", function () { - client.set("foo_rand000000000000", "some fantastic value", redis.print); - client.get("foo_rand000000000000", redis.print); - }); -``` - -This will print: - - Reply: OK - Reply: some fantastic value - -Note that this program will not exit cleanly because the client is still connected. - -## redis.debug_mode - -Boolean to enable debug mode and protocol tracing. - -```js - var redis = require("redis"), - client = redis.createClient(); - - redis.debug_mode = true; - - client.on("connect", function () { - client.set("foo_rand000000000000", "some fantastic value"); - }); -``` - -This will display: - - mjr:~/work/node_redis (master)$ node ~/example.js - send command: *3 - $3 - SET - $20 - foo_rand000000000000 - $20 - some fantastic value - - on_data: +OK - -`send command` is data sent into Redis and `on_data` is data received from Redis. - -## client.send_command(command_name, args, callback) - -Used internally to send commands to Redis. For convenience, nearly all commands that are published on the Redis -Wiki have been added to the `client` object. However, if I missed any, or if new commands are introduced before -this library is updated, you can use `send_command()` to send arbitrary commands to Redis. - -All commands are sent as multi-bulk commands. `args` can either be an Array of arguments, or omitted. - -## client.connected - -Boolean tracking the state of the connection to the Redis server. - -## client.command_queue.length - -The number of commands that have been sent to the Redis server but not yet replied to. You can use this to -enforce some kind of maximum queue depth for commands while connected. - -Don't mess with `client.command_queue` though unless you really know what you are doing. - -## client.offline_queue.length - -The number of commands that have been queued up for a future connection. You can use this to enforce -some kind of maximum queue depth for pre-connection commands. - -## client.retry_delay - -Current delay in milliseconds before a connection retry will be attempted. This starts at `250`. - -## client.retry_backoff - -Multiplier for future retry timeouts. This should be larger than 1 to add more time between retries. -Defaults to 1.7. The default initial connection retry is 250, so the second retry will be 425, followed by 723.5, etc. - -### Commands with Optional and Keyword arguments - -This applies to anything that uses an optional `[WITHSCORES]` or `[LIMIT offset count]` in the [redis.io/commands](http://redis.io/commands) documentation. - -Example: -```js -var args = [ 'myzset', 1, 'one', 2, 'two', 3, 'three', 99, 'ninety-nine' ]; -client.zadd(args, function (err, response) { - if (err) throw err; - console.log('added '+response+' items.'); - - // -Infinity and +Infinity also work - var args1 = [ 'myzset', '+inf', '-inf' ]; - client.zrevrangebyscore(args1, function (err, response) { - if (err) throw err; - console.log('example1', response); - // write your code here - }); - - var max = 3, min = 1, offset = 1, count = 2; - var args2 = [ 'myzset', max, min, 'WITHSCORES', 'LIMIT', offset, count ]; - client.zrevrangebyscore(args2, function (err, response) { - if (err) throw err; - console.log('example2', response); - // write your code here - }); -}); -``` - -## TODO - -Better tests for auth, disconnect/reconnect, and all combinations thereof. - -Stream large set/get values into and out of Redis. Otherwise the entire value must be in node's memory. - -Performance can be better for very large values. - -I think there are more performance improvements left in there for smaller values, especially for large lists of small values. - -## How to Contribute -- open a pull request and then wait for feedback (if - [DTrejo](http://github.com/dtrejo) does not get back to you within 2 days, - comment again with indignation!) - -## Contributors -Some people have have added features and fixed bugs in `node_redis` other than me. - -Ordered by date of first contribution. -[Auto-generated](http://github.com/dtrejo/node-authors) on Wed Jul 25 2012 19:14:59 GMT-0700 (PDT). - -- [Matt Ranney aka `mranney`](https://github.com/mranney) -- [Tim-Smart aka `tim-smart`](https://github.com/tim-smart) -- [Tj Holowaychuk aka `visionmedia`](https://github.com/visionmedia) -- [rick aka `technoweenie`](https://github.com/technoweenie) -- [Orion Henry aka `orionz`](https://github.com/orionz) -- [Aivo Paas aka `aivopaas`](https://github.com/aivopaas) -- [Hank Sims aka `hanksims`](https://github.com/hanksims) -- [Paul Carey aka `paulcarey`](https://github.com/paulcarey) -- [Pieter Noordhuis aka `pietern`](https://github.com/pietern) -- [nithesh aka `nithesh`](https://github.com/nithesh) -- [Andy Ray aka `andy2ray`](https://github.com/andy2ray) -- [unknown aka `unknowdna`](https://github.com/unknowdna) -- [Dave Hoover aka `redsquirrel`](https://github.com/redsquirrel) -- [Vladimir Dronnikov aka `dvv`](https://github.com/dvv) -- [Umair Siddique aka `umairsiddique`](https://github.com/umairsiddique) -- [Louis-Philippe Perron aka `lp`](https://github.com/lp) -- [Mark Dawson aka `markdaws`](https://github.com/markdaws) -- [Ian Babrou aka `bobrik`](https://github.com/bobrik) -- [Felix Geisendörfer aka `felixge`](https://github.com/felixge) -- [Jean-Hugues Pinson aka `undefined`](https://github.com/undefined) -- [Maksim Lin aka `maks`](https://github.com/maks) -- [Owen Smith aka `orls`](https://github.com/orls) -- [Zachary Scott aka `zzak`](https://github.com/zzak) -- [TEHEK Firefox aka `TEHEK`](https://github.com/TEHEK) -- [Isaac Z. Schlueter aka `isaacs`](https://github.com/isaacs) -- [David Trejo aka `DTrejo`](https://github.com/DTrejo) -- [Brian Noguchi aka `bnoguchi`](https://github.com/bnoguchi) -- [Philip Tellis aka `bluesmoon`](https://github.com/bluesmoon) -- [Marcus Westin aka `marcuswestin2`](https://github.com/marcuswestin2) -- [Jed Schmidt aka `jed`](https://github.com/jed) -- [Dave Peticolas aka `jdavisp3`](https://github.com/jdavisp3) -- [Trae Robrock aka `trobrock`](https://github.com/trobrock) -- [Shankar Karuppiah aka `shankar0306`](https://github.com/shankar0306) -- [Ignacio Burgueño aka `ignacio`](https://github.com/ignacio) - -Thanks. - -## LICENSE - "MIT License" - -Copyright (c) 2010 Matthew Ranney, http://ranney.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. - -![spacer](http://ranney.com/1px.gif) diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/buffer_bench.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/buffer_bench.js deleted file mode 100644 index a504fbc0..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/buffer_bench.js +++ /dev/null @@ -1,89 +0,0 @@ -var source = new Buffer(100), - dest = new Buffer(100), i, j, k, tmp, count = 1000000, bytes = 100; - -for (i = 99 ; i >= 0 ; i--) { - source[i] = 120; -} - -var str = "This is a nice String.", - buf = new Buffer("This is a lovely Buffer."); - -var start = new Date(); -for (i = count * 100; i > 0 ; i--) { - if (Buffer.isBuffer(str)) {} -} -var end = new Date(); -console.log("Buffer.isBuffer(str) " + (end - start) + " ms"); - -var start = new Date(); -for (i = count * 100; i > 0 ; i--) { - if (Buffer.isBuffer(buf)) {} -} -var end = new Date(); -console.log("Buffer.isBuffer(buf) " + (end - start) + " ms"); - -var start = new Date(); -for (i = count * 100; i > 0 ; i--) { - if (str instanceof Buffer) {} -} -var end = new Date(); -console.log("str instanceof Buffer " + (end - start) + " ms"); - -var start = new Date(); -for (i = count * 100; i > 0 ; i--) { - if (buf instanceof Buffer) {} -} -var end = new Date(); -console.log("buf instanceof Buffer " + (end - start) + " ms"); - -for (i = bytes ; i > 0 ; i --) { - var start = new Date(); - for (j = count ; j > 0; j--) { - tmp = source.toString("ascii", 0, bytes); - } - var end = new Date(); - console.log("toString() " + i + " bytes " + (end - start) + " ms"); -} - -for (i = bytes ; i > 0 ; i --) { - var start = new Date(); - for (j = count ; j > 0; j--) { - tmp = ""; - for (k = 0; k <= i ; k++) { - tmp += String.fromCharCode(source[k]); - } - } - var end = new Date(); - console.log("manual string " + i + " bytes " + (end - start) + " ms"); -} - -for (i = bytes ; i > 0 ; i--) { - var start = new Date(); - for (j = count ; j > 0 ; j--) { - for (k = i ; k > 0 ; k--) { - dest[k] = source[k]; - } - } - var end = new Date(); - console.log("Manual copy " + i + " bytes " + (end - start) + " ms"); -} - -for (i = bytes ; i > 0 ; i--) { - var start = new Date(); - for (j = count ; j > 0 ; j--) { - for (k = i ; k > 0 ; k--) { - dest[k] = 120; - } - } - var end = new Date(); - console.log("Direct assignment " + i + " bytes " + (end - start) + " ms"); -} - -for (i = bytes ; i > 0 ; i--) { - var start = new Date(); - for (j = count ; j > 0 ; j--) { - source.copy(dest, 0, 0, i); - } - var end = new Date(); - console.log("Buffer.copy() " + i + " bytes " + (end - start) + " ms"); -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/hiredis_parser.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/hiredis_parser.js deleted file mode 100644 index f1515b11..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/hiredis_parser.js +++ /dev/null @@ -1,38 +0,0 @@ -var Parser = require('../lib/parser/hiredis').Parser; -var assert = require('assert'); - -/* -This test makes sure that exceptions thrown inside of "reply" event handlers -are not trapped and mistakenly emitted as parse errors. -*/ -(function testExecuteDoesNotCatchReplyCallbackExceptions() { - var parser = new Parser(); - var replies = [{}]; - - parser.reader = { - feed: function() {}, - get: function() { - return replies.shift(); - } - }; - - var emittedError = false; - var caughtException = false; - - parser - .on('error', function() { - emittedError = true; - }) - .on('reply', function() { - throw new Error('bad'); - }); - - try { - parser.execute(); - } catch (err) { - caughtException = true; - } - - assert.equal(caughtException, true); - assert.equal(emittedError, false); -})(); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/re_sub_test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/re_sub_test.js deleted file mode 100644 index 64b8f312..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/re_sub_test.js +++ /dev/null @@ -1,14 +0,0 @@ -var client = require('../index').createClient() - , client2 = require('../index').createClient() - , assert = require('assert'); - -client.once('subscribe', function (channel, count) { - client.unsubscribe('x'); - client.subscribe('x', function () { - client.quit(); - client2.quit(); - }); - client2.publish('x', 'hi'); -}); - -client.subscribe('x'); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/reconnect_test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/reconnect_test.js deleted file mode 100644 index 7abdd516..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/reconnect_test.js +++ /dev/null @@ -1,29 +0,0 @@ -var redis = require("../index").createClient(null, null, { -// max_attempts: 4 -}); - -redis.on("error", function (err) { - console.log("Redis says: " + err); -}); - -redis.on("ready", function () { - console.log("Redis ready."); -}); - -redis.on("reconnecting", function (arg) { - console.log("Redis reconnecting: " + JSON.stringify(arg)); -}); -redis.on("connect", function () { - console.log("Redis connected."); -}); - -setInterval(function () { - var now = Date.now(); - redis.set("now", now, function (err, res) { - if (err) { - console.log(now + " Redis reply error: " + err); - } else { - console.log(now + " Redis reply: " + res); - } - }); -}, 100); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/codec.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/codec.js deleted file mode 100644 index 7d764f60..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/codec.js +++ /dev/null @@ -1,16 +0,0 @@ -var json = { - encode: JSON.stringify, - decode: JSON.parse -}; - -var MsgPack = require('node-msgpack'); -msgpack = { - encode: MsgPack.pack, - decode: function(str) { return MsgPack.unpack(new Buffer(str)); } -}; - -bison = require('bison'); - -module.exports = json; -//module.exports = msgpack; -//module.exports = bison; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/pub.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/pub.js deleted file mode 100644 index 0acde7a6..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/pub.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -var freemem = require('os').freemem; -var profiler = require('v8-profiler'); -var codec = require('../codec'); - -var sent = 0; - -var pub = require('redis').createClient(null, null, { - //command_queue_high_water: 5, - //command_queue_low_water: 1 -}) -.on('ready', function() { - this.emit('drain'); -}) -.on('drain', function() { - process.nextTick(exec); -}); - -var payload = '1'; for (var i = 0; i < 12; ++i) payload += payload; -console.log('Message payload length', payload.length); - -function exec() { - pub.publish('timeline', codec.encode({ foo: payload })); - ++sent; - if (!pub.should_buffer) { - process.nextTick(exec); - } -} - -profiler.takeSnapshot('s_0'); - -exec(); - -setInterval(function() { - profiler.takeSnapshot('s_' + sent); - console.error('sent', sent, 'free', freemem(), 'cmdqlen', pub.command_queue.length, 'offqlen', pub.offline_queue.length); -}, 2000); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/run b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/run deleted file mode 100755 index bd9ac392..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/run +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -node server.js & -node server.js & -node server.js & -node server.js & -node server.js & -node server.js & -node server.js & -node server.js & -node --debug pub.js diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/server.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/server.js deleted file mode 100644 index 035e6b74..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/server.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -var freemem = require('os').freemem; -var codec = require('../codec'); - -var id = Math.random(); -var recv = 0; - -var sub = require('redis').createClient() - .on('ready', function() { - this.subscribe('timeline'); - }) - .on('message', function(channel, message) { - var self = this; - if (message) { - message = codec.decode(message); - ++recv; - } - }); - -setInterval(function() { - console.error('id', id, 'received', recv, 'free', freemem()); -}, 2000); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/pub.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/pub.js deleted file mode 100644 index 9caf1d0b..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/pub.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -var freemem = require('os').freemem; -//var profiler = require('v8-profiler'); -var codec = require('../codec'); - -var sent = 0; - -var pub = require('redis').createClient(null, null, { - //command_queue_high_water: 5, - //command_queue_low_water: 1 -}) -.on('ready', function() { - this.del('timeline'); - this.emit('drain'); -}) -.on('drain', function() { - process.nextTick(exec); -}); - -var payload = '1'; for (var i = 0; i < 12; ++i) payload += payload; -console.log('Message payload length', payload.length); - -function exec() { - pub.rpush('timeline', codec.encode({ foo: payload })); - ++sent; - if (!pub.should_buffer) { - process.nextTick(exec); - } -} - -//profiler.takeSnapshot('s_0'); - -exec(); - -setInterval(function() { - //var ss = profiler.takeSnapshot('s_' + sent); - //console.error(ss.stringify()); - pub.llen('timeline', function(err, result) { - console.error('sent', sent, 'free', freemem(), - 'cmdqlen', pub.command_queue.length, 'offqlen', pub.offline_queue.length, - 'llen', result - ); - }); -}, 2000); - -/*setTimeout(function() { - process.exit(); -}, 30000);*/ diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/run b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/run deleted file mode 100755 index 8045ae80..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/run +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -node server.js & -#node server.js & -#node server.js & -#node server.js & -node --debug pub.js diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/server.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/server.js deleted file mode 100644 index 9cbcdd9e..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/server.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -var freemem = require('os').freemem; -var codec = require('../codec'); - -var id = Math.random(); -var recv = 0; - -var cmd = require('redis').createClient(); -var sub = require('redis').createClient() - .on('ready', function() { - this.emit('timeline'); - }) - .on('timeline', function() { - var self = this; - this.blpop('timeline', 0, function(err, result) { - var message = result[1]; - if (message) { - message = codec.decode(message); - ++recv; - } - self.emit('timeline'); - }); - }); - -setInterval(function() { - cmd.llen('timeline', function(err, result) { - console.error('id', id, 'received', recv, 'free', freemem(), 'llen', result); - }); -}, 2000); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/speed/00 b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/speed/00 deleted file mode 100644 index 29d7bf7c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/speed/00 +++ /dev/null @@ -1,13 +0,0 @@ -# size JSON msgpack bison -26602 2151.0170848180414 -25542 ? 2842.589272665782 -24835 ? ? 7280.4538397469805 -6104 6985.234528557929 -5045 ? 7217.461392841478 -4341 ? ? 14261.406335354604 -4180 15864.633685636572 -4143 ? 12954.806235781925 -4141 ? ? 44650.70733912719 -75 114227.07313350472 -40 ? 30162.440062810834 -39 ? ? 119815.66013519121 diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/speed/plot b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/speed/plot deleted file mode 100755 index 2563797c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/speed/plot +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -gnuplot >size-rate.jpg << _EOF_ - -set terminal png nocrop enhanced font verdana 12 size 640,480 -set logscale x -set logscale y -set grid -set xlabel 'Serialized object size, octets' -set ylabel 'decode(encode(obj)) rate, 1/sec' -plot '00' using 1:2 title 'json' smooth bezier, '00' using 1:3 title 'msgpack' smooth bezier, '00' using 1:4 title 'bison' smooth bezier - -_EOF_ diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/speed/size-rate.png b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/speed/size-rate.png deleted file mode 100644 index c9c2bee6b076040ccf7e6bc337c307732c400463..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6672 zcmb_gcT^KkyG}v^p$MTvXrUJokPcD;(wj5^r5FTh(xga{5<-_^Kn-960g+w=L3$7= z3Me3;NLN5QD1!9djsEWUefOOE&pqev*|R%4JM+HJJp0bfK5w$Qnf@snBn=1zI%Q~} zV+jI5upkh47ES@wKo}&)fCpJ~6Kh=(i3HT-<>irYL=Xr|B7#VujSV6i)Y}Wv@|+_P zQ6Mauh$YEjuqhxA8Ve#}NztT{XA%-XSM=;4&<}}3%E`%@nwq+~xkX1u=j7zn*47e< z#Qy&Ng@pyc#g?oregj|ed2#FF)+~v%F@+=5cT{a`kUoI`Zy;CT8ZD3_AeCbK=Q)Lw z(;t8W0u3a-Uj>mNl0ff=NGx|r(dJuNEJ+u1fDKqCgl{dTwl-XUl|Z|*Gnt1)k)DAz za2xkPAE)xB@aE`?*QK#6AS??D77d(OEQW~1kg#O@Xi^?(EE* zk7)_z5_GydHtiN8^X5S(R-w4)Bkdp5^J_1CUpo5a1bugab382tSo&X%)A=P;Q6ujz z*B?A;tK?!F5GE$s)a!%2MlU{I`_--$-PzZWypEhD4py5&9KJMrg+I5Lc^SLWcI9}R zWdlr^8espWd4Wefft|msbaPmlGF0YW#iw=0_AvLb`;J$B3&dZ?QrsQXc{b5p&+BOm z9y`x0mWM_p8F~m#ge-o#9Ndwwq)GV-p^N>wmtNe>ZO&(1#8ow^s=mBov@_cAqdg(^ z+V+%HUtdPSwI}Vr7)(?!?rjD79bUV-eDJV?8rx4%p|y2()kn{wF+8x8&Cegw<)pOl zq;!R%!UK^ab@obya%oq-9Cl?nwcTG_Pd6L;){=^Z@fBS~&`K3CpA3fx1+DU(@1uSy zL7XipFh&t2o=7rv@AKySf;SOq@)ix)kR-ha#rEFCJ+dn5s*h+5=Vg6=c_#~S#1-mJ z75eo|{H}N)YW3QxVXb}f%xOM?7zAAO%;|ideMe=k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`ohD-#3Pd(I*GK zY?DX6>UE{xV!}$z@0gn~#3#=M7#)9ScTy%D{i;0iZA0{C>@enBTPO-2bC|iU6*r(k zwbll7r8K1T;)))o--JiTXwhr$tn4g~+*E$Kt~5}PyB6$WCO3#65rlO^uudtYyd{5sT3vAGc@{Jx{k3Tfrf6neyAQVVJi{G4SqaV%!HL~B|w>&ppSwHn1X-hb#E(w>gH!|nuq=@9gLe?e`> z@s5T6`=HiG8*z1=9cmN>S4K=T^&(a;VXYQNE1tJKq;j~xYIH6@(cy#2?A!P(wt;M_ zM;e;Bz#C~OHs)5l*kFE4F5?EooBk~dR6mkj?+X4`XmOrUeXS8zTs@s^My@l|HPflo H#^C-7XAtZ( diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/speed/speed.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/speed/speed.js deleted file mode 100644 index 8e43cbc0..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/stress/speed/speed.js +++ /dev/null @@ -1,84 +0,0 @@ -var msgpack = require('node-msgpack'); -var bison = require('bison'); -var codec = { - JSON: { - encode: JSON.stringify, - decode: JSON.parse - }, - msgpack: { - encode: msgpack.pack, - decode: msgpack.unpack - }, - bison: bison -}; - -var obj, l; - -var s = '0'; -for (var i = 0; i < 12; ++i) s += s; - -obj = { - foo: s, - arrrrrr: [{a:1,b:false,c:null,d:1.0}, 1111, 2222, 33333333], - rand: [], - a: s, - ccc: s, - b: s + s + s -}; -for (i = 0; i < 100; ++i) obj.rand.push(Math.random()); -forObj(obj); - -obj = { - foo: s, - arrrrrr: [{a:1,b:false,c:null,d:1.0}, 1111, 2222, 33333333], - rand: [] -}; -for (i = 0; i < 100; ++i) obj.rand.push(Math.random()); -forObj(obj); - -obj = { - foo: s, - arrrrrr: [{a:1,b:false,c:null,d:1.0}, 1111, 2222, 33333333], - rand: [] -}; -forObj(obj); - -obj = { - arrrrrr: [{a:1,b:false,c:null,d:1.0}, 1111, 2222, 33333333], - rand: [] -}; -forObj(obj); - -function run(obj, codec) { - var t1 = Date.now(); - var n = 10000; - for (var i = 0; i < n; ++i) { - codec.decode(l = codec.encode(obj)); - } - var t2 = Date.now(); - //console.log('DONE', n*1000/(t2-t1), 'codecs/sec, length=', l.length); - return [n*1000/(t2-t1), l.length]; -} - -function series(obj, cname, n) { - var rate = 0; - var len = 0; - for (var i = 0; i < n; ++i) { - var r = run(obj, codec[cname]); - rate += r[0]; - len += r[1]; - } - rate /= n; - len /= n; - console.log(cname + ' ' + rate + ' ' + len); - return [rate, len]; -} - -function forObj(obj) { - var r = { - JSON: series(obj, 'JSON', 20), - msgpack: series(obj, 'msgpack', 20), - bison: series(obj, 'bison', 20) - }; - return r; -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/sub_quit_test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/sub_quit_test.js deleted file mode 100644 index ad1f4132..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/benches/sub_quit_test.js +++ /dev/null @@ -1,18 +0,0 @@ -var client = require("redis").createClient(), - client2 = require("redis").createClient(); - -client.subscribe("something"); -client.on("subscribe", function (channel, count) { - console.log("Got sub: " + channel); - client.unsubscribe("something"); -}); - -client.on("unsubscribe", function (channel, count) { - console.log("Got unsub: " + channel + ", quitting"); - client.quit(); -}); - -// exercise unsub before sub -client2.unsubscribe("something"); -client2.subscribe("another thing"); -client2.quit(); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/changelog.md b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/changelog.md deleted file mode 100644 index 4248288c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/changelog.md +++ /dev/null @@ -1,219 +0,0 @@ -Changelog -========= - -## v0.7.2 - April 29, 2012 - -Many contributed fixes. Thank you, contributors. - -* [GH-190] - pub/sub mode fix (Brian Noguchi) -* [GH-165] - parser selection fix (TEHEK) -* numerous documentation and examples updates -* auth errors emit Errors instead of Strings (David Trejo) - -## v0.7.1 - November 15, 2011 - -Fix regression in reconnect logic. - -Very much need automated tests for reconnection and queue logic. - -## v0.7.0 - November 14, 2011 - -Many contributed fixes. Thanks everybody. - -* [GH-127] - properly re-initialize parser on reconnect -* [GH-136] - handle passing undefined as callback (Ian Babrou) -* [GH-139] - properly handle exceptions thrown in pub/sub event handlers (Felix Geisendörfer) -* [GH-141] - detect closing state on stream error (Felix Geisendörfer) -* [GH-142] - re-select database on reconnection (Jean-Hugues Pinson) -* [GH-146] - add sort example (Maksim Lin) - -Some more goodies: - -* Fix bugs with node 0.6 -* Performance improvements -* New version of `multi_bench.js` that tests more realistic scenarios -* [GH-140] - support optional callback for subscribe commands -* Properly flush and error out command queue when connection fails -* Initial work on reconnection thresholds - -## v0.6.7 - July 30, 2011 - -(accidentally skipped v0.6.6) - -Fix and test for [GH-123] - -Passing an Array as as the last argument should expand as users -expect. The old behavior was to coerce the arguments into Strings, -which did surprising things with Arrays. - -## v0.6.5 - July 6, 2011 - -Contributed changes: - -* Support SlowBuffers (Umair Siddique) -* Add Multi to exports (Louis-Philippe Perron) -* Fix for drain event calculation (Vladimir Dronnikov) - -Thanks! - -## v0.6.4 - June 30, 2011 - -Fix bug with optional callbacks for hmset. - -## v0.6.2 - June 30, 2011 - -Bugs fixed: - -* authentication retry while server is loading db (danmaz74) [GH-101] -* command arguments processing issue with arrays - -New features: - -* Auto update of new commands from redis.io (Dave Hoover) -* Performance improvements and backpressure controls. -* Commands now return the true/false value from the underlying socket write(s). -* Implement command_queue high water and low water for more better control of queueing. - -See `examples/backpressure_drain.js` for more information. - -## v0.6.1 - June 29, 2011 - -Add support and tests for Redis scripting through EXEC command. - -Bug fix for monitor mode. (forddg) - -Auto update of new commands from redis.io (Dave Hoover) - -## v0.6.0 - April 21, 2011 - -Lots of bugs fixed. - -* connection error did not properly trigger reconnection logic [GH-85] -* client.hmget(key, [val1, val2]) was not expanding properly [GH-66] -* client.quit() while in pub/sub mode would throw an error [GH-87] -* client.multi(['hmset', 'key', {foo: 'bar'}]) fails [GH-92] -* unsubscribe before subscribe would make things very confused [GH-88] -* Add BRPOPLPUSH [GH-79] - -## v0.5.11 - April 7, 2011 - -Added DISCARD - -I originally didn't think DISCARD would do anything here because of the clever MULTI interface, but somebody -pointed out to me that DISCARD can be used to flush the WATCH set. - -## v0.5.10 - April 6, 2011 - -Added HVALS - -## v0.5.9 - March 14, 2011 - -Fix bug with empty Array arguments - Andy Ray - -## v0.5.8 - March 14, 2011 - -Add `MONITOR` command and special monitor command reply parsing. - -## v0.5.7 - February 27, 2011 - -Add magical auth command. - -Authentication is now remembered by the client and will be automatically sent to the server -on every connection, including any reconnections. - -## v0.5.6 - February 22, 2011 - -Fix bug in ready check with `return_buffers` set to `true`. - -Thanks to Dean Mao and Austin Chau. - -## v0.5.5 - February 16, 2011 - -Add probe for server readiness. - -When a Redis server starts up, it might take a while to load the dataset into memory. -During this time, the server will accept connections, but will return errors for all non-INFO -commands. Now node_redis will send an INFO command whenever it connects to a server. -If the info command indicates that the server is not ready, the client will keep trying until -the server is ready. Once it is ready, the client will emit a "ready" event as well as the -"connect" event. The client will queue up all commands sent before the server is ready, just -like it did before. When the server is ready, all offline/non-ready commands will be replayed. -This should be backward compatible with previous versions. - -To disable this ready check behavior, set `options.no_ready_check` when creating the client. - -As a side effect of this change, the key/val params from the info command are available as -`client.server_options`. Further, the version string is decomposed into individual elements -in `client.server_options.versions`. - -## v0.5.4 - February 11, 2011 - -Fix excess memory consumption from Queue backing store. - -Thanks to Gustaf Sjöberg. - -## v0.5.3 - February 5, 2011 - -Fix multi/exec error reply callback logic. - -Thanks to Stella Laurenzo. - -## v0.5.2 - January 18, 2011 - -Fix bug where unhandled error replies confuse the parser. - -## v0.5.1 - January 18, 2011 - -Fix bug where subscribe commands would not handle redis-server startup error properly. - -## v0.5.0 - December 29, 2010 - -Some bug fixes: - -* An important bug fix in reconnection logic. Previously, reply callbacks would be invoked twice after - a reconnect. -* Changed error callback argument to be an actual Error object. - -New feature: - -* Add friendly syntax for HMSET using an object. - -## v0.4.1 - December 8, 2010 - -Remove warning about missing hiredis. You probably do want it though. - -## v0.4.0 - December 5, 2010 - -Support for multiple response parsers and hiredis C library from Pieter Noordhuis. -Return Strings instead of Buffers by default. -Empty nested mb reply bug fix. - -## v0.3.9 - November 30, 2010 - -Fix parser bug on failed EXECs. - -## v0.3.8 - November 10, 2010 - -Fix for null MULTI response when WATCH condition fails. - -## v0.3.7 - November 9, 2010 - -Add "drain" and "idle" events. - -## v0.3.6 - November 3, 2010 - -Add all known Redis commands from Redis master, even ones that are coming in 2.2 and beyond. - -Send a friendlier "error" event message on stream errors like connection refused / reset. - -## v0.3.5 - October 21, 2010 - -A few bug fixes. - -* Fixed bug with `nil` multi-bulk reply lengths that showed up with `BLPOP` timeouts. -* Only emit `end` once when connection goes away. -* Fixed bug in `test.js` where driver finished before all tests completed. - -## unversioned wasteland - -See the git history for what happened before. diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/diff_multi_bench_output.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/diff_multi_bench_output.js deleted file mode 100755 index 99fdf4df..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/diff_multi_bench_output.js +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env node - -var colors = require('colors'), - fs = require('fs'), - _ = require('underscore'), - metrics = require('metrics'), - - // `node diff_multi_bench_output.js before.txt after.txt` - before = process.argv[2], - after = process.argv[3]; - -if (!before || !after) { - console.log('Please supply two file arguments:'); - var n = __filename; - n = n.substring(n.lastIndexOf('/', n.length)); - console.log(' ./' + n + ' multiBenchBefore.txt multiBenchAfter.txt'); - console.log('To generate multiBenchBefore.txt, run'); - console.log(' node multi_bench.js > multiBenchBefore.txt'); - console.log('Thank you for benchmarking responsibly.'); - return; -} - -var before_lines = fs.readFileSync(before, 'utf8').split('\n'), - after_lines = fs.readFileSync(after, 'utf8').split('\n'); - -console.log('Comparing before,', before.green, '(', before_lines.length, - 'lines)', 'to after,', after.green, '(', after_lines.length, 'lines)'); - -var total_ops = new metrics.Histogram.createUniformHistogram(); - -before_lines.forEach(function(b, i) { - var a = after_lines[i]; - if (!a || !b || !b.trim() || !a.trim()) { - // console.log('#ignored#', '>'+a+'<', '>'+b+'<'); - return; - } - - b_words = b.split(' ').filter(is_whitespace); - a_words = a.split(' ').filter(is_whitespace); - - var ops = - [b_words, a_words] - .map(function(words) { - // console.log(words); - return parseInt10(words.slice(-2, -1)); - }).filter(function(num) { - var isNaN = !num && num !== 0; - return !isNaN; - }); - if (ops.length != 2) return - - var delta = ops[1] - ops[0]; - - total_ops.update(delta); - - delta = humanize_diff(delta); - console.log( - // name of test - command_name(a_words) == command_name(b_words) - ? command_name(a_words) + ':' - : '404:', - // results of test - ops.join(' -> '), 'ops/sec (∆', delta, ')'); -}); - -console.log('Mean difference in ops/sec:', humanize_diff(total_ops.mean())); - -function is_whitespace(s) { - return !!s.trim(); -} - -function parseInt10(s) { - return parseInt(s, 10); -} - -// green if greater than 0, red otherwise -function humanize_diff(num) { - if (num > 0) { - return ('+' + num).green; - } - return ('' + num).red; -} - -function command_name(words) { - var line = words.join(' '); - return line.substr(0, line.indexOf(',')); -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/auth.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/auth.js deleted file mode 100644 index 6c0a563c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/auth.js +++ /dev/null @@ -1,5 +0,0 @@ -var redis = require("redis"), - client = redis.createClient(); - -// This command is magical. Client stashes the password and will issue on every connect. -client.auth("somepass"); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/backpressure_drain.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/backpressure_drain.js deleted file mode 100644 index 3488ef4d..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/backpressure_drain.js +++ /dev/null @@ -1,33 +0,0 @@ -var redis = require("../index"), - client = redis.createClient(null, null, { - command_queue_high_water: 5, - command_queue_low_water: 1 - }), - remaining_ops = 100000, paused = false; - -function op() { - if (remaining_ops <= 0) { - console.error("Finished."); - process.exit(0); - } - - remaining_ops--; - if (client.hset("test hash", "val " + remaining_ops, remaining_ops) === false) { - console.log("Pausing at " + remaining_ops); - paused = true; - } else { - process.nextTick(op); - } -} - -client.on("drain", function () { - if (paused) { - console.log("Resuming at " + remaining_ops); - paused = false; - process.nextTick(op); - } else { - console.log("Got drain while not paused at " + remaining_ops); - } -}); - -op(); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/eval.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/eval.js deleted file mode 100644 index c1fbf8a5..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/eval.js +++ /dev/null @@ -1,9 +0,0 @@ -var redis = require("./index"), - client = redis.createClient(); - -redis.debug_mode = true; - -client.eval("return 100.5", 0, function (err, res) { - console.dir(err); - console.dir(res); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/extend.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/extend.js deleted file mode 100644 index 488b8c2d..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/extend.js +++ /dev/null @@ -1,24 +0,0 @@ -var redis = require("redis"), - client = redis.createClient(); - -// Extend the RedisClient prototype to add a custom method -// This one converts the results from "INFO" into a JavaScript Object - -redis.RedisClient.prototype.parse_info = function (callback) { - this.info(function (err, res) { - var lines = res.toString().split("\r\n").sort(); - var obj = {}; - lines.forEach(function (line) { - var parts = line.split(':'); - if (parts[1]) { - obj[parts[0]] = parts[1]; - } - }); - callback(obj) - }); -}; - -client.parse_info(function (info) { - console.dir(info); - client.quit(); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/file.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/file.js deleted file mode 100644 index 4d2b5d1c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/file.js +++ /dev/null @@ -1,32 +0,0 @@ -// Read a file from disk, store it in Redis, then read it back from Redis. - -var redis = require("redis"), - client = redis.createClient(), - fs = require("fs"), - filename = "kids_in_cart.jpg"; - -// Get the file I use for testing like this: -// curl http://ranney.com/kids_in_cart.jpg -o kids_in_cart.jpg -// or just use your own file. - -// Read a file from fs, store it in Redis, get it back from Redis, write it back to fs. -fs.readFile(filename, function (err, data) { - if (err) throw err - console.log("Read " + data.length + " bytes from filesystem."); - - client.set(filename, data, redis.print); // set entire file - client.get(filename, function (err, reply) { // get entire file - if (err) { - console.log("Get error: " + err); - } else { - fs.writeFile("duplicate_" + filename, reply, function (err) { - if (err) { - console.log("Error on write: " + err) - } else { - console.log("File written."); - } - client.end(); - }); - } - }); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/mget.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/mget.js deleted file mode 100644 index 936740d3..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/mget.js +++ /dev/null @@ -1,5 +0,0 @@ -var client = require("redis").createClient(); - -client.mget(["sessions started", "sessions started", "foo"], function (err, res) { - console.dir(res); -}); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/monitor.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/monitor.js deleted file mode 100644 index 2cb6a4e1..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/monitor.js +++ /dev/null @@ -1,10 +0,0 @@ -var client = require("../index").createClient(), - util = require("util"); - -client.monitor(function (err, res) { - console.log("Entering monitoring mode."); -}); - -client.on("monitor", function (time, args) { - console.log(time + ": " + util.inspect(args)); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/multi.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/multi.js deleted file mode 100644 index 35c08e18..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/multi.js +++ /dev/null @@ -1,46 +0,0 @@ -var redis = require("redis"), - client = redis.createClient(), set_size = 20; - -client.sadd("bigset", "a member"); -client.sadd("bigset", "another member"); - -while (set_size > 0) { - client.sadd("bigset", "member " + set_size); - set_size -= 1; -} - -// multi chain with an individual callback -client.multi() - .scard("bigset") - .smembers("bigset") - .keys("*", function (err, replies) { - client.mget(replies, redis.print); - }) - .dbsize() - .exec(function (err, replies) { - console.log("MULTI got " + replies.length + " replies"); - replies.forEach(function (reply, index) { - console.log("Reply " + index + ": " + reply.toString()); - }); - }); - -client.mset("incr thing", 100, "incr other thing", 1, redis.print); - -// start a separate multi command queue -var multi = client.multi(); -multi.incr("incr thing", redis.print); -multi.incr("incr other thing", redis.print); - -// runs immediately -client.get("incr thing", redis.print); // 100 - -// drains multi queue and runs atomically -multi.exec(function (err, replies) { - console.log(replies); // 101, 2 -}); - -// you can re-run the same transaction if you like -multi.exec(function (err, replies) { - console.log(replies); // 102, 3 - client.quit(); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/multi2.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/multi2.js deleted file mode 100644 index 8be4d731..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/multi2.js +++ /dev/null @@ -1,29 +0,0 @@ -var redis = require("redis"), - client = redis.createClient(), multi; - -// start a separate command queue for multi -multi = client.multi(); -multi.incr("incr thing", redis.print); -multi.incr("incr other thing", redis.print); - -// runs immediately -client.mset("incr thing", 100, "incr other thing", 1, redis.print); - -// drains multi queue and runs atomically -multi.exec(function (err, replies) { - console.log(replies); // 101, 2 -}); - -// you can re-run the same transaction if you like -multi.exec(function (err, replies) { - console.log(replies); // 102, 3 - client.quit(); -}); - -client.multi([ - ["mget", "multifoo", "multibar", redis.print], - ["incr", "multifoo"], - ["incr", "multibar"] -]).exec(function (err, replies) { - console.log(replies.toString()); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/psubscribe.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/psubscribe.js deleted file mode 100644 index c57117b8..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/psubscribe.js +++ /dev/null @@ -1,33 +0,0 @@ -var redis = require("redis"), - client1 = redis.createClient(), - client2 = redis.createClient(), - client3 = redis.createClient(), - client4 = redis.createClient(), - msg_count = 0; - -redis.debug_mode = false; - -client1.on("psubscribe", function (pattern, count) { - console.log("client1 psubscribed to " + pattern + ", " + count + " total subscriptions"); - client2.publish("channeltwo", "Me!"); - client3.publish("channelthree", "Me too!"); - client4.publish("channelfour", "And me too!"); -}); - -client1.on("punsubscribe", function (pattern, count) { - console.log("client1 punsubscribed from " + pattern + ", " + count + " total subscriptions"); - client4.end(); - client3.end(); - client2.end(); - client1.end(); -}); - -client1.on("pmessage", function (pattern, channel, message) { - console.log("("+ pattern +")" + " client1 received message on " + channel + ": " + message); - msg_count += 1; - if (msg_count === 3) { - client1.punsubscribe(); - } -}); - -client1.psubscribe("channel*"); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/pub_sub.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/pub_sub.js deleted file mode 100644 index aa508d6c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/pub_sub.js +++ /dev/null @@ -1,41 +0,0 @@ -var redis = require("redis"), - client1 = redis.createClient(), msg_count = 0, - client2 = redis.createClient(); - -redis.debug_mode = false; - -// Most clients probably don't do much on "subscribe". This example uses it to coordinate things within one program. -client1.on("subscribe", function (channel, count) { - console.log("client1 subscribed to " + channel + ", " + count + " total subscriptions"); - if (count === 2) { - client2.publish("a nice channel", "I am sending a message."); - client2.publish("another one", "I am sending a second message."); - client2.publish("a nice channel", "I am sending my last message."); - } -}); - -client1.on("unsubscribe", function (channel, count) { - console.log("client1 unsubscribed from " + channel + ", " + count + " total subscriptions"); - if (count === 0) { - client2.end(); - client1.end(); - } -}); - -client1.on("message", function (channel, message) { - console.log("client1 channel " + channel + ": " + message); - msg_count += 1; - if (msg_count === 3) { - client1.unsubscribe(); - } -}); - -client1.on("ready", function () { - // if you need auth, do it here - client1.incr("did a thing"); - client1.subscribe("a nice channel", "another one"); -}); - -client2.on("ready", function () { - // if you need auth, do it here -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/simple.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/simple.js deleted file mode 100644 index f1f2e320..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/simple.js +++ /dev/null @@ -1,24 +0,0 @@ -var redis = require("redis"), - client = redis.createClient(); - -client.on("error", function (err) { - console.log("error event - " + client.host + ":" + client.port + " - " + err); -}); - -client.set("string key", "string val", redis.print); -client.hset("hash key", "hashtest 1", "some value", redis.print); -client.hset(["hash key", "hashtest 2", "some other value"], redis.print); -client.hkeys("hash key", function (err, replies) { - if (err) { - return console.error("error response - " + err); - } - - console.log(replies.length + " replies:"); - replies.forEach(function (reply, i) { - console.log(" " + i + ": " + reply); - }); -}); - -client.quit(function (err, res) { - console.log("Exiting from quit command."); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/sort.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/sort.js deleted file mode 100644 index e7c6249e..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/sort.js +++ /dev/null @@ -1,17 +0,0 @@ -var redis = require("redis"), - client = redis.createClient(); - -client.sadd("mylist", 1); -client.sadd("mylist", 2); -client.sadd("mylist", 3); - -client.set("weight_1", 5); -client.set("weight_2", 500); -client.set("weight_3", 1); - -client.set("object_1", "foo"); -client.set("object_2", "bar"); -client.set("object_3", "qux"); - -client.sort("mylist", "by", "weight_*", "get", "object_*", redis.print); -// Prints Reply: qux,foo,bar \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/subqueries.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/subqueries.js deleted file mode 100644 index 560db240..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/subqueries.js +++ /dev/null @@ -1,15 +0,0 @@ -// Sending commands in response to other commands. -// This example runs "type" against every key in the database -// -var client = require("redis").createClient(); - -client.keys("*", function (err, keys) { - keys.forEach(function (key, pos) { - client.type(key, function (err, keytype) { - console.log(key + " is " + keytype); - if (pos === (keys.length - 1)) { - client.quit(); - } - }); - }); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/subquery.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/subquery.js deleted file mode 100644 index 861657e1..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/subquery.js +++ /dev/null @@ -1,19 +0,0 @@ -var client = require("redis").createClient(); - -function print_results(obj) { - console.dir(obj); -} - -// build a map of all keys and their types -client.keys("*", function (err, all_keys) { - var key_types = {}; - - all_keys.forEach(function (key, pos) { // use second arg of forEach to get pos - client.type(key, function (err, type) { - key_types[key] = type; - if (pos === all_keys.length - 1) { // callbacks all run in order - print_results(key_types); - } - }); - }); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/unix_socket.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/unix_socket.js deleted file mode 100644 index 4a5e0bb0..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/unix_socket.js +++ /dev/null @@ -1,29 +0,0 @@ -var redis = require("redis"), - client = redis.createClient("/tmp/redis.sock"), - profiler = require("v8-profiler"); - -client.on("connect", function () { - console.log("Got Unix socket connection.") -}); - -client.on("error", function (err) { - console.log(err.message); -}); - -client.set("space chars", "space value"); - -setInterval(function () { - client.get("space chars"); -}, 100); - -function done() { - client.info(function (err, reply) { - console.log(reply.toString()); - client.quit(); - }); -} - -setTimeout(function () { - console.log("Taking snapshot."); - var snap = profiler.takeSnapshot(); -}, 5000); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/web_server.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/web_server.js deleted file mode 100644 index 9fd85923..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/examples/web_server.js +++ /dev/null @@ -1,31 +0,0 @@ -// A simple web server that generates dyanmic content based on responses from Redis - -var http = require("http"), server, - redis_client = require("redis").createClient(); - -server = http.createServer(function (request, response) { - response.writeHead(200, { - "Content-Type": "text/plain" - }); - - var redis_info, total_requests; - - redis_client.info(function (err, reply) { - redis_info = reply; // stash response in outer scope - }); - redis_client.incr("requests", function (err, reply) { - total_requests = reply; // stash response in outer scope - }); - redis_client.hincrby("ip", request.connection.remoteAddress, 1); - redis_client.hgetall("ip", function (err, reply) { - // This is the last reply, so all of the previous replies must have completed already - response.write("This page was generated after talking to redis.\n\n" + - "Redis info:\n" + redis_info + "\n" + - "Total requests: " + total_requests + "\n\n" + - "IP count: \n"); - Object.keys(reply).forEach(function (ip) { - response.write(" " + ip + ": " + reply[ip] + "\n"); - }); - response.end(); - }); -}).listen(80); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/generate_commands.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/generate_commands.js deleted file mode 100644 index e6949d3a..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/generate_commands.js +++ /dev/null @@ -1,39 +0,0 @@ -var http = require("http"), - fs = require("fs"); - -function prettyCurrentTime() { - var date = new Date(); - return date.toLocaleString(); -} - -function write_file(commands, path) { - var file_contents, out_commands; - - console.log("Writing " + Object.keys(commands).length + " commands to " + path); - - file_contents = "// This file was generated by ./generate_commands.js on " + prettyCurrentTime() + "\n"; - - out_commands = Object.keys(commands).map(function (key) { - return key.toLowerCase(); - }); - - file_contents += "module.exports = " + JSON.stringify(out_commands, null, " ") + ";\n"; - - fs.writeFile(path, file_contents); -} - -http.get({host: "redis.io", path: "/commands.json"}, function (res) { - var body = ""; - - console.log("Response from redis.io/commands.json: " + res.statusCode); - - res.on('data', function (chunk) { - body += chunk; - }); - - res.on('end', function () { - write_file(JSON.parse(body), "lib/commands.js"); - }); -}).on('error', function (e) { - console.log("Error fetching command list from redis.io: " + e.message); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/index.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/index.js deleted file mode 100644 index 61cb4e91..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/index.js +++ /dev/null @@ -1,1113 +0,0 @@ -/*global Buffer require exports console setTimeout */ - -var net = require("net"), - util = require("./lib/util"), - Queue = require("./lib/queue"), - to_array = require("./lib/to_array"), - events = require("events"), - crypto = require("crypto"), - parsers = [], commands, - connection_id = 0, - default_port = 6379, - default_host = "127.0.0.1"; - -// can set this to true to enable for all connections -exports.debug_mode = false; - -// hiredis might not be installed -try { - require("./lib/parser/hiredis"); - parsers.push(require("./lib/parser/hiredis")); -} catch (err) { - if (exports.debug_mode) { - console.warn("hiredis parser not installed."); - } -} - -parsers.push(require("./lib/parser/javascript")); - -function RedisClient(stream, options) { - this.stream = stream; - this.options = options = options || {}; - - this.connection_id = ++connection_id; - this.connected = false; - this.ready = false; - this.connections = 0; - if (this.options.socket_nodelay === undefined) { - this.options.socket_nodelay = true; - } - this.should_buffer = false; - this.command_queue_high_water = this.options.command_queue_high_water || 1000; - this.command_queue_low_water = this.options.command_queue_low_water || 0; - this.max_attempts = null; - if (options.max_attempts && !isNaN(options.max_attempts) && options.max_attempts > 0) { - this.max_attempts = +options.max_attempts; - } - this.command_queue = new Queue(); // holds sent commands to de-pipeline them - this.offline_queue = new Queue(); // holds commands issued but not able to be sent - this.commands_sent = 0; - this.connect_timeout = false; - if (options.connect_timeout && !isNaN(options.connect_timeout) && options.connect_timeout > 0) { - this.connect_timeout = +options.connect_timeout; - } - - this.enable_offline_queue = true; - if (typeof this.options.enable_offline_queue === "boolean") { - this.enable_offline_queue = this.options.enable_offline_queue; - } - - this.initialize_retry_vars(); - this.pub_sub_mode = false; - this.subscription_set = {}; - this.monitoring = false; - this.closing = false; - this.server_info = {}; - this.auth_pass = null; - this.parser_module = null; - this.selected_db = null; // save the selected db here, used when reconnecting - - this.old_state = null; - - var self = this; - - this.stream.on("connect", function () { - self.on_connect(); - }); - - this.stream.on("data", function (buffer_from_socket) { - self.on_data(buffer_from_socket); - }); - - this.stream.on("error", function (msg) { - self.on_error(msg.message); - }); - - this.stream.on("close", function () { - self.connection_gone("close"); - }); - - this.stream.on("end", function () { - self.connection_gone("end"); - }); - - this.stream.on("drain", function () { - self.should_buffer = false; - self.emit("drain"); - }); - - events.EventEmitter.call(this); -} -util.inherits(RedisClient, events.EventEmitter); -exports.RedisClient = RedisClient; - -RedisClient.prototype.initialize_retry_vars = function () { - this.retry_timer = null; - this.retry_totaltime = 0; - this.retry_delay = 150; - this.retry_backoff = 1.7; - this.attempts = 1; -}; - -// flush offline_queue and command_queue, erroring any items with a callback first -RedisClient.prototype.flush_and_error = function (message) { - var command_obj; - while (this.offline_queue.length > 0) { - command_obj = this.offline_queue.shift(); - if (typeof command_obj.callback === "function") { - command_obj.callback(message); - } - } - this.offline_queue = new Queue(); - - while (this.command_queue.length > 0) { - command_obj = this.command_queue.shift(); - if (typeof command_obj.callback === "function") { - command_obj.callback(message); - } - } - this.command_queue = new Queue(); -}; - -RedisClient.prototype.on_error = function (msg) { - var message = "Redis connection to " + this.host + ":" + this.port + " failed - " + msg, - self = this, command_obj; - - if (this.closing) { - return; - } - - if (exports.debug_mode) { - console.warn(message); - } - - this.flush_and_error(message); - - this.connected = false; - this.ready = false; - - this.emit("error", new Error(message)); - // "error" events get turned into exceptions if they aren't listened for. If the user handled this error - // then we should try to reconnect. - this.connection_gone("error"); -}; - -RedisClient.prototype.do_auth = function () { - var self = this; - - if (exports.debug_mode) { - console.log("Sending auth to " + self.host + ":" + self.port + " id " + self.connection_id); - } - self.send_anyway = true; - self.send_command("auth", [this.auth_pass], function (err, res) { - if (err) { - if (err.toString().match("LOADING")) { - // if redis is still loading the db, it will not authenticate and everything else will fail - console.log("Redis still loading, trying to authenticate later"); - setTimeout(function () { - self.do_auth(); - }, 2000); // TODO - magic number alert - return; - } else { - return self.emit("error", new Error("Auth error: " + err.message)); - } - } - if (res.toString() !== "OK") { - return self.emit("error", new Error("Auth failed: " + res.toString())); - } - if (exports.debug_mode) { - console.log("Auth succeeded " + self.host + ":" + self.port + " id " + self.connection_id); - } - if (self.auth_callback) { - self.auth_callback(err, res); - self.auth_callback = null; - } - - // now we are really connected - self.emit("connect"); - if (self.options.no_ready_check) { - self.on_ready(); - } else { - self.ready_check(); - } - }); - self.send_anyway = false; -}; - -RedisClient.prototype.on_connect = function () { - if (exports.debug_mode) { - console.log("Stream connected " + this.host + ":" + this.port + " id " + this.connection_id); - } - var self = this; - - this.connected = true; - this.ready = false; - this.attempts = 0; - this.connections += 1; - this.command_queue = new Queue(); - this.emitted_end = false; - this.initialize_retry_vars(); - if (this.options.socket_nodelay) { - this.stream.setNoDelay(); - } - this.stream.setTimeout(0); - - this.init_parser(); - - if (this.auth_pass) { - this.do_auth(); - } else { - this.emit("connect"); - - if (this.options.no_ready_check) { - this.on_ready(); - } else { - this.ready_check(); - } - } -}; - -RedisClient.prototype.init_parser = function () { - var self = this; - - if (this.options.parser) { - if (! parsers.some(function (parser) { - if (parser.name === self.options.parser) { - self.parser_module = parser; - if (exports.debug_mode) { - console.log("Using parser module: " + self.parser_module.name); - } - return true; - } - })) { - throw new Error("Couldn't find named parser " + self.options.parser + " on this system"); - } - } else { - if (exports.debug_mode) { - console.log("Using default parser module: " + parsers[0].name); - } - this.parser_module = parsers[0]; - } - - this.parser_module.debug_mode = exports.debug_mode; - - // return_buffers sends back Buffers from parser to callback. detect_buffers sends back Buffers from parser, but - // converts to Strings if the input arguments are not Buffers. - this.reply_parser = new this.parser_module.Parser({ - return_buffers: self.options.return_buffers || self.options.detect_buffers || false - }); - - // "reply error" is an error sent back by Redis - this.reply_parser.on("reply error", function (reply) { - self.return_error(new Error(reply)); - }); - this.reply_parser.on("reply", function (reply) { - self.return_reply(reply); - }); - // "error" is bad. Somehow the parser got confused. It'll try to reset and continue. - this.reply_parser.on("error", function (err) { - self.emit("error", new Error("Redis reply parser error: " + err.stack)); - }); -}; - -RedisClient.prototype.on_ready = function () { - var self = this; - - this.ready = true; - - if (this.old_state !== null) { - this.monitoring = this.old_state.monitoring; - this.pub_sub_mode = this.old_state.pub_sub_mode; - this.selected_db = this.old_state.selected_db; - this.old_state = null; - } - - // magically restore any modal commands from a previous connection - if (this.selected_db !== null) { - this.send_command('select', [this.selected_db]); - } - if (this.pub_sub_mode === true) { - // only emit "ready" when all subscriptions were made again - var callback_count = 0; - var callback = function() { - callback_count--; - if (callback_count == 0) { - self.emit("ready"); - } - } - Object.keys(this.subscription_set).forEach(function (key) { - var parts = key.split(" "); - if (exports.debug_mode) { - console.warn("sending pub/sub on_ready " + parts[0] + ", " + parts[1]); - } - callback_count++; - self.send_command(parts[0] + "scribe", [parts[1]], callback); - }); - return; - } else if (this.monitoring) { - this.send_command("monitor"); - } else { - this.send_offline_queue(); - } - this.emit("ready"); -}; - -RedisClient.prototype.on_info_cmd = function (err, res) { - var self = this, obj = {}, lines, retry_time; - - if (err) { - return self.emit("error", new Error("Ready check failed: " + err.message)); - } - - lines = res.toString().split("\r\n"); - - lines.forEach(function (line) { - var parts = line.split(':'); - if (parts[1]) { - obj[parts[0]] = parts[1]; - } - }); - - obj.versions = []; - obj.redis_version.split('.').forEach(function (num) { - obj.versions.push(+num); - }); - - // expose info key/vals to users - this.server_info = obj; - - if (!obj.loading || (obj.loading && obj.loading === "0")) { - if (exports.debug_mode) { - console.log("Redis server ready."); - } - this.on_ready(); - } else { - retry_time = obj.loading_eta_seconds * 1000; - if (retry_time > 1000) { - retry_time = 1000; - } - if (exports.debug_mode) { - console.log("Redis server still loading, trying again in " + retry_time); - } - setTimeout(function () { - self.ready_check(); - }, retry_time); - } -}; - -RedisClient.prototype.ready_check = function () { - var self = this; - - if (exports.debug_mode) { - console.log("checking server ready state..."); - } - - this.send_anyway = true; // secret flag to send_command to send something even if not "ready" - this.info(function (err, res) { - self.on_info_cmd(err, res); - }); - this.send_anyway = false; -}; - -RedisClient.prototype.send_offline_queue = function () { - var command_obj, buffered_writes = 0; - - while (this.offline_queue.length > 0) { - command_obj = this.offline_queue.shift(); - if (exports.debug_mode) { - console.log("Sending offline command: " + command_obj.command); - } - buffered_writes += !this.send_command(command_obj.command, command_obj.args, command_obj.callback); - } - this.offline_queue = new Queue(); - // Even though items were shifted off, Queue backing store still uses memory until next add, so just get a new Queue - - if (!buffered_writes) { - this.should_buffer = false; - this.emit("drain"); - } -}; - -RedisClient.prototype.connection_gone = function (why) { - var self = this, message; - - // If a retry is already in progress, just let that happen - if (this.retry_timer) { - return; - } - - if (exports.debug_mode) { - console.warn("Redis connection is gone from " + why + " event."); - } - this.connected = false; - this.ready = false; - - if (this.old_state === null) { - var state = { - monitoring: this.monitoring, - pub_sub_mode: this.pub_sub_mode, - selected_db: this.selected_db - }; - this.old_state = state; - this.monitoring = false; - this.pub_sub_mode = false; - this.selected_db = null; - } - - // since we are collapsing end and close, users don't expect to be called twice - if (! this.emitted_end) { - this.emit("end"); - this.emitted_end = true; - } - - this.flush_and_error("Redis connection gone from " + why + " event."); - - // If this is a requested shutdown, then don't retry - if (this.closing) { - this.retry_timer = null; - if (exports.debug_mode) { - console.warn("connection ended from quit command, not retrying."); - } - return; - } - - this.retry_delay = Math.floor(this.retry_delay * this.retry_backoff); - - if (exports.debug_mode) { - console.log("Retry connection in " + this.current_retry_delay + " ms"); - } - - if (this.max_attempts && this.attempts >= this.max_attempts) { - this.retry_timer = null; - // TODO - some people need a "Redis is Broken mode" for future commands that errors immediately, and others - // want the program to exit. Right now, we just log, which doesn't really help in either case. - console.error("node_redis: Couldn't get Redis connection after " + this.max_attempts + " attempts."); - return; - } - - this.attempts += 1; - this.emit("reconnecting", { - delay: self.retry_delay, - attempt: self.attempts - }); - this.retry_timer = setTimeout(function () { - if (exports.debug_mode) { - console.log("Retrying connection..."); - } - - self.retry_totaltime += self.current_retry_delay; - - if (self.connect_timeout && self.retry_totaltime >= self.connect_timeout) { - self.retry_timer = null; - // TODO - engage Redis is Broken mode for future commands, or whatever - console.error("node_redis: Couldn't get Redis connection after " + self.retry_totaltime + "ms."); - return; - } - - self.stream.connect(self.port, self.host); - self.retry_timer = null; - }, this.retry_delay); -}; - -RedisClient.prototype.on_data = function (data) { - if (exports.debug_mode) { - console.log("net read " + this.host + ":" + this.port + " id " + this.connection_id + ": " + data.toString()); - } - - try { - this.reply_parser.execute(data); - } catch (err) { - // This is an unexpected parser problem, an exception that came from the parser code itself. - // Parser should emit "error" events if it notices things are out of whack. - // Callbacks that throw exceptions will land in return_reply(), below. - // TODO - it might be nice to have a different "error" event for different types of errors - this.emit("error", err); - } -}; - -RedisClient.prototype.return_error = function (err) { - var command_obj = this.command_queue.shift(), queue_len = this.command_queue.getLength(); - - if (this.pub_sub_mode === false && queue_len === 0) { - this.emit("idle"); - this.command_queue = new Queue(); - } - if (this.should_buffer && queue_len <= this.command_queue_low_water) { - this.emit("drain"); - this.should_buffer = false; - } - - if (command_obj && typeof command_obj.callback === "function") { - try { - command_obj.callback(err); - } catch (callback_err) { - // if a callback throws an exception, re-throw it on a new stack so the parser can keep going - process.nextTick(function () { - throw callback_err; - }); - } - } else { - console.log("node_redis: no callback to send error: " + err.message); - // this will probably not make it anywhere useful, but we might as well throw - process.nextTick(function () { - throw err; - }); - } -}; - -// if a callback throws an exception, re-throw it on a new stack so the parser can keep going. -// put this try/catch in its own function because V8 doesn't optimize this well yet. -function try_callback(callback, reply) { - try { - callback(null, reply); - } catch (err) { - process.nextTick(function () { - throw err; - }); - } -} - -// hgetall converts its replies to an Object. If the reply is empty, null is returned. -function reply_to_object(reply) { - var obj = {}, j, jl, key, val; - - if (reply.length === 0) { - return null; - } - - for (j = 0, jl = reply.length; j < jl; j += 2) { - key = reply[j].toString(); - val = reply[j + 1]; - obj[key] = val; - } - - return obj; -} - -function reply_to_strings(reply) { - var i; - - if (Buffer.isBuffer(reply)) { - return reply.toString(); - } - - if (Array.isArray(reply)) { - for (i = 0; i < reply.length; i++) { - reply[i] = reply[i].toString(); - } - return reply; - } - - return reply; -} - -RedisClient.prototype.return_reply = function (reply) { - var command_obj, obj, i, len, type, timestamp, argindex, args, queue_len; - - command_obj = this.command_queue.shift(), - queue_len = this.command_queue.getLength(); - - if (this.pub_sub_mode === false && queue_len === 0) { - this.emit("idle"); - this.command_queue = new Queue(); // explicitly reclaim storage from old Queue - } - if (this.should_buffer && queue_len <= this.command_queue_low_water) { - this.emit("drain"); - this.should_buffer = false; - } - - if (command_obj && !command_obj.sub_command) { - if (typeof command_obj.callback === "function") { - if (this.options.detect_buffers && command_obj.buffer_args === false) { - // If detect_buffers option was specified, then the reply from the parser will be Buffers. - // If this command did not use Buffer arguments, then convert the reply to Strings here. - reply = reply_to_strings(reply); - } - - // TODO - confusing and error-prone that hgetall is special cased in two places - if (reply && 'hgetall' === command_obj.command.toLowerCase()) { - reply = reply_to_object(reply); - } - - try_callback(command_obj.callback, reply); - } else if (exports.debug_mode) { - console.log("no callback for reply: " + (reply && reply.toString && reply.toString())); - } - } else if (this.pub_sub_mode || (command_obj && command_obj.sub_command)) { - if (Array.isArray(reply)) { - type = reply[0].toString(); - - if (type === "message") { - this.emit("message", reply[1].toString(), reply[2]); // channel, message - } else if (type === "pmessage") { - this.emit("pmessage", reply[1].toString(), reply[2].toString(), reply[3]); // pattern, channel, message - } else if (type === "subscribe" || type === "unsubscribe" || type === "psubscribe" || type === "punsubscribe") { - if (reply[2] === 0) { - this.pub_sub_mode = false; - if (this.debug_mode) { - console.log("All subscriptions removed, exiting pub/sub mode"); - } - } else { - this.pub_sub_mode = true; - } - // subscribe commands take an optional callback and also emit an event, but only the first response is included in the callback - // TODO - document this or fix it so it works in a more obvious way - if (command_obj && typeof command_obj.callback === "function") { - try_callback(command_obj.callback, reply[1].toString()); - } - this.emit(type, reply[1].toString(), reply[2]); // channel, count - } else { - throw new Error("subscriptions are active but got unknown reply type " + type); - } - } else if (! this.closing) { - throw new Error("subscriptions are active but got an invalid reply: " + reply); - } - } else if (this.monitoring) { - len = reply.indexOf(" "); - timestamp = reply.slice(0, len); - argindex = reply.indexOf('"'); - args = reply.slice(argindex + 1, -1).split('" "').map(function (elem) { - return elem.replace(/\\"/g, '"'); - }); - this.emit("monitor", timestamp, args); - } else { - throw new Error("node_redis command queue state error. If you can reproduce this, please report it."); - } -}; - -// This Command constructor is ever so slightly faster than using an object literal, but more importantly, using -// a named constructor helps it show up meaningfully in the V8 CPU profiler and in heap snapshots. -function Command(command, args, sub_command, buffer_args, callback) { - this.command = command; - this.args = args; - this.sub_command = sub_command; - this.buffer_args = buffer_args; - this.callback = callback; -} - -RedisClient.prototype.send_command = function (command, args, callback) { - var arg, this_args, command_obj, i, il, elem_count, buffer_args, stream = this.stream, command_str = "", buffered_writes = 0, last_arg_type; - - if (typeof command !== "string") { - throw new Error("First argument to send_command must be the command name string, not " + typeof command); - } - - if (Array.isArray(args)) { - if (typeof callback === "function") { - // probably the fastest way: - // client.command([arg1, arg2], cb); (straight passthrough) - // send_command(command, [arg1, arg2], cb); - } else if (! callback) { - // most people find this variable argument length form more convenient, but it uses arguments, which is slower - // client.command(arg1, arg2, cb); (wraps up arguments into an array) - // send_command(command, [arg1, arg2, cb]); - // client.command(arg1, arg2); (callback is optional) - // send_command(command, [arg1, arg2]); - // client.command(arg1, arg2, undefined); (callback is undefined) - // send_command(command, [arg1, arg2, undefined]); - last_arg_type = typeof args[args.length - 1]; - if (last_arg_type === "function" || last_arg_type === "undefined") { - callback = args.pop(); - } - } else { - throw new Error("send_command: last argument must be a callback or undefined"); - } - } else { - throw new Error("send_command: second argument must be an array"); - } - - // if the last argument is an array and command is sadd, expand it out: - // client.sadd(arg1, [arg2, arg3, arg4], cb); - // converts to: - // client.sadd(arg1, arg2, arg3, arg4, cb); - if ((command === 'sadd' || command === 'SADD') && args.length > 0 && Array.isArray(args[args.length - 1])) { - args = args.slice(0, -1).concat(args[args.length - 1]); - } - - buffer_args = false; - for (i = 0, il = args.length, arg; i < il; i += 1) { - if (Buffer.isBuffer(args[i])) { - buffer_args = true; - } - } - - command_obj = new Command(command, args, false, buffer_args, callback); - - if ((!this.ready && !this.send_anyway) || !stream.writable) { - if (exports.debug_mode) { - if (!stream.writable) { - console.log("send command: stream is not writeable."); - } - } - - if (this.enable_offline_queue) { - if (exports.debug_mode) { - console.log("Queueing " + command + " for next server connection."); - } - this.offline_queue.push(command_obj); - this.should_buffer = true; - } else { - var not_writeable_error = new Error('send_command: stream not writeable. enable_offline_queue is false'); - if (command_obj.callback) { - command_obj.callback(not_writeable_error); - } else { - throw not_writeable_error; - } - } - - return false; - } - - if (command === "subscribe" || command === "psubscribe" || command === "unsubscribe" || command === "punsubscribe") { - this.pub_sub_command(command_obj); - } else if (command === "monitor") { - this.monitoring = true; - } else if (command === "quit") { - this.closing = true; - } else if (this.pub_sub_mode === true) { - throw new Error("Connection in pub/sub mode, only pub/sub commands may be used"); - } - this.command_queue.push(command_obj); - this.commands_sent += 1; - - elem_count = args.length + 1; - - // Always use "Multi bulk commands", but if passed any Buffer args, then do multiple writes, one for each arg. - // This means that using Buffers in commands is going to be slower, so use Strings if you don't already have a Buffer. - - command_str = "*" + elem_count + "\r\n$" + command.length + "\r\n" + command + "\r\n"; - - if (! buffer_args) { // Build up a string and send entire command in one write - for (i = 0, il = args.length, arg; i < il; i += 1) { - arg = args[i]; - if (typeof arg !== "string") { - arg = String(arg); - } - command_str += "$" + Buffer.byteLength(arg) + "\r\n" + arg + "\r\n"; - } - if (exports.debug_mode) { - console.log("send " + this.host + ":" + this.port + " id " + this.connection_id + ": " + command_str); - } - buffered_writes += !stream.write(command_str); - } else { - if (exports.debug_mode) { - console.log("send command (" + command_str + ") has Buffer arguments"); - } - buffered_writes += !stream.write(command_str); - - for (i = 0, il = args.length, arg; i < il; i += 1) { - arg = args[i]; - if (!(Buffer.isBuffer(arg) || arg instanceof String)) { - arg = String(arg); - } - - if (Buffer.isBuffer(arg)) { - if (arg.length === 0) { - if (exports.debug_mode) { - console.log("send_command: using empty string for 0 length buffer"); - } - buffered_writes += !stream.write("$0\r\n\r\n"); - } else { - buffered_writes += !stream.write("$" + arg.length + "\r\n"); - buffered_writes += !stream.write(arg); - buffered_writes += !stream.write("\r\n"); - if (exports.debug_mode) { - console.log("send_command: buffer send " + arg.length + " bytes"); - } - } - } else { - if (exports.debug_mode) { - console.log("send_command: string send " + Buffer.byteLength(arg) + " bytes: " + arg); - } - buffered_writes += !stream.write("$" + Buffer.byteLength(arg) + "\r\n" + arg + "\r\n"); - } - } - } - if (exports.debug_mode) { - console.log("send_command buffered_writes: " + buffered_writes, " should_buffer: " + this.should_buffer); - } - if (buffered_writes || this.command_queue.getLength() >= this.command_queue_high_water) { - this.should_buffer = true; - } - return !this.should_buffer; -}; - -RedisClient.prototype.pub_sub_command = function (command_obj) { - var i, key, command, args; - - if (this.pub_sub_mode === false && exports.debug_mode) { - console.log("Entering pub/sub mode from " + command_obj.command); - } - this.pub_sub_mode = true; - command_obj.sub_command = true; - - command = command_obj.command; - args = command_obj.args; - if (command === "subscribe" || command === "psubscribe") { - if (command === "subscribe") { - key = "sub"; - } else { - key = "psub"; - } - for (i = 0; i < args.length; i++) { - this.subscription_set[key + " " + args[i]] = true; - } - } else { - if (command === "unsubscribe") { - key = "sub"; - } else { - key = "psub"; - } - for (i = 0; i < args.length; i++) { - delete this.subscription_set[key + " " + args[i]]; - } - } -}; - -RedisClient.prototype.end = function () { - this.stream._events = {}; - this.connected = false; - this.ready = false; - return this.stream.end(); -}; - -function Multi(client, args) { - this.client = client; - this.queue = [["MULTI"]]; - if (Array.isArray(args)) { - this.queue = this.queue.concat(args); - } -} - -exports.Multi = Multi; - -// take 2 arrays and return the union of their elements -function set_union(seta, setb) { - var obj = {}; - - seta.forEach(function (val) { - obj[val] = true; - }); - setb.forEach(function (val) { - obj[val] = true; - }); - return Object.keys(obj); -} - -// This static list of commands is updated from time to time. ./lib/commands.js can be updated with generate_commands.js -commands = set_union(["get", "set", "setnx", "setex", "append", "strlen", "del", "exists", "setbit", "getbit", "setrange", "getrange", "substr", - "incr", "decr", "mget", "rpush", "lpush", "rpushx", "lpushx", "linsert", "rpop", "lpop", "brpop", "brpoplpush", "blpop", "llen", "lindex", - "lset", "lrange", "ltrim", "lrem", "rpoplpush", "sadd", "srem", "smove", "sismember", "scard", "spop", "srandmember", "sinter", "sinterstore", - "sunion", "sunionstore", "sdiff", "sdiffstore", "smembers", "zadd", "zincrby", "zrem", "zremrangebyscore", "zremrangebyrank", "zunionstore", - "zinterstore", "zrange", "zrangebyscore", "zrevrangebyscore", "zcount", "zrevrange", "zcard", "zscore", "zrank", "zrevrank", "hset", "hsetnx", - "hget", "hmset", "hmget", "hincrby", "hdel", "hlen", "hkeys", "hvals", "hgetall", "hexists", "incrby", "decrby", "getset", "mset", "msetnx", - "randomkey", "select", "move", "rename", "renamenx", "expire", "expireat", "keys", "dbsize", "auth", "ping", "echo", "save", "bgsave", - "bgrewriteaof", "shutdown", "lastsave", "type", "multi", "exec", "discard", "sync", "flushdb", "flushall", "sort", "info", "monitor", "ttl", - "persist", "slaveof", "debug", "config", "subscribe", "unsubscribe", "psubscribe", "punsubscribe", "publish", "watch", "unwatch", "cluster", - "restore", "migrate", "dump", "object", "client", "eval", "evalsha"], require("./lib/commands")); - -commands.forEach(function (command) { - RedisClient.prototype[command] = function (args, callback) { - if (Array.isArray(args) && typeof callback === "function") { - return this.send_command(command, args, callback); - } else { - return this.send_command(command, to_array(arguments)); - } - }; - RedisClient.prototype[command.toUpperCase()] = RedisClient.prototype[command]; - - Multi.prototype[command] = function () { - this.queue.push([command].concat(to_array(arguments))); - return this; - }; - Multi.prototype[command.toUpperCase()] = Multi.prototype[command]; -}); - -// store db in this.select_db to restore it on reconnect -RedisClient.prototype.select = function (db, callback) { - var self = this; - - this.send_command('select', [db], function (err, res) { - if (err === null) { - self.selected_db = db; - } - if (typeof(callback) === 'function') { - callback(err, res); - } - }); -}; -RedisClient.prototype.SELECT = RedisClient.prototype.select; - -// Stash auth for connect and reconnect. Send immediately if already connected. -RedisClient.prototype.auth = function () { - var args = to_array(arguments); - this.auth_pass = args[0]; - this.auth_callback = args[1]; - if (exports.debug_mode) { - console.log("Saving auth as " + this.auth_pass); - } - - if (this.connected) { - this.send_command("auth", args); - } -}; -RedisClient.prototype.AUTH = RedisClient.prototype.auth; - -RedisClient.prototype.hmget = function (arg1, arg2, arg3) { - if (Array.isArray(arg2) && typeof arg3 === "function") { - return this.send_command("hmget", [arg1].concat(arg2), arg3); - } else if (Array.isArray(arg1) && typeof arg2 === "function") { - return this.send_command("hmget", arg1, arg2); - } else { - return this.send_command("hmget", to_array(arguments)); - } -}; -RedisClient.prototype.HMGET = RedisClient.prototype.hmget; - -RedisClient.prototype.hmset = function (args, callback) { - var tmp_args, tmp_keys, i, il, key; - - if (Array.isArray(args) && typeof callback === "function") { - return this.send_command("hmset", args, callback); - } - - args = to_array(arguments); - if (typeof args[args.length - 1] === "function") { - callback = args[args.length - 1]; - args.length -= 1; - } else { - callback = null; - } - - if (args.length === 2 && typeof args[0] === "string" && typeof args[1] === "object") { - // User does: client.hmset(key, {key1: val1, key2: val2}) - tmp_args = [ args[0] ]; - tmp_keys = Object.keys(args[1]); - for (i = 0, il = tmp_keys.length; i < il ; i++) { - key = tmp_keys[i]; - tmp_args.push(key); - if (typeof args[1][key] !== "string") { - var err = new Error("hmset expected value to be a string", key, ":", args[1][key]); - if (callback) return callback(err); - else throw err; - } - tmp_args.push(args[1][key]); - } - args = tmp_args; - } - - return this.send_command("hmset", args, callback); -}; -RedisClient.prototype.HMSET = RedisClient.prototype.hmset; - -Multi.prototype.hmset = function () { - var args = to_array(arguments), tmp_args; - if (args.length >= 2 && typeof args[0] === "string" && typeof args[1] === "object") { - tmp_args = [ "hmset", args[0] ]; - Object.keys(args[1]).map(function (key) { - tmp_args.push(key); - tmp_args.push(args[1][key]); - }); - if (args[2]) { - tmp_args.push(args[2]); - } - args = tmp_args; - } else { - args.unshift("hmset"); - } - - this.queue.push(args); - return this; -}; -Multi.prototype.HMSET = Multi.prototype.hmset; - -Multi.prototype.exec = function (callback) { - var self = this; - - // drain queue, callback will catch "QUEUED" or error - // TODO - get rid of all of these anonymous functions which are elegant but slow - this.queue.forEach(function (args, index) { - var command = args[0], obj; - if (typeof args[args.length - 1] === "function") { - args = args.slice(1, -1); - } else { - args = args.slice(1); - } - if (args.length === 1 && Array.isArray(args[0])) { - args = args[0]; - } - if (command.toLowerCase() === 'hmset' && typeof args[1] === 'object') { - obj = args.pop(); - Object.keys(obj).forEach(function (key) { - args.push(key); - args.push(obj[key]); - }); - } - this.client.send_command(command, args, function (err, reply) { - if (err) { - var cur = self.queue[index]; - if (typeof cur[cur.length - 1] === "function") { - cur[cur.length - 1](err); - } else { - throw new Error(err); - } - self.queue.splice(index, 1); - } - }); - }, this); - - // TODO - make this callback part of Multi.prototype instead of creating it each time - return this.client.send_command("EXEC", [], function (err, replies) { - if (err) { - if (callback) { - callback(new Error(err)); - return; - } else { - throw new Error(err); - } - } - - var i, il, j, jl, reply, args; - - if (replies) { - for (i = 1, il = self.queue.length; i < il; i += 1) { - reply = replies[i - 1]; - args = self.queue[i]; - - // TODO - confusing and error-prone that hgetall is special cased in two places - if (reply && args[0].toLowerCase() === "hgetall") { - replies[i - 1] = reply = reply_to_object(reply); - } - - if (typeof args[args.length - 1] === "function") { - args[args.length - 1](null, reply); - } - } - } - - if (callback) { - callback(null, replies); - } - }); -}; -Multi.prototype.EXEC = Multi.prototype.exec; - -RedisClient.prototype.multi = function (args) { - return new Multi(this, args); -}; -RedisClient.prototype.MULTI = function (args) { - return new Multi(this, args); -}; - - -// stash original eval method -var eval = RedisClient.prototype.eval; -// hook eval with an attempt to evalsha for cached scripts -RedisClient.prototype.eval = -RedisClient.prototype.EVAL = function () { - var self = this, - args = to_array(arguments), - callback; - - if (typeof args[args.length - 1] === "function") { - callback = args.pop(); - } - - // replace script source with sha value - var source = args[0]; - args[0] = crypto.createHash("sha1").update(source).digest("hex"); - - self.evalsha(args, function (err, reply) { - if (err && /NOSCRIPT/.test(err.message)) { - args[0] = source; - eval.call(self, args, callback); - - } else if (callback) { - callback(err, reply); - } - }); -}; - - -exports.createClient = function (port_arg, host_arg, options) { - var port = port_arg || default_port, - host = host_arg || default_host, - redis_client, net_client; - - net_client = net.createConnection(port, host); - - redis_client = new RedisClient(net_client, options); - - redis_client.port = port; - redis_client.host = host; - - return redis_client; -}; - -exports.print = function (err, reply) { - if (err) { - console.log("Error: " + err); - } else { - console.log("Reply: " + reply); - } -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/commands.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/commands.js deleted file mode 100644 index f57cca96..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/commands.js +++ /dev/null @@ -1,147 +0,0 @@ -// This file was generated by ./generate_commands.js on Mon Aug 06 2012 15:04:06 GMT-0700 (PDT) -module.exports = [ - "append", - "auth", - "bgrewriteaof", - "bgsave", - "bitcount", - "bitop", - "blpop", - "brpop", - "brpoplpush", - "client kill", - "client list", - "config get", - "config set", - "config resetstat", - "dbsize", - "debug object", - "debug segfault", - "decr", - "decrby", - "del", - "discard", - "dump", - "echo", - "eval", - "evalsha", - "exec", - "exists", - "expire", - "expireat", - "flushall", - "flushdb", - "get", - "getbit", - "getrange", - "getset", - "hdel", - "hexists", - "hget", - "hgetall", - "hincrby", - "hincrbyfloat", - "hkeys", - "hlen", - "hmget", - "hmset", - "hset", - "hsetnx", - "hvals", - "incr", - "incrby", - "incrbyfloat", - "info", - "keys", - "lastsave", - "lindex", - "linsert", - "llen", - "lpop", - "lpush", - "lpushx", - "lrange", - "lrem", - "lset", - "ltrim", - "mget", - "migrate", - "monitor", - "move", - "mset", - "msetnx", - "multi", - "object", - "persist", - "pexpire", - "pexpireat", - "ping", - "psetex", - "psubscribe", - "pttl", - "publish", - "punsubscribe", - "quit", - "randomkey", - "rename", - "renamenx", - "restore", - "rpop", - "rpoplpush", - "rpush", - "rpushx", - "sadd", - "save", - "scard", - "script exists", - "script flush", - "script kill", - "script load", - "sdiff", - "sdiffstore", - "select", - "set", - "setbit", - "setex", - "setnx", - "setrange", - "shutdown", - "sinter", - "sinterstore", - "sismember", - "slaveof", - "slowlog", - "smembers", - "smove", - "sort", - "spop", - "srandmember", - "srem", - "strlen", - "subscribe", - "sunion", - "sunionstore", - "sync", - "time", - "ttl", - "type", - "unsubscribe", - "unwatch", - "watch", - "zadd", - "zcard", - "zcount", - "zincrby", - "zinterstore", - "zrange", - "zrangebyscore", - "zrank", - "zrem", - "zremrangebyrank", - "zremrangebyscore", - "zrevrange", - "zrevrangebyscore", - "zrevrank", - "zscore", - "zunionstore" -]; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/parser/hiredis.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/parser/hiredis.js deleted file mode 100644 index cbb15ba3..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/parser/hiredis.js +++ /dev/null @@ -1,46 +0,0 @@ -/*global Buffer require exports console setTimeout */ - -var events = require("events"), - util = require("../util"), - hiredis = require("hiredis"); - -exports.debug_mode = false; -exports.name = "hiredis"; - -function HiredisReplyParser(options) { - this.name = exports.name; - this.options = options || {}; - this.reset(); - events.EventEmitter.call(this); -} - -util.inherits(HiredisReplyParser, events.EventEmitter); - -exports.Parser = HiredisReplyParser; - -HiredisReplyParser.prototype.reset = function () { - this.reader = new hiredis.Reader({ - return_buffers: this.options.return_buffers || false - }); -}; - -HiredisReplyParser.prototype.execute = function (data) { - var reply; - this.reader.feed(data); - while (true) { - try { - reply = this.reader.get(); - } catch (err) { - this.emit("error", err); - break; - } - - if (reply === undefined) break; - - if (reply && reply.constructor === Error) { - this.emit("reply error", reply); - } else { - this.emit("reply", reply); - } - } -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/parser/javascript.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/parser/javascript.js deleted file mode 100644 index b8f5bc68..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/parser/javascript.js +++ /dev/null @@ -1,317 +0,0 @@ -/*global Buffer require exports console setTimeout */ - -// TODO - incorporate these V8 pro tips: -// pre-allocate Arrays if length is known in advance -// do not use delete -// use numbers for parser state - -var events = require("events"), - util = require("../util"); - -exports.debug_mode = false; -exports.name = "javascript"; - -function RedisReplyParser(options) { - this.name = exports.name; - this.options = options || {}; - this.reset(); - events.EventEmitter.call(this); -} - -util.inherits(RedisReplyParser, events.EventEmitter); - -exports.Parser = RedisReplyParser; - -// Buffer.toString() is quite slow for small strings -function small_toString(buf, len) { - var tmp = "", i; - - for (i = 0; i < len; i += 1) { - tmp += String.fromCharCode(buf[i]); - } - - return tmp; -} - -// Reset parser to it's original state. -RedisReplyParser.prototype.reset = function () { - this.return_buffer = new Buffer(16384); // for holding replies, might grow - this.return_string = ""; - this.tmp_string = ""; // for holding size fields - - this.multi_bulk_length = 0; - this.multi_bulk_replies = null; - this.multi_bulk_pos = 0; - this.multi_bulk_nested_length = 0; - this.multi_bulk_nested_replies = null; - - this.states = { - TYPE: 1, - SINGLE_LINE: 2, - MULTI_BULK_COUNT: 3, - INTEGER_LINE: 4, - BULK_LENGTH: 5, - ERROR_LINE: 6, - BULK_DATA: 7, - UNKNOWN_TYPE: 8, - FINAL_CR: 9, - FINAL_LF: 10, - MULTI_BULK_COUNT_LF: 11, - BULK_LF: 12 - }; - - this.state = this.states.TYPE; -}; - -RedisReplyParser.prototype.parser_error = function (message) { - this.emit("error", message); - this.reset(); -}; - -RedisReplyParser.prototype.execute = function (incoming_buf) { - var pos = 0, bd_tmp, bd_str, i, il, states = this.states; - //, state_times = {}, start_execute = new Date(), start_switch, end_switch, old_state; - //start_switch = new Date(); - - while (pos < incoming_buf.length) { - // old_state = this.state; - // console.log("execute: " + this.state + ", " + pos + "/" + incoming_buf.length + ", " + String.fromCharCode(incoming_buf[pos])); - - switch (this.state) { - case 1: // states.TYPE - this.type = incoming_buf[pos]; - pos += 1; - - switch (this.type) { - case 43: // + - this.state = states.SINGLE_LINE; - this.return_buffer.end = 0; - this.return_string = ""; - break; - case 42: // * - this.state = states.MULTI_BULK_COUNT; - this.tmp_string = ""; - break; - case 58: // : - this.state = states.INTEGER_LINE; - this.return_buffer.end = 0; - this.return_string = ""; - break; - case 36: // $ - this.state = states.BULK_LENGTH; - this.tmp_string = ""; - break; - case 45: // - - this.state = states.ERROR_LINE; - this.return_buffer.end = 0; - this.return_string = ""; - break; - default: - this.state = states.UNKNOWN_TYPE; - } - break; - case 4: // states.INTEGER_LINE - if (incoming_buf[pos] === 13) { - this.send_reply(+small_toString(this.return_buffer, this.return_buffer.end)); - this.state = states.FINAL_LF; - } else { - this.return_buffer[this.return_buffer.end] = incoming_buf[pos]; - this.return_buffer.end += 1; - } - pos += 1; - break; - case 6: // states.ERROR_LINE - if (incoming_buf[pos] === 13) { - this.send_error(this.return_buffer.toString("ascii", 0, this.return_buffer.end)); - this.state = states.FINAL_LF; - } else { - this.return_buffer[this.return_buffer.end] = incoming_buf[pos]; - this.return_buffer.end += 1; - } - pos += 1; - break; - case 2: // states.SINGLE_LINE - if (incoming_buf[pos] === 13) { - this.send_reply(this.return_string); - this.state = states.FINAL_LF; - } else { - this.return_string += String.fromCharCode(incoming_buf[pos]); - } - pos += 1; - break; - case 3: // states.MULTI_BULK_COUNT - if (incoming_buf[pos] === 13) { // \r - this.state = states.MULTI_BULK_COUNT_LF; - } else { - this.tmp_string += String.fromCharCode(incoming_buf[pos]); - } - pos += 1; - break; - case 11: // states.MULTI_BULK_COUNT_LF - if (incoming_buf[pos] === 10) { // \n - if (this.multi_bulk_length) { // nested multi-bulk - this.multi_bulk_nested_length = this.multi_bulk_length; - this.multi_bulk_nested_replies = this.multi_bulk_replies; - this.multi_bulk_nested_pos = this.multi_bulk_pos; - } - this.multi_bulk_length = +this.tmp_string; - this.multi_bulk_pos = 0; - this.state = states.TYPE; - if (this.multi_bulk_length < 0) { - this.send_reply(null); - this.multi_bulk_length = 0; - } else if (this.multi_bulk_length === 0) { - this.multi_bulk_pos = 0; - this.multi_bulk_replies = null; - this.send_reply([]); - } else { - this.multi_bulk_replies = new Array(this.multi_bulk_length); - } - } else { - this.parser_error(new Error("didn't see LF after NL reading multi bulk count")); - return; - } - pos += 1; - break; - case 5: // states.BULK_LENGTH - if (incoming_buf[pos] === 13) { // \r - this.state = states.BULK_LF; - } else { - this.tmp_string += String.fromCharCode(incoming_buf[pos]); - } - pos += 1; - break; - case 12: // states.BULK_LF - if (incoming_buf[pos] === 10) { // \n - this.bulk_length = +this.tmp_string; - if (this.bulk_length === -1) { - this.send_reply(null); - this.state = states.TYPE; - } else if (this.bulk_length === 0) { - this.send_reply(new Buffer("")); - this.state = states.FINAL_CR; - } else { - this.state = states.BULK_DATA; - if (this.bulk_length > this.return_buffer.length) { - if (exports.debug_mode) { - console.log("Growing return_buffer from " + this.return_buffer.length + " to " + this.bulk_length); - } - this.return_buffer = new Buffer(this.bulk_length); - } - this.return_buffer.end = 0; - } - } else { - this.parser_error(new Error("didn't see LF after NL while reading bulk length")); - return; - } - pos += 1; - break; - case 7: // states.BULK_DATA - this.return_buffer[this.return_buffer.end] = incoming_buf[pos]; - this.return_buffer.end += 1; - pos += 1; - if (this.return_buffer.end === this.bulk_length) { - bd_tmp = new Buffer(this.bulk_length); - // When the response is small, Buffer.copy() is a lot slower. - if (this.bulk_length > 10) { - this.return_buffer.copy(bd_tmp, 0, 0, this.bulk_length); - } else { - for (i = 0, il = this.bulk_length; i < il; i += 1) { - bd_tmp[i] = this.return_buffer[i]; - } - } - this.send_reply(bd_tmp); - this.state = states.FINAL_CR; - } - break; - case 9: // states.FINAL_CR - if (incoming_buf[pos] === 13) { // \r - this.state = states.FINAL_LF; - pos += 1; - } else { - this.parser_error(new Error("saw " + incoming_buf[pos] + " when expecting final CR")); - return; - } - break; - case 10: // states.FINAL_LF - if (incoming_buf[pos] === 10) { // \n - this.state = states.TYPE; - pos += 1; - } else { - this.parser_error(new Error("saw " + incoming_buf[pos] + " when expecting final LF")); - return; - } - break; - default: - this.parser_error(new Error("invalid state " + this.state)); - } - // end_switch = new Date(); - // if (state_times[old_state] === undefined) { - // state_times[old_state] = 0; - // } - // state_times[old_state] += (end_switch - start_switch); - // start_switch = end_switch; - } - // console.log("execute ran for " + (Date.now() - start_execute) + " ms, on " + incoming_buf.length + " Bytes. "); - // Object.keys(state_times).forEach(function (state) { - // console.log(" " + state + ": " + state_times[state]); - // }); -}; - -RedisReplyParser.prototype.send_error = function (reply) { - if (this.multi_bulk_length > 0 || this.multi_bulk_nested_length > 0) { - // TODO - can this happen? Seems like maybe not. - this.add_multi_bulk_reply(reply); - } else { - this.emit("reply error", reply); - } -}; - -RedisReplyParser.prototype.send_reply = function (reply) { - if (this.multi_bulk_length > 0 || this.multi_bulk_nested_length > 0) { - if (!this.options.return_buffers && Buffer.isBuffer(reply)) { - this.add_multi_bulk_reply(reply.toString("utf8")); - } else { - this.add_multi_bulk_reply(reply); - } - } else { - if (!this.options.return_buffers && Buffer.isBuffer(reply)) { - this.emit("reply", reply.toString("utf8")); - } else { - this.emit("reply", reply); - } - } -}; - -RedisReplyParser.prototype.add_multi_bulk_reply = function (reply) { - if (this.multi_bulk_replies) { - this.multi_bulk_replies[this.multi_bulk_pos] = reply; - this.multi_bulk_pos += 1; - if (this.multi_bulk_pos < this.multi_bulk_length) { - return; - } - } else { - this.multi_bulk_replies = reply; - } - - if (this.multi_bulk_nested_length > 0) { - this.multi_bulk_nested_replies[this.multi_bulk_nested_pos] = this.multi_bulk_replies; - this.multi_bulk_nested_pos += 1; - - this.multi_bulk_length = 0; - this.multi_bulk_replies = null; - this.multi_bulk_pos = 0; - - if (this.multi_bulk_nested_length === this.multi_bulk_nested_pos) { - this.emit("reply", this.multi_bulk_nested_replies); - this.multi_bulk_nested_length = 0; - this.multi_bulk_nested_pos = 0; - this.multi_bulk_nested_replies = null; - } - } else { - this.emit("reply", this.multi_bulk_replies); - this.multi_bulk_length = 0; - this.multi_bulk_replies = null; - this.multi_bulk_pos = 0; - } -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/queue.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/queue.js deleted file mode 100644 index 56254e1c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/queue.js +++ /dev/null @@ -1,61 +0,0 @@ -var to_array = require("./to_array"); - -// Queue class adapted from Tim Caswell's pattern library -// http://github.com/creationix/pattern/blob/master/lib/pattern/queue.js - -function Queue() { - this.tail = []; - this.head = []; - this.offset = 0; -} - -Queue.prototype.shift = function () { - if (this.offset === this.head.length) { - var tmp = this.head; - tmp.length = 0; - this.head = this.tail; - this.tail = tmp; - this.offset = 0; - if (this.head.length === 0) { - return; - } - } - return this.head[this.offset++]; // sorry, JSLint -}; - -Queue.prototype.push = function (item) { - return this.tail.push(item); -}; - -Queue.prototype.forEach = function (fn, thisv) { - var array = this.head.slice(this.offset), i, il; - - array.push.apply(array, this.tail); - - if (thisv) { - for (i = 0, il = array.length; i < il; i += 1) { - fn.call(thisv, array[i], i, array); - } - } else { - for (i = 0, il = array.length; i < il; i += 1) { - fn(array[i], i, array); - } - } - - return array; -}; - -Queue.prototype.getLength = function () { - return this.head.length - this.offset + this.tail.length; -}; - -Object.defineProperty(Queue.prototype, 'length', { - get: function () { - return this.getLength(); - } -}); - - -if(typeof module !== 'undefined' && module.exports) { - module.exports = Queue; -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/to_array.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/to_array.js deleted file mode 100644 index 88a57e18..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/to_array.js +++ /dev/null @@ -1,12 +0,0 @@ -function to_array(args) { - var len = args.length, - arr = new Array(len), i; - - for (i = 0; i < len; i += 1) { - arr[i] = args[i]; - } - - return arr; -} - -module.exports = to_array; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/util.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/util.js deleted file mode 100644 index fc255ae9..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/lib/util.js +++ /dev/null @@ -1,11 +0,0 @@ -// Support for very old versions of node where the module was called "sys". At some point, we should abandon this. - -var util; - -try { - util = require("util"); -} catch (err) { - util = require("sys"); -} - -module.exports = util; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/mem.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/mem.js deleted file mode 100644 index 5144ab28..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/mem.js +++ /dev/null @@ -1,11 +0,0 @@ -var client = require("redis").createClient(); - -client.set("foo", "barvalskdjlksdjflkdsjflksdjdflkdsjflksdjflksdj", function (err, res) { - if (err) { - console.log("Got an error, please adapt somehow."); - } else { - console.log("Got a result: " + res); - } -}); - -client.quit(); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/multi_bench.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/multi_bench.js deleted file mode 100644 index 5be2e564..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/multi_bench.js +++ /dev/null @@ -1,225 +0,0 @@ -var redis = require("./index"), - metrics = require("metrics"), - num_clients = parseInt(process.argv[2], 10) || 5, - num_requests = 20000, - tests = [], - versions_logged = false, - client_options = { - return_buffers: false - }, - small_str, large_str, small_buf, large_buf; - -redis.debug_mode = false; - -function lpad(input, len, chr) { - var str = input.toString(); - chr = chr || " "; - - while (str.length < len) { - str = chr + str; - } - return str; -} - -metrics.Histogram.prototype.print_line = function () { - var obj = this.printObj(); - - return lpad(obj.min, 4) + "/" + lpad(obj.max, 4) + "/" + lpad(obj.mean.toFixed(2), 7) + "/" + lpad(obj.p95.toFixed(2), 7); -}; - -function Test(args) { - var self = this; - - this.args = args; - - this.callback = null; - this.clients = []; - this.clients_ready = 0; - this.commands_sent = 0; - this.commands_completed = 0; - this.max_pipeline = this.args.pipeline || num_requests; - this.client_options = args.client_options || client_options; - - this.connect_latency = new metrics.Histogram(); - this.ready_latency = new metrics.Histogram(); - this.command_latency = new metrics.Histogram(); -} - -Test.prototype.run = function (callback) { - var self = this, i; - - this.callback = callback; - - for (i = 0; i < num_clients ; i++) { - this.new_client(i); - } -}; - -Test.prototype.new_client = function (id) { - var self = this, new_client; - - new_client = redis.createClient(6379, "127.0.0.1", this.client_options); - new_client.create_time = Date.now(); - - new_client.on("connect", function () { - self.connect_latency.update(Date.now() - new_client.create_time); - }); - - new_client.on("ready", function () { - if (! versions_logged) { - console.log("Client count: " + num_clients + ", node version: " + process.versions.node + ", server version: " + - new_client.server_info.redis_version + ", parser: " + new_client.reply_parser.name); - versions_logged = true; - } - self.ready_latency.update(Date.now() - new_client.create_time); - self.clients_ready++; - if (self.clients_ready === self.clients.length) { - self.on_clients_ready(); - } - }); - - self.clients[id] = new_client; -}; - -Test.prototype.on_clients_ready = function () { - process.stdout.write(lpad(this.args.descr, 13) + ", " + lpad(this.args.pipeline, 5) + "/" + this.clients_ready + " "); - this.test_start = Date.now(); - - this.fill_pipeline(); -}; - -Test.prototype.fill_pipeline = function () { - var pipeline = this.commands_sent - this.commands_completed; - - while (this.commands_sent < num_requests && pipeline < this.max_pipeline) { - this.commands_sent++; - pipeline++; - this.send_next(); - } - - if (this.commands_completed === num_requests) { - this.print_stats(); - this.stop_clients(); - } -}; - -Test.prototype.stop_clients = function () { - var self = this; - - this.clients.forEach(function (client, pos) { - if (pos === self.clients.length - 1) { - client.quit(function (err, res) { - self.callback(); - }); - } else { - client.quit(); - } - }); -}; - -Test.prototype.send_next = function () { - var self = this, - cur_client = this.commands_sent % this.clients.length, - command_num = this.commands_sent, - start = Date.now(); - - this.clients[cur_client][this.args.command](this.args.args, function (err, res) { - if (err) { - throw err; - } - self.commands_completed++; - self.command_latency.update(Date.now() - start); - self.fill_pipeline(); - }); -}; - -Test.prototype.print_stats = function () { - var duration = Date.now() - this.test_start; - - console.log("min/max/avg/p95: " + this.command_latency.print_line() + " " + lpad(duration, 6) + "ms total, " + - lpad((num_requests / (duration / 1000)).toFixed(2), 8) + " ops/sec"); -}; - -small_str = "1234"; -small_buf = new Buffer(small_str); -large_str = (new Array(4097).join("-")); -large_buf = new Buffer(large_str); - -tests.push(new Test({descr: "PING", command: "ping", args: [], pipeline: 1})); -tests.push(new Test({descr: "PING", command: "ping", args: [], pipeline: 50})); -tests.push(new Test({descr: "PING", command: "ping", args: [], pipeline: 200})); -tests.push(new Test({descr: "PING", command: "ping", args: [], pipeline: 20000})); - -tests.push(new Test({descr: "SET small str", command: "set", args: ["foo_rand000000000000", small_str], pipeline: 1})); -tests.push(new Test({descr: "SET small str", command: "set", args: ["foo_rand000000000000", small_str], pipeline: 50})); -tests.push(new Test({descr: "SET small str", command: "set", args: ["foo_rand000000000000", small_str], pipeline: 200})); -tests.push(new Test({descr: "SET small str", command: "set", args: ["foo_rand000000000000", small_str], pipeline: 20000})); - -tests.push(new Test({descr: "SET small buf", command: "set", args: ["foo_rand000000000000", small_buf], pipeline: 1})); -tests.push(new Test({descr: "SET small buf", command: "set", args: ["foo_rand000000000000", small_buf], pipeline: 50})); -tests.push(new Test({descr: "SET small buf", command: "set", args: ["foo_rand000000000000", small_buf], pipeline: 200})); -tests.push(new Test({descr: "SET small buf", command: "set", args: ["foo_rand000000000000", small_buf], pipeline: 20000})); - -tests.push(new Test({descr: "GET small str", command: "get", args: ["foo_rand000000000000"], pipeline: 1})); -tests.push(new Test({descr: "GET small str", command: "get", args: ["foo_rand000000000000"], pipeline: 50})); -tests.push(new Test({descr: "GET small str", command: "get", args: ["foo_rand000000000000"], pipeline: 200})); -tests.push(new Test({descr: "GET small str", command: "get", args: ["foo_rand000000000000"], pipeline: 20000})); - -tests.push(new Test({descr: "GET small buf", command: "get", args: ["foo_rand000000000000"], pipeline: 1, client_opts: { return_buffers: true} })); -tests.push(new Test({descr: "GET small buf", command: "get", args: ["foo_rand000000000000"], pipeline: 50, client_opts: { return_buffers: true} })); -tests.push(new Test({descr: "GET small buf", command: "get", args: ["foo_rand000000000000"], pipeline: 200, client_opts: { return_buffers: true} })); -tests.push(new Test({descr: "GET small buf", command: "get", args: ["foo_rand000000000000"], pipeline: 20000, client_opts: { return_buffers: true} })); - -tests.push(new Test({descr: "SET large str", command: "set", args: ["foo_rand000000000001", large_str], pipeline: 1})); -tests.push(new Test({descr: "SET large str", command: "set", args: ["foo_rand000000000001", large_str], pipeline: 50})); -tests.push(new Test({descr: "SET large str", command: "set", args: ["foo_rand000000000001", large_str], pipeline: 200})); -tests.push(new Test({descr: "SET large str", command: "set", args: ["foo_rand000000000001", large_str], pipeline: 20000})); - -tests.push(new Test({descr: "SET large buf", command: "set", args: ["foo_rand000000000001", large_buf], pipeline: 1})); -tests.push(new Test({descr: "SET large buf", command: "set", args: ["foo_rand000000000001", large_buf], pipeline: 50})); -tests.push(new Test({descr: "SET large buf", command: "set", args: ["foo_rand000000000001", large_buf], pipeline: 200})); -tests.push(new Test({descr: "SET large buf", command: "set", args: ["foo_rand000000000001", large_buf], pipeline: 20000})); - -tests.push(new Test({descr: "GET large str", command: "get", args: ["foo_rand000000000001"], pipeline: 1})); -tests.push(new Test({descr: "GET large str", command: "get", args: ["foo_rand000000000001"], pipeline: 50})); -tests.push(new Test({descr: "GET large str", command: "get", args: ["foo_rand000000000001"], pipeline: 200})); -tests.push(new Test({descr: "GET large str", command: "get", args: ["foo_rand000000000001"], pipeline: 20000})); - -tests.push(new Test({descr: "GET large buf", command: "get", args: ["foo_rand000000000001"], pipeline: 1, client_opts: { return_buffers: true} })); -tests.push(new Test({descr: "GET large buf", command: "get", args: ["foo_rand000000000001"], pipeline: 50, client_opts: { return_buffers: true} })); -tests.push(new Test({descr: "GET large buf", command: "get", args: ["foo_rand000000000001"], pipeline: 200, client_opts: { return_buffers: true} })); -tests.push(new Test({descr: "GET large buf", command: "get", args: ["foo_rand000000000001"], pipeline: 20000, client_opts: { return_buffers: true} })); - -tests.push(new Test({descr: "INCR", command: "incr", args: ["counter_rand000000000000"], pipeline: 1})); -tests.push(new Test({descr: "INCR", command: "incr", args: ["counter_rand000000000000"], pipeline: 50})); -tests.push(new Test({descr: "INCR", command: "incr", args: ["counter_rand000000000000"], pipeline: 200})); -tests.push(new Test({descr: "INCR", command: "incr", args: ["counter_rand000000000000"], pipeline: 20000})); - -tests.push(new Test({descr: "LPUSH", command: "lpush", args: ["mylist", small_str], pipeline: 1})); -tests.push(new Test({descr: "LPUSH", command: "lpush", args: ["mylist", small_str], pipeline: 50})); -tests.push(new Test({descr: "LPUSH", command: "lpush", args: ["mylist", small_str], pipeline: 200})); -tests.push(new Test({descr: "LPUSH", command: "lpush", args: ["mylist", small_str], pipeline: 20000})); - -tests.push(new Test({descr: "LRANGE 10", command: "lrange", args: ["mylist", "0", "9"], pipeline: 1})); -tests.push(new Test({descr: "LRANGE 10", command: "lrange", args: ["mylist", "0", "9"], pipeline: 50})); -tests.push(new Test({descr: "LRANGE 10", command: "lrange", args: ["mylist", "0", "9"], pipeline: 200})); -tests.push(new Test({descr: "LRANGE 10", command: "lrange", args: ["mylist", "0", "9"], pipeline: 20000})); - -tests.push(new Test({descr: "LRANGE 100", command: "lrange", args: ["mylist", "0", "99"], pipeline: 1})); -tests.push(new Test({descr: "LRANGE 100", command: "lrange", args: ["mylist", "0", "99"], pipeline: 50})); -tests.push(new Test({descr: "LRANGE 100", command: "lrange", args: ["mylist", "0", "99"], pipeline: 200})); -tests.push(new Test({descr: "LRANGE 100", command: "lrange", args: ["mylist", "0", "99"], pipeline: 20000})); - -function next() { - var test = tests.shift(); - if (test) { - test.run(function () { - next(); - }); - } else { - console.log("End of tests."); - process.exit(0); - } -} - -next(); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/package.json b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/package.json deleted file mode 100644 index 962c042e..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "redis", - "version": "0.7.3", - "description": "Redis client library", - "author": { - "name": "Matt Ranney", - "email": "mjr@ranney.com" - }, - "maintainers": [ - { - "name": "David Trejo", - "email": "david.daniel.trejo@gmail.com", - "url": "http://dtrejo.com/" - } - ], - "main": "./index.js", - "scripts": { - "test": "node ./test.js" - }, - "devDependencies": { - "metrics": ">=0.1.5" - }, - "repository": { - "type": "git", - "url": "git://github.com/mranney/node_redis.git" - }, - "readme": "redis - a node.js redis client\n===========================\n\nThis is a complete Redis client for node.js. It supports all Redis commands, including many recently added commands like EVAL from\nexperimental Redis server branches.\n\n\nInstall with:\n\n npm install redis\n\nPieter Noordhuis has provided a binding to the official `hiredis` C library, which is non-blocking and fast. To use `hiredis`, do:\n\n npm install hiredis redis\n\nIf `hiredis` is installed, `node_redis` will use it by default. Otherwise, a pure JavaScript parser will be used.\n\nIf you use `hiredis`, be sure to rebuild it whenever you upgrade your version of node. There are mysterious failures that can\nhappen between node and native code modules after a node upgrade.\n\n\n## Usage\n\nSimple example, included as `examples/simple.js`:\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient();\n\n // if you'd like to select database 3, instead of 0 (default), call\n // client.select(3, function() { /* ... */ });\n\n client.on(\"error\", function (err) {\n console.log(\"Error \" + err);\n });\n\n client.set(\"string key\", \"string val\", redis.print);\n client.hset(\"hash key\", \"hashtest 1\", \"some value\", redis.print);\n client.hset([\"hash key\", \"hashtest 2\", \"some other value\"], redis.print);\n client.hkeys(\"hash key\", function (err, replies) {\n console.log(replies.length + \" replies:\");\n replies.forEach(function (reply, i) {\n console.log(\" \" + i + \": \" + reply);\n });\n client.quit();\n });\n```\n\nThis will display:\n\n mjr:~/work/node_redis (master)$ node example.js\n Reply: OK\n Reply: 0\n Reply: 0\n 2 replies:\n 0: hashtest 1\n 1: hashtest 2\n mjr:~/work/node_redis (master)$\n\n\n## Performance\n\nHere are typical results of `multi_bench.js` which is similar to `redis-benchmark` from the Redis distribution.\nIt uses 50 concurrent connections with no pipelining.\n\nJavaScript parser:\n\n PING: 20000 ops 42283.30 ops/sec 0/5/1.182\n SET: 20000 ops 32948.93 ops/sec 1/7/1.515\n GET: 20000 ops 28694.40 ops/sec 0/9/1.740\n INCR: 20000 ops 39370.08 ops/sec 0/8/1.269\n LPUSH: 20000 ops 36429.87 ops/sec 0/8/1.370\n LRANGE (10 elements): 20000 ops 9891.20 ops/sec 1/9/5.048\n LRANGE (100 elements): 20000 ops 1384.56 ops/sec 10/91/36.072\n\nhiredis parser:\n\n PING: 20000 ops 46189.38 ops/sec 1/4/1.082\n SET: 20000 ops 41237.11 ops/sec 0/6/1.210\n GET: 20000 ops 39682.54 ops/sec 1/7/1.257\n INCR: 20000 ops 40080.16 ops/sec 0/8/1.242\n LPUSH: 20000 ops 41152.26 ops/sec 0/3/1.212\n LRANGE (10 elements): 20000 ops 36563.07 ops/sec 1/8/1.363\n LRANGE (100 elements): 20000 ops 21834.06 ops/sec 0/9/2.287\n\nThe performance of `node_redis` improves dramatically with pipelining, which happens automatically in most normal programs.\n\n\n### Sending Commands\n\nEach Redis command is exposed as a function on the `client` object.\nAll functions take either an `args` Array plus optional `callback` Function or\na variable number of individual arguments followed by an optional callback.\nHere is an example of passing an array of arguments and a callback:\n\n client.mset([\"test keys 1\", \"test val 1\", \"test keys 2\", \"test val 2\"], function (err, res) {});\n\nHere is that same call in the second style:\n\n client.mset(\"test keys 1\", \"test val 1\", \"test keys 2\", \"test val 2\", function (err, res) {});\n\nNote that in either form the `callback` is optional:\n\n client.set(\"some key\", \"some val\");\n client.set([\"some other key\", \"some val\"]);\n\nIf the key is missing, reply will be null (probably):\n\n client.get(\"missingkey\", function(err, reply) {\n // reply is null when the key is missing\n console.log(reply);\n });\n\nFor a list of Redis commands, see [Redis Command Reference](http://redis.io/commands)\n\nThe commands can be specified in uppercase or lowercase for convenience. `client.get()` is the same as `client.GET()`.\n\nMinimal parsing is done on the replies. Commands that return a single line reply return JavaScript Strings,\ninteger replies return JavaScript Numbers, \"bulk\" replies return node Buffers, and \"multi bulk\" replies return a\nJavaScript Array of node Buffers. `HGETALL` returns an Object with Buffers keyed by the hash keys.\n\n# API\n\n## Connection Events\n\n`client` will emit some events about the state of the connection to the Redis server.\n\n### \"ready\"\n\n`client` will emit `ready` a connection is established to the Redis server and the server reports\nthat it is ready to receive commands. Commands issued before the `ready` event are queued,\nthen replayed just before this event is emitted.\n\n### \"connect\"\n\n`client` will emit `connect` at the same time as it emits `ready` unless `client.options.no_ready_check`\nis set. If this options is set, `connect` will be emitted when the stream is connected, and then\nyou are free to try to send commands.\n\n### \"error\"\n\n`client` will emit `error` when encountering an error connecting to the Redis server.\n\nNote that \"error\" is a special event type in node. If there are no listeners for an\n\"error\" event, node will exit. This is usually what you want, but it can lead to some\ncryptic error messages like this:\n\n mjr:~/work/node_redis (master)$ node example.js\n\n node.js:50\n throw e;\n ^\n Error: ECONNREFUSED, Connection refused\n at IOWatcher.callback (net:870:22)\n at node.js:607:9\n\nNot very useful in diagnosing the problem, but if your program isn't ready to handle this,\nit is probably the right thing to just exit.\n\n`client` will also emit `error` if an exception is thrown inside of `node_redis` for whatever reason.\nIt would be nice to distinguish these two cases.\n\n### \"end\"\n\n`client` will emit `end` when an established Redis server connection has closed.\n\n### \"drain\"\n\n`client` will emit `drain` when the TCP connection to the Redis server has been buffering, but is now\nwritable. This event can be used to stream commands in to Redis and adapt to backpressure. Right now,\nyou need to check `client.command_queue.length` to decide when to reduce your send rate. Then you can\nresume sending when you get `drain`.\n\n### \"idle\"\n\n`client` will emit `idle` when there are no outstanding commands that are awaiting a response.\n\n## redis.createClient(port, host, options)\n\nCreate a new client connection. `port` defaults to `6379` and `host` defaults\nto `127.0.0.1`. If you have `redis-server` running on the same computer as node, then the defaults for\nport and host are probably fine. `options` in an object with the following possible properties:\n\n* `parser`: which Redis protocol reply parser to use. Defaults to `hiredis` if that module is installed.\nThis may also be set to `javascript`.\n* `return_buffers`: defaults to `false`. If set to `true`, then all replies will be sent to callbacks as node Buffer\nobjects instead of JavaScript Strings.\n* `detect_buffers`: default to `false`. If set to `true`, then replies will be sent to callbacks as node Buffer objects\nif any of the input arguments to the original command were Buffer objects.\nThis option lets you switch between Buffers and Strings on a per-command basis, whereas `return_buffers` applies to\nevery command on a client.\n* `socket_nodelay`: defaults to `true`. Whether to call setNoDelay() on the TCP stream, which disables the\nNagle algorithm on the underlying socket. Setting this option to `false` can result in additional throughput at the\ncost of more latency. Most applications will want this set to `true`.\n* `no_ready_check`: defaults to `false`. When a connection is established to the Redis server, the server might still\nbe loading the database from disk. While loading, the server not respond to any commands. To work around this,\n`node_redis` has a \"ready check\" which sends the `INFO` command to the server. The response from the `INFO` command\nindicates whether the server is ready for more commands. When ready, `node_redis` emits a `ready` event.\nSetting `no_ready_check` to `true` will inhibit this check.\n* `enable_offline_queue`: defaults to `true`. By default, if there is no active\nconnection to the redis server, commands are added to a queue and are executed\nonce the connection has been established. Setting `enable_offline_queue` to\n`false` will disable this feature and the callback will be execute immediately\nwith an error, or an error will be thrown if no callback is specified.\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient(null, null, {detect_buffers: true});\n\n client.set(\"foo_rand000000000000\", \"OK\");\n\n // This will return a JavaScript String\n client.get(\"foo_rand000000000000\", function (err, reply) {\n console.log(reply.toString()); // Will print `OK`\n });\n\n // This will return a Buffer since original key is specified as a Buffer\n client.get(new Buffer(\"foo_rand000000000000\"), function (err, reply) {\n console.log(reply.toString()); // Will print ``\n });\n client.end();\n```\n\n`createClient()` returns a `RedisClient` object that is named `client` in all of the examples here.\n\n## client.auth(password, callback)\n\nWhen connecting to Redis servers that require authentication, the `AUTH` command must be sent as the\nfirst command after connecting. This can be tricky to coordinate with reconnections, the ready check,\netc. To make this easier, `client.auth()` stashes `password` and will send it after each connection,\nincluding reconnections. `callback` is invoked only once, after the response to the very first\n`AUTH` command sent.\nNOTE: Your call to `client.auth()` should not be inside the ready handler. If\nyou are doing this wrong, `client` will emit an error that looks\nsomething like this `Error: Ready check failed: ERR operation not permitted`.\n\n## client.end()\n\nForcibly close the connection to the Redis server. Note that this does not wait until all replies have been parsed.\nIf you want to exit cleanly, call `client.quit()` to send the `QUIT` command after you have handled all replies.\n\nThis example closes the connection to the Redis server before the replies have been read. You probably don't\nwant to do this:\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient();\n\n client.set(\"foo_rand000000000000\", \"some fantastic value\");\n client.get(\"foo_rand000000000000\", function (err, reply) {\n console.log(reply.toString());\n });\n client.end();\n```\n\n`client.end()` is useful for timeout cases where something is stuck or taking too long and you want\nto start over.\n\n## Friendlier hash commands\n\nMost Redis commands take a single String or an Array of Strings as arguments, and replies are sent back as a single String or an Array of Strings.\nWhen dealing with hash values, there are a couple of useful exceptions to this.\n\n### client.hgetall(hash)\n\nThe reply from an HGETALL command will be converted into a JavaScript Object by `node_redis`. That way you can interact\nwith the responses using JavaScript syntax.\n\nExample:\n\n client.hmset(\"hosts\", \"mjr\", \"1\", \"another\", \"23\", \"home\", \"1234\");\n client.hgetall(\"hosts\", function (err, obj) {\n console.dir(obj);\n });\n\nOutput:\n\n { mjr: '1', another: '23', home: '1234' }\n\n### client.hmset(hash, obj, [callback])\n\nMultiple values in a hash can be set by supplying an object:\n\n client.HMSET(key2, {\n \"0123456789\": \"abcdefghij\", // NOTE: the key and value must both be strings\n \"some manner of key\": \"a type of value\"\n });\n\nThe properties and values of this Object will be set as keys and values in the Redis hash.\n\n### client.hmset(hash, key1, val1, ... keyn, valn, [callback])\n\nMultiple values may also be set by supplying a list:\n\n client.HMSET(key1, \"0123456789\", \"abcdefghij\", \"some manner of key\", \"a type of value\");\n\n\n## Publish / Subscribe\n\nHere is a simple example of the API for publish / subscribe. This program opens two\nclient connections, subscribes to a channel on one of them, and publishes to that\nchannel on the other:\n\n```js\n var redis = require(\"redis\"),\n client1 = redis.createClient(), client2 = redis.createClient(),\n msg_count = 0;\n\n client1.on(\"subscribe\", function (channel, count) {\n client2.publish(\"a nice channel\", \"I am sending a message.\");\n client2.publish(\"a nice channel\", \"I am sending a second message.\");\n client2.publish(\"a nice channel\", \"I am sending my last message.\");\n });\n\n client1.on(\"message\", function (channel, message) {\n console.log(\"client1 channel \" + channel + \": \" + message);\n msg_count += 1;\n if (msg_count === 3) {\n client1.unsubscribe();\n client1.end();\n client2.end();\n }\n });\n\n client1.incr(\"did a thing\");\n client1.subscribe(\"a nice channel\");\n```\n\nWhen a client issues a `SUBSCRIBE` or `PSUBSCRIBE`, that connection is put into \"pub/sub\" mode.\nAt that point, only commands that modify the subscription set are valid. When the subscription\nset is empty, the connection is put back into regular mode.\n\nIf you need to send regular commands to Redis while in pub/sub mode, just open another connection.\n\n## Pub / Sub Events\n\nIf a client has subscriptions active, it may emit these events:\n\n### \"message\" (channel, message)\n\nClient will emit `message` for every message received that matches an active subscription.\nListeners are passed the channel name as `channel` and the message Buffer as `message`.\n\n### \"pmessage\" (pattern, channel, message)\n\nClient will emit `pmessage` for every message received that matches an active subscription pattern.\nListeners are passed the original pattern used with `PSUBSCRIBE` as `pattern`, the sending channel\nname as `channel`, and the message Buffer as `message`.\n\n### \"subscribe\" (channel, count)\n\nClient will emit `subscribe` in response to a `SUBSCRIBE` command. Listeners are passed the\nchannel name as `channel` and the new count of subscriptions for this client as `count`.\n\n### \"psubscribe\" (pattern, count)\n\nClient will emit `psubscribe` in response to a `PSUBSCRIBE` command. Listeners are passed the\noriginal pattern as `pattern`, and the new count of subscriptions for this client as `count`.\n\n### \"unsubscribe\" (channel, count)\n\nClient will emit `unsubscribe` in response to a `UNSUBSCRIBE` command. Listeners are passed the\nchannel name as `channel` and the new count of subscriptions for this client as `count`. When\n`count` is 0, this client has left pub/sub mode and no more pub/sub events will be emitted.\n\n### \"punsubscribe\" (pattern, count)\n\nClient will emit `punsubscribe` in response to a `PUNSUBSCRIBE` command. Listeners are passed the\nchannel name as `channel` and the new count of subscriptions for this client as `count`. When\n`count` is 0, this client has left pub/sub mode and no more pub/sub events will be emitted.\n\n## client.multi([commands])\n\n`MULTI` commands are queued up until an `EXEC` is issued, and then all commands are run atomically by\nRedis. The interface in `node_redis` is to return an individual `Multi` object by calling `client.multi()`.\n\n```js\n var redis = require(\"./index\"),\n client = redis.createClient(), set_size = 20;\n\n client.sadd(\"bigset\", \"a member\");\n client.sadd(\"bigset\", \"another member\");\n\n while (set_size > 0) {\n client.sadd(\"bigset\", \"member \" + set_size);\n set_size -= 1;\n }\n\n // multi chain with an individual callback\n client.multi()\n .scard(\"bigset\")\n .smembers(\"bigset\")\n .keys(\"*\", function (err, replies) {\n // NOTE: code in this callback is NOT atomic\n // this only happens after the the .exec call finishes.\n client.mget(replies, redis.print);\n })\n .dbsize()\n .exec(function (err, replies) {\n console.log(\"MULTI got \" + replies.length + \" replies\");\n replies.forEach(function (reply, index) {\n console.log(\"Reply \" + index + \": \" + reply.toString());\n });\n });\n```\n\n`client.multi()` is a constructor that returns a `Multi` object. `Multi` objects share all of the\nsame command methods as `client` objects do. Commands are queued up inside the `Multi` object\nuntil `Multi.exec()` is invoked.\n\nYou can either chain together `MULTI` commands as in the above example, or you can queue individual\ncommands while still sending regular client command as in this example:\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient(), multi;\n\n // start a separate multi command queue\n multi = client.multi();\n multi.incr(\"incr thing\", redis.print);\n multi.incr(\"incr other thing\", redis.print);\n\n // runs immediately\n client.mset(\"incr thing\", 100, \"incr other thing\", 1, redis.print);\n\n // drains multi queue and runs atomically\n multi.exec(function (err, replies) {\n console.log(replies); // 101, 2\n });\n\n // you can re-run the same transaction if you like\n multi.exec(function (err, replies) {\n console.log(replies); // 102, 3\n client.quit();\n });\n```\n\nIn addition to adding commands to the `MULTI` queue individually, you can also pass an array\nof commands and arguments to the constructor:\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient(), multi;\n\n client.multi([\n [\"mget\", \"multifoo\", \"multibar\", redis.print],\n [\"incr\", \"multifoo\"],\n [\"incr\", \"multibar\"]\n ]).exec(function (err, replies) {\n console.log(replies);\n });\n```\n\n\n## Monitor mode\n\nRedis supports the `MONITOR` command, which lets you see all commands received by the Redis server\nacross all client connections, including from other client libraries and other computers.\n\nAfter you send the `MONITOR` command, no other commands are valid on that connection. `node_redis`\nwill emit a `monitor` event for every new monitor message that comes across. The callback for the\n`monitor` event takes a timestamp from the Redis server and an array of command arguments.\n\nHere is a simple example:\n\n```js\n var client = require(\"redis\").createClient(),\n util = require(\"util\");\n\n client.monitor(function (err, res) {\n console.log(\"Entering monitoring mode.\");\n });\n\n client.on(\"monitor\", function (time, args) {\n console.log(time + \": \" + util.inspect(args));\n });\n```\n\n# Extras\n\nSome other things you might like to know about.\n\n## client.server_info\n\nAfter the ready probe completes, the results from the INFO command are saved in the `client.server_info`\nobject.\n\nThe `versions` key contains an array of the elements of the version string for easy comparison.\n\n > client.server_info.redis_version\n '2.3.0'\n > client.server_info.versions\n [ 2, 3, 0 ]\n\n## redis.print()\n\nA handy callback function for displaying return values when testing. Example:\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient();\n\n client.on(\"connect\", function () {\n client.set(\"foo_rand000000000000\", \"some fantastic value\", redis.print);\n client.get(\"foo_rand000000000000\", redis.print);\n });\n```\n\nThis will print:\n\n Reply: OK\n Reply: some fantastic value\n\nNote that this program will not exit cleanly because the client is still connected.\n\n## redis.debug_mode\n\nBoolean to enable debug mode and protocol tracing.\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient();\n\n redis.debug_mode = true;\n\n client.on(\"connect\", function () {\n client.set(\"foo_rand000000000000\", \"some fantastic value\");\n });\n```\n\nThis will display:\n\n mjr:~/work/node_redis (master)$ node ~/example.js\n send command: *3\n $3\n SET\n $20\n foo_rand000000000000\n $20\n some fantastic value\n\n on_data: +OK\n\n`send command` is data sent into Redis and `on_data` is data received from Redis.\n\n## client.send_command(command_name, args, callback)\n\nUsed internally to send commands to Redis. For convenience, nearly all commands that are published on the Redis\nWiki have been added to the `client` object. However, if I missed any, or if new commands are introduced before\nthis library is updated, you can use `send_command()` to send arbitrary commands to Redis.\n\nAll commands are sent as multi-bulk commands. `args` can either be an Array of arguments, or omitted.\n\n## client.connected\n\nBoolean tracking the state of the connection to the Redis server.\n\n## client.command_queue.length\n\nThe number of commands that have been sent to the Redis server but not yet replied to. You can use this to\nenforce some kind of maximum queue depth for commands while connected.\n\nDon't mess with `client.command_queue` though unless you really know what you are doing.\n\n## client.offline_queue.length\n\nThe number of commands that have been queued up for a future connection. You can use this to enforce\nsome kind of maximum queue depth for pre-connection commands.\n\n## client.retry_delay\n\nCurrent delay in milliseconds before a connection retry will be attempted. This starts at `250`.\n\n## client.retry_backoff\n\nMultiplier for future retry timeouts. This should be larger than 1 to add more time between retries.\nDefaults to 1.7. The default initial connection retry is 250, so the second retry will be 425, followed by 723.5, etc.\n\n### Commands with Optional and Keyword arguments\n\nThis applies to anything that uses an optional `[WITHSCORES]` or `[LIMIT offset count]` in the [redis.io/commands](http://redis.io/commands) documentation.\n\nExample:\n```js\nvar args = [ 'myzset', 1, 'one', 2, 'two', 3, 'three', 99, 'ninety-nine' ];\nclient.zadd(args, function (err, response) {\n if (err) throw err;\n console.log('added '+response+' items.');\n\n // -Infinity and +Infinity also work\n var args1 = [ 'myzset', '+inf', '-inf' ];\n client.zrevrangebyscore(args1, function (err, response) {\n if (err) throw err;\n console.log('example1', response);\n // write your code here\n });\n\n var max = 3, min = 1, offset = 1, count = 2;\n var args2 = [ 'myzset', max, min, 'WITHSCORES', 'LIMIT', offset, count ];\n client.zrevrangebyscore(args2, function (err, response) {\n if (err) throw err;\n console.log('example2', response);\n // write your code here\n });\n});\n```\n\n## TODO\n\nBetter tests for auth, disconnect/reconnect, and all combinations thereof.\n\nStream large set/get values into and out of Redis. Otherwise the entire value must be in node's memory.\n\nPerformance can be better for very large values.\n\nI think there are more performance improvements left in there for smaller values, especially for large lists of small values.\n\n## How to Contribute\n- open a pull request and then wait for feedback (if\n [DTrejo](http://github.com/dtrejo) does not get back to you within 2 days,\n comment again with indignation!)\n\n## Contributors\nSome people have have added features and fixed bugs in `node_redis` other than me.\n\nOrdered by date of first contribution.\n[Auto-generated](http://github.com/dtrejo/node-authors) on Wed Jul 25 2012 19:14:59 GMT-0700 (PDT).\n\n- [Matt Ranney aka `mranney`](https://github.com/mranney)\n- [Tim-Smart aka `tim-smart`](https://github.com/tim-smart)\n- [Tj Holowaychuk aka `visionmedia`](https://github.com/visionmedia)\n- [rick aka `technoweenie`](https://github.com/technoweenie)\n- [Orion Henry aka `orionz`](https://github.com/orionz)\n- [Aivo Paas aka `aivopaas`](https://github.com/aivopaas)\n- [Hank Sims aka `hanksims`](https://github.com/hanksims)\n- [Paul Carey aka `paulcarey`](https://github.com/paulcarey)\n- [Pieter Noordhuis aka `pietern`](https://github.com/pietern)\n- [nithesh aka `nithesh`](https://github.com/nithesh)\n- [Andy Ray aka `andy2ray`](https://github.com/andy2ray)\n- [unknown aka `unknowdna`](https://github.com/unknowdna)\n- [Dave Hoover aka `redsquirrel`](https://github.com/redsquirrel)\n- [Vladimir Dronnikov aka `dvv`](https://github.com/dvv)\n- [Umair Siddique aka `umairsiddique`](https://github.com/umairsiddique)\n- [Louis-Philippe Perron aka `lp`](https://github.com/lp)\n- [Mark Dawson aka `markdaws`](https://github.com/markdaws)\n- [Ian Babrou aka `bobrik`](https://github.com/bobrik)\n- [Felix Geisendörfer aka `felixge`](https://github.com/felixge)\n- [Jean-Hugues Pinson aka `undefined`](https://github.com/undefined)\n- [Maksim Lin aka `maks`](https://github.com/maks)\n- [Owen Smith aka `orls`](https://github.com/orls)\n- [Zachary Scott aka `zzak`](https://github.com/zzak)\n- [TEHEK Firefox aka `TEHEK`](https://github.com/TEHEK)\n- [Isaac Z. Schlueter aka `isaacs`](https://github.com/isaacs)\n- [David Trejo aka `DTrejo`](https://github.com/DTrejo)\n- [Brian Noguchi aka `bnoguchi`](https://github.com/bnoguchi)\n- [Philip Tellis aka `bluesmoon`](https://github.com/bluesmoon)\n- [Marcus Westin aka `marcuswestin2`](https://github.com/marcuswestin2)\n- [Jed Schmidt aka `jed`](https://github.com/jed)\n- [Dave Peticolas aka `jdavisp3`](https://github.com/jdavisp3)\n- [Trae Robrock aka `trobrock`](https://github.com/trobrock)\n- [Shankar Karuppiah aka `shankar0306`](https://github.com/shankar0306)\n- [Ignacio Burgueño aka `ignacio`](https://github.com/ignacio)\n\nThanks.\n\n## LICENSE - \"MIT License\"\n\nCopyright (c) 2010 Matthew Ranney, http://ranney.com/\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\n![spacer](http://ranney.com/1px.gif)\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/mranney/node_redis/issues" - }, - "homepage": "https://github.com/mranney/node_redis", - "_id": "redis@0.7.3", - "_from": "redis@0.7.3" -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/test.js deleted file mode 100644 index 0a03375e..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/redis/test.js +++ /dev/null @@ -1,1618 +0,0 @@ -/*global require console setTimeout process Buffer */ -var redis = require("./index"), - client = redis.createClient(), - client2 = redis.createClient(), - client3 = redis.createClient(), - assert = require("assert"), - crypto = require("crypto"), - util = require("./lib/util"), - test_db_num = 15, // this DB will be flushed and used for testing - tests = {}, - connected = false, - ended = false, - next, cur_start, run_next_test, all_tests, all_start, test_count; - -// Set this to truthy to see the wire protocol and other debugging info -redis.debug_mode = process.argv[2]; - -function buffers_to_strings(arr) { - return arr.map(function (val) { - return val.toString(); - }); -} - -function require_number(expected, label) { - return function (err, results) { - assert.strictEqual(null, err, label + " expected " + expected + ", got error: " + err); - assert.strictEqual(expected, results, label + " " + expected + " !== " + results); - assert.strictEqual(typeof results, "number", label); - return true; - }; -} - -function require_number_any(label) { - return function (err, results) { - assert.strictEqual(null, err, label + " expected any number, got error: " + err); - assert.strictEqual(typeof results, "number", label + " " + results + " is not a number"); - return true; - }; -} - -function require_number_pos(label) { - return function (err, results) { - assert.strictEqual(null, err, label + " expected positive number, got error: " + err); - assert.strictEqual(true, (results > 0), label + " " + results + " is not a positive number"); - return true; - }; -} - -function require_string(str, label) { - return function (err, results) { - assert.strictEqual(null, err, label + " expected string '" + str + "', got error: " + err); - assert.equal(str, results, label + " " + str + " does not match " + results); - return true; - }; -} - -function require_null(label) { - return function (err, results) { - assert.strictEqual(null, err, label + " expected null, got error: " + err); - assert.strictEqual(null, results, label + ": " + results + " is not null"); - return true; - }; -} - -function require_error(label) { - return function (err, results) { - assert.notEqual(err, null, label + " err is null, but an error is expected here."); - return true; - }; -} - -function is_empty_array(obj) { - return Array.isArray(obj) && obj.length === 0; -} - -function last(name, fn) { - return function (err, results) { - fn(err, results); - next(name); - }; -} - -next = function next(name) { - console.log(" \x1b[33m" + (Date.now() - cur_start) + "\x1b[0m ms"); - run_next_test(); -}; - -// Tests are run in the order they are defined. So FLUSHDB should be stay first. - -tests.FLUSHDB = function () { - var name = "FLUSHDB"; - client.select(test_db_num, require_string("OK", name)); - client2.select(test_db_num, require_string("OK", name)); - client3.select(test_db_num, require_string("OK", name)); - client.mset("flush keys 1", "flush val 1", "flush keys 2", "flush val 2", require_string("OK", name)); - client.FLUSHDB(require_string("OK", name)); - client.dbsize(last(name, require_number(0, name))); -}; - -tests.MULTI_1 = function () { - var name = "MULTI_1", multi1, multi2; - - // Provoke an error at queue time - multi1 = client.multi(); - multi1.mset("multifoo", "10", "multibar", "20", require_string("OK", name)); - multi1.set("foo2", require_error(name)); - multi1.incr("multifoo", require_number(11, name)); - multi1.incr("multibar", require_number(21, name)); - multi1.exec(); - - // Confirm that the previous command, while containing an error, still worked. - multi2 = client.multi(); - multi2.incr("multibar", require_number(22, name)); - multi2.incr("multifoo", require_number(12, name)); - multi2.exec(function (err, replies) { - assert.strictEqual(22, replies[0]); - assert.strictEqual(12, replies[1]); - next(name); - }); -}; - -tests.MULTI_2 = function () { - var name = "MULTI_2"; - - // test nested multi-bulk replies - client.multi([ - ["mget", "multifoo", "multibar", function (err, res) { - assert.strictEqual(2, res.length, name); - assert.strictEqual("12", res[0].toString(), name); - assert.strictEqual("22", res[1].toString(), name); - }], - ["set", "foo2", require_error(name)], - ["incr", "multifoo", require_number(13, name)], - ["incr", "multibar", require_number(23, name)] - ]).exec(function (err, replies) { - assert.strictEqual(2, replies[0].length, name); - assert.strictEqual("12", replies[0][0].toString(), name); - assert.strictEqual("22", replies[0][1].toString(), name); - - assert.strictEqual("13", replies[1].toString()); - assert.strictEqual("23", replies[2].toString()); - next(name); - }); -}; - -tests.MULTI_3 = function () { - var name = "MULTI_3"; - - client.sadd("some set", "mem 1"); - client.sadd("some set", "mem 2"); - client.sadd("some set", "mem 3"); - client.sadd("some set", "mem 4"); - - // make sure empty mb reply works - client.del("some missing set"); - client.smembers("some missing set", function (err, reply) { - // make sure empty mb reply works - assert.strictEqual(true, is_empty_array(reply), name); - }); - - // test nested multi-bulk replies with empty mb elements. - client.multi([ - ["smembers", "some set"], - ["del", "some set"], - ["smembers", "some set"] - ]) - .scard("some set") - .exec(function (err, replies) { - assert.strictEqual(true, is_empty_array(replies[2]), name); - next(name); - }); -}; - -tests.MULTI_4 = function () { - var name = "MULTI_4"; - - client.multi() - .mset('some', '10', 'keys', '20') - .incr('some') - .incr('keys') - .mget('some', 'keys') - .exec(function (err, replies) { - assert.strictEqual(null, err); - assert.equal('OK', replies[0]); - assert.equal(11, replies[1]); - assert.equal(21, replies[2]); - assert.equal(11, replies[3][0].toString()); - assert.equal(21, replies[3][1].toString()); - next(name); - }); -}; - -tests.MULTI_5 = function () { - var name = "MULTI_5"; - - // test nested multi-bulk replies with nulls. - client.multi([ - ["mget", ["multifoo", "some", "random value", "keys"]], - ["incr", "multifoo"] - ]) - .exec(function (err, replies) { - assert.strictEqual(replies.length, 2, name); - assert.strictEqual(replies[0].length, 4, name); - next(name); - }); -}; - -tests.MULTI_6 = function () { - var name = "MULTI_6"; - - client.multi() - .hmset("multihash", "a", "foo", "b", 1) - .hmset("multihash", { - extra: "fancy", - things: "here" - }) - .hgetall("multihash") - .exec(function (err, replies) { - assert.strictEqual(null, err); - assert.equal("OK", replies[0]); - assert.equal(Object.keys(replies[2]).length, 4); - assert.equal("foo", replies[2].a); - assert.equal("1", replies[2].b); - assert.equal("fancy", replies[2].extra); - assert.equal("here", replies[2].things); - next(name); - }); -}; - -tests.EVAL_1 = function () { - var name = "EVAL_1"; - - if (client.server_info.versions[0] >= 2 && client.server_info.versions[1] >= 5) { - // test {EVAL - Lua integer -> Redis protocol type conversion} - client.eval("return 100.5", 0, require_number(100, name)); - // test {EVAL - Lua string -> Redis protocol type conversion} - client.eval("return 'hello world'", 0, require_string("hello world", name)); - // test {EVAL - Lua true boolean -> Redis protocol type conversion} - client.eval("return true", 0, require_number(1, name)); - // test {EVAL - Lua false boolean -> Redis protocol type conversion} - client.eval("return false", 0, require_null(name)); - // test {EVAL - Lua status code reply -> Redis protocol type conversion} - client.eval("return {ok='fine'}", 0, require_string("fine", name)); - // test {EVAL - Lua error reply -> Redis protocol type conversion} - client.eval("return {err='this is an error'}", 0, require_error(name)); - // test {EVAL - Lua table -> Redis protocol type conversion} - client.eval("return {1,2,3,'ciao',{1,2}}", 0, function (err, res) { - assert.strictEqual(5, res.length, name); - assert.strictEqual(1, res[0], name); - assert.strictEqual(2, res[1], name); - assert.strictEqual(3, res[2], name); - assert.strictEqual("ciao", res[3], name); - assert.strictEqual(2, res[4].length, name); - assert.strictEqual(1, res[4][0], name); - assert.strictEqual(2, res[4][1], name); - }); - // test {EVAL - Are the KEYS and ARGS arrays populated correctly?} - client.eval("return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}", 2, "a", "b", "c", "d", function (err, res) { - assert.strictEqual(4, res.length, name); - assert.strictEqual("a", res[0], name); - assert.strictEqual("b", res[1], name); - assert.strictEqual("c", res[2], name); - assert.strictEqual("d", res[3], name); - }); - - // prepare sha sum for evalsha cache test - var source = "return redis.call('get', 'sha test')", - sha = crypto.createHash('sha1').update(source).digest('hex'); - - client.set("sha test", "eval get sha test", function (err, res) { - if (err) throw err; - // test {EVAL - is Lua able to call Redis API?} - client.eval(source, 0, function (err, res) { - require_string("eval get sha test", name)(err, res); - // test {EVALSHA - Can we call a SHA1 if already defined?} - client.evalsha(sha, 0, require_string("eval get sha test", name)); - // test {EVALSHA - Do we get an error on non defined SHA1?} - client.evalsha("ffffffffffffffffffffffffffffffffffffffff", 0, require_error(name)); - }); - }); - - // test {EVAL - Redis integer -> Lua type conversion} - client.set("incr key", 0, function (err, reply) { - if (err) throw err; - client.eval("local foo = redis.call('incr','incr key')\n" + "return {type(foo),foo}", 0, function (err, res) { - if (err) throw err; - assert.strictEqual(2, res.length, name); - assert.strictEqual("number", res[0], name); - assert.strictEqual(1, res[1], name); - }); - }); - - client.set("bulk reply key", "bulk reply value", function (err, res) { - // test {EVAL - Redis bulk -> Lua type conversion} - client.eval("local foo = redis.call('get','bulk reply key'); return {type(foo),foo}", 0, function (err, res) { - if (err) throw err; - assert.strictEqual(2, res.length, name); - assert.strictEqual("string", res[0], name); - assert.strictEqual("bulk reply value", res[1], name); - }); - }); - - // test {EVAL - Redis multi bulk -> Lua type conversion} - client.multi() - .del("mylist") - .rpush("mylist", "a") - .rpush("mylist", "b") - .rpush("mylist", "c") - .exec(function (err, replies) { - if (err) throw err; - client.eval("local foo = redis.call('lrange','mylist',0,-1); return {type(foo),foo[1],foo[2],foo[3],# foo}", 0, function (err, res) { - assert.strictEqual(5, res.length, name); - assert.strictEqual("table", res[0], name); - assert.strictEqual("a", res[1], name); - assert.strictEqual("b", res[2], name); - assert.strictEqual("c", res[3], name); - assert.strictEqual(3, res[4], name); - }); - }); - // test {EVAL - Redis status reply -> Lua type conversion} - client.eval("local foo = redis.call('set','mykey','myval'); return {type(foo),foo['ok']}", 0, function (err, res) { - if (err) throw err; - assert.strictEqual(2, res.length, name); - assert.strictEqual("table", res[0], name); - assert.strictEqual("OK", res[1], name); - }); - // test {EVAL - Redis error reply -> Lua type conversion} - client.set("error reply key", "error reply value", function (err, res) { - if (err) throw err; - client.eval("local foo = redis.pcall('incr','error reply key'); return {type(foo),foo['err']}", 0, function (err, res) { - if (err) throw err; - assert.strictEqual(2, res.length, name); - assert.strictEqual("table", res[0], name); - assert.strictEqual("ERR value is not an integer or out of range", res[1], name); - }); - }); - // test {EVAL - Redis nil bulk reply -> Lua type conversion} - client.del("nil reply key", function (err, res) { - if (err) throw err; - client.eval("local foo = redis.call('get','nil reply key'); return {type(foo),foo == false}", 0, function (err, res) { - if (err) throw err; - assert.strictEqual(2, res.length, name); - assert.strictEqual("boolean", res[0], name); - assert.strictEqual(1, res[1], name); - next(name); - }); - }); - } else { - console.log("Skipping " + name + " because server version isn't new enough."); - next(name); - } -}; - -tests.WATCH_MULTI = function () { - var name = 'WATCH_MULTI', multi; - - if (client.server_info.versions[0] >= 2 && client.server_info.versions[1] >= 1) { - client.watch(name); - client.incr(name); - multi = client.multi(); - multi.incr(name); - multi.exec(last(name, require_null(name))); - } else { - console.log("Skipping " + name + " because server version isn't new enough."); - next(name); - } -}; - -tests.detect_buffers = function () { - var name = "detect_buffers", detect_client = redis.createClient(null, null, {detect_buffers: true}); - - detect_client.on("ready", function () { - // single Buffer or String - detect_client.set("string key 1", "string value"); - detect_client.get("string key 1", require_string("string value", name)); - detect_client.get(new Buffer("string key 1"), function (err, reply) { - assert.strictEqual(null, err, name); - assert.strictEqual(true, Buffer.isBuffer(reply), name); - assert.strictEqual("", reply.inspect(), name); - }); - - detect_client.hmset("hash key 2", "key 1", "val 1", "key 2", "val 2"); - // array of Buffers or Strings - detect_client.hmget("hash key 2", "key 1", "key 2", function (err, reply) { - assert.strictEqual(null, err, name); - assert.strictEqual(true, Array.isArray(reply), name); - assert.strictEqual(2, reply.length, name); - assert.strictEqual("val 1", reply[0], name); - assert.strictEqual("val 2", reply[1], name); - }); - detect_client.hmget(new Buffer("hash key 2"), "key 1", "key 2", function (err, reply) { - assert.strictEqual(null, err, name); - assert.strictEqual(true, Array.isArray(reply)); - assert.strictEqual(2, reply.length, name); - assert.strictEqual(true, Buffer.isBuffer(reply[0])); - assert.strictEqual(true, Buffer.isBuffer(reply[1])); - assert.strictEqual("", reply[0].inspect(), name); - assert.strictEqual("", reply[1].inspect(), name); - }); - - // Object of Buffers or Strings - detect_client.hgetall("hash key 2", function (err, reply) { - assert.strictEqual(null, err, name); - assert.strictEqual("object", typeof reply, name); - assert.strictEqual(2, Object.keys(reply).length, name); - assert.strictEqual("val 1", reply["key 1"], name); - assert.strictEqual("val 2", reply["key 2"], name); - }); - detect_client.hgetall(new Buffer("hash key 2"), function (err, reply) { - assert.strictEqual(null, err, name); - assert.strictEqual("object", typeof reply, name); - assert.strictEqual(2, Object.keys(reply).length, name); - assert.strictEqual(true, Buffer.isBuffer(reply["key 1"])); - assert.strictEqual(true, Buffer.isBuffer(reply["key 2"])); - assert.strictEqual("", reply["key 1"].inspect(), name); - assert.strictEqual("", reply["key 2"].inspect(), name); - }); - - detect_client.quit(function (err, res) { - next(name); - }); - }); -}; - -tests.socket_nodelay = function () { - var name = "socket_nodelay", c1, c2, c3, ready_count = 0, quit_count = 0; - - c1 = redis.createClient(null, null, {socket_nodelay: true}); - c2 = redis.createClient(null, null, {socket_nodelay: false}); - c3 = redis.createClient(null, null); - - function quit_check() { - quit_count++; - - if (quit_count === 3) { - next(name); - } - } - - function run() { - assert.strictEqual(true, c1.options.socket_nodelay, name); - assert.strictEqual(false, c2.options.socket_nodelay, name); - assert.strictEqual(true, c3.options.socket_nodelay, name); - - c1.set(["set key 1", "set val"], require_string("OK", name)); - c1.set(["set key 2", "set val"], require_string("OK", name)); - c1.get(["set key 1"], require_string("set val", name)); - c1.get(["set key 2"], require_string("set val", name)); - - c2.set(["set key 3", "set val"], require_string("OK", name)); - c2.set(["set key 4", "set val"], require_string("OK", name)); - c2.get(["set key 3"], require_string("set val", name)); - c2.get(["set key 4"], require_string("set val", name)); - - c3.set(["set key 5", "set val"], require_string("OK", name)); - c3.set(["set key 6", "set val"], require_string("OK", name)); - c3.get(["set key 5"], require_string("set val", name)); - c3.get(["set key 6"], require_string("set val", name)); - - c1.quit(quit_check); - c2.quit(quit_check); - c3.quit(quit_check); - } - - function ready_check() { - ready_count++; - if (ready_count === 3) { - run(); - } - } - - c1.on("ready", ready_check); - c2.on("ready", ready_check); - c3.on("ready", ready_check); -}; - -tests.reconnect = function () { - var name = "reconnect"; - - client.set("recon 1", "one"); - client.set("recon 2", "two", function (err, res) { - // Do not do this in normal programs. This is to simulate the server closing on us. - // For orderly shutdown in normal programs, do client.quit() - client.stream.destroy(); - }); - - client.on("reconnecting", function on_recon(params) { - client.on("connect", function on_connect() { - client.select(test_db_num, require_string("OK", name)); - client.get("recon 1", require_string("one", name)); - client.get("recon 1", require_string("one", name)); - client.get("recon 2", require_string("two", name)); - client.get("recon 2", require_string("two", name)); - client.removeListener("connect", on_connect); - client.removeListener("reconnecting", on_recon); - next(name); - }); - }); -}; - -tests.idle = function () { - var name = "idle"; - - client.on("idle", function on_idle() { - client.removeListener("idle", on_idle); - next(name); - }); - - client.set("idle", "test"); -}; - -tests.HSET = function () { - var key = "test hash", - field1 = new Buffer("0123456789"), - value1 = new Buffer("abcdefghij"), - field2 = new Buffer(0), - value2 = new Buffer(0), - name = "HSET"; - - client.HSET(key, field1, value1, require_number(1, name)); - client.HGET(key, field1, require_string(value1.toString(), name)); - - // Empty value - client.HSET(key, field1, value2, require_number(0, name)); - client.HGET([key, field1], require_string("", name)); - - // Empty key, empty value - client.HSET([key, field2, value1], require_number(1, name)); - client.HSET(key, field2, value2, last(name, require_number(0, name))); -}; - -tests.HLEN = function () { - var key = "test hash", - field1 = new Buffer("0123456789"), - value1 = new Buffer("abcdefghij"), - field2 = new Buffer(0), - value2 = new Buffer(0), - name = "HSET", - timeout = 1000; - - client.HSET(key, field1, value1, function (err, results) { - client.HLEN(key, function (err, len) { - assert.ok(2 === +len); - next(name); - }); - }); -} - -tests.HMSET_BUFFER_AND_ARRAY = function () { - // Saving a buffer and an array to the same key should not error - var key = "test hash", - field1 = "buffer", - value1 = new Buffer("abcdefghij"), - field2 = "array", - value2 = ["array contents"], - name = "HSET"; - - client.HMSET(key, field1, value1, field2, value2, last(name, require_string("OK", name))); -}; - -// TODO - add test for HMSET with optional callbacks - -tests.HMGET = function () { - var key1 = "test hash 1", key2 = "test hash 2", name = "HMGET"; - - // redis-like hmset syntax - client.HMSET(key1, "0123456789", "abcdefghij", "some manner of key", "a type of value", require_string("OK", name)); - - // fancy hmset syntax - client.HMSET(key2, { - "0123456789": "abcdefghij", - "some manner of key": "a type of value" - }, require_string("OK", name)); - - client.HMGET(key1, "0123456789", "some manner of key", function (err, reply) { - assert.strictEqual("abcdefghij", reply[0].toString(), name); - assert.strictEqual("a type of value", reply[1].toString(), name); - }); - - client.HMGET(key2, "0123456789", "some manner of key", function (err, reply) { - assert.strictEqual("abcdefghij", reply[0].toString(), name); - assert.strictEqual("a type of value", reply[1].toString(), name); - }); - - client.HMGET(key1, ["0123456789"], function (err, reply) { - assert.strictEqual("abcdefghij", reply[0], name); - }); - - client.HMGET(key1, ["0123456789", "some manner of key"], function (err, reply) { - assert.strictEqual("abcdefghij", reply[0], name); - assert.strictEqual("a type of value", reply[1], name); - }); - - client.HMGET(key1, "missing thing", "another missing thing", function (err, reply) { - assert.strictEqual(null, reply[0], name); - assert.strictEqual(null, reply[1], name); - next(name); - }); -}; - -tests.HINCRBY = function () { - var name = "HINCRBY"; - client.hset("hash incr", "value", 10, require_number(1, name)); - client.HINCRBY("hash incr", "value", 1, require_number(11, name)); - client.HINCRBY("hash incr", "value 2", 1, last(name, require_number(1, name))); -}; - -tests.SUBSCRIBE = function () { - var client1 = client, msg_count = 0, name = "SUBSCRIBE"; - - client1.on("subscribe", function (channel, count) { - if (channel === "chan1") { - client2.publish("chan1", "message 1", require_number(1, name)); - client2.publish("chan2", "message 2", require_number(1, name)); - client2.publish("chan1", "message 3", require_number(1, name)); - } - }); - - client1.on("unsubscribe", function (channel, count) { - if (count === 0) { - // make sure this connection can go into and out of pub/sub mode - client1.incr("did a thing", last(name, require_number(2, name))); - } - }); - - client1.on("message", function (channel, message) { - msg_count += 1; - assert.strictEqual("message " + msg_count, message.toString()); - if (msg_count === 3) { - client1.unsubscribe("chan1", "chan2"); - } - }); - - client1.set("did a thing", 1, require_string("OK", name)); - client1.subscribe("chan1", "chan2", function (err, results) { - assert.strictEqual(null, err, "result sent back unexpected error: " + err); - assert.strictEqual("chan1", results.toString(), name); - }); -}; - -tests.SUB_UNSUB_SUB = function () { - var name = "SUB_UNSUB_SUB"; - client3.subscribe('chan3'); - client3.unsubscribe('chan3'); - client3.subscribe('chan3', function (err, results) { - assert.strictEqual(null, err, "unexpected error: " + err); - client2.publish('chan3', 'foo'); - }); - client3.on('message', function (channel, message) { - assert.strictEqual(channel, 'chan3'); - assert.strictEqual(message, 'foo'); - next(name); - }); -}; - -tests.SUBSCRIBE_QUIT = function () { - var name = "SUBSCRIBE_QUIT"; - client3.on("end", function () { - next(name); - }); - client3.on("subscribe", function (channel, count) { - client3.quit(); - }); - client3.subscribe("chan3"); -}; - -tests.SUBSCRIBE_CLOSE_RESUBSCRIBE = function () { - var name = "SUBSCRIBE_CLOSE_RESUBSCRIBE"; - var c1 = redis.createClient(); - var c2 = redis.createClient(); - var count = 0; - - /* Create two clients. c1 subscribes to two channels, c2 will publish to them. - c2 publishes the first message. - c1 gets the message and drops its connection. It must resubscribe itself. - When it resubscribes, c2 publishes the second message, on the same channel - c1 gets the message and drops its connection. It must resubscribe itself, again. - When it resubscribes, c2 publishes the third message, on the second channel - c1 gets the message and drops its connection. When it reconnects, the test ends. - */ - - c1.on("message", function(channel, message) { - if (channel === "chan1") { - assert.strictEqual(message, "hi on channel 1"); - c1.stream.end(); - - } else if (channel === "chan2") { - assert.strictEqual(message, "hi on channel 2"); - c1.stream.end(); - - } else { - c1.quit(); - c2.quit(); - assert.fail("test failed"); - } - }) - - c1.subscribe("chan1", "chan2"); - - c2.once("ready", function() { - console.log("c2 is ready"); - c1.on("ready", function(err, results) { - console.log("c1 is ready", count); - - count++; - if (count == 1) { - c2.publish("chan1", "hi on channel 1"); - return; - - } else if (count == 2) { - c2.publish("chan2", "hi on channel 2"); - - } else { - c1.quit(function() { - c2.quit(function() { - next(name); - }); - }); - } - }); - - c2.publish("chan1", "hi on channel 1"); - - }); -}; - -tests.EXISTS = function () { - var name = "EXISTS"; - client.del("foo", "foo2", require_number_any(name)); - client.set("foo", "bar", require_string("OK", name)); - client.EXISTS("foo", require_number(1, name)); - client.EXISTS("foo2", last(name, require_number(0, name))); -}; - -tests.DEL = function () { - var name = "DEL"; - client.DEL("delkey", require_number_any(name)); - client.set("delkey", "delvalue", require_string("OK", name)); - client.DEL("delkey", require_number(1, name)); - client.exists("delkey", require_number(0, name)); - client.DEL("delkey", require_number(0, name)); - client.mset("delkey", "delvalue", "delkey2", "delvalue2", require_string("OK", name)); - client.DEL("delkey", "delkey2", last(name, require_number(2, name))); -}; - -tests.TYPE = function () { - var name = "TYPE"; - client.set(["string key", "should be a string"], require_string("OK", name)); - client.rpush(["list key", "should be a list"], require_number_pos(name)); - client.sadd(["set key", "should be a set"], require_number_any(name)); - client.zadd(["zset key", "10.0", "should be a zset"], require_number_any(name)); - client.hset(["hash key", "hashtest", "should be a hash"], require_number_any(0, name)); - - client.TYPE(["string key"], require_string("string", name)); - client.TYPE(["list key"], require_string("list", name)); - client.TYPE(["set key"], require_string("set", name)); - client.TYPE(["zset key"], require_string("zset", name)); - client.TYPE("not here yet", require_string("none", name)); - client.TYPE(["hash key"], last(name, require_string("hash", name))); -}; - -tests.KEYS = function () { - var name = "KEYS"; - client.mset(["test keys 1", "test val 1", "test keys 2", "test val 2"], require_string("OK", name)); - client.KEYS(["test keys*"], function (err, results) { - assert.strictEqual(null, err, "result sent back unexpected error: " + err); - assert.strictEqual(2, results.length, name); - assert.strictEqual("test keys 1", results[0].toString(), name); - assert.strictEqual("test keys 2", results[1].toString(), name); - next(name); - }); -}; - -tests.MULTIBULK_ZERO_LENGTH = function () { - var name = "MULTIBULK_ZERO_LENGTH"; - client.KEYS(['users:*'], function (err, results) { - assert.strictEqual(null, err, 'error on empty multibulk reply'); - assert.strictEqual(true, is_empty_array(results), "not an empty array"); - next(name); - }); -}; - -tests.RANDOMKEY = function () { - var name = "RANDOMKEY"; - client.mset(["test keys 1", "test val 1", "test keys 2", "test val 2"], require_string("OK", name)); - client.RANDOMKEY([], function (err, results) { - assert.strictEqual(null, err, name + " result sent back unexpected error: " + err); - assert.strictEqual(true, /\w+/.test(results), name); - next(name); - }); -}; - -tests.RENAME = function () { - var name = "RENAME"; - client.set(['foo', 'bar'], require_string("OK", name)); - client.RENAME(["foo", "new foo"], require_string("OK", name)); - client.exists(["foo"], require_number(0, name)); - client.exists(["new foo"], last(name, require_number(1, name))); -}; - -tests.RENAMENX = function () { - var name = "RENAMENX"; - client.set(['foo', 'bar'], require_string("OK", name)); - client.set(['foo2', 'bar2'], require_string("OK", name)); - client.RENAMENX(["foo", "foo2"], require_number(0, name)); - client.exists(["foo"], require_number(1, name)); - client.exists(["foo2"], require_number(1, name)); - client.del(["foo2"], require_number(1, name)); - client.RENAMENX(["foo", "foo2"], require_number(1, name)); - client.exists(["foo"], require_number(0, name)); - client.exists(["foo2"], last(name, require_number(1, name))); -}; - -tests.DBSIZE = function () { - var name = "DBSIZE"; - client.set(['foo', 'bar'], require_string("OK", name)); - client.DBSIZE([], last(name, require_number_pos("DBSIZE"))); -}; - -tests.GET = function () { - var name = "GET"; - client.set(["get key", "get val"], require_string("OK", name)); - client.GET(["get key"], last(name, require_string("get val", name))); -}; - -tests.SET = function () { - var name = "SET"; - client.SET(["set key", "set val"], require_string("OK", name)); - client.get(["set key"], last(name, require_string("set val", name))); -}; - -tests.GETSET = function () { - var name = "GETSET"; - client.set(["getset key", "getset val"], require_string("OK", name)); - client.GETSET(["getset key", "new getset val"], require_string("getset val", name)); - client.get(["getset key"], last(name, require_string("new getset val", name))); -}; - -tests.MGET = function () { - var name = "MGET"; - client.mset(["mget keys 1", "mget val 1", "mget keys 2", "mget val 2", "mget keys 3", "mget val 3"], require_string("OK", name)); - client.MGET("mget keys 1", "mget keys 2", "mget keys 3", function (err, results) { - assert.strictEqual(null, err, "result sent back unexpected error: " + err); - assert.strictEqual(3, results.length, name); - assert.strictEqual("mget val 1", results[0].toString(), name); - assert.strictEqual("mget val 2", results[1].toString(), name); - assert.strictEqual("mget val 3", results[2].toString(), name); - }); - client.MGET(["mget keys 1", "mget keys 2", "mget keys 3"], function (err, results) { - assert.strictEqual(null, err, "result sent back unexpected error: " + err); - assert.strictEqual(3, results.length, name); - assert.strictEqual("mget val 1", results[0].toString(), name); - assert.strictEqual("mget val 2", results[1].toString(), name); - assert.strictEqual("mget val 3", results[2].toString(), name); - }); - client.MGET(["mget keys 1", "some random shit", "mget keys 2", "mget keys 3"], function (err, results) { - assert.strictEqual(null, err, "result sent back unexpected error: " + err); - assert.strictEqual(4, results.length, name); - assert.strictEqual("mget val 1", results[0].toString(), name); - assert.strictEqual(null, results[1], name); - assert.strictEqual("mget val 2", results[2].toString(), name); - assert.strictEqual("mget val 3", results[3].toString(), name); - next(name); - }); -}; - -tests.SETNX = function () { - var name = "SETNX"; - client.set(["setnx key", "setnx value"], require_string("OK", name)); - client.SETNX(["setnx key", "new setnx value"], require_number(0, name)); - client.del(["setnx key"], require_number(1, name)); - client.exists(["setnx key"], require_number(0, name)); - client.SETNX(["setnx key", "new setnx value"], require_number(1, name)); - client.exists(["setnx key"], last(name, require_number(1, name))); -}; - -tests.SETEX = function () { - var name = "SETEX"; - client.SETEX(["setex key", "100", "setex val"], require_string("OK", name)); - client.exists(["setex key"], require_number(1, name)); - client.ttl(["setex key"], last(name, require_number_pos(name))); -}; - -tests.MSETNX = function () { - var name = "MSETNX"; - client.mset(["mset1", "val1", "mset2", "val2", "mset3", "val3"], require_string("OK", name)); - client.MSETNX(["mset3", "val3", "mset4", "val4"], require_number(0, name)); - client.del(["mset3"], require_number(1, name)); - client.MSETNX(["mset3", "val3", "mset4", "val4"], require_number(1, name)); - client.exists(["mset3"], require_number(1, name)); - client.exists(["mset4"], last(name, require_number(1, name))); -}; - -tests.HGETALL = function () { - var name = "HGETALL"; - client.hmset(["hosts", "mjr", "1", "another", "23", "home", "1234"], require_string("OK", name)); - client.HGETALL(["hosts"], function (err, obj) { - assert.strictEqual(null, err, name + " result sent back unexpected error: " + err); - assert.strictEqual(3, Object.keys(obj).length, name); - assert.strictEqual("1", obj.mjr.toString(), name); - assert.strictEqual("23", obj.another.toString(), name); - assert.strictEqual("1234", obj.home.toString(), name); - next(name); - }); -}; - -tests.HGETALL_NULL = function () { - var name = "HGETALL_NULL"; - - client.hgetall("missing", function (err, obj) { - assert.strictEqual(null, err); - assert.strictEqual(null, obj); - next(name); - }); -}; - -tests.UTF8 = function () { - var name = "UTF8", - utf8_sample = "ಠ_ಠ"; - - client.set(["utf8test", utf8_sample], require_string("OK", name)); - client.get(["utf8test"], function (err, obj) { - assert.strictEqual(null, err); - assert.strictEqual(utf8_sample, obj); - next(name); - }); -}; - -// Set tests were adapted from Brian Hammond's redis-node-client.js, which has a comprehensive test suite - -tests.SADD = function () { - var name = "SADD"; - - client.del('set0'); - client.SADD('set0', 'member0', require_number(1, name)); - client.sadd('set0', 'member0', last(name, require_number(0, name))); -}; - -tests.SADD2 = function () { - var name = "SADD2"; - - client.del("set0"); - client.sadd("set0", ["member0", "member1", "member2"], require_number(3, name)); - client.smembers("set0", function (err, res) { - assert.strictEqual(res.length, 3); - assert.strictEqual(res[0], "member0"); - assert.strictEqual(res[1], "member1"); - assert.strictEqual(res[2], "member2"); - }); - client.SADD("set1", ["member0", "member1", "member2"], require_number(3, name)); - client.smembers("set1", function (err, res) { - assert.strictEqual(res.length, 3); - assert.strictEqual(res[0], "member0"); - assert.strictEqual(res[1], "member1"); - assert.strictEqual(res[2], "member2"); - next(name); - }); -}; - -tests.SISMEMBER = function () { - var name = "SISMEMBER"; - - client.del('set0'); - client.sadd('set0', 'member0', require_number(1, name)); - client.sismember('set0', 'member0', require_number(1, name)); - client.sismember('set0', 'member1', last(name, require_number(0, name))); -}; - -tests.SCARD = function () { - var name = "SCARD"; - - client.del('set0'); - client.sadd('set0', 'member0', require_number(1, name)); - client.scard('set0', require_number(1, name)); - client.sadd('set0', 'member1', require_number(1, name)); - client.scard('set0', last(name, require_number(2, name))); -}; - -tests.SREM = function () { - var name = "SREM"; - - client.del('set0'); - client.sadd('set0', 'member0', require_number(1, name)); - client.srem('set0', 'foobar', require_number(0, name)); - client.srem('set0', 'member0', require_number(1, name)); - client.scard('set0', last(name, require_number(0, name))); -}; - -tests.SPOP = function () { - var name = "SPOP"; - - client.del('zzz'); - client.sadd('zzz', 'member0', require_number(1, name)); - client.scard('zzz', require_number(1, name)); - - client.spop('zzz', function (err, value) { - if (err) { - assert.fail(err); - } - assert.equal(value, 'member0', name); - }); - - client.scard('zzz', last(name, require_number(0, name))); -}; - -tests.SDIFF = function () { - var name = "SDIFF"; - - client.del('foo'); - client.sadd('foo', 'x', require_number(1, name)); - client.sadd('foo', 'a', require_number(1, name)); - client.sadd('foo', 'b', require_number(1, name)); - client.sadd('foo', 'c', require_number(1, name)); - - client.sadd('bar', 'c', require_number(1, name)); - - client.sadd('baz', 'a', require_number(1, name)); - client.sadd('baz', 'd', require_number(1, name)); - - client.sdiff('foo', 'bar', 'baz', function (err, values) { - if (err) { - assert.fail(err, name); - } - values.sort(); - assert.equal(values.length, 2, name); - assert.equal(values[0], 'b', name); - assert.equal(values[1], 'x', name); - next(name); - }); -}; - -tests.SDIFFSTORE = function () { - var name = "SDIFFSTORE"; - - client.del('foo'); - client.del('bar'); - client.del('baz'); - client.del('quux'); - - client.sadd('foo', 'x', require_number(1, name)); - client.sadd('foo', 'a', require_number(1, name)); - client.sadd('foo', 'b', require_number(1, name)); - client.sadd('foo', 'c', require_number(1, name)); - - client.sadd('bar', 'c', require_number(1, name)); - - client.sadd('baz', 'a', require_number(1, name)); - client.sadd('baz', 'd', require_number(1, name)); - - // NB: SDIFFSTORE returns the number of elements in the dstkey - - client.sdiffstore('quux', 'foo', 'bar', 'baz', require_number(2, name)); - - client.smembers('quux', function (err, values) { - if (err) { - assert.fail(err, name); - } - var members = buffers_to_strings(values).sort(); - - assert.deepEqual(members, [ 'b', 'x' ], name); - next(name); - }); -}; - -tests.SMEMBERS = function () { - var name = "SMEMBERS"; - - client.del('foo'); - client.sadd('foo', 'x', require_number(1, name)); - - client.smembers('foo', function (err, members) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(members), [ 'x' ], name); - }); - - client.sadd('foo', 'y', require_number(1, name)); - - client.smembers('foo', function (err, values) { - if (err) { - assert.fail(err, name); - } - assert.equal(values.length, 2, name); - var members = buffers_to_strings(values).sort(); - - assert.deepEqual(members, [ 'x', 'y' ], name); - next(name); - }); -}; - -tests.SMOVE = function () { - var name = "SMOVE"; - - client.del('foo'); - client.del('bar'); - - client.sadd('foo', 'x', require_number(1, name)); - client.smove('foo', 'bar', 'x', require_number(1, name)); - client.sismember('foo', 'x', require_number(0, name)); - client.sismember('bar', 'x', require_number(1, name)); - client.smove('foo', 'bar', 'x', last(name, require_number(0, name))); -}; - -tests.SINTER = function () { - var name = "SINTER"; - - client.del('sa'); - client.del('sb'); - client.del('sc'); - - client.sadd('sa', 'a', require_number(1, name)); - client.sadd('sa', 'b', require_number(1, name)); - client.sadd('sa', 'c', require_number(1, name)); - - client.sadd('sb', 'b', require_number(1, name)); - client.sadd('sb', 'c', require_number(1, name)); - client.sadd('sb', 'd', require_number(1, name)); - - client.sadd('sc', 'c', require_number(1, name)); - client.sadd('sc', 'd', require_number(1, name)); - client.sadd('sc', 'e', require_number(1, name)); - - client.sinter('sa', 'sb', function (err, intersection) { - if (err) { - assert.fail(err, name); - } - assert.equal(intersection.length, 2, name); - assert.deepEqual(buffers_to_strings(intersection).sort(), [ 'b', 'c' ], name); - }); - - client.sinter('sb', 'sc', function (err, intersection) { - if (err) { - assert.fail(err, name); - } - assert.equal(intersection.length, 2, name); - assert.deepEqual(buffers_to_strings(intersection).sort(), [ 'c', 'd' ], name); - }); - - client.sinter('sa', 'sc', function (err, intersection) { - if (err) { - assert.fail(err, name); - } - assert.equal(intersection.length, 1, name); - assert.equal(intersection[0], 'c', name); - }); - - // 3-way - - client.sinter('sa', 'sb', 'sc', function (err, intersection) { - if (err) { - assert.fail(err, name); - } - assert.equal(intersection.length, 1, name); - assert.equal(intersection[0], 'c', name); - next(name); - }); -}; - -tests.SINTERSTORE = function () { - var name = "SINTERSTORE"; - - client.del('sa'); - client.del('sb'); - client.del('sc'); - client.del('foo'); - - client.sadd('sa', 'a', require_number(1, name)); - client.sadd('sa', 'b', require_number(1, name)); - client.sadd('sa', 'c', require_number(1, name)); - - client.sadd('sb', 'b', require_number(1, name)); - client.sadd('sb', 'c', require_number(1, name)); - client.sadd('sb', 'd', require_number(1, name)); - - client.sadd('sc', 'c', require_number(1, name)); - client.sadd('sc', 'd', require_number(1, name)); - client.sadd('sc', 'e', require_number(1, name)); - - client.sinterstore('foo', 'sa', 'sb', 'sc', require_number(1, name)); - - client.smembers('foo', function (err, members) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(members), [ 'c' ], name); - next(name); - }); -}; - -tests.SUNION = function () { - var name = "SUNION"; - - client.del('sa'); - client.del('sb'); - client.del('sc'); - - client.sadd('sa', 'a', require_number(1, name)); - client.sadd('sa', 'b', require_number(1, name)); - client.sadd('sa', 'c', require_number(1, name)); - - client.sadd('sb', 'b', require_number(1, name)); - client.sadd('sb', 'c', require_number(1, name)); - client.sadd('sb', 'd', require_number(1, name)); - - client.sadd('sc', 'c', require_number(1, name)); - client.sadd('sc', 'd', require_number(1, name)); - client.sadd('sc', 'e', require_number(1, name)); - - client.sunion('sa', 'sb', 'sc', function (err, union) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(union).sort(), ['a', 'b', 'c', 'd', 'e'], name); - next(name); - }); -}; - -tests.SUNIONSTORE = function () { - var name = "SUNIONSTORE"; - - client.del('sa'); - client.del('sb'); - client.del('sc'); - client.del('foo'); - - client.sadd('sa', 'a', require_number(1, name)); - client.sadd('sa', 'b', require_number(1, name)); - client.sadd('sa', 'c', require_number(1, name)); - - client.sadd('sb', 'b', require_number(1, name)); - client.sadd('sb', 'c', require_number(1, name)); - client.sadd('sb', 'd', require_number(1, name)); - - client.sadd('sc', 'c', require_number(1, name)); - client.sadd('sc', 'd', require_number(1, name)); - client.sadd('sc', 'e', require_number(1, name)); - - client.sunionstore('foo', 'sa', 'sb', 'sc', function (err, cardinality) { - if (err) { - assert.fail(err, name); - } - assert.equal(cardinality, 5, name); - }); - - client.smembers('foo', function (err, members) { - if (err) { - assert.fail(err, name); - } - assert.equal(members.length, 5, name); - assert.deepEqual(buffers_to_strings(members).sort(), ['a', 'b', 'c', 'd', 'e'], name); - next(name); - }); -}; - -// SORT test adapted from Brian Hammond's redis-node-client.js, which has a comprehensive test suite - -tests.SORT = function () { - var name = "SORT"; - - client.del('y'); - client.del('x'); - - client.rpush('y', 'd', require_number(1, name)); - client.rpush('y', 'b', require_number(2, name)); - client.rpush('y', 'a', require_number(3, name)); - client.rpush('y', 'c', require_number(4, name)); - - client.rpush('x', '3', require_number(1, name)); - client.rpush('x', '9', require_number(2, name)); - client.rpush('x', '2', require_number(3, name)); - client.rpush('x', '4', require_number(4, name)); - - client.set('w3', '4', require_string("OK", name)); - client.set('w9', '5', require_string("OK", name)); - client.set('w2', '12', require_string("OK", name)); - client.set('w4', '6', require_string("OK", name)); - - client.set('o2', 'buz', require_string("OK", name)); - client.set('o3', 'foo', require_string("OK", name)); - client.set('o4', 'baz', require_string("OK", name)); - client.set('o9', 'bar', require_string("OK", name)); - - client.set('p2', 'qux', require_string("OK", name)); - client.set('p3', 'bux', require_string("OK", name)); - client.set('p4', 'lux', require_string("OK", name)); - client.set('p9', 'tux', require_string("OK", name)); - - // Now the data has been setup, we can test. - - // But first, test basic sorting. - - // y = [ d b a c ] - // sort y ascending = [ a b c d ] - // sort y descending = [ d c b a ] - - client.sort('y', 'asc', 'alpha', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), ['a', 'b', 'c', 'd'], name); - }); - - client.sort('y', 'desc', 'alpha', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), ['d', 'c', 'b', 'a'], name); - }); - - // Now try sorting numbers in a list. - // x = [ 3, 9, 2, 4 ] - - client.sort('x', 'asc', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), [2, 3, 4, 9], name); - }); - - client.sort('x', 'desc', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), [9, 4, 3, 2], name); - }); - - // Try sorting with a 'by' pattern. - - client.sort('x', 'by', 'w*', 'asc', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), [3, 9, 4, 2], name); - }); - - // Try sorting with a 'by' pattern and 1 'get' pattern. - - client.sort('x', 'by', 'w*', 'asc', 'get', 'o*', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), ['foo', 'bar', 'baz', 'buz'], name); - }); - - // Try sorting with a 'by' pattern and 2 'get' patterns. - - client.sort('x', 'by', 'w*', 'asc', 'get', 'o*', 'get', 'p*', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), ['foo', 'bux', 'bar', 'tux', 'baz', 'lux', 'buz', 'qux'], name); - }); - - // Try sorting with a 'by' pattern and 2 'get' patterns. - // Instead of getting back the sorted set/list, store the values to a list. - // Then check that the values are there in the expected order. - - client.sort('x', 'by', 'w*', 'asc', 'get', 'o*', 'get', 'p*', 'store', 'bacon', function (err) { - if (err) { - assert.fail(err, name); - } - }); - - client.lrange('bacon', 0, -1, function (err, values) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(values), ['foo', 'bux', 'bar', 'tux', 'baz', 'lux', 'buz', 'qux'], name); - next(name); - }); - - // TODO - sort by hash value -}; - -tests.MONITOR = function () { - var name = "MONITOR", responses = [], monitor_client; - - monitor_client = redis.createClient(); - monitor_client.monitor(function (err, res) { - client.mget("some", "keys", "foo", "bar"); - client.set("json", JSON.stringify({ - foo: "123", - bar: "sdflkdfsjk", - another: false - })); - }); - monitor_client.on("monitor", function (time, args) { - // skip monitor command for Redis <= 2.4.16 - if (args[0] === "monitor") return; - - responses.push(args); - if (responses.length === 2) { - assert.strictEqual(5, responses[0].length); - assert.strictEqual("mget", responses[0][0]); - assert.strictEqual("some", responses[0][1]); - assert.strictEqual("keys", responses[0][2]); - assert.strictEqual("foo", responses[0][3]); - assert.strictEqual("bar", responses[0][4]); - assert.strictEqual(3, responses[1].length); - assert.strictEqual("set", responses[1][0]); - assert.strictEqual("json", responses[1][1]); - assert.strictEqual('{"foo":"123","bar":"sdflkdfsjk","another":false}', responses[1][2]); - monitor_client.quit(function (err, res) { - next(name); - }); - } - }); -}; - -tests.BLPOP = function () { - var name = "BLPOP"; - - client.rpush("blocking list", "initial value", function (err, res) { - client2.BLPOP("blocking list", 0, function (err, res) { - assert.strictEqual("blocking list", res[0].toString()); - assert.strictEqual("initial value", res[1].toString()); - - client.rpush("blocking list", "wait for this value"); - }); - client2.BLPOP("blocking list", 0, function (err, res) { - assert.strictEqual("blocking list", res[0].toString()); - assert.strictEqual("wait for this value", res[1].toString()); - next(name); - }); - }); -}; - -tests.BLPOP_TIMEOUT = function () { - var name = "BLPOP_TIMEOUT"; - - // try to BLPOP the list again, which should be empty. This should timeout and return null. - client2.BLPOP("blocking list", 1, function (err, res) { - if (err) { - throw err; - } - - assert.strictEqual(res, null); - next(name); - }); -}; - -tests.EXPIRE = function () { - var name = "EXPIRE"; - client.set(['expiry key', 'bar'], require_string("OK", name)); - client.EXPIRE(["expiry key", "1"], require_number_pos(name)); - setTimeout(function () { - client.exists(["expiry key"], last(name, require_number(0, name))); - }, 2000); -}; - -tests.TTL = function () { - var name = "TTL"; - client.set(["ttl key", "ttl val"], require_string("OK", name)); - client.expire(["ttl key", "100"], require_number_pos(name)); - setTimeout(function () { - client.TTL(["ttl key"], last(name, require_number_pos(0, name))); - }, 500); -}; - -tests.OPTIONAL_CALLBACK = function () { - var name = "OPTIONAL_CALLBACK"; - client.del("op_cb1"); - client.set("op_cb1", "x"); - client.get("op_cb1", last(name, require_string("x", name))); -}; - -tests.OPTIONAL_CALLBACK_UNDEFINED = function () { - var name = "OPTIONAL_CALLBACK_UNDEFINED"; - client.del("op_cb2"); - client.set("op_cb2", "y", undefined); - client.get("op_cb2", last(name, require_string("y", name))); -}; - -tests.HMSET_THROWS_ON_NON_STRINGS = function () { - var name = "HMSET_THROWS_ON_NON_STRINGS"; - var hash = name; - var data = { "a": [ "this is not a string" ] }; - - client.hmset(hash, data, cb); - function cb(e, r) { - assert(e); // should be an error! - } - - // alternative way it throws - function thrower() { - client.hmset(hash, data); - } - assert.throws(thrower); - next(name); -}; - -tests.ENABLE_OFFLINE_QUEUE_TRUE = function () { - var name = "ENABLE_OFFLINE_QUEUE_TRUE"; - var cli = redis.createClient(9999, null, { - max_attempts: 1 - // default :) - // enable_offline_queue: true - }); - cli.on('error', function(e) { - // ignore, b/c expecting a "can't connect" error - }); - return setTimeout(function() { - cli.set(name, name, function(err, result) { - assert.ifError(err); - }); - - return setTimeout(function(){ - assert.strictEqual(cli.offline_queue.length, 1); - return next(name); - }, 25); - }, 50); -}; - -tests.ENABLE_OFFLINE_QUEUE_FALSE = function () { - var name = "ENABLE_OFFLINE_QUEUE_FALSE"; - var cli = redis.createClient(9999, null, { - max_attempts: 1, - enable_offline_queue: false - }); - cli.on('error', function() { - // ignore, see above - }); - assert.throws(function () { - cli.set(name, name) - }) - assert.doesNotThrow(function () { - cli.set(name, name, function (err) { - // should callback with an error - assert.ok(err); - setTimeout(function () { - next(name); - }, 50); - }); - }); -}; - -// TODO - need a better way to test auth, maybe auto-config a local Redis server or something. -// Yes, this is the real password. Please be nice, thanks. -tests.auth = function () { - var name = "AUTH", client4, ready_count = 0; - - client4 = redis.createClient(9006, "filefish.redistogo.com"); - client4.auth("664b1b6aaf134e1ec281945a8de702a9", function (err, res) { - assert.strictEqual(null, err, name); - assert.strictEqual("OK", res.toString(), name); - }); - - // test auth, then kill the connection so it'll auto-reconnect and auto-re-auth - client4.on("ready", function () { - ready_count++; - if (ready_count === 1) { - client4.stream.destroy(); - } else { - client4.quit(function (err, res) { - next(name); - }); - } - }); -}; - -all_tests = Object.keys(tests); -all_start = new Date(); -test_count = 0; - -run_next_test = function run_next_test() { - var test_name = all_tests.shift(); - if (typeof tests[test_name] === "function") { - util.print('- \x1b[1m' + test_name.toLowerCase() + '\x1b[0m:'); - cur_start = new Date(); - test_count += 1; - tests[test_name](); - } else { - console.log('\n completed \x1b[32m%d\x1b[0m tests in \x1b[33m%d\x1b[0m ms\n', test_count, new Date() - all_start); - client.quit(); - client2.quit(); - } -}; - -client.once("ready", function start_tests() { - console.log("Connected to " + client.host + ":" + client.port + ", Redis server version " + client.server_info.redis_version + "\n"); - console.log("Using reply parser " + client.reply_parser.name); - - run_next_test(); - - connected = true; -}); - -client.on('end', function () { - ended = true; -}); - -// Exit immediately on connection failure, which triggers "exit", below, which fails the test -client.on("error", function (err) { - console.error("client: " + err.stack); - process.exit(); -}); -client2.on("error", function (err) { - console.error("client2: " + err.stack); - process.exit(); -}); -client3.on("error", function (err) { - console.error("client3: " + err.stack); - process.exit(); -}); -client.on("reconnecting", function (params) { - console.log("reconnecting: " + util.inspect(params)); -}); - -process.on('uncaughtException', function (err) { - console.error("Uncaught exception: " + err.stack); - process.exit(1); -}); - -process.on('exit', function (code) { - assert.equal(true, connected); - assert.equal(true, ended); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/.npmignore b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/.npmignore deleted file mode 100644 index c27cb503..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -test/node_modules -support diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/History.md b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/History.md deleted file mode 100644 index 8ee017dd..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/History.md +++ /dev/null @@ -1,226 +0,0 @@ - -0.9.11 / 2012-11-02 -=================== - - * Enable use of 'xhr' transport in Node.js - * Fix the problem with disconnecting xhr-polling users - * Add should to devDependencies - * Prefer XmlHttpRequest if CORS is available - * Make client compatible with AMD loaders. - -0.9.10 / 2012-08-10 -=================== - - * fix removeAllListeners to behave as expected. - * set withCredentials to true only if xdomain. - * socket: disable disconnect on unload by default. - -0.9.9 / 2012-08-01 -================== - - * socket: fixed disconnect xhr url and made it actually sync - * *: bump xmlhttprequest dep - -0.9.8 / 2012-07-24 -================== - - * Fixed build. - -0.9.7 / 2012-07-24 -================== - - * iOS websocket crash fix. - * Fixed potential `open` collision. - * Fixed disconnectSync. - -0.9.6 / 2012-04-17 -================== - - * Don't position the jsonp form off the screen (android fix). - -0.9.5 / 2012-04-05 -================== - - * Bumped version. - -0.9.4 / 2012-04-01 -================== - - * Fixes polling loop upon reconnect advice (fixes #438). - -0.9.3 / 2012-03-28 -================== - - * Fix XHR.check, which was throwing an error transparently and causing non-IE browsers to fall back to JSONP [mikito] - * Fixed forced disconnect on window close [zzzaaa] - -0.9.2 / 2012-03-13 -================== - - * Transport order set by "options" [zzzaaa] - -0.9.1-1 / 2012-03-02 -==================== - - * Fixed active-x-obfuscator NPM dependency. - -0.9.1 / 2012-03-02 -================== - - * Misc corrections. - * Added warning within Firefox about webworker test in test runner. - * Update ws dependency [einaros] - * Implemented client side heartbeat checks. [felixge] - * Improved Firewall support with ActiveX obfuscation. [felixge] - * Fixed error handling during connection process. [Outsideris] - -0.9.0 / 2012-02-26 -================== - - * Added DS_Store to gitignore. - * Updated depedencies. - * Bumped uglify - * Tweaking code so it doesn't throw an exception when used inside a WebWorker in Firefox - * Do not rely on Array.prototype.indexOf as it breaks with pages that use the Prototype.js library. - * Windows support landed - * Use @einaros ws module instead of the old crap one - * Fix for broken closeTimeout and 'IE + xhr' goes into infinite loop on disconnection - * Disabled reconnection on error if reconnect option is set to false - * Set withCredentials to true before xhr to fix authentication - * Clears the timeout from reconnection attempt when there is a successful or failed reconnection. - This fixes the issue of setTimeout's carrying over from previous reconnection - and changing (skipping) values of self.reconnectionDelay in the newer reconnection. - * Removed decoding of parameters when chunking the query string. - This was used later on to construct the url to post to the socket.io server - for connection and if we're adding custom parameters of our own to this url - (for example for OAuth authentication) they were being sent decoded, which is wrong. - -0.8.7 / 2011-11-05 -================== - - * Bumped client - -0.8.6 / 2011-10-27 -================== - - * Added WebWorker support. - * Fixed swfobject and web_socket.js to not assume window. - * Fixed CORS detection for webworker. - * Fix `defer` for webkit in a webworker. - * Fixed io.util.request to not rely on window. - * FIxed; use global instead of window and dont rely on document. - * Fixed; JSON-P handshake if CORS is not available. - * Made underlying Transport disconnection trigger immediate socket.io disconnect. - * Fixed warning when compressing with Google Closure Compiler. - * Fixed builder's uglify utf-8 support. - * Added workaround for loading indicator in FF jsonp-polling. [3rd-Eden] - * Fixed host discovery lookup. [holic] - * Fixed close timeout when disconnected/reconnecting. [jscharlach] - * Fixed jsonp-polling feature detection. - * Fixed jsonp-polling client POSTing of \n. - * Fixed test runner on IE6/7 - -0.8.5 / 2011-10-07 -================== - - * Bumped client - -0.8.4 / 2011-09-06 -================== - - * Corrected build - -0.8.3 / 2011-09-03 -================== - - * Fixed `\n` parsing for non-JSON packets. - * Fixed; make Socket.IO XHTML doctype compatible (fixes #460 from server) - * Fixed support for Node.JS running `socket.io-client`. - * Updated repository name in `package.json`. - * Added support for different policy file ports without having to port - forward 843 on the server side [3rd-Eden] - -0.8.2 / 2011-08-29 -================== - - * Fixed flashsocket detection. - -0.8.1 / 2011-08-29 -================== - - * Bump version. - -0.8.0 / 2011-08-28 -================== - - * Added MozWebSocket support (hybi-10 doesn't require API changes) [einaros]. - -0.7.11 / 2011-08-27 -=================== - - * Corrected previous release (missing build). - -0.7.10 / 2011-08-27 -=================== - - * Fix for failing fallback in websockets - -0.7.9 / 2011-08-12 -================== - - * Added check on `Socket#onConnect` to prevent double `connect` events on the main manager. - * Fixed socket namespace connect test. Remove broken alternative namespace connect test. - * Removed test handler for removed test. - * Bumped version to match `socket.io` server. - -0.7.5 / 2011-08-08 -================== - - * Added querystring support for `connect` [3rd-Eden] - * Added partial Node.JS transports support [3rd-Eden, josephg] - * Fixed builder test. - * Changed `util.inherit` to replicate Object.create / __proto__. - * Changed and cleaned up some acceptance tests. - * Fixed race condition with a test that could not be run multiple times. - * Added test for encoding a payload. - * Added the ability to override the transport to use in acceptance test [3rd-Eden] - * Fixed multiple connect packets [DanielBaulig] - * Fixed jsonp-polling over-buffering [3rd-Eden] - * Fixed ascii preservation in minified socket.io client [3rd-Eden] - * Fixed socket.io in situations where the page is not served through utf8. - * Fixed namespaces not reconnecting after disconnect [3rd-Eden] - * Fixed default port for secure connections. - -0.7.4 / 2011-07-12 -================== - - * Added `SocketNamespace#of` shortcut. [3rd-Eden] - * Fixed a IE payload decoding bug. [3rd-Eden] - * Honor document protocol, unless overriden. [dvv] - * Fixed new builder dependencies. [3rd-Eden] - -0.7.3 / 2011-06-30 -================== - - * Fixed; acks don't depend on arity. They're automatic for `.send` and - callback based for `.emit`. [dvv] - * Added support for sub-sockets authorization. [3rd-Eden] - * Added BC support for `new io.connect`. [fat] - * Fixed double `connect` events. [3rd-Eden] - * Fixed reconnection with jsonp-polling maintaining old sessionid. [franck34] - -0.7.2 / 2011-06-22 -================== - - * Added `noop` message type. - -0.7.1 / 2011-06-21 -================== - - * Bumped socket.io dependency version for acceptance tests. - -0.7.0 / 2011-06-21 -================== - - * http://socket.io/announcement.html - diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/Makefile b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/Makefile deleted file mode 100644 index f2d2f41a..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/Makefile +++ /dev/null @@ -1,20 +0,0 @@ - -ALL_TESTS = $(shell find test/ -name '*.test.js') - -run-tests: - @./node_modules/.bin/expresso \ - -I lib \ - -I support \ - --serial \ - $(TESTS) - -test: - @$(MAKE) TESTS="$(ALL_TESTS)" run-tests - -test-acceptance: - @node support/test-runner/app $(TRANSPORT) - -build: - @node ./bin/builder.js - -.PHONY: test diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/README.md b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/README.md deleted file mode 100644 index cdb7715a..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/README.md +++ /dev/null @@ -1,246 +0,0 @@ -socket.io -========= - -#### Sockets for the rest of us - -The `socket.io` client is basically a simple HTTP Socket interface implementation. -It looks similar to WebSocket while providing additional features and -leveraging other transports when WebSocket is not supported by the user's -browser. - -```js -var socket = io.connect('http://domain.com'); -socket.on('connect', function () { - // socket connected -}); -socket.on('custom event', function () { - // server emitted a custom event -}); -socket.on('disconnect', function () { - // socket disconnected -}); -socket.send('hi there'); -``` - -### Recipes - -#### Utilizing namespaces (ie: multiple sockets) - -If you want to namespace all the messages and events emitted to a particular -endpoint, simply specify it as part of the `connect` uri: - -```js -var chat = io.connect('http://localhost/chat'); -chat.on('connect', function () { - // chat socket connected -}); - -var news = io.connect('/news'); // io.connect auto-detects host -news.on('connect', function () { - // news socket connected -}); -``` - -#### Emitting custom events - -To ease with the creation of applications, you can emit custom events outside -of the global `message` event. - -```js -var socket = io.connect(); -socket.emit('server custom event', { my: 'data' }); -``` - -#### Forcing disconnection - -```js -var socket = io.connect(); -socket.on('connect', function () { - socket.disconnect(); -}); -``` - -### Documentation - -#### io#connect - -```js -io.connect(uri, [options]); -``` - -##### Options: - -- *resource* - - socket.io - - The resource is what allows the `socket.io` server to identify incoming connections by `socket.io` clients. In other words, any HTTP server can implement socket.io and still serve other normal, non-realtime HTTP requests. - -- *transports* - -```js -['websocket', 'flashsocket', 'htmlfile', 'xhr-multipart', 'xhr-polling', 'jsonp-polling'] -``` - - A list of the transports to attempt to utilize (in order of preference). - -- *'connect timeout'* - -```js -5000 -``` - - The amount of milliseconds a transport has to create a connection before we consider it timed out. - -- *'try multiple transports'* - -```js -true -``` - - A boolean indicating if we should try other transports when the connectTimeout occurs. - -- *reconnect* - -```js -true -``` - - A boolean indicating if we should automatically reconnect if a connection is disconnected. - -- *'reconnection delay'* - -```js -500 -``` - - The amount of milliseconds before we try to connect to the server again. We are using a exponential back off algorithm for the following reconnections, on each reconnect attempt this value will get multiplied (500 > 1000 > 2000 > 4000 > 8000). - - -- *'max reconnection attempts'* - -```js -10 -``` - - The amount of attempts should we make using the current transport to connect to the server? After this we will do one final attempt, and re-try with all enabled transport methods before we give up. - -##### Properties: - -- *options* - - The passed in options combined with the defaults. - -- *connected* - - Whether the socket is connected or not. - -- *connecting* - - Whether the socket is connecting or not. - -- *reconnecting* - - Whether we are reconnecting or not. - -- *transport* - - The transport instance. - -##### Methods: - -- *connect(λ)* - - Establishes a connection. If λ is supplied as argument, it will be called once the connection is established. - -- *send(message)* - - A string of data to send. - -- *disconnect* - - Closes the connection. - -- *on(event, λ)* - - Adds a listener for the event *event*. - -- *once(event, λ)* - - Adds a one time listener for the event *event*. The listener is removed after the first time the event is fired. - -- *removeListener(event, λ)* - - Removes the listener λ for the event *event*. - -##### Events: - -- *connect* - - Fired when the connection is established and the handshake successful. - -- *connecting(transport_type)* - - Fired when a connection is attempted, passing the transport name. - -- *connect_failed* - - Fired when the connection timeout occurs after the last connection attempt. - This only fires if the `connectTimeout` option is set. - If the `tryTransportsOnConnectTimeout` option is set, this only fires once all - possible transports have been tried. - -- *message(message)* - - Fired when a message arrives from the server - -- *close* - - Fired when the connection is closed. Be careful with using this event, as some transports will fire it even under temporary, expected disconnections (such as XHR-Polling). - -- *disconnect* - - Fired when the connection is considered disconnected. - -- *reconnect(transport_type,reconnectionAttempts)* - - Fired when the connection has been re-established. This only fires if the `reconnect` option is set. - -- *reconnecting(reconnectionDelay,reconnectionAttempts)* - - Fired when a reconnection is attempted, passing the next delay for the next reconnection. - -- *reconnect_failed* - - Fired when all reconnection attempts have failed and we where unsuccessful in reconnecting to the server. - -### Contributors - -Guillermo Rauch <guillermo@learnboost.com> - -Arnout Kazemier <info@3rd-eden.com> - -### License - -(The MIT License) - -Copyright (c) 2010 LearnBoost <dev@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. diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/bin/builder.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/bin/builder.js deleted file mode 100755 index 7383c75a..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/bin/builder.js +++ /dev/null @@ -1,303 +0,0 @@ -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var fs = require('fs') - , socket = require('../lib/io') - , uglify = require('uglify-js') - , activeXObfuscator = require('active-x-obfuscator'); - -/** - * License headers. - * - * @api private - */ - -var template = '/*! Socket.IO.%ext% build:' + socket.version + ', %type%. Copyright(c) 2011 LearnBoost MIT Licensed */\n' - , development = template.replace('%type%', 'development').replace('%ext%', 'js') - , production = template.replace('%type%', 'production').replace('%ext%', 'min.js'); - -/** - * If statements, these allows you to create serveride & client side compatible - * code using specially designed `if` statements that remove serverside - * designed code from the source files - * - * @api private - */ - -var starttagIF = '// if node' - , endtagIF = '// end node'; - -/** - * The modules that are required to create a base build of Socket.IO. - * - * @const - * @type {Array} - * @api private - */ - -var base = [ - 'io.js' - , 'util.js' - , 'events.js' - , 'json.js' - , 'parser.js' - , 'transport.js' - , 'socket.js' - , 'namespace.js' - ]; - -/** - * The available transports for Socket.IO. These are mapped as: - * - * - `key` the name of the transport - * - `value` the dependencies for the transport - * - * @const - * @type {Object} - * @api public - */ - -var baseTransports = { - 'websocket': ['transports/websocket.js'] - , 'flashsocket': [ - 'transports/websocket.js' - , 'transports/flashsocket.js' - , 'vendor/web-socket-js/swfobject.js' - , 'vendor/web-socket-js/web_socket.js' - ] - , 'htmlfile': ['transports/xhr.js', 'transports/htmlfile.js'] - /* FIXME: re-enable me once we have multi-part support - , 'xhr-multipart': ['transports/xhr.js', 'transports/xhr-multipart.js'] */ - , 'xhr-polling': ['transports/xhr.js', 'transports/xhr-polling.js'] - , 'jsonp-polling': [ - 'transports/xhr.js' - , 'transports/xhr-polling.js' - , 'transports/jsonp-polling.js' - ] -}; - -/** - * Wrappers for client-side usage. - * This enables usage in top-level browser window, client-side CommonJS systems and AMD loaders. - * If doing a node build for server-side client, this wrapper is NOT included. - * @api private - */ -var wrapperPre = "\nvar io = ('undefined' === typeof module ? {} : module.exports);\n(function() {\n"; - -var wrapperPost = "\nif (typeof define === \"function\" && define.amd) {" + - "\n define([], function () { return io; });" + - "\n}\n})();"; - - -/** - * Builds a custom Socket.IO distribution based on the transports that you - * need. You can configure the build to create development build or production - * build (minified). - * - * @param {Array} transports The transports that needs to be bundled. - * @param {Object} [options] Options to configure the building process. - * @param {Function} callback Last argument should always be the callback - * @callback {String|Boolean} err An optional argument, if it exists than an error - * occurred during the build process. - * @callback {String} result The result of the build process. - * @api public - */ - -var builder = module.exports = function () { - var transports, options, callback, error = null - , args = Array.prototype.slice.call(arguments, 0) - , settings = { - minify: true - , node: false - , custom: [] - }; - - // Fancy pancy argument support this makes any pattern possible mainly - // because we require only one of each type - args.forEach(function (arg) { - var type = Object.prototype.toString.call(arg) - .replace(/\[object\s(\w+)\]/gi , '$1' ).toLowerCase(); - - switch (type) { - case 'array': - return transports = arg; - case 'object': - return options = arg; - case 'function': - return callback = arg; - } - }); - - // Add defaults - options = options || {}; - transports = transports || Object.keys(baseTransports); - - // Merge the data - for(var option in options) { - settings[option] = options[option]; - } - - // Start creating a dependencies chain with all the required files for the - // custom Socket.IO bundle. - var files = []; - base.forEach(function (file) { - files.push(__dirname + '/../lib/' + file); - }); - - transports.forEach(function (transport) { - var dependencies = baseTransports[transport]; - if (!dependencies) { - error = 'Unsupported transport `' + transport + '` supplied as argument.'; - return; - } - - // Add the files to the files list, but only if they are not added before - dependencies.forEach(function (file) { - var path = __dirname + '/../lib/' + file; - if (!~files.indexOf(path)) files.push(path); - }) - }); - - // check to see if the files tree compilation generated any errors. - if (error) return callback(error); - - var results = {}; - files.forEach(function (file) { - fs.readFile(file, function (err, content) { - if (err) error = err; - results[file] = content; - - // check if we are done yet, or not.. Just by checking the size of the result - // object. - if (Object.keys(results).length !== files.length) return; - - // we are done, did we error? - if (error) return callback(error); - - // start with the license header - var code = development - , ignore = 0; - - // pre-wrapper for non-server-side builds - if (!settings.node) code += wrapperPre; - - // concatenate the file contents in order - files.forEach(function (file) { - code += results[file]; - }); - - // check if we need to add custom code - if (settings.custom.length) { - settings.custom.forEach(function (content) { - code += content; - }); - } - - // post-wrapper for non-server-side builds - if (!settings.node) { - code += wrapperPost; - } - - code = activeXObfuscator(code); - - // Search for conditional code blocks that need to be removed as they - // where designed for a server side env. but only if we don't want to - // make this build node compatible. - if (!settings.node) { - code = code.split('\n').filter(function (line) { - // check if there are tags in here - var start = line.indexOf(starttagIF) >= 0 - , end = line.indexOf(endtagIF) >= 0 - , ret = ignore; - - // ignore the current line - if (start) { - ignore++; - ret = ignore; - } - - // stop ignoring the next line - if (end) { - ignore--; - } - - return ret == 0; - }).join('\n'); - } - - // check if we need to process it any further - if (settings.minify) { - var ast = uglify.parser.parse(code); - ast = uglify.uglify.ast_mangle(ast); - ast = uglify.uglify.ast_squeeze(ast); - - code = production + uglify.uglify.gen_code(ast, { ascii_only: true }); - } - - callback(error, code); - }) - }) -}; - -/** - * Builder version is also the current client version - * this way we don't have to do another include for the - * clients version number and we can just include the builder. - * - * @type {String} - * @api public - */ - -builder.version = socket.version; - -/** - * A list of all build in transport types. - * - * @type {Object} - * @api public - */ - -builder.transports = baseTransports; - -/** - * Command line support, this allows us to generate builds without having - * to load it as module. - */ - -if (!module.parent){ - // the first 2 are `node` and the path to this file, we don't need them - var args = process.argv.slice(2); - - // build a development build - builder(args.length ? args : false, { minify:false }, function (err, content) { - if (err) return console.error(err); - - fs.write( - fs.openSync(__dirname + '/../dist/socket.io.js', 'w') - , content - , 0 - , 'utf8' - ); - console.log('Successfully generated the development build: socket.io.js'); - }); - - // and build a production build - builder(args.length ? args : false, function (err, content) { - if (err) return console.error(err); - - fs.write( - fs.openSync(__dirname + '/../dist/socket.io.min.js', 'w') - , content - , 0 - , 'utf8' - ); - console.log('Successfully generated the production build: socket.io.min.js'); - }); -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/dist/WebSocketMain.swf b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/dist/WebSocketMain.swf deleted file mode 100644 index 20a451f57ba342d27b1a485d2e3931ea79ed988b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 175830 zcmV(*K;FMYS5pdLeFXq`+O)j~U{qE1Kc4ByB!PfpU3F|LEZBs{=Kkal}8AtB+7dp0r>5}x;-zMTu|?Edjkb1 z_rf#IV9-~Po*oW|`-C(5P<}_cFh4&(Jwuc(67@zcdIuW3L34d?Z{W#iUW5UpWWefo z`GPLWE5LcPg$e~4F#R!yWk;wA&c7;aFYHPL*5!M6{e?XE5&WB ze$pJI+P8?7;d-~(>j;@0vD9R8D(=)QuGjeDmaM|-hu;^VY3fm3$W3UoQHw8Jk~Bfd3viwS8?m+V8FWGSXr|3?+kVv&);X^4`Z^ z<0PPp1iRntA%zKP34IaB`|Hb-(9N3Z94_mL}fm9{4Cty`=w&g`4dIHBi~({*LBs20RvLDFZyi(bJnQ+Te=)qu-Fxy1ch{u(6WBXG+c<%PWZ)KS+@Tp`+3&o0 z@J-(SLHoaBUHEw2Hcs;wBgQgTyuD#6bM5c*XK*fm{o8xI4NHgod-K`_EzDo`P5Xs8 z>&+cI*#~y6InMdvgXWr=8gUHPqW8NXdTblbzq91+^L!EF9dk`vVX%aUziCdcbwxCXfhV>oR zG^}sapr*d4FKRoi38zpAF2z%zQdHTz3QfGaiQU|cewYZ9Z$|khly4f)f@na$0ZpSZ zbx?x;VA5Jp(Evmxq@fV1q2Xxu=*VIQFh@5v4?wBrCY(Y)D25D9K?&3kV4@KoA27N} zfPRdo(U5+80B{2Ra5?a%>2Z{1tZHe(e?~(IN?|H+1`*o=)oH7MmCy`on$Gi@TDy*# zvaEjLiOu6#x0-M8hV8yNl{shZiE)f|CssfF{m~nnnd5$4N}O2RGLwDv(^VT-XU0vN z&RRTs%njE5_0PF?-Rhfz*lU(wyvRBF?Tk%~xrfev!(BXm{w3DW$4`uB{IYM; zkE{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zbm1A?SD4c>3=PB7F4`hBb>>s}$`IWAjXS|yC#yo5-wy~3m`>&o4$2B(;Dv$L!+|LDl}@w&~csd#qyRf5YISyoyr+I<>@32p`Y^&a3iHN zhLa=Gvwm3A&-qz1MT_iCyD3gPx8LXVoa!IN+t2@VmNeMv&i=`jwVz+s{(jkib!YGA z&N{#^>p;Kk{oOSJT5Ls@OmhzP^GB8>cg`@KC7kd+PB;T6bSI0L5089uG}_|EPpw)h noE7dJ0>q8y?d9cFvsqBpc1>D0>s+C6%eG#{otpm#Uc-a~<7hE} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/dist/WebSocketMainInsecure.swf b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/dist/WebSocketMainInsecure.swf deleted file mode 100644 index 5949ff3d09e4dc669cb25144fa5775dba071b684..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 175953 zcmV(xKjc=g0$O%2?+^r+_Q<1knn=vW-ri7<$`*T+Z!lA zxfh>t27|tW^z?8z+&i4voANu-h57mU=^3JQk*F7H(JRp44VvqFc>_;A^AZdoB?DH! z%NKM}UIEUVEmSD@;xo@gMzvXEgZe^#HwWnfy-V<@4)Lw3EIAw z5~OLTST7_|4M(u=K(aPSbqWtuI(j zOIf#8v6`CLw{E@Bym9PT+&A}r{zsQTzWjMZ(v_K;nizj^kApStc_FklOJ-Y;W*OkD8A&0Aep&b#z&;zu8? zKENGw^zfOkBZnSe#Gg9)`>pIF-(H*Fb@hn>15&mx{%s+1_Ne_^yBus;z94ny%+cMO zw+`Kq`pwmCE4!SSICK&+-+A-ko4oyl_J7N|Fm3%dPV?s@#xhpEy>TjY-R}!#axQ=M+k3o?%ZB`W%esXv z%wP6R|AjgG%^f@02X?MK&iV136JPMQZ=98La>w+kjKS|6SixMn_RM+ajr|Kwv&T$m z9naZyV%ALVviD{#;+)UTLJep~x7Yti`g->|;jb>s?r z+t^D7IF}B6xrTdg@XG1DUpBt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p z_voEEsoFfnRS)vVRY&yBV1HjDpG}!H_98Kjgr{CRvPO>^@Dto}~m3>Yc499Q` zhbvLkaO8CU)UTT=Rht(Wk`ew&*pdFot$a}l`^p`bCQ(8!uO`>sp=I~Dy((UJd;gT> zbi6<>uP|0rJLK{X32XBjaYp(7lhCi+*y)^jw7<*GM*G{e;a7AWhRFiK1^jzfc z$aj44GDVKDlWWeeuxhK3p0C{D=)GW9I65=f9X6k1$m>7x@nd9e2D>7Ya|};D))_L- zlj4Z5#X(*PV>{Qj+Bf^$G-2~AuJ-lz{l9AV{kH~J>`)H=GiUyBjrIR$mcMdW+waCK ze}!58+RXBCQ8SBb4COoy<#^ATRWDVWm+1ZpW*8^>yM29Koy|ONaxK7N1O=3R65taQ zuk5t|pK5!YMS|4LKN zsMh~9J@bD+PxHqc$+AvvM7)gT8}`U=)3P8G8wP@d}Tb1T*J67n}wN;DmU0QjS LboTr|Wyc*1(*E2! diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js deleted file mode 100644 index 6ea5dd0a..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js +++ /dev/null @@ -1,3871 +0,0 @@ -/*! Socket.IO.js build:0.9.11, development. Copyright(c) 2011 LearnBoost MIT Licensed */ - -var io = ('undefined' === typeof module ? {} : module.exports); -(function() { - -/** - * socket.io - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (exports, global) { - - /** - * IO namespace. - * - * @namespace - */ - - var io = exports; - - /** - * Socket.IO version - * - * @api public - */ - - io.version = '0.9.11'; - - /** - * Protocol implemented. - * - * @api public - */ - - io.protocol = 1; - - /** - * Available transports, these will be populated with the available transports - * - * @api public - */ - - io.transports = []; - - /** - * Keep track of jsonp callbacks. - * - * @api private - */ - - io.j = []; - - /** - * Keep track of our io.Sockets - * - * @api private - */ - io.sockets = {}; - - - /** - * Manages connections to hosts. - * - * @param {String} uri - * @Param {Boolean} force creation of new socket (defaults to false) - * @api public - */ - - io.connect = function (host, details) { - var uri = io.util.parseUri(host) - , uuri - , socket; - - if (global && global.location) { - uri.protocol = uri.protocol || global.location.protocol.slice(0, -1); - uri.host = uri.host || (global.document - ? global.document.domain : global.location.hostname); - uri.port = uri.port || global.location.port; - } - - uuri = io.util.uniqueUri(uri); - - var options = { - host: uri.host - , secure: 'https' == uri.protocol - , port: uri.port || ('https' == uri.protocol ? 443 : 80) - , query: uri.query || '' - }; - - io.util.merge(options, details); - - if (options['force new connection'] || !io.sockets[uuri]) { - socket = new io.Socket(options); - } - - if (!options['force new connection'] && socket) { - io.sockets[uuri] = socket; - } - - socket = socket || io.sockets[uuri]; - - // if path is different from '' or / - return socket.of(uri.path.length > 1 ? uri.path : ''); - }; - -})('object' === typeof module ? module.exports : (this.io = {}), this); -/** - * socket.io - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (exports, global) { - - /** - * Utilities namespace. - * - * @namespace - */ - - var util = exports.util = {}; - - /** - * Parses an URI - * - * @author Steven Levithan (MIT license) - * @api public - */ - - var re = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/; - - var parts = ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', - 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', - 'anchor']; - - util.parseUri = function (str) { - var m = re.exec(str || '') - , uri = {} - , i = 14; - - while (i--) { - uri[parts[i]] = m[i] || ''; - } - - return uri; - }; - - /** - * Produces a unique url that identifies a Socket.IO connection. - * - * @param {Object} uri - * @api public - */ - - util.uniqueUri = function (uri) { - var protocol = uri.protocol - , host = uri.host - , port = uri.port; - - if ('document' in global) { - host = host || document.domain; - port = port || (protocol == 'https' - && document.location.protocol !== 'https:' ? 443 : document.location.port); - } else { - host = host || 'localhost'; - - if (!port && protocol == 'https') { - port = 443; - } - } - - return (protocol || 'http') + '://' + host + ':' + (port || 80); - }; - - /** - * Mergest 2 query strings in to once unique query string - * - * @param {String} base - * @param {String} addition - * @api public - */ - - util.query = function (base, addition) { - var query = util.chunkQuery(base || '') - , components = []; - - util.merge(query, util.chunkQuery(addition || '')); - for (var part in query) { - if (query.hasOwnProperty(part)) { - components.push(part + '=' + query[part]); - } - } - - return components.length ? '?' + components.join('&') : ''; - }; - - /** - * Transforms a querystring in to an object - * - * @param {String} qs - * @api public - */ - - util.chunkQuery = function (qs) { - var query = {} - , params = qs.split('&') - , i = 0 - , l = params.length - , kv; - - for (; i < l; ++i) { - kv = params[i].split('='); - if (kv[0]) { - query[kv[0]] = kv[1]; - } - } - - return query; - }; - - /** - * Executes the given function when the page is loaded. - * - * io.util.load(function () { console.log('page loaded'); }); - * - * @param {Function} fn - * @api public - */ - - var pageLoaded = false; - - util.load = function (fn) { - if ('document' in global && document.readyState === 'complete' || pageLoaded) { - return fn(); - } - - util.on(global, 'load', fn, false); - }; - - /** - * Adds an event. - * - * @api private - */ - - util.on = function (element, event, fn, capture) { - if (element.attachEvent) { - element.attachEvent('on' + event, fn); - } else if (element.addEventListener) { - element.addEventListener(event, fn, capture); - } - }; - - /** - * Generates the correct `XMLHttpRequest` for regular and cross domain requests. - * - * @param {Boolean} [xdomain] Create a request that can be used cross domain. - * @returns {XMLHttpRequest|false} If we can create a XMLHttpRequest. - * @api private - */ - - util.request = function (xdomain) { - - if (xdomain && 'undefined' != typeof XDomainRequest && !util.ua.hasCORS) { - return new XDomainRequest(); - } - - if ('undefined' != typeof XMLHttpRequest && (!xdomain || util.ua.hasCORS)) { - return new XMLHttpRequest(); - } - - if (!xdomain) { - try { - return new window[(['Active'].concat('Object').join('X'))]('Microsoft.XMLHTTP'); - } catch(e) { } - } - - return null; - }; - - /** - * XHR based transport constructor. - * - * @constructor - * @api public - */ - - /** - * Change the internal pageLoaded value. - */ - - if ('undefined' != typeof window) { - util.load(function () { - pageLoaded = true; - }); - } - - /** - * Defers a function to ensure a spinner is not displayed by the browser - * - * @param {Function} fn - * @api public - */ - - util.defer = function (fn) { - if (!util.ua.webkit || 'undefined' != typeof importScripts) { - return fn(); - } - - util.load(function () { - setTimeout(fn, 100); - }); - }; - - /** - * Merges two objects. - * - * @api public - */ - - util.merge = function merge (target, additional, deep, lastseen) { - var seen = lastseen || [] - , depth = typeof deep == 'undefined' ? 2 : deep - , prop; - - for (prop in additional) { - if (additional.hasOwnProperty(prop) && util.indexOf(seen, prop) < 0) { - if (typeof target[prop] !== 'object' || !depth) { - target[prop] = additional[prop]; - seen.push(additional[prop]); - } else { - util.merge(target[prop], additional[prop], depth - 1, seen); - } - } - } - - return target; - }; - - /** - * Merges prototypes from objects - * - * @api public - */ - - util.mixin = function (ctor, ctor2) { - util.merge(ctor.prototype, ctor2.prototype); - }; - - /** - * Shortcut for prototypical and static inheritance. - * - * @api private - */ - - util.inherit = function (ctor, ctor2) { - function f() {}; - f.prototype = ctor2.prototype; - ctor.prototype = new f; - }; - - /** - * Checks if the given object is an Array. - * - * io.util.isArray([]); // true - * io.util.isArray({}); // false - * - * @param Object obj - * @api public - */ - - util.isArray = Array.isArray || function (obj) { - return Object.prototype.toString.call(obj) === '[object Array]'; - }; - - /** - * Intersects values of two arrays into a third - * - * @api public - */ - - util.intersect = function (arr, arr2) { - var ret = [] - , longest = arr.length > arr2.length ? arr : arr2 - , shortest = arr.length > arr2.length ? arr2 : arr; - - for (var i = 0, l = shortest.length; i < l; i++) { - if (~util.indexOf(longest, shortest[i])) - ret.push(shortest[i]); - } - - return ret; - }; - - /** - * Array indexOf compatibility. - * - * @see bit.ly/a5Dxa2 - * @api public - */ - - util.indexOf = function (arr, o, i) { - - for (var j = arr.length, i = i < 0 ? i + j < 0 ? 0 : i + j : i || 0; - i < j && arr[i] !== o; i++) {} - - return j <= i ? -1 : i; - }; - - /** - * Converts enumerables to array. - * - * @api public - */ - - util.toArray = function (enu) { - var arr = []; - - for (var i = 0, l = enu.length; i < l; i++) - arr.push(enu[i]); - - return arr; - }; - - /** - * UA / engines detection namespace. - * - * @namespace - */ - - util.ua = {}; - - /** - * Whether the UA supports CORS for XHR. - * - * @api public - */ - - util.ua.hasCORS = 'undefined' != typeof XMLHttpRequest && (function () { - try { - var a = new XMLHttpRequest(); - } catch (e) { - return false; - } - - return a.withCredentials != undefined; - })(); - - /** - * Detect webkit. - * - * @api public - */ - - util.ua.webkit = 'undefined' != typeof navigator - && /webkit/i.test(navigator.userAgent); - - /** - * Detect iPad/iPhone/iPod. - * - * @api public - */ - - util.ua.iDevice = 'undefined' != typeof navigator - && /iPad|iPhone|iPod/i.test(navigator.userAgent); - -})('undefined' != typeof io ? io : module.exports, this); -/** - * socket.io - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (exports, io) { - - /** - * Expose constructor. - */ - - exports.EventEmitter = EventEmitter; - - /** - * Event emitter constructor. - * - * @api public. - */ - - function EventEmitter () {}; - - /** - * Adds a listener - * - * @api public - */ - - EventEmitter.prototype.on = function (name, fn) { - if (!this.$events) { - this.$events = {}; - } - - if (!this.$events[name]) { - this.$events[name] = fn; - } else if (io.util.isArray(this.$events[name])) { - this.$events[name].push(fn); - } else { - this.$events[name] = [this.$events[name], fn]; - } - - return this; - }; - - EventEmitter.prototype.addListener = EventEmitter.prototype.on; - - /** - * Adds a volatile listener. - * - * @api public - */ - - EventEmitter.prototype.once = function (name, fn) { - var self = this; - - function on () { - self.removeListener(name, on); - fn.apply(this, arguments); - }; - - on.listener = fn; - this.on(name, on); - - return this; - }; - - /** - * Removes a listener. - * - * @api public - */ - - EventEmitter.prototype.removeListener = function (name, fn) { - if (this.$events && this.$events[name]) { - var list = this.$events[name]; - - if (io.util.isArray(list)) { - var pos = -1; - - for (var i = 0, l = list.length; i < l; i++) { - if (list[i] === fn || (list[i].listener && list[i].listener === fn)) { - pos = i; - break; - } - } - - if (pos < 0) { - return this; - } - - list.splice(pos, 1); - - if (!list.length) { - delete this.$events[name]; - } - } else if (list === fn || (list.listener && list.listener === fn)) { - delete this.$events[name]; - } - } - - return this; - }; - - /** - * Removes all listeners for an event. - * - * @api public - */ - - EventEmitter.prototype.removeAllListeners = function (name) { - if (name === undefined) { - this.$events = {}; - return this; - } - - if (this.$events && this.$events[name]) { - this.$events[name] = null; - } - - return this; - }; - - /** - * Gets all listeners for a certain event. - * - * @api publci - */ - - EventEmitter.prototype.listeners = function (name) { - if (!this.$events) { - this.$events = {}; - } - - if (!this.$events[name]) { - this.$events[name] = []; - } - - if (!io.util.isArray(this.$events[name])) { - this.$events[name] = [this.$events[name]]; - } - - return this.$events[name]; - }; - - /** - * Emits an event. - * - * @api public - */ - - EventEmitter.prototype.emit = function (name) { - if (!this.$events) { - return false; - } - - var handler = this.$events[name]; - - if (!handler) { - return false; - } - - var args = Array.prototype.slice.call(arguments, 1); - - if ('function' == typeof handler) { - handler.apply(this, args); - } else if (io.util.isArray(handler)) { - var listeners = handler.slice(); - - for (var i = 0, l = listeners.length; i < l; i++) { - listeners[i].apply(this, args); - } - } else { - return false; - } - - return true; - }; - -})( - 'undefined' != typeof io ? io : module.exports - , 'undefined' != typeof io ? io : module.parent.exports -); - -/** - * socket.io - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Based on JSON2 (http://www.JSON.org/js.html). - */ - -(function (exports, nativeJSON) { - "use strict"; - - // use native JSON if it's available - if (nativeJSON && nativeJSON.parse){ - return exports.JSON = { - parse: nativeJSON.parse - , stringify: nativeJSON.stringify - }; - } - - var JSON = exports.JSON = {}; - - function f(n) { - // Format integers to have at least two digits. - return n < 10 ? '0' + n : n; - } - - function date(d, key) { - return isFinite(d.valueOf()) ? - d.getUTCFullYear() + '-' + - f(d.getUTCMonth() + 1) + '-' + - f(d.getUTCDate()) + 'T' + - f(d.getUTCHours()) + ':' + - f(d.getUTCMinutes()) + ':' + - f(d.getUTCSeconds()) + 'Z' : null; - }; - - var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - gap, - indent, - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }, - 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 instanceof Date) { - value = date(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. - - 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. - - 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'); - }; - -})( - 'undefined' != typeof io ? io : module.exports - , typeof JSON !== 'undefined' ? JSON : undefined -); - -/** - * socket.io - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (exports, io) { - - /** - * Parser namespace. - * - * @namespace - */ - - var parser = exports.parser = {}; - - /** - * Packet types. - */ - - var packets = parser.packets = [ - 'disconnect' - , 'connect' - , 'heartbeat' - , 'message' - , 'json' - , 'event' - , 'ack' - , 'error' - , 'noop' - ]; - - /** - * Errors reasons. - */ - - var reasons = parser.reasons = [ - 'transport not supported' - , 'client not handshaken' - , 'unauthorized' - ]; - - /** - * Errors advice. - */ - - var advice = parser.advice = [ - 'reconnect' - ]; - - /** - * Shortcuts. - */ - - var JSON = io.JSON - , indexOf = io.util.indexOf; - - /** - * Encodes a packet. - * - * @api private - */ - - parser.encodePacket = function (packet) { - var type = indexOf(packets, packet.type) - , id = packet.id || '' - , endpoint = packet.endpoint || '' - , ack = packet.ack - , data = null; - - switch (packet.type) { - case 'error': - var reason = packet.reason ? indexOf(reasons, packet.reason) : '' - , adv = packet.advice ? indexOf(advice, packet.advice) : ''; - - if (reason !== '' || adv !== '') - data = reason + (adv !== '' ? ('+' + adv) : ''); - - break; - - case 'message': - if (packet.data !== '') - data = packet.data; - break; - - case 'event': - var ev = { name: packet.name }; - - if (packet.args && packet.args.length) { - ev.args = packet.args; - } - - data = JSON.stringify(ev); - break; - - case 'json': - data = JSON.stringify(packet.data); - break; - - case 'connect': - if (packet.qs) - data = packet.qs; - break; - - case 'ack': - data = packet.ackId - + (packet.args && packet.args.length - ? '+' + JSON.stringify(packet.args) : ''); - break; - } - - // construct packet with required fragments - var encoded = [ - type - , id + (ack == 'data' ? '+' : '') - , endpoint - ]; - - // data fragment is optional - if (data !== null && data !== undefined) - encoded.push(data); - - return encoded.join(':'); - }; - - /** - * Encodes multiple messages (payload). - * - * @param {Array} messages - * @api private - */ - - parser.encodePayload = function (packets) { - var decoded = ''; - - if (packets.length == 1) - return packets[0]; - - for (var i = 0, l = packets.length; i < l; i++) { - var packet = packets[i]; - decoded += '\ufffd' + packet.length + '\ufffd' + packets[i]; - } - - return decoded; - }; - - /** - * Decodes a packet - * - * @api private - */ - - var regexp = /([^:]+):([0-9]+)?(\+)?:([^:]+)?:?([\s\S]*)?/; - - parser.decodePacket = function (data) { - var pieces = data.match(regexp); - - if (!pieces) return {}; - - var id = pieces[2] || '' - , data = pieces[5] || '' - , packet = { - type: packets[pieces[1]] - , endpoint: pieces[4] || '' - }; - - // whether we need to acknowledge the packet - if (id) { - packet.id = id; - if (pieces[3]) - packet.ack = 'data'; - else - packet.ack = true; - } - - // handle different packet types - switch (packet.type) { - case 'error': - var pieces = data.split('+'); - packet.reason = reasons[pieces[0]] || ''; - packet.advice = advice[pieces[1]] || ''; - break; - - case 'message': - packet.data = data || ''; - break; - - case 'event': - try { - var opts = JSON.parse(data); - packet.name = opts.name; - packet.args = opts.args; - } catch (e) { } - - packet.args = packet.args || []; - break; - - case 'json': - try { - packet.data = JSON.parse(data); - } catch (e) { } - break; - - case 'connect': - packet.qs = data || ''; - break; - - case 'ack': - var pieces = data.match(/^([0-9]+)(\+)?(.*)/); - if (pieces) { - packet.ackId = pieces[1]; - packet.args = []; - - if (pieces[3]) { - try { - packet.args = pieces[3] ? JSON.parse(pieces[3]) : []; - } catch (e) { } - } - } - break; - - case 'disconnect': - case 'heartbeat': - break; - }; - - return packet; - }; - - /** - * Decodes data payload. Detects multiple messages - * - * @return {Array} messages - * @api public - */ - - parser.decodePayload = function (data) { - // IE doesn't like data[i] for unicode chars, charAt works fine - if (data.charAt(0) == '\ufffd') { - var ret = []; - - for (var i = 1, length = ''; i < data.length; i++) { - if (data.charAt(i) == '\ufffd') { - ret.push(parser.decodePacket(data.substr(i + 1).substr(0, length))); - i += Number(length) + 1; - length = ''; - } else { - length += data.charAt(i); - } - } - - return ret; - } else { - return [parser.decodePacket(data)]; - } - }; - -})( - 'undefined' != typeof io ? io : module.exports - , 'undefined' != typeof io ? io : module.parent.exports -); -/** - * socket.io - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (exports, io) { - - /** - * Expose constructor. - */ - - exports.Transport = Transport; - - /** - * This is the transport template for all supported transport methods. - * - * @constructor - * @api public - */ - - function Transport (socket, sessid) { - this.socket = socket; - this.sessid = sessid; - }; - - /** - * Apply EventEmitter mixin. - */ - - io.util.mixin(Transport, io.EventEmitter); - - - /** - * Indicates whether heartbeats is enabled for this transport - * - * @api private - */ - - Transport.prototype.heartbeats = function () { - return true; - }; - - /** - * Handles the response from the server. When a new response is received - * it will automatically update the timeout, decode the message and - * forwards the response to the onMessage function for further processing. - * - * @param {String} data Response from the server. - * @api private - */ - - Transport.prototype.onData = function (data) { - this.clearCloseTimeout(); - - // If the connection in currently open (or in a reopening state) reset the close - // timeout since we have just received data. This check is necessary so - // that we don't reset the timeout on an explicitly disconnected connection. - if (this.socket.connected || this.socket.connecting || this.socket.reconnecting) { - this.setCloseTimeout(); - } - - if (data !== '') { - // todo: we should only do decodePayload for xhr transports - var msgs = io.parser.decodePayload(data); - - if (msgs && msgs.length) { - for (var i = 0, l = msgs.length; i < l; i++) { - this.onPacket(msgs[i]); - } - } - } - - return this; - }; - - /** - * Handles packets. - * - * @api private - */ - - Transport.prototype.onPacket = function (packet) { - this.socket.setHeartbeatTimeout(); - - if (packet.type == 'heartbeat') { - return this.onHeartbeat(); - } - - if (packet.type == 'connect' && packet.endpoint == '') { - this.onConnect(); - } - - if (packet.type == 'error' && packet.advice == 'reconnect') { - this.isOpen = false; - } - - this.socket.onPacket(packet); - - return this; - }; - - /** - * Sets close timeout - * - * @api private - */ - - Transport.prototype.setCloseTimeout = function () { - if (!this.closeTimeout) { - var self = this; - - this.closeTimeout = setTimeout(function () { - self.onDisconnect(); - }, this.socket.closeTimeout); - } - }; - - /** - * Called when transport disconnects. - * - * @api private - */ - - Transport.prototype.onDisconnect = function () { - if (this.isOpen) this.close(); - this.clearTimeouts(); - this.socket.onDisconnect(); - return this; - }; - - /** - * Called when transport connects - * - * @api private - */ - - Transport.prototype.onConnect = function () { - this.socket.onConnect(); - return this; - }; - - /** - * Clears close timeout - * - * @api private - */ - - Transport.prototype.clearCloseTimeout = function () { - if (this.closeTimeout) { - clearTimeout(this.closeTimeout); - this.closeTimeout = null; - } - }; - - /** - * Clear timeouts - * - * @api private - */ - - Transport.prototype.clearTimeouts = function () { - this.clearCloseTimeout(); - - if (this.reopenTimeout) { - clearTimeout(this.reopenTimeout); - } - }; - - /** - * Sends a packet - * - * @param {Object} packet object. - * @api private - */ - - Transport.prototype.packet = function (packet) { - this.send(io.parser.encodePacket(packet)); - }; - - /** - * Send the received heartbeat message back to server. So the server - * knows we are still connected. - * - * @param {String} heartbeat Heartbeat response from the server. - * @api private - */ - - Transport.prototype.onHeartbeat = function (heartbeat) { - this.packet({ type: 'heartbeat' }); - }; - - /** - * Called when the transport opens. - * - * @api private - */ - - Transport.prototype.onOpen = function () { - this.isOpen = true; - this.clearCloseTimeout(); - this.socket.onOpen(); - }; - - /** - * Notifies the base when the connection with the Socket.IO server - * has been disconnected. - * - * @api private - */ - - Transport.prototype.onClose = function () { - var self = this; - - /* FIXME: reopen delay causing a infinit loop - this.reopenTimeout = setTimeout(function () { - self.open(); - }, this.socket.options['reopen delay']);*/ - - this.isOpen = false; - this.socket.onClose(); - this.onDisconnect(); - }; - - /** - * Generates a connection url based on the Socket.IO URL Protocol. - * See for more details. - * - * @returns {String} Connection url - * @api private - */ - - Transport.prototype.prepareUrl = function () { - var options = this.socket.options; - - return this.scheme() + '://' - + options.host + ':' + options.port + '/' - + options.resource + '/' + io.protocol - + '/' + this.name + '/' + this.sessid; - }; - - /** - * Checks if the transport is ready to start a connection. - * - * @param {Socket} socket The socket instance that needs a transport - * @param {Function} fn The callback - * @api private - */ - - Transport.prototype.ready = function (socket, fn) { - fn.call(this); - }; -})( - 'undefined' != typeof io ? io : module.exports - , 'undefined' != typeof io ? io : module.parent.exports -); -/** - * socket.io - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (exports, io, global) { - - /** - * Expose constructor. - */ - - exports.Socket = Socket; - - /** - * Create a new `Socket.IO client` which can establish a persistent - * connection with a Socket.IO enabled server. - * - * @api public - */ - - function Socket (options) { - this.options = { - port: 80 - , secure: false - , document: 'document' in global ? document : false - , resource: 'socket.io' - , transports: io.transports - , 'connect timeout': 10000 - , 'try multiple transports': true - , 'reconnect': true - , 'reconnection delay': 500 - , 'reconnection limit': Infinity - , 'reopen delay': 3000 - , 'max reconnection attempts': 10 - , 'sync disconnect on unload': false - , 'auto connect': true - , 'flash policy port': 10843 - , 'manualFlush': false - }; - - io.util.merge(this.options, options); - - this.connected = false; - this.open = false; - this.connecting = false; - this.reconnecting = false; - this.namespaces = {}; - this.buffer = []; - this.doBuffer = false; - - if (this.options['sync disconnect on unload'] && - (!this.isXDomain() || io.util.ua.hasCORS)) { - var self = this; - io.util.on(global, 'beforeunload', function () { - self.disconnectSync(); - }, false); - } - - if (this.options['auto connect']) { - this.connect(); - } -}; - - /** - * Apply EventEmitter mixin. - */ - - io.util.mixin(Socket, io.EventEmitter); - - /** - * Returns a namespace listener/emitter for this socket - * - * @api public - */ - - Socket.prototype.of = function (name) { - if (!this.namespaces[name]) { - this.namespaces[name] = new io.SocketNamespace(this, name); - - if (name !== '') { - this.namespaces[name].packet({ type: 'connect' }); - } - } - - return this.namespaces[name]; - }; - - /** - * Emits the given event to the Socket and all namespaces - * - * @api private - */ - - Socket.prototype.publish = function () { - this.emit.apply(this, arguments); - - var nsp; - - for (var i in this.namespaces) { - if (this.namespaces.hasOwnProperty(i)) { - nsp = this.of(i); - nsp.$emit.apply(nsp, arguments); - } - } - }; - - /** - * Performs the handshake - * - * @api private - */ - - function empty () { }; - - Socket.prototype.handshake = function (fn) { - var self = this - , options = this.options; - - function complete (data) { - if (data instanceof Error) { - self.connecting = false; - self.onError(data.message); - } else { - fn.apply(null, data.split(':')); - } - }; - - var url = [ - 'http' + (options.secure ? 's' : '') + ':/' - , options.host + ':' + options.port - , options.resource - , io.protocol - , io.util.query(this.options.query, 't=' + +new Date) - ].join('/'); - - if (this.isXDomain() && !io.util.ua.hasCORS) { - var insertAt = document.getElementsByTagName('script')[0] - , script = document.createElement('script'); - - script.src = url + '&jsonp=' + io.j.length; - insertAt.parentNode.insertBefore(script, insertAt); - - io.j.push(function (data) { - complete(data); - script.parentNode.removeChild(script); - }); - } else { - var xhr = io.util.request(); - - xhr.open('GET', url, true); - if (this.isXDomain()) { - xhr.withCredentials = true; - } - xhr.onreadystatechange = function () { - if (xhr.readyState == 4) { - xhr.onreadystatechange = empty; - - if (xhr.status == 200) { - complete(xhr.responseText); - } else if (xhr.status == 403) { - self.onError(xhr.responseText); - } else { - self.connecting = false; - !self.reconnecting && self.onError(xhr.responseText); - } - } - }; - xhr.send(null); - } - }; - - /** - * Find an available transport based on the options supplied in the constructor. - * - * @api private - */ - - Socket.prototype.getTransport = function (override) { - var transports = override || this.transports, match; - - for (var i = 0, transport; transport = transports[i]; i++) { - if (io.Transport[transport] - && io.Transport[transport].check(this) - && (!this.isXDomain() || io.Transport[transport].xdomainCheck(this))) { - return new io.Transport[transport](this, this.sessionid); - } - } - - return null; - }; - - /** - * Connects to the server. - * - * @param {Function} [fn] Callback. - * @returns {io.Socket} - * @api public - */ - - Socket.prototype.connect = function (fn) { - if (this.connecting) { - return this; - } - - var self = this; - self.connecting = true; - - this.handshake(function (sid, heartbeat, close, transports) { - self.sessionid = sid; - self.closeTimeout = close * 1000; - self.heartbeatTimeout = heartbeat * 1000; - if(!self.transports) - self.transports = self.origTransports = (transports ? io.util.intersect( - transports.split(',') - , self.options.transports - ) : self.options.transports); - - self.setHeartbeatTimeout(); - - function connect (transports){ - if (self.transport) self.transport.clearTimeouts(); - - self.transport = self.getTransport(transports); - if (!self.transport) return self.publish('connect_failed'); - - // once the transport is ready - self.transport.ready(self, function () { - self.connecting = true; - self.publish('connecting', self.transport.name); - self.transport.open(); - - if (self.options['connect timeout']) { - self.connectTimeoutTimer = setTimeout(function () { - if (!self.connected) { - self.connecting = false; - - if (self.options['try multiple transports']) { - var remaining = self.transports; - - while (remaining.length > 0 && remaining.splice(0,1)[0] != - self.transport.name) {} - - if (remaining.length){ - connect(remaining); - } else { - self.publish('connect_failed'); - } - } - } - }, self.options['connect timeout']); - } - }); - } - - connect(self.transports); - - self.once('connect', function (){ - clearTimeout(self.connectTimeoutTimer); - - fn && typeof fn == 'function' && fn(); - }); - }); - - return this; - }; - - /** - * Clears and sets a new heartbeat timeout using the value given by the - * server during the handshake. - * - * @api private - */ - - Socket.prototype.setHeartbeatTimeout = function () { - clearTimeout(this.heartbeatTimeoutTimer); - if(this.transport && !this.transport.heartbeats()) return; - - var self = this; - this.heartbeatTimeoutTimer = setTimeout(function () { - self.transport.onClose(); - }, this.heartbeatTimeout); - }; - - /** - * Sends a message. - * - * @param {Object} data packet. - * @returns {io.Socket} - * @api public - */ - - Socket.prototype.packet = function (data) { - if (this.connected && !this.doBuffer) { - this.transport.packet(data); - } else { - this.buffer.push(data); - } - - return this; - }; - - /** - * Sets buffer state - * - * @api private - */ - - Socket.prototype.setBuffer = function (v) { - this.doBuffer = v; - - if (!v && this.connected && this.buffer.length) { - if (!this.options['manualFlush']) { - this.flushBuffer(); - } - } - }; - - /** - * Flushes the buffer data over the wire. - * To be invoked manually when 'manualFlush' is set to true. - * - * @api public - */ - - Socket.prototype.flushBuffer = function() { - this.transport.payload(this.buffer); - this.buffer = []; - }; - - - /** - * Disconnect the established connect. - * - * @returns {io.Socket} - * @api public - */ - - Socket.prototype.disconnect = function () { - if (this.connected || this.connecting) { - if (this.open) { - this.of('').packet({ type: 'disconnect' }); - } - - // handle disconnection immediately - this.onDisconnect('booted'); - } - - return this; - }; - - /** - * Disconnects the socket with a sync XHR. - * - * @api private - */ - - Socket.prototype.disconnectSync = function () { - // ensure disconnection - var xhr = io.util.request(); - var uri = [ - 'http' + (this.options.secure ? 's' : '') + ':/' - , this.options.host + ':' + this.options.port - , this.options.resource - , io.protocol - , '' - , this.sessionid - ].join('/') + '/?disconnect=1'; - - xhr.open('GET', uri, false); - xhr.send(null); - - // handle disconnection immediately - this.onDisconnect('booted'); - }; - - /** - * Check if we need to use cross domain enabled transports. Cross domain would - * be a different port or different domain name. - * - * @returns {Boolean} - * @api private - */ - - Socket.prototype.isXDomain = function () { - - var port = global.location.port || - ('https:' == global.location.protocol ? 443 : 80); - - return this.options.host !== global.location.hostname - || this.options.port != port; - }; - - /** - * Called upon handshake. - * - * @api private - */ - - Socket.prototype.onConnect = function () { - if (!this.connected) { - this.connected = true; - this.connecting = false; - if (!this.doBuffer) { - // make sure to flush the buffer - this.setBuffer(false); - } - this.emit('connect'); - } - }; - - /** - * Called when the transport opens - * - * @api private - */ - - Socket.prototype.onOpen = function () { - this.open = true; - }; - - /** - * Called when the transport closes. - * - * @api private - */ - - Socket.prototype.onClose = function () { - this.open = false; - clearTimeout(this.heartbeatTimeoutTimer); - }; - - /** - * Called when the transport first opens a connection - * - * @param text - */ - - Socket.prototype.onPacket = function (packet) { - this.of(packet.endpoint).onPacket(packet); - }; - - /** - * Handles an error. - * - * @api private - */ - - Socket.prototype.onError = function (err) { - if (err && err.advice) { - if (err.advice === 'reconnect' && (this.connected || this.connecting)) { - this.disconnect(); - if (this.options.reconnect) { - this.reconnect(); - } - } - } - - this.publish('error', err && err.reason ? err.reason : err); - }; - - /** - * Called when the transport disconnects. - * - * @api private - */ - - Socket.prototype.onDisconnect = function (reason) { - var wasConnected = this.connected - , wasConnecting = this.connecting; - - this.connected = false; - this.connecting = false; - this.open = false; - - if (wasConnected || wasConnecting) { - this.transport.close(); - this.transport.clearTimeouts(); - if (wasConnected) { - this.publish('disconnect', reason); - - if ('booted' != reason && this.options.reconnect && !this.reconnecting) { - this.reconnect(); - } - } - } - }; - - /** - * Called upon reconnection. - * - * @api private - */ - - Socket.prototype.reconnect = function () { - this.reconnecting = true; - this.reconnectionAttempts = 0; - this.reconnectionDelay = this.options['reconnection delay']; - - var self = this - , maxAttempts = this.options['max reconnection attempts'] - , tryMultiple = this.options['try multiple transports'] - , limit = this.options['reconnection limit']; - - function reset () { - if (self.connected) { - for (var i in self.namespaces) { - if (self.namespaces.hasOwnProperty(i) && '' !== i) { - self.namespaces[i].packet({ type: 'connect' }); - } - } - self.publish('reconnect', self.transport.name, self.reconnectionAttempts); - } - - clearTimeout(self.reconnectionTimer); - - self.removeListener('connect_failed', maybeReconnect); - self.removeListener('connect', maybeReconnect); - - self.reconnecting = false; - - delete self.reconnectionAttempts; - delete self.reconnectionDelay; - delete self.reconnectionTimer; - delete self.redoTransports; - - self.options['try multiple transports'] = tryMultiple; - }; - - function maybeReconnect () { - if (!self.reconnecting) { - return; - } - - if (self.connected) { - return reset(); - }; - - if (self.connecting && self.reconnecting) { - return self.reconnectionTimer = setTimeout(maybeReconnect, 1000); - } - - if (self.reconnectionAttempts++ >= maxAttempts) { - if (!self.redoTransports) { - self.on('connect_failed', maybeReconnect); - self.options['try multiple transports'] = true; - self.transports = self.origTransports; - self.transport = self.getTransport(); - self.redoTransports = true; - self.connect(); - } else { - self.publish('reconnect_failed'); - reset(); - } - } else { - if (self.reconnectionDelay < limit) { - self.reconnectionDelay *= 2; // exponential back off - } - - self.connect(); - self.publish('reconnecting', self.reconnectionDelay, self.reconnectionAttempts); - self.reconnectionTimer = setTimeout(maybeReconnect, self.reconnectionDelay); - } - }; - - this.options['try multiple transports'] = false; - this.reconnectionTimer = setTimeout(maybeReconnect, this.reconnectionDelay); - - this.on('connect', maybeReconnect); - }; - -})( - 'undefined' != typeof io ? io : module.exports - , 'undefined' != typeof io ? io : module.parent.exports - , this -); -/** - * socket.io - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (exports, io) { - - /** - * Expose constructor. - */ - - exports.SocketNamespace = SocketNamespace; - - /** - * Socket namespace constructor. - * - * @constructor - * @api public - */ - - function SocketNamespace (socket, name) { - this.socket = socket; - this.name = name || ''; - this.flags = {}; - this.json = new Flag(this, 'json'); - this.ackPackets = 0; - this.acks = {}; - }; - - /** - * Apply EventEmitter mixin. - */ - - io.util.mixin(SocketNamespace, io.EventEmitter); - - /** - * Copies emit since we override it - * - * @api private - */ - - SocketNamespace.prototype.$emit = io.EventEmitter.prototype.emit; - - /** - * Creates a new namespace, by proxying the request to the socket. This - * allows us to use the synax as we do on the server. - * - * @api public - */ - - SocketNamespace.prototype.of = function () { - return this.socket.of.apply(this.socket, arguments); - }; - - /** - * Sends a packet. - * - * @api private - */ - - SocketNamespace.prototype.packet = function (packet) { - packet.endpoint = this.name; - this.socket.packet(packet); - this.flags = {}; - return this; - }; - - /** - * Sends a message - * - * @api public - */ - - SocketNamespace.prototype.send = function (data, fn) { - var packet = { - type: this.flags.json ? 'json' : 'message' - , data: data - }; - - if ('function' == typeof fn) { - packet.id = ++this.ackPackets; - packet.ack = true; - this.acks[packet.id] = fn; - } - - return this.packet(packet); - }; - - /** - * Emits an event - * - * @api public - */ - - SocketNamespace.prototype.emit = function (name) { - var args = Array.prototype.slice.call(arguments, 1) - , lastArg = args[args.length - 1] - , packet = { - type: 'event' - , name: name - }; - - if ('function' == typeof lastArg) { - packet.id = ++this.ackPackets; - packet.ack = 'data'; - this.acks[packet.id] = lastArg; - args = args.slice(0, args.length - 1); - } - - packet.args = args; - - return this.packet(packet); - }; - - /** - * Disconnects the namespace - * - * @api private - */ - - SocketNamespace.prototype.disconnect = function () { - if (this.name === '') { - this.socket.disconnect(); - } else { - this.packet({ type: 'disconnect' }); - this.$emit('disconnect'); - } - - return this; - }; - - /** - * Handles a packet - * - * @api private - */ - - SocketNamespace.prototype.onPacket = function (packet) { - var self = this; - - function ack () { - self.packet({ - type: 'ack' - , args: io.util.toArray(arguments) - , ackId: packet.id - }); - }; - - switch (packet.type) { - case 'connect': - this.$emit('connect'); - break; - - case 'disconnect': - if (this.name === '') { - this.socket.onDisconnect(packet.reason || 'booted'); - } else { - this.$emit('disconnect', packet.reason); - } - break; - - case 'message': - case 'json': - var params = ['message', packet.data]; - - if (packet.ack == 'data') { - params.push(ack); - } else if (packet.ack) { - this.packet({ type: 'ack', ackId: packet.id }); - } - - this.$emit.apply(this, params); - break; - - case 'event': - var params = [packet.name].concat(packet.args); - - if (packet.ack == 'data') - params.push(ack); - - this.$emit.apply(this, params); - break; - - case 'ack': - if (this.acks[packet.ackId]) { - this.acks[packet.ackId].apply(this, packet.args); - delete this.acks[packet.ackId]; - } - break; - - case 'error': - if (packet.advice){ - this.socket.onError(packet); - } else { - if (packet.reason == 'unauthorized') { - this.$emit('connect_failed', packet.reason); - } else { - this.$emit('error', packet.reason); - } - } - break; - } - }; - - /** - * Flag interface. - * - * @api private - */ - - function Flag (nsp, name) { - this.namespace = nsp; - this.name = name; - }; - - /** - * Send a message - * - * @api public - */ - - Flag.prototype.send = function () { - this.namespace.flags[this.name] = true; - this.namespace.send.apply(this.namespace, arguments); - }; - - /** - * Emit an event - * - * @api public - */ - - Flag.prototype.emit = function () { - this.namespace.flags[this.name] = true; - this.namespace.emit.apply(this.namespace, arguments); - }; - -})( - 'undefined' != typeof io ? io : module.exports - , 'undefined' != typeof io ? io : module.parent.exports -); - -/** - * socket.io - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (exports, io, global) { - - /** - * Expose constructor. - */ - - exports.websocket = WS; - - /** - * The WebSocket transport uses the HTML5 WebSocket API to establish an - * persistent connection with the Socket.IO server. This transport will also - * be inherited by the FlashSocket fallback as it provides a API compatible - * polyfill for the WebSockets. - * - * @constructor - * @extends {io.Transport} - * @api public - */ - - function WS (socket) { - io.Transport.apply(this, arguments); - }; - - /** - * Inherits from Transport. - */ - - io.util.inherit(WS, io.Transport); - - /** - * Transport name - * - * @api public - */ - - WS.prototype.name = 'websocket'; - - /** - * Initializes a new `WebSocket` connection with the Socket.IO server. We attach - * all the appropriate listeners to handle the responses from the server. - * - * @returns {Transport} - * @api public - */ - - WS.prototype.open = function () { - var query = io.util.query(this.socket.options.query) - , self = this - , Socket - - - if (!Socket) { - Socket = global.MozWebSocket || global.WebSocket; - } - - this.websocket = new Socket(this.prepareUrl() + query); - - this.websocket.onopen = function () { - self.onOpen(); - self.socket.setBuffer(false); - }; - this.websocket.onmessage = function (ev) { - self.onData(ev.data); - }; - this.websocket.onclose = function () { - self.onClose(); - self.socket.setBuffer(true); - }; - this.websocket.onerror = function (e) { - self.onError(e); - }; - - return this; - }; - - /** - * Send a message to the Socket.IO server. The message will automatically be - * encoded in the correct message format. - * - * @returns {Transport} - * @api public - */ - - // Do to a bug in the current IDevices browser, we need to wrap the send in a - // setTimeout, when they resume from sleeping the browser will crash if - // we don't allow the browser time to detect the socket has been closed - if (io.util.ua.iDevice) { - WS.prototype.send = function (data) { - var self = this; - setTimeout(function() { - self.websocket.send(data); - },0); - return this; - }; - } else { - WS.prototype.send = function (data) { - this.websocket.send(data); - return this; - }; - } - - /** - * Payload - * - * @api private - */ - - WS.prototype.payload = function (arr) { - for (var i = 0, l = arr.length; i < l; i++) { - this.packet(arr[i]); - } - return this; - }; - - /** - * Disconnect the established `WebSocket` connection. - * - * @returns {Transport} - * @api public - */ - - WS.prototype.close = function () { - this.websocket.close(); - return this; - }; - - /** - * Handle the errors that `WebSocket` might be giving when we - * are attempting to connect or send messages. - * - * @param {Error} e The error. - * @api private - */ - - WS.prototype.onError = function (e) { - this.socket.onError(e); - }; - - /** - * Returns the appropriate scheme for the URI generation. - * - * @api private - */ - WS.prototype.scheme = function () { - return this.socket.options.secure ? 'wss' : 'ws'; - }; - - /** - * Checks if the browser has support for native `WebSockets` and that - * it's not the polyfill created for the FlashSocket transport. - * - * @return {Boolean} - * @api public - */ - - WS.check = function () { - return ('WebSocket' in global && !('__addTask' in WebSocket)) - || 'MozWebSocket' in global; - }; - - /** - * Check if the `WebSocket` transport support cross domain communications. - * - * @returns {Boolean} - * @api public - */ - - WS.xdomainCheck = function () { - return true; - }; - - /** - * Add the transport to your public io.transports array. - * - * @api private - */ - - io.transports.push('websocket'); - -})( - 'undefined' != typeof io ? io.Transport : module.exports - , 'undefined' != typeof io ? io : module.parent.exports - , this -); - -/** - * socket.io - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (exports, io) { - - /** - * Expose constructor. - */ - - exports.flashsocket = Flashsocket; - - /** - * The FlashSocket transport. This is a API wrapper for the HTML5 WebSocket - * specification. It uses a .swf file to communicate with the server. If you want - * to serve the .swf file from a other server than where the Socket.IO script is - * coming from you need to use the insecure version of the .swf. More information - * about this can be found on the github page. - * - * @constructor - * @extends {io.Transport.websocket} - * @api public - */ - - function Flashsocket () { - io.Transport.websocket.apply(this, arguments); - }; - - /** - * Inherits from Transport. - */ - - io.util.inherit(Flashsocket, io.Transport.websocket); - - /** - * Transport name - * - * @api public - */ - - Flashsocket.prototype.name = 'flashsocket'; - - /** - * Disconnect the established `FlashSocket` connection. This is done by adding a - * new task to the FlashSocket. The rest will be handled off by the `WebSocket` - * transport. - * - * @returns {Transport} - * @api public - */ - - Flashsocket.prototype.open = function () { - var self = this - , args = arguments; - - WebSocket.__addTask(function () { - io.Transport.websocket.prototype.open.apply(self, args); - }); - return this; - }; - - /** - * Sends a message to the Socket.IO server. This is done by adding a new - * task to the FlashSocket. The rest will be handled off by the `WebSocket` - * transport. - * - * @returns {Transport} - * @api public - */ - - Flashsocket.prototype.send = function () { - var self = this, args = arguments; - WebSocket.__addTask(function () { - io.Transport.websocket.prototype.send.apply(self, args); - }); - return this; - }; - - /** - * Disconnects the established `FlashSocket` connection. - * - * @returns {Transport} - * @api public - */ - - Flashsocket.prototype.close = function () { - WebSocket.__tasks.length = 0; - io.Transport.websocket.prototype.close.call(this); - return this; - }; - - /** - * The WebSocket fall back needs to append the flash container to the body - * element, so we need to make sure we have access to it. Or defer the call - * until we are sure there is a body element. - * - * @param {Socket} socket The socket instance that needs a transport - * @param {Function} fn The callback - * @api private - */ - - Flashsocket.prototype.ready = function (socket, fn) { - function init () { - var options = socket.options - , port = options['flash policy port'] - , path = [ - 'http' + (options.secure ? 's' : '') + ':/' - , options.host + ':' + options.port - , options.resource - , 'static/flashsocket' - , 'WebSocketMain' + (socket.isXDomain() ? 'Insecure' : '') + '.swf' - ]; - - // Only start downloading the swf file when the checked that this browser - // actually supports it - if (!Flashsocket.loaded) { - if (typeof WEB_SOCKET_SWF_LOCATION === 'undefined') { - // Set the correct file based on the XDomain settings - WEB_SOCKET_SWF_LOCATION = path.join('/'); - } - - if (port !== 843) { - WebSocket.loadFlashPolicyFile('xmlsocket://' + options.host + ':' + port); - } - - WebSocket.__initialize(); - Flashsocket.loaded = true; - } - - fn.call(self); - } - - var self = this; - if (document.body) return init(); - - io.util.load(init); - }; - - /** - * Check if the FlashSocket transport is supported as it requires that the Adobe - * Flash Player plug-in version `10.0.0` or greater is installed. And also check if - * the polyfill is correctly loaded. - * - * @returns {Boolean} - * @api public - */ - - Flashsocket.check = function () { - if ( - typeof WebSocket == 'undefined' - || !('__initialize' in WebSocket) || !swfobject - ) return false; - - return swfobject.getFlashPlayerVersion().major >= 10; - }; - - /** - * Check if the FlashSocket transport can be used as cross domain / cross origin - * transport. Because we can't see which type (secure or insecure) of .swf is used - * we will just return true. - * - * @returns {Boolean} - * @api public - */ - - Flashsocket.xdomainCheck = function () { - return true; - }; - - /** - * Disable AUTO_INITIALIZATION - */ - - if (typeof window != 'undefined') { - WEB_SOCKET_DISABLE_AUTO_INITIALIZATION = true; - } - - /** - * Add the transport to your public io.transports array. - * - * @api private - */ - - io.transports.push('flashsocket'); -})( - 'undefined' != typeof io ? io.Transport : module.exports - , 'undefined' != typeof io ? io : module.parent.exports -); -/* SWFObject v2.2 - is released under the MIT License -*/ -if ('undefined' != typeof window) { -var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O[(['Active'].concat('Object').join('X'))]!=D){try{var ad=new window[(['Active'].concat('Object').join('X'))](W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='"+af+"";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab -// License: New BSD License -// Reference: http://dev.w3.org/html5/websockets/ -// Reference: http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol - -(function() { - - if ('undefined' == typeof window || window.WebSocket) return; - - var console = window.console; - if (!console || !console.log || !console.error) { - console = {log: function(){ }, error: function(){ }}; - } - - if (!swfobject.hasFlashPlayerVersion("10.0.0")) { - console.error("Flash Player >= 10.0.0 is required."); - return; - } - if (location.protocol == "file:") { - console.error( - "WARNING: web-socket-js doesn't work in file:///... URL " + - "unless you set Flash Security Settings properly. " + - "Open the page via Web server i.e. http://..."); - } - - /** - * This class represents a faux web socket. - * @param {string} url - * @param {array or string} protocols - * @param {string} proxyHost - * @param {int} proxyPort - * @param {string} headers - */ - WebSocket = function(url, protocols, proxyHost, proxyPort, headers) { - var self = this; - self.__id = WebSocket.__nextId++; - WebSocket.__instances[self.__id] = self; - self.readyState = WebSocket.CONNECTING; - self.bufferedAmount = 0; - self.__events = {}; - if (!protocols) { - protocols = []; - } else if (typeof protocols == "string") { - protocols = [protocols]; - } - // Uses setTimeout() to make sure __createFlash() runs after the caller sets ws.onopen etc. - // Otherwise, when onopen fires immediately, onopen is called before it is set. - setTimeout(function() { - WebSocket.__addTask(function() { - WebSocket.__flash.create( - self.__id, url, protocols, proxyHost || null, proxyPort || 0, headers || null); - }); - }, 0); - }; - - /** - * Send data to the web socket. - * @param {string} data The data to send to the socket. - * @return {boolean} True for success, false for failure. - */ - WebSocket.prototype.send = function(data) { - if (this.readyState == WebSocket.CONNECTING) { - throw "INVALID_STATE_ERR: Web Socket connection has not been established"; - } - // We use encodeURIComponent() here, because FABridge doesn't work if - // the argument includes some characters. We don't use escape() here - // because of this: - // https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Functions#escape_and_unescape_Functions - // But it looks decodeURIComponent(encodeURIComponent(s)) doesn't - // preserve all Unicode characters either e.g. "\uffff" in Firefox. - // Note by wtritch: Hopefully this will not be necessary using ExternalInterface. Will require - // additional testing. - var result = WebSocket.__flash.send(this.__id, encodeURIComponent(data)); - if (result < 0) { // success - return true; - } else { - this.bufferedAmount += result; - return false; - } - }; - - /** - * Close this web socket gracefully. - */ - WebSocket.prototype.close = function() { - if (this.readyState == WebSocket.CLOSED || this.readyState == WebSocket.CLOSING) { - return; - } - this.readyState = WebSocket.CLOSING; - WebSocket.__flash.close(this.__id); - }; - - /** - * Implementation of {@link DOM 2 EventTarget Interface} - * - * @param {string} type - * @param {function} listener - * @param {boolean} useCapture - * @return void - */ - WebSocket.prototype.addEventListener = function(type, listener, useCapture) { - if (!(type in this.__events)) { - this.__events[type] = []; - } - this.__events[type].push(listener); - }; - - /** - * Implementation of {@link DOM 2 EventTarget Interface} - * - * @param {string} type - * @param {function} listener - * @param {boolean} useCapture - * @return void - */ - WebSocket.prototype.removeEventListener = function(type, listener, useCapture) { - if (!(type in this.__events)) return; - var events = this.__events[type]; - for (var i = events.length - 1; i >= 0; --i) { - if (events[i] === listener) { - events.splice(i, 1); - break; - } - } - }; - - /** - * Implementation of {@link DOM 2 EventTarget Interface} - * - * @param {Event} event - * @return void - */ - WebSocket.prototype.dispatchEvent = function(event) { - var events = this.__events[event.type] || []; - for (var i = 0; i < events.length; ++i) { - events[i](event); - } - var handler = this["on" + event.type]; - if (handler) handler(event); - }; - - /** - * Handles an event from Flash. - * @param {Object} flashEvent - */ - WebSocket.prototype.__handleEvent = function(flashEvent) { - if ("readyState" in flashEvent) { - this.readyState = flashEvent.readyState; - } - if ("protocol" in flashEvent) { - this.protocol = flashEvent.protocol; - } - - var jsEvent; - if (flashEvent.type == "open" || flashEvent.type == "error") { - jsEvent = this.__createSimpleEvent(flashEvent.type); - } else if (flashEvent.type == "close") { - // TODO implement jsEvent.wasClean - jsEvent = this.__createSimpleEvent("close"); - } else if (flashEvent.type == "message") { - var data = decodeURIComponent(flashEvent.message); - jsEvent = this.__createMessageEvent("message", data); - } else { - throw "unknown event type: " + flashEvent.type; - } - - this.dispatchEvent(jsEvent); - }; - - WebSocket.prototype.__createSimpleEvent = function(type) { - if (document.createEvent && window.Event) { - var event = document.createEvent("Event"); - event.initEvent(type, false, false); - return event; - } else { - return {type: type, bubbles: false, cancelable: false}; - } - }; - - WebSocket.prototype.__createMessageEvent = function(type, data) { - if (document.createEvent && window.MessageEvent && !window.opera) { - var event = document.createEvent("MessageEvent"); - event.initMessageEvent("message", false, false, data, null, null, window, null); - return event; - } else { - // IE and Opera, the latter one truncates the data parameter after any 0x00 bytes. - return {type: type, data: data, bubbles: false, cancelable: false}; - } - }; - - /** - * Define the WebSocket readyState enumeration. - */ - WebSocket.CONNECTING = 0; - WebSocket.OPEN = 1; - WebSocket.CLOSING = 2; - WebSocket.CLOSED = 3; - - WebSocket.__flash = null; - WebSocket.__instances = {}; - WebSocket.__tasks = []; - WebSocket.__nextId = 0; - - /** - * Load a new flash security policy file. - * @param {string} url - */ - WebSocket.loadFlashPolicyFile = function(url){ - WebSocket.__addTask(function() { - WebSocket.__flash.loadManualPolicyFile(url); - }); - }; - - /** - * Loads WebSocketMain.swf and creates WebSocketMain object in Flash. - */ - WebSocket.__initialize = function() { - if (WebSocket.__flash) return; - - if (WebSocket.__swfLocation) { - // For backword compatibility. - window.WEB_SOCKET_SWF_LOCATION = WebSocket.__swfLocation; - } - if (!window.WEB_SOCKET_SWF_LOCATION) { - console.error("[WebSocket] set WEB_SOCKET_SWF_LOCATION to location of WebSocketMain.swf"); - return; - } - var container = document.createElement("div"); - container.id = "webSocketContainer"; - // Hides Flash box. We cannot use display: none or visibility: hidden because it prevents - // Flash from loading at least in IE. So we move it out of the screen at (-100, -100). - // But this even doesn't work with Flash Lite (e.g. in Droid Incredible). So with Flash - // Lite, we put it at (0, 0). This shows 1x1 box visible at left-top corner but this is - // the best we can do as far as we know now. - container.style.position = "absolute"; - if (WebSocket.__isFlashLite()) { - container.style.left = "0px"; - container.style.top = "0px"; - } else { - container.style.left = "-100px"; - container.style.top = "-100px"; - } - var holder = document.createElement("div"); - holder.id = "webSocketFlash"; - container.appendChild(holder); - document.body.appendChild(container); - // See this article for hasPriority: - // http://help.adobe.com/en_US/as3/mobile/WS4bebcd66a74275c36cfb8137124318eebc6-7ffd.html - swfobject.embedSWF( - WEB_SOCKET_SWF_LOCATION, - "webSocketFlash", - "1" /* width */, - "1" /* height */, - "10.0.0" /* SWF version */, - null, - null, - {hasPriority: true, swliveconnect : true, allowScriptAccess: "always"}, - null, - function(e) { - if (!e.success) { - console.error("[WebSocket] swfobject.embedSWF failed"); - } - }); - }; - - /** - * Called by Flash to notify JS that it's fully loaded and ready - * for communication. - */ - WebSocket.__onFlashInitialized = function() { - // We need to set a timeout here to avoid round-trip calls - // to flash during the initialization process. - setTimeout(function() { - WebSocket.__flash = document.getElementById("webSocketFlash"); - WebSocket.__flash.setCallerUrl(location.href); - WebSocket.__flash.setDebug(!!window.WEB_SOCKET_DEBUG); - for (var i = 0; i < WebSocket.__tasks.length; ++i) { - WebSocket.__tasks[i](); - } - WebSocket.__tasks = []; - }, 0); - }; - - /** - * Called by Flash to notify WebSockets events are fired. - */ - WebSocket.__onFlashEvent = function() { - setTimeout(function() { - try { - // Gets events using receiveEvents() instead of getting it from event object - // of Flash event. This is to make sure to keep message order. - // It seems sometimes Flash events don't arrive in the same order as they are sent. - var events = WebSocket.__flash.receiveEvents(); - for (var i = 0; i < events.length; ++i) { - WebSocket.__instances[events[i].webSocketId].__handleEvent(events[i]); - } - } catch (e) { - console.error(e); - } - }, 0); - return true; - }; - - // Called by Flash. - WebSocket.__log = function(message) { - console.log(decodeURIComponent(message)); - }; - - // Called by Flash. - WebSocket.__error = function(message) { - console.error(decodeURIComponent(message)); - }; - - WebSocket.__addTask = function(task) { - if (WebSocket.__flash) { - task(); - } else { - WebSocket.__tasks.push(task); - } - }; - - /** - * Test if the browser is running flash lite. - * @return {boolean} True if flash lite is running, false otherwise. - */ - WebSocket.__isFlashLite = function() { - if (!window.navigator || !window.navigator.mimeTypes) { - return false; - } - var mimeType = window.navigator.mimeTypes["application/x-shockwave-flash"]; - if (!mimeType || !mimeType.enabledPlugin || !mimeType.enabledPlugin.filename) { - return false; - } - return mimeType.enabledPlugin.filename.match(/flashlite/i) ? true : false; - }; - - if (!window.WEB_SOCKET_DISABLE_AUTO_INITIALIZATION) { - if (window.addEventListener) { - window.addEventListener("load", function(){ - WebSocket.__initialize(); - }, false); - } else { - window.attachEvent("onload", function(){ - WebSocket.__initialize(); - }); - } - } - -})(); - -/** - * socket.io - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (exports, io, global) { - - /** - * Expose constructor. - * - * @api public - */ - - exports.XHR = XHR; - - /** - * XHR constructor - * - * @costructor - * @api public - */ - - function XHR (socket) { - if (!socket) return; - - io.Transport.apply(this, arguments); - this.sendBuffer = []; - }; - - /** - * Inherits from Transport. - */ - - io.util.inherit(XHR, io.Transport); - - /** - * Establish a connection - * - * @returns {Transport} - * @api public - */ - - XHR.prototype.open = function () { - this.socket.setBuffer(false); - this.onOpen(); - this.get(); - - // we need to make sure the request succeeds since we have no indication - // whether the request opened or not until it succeeded. - this.setCloseTimeout(); - - return this; - }; - - /** - * Check if we need to send data to the Socket.IO server, if we have data in our - * buffer we encode it and forward it to the `post` method. - * - * @api private - */ - - XHR.prototype.payload = function (payload) { - var msgs = []; - - for (var i = 0, l = payload.length; i < l; i++) { - msgs.push(io.parser.encodePacket(payload[i])); - } - - this.send(io.parser.encodePayload(msgs)); - }; - - /** - * Send data to the Socket.IO server. - * - * @param data The message - * @returns {Transport} - * @api public - */ - - XHR.prototype.send = function (data) { - this.post(data); - return this; - }; - - /** - * Posts a encoded message to the Socket.IO server. - * - * @param {String} data A encoded message. - * @api private - */ - - function empty () { }; - - XHR.prototype.post = function (data) { - var self = this; - this.socket.setBuffer(true); - - function stateChange () { - if (this.readyState == 4) { - this.onreadystatechange = empty; - self.posting = false; - - if (this.status == 200){ - self.socket.setBuffer(false); - } else { - self.onClose(); - } - } - } - - function onload () { - this.onload = empty; - self.socket.setBuffer(false); - }; - - this.sendXHR = this.request('POST'); - - if (global.XDomainRequest && this.sendXHR instanceof XDomainRequest) { - this.sendXHR.onload = this.sendXHR.onerror = onload; - } else { - this.sendXHR.onreadystatechange = stateChange; - } - - this.sendXHR.send(data); - }; - - /** - * Disconnects the established `XHR` connection. - * - * @returns {Transport} - * @api public - */ - - XHR.prototype.close = function () { - this.onClose(); - return this; - }; - - /** - * Generates a configured XHR request - * - * @param {String} url The url that needs to be requested. - * @param {String} method The method the request should use. - * @returns {XMLHttpRequest} - * @api private - */ - - XHR.prototype.request = function (method) { - var req = io.util.request(this.socket.isXDomain()) - , query = io.util.query(this.socket.options.query, 't=' + +new Date); - - req.open(method || 'GET', this.prepareUrl() + query, true); - - if (method == 'POST') { - try { - if (req.setRequestHeader) { - req.setRequestHeader('Content-type', 'text/plain;charset=UTF-8'); - } else { - // XDomainRequest - req.contentType = 'text/plain'; - } - } catch (e) {} - } - - return req; - }; - - /** - * Returns the scheme to use for the transport URLs. - * - * @api private - */ - - XHR.prototype.scheme = function () { - return this.socket.options.secure ? 'https' : 'http'; - }; - - /** - * Check if the XHR transports are supported - * - * @param {Boolean} xdomain Check if we support cross domain requests. - * @returns {Boolean} - * @api public - */ - - XHR.check = function (socket, xdomain) { - try { - var request = io.util.request(xdomain), - usesXDomReq = (global.XDomainRequest && request instanceof XDomainRequest), - socketProtocol = (socket && socket.options && socket.options.secure ? 'https:' : 'http:'), - isXProtocol = (global.location && socketProtocol != global.location.protocol); - if (request && !(usesXDomReq && isXProtocol)) { - return true; - } - } catch(e) {} - - return false; - }; - - /** - * Check if the XHR transport supports cross domain requests. - * - * @returns {Boolean} - * @api public - */ - - XHR.xdomainCheck = function (socket) { - return XHR.check(socket, true); - }; - -})( - 'undefined' != typeof io ? io.Transport : module.exports - , 'undefined' != typeof io ? io : module.parent.exports - , this -); -/** - * socket.io - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (exports, io) { - - /** - * Expose constructor. - */ - - exports.htmlfile = HTMLFile; - - /** - * The HTMLFile transport creates a `forever iframe` based transport - * for Internet Explorer. Regular forever iframe implementations will - * continuously trigger the browsers buzy indicators. If the forever iframe - * is created inside a `htmlfile` these indicators will not be trigged. - * - * @constructor - * @extends {io.Transport.XHR} - * @api public - */ - - function HTMLFile (socket) { - io.Transport.XHR.apply(this, arguments); - }; - - /** - * Inherits from XHR transport. - */ - - io.util.inherit(HTMLFile, io.Transport.XHR); - - /** - * Transport name - * - * @api public - */ - - HTMLFile.prototype.name = 'htmlfile'; - - /** - * Creates a new Ac...eX `htmlfile` with a forever loading iframe - * that can be used to listen to messages. Inside the generated - * `htmlfile` a reference will be made to the HTMLFile transport. - * - * @api private - */ - - HTMLFile.prototype.get = function () { - this.doc = new window[(['Active'].concat('Object').join('X'))]('htmlfile'); - this.doc.open(); - this.doc.write(''); - this.doc.close(); - this.doc.parentWindow.s = this; - - var iframeC = this.doc.createElement('div'); - iframeC.className = 'socketio'; - - this.doc.body.appendChild(iframeC); - this.iframe = this.doc.createElement('iframe'); - - iframeC.appendChild(this.iframe); - - var self = this - , query = io.util.query(this.socket.options.query, 't='+ +new Date); - - this.iframe.src = this.prepareUrl() + query; - - io.util.on(window, 'unload', function () { - self.destroy(); - }); - }; - - /** - * The Socket.IO server will write script tags inside the forever - * iframe, this function will be used as callback for the incoming - * information. - * - * @param {String} data The message - * @param {document} doc Reference to the context - * @api private - */ - - HTMLFile.prototype._ = function (data, doc) { - this.onData(data); - try { - var script = doc.getElementsByTagName('script')[0]; - script.parentNode.removeChild(script); - } catch (e) { } - }; - - /** - * Destroy the established connection, iframe and `htmlfile`. - * And calls the `CollectGarbage` function of Internet Explorer - * to release the memory. - * - * @api private - */ - - HTMLFile.prototype.destroy = function () { - if (this.iframe){ - try { - this.iframe.src = 'about:blank'; - } catch(e){} - - this.doc = null; - this.iframe.parentNode.removeChild(this.iframe); - this.iframe = null; - - CollectGarbage(); - } - }; - - /** - * Disconnects the established connection. - * - * @returns {Transport} Chaining. - * @api public - */ - - HTMLFile.prototype.close = function () { - this.destroy(); - return io.Transport.XHR.prototype.close.call(this); - }; - - /** - * Checks if the browser supports this transport. The browser - * must have an `Ac...eXObject` implementation. - * - * @return {Boolean} - * @api public - */ - - HTMLFile.check = function (socket) { - if (typeof window != "undefined" && (['Active'].concat('Object').join('X')) in window){ - try { - var a = new window[(['Active'].concat('Object').join('X'))]('htmlfile'); - return a && io.Transport.XHR.check(socket); - } catch(e){} - } - return false; - }; - - /** - * Check if cross domain requests are supported. - * - * @returns {Boolean} - * @api public - */ - - HTMLFile.xdomainCheck = function () { - // we can probably do handling for sub-domains, we should - // test that it's cross domain but a subdomain here - return false; - }; - - /** - * Add the transport to your public io.transports array. - * - * @api private - */ - - io.transports.push('htmlfile'); - -})( - 'undefined' != typeof io ? io.Transport : module.exports - , 'undefined' != typeof io ? io : module.parent.exports -); - -/** - * socket.io - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (exports, io, global) { - - /** - * Expose constructor. - */ - - exports['xhr-polling'] = XHRPolling; - - /** - * The XHR-polling transport uses long polling XHR requests to create a - * "persistent" connection with the server. - * - * @constructor - * @api public - */ - - function XHRPolling () { - io.Transport.XHR.apply(this, arguments); - }; - - /** - * Inherits from XHR transport. - */ - - io.util.inherit(XHRPolling, io.Transport.XHR); - - /** - * Merge the properties from XHR transport - */ - - io.util.merge(XHRPolling, io.Transport.XHR); - - /** - * Transport name - * - * @api public - */ - - XHRPolling.prototype.name = 'xhr-polling'; - - /** - * Indicates whether heartbeats is enabled for this transport - * - * @api private - */ - - XHRPolling.prototype.heartbeats = function () { - return false; - }; - - /** - * Establish a connection, for iPhone and Android this will be done once the page - * is loaded. - * - * @returns {Transport} Chaining. - * @api public - */ - - XHRPolling.prototype.open = function () { - var self = this; - - io.Transport.XHR.prototype.open.call(self); - return false; - }; - - /** - * Starts a XHR request to wait for incoming messages. - * - * @api private - */ - - function empty () {}; - - XHRPolling.prototype.get = function () { - if (!this.isOpen) return; - - var self = this; - - function stateChange () { - if (this.readyState == 4) { - this.onreadystatechange = empty; - - if (this.status == 200) { - self.onData(this.responseText); - self.get(); - } else { - self.onClose(); - } - } - }; - - function onload () { - this.onload = empty; - this.onerror = empty; - self.retryCounter = 1; - self.onData(this.responseText); - self.get(); - }; - - function onerror () { - self.retryCounter ++; - if(!self.retryCounter || self.retryCounter > 3) { - self.onClose(); - } else { - self.get(); - } - }; - - this.xhr = this.request(); - - if (global.XDomainRequest && this.xhr instanceof XDomainRequest) { - this.xhr.onload = onload; - this.xhr.onerror = onerror; - } else { - this.xhr.onreadystatechange = stateChange; - } - - this.xhr.send(null); - }; - - /** - * Handle the unclean close behavior. - * - * @api private - */ - - XHRPolling.prototype.onClose = function () { - io.Transport.XHR.prototype.onClose.call(this); - - if (this.xhr) { - this.xhr.onreadystatechange = this.xhr.onload = this.xhr.onerror = empty; - try { - this.xhr.abort(); - } catch(e){} - this.xhr = null; - } - }; - - /** - * Webkit based browsers show a infinit spinner when you start a XHR request - * before the browsers onload event is called so we need to defer opening of - * the transport until the onload event is called. Wrapping the cb in our - * defer method solve this. - * - * @param {Socket} socket The socket instance that needs a transport - * @param {Function} fn The callback - * @api private - */ - - XHRPolling.prototype.ready = function (socket, fn) { - var self = this; - - io.util.defer(function () { - fn.call(self); - }); - }; - - /** - * Add the transport to your public io.transports array. - * - * @api private - */ - - io.transports.push('xhr-polling'); - -})( - 'undefined' != typeof io ? io.Transport : module.exports - , 'undefined' != typeof io ? io : module.parent.exports - , this -); - -/** - * socket.io - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (exports, io, global) { - /** - * There is a way to hide the loading indicator in Firefox. If you create and - * remove a iframe it will stop showing the current loading indicator. - * Unfortunately we can't feature detect that and UA sniffing is evil. - * - * @api private - */ - - var indicator = global.document && "MozAppearance" in - global.document.documentElement.style; - - /** - * Expose constructor. - */ - - exports['jsonp-polling'] = JSONPPolling; - - /** - * The JSONP transport creates an persistent connection by dynamically - * inserting a script tag in the page. This script tag will receive the - * information of the Socket.IO server. When new information is received - * it creates a new script tag for the new data stream. - * - * @constructor - * @extends {io.Transport.xhr-polling} - * @api public - */ - - function JSONPPolling (socket) { - io.Transport['xhr-polling'].apply(this, arguments); - - this.index = io.j.length; - - var self = this; - - io.j.push(function (msg) { - self._(msg); - }); - }; - - /** - * Inherits from XHR polling transport. - */ - - io.util.inherit(JSONPPolling, io.Transport['xhr-polling']); - - /** - * Transport name - * - * @api public - */ - - JSONPPolling.prototype.name = 'jsonp-polling'; - - /** - * Posts a encoded message to the Socket.IO server using an iframe. - * The iframe is used because script tags can create POST based requests. - * The iframe is positioned outside of the view so the user does not - * notice it's existence. - * - * @param {String} data A encoded message. - * @api private - */ - - JSONPPolling.prototype.post = function (data) { - var self = this - , query = io.util.query( - this.socket.options.query - , 't='+ (+new Date) + '&i=' + this.index - ); - - if (!this.form) { - var form = document.createElement('form') - , area = document.createElement('textarea') - , id = this.iframeId = 'socketio_iframe_' + this.index - , iframe; - - form.className = 'socketio'; - form.style.position = 'absolute'; - form.style.top = '0px'; - form.style.left = '0px'; - form.style.display = 'none'; - form.target = id; - form.method = 'POST'; - form.setAttribute('accept-charset', 'utf-8'); - area.name = 'd'; - form.appendChild(area); - document.body.appendChild(form); - - this.form = form; - this.area = area; - } - - this.form.action = this.prepareUrl() + query; - - function complete () { - initIframe(); - self.socket.setBuffer(false); - }; - - function initIframe () { - if (self.iframe) { - self.form.removeChild(self.iframe); - } - - try { - // ie6 dynamic iframes with target="" support (thanks Chris Lambacher) - iframe = document.createElement(''; -html += '

    '; -html += '
    '; -html += '
    Upload File
    '; -html += '
    Want to upload multiple files at once? Please upgrade to the latest Flash Player, then reload this page. For some reason our Flash based uploader did not load, so you are currently using our single file uploader.
    '; -html += spacer(1,20) + '
    '; -var url = zero_client.targetURL; -if (url.indexOf('?') > -1) url += '&'; else url += '?'; -url += 'format=jshtml&onafter=' + escape('window.parent.upload_basic_finish(response);'); -Debug.trace('upload', "Prepping basic upload: " + url); -html += '
    '; -html += '
    '; -html += '
    '; -html += '

    '; -html += ''; -html += ''; -html += ''; -html += '
    ' + large_icon_button('x', 'Cancel', "hide_popup_dialog()") + ' ' + large_icon_button('page_white_get.png', 'Upload', "upload_basic_go()") + '
    '; -html += '
    '; -html += ''; -html += '
    '; -html += ''; -session.hooks.keys[ESC_KEY] = 'hide_popup_dialog'; -show_popup_dialog(528, 200, html); -} -function upload_basic_go() { -$('f_upload_basic').submit(); -$('d_upload_form').hide(); -$('d_upload_progress').show(); -} -function upload_basic_finish(response) { -Debug.trace('upload', "Basic upload complete: " + dumper(response)); -setTimeout( 'upload_basic_finish_2()', 100 ); -} -function upload_basic_finish_2() { -$('i_upload_basic').src = 'blank.html'; -setTimeout( 'upload_basic_finish_3()', 100 ); -} -function upload_basic_finish_3() { -hide_popup_dialog(); -delete session.progress; -show_progress_dialog( 0, 'Finishing Upload...', true ); -fire_callback( session.upload_callback ); -} -function upload_destroy() { -if (zero_client) { -zero_client.destroy(); -delete ZeroUpload.clients[ zero_client.id ]; -zero_client = null; -} -} -function prep_upload(dom_id, url, callback, types) { -session.upload_callback = callback; -if (url) { -if (url.indexOf('?') > -1) url += '&'; else url += '?'; -url += 'session=' + session.cookie.get('effect_session_id'); -} -upload_destroy(); -zero_client = new ZeroUpload.Client(); -if (url) zero_client.setURL( url ); -zero_client.setHandCursor( true ); -if (types) zero_client.setFileTypes( types[0], types[1] ); -zero_client.addEventListener( 'queueStart', uploadQueueStart ); -zero_client.addEventListener( 'fileStart', uploadFileStart ); -zero_client.addEventListener( 'progress', uploadProgress ); -zero_client.addEventListener( 'fileComplete', uploadFileComplete ); -zero_client.addEventListener( 'queueComplete', uploadQueueComplete ); -zero_client.addEventListener( 'error', uploadError ); -zero_client.addEventListener( 'debug', function(client, eventName, args) { -Debug.trace('upload', "Caught event: " + eventName); -} ); -if (dom_id) { -Debug.trace('upload', "Gluing ZeroUpload to: " + dom_id); -zero_client.glue( dom_id ); -} -} -Class.create( 'Debug', { -__static: { -enabled: false, -categories: { all: 1 }, -buffer: [], -max_rows: 5000, -win: null, -ie: !!navigator.userAgent.match(/MSIE/), -ie6: !!navigator.userAgent.match(/MSIE\D+6/), -init: function() { -Debug.enabled = true; -Debug.trace( 'debug', 'Debug log start' ); -var html = '

    '; -if (Debug.ie) { -setTimeout( function() { -document.body.insertAdjacentHTML('beforeEnd', -'
    ' + html + '
    ' -); -}, 1000 ); -} -else { -var div = document.createElement('DIV'); -div.id = 'd_debug'; -div.setAttribute('id', 'd_debug'); -div.style.position = Debug.ie6 ? 'absolute' : 'fixed'; -div.style.zIndex = '101'; -div.style.left = '0px'; -div.style.top = '0px'; -div.style.width = '100%'; -div.innerHTML = html; -document.getElementsByTagName('body')[0].appendChild(div); -} -}, -show: function() { -if (!Debug.win || Debug.win.closed) { -Debug.trace('debug', "Opening debug window"); -Debug.win = window.open( '', 'DebugWindow', 'width=600,height=500,menubar=no,resizable=yes,scrollbars=yes,location=no,status=no,toolbar=no,directories=no' ); -if (!Debug.win) return alert("Failed to open window. Popup blocker maybe?"); -var doc = Debug.win.document; -doc.open(); -doc.writeln( 'Debug Log' ); -doc.writeln( '
    ' ); -doc.writeln( '
    ' ); -doc.writeln( '
    ' ); -doc.writeln( '' ); -doc.writeln( '' ); -doc.writeln( '
    ' ); -doc.writeln( '' ); -doc.close(); -} -Debug.win.focus(); -}, -console_execute: function() { -var cmd = Debug.win.document.getElementById('fe_command'); -if (cmd.value.length) { -Debug.trace( 'console', cmd.value ); -try { -Debug.trace( 'console', '' + eval(cmd.value) ); -} -catch (e) { -Debug.trace( 'error', 'JavaScript Interpreter Exception: ' + e.toString() ); -} -} -}, -get_time_stamp: function(now) { -var date = new Date( now * 1000 ); -var hh = date.getHours(); if (hh < 10) hh = "0" + hh; -var mi = date.getMinutes(); if (mi < 10) mi = "0" + mi; -var ss = date.getSeconds(); if (ss < 10) ss = "0" + ss; -var sss = '' + date.getMilliseconds(); while (sss.length < 3) sss = "0" + sss; -return '' + hh + ':' + mi + ':' + ss + '.' + sss; -}, -refresh_console: function() { -if (!Debug.win || Debug.win.closed) return; -var div = Debug.win.document.getElementById('d_debug_log'); -if (div) { -var row = null; -while ( row = Debug.buffer.shift() ) { -var time_stamp = Debug.get_time_stamp(row.time); -var msg = row.msg; -msg = msg.replace(/\t/g, "    "); -msg = msg.replace(//g, ">"); -msg = msg.replace(/\n/g, "
    \n"); -var html = ''; -var sty = 'float:left; font-family: Consolas, Courier, mono; font-size: 12px; cursor:default; margin-right:10px; margin-bottom:1px; padding:2px;'; -html += '
    ' + time_stamp + '
    '; -html += '
    ' + row.cat + '
    '; -html += '
    ' + msg + '
    '; -html += '
    '; -var chunk = Debug.win.document.createElement('DIV'); -chunk.style['float'] = 'none'; -chunk.innerHTML = html; -div.appendChild(chunk); -} -var cmd = Debug.win.document.getElementById('fe_command'); -cmd.focus(); -} -Debug.dirty = 0; -Debug.win.scrollTo(0, 99999); -}, -hires_time_now: function() { -var now = new Date(); -return ( now.getTime() / 1000 ); -}, -trace: function(cat, msg) { -if (arguments.length == 1) { -msg = cat; -cat = 'debug'; -} -if (Debug.categories.all || Debug.categories[cat]) { -Debug.buffer.push({ cat: cat, msg: msg, time: Debug.hires_time_now() }); -if (Debug.buffer.length > Debug.max_rows) Debug.buffer.shift(); -if (!Debug.dirty) { -Debug.dirty = 1; -setTimeout( 'Debug.refresh_console();', 1 ); -} -} -} -} -} ); -var session = { -inited: false, -api_mod_cache: {}, -query: parseQueryString( ''+location.search ), -cookie: new CookieTree({ path: '/effect/' }), -storage: {}, -storage_dirty: false, -hooks: { -keys: {} -}, -username: '', -em_width: 11, -audioResourceMatch: /\.mp3$/i, -imageResourceMatch: /\.(jpe|jpeg|jpg|png|gif)$/i, -textResourceMatch: /\.xml$/i, -movieResourceMatch: /\.(flv|mp4|mp4v|mov|3gp|3g2)$/i, -imageResourceMatchString: '\.(jpe|jpeg|jpg|png|gif)$' -}; -session.debug = session.query.debug ? true : false; -var page_manager = null; -var preload_icons = []; -var preload_images = [ -'loading.gif', -'aquaprogressbar.gif', -'aquaprogressbar_bkgnd.gif' -]; -function get_base_url() { -return protocol + '://' + location.hostname + session.config.BaseURI; -} -function effect_init() { -if (session.inited) return; -session.inited = true; -assert( window.config, "Config not loaded" ); -session.config = window.config; -Debug.trace("Starting up"); -rendering_page = false; -preload(); -window.$R = {}; -for (var key in config.RegExpShortcuts) { -$R[key] = new RegExp( config.RegExpShortcuts[key] ); -} -ww_precalc_font("body", "effect_precalc_font_finish"); -page_manager = new Effect.PageManager( config.Pages.Page ); -var session_id = session.cookie.get('effect_session_id'); -if (session_id && session_id.match(/^login/)) { -do_session_recover(); -} -else { -show_default_login_status(); -Nav.init(); -} -Blog.search({ -stag: 'sidebar_docs', -limit: 20, -title_only: true, -sort_by: 'seq', -sort_dir: -1, -target: 'd_sidebar_documents', -outer_div_class: 'sidebar_blog_row', -title_class: 'sidebar_blog_title', -after: '' -}); -Blog.search({ -stag: 'sidebar_tutorials', -limit: 5, -title_only: true, -sort_by: 'seq', -sort_dir: -1, -target: 'd_sidebar_tutorials', -outer_div_class: 'sidebar_blog_row', -title_class: 'sidebar_blog_title', -after: '' -}); -Blog.search({ -stag: 'sidebar_plugins', -limit: 5, -title_only: true, -sort_by: 'seq', -sort_dir: -1, -target: 'd_sidebar_plugins', -outer_div_class: 'sidebar_blog_row', -title_class: 'sidebar_blog_title', -after: '' -}); -$('fe_search_bar').onkeydown = delay_onChange_input_text; -user_storage_idle(); -} -function effect_precalc_font_finish(width, height) { -session.em_width = width; -} -function preload() { -for (var idx = 0, len = preload_icons.length; idx < len; idx++) { -var url = images_uri + '/icons/' + preload_icons[idx] + '.gif'; -preload_icons[idx] = new Image(); -preload_icons[idx].src = url; -} -for (var idx = 0, len = preload_images.length; idx < len; idx++) { -var url = images_uri + '/' + preload_images[idx]; -preload_images[idx] = new Image(); -preload_images[idx].src = url; -} -} -function $P(id) { -if (!id) id = page_manager.current_page_id; -var page = page_manager.find(id); -assert( !!page, "Failed to locate page: " + id ); -return page; -} -function get_pref(name) { -if (!session.user || !session.user.Preferences) return alert("ASSERT FAILURE! Tried to lookup pref " + name + " and user is not yet loaded!"); -return session.user.Preferences[name]; -} -function get_bool_pref(name) { -return (get_pref(name) == 1); -} -function set_pref(name, value) { -session.user.Preferences[name] = value; -} -function set_bool_pref(name, value) { -set_pref(name, value ? '1' : '0'); -} -function save_prefs() { -var prefs_to_save = {}; -if (arguments.length) { -for (var idx = 0, len = arguments.length; idx < len; idx++) { -var key = arguments[idx]; -prefs_to_save[key] = get_pref(key); -} -} -else prefs_to_save = session.user.Preferences; -effect_api_mod_touch('user_get'); -effect_api_send('user_update', { -Username: session.username, -Preferences: prefs_to_save -}, 'save_prefs_2'); -} -function save_prefs_2(response) { -do_message('success', 'Preferences saved.'); -} - -function get_full_name(username) { -var user = session.users[username]; -if (!user) return username; -return user.FullName; -} -function get_buddy_icon_url(username, size) { -var mod = session.api_mod_cache.get_buddy_icon || 0; -if (!size) size = 32; -var url = '/effect/api/get_buddy_icon?username='+username + '&mod=' + mod + '&size=' + size; -return url; -} -function get_buddy_icon_display(username, show_icon, show_name) { -if ((typeof(show_icon) == 'undefined') && get_bool_pref('show_user_icons')) show_icon = 1; -if ((typeof(show_name) == 'undefined') && get_bool_pref('show_user_names')) show_name = 1; -var html = ''; -if (show_icon) html += ''; -if (show_icon && show_name) html += '
    '; -if (show_name) html += username; -return html; -} -function do_session_recover() { -session.hooks.after_error = 'do_logout'; -effect_api_send('session_recover', {}, 'do_login_2', { _from_recover: 1 } ); -} -function require_login() { -if (session.user) return true; -Debug.trace('Page requires login, showing login page'); -session.nav_after_login = Nav.currentAnchor(); -setTimeout( function() { -Nav.go( 'Login' ); -}, 1 ); -return false; -} -function popup_window(url, name) { -if (!url) url = ''; -if (!name) name = ''; -var win = window.open(url, name); -if (!win) return alert('Failed to open popup window. If you have a popup blocker, please disable it for this website and try again.'); -return win; -} -function do_login_prompt() { -hide_popup_dialog(); -delete session.progress; -if (!session.temp_password) session.temp_password = ''; -if (!session.username) session.username = ''; -var temp_username = session.open_id || session.username || ''; -var html = ''; -html += '
    '; -html += '
    '; -html += '
    Effect Developer Login
    '; -html += '
    '; -html += '
    Effect Username  or  '+icon('openid', 'OpenID', 'popup_window(\'http://openid.net/\')', 'What is OpenID?')+'


    '; -html += '
    '; -html += '
    '; -html += '

    '; -html += ''; -html += ''; -html += ''; -html += '
    ' + large_icon_button('x', 'Cancel', "clear_login()") + ' ' + large_icon_button('check', 'Login', 'do_login()') + '
    '; -html += '
    '; -html += ''; -session.hooks.keys[ENTER_KEY] = 'do_login'; -session.hooks.keys[ESC_KEY] = 'clear_login'; -safe_focus( 'fe_username' ); -show_popup_dialog(450, 225, html); -} -function do_openid_reg(title, auto_login_button) { -hide_popup_dialog(); -delete session.progress; -if (!title) title = 'Register Account Using OpenID'; -if (typeof(auto_login_button) == 'undefined') auto_login_button = 1; -var html = ''; -html += '
    '; -html += '
    '; -html += '
    '+title+'
    '; -html += '
    '; -html += '
    '+icon('openid', 'Enter Your OpenID URL:')+'
    '; -if (auto_login_button) html += '


    '; -html += '
    '; -html += '

    '; -html += ''; -html += ''; -html += ''; -html += '
    ' + large_icon_button('x', 'Cancel', "hide_popup_dialog()") + ' ' + large_icon_button('check', title.match(/login/i) ? 'Login' : 'Register', 'do_openid_login()') + '
    '; -html += '
    '; -html += ''; -session.hooks.keys[ENTER_KEY] = 'do_openid_login'; -session.hooks.keys[ESC_KEY] = 'hide_popup_dialog'; -safe_focus( 'fe_username' ); -show_popup_dialog(450, 225, html); -} -function do_login_prompt_2() { -hide_popup_dialog(); -delete session.progress; -if (!session.temp_password) session.temp_password = ''; -if (!session.username) session.username = ''; -var html = ''; -html += '
    '; -html += '"; - second_cell = ""; - row = $("").attr("id", "s" + index).attr("class", "location_row").html(first_cell + second_cell); - $locationsDiv.append(row); - } - if (index === this.numSearchToDisplay) { - $locationsDiv.append(""); - return $locationsDiv.append(""); - } - }, this); - return this.geocoder.geocode({ - address: address - }, __bind(function(result, status) { - if (status !== "OK") { - $('.error_message').html(t("Search Address Failed")).fadeIn(); - return; - } - _.each(result, showResults); - $("#search_results").html($locationsDiv); - this.locationChange("search"); - this.searchResults = result; - return this.displaySearchLoc(); - }, this)); - }; - ClientsRequestView.prototype.mouseoverLocation = function(e) { - var $el, id, marker; - $el = $(e.currentTarget); - id = $el.attr("id").substring(1); - marker = this.markers[id]; - return marker.setAnimation(google.maps.Animation.BOUNCE); - }; - ClientsRequestView.prototype.mouseoutLocation = function(e) { - var $el, id, marker; - $el = $(e.currentTarget); - id = $el.attr("id").substring(1); - marker = this.markers[id]; - return marker.setAnimation(null); - }; - ClientsRequestView.prototype.searchLocation = function(e) { - e.preventDefault(); - $("#address").val($(e.currentTarget).html()); - return this.searchAddress(); - }; - ClientsRequestView.prototype.favoriteClick = function(e) { - var index, location; - e.preventDefault(); - $(".favorites").attr("href", ""); - index = $(e.currentTarget).removeAttr("href").attr("id"); - location = new google.maps.LatLng(USER.locations[index].latitude, USER.locations[index].longitude); - return this.panToLocation(location); - }; - ClientsRequestView.prototype.clickLocation = function(e) { - var id; - id = $(e.currentTarget).attr("id").substring(1); - return this.panToLocation(this.markers[id].getPosition()); - }; - ClientsRequestView.prototype.panToLocation = function(location) { - this.map.panTo(location); - this.map.setZoom(16); - return this.pickup_icon.setPosition(location); - }; - ClientsRequestView.prototype.locationLinkHandle = function(e) { - var panelName; - e.preventDefault(); - panelName = $(e.currentTarget).attr("id"); - return this.locationChange(panelName); - }; - ClientsRequestView.prototype.locationChange = function(type) { - $(".locations_link").attr("href", "").css("font-weight", "normal"); - switch (type) { - case "favorite": - $(".search_results").attr("href", ""); - $(".locations_link#favorite").removeAttr("href").css("font-weight", "bold"); - $("#search_results").hide(); - $("#favorite_results").fadeIn(); - return this.displayFavLoc(); - case "search": - $(".favorites").attr("href", ""); - $(".locations_link#search").removeAttr("href").css("font-weight", "bold"); - $("#favorite_results").hide(); - $("#search_results").fadeIn(); - return this.displaySearchLoc(); - } - }; - ClientsRequestView.prototype.rateTrip = function(e) { - var rating; - rating = $(e.currentTarget).attr("id"); - $(".stars").attr("src", "/web/img/star_inactive.png"); - return _(rating).times(function(index) { - return $(".stars#" + (index + 1)).attr("src", "/web/img/star_active.png"); - }); - }; - ClientsRequestView.prototype.pickupHandle = function(e) { - var $el, callback, message; - e.preventDefault(); - $el = $(e.currentTarget).find("span"); - switch ($el.html()) { - case t("Request Pickup"): - _.delay(this.requestRide, 3000); - $("#status_message").html(t("Sending pickup request...")); - $el.html(t("Cancel Pickup")).parent().attr("class", "button_red"); - this.pickup_icon.setDraggable(false); - this.map.panTo(this.pickup_icon.getPosition()); - return this.map.setZoom(18); - case t("Cancel Pickup"): - if (this.status === "ready") { - $el.html(t("Request Pickup")).parent().attr("class", "button_green"); - return this.pickup_icon.setDraggable(true); - } else { - callback = __bind(function(v, m, f) { - if (v) { - this.AskDispatch("PickupCanceledClient"); - return this.setStatus("ready"); - } - }, this); - message = t("Cancel Request Prompt"); - if (this.status === "arriving") { - message = 'Cancel Request Arrived Prompt'; - } - return $.prompt(message, { - buttons: { - Ok: true, - Cancel: false - }, - callback: callback - }); - } - } - }; - ClientsRequestView.prototype.requestRide = function() { - if ($("#pickupHandle").find("span").html() === t("Cancel Pickup")) { - this.AskDispatch("Pickup"); - return this.setStatus("searching"); - } - }; - ClientsRequestView.prototype.removeCabs = function() { - _.each(this.cabs, __bind(function(point) { - return point.setMap(null); - }, this)); - return this.cabs = []; - }; - ClientsRequestView.prototype.addToFavLoc = function(e) { - var $el, lat, lng, nickname; - e.preventDefault(); - $el = $(e.currentTarget); - $el.find(".error_message").html(""); - nickname = $el.find("#favLocNickname").val().toString(); - lat = $el.find("#pickupLat").val().toString(); - lng = $el.find("#pickupLng").val().toString(); - if (nickname.length < 3) { - $el.find(".error_message").html(t("Favorite Location Nickname Length Error")); - return; - } - this.ShowSpinner("submit"); - return $.ajax({ - type: 'POST', - url: API + "/locations", - dataType: 'json', - data: { - token: USER.token, - nickname: nickname, - latitude: lat, - longitude: lng - }, - success: __bind(function(data, textStatus, jqXHR) { - return $el.html(t("Favorite Location Save Succeeded")); - }, this), - error: __bind(function(jqXHR, textStatus, errorThrown) { - return $el.find(".error_message").html(t("Favorite Location Save Failed")); - }, this), - complete: __bind(function(data) { - return this.HideSpinner(); - }, this) - }); - }; - ClientsRequestView.prototype.showFavLoc = function(e) { - $(e.currentTarget).fadeOut(); - return $("#favLoc_form").fadeIn(); - }; - ClientsRequestView.prototype.selectInputText = function(e) { - e.currentTarget.focus(); - return e.currentTarget.select(); - }; - ClientsRequestView.prototype.displayFavLoc = function() { - var alphabet, bounds; - alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - this.removeMarkers(); - bounds = new google.maps.LatLngBounds(); - _.each(USER.locations, __bind(function(location, index) { - var marker; - marker = new google.maps.Marker({ - position: new google.maps.LatLng(location.latitude, location.longitude), - map: this.map, - title: t("Favorite Location Title", { - id: alphabet != null ? alphabet[index] : void 0 - }), - icon: "https://www.google.com/mapfiles/marker" + alphabet[index] + ".png" - }); - this.markers.push(marker); - bounds.extend(marker.getPosition()); - return google.maps.event.addListener(marker, 'click', __bind(function() { - return this.pickup_icon.setPosition(marker.getPosition()); - }, this)); - }, this)); - this.pickup_icon.setPosition(_.first(this.markers).getPosition()); - return this.map.fitBounds(bounds); - }; - ClientsRequestView.prototype.displaySearchLoc = function() { - var alphabet; - alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - this.removeMarkers(); - return _.each(this.searchResults, __bind(function(result, index) { - var marker; - if (index < this.numSearchToDisplay) { - marker = new google.maps.Marker({ - position: result.geometry.location, - map: this.map, - title: t("Search Location Title", { - id: alphabet != null ? alphabet[index] : void 0 - }), - icon: "https://www.google.com/mapfiles/marker" + alphabet[index] + ".png" - }); - this.markers.push(marker); - return this.panToLocation(result.geometry.location); - } - }, this)); - }; - ClientsRequestView.prototype.removeMarkers = function() { - _.each(this.markers, __bind(function(marker) { - return marker.setMap(null); - }, this)); - return this.markers = []; - }; - ClientsRequestView.prototype.AskDispatch = function(ask, options) { - var attrs, lowestETA, processData, showCab; - if (ask == null) { - ask = ""; - } - if (options == null) { - options = {}; - } - switch (ask) { - case "NearestCab": - attrs = { - latitude: this.pickup_icon.getPosition().lat(), - longitude: this.pickup_icon.getPosition().lng() - }; - lowestETA = 99999; - showCab = __bind(function(cab) { - var point; - point = new google.maps.Marker({ - position: new google.maps.LatLng(cab.latitude, cab.longitude), - map: this.map, - icon: this.cabMarker, - title: t("ETA Message", { - minutes: app.helpers.FormatSeconds(cab != null ? cab.eta : void 0, true) - }) - }); - if (cab.eta < lowestETA) { - lowestETA = cab.eta; - } - return this.cabs.push(point); - }, this); - processData = __bind(function(data, textStatus, jqXHR) { - if (this.status === "ready") { - this.removeCabs(); - if (data.sorry) { - $("#status_message").html(data.sorry).fadeIn(); - } else { - _.each(data.driverLocations, showCab); - $("#status_message").html(t("Nearest Cab Message", { - minutes: app.helpers.FormatSeconds(lowestETA, true) - })).fadeIn(); - } - if (Backbone.history.fragment === "!/request") { - return _.delay(this.showCabs, this.pollInterval); - } - } - }, this); - return this.AjaxCall(ask, processData, attrs); - case "StatusClient": - processData = __bind(function(data, textStatus, jqXHR) { - var bounds, cabLocation, locationSaved, point, userLocation; - if (data.messageType === "OK") { - switch (data.status) { - case "completed": - this.removeCabs(); - this.setStatus("rate"); - return this.fetchTripDetails(data.tripID); - case "open": - return this.setStatus("ready"); - case "begintrip": - this.setStatus("riding"); - cabLocation = new google.maps.LatLng(data.latitude, data.longitude); - this.removeCabs(); - this.pickup_icon.setMap(null); - point = new google.maps.Marker({ - position: cabLocation, - map: this.map, - icon: this.cabMarker - }); - this.cabs.push(point); - this.map.panTo(point.getPosition()); - $("#rideName").html(data.driverName); - $("#ridePhone").html(data.driverMobile); - $("#ride_address_wrapper").hide(); - if (Backbone.history.fragment === "!/request") { - return _.delay(this.AskDispatch, this.pollInterval, "StatusClient"); - } - break; - case "pending": - this.setStatus("searching"); - if (Backbone.history.fragment === "!/request") { - return _.delay(this.AskDispatch, this.pollInterval, "StatusClient"); - } - break; - case "accepted": - case "arrived": - if (data.status === "accepted") { - this.setStatus("waiting"); - $("#status_message").html(t("Arrival ETA Message", { - minutes: app.helpers.FormatSeconds(data.eta, true) - })); - } else { - this.setStatus("arriving"); - $("#status_message").html(t("Arriving Now Message")); - } - userLocation = new google.maps.LatLng(data.pickupLocation.latitude, data.pickupLocation.longitude); - cabLocation = new google.maps.LatLng(data.latitude, data.longitude); - this.pickup_icon.setPosition(userLocation); - this.removeCabs(); - $("#rideName").html(data.driverName); - $("#ridePhone").html(data.driverMobile); - if ($("#rideAddress").html() === "") { - locationSaved = false; - _.each(USER.locations, __bind(function(location) { - if (parseFloat(location.latitude) === parseFloat(data.pickupLocation.latitude) && parseFloat(location.longitude) === parseFloat(data.pickupLocation.longitude)) { - return locationSaved = true; - } - }, this)); - if (locationSaved) { - $("#addToFavButton").hide(); - } - $("#pickupLat").val(data.pickupLocation.latitude); - $("#pickupLng").val(data.pickupLocation.longitude); - this.geocoder.geocode({ - location: userLocation - }, __bind(function(result, status) { - $("#rideAddress").html(result[0].formatted_address); - return $("#favLocNickname").val("" + result[0].address_components[0].short_name + " " + result[0].address_components[1].short_name); - }, this)); - } - point = new google.maps.Marker({ - position: cabLocation, - map: this.map, - icon: this.cabMarker - }); - this.cabs.push(point); - bounds = bounds = new google.maps.LatLngBounds(); - bounds.extend(cabLocation); - bounds.extend(userLocation); - this.map.fitBounds(bounds); - if (Backbone.history.fragment === "!/request") { - return _.delay(this.AskDispatch, this.pollInterval, "StatusClient"); - } - } - } - }, this); - return this.AjaxCall(ask, processData); - case "Pickup": - attrs = { - latitude: this.pickup_icon.getPosition().lat(), - longitude: this.pickup_icon.getPosition().lng() - }; - processData = __bind(function(data, textStatus, jqXHR) { - if (data.messageType === "Error") { - return $("#status_message").html(data.description); - } else { - return this.AskDispatch("StatusClient"); - } - }, this); - return this.AjaxCall(ask, processData, attrs); - case "PickupCanceledClient": - processData = __bind(function(data, textStatus, jqXHR) { - if (data.messageType === "OK") { - return this.setStatus("ready"); - } else { - return $("#status_message").html(data.description); - } - }, this); - return this.AjaxCall(ask, processData, attrs); - case "RatingDriver": - attrs = { - rating: options.rating - }; - processData = __bind(function(data, textStatus, jqXHR) { - if (data.messageType === "OK") { - this.setStatus("init"); - } else { - $("status_message").html(t("Rating Driver Failed")); - } - return this.HideSpinner(); - }, this); - return this.AjaxCall(ask, processData, attrs); - case "Feedback": - attrs = { - message: options.message - }; - processData = __bind(function(data, textStatus, jqXHR) { - if (data.messageType === "OK") { - return alert("rated"); - } - }, this); - return this.AjaxCall(ask, processData, attrs); - } - }; - ClientsRequestView.prototype.AjaxCall = function(type, successCallback, attrs) { - if (attrs == null) { - attrs = {}; - } - _.extend(attrs, { - token: USER.token, - messageType: type, - app: "client", - version: "1.0.60", - device: "web" - }); - return $.ajax({ - type: 'POST', - url: DISPATCH + "/", - processData: false, - data: JSON.stringify(attrs), - success: successCallback, - dataType: 'json', - error: __bind(function(jqXHR, textStatus, errorThrown) { - $("#status_message").html(errorThrown); - return this.HideSpinner(); - }, this) - }); - }; - return ClientsRequestView; - })(); -}).call(this); -}, "views/clients/settings": function(exports, require, module) {(function() { - var clientsSettingsTemplate; - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - clientsSettingsTemplate = require('templates/clients/settings'); - exports.ClientsSettingsView = (function() { - __extends(ClientsSettingsView, UberView); - function ClientsSettingsView() { - this.render = __bind(this.render, this); - this.initialize = __bind(this.initialize, this); - ClientsSettingsView.__super__.constructor.apply(this, arguments); - } - ClientsSettingsView.prototype.id = 'settings_view'; - ClientsSettingsView.prototype.className = 'view_container'; - ClientsSettingsView.prototype.events = { - 'submit #profile_pic_form': 'processPicUpload', - 'click #submit_pic': 'processPicUpload', - 'click a.setting_change': "changeTab", - 'submit #edit_info_form': "submitInfo", - 'click #change_password': 'changePass' - }; - ClientsSettingsView.prototype.divs = { - 'info_div': "Information", - 'pic_div': "Picture" - }; - ClientsSettingsView.prototype.pageTitle = t("Settings") + " | " + t("Uber"); - ClientsSettingsView.prototype.tabTitle = { - 'info_div': t("Information"), - 'pic_div': t("Picture") - }; - ClientsSettingsView.prototype.initialize = function() { - return this.mixin(require('web-lib/mixins/i18n_phone_form').i18nPhoneForm); - }; - ClientsSettingsView.prototype.render = function(type) { - if (type == null) { - type = "info"; - } - this.RefreshUserInfo(__bind(function() { - var $el, alphabet; - this.delegateEvents(); - this.HideSpinner(); - alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - $el = $(this.el); - $(this.el).html(clientsSettingsTemplate({ - type: type - })); - $el.find("#" + type + "_div").show(); - $el.find("a[href='" + type + "_div']").parent().addClass("active"); - return document.title = "" + this.tabTitle[type + '_div'] + " " + this.pageTitle; - }, this)); - this.delegateEvents(); - return this; - }; - ClientsSettingsView.prototype.changeTab = function(e) { - var $eTarget, $el, div, link, pageDiv, _i, _j, _len, _len2, _ref, _ref2; - e.preventDefault(); - $eTarget = $(e.currentTarget); - this.ClearGlobalStatus(); - $el = $(this.el); - _ref = $el.find(".setting_change"); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - link = _ref[_i]; - $(link).parent().removeClass("active"); - } - $eTarget.parent().addClass("active"); - _ref2 = _.keys(this.divs); - for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { - div = _ref2[_j]; - $el.find("#" + div).hide(); - } - pageDiv = $eTarget.attr('href'); - $el.find("#" + pageDiv).show(); - Backbone.history.navigate("!/settings/" + (this.divs[pageDiv].toLowerCase().replace(" ", "-")), false); - document.title = "" + this.tabTitle[pageDiv] + " " + this.pageTitle; - if (pageDiv === "loc_div") { - try { - google.maps.event.trigger(this.map, 'resize'); - return this.map.fitBounds(this.bounds); - } catch (_e) {} - } - }; - ClientsSettingsView.prototype.submitInfo = function(e) { - var $e, attrs, client, options; - $('#global_status').find('.success_message').text(''); - $('#global_status').find('.error_message').text(''); - $('.error_message').text(''); - e.preventDefault(); - $e = $(e.currentTarget); - attrs = $e.serializeToJson(); - attrs['mobile_country_id'] = this.$('#mobile_country_id').val(); - if (attrs['password'] === '') { - delete attrs['password']; - } - options = { - success: __bind(function(response) { - this.ShowSuccess(t("Information Update Succeeded")); - return this.RefreshUserInfo(); - }, this), - error: __bind(function(model, data) { - var errors; - if (data.status === 406) { - errors = JSON.parse(data.responseText); - return _.each(_.keys(errors), function(field) { - return $("#" + field).parent().find('span.error_message').text(errors[field]); - }); - } else { - return this.ShowError(t("Information Update Failed")); - } - }, this), - type: "PUT" - }; - client = new app.models.client({ - id: USER.id - }); - return client.save(attrs, options); - }; - ClientsSettingsView.prototype.changePass = function(e) { - e.preventDefault(); - $(e.currentTarget).hide(); - return $("#password").show(); - }; - ClientsSettingsView.prototype.processPicUpload = function(e) { - e.preventDefault(); - this.ShowSpinner("submit"); - return $.ajaxFileUpload({ - url: API + '/user_pictures', - secureuri: false, - fileElementId: 'picture', - data: { - token: USER.token - }, - dataType: 'json', - complete: __bind(function(data, status) { - this.HideSpinner(); - if (status === 'success') { - this.ShowSuccess(t("Picture Update Succeeded")); - return this.RefreshUserInfo(__bind(function() { - return $("#settingsProfPic").attr("src", USER.picture_url + ("?" + (Math.floor(Math.random() * 1000)))); - }, this)); - } else { - if (data.error) { - return this.ShowError(data.error); - } else { - return this.ShowError("Picture Update Failed"); - } - } - }, this) - }); - }; - return ClientsSettingsView; - })(); -}).call(this); -}, "views/clients/sign_up": function(exports, require, module) {(function() { - var clientsSignUpTemplate; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - clientsSignUpTemplate = require('templates/clients/sign_up'); - exports.ClientsSignUpView = (function() { - __extends(ClientsSignUpView, UberView); - function ClientsSignUpView() { - ClientsSignUpView.__super__.constructor.apply(this, arguments); - } - ClientsSignUpView.prototype.id = 'signup_view'; - ClientsSignUpView.prototype.className = 'view_container'; - ClientsSignUpView.prototype.initialize = function() { - this.mixin(require('web-lib/mixins/i18n_phone_form').i18nPhoneForm); - return $('#location_country').live('change', function() { - if (!$('#mobile').val()) { - return $('#mobile_country').find("option[value=" + ($(this).val()) + "]").attr('selected', 'selected').end().trigger('change'); - } - }); - }; - ClientsSignUpView.prototype.events = { - 'submit form': 'signup', - 'click button': 'signup', - 'change #card_number': 'showCardType', - 'change #location_country': 'countryChange' - }; - ClientsSignUpView.prototype.render = function(invite) { - this.HideSpinner(); - $(this.el).html(clientsSignUpTemplate({ - invite: invite - })); - return this; - }; - ClientsSignUpView.prototype.signup = function(e) { - var $el, attrs, client, error_messages, options; - e.preventDefault(); - $el = $("form"); - $el.find('#terms_error').hide(); - if (!$el.find('#signup_terms input[type=checkbox]').attr('checked')) { - $('#spinner.submit').hide(); - $el.find('#terms_error').show(); - return; - } - error_messages = $el.find('.error_message').html(""); - attrs = { - first_name: $el.find('#first_name').val(), - last_name: $el.find('#last_name').val(), - email: $el.find('#email').val(), - password: $el.find('#password').val(), - location_country: $el.find('#location_country option:selected').attr('data-iso2'), - location: $el.find('#location').val(), - language: $el.find('#language').val(), - mobile_country: $el.find('#mobile_country option:selected').attr('data-iso2'), - mobile: $el.find('#mobile').val(), - card_number: $el.find('#card_number').val(), - card_expiration_month: $el.find('#card_expiration_month').val(), - card_expiration_year: $el.find('#card_expiration_year').val(), - card_code: $el.find('#card_code').val(), - use_case: $el.find('#use_case').val(), - promotion_code: $el.find('#promotion_code').val() - }; - options = { - statusCode: { - 200: function(response) { - $.cookie('token', response.token); - amplify.store('USERjson', response); - app.refreshMenu(); - return app.routers.clients.navigate('!/dashboard', true); - }, - 406: function(e) { - var error, errors, _i, _len, _ref, _results; - errors = JSON.parse(e.responseText); - _ref = _.keys(errors); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - error = _ref[_i]; - _results.push($('#' + error).parent().find('span').html($('#' + error).parent().find('span').html() + " " + errors[error])); - } - return _results; - } - }, - complete: __bind(function(response) { - return this.HideSpinner(); - }, this) - }; - client = new app.models.client; - $('.spinner#submit').show(); - return client.save(attrs, options); - }; - ClientsSignUpView.prototype.countryChange = function(e) { - var $e; - $e = $(e.currentTarget); - return $("#mobile_country").val($e.val()).trigger('change'); - }; - ClientsSignUpView.prototype.showCardType = function(e) { - var $el, reAmerica, reDiscover, reMaster, reVisa, validCard; - reVisa = /^4\d{3}-?\d{4}-?\d{4}-?\d{4}$/; - reMaster = /^5[1-5]\d{2}-?\d{4}-?\d{4}-?\d{4}$/; - reAmerica = /^6011-?\d{4}-?\d{4}-?\d{4}$/; - reDiscover = /^3[4,7]\d{13}$/; - $el = $("#card_logos_signup"); - validCard = false; - if (e.currentTarget.value.match(reVisa)) { - $el.find("#overlay_left").css('width', "0px"); - return $el.find("#overlay_right").css('width', "75%"); - } else if (e.currentTarget.value.match(reMaster)) { - $el.find("#overlay_left").css('width', "25%"); - return $el.find("#overlay_right").css('width', "50%"); - } else if (e.currentTarget.value.match(reAmerica)) { - $el.find("#overlay_left").css('width', "75%"); - $el.find("#overlay_right").css('width', "0px"); - return console.log("amex"); - } else if (e.currentTarget.value.match(reDiscover)) { - $el.find("#overlay_left").css('width', "50%"); - return $el.find("#overlay_right").css('width', "25%"); - } else { - $el.find("#overlay_left").css('width', "0px"); - return $el.find("#overlay_right").css('width', "0px"); - } - }; - return ClientsSignUpView; - })(); -}).call(this); -}, "views/clients/trip_detail": function(exports, require, module) {(function() { - var clientsTripDetailTemplate; - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - clientsTripDetailTemplate = require('templates/clients/trip_detail'); - exports.TripDetailView = (function() { - __extends(TripDetailView, UberView); - function TripDetailView() { - this.resendReceipt = __bind(this.resendReceipt, this); - TripDetailView.__super__.constructor.apply(this, arguments); - } - TripDetailView.prototype.id = 'trip_detail_view'; - TripDetailView.prototype.className = 'view_container'; - TripDetailView.prototype.events = { - 'click a#fare_review': 'showFareReview', - 'click #fare_review_hide': 'hideFareReview', - 'submit #form_review_form': 'submitFareReview', - 'click #submit_fare_review': 'submitFareReview', - 'click .resendReceipt': 'resendReceipt' - }; - TripDetailView.prototype.render = function(id) { - if (id == null) { - id = 'invalid'; - } - this.ReadUserInfo(); - this.HideSpinner(); - this.model = new app.models.trip({ - id: id - }); - this.model.fetch({ - data: { - relationships: 'points,driver,city.country' - }, - dataType: 'json', - success: __bind(function() { - var trip; - trip = this.model; - $(this.el).html(clientsTripDetailTemplate({ - trip: trip - })); - this.RequireMaps(__bind(function() { - var bounds, endPos, map, myOptions, path, polyline, startPos; - bounds = new google.maps.LatLngBounds(); - path = []; - _.each(this.model.get('points'), __bind(function(point) { - path.push(new google.maps.LatLng(point.lat, point.lng)); - return bounds.extend(_.last(path)); - }, this)); - myOptions = { - zoom: 12, - center: path[0], - mapTypeId: google.maps.MapTypeId.ROADMAP, - zoomControl: false, - rotateControl: false, - panControl: false, - mapTypeControl: false, - scrollwheel: false - }; - map = new google.maps.Map(document.getElementById("trip_details_map"), myOptions); - map.fitBounds(bounds); - startPos = new google.maps.Marker({ - position: _.first(path), - map: map, - title: t("Trip started here"), - icon: 'https://uber-static.s3.amazonaws.com/marker_start.png' - }); - endPos = new google.maps.Marker({ - position: _.last(path), - map: map, - title: t("Trip ended here"), - icon: 'https://uber-static.s3.amazonaws.com/marker_end.png' - }); - startPos.setMap(map); - endPos.setMap(map); - polyline = new google.maps.Polyline({ - path: path, - strokeColor: '#003F87', - strokeOpacity: 1, - strokeWeight: 5 - }); - return polyline.setMap(map); - }, this)); - return this.HideSpinner(); - }, this) - }); - this.ShowSpinner('load'); - this.delegateEvents(); - return this; - }; - TripDetailView.prototype.showFareReview = function(e) { - e.preventDefault(); - $('#fare_review_box').slideDown(); - return $('#fare_review').hide(); - }; - TripDetailView.prototype.hideFareReview = function(e) { - e.preventDefault(); - $('#fare_review_box').slideUp(); - return $('#fare_review').show(); - }; - TripDetailView.prototype.submitFareReview = function(e) { - var attrs, errorMessage, id, options; - e.preventDefault(); - errorMessage = $(".error_message"); - errorMessage.hide(); - id = $("#tripid").val(); - this.model = new app.models.trip({ - id: id - }); - attrs = { - note: $('#form_review_message').val(), - note_type: 'client_fare_review' - }; - options = { - success: __bind(function(response) { - $(".success_message").fadeIn(); - return $("#fare_review_form_wrapper").slideUp(); - }, this), - error: __bind(function(error) { - return errorMessage.fadeIn(); - }, this) - }; - return this.model.save(attrs, options); - }; - TripDetailView.prototype.resendReceipt = function(e) { - var $e; - e.preventDefault(); - $e = $(e.currentTarget); - this.$(".resendReceiptSuccess").empty().show(); - this.$(".resentReceiptError").empty().show(); - e.preventDefault(); - $('#spinner').show(); - return $.ajax('/api/trips/func/resend_receipt', { - data: { - token: $.cookie('token'), - trip_id: this.model.id - }, - type: 'POST', - complete: __bind(function(xhr) { - var response; - response = JSON.parse(xhr.responseText); - $('#spinner').hide(); - switch (xhr.status) { - case 200: - this.$(".resendReceiptSuccess").html("Receipt has been emailed"); - return this.$(".resendReceiptSuccess").fadeOut(2000); - default: - this.$(".resendReceiptError").html("Receipt has failed to be emailed"); - return this.$(".resendReceiptError").fadeOut(2000); - } - }, this) - }); - }; - return TripDetailView; - })(); -}).call(this); -}, "views/shared/menu": function(exports, require, module) {(function() { - var menuTemplate; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - menuTemplate = require('templates/shared/menu'); - exports.SharedMenuView = (function() { - __extends(SharedMenuView, Backbone.View); - function SharedMenuView() { - SharedMenuView.__super__.constructor.apply(this, arguments); - } - SharedMenuView.prototype.id = 'menu_view'; - SharedMenuView.prototype.render = function() { - var type; - if ($.cookie('token') === null) { - type = 'guest'; - } else { - type = 'client'; - } - $(this.el).html(menuTemplate({ - type: type - })); - return this; - }; - return SharedMenuView; - })(); -}).call(this); -}, "web-lib/collections/countries": function(exports, require, module) {(function() { - var UberCollection; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - UberCollection = require('web-lib/uber_collection').UberCollection; - exports.CountriesCollection = (function() { - __extends(CountriesCollection, UberCollection); - function CountriesCollection() { - CountriesCollection.__super__.constructor.apply(this, arguments); - } - CountriesCollection.prototype.model = app.models.country; - CountriesCollection.prototype.url = '/countries'; - return CountriesCollection; - })(); -}).call(this); -}, "web-lib/collections/vehicle_types": function(exports, require, module) {(function() { - var UberCollection, vehicleType, _ref; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - UberCollection = require('web-lib/uber_collection').UberCollection; - vehicleType = (typeof app !== "undefined" && app !== null ? (_ref = app.models) != null ? _ref.vehicleType : void 0 : void 0) || require('models/vehicle_type').VehicleType; - exports.VehicleTypesCollection = (function() { - __extends(VehicleTypesCollection, UberCollection); - function VehicleTypesCollection() { - VehicleTypesCollection.__super__.constructor.apply(this, arguments); - } - VehicleTypesCollection.prototype.model = vehicleType; - VehicleTypesCollection.prototype.url = '/vehicle_types'; - VehicleTypesCollection.prototype.defaultColumns = ['id', 'created_at', 'updated_at', 'deleted_at', 'created_by_user_id', 'updated_by_user_id', 'city_id', 'type', 'make', 'model', 'capacity', 'minimum_year', 'actions']; - VehicleTypesCollection.prototype.tableColumns = function(cols) { - var actions, c, capacity, city_id, columnValues, created_at, created_by_user_id, deleted_at, headerRow, id, make, minimum_year, model, type, updated_at, updated_by_user_id, _i, _len; - id = { - sTitle: 'Id' - }; - created_at = { - sTitle: 'Created At (UTC)', - 'sType': 'string' - }; - updated_at = { - sTitle: 'Updated At (UTC)', - 'sType': 'string' - }; - deleted_at = { - sTitle: 'Deleted At (UTC)', - 'sType': 'string' - }; - created_by_user_id = { - sTitle: 'Created By' - }; - updated_by_user_id = { - sTitle: 'Updated By' - }; - city_id = { - sTitle: 'City' - }; - type = { - sTitle: 'Type' - }; - make = { - sTitle: 'Make' - }; - model = { - sTitle: 'Model' - }; - capacity = { - sTitle: 'Capacity' - }; - minimum_year = { - sTitle: 'Min. Year' - }; - actions = { - sTitle: 'Actions' - }; - columnValues = { - id: id, - created_at: created_at, - updated_at: updated_at, - deleted_at: deleted_at, - created_by_user_id: created_by_user_id, - updated_by_user_id: updated_by_user_id, - city_id: city_id, - type: type, - make: make, - model: model, - capacity: capacity, - minimum_year: minimum_year, - actions: actions - }; - headerRow = []; - for (_i = 0, _len = cols.length; _i < _len; _i++) { - c = cols[_i]; - if (columnValues[c]) { - headerRow.push(columnValues[c]); - } - } - return headerRow; - }; - return VehicleTypesCollection; - })(); -}).call(this); -}, "web-lib/helpers": function(exports, require, module) {(function() { - var __indexOf = Array.prototype.indexOf || function(item) { - for (var i = 0, l = this.length; i < l; i++) { - if (this[i] === item) return i; - } - return -1; - }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - exports.helpers = { - pin: function(num, color) { - if (color == null) { - color = 'FF0000'; - } - return ""; - }, - reverseGeocode: function(latitude, longitude) { - if (latitude && longitude) { - return "" + latitude + ", " + longitude + ""; - } else { - return ''; - } - }, - linkedName: function(model) { - var first_name, id, last_name, role, url; - role = model.role || model.get('role'); - id = model.id || model.get('id'); - first_name = model.first_name || model.get('first_name'); - last_name = model.last_name || model.get('last_name'); - url = "/" + role + "s/" + id; - return "" + first_name + " " + last_name + ""; - }, - linkedVehicle: function(vehicle, vehicleType) { - return " " + (vehicleType != null ? vehicleType.get('make') : void 0) + " " + (vehicleType != null ? vehicleType.get('model') : void 0) + " " + (vehicle.get('year')) + " "; - }, - linkedUserId: function(userType, userId) { - return "" + userType + " " + userId + ""; - }, - timeDelta: function(start, end) { - var delta; - if (typeof start === 'string') { - start = this.parseDate(start); - } - if (typeof end === 'string') { - end = this.parseDate(end); - } - if (end && start) { - delta = end.getTime() - start.getTime(); - return this.formatSeconds(delta / 1000); - } else { - return '00:00'; - } - }, - formatSeconds: function(s) { - var minutes, seconds; - s = Math.floor(s); - minutes = Math.floor(s / 60); - seconds = s - minutes * 60; - return "" + (this.leadingZero(minutes)) + ":" + (this.leadingZero(seconds)); - }, - formatCurrency: function(strValue, reverseSign, currency) { - var currency_locale, lc, mf; - if (reverseSign == null) { - reverseSign = false; - } - if (currency == null) { - currency = null; - } - strValue = String(strValue); - if (reverseSign) { - strValue = ~strValue.indexOf('-') ? strValue.split('-').join('') : ['-', strValue].join(''); - } - currency_locale = i18n.currencyToLocale[currency]; - try { - if (!(currency_locale != null) || currency_locale === i18n.locale) { - return i18n.jsworld.mf.format(strValue); - } else { - lc = new jsworld.Locale(POSIX_LC[currency_locale]); - mf = new jsworld.MonetaryFormatter(lc); - return mf.format(strValue); - } - } catch (error) { - i18n.log(error); - return strValue; - } - }, - formatTripFare: function(trip, type) { - var _ref, _ref2; - if (type == null) { - type = "fare"; - } - if (!trip.get('fare')) { - return 'n/a'; - } - if (((_ref = trip.get('fare_breakdown_local')) != null ? _ref.currency : void 0) != null) { - return app.helpers.formatCurrency(trip.get("" + type + "_local"), false, (_ref2 = trip.get('fare_breakdown_local')) != null ? _ref2.currency : void 0); - } else if (trip.get("" + type + "_string") != null) { - return trip.get("" + type + "_string"); - } else if (trip.get("" + type + "_local") != null) { - return trip.get("" + type + "_local"); - } else { - return 'n/a'; - } - }, - formatPhoneNumber: function(phoneNumber, countryCode) { - if (countryCode == null) { - countryCode = "+1"; - } - if (phoneNumber != null) { - phoneNumber = String(phoneNumber); - switch (countryCode) { - case '+1': - return countryCode + ' ' + phoneNumber.substring(0, 3) + '-' + phoneNumber.substring(3, 6) + '-' + phoneNumber.substring(6, 10); - case '+33': - return countryCode + ' ' + phoneNumber.substring(0, 1) + ' ' + phoneNumber.substring(1, 3) + ' ' + phoneNumber.substring(3, 5) + ' ' + phoneNumber.substring(5, 7) + ' ' + phoneNumber.substring(7, 9); - default: - countryCode + phoneNumber; - } - } - return "" + countryCode + " " + phoneNumber; - }, - parseDate: function(d, cityTime, tz) { - var city_filter, parsed, _ref; - if (cityTime == null) { - cityTime = true; - } - if (tz == null) { - tz = null; - } - if (((_ref = !d.substr(-6, 1)) === '+' || _ref === '-') || d.length === 19) { - d += '+00:00'; - } - if (/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})/.test(d)) { - parsed = d.match(/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/); - d = new Date(); - d.setUTCFullYear(parsed[1]); - d.setUTCMonth(parsed[2] - 1); - d.setUTCDate(parsed[3]); - d.setUTCHours(parsed[4]); - d.setUTCMinutes(parsed[5]); - d.setUTCSeconds(parsed[6]); - } else { - d = Date.parse(d); - } - if (typeof d === 'number') { - d = new Date(d); - } - d = new timezoneJS.Date(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), 'Etc/UTC'); - if (tz) { - d.convertToTimezone(tz); - } else if (cityTime) { - city_filter = $.cookie('city_filter'); - if (city_filter) { - tz = $("#city_filter option[value=" + city_filter + "]").attr('data-timezone'); - if (tz) { - d.convertToTimezone(tz); - } - } - } - return d; - }, - dateToTimezone: function(d) { - var city_filter, tz; - d = new timezoneJS.Date(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), 'Etc/UTC'); - city_filter = $.cookie('city_filter'); - if (city_filter) { - tz = $("#city_filter option[value=" + city_filter + "]").attr('data-timezone'); - d.convertToTimezone(tz); - } - return d; - }, - fixAMPM: function(d, formatted) { - if (d.hours >= 12) { - return formatted.replace(/\b[AP]M\b/, 'PM'); - } else { - return formatted.replace(/\b[AP]M\b/, 'AM'); - } - }, - formatDate: function(d, time, timezone) { - var formatted; - if (time == null) { - time = true; - } - if (timezone == null) { - timezone = null; - } - d = this.parseDate(d, true, timezone); - formatted = time ? ("" + (i18n.jsworld.dtf.formatDate(d)) + " ") + this.formatTime(d, d.getTimezoneInfo()) : i18n.jsworld.dtf.formatDate(d); - return this.fixAMPM(d, formatted); - }, - formatDateLong: function(d, time, timezone) { - if (time == null) { - time = true; - } - if (timezone == null) { - timezone = null; - } - d = this.parseDate(d, true, timezone); - timezone = d.getTimezoneInfo().tzAbbr; - if (time) { - return (i18n.jsworld.dtf.formatDateTime(d)) + (" " + timezone); - } else { - return i18n.jsworld.dtf.formatDate(d); - } - }, - formatTimezoneJSDate: function(d) { - var day, hours, jsDate, minutes, month, year; - year = d.getFullYear(); - month = this.leadingZero(d.getMonth()); - day = this.leadingZero(d.getDate()); - hours = this.leadingZero(d.getHours()); - minutes = this.leadingZero(d.getMinutes()); - jsDate = new Date(year, month, day, hours, minutes, 0); - return jsDate.toDateString(); - }, - formatTime: function(d, timezone) { - var formatted; - if (timezone == null) { - timezone = null; - } - formatted = ("" + (i18n.jsworld.dtf.formatTime(d))) + (timezone != null ? " " + (timezone != null ? timezone.tzAbbr : void 0) : ""); - return this.fixAMPM(d, formatted); - }, - formatISODate: function(d) { - var pad; - pad = function(n) { - if (n < 10) { - return '0' + n; - } - return n; - }; - return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + 'Z'; - }, - formatExpDate: function(d) { - var month, year; - d = this.parseDate(d); - year = d.getFullYear(); - month = this.leadingZero(d.getMonth() + 1); - return "" + year + "-" + month; - }, - formatLatLng: function(lat, lng, precision) { - if (precision == null) { - precision = 8; - } - return parseFloat(lat).toFixed(precision) + ',' + parseFloat(lng).toFixed(precision); - }, - leadingZero: function(num) { - if (num < 10) { - return "0" + num; - } else { - return num; - } - }, - roundNumber: function(num, dec) { - return Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec); - }, - notesToHTML: function(notes) { - var i, note, notesHTML, _i, _len; - notesHTML = ''; - i = 1; - if (notes) { - for (_i = 0, _len = notes.length; _i < _len; _i++) { - note = notes[_i]; - notesHTML += "" + note['userid'] + "     " + (this.formatDate(note['created_at'])) + "

    " + note['note'] + "

    "; - notesHTML += "
    "; - } - } - return notesHTML.replace("'", '"e'); - }, - formatPhone: function(n) { - var parts, phone, regexObj; - n = "" + n; - regexObj = /^(?:\+?1[-. ]?)?(?:\(?([0-9]{3})\)?[-. ]?)?([0-9]{3})[-. ]?([0-9]{4})$/; - if (regexObj.test(n)) { - parts = n.match(regexObj); - phone = ""; - if (parts[1]) { - phone += "(" + parts[1] + ") "; - } - phone += "" + parts[2] + "-" + parts[3]; - } else { - phone = n; - } - return phone; - }, - usStates: ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'District of Columbia', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming'], - onboardingPages: ['applied', 'ready_to_interview', 'pending_interview', 'interviewed', 'accepted', 'ready_to_onboard', 'pending_onboarding', 'active', 'waitlisted', 'rejected'], - driverBreadCrumb: function(loc, model) { - var onboardingPage, out, _i, _len, _ref; - out = "Drivers > "; - if (!(model != null)) { - out += ""; - } else { - out += "" + (this.onboardingUrlToName(model.get('driver_status'))) + ""; - out += " > " + (this.linkedName(model)) + " (" + (model.get('role')) + ") #" + (model.get('id')); - } - return out; - }, - onboardingUrlToName: function(url) { - return url != null ? url.replace(/_/g, " ").replace(/(^|\s)([a-z])/g, function(m, p1, p2) { - return p1 + p2.toUpperCase(); - }) : void 0; - }, - formatVehicle: function(vehicle) { - if (vehicle.get('make') && vehicle.get('model') && vehicle.get('license_plate')) { - return "" + (vehicle.get('make')) + " " + (vehicle.get('model')) + " (" + (vehicle.get('license_plate')) + ")"; - } - }, - docArbitraryFields: function(docName, cityDocs) { - var doc, field, out, _i, _j, _len, _len2, _ref; - out = ""; - for (_i = 0, _len = cityDocs.length; _i < _len; _i++) { - doc = cityDocs[_i]; - if (doc.name === docName && __indexOf.call(_.keys(doc), "metaFields") >= 0) { - _ref = doc.metaFields; - for (_j = 0, _len2 = _ref.length; _j < _len2; _j++) { - field = _ref[_j]; - out += "" + field.label + ":
    "; - } - } - } - return out; - }, - capitaliseFirstLetter: function(string) { - return string.charAt(0).toUpperCase() + string.slice(1); - }, - createDocUploadForm: function(docName, driverId, vehicleId, cityMeta, vehicleName, expirationRequired) { - var ddocs, expDropdowns, pdocs, vdocs; - if (driverId == null) { - driverId = "None"; - } - if (vehicleId == null) { - vehicleId = "None"; - } - if (cityMeta == null) { - cityMeta = []; - } - if (vehicleName == null) { - vehicleName = false; - } - if (expirationRequired == null) { - expirationRequired = false; - } - ddocs = cityMeta["driverRequiredDocs"] || []; - pdocs = cityMeta["partnerRequiredDocs"] || []; - vdocs = cityMeta["vehicleRequiredDocs"] || []; - expDropdowns = "Expiration Date:\n -\n"; - return " \n
    \n \n \n \n\n
    \n " + (vehicleName ? vehicleName : "") + " " + docName + "\n
    \n\n
    \n \n
    \n\n
    \n " + (expirationRequired ? expDropdowns : "") + "\n
    \n\n
    \n " + (app.helpers.docArbitraryFields(docName, _.union(ddocs, pdocs, vdocs))) + "\n
    \n\n
    \n \n
    \n\n
    \n"; - }, - countrySelector: function(name, options) { - var countries, countryCodePrefix, defaultOptions; - if (options == null) { - options = {}; - } - defaultOptions = { - selectedKey: 'telephone_code', - selectedValue: '+1', - silent: false - }; - _.extend(defaultOptions, options); - options = defaultOptions; - countries = new app.collections.countries(); - countries.fetch({ - data: { - limit: 300 - }, - success: function(countries) { - var $option, $select, country, selected, _i, _len, _ref; - selected = false; - _ref = countries.models || []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - country = _ref[_i]; - $select = $("select[name=" + name + "]"); - $option = $('').val(country.id).attr('data-iso2', country.get('iso2')).attr('data-prefix', country.get('telephone_code')).html(country.get('name')); - if (country.get(options.selectedKey) === options.selectedValue && !selected) { - selected = true; - $option.attr('selected', 'selected'); - } - $select.append($option); - } - if (selected && !options.silent) { - return $select.val(options.selected).trigger('change'); - } - } - }); - countryCodePrefix = options.countryCodePrefix ? "data-country-code-prefix='" + options.countryCodePrefix + "'" : ''; - return ""; - }, - missingDocsOnDriver: function(driver) { - var city, docsReq, documents, partnerDocs; - city = driver.get('city'); - documents = driver.get('documents'); - if ((city != null) && (documents != null)) { - docsReq = _.pluck(city != null ? city.get('meta')["driverRequiredDocs"] : void 0, "name"); - if (driver.get('role') === "partner") { - partnerDocs = _.pluck(city != null ? city.get('meta')["partnerRequiredDocs"] : void 0, "name"); - docsReq = _.union(docsReq, partnerDocs); - } - return _.reject(docsReq, __bind(function(doc) { - return __indexOf.call((documents != null ? documents.pluck("name") : void 0) || [], doc) >= 0; - }, this)); - } else { - return []; - } - } - }; -}).call(this); -}, "web-lib/i18n": function(exports, require, module) {(function() { - exports.i18n = { - defaultLocale: 'en_US', - cookieName: '_LOCALE_', - locales: { - 'en_US': "English (US)", - 'fr_FR': "Français" - }, - currencyToLocale: { - 'USD': 'en_US', - 'EUR': 'fr_FR' - }, - logglyKey: 'd2d5a9bc-7ebe-4538-a180-81e62c705b1b', - logglyHost: 'https://logs.loggly.com', - init: function() { - this.castor = new window.loggly({ - url: this.logglyHost + '/inputs/' + this.logglyKey + '?rt=1', - level: 'error' - }); - this.setLocale($.cookie(this.cookieName) || this.defaultLocale); - window.t = _.bind(this.t, this); - this.loadLocaleTranslations(this.locale); - if (!(this[this.defaultLocale] != null)) { - return this.loadLocaleTranslations(this.defaultLocale); - } - }, - loadLocaleTranslations: function(locale) { - var loadPaths, path, _i, _len, _results; - loadPaths = ['web-lib/translations/' + locale, 'web-lib/translations/' + locale.slice(0, 2), 'translations/' + locale, 'translations/' + locale.slice(0, 2)]; - _results = []; - for (_i = 0, _len = loadPaths.length; _i < _len; _i++) { - path = loadPaths[_i]; - locale = path.substring(path.lastIndexOf('/') + 1); - if (this[locale] == null) { - this[locale] = {}; - } - _results.push((function() { - try { - return _.extend(this[locale], require(path).translations); - } catch (error) { - - } - }).call(this)); - } - return _results; - }, - getLocale: function() { - return this.locale; - }, - setLocale: function(locale) { - var message, parts, _ref; - parts = locale.split('_'); - this.locale = parts[0].toLowerCase(); - if (parts.length > 1) { - this.locale += "_" + (parts[1].toUpperCase()); - } - if (this.locale) { - $.cookie(this.cookieName, this.locale, { - path: '/', - domain: '.uber.com' - }); - } - try { - ((_ref = this.jsworld) != null ? _ref : this.jsworld = {}).lc = new jsworld.Locale(POSIX_LC[this.locale]); - this.jsworld.mf = new jsworld.MonetaryFormatter(this.jsworld.lc); - this.jsworld.nf = new jsworld.NumericFormatter(this.jsworld.lc); - this.jsworld.dtf = new jsworld.DateTimeFormatter(this.jsworld.lc); - this.jsworld.np = new jsworld.NumericParser(this.jsworld.lc); - this.jsworld.mp = new jsworld.MonetaryParser(this.jsworld.lc); - return this.jsworld.dtp = new jsworld.DateTimeParser(this.jsworld.lc); - } catch (error) { - message = 'JsWorld error with locale: ' + this.locale; - return this.log({ - message: message, - error: error - }); - } - }, - getTemplate: function(id) { - var _ref, _ref2; - return ((_ref = this[this.locale]) != null ? _ref[id] : void 0) || ((_ref2 = this[this.locale.slice(0, 2)]) != null ? _ref2[id] : void 0); - }, - getTemplateDefault: function(id) { - var _ref, _ref2; - return ((_ref = this[this.defaultLocale]) != null ? _ref[id] : void 0) || ((_ref2 = this[this.defaultLocale.slice(0, 2)]) != null ? _ref2[id] : void 0); - }, - getTemplateOrDefault: function(id) { - return this.getTemplate(id) || this.getTemplateDefault(id); - }, - t: function(id, vars) { - var errStr, locale, template; - if (vars == null) { - vars = {}; - } - locale = this.getLocale(); - template = this.getTemplate(id); - if (template == null) { - if (/dev|test/.test(window.location.host)) { - template = "(?) " + id; - } else { - template = this.getTemplateDefault(id); - } - errStr = "Missing [" + locale + "] translation for [" + id + "] at [" + window.location.hash + "] - Default template is [" + template + "]"; - this.log({ - error: errStr, - locale: locale, - id: id, - defaultTemplate: template - }); - } - if (template) { - return _.template(template, vars); - } else { - return id; - } - }, - log: function(error) { - if (/dev/.test(window.location.host)) { - if ((typeof console !== "undefined" && console !== null ? console.log : void 0) != null) { - return console.log(error); - } - } else { - _.extend(error, { - host: window.location.host, - hash: window.location.hash - }); - return this.castor.error(JSON.stringify(error)); - } - } - }; -}).call(this); -}, "web-lib/mixins/i18n_phone_form": function(exports, require, module) {(function() { - exports.i18nPhoneForm = { - _events: { - 'change select[data-country-code-prefix]': 'setCountryCodePrefix' - }, - setCountryCodePrefix: function(e) { - var $el, prefix; - $el = $(e.currentTarget); - prefix = $el.find('option:selected').attr('data-prefix'); - return $("#" + ($el.attr('data-country-code-prefix'))).text(prefix); - } - }; -}).call(this); -}, "web-lib/models/country": function(exports, require, module) {(function() { - var UberModel; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - UberModel = require('web-lib/uber_model').UberModel; - exports.Country = (function() { - __extends(Country, UberModel); - function Country() { - Country.__super__.constructor.apply(this, arguments); - } - Country.prototype.url = function() { - if (this.id) { - return "/countries/" + this.id; - } else { - return '/countries'; - } - }; - return Country; - })(); -}).call(this); -}, "web-lib/models/vehicle_type": function(exports, require, module) {(function() { - var UberModel; - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - UberModel = require('web-lib/uber_model').UberModel; - exports.VehicleType = (function() { - __extends(VehicleType, UberModel); - function VehicleType() { - this.toString = __bind(this.toString, this); - VehicleType.__super__.constructor.apply(this, arguments); - } - VehicleType.prototype.endpoint = 'vehicle_types'; - VehicleType.prototype.toTableRow = function(cols) { - var actions, c, capacity, city_id, columnValues, created_at, created_by_user_id, deleted_at, id, make, minimum_year, model, rows, type, updated_at, updated_by_user_id, _i, _len, _ref; - id = "" + (this.get('id')) + ""; - if (this.get('created_at')) { - created_at = app.helpers.formatDate(this.get('created_at')); - } - if (this.get('updated_at')) { - updated_at = app.helpers.formatDate(this.get('updated_at')); - } - if (this.get('deleted_at')) { - deleted_at = app.helpers.formatDate(this.get('deleted_at')); - } - created_by_user_id = "" + (this.get('created_by_user_id')) + ""; - updated_by_user_id = "" + (this.get('updated_by_user_id')) + ""; - city_id = (_ref = this.get('city')) != null ? _ref.get('display_name') : void 0; - type = this.get('type'); - make = this.get('make'); - model = this.get('model'); - capacity = this.get('capacity'); - minimum_year = this.get('minimum_year'); - actions = "Show"; - if (!this.get('deleted_at')) { - actions += " Edit"; - actions += " Delete"; - } - columnValues = { - id: id, - created_at: created_at, - updated_at: updated_at, - deleted_at: deleted_at, - created_by_user_id: created_by_user_id, - updated_by_user_id: updated_by_user_id, - city_id: city_id, - type: type, - make: make, - model: model, - capacity: capacity, - minimum_year: minimum_year, - actions: actions - }; - rows = []; - for (_i = 0, _len = cols.length; _i < _len; _i++) { - c = cols[_i]; - rows.push(columnValues[c] ? columnValues[c] : '-'); - } - return rows; - }; - VehicleType.prototype.toString = function() { - return this.get('make') + ' ' + this.get('model') + ' ' + this.get('type') + (" (" + (this.get('capacity')) + ")"); - }; - return VehicleType; - })(); -}).call(this); -}, "web-lib/templates/footer": function(exports, require, module) {module.exports = function(__obj) { - if (!__obj) __obj = {}; - var __out = [], __capture = function(callback) { - var out = __out, result; - __out = []; - callback.call(this); - result = __out.join(''); - __out = out; - return __safe(result); - }, __sanitize = function(value) { - if (value && value.ecoSafe) { - return value; - } else if (typeof value !== 'undefined' && value != null) { - return __escape(value); - } else { - return ''; - } - }, __safe, __objSafe = __obj.safe, __escape = __obj.escape; - __safe = __obj.safe = function(value) { - if (value && value.ecoSafe) { - return value; - } else { - if (!(typeof value !== 'undefined' && value != null)) value = ''; - var result = new String(value); - result.ecoSafe = true; - return result; - } - }; - if (!__escape) { - __escape = __obj.escape = function(value) { - return ('' + value) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); - }; - } - (function() { - (function() { - var locale, title, _ref; - __out.push('\n\n\n\n\n'); - }).call(this); - - }).call(__obj); - __obj.safe = __objSafe, __obj.escape = __escape; - return __out.join(''); -}}, "web-lib/translations/en": function(exports, require, module) {(function() { - exports.translations = { - "Info": "Info", - "Learn More": "Learn More", - "Pricing": "Pricing", - "FAQ": "FAQ", - "Support": "Support", - "Support & FAQ": "Support & FAQ", - "Contact Us": "Contact Us", - "Jobs": "Jobs", - "Phones": "Phones", - "Text Message": "Text Message", - "iPhone": "iPhone", - "Android": "Android", - "Drivers": "Drivers", - "Apply": "Apply", - "Sign In": "Sign In", - "Social": "Social", - "Twitter": "Twitter", - "Facebook": "Facebook", - "Blog": "Blog", - "Legal": "Legal", - "Company_Footer": "Company", - "Privacy Policy": "Privacy Policy", - "Terms": "Terms", - "Copyright © Uber Technologies, Inc.": "Copyright © Uber Technologies, Inc.", - "Language:": "Language:", - "Apply to Drive": "Apply to Drive", - "Expiration": "Expiration", - "Fare": "Fare", - "Driver": "Driver ", - "Dashboard": "Dashboard", - "Forgot Password": "Forgot Password", - "Trip Details": "Trip Details", - "Save": "Save", - "Cancel": "Cancel", - "Edit": "Edit", - "Password": "Password", - "First Name": "First Name", - "Last Name": "Last Name", - "Email Address": "Email Address", - "Submit": "Submit", - "Mobile Number": "Mobile Number", - "Zip Code": "Zip Code", - "Sign Out": "Sign Out", - "Confirm Email Message": "Attempting to confirm email...", - "Upload": "Upload", - "Rating": "Rating", - "Pickup Time": "Pickup Time", - "2011": "2011", - "2012": "2012", - "2013": "2013", - "2014": "2014", - "2015": "2015", - "2016": "2016", - "2017": "2017", - "2018": "2018", - "2019": "2019", - "2020": "2020", - "2021": "2021", - "2022": "2022", - "01": "01", - "02": "02", - "03": "03", - "04": "04", - "05": "05", - "06": "06", - "07": "07", - "08": "08", - "09": "09", - "10": "10", - "11": "11", - "12": "12" - }; -}).call(this); -}, "web-lib/translations/fr": function(exports, require, module) {(function() { - exports.translations = { - "Info": "Info", - "Learn More": "En Savoir Plus", - "Pricing": "Calcul du Prix", - "Support & FAQ": "Aide & FAQ", - "Contact Us": "Contactez Nous", - "Jobs": "Emplois", - "Phones": "Téléphones", - "Text Message": "SMS", - "iPhone": "iPhone", - "Android": "Android", - "Apply to Drive": "Candidature Chauffeur", - "Sign In": "Connexion", - "Social": "Contact", - "Twitter": "Twitter", - "Facebook": "Facebook", - "Blog": "Blog", - "Privacy Policy": "Protection des Données Personelles", - "Terms": "Conditions Générales", - "Copyright © Uber Technologies, Inc.": "© Uber, Inc.", - "Language:": "Langue:", - "Forgot Password": "Mot de passe oublié", - "Company_Footer": "À Propos d'Uber", - "Expiration": "Expiration", - "Fare": "Tarif", - "Driver": "Chauffeur", - "Drivers": "Chauffeurs", - "Dashboard": "Tableau de bord", - "Forgot Password": "Mot de passe oublié", - "Forgot Password?": "Mot de passe oublié?", - "Trip Details": "Détails de la course", - "Save": "Enregistrer", - "Cancel": "Annuler", - "Edit": "Modifier", - "Password": "Mot de passe", - "First Name": "Prénom", - "Last Name": "Nom", - "Email Address": "E-mail", - "Submit": "Soumettre", - "Mobile Number": "Téléphone Portable", - "Zip Code": "Code Postal", - "Sign Out": "Se déconnecter", - "Confirm Email Message": "E-mail de confirmation", - "Upload": "Télécharger", - "Rating": "Notation", - "Pickup Time": "Heure de prise en charge", - "2011": "2011", - "2012": "2012", - "2013": "2013", - "2014": "2014", - "2015": "2015", - "2016": "2016", - "2017": "2017", - "2018": "2018", - "2019": "2019", - "2020": "2020", - "2021": "2021", - "2022": "2022", - "01": "01", - "02": "02", - "03": "03", - "04": "04", - "05": "05", - "06": "06", - "07": "07", - "08": "08", - "09": "09", - "10": "10", - "11": "11", - "12": "12" - }; -}).call(this); -}, "web-lib/uber_collection": function(exports, require, module) {(function() { - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - exports.UberCollection = (function() { - __extends(UberCollection, Backbone.Collection); - function UberCollection() { - UberCollection.__super__.constructor.apply(this, arguments); - } - UberCollection.prototype.parse = function(data) { - var model, tmp, _i, _in, _len, _out; - _in = data.resources || data; - _out = []; - if (data.meta) { - this.meta = data.meta; - } - for (_i = 0, _len = _in.length; _i < _len; _i++) { - model = _in[_i]; - tmp = new this.model; - tmp.set(tmp.parse(model)); - _out.push(tmp); - } - return _out; - }; - UberCollection.prototype.isRenderable = function() { - if (this.models.length) { - return true; - } - }; - UberCollection.prototype.toTableRows = function(cols) { - var tableRows; - tableRows = []; - _.each(this.models, function(model) { - return tableRows.push(model.toTableRow(cols)); - }); - return tableRows; - }; - return UberCollection; - })(); -}).call(this); -}, "web-lib/uber_model": function(exports, require, module) {(function() { - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }, __indexOf = Array.prototype.indexOf || function(item) { - for (var i = 0, l = this.length; i < l; i++) { - if (this[i] === item) return i; - } - return -1; - }; - exports.UberModel = (function() { - __extends(UberModel, Backbone.Model); - function UberModel() { - this.refetch = __bind(this.refetch, this); - this.fetch = __bind(this.fetch, this); - this.save = __bind(this.save, this); - this.parse = __bind(this.parse, this); - UberModel.__super__.constructor.apply(this, arguments); - } - UberModel.prototype.endpoint = 'set_api_endpoint_in_subclass'; - UberModel.prototype.refetchOptions = {}; - UberModel.prototype.url = function(type) { - var endpoint_path; - endpoint_path = "/" + this.endpoint; - if (this.get('id')) { - return endpoint_path + ("/" + (this.get('id'))); - } else { - return endpoint_path; - } - }; - UberModel.prototype.isRenderable = function() { - var i, key, value, _ref; - i = 0; - _ref = this.attributes; - for (key in _ref) { - if (!__hasProp.call(_ref, key)) continue; - value = _ref[key]; - if (this.attributes.hasOwnProperty(key)) { - i += 1; - } - if (i > 1) { - return true; - } - } - return !(i === 1); - }; - UberModel.prototype.parse = function(response) { - var attrs, key, model, models, _i, _j, _k, _len, _len2, _len3, _ref, _ref2; - if (typeof response === 'object') { - _ref = _.intersection(_.keys(app.models), _.keys(response)); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - key = _ref[_i]; - if (response[key]) { - attrs = this.parse(response[key]); - if (typeof attrs === 'object') { - response[key] = new app.models[key](attrs); - } - } - } - _ref2 = _.intersection(_.keys(app.collections), _.keys(response)); - for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { - key = _ref2[_j]; - models = response[key]; - if (_.isArray(models)) { - response[key] = new app.collections[key]; - for (_k = 0, _len3 = models.length; _k < _len3; _k++) { - model = models[_k]; - attrs = app.collections[key].prototype.model.prototype.parse(model); - response[key].add(new response[key].model(attrs)); - } - } - } - } - return response; - }; - UberModel.prototype.save = function(attributes, options) { - var attr, _i, _j, _len, _len2, _ref, _ref2; - if (options == null) { - options = {}; - } - _ref = _.intersection(_.keys(app.models), _.keys(this.attributes)); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - attr = _ref[_i]; - if (typeof this.get(attr) === "object") { - this.unset(attr, { - silent: true - }); - } - } - _ref2 = _.intersection(_.keys(app.collections), _.keys(this.attributes)); - for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { - attr = _ref2[_j]; - if (typeof this.get(attr) === "object") { - this.unset(attr, { - silent: true - }); - } - } - if ((options != null) && options.diff && (attributes != null) && attributes !== {}) { - attributes['id'] = this.get('id'); - attributes['token'] = this.get('token'); - this.clear({ - 'silent': true - }); - this.set(attributes, { - silent: true - }); - } - if (__indexOf.call(_.keys(options), "data") < 0 && __indexOf.call(_.keys(this.refetchOptions || {}), "data") >= 0) { - options.data = this.refetchOptions.data; - } - return Backbone.Model.prototype.save.call(this, attributes, options); - }; - UberModel.prototype.fetch = function(options) { - this.refetchOptions = options; - return Backbone.Model.prototype.fetch.call(this, options); - }; - UberModel.prototype.refetch = function() { - return this.fetch(this.refetchOptions); - }; - return UberModel; - })(); -}).call(this); -}, "web-lib/uber_router": function(exports, require, module) {(function() { - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - exports.UberRouter = (function() { - __extends(UberRouter, Backbone.Router); - function UberRouter() { - UberRouter.__super__.constructor.apply(this, arguments); - } - UberRouter.prototype.datePickers = function(format) { - if (format == null) { - format = "%Z-%m-%dT%H:%i:%s%:"; - } - $('.datepicker').AnyTime_noPicker(); - return $('.datepicker').AnyTime_picker({ - 'format': format, - 'formatUtcOffset': '%@' - }); - }; - UberRouter.prototype.autoGrowInput = function() { - return $('.editable input').autoGrowInput(); - }; - UberRouter.prototype.windowTitle = function(title) { - return $(document).attr('title', title); - }; - return UberRouter; - })(); -}).call(this); -}, "web-lib/uber_show_view": function(exports, require, module) {(function() { - var UberView; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - UberView = require('web-lib/uber_view').UberView; - exports.UberShowView = (function() { - __extends(UberShowView, UberView); - function UberShowView() { - UberShowView.__super__.constructor.apply(this, arguments); - } - UberShowView.prototype.view = 'show'; - UberShowView.prototype.events = { - 'click #edit': 'edit', - 'submit form': 'save', - 'click .cancel': 'cancel' - }; - UberShowView.prototype.errors = null; - UberShowView.prototype.showTemplate = null; - UberShowView.prototype.editTemplate = null; - UberShowView.prototype.initialize = function() { - if (this.init_hook) { - this.init_hook(); - } - _.bindAll(this, 'render'); - return this.model.bind('change', this.render); - }; - UberShowView.prototype.render = function() { - var $el; - $el = $(this.el); - this.selectView(); - if (this.view === 'show') { - $el.html(this.showTemplate({ - model: this.model - })); - } else if (this.view === 'edit') { - $el.html(this.editTemplate({ - model: this.model, - errors: this.errors || {}, - collections: this.collections || {} - })); - } else { - $el.html(this.newTemplate({ - model: this.model, - errors: this.errors || {}, - collections: this.collections || {} - })); - } - if (this.render_hook) { - this.render_hook(); - } - this.errors = null; - this.userIdsToLinkedNames(); - this.datePickers(); - return this.place(); - }; - UberShowView.prototype.selectView = function() { - var url; - if (this.options.urlRendering) { - url = window.location.hash; - if (url.match(/\/new/)) { - return this.view = 'new'; - } else if (url.match(/\/edit/)) { - return this.view = 'edit'; - } else { - return this.view = 'show'; - } - } - }; - UberShowView.prototype.edit = function(e) { - e.preventDefault(); - if (this.options.urlRendering) { - window.location.hash = '#/' + this.model.endpoint + '/' + this.model.get('id') + '/edit'; - } else { - this.view = 'edit'; - } - return this.model.change(); - }; - UberShowView.prototype.save = function(e) { - var attributes, ele, form_attrs, _i, _len, _ref; - e.preventDefault(); - attributes = $(e.currentTarget).serializeToJson(); - form_attrs = {}; - _ref = $('input[type="radio"]'); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - ele = _ref[_i]; - if ($(ele).is(':checked')) { - form_attrs[$(ele).attr('name')] = $(ele).attr('value'); - } - } - attributes = _.extend(attributes, form_attrs); - if (this.relationships) { - attributes = _.extend(attributes, { - relationships: this.relationships - }); - } - if (this.filter_attributes != null) { - this.filter_attributes(attributes); - } - return this.model.save(attributes, { - silent: true, - success: __bind(function(model) { - if (this.options.urlRendering) { - window.location.hash = '#/' + this.model.endpoint + '/' + this.model.get('id'); - } else { - this.view = 'show'; - } - return this.flash('success', "Uber save!"); - }, this), - statusCode: { - 406: __bind(function(xhr) { - this.errors = JSON.parse(xhr.responseText); - return this.flash('error', 'That was not Uber.'); - }, this) - }, - error: __bind(function(model, xhr) { - var code, message, responseJSON, responseText; - code = xhr.status; - responseText = xhr.responseText; - if (responseText) { - responseJSON = JSON.parse(responseText); - } - if (responseJSON && (typeof responseJSON === 'object') && (responseJSON.hasOwnProperty('error'))) { - message = responseJSON.error; - } - return this.flash('error', (code || 'Unknown') + ' error' + (': ' + message || '')); - }, this), - complete: __bind(function() { - return this.model.change(); - }, this) - }); - }; - UberShowView.prototype.cancel = function(e) { - e.preventDefault(); - if (this.options.urlRendering) { - window.location.hash = '#/' + this.model.endpoint + '/' + this.model.get('id'); - } else { - this.view = 'show'; - } - return this.model.fetch({ - silent: true, - complete: __bind(function() { - return this.model.change(); - }, this) - }); - }; - return UberShowView; - })(); -}).call(this); -}, "web-lib/uber_sync": function(exports, require, module) {(function() { - var methodType; - var __indexOf = Array.prototype.indexOf || function(item) { - for (var i = 0, l = this.length; i < l; i++) { - if (this[i] === item) return i; - } - return -1; - }; - methodType = { - create: 'POST', - update: 'PUT', - "delete": 'DELETE', - read: 'GET' - }; - exports.UberSync = function(method, model, options) { - var token; - options.type = methodType[method]; - options.url = _.isString(this.url) ? '/api' + this.url : '/api' + this.url(options.type); - options.data = _.extend({}, options.data); - if (__indexOf.call(_.keys(options.data), "city_id") < 0) { - if ($.cookie('city_filter')) { - _.extend(options.data, { - city_id: $.cookie('city_filter') - }); - } - } else { - delete options.data['city_id']; - } - if (options.type === 'POST' || options.type === 'PUT') { - _.extend(options.data, model.toJSON()); - } - token = $.cookie('token') ? $.cookie('token') : typeof USER !== "undefined" && USER !== null ? USER.get('token') : ""; - _.extend(options.data, { - token: token - }); - if (method === "delete") { - options.contentType = 'application/json'; - options.data = JSON.stringify(options.data); - } - return $.ajax(options); - }; -}).call(this); -}, "web-lib/uber_view": function(exports, require, module) {(function() { - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - exports.UberView = (function() { - __extends(UberView, Backbone.View); - function UberView() { - this.processDocumentUpload = __bind(this.processDocumentUpload, this); - UberView.__super__.constructor.apply(this, arguments); - } - UberView.prototype.className = 'view_container'; - UberView.prototype.hashId = function() { - return parseInt(location.hash.split('/')[2]); - }; - UberView.prototype.place = function(content) { - var $target; - $target = this.options.scope ? this.options.scope.find(this.options.selector) : $(this.options.selector); - $target[this.options.method || 'html'](content || this.el); - this.delegateEvents(); - $('#spinner').hide(); - return this; - }; - UberView.prototype.mixin = function(m, args) { - var events, self; - if (args == null) { - args = {}; - } - self = this; - events = m._events; - _.extend(this, m); - if (m.initialize) { - m.initialize(self, args); - } - return _.each(_.keys(events), function(key) { - var event, func, selector, split; - split = key.split(' '); - event = split[0]; - selector = split[1]; - func = events[key]; - return $(self.el).find(selector).live(event, function(e) { - return self[func](e); - }); - }); - }; - UberView.prototype.datePickers = function(format) { - if (format == null) { - format = "%Z-%m-%dT%H:%i:%s%:"; - } - $('.datepicker').AnyTime_noPicker(); - return $('.datepicker').AnyTime_picker({ - 'format': format, - 'formatUtcOffset': '%@' - }); - }; - UberView.prototype.dataTable = function(collection, selector, options, params, cols) { - var defaults; - if (selector == null) { - selector = 'table'; - } - if (options == null) { - options = {}; - } - if (params == null) { - params = {}; - } - if (cols == null) { - cols = []; - } - $(selector).empty(); - if (!cols.length) { - cols = collection.defaultColumns; - } - defaults = { - aoColumns: collection.tableColumns(cols), - bDestroy: true, - bSort: false, - bProcessing: true, - bFilter: false, - bServerSide: true, - bPaginate: true, - bScrollInfinite: true, - bScrollCollapse: true, - sScrollY: '600px', - iDisplayLength: 50, - fnServerData: function(source, data, callback) { - var defaultParams; - defaultParams = { - limit: data[4].value, - offset: data[3].value - }; - return collection.fetch({ - data: _.extend(defaultParams, params), - success: function() { - return callback({ - aaData: collection.toTableRows(cols), - iTotalRecords: collection.meta.count, - iTotalDisplayRecords: collection.meta.count - }); - }, - error: function() { - return new Error({ - message: 'Loading error.' - }); - } - }); - }, - fnRowCallback: function(nRow, aData, iDisplayIndex, iDisplayIndexFull) { - $('[data-tooltip]', nRow).qtip({ - content: { - attr: 'data-tooltip' - }, - style: { - classes: "ui-tooltip-light ui-tooltip-rounded ui-tooltip-shadow" - } - }); - return nRow; - } - }; - return $(this.el).find(selector).dataTable(_.extend(defaults, options)); - }; - UberView.prototype.dataTableLocal = function(collection, selector, options, params, cols) { - var $dataTable, defaults; - if (selector == null) { - selector = 'table'; - } - if (options == null) { - options = {}; - } - if (params == null) { - params = {}; - } - if (cols == null) { - cols = []; - } - $(selector).empty(); - if (!cols.length || cols.length === 0) { - cols = collection.defaultColumns; - } - defaults = { - aaData: collection.toTableRows(cols), - aoColumns: collection.tableColumns(cols), - bDestroy: true, - bSort: false, - bProcessing: true, - bFilter: false, - bScrollInfinite: true, - bScrollCollapse: true, - sScrollY: '600px', - iDisplayLength: -1 - }; - $dataTable = $(this.el).find(selector).dataTable(_.extend(defaults, options)); - _.delay(__bind(function() { - if ($dataTable && $dataTable.length > 0) { - return $dataTable.fnAdjustColumnSizing(); - } - }, this), 1); - return $dataTable; - }; - UberView.prototype.reverseGeocode = function() { - var $el; - return ''; - $el = $(this.el); - return this.requireMaps(function() { - var geocoder; - geocoder = new google.maps.Geocoder(); - return $el.find('[data-point]').each(function() { - var $this, latLng, point; - $this = $(this); - point = JSON.parse($this.attr('data-point')); - latLng = new google.maps.LatLng(point.latitude, point.longitude); - return geocoder.geocode({ - latLng: latLng - }, function(data, status) { - if (status === google.maps.GeocoderStatus.OK) { - return $this.text(data[0].formatted_address); - } - }); - }); - }); - }; - UberView.prototype.userIdsToLinkedNames = function() { - var $el; - $el = $(this.el); - return $el.find('a[data-user-id][data-user-type]').each(function() { - var $this, user, userType; - $this = $(this); - userType = $this.attr('data-user-type') === 'user' ? 'client' : $this.attr('data-user-type'); - user = new app.models[userType]({ - id: $this.attr('data-user-id') - }); - return user.fetch({ - success: function(user) { - return $this.html(app.helpers.linkedName(user)).attr('href', "!/" + user.role + "s/" + user.id); - }, - error: function() { - if ($this.attr('data-user-type') === 'user') { - user = new app.models['driver']({ - id: $this.attr('data-user-id') - }); - return user.fetch({ - success: function(user) { - return $this.html(app.helpers.linkedName(user)).attr('href', "!/driver/" + user.id); - } - }); - } - } - }); - }); - }; - UberView.prototype.selectedCity = function() { - var $selected, city, cityFilter; - cityFilter = $.cookie('city_filter'); - $selected = $("#city_filter option[value=" + cityFilter + "]"); - if (city_filter && $selected.length) { - return city = { - lat: parseFloat($selected.attr('data-lat')), - lng: parseFloat($selected.attr('data-lng')), - timezone: $selected.attr('data-timezone') - }; - } else { - return city = { - lat: 37.775, - lng: -122.45, - timezone: 'Etc/UTC' - }; - } - }; - UberView.prototype.updateModel = function(e, success) { - var $el, attrs, model, self; - e.preventDefault(); - $el = $(e.currentTarget); - self = this; - model = new this.model.__proto__.constructor({ - id: this.model.id - }); - attrs = {}; - $el.find('[name]').each(function() { - var $this; - $this = $(this); - return attrs["" + ($this.attr('name'))] = $this.val(); - }); - self.model.set(attrs); - $el.find('span.error').text(''); - return model.save(attrs, { - complete: function(xhr) { - var response; - response = JSON.parse(xhr.responseText); - switch (xhr.status) { - case 200: - self.model = model; - $el.find('[name]').val(''); - if (success) { - return success(); - } - break; - case 406: - return _.each(response, function(error, field) { - return $el.find("[name=" + field + "]").parent().find('span.error').text(error); - }); - default: - return this.unanticipatedError(response); - } - } - }); - }; - UberView.prototype.autoUpdateModel = function(e) { - var $el, arg, model, self, val; - $el = $(e.currentTarget); - val = $el.val(); - self = this; - if (val !== this.model.get($el.attr('id'))) { - arg = {}; - arg[$el.attr('id')] = $el.is(':checkbox') ? $el.is(':checked') ? 1 : 0 : val; - $('.editable span').empty(); - this.model.set(arg); - model = new this.model.__proto__.constructor({ - id: this.model.id - }); - return model.save(arg, { - complete: function(xhr) { - var key, response, _i, _len, _ref, _results; - response = JSON.parse(xhr.responseText); - switch (xhr.status) { - case 200: - self.flash('success', 'Saved!'); - return $el.blur(); - case 406: - self.flash('error', 'That was not Uber.'); - _ref = _.keys(response); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - key = _ref[_i]; - _results.push($el.parent().find('span').html(response[key])); - } - return _results; - break; - default: - return self.unanticipatedError; - } - } - }); - } - }; - UberView.prototype.unanticipatedError = function(response) { - return self.flash('error', response); - }; - UberView.prototype.flash = function(type, text) { - var $banner; - $banner = $("." + type); - $banner.find('p').text(text).end().css('border', '1px solid #999').animate({ - top: 0 - }, 500); - return setTimeout(function() { - return $banner.animate({ - top: -$banner.outerHeight() - }, 500); - }, 3000); - }; - UberView.prototype.requireMaps = function(callback) { - if (typeof google !== 'undefined' && google.maps) { - return callback(); - } else { - return $.getScript("https://www.google.com/jsapi?key=" + CONFIG.googleJsApiKey, function() { - return google.load('maps', 3, { - callback: callback, - other_params: 'sensor=false&language=en' - }); - }); - } - }; - UberView.prototype.select_drop_down = function(model, key) { - var value; - value = model.get(key); - if (value) { - return $("select[id='" + key + "'] option[value='" + value + "']").attr('selected', 'selected'); - } - }; - UberView.prototype.processDocumentUpload = function(e) { - var $fi, $form, arbData, curDate, data, expDate, expM, expY, expiration, fileElementId, invalid; - e.preventDefault(); - $form = $(e.currentTarget); - $fi = $("input[type=file]", $form); - $(".validationError").removeClass("validationError"); - if (!$fi.val()) { - return $fi.addClass("validationError"); - } else { - fileElementId = $fi.attr('id'); - expY = $("select[name=expiration-year]", $form).val(); - expM = $("select[name=expiration-month]", $form).val(); - invalid = false; - if (expY && expM) { - expDate = new Date(expY, expM, 28); - curDate = new Date(); - if (expDate < curDate) { - invalid = true; - $(".expiration", $form).addClass("validationError"); - } - expiration = "" + expY + "-" + expM + "-28T23:59:59Z"; - } - arbData = {}; - $(".arbitraryField", $form).each(__bind(function(i, e) { - arbData[$(e).attr('name')] = $(e).val(); - if ($(e).val() === "") { - invalid = true; - return $(e).addClass("validationError"); - } - }, this)); - if (!invalid) { - data = { - token: $.cookie('token') || USER.get('token'), - name: $("input[name=fileName]", $form).val(), - meta: escape(JSON.stringify(arbData)), - user_id: $("input[name=driver_id]", $form).val(), - vehicle_id: $("input[name=vehicle_id]", $form).val() - }; - if (expiration) { - data['expiration'] = expiration; - } - $("#spinner").show(); - return $.ajaxFileUpload({ - url: '/api/documents', - secureuri: false, - fileElementId: fileElementId, - data: data, - complete: __bind(function(resp, status) { - var key, _i, _len, _ref, _results; - $("#spinner").hide(); - if (status === "success") { - if (this.model) { - this.model.refetch(); - } else { - USER.refetch(); - } - } - if (status === "error") { - _ref = _.keys(resp); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - key = _ref[_i]; - _results.push($("*[name=" + key + "]", $form).addClass("validationError")); - } - return _results; - } - }, this) - }); - } - } - }; - return UberView; - })(); -}).call(this); -}, "web-lib/views/footer": function(exports, require, module) {(function() { - var footerTemplate; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - footerTemplate = require('web-lib/templates/footer'); - exports.SharedFooterView = (function() { - __extends(SharedFooterView, Backbone.View); - function SharedFooterView() { - SharedFooterView.__super__.constructor.apply(this, arguments); - } - SharedFooterView.prototype.id = 'footer_view'; - SharedFooterView.prototype.events = { - 'click .language': 'intl_set_cookie_locale' - }; - SharedFooterView.prototype.render = function() { - $(this.el).html(footerTemplate()); - this.delegateEvents(); - return this; - }; - SharedFooterView.prototype.intl_set_cookie_locale = function(e) { - var _ref; - i18n.setLocale(e != null ? (_ref = e.srcElement) != null ? _ref.id : void 0 : void 0); - return location.reload(); - }; - return SharedFooterView; - })(); -}).call(this); -}}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/embed-tokens.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/embed-tokens.js deleted file mode 100755 index 61307eeb..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/embed-tokens.js +++ /dev/null @@ -1,15 +0,0 @@ -#! /usr/bin/env node - -global.sys = require(/^v0\.[012]/.test(process.version) ? "sys" : "util"); -var fs = require("fs"); -var uglify = require("uglify-js"), // symlink ~/.node_libraries/uglify-js.js to ../uglify-js.js - jsp = uglify.parser, - pro = uglify.uglify; - -var code = fs.readFileSync("embed-tokens.js", "utf8").replace(/^#.*$/mg, ""); -var ast = jsp.parse(code, null, true); - -// trololo -function fooBar() {} - -console.log(sys.inspect(ast, null, null)); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/goto.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/goto.js deleted file mode 100644 index 945960c2..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/goto.js +++ /dev/null @@ -1,26 +0,0 @@ -function unique(arqw) { - var a = [], i, j - outer: for (i = 0; i < arqw.length; i++) { - for (j = 0; j < a.length; j++) { - if (a[j] == arqw[i]) { - continue outer - } - } - a[a.length] = arqw[i] - } - return a -} - - -function unique(arqw) { - var crap = [], i, j - outer: for (i = 0; i < arqw.length; i++) { - for (j = 0; j < crap.length; j++) { - if (crap[j] == arqw[i]) { - continue outer - } - } - crap[crap.length] = arqw[i] - } - return crap -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/goto2.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/goto2.js deleted file mode 100644 index d13b2bc0..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/goto2.js +++ /dev/null @@ -1,8 +0,0 @@ -function q(qooo) { - var a; - foo: for(;;) { - a++; - if (something) break foo; - return qooo; - } -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/hoist.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/hoist.js deleted file mode 100644 index 4bf2b94d..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/hoist.js +++ /dev/null @@ -1,33 +0,0 @@ -function foo(arg1, arg2, arg3, arg4, arg5, arg6) { - var a = 5; - { - var d = 10, mak = 20, buz = 30; - var q = buz * 2; - } - if (moo) { - var a, b, c; - } - for (var arg1 = 0, d = 20; arg1 < 10; ++arg1) - console.log(arg3); - for (var i in mak) {} - for (j in d) {} - var d; - - function test() { - - }; - - //test(); - - (function moo(first, second){ - console.log(first); - })(1); - - (function moo(first, second){ - console.log(moo()); - })(1); -} - - -var foo; -var bar; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/instrument.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/instrument.js deleted file mode 100644 index c6a9d798..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/instrument.js +++ /dev/null @@ -1,97 +0,0 @@ -// sample on how to use the parser and walker API to instrument some code - -var jsp = require("uglify-js").parser; -var pro = require("uglify-js").uglify; - -function instrument(code) { - var ast = jsp.parse(code, false, true); // true for the third arg specifies that we want - // to have start/end tokens embedded in the - // statements - var w = pro.ast_walker(); - - // we're gonna need this to push elements that we're currently looking at, to avoid - // endless recursion. - var analyzing = []; - function do_stat() { - var ret; - if (this[0].start && analyzing.indexOf(this) < 0) { - // without the `analyzing' hack, w.walk(this) would re-enter here leading - // to infinite recursion - analyzing.push(this); - ret = [ "splice", // XXX: "block" is safer - [ [ "stat", - [ "call", [ "name", "trace" ], - [ [ "string", this[0].toString() ], - [ "num", this[0].start.line ], - [ "num", this[0].start.col ], - [ "num", this[0].end.line ], - [ "num", this[0].end.col ]]]], - w.walk(this) ]]; - analyzing.pop(this); - } - return ret; - }; - var new_ast = w.with_walkers({ - "stat" : do_stat, - "label" : do_stat, - "break" : do_stat, - "continue" : do_stat, - "debugger" : do_stat, - "var" : do_stat, - "const" : do_stat, - "return" : do_stat, - "throw" : do_stat, - "try" : do_stat, - "defun" : do_stat, - "if" : do_stat, - "while" : do_stat, - "do" : do_stat, - "for" : do_stat, - "for-in" : do_stat, - "switch" : do_stat, - "with" : do_stat - }, function(){ - return w.walk(ast); - }); - return pro.gen_code(new_ast, { beautify: true }); -} - - - - -////// test code follows. - -var code = instrument(test.toString()); -console.log(code); - -function test() { - // simple stats - a = 5; - c += a + b; - "foo"; - - // var - var foo = 5; - const bar = 6, baz = 7; - - // switch block. note we can't track case lines the same way. - switch ("foo") { - case "foo": - return 1; - case "bar": - return 2; - } - - // for/for in - for (var i = 0; i < 5; ++i) { - console.log("Hello " + i); - } - for (var i in [ 1, 2, 3]) { - console.log(i); - } - - // note however that the following is broken. I guess we - // should add the block brackets in this case... - for (var i = 0; i < 5; ++i) - console.log("foo"); -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/instrument2.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/instrument2.js deleted file mode 100644 index 6aee5f3f..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/instrument2.js +++ /dev/null @@ -1,138 +0,0 @@ -// sample on how to use the parser and walker API to instrument some code - -var jsp = require("uglify-js").parser; -var pro = require("uglify-js").uglify; - -function instrument(code) { - var ast = jsp.parse(code, false, true); // true for the third arg specifies that we want - // to have start/end tokens embedded in the - // statements - var w = pro.ast_walker(); - - function trace (line, comment) { - var code = pro.gen_code(line, { beautify: true }); - var data = line[0] - - var args = [] - if (!comment) comment = "" - if (typeof data === "object") { - code = code.split(/\n/).shift() - args = [ [ "string", data.toString() ], - [ "string", code ], - [ "num", data.start.line ], - [ "num", data.start.col ], - [ "num", data.end.line ], - [ "num", data.end.col ]] - } else { - args = [ [ "string", data ], - [ "string", code ]] - - } - return [ "call", [ "name", "trace" ], args ]; - } - - // we're gonna need this to push elements that we're currently looking at, to avoid - // endless recursion. - var analyzing = []; - function do_stat() { - var ret; - if (this[0].start && analyzing.indexOf(this) < 0) { - // without the `analyzing' hack, w.walk(this) would re-enter here leading - // to infinite recursion - analyzing.push(this); - ret = [ "splice", - [ [ "stat", trace(this) ], - w.walk(this) ]]; - analyzing.pop(this); - } - return ret; - } - - function do_cond(c, t, f) { - return [ this[0], w.walk(c), - ["seq", trace(t), w.walk(t) ], - ["seq", trace(f), w.walk(f) ]]; - } - - function do_binary(c, l, r) { - if (c !== "&&" && c !== "||") { - return [this[0], c, w.walk(l), w.walk(r)]; - } - return [ this[0], c, - ["seq", trace(l), w.walk(l) ], - ["seq", trace(r), w.walk(r) ]]; - } - - var new_ast = w.with_walkers({ - "stat" : do_stat, - "label" : do_stat, - "break" : do_stat, - "continue" : do_stat, - "debugger" : do_stat, - "var" : do_stat, - "const" : do_stat, - "return" : do_stat, - "throw" : do_stat, - "try" : do_stat, - "defun" : do_stat, - "if" : do_stat, - "while" : do_stat, - "do" : do_stat, - "for" : do_stat, - "for-in" : do_stat, - "switch" : do_stat, - "with" : do_stat, - "conditional" : do_cond, - "binary" : do_binary - }, function(){ - return w.walk(ast); - }); - return pro.gen_code(new_ast, { beautify: true }); -} - - -////// test code follows. - -var code = instrument(test.toString()); -console.log(code); - -function test() { - // simple stats - a = 5; - c += a + b; - "foo"; - - // var - var foo = 5; - const bar = 6, baz = 7; - - // switch block. note we can't track case lines the same way. - switch ("foo") { - case "foo": - return 1; - case "bar": - return 2; - } - - // for/for in - for (var i = 0; i < 5; ++i) { - console.log("Hello " + i); - } - for (var i in [ 1, 2, 3]) { - console.log(i); - } - - for (var i = 0; i < 5; ++i) - console.log("foo"); - - for (var i = 0; i < 5; ++i) { - console.log("foo"); - } - - var k = plurp() ? 1 : 0; - var x = a ? doX(y) && goZoo("zoo") - : b ? blerg({ x: y }) - : null; - - var x = X || Y; -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/liftvars.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/liftvars.js deleted file mode 100644 index 2f4b7fe2..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/liftvars.js +++ /dev/null @@ -1,8 +0,0 @@ -var UNUSED_VAR1 = 19; - -function main() { - var unused_var2 = 20; - alert(100); -} - -main(); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/test.js deleted file mode 100755 index f295fba8..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/test.js +++ /dev/null @@ -1,30 +0,0 @@ -#! /usr/bin/env node - -global.sys = require(/^v0\.[012]/.test(process.version) ? "sys" : "util"); -var fs = require("fs"); -var uglify = require("uglify-js"), // symlink ~/.node_libraries/uglify-js.js to ../uglify-js.js - jsp = uglify.parser, - pro = uglify.uglify; - -var code = fs.readFileSync("hoist.js", "utf8"); -var ast = jsp.parse(code); - -ast = pro.ast_lift_variables(ast); - -var w = pro.ast_walker(); -ast = w.with_walkers({ - "function": function() { - var node = w.dive(this); // walk depth first - console.log(pro.gen_code(node, { beautify: true })); - return node; - }, - "name": function(name) { - return [ this[0], "X" ]; - } -}, function(){ - return w.walk(ast); -}); - -console.log(pro.gen_code(ast, { - beautify: true -})); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/uglify-hangs.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/uglify-hangs.js deleted file mode 100644 index 0d5b7e0e..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/uglify-hangs.js +++ /dev/null @@ -1,3930 +0,0 @@ -/** - * @fileoverview - * - * JsWorld - * - *

    Javascript library for localised formatting and parsing of: - *

      - *
    • Numbers - *
    • Dates and times - *
    • Currency - *
    - * - *

    The library classes are configured with standard POSIX locale definitions - * derived from Unicode's Common Locale Data Repository (CLDR). - * - *

    Website: JsWorld - * - * @author Vladimir Dzhuvinov - * @version 2.5 (2011-12-23) - */ - - - -/** - * @namespace Namespace container for the JsWorld library objects. - */ -jsworld = {}; - - -/** - * @function - * - * @description Formats a JavaScript Date object as an ISO-8601 date/time - * string. - * - * @param {Date} [d] A valid JavaScript Date object. If undefined the - * current date/time will be used. - * @param {Boolean} [withTZ] Include timezone offset, default false. - * - * @returns {String} The date/time formatted as YYYY-MM-DD HH:MM:SS. - */ -jsworld.formatIsoDateTime = function(d, withTZ) { - - if (typeof d === "undefined") - d = new Date(); // now - - if (typeof withTZ === "undefined") - withTZ = false; - - var s = jsworld.formatIsoDate(d) + " " + jsworld.formatIsoTime(d); - - if (withTZ) { - - var diff = d.getHours() - d.getUTCHours(); - var hourDiff = Math.abs(diff); - - var minuteUTC = d.getUTCMinutes(); - var minute = d.getMinutes(); - - if (minute != minuteUTC && minuteUTC < 30 && diff < 0) - hourDiff--; - - if (minute != minuteUTC && minuteUTC > 30 && diff > 0) - hourDiff--; - - var minuteDiff; - if (minute != minuteUTC) - minuteDiff = ":30"; - else - minuteDiff = ":00"; - - var timezone; - if (hourDiff < 10) - timezone = "0" + hourDiff + minuteDiff; - - else - timezone = "" + hourDiff + minuteDiff; - - if (diff < 0) - timezone = "-" + timezone; - - else - timezone = "+" + timezone; - - s = s + timezone; - } - - return s; -}; - - -/** - * @function - * - * @description Formats a JavaScript Date object as an ISO-8601 date string. - * - * @param {Date} [d] A valid JavaScript Date object. If undefined the current - * date will be used. - * - * @returns {String} The date formatted as YYYY-MM-DD. - */ -jsworld.formatIsoDate = function(d) { - - if (typeof d === "undefined") - d = new Date(); // now - - var year = d.getFullYear(); - var month = d.getMonth() + 1; - var day = d.getDate(); - - return year + "-" + jsworld._zeroPad(month, 2) + "-" + jsworld._zeroPad(day, 2); -}; - - -/** - * @function - * - * @description Formats a JavaScript Date object as an ISO-8601 time string. - * - * @param {Date} [d] A valid JavaScript Date object. If undefined the current - * time will be used. - * - * @returns {String} The time formatted as HH:MM:SS. - */ -jsworld.formatIsoTime = function(d) { - - if (typeof d === "undefined") - d = new Date(); // now - - var hour = d.getHours(); - var minute = d.getMinutes(); - var second = d.getSeconds(); - - return jsworld._zeroPad(hour, 2) + ":" + jsworld._zeroPad(minute, 2) + ":" + jsworld._zeroPad(second, 2); -}; - - -/** - * @function - * - * @description Parses an ISO-8601 formatted date/time string to a JavaScript - * Date object. - * - * @param {String} isoDateTimeVal An ISO-8601 formatted date/time string. - * - *

    Accepted formats: - * - *

      - *
    • YYYY-MM-DD HH:MM:SS - *
    • YYYYMMDD HHMMSS - *
    • YYYY-MM-DD HHMMSS - *
    • YYYYMMDD HH:MM:SS - *
    - * - * @returns {Date} The corresponding Date object. - * - * @throws Error on a badly formatted date/time string or on a invalid date. - */ -jsworld.parseIsoDateTime = function(isoDateTimeVal) { - - if (typeof isoDateTimeVal != "string") - throw "Error: The parameter must be a string"; - - // First, try to match "YYYY-MM-DD HH:MM:SS" format - var matches = isoDateTimeVal.match(/^(\d\d\d\d)-(\d\d)-(\d\d)[T ](\d\d):(\d\d):(\d\d)/); - - // If unsuccessful, try to match "YYYYMMDD HHMMSS" format - if (matches === null) - matches = isoDateTimeVal.match(/^(\d\d\d\d)(\d\d)(\d\d)[T ](\d\d)(\d\d)(\d\d)/); - - // ... try to match "YYYY-MM-DD HHMMSS" format - if (matches === null) - matches = isoDateTimeVal.match(/^(\d\d\d\d)-(\d\d)-(\d\d)[T ](\d\d)(\d\d)(\d\d)/); - - // ... try to match "YYYYMMDD HH:MM:SS" format - if (matches === null) - matches = isoDateTimeVal.match(/^(\d\d\d\d)-(\d\d)-(\d\d)[T ](\d\d):(\d\d):(\d\d)/); - - // Report bad date/time string - if (matches === null) - throw "Error: Invalid ISO-8601 date/time string"; - - // Force base 10 parse int as some values may have leading zeros! - // (to avoid implicit octal base conversion) - var year = parseInt(matches[1], 10); - var month = parseInt(matches[2], 10); - var day = parseInt(matches[3], 10); - - var hour = parseInt(matches[4], 10); - var mins = parseInt(matches[5], 10); - var secs = parseInt(matches[6], 10); - - // Simple value range check, leap years not checked - // Note: the originial ISO time spec for leap hours (24:00:00) and seconds (00:00:60) is not supported - if (month < 1 || month > 12 || - day < 1 || day > 31 || - hour < 0 || hour > 23 || - mins < 0 || mins > 59 || - secs < 0 || secs > 59 ) - - throw "Error: Invalid ISO-8601 date/time value"; - - var d = new Date(year, month - 1, day, hour, mins, secs); - - // Check if the input date was valid - // (JS Date does automatic forward correction) - if (d.getDate() != day || d.getMonth() +1 != month) - throw "Error: Invalid date"; - - return d; -}; - - -/** - * @function - * - * @description Parses an ISO-8601 formatted date string to a JavaScript - * Date object. - * - * @param {String} isoDateVal An ISO-8601 formatted date string. - * - *

    Accepted formats: - * - *

      - *
    • YYYY-MM-DD - *
    • YYYYMMDD - *
    - * - * @returns {Date} The corresponding Date object. - * - * @throws Error on a badly formatted date string or on a invalid date. - */ -jsworld.parseIsoDate = function(isoDateVal) { - - if (typeof isoDateVal != "string") - throw "Error: The parameter must be a string"; - - // First, try to match "YYYY-MM-DD" format - var matches = isoDateVal.match(/^(\d\d\d\d)-(\d\d)-(\d\d)/); - - // If unsuccessful, try to match "YYYYMMDD" format - if (matches === null) - matches = isoDateVal.match(/^(\d\d\d\d)(\d\d)(\d\d)/); - - // Report bad date/time string - if (matches === null) - throw "Error: Invalid ISO-8601 date string"; - - // Force base 10 parse int as some values may have leading zeros! - // (to avoid implicit octal base conversion) - var year = parseInt(matches[1], 10); - var month = parseInt(matches[2], 10); - var day = parseInt(matches[3], 10); - - // Simple value range check, leap years not checked - if (month < 1 || month > 12 || - day < 1 || day > 31 ) - - throw "Error: Invalid ISO-8601 date value"; - - var d = new Date(year, month - 1, day); - - // Check if the input date was valid - // (JS Date does automatic forward correction) - if (d.getDate() != day || d.getMonth() +1 != month) - throw "Error: Invalid date"; - - return d; -}; - - -/** - * @function - * - * @description Parses an ISO-8601 formatted time string to a JavaScript - * Date object. - * - * @param {String} isoTimeVal An ISO-8601 formatted time string. - * - *

    Accepted formats: - * - *

      - *
    • HH:MM:SS - *
    • HHMMSS - *
    - * - * @returns {Date} The corresponding Date object, with year, month and day set - * to zero. - * - * @throws Error on a badly formatted time string. - */ -jsworld.parseIsoTime = function(isoTimeVal) { - - if (typeof isoTimeVal != "string") - throw "Error: The parameter must be a string"; - - // First, try to match "HH:MM:SS" format - var matches = isoTimeVal.match(/^(\d\d):(\d\d):(\d\d)/); - - // If unsuccessful, try to match "HHMMSS" format - if (matches === null) - matches = isoTimeVal.match(/^(\d\d)(\d\d)(\d\d)/); - - // Report bad date/time string - if (matches === null) - throw "Error: Invalid ISO-8601 date/time string"; - - // Force base 10 parse int as some values may have leading zeros! - // (to avoid implicit octal base conversion) - var hour = parseInt(matches[1], 10); - var mins = parseInt(matches[2], 10); - var secs = parseInt(matches[3], 10); - - // Simple value range check, leap years not checked - if (hour < 0 || hour > 23 || - mins < 0 || mins > 59 || - secs < 0 || secs > 59 ) - - throw "Error: Invalid ISO-8601 time value"; - - return new Date(0, 0, 0, hour, mins, secs); -}; - - -/** - * @private - * - * @description Trims leading and trailing whitespace from a string. - * - *

    Used non-regexp the method from http://blog.stevenlevithan.com/archives/faster-trim-javascript - * - * @param {String} str The string to trim. - * - * @returns {String} The trimmed string. - */ -jsworld._trim = function(str) { - - var whitespace = ' \n\r\t\f\x0b\xa0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000'; - - for (var i = 0; i < str.length; i++) { - - if (whitespace.indexOf(str.charAt(i)) === -1) { - str = str.substring(i); - break; - } - } - - for (i = str.length - 1; i >= 0; i--) { - if (whitespace.indexOf(str.charAt(i)) === -1) { - str = str.substring(0, i + 1); - break; - } - } - - return whitespace.indexOf(str.charAt(0)) === -1 ? str : ''; -}; - - - -/** - * @private - * - * @description Returns true if the argument represents a decimal number. - * - * @param {Number|String} arg The argument to test. - * - * @returns {Boolean} true if the argument represents a decimal number, - * otherwise false. - */ -jsworld._isNumber = function(arg) { - - if (typeof arg == "number") - return true; - - if (typeof arg != "string") - return false; - - // ensure string - var s = arg + ""; - - return (/^-?(\d+|\d*\.\d+)$/).test(s); -}; - - -/** - * @private - * - * @description Returns true if the argument represents a decimal integer. - * - * @param {Number|String} arg The argument to test. - * - * @returns {Boolean} true if the argument represents an integer, otherwise - * false. - */ -jsworld._isInteger = function(arg) { - - if (typeof arg != "number" && typeof arg != "string") - return false; - - // convert to string - var s = arg + ""; - - return (/^-?\d+$/).test(s); -}; - - -/** - * @private - * - * @description Returns true if the argument represents a decimal float. - * - * @param {Number|String} arg The argument to test. - * - * @returns {Boolean} true if the argument represents a float, otherwise false. - */ -jsworld._isFloat = function(arg) { - - if (typeof arg != "number" && typeof arg != "string") - return false; - - // convert to string - var s = arg + ""; - - return (/^-?\.\d+?$/).test(s); -}; - - -/** - * @private - * - * @description Checks if the specified formatting option is contained - * within the options string. - * - * @param {String} option The option to search for. - * @param {String} optionsString The options string. - * - * @returns {Boolean} true if the flag is found, else false - */ -jsworld._hasOption = function(option, optionsString) { - - if (typeof option != "string" || typeof optionsString != "string") - return false; - - if (optionsString.indexOf(option) != -1) - return true; - else - return false; -}; - - -/** - * @private - * - * @description String replacement function. - * - * @param {String} s The string to work on. - * @param {String} target The string to search for. - * @param {String} replacement The replacement. - * - * @returns {String} The new string. - */ -jsworld._stringReplaceAll = function(s, target, replacement) { - - var out; - - if (target.length == 1 && replacement.length == 1) { - // simple char/char case somewhat faster - out = ""; - - for (var i = 0; i < s.length; i++) { - - if (s.charAt(i) == target.charAt(0)) - out = out + replacement.charAt(0); - else - out = out + s.charAt(i); - } - - return out; - } - else { - // longer target and replacement strings - out = s; - - var index = out.indexOf(target); - - while (index != -1) { - - out = out.replace(target, replacement); - - index = out.indexOf(target); - } - - return out; - } -}; - - -/** - * @private - * - * @description Tests if a string starts with the specified substring. - * - * @param {String} testedString The string to test. - * @param {String} sub The string to match. - * - * @returns {Boolean} true if the test succeeds. - */ -jsworld._stringStartsWith = function (testedString, sub) { - - if (testedString.length < sub.length) - return false; - - for (var i = 0; i < sub.length; i++) { - if (testedString.charAt(i) != sub.charAt(i)) - return false; - } - - return true; -}; - - -/** - * @private - * - * @description Gets the requested precision from an options string. - * - *

    Example: ".3" returns 3 decimal places precision. - * - * @param {String} optionsString The options string. - * - * @returns {integer Number} The requested precision, -1 if not specified. - */ -jsworld._getPrecision = function (optionsString) { - - if (typeof optionsString != "string") - return -1; - - var m = optionsString.match(/\.(\d)/); - if (m) - return parseInt(m[1], 10); - else - return -1; -}; - - -/** - * @private - * - * @description Takes a decimal numeric amount (optionally as string) and - * returns its integer and fractional parts packed into an object. - * - * @param {Number|String} amount The amount, e.g. "123.45" or "-56.78" - * - * @returns {object} Parsed amount object with properties: - * {String} integer : the integer part - * {String} fraction : the fraction part - */ -jsworld._splitNumber = function (amount) { - - if (typeof amount == "number") - amount = amount + ""; - - var obj = {}; - - // remove negative sign - if (amount.charAt(0) == "-") - amount = amount.substring(1); - - // split amount into integer and decimal parts - var amountParts = amount.split("."); - if (!amountParts[1]) - amountParts[1] = ""; // we need "" instead of null - - obj.integer = amountParts[0]; - obj.fraction = amountParts[1]; - - return obj; -}; - - -/** - * @private - * - * @description Formats the integer part using the specified grouping - * and thousands separator. - * - * @param {String} intPart The integer part of the amount, as string. - * @param {String} grouping The grouping definition. - * @param {String} thousandsSep The thousands separator. - * - * @returns {String} The formatted integer part. - */ -jsworld._formatIntegerPart = function (intPart, grouping, thousandsSep) { - - // empty separator string? no grouping? - // -> return immediately with no formatting! - if (thousandsSep == "" || grouping == "-1") - return intPart; - - // turn the semicolon-separated string of integers into an array - var groupSizes = grouping.split(";"); - - // the formatted output string - var out = ""; - - // the intPart string position to process next, - // start at string end, e.g. "10000000 0) { - - // get next group size (if any, otherwise keep last) - if (groupSizes.length > 0) - size = parseInt(groupSizes.shift(), 10); - - // int parse error? - if (isNaN(size)) - throw "Error: Invalid grouping"; - - // size is -1? -> no more grouping, so just copy string remainder - if (size == -1) { - out = intPart.substring(0, pos) + out; - break; - } - - pos -= size; // move to next sep. char. position - - // position underrun? -> just copy string remainder - if (pos < 1) { - out = intPart.substring(0, pos + size) + out; - break; - } - - // extract group and apply sep. char. - out = thousandsSep + intPart.substring(pos, pos + size) + out; - } - - return out; -}; - - -/** - * @private - * - * @description Formats the fractional part to the specified decimal - * precision. - * - * @param {String} fracPart The fractional part of the amount - * @param {integer Number} precision The desired decimal precision - * - * @returns {String} The formatted fractional part. - */ -jsworld._formatFractionPart = function (fracPart, precision) { - - // append zeroes up to precision if necessary - for (var i=0; fracPart.length < precision; i++) - fracPart = fracPart + "0"; - - return fracPart; -}; - - -/** - * @private - * - * @desription Converts a number to string and pad it with leading zeroes if the - * string is shorter than length. - * - * @param {integer Number} number The number value subjected to selective padding. - * @param {integer Number} length If the number has fewer digits than this length - * apply padding. - * - * @returns {String} The formatted string. - */ -jsworld._zeroPad = function(number, length) { - - // ensure string - var s = number + ""; - - while (s.length < length) - s = "0" + s; - - return s; -}; - - -/** - * @private - * @description Converts a number to string and pads it with leading spaces if - * the string is shorter than length. - * - * @param {integer Number} number The number value subjected to selective padding. - * @param {integer Number} length If the number has fewer digits than this length - * apply padding. - * - * @returns {String} The formatted string. - */ -jsworld._spacePad = function(number, length) { - - // ensure string - var s = number + ""; - - while (s.length < length) - s = " " + s; - - return s; -}; - - - -/** - * @class - * Represents a POSIX-style locale with its numeric, monetary and date/time - * properties. Also provides a set of locale helper methods. - * - *

    The locale properties follow the POSIX standards: - * - *

    - * - * @public - * @constructor - * @description Creates a new locale object (POSIX-style) with the specified - * properties. - * - * @param {object} properties An object containing the raw locale properties: - * - * @param {String} properties.decimal_point - * - * A string containing the symbol that shall be used as the decimal - * delimiter (radix character) in numeric, non-monetary formatted - * quantities. This property cannot be omitted and cannot be set to the - * empty string. - * - * - * @param {String} properties.thousands_sep - * - * A string containing the symbol that shall be used as a separator for - * groups of digits to the left of the decimal delimiter in numeric, - * non-monetary formatted monetary quantities. - * - * - * @param {String} properties.grouping - * - * Defines the size of each group of digits in formatted non-monetary - * quantities. The operand is a sequence of integers separated by - * semicolons. Each integer specifies the number of digits in each group, - * with the initial integer defining the size of the group immediately - * preceding the decimal delimiter, and the following integers defining - * the preceding groups. If the last integer is not -1, then the size of - * the previous group (if any) shall be repeatedly used for the - * remainder of the digits. If the last integer is -1, then no further - * grouping shall be performed. - * - * - * @param {String} properties.int_curr_symbol - * - * The first three letters signify the ISO-4217 currency code, - * the fourth letter is the international symbol separation character - * (normally a space). - * - * - * @param {String} properties.currency_symbol - * - * The local shorthand currency symbol, e.g. "$" for the en_US locale - * - * - * @param {String} properties.mon_decimal_point - * - * The symbol to be used as the decimal delimiter (radix character) - * - * - * @param {String} properties.mon_thousands_sep - * - * The symbol to be used as a separator for groups of digits to the - * left of the decimal delimiter. - * - * - * @param {String} properties.mon_grouping - * - * A string that defines the size of each group of digits. The - * operand is a sequence of integers separated by semicolons (";"). - * Each integer specifies the number of digits in each group, with the - * initial integer defining the size of the group preceding the - * decimal delimiter, and the following integers defining the - * preceding groups. If the last integer is not -1, then the size of - * the previous group (if any) must be repeatedly used for the - * remainder of the digits. If the last integer is -1, then no - * further grouping is to be performed. - * - * - * @param {String} properties.positive_sign - * - * The string to indicate a non-negative monetary amount. - * - * - * @param {String} properties.negative_sign - * - * The string to indicate a negative monetary amount. - * - * - * @param {integer Number} properties.frac_digits - * - * An integer representing the number of fractional digits (those to - * the right of the decimal delimiter) to be written in a formatted - * monetary quantity using currency_symbol. - * - * - * @param {integer Number} properties.int_frac_digits - * - * An integer representing the number of fractional digits (those to - * the right of the decimal delimiter) to be written in a formatted - * monetary quantity using int_curr_symbol. - * - * - * @param {integer Number} properties.p_cs_precedes - * - * An integer set to 1 if the currency_symbol precedes the value for a - * monetary quantity with a non-negative value, and set to 0 if the - * symbol succeeds the value. - * - * - * @param {integer Number} properties.n_cs_precedes - * - * An integer set to 1 if the currency_symbol precedes the value for a - * monetary quantity with a negative value, and set to 0 if the symbol - * succeeds the value. - * - * - * @param {integer Number} properties.p_sep_by_space - * - * Set to a value indicating the separation of the currency_symbol, - * the sign string, and the value for a non-negative formatted monetary - * quantity: - * - *

    0 No space separates the currency symbol and value.

    - * - *

    1 If the currency symbol and sign string are adjacent, a space - * separates them from the value; otherwise, a space separates - * the currency symbol from the value.

    - * - *

    2 If the currency symbol and sign string are adjacent, a space - * separates them; otherwise, a space separates the sign string - * from the value.

    - * - * - * @param {integer Number} properties.n_sep_by_space - * - * Set to a value indicating the separation of the currency_symbol, - * the sign string, and the value for a negative formatted monetary - * quantity. Rules same as for p_sep_by_space. - * - * - * @param {integer Number} properties.p_sign_posn - * - * An integer set to a value indicating the positioning of the - * positive_sign for a monetary quantity with a non-negative value: - * - *

    0 Parentheses enclose the quantity and the currency_symbol.

    - * - *

    1 The sign string precedes the quantity and the currency_symbol.

    - * - *

    2 The sign string succeeds the quantity and the currency_symbol.

    - * - *

    3 The sign string precedes the currency_symbol.

    - * - *

    4 The sign string succeeds the currency_symbol.

    - * - * - * @param {integer Number} properties.n_sign_posn - * - * An integer set to a value indicating the positioning of the - * negative_sign for a negative formatted monetary quantity. Rules same - * as for p_sign_posn. - * - * - * @param {integer Number} properties.int_p_cs_precedes - * - * An integer set to 1 if the int_curr_symbol precedes the value for a - * monetary quantity with a non-negative value, and set to 0 if the - * symbol succeeds the value. - * - * - * @param {integer Number} properties.int_n_cs_precedes - * - * An integer set to 1 if the int_curr_symbol precedes the value for a - * monetary quantity with a negative value, and set to 0 if the symbol - * succeeds the value. - * - * - * @param {integer Number} properties.int_p_sep_by_space - * - * Set to a value indicating the separation of the int_curr_symbol, - * the sign string, and the value for a non-negative internationally - * formatted monetary quantity. Rules same as for p_sep_by_space. - * - * - * @param {integer Number} properties.int_n_sep_by_space - * - * Set to a value indicating the separation of the int_curr_symbol, - * the sign string, and the value for a negative internationally - * formatted monetary quantity. Rules same as for p_sep_by_space. - * - * - * @param {integer Number} properties.int_p_sign_posn - * - * An integer set to a value indicating the positioning of the - * positive_sign for a positive monetary quantity formatted with the - * international format. Rules same as for p_sign_posn. - * - * - * @param {integer Number} properties.int_n_sign_posn - * - * An integer set to a value indicating the positioning of the - * negative_sign for a negative monetary quantity formatted with the - * international format. Rules same as for p_sign_posn. - * - * - * @param {String[] | String} properties.abday - * - * The abbreviated weekday names, corresponding to the %a conversion - * specification. The property must be either an array of 7 strings or - * a string consisting of 7 semicolon-separated substrings, each - * surrounded by double-quotes. The first must be the abbreviated name - * of the day corresponding to Sunday, the second the abbreviated name - * of the day corresponding to Monday, and so on. - * - * - * @param {String[] | String} properties.day - * - * The full weekday names, corresponding to the %A conversion - * specification. The property must be either an array of 7 strings or - * a string consisting of 7 semicolon-separated substrings, each - * surrounded by double-quotes. The first must be the full name of the - * day corresponding to Sunday, the second the full name of the day - * corresponding to Monday, and so on. - * - * - * @param {String[] | String} properties.abmon - * - * The abbreviated month names, corresponding to the %b conversion - * specification. The property must be either an array of 12 strings or - * a string consisting of 12 semicolon-separated substrings, each - * surrounded by double-quotes. The first must be the abbreviated name - * of the first month of the year (January), the second the abbreviated - * name of the second month, and so on. - * - * - * @param {String[] | String} properties.mon - * - * The full month names, corresponding to the %B conversion - * specification. The property must be either an array of 12 strings or - * a string consisting of 12 semicolon-separated substrings, each - * surrounded by double-quotes. The first must be the full name of the - * first month of the year (January), the second the full name of the second - * month, and so on. - * - * - * @param {String} properties.d_fmt - * - * The appropriate date representation. The string may contain any - * combination of characters and conversion specifications (%). - * - * - * @param {String} properties.t_fmt - * - * The appropriate time representation. The string may contain any - * combination of characters and conversion specifications (%). - * - * - * @param {String} properties.d_t_fmt - * - * The appropriate date and time representation. The string may contain - * any combination of characters and conversion specifications (%). - * - * - * @param {String[] | String} properties.am_pm - * - * The appropriate representation of the ante-meridiem and post-meridiem - * strings, corresponding to the %p conversion specification. The property - * must be either an array of 2 strings or a string consisting of 2 - * semicolon-separated substrings, each surrounded by double-quotes. - * The first string must represent the ante-meridiem designation, the - * last string the post-meridiem designation. - * - * - * @throws @throws Error on a undefined or invalid locale property. - */ -jsworld.Locale = function(properties) { - - - /** - * @private - * - * @description Identifies the class for internal library purposes. - */ - this._className = "jsworld.Locale"; - - - /** - * @private - * - * @description Parses a day or month name definition list, which - * could be a ready JS array, e.g. ["Mon", "Tue", "Wed"...] or - * it could be a string formatted according to the classic POSIX - * definition e.g. "Mon";"Tue";"Wed";... - * - * @param {String[] | String} namesAn array or string defining - * the week/month names. - * @param {integer Number} expectedItems The number of expected list - * items, e.g. 7 for weekdays, 12 for months. - * - * @returns {String[]} The parsed (and checked) items. - * - * @throws Error on missing definition, unexpected item count or - * missing double-quotes. - */ - this._parseList = function(names, expectedItems) { - - var array = []; - - if (names == null) { - throw "Names not defined"; - } - else if (typeof names == "object") { - // we got a ready array - array = names; - } - else if (typeof names == "string") { - // we got the names in the classic POSIX form, do parse - array = names.split(";", expectedItems); - - for (var i = 0; i < array.length; i++) { - // check for and strip double quotes - if (array[i][0] == "\"" && array[i][array[i].length - 1] == "\"") - array[i] = array[i].slice(1, -1); - else - throw "Missing double quotes"; - } - } - else { - throw "Names must be an array or a string"; - } - - if (array.length != expectedItems) - throw "Expected " + expectedItems + " items, got " + array.length; - - return array; - }; - - - /** - * @private - * - * @description Validates a date/time format string, such as "H:%M:%S". - * Checks that the argument is of type "string" and is not empty. - * - * @param {String} formatString The format string. - * - * @returns {String} The validated string. - * - * @throws Error on null or empty string. - */ - this._validateFormatString = function(formatString) { - - if (typeof formatString == "string" && formatString.length > 0) - return formatString; - else - throw "Empty or no string"; - }; - - - // LC_NUMERIC - - if (properties == null || typeof properties != "object") - throw "Error: Invalid/missing locale properties"; - - - if (typeof properties.decimal_point != "string") - throw "Error: Invalid/missing decimal_point property"; - - this.decimal_point = properties.decimal_point; - - - if (typeof properties.thousands_sep != "string") - throw "Error: Invalid/missing thousands_sep property"; - - this.thousands_sep = properties.thousands_sep; - - - if (typeof properties.grouping != "string") - throw "Error: Invalid/missing grouping property"; - - this.grouping = properties.grouping; - - - // LC_MONETARY - - if (typeof properties.int_curr_symbol != "string") - throw "Error: Invalid/missing int_curr_symbol property"; - - if (! /[A-Za-z]{3}.?/.test(properties.int_curr_symbol)) - throw "Error: Invalid int_curr_symbol property"; - - this.int_curr_symbol = properties.int_curr_symbol; - - - if (typeof properties.currency_symbol != "string") - throw "Error: Invalid/missing currency_symbol property"; - - this.currency_symbol = properties.currency_symbol; - - - if (typeof properties.frac_digits != "number" && properties.frac_digits < 0) - throw "Error: Invalid/missing frac_digits property"; - - this.frac_digits = properties.frac_digits; - - - // may be empty string/null for currencies with no fractional part - if (properties.mon_decimal_point === null || properties.mon_decimal_point == "") { - - if (this.frac_digits > 0) - throw "Error: Undefined mon_decimal_point property"; - else - properties.mon_decimal_point = ""; - } - - if (typeof properties.mon_decimal_point != "string") - throw "Error: Invalid/missing mon_decimal_point property"; - - this.mon_decimal_point = properties.mon_decimal_point; - - - if (typeof properties.mon_thousands_sep != "string") - throw "Error: Invalid/missing mon_thousands_sep property"; - - this.mon_thousands_sep = properties.mon_thousands_sep; - - - if (typeof properties.mon_grouping != "string") - throw "Error: Invalid/missing mon_grouping property"; - - this.mon_grouping = properties.mon_grouping; - - - if (typeof properties.positive_sign != "string") - throw "Error: Invalid/missing positive_sign property"; - - this.positive_sign = properties.positive_sign; - - - if (typeof properties.negative_sign != "string") - throw "Error: Invalid/missing negative_sign property"; - - this.negative_sign = properties.negative_sign; - - - - if (properties.p_cs_precedes !== 0 && properties.p_cs_precedes !== 1) - throw "Error: Invalid/missing p_cs_precedes property, must be 0 or 1"; - - this.p_cs_precedes = properties.p_cs_precedes; - - - if (properties.n_cs_precedes !== 0 && properties.n_cs_precedes !== 1) - throw "Error: Invalid/missing n_cs_precedes, must be 0 or 1"; - - this.n_cs_precedes = properties.n_cs_precedes; - - - if (properties.p_sep_by_space !== 0 && - properties.p_sep_by_space !== 1 && - properties.p_sep_by_space !== 2) - throw "Error: Invalid/missing p_sep_by_space property, must be 0, 1 or 2"; - - this.p_sep_by_space = properties.p_sep_by_space; - - - if (properties.n_sep_by_space !== 0 && - properties.n_sep_by_space !== 1 && - properties.n_sep_by_space !== 2) - throw "Error: Invalid/missing n_sep_by_space property, must be 0, 1, or 2"; - - this.n_sep_by_space = properties.n_sep_by_space; - - - if (properties.p_sign_posn !== 0 && - properties.p_sign_posn !== 1 && - properties.p_sign_posn !== 2 && - properties.p_sign_posn !== 3 && - properties.p_sign_posn !== 4) - throw "Error: Invalid/missing p_sign_posn property, must be 0, 1, 2, 3 or 4"; - - this.p_sign_posn = properties.p_sign_posn; - - - if (properties.n_sign_posn !== 0 && - properties.n_sign_posn !== 1 && - properties.n_sign_posn !== 2 && - properties.n_sign_posn !== 3 && - properties.n_sign_posn !== 4) - throw "Error: Invalid/missing n_sign_posn property, must be 0, 1, 2, 3 or 4"; - - this.n_sign_posn = properties.n_sign_posn; - - - if (typeof properties.int_frac_digits != "number" && properties.int_frac_digits < 0) - throw "Error: Invalid/missing int_frac_digits property"; - - this.int_frac_digits = properties.int_frac_digits; - - - if (properties.int_p_cs_precedes !== 0 && properties.int_p_cs_precedes !== 1) - throw "Error: Invalid/missing int_p_cs_precedes property, must be 0 or 1"; - - this.int_p_cs_precedes = properties.int_p_cs_precedes; - - - if (properties.int_n_cs_precedes !== 0 && properties.int_n_cs_precedes !== 1) - throw "Error: Invalid/missing int_n_cs_precedes property, must be 0 or 1"; - - this.int_n_cs_precedes = properties.int_n_cs_precedes; - - - if (properties.int_p_sep_by_space !== 0 && - properties.int_p_sep_by_space !== 1 && - properties.int_p_sep_by_space !== 2) - throw "Error: Invalid/missing int_p_sep_by_spacev, must be 0, 1 or 2"; - - this.int_p_sep_by_space = properties.int_p_sep_by_space; - - - if (properties.int_n_sep_by_space !== 0 && - properties.int_n_sep_by_space !== 1 && - properties.int_n_sep_by_space !== 2) - throw "Error: Invalid/missing int_n_sep_by_space property, must be 0, 1, or 2"; - - this.int_n_sep_by_space = properties.int_n_sep_by_space; - - - if (properties.int_p_sign_posn !== 0 && - properties.int_p_sign_posn !== 1 && - properties.int_p_sign_posn !== 2 && - properties.int_p_sign_posn !== 3 && - properties.int_p_sign_posn !== 4) - throw "Error: Invalid/missing int_p_sign_posn property, must be 0, 1, 2, 3 or 4"; - - this.int_p_sign_posn = properties.int_p_sign_posn; - - - if (properties.int_n_sign_posn !== 0 && - properties.int_n_sign_posn !== 1 && - properties.int_n_sign_posn !== 2 && - properties.int_n_sign_posn !== 3 && - properties.int_n_sign_posn !== 4) - throw "Error: Invalid/missing int_n_sign_posn property, must be 0, 1, 2, 3 or 4"; - - this.int_n_sign_posn = properties.int_n_sign_posn; - - - // LC_TIME - - if (properties == null || typeof properties != "object") - throw "Error: Invalid/missing time locale properties"; - - - // parse the supported POSIX LC_TIME properties - - // abday - try { - this.abday = this._parseList(properties.abday, 7); - } - catch (error) { - throw "Error: Invalid abday property: " + error; - } - - // day - try { - this.day = this._parseList(properties.day, 7); - } - catch (error) { - throw "Error: Invalid day property: " + error; - } - - // abmon - try { - this.abmon = this._parseList(properties.abmon, 12); - } catch (error) { - throw "Error: Invalid abmon property: " + error; - } - - // mon - try { - this.mon = this._parseList(properties.mon, 12); - } catch (error) { - throw "Error: Invalid mon property: " + error; - } - - // d_fmt - try { - this.d_fmt = this._validateFormatString(properties.d_fmt); - } catch (error) { - throw "Error: Invalid d_fmt property: " + error; - } - - // t_fmt - try { - this.t_fmt = this._validateFormatString(properties.t_fmt); - } catch (error) { - throw "Error: Invalid t_fmt property: " + error; - } - - // d_t_fmt - try { - this.d_t_fmt = this._validateFormatString(properties.d_t_fmt); - } catch (error) { - throw "Error: Invalid d_t_fmt property: " + error; - } - - // am_pm - try { - var am_pm_strings = this._parseList(properties.am_pm, 2); - this.am = am_pm_strings[0]; - this.pm = am_pm_strings[1]; - } catch (error) { - // ignore empty/null string errors - this.am = ""; - this.pm = ""; - } - - - /** - * @public - * - * @description Returns the abbreviated name of the specified weekday. - * - * @param {integer Number} [weekdayNum] An integer between 0 and 6. Zero - * corresponds to Sunday, one to Monday, etc. If omitted the - * method will return an array of all abbreviated weekday - * names. - * - * @returns {String | String[]} The abbreviated name of the specified weekday - * or an array of all abbreviated weekday names. - * - * @throws Error on invalid argument. - */ - this.getAbbreviatedWeekdayName = function(weekdayNum) { - - if (typeof weekdayNum == "undefined" || weekdayNum === null) - return this.abday; - - if (! jsworld._isInteger(weekdayNum) || weekdayNum < 0 || weekdayNum > 6) - throw "Error: Invalid weekday argument, must be an integer [0..6]"; - - return this.abday[weekdayNum]; - }; - - - /** - * @public - * - * @description Returns the name of the specified weekday. - * - * @param {integer Number} [weekdayNum] An integer between 0 and 6. Zero - * corresponds to Sunday, one to Monday, etc. If omitted the - * method will return an array of all weekday names. - * - * @returns {String | String[]} The name of the specified weekday or an - * array of all weekday names. - * - * @throws Error on invalid argument. - */ - this.getWeekdayName = function(weekdayNum) { - - if (typeof weekdayNum == "undefined" || weekdayNum === null) - return this.day; - - if (! jsworld._isInteger(weekdayNum) || weekdayNum < 0 || weekdayNum > 6) - throw "Error: Invalid weekday argument, must be an integer [0..6]"; - - return this.day[weekdayNum]; - }; - - - /** - * @public - * - * @description Returns the abbreviated name of the specified month. - * - * @param {integer Number} [monthNum] An integer between 0 and 11. Zero - * corresponds to January, one to February, etc. If omitted the - * method will return an array of all abbreviated month names. - * - * @returns {String | String[]} The abbreviated name of the specified month - * or an array of all abbreviated month names. - * - * @throws Error on invalid argument. - */ - this.getAbbreviatedMonthName = function(monthNum) { - - if (typeof monthNum == "undefined" || monthNum === null) - return this.abmon; - - if (! jsworld._isInteger(monthNum) || monthNum < 0 || monthNum > 11) - throw "Error: Invalid month argument, must be an integer [0..11]"; - - return this.abmon[monthNum]; - }; - - - /** - * @public - * - * @description Returns the name of the specified month. - * - * @param {integer Number} [monthNum] An integer between 0 and 11. Zero - * corresponds to January, one to February, etc. If omitted the - * method will return an array of all month names. - * - * @returns {String | String[]} The name of the specified month or an array - * of all month names. - * - * @throws Error on invalid argument. - */ - this.getMonthName = function(monthNum) { - - if (typeof monthNum == "undefined" || monthNum === null) - return this.mon; - - if (! jsworld._isInteger(monthNum) || monthNum < 0 || monthNum > 11) - throw "Error: Invalid month argument, must be an integer [0..11]"; - - return this.mon[monthNum]; - }; - - - - /** - * @public - * - * @description Gets the decimal delimiter (radix) character for - * numeric quantities. - * - * @returns {String} The radix character. - */ - this.getDecimalPoint = function() { - - return this.decimal_point; - }; - - - /** - * @public - * - * @description Gets the local shorthand currency symbol. - * - * @returns {String} The currency symbol. - */ - this.getCurrencySymbol = function() { - - return this.currency_symbol; - }; - - - /** - * @public - * - * @description Gets the internaltion currency symbol (ISO-4217 code). - * - * @returns {String} The international currency symbol. - */ - this.getIntCurrencySymbol = function() { - - return this.int_curr_symbol.substring(0,3); - }; - - - /** - * @public - * - * @description Gets the position of the local (shorthand) currency - * symbol relative to the amount. Assumes a non-negative amount. - * - * @returns {Boolean} True if the symbol precedes the amount, false if - * the symbol succeeds the amount. - */ - this.currencySymbolPrecedes = function() { - - if (this.p_cs_precedes == 1) - return true; - else - return false; - }; - - - /** - * @public - * - * @description Gets the position of the international (ISO-4217 code) - * currency symbol relative to the amount. Assumes a non-negative - * amount. - * - * @returns {Boolean} True if the symbol precedes the amount, false if - * the symbol succeeds the amount. - */ - this.intCurrencySymbolPrecedes = function() { - - if (this.int_p_cs_precedes == 1) - return true; - else - return false; - - }; - - - /** - * @public - * - * @description Gets the decimal delimiter (radix) for monetary - * quantities. - * - * @returns {String} The radix character. - */ - this.getMonetaryDecimalPoint = function() { - - return this.mon_decimal_point; - }; - - - /** - * @public - * - * @description Gets the number of fractional digits for local - * (shorthand) symbol formatting. - * - * @returns {integer Number} The number of fractional digits. - */ - this.getFractionalDigits = function() { - - return this.frac_digits; - }; - - - /** - * @public - * - * @description Gets the number of fractional digits for - * international (ISO-4217 code) formatting. - * - * @returns {integer Number} The number of fractional digits. - */ - this.getIntFractionalDigits = function() { - - return this.int_frac_digits; - }; -}; - - - -/** - * @class - * Class for localised formatting of numbers. - * - *

    See: - * POSIX LC_NUMERIC. - * - * - * @public - * @constructor - * @description Creates a new numeric formatter for the specified locale. - * - * @param {jsworld.Locale} locale A locale object specifying the required - * POSIX LC_NUMERIC formatting properties. - * - * @throws Error on constructor failure. - */ -jsworld.NumericFormatter = function(locale) { - - if (typeof locale != "object" || locale._className != "jsworld.Locale") - throw "Constructor error: You must provide a valid jsworld.Locale instance"; - - this.lc = locale; - - - /** - * @public - * - * @description Formats a decimal numeric value according to the preset - * locale. - * - * @param {Number|String} number The number to format. - * @param {String} [options] Options to modify the formatted output: - *

      - *
    • "^" suppress grouping - *
    • "+" force positive sign for positive amounts - *
    • "~" suppress positive/negative sign - *
    • ".n" specify decimal precision 'n' - *
    - * - * @returns {String} The formatted number. - * - * @throws "Error: Invalid input" on bad input. - */ - this.format = function(number, options) { - - if (typeof number == "string") - number = jsworld._trim(number); - - if (! jsworld._isNumber(number)) - throw "Error: The input is not a number"; - - var floatAmount = parseFloat(number, 10); - - // get the required precision - var reqPrecision = jsworld._getPrecision(options); - - // round to required precision - if (reqPrecision != -1) - floatAmount = Math.round(floatAmount * Math.pow(10, reqPrecision)) / Math.pow(10, reqPrecision); - - - // convert the float number to string and parse into - // object with properties integer and fraction - var parsedAmount = jsworld._splitNumber(String(floatAmount)); - - // format integer part with grouping chars - var formattedIntegerPart; - - if (floatAmount === 0) - formattedIntegerPart = "0"; - else - formattedIntegerPart = jsworld._hasOption("^", options) ? - parsedAmount.integer : - jsworld._formatIntegerPart(parsedAmount.integer, - this.lc.grouping, - this.lc.thousands_sep); - - // format the fractional part - var formattedFractionPart = - reqPrecision != -1 ? - jsworld._formatFractionPart(parsedAmount.fraction, reqPrecision) : - parsedAmount.fraction; - - - // join the integer and fraction parts using the decimal_point property - var formattedAmount = - formattedFractionPart.length ? - formattedIntegerPart + this.lc.decimal_point + formattedFractionPart : - formattedIntegerPart; - - // prepend sign? - if (jsworld._hasOption("~", options) || floatAmount === 0) { - // suppress both '+' and '-' signs, i.e. return abs value - return formattedAmount; - } - else { - if (jsworld._hasOption("+", options) || floatAmount < 0) { - if (floatAmount > 0) - // force '+' sign for positive amounts - return "+" + formattedAmount; - else if (floatAmount < 0) - // prepend '-' sign - return "-" + formattedAmount; - else - // zero case - return formattedAmount; - } - else { - // positive amount with no '+' sign - return formattedAmount; - } - } - }; -}; - - -/** - * @class - * Class for localised formatting of dates and times. - * - *

    See: - * POSIX LC_TIME. - * - * @public - * @constructor - * @description Creates a new date/time formatter for the specified locale. - * - * @param {jsworld.Locale} locale A locale object specifying the required - * POSIX LC_TIME formatting properties. - * - * @throws Error on constructor failure. - */ -jsworld.DateTimeFormatter = function(locale) { - - - if (typeof locale != "object" || locale._className != "jsworld.Locale") - throw "Constructor error: You must provide a valid jsworld.Locale instance."; - - this.lc = locale; - - - /** - * @public - * - * @description Formats a date according to the preset locale. - * - * @param {Date|String} date A valid Date object instance or a string - * containing a valid ISO-8601 formatted date, e.g. "2010-31-03" - * or "2010-03-31 23:59:59". - * - * @returns {String} The formatted date - * - * @throws Error on invalid date argument - */ - this.formatDate = function(date) { - - var d = null; - - if (typeof date == "string") { - // assume ISO-8601 date string - try { - d = jsworld.parseIsoDate(date); - } catch (error) { - // try full ISO-8601 date/time string - d = jsworld.parseIsoDateTime(date); - } - } - else if (date !== null && typeof date == "object") { - // assume ready Date object - d = date; - } - else { - throw "Error: Invalid date argument, must be a Date object or an ISO-8601 date/time string"; - } - - return this._applyFormatting(d, this.lc.d_fmt); - }; - - - /** - * @public - * - * @description Formats a time according to the preset locale. - * - * @param {Date|String} date A valid Date object instance or a string - * containing a valid ISO-8601 formatted time, e.g. "23:59:59" - * or "2010-03-31 23:59:59". - * - * @returns {String} The formatted time. - * - * @throws Error on invalid date argument. - */ - this.formatTime = function(date) { - - var d = null; - - if (typeof date == "string") { - // assume ISO-8601 time string - try { - d = jsworld.parseIsoTime(date); - } catch (error) { - // try full ISO-8601 date/time string - d = jsworld.parseIsoDateTime(date); - } - } - else if (date !== null && typeof date == "object") { - // assume ready Date object - d = date; - } - else { - throw "Error: Invalid date argument, must be a Date object or an ISO-8601 date/time string"; - } - - return this._applyFormatting(d, this.lc.t_fmt); - }; - - - /** - * @public - * - * @description Formats a date/time value according to the preset - * locale. - * - * @param {Date|String} date A valid Date object instance or a string - * containing a valid ISO-8601 formatted date/time, e.g. - * "2010-03-31 23:59:59". - * - * @returns {String} The formatted time. - * - * @throws Error on invalid argument. - */ - this.formatDateTime = function(date) { - - var d = null; - - if (typeof date == "string") { - // assume ISO-8601 format - d = jsworld.parseIsoDateTime(date); - } - else if (date !== null && typeof date == "object") { - // assume ready Date object - d = date; - } - else { - throw "Error: Invalid date argument, must be a Date object or an ISO-8601 date/time string"; - } - - return this._applyFormatting(d, this.lc.d_t_fmt); - }; - - - /** - * @private - * - * @description Apples formatting to the Date object according to the - * format string. - * - * @param {Date} d A valid Date instance. - * @param {String} s The formatting string with '%' placeholders. - * - * @returns {String} The formatted string. - */ - this._applyFormatting = function(d, s) { - - s = s.replace(/%%/g, '%'); - s = s.replace(/%a/g, this.lc.abday[d.getDay()]); - s = s.replace(/%A/g, this.lc.day[d.getDay()]); - s = s.replace(/%b/g, this.lc.abmon[d.getMonth()]); - s = s.replace(/%B/g, this.lc.mon[d.getMonth()]); - s = s.replace(/%d/g, jsworld._zeroPad(d.getDate(), 2)); - s = s.replace(/%e/g, jsworld._spacePad(d.getDate(), 2)); - s = s.replace(/%F/g, d.getFullYear() + - "-" + - jsworld._zeroPad(d.getMonth()+1, 2) + - "-" + - jsworld._zeroPad(d.getDate(), 2)); - s = s.replace(/%h/g, this.lc.abmon[d.getMonth()]); // same as %b - s = s.replace(/%H/g, jsworld._zeroPad(d.getHours(), 2)); - s = s.replace(/%I/g, jsworld._zeroPad(this._hours12(d.getHours()), 2)); - s = s.replace(/%k/g, d.getHours()); - s = s.replace(/%l/g, this._hours12(d.getHours())); - s = s.replace(/%m/g, jsworld._zeroPad(d.getMonth()+1, 2)); - s = s.replace(/%n/g, "\n"); - s = s.replace(/%M/g, jsworld._zeroPad(d.getMinutes(), 2)); - s = s.replace(/%p/g, this._getAmPm(d.getHours())); - s = s.replace(/%P/g, this._getAmPm(d.getHours()).toLocaleLowerCase()); // safe? - s = s.replace(/%R/g, jsworld._zeroPad(d.getHours(), 2) + - ":" + - jsworld._zeroPad(d.getMinutes(), 2)); - s = s.replace(/%S/g, jsworld._zeroPad(d.getSeconds(), 2)); - s = s.replace(/%T/g, jsworld._zeroPad(d.getHours(), 2) + - ":" + - jsworld._zeroPad(d.getMinutes(), 2) + - ":" + - jsworld._zeroPad(d.getSeconds(), 2)); - s = s.replace(/%w/g, this.lc.day[d.getDay()]); - s = s.replace(/%y/g, new String(d.getFullYear()).substring(2)); - s = s.replace(/%Y/g, d.getFullYear()); - - s = s.replace(/%Z/g, ""); // to do: ignored until a reliable TMZ method found - - s = s.replace(/%[a-zA-Z]/g, ""); // ignore all other % sequences - - return s; - }; - - - /** - * @private - * - * @description Does 24 to 12 hour conversion. - * - * @param {integer Number} hour24 Hour [0..23]. - * - * @returns {integer Number} Corresponding hour [1..12]. - */ - this._hours12 = function(hour24) { - - if (hour24 === 0) - return 12; // 00h is 12AM - - else if (hour24 > 12) - return hour24 - 12; // 1PM to 11PM - - else - return hour24; // 1AM to 12PM - }; - - - /** - * @private - * - * @description Gets the appropriate localised AM or PM string depending - * on the day hour. Special cases: midnight is 12AM, noon is 12PM. - * - * @param {integer Number} hour24 Hour [0..23]. - * - * @returns {String} The corresponding localised AM or PM string. - */ - this._getAmPm = function(hour24) { - - if (hour24 < 12) - return this.lc.am; - else - return this.lc.pm; - }; -}; - - - -/** - * @class Class for localised formatting of currency amounts. - * - *

    See: - * POSIX LC_MONETARY. - * - * @public - * @constructor - * @description Creates a new monetary formatter for the specified locale. - * - * @param {jsworld.Locale} locale A locale object specifying the required - * POSIX LC_MONETARY formatting properties. - * @param {String} [currencyCode] Set the currency explicitly by - * passing its international ISO-4217 code, e.g. "USD", "EUR", "GBP". - * Use this optional parameter to override the default local currency - * @param {String} [altIntSymbol] Non-local currencies are formatted - * with their international ISO-4217 code to prevent ambiguity. - * Use this optional argument to force a different symbol, such as the - * currency's shorthand sign. This is mostly useful when the shorthand - * sign is both internationally recognised and identifies the currency - * uniquely (e.g. the Euro sign). - * - * @throws Error on constructor failure. - */ -jsworld.MonetaryFormatter = function(locale, currencyCode, altIntSymbol) { - - if (typeof locale != "object" || locale._className != "jsworld.Locale") - throw "Constructor error: You must provide a valid jsworld.Locale instance"; - - this.lc = locale; - - /** - * @private - * @description Lookup table to determine the fraction digits for a - * specific currency; most currencies subdivide at 1/100 (2 fractional - * digits), so we store only those that deviate from the default. - * - *

    The data is from Unicode's CLDR version 1.7.0. The two currencies - * with non-decimal subunits (MGA and MRO) are marked as having no - * fractional digits as well as all currencies that have no subunits - * in circulation. - * - *

    It is "hard-wired" for referential convenience and is only looked - * up when an overriding currencyCode parameter is supplied. - */ - this.currencyFractionDigits = { - "AFN" : 0, "ALL" : 0, "AMD" : 0, "BHD" : 3, "BIF" : 0, - "BYR" : 0, "CLF" : 0, "CLP" : 0, "COP" : 0, "CRC" : 0, - "DJF" : 0, "GNF" : 0, "GYD" : 0, "HUF" : 0, "IDR" : 0, - "IQD" : 0, "IRR" : 0, "ISK" : 0, "JOD" : 3, "JPY" : 0, - "KMF" : 0, "KRW" : 0, "KWD" : 3, "LAK" : 0, "LBP" : 0, - "LYD" : 3, "MGA" : 0, "MMK" : 0, "MNT" : 0, "MRO" : 0, - "MUR" : 0, "OMR" : 3, "PKR" : 0, "PYG" : 0, "RSD" : 0, - "RWF" : 0, "SLL" : 0, "SOS" : 0, "STD" : 0, "SYP" : 0, - "TND" : 3, "TWD" : 0, "TZS" : 0, "UGX" : 0, "UZS" : 0, - "VND" : 0, "VUV" : 0, "XAF" : 0, "XOF" : 0, "XPF" : 0, - "YER" : 0, "ZMK" : 0 - }; - - - // optional currencyCode argument? - if (typeof currencyCode == "string") { - // user wanted to override the local currency - this.currencyCode = currencyCode.toUpperCase(); - - // must override the frac digits too, for some - // currencies have 0, 2 or 3! - var numDigits = this.currencyFractionDigits[this.currencyCode]; - if (typeof numDigits != "number") - numDigits = 2; // default for most currencies - this.lc.frac_digits = numDigits; - this.lc.int_frac_digits = numDigits; - } - else { - // use local currency - this.currencyCode = this.lc.int_curr_symbol.substring(0,3).toUpperCase(); - } - - // extract intl. currency separator - this.intSep = this.lc.int_curr_symbol.charAt(3); - - // flag local or intl. sign formatting? - if (this.currencyCode == this.lc.int_curr_symbol.substring(0,3)) { - // currency matches the local one? -> - // formatting with local symbol and parameters - this.internationalFormatting = false; - this.curSym = this.lc.currency_symbol; - } - else { - // currency doesn't match the local -> - - // do we have an overriding currency symbol? - if (typeof altIntSymbol == "string") { - // -> force formatting with local parameters, using alt symbol - this.curSym = altIntSymbol; - this.internationalFormatting = false; - } - else { - // -> force formatting with intl. sign and parameters - this.internationalFormatting = true; - } - } - - - /** - * @public - * - * @description Gets the currency symbol used in formatting. - * - * @returns {String} The currency symbol. - */ - this.getCurrencySymbol = function() { - - return this.curSym; - }; - - - /** - * @public - * - * @description Gets the position of the currency symbol relative to - * the amount. Assumes a non-negative amount and local formatting. - * - * @param {String} intFlag Optional flag to force international - * formatting by passing the string "i". - * - * @returns {Boolean} True if the symbol precedes the amount, false if - * the symbol succeeds the amount. - */ - this.currencySymbolPrecedes = function(intFlag) { - - if (typeof intFlag == "string" && intFlag == "i") { - // international formatting was forced - if (this.lc.int_p_cs_precedes == 1) - return true; - else - return false; - - } - else { - // check whether local formatting is on or off - if (this.internationalFormatting) { - if (this.lc.int_p_cs_precedes == 1) - return true; - else - return false; - } - else { - if (this.lc.p_cs_precedes == 1) - return true; - else - return false; - } - } - }; - - - /** - * @public - * - * @description Gets the decimal delimiter (radix) used in formatting. - * - * @returns {String} The radix character. - */ - this.getDecimalPoint = function() { - - return this.lc.mon_decimal_point; - }; - - - /** - * @public - * - * @description Gets the number of fractional digits. Assumes local - * formatting. - * - * @param {String} intFlag Optional flag to force international - * formatting by passing the string "i". - * - * @returns {integer Number} The number of fractional digits. - */ - this.getFractionalDigits = function(intFlag) { - - if (typeof intFlag == "string" && intFlag == "i") { - // international formatting was forced - return this.lc.int_frac_digits; - } - else { - // check whether local formatting is on or off - if (this.internationalFormatting) - return this.lc.int_frac_digits; - else - return this.lc.frac_digits; - } - }; - - - /** - * @public - * - * @description Formats a monetary amount according to the preset - * locale. - * - *

    -	 * For local currencies the native shorthand symbol will be used for
    -	 * formatting.
    -	 * Example:
    -	 *        locale is en_US
    -	 *        currency is USD
    -	 *        -> the "$" symbol will be used, e.g. $123.45
    -	 *        
    -	 * For non-local currencies the international ISO-4217 code will be
    -	 * used for formatting.
    -	 * Example:
    -	 *       locale is en_US (which has USD as currency)
    -	 *       currency is EUR
    -	 *       -> the ISO three-letter code will be used, e.g. EUR 123.45
    -	 *
    -	 * If the currency is non-local, but an alternative currency symbol was
    -	 * provided, this will be used instead.
    -	 * Example
    -	 *       locale is en_US (which has USD as currency)
    -	 *       currency is EUR
    -	 *       an alternative symbol is provided - "€"
    -	 *       -> the alternative symbol will be used, e.g. €123.45
    -	 * 
    - * - * @param {Number|String} amount The amount to format as currency. - * @param {String} [options] Options to modify the formatted output: - *
      - *
    • "^" suppress grouping - *
    • "!" suppress the currency symbol - *
    • "~" suppress the currency symbol and the sign (positive or negative) - *
    • "i" force international sign (ISO-4217 code) formatting - *
    • ".n" specify decimal precision - * - * @returns The formatted currency amount as string. - * - * @throws "Error: Invalid amount" on bad amount. - */ - this.format = function(amount, options) { - - // if the amount is passed as string, check that it parses to a float - var floatAmount; - - if (typeof amount == "string") { - amount = jsworld._trim(amount); - floatAmount = parseFloat(amount); - - if (typeof floatAmount != "number" || isNaN(floatAmount)) - throw "Error: Amount string not a number"; - } - else if (typeof amount == "number") { - floatAmount = amount; - } - else { - throw "Error: Amount not a number"; - } - - // get the required precision, ".n" option arg overrides default locale config - var reqPrecision = jsworld._getPrecision(options); - - if (reqPrecision == -1) { - if (this.internationalFormatting || jsworld._hasOption("i", options)) - reqPrecision = this.lc.int_frac_digits; - else - reqPrecision = this.lc.frac_digits; - } - - // round - floatAmount = Math.round(floatAmount * Math.pow(10, reqPrecision)) / Math.pow(10, reqPrecision); - - - // convert the float amount to string and parse into - // object with properties integer and fraction - var parsedAmount = jsworld._splitNumber(String(floatAmount)); - - // format integer part with grouping chars - var formattedIntegerPart; - - if (floatAmount === 0) - formattedIntegerPart = "0"; - else - formattedIntegerPart = jsworld._hasOption("^", options) ? - parsedAmount.integer : - jsworld._formatIntegerPart(parsedAmount.integer, - this.lc.mon_grouping, - this.lc.mon_thousands_sep); - - - // format the fractional part - var formattedFractionPart; - - if (reqPrecision == -1) { - // pad fraction with trailing zeros accoring to default locale [int_]frac_digits - if (this.internationalFormatting || jsworld._hasOption("i", options)) - formattedFractionPart = - jsworld._formatFractionPart(parsedAmount.fraction, this.lc.int_frac_digits); - else - formattedFractionPart = - jsworld._formatFractionPart(parsedAmount.fraction, this.lc.frac_digits); - } - else { - // pad fraction with trailing zeros according to optional format parameter - formattedFractionPart = - jsworld._formatFractionPart(parsedAmount.fraction, reqPrecision); - } - - - // join integer and decimal parts using the mon_decimal_point property - var quantity; - - if (this.lc.frac_digits > 0 || formattedFractionPart.length) - quantity = formattedIntegerPart + this.lc.mon_decimal_point + formattedFractionPart; - else - quantity = formattedIntegerPart; - - - // do final formatting with sign and symbol - if (jsworld._hasOption("~", options)) { - return quantity; - } - else { - var suppressSymbol = jsworld._hasOption("!", options) ? true : false; - - var sign = floatAmount < 0 ? "-" : "+"; - - if (this.internationalFormatting || jsworld._hasOption("i", options)) { - - // format with ISO-4217 code (suppressed or not) - if (suppressSymbol) - return this._formatAsInternationalCurrencyWithNoSym(sign, quantity); - else - return this._formatAsInternationalCurrency(sign, quantity); - } - else { - // format with local currency code (suppressed or not) - if (suppressSymbol) - return this._formatAsLocalCurrencyWithNoSym(sign, quantity); - else - return this._formatAsLocalCurrency(sign, quantity); - } - } - }; - - - /** - * @private - * - * @description Assembles the final string with sign, separator and symbol as local - * currency. - * - * @param {String} sign The amount sign: "+" or "-". - * @param {String} q The formatted quantity (unsigned). - * - * @returns {String} The final formatted string. - */ - this._formatAsLocalCurrency = function (sign, q) { - - // assemble final formatted amount by going over all possible value combinations of: - // sign {+,-} , sign position {0,1,2,3,4} , separator {0,1,2} , symbol position {0,1} - if (sign == "+") { - - // parentheses - if (this.lc.p_sign_posn === 0 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 0) { - return "(" + q + this.curSym + ")"; - } - else if (this.lc.p_sign_posn === 0 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 1) { - return "(" + this.curSym + q + ")"; - } - else if (this.lc.p_sign_posn === 0 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 0) { - return "(" + q + " " + this.curSym + ")"; - } - else if (this.lc.p_sign_posn === 0 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 1) { - return "(" + this.curSym + " " + q + ")"; - } - - // sign before q + sym - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 0) { - return this.lc.positive_sign + q + this.curSym; - } - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + this.curSym + q; - } - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 0) { - return this.lc.positive_sign + q + " " + this.curSym; - } - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + this.curSym + " " + q; - } - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 0) { - return this.lc.positive_sign + " " + q + this.curSym; - } - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + " " + this.curSym + q; - } - - // sign after q + sym - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 0) { - return q + this.curSym + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 1) { - return this.curSym + q + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 0) { - return q + " " + this.curSym + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 1) { - return this.curSym + " " + q + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 0) { - return q + this.curSym + " " + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 1) { - return this.curSym + q + " " + this.lc.positive_sign; - } - - // sign before sym - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 0) { - return q + this.lc.positive_sign + this.curSym; - } - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + this.curSym + q; - } - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 0) { - return q + " " + this.lc.positive_sign + this.curSym; - } - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + this.curSym + " " + q; - } - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 0) { - return q + this.lc.positive_sign + " " + this.curSym; - } - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + " " + this.curSym + q; - } - - // sign after symbol - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 0) { - return q + this.curSym + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 1) { - return this.curSym + this.lc.positive_sign + q; - } - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 0) { - return q + " " + this.curSym + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 1) { - return this.curSym + this.lc.positive_sign + " " + q; - } - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 0) { - return q + this.curSym + " " + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 1) { - return this.curSym + " " + this.lc.positive_sign + q; - } - - } - else if (sign == "-") { - - // parentheses enclose q + sym - if (this.lc.n_sign_posn === 0 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 0) { - return "(" + q + this.curSym + ")"; - } - else if (this.lc.n_sign_posn === 0 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 1) { - return "(" + this.curSym + q + ")"; - } - else if (this.lc.n_sign_posn === 0 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 0) { - return "(" + q + " " + this.curSym + ")"; - } - else if (this.lc.n_sign_posn === 0 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 1) { - return "(" + this.curSym + " " + q + ")"; - } - - // sign before q + sym - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 0) { - return this.lc.negative_sign + q + this.curSym; - } - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + this.curSym + q; - } - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 0) { - return this.lc.negative_sign + q + " " + this.curSym; - } - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + this.curSym + " " + q; - } - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 0) { - return this.lc.negative_sign + " " + q + this.curSym; - } - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + " " + this.curSym + q; - } - - // sign after q + sym - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 0) { - return q + this.curSym + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 1) { - return this.curSym + q + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 0) { - return q + " " + this.curSym + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 1) { - return this.curSym + " " + q + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 0) { - return q + this.curSym + " " + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 1) { - return this.curSym + q + " " + this.lc.negative_sign; - } - - // sign before sym - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 0) { - return q + this.lc.negative_sign + this.curSym; - } - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + this.curSym + q; - } - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 0) { - return q + " " + this.lc.negative_sign + this.curSym; - } - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + this.curSym + " " + q; - } - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 0) { - return q + this.lc.negative_sign + " " + this.curSym; - } - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + " " + this.curSym + q; - } - - // sign after symbol - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 0) { - return q + this.curSym + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 1) { - return this.curSym + this.lc.negative_sign + q; - } - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 0) { - return q + " " + this.curSym + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 1) { - return this.curSym + this.lc.negative_sign + " " + q; - } - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 0) { - return q + this.curSym + " " + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 1) { - return this.curSym + " " + this.lc.negative_sign + q; - } - } - - // throw error if we fall through - throw "Error: Invalid POSIX LC MONETARY definition"; - }; - - - /** - * @private - * - * @description Assembles the final string with sign, separator and ISO-4217 - * currency code. - * - * @param {String} sign The amount sign: "+" or "-". - * @param {String} q The formatted quantity (unsigned). - * - * @returns {String} The final formatted string. - */ - this._formatAsInternationalCurrency = function (sign, q) { - - // assemble the final formatted amount by going over all possible value combinations of: - // sign {+,-} , sign position {0,1,2,3,4} , separator {0,1,2} , symbol position {0,1} - - if (sign == "+") { - - // parentheses - if (this.lc.int_p_sign_posn === 0 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 0) { - return "(" + q + this.currencyCode + ")"; - } - else if (this.lc.int_p_sign_posn === 0 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 1) { - return "(" + this.currencyCode + q + ")"; - } - else if (this.lc.int_p_sign_posn === 0 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 0) { - return "(" + q + this.intSep + this.currencyCode + ")"; - } - else if (this.lc.int_p_sign_posn === 0 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 1) { - return "(" + this.currencyCode + this.intSep + q + ")"; - } - - // sign before q + sym - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 0) { - return this.lc.positive_sign + q + this.currencyCode; - } - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.currencyCode + q; - } - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 0) { - return this.lc.positive_sign + q + this.intSep + this.currencyCode; - } - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.currencyCode + this.intSep + q; - } - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 0) { - return this.lc.positive_sign + this.intSep + q + this.currencyCode; - } - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.intSep + this.currencyCode + q; - } - - // sign after q + sym - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 0) { - return q + this.currencyCode + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 1) { - return this.currencyCode + q + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 0) { - return q + this.intSep + this.currencyCode + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 1) { - return this.currencyCode + this.intSep + q + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 0) { - return q + this.currencyCode + this.intSep + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 1) { - return this.currencyCode + q + this.intSep + this.lc.positive_sign; - } - - // sign before sym - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 0) { - return q + this.lc.positive_sign + this.currencyCode; - } - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.currencyCode + q; - } - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 0) { - return q + this.intSep + this.lc.positive_sign + this.currencyCode; - } - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.currencyCode + this.intSep + q; - } - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 0) { - return q + this.lc.positive_sign + this.intSep + this.currencyCode; - } - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.intSep + this.currencyCode + q; - } - - // sign after symbol - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 0) { - return q + this.currencyCode + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 1) { - return this.currencyCode + this.lc.positive_sign + q; - } - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 0) { - return q + this.intSep + this.currencyCode + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 1) { - return this.currencyCode + this.lc.positive_sign + this.intSep + q; - } - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 0) { - return q + this.currencyCode + this.intSep + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 1) { - return this.currencyCode + this.intSep + this.lc.positive_sign + q; - } - - } - else if (sign == "-") { - - // parentheses enclose q + sym - if (this.lc.int_n_sign_posn === 0 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 0) { - return "(" + q + this.currencyCode + ")"; - } - else if (this.lc.int_n_sign_posn === 0 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 1) { - return "(" + this.currencyCode + q + ")"; - } - else if (this.lc.int_n_sign_posn === 0 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 0) { - return "(" + q + this.intSep + this.currencyCode + ")"; - } - else if (this.lc.int_n_sign_posn === 0 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 1) { - return "(" + this.currencyCode + this.intSep + q + ")"; - } - - // sign before q + sym - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 0) { - return this.lc.negative_sign + q + this.currencyCode; - } - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.currencyCode + q; - } - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 0) { - return this.lc.negative_sign + q + this.intSep + this.currencyCode; - } - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.currencyCode + this.intSep + q; - } - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 0) { - return this.lc.negative_sign + this.intSep + q + this.currencyCode; - } - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.intSep + this.currencyCode + q; - } - - // sign after q + sym - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 0) { - return q + this.currencyCode + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 1) { - return this.currencyCode + q + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 0) { - return q + this.intSep + this.currencyCode + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 1) { - return this.currencyCode + this.intSep + q + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 0) { - return q + this.currencyCode + this.intSep + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 1) { - return this.currencyCode + q + this.intSep + this.lc.negative_sign; - } - - // sign before sym - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 0) { - return q + this.lc.negative_sign + this.currencyCode; - } - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.currencyCode + q; - } - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 0) { - return q + this.intSep + this.lc.negative_sign + this.currencyCode; - } - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.currencyCode + this.intSep + q; - } - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 0) { - return q + this.lc.negative_sign + this.intSep + this.currencyCode; - } - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.intSep + this.currencyCode + q; - } - - // sign after symbol - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 0) { - return q + this.currencyCode + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 1) { - return this.currencyCode + this.lc.negative_sign + q; - } - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 0) { - return q + this.intSep + this.currencyCode + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 1) { - return this.currencyCode + this.lc.negative_sign + this.intSep + q; - } - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 0) { - return q + this.currencyCode + this.intSep + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 1) { - return this.currencyCode + this.intSep + this.lc.negative_sign + q; - } - } - - // throw error if we fall through - throw "Error: Invalid POSIX LC MONETARY definition"; - }; - - - /** - * @private - * - * @description Assembles the final string with sign and separator, but suppress the - * local currency symbol. - * - * @param {String} sign The amount sign: "+" or "-". - * @param {String} q The formatted quantity (unsigned). - * - * @returns {String} The final formatted string - */ - this._formatAsLocalCurrencyWithNoSym = function (sign, q) { - - // assemble the final formatted amount by going over all possible value combinations of: - // sign {+,-} , sign position {0,1,2,3,4} , separator {0,1,2} , symbol position {0,1} - - if (sign == "+") { - - // parentheses - if (this.lc.p_sign_posn === 0) { - return "(" + q + ")"; - } - - // sign before q + sym - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 0) { - return this.lc.positive_sign + q; - } - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + q; - } - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 0) { - return this.lc.positive_sign + q; - } - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + q; - } - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 0) { - return this.lc.positive_sign + " " + q; - } - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + " " + q; - } - - // sign after q + sym - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 0) { - return q + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 1) { - return q + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 0) { - return q + " " + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 1) { - return q + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 0) { - return q + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 1) { - return q + " " + this.lc.positive_sign; - } - - // sign before sym - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 0) { - return q + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + q; - } - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 0) { - return q + " " + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + " " + q; - } - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 0) { - return q + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + " " + q; - } - - // sign after symbol - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 0) { - return q + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + q; - } - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 0) { - return q + " " + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + " " + q; - } - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 0) { - return q + " " + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + q; - } - - } - else if (sign == "-") { - - // parentheses enclose q + sym - if (this.lc.n_sign_posn === 0) { - return "(" + q + ")"; - } - - // sign before q + sym - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 0) { - return this.lc.negative_sign + q; - } - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + q; - } - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 0) { - return this.lc.negative_sign + q; - } - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + " " + q; - } - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 0) { - return this.lc.negative_sign + " " + q; - } - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + " " + q; - } - - // sign after q + sym - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 0) { - return q + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 1) { - return q + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 0) { - return q + " " + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 1) { - return q + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 0) { - return q + " " + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 1) { - return q + " " + this.lc.negative_sign; - } - - // sign before sym - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 0) { - return q + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + q; - } - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 0) { - return q + " " + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + " " + q; - } - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 0) { - return q + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + " " + q; - } - - // sign after symbol - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 0) { - return q + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + q; - } - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 0) { - return q + " " + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + " " + q; - } - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 0) { - return q + " " + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + q; - } - } - - // throw error if we fall through - throw "Error: Invalid POSIX LC MONETARY definition"; - }; - - - /** - * @private - * - * @description Assembles the final string with sign and separator, but suppress - * the ISO-4217 currency code. - * - * @param {String} sign The amount sign: "+" or "-". - * @param {String} q The formatted quantity (unsigned). - * - * @returns {String} The final formatted string. - */ - this._formatAsInternationalCurrencyWithNoSym = function (sign, q) { - - // assemble the final formatted amount by going over all possible value combinations of: - // sign {+,-} , sign position {0,1,2,3,4} , separator {0,1,2} , symbol position {0,1} - - if (sign == "+") { - - // parentheses - if (this.lc.int_p_sign_posn === 0) { - return "(" + q + ")"; - } - - // sign before q + sym - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 0) { - return this.lc.positive_sign + q; - } - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + q; - } - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 0) { - return this.lc.positive_sign + q; - } - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.intSep + q; - } - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 0) { - return this.lc.positive_sign + this.intSep + q; - } - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.intSep + q; - } - - // sign after q + sym - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 0) { - return q + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 1) { - return q + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 0) { - return q + this.intSep + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 1) { - return q + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 0) { - return q + this.intSep + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 1) { - return q + this.intSep + this.lc.positive_sign; - } - - // sign before sym - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 0) { - return q + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + q; - } - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 0) { - return q + this.intSep + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.intSep + q; - } - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 0) { - return q + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.intSep + q; - } - - // sign after symbol - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 0) { - return q + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + q; - } - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 0) { - return q + this.intSep + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.intSep + q; - } - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 0) { - return q + this.intSep + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + q; - } - - } - else if (sign == "-") { - - // parentheses enclose q + sym - if (this.lc.int_n_sign_posn === 0) { - return "(" + q + ")"; - } - - // sign before q + sym - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 0) { - return this.lc.negative_sign + q; - } - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + q; - } - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 0) { - return this.lc.negative_sign + q; - } - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.intSep + q; - } - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 0) { - return this.lc.negative_sign + this.intSep + q; - } - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.intSep + q; - } - - // sign after q + sym - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 0) { - return q + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 1) { - return q + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 0) { - return q + this.intSep + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 1) { - return q + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 0) { - return q + this.intSep + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 1) { - return q + this.intSep + this.lc.negative_sign; - } - - // sign before sym - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 0) { - return q + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + q; - } - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 0) { - return q + this.intSep + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.intSep + q; - } - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 0) { - return q + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.intSep + q; - } - - // sign after symbol - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 0) { - return q + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + q; - } - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 0) { - return q + this.intSep + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.intSep + q; - } - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 0) { - return q + this.intSep + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + q; - } - } - - // throw error if we fall through - throw "Error: Invalid POSIX LC_MONETARY definition"; - }; -}; - - -/** - * @class - * Class for parsing localised number strings. - * - * @public - * @constructor - * @description Creates a new numeric parser for the specified locale. - * - * @param {jsworld.Locale} locale A locale object specifying the required - * POSIX LC_NUMERIC formatting properties. - * - * @throws Error on constructor failure. - */ -jsworld.NumericParser = function(locale) { - - if (typeof locale != "object" || locale._className != "jsworld.Locale") - throw "Constructor error: You must provide a valid jsworld.Locale instance"; - - this.lc = locale; - - - /** - * @public - * - * @description Parses a numeric string formatted according to the - * preset locale. Leading and trailing whitespace is ignored; the number - * may also be formatted without thousands separators. - * - * @param {String} formattedNumber The formatted number. - * - * @returns {Number} The parsed number. - * - * @throws Error on a parse exception. - */ - this.parse = function(formattedNumber) { - - if (typeof formattedNumber != "string") - throw "Parse error: Argument must be a string"; - - // trim whitespace - var s = jsworld._trim(formattedNumber); - - // remove any thousand separator symbols - s = jsworld._stringReplaceAll(formattedNumber, this.lc.thousands_sep, ""); - - // replace any local decimal point symbols with the symbol used - // in JavaScript "." - s = jsworld._stringReplaceAll(s, this.lc.decimal_point, "."); - - // test if the string represents a number - if (jsworld._isNumber(s)) - return parseFloat(s, 10); - else - throw "Parse error: Invalid number string"; - }; -}; - - -/** - * @class - * Class for parsing localised date and time strings. - * - * @public - * @constructor - * @description Creates a new date/time parser for the specified locale. - * - * @param {jsworld.Locale} locale A locale object specifying the required - * POSIX LC_TIME formatting properties. - * - * @throws Error on constructor failure. - */ -jsworld.DateTimeParser = function(locale) { - - if (typeof locale != "object" || locale._className != "jsworld.Locale") - throw "Constructor error: You must provide a valid jsworld.Locale instance."; - - this.lc = locale; - - - /** - * @public - * - * @description Parses a time string formatted according to the - * POSIX LC_TIME t_fmt property of the preset locale. - * - * @param {String} formattedTime The formatted time. - * - * @returns {String} The parsed time in ISO-8601 format (HH:MM:SS), e.g. - * "23:59:59". - * - * @throws Error on a parse exception. - */ - this.parseTime = function(formattedTime) { - - if (typeof formattedTime != "string") - throw "Parse error: Argument must be a string"; - - var dt = this._extractTokens(this.lc.t_fmt, formattedTime); - - var timeDefined = false; - - if (dt.hour !== null && dt.minute !== null && dt.second !== null) { - timeDefined = true; - } - else if (dt.hourAmPm !== null && dt.am !== null && dt.minute !== null && dt.second !== null) { - if (dt.am) { - // AM [12(midnight), 1 .. 11] - if (dt.hourAmPm == 12) - dt.hour = 0; - else - dt.hour = parseInt(dt.hourAmPm, 10); - } - else { - // PM [12(noon), 1 .. 11] - if (dt.hourAmPm == 12) - dt.hour = 12; - else - dt.hour = parseInt(dt.hourAmPm, 10) + 12; - } - timeDefined = true; - } - - if (timeDefined) - return jsworld._zeroPad(dt.hour, 2) + - ":" + - jsworld._zeroPad(dt.minute, 2) + - ":" + - jsworld._zeroPad(dt.second, 2); - else - throw "Parse error: Invalid/ambiguous time string"; - }; - - - /** - * @public - * - * @description Parses a date string formatted according to the - * POSIX LC_TIME d_fmt property of the preset locale. - * - * @param {String} formattedDate The formatted date, must be valid. - * - * @returns {String} The parsed date in ISO-8601 format (YYYY-MM-DD), - * e.g. "2010-03-31". - * - * @throws Error on a parse exception. - */ - this.parseDate = function(formattedDate) { - - if (typeof formattedDate != "string") - throw "Parse error: Argument must be a string"; - - var dt = this._extractTokens(this.lc.d_fmt, formattedDate); - - var dateDefined = false; - - if (dt.year !== null && dt.month !== null && dt.day !== null) { - dateDefined = true; - } - - if (dateDefined) - return jsworld._zeroPad(dt.year, 4) + - "-" + - jsworld._zeroPad(dt.month, 2) + - "-" + - jsworld._zeroPad(dt.day, 2); - else - throw "Parse error: Invalid date string"; - }; - - - /** - * @public - * - * @description Parses a date/time string formatted according to the - * POSIX LC_TIME d_t_fmt property of the preset locale. - * - * @param {String} formattedDateTime The formatted date/time, must be - * valid. - * - * @returns {String} The parsed date/time in ISO-8601 format - * (YYYY-MM-DD HH:MM:SS), e.g. "2010-03-31 23:59:59". - * - * @throws Error on a parse exception. - */ - this.parseDateTime = function(formattedDateTime) { - - if (typeof formattedDateTime != "string") - throw "Parse error: Argument must be a string"; - - var dt = this._extractTokens(this.lc.d_t_fmt, formattedDateTime); - - var timeDefined = false; - var dateDefined = false; - - if (dt.hour !== null && dt.minute !== null && dt.second !== null) { - timeDefined = true; - } - else if (dt.hourAmPm !== null && dt.am !== null && dt.minute !== null && dt.second !== null) { - if (dt.am) { - // AM [12(midnight), 1 .. 11] - if (dt.hourAmPm == 12) - dt.hour = 0; - else - dt.hour = parseInt(dt.hourAmPm, 10); - } - else { - // PM [12(noon), 1 .. 11] - if (dt.hourAmPm == 12) - dt.hour = 12; - else - dt.hour = parseInt(dt.hourAmPm, 10) + 12; - } - timeDefined = true; - } - - if (dt.year !== null && dt.month !== null && dt.day !== null) { - dateDefined = true; - } - - if (dateDefined && timeDefined) - return jsworld._zeroPad(dt.year, 4) + - "-" + - jsworld._zeroPad(dt.month, 2) + - "-" + - jsworld._zeroPad(dt.day, 2) + - " " + - jsworld._zeroPad(dt.hour, 2) + - ":" + - jsworld._zeroPad(dt.minute, 2) + - ":" + - jsworld._zeroPad(dt.second, 2); - else - throw "Parse error: Invalid/ambiguous date/time string"; - }; - - - /** - * @private - * - * @description Parses a string according to the specified format - * specification. - * - * @param {String} fmtSpec The format specification, e.g. "%I:%M:%S %p". - * @param {String} s The string to parse. - * - * @returns {object} An object with set properties year, month, day, - * hour, minute and second if the corresponding values are - * found in the parsed string. - * - * @throws Error on a parse exception. - */ - this._extractTokens = function(fmtSpec, s) { - - // the return object containing the parsed date/time properties - var dt = { - // for date and date/time strings - "year" : null, - "month" : null, - "day" : null, - - // for time and date/time strings - "hour" : null, - "hourAmPm" : null, - "am" : null, - "minute" : null, - "second" : null, - - // used internally only - "weekday" : null - }; - - - // extract and process each token in the date/time spec - while (fmtSpec.length > 0) { - - // Do we have a valid "%\w" placeholder in stream? - if (fmtSpec.charAt(0) == "%" && fmtSpec.charAt(1) != "") { - - // get placeholder - var placeholder = fmtSpec.substring(0,2); - - if (placeholder == "%%") { - // escaped '%'' - s = s.substring(1); - } - else if (placeholder == "%a") { - // abbreviated weekday name - for (var i = 0; i < this.lc.abday.length; i++) { - - if (jsworld._stringStartsWith(s, this.lc.abday[i])) { - dt.weekday = i; - s = s.substring(this.lc.abday[i].length); - break; - } - } - - if (dt.weekday === null) - throw "Parse error: Unrecognised abbreviated weekday name (%a)"; - } - else if (placeholder == "%A") { - // weekday name - for (var i = 0; i < this.lc.day.length; i++) { - - if (jsworld._stringStartsWith(s, this.lc.day[i])) { - dt.weekday = i; - s = s.substring(this.lc.day[i].length); - break; - } - } - - if (dt.weekday === null) - throw "Parse error: Unrecognised weekday name (%A)"; - } - else if (placeholder == "%b" || placeholder == "%h") { - // abbreviated month name - for (var i = 0; i < this.lc.abmon.length; i++) { - - if (jsworld._stringStartsWith(s, this.lc.abmon[i])) { - dt.month = i + 1; - s = s.substring(this.lc.abmon[i].length); - break; - } - } - - if (dt.month === null) - throw "Parse error: Unrecognised abbreviated month name (%b)"; - } - else if (placeholder == "%B") { - // month name - for (var i = 0; i < this.lc.mon.length; i++) { - - if (jsworld._stringStartsWith(s, this.lc.mon[i])) { - dt.month = i + 1; - s = s.substring(this.lc.mon[i].length); - break; - } - } - - if (dt.month === null) - throw "Parse error: Unrecognised month name (%B)"; - } - else if (placeholder == "%d") { - // day of the month [01..31] - if (/^0[1-9]|[1-2][0-9]|3[0-1]/.test(s)) { - dt.day = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised day of the month (%d)"; - } - else if (placeholder == "%e") { - // day of the month [1..31] - - // Note: if %e is leading in fmt string -> space padded! - - var day = s.match(/^\s?(\d{1,2})/); - dt.day = parseInt(day, 10); - - if (isNaN(dt.day) || dt.day < 1 || dt.day > 31) - throw "Parse error: Unrecognised day of the month (%e)"; - - s = s.substring(day.length); - } - else if (placeholder == "%F") { - // equivalent to %Y-%m-%d (ISO-8601 date format) - - // year [nnnn] - if (/^\d\d\d\d/.test(s)) { - dt.year = parseInt(s.substring(0,4), 10); - s = s.substring(4); - } - else { - throw "Parse error: Unrecognised date (%F)"; - } - - // - - if (jsworld._stringStartsWith(s, "-")) - s = s.substring(1); - else - throw "Parse error: Unrecognised date (%F)"; - - // month [01..12] - if (/^0[1-9]|1[0-2]/.test(s)) { - dt.month = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised date (%F)"; - - // - - if (jsworld._stringStartsWith(s, "-")) - s = s.substring(1); - else - throw "Parse error: Unrecognised date (%F)"; - - // day of the month [01..31] - if (/^0[1-9]|[1-2][0-9]|3[0-1]/.test(s)) { - dt.day = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised date (%F)"; - } - else if (placeholder == "%H") { - // hour [00..23] - if (/^[0-1][0-9]|2[0-3]/.test(s)) { - dt.hour = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised hour (%H)"; - } - else if (placeholder == "%I") { - // hour [01..12] - if (/^0[1-9]|1[0-2]/.test(s)) { - dt.hourAmPm = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised hour (%I)"; - } - else if (placeholder == "%k") { - // hour [0..23] - var h = s.match(/^(\d{1,2})/); - dt.hour = parseInt(h, 10); - - if (isNaN(dt.hour) || dt.hour < 0 || dt.hour > 23) - throw "Parse error: Unrecognised hour (%k)"; - - s = s.substring(h.length); - } - else if (placeholder == "%l") { - // hour AM/PM [1..12] - var h = s.match(/^(\d{1,2})/); - dt.hourAmPm = parseInt(h, 10); - - if (isNaN(dt.hourAmPm) || dt.hourAmPm < 1 || dt.hourAmPm > 12) - throw "Parse error: Unrecognised hour (%l)"; - - s = s.substring(h.length); - } - else if (placeholder == "%m") { - // month [01..12] - if (/^0[1-9]|1[0-2]/.test(s)) { - dt.month = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised month (%m)"; - } - else if (placeholder == "%M") { - // minute [00..59] - if (/^[0-5][0-9]/.test(s)) { - dt.minute = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised minute (%M)"; - } - else if (placeholder == "%n") { - // new line - - if (s.charAt(0) == "\n") - s = s.substring(1); - else - throw "Parse error: Unrecognised new line (%n)"; - } - else if (placeholder == "%p") { - // locale's equivalent of AM/PM - if (jsworld._stringStartsWith(s, this.lc.am)) { - dt.am = true; - s = s.substring(this.lc.am.length); - } - else if (jsworld._stringStartsWith(s, this.lc.pm)) { - dt.am = false; - s = s.substring(this.lc.pm.length); - } - else - throw "Parse error: Unrecognised AM/PM value (%p)"; - } - else if (placeholder == "%P") { - // same as %p but forced lower case - if (jsworld._stringStartsWith(s, this.lc.am.toLowerCase())) { - dt.am = true; - s = s.substring(this.lc.am.length); - } - else if (jsworld._stringStartsWith(s, this.lc.pm.toLowerCase())) { - dt.am = false; - s = s.substring(this.lc.pm.length); - } - else - throw "Parse error: Unrecognised AM/PM value (%P)"; - } - else if (placeholder == "%R") { - // same as %H:%M - - // hour [00..23] - if (/^[0-1][0-9]|2[0-3]/.test(s)) { - dt.hour = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised time (%R)"; - - // : - if (jsworld._stringStartsWith(s, ":")) - s = s.substring(1); - else - throw "Parse error: Unrecognised time (%R)"; - - // minute [00..59] - if (/^[0-5][0-9]/.test(s)) { - dt.minute = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised time (%R)"; - - } - else if (placeholder == "%S") { - // second [00..59] - if (/^[0-5][0-9]/.test(s)) { - dt.second = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised second (%S)"; - } - else if (placeholder == "%T") { - // same as %H:%M:%S - - // hour [00..23] - if (/^[0-1][0-9]|2[0-3]/.test(s)) { - dt.hour = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised time (%T)"; - - // : - if (jsworld._stringStartsWith(s, ":")) - s = s.substring(1); - else - throw "Parse error: Unrecognised time (%T)"; - - // minute [00..59] - if (/^[0-5][0-9]/.test(s)) { - dt.minute = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised time (%T)"; - - // : - if (jsworld._stringStartsWith(s, ":")) - s = s.substring(1); - else - throw "Parse error: Unrecognised time (%T)"; - - // second [00..59] - if (/^[0-5][0-9]/.test(s)) { - dt.second = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised time (%T)"; - } - else if (placeholder == "%w") { - // weekday [0..6] - if (/^\d/.test(s)) { - dt.weekday = parseInt(s.substring(0,1), 10); - s = s.substring(1); - } - else - throw "Parse error: Unrecognised weekday number (%w)"; - } - else if (placeholder == "%y") { - // year [00..99] - if (/^\d\d/.test(s)) { - var year2digits = parseInt(s.substring(0,2), 10); - - // this conversion to year[nnnn] is arbitrary!!! - if (year2digits > 50) - dt.year = 1900 + year2digits; - else - dt.year = 2000 + year2digits; - - s = s.substring(2); - } - else - throw "Parse error: Unrecognised year (%y)"; - } - else if (placeholder == "%Y") { - // year [nnnn] - if (/^\d\d\d\d/.test(s)) { - dt.year = parseInt(s.substring(0,4), 10); - s = s.substring(4); - } - else - throw "Parse error: Unrecognised year (%Y)"; - } - - else if (placeholder == "%Z") { - // time-zone place holder is not supported - - if (fmtSpec.length === 0) - break; // ignore rest of fmt spec - } - - // remove the spec placeholder that was just parsed - fmtSpec = fmtSpec.substring(2); - } - else { - // If we don't have a placeholder, the chars - // at pos. 0 of format spec and parsed string must match - - // Note: Space chars treated 1:1 ! - - if (fmtSpec.charAt(0) != s.charAt(0)) - throw "Parse error: Unexpected symbol \"" + s.charAt(0) + "\" in date/time string"; - - fmtSpec = fmtSpec.substring(1); - s = s.substring(1); - } - } - - // parsing finished, return composite date/time object - return dt; - }; -}; - - -/** - * @class - * Class for parsing localised currency amount strings. - * - * @public - * @constructor - * @description Creates a new monetary parser for the specified locale. - * - * @param {jsworld.Locale} locale A locale object specifying the required - * POSIX LC_MONETARY formatting properties. - * - * @throws Error on constructor failure. - */ -jsworld.MonetaryParser = function(locale) { - - if (typeof locale != "object" || locale._className != "jsworld.Locale") - throw "Constructor error: You must provide a valid jsworld.Locale instance"; - - - this.lc = locale; - - - /** - * @public - * - * @description Parses a currency amount string formatted according to - * the preset locale. Leading and trailing whitespace is ignored; the - * amount may also be formatted without thousands separators. Both - * the local (shorthand) symbol and the ISO 4217 code are accepted to - * designate the currency in the formatted amount. - * - * @param {String} formattedCurrency The formatted currency amount. - * - * @returns {Number} The parsed amount. - * - * @throws Error on a parse exception. - */ - this.parse = function(formattedCurrency) { - - if (typeof formattedCurrency != "string") - throw "Parse error: Argument must be a string"; - - // Detect the format type and remove the currency symbol - var symbolType = this._detectCurrencySymbolType(formattedCurrency); - - var formatType, s; - - if (symbolType == "local") { - formatType = "local"; - s = formattedCurrency.replace(this.lc.getCurrencySymbol(), ""); - } - else if (symbolType == "int") { - formatType = "int"; - s = formattedCurrency.replace(this.lc.getIntCurrencySymbol(), ""); - } - else if (symbolType == "none") { - formatType = "local"; // assume local - s = formattedCurrency; - } - else - throw "Parse error: Internal assert failure"; - - // Remove any thousands separators - s = jsworld._stringReplaceAll(s, this.lc.mon_thousands_sep, ""); - - // Replace any local radix char with JavaScript's "." - s = s.replace(this.lc.mon_decimal_point, "."); - - // Remove all whitespaces - s = s.replace(/\s*/g, ""); - - // Remove any local non-negative sign - s = this._removeLocalNonNegativeSign(s, formatType); - - // Replace any local minus sign with JavaScript's "-" and put - // it in front of the amount if necessary - // (special parentheses rule checked too) - s = this._normaliseNegativeSign(s, formatType); - - // Finally, we should be left with a bare parsable decimal number - if (jsworld._isNumber(s)) - return parseFloat(s, 10); - else - throw "Parse error: Invalid currency amount string"; - }; - - - /** - * @private - * - * @description Tries to detect the symbol type used in the specified - * formatted currency string: local(shorthand), - * international (ISO-4217 code) or none. - * - * @param {String} formattedCurrency The the formatted currency string. - * - * @return {String} With possible values "local", "int" or "none". - */ - this._detectCurrencySymbolType = function(formattedCurrency) { - - // Check for whichever sign (int/local) is longer first - // to cover cases such as MOP/MOP$ and ZAR/R - - if (this.lc.getCurrencySymbol().length > this.lc.getIntCurrencySymbol().length) { - - if (formattedCurrency.indexOf(this.lc.getCurrencySymbol()) != -1) - return "local"; - else if (formattedCurrency.indexOf(this.lc.getIntCurrencySymbol()) != -1) - return "int"; - else - return "none"; - } - else { - if (formattedCurrency.indexOf(this.lc.getIntCurrencySymbol()) != -1) - return "int"; - else if (formattedCurrency.indexOf(this.lc.getCurrencySymbol()) != -1) - return "local"; - else - return "none"; - } - }; - - - /** - * @private - * - * @description Removes a local non-negative sign in a formatted - * currency string if it is found. This is done according to the - * locale properties p_sign_posn and int_p_sign_posn. - * - * @param {String} s The input string. - * @param {String} formatType With possible values "local" or "int". - * - * @returns {String} The processed string. - */ - this._removeLocalNonNegativeSign = function(s, formatType) { - - s = s.replace(this.lc.positive_sign, ""); - - // check for enclosing parentheses rule - if (((formatType == "local" && this.lc.p_sign_posn === 0) || - (formatType == "int" && this.lc.int_p_sign_posn === 0) ) && - /\(\d+\.?\d*\)/.test(s)) { - s = s.replace("(", ""); - s = s.replace(")", ""); - } - - return s; - }; - - - /** - * @private - * - * @description Replaces a local negative sign with the standard - * JavaScript minus ("-") sign placed in the correct position - * (preceding the amount). This is done according to the locale - * properties for negative sign symbol and relative position. - * - * @param {String} s The input string. - * @param {String} formatType With possible values "local" or "int". - * - * @returns {String} The processed string. - */ - this._normaliseNegativeSign = function(s, formatType) { - - // replace local negative symbol with JavaScript's "-" - s = s.replace(this.lc.negative_sign, "-"); - - // check for enclosing parentheses rule and replace them - // with negative sign before the amount - if ((formatType == "local" && this.lc.n_sign_posn === 0) || - (formatType == "int" && this.lc.int_n_sign_posn === 0) ) { - - if (/^\(\d+\.?\d*\)$/.test(s)) { - - s = s.replace("(", ""); - s = s.replace(")", ""); - return "-" + s; - } - } - - // check for rule negative sign succeeding the amount - if (formatType == "local" && this.lc.n_sign_posn == 2 || - formatType == "int" && this.lc.int_n_sign_posn == 2 ) { - - if (/^\d+\.?\d*-$/.test(s)) { - s = s.replace("-", ""); - return "-" + s; - } - } - - // check for rule cur. sym. succeeds and sign adjacent - if (formatType == "local" && this.lc.n_cs_precedes === 0 && this.lc.n_sign_posn == 3 || - formatType == "local" && this.lc.n_cs_precedes === 0 && this.lc.n_sign_posn == 4 || - formatType == "int" && this.lc.int_n_cs_precedes === 0 && this.lc.int_n_sign_posn == 3 || - formatType == "int" && this.lc.int_n_cs_precedes === 0 && this.lc.int_n_sign_posn == 4 ) { - - if (/^\d+\.?\d*-$/.test(s)) { - s = s.replace("-", ""); - return "-" + s; - } - } - - return s; - }; -}; - -// end-of-file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/uglify-hangs2.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/uglify-hangs2.js deleted file mode 100644 index 4e9f9672..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/uglify-hangs2.js +++ /dev/null @@ -1,166 +0,0 @@ -jsworld.Locale = function(properties) { - - // LC_NUMERIC - - - this.frac_digits = properties.frac_digits; - - - // may be empty string/null for currencies with no fractional part - if (properties.mon_decimal_point === null || properties.mon_decimal_point == "") { - - if (this.frac_digits > 0) - throw "Error: Undefined mon_decimal_point property"; - else - properties.mon_decimal_point = ""; - } - - if (typeof properties.mon_decimal_point != "string") - throw "Error: Invalid/missing mon_decimal_point property"; - - this.mon_decimal_point = properties.mon_decimal_point; - - - if (typeof properties.mon_thousands_sep != "string") - throw "Error: Invalid/missing mon_thousands_sep property"; - - this.mon_thousands_sep = properties.mon_thousands_sep; - - - if (typeof properties.mon_grouping != "string") - throw "Error: Invalid/missing mon_grouping property"; - - this.mon_grouping = properties.mon_grouping; - - - if (typeof properties.positive_sign != "string") - throw "Error: Invalid/missing positive_sign property"; - - this.positive_sign = properties.positive_sign; - - - if (typeof properties.negative_sign != "string") - throw "Error: Invalid/missing negative_sign property"; - - this.negative_sign = properties.negative_sign; - - - if (properties.p_cs_precedes !== 0 && properties.p_cs_precedes !== 1) - throw "Error: Invalid/missing p_cs_precedes property, must be 0 or 1"; - - this.p_cs_precedes = properties.p_cs_precedes; - - - if (properties.n_cs_precedes !== 0 && properties.n_cs_precedes !== 1) - throw "Error: Invalid/missing n_cs_precedes, must be 0 or 1"; - - this.n_cs_precedes = properties.n_cs_precedes; - - - if (properties.p_sep_by_space !== 0 && - properties.p_sep_by_space !== 1 && - properties.p_sep_by_space !== 2) - throw "Error: Invalid/missing p_sep_by_space property, must be 0, 1 or 2"; - - this.p_sep_by_space = properties.p_sep_by_space; - - - if (properties.n_sep_by_space !== 0 && - properties.n_sep_by_space !== 1 && - properties.n_sep_by_space !== 2) - throw "Error: Invalid/missing n_sep_by_space property, must be 0, 1, or 2"; - - this.n_sep_by_space = properties.n_sep_by_space; - - - if (properties.p_sign_posn !== 0 && - properties.p_sign_posn !== 1 && - properties.p_sign_posn !== 2 && - properties.p_sign_posn !== 3 && - properties.p_sign_posn !== 4) - throw "Error: Invalid/missing p_sign_posn property, must be 0, 1, 2, 3 or 4"; - - this.p_sign_posn = properties.p_sign_posn; - - - if (properties.n_sign_posn !== 0 && - properties.n_sign_posn !== 1 && - properties.n_sign_posn !== 2 && - properties.n_sign_posn !== 3 && - properties.n_sign_posn !== 4) - throw "Error: Invalid/missing n_sign_posn property, must be 0, 1, 2, 3 or 4"; - - this.n_sign_posn = properties.n_sign_posn; - - - if (typeof properties.int_frac_digits != "number" && properties.int_frac_digits < 0) - throw "Error: Invalid/missing int_frac_digits property"; - - this.int_frac_digits = properties.int_frac_digits; - - - if (properties.int_p_cs_precedes !== 0 && properties.int_p_cs_precedes !== 1) - throw "Error: Invalid/missing int_p_cs_precedes property, must be 0 or 1"; - - this.int_p_cs_precedes = properties.int_p_cs_precedes; - - - if (properties.int_n_cs_precedes !== 0 && properties.int_n_cs_precedes !== 1) - throw "Error: Invalid/missing int_n_cs_precedes property, must be 0 or 1"; - - this.int_n_cs_precedes = properties.int_n_cs_precedes; - - - if (properties.int_p_sep_by_space !== 0 && - properties.int_p_sep_by_space !== 1 && - properties.int_p_sep_by_space !== 2) - throw "Error: Invalid/missing int_p_sep_by_spacev, must be 0, 1 or 2"; - - this.int_p_sep_by_space = properties.int_p_sep_by_space; - - - if (properties.int_n_sep_by_space !== 0 && - properties.int_n_sep_by_space !== 1 && - properties.int_n_sep_by_space !== 2) - throw "Error: Invalid/missing int_n_sep_by_space property, must be 0, 1, or 2"; - - this.int_n_sep_by_space = properties.int_n_sep_by_space; - - - if (properties.int_p_sign_posn !== 0 && - properties.int_p_sign_posn !== 1 && - properties.int_p_sign_posn !== 2 && - properties.int_p_sign_posn !== 3 && - properties.int_p_sign_posn !== 4) - throw "Error: Invalid/missing int_p_sign_posn property, must be 0, 1, 2, 3 or 4"; - - this.int_p_sign_posn = properties.int_p_sign_posn; - - - if (properties.int_n_sign_posn !== 0 && - properties.int_n_sign_posn !== 1 && - properties.int_n_sign_posn !== 2 && - properties.int_n_sign_posn !== 3 && - properties.int_n_sign_posn !== 4) - throw "Error: Invalid/missing int_n_sign_posn property, must be 0, 1, 2, 3 or 4"; - - this.int_n_sign_posn = properties.int_n_sign_posn; - - - // LC_TIME - - if (properties == null || typeof properties != "object") - throw "Error: Invalid/missing time locale properties"; - - - // parse the supported POSIX LC_TIME properties - - // abday - try { - this.abday = this._parseList(properties.abday, 7); - } - catch (error) { - throw "Error: Invalid abday property: " + error; - } - -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/uglify-js.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/uglify-js.js deleted file mode 100644 index 4305e232..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/uglify-js.js +++ /dev/null @@ -1,17 +0,0 @@ -//convienence function(src, [options]); -function uglify(orig_code, options){ - options || (options = {}); - var jsp = uglify.parser; - var pro = uglify.uglify; - - var ast = jsp.parse(orig_code, options.strict_semicolons); // parse code and get the initial AST - ast = pro.ast_mangle(ast, options.mangle_options); // get a new AST with mangled names - ast = pro.ast_squeeze(ast, options.squeeze_options); // get an AST with compression optimizations - var final_code = pro.gen_code(ast, options.gen_options); // compressed code here - return final_code; -}; - -uglify.parser = require("./lib/parse-js"); -uglify.uglify = require("./lib/process"); - -module.exports = uglify \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/.npmignore b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/.npmignore deleted file mode 100644 index 82337939..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -npm-debug.log -node_modules -.*.swp -.lock-* -build - diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/.travis.yml b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/.travis.yml deleted file mode 100644 index 08e4dad6..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -npm_args: --ws:native -node_js: - - "0.6" - - "0.8" - - "0.10" diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/History.md b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/History.md deleted file mode 100644 index 63cf0ea6..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/History.md +++ /dev/null @@ -1,312 +0,0 @@ -v0.4.31 - September 23th, 2013 -===================== - -* Component support - -v0.4.30 - August 30th, 2013 -===================== - -* BufferedAmount could be undefined, default to 0 [TooTallNate] -* Support protocols as second argument and options as third [TooTallNate] -* Proper browserify shim [mcollina] -* Broadcasting example in README [stefanocudini] - -v0.4.29 - August 23th, 2013 -===================== -* Small clean up of the Node 0.11 support by using NAN from the NPM registry [kkoopa] -* Support for custom `Agent`'s through the options. [gramakri] & [TooTallNate] -* Support for custom headers through the options [3rd-Eden] -* Added a `gypfile` flag to the package.json for compiled module discovery [wolfeidau] - -v0.4.28 - August 16th, 2013 -===================== -* Node 0.11 support. [kkoopa] -* Authorization headers are sent when basic auth is used in the url [jcrugzz] -* Origin header will now include the port number [Jason Plum] -* Race condition fixed where data was received before the readyState was updated. [saschagehlich] - -v0.4.27 - June 27th, 2013 -===================== -* Frames are no longer masked in `wscat`. [slaskis] -* Don't retrain reference to large slab buffers. [jmatthewsr-msi] -* Don't use Buffer.byteLength for ArrayBuffer's. [Anthony Pesch] -* Fix browser field in package.json. [shtylman] -* Client-side certificate support & documentation improvements. [Lukas Berns] -* WebSocket readyState's is added to the prototype for spec compatiblity. [BallBearing] -* Use Object.defineProperty. [arlolra] -* Autodetect ArrayBuffers as binary when sending. [BallBearing] -* Check instanceof Buffer for binary data. [arlolra] -* Emit the close event before destroying the internal socket. [3rd-Eden] -* Don't setup multiply timeouts for one connection. [AndreasMadsen] -* Allow support for binding to ethereal port. [wpreul] -* Fix broken terminate reference. [3rd-Eden] -* Misc node 0.10 test fixes and documentation improvements. [3rd-Eden] -* Ensure ssl options are propagated to request. [einaros] -* Add 'Host' and 'Origin' to request header. [Lars-Magnus Skog] -* Subprotocol support. [kanaka] -* Honor ArrayBufferView's byteOffset when sending. [Anthony Pesch] -* Added target attribute for events. [arlolra] - -v0.4.26 - Skipped -===================== - -v0.4.25 - December 17th, 2012 -===================== -* Removed install.js. [shtylman] -* Added browser field to package.json. [shtylman] -* Support overwriting host header. [Raynos] -* Emit 'listening' also with custom http server. [sebiq] - -v0.4.24 - December 6th, 2012 -===================== -* Yet another intermediate release, to not delay minor features any longer. -* Native support installation issues further circumvented. [einaros] - -v0.4.23 - November 19th, 2012 -===================== -* Service release - last before major upgrade. -* Changes default host from 127.0.0.1 to 0.0.0.0. [einaros] - -v0.4.22 - October 3rd, 2012 -===================== -* clear failsafe cleanup timeout once cleanup is called [AndreasMadsen] -* added w3c compatible CloseEvent for onclose / addEventListener("close", ...). [einaros] -* fix the sub protocol header handler [sonnyp] -* fix unhandled exception if socket closes and 'error' is emitted [jmatthewsr-ms] - -v0.4.21 - July 14th, 2012 -===================== -* Emit error if server reponds with anything other than status code 101. [einaros] -* Added 'headers' event to server. [rauchg] -* path.exists moved to fs.exists. [blakmatrix] - -v0.4.20 - June 26th, 2012 -===================== -* node v0.8.0 compatibility release. - -v0.4.19 - June 19th, 2012 -===================== -* Change sender to merge buffers for relatively small payloads, may improve perf in some cases [einaros] -* Avoid EventEmitter for Receiver classes. As above this may improve perf. [einaros] -* Renamed fallback files from the somewhat misleading '*Windows'. [einaros] - -v0.4.18 - June 14th 2012 -===================== -* Fixed incorrect md5 digest encoding in Hixie handshake [nicokaiser] -* Added example of use with Express 3 [einaros] -* Change installation procedure to not require --ws:native to build native extensions. They will now build if a compiler is available. [einaros] - -v0.4.17 - June 13th 2012 -===================== -* Improve error handling during connection handshaking [einaros] -* Ensure that errors are caught also after connection teardown [nicokaiser] -* Update 'mocha' version to 1.1.0. [einaros] -* Stop showing 'undefined' for some error logs. [tricknotes] -* Update 'should' version to 0.6.3 [tricknotes] - -v0.4.16 - June 1st 2012 -===================== -* Build fix for Windows. [einaros] - -v0.4.15 - May 20th 2012 -===================== -* Enable fauxe streaming for hixie tansport. [einaros] -* Allow hixie sender to deal with buffers. [einaros/pigne] -* Allow error code 1011. [einaros] -* Fix framing for empty packets (empty pings and pongs might break). [einaros] -* Improve error and close handling, to avoid connections lingering in CLOSING state. [einaros] - -v0.4.14 - Apr 30th 2012 -===================== -* use node-gyp instead of node-waf [TooTallNate] -* remove old windows compatibility makefile, and silently fall back to native modules [einaros] -* ensure connection status [nicokaiser] -* websocket client updated to use port 443 by default for wss:// connections [einaros] -* support unix sockets [kschzt] - -v0.4.13 - Apr 12th 2012 -===================== - -* circumvent node 0.6+ related memory leak caused by Object.defineProperty [nicokaiser] -* improved error handling, improving stability in massive load use cases [nicokaiser] - -v0.4.12 - Mar 30th 2012 -===================== - -* various memory leak / possible memory leak cleanups [einaros] -* api documentation [nicokaiser] -* add option to disable client tracking [nicokaiser] - -v0.4.11 - Mar 24th 2012 -===================== - -* node v0.7 compatibillity release -* gyp support [TooTallNate] -* commander dependency update [jwueller] -* loadbalancer support [nicokaiser] - -v0.4.10 - Mar 22th 2012 -===================== - -* Final hixie close frame fixes. [nicokaiser] - -v0.4.9 - Mar 21st 2012 -===================== - -* Various hixie bugfixes (such as proper close frame handling). [einaros] - -v0.4.8 - Feb 29th 2012 -===================== - -* Allow verifyClient to run asynchronously [karlsequin] -* Various bugfixes and cleanups. [einaros] - -v0.4.7 - Feb 21st 2012 -===================== - -* Exposed bytesReceived from websocket client object, which makes it possible to implement bandwidth sampling. [einaros] -* Updated browser based file upload example to include and output per websocket channel bandwidth sampling. [einaros] -* Changed build scripts to check which architecture is currently in use. Required after the node.js changes to have prebuilt packages target ia32 by default. [einaros] - -v0.4.6 - Feb 9th 2012 -===================== - -* Added browser based file upload example. [einaros] -* Added server-to-browser status push example. [einaros] -* Exposed pause() and resume() on WebSocket object, to enable client stream shaping. [einaros] - -v0.4.5 - Feb 7th 2012 -===================== - -* Corrected regression bug in handling of connections with the initial frame delivered across both http upgrade head and a standalone packet. This would lead to a race condition, which in some cases could cause message corruption. [einaros] - -v0.4.4 - Feb 6th 2012 -===================== - -* Pass original request object to verifyClient, for cookie or authentication verifications. [einaros] -* Implemented addEventListener and slightly improved the emulation API by adding a MessageEvent with a readonly data attribute. [aslakhellesoy] -* Rewrite parts of hybi receiver to avoid stack overflows for large amounts of packets bundled in the same buffer / packet. [einaros] - -v0.4.3 - Feb 4th 2012 -===================== - -* Prioritized update: Corrected issue which would cause sockets to stay open longer than necessary, and resource leakage because of this. [einaros] - -v0.4.2 - Feb 4th 2012 -===================== - -* Breaking change: WebSocketServer's verifyOrigin option has been renamed to verifyClient. [einaros] -* verifyClient now receives { origin: 'origin header', secure: true/false }, where 'secure' will be true for ssl connections. [einaros] -* Split benchmark, in preparation for more thorough case. [einaros] -* Introduced hixie-76 draft support for server, since Safari (iPhone / iPad / OS X) and Opera still aren't updated to use Hybi. [einaros] -* Expose 'supports' object from WebSocket, to indicate e.g. the underlying transport's support for binary data. [einaros] -* Test and code cleanups. [einaros] - -v0.4.1 - Jan 25th 2012 -===================== - -* Use readline in wscat [tricknotes] -* Refactor _state away, in favor of the new _readyState [tricknotes] -* travis-ci integration [einaros] -* Fixed race condition in testsuite, causing a few tests to fail (without actually indicating errors) on travis [einaros] -* Expose pong event [paddybyers] -* Enabled running of WebSocketServer in noServer-mode, meaning that upgrades are passed in manually. [einaros] -* Reworked connection procedure for WebSocketServer, and cleaned up tests. [einaros] - -v0.4.0 - Jan 2nd 2012 -===================== - -* Windows compatibility [einaros] -* Windows compatible test script [einaros] - -v0.3.9 - Jan 1st 2012 -====================== - -* Improved protocol framing performance [einaros] -* WSS support [kazuyukitanimura] -* WSS tests [einaros] -* readyState exposed [justinlatimer, tricknotes] -* url property exposed [justinlatimer] -* Removed old 'state' property [einaros] -* Test cleanups [einaros] - -v0.3.8 - Dec 27th 2011 -====================== - -* Made it possible to listen on specific paths, which is especially good to have for precreated http servers [einaros] -* Extensive WebSocket / WebSocketServer cleanup, including changing all internal properties to unconfigurable, unenumerable properties [einaros] -* Receiver modifications to ensure even better performance with fragmented sends [einaros] -* Fixed issue in sender.js, which would cause SlowBuffer instances (such as returned from the crypto library's randomBytes) to be copied (and thus be dead slow) [einaros] -* Removed redundant buffer copy in sender.js, which should improve server performance [einaros] - -v0.3.7 - Dec 25nd 2011 -====================== - -* Added a browser based API which uses EventEmitters internally [3rd-Eden] -* Expose request information from upgrade event for websocket server clients [mmalecki] - -v0.3.6 - Dec 19th 2011 -====================== - -* Added option to let WebSocket.Server use an already existing http server [mmalecki] -* Migrating various option structures to use options.js module [einaros] -* Added a few more tests, options and handshake verifications to ensure that faulty connections are dealt with [einaros] -* Code cleanups in Sender and Receiver, to ensure even faster parsing [einaros] - -v0.3.5 - Dec 13th 2011 -====================== - -* Optimized Sender.js, Receiver.js and bufferutil.cc: - * Apply loop-unrolling-like small block copies rather than use node.js Buffer#copy() (which is slow). - * Mask blocks of data using combination of 32bit xor and loop-unrolling, instead of single bytes. - * Keep pre-made send buffer for small transfers. -* Leak fixes and code cleanups. - -v0.3.3 - Dec 12th 2011 -====================== - -* Compile fix for Linux. -* Rewrote parts of WebSocket.js, to avoid try/catch and thus avoid optimizer bailouts. - -v0.3.2 - Dec 11th 2011 -====================== - -* Further performance updates, including the additions of a native BufferUtil module, which deals with several of the cpu intensive WebSocket operations. - -v0.3.1 - Dec 8th 2011 -====================== - -* Service release, fixing broken tests. - -v0.3.0 - Dec 8th 2011 -====================== - -* Node.js v0.4.x compatibility. -* Code cleanups and efficiency improvements. -* WebSocket server added, although this will still mainly be a client library. -* WebSocket server certified to pass the Autobahn test suite. -* Protocol improvements and corrections - such as handling (redundant) masks for empty fragments. -* 'wscat' command line utility added, which can act as either client or server. - -v0.2.6 - Dec 3rd 2011 -====================== - -* Renamed to 'ws'. Big woop, right -- but easy-websocket really just doesn't cut it anymore! - -v0.2.5 - Dec 3rd 2011 -====================== - - * Rewrote much of the WebSocket parser, to ensure high speed for highly fragmented messages. - * Added a BufferPool, as a start to more efficiently deal with allocations for WebSocket connections. More work to come, in that area. - * Updated the Autobahn report, at http://einaros.github.com/easy-websocket, with comparisons against WebSocket-Node 1.0.2 and Chrome 16. - -v0.2.0 - Nov 25th 2011 -====================== - - * Major rework to make sure all the Autobahn test cases pass. Also updated the internal tests to cover more corner cases. - -v0.1.2 - Nov 14th 2011 -====================== - - * Back and forth, back and forth: now settled on keeping the api (event names, methods) closer to the websocket browser api. This will stick now. - * Started keeping this history record. Better late than never, right? diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/Makefile b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/Makefile deleted file mode 100644 index 151aa2ba..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -ALL_TESTS = $(shell find test/ -name '*.test.js') -ALL_INTEGRATION = $(shell find test/ -name '*.integration.js') - -all: - node-gyp configure build - -clean: - node-gyp clean - -run-tests: - @./node_modules/.bin/mocha \ - -t 2000 \ - -s 2400 \ - $(TESTFLAGS) \ - $(TESTS) - -run-integrationtests: - @./node_modules/.bin/mocha \ - -t 5000 \ - -s 6000 \ - $(TESTFLAGS) \ - $(TESTS) - -test: - @$(MAKE) NODE_TLS_REJECT_UNAUTHORIZED=0 NODE_PATH=lib TESTS="$(ALL_TESTS)" run-tests - -integrationtest: - @$(MAKE) NODE_TLS_REJECT_UNAUTHORIZED=0 NODE_PATH=lib TESTS="$(ALL_INTEGRATION)" run-integrationtests - -benchmark: - @node bench/sender.benchmark.js - @node bench/parser.benchmark.js - -autobahn: - @NODE_PATH=lib node test/autobahn.js - -autobahn-server: - @NODE_PATH=lib node test/autobahn-server.js - -.PHONY: test diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/README.md b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/README.md deleted file mode 100644 index e6646e76..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/README.md +++ /dev/null @@ -1,171 +0,0 @@ -[![Build Status](https://secure.travis-ci.org/einaros/ws.png)](http://travis-ci.org/einaros/ws) - -# ws: a node.js websocket library # - -`ws` is a simple to use websocket implementation, up-to-date against RFC-6455, and [probably the fastest WebSocket library for node.js](http://web.archive.org/web/20130314230536/http://hobbycoding.posterous.com/the-fastest-websocket-module-for-nodejs). - -Passes the quite extensive Autobahn test suite. See http://einaros.github.com/ws for the full reports. - -Comes with a command line utility, `wscat`, which can either act as a server (--listen), or client (--connect); Use it to debug simple websocket services. - -## Protocol support ## - -* **Hixie draft 76** (Old and deprecated, but still in use by Safari and Opera. Added to ws version 0.4.2, but server only. Can be disabled by setting the `disableHixie` option to true.) -* **HyBi drafts 07-12** (Use the option `protocolVersion: 8`, or argument `-p 8` for wscat) -* **HyBi drafts 13-17** (Current default, alternatively option `protocolVersion: 13`, or argument `-p 13` for wscat) - -_See the echo.websocket.org example below for how to use the `protocolVersion` option._ - -## Usage ## - -### Installing ### - -`npm install ws` - -### Sending and receiving text data ### - -```js -var WebSocket = require('ws'); -var ws = new WebSocket('ws://www.host.com/path'); -ws.on('open', function() { - ws.send('something'); -}); -ws.on('message', function(data, flags) { - // flags.binary will be set if a binary data is received - // flags.masked will be set if the data was masked -}); -``` - -### Sending binary data ### - -```js -var WebSocket = require('ws'); -var ws = new WebSocket('ws://www.host.com/path'); -ws.on('open', function() { - var array = new Float32Array(5); - for (var i = 0; i < array.length; ++i) array[i] = i / 2; - ws.send(array, {binary: true, mask: true}); -}); -``` - -Setting `mask`, as done for the send options above, will cause the data to be masked according to the websocket protocol. The same option applies for text data. - -### Server example ### - -```js -var WebSocketServer = require('ws').Server - , wss = new WebSocketServer({port: 8080}); -wss.on('connection', function(ws) { - ws.on('message', function(message) { - console.log('received: %s', message); - }); - ws.send('something'); -}); -``` - -### Server sending broadcast data ### - -```js -var WebSocketServer = require('ws').Server - , wss = new WebSocketServer({port: 8080}); - -wss.broadcast = function(data) { - for(var i in this.clients) - this.clients[i].send(data); -}; -``` - -### Error handling best practices ### - -```js -// If the WebSocket is closed before the following send is attempted -ws.send('something'); - -// Errors (both immediate and async write errors) can be detected in an optional callback. -// The callback is also the only way of being notified that data has actually been sent. -ws.send('something', function(error) { - // if error is null, the send has been completed, - // otherwise the error object will indicate what failed. -}); - -// Immediate errors can also be handled with try/catch-blocks, but **note** -// that since sends are inherently asynchronous, socket write failures will *not* -// be captured when this technique is used. -try { - ws.send('something'); -} -catch (e) { - // handle error -} -``` - -### echo.websocket.org demo ### - -```js -var WebSocket = require('ws'); -var ws = new WebSocket('ws://echo.websocket.org/', {protocolVersion: 8, origin: 'http://websocket.org'}); -ws.on('open', function() { - console.log('connected'); - ws.send(Date.now().toString(), {mask: true}); -}); -ws.on('close', function() { - console.log('disconnected'); -}); -ws.on('message', function(data, flags) { - console.log('Roundtrip time: ' + (Date.now() - parseInt(data)) + 'ms', flags); - setTimeout(function() { - ws.send(Date.now().toString(), {mask: true}); - }, 500); -}); -``` - -### wscat against echo.websocket.org ### - - $ npm install -g ws - $ wscat -c ws://echo.websocket.org -p 8 - connected (press CTRL+C to quit) - > hi there - < hi there - > are you a happy parrot? - < are you a happy parrot? - -### Other examples ### - -For a full example with a browser client communicating with a ws server, see the examples folder. - -Note that the usage together with Express 3.0 is quite different from Express 2.x. The difference is expressed in the two different serverstats-examples. - -Otherwise, see the test cases. - -### Running the tests ### - -`make test` - -## API Docs ## - -See the doc/ directory for Node.js-like docs for the ws classes. - -## License ## - -(The MIT License) - -Copyright (c) 2011 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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/parser.benchmark.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/parser.benchmark.js deleted file mode 100644 index ff5f737c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/parser.benchmark.js +++ /dev/null @@ -1,115 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -/** - * Benchmark dependencies. - */ - -var benchmark = require('benchmark') - , Receiver = require('../').Receiver - , suite = new benchmark.Suite('Receiver'); -require('tinycolor'); -require('./util'); - -/** - * Setup receiver. - */ - -suite.on('start', function () { - receiver = new Receiver(); -}); - -suite.on('cycle', function () { - receiver = new Receiver(); -}); - -/** - * Benchmarks. - */ - -var pingMessage = 'Hello' - , pingPacket1 = getBufferFromHexString('89 ' + (pack(2, 0x80 | pingMessage.length)) + - ' 34 83 a8 68 '+ getHexStringFromBuffer(mask(pingMessage, '34 83 a8 68'))); -suite.add('ping message', function () { - receiver.add(pingPacket1); -}); - -var pingPacket2 = getBufferFromHexString('89 00') -suite.add('ping with no data', function () { - receiver.add(pingPacket2); -}); - -var closePacket = getBufferFromHexString('88 00'); -suite.add('close message', function () { - receiver.add(closePacket); - receiver.endPacket(); -}); - -var maskedTextPacket = getBufferFromHexString('81 93 34 83 a8 68 01 b9 92 52 4f a1 c6 09 59 e6 8a 52 16 e6 cb 00 5b a1 d5'); -suite.add('masked text message', function () { - receiver.add(maskedTextPacket); -}); - -binaryDataPacket = (function() { - var length = 125 - , message = new Buffer(length) - for (var i = 0; i < length; ++i) message[i] = i % 10; - return getBufferFromHexString('82 ' + getHybiLengthAsHexString(length, true) + ' 34 83 a8 68 ' - + getHexStringFromBuffer(mask(message), '34 83 a8 68')); -})(); -suite.add('binary data (125 bytes)', function () { - try { - receiver.add(binaryDataPacket); - - } - catch(e) {console.log(e)} -}); - -binaryDataPacket2 = (function() { - var length = 65535 - , message = new Buffer(length) - for (var i = 0; i < length; ++i) message[i] = i % 10; - return getBufferFromHexString('82 ' + getHybiLengthAsHexString(length, true) + ' 34 83 a8 68 ' - + getHexStringFromBuffer(mask(message), '34 83 a8 68')); -})(); -suite.add('binary data (65535 bytes)', function () { - receiver.add(binaryDataPacket2); -}); - -binaryDataPacket3 = (function() { - var length = 200*1024 - , message = new Buffer(length) - for (var i = 0; i < length; ++i) message[i] = i % 10; - return getBufferFromHexString('82 ' + getHybiLengthAsHexString(length, true) + ' 34 83 a8 68 ' - + getHexStringFromBuffer(mask(message), '34 83 a8 68')); -})(); -suite.add('binary data (200 kB)', function () { - receiver.add(binaryDataPacket3); -}); - -/** - * Output progress. - */ - -suite.on('cycle', function (bench, details) { - console.log('\n ' + suite.name.grey, details.name.white.bold); - console.log(' ' + [ - details.hz.toFixed(2).cyan + ' ops/sec'.grey - , details.count.toString().white + ' times executed'.grey - , 'benchmark took '.grey + details.times.elapsed.toString().white + ' sec.'.grey - , - ].join(', '.grey)); -}); - -/** - * Run/export benchmarks. - */ - -if (!module.parent) { - suite.run(); -} else { - module.exports = suite; -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/sender.benchmark.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/sender.benchmark.js deleted file mode 100644 index 20c171a5..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/sender.benchmark.js +++ /dev/null @@ -1,66 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -/** - * Benchmark dependencies. - */ - -var benchmark = require('benchmark') - , Sender = require('../').Sender - , suite = new benchmark.Suite('Sender'); -require('tinycolor'); -require('./util'); - -/** - * Setup sender. - */ - -suite.on('start', function () { - sender = new Sender(); - sender._socket = { write: function() {} }; -}); - -suite.on('cycle', function () { - sender = new Sender(); - sender._socket = { write: function() {} }; -}); - -/** - * Benchmarks - */ - -framePacket = new Buffer(200*1024); -framePacket.fill(99); -suite.add('frameAndSend, unmasked (200 kB)', function () { - sender.frameAndSend(0x2, framePacket, true, false); -}); -suite.add('frameAndSend, masked (200 kB)', function () { - sender.frameAndSend(0x2, framePacket, true, true); -}); - -/** - * Output progress. - */ - -suite.on('cycle', function (bench, details) { - console.log('\n ' + suite.name.grey, details.name.white.bold); - console.log(' ' + [ - details.hz.toFixed(2).cyan + ' ops/sec'.grey - , details.count.toString().white + ' times executed'.grey - , 'benchmark took '.grey + details.times.elapsed.toString().white + ' sec.'.grey - , - ].join(', '.grey)); -}); - -/** - * Run/export benchmarks. - */ - -if (!module.parent) { - suite.run(); -} else { - module.exports = suite; -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/speed.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/speed.js deleted file mode 100644 index 3ce64146..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/speed.js +++ /dev/null @@ -1,105 +0,0 @@ -var cluster = require('cluster') - , WebSocket = require('../') - , WebSocketServer = WebSocket.Server - , crypto = require('crypto') - , util = require('util') - , ansi = require('ansi'); -require('tinycolor'); - -function roundPrec(num, prec) { - var mul = Math.pow(10, prec); - return Math.round(num * mul) / mul; -} - -function humanSize(bytes) { - if (bytes >= 1048576) return roundPrec(bytes / 1048576, 2) + ' MB'; - if (bytes >= 1024) return roundPrec(bytes / 1024, 2) + ' kB'; - return roundPrec(bytes, 2) + ' B'; -} - -function generateRandomData(size) { - var buffer = new Buffer(size); - for (var i = 0; i < size; ++i) { - buffer[i] = ~~(Math.random() * 127); - } - return buffer; -} - -if (cluster.isMaster) { - var wss = new WebSocketServer({port: 8181}, function() { - cluster.fork(); - }); - wss.on('connection', function(ws) { - ws.on('message', function(data, flags) { - ws.send(data, {binary: flags&&flags.binary}); - }); - ws.on('close', function() {}); - }); - cluster.on('death', function(worker) { - wss.close(); - }); -} -else { - var cursor = ansi(process.stdout); - - var configs = [ - [true, 10000, 64], - [true, 5000, 16*1024], - [true, 1000, 128*1024], - [true, 100, 1024*1024], - [true, 1, 500*1024*1024], - [false, 10000, 64], - [false, 5000, 16*1024], - [false, 1000, 128*1024], - [false, 100, 1024*1024], - ]; - - var largest = configs[0][1]; - for (var i = 0, l = configs.length; i < l; ++i) { - if (configs[i][2] > largest) largest = configs[i][2]; - } - - console.log('Generating %s of test data ...', humanSize(largest)); - var randomBytes = generateRandomData(largest); - - function roundtrip(useBinary, roundtrips, size, cb) { - var data = randomBytes.slice(0, size); - var prefix = util.format('Running %d roundtrips of %s %s data', roundtrips, humanSize(size), useBinary ? 'binary' : 'text'); - console.log(prefix); - var client = new WebSocket('ws://localhost:' + '8181'); - var dt; - var roundtrip = 0; - function send() { - client.send(data, {binary: useBinary}); - } - client.on('error', function(e) { - console.error(e); - process.exit(); - }); - client.on('open', function() { - dt = Date.now(); - send(); - }); - client.on('message', function(data, flags) { - if (++roundtrip == roundtrips) { - var elapsed = Date.now() - dt; - cursor.up(); - console.log('%s:\t%ss\t%s' - , useBinary ? prefix.green : prefix.cyan - , roundPrec(elapsed / 1000, 1).toString().green.bold - , (humanSize((size * roundtrips) / elapsed * 1000) + '/s').blue.bold); - client.close(); - cb(); - return; - } - process.nextTick(send); - }); - } - - (function run() { - if (configs.length == 0) process.exit(); - var config = configs.shift(); - config.push(run); - roundtrip.apply(null, config); - })(); -} \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/util.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/util.js deleted file mode 100644 index 5f012819..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/util.js +++ /dev/null @@ -1,105 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -/** - * Returns a Buffer from a "ff 00 ff"-type hex string. - */ - -getBufferFromHexString = function(byteStr) { - var bytes = byteStr.split(' '); - var buf = new Buffer(bytes.length); - for (var i = 0; i < bytes.length; ++i) { - buf[i] = parseInt(bytes[i], 16); - } - return buf; -} - -/** - * Returns a hex string from a Buffer. - */ - -getHexStringFromBuffer = function(data) { - var s = ''; - for (var i = 0; i < data.length; ++i) { - s += padl(data[i].toString(16), 2, '0') + ' '; - } - return s.trim(); -} - -/** - * Splits a buffer in two parts. - */ - -splitBuffer = function(buffer) { - var b1 = new Buffer(Math.ceil(buffer.length / 2)); - buffer.copy(b1, 0, 0, b1.length); - var b2 = new Buffer(Math.floor(buffer.length / 2)); - buffer.copy(b2, 0, b1.length, b1.length + b2.length); - return [b1, b2]; -} - -/** - * Performs hybi07+ type masking on a hex string or buffer. - */ - -mask = function(buf, maskString) { - if (typeof buf == 'string') buf = new Buffer(buf); - var mask = getBufferFromHexString(maskString || '34 83 a8 68'); - for (var i = 0; i < buf.length; ++i) { - buf[i] ^= mask[i % 4]; - } - return buf; -} - -/** - * Returns a hex string representing the length of a message - */ - -getHybiLengthAsHexString = function(len, masked) { - if (len < 126) { - var buf = new Buffer(1); - buf[0] = (masked ? 0x80 : 0) | len; - } - else if (len < 65536) { - var buf = new Buffer(3); - buf[0] = (masked ? 0x80 : 0) | 126; - getBufferFromHexString(pack(4, len)).copy(buf, 1); - } - else { - var buf = new Buffer(9); - buf[0] = (masked ? 0x80 : 0) | 127; - getBufferFromHexString(pack(16, len)).copy(buf, 1); - } - return getHexStringFromBuffer(buf); -} - -/** - * Unpacks a Buffer into a number. - */ - -unpack = function(buffer) { - var n = 0; - for (var i = 0; i < buffer.length; ++i) { - n = (i == 0) ? buffer[i] : (n * 256) + buffer[i]; - } - return n; -} - -/** - * Returns a hex string, representing a specific byte count 'length', from a number. - */ - -pack = function(length, number) { - return padl(number.toString(16), length, '0').replace(/([0-9a-f][0-9a-f])/gi, '$1 ').trim(); -} - -/** - * Left pads the string 's' to a total length of 'n' with char 'c'. - */ - -padl = function(s, n, c) { - return new Array(1 + n - s.length).join(c) + s; -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bin/wscat b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bin/wscat deleted file mode 100755 index 0ec894df..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bin/wscat +++ /dev/null @@ -1,190 +0,0 @@ -#!/usr/bin/env node - -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var WebSocket = require('../') - , fs = require('fs') - , program = require('commander') - , util = require('util') - , events = require('events') - , readline = require('readline'); - -/** - * InputReader - processes console input - */ - -function 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(data) { - self.emit('line', data); - }); - this.readlineInterface.on('close', function() { - 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() { - this.readlineInterface.prompt(); -} - -Console.prototype.print = function(msg, color) { - this.clear(); - color = color || Console.Colors.Default; - this.stdout.write(color + msg + Console.Colors.Default + '\n'); - this.prompt(); -} - -Console.prototype.clear = function() { - this.stdout.write('\033[2K\033[E'); -} - -Console.prototype.pause = function() { - this.stdin.on('keypress', this._resetInput); -} - -Console.prototype.resume = function() { - this.stdin.removeListener('keypress', this._resetInput); -} - -/** - * The actual application - */ - -var version = JSON.parse(fs.readFileSync(__dirname + '/../package.json', 'utf8')).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') - .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; - var ws = null; - var wss = new WebSocket.Server({port: program.listen}, function() { - wsConsole.print('listening on port ' + program.listen + ' (press CTRL+C to quit)', Console.Colors.Green); - wsConsole.clear(); - }); - wsConsole.on('close', function() { - if (ws) { - try { - ws.close(); - } - catch (e) {} - } - process.exit(0); - }); - wsConsole.on('line', function(data) { - if (ws) { - ws.send(data, {mask: false}); - wsConsole.prompt(); - } - }); - wss.on('connection', function(newClient) { - if (ws) { - // limit to one client - newClient.terminate(); - return; - }; - ws = newClient; - wsConsole.resume(); - wsConsole.prompt(); - wsConsole.print('client connected', Console.Colors.Green); - ws.on('close', function() { - wsConsole.print('disconnected', Console.Colors.Green); - wsConsole.clear(); - wsConsole.pause(); - ws = null; - }); - ws.on('error', function(code, description) { - wsConsole.print('error: ' + code + (description ? ' ' + description : ''), Console.Colors.Yellow); - }); - ws.on('message', function(data, flags) { - wsConsole.print('< ' + data, Console.Colors.Blue); - }); - }); - wss.on('error', function(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; - var ws = new WebSocket(program.connect, options); - ws.on('open', function() { - wsConsole.print('connected (press CTRL+C to quit)', Console.Colors.Green); - wsConsole.on('line', function(data) { - ws.send(data, {mask: true}); - wsConsole.prompt(); - }); - }); - ws.on('close', function() { - wsConsole.print('disconnected', Console.Colors.Green); - wsConsole.clear(); - process.exit(); - }); - ws.on('error', function(code, description) { - wsConsole.print('error: ' + code + (description ? ' ' + description : ''), Console.Colors.Yellow); - process.exit(-1); - }); - ws.on('message', function(data, flags) { - wsConsole.print('< ' + data, Console.Colors.Blue); - }); - wsConsole.on('close', function() { - if (ws) { - try { - ws.close(); - } - catch(e) {} - process.exit(); - } - }); -} -else { - console.error('\033[33merror: use either --listen or --connect\033[39m'); - process.exit(-1); -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/binding.gyp b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/binding.gyp deleted file mode 100644 index c9b4d1a4..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/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/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/home/u/src/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/config.gypi -I/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/home/u/tmp/.node-gyp/0.10.26/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/home/u/tmp/.node-gyp/0.10.26" "-Dmodule_root_dir=/home/u/src/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws" binding.gyp -Makefile: $(srcdir)/../../../../../../../../../../tmp/.node-gyp/0.10.26/common.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../../../../../../../../../../usr/lib/node_modules/npm/node_modules/node-gyp/addon.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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/bufferutil.node.d b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/bufferutil.node.d deleted file mode 100644 index 03982bed..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/obj.target/bufferutil.node.d b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/obj.target/bufferutil.node.d deleted file mode 100644 index c329bd59..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/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 -m64 -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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d deleted file mode 100644 index 34ad2566..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d +++ /dev/null @@ -1,27 +0,0 @@ -cmd_Release/obj.target/bufferutil/src/bufferutil.o := g++ '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/home/u/tmp/.node-gyp/0.10.26/src -I/home/u/tmp/.node-gyp/0.10.26/deps/uv/include -I/home/u/tmp/.node-gyp/0.10.26/deps/v8/include -I/home/u/src/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan -fPIC -Wall -Wextra -Wno-unused-parameter -pthread -m64 -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/u/tmp/.node-gyp/0.10.26/deps/v8/include/v8.h \ - /home/u/tmp/.node-gyp/0.10.26/deps/v8/include/v8stdint.h \ - /home/u/tmp/.node-gyp/0.10.26/src/node.h \ - /home/u/tmp/.node-gyp/0.10.26/deps/uv/include/uv.h \ - /home/u/tmp/.node-gyp/0.10.26/deps/uv/include/uv-private/uv-unix.h \ - /home/u/tmp/.node-gyp/0.10.26/deps/uv/include/uv-private/ngx-queue.h \ - /home/u/tmp/.node-gyp/0.10.26/deps/uv/include/uv-private/uv-linux.h \ - /home/u/tmp/.node-gyp/0.10.26/src/node_object_wrap.h \ - /home/u/tmp/.node-gyp/0.10.26/src/node.h \ - /home/u/tmp/.node-gyp/0.10.26/src/node_buffer.h \ - /home/u/tmp/.node-gyp/0.10.26/src/node_object_wrap.h \ - /home/u/src/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/nan.h -../src/bufferutil.cc: -/home/u/tmp/.node-gyp/0.10.26/deps/v8/include/v8.h: -/home/u/tmp/.node-gyp/0.10.26/deps/v8/include/v8stdint.h: -/home/u/tmp/.node-gyp/0.10.26/src/node.h: -/home/u/tmp/.node-gyp/0.10.26/deps/uv/include/uv.h: -/home/u/tmp/.node-gyp/0.10.26/deps/uv/include/uv-private/uv-unix.h: -/home/u/tmp/.node-gyp/0.10.26/deps/uv/include/uv-private/ngx-queue.h: -/home/u/tmp/.node-gyp/0.10.26/deps/uv/include/uv-private/uv-linux.h: -/home/u/tmp/.node-gyp/0.10.26/src/node_object_wrap.h: -/home/u/tmp/.node-gyp/0.10.26/src/node.h: -/home/u/tmp/.node-gyp/0.10.26/src/node_buffer.h: -/home/u/tmp/.node-gyp/0.10.26/src/node_object_wrap.h: -/home/u/src/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/nan.h: diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/obj.target/validation.node.d b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/obj.target/validation.node.d deleted file mode 100644 index f39b7c98..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/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 -m64 -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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/obj.target/validation/src/validation.o.d b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/obj.target/validation/src/validation.o.d deleted file mode 100644 index 532f114e..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/obj.target/validation/src/validation.o.d +++ /dev/null @@ -1,27 +0,0 @@ -cmd_Release/obj.target/validation/src/validation.o := g++ '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/home/u/tmp/.node-gyp/0.10.26/src -I/home/u/tmp/.node-gyp/0.10.26/deps/uv/include -I/home/u/tmp/.node-gyp/0.10.26/deps/v8/include -I/home/u/src/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan -fPIC -Wall -Wextra -Wno-unused-parameter -pthread -m64 -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/u/tmp/.node-gyp/0.10.26/deps/v8/include/v8.h \ - /home/u/tmp/.node-gyp/0.10.26/deps/v8/include/v8stdint.h \ - /home/u/tmp/.node-gyp/0.10.26/src/node.h \ - /home/u/tmp/.node-gyp/0.10.26/deps/uv/include/uv.h \ - /home/u/tmp/.node-gyp/0.10.26/deps/uv/include/uv-private/uv-unix.h \ - /home/u/tmp/.node-gyp/0.10.26/deps/uv/include/uv-private/ngx-queue.h \ - /home/u/tmp/.node-gyp/0.10.26/deps/uv/include/uv-private/uv-linux.h \ - /home/u/tmp/.node-gyp/0.10.26/src/node_object_wrap.h \ - /home/u/tmp/.node-gyp/0.10.26/src/node.h \ - /home/u/tmp/.node-gyp/0.10.26/src/node_buffer.h \ - /home/u/tmp/.node-gyp/0.10.26/src/node_object_wrap.h \ - /home/u/src/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/nan.h -../src/validation.cc: -/home/u/tmp/.node-gyp/0.10.26/deps/v8/include/v8.h: -/home/u/tmp/.node-gyp/0.10.26/deps/v8/include/v8stdint.h: -/home/u/tmp/.node-gyp/0.10.26/src/node.h: -/home/u/tmp/.node-gyp/0.10.26/deps/uv/include/uv.h: -/home/u/tmp/.node-gyp/0.10.26/deps/uv/include/uv-private/uv-unix.h: -/home/u/tmp/.node-gyp/0.10.26/deps/uv/include/uv-private/ngx-queue.h: -/home/u/tmp/.node-gyp/0.10.26/deps/uv/include/uv-private/uv-linux.h: -/home/u/tmp/.node-gyp/0.10.26/src/node_object_wrap.h: -/home/u/tmp/.node-gyp/0.10.26/src/node.h: -/home/u/tmp/.node-gyp/0.10.26/src/node_buffer.h: -/home/u/tmp/.node-gyp/0.10.26/src/node_object_wrap.h: -/home/u/src/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/nan.h: diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/validation.node.d b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/validation.node.d deleted file mode 100644 index 6b32ade1..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/bufferutil.node b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/bufferutil.node deleted file mode 100755 index b1552d3a021705a0e2713506e7226178cef27560..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20297 zcmeHP4Rlo1wZ1bU5D1Wfpn&x;V4#RF$s{BuSZqQvFo6V95-5tiVUi3al4R1En-CN& z?GR-M&}dmcTKn3(zP5{}^fi5b&r9sdA*A{FbrZ=au;GdFV) zd|h4Zt<{^A*>`_?pMCZ@XP=+@bM6=2RSWDknK(-5C5&!#|lBhX0-8 z?-+4zzLvS=_8W(99a*-CWYh6K6aTaDpND^WxWq}JphZ#udW$$O292~Fe01mVWBIQ? zdv^589W@({wjX@-xlzaRf3p4j=xfIw%RlZv`GZqmSn;X%H^05>r)M7C_`P>t%9-AD z=DWq+yEc})fA?nEBKseITk!aWqfhqzY4zTVc{85M8RMM()~^>f9eh;Da?oj-HeB;u zn+zX8BV;E-jQa^HDiuBy!JG=WTiBucccidSVV?@$g8&(uLcbeWD*Sn5kjkHP7XF`w zomBeYwkX%9pg%Q*KNl^^yU+qJK|rO-cM{5*3V+bT|2r-GUv6c`qJB1t0Z$cIlMoN7@R=5VF2P_iRm;>?Q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{GRV$0m|Jy!RQ%hRzwzuBfia7nN@BL*PY5#^htVJDO*{2N5 z+u{>(XxhB5w(rO7m%p-aWvC7Q3AWawsgTcK^D`4kA4K3^*-&>Xr|9u=?h<3G^2LF{ zyQjr|`@~3S{Y3|*5#(!iZuuPp>iD1N+Y|CrA8;V4pdbI`2il@-IbL6854-w(37I=9 z+Tf2CsL^$~ZyxYQzv54k3~mMfB@mhjsUol9n;HCbGGYUJicq-96%r~G-~33Pi1>#Z S62l_4zw>Ih`c?t+>3;zXpeEt~ diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/linker.lock b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/linker.lock deleted file mode 100644 index e69de29b..00000000 diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/obj.target/bufferutil.node b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/obj.target/bufferutil.node deleted file mode 100755 index b1552d3a021705a0e2713506e7226178cef27560..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20297 zcmeHP4Rlo1wZ1bU5D1Wfpn&x;V4#RF$s{BuSZqQvFo6V95-5tiVUi3al4R1En-CN& z?GR-M&}dmcTKn3(zP5{}^fi5b&r9sdA*A{FbrZ=au;GdFV) zd|h4Zt<{^A*>`_?pMCZ@XP=+@bM6=2RSWDknK(-5C5&!#|lBhX0-8 z?-+4zzLvS=_8W(99a*-CWYh6K6aTaDpND^WxWq}JphZ#udW$$O292~Fe01mVWBIQ? zdv^589W@({wjX@-xlzaRf3p4j=xfIw%RlZv`GZqmSn;X%H^05>r)M7C_`P>t%9-AD z=DWq+yEc})fA?nEBKseITk!aWqfhqzY4zTVc{85M8RMM()~^>f9eh;Da?oj-HeB;u zn+zX8BV;E-jQa^HDiuBy!JG=WTiBucccidSVV?@$g8&(uLcbeWD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=RfYlT7%8{; z)6Uz{QntfTY$b#%Nv7CladjiVP{)Qu+Jz`SDUc#C%-;*Rnmy~6*~^@AS2*qXzUrO- zgKGP)xb;@8Ld(tJN#9{GRV$0m|Jy!RQ%hRzwzuBfia7nN@BL*PY5#^htVJDO*{2N5 z+u{>(XxhB5w(rO7m%p-aWvC7Q3AWawsgTcK^D`4kA4K3^*-&>Xr|9u=?h<3G^2LF{ zyQjr|`@~3S{Y3|*5#(!iZuuPp>iD1N+Y|CrA8;V4pdbI`2il@-IbL6854-w(37I=9 z+Tf2CsL^$~ZyxYQzv54k3~mMfB@mhjsUol9n;HCbGGYUJicq-96%r~G-~33Pi1>#Z S62l_4zw>Ih`c?t+>3;zXpeEt~ diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/obj.target/bufferutil/src/bufferutil.o b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/obj.target/bufferutil/src/bufferutil.o deleted file mode 100644 index 0566b4824b9ccb5e3cfe6e8160471cb6ec9e4698..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19504 zcmd5@4RBo5b$+X78-q4(wUVB##jBNA zJ;^p0Lb4XHv$o=-bV`_HLeiOxn=q-9X-P{G5VgUONjt!#feAw(2~2P?f0GF%4UK!w zz2|7pzI{(v&9wB)ym#;W?)kgto_pVY``&&w9BV7{`3xqXvB4-@F=`n1f4op{R@G+X z(?)~hy#%gN=Fh0SjLIvZyqfA)QMsJT6;!T*at+n5q4HByR#90EB~x!C_gbi@JCgfD z}uVWKjJfkc58}K^#T<|@8ojVoHomACF(Z@*c6!EDJMUK=Vdo1^xd84y3 zN0ddd^5|J0r6-pARq*LZ?#W2*WvzGCJ#bnh*^|w?LO1oDK=VNBhDS%Nbrb9Ck+F4w z^yrYacF%#abyb02RiL_l-FRkj9fI-Efm^IWJH9WI7z+%~LvCPV_iif#BEyOFP|8}n zA)2B?zbTW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7M!waBg zx={EC)v@qXo%w%6*HTZ0Ff62=eu4X`j(S1@UoG&cz@>hEM!;sNpVvCX{dfX8SN(p) zt?$3*Q5}nBs^d7GPjxJCt|1}5RMqt95Y-X?n81$<9Q9mH*FO>X#Z<@Q9f4mW@GG%H zK&YSh26!D4_$Lq`vIWku!lwHLei<`E`9pzUF7Pt~ze3>r9WnZIrNA2y0K$T*>iWL{ D5<+Y< diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/obj.target/validation.node b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/obj.target/validation.node deleted file mode 100755 index 1fa3d9d59d51ea4876cb1a32142c6626a5093012..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20230 zcmeHP4Rlo1wZ4--BYzVpAYv_73Kmc%8A4)$jZH`rN&(Gw{ zow-O{U0r=^^<>@byT7x~KKtyu&%Sr=z31NJs;*44*)&<%|W@*^Z<+864LImF?01Q@b;w-5JqN z(nDe>l4f%?8mXb}q^LL3MM6$elBH7fhS5m-?oTi_i5eW%B$e$xjdo<`=|bF*Li&er0yvF*iYmo^lioxR;xbbiApzk2fVkzYAqZn||%^YMp-`jjMHyHYzj zC$VY@9Fvm>G434%Ybw0OLjE}%#8mR+cRhuE@>wdp1pUrRA^*=f5UKE|a3E9ldk*rc z@VlTp75-7+3sdx)W})ZH7UTWCg@2YH;8XRx*TT;iE%f^=@E!~NCl>mh=u-s;Hl#9OBTm{0g}f;ZK{^{ zF&)P ze(t!I1CI-Q6^<{-pV2w68$6XQqTd}lW3_%xG|l7L*%oN`gbZ)c@OU&&OM8ouB{FekNX1xuMom z$Q4&%w*czGewT~%)Or*(uG)OhhFYhGgo3mN zW)#*M!It)&#qe8gcUwcC)m5|3$NGegMbfx@*yc*~l4yw0OP8#y@ETsmdz?4b1aX9d zMt7M3{S9HmFP&7#hn+%W-0#fIm(r0C1{ERDL&2>n~RFe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zA~WSGN6StVwG@i=hLhH_rh4P*vTD!9%F0?-ou{sBb+wCvx-k^+@YjcAgo|ja*t(%? zeN{OH2uz;Tdhrjx^wOEMMn3hr@ky+Hv|Q(#u&$9Ub5-&H&5V@a0iczzrKN1eqFAMv zuxwjYiN%cK`vNIugn4!NWL7l8y^~(jO@}baw|}wk4O=y^L=ksA2NqR$l*wKQoZ_+hk0v=_~NqicCfBr?RPfzhdhNP}0c?km-;ad-;6UB%5l8V(A IQrH0g4__St<8 diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/obj.target/validation/src/validation.o b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/obj.target/validation/src/validation.o deleted file mode 100644 index 0a8e168e615ac53d4465aa267bbfbbd7a1889b37..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17344 zcmds8eQ;dWb$_e%hrpPX!H_g0Wo?`w172(OWl4amm9)}ZEZd4D8L;E7SF0y$Vo^T$-dz+v(6w#}Lwi#da_ze_%*5^^l|xrVtE)CN$01l!@fb`VW3y2zF=`lRt}NwSMYh$b zGin5H6_inCHKkWm`f*78l>Y>!pM>-eDZh@=YD#Z_wBO9X9_kPEMe-k*NA5n_Yvz7w zz6rPirGm`N+=}JkOTpjDa{iQ=KOwSDp%-TUlpCMKj|lll{`*hO0ST--|5os{nSa*I zzan`!mAs(8#B1hX7QEg0Uywd_4E&Wy?xeXp^tsTUJtt=S&FML8QeUrc%B(Pq4&Sk5 z-A6u!EeQFJ72sO!^&LBIHlG@=Hzgj)zZWd{uAM?2E-JHDxhpaXq}o8S)RSAA1MkOLLp7z(id&=GTT@qao&V-(Mby>08;W_@yYs>P_i0aEO_dM@V z@*RVU7tJGAVJB>jpKiPHvM=9vVQ#L<$UpBpybK2JzPF6ChH>BfbIZZ!L%;dm+#Ki& z<&Q_2-}mKy22v5vdtu+P3TX8ixK>{YJ?VMIY<|Ia_-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uGtV67kts_o}N9 z+fUc#XmY-*mFe1CP0r&){3=b(&qRElCg)uueznT7eID;qwF())LW1T|2G(bp8&KTa zaJH0rUDngQv|%Na**`@LPxg-scp9#>c9{Cz#^fjLm-BO%z&o5e_9o_C7xqcdm`RV7 z{e6%p`*)c9|0RaowW#Ut@i!TsZ2xyfzdIIUM=8g!pUQ8~1GnL>vM$c2i$xoH)JFEp z>x+*I{5s$y-*Y_&mI(aQ0*?rMy};?7B*~WwTy&$230%G`y;8{2d7R{TED`|ZsL(n@ zh6@9wTek_kN8ptEsC-M{5rNBhuVV~9J8q8KafT1A-_ZCHuVeB?zE5}vA}<9fyab?bNsw-A@9Tm z7p)^UuL~|@c(UJo7Wn5Z@P~nuf6Vduq=o!>;HlOfzt7~8{hxvBLCP}`k@xb1$#Z~H zzvgw&TY;y_8?8eAjLsFXXGqw62zaV^IKuR#xE}LiF{QFJSn~yqkb(CK99XU9DX-hO z$x~fbTSqH~JrxPu+H$3;G2q$BmREY%O(l;v+@;|jQAexa@HaXN3-X;BRd`w&yNJuz z_?qIQA65r48+?Ha&BVUQ?au$0$HJe;@ zbz41^^&86Tsy1$*{!%oc6_Sn)ER@E2tdtsQX_%$H6bdJ~Zgn!M<XJzY(eo2HFHDJRw#)@&(GY zA~WSGN6StVwG@i=hLhH_rh4P*vTD!9%F0?-ou{sBb+wCvx-k^+@YjcAgo|ja*t(%? zeN{OH2uz;Tdhrjx^wOEMMn3hr@ky+Hv|Q(#u&$9Ub5-&H&5V@a0iczzrKN1eqFAMv zuxwjYiN%cK`vNIugn4!NWL7l8y^~(jO@}baw|}wk4O=y^L=ksA2NqR$l*wKQoZ_+hk0v=_~NqicCfBr?RPfzhdhNP}0c?km-;ad-;6UB%5l8V(A IQrH0g4__St<8 diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/binding.Makefile b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/binding.Makefile deleted file mode 100644 index a69b3d2c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/bufferutil.target.mk b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/bufferutil.target.mk deleted file mode 100644 index b2fe6670..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/bufferutil.target.mk +++ /dev/null @@ -1,133 +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 := \ - -fPIC \ - -Wall \ - -Wextra \ - -Wno-unused-parameter \ - -pthread \ - -m64 \ - -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/u/tmp/.node-gyp/0.10.26/src \ - -I/home/u/tmp/.node-gyp/0.10.26/deps/uv/include \ - -I/home/u/tmp/.node-gyp/0.10.26/deps/v8/include \ - -I/home/u/src/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan - -DEFS_Release := \ - '-D_LARGEFILE_SOURCE' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DBUILDING_NODE_EXTENSION' - -# Flags passed to all source files. -CFLAGS_Release := \ - -fPIC \ - -Wall \ - -Wextra \ - -Wno-unused-parameter \ - -pthread \ - -m64 \ - -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/u/tmp/.node-gyp/0.10.26/src \ - -I/home/u/tmp/.node-gyp/0.10.26/deps/uv/include \ - -I/home/u/tmp/.node-gyp/0.10.26/deps/v8/include \ - -I/home/u/src/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/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 \ - -m64 - -LDFLAGS_Release := \ - -pthread \ - -rdynamic \ - -m64 - -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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/config.gypi b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/config.gypi deleted file mode 100644 index 00f53f53..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/config.gypi +++ /dev/null @@ -1,116 +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": 46, - "host_arch": "x64", - "node_install_npm": "true", - "node_prefix": "/usr", - "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": "false", - "nodedir": "/home/u/tmp/.node-gyp/0.10.26", - "copy_dev_lib": "true", - "standalone_static_library": 1, - "cache_lock_stale": "60000", - "sign_git_tag": "", - "always_auth": "", - "user_agent": "node/v0.10.26 linux x64", - "bin_links": "true", - "key": "", - "description": "true", - "fetch_retries": "2", - "heading": "npm", - "user": "", - "force": "", - "cache_min": "10", - "init_license": "ISC", - "editor": "vim", - "rollback": "true", - "cache_max": "null", - "userconfig": "/home/u/.npmrc", - "engine_strict": "", - "init_author_name": "", - "init_author_url": "", - "tmp": "/home/u/tmp", - "depth": "null", - "save_dev": "", - "usage": "", - "https_proxy": "", - "onload_script": "", - "rebuild_bundle": "true", - "save_bundle": "", - "shell": "/bin/zsh", - "prefix": "/usr", - "registry": "https://registry.npmjs.org/", - "browser": "", - "cache_lock_wait": "10000", - "save_optional": "", - "searchopts": "", - "versions": "", - "cache": "/home/u/.npm", - "ignore_scripts": "", - "searchsort": "name", - "version": "", - "local_address": "", - "viewer": "man", - "color": "true", - "fetch_retry_mintimeout": "10000", - "umask": "18", - "fetch_retry_maxtimeout": "60000", - "message": "%s", - "ca": "", - "cert": "", - "global": "", - "link": "", - "save": "", - "unicode": "true", - "long": "", - "production": "", - "unsafe_perm": "true", - "node_version": "v0.10.26", - "tag": "latest", - "git_tag_version": "true", - "shrinkwrap": "true", - "fetch_retry_factor": "10", - "npat": "", - "proprietary_attribs": "true", - "strict_ssl": "true", - "username": "", - "dev": "", - "globalconfig": "/usr/etc/npmrc", - "init_module": "/home/u/.npm-init.js", - "parseable": "", - "globalignorefile": "/usr/etc/npmignore", - "cache_lock_retries": "10", - "group": "1000", - "init_author_email": "", - "searchexclude": "", - "git": "git", - "optional": "true", - "email": "", - "json": "" - } -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/validation.target.mk b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/validation.target.mk deleted file mode 100644 index 403687bf..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/validation.target.mk +++ /dev/null @@ -1,133 +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 := \ - -fPIC \ - -Wall \ - -Wextra \ - -Wno-unused-parameter \ - -pthread \ - -m64 \ - -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/u/tmp/.node-gyp/0.10.26/src \ - -I/home/u/tmp/.node-gyp/0.10.26/deps/uv/include \ - -I/home/u/tmp/.node-gyp/0.10.26/deps/v8/include \ - -I/home/u/src/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan - -DEFS_Release := \ - '-D_LARGEFILE_SOURCE' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DBUILDING_NODE_EXTENSION' - -# Flags passed to all source files. -CFLAGS_Release := \ - -fPIC \ - -Wall \ - -Wextra \ - -Wno-unused-parameter \ - -pthread \ - -m64 \ - -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/u/tmp/.node-gyp/0.10.26/src \ - -I/home/u/tmp/.node-gyp/0.10.26/deps/uv/include \ - -I/home/u/tmp/.node-gyp/0.10.26/deps/v8/include \ - -I/home/u/src/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/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 \ - -m64 - -LDFLAGS_Release := \ - -pthread \ - -rdynamic \ - -m64 - -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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/builderror.log b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/builderror.log deleted file mode 100644 index 7a9fa7ec..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/builderror.log +++ /dev/null @@ -1,2 +0,0 @@ -gyp WARN EACCES user "u" does not have permission to access the dev dir "/home/u/.node-gyp/0.10.26" -gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/u/tmp/.node-gyp" diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/doc/ws.md b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/doc/ws.md deleted file mode 100644 index d84fd625..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/doc/ws.md +++ /dev/null @@ -1,181 +0,0 @@ -# ws - -## Class: ws.Server - -This class is a WebSocket server. It is an `EventEmitter`. - -### new ws.Server([options], [callback]) - -* `options` Object - * `host` String - * `port` Number - * `server` http.Server - * `verifyClient` Function - * `path` String - * `noServer` Boolean - * `disableHixie` Boolean - * `clientTracking` Boolean -* `callback` Function - -Construct a new server object. - -Either `port` or `server` must be provided, otherwise you might enable -`noServer` if you want to pass the requests directly. Please note that the -`callback` is only used when you supply the a `port` number in the options. - -### server.close([code], [data]) - -Close the server and terminate all clients - -### server.handleUpgrade(request, socket, upgradeHead, callback) - -Handles a HTTP Upgrade request. `request` is an instance of `http.ServerRequest`, `socket` is an instance of `net.Socket`. - -When the Upgrade was successfully, the `callback` will be called with a `ws.WebSocket` object as parameter. - -### Event: 'error' - -`function (error) { }` - -If the underlying server emits an error, it will be forwarded here. - -### Event: 'headers' - -`function (headers) { }` - -Emitted with the object of HTTP headers that are going to be written to the `Stream` as part of the handshake. - -### Event: 'connection' - -`function (socket) { }` - -When a new WebSocket connection is established. `socket` is an object of type `ws.WebSocket`. - - -## Class: ws.WebSocket - -This class represents a WebSocket connection. It is an `EventEmitter`. - -### new ws.WebSocket(address, [options]) - -* `address` String|Array -* `options` Object - * `protocol` String - * `agent` Agent - * `headers` Object - * `protocolVersion` Number|String - -- the following only apply if `address` is a String - * `host` String - * `origin` String - * `pfx` String|Buffer - * `key` String|Buffer - * `passphrase` String - * `cert` String|Buffer - * `ca` Array - * `ciphers` String - * `rejectUnauthorized` Boolean - -Instantiating with an `address` creates a new WebSocket client object. If `address` is an Array (request, socket, rest), it is instantiated as a Server client (e.g. called from the `ws.Server`). - -### websocket.bytesReceived - -Received bytes count. - -### websocket.readyState - -Possible states are `WebSocket.CONNECTING`, `WebSocket.OPEN`, `WebSocket.CLOSING`, `WebSocket.CLOSED`. - -### websocket.protocolVersion - -The WebSocket protocol version used for this connection, `8`, `13` or `hixie-76` (the latter only for server clients). - -### websocket.url - -The URL of the WebSocket server (only for clients) - -### websocket.supports - -Describes the feature of the used protocol version. E.g. `supports.binary` is a boolean that describes if the connection supports binary messages. - -### websocket.close([code], [data]) - -Gracefully closes the connection, after sending a description message - -### websocket.pause() - -Pause the client stream - -### websocket.ping([data], [options], [dontFailWhenClosed]) - -Sends a ping. `data` is sent, `options` is an object with members `mask` and `binary`. `dontFailWhenClosed` indicates whether or not to throw if the connection isnt open. - -### websocket.pong([data], [options], [dontFailWhenClosed]) - -Sends a pong. `data` is sent, `options` is an object with members `mask` and `binary`. `dontFailWhenClosed` indicates whether or not to throw if the connection isnt open. - - -### websocket.resume() - -Resume the client stream - -### websocket.send(data, [options], [callback]) - -Sends `data` through the connection. `options` can be an object with members `mask` and `binary`. The optional `callback` is executed after the send completes. - -### websocket.stream([options], callback) - -Streams data through calls to a user supplied function. `options` can be an object with members `mask` and `binary`. `callback` is executed on successive ticks of which send is `function (data, final)`. - -### websocket.terminate() - -Immediately shuts down the connection - -### websocket.onopen -### websocket.onerror -### websocket.onclose -### websocket.onmessage - -Emulates the W3C Browser based WebSocket interface using function members. - -### websocket.addEventListener(method, listener) - -Emulates the W3C Browser based WebSocket interface using addEventListener. - -### Event: 'error' - -`function (error) { }` - -If the client emits an error, this event is emitted (errors from the underlying `net.Socket` are forwarded here). - -### Event: 'close' - -`function (code, message) { }` - -Is emitted when the connection is closed. `code` is defined in the WebSocket specification. - -The `close` event is also emitted when then underlying `net.Socket` closes the connection (`end` or `close`). - -### Event: 'message' - -`function (data, flags) { }` - -Is emitted when data is received. `flags` is an object with member `binary`. - -### Event: 'ping' - -`function (data, flags) { }` - -Is emitted when a ping is received. `flags` is an object with member `binary`. - -### Event: 'pong' - -`function (data, flags) { }` - -Is emitted when a pong is received. `flags` is an object with member `binary`. - -### Event: 'open' - -`function () { }` - -Emitted when the connection is established. - diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/.npmignore b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/.npmignore deleted file mode 100644 index dcd57568..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/.npmignore +++ /dev/null @@ -1 +0,0 @@ -uploaded diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/package.json b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/package.json deleted file mode 100644 index 7816f273..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "author": "", - "name": "fileapi", - "version": "0.0.0", - "repository": { - "type": "git", - "url": "git://github.com/einaros/ws.git" - }, - "engines": { - "node": "~0.6.8" - }, - "dependencies": { - "express": "latest", - "ansi": "https://github.com/einaros/ansi.js/tarball/master" - }, - "devDependencies": {}, - "optionalDependencies": {} -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/app.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/app.js deleted file mode 100644 index e812cc3e..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/app.js +++ /dev/null @@ -1,39 +0,0 @@ -function onFilesSelected(e) { - var button = e.srcElement; - button.disabled = true; - var progress = document.querySelector('div#progress'); - progress.innerHTML = '0%'; - var files = e.target.files; - var totalFiles = files.length; - var filesSent = 0; - if (totalFiles) { - var uploader = new Uploader('ws://localhost:8080', function () { - Array.prototype.slice.call(files, 0).forEach(function(file) { - if (file.name == '.') { - --totalFiles; - return; - } - uploader.sendFile(file, function(error) { - if (error) { - console.log(error); - return; - } - ++filesSent; - progress.innerHTML = ~~(filesSent / totalFiles * 100) + '%'; - console.log('Sent: ' + file.name); - }); - }); - }); - } - uploader.ondone = function() { - uploader.close(); - progress.innerHTML = '100% done, ' + totalFiles + ' files sent.'; - } -} - -window.onload = function() { - var importButtons = document.querySelectorAll('[type="file"]'); - Array.prototype.slice.call(importButtons, 0).forEach(function(importButton) { - importButton.addEventListener('change', onFilesSelected, false); - }); -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/index.html b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/index.html deleted file mode 100644 index 0d463dd5..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/index.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - -

      This example will upload an entire directory tree to the node.js server via a fast and persistent WebSocket connection.

      -

      Note that the example is Chrome only for now.

      -

      - Upload status: -
      Please select a directory to upload.
      - - diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/uploader.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/uploader.js deleted file mode 100644 index 0c34a7fa..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/uploader.js +++ /dev/null @@ -1,55 +0,0 @@ -function Uploader(url, cb) { - this.ws = new WebSocket(url); - if (cb) this.ws.onopen = cb; - this.sendQueue = []; - this.sending = null; - this.sendCallback = null; - this.ondone = null; - var self = this; - this.ws.onmessage = function(event) { - var data = JSON.parse(event.data); - if (data.event == 'complete') { - if (data.path != self.sending.path) { - self.sendQueue = []; - self.sending = null; - self.sendCallback = null; - throw new Error('Got message for wrong file!'); - } - self.sending = null; - var callback = self.sendCallback; - self.sendCallback = null; - if (callback) callback(); - if (self.sendQueue.length === 0 && self.ondone) self.ondone(null); - if (self.sendQueue.length > 0) { - var args = self.sendQueue.pop(); - setTimeout(function() { self.sendFile.apply(self, args); }, 0); - } - } - else if (data.event == 'error') { - self.sendQueue = []; - self.sending = null; - var callback = self.sendCallback; - self.sendCallback = null; - var error = new Error('Server reported send error for file ' + data.path); - if (callback) callback(error); - if (self.ondone) self.ondone(error); - } - } -} - -Uploader.prototype.sendFile = function(file, cb) { - if (this.ws.readyState != WebSocket.OPEN) throw new Error('Not connected'); - if (this.sending) { - this.sendQueue.push(arguments); - return; - } - var fileData = { name: file.name, path: file.webkitRelativePath }; - this.sending = fileData; - this.sendCallback = cb; - this.ws.send(JSON.stringify(fileData)); - this.ws.send(file); -} - -Uploader.prototype.close = function() { - this.ws.close(); -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/server.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/server.js deleted file mode 100644 index badfeba7..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/server.js +++ /dev/null @@ -1,103 +0,0 @@ -var WebSocketServer = require('../../').Server - , express = require('express') - , fs = require('fs') - , http = require('http') - , util = require('util') - , path = require('path') - , app = express.createServer() - , events = require('events') - , ansi = require('ansi') - , cursor = ansi(process.stdout); - -function BandwidthSampler(ws, interval) { - interval = interval || 2000; - var previousByteCount = 0; - var self = this; - var intervalId = setInterval(function() { - var byteCount = ws.bytesReceived; - var bytesPerSec = (byteCount - previousByteCount) / (interval / 1000); - previousByteCount = byteCount; - self.emit('sample', bytesPerSec); - }, interval); - ws.on('close', function() { - clearInterval(intervalId); - }); -} -util.inherits(BandwidthSampler, events.EventEmitter); - -function makePathForFile(filePath, prefix, cb) { - if (typeof cb !== 'function') throw new Error('callback is required'); - filePath = path.dirname(path.normalize(filePath)).replace(/^(\/|\\)+/, ''); - var pieces = filePath.split(/(\\|\/)/); - var incrementalPath = prefix; - function step(error) { - if (error) return cb(error); - if (pieces.length == 0) return cb(null, incrementalPath); - incrementalPath += '/' + pieces.shift(); - fs.exists(incrementalPath, function(exists) { - if (!exists) fs.mkdir(incrementalPath, step); - else process.nextTick(step); - }); - } - step(); -} - -cursor.eraseData(2).goto(1, 1); -app.use(express.static(__dirname + '/public')); - -var clientId = 0; -var wss = new WebSocketServer({server: app}); -wss.on('connection', function(ws) { - var thisId = ++clientId; - cursor.goto(1, 4 + thisId).eraseLine(); - console.log('Client #%d connected', thisId); - - var sampler = new BandwidthSampler(ws); - sampler.on('sample', function(bps) { - cursor.goto(1, 4 + thisId).eraseLine(); - console.log('WebSocket #%d incoming bandwidth: %d MB/s', thisId, Math.round(bps / (1024*1024))); - }); - - var filesReceived = 0; - var currentFile = null; - ws.on('message', function(data, flags) { - if (!flags.binary) { - currentFile = JSON.parse(data); - // note: a real-world app would want to sanity check the data - } - else { - if (currentFile == null) return; - makePathForFile(currentFile.path, __dirname + '/uploaded', function(error, path) { - if (error) { - console.log(error); - ws.send(JSON.stringify({event: 'error', path: currentFile.path, message: error.message})); - return; - } - fs.writeFile(path + '/' + currentFile.name, data, function(error) { - ++filesReceived; - // console.log('received %d bytes long file, %s', data.length, currentFile.path); - ws.send(JSON.stringify({event: 'complete', path: currentFile.path})); - currentFile = null; - }); - }); - } - }); - - ws.on('close', function() { - cursor.goto(1, 4 + thisId).eraseLine(); - console.log('Client #%d disconnected. %d files received.', thisId, filesReceived); - }); - - ws.on('error', function(e) { - cursor.goto(1, 4 + thisId).eraseLine(); - console.log('Client #%d error: %s', thisId, e.message); - }); -}); - -fs.mkdir(__dirname + '/uploaded', function(error) { - // ignore errors, most likely means directory exists - console.log('Uploaded files will be saved to %s/uploaded.', __dirname); - console.log('Remember to wipe this directory if you upload lots and lots.'); - app.listen(8080); - console.log('Listening on http://localhost:8080'); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/package.json b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/package.json deleted file mode 100644 index 99722c42..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "author": "", - "name": "serverstats", - "version": "0.0.0", - "repository": { - "type": "git", - "url": "git://github.com/einaros/ws.git" - }, - "engines": { - "node": ">0.4.0" - }, - "dependencies": { - "express": "~3.0.0" - }, - "devDependencies": {}, - "optionalDependencies": {} -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/public/index.html b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/public/index.html deleted file mode 100644 index 24d84e12..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/public/index.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - Server Stats
      - RSS:

      - Heap total:

      - Heap used:

      - - diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/server.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/server.js deleted file mode 100644 index 88bbc9eb..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/server.js +++ /dev/null @@ -1,21 +0,0 @@ -var WebSocketServer = require('../../').Server - , http = require('http') - , express = require('express') - , app = express(); - -app.use(express.static(__dirname + '/public')); - -var server = http.createServer(app); -server.listen(8080); - -var wss = new WebSocketServer({server: server}); -wss.on('connection', function(ws) { - var id = setInterval(function() { - ws.send(JSON.stringify(process.memoryUsage()), function() { /* ignore errors */ }); - }, 100); - console.log('started client interval'); - ws.on('close', function() { - console.log('stopping client interval'); - clearInterval(id); - }); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/package.json b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/package.json deleted file mode 100644 index 65c900ab..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "author": "", - "name": "serverstats", - "version": "0.0.0", - "repository": { - "type": "git", - "url": "git://github.com/einaros/ws.git" - }, - "engines": { - "node": ">0.4.0" - }, - "dependencies": { - "express": "2.x" - }, - "devDependencies": {}, - "optionalDependencies": {} -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/public/index.html b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/public/index.html deleted file mode 100644 index 24d84e12..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/public/index.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - Server Stats
      - RSS:

      - Heap total:

      - Heap used:

      - - diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/server.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/server.js deleted file mode 100644 index 0bbce368..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/server.js +++ /dev/null @@ -1,19 +0,0 @@ -var WebSocketServer = require('../../').Server - , http = require('http') - , express = require('express') - , app = express.createServer(); - -app.use(express.static(__dirname + '/public')); -app.listen(8080); - -var wss = new WebSocketServer({server: app}); -wss.on('connection', function(ws) { - var id = setInterval(function() { - ws.send(JSON.stringify(process.memoryUsage()), function() { /* ignore errors */ }); - }, 100); - console.log('started client interval'); - ws.on('close', function() { - console.log('stopping client interval'); - clearInterval(id); - }) -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/ssl.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/ssl.js deleted file mode 100644 index bf1bf530..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/ssl.js +++ /dev/null @@ -1,59 +0,0 @@ - -(function(){ - - "use strict"; - - var fs = require('fs'); - - // you'll probably load configuration from config - var cfg = { - ssl: true, - port: 8080, - ssl_key: '/path/to/you/ssl.key', - ssl_cert: '/path/to/you/ssl.crt' - }; - - var httpServ = ( cfg.ssl ) ? require('https') : require('http'); - - var WebSocketServer = require('../').Server; - - var app = null; - - // dummy request processing - var processRequest = function( req, res ) { - - res.writeHead(200); - res.end("All glory to WebSockets!\n"); - }; - - if ( cfg.ssl ) { - - app = httpServ.createServer({ - - // providing server with SSL key/cert - key: fs.readFileSync( cfg.ssl_key ), - cert: fs.readFileSync( cfg.ssl_cert ) - - }, processRequest ).listen( cfg.port ); - - } else { - - app = httpServ.createServer( processRequest ).listen( cfg.port ); - } - - // passing or reference to web server so WS would knew port and SSL capabilities - var wss = new WebSocketServer( { server: app } ); - - - wss.on( 'connection', function ( wsConnect ) { - - wsConnect.on( 'message', function ( message ) { - - console.log( message ); - - }); - - }); - - -}()); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/index.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/index.js deleted file mode 100644 index 3423ff23..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -module.exports = require('./lib/WebSocket'); -module.exports.Server = require('./lib/WebSocketServer'); -module.exports.Sender = require('./lib/Sender'); -module.exports.Receiver = require('./lib/Receiver'); - -module.exports.createServer = function (options, connectionListener) { - var server = new module.exports.Server(options); - if (typeof connectionListener === 'function') { - server.on('connection', connectionListener); - } - return server; -}; - -module.exports.connect = module.exports.createConnection = function (address, openListener) { - var client = new module.exports(address); - if (typeof openListener === 'function') { - client.on('open', openListener); - } - return client; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/BufferPool.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/BufferPool.js deleted file mode 100644 index faf8637c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/BufferUtil.fallback.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/BufferUtil.fallback.js deleted file mode 100644 index 508542c9..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/BufferUtil.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/BufferUtil.js deleted file mode 100644 index 15d35b98..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/ErrorCodes.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/ErrorCodes.js deleted file mode 100644 index 55ebd529..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Receiver.hixie.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Receiver.hixie.js deleted file mode 100644 index f54ad966..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Receiver.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Receiver.js deleted file mode 100644 index 2752726f..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Receiver.js +++ /dev/null @@ -1,591 +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; - -/** - * Node version 0.4 and 0.6 compatibility - */ - -var isNodeV4 = /^v0\.4/.test(process.version); - -/** - * HyBi Receiver implementation - */ - -function Receiver () { - // 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.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.expectHeader(2, this.processPacket); - 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 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 = !isNodeV4 - ? function(length, isFragmented) { return (isFragmented ? this.fragmentedBufferPool : this.unfragmentedBufferPool).get(length); } - : function(length) { return new Buffer(length); }; - -/** - * Start processing a new packet. - * - * @api private - */ - -Receiver.prototype.processPacket = function (data) { - 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 opcode = data[0] & 0xf; - if (opcode === 0) { - // 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; - } - 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 = []; -} - -/** - * 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; -} - -/** - * 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]; - } -} - -/** - * 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 packet = this.unmask(mask, data, true); - if (packet != null) this.currentMessage.push(packet); - if (this.state.lastFragment) { - var messageBuffer = this.concatBuffers(this.currentMessage); - if (!Validation.isValidUTF8(messageBuffer)) { - this.error('invalid utf8 sequence', 1007); - return; - } - this.ontext(messageBuffer.toString('utf8'), {masked: this.state.masked, buffer: messageBuffer}); - this.currentMessage = []; - } - 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 packet = this.unmask(mask, data, true); - if (packet != null) this.currentMessage.push(packet); - if (this.state.lastFragment) { - var messageBuffer = this.concatBuffers(this.currentMessage); - this.onbinary(messageBuffer, {masked: this.state.masked, buffer: messageBuffer}); - this.currentMessage = []; - } - 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); - 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'); - } - this.onclose(code, message, {masked: self.state.masked}); - this.reset(); - }, - }, - // 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) { - this.onping(this.unmask(mask, data, true), {masked: this.state.masked, binary: true}); - 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) { - this.onpong(this.unmask(mask, data, true), {masked: this.state.masked, binary: true}); - this.endPacket(); - } - } -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Sender.hixie.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Sender.hixie.js deleted file mode 100644 index 1754afb6..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Sender.hixie.js +++ /dev/null @@ -1,123 +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) { - 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; -/* - if (options && options.binary) { - this.error('hixie websockets do not support binary'); - 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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Sender.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Sender.js deleted file mode 100644 index fc3b4378..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Sender.js +++ /dev/null @@ -1,227 +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; - -/** - * HyBi Sender implementation - */ - -function Sender(socket) { - this._socket = socket; - this.firstFragment = true; -} - -/** - * 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) { - 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); - this.frameAndSend(0x8, dataBuffer, true, mask); -} - -/** - * Sends a ping message to the remote party. - * - * @api public - */ - -Sender.prototype.ping = function(data, options) { - var mask = options && options.mask; - this.frameAndSend(0x9, data || '', true, mask); -} - -/** - * Sends a pong message to the remote party. - * - * @api public - */ - -Sender.prototype.pong = function(data, options) { - var mask = options && options.mask; - this.frameAndSend(0xa, data || '', true, mask); -} - -/** - * 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 opcode = options && options.binary ? 2 : 1; - if (this.firstFragment === false) opcode = 0; - else this.firstFragment = false; - if (finalFragment) this.firstFragment = true - this.frameAndSend(opcode, data, finalFragment, mask, cb); -} - -/** - * Frames and sends a piece of data according to the HyBi WebSocket protocol. - * - * @api private - */ - -Sender.prototype.frameAndSend = function(opcode, data, finalFragment, maskData, 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; - - 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); - } - } - } -} - -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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Validation.fallback.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Validation.fallback.js deleted file mode 100644 index 2c7c4fd4..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Validation.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Validation.js deleted file mode 100644 index 0f3109a0..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/WebSocket.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/WebSocket.js deleted file mode 100644 index cce3cb41..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/WebSocket.js +++ /dev/null @@ -1,818 +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') - , https = require('https') - , crypto = require('crypto') - , url = require('url') - , fs = require('fs') - , Options = require('options') - , Sender = require('./Sender') - , Receiver = require('./Receiver') - , SenderHixie = require('./Sender.hixie') - , ReceiverHixie = require('./Receiver.hixie'); - -/** - * Constants - */ - -// Default protocol version - -var protocolVersion = 13; - -// Close timeout - -var closeTimeout = 30000; // Allow 5 seconds to terminate the connection cleanly - -/** - * Node version 0.4 and 0.6 compatibility - */ - -var isNodeV4 = /^v0\.4/.test(process.version); - -/** - * WebSocket implementation - */ - -function WebSocket(address, protocols, options) { - - 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 = []; - } - // TODO: actually handle the `Sub-Protocols` part of the WebSocket client - - this._socket = null; - this.bytesReceived = 0; - this.readyState = null; - this.supports = {}; - - if (Array.isArray(address)) { - initAsServerClient.apply(this, address.concat(options)); - } else { - initAsClient.apply(this, [address, protocols, options]); - } -} - -/** - * Inherits from EventEmitter. - */ - -util.inherits(WebSocket, events.EventEmitter); - -/** - * Ready States - */ - -["CONNECTING", "OPEN", "CLOSING", "CLOSED"].forEach(function (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(code, data) { - if (this.readyState == WebSocket.CLOSING || this.readyState == WebSocket.CLOSED) return; - if (this.readyState == WebSocket.CONNECTING) { - this.readyState = WebSocket.CLOSED; - return; - } - try { - this.readyState = WebSocket.CLOSING; - this._closeCode = code; - this._closeMessage = data; - var mask = !this._isServer; - this._sender.close(code, data, mask); - } - catch (e) { - this.emit('error', e); - } - finally { - this.terminate(); - } -} - -/** - * Pause the client stream - * - * @api public - */ - -WebSocket.prototype.pause = function() { - 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(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() { - 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 - * @param {function} Optional callback which is executed after the send completes - * @api public - */ - -WebSocket.prototype.send = function(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 (data instanceof fs.ReadStream) { - startQueue(this); - var self = this; - sendStream(this, data, options, function(error) { - process.nextTick(function() { 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 - * @param {function} 'function (error, send)' which is executed on successive ticks of which send is 'function (data, final)'. - * @api public - */ - -WebSocket.prototype.stream = function(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; - startQueue(this); - var send = function(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() { - if (this.readyState == WebSocket.CLOSED) return; - if (this._socket) { - try { - // End the connection - 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 - 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; - if (typeof listener === 'function') { - if (method === 'message') { - function onMessage (data, flags) { - listener.call(this, new MessageEvent(data, flags.binary ? 'Binary' : 'Text', target)); - } - // 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') { - function onClose (code, message) { - listener.call(this, new CloseEvent(code, message, target)); - } - // 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') { - function onError (event) { - event.target = target; - listener.call(this, event); - } - // 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') { - function onOpen () { - listener.call(this, new OpenEvent(target)); - } - // 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 - * @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 - * @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 - * @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 - }).merge(options); - - // expose state properties - this.protocol = options.value.protocol; - this.protocolVersion = options.value.protocolVersion; - 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: null, - agent: null, - - // ssl-related options - pfx: null, - key: null, - passphrase: null, - cert: null, - ca: null, - ciphers: null, - rejectUnauthorized: null - }).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; - - // 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; - // node<=v0.4.x compatibility - if (!agent && isNodeV4) { - isNodeV4 = true; - agent = new httpObj.Agent({ - host: serverUrl.hostname, - port: port - }); - } - - 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 (options.isDefinedAndNonNull('pfx') - || options.isDefinedAndNonNull('key') - || options.isDefinedAndNonNull('passphrase') - || options.isDefinedAndNonNull('cert') - || options.isDefinedAndNonNull('ca') - || options.isDefinedAndNonNull('ciphers') - || options.isDefinedAndNonNull('rejectUnauthorized')) { - - if (isNodeV4) { - throw new Error('Client side certificates are not supported on Node 0.4.x'); - } - - 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); - } - } - - if (isNodeV4) { - requestOptions.path = (serverUrl.pathname || '/') + (serverUrl.search || ''); - } - else 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); - - (isNodeV4 ? agent : req).on('error', function(error) { - self.emit('error', error); - cleanupWebsocketResources.call(this, error); - }); - (isNodeV4 ? agent : req).once('response', function(res) { - var error = new Error('unexpected server response (' + res.statusCode + ')'); - self.emit('error', error); - cleanupWebsocketResources.call(this, error); - }); - (isNodeV4 ? agent : req).once('upgrade', function(res, socket, upgradeHead) { - if (self.readyState == WebSocket.CLOSED) { - // client closed before server accepted connection - self.emit('close'); - removeAllListeners(self); - socket.end(); - return; - } - var serverKey = res.headers['sec-websocket-accept']; - if (typeof serverKey == 'undefined' || serverKey !== expectedServerKey) { - self.emit('error', 'invalid server key'); - removeAllListeners(self); - 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); - removeAllListeners(self); - socket.end(); - return; - } else if (serverProt) { - self.protocol = serverProt; - } - - establishConnection.call(self, Receiver, Sender, socket, upgradeHead); - - // perform cleanup on http resources - removeAllListeners(isNodeV4 ? agent : req); - req = null; - agent = null; - }); - - req.end(); - this.readyState = WebSocket.CONNECTING; -} - -function establishConnection(ReceiverClass, SenderClass, socket, upgradeHead) { - this._socket = socket; - socket.setTimeout(0); - socket.setNoDelay(true); - var self = this; - this._receiver = new ReceiverClass(); - - // socket cleanup handlers - socket.on('end', cleanupWebsocketResources.bind(this)); - socket.on('close', cleanupWebsocketResources.bind(this)); - socket.on('error', cleanupWebsocketResources.bind(this)); - - // ensure that the upgradeHead is added to the receiver - function firstHandler(data) { - if (self.readyState != WebSocket.OPEN) 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 (data, flags) { - flags = flags || {}; - self.emit('message', data, flags); - }; - self._receiver.onbinary = function (data, flags) { - flags = flags || {}; - flags.binary = true; - self.emit('message', data, flags); - }; - self._receiver.onping = function(data, flags) { - flags = flags || {}; - self.pong(data, {mask: !self._isServer, binary: flags.binary === true}, true); - self.emit('ping', data, flags); - }; - self._receiver.onpong = function(data, flags) { - self.emit('pong', data, flags); - }; - self._receiver.onclose = function(code, data, flags) { - flags = flags || {}; - self.close(code, data); - }; - self._receiver.onerror = function(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._sender.on('error', function(error) { - self.close(1002, ''); - self.emit('error', error); - }); - this.readyState = WebSocket.OPEN; - this.emit('open'); - - socket.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(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() { - 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) { - removeAllListeners(this._socket); - // catch all socket error after removing all standard handlers - var socket = this._socket; - this._socket.on('error', function() { - try { socket.destroy(); } catch (e) {} - }); - try { - if (!error) this._socket.end(); - else this._socket.destroy(); - } - catch (e) { /* Ignore termination errors */ } - this._socket = null; - } - if (this._sender) { - removeAllListeners(this._sender); - this._sender = null; - } - if (this._receiver) { - this._receiver.cleanup(); - this._receiver = null; - } - removeAllListeners(this); - this.on('error', function() {}); // catch all errors after this - delete this._queue; -} - -function removeAllListeners(instance) { - if (isNodeV4) { - // node v4 doesn't *actually* remove all listeners globally, - // so we do that instead - instance._events = {}; - } - else instance.removeAllListeners(); -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/WebSocketServer.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/WebSocketServer.js deleted file mode 100644 index da759f8b..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/WebSocketServer.js +++ /dev/null @@ -1,460 +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') - , url = require('url') - , Options = require('options') - , WebSocket = require('./WebSocket') - , tls = require('tls') - , url = require('url'); - -/** - * WebSocket Server implementation - */ - -function WebSocketServer(options, callback) { - options = new Options({ - host: '0.0.0.0', - port: null, - server: null, - verifyClient: null, - handleProtocols: null, - path: null, - noServer: false, - disableHixie: false, - clientTracking: 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() { 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']; - - // 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); - } - - // 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 - }); - - 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, 404, '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) { - if (!result) abortConnection(socket, 401, 'Unauthorized') - 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) { - if (!result) abortConnection(socket, 401, 'Unauthorized') - else onClientVerified.apply(self); - }); - return; - } - else if (!this.options.verifyClient(info)) { - abortConnection(socket, 401, 'Unauthorized'); - return; - } - } - - // no client verification required - onClientVerified(); -} - -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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/browser.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/browser.js deleted file mode 100644 index 8d3a755c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/.npmignore b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/.travis.yml b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/.travis.yml deleted file mode 100644 index f1d0f13c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/History.md b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/History.md deleted file mode 100644 index 4961d2e2..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/History.md +++ /dev/null @@ -1,107 +0,0 @@ - -0.6.1 / 2012-06-01 -================== - - * Added: append (yes or no) on confirmation - * Added: allow node.js v0.7.x - -0.6.0 / 2012-04-10 -================== - - * Added `.prompt(obj, callback)` support. Closes #49 - * Added default support to .choose(). Closes #41 - * Fixed the choice example - -0.5.1 / 2011-12-20 -================== - - * Fixed `password()` for recent nodes. Closes #36 - -0.5.0 / 2011-12-04 -================== - - * Added sub-command option support [itay] - -0.4.3 / 2011-12-04 -================== - - * Fixed custom help ordering. Closes #32 - -0.4.2 / 2011-11-24 -================== - - * Added travis support - * Fixed: line-buffered input automatically trimmed. Closes #31 - -0.4.1 / 2011-11-18 -================== - - * Removed listening for "close" on --help - -0.4.0 / 2011-11-15 -================== - - * Added support for `--`. Closes #24 - -0.3.3 / 2011-11-14 -================== - - * Fixed: wait for close event when writing help info [Jerry Hamlet] - -0.3.2 / 2011-11-01 -================== - - * Fixed long flag definitions with values [felixge] - -0.3.1 / 2011-10-31 -================== - - * Changed `--version` short flag to `-V` from `-v` - * Changed `.version()` so it's configurable [felixge] - -0.3.0 / 2011-10-31 -================== - - * Added support for long flags only. Closes #18 - -0.2.1 / 2011-10-24 -================== - - * "node": ">= 0.4.x < 0.7.0". Closes #20 - -0.2.0 / 2011-09-26 -================== - - * Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs] - -0.1.0 / 2011-08-24 -================== - - * Added support for custom `--help` output - -0.0.5 / 2011-08-18 -================== - - * Changed: when the user enters nothing prompt for password again - * Fixed issue with passwords beginning with numbers [NuckChorris] - -0.0.4 / 2011-08-15 -================== - - * Fixed `Commander#args` - -0.0.3 / 2011-08-15 -================== - - * Added default option value support - -0.0.2 / 2011-08-15 -================== - - * Added mask support to `Command#password(str[, mask], fn)` - * Added `Command#password(str, fn)` - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/Makefile b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/Makefile deleted file mode 100644 index 00746255..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -TESTS = $(shell find test/test.*.js) - -test: - @./test/run $(TESTS) - -.PHONY: test \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/Readme.md b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/Readme.md deleted file mode 100644 index b8328c37..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/Readme.md +++ /dev/null @@ -1,262 +0,0 @@ -# Commander.js - - The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander). - - [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js) - -## Installation - - $ npm install commander - -## Option parsing - - Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander'); - -program - .version('0.0.1') - .option('-p, --peppers', 'Add peppers') - .option('-P, --pineapple', 'Add pineapple') - .option('-b, --bbq', 'Add bbq sauce') - .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble') - .parse(process.argv); - -console.log('you ordered a pizza with:'); -if (program.peppers) console.log(' - peppers'); -if (program.pineapple) console.log(' - pineappe'); -if (program.bbq) console.log(' - bbq'); -console.log(' - %s cheese', program.cheese); -``` - - Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. - -## Automated --help - - The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free: - -``` - $ ./examples/pizza --help - - Usage: pizza [options] - - Options: - - -V, --version output the version number - -p, --peppers Add peppers - -P, --pineapple Add pineappe - -b, --bbq Add bbq sauce - -c, --cheese Add the specified type of cheese [marble] - -h, --help output usage information - -``` - -## Coercion - -```js -function range(val) { - return val.split('..').map(Number); -} - -function list(val) { - return val.split(','); -} - -program - .version('0.0.1') - .usage('[options] ') - .option('-i, --integer ', 'An integer argument', parseInt) - .option('-f, --float ', 'A float argument', parseFloat) - .option('-r, --range ..', 'A range', range) - .option('-l, --list ', 'A list', list) - .option('-o, --optional [value]', 'An optional value') - .parse(process.argv); - -console.log(' int: %j', program.integer); -console.log(' float: %j', program.float); -console.log(' optional: %j', program.optional); -program.range = program.range || []; -console.log(' range: %j..%j', program.range[0], program.range[1]); -console.log(' list: %j', program.list); -console.log(' args: %j', program.args); -``` - -## Custom help - - You can display arbitrary `-h, --help` information - by listening for "--help". Commander will automatically - exit once you are done so that the remainder of your program - does not execute causing undesired behaviours, for example - in the following executable "stuff" will not output when - `--help` is used. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('../'); - -function list(val) { - return val.split(',').map(Number); -} - -program - .version('0.0.1') - .option('-f, --foo', 'enable some foo') - .option('-b, --bar', 'enable some bar') - .option('-B, --baz', 'enable some baz'); - -// must be before .parse() since -// node's emit() is immediate - -program.on('--help', function(){ - console.log(' Examples:'); - console.log(''); - console.log(' $ custom-help --help'); - console.log(' $ custom-help -h'); - console.log(''); -}); - -program.parse(process.argv); - -console.log('stuff'); -``` - -yielding the following help output: - -``` - -Usage: custom-help [options] - -Options: - - -h, --help output usage information - -V, --version output the version number - -f, --foo enable some foo - -b, --bar enable some bar - -B, --baz enable some baz - -Examples: - - $ custom-help --help - $ custom-help -h - -``` - -## .prompt(msg, fn) - - Single-line prompt: - -```js -program.prompt('name: ', function(name){ - console.log('hi %s', name); -}); -``` - - Multi-line prompt: - -```js -program.prompt('description:', function(name){ - console.log('hi %s', name); -}); -``` - - Coercion: - -```js -program.prompt('Age: ', Number, function(age){ - console.log('age: %j', age); -}); -``` - -```js -program.prompt('Birthdate: ', Date, function(date){ - console.log('date: %s', date); -}); -``` - -## .password(msg[, mask], fn) - -Prompt for password without echoing: - -```js -program.password('Password: ', function(pass){ - console.log('got "%s"', pass); - process.stdin.destroy(); -}); -``` - -Prompt for password with mask char "*": - -```js -program.password('Password: ', '*', function(pass){ - console.log('got "%s"', pass); - process.stdin.destroy(); -}); -``` - -## .confirm(msg, fn) - - Confirm with the given `msg`: - -```js -program.confirm('continue? ', function(ok){ - console.log(' got %j', ok); -}); -``` - -## .choose(list, fn) - - Let the user choose from a `list`: - -```js -var list = ['tobi', 'loki', 'jane', 'manny', 'luna']; - -console.log('Choose the coolest pet:'); -program.choose(list, function(i){ - console.log('you chose %d "%s"', i, list[i]); -}); -``` - -## Links - - - [API documentation](http://visionmedia.github.com/commander.js/) - - [ascii tables](https://github.com/LearnBoost/cli-table) - - [progress bars](https://github.com/visionmedia/node-progress) - - [more progress bars](https://github.com/substack/node-multimeter) - - [examples](https://github.com/visionmedia/commander.js/tree/master/examples) - -## License - -(The MIT License) - -Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/index.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/index.js deleted file mode 100644 index 06ec1e4b..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/index.js +++ /dev/null @@ -1,2 +0,0 @@ - -module.exports = require('./lib/commander'); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/lib/commander.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/lib/commander.js deleted file mode 100644 index 5ba87ebb..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/lib/commander.js +++ /dev/null @@ -1,1026 +0,0 @@ - -/*! - * commander - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , path = require('path') - , tty = require('tty') - , basename = path.basename; - -/** - * Expose the root command. - */ - -exports = module.exports = new Command; - -/** - * Expose `Command`. - */ - -exports.Command = Command; - -/** - * Expose `Option`. - */ - -exports.Option = Option; - -/** - * Initialize a new `Option` with the given `flags` and `description`. - * - * @param {String} flags - * @param {String} description - * @api public - */ - -function Option(flags, description) { - this.flags = flags; - this.required = ~flags.indexOf('<'); - this.optional = ~flags.indexOf('['); - this.bool = !~flags.indexOf('-no-'); - flags = flags.split(/[ ,|]+/); - if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift(); - this.long = flags.shift(); - this.description = description; -} - -/** - * Return option name. - * - * @return {String} - * @api private - */ - -Option.prototype.name = function(){ - return this.long - .replace('--', '') - .replace('no-', ''); -}; - -/** - * Check if `arg` matches the short or long flag. - * - * @param {String} arg - * @return {Boolean} - * @api private - */ - -Option.prototype.is = function(arg){ - return arg == this.short - || arg == this.long; -}; - -/** - * Initialize a new `Command`. - * - * @param {String} name - * @api public - */ - -function Command(name) { - this.commands = []; - this.options = []; - this.args = []; - this.name = name; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Command.prototype.__proto__ = EventEmitter.prototype; - -/** - * Add command `name`. - * - * The `.action()` callback is invoked when the - * command `name` is specified via __ARGV__, - * and the remaining arguments are applied to the - * function for access. - * - * When the `name` is "*" an un-matched command - * will be passed as the first arg, followed by - * the rest of __ARGV__ remaining. - * - * Examples: - * - * program - * .version('0.0.1') - * .option('-C, --chdir ', 'change the working directory') - * .option('-c, --config ', 'set config path. defaults to ./deploy.conf') - * .option('-T, --no-tests', 'ignore test hook') - * - * program - * .command('setup') - * .description('run remote setup commands') - * .action(function(){ - * console.log('setup'); - * }); - * - * program - * .command('exec ') - * .description('run the given remote command') - * .action(function(cmd){ - * console.log('exec "%s"', cmd); - * }); - * - * program - * .command('*') - * .description('deploy the given env') - * .action(function(env){ - * console.log('deploying "%s"', env); - * }); - * - * program.parse(process.argv); - * - * @param {String} name - * @return {Command} the new command - * @api public - */ - -Command.prototype.command = function(name){ - var args = name.split(/ +/); - var cmd = new Command(args.shift()); - this.commands.push(cmd); - cmd.parseExpectedArgs(args); - cmd.parent = this; - return cmd; -}; - -/** - * Parse expected `args`. - * - * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. - * - * @param {Array} args - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parseExpectedArgs = function(args){ - if (!args.length) return; - var self = this; - args.forEach(function(arg){ - switch (arg[0]) { - case '<': - self.args.push({ required: true, name: arg.slice(1, -1) }); - break; - case '[': - self.args.push({ required: false, name: arg.slice(1, -1) }); - break; - } - }); - return this; -}; - -/** - * Register callback `fn` for the command. - * - * Examples: - * - * program - * .command('help') - * .description('display verbose help') - * .action(function(){ - * // output help here - * }); - * - * @param {Function} fn - * @return {Command} for chaining - * @api public - */ - -Command.prototype.action = function(fn){ - var self = this; - this.parent.on(this.name, function(args, unknown){ - // Parse any so-far unknown options - unknown = unknown || []; - var parsed = self.parseOptions(unknown); - - // Output help if necessary - outputHelpIfNecessary(self, parsed.unknown); - - // If there are still any unknown options, then we simply - // die, unless someone asked for help, in which case we give it - // to them, and then we die. - if (parsed.unknown.length > 0) { - self.unknownOption(parsed.unknown[0]); - } - - self.args.forEach(function(arg, i){ - if (arg.required && null == args[i]) { - self.missingArgument(arg.name); - } - }); - - // Always append ourselves to the end of the arguments, - // to make sure we match the number of arguments the user - // expects - if (self.args.length) { - args[self.args.length] = self; - } else { - args.push(self); - } - - fn.apply(this, args); - }); - return this; -}; - -/** - * Define option with `flags`, `description` and optional - * coercion `fn`. - * - * The `flags` string should contain both the short and long flags, - * separated by comma, a pipe or space. The following are all valid - * all will output this way when `--help` is used. - * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" - * - * Examples: - * - * // simple boolean defaulting to false - * program.option('-p, --pepper', 'add pepper'); - * - * --pepper - * program.pepper - * // => Boolean - * - * // simple boolean defaulting to false - * program.option('-C, --no-cheese', 'remove cheese'); - * - * program.cheese - * // => true - * - * --no-cheese - * program.cheese - * // => true - * - * // required argument - * program.option('-C, --chdir ', 'change the working directory'); - * - * --chdir /tmp - * program.chdir - * // => "/tmp" - * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); - * - * @param {String} flags - * @param {String} description - * @param {Function|Mixed} fn or default - * @param {Mixed} defaultValue - * @return {Command} for chaining - * @api public - */ - -Command.prototype.option = function(flags, description, fn, defaultValue){ - var self = this - , option = new Option(flags, description) - , oname = option.name() - , name = camelcase(oname); - - // default as 3rd arg - if ('function' != typeof fn) defaultValue = fn, fn = null; - - // preassign default value only for --no-*, [optional], or - if (false == option.bool || option.optional || option.required) { - // when --no-* we make sure default is true - if (false == option.bool) defaultValue = true; - // preassign only if we have a default - if (undefined !== defaultValue) self[name] = defaultValue; - } - - // register the option - this.options.push(option); - - // when it's passed assign the value - // and conditionally invoke the callback - this.on(oname, function(val){ - // coercion - if (null != val && fn) val = fn(val); - - // unassigned or bool - if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) { - // if no value, bool true, and we have a default, then use it! - if (null == val) { - self[name] = option.bool - ? defaultValue || true - : false; - } else { - self[name] = val; - } - } else if (null !== val) { - // reassign - self[name] = val; - } - }); - - return this; -}; - -/** - * Parse `argv`, settings options and invoking commands when defined. - * - * @param {Array} argv - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parse = function(argv){ - // store raw args - this.rawArgs = argv; - - // guess name - if (!this.name) this.name = basename(argv[1]); - - // process argv - var parsed = this.parseOptions(this.normalize(argv.slice(2))); - this.args = parsed.args; - return this.parseArgs(this.args, parsed.unknown); -}; - -/** - * Normalize `args`, splitting joined short flags. For example - * the arg "-abc" is equivalent to "-a -b -c". - * - * @param {Array} args - * @return {Array} - * @api private - */ - -Command.prototype.normalize = function(args){ - var ret = [] - , arg; - - for (var i = 0, len = args.length; i < len; ++i) { - arg = args[i]; - if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) { - arg.slice(1).split('').forEach(function(c){ - ret.push('-' + c); - }); - } else { - ret.push(arg); - } - } - - return ret; -}; - -/** - * Parse command `args`. - * - * When listener(s) are available those - * callbacks are invoked, otherwise the "*" - * event is emitted and those actions are invoked. - * - * @param {Array} args - * @return {Command} for chaining - * @api private - */ - -Command.prototype.parseArgs = function(args, unknown){ - var cmds = this.commands - , len = cmds.length - , name; - - if (args.length) { - name = args[0]; - if (this.listeners(name).length) { - this.emit(args.shift(), args, unknown); - } else { - this.emit('*', args); - } - } else { - outputHelpIfNecessary(this, unknown); - - // If there were no args and we have unknown options, - // then they are extraneous and we need to error. - if (unknown.length > 0) { - this.unknownOption(unknown[0]); - } - } - - return this; -}; - -/** - * Return an option matching `arg` if any. - * - * @param {String} arg - * @return {Option} - * @api private - */ - -Command.prototype.optionFor = function(arg){ - for (var i = 0, len = this.options.length; i < len; ++i) { - if (this.options[i].is(arg)) { - return this.options[i]; - } - } -}; - -/** - * Parse options from `argv` returning `argv` - * void of these options. - * - * @param {Array} argv - * @return {Array} - * @api public - */ - -Command.prototype.parseOptions = function(argv){ - var args = [] - , len = argv.length - , literal - , option - , arg; - - var unknownOptions = []; - - // parse options - for (var i = 0; i < len; ++i) { - arg = argv[i]; - - // literal args after -- - if ('--' == arg) { - literal = true; - continue; - } - - if (literal) { - args.push(arg); - continue; - } - - // find matching Option - option = this.optionFor(arg); - - // option is defined - if (option) { - // requires arg - if (option.required) { - arg = argv[++i]; - if (null == arg) return this.optionMissingArgument(option); - if ('-' == arg[0]) return this.optionMissingArgument(option, arg); - this.emit(option.name(), arg); - // optional arg - } else if (option.optional) { - arg = argv[i+1]; - if (null == arg || '-' == arg[0]) { - arg = null; - } else { - ++i; - } - this.emit(option.name(), arg); - // bool - } else { - this.emit(option.name()); - } - continue; - } - - // looks like an option - if (arg.length > 1 && '-' == arg[0]) { - unknownOptions.push(arg); - - // If the next argument looks like it might be - // an argument for this option, we pass it on. - // If it isn't, then it'll simply be ignored - if (argv[i+1] && '-' != argv[i+1][0]) { - unknownOptions.push(argv[++i]); - } - continue; - } - - // arg - args.push(arg); - } - - return { args: args, unknown: unknownOptions }; -}; - -/** - * Argument `name` is missing. - * - * @param {String} name - * @api private - */ - -Command.prototype.missingArgument = function(name){ - console.error(); - console.error(" error: missing required argument `%s'", name); - console.error(); - process.exit(1); -}; - -/** - * `Option` is missing an argument, but received `flag` or nothing. - * - * @param {String} option - * @param {String} flag - * @api private - */ - -Command.prototype.optionMissingArgument = function(option, flag){ - console.error(); - if (flag) { - console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag); - } else { - console.error(" error: option `%s' argument missing", option.flags); - } - console.error(); - process.exit(1); -}; - -/** - * Unknown option `flag`. - * - * @param {String} flag - * @api private - */ - -Command.prototype.unknownOption = function(flag){ - console.error(); - console.error(" error: unknown option `%s'", flag); - console.error(); - process.exit(1); -}; - -/** - * Set the program version to `str`. - * - * This method auto-registers the "-V, --version" flag - * which will print the version number when passed. - * - * @param {String} str - * @param {String} flags - * @return {Command} for chaining - * @api public - */ - -Command.prototype.version = function(str, flags){ - if (0 == arguments.length) return this._version; - this._version = str; - flags = flags || '-V, --version'; - this.option(flags, 'output the version number'); - this.on('version', function(){ - console.log(str); - process.exit(0); - }); - return this; -}; - -/** - * Set the description `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.description = function(str){ - if (0 == arguments.length) return this._description; - this._description = str; - return this; -}; - -/** - * Set / get the command usage `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.usage = function(str){ - var args = this.args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }); - - var usage = '[options' - + (this.commands.length ? '] [command' : '') - + ']' - + (this.args.length ? ' ' + args : ''); - if (0 == arguments.length) return this._usage || usage; - this._usage = str; - - return this; -}; - -/** - * Return the largest option length. - * - * @return {Number} - * @api private - */ - -Command.prototype.largestOptionLength = function(){ - return this.options.reduce(function(max, option){ - return Math.max(max, option.flags.length); - }, 0); -}; - -/** - * Return help for options. - * - * @return {String} - * @api private - */ - -Command.prototype.optionHelp = function(){ - var width = this.largestOptionLength(); - - // Prepend the help information - return [pad('-h, --help', width) + ' ' + 'output usage information'] - .concat(this.options.map(function(option){ - return pad(option.flags, width) - + ' ' + option.description; - })) - .join('\n'); -}; - -/** - * Return command help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.commandHelp = function(){ - if (!this.commands.length) return ''; - return [ - '' - , ' Commands:' - , '' - , this.commands.map(function(cmd){ - var args = cmd.args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }).join(' '); - - return cmd.name - + (cmd.options.length - ? ' [options]' - : '') + ' ' + args - + (cmd.description() - ? '\n' + cmd.description() - : ''); - }).join('\n\n').replace(/^/gm, ' ') - , '' - ].join('\n'); -}; - -/** - * Return program help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.helpInformation = function(){ - return [ - '' - , ' Usage: ' + this.name + ' ' + this.usage() - , '' + this.commandHelp() - , ' Options:' - , '' - , '' + this.optionHelp().replace(/^/gm, ' ') - , '' - , '' - ].join('\n'); -}; - -/** - * Prompt for a `Number`. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptForNumber = function(str, fn){ - var self = this; - this.promptSingleLine(str, function parseNumber(val){ - val = Number(val); - if (isNaN(val)) return self.promptSingleLine(str + '(must be a number) ', parseNumber); - fn(val); - }); -}; - -/** - * Prompt for a `Date`. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptForDate = function(str, fn){ - var self = this; - this.promptSingleLine(str, function parseDate(val){ - val = new Date(val); - if (isNaN(val.getTime())) return self.promptSingleLine(str + '(must be a date) ', parseDate); - fn(val); - }); -}; - -/** - * Single-line prompt. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptSingleLine = function(str, fn){ - if ('function' == typeof arguments[2]) { - return this['promptFor' + (fn.name || fn)](str, arguments[2]); - } - - process.stdout.write(str); - process.stdin.setEncoding('utf8'); - process.stdin.once('data', function(val){ - fn(val.trim()); - }).resume(); -}; - -/** - * Multi-line prompt. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptMultiLine = function(str, fn){ - var buf = []; - console.log(str); - process.stdin.setEncoding('utf8'); - process.stdin.on('data', function(val){ - if ('\n' == val || '\r\n' == val) { - process.stdin.removeAllListeners('data'); - fn(buf.join('\n')); - } else { - buf.push(val.trimRight()); - } - }).resume(); -}; - -/** - * Prompt `str` and callback `fn(val)` - * - * Commander supports single-line and multi-line prompts. - * To issue a single-line prompt simply add white-space - * to the end of `str`, something like "name: ", whereas - * for a multi-line prompt omit this "description:". - * - * - * Examples: - * - * program.prompt('Username: ', function(name){ - * console.log('hi %s', name); - * }); - * - * program.prompt('Description:', function(desc){ - * console.log('description was "%s"', desc.trim()); - * }); - * - * @param {String|Object} str - * @param {Function} fn - * @api public - */ - -Command.prototype.prompt = function(str, fn){ - var self = this; - - if ('string' == typeof str) { - if (/ $/.test(str)) return this.promptSingleLine.apply(this, arguments); - this.promptMultiLine(str, fn); - } else { - var keys = Object.keys(str) - , obj = {}; - - function next() { - var key = keys.shift() - , label = str[key]; - - if (!key) return fn(obj); - self.prompt(label, function(val){ - obj[key] = val; - next(); - }); - } - - next(); - } -}; - -/** - * Prompt for password with `str`, `mask` char and callback `fn(val)`. - * - * The mask string defaults to '', aka no output is - * written while typing, you may want to use "*" etc. - * - * Examples: - * - * program.password('Password: ', function(pass){ - * console.log('got "%s"', pass); - * process.stdin.destroy(); - * }); - * - * program.password('Password: ', '*', function(pass){ - * console.log('got "%s"', pass); - * process.stdin.destroy(); - * }); - * - * @param {String} str - * @param {String} mask - * @param {Function} fn - * @api public - */ - -Command.prototype.password = function(str, mask, fn){ - var self = this - , buf = ''; - - // default mask - if ('function' == typeof mask) { - fn = mask; - mask = ''; - } - - process.stdin.resume(); - tty.setRawMode(true); - process.stdout.write(str); - - // keypress - process.stdin.on('keypress', function(c, key){ - if (key && 'enter' == key.name) { - console.log(); - process.stdin.removeAllListeners('keypress'); - tty.setRawMode(false); - if (!buf.trim().length) return self.password(str, mask, fn); - fn(buf); - return; - } - - if (key && key.ctrl && 'c' == key.name) { - console.log('%s', buf); - process.exit(); - } - - process.stdout.write(mask); - buf += c; - }).resume(); -}; - -/** - * Confirmation prompt with `str` and callback `fn(bool)` - * - * Examples: - * - * program.confirm('continue? ', function(ok){ - * console.log(' got %j', ok); - * process.stdin.destroy(); - * }); - * - * @param {String} str - * @param {Function} fn - * @api public - */ - - -Command.prototype.confirm = function(str, fn, verbose){ - var self = this; - this.prompt(str, function(ok){ - if (!ok.trim()) { - if (!verbose) str += '(yes or no) '; - return self.confirm(str, fn, true); - } - fn(parseBool(ok)); - }); -}; - -/** - * Choice prompt with `list` of items and callback `fn(index, item)` - * - * Examples: - * - * var list = ['tobi', 'loki', 'jane', 'manny', 'luna']; - * - * console.log('Choose the coolest pet:'); - * program.choose(list, function(i){ - * console.log('you chose %d "%s"', i, list[i]); - * process.stdin.destroy(); - * }); - * - * @param {Array} list - * @param {Number|Function} index or fn - * @param {Function} fn - * @api public - */ - -Command.prototype.choose = function(list, index, fn){ - var self = this - , hasDefault = 'number' == typeof index; - - if (!hasDefault) { - fn = index; - index = null; - } - - list.forEach(function(item, i){ - if (hasDefault && i == index) { - console.log('* %d) %s', i + 1, item); - } else { - console.log(' %d) %s', i + 1, item); - } - }); - - function again() { - self.prompt(' : ', function(val){ - val = parseInt(val, 10) - 1; - if (hasDefault && isNaN(val)) val = index; - - if (null == list[val]) { - again(); - } else { - fn(val, list[val]); - } - }); - } - - again(); -}; - -/** - * Camel-case the given `flag` - * - * @param {String} flag - * @return {String} - * @api private - */ - -function camelcase(flag) { - return flag.split('-').reduce(function(str, word){ - return str + word[0].toUpperCase() + word.slice(1); - }); -} - -/** - * Parse a boolean `str`. - * - * @param {String} str - * @return {Boolean} - * @api private - */ - -function parseBool(str) { - return /^y|yes|ok|true$/i.test(str); -} - -/** - * Pad `str` to `width`. - * - * @param {String} str - * @param {Number} width - * @return {String} - * @api private - */ - -function pad(str, width) { - var len = Math.max(0, width - str.length); - return str + Array(len + 1).join(' '); -} - -/** - * Output help information if necessary - * - * @param {Command} command to output help for - * @param {Array} array of options to search for -h or --help - * @api private - */ - -function outputHelpIfNecessary(cmd, options) { - options = options || []; - for (var i = 0; i < options.length; i++) { - if (options[i] == '--help' || options[i] == '-h') { - process.stdout.write(cmd.helpInformation()); - cmd.emit('--help'); - process.exit(0); - } - } -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/package.json b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/package.json deleted file mode 100644 index 9936f7d7..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "commander", - "version": "0.6.1", - "description": "the complete solution for node.js command-line programs", - "keywords": [ - "command", - "option", - "parser", - "prompt", - "stdin" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "repository": { - "type": "git", - "url": "https://github.com/visionmedia/commander.js.git" - }, - "dependencies": {}, - "devDependencies": { - "should": ">= 0.0.1" - }, - "scripts": { - "test": "make test" - }, - "main": "index", - "engines": { - "node": ">= 0.4.x" - }, - "readme": "# Commander.js\n\n The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander).\n\n [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js)\n\n## Installation\n\n $ npm install commander\n\n## Option parsing\n\n Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('commander');\n\nprogram\n .version('0.0.1')\n .option('-p, --peppers', 'Add peppers')\n .option('-P, --pineapple', 'Add pineapple')\n .option('-b, --bbq', 'Add bbq sauce')\n .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble')\n .parse(process.argv);\n\nconsole.log('you ordered a pizza with:');\nif (program.peppers) console.log(' - peppers');\nif (program.pineapple) console.log(' - pineappe');\nif (program.bbq) console.log(' - bbq');\nconsole.log(' - %s cheese', program.cheese);\n```\n\n Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as \"--template-engine\" are camel-cased, becoming `program.templateEngine` etc.\n\n## Automated --help\n\n The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:\n\n``` \n $ ./examples/pizza --help\n\n Usage: pizza [options]\n\n Options:\n\n -V, --version output the version number\n -p, --peppers Add peppers\n -P, --pineapple Add pineappe\n -b, --bbq Add bbq sauce\n -c, --cheese Add the specified type of cheese [marble]\n -h, --help output usage information\n\n```\n\n## Coercion\n\n```js\nfunction range(val) {\n return val.split('..').map(Number);\n}\n\nfunction list(val) {\n return val.split(',');\n}\n\nprogram\n .version('0.0.1')\n .usage('[options] ')\n .option('-i, --integer ', 'An integer argument', parseInt)\n .option('-f, --float ', 'A float argument', parseFloat)\n .option('-r, --range ..', 'A range', range)\n .option('-l, --list ', 'A list', list)\n .option('-o, --optional [value]', 'An optional value')\n .parse(process.argv);\n\nconsole.log(' int: %j', program.integer);\nconsole.log(' float: %j', program.float);\nconsole.log(' optional: %j', program.optional);\nprogram.range = program.range || [];\nconsole.log(' range: %j..%j', program.range[0], program.range[1]);\nconsole.log(' list: %j', program.list);\nconsole.log(' args: %j', program.args);\n```\n\n## Custom help\n\n You can display arbitrary `-h, --help` information\n by listening for \"--help\". Commander will automatically\n exit once you are done so that the remainder of your program\n does not execute causing undesired behaviours, for example\n in the following executable \"stuff\" will not output when\n `--help` is used.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('../');\n\nfunction list(val) {\n return val.split(',').map(Number);\n}\n\nprogram\n .version('0.0.1')\n .option('-f, --foo', 'enable some foo')\n .option('-b, --bar', 'enable some bar')\n .option('-B, --baz', 'enable some baz');\n\n// must be before .parse() since\n// node's emit() is immediate\n\nprogram.on('--help', function(){\n console.log(' Examples:');\n console.log('');\n console.log(' $ custom-help --help');\n console.log(' $ custom-help -h');\n console.log('');\n});\n\nprogram.parse(process.argv);\n\nconsole.log('stuff');\n```\n\nyielding the following help output:\n\n```\n\nUsage: custom-help [options]\n\nOptions:\n\n -h, --help output usage information\n -V, --version output the version number\n -f, --foo enable some foo\n -b, --bar enable some bar\n -B, --baz enable some baz\n\nExamples:\n\n $ custom-help --help\n $ custom-help -h\n\n```\n\n## .prompt(msg, fn)\n\n Single-line prompt:\n\n```js\nprogram.prompt('name: ', function(name){\n console.log('hi %s', name);\n});\n```\n\n Multi-line prompt:\n\n```js\nprogram.prompt('description:', function(name){\n console.log('hi %s', name);\n});\n```\n\n Coercion:\n\n```js\nprogram.prompt('Age: ', Number, function(age){\n console.log('age: %j', age);\n});\n```\n\n```js\nprogram.prompt('Birthdate: ', Date, function(date){\n console.log('date: %s', date);\n});\n```\n\n## .password(msg[, mask], fn)\n\nPrompt for password without echoing:\n\n```js\nprogram.password('Password: ', function(pass){\n console.log('got \"%s\"', pass);\n process.stdin.destroy();\n});\n```\n\nPrompt for password with mask char \"*\":\n\n```js\nprogram.password('Password: ', '*', function(pass){\n console.log('got \"%s\"', pass);\n process.stdin.destroy();\n});\n```\n\n## .confirm(msg, fn)\n\n Confirm with the given `msg`:\n\n```js\nprogram.confirm('continue? ', function(ok){\n console.log(' got %j', ok);\n});\n```\n\n## .choose(list, fn)\n\n Let the user choose from a `list`:\n\n```js\nvar list = ['tobi', 'loki', 'jane', 'manny', 'luna'];\n\nconsole.log('Choose the coolest pet:');\nprogram.choose(list, function(i){\n console.log('you chose %d \"%s\"', i, list[i]);\n});\n```\n\n## Links\n\n - [API documentation](http://visionmedia.github.com/commander.js/)\n - [ascii tables](https://github.com/LearnBoost/cli-table)\n - [progress bars](https://github.com/visionmedia/node-progress)\n - [more progress bars](https://github.com/substack/node-multimeter)\n - [examples](https://github.com/visionmedia/commander.js/tree/master/examples)\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/commander.js/issues" - }, - "homepage": "https://github.com/visionmedia/commander.js", - "_id": "commander@0.6.1", - "_from": "commander@~0.6.1" -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/.index.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/.index.js deleted file mode 100644 index 68da1f34..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/.index.js +++ /dev/null @@ -1 +0,0 @@ -//noop \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/LICENSE b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/LICENSE deleted file mode 100644 index 352c2874..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/LICENSE +++ /dev/null @@ -1,43 +0,0 @@ -Copyright 2013, NAN contributors: - - Rod Vagg - - Benjamin Byholm - - Trevor Norris -(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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/README.md b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/README.md deleted file mode 100644 index 6ba57f78..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/README.md +++ /dev/null @@ -1,705 +0,0 @@ -Native Abstractions for Node.js -=============================== - -**A header file filled with macro and utility goodness for making addon development for Node.js easier across versions 0.8, 0.10 and 0.11, and eventually 0.12.** - -***Current version: 0.3.2*** *(See [nan.h](https://github.com/rvagg/nan/blob/master/nan.h) for changelog)* - -[![NPM](https://nodei.co/npm/nan.png?downloads=true&stars=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. - - * **[Usage](#usage)** - * **[Example](#example)** - * **[API](#api)** - - -## Usage - -Simply add **NAN** as a dependency in the *package.json* of your Node addon: - -```js -"dependencies": { - ... - "nan" : "~0.3.1" - ... -} -``` - -Pull in the path to **NAN** in your *binding.gyp* so that you can use `#include "nan.h"` in your *.cpp*: - -```js -"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 "nan.h" -// ... - -using namespace v8; - -void InitAll(Handle exports) { - exports->Set(NanSymbol("calculateSync"), - FunctionTemplate::New(CalculateSync)->GetFunction()); - - exports->Set(NanSymbol("calculateAsync"), - FunctionTemplate::New(CalculateAsync)->GetFunction()); -} - -NODE_MODULE(addon, InitAll) -``` - -```c++ -// sync.h -#include -#include "nan.h" - -NAN_METHOD(CalculateSync); -``` - -```c++ -// sync.cc -#include -#include "nan.h" -#include "sync.h" -// ... - -using namespace v8; - -// 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(Number::New(est)); -} -``` - -```c++ -// async.cc -#include -#include "nan.h" -#include "async.h" - -// ... - -using namespace v8; - -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[] = { - Local::New(Null()) - , Number::New(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_WEAK_CALLBACK - * NanReturnValue - * NanReturnUndefined - * NanReturnNull - * NanReturnEmptyString - * NanScope - * NanLocker - * NanUnlocker - * NanGetInternalFieldPointer - * NanSetInternalFieldPointer - * NanObjectWrapHandle - * NanMakeWeak - * NanSymbol - * NanGetPointerSafe - * NanSetPointerSafe - * NanFromV8String - * NanBooleanOptionValue - * NanUInt32OptionValue - * 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 - * NanHasInstance - * NanPersistentToLocal - * NanDispose - * NanAssignPersistent - * NanInitPersistent - * 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. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_SETTER`. - - -### 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. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_SETTER`. - - -### 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_WEAK_CALLBACK(type, cbname) - -Use `NAN_WEAK_CALLBACK` to declare your V8 WeakReference callbacks. There is an object argument accessible through `NAN_WEAK_CALLBACK_OBJECT`. The `type` argument gives the type of the `data` argument, accessible through `NAN_WEAK_CALLBACK_DATA(type)`. - -```c++ -static NAN_WEAK_CALLBACK(BufferReference*, WeakCheck) { - if (NAN_WEAK_CALLBACK_DATA(BufferReference*)->noLongerNeeded_) { - delete NAN_WEAK_CALLBACK_DATA(BufferReference*); - } else { - // Still in use, revive, prevent GC - NanMakeWeak(NAN_WEAK_CALLBACK_OBJECT, NAN_WEAK_CALLBACK_DATA(BufferReference*), &WeakCheck); - } -} - -``` - -### NanReturnValue(Handle<Value>) - -Use `NanReturnValue` when you want to return a value from your V8 accessible method: - -```c++ -NAN_METHOD(Foo::Bar) { - ... - - NanReturnValue(String::New("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(String::New("FooBar!")); -} -``` - - -### 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(String::NewSymbol("end")) -``` - - -### NanMakeWeak(Persistent<T>, parameter, callback) - -Make a persistent reference weak. - - -### String NanSymbol(char *) - -This isn't strictly about compatibility, it's just an easier way to create string symbol objects (i.e. `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 return `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)) { - ... - } - - ... -} -``` - - -### char* NanFromV8String(Handle<Value>[, enum Nan::Encoding, size_t *, char *, size_t, int]) - -When you want to convert a V8 `String` to a `char*` use `NanFromV8String`. It is possible to define an encoding that defaults to `Nan::UTF8` 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 optionally setting `String::WriteOptions`, which default to `String::HINT_MANY_WRITES_EXPECTED | String::NO_NULL_TERMINATION`. -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 = NanFromV8String(args[0]); -char* decoded = NanFromV8String(args[1], Nan::BASE64, &count, NULL, 0, String::HINT_MANY_WRITES_EXPECTED); -char param_copy[count]; -memcpy(param_copy, decoded, count); -delete[] decoded; -``` - - -### 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); -``` - - -### 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 `NAN_WEAK_CALLBACK` and a hint for the garbage collector, when dealing with weak references. - - -### 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<Type> NanPersistentToLocal(Persistent<Type>&) - -Aside from `FunctionCallbackInfo`, the biggest and most painful change to V8 in Node 0.11 is the many restrictions now placed on `Persistent` handles. They are difficult to assign and difficult to fetch the original value out of. - -Use `NanPersistentToLocal` to convert a `Persistent` handle back to a `Local` handle. - -```c++ -Local handle = NanPersistentToLocal(persistentHandle); -``` - - -### Local<Context> NanNewContextHandle([ExtensionConfiguration*, Handle<ObjectTemplate>, Handle<Value>]) -Creates a new `Local` handle. - -```c++ -Local ftmpl = FunctionTemplate::New(); -Local otmpl = ftmpl->InstanceTemplate(); -Local ctx = NanNewContextHandle(NULL, otmpl); -``` - - -### void NanDispose(Persistent<T> &) - -Use `NanDispose` to dispose a `Persistent` handle. - -```c++ -NanDispose(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 = Object::New(); -obj->Set(NanSymbol("key"), keyHandle); // where keyHandle might be a Local -NanAssignPersistent(Object, persistentHandle, obj) -``` - - -### NanInitPersistent(type, name, object) - -User `NanInitPersistent` to declare and initialize a new `Persistent` with the supplied object. The assignment operator for `Persistent` is no longer public in Node 0.11, so this macro makes it easier to declare and initializing a new `Persistent`. See NanAssignPersistent for more information. - -```c++ -Local obj = Object::New(); -obj->Set(NanSymbol("key"), keyHandle); // where keyHandle might be a Local -NanInitPersistent(Object, persistentHandle, obj); -``` - - -### NanCallback - -Because of the difficulties imposed by the changes to `Persistent` handles in V8 in Node 0.11, creating `Persistent` versions of your `Local` handles is annoyingly tricky. `NanCallback` makes it easier by taking your `Local` 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 = callback = 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: -Local argv[] = { - Exception::Error(String::New("fail!")) -}; -callback->Call(1, argv); - -// a success argument: -Local argv[] = { - Local::New(Null()), - String::New("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 if you need it. - - -### 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 to a message and the callback will - // be passed that string in an Error object - virtual void Execute (); - -protected: - // Set this if there is an error, otherwise it's NULL - const char *errmsg; - - // 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); - - // 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: - -
    '; -html += '
    Enter Your Password
    '; -html += '
    '; -html += '
    Password:


    '; -html += '
    '; -html += '
    '; -html += '

    '; -html += ''; -html += ''; -html += ''; -html += '
    ' + large_icon_button('x', 'Cancel', "clear_login()") + ' ' + large_icon_button('check', 'Login', 'do_effect_login()') + '
    '; -html += '
    '; -html += ''; -session.hooks.keys[ENTER_KEY] = 'do_effect_login'; -session.hooks.keys[ESC_KEY] = 'clear_login'; -safe_focus( 'fe_lp_password' ); -show_popup_dialog(450, 225, html); -} -function clear_login() { -hide_popup_dialog(); -Nav.prev(); -} -function do_login() { -if ($('fe_username').value.match(/^\w+$/)) { -session.username = $('fe_username').value; -session.auto_login = $('fe_auto_login').checked; -do_login_prompt_2(); -return; -} -else { -do_openid_login(); -} -} -function do_openid_login() { -if (!$('fe_username').value) return; -session.openid_win = popup_window(''); -if (!session.openid_win) return; -session.open_id = $('fe_username').value; -session.auto_login = $('fe_auto_login') && $('fe_auto_login').checked; -hide_popup_dialog(); -show_progress_dialog(1, "Logging in..."); -session.hooks.before_error = 'close_openid_window'; -session.hooks.after_error = 'do_login_prompt'; -effect_api_send('openid_login', { -OpenID: session.open_id, -Infinite: session.auto_login ? 1 : 0 -}, 'do_openid_login_2'); -} -function close_openid_window() { -if (session.openid_win) { -session.openid_win.close(); -delete session.openid_win; -} -} -function do_openid_login_2(response) { -if (response.CheckURL) { -Debug.trace('openid', "Redirecting popup window to OpenID Check URL: " + response.CheckURL); -show_progress_dialog(1, "Waiting for popup window...", false, ['x', 'Cancel', 'do_login_prompt()']); -session.openid_win.location = response.CheckURL; -session.openid_win.focus(); -} -} -function receive_openid_response(iframe_response) { -var response = deep_copy_object(iframe_response); -Debug.trace('openid', "Received OpenID Response: " + dumper(response)); -hide_popup_dialog(); -if (response.Code) { -close_openid_window(); -return do_error( response.Description ); -} -delete session.hooks.before_error; -delete session.hooks.after_error; -if (response.SessionID) { -session.cookie.set( 'effect_session_id', response.SessionID ); -session.cookie.save(); -} -switch (response.Action) { -case 'popup': -show_progress_dialog(1, "Waiting for popup window...", false, ['x', 'Cancel', 'do_login_prompt()']); -Debug.trace('openid', "Redirecting popup window to OpenID Setup URL: " + response.SetupURL); -session.openid_win.location = response.SetupURL; -session.openid_win.focus(); -break; -case 'login': -close_openid_window(); -do_login_2(response); -break; -case 'register': -if (!response.Info) response.Info = {}; -close_openid_window(); -Debug.trace('openid', 'Original OpenID: ' + response.OpenID_Login); -Debug.trace('openid', 'Clean OpenID: ' + response.OpenID_Unique); -Debug.trace('openid', 'Registration Info: ' + dumper(response.Info)); -session.prereg = response.Info; -session.prereg.open_id_login = response.OpenID_Login; -session.prereg.open_id = response.OpenID_Unique; -if (session.user) { -if (!session.user.OpenIDs) session.user.OpenIDs = {}; -if (!session.user.OpenIDs.OpenID) session.user.OpenIDs.OpenID = []; -var dupe = find_object( session.user.OpenIDs.OpenID, { Unique: session.prereg.open_id } ); -if (dupe) return do_error("That OpenID is already registered and attached to your account. No need to add it again."); -session.user.OpenIDs.OpenID.push({ -Login: session.prereg.open_id_login, -Unique: session.prereg.open_id -}); -setTimeout( function() { -Nav.go('MyAccount', true); -do_message('success', 'Added new OpenID URL to account.'); -}, 1 ); -} -else { -setTimeout( function() { Nav.go('CreateAccount', true); }, 1 ); -} -break; -} -} -function do_effect_login() { -var password = $('fe_lp_password').value; -session.auto_login = $('fe_auto_login').checked; -hide_popup_dialog(); -show_progress_dialog(1, "Logging in..."); -session.hooks.after_error = 'do_login_prompt'; -effect_api_send('user_login', { -Username: session.username, -Password: password, -Infinite: session.auto_login ? 1 : 0 -}, 'do_login_2'); -} -function do_logout() { -effect_api_send('user_logout', {}, 'do_logout_2'); -} -function do_logout_2(response) { -hide_popup_dialog(); -show_default_login_status(); -delete session.hooks.after_error; -delete session.cookie.tree.effect_session_id; -session.cookie.save(); -session.storage = {}; -session.storage_dirty = false; -delete session.user; -delete session.first_login; -var old_username = session.username; -session.username = ''; -if (Nav.inited) { -Nav.go('Main'); -if (old_username) $GR.growl('success', "Logged out of account: " + old_username); -} -else { -Nav.init(); -} -} -function do_login_2(response, tx) { -if (response.FirstLogin) session.first_login = 1; -if (response.User.UserStorage) { -Debug.trace('Recovering site storage blob: session.storage = ' + response.User.UserStorage + ';'); -try { -eval( 'session.storage = ' + response.User.UserStorage + ';' ); -} -catch (e) { -Debug.trace("SITE STORAGE RECOVERY FAILED: " + e); -session.storage = {}; -} -delete response.User.UserStorage; -session.storage_dirty = false; -} -session.user = response.User; -session.username = session.user.Username; -hide_popup_dialog(); -delete session.hooks.after_error; -update_header(); -if (!tx || !tx._from_recover) $GR.growl('success', "Logged in as: " + session.username); -if (session.nav_after_login) { -Nav.go( session.nav_after_login ); -delete session.nav_after_login; -} -else if (Nav.currentAnchor().match(/^Login/)) { -Nav.go('Home'); -} -else { -Nav.refresh(); -} -Nav.init(); -} -function user_storage_mark() { -Debug.trace("Marking user storage as dirty"); -session.storage_dirty = true; -} -function user_storage_idle() { -if (session.storage_dirty && !session.mouseIsDown) { -user_storage_save(); -session.storage_dirty = false; -} -setTimeout( 'user_storage_idle()', 5000 ); -} -function user_storage_save() { -if (session.user) { -Debug.trace("Committing user storage blob"); -effect_api_send('update_user_storage', { Data: serialize(session.storage) }, 'user_storage_save_finish', { _silent: 1 } ); -} -} -function user_storage_save_finish(response, tx) { -} -function show_default_login_status() { -$('d_sidebar_wrapper_recent_games').hide(); -$('d_login_status').innerHTML = '
    ' + -'
    ' + -large_icon_button('key', "Login", '#Home') + '' + spacer(1,1) + '' + -'' + large_icon_button('user_add.png', "Signup", '#CreateAccount') + '
    ' + -'
    '; -$('d_tagline').innerHTML = -'Login' + ' | ' + -'Create Account'; -} -function update_header() { -var html = ''; -html += '
    '; -html += ''; -html += ''; -html += ''; -html += ''+spacer(2,2)+''; -html += session.user.FullName + '
    '; -html += spacer(1,5) + '
    '; -html += 'My Home  |  '; -html += 'Logout'; -html += '
    '; -$('d_login_status').innerHTML = html; -$('d_tagline').innerHTML = -'Welcome '+session.user.FirstName+'' + ' | ' + -'My Home' + ' | ' + -'Logout'; -effect_api_get( 'get_user_games', { limit:5, offset:0 }, 'receive_sidebar_recent_games', { } ); -} -function receive_sidebar_recent_games(response, tx) { -var html = ''; -if (response.Rows && response.Rows.Row) { -var games = always_array( response.Rows.Row ); -for (var idx = 0, len = games.length; idx < len; idx++) { -var game = games[idx]; -html += ''; -} -html += ''; -$('d_sidebar_recent_games').innerHTML = html; -$('d_sidebar_wrapper_recent_games').show(); -} -else { -$('d_sidebar_wrapper_recent_games').hide(); -} -} -function check_privilege(key) { -if (!session.user) return false; -if (session.user.Privileges.admin == 1) return true; -if (!key.toString().match(/^\//)) key = '/' + key; -var value = lookup_path(key, session.user.Privileges); -return( value && (value != 0) ); -} -function is_admin() { -return check_privilege('admin'); -} -function upgrade_flash_error() { -return alert("Sorry, file upload requires Adobe Flash Player 9 or higher."); -} -function cancel_user_image_manager() { -upload_destroy(); -hide_popup_dialog(); -delete session.hooks.keys[DELETE_KEY]; -} -function do_user_image_manager(callback) { -if (callback) session.uim_callback = callback; -else session.uim_callback = null; -session.temp_last_user_img = null; -session.temp_last_user_image_filename = ''; -var html = '
    '; -html += '
    Image Manager
    '; -html += '
    '; -html += ''; -html += '
    '; -html += '
    '; -html += ''; -html += ''; -html += ''; -html += ''; -html += ''; -html += '
    ' + large_icon_button('x', 'Cancel', 'cancel_user_image_manager()') + ' ' + large_icon_button('bullet_upload.png', 'Upload Files...', 'upload_basic()', 'b_upload_user_image') + ' ' + large_icon_button('check', 'Choose', 'do_choose_user_image()', 'btn_choose_user_image', '', 'disabled') + '
    '; -html += '
    '; -session.hooks.keys[ENTER_KEY] = 'do_choose_user_image'; -session.hooks.keys[ESC_KEY] = 'cancel_user_image_manager'; -session.hooks.keys[DELETE_KEY] = 'do_delete_selected_user_image'; -show_popup_dialog(500, 300, html); -var self = this; -setTimeout( function() { -prep_upload('b_upload_user_image', '/effect/api/upload_user_image', [self, 'do_upload_user_image_2'], ['Image Files', '*.jpg;*.jpe;*.jpeg;*.gif;*.png']); -}, 1 ); -var args = { -limit: 50, -offset: 0, -random: Math.random() -}; -effect_api_get( 'user_images_get', args, 'uim_populate_images', { } ); -} -function do_upload_user_image_2() { -effect_api_mod_touch('user_images_get'); -effect_api_send('user_get', { -Username: session.username -}, [this, 'do_upload_user_image_3']); -} -function do_upload_user_image_3(response) { -if (response.User.LastUploadError) return do_error( "Failed to upload image: " + response.User.LastUploadError ); -do_user_image_manager( session.uim_callback ); -} -function uim_populate_images(response, tx) { -var html = ''; -var base_url = '/effect/api/view/users/' + session.username + '/images'; -if (response.Rows && response.Rows.Row) { -var imgs = always_array( response.Rows.Row ); -for (var idx = 0, len = imgs.length; idx < len; idx++) { -var img = imgs[idx]; -var class_name = ((img.Filename == session.temp_last_user_image_filename) ? 'choose_item_selected' : 'choose_item'); -html += ''; -} -} -else { -html = ''; -} -$('d_user_image_list').innerHTML = html; -} -function do_select_user_image(img, filename) { -if (session.temp_last_user_img) session.temp_last_user_img.className = 'choose_item'; -img.className = 'choose_item_selected'; -$('btn_choose_user_image').removeClass('disabled'); -session.temp_last_user_img = img; -session.temp_last_user_image_filename = filename; -} -function do_delete_selected_user_image() { -if (session.temp_last_user_image_filename) { -effect_api_send('user_image_delete', { Filename: session.temp_last_user_image_filename }, 'do_delete_selected_user_image_finish', {}); -} -} -function do_delete_selected_user_image_finish(response, tx) { -try { $('d_user_image_list').removeChild( session.temp_last_user_img ); } catch(e) {;} -session.temp_last_user_img = null; -session.temp_last_user_image_filename = null; -} -function do_choose_user_image() { -if (!session.temp_last_user_image_filename) return; -if (session.uim_callback) { -fire_callback( session.uim_callback, session.temp_last_user_image_filename ); -} -cancel_user_image_manager(); -} -function user_image_thumbnail(filename, width, height, attribs) { -var username = session.username; -if (filename.match(/^(\w+)\/(.+)$/)) { -username = RegExp.$1; -filename = RegExp.$2; -} -var url = '/effect/api/view/users/' + username + '/images/' + filename.replace(/\.(\w+)$/, '_thumb.jpg'); -return ''; -} -function get_user_display(username, full_name, base_url) { -if (!base_url) base_url = ''; -return icon('user', full_name || username, base_url + '#User/' + username); -} -function get_game_tab_bar(game_id, cur_page_name) { -return tab_bar([ -['#Game/' + game_id, 'Game', 'controller.png'], -['#GameDisplay/' + game_id, 'Display', 'monitor.png'], -['#GameAssets/' + game_id, 'Assets', 'folder_page_white.png'], -['#GameObjects/' + game_id, 'Objects', 'bricks.png'], -['#GameAudio/' + game_id, 'Audio', 'sound.gif'], -['#GameKeys/' + game_id, 'Keyboard', 'keyboard.png'], -['#GameLevels/' + game_id, 'Levels', 'world.png'], -['#GamePublisher/' + game_id, 'Publish', 'cd.png'] -], cur_page_name); -} -function get_user_tab_bar(cur_page_name) { -var tabs = [ -['#Home', 'My Home', 'house.png'] -]; -tabs.push( ['#MyAccount', 'Edit Account', 'user_edit.png'] ); -tabs.push( ['#ArticleEdit', 'Post Article', 'page_white_edit.png'] ); -if (config.ProEnabled) { -tabs.push( ['#UserPayments', 'Payments', 'money.png'] ); -} -tabs.push( ['#UserLog', 'Security Log', 'application_view_detail.png'] ); -return tab_bar(tabs, cur_page_name); -} -function get_admin_tab_bar(cur_page_name) { -var tabs = []; -tabs.push( ['#Admin', 'Admin', 'lock.png'] ); -tabs.push( ['#TicketSearch/bugs', 'Bug Tracker', 'bug.png'] ); -tabs.push( ['#TicketSearch/helpdesk', 'Help Desk', 'telephone.png'] ); -tabs.push( ['#AdminReport', 'Reports', 'chart_pie.png'] ); -return tab_bar(tabs, cur_page_name); -} -function get_string(path, args) { -assert(window.config, "get_string() called before config loaded"); -if (!args) args = {}; -args.config = config; -args.session = session; -args.query = session.query; -var value = lookup_path(path, config.Strings); -return (typeof(value) == 'string') ? substitute(value, args) : value; -} -function normalize_dir_path(path) { -if (!path.match(/^\//)) path = '/' + path; -if (!path.match(/\/$/)) path += '/'; -return path; -} -function textedit_window_save(storage_key, filename, content, callback) { -if (!callback) callback = null; -effect_api_mod_touch('textedit'); -if (storage_key.match(/^\/games\/([a-z0-9][a-z0-9\-]*[a-z0-9])\/assets(.+)$/)) { -var game_id = RegExp.$1; -var path = RegExp.$2; -show_progress_dialog(1, "Saving file..."); -effect_api_send('asset_save_file_contents', { -GameID: game_id, -Path: path, -Filename: filename, -Content: content -}, 'textedit_window_save_finish', { _mode: 'asset', _game_id: game_id, _filename: filename, _callback: callback } ); -} -else { -show_progress_dialog(1, "Saving data..."); -effect_api_send('admin_save_file_contents', { -Path: storage_key, -Filename: filename, -Content: content -}, 'textedit_window_save_finish', { _mode: 'admin', _storage_key: storage_key, _filename: filename, _callback: callback } ); -} -} -function textedit_window_save_finish(response, tx) { -hide_progress_dialog(); -if (tx._mode == 'asset') { -do_message('success', "Saved asset: \""+tx._filename+"\""); -show_glog_widget(); -} -else { -do_message('success', "Saved data: \""+tx._storage_key+'/'+tx._filename+"\""); -} -if (tx._callback) tx._callback(); -} -function do_buy(args) { -$P().hide(); -$('d_page_loading').show(); -effect_api_send('create_order', args, 'do_buy_redirect', { _buy_args: args } ); -} -function do_buy_redirect(response, tx) { -var args = tx._buy_args; -$('fe_gco_title').value = args.Title || ''; -$('fe_gco_desc').value = args.Desc || ''; -$('fe_gco_price').value = args.Price || ''; -$('fe_gco_after').value = args.After || ''; -$('fe_gco_unique_id').value = response.OrderID; -Debug.trace('payment', "Redirecting to Google Checkout"); -setTimeout( function() { $('BB_BuyButtonForm').submit(); }, 1 ); -} -function show_glog_widget(game_id) { -if (!game_id) game_id = session.glog_game_id; -if (!game_id) { -$('glog_widget').hide(); -return; -} -if (game_id != session.glog_game_id) { -$('glog_widget').hide(); -session.glog_game_id = game_id; -update_glog_widget(game_id); -} -else { -$('glog_widget').show(); -setTimeout( function() { update_glog_widget(game_id); }, 500 ); -} -} -function update_glog_widget(game_id) { -effect_api_get('game_get_log', { -id: game_id, -offset: 0, -limit: 1, -rand: Math.random() -}, 'receive_glog_data', { _game_id: game_id }); -} -function receive_glog_data(response, tx) { -var game_id = tx._game_id; -if (response && response.Rows && response.Rows.Row) { -var rows = always_array( response.Rows.Row ); -var row = rows[0]; -var html = ''; -html += '
    '; -html += '
    Latest Game Activity
    '; -html += ''; -html += ''; -html += '
    '; -html += '
    '; -html += ''; -html += ''; -html += ''; -html += '
    ' + get_buddy_icon_display(row.Username, 1, 0) + ''; -html += '
    ' + icon( get_icon_for_glog_type(row.Type), ''+row.Message+'' ) + '
    '; -html += '
    ' + get_relative_date(row.Date, true) + '
    '; -html += '
    '; -$('glog_widget').innerHTML = html; -$('glog_widget').show(); -} -} -function show_glog_post_dialog(game_id) { -hide_popup_dialog(); -delete session.progress; -var html = ''; -html += '
    '; -html += '\n \n \n \n'); - }; - __out.push('\n\n'); - __out.push(require('templates/clients/modules/sub_header').call(this, { - heading: t("Ride Request") - })); - __out.push('\n\n\n
    \n
    \n
    \n
    \n \n \n \n \n
    \n\n
    '; -html += '
    Post Game Log Message
    '; -html += '
    '; -html += ''; -html += '
    Enter your log message here. Plain text only please.
    '; -html += '
    '; -html += '

    '; -html += ''; -html += ''; -html += ''; -html += '
    ' + large_icon_button('x', 'Cancel', "hide_popup_dialog()") + ' ' + large_icon_button('check', 'Post Message', "glog_post('"+game_id+"')") + '
    '; -html += '
    '; -html += ''; -session.hooks.keys[ESC_KEY] = 'hide_popup_dialog'; -safe_focus( 'fe_glog_body' ); -show_popup_dialog(500, 175, html); -} -function glog_post(game_id) { -var msg = trim( $('fe_glog_body').value ); -if (msg) { -hide_popup_dialog(); -effect_api_send('game_post_log', { -GameID: game_id, -Message: msg -}, [this, 'glog_post_finish'], { _game_id: game_id }); -} -} -function glog_post_finish(response, tx) { -show_glog_widget( tx._game_id ); -} -function hide_glog_widget() { -$('glog_widget').hide(); -} -function get_icon_for_glog_type(type) { -var icon = 'page_white.png'; -switch (type) { -case 'asset': icon = 'folder_page_white.png'; break; -case 'game': icon = 'controller.png'; break; -case 'member': icon = 'user'; break; -case 'comment': icon = 'comment.png'; break; -case 'level': icon = 'world.png'; break; -case 'sprite': icon = 'cog.png'; break; -case 'tile': icon = 'brick.png'; break; -case 'tileset': icon = 'color_swatch.png'; break; -case 'rev': icon = 'cd.png'; break; -case 'revision': icon = 'cd.png'; break; -case 'font': icon = 'style.png'; break; -case 'key': icon = 'keyboard.png'; break; -case 'audio': icon = 'sound'; break; -case 'payment': icon = 'money.png'; break; -case 'env': icon = 'weather.png'; break; -case 'environment': icon = 'weather.png'; break; -} -return icon; -} -function effect_load_script(url) { -Debug.trace('api', 'Loading script: ' + url); -load_script(url); -} -function effect_api_get_ie(cmd, params, userData) { -if (!session.api_state_ie) session.api_state_ie = {}; -var unique_id = get_unique_id(); -session.api_state_ie[unique_id] = userData; -params.format = 'js'; -params.onafter = 'effect_api_response_ie(' + unique_id + ', response);'; -var url = '/effect/api/' + cmd + composeQueryString(params); -Debug.trace('api', "Sending MSIE HTTP GET: " + url); -load_script(url); -} -function effect_api_response_ie(unique_id, tree) { -Debug.trace('api', "Got response from MSIE HTTP GET"); -var tx = session.api_state_ie[unique_id]; -delete session.api_state_ie[unique_id]; -if (tree.Code == 'session') { -do_logout_2(); -return; -} -if (tree.Code == 'access') { -do_notice("Access Denied", tree.Description, 'do_not_pass_go'); -return; -} -if (tree.Code != 0) { -if (tx._on_error) return fire_callback( tx._on_error, tree, tx ); -return do_error( tree.Description ); -} -if (tree.SessionID) { -if (tree.SessionID == '_DELETE_') { -delete session.cookie.tree.effect_session_id; -} -else { -session.cookie.set( 'effect_session_id', tree.SessionID ); -} -session.cookie.save(); -} -if (tx._api_callback) { -fire_callback( tx._api_callback, tree, tx ); -} -} -function effect_api_get(cmd, params, callback, userData) { -if (!userData) userData = {}; -userData._api_callback = callback; -if (!session.api_mod_cache[cmd] && session.username) session.api_mod_cache[cmd] = hires_time_now(); -if (!params.mod && session.api_mod_cache[cmd]) params.mod = session.api_mod_cache[cmd]; -if (ie) return effect_api_get_ie(cmd, params, userData); -var url = '/effect/api/' + cmd + composeQueryString(params); -Debug.trace('api', "Sending HTTP GET: " + url); -ajax.get( url, 'effect_api_response', userData ); -} -function effect_api_send(cmd, xml, callback, userData) { -if (!userData) userData = {}; -userData._api_callback = callback; -var data = compose_xml('EffectRequest', xml); -Debug.trace('api', "Sending API Command: " + cmd + ": " + data); -ajax.send({ -method: 'POST', -url: '/effect/api/' + cmd, -data: data, -headers: { 'Content-Type': 'text/xml' } -}, 'effect_api_response', userData); -} -function effect_api_response(tx) { -Debug.trace('api', "HTTP " + tx.response.code + ": " + tx.response.data); -if (tx.response.code == 999) { -if (tx.request._auto_retry) { -session.net_error = false; -show_progress_dialog(1, "Trying to reestablish connection..."); -session.net_error = true; -setTimeout( function() { ajax.send(tx.request); }, 1000 ); -return; -} -else return do_error( "HTTP ERROR: " + tx.response.code + ": " + tx.response.data + ' (URL: ' + tx.request.url + ')' ); -} -if (session.net_error) { -hide_progress_dialog(); -session.net_error = false; -} -if (tx.response.code != 200) { -if (tx._silent) return; -else return do_error( "HTTP ERROR: " + tx.response.code + ": " + tx.response.data + ' (URL: ' + tx.request.url + ')' ); -} -var tree = null; -if (!tx._raw) { -var parser = new XML({ -preserveAttributes: true, -text: tx.response.data -}); -if (parser.getLastError()) return do_error("XML PARSE ERROR: " + parser.getLastError()); -tree = parser.getTree(); -if (tree.Code == 'session') { -do_logout_2(); -return; -} -if (tree.Code == 'access') { -do_notice("Access Denied", tree.Description, 'do_not_pass_go'); -return; -} -if (tree.Code != 0) { -if (tx._on_error) return fire_callback( tx._on_error, tree, tx ); -return do_error( tree.Description ); -} -if (tree.SessionID) { -if (tree.SessionID == '_DELETE_') { -delete session.cookie.tree.effect_session_id; -} -else { -session.cookie.set( 'effect_session_id', tree.SessionID ); -} -session.cookie.save(); -} -} -if (tx._api_callback) { -fire_callback( tx._api_callback, tree, tx ); -} -} -function effect_api_mod_touch() { -for (var idx = 0, len = arguments.length; idx < len; idx++) { -session.api_mod_cache[ arguments[idx] ] = hires_time_now(); -} -} -function do_not_pass_go() { -Nav.go('Main'); -} -var Nav = { -loc: '', -old_loc: '', -inited: false, -nodes: [], -init: function() { -if (!this.inited) { -this.inited = true; -this.loc = 'init'; -this.monitor(); -} -}, -monitor: function() { -var parts = window.location.href.split(/\#/); -var anchor = parts[1]; -if (!anchor) anchor = 'Main'; -var full_anchor = '' + anchor; -var sub_anchor = ''; -anchor = anchor.replace(/\%7C/, '|'); -if (anchor.match(/\|(\w+)$/)) { -sub_anchor = RegExp.$1.toLowerCase(); -anchor = anchor.replace(/\|(\w+)$/, ''); -} -if ((anchor != this.loc) && !anchor.match(/^_/)) { -Debug.trace('nav', "Caught navigation anchor: " + full_anchor); -var page_name = ''; -var page_args = null; -if (full_anchor.match(/^\w+\?.+/)) { -parts = full_anchor.split(/\?/); -page_name = parts[0]; -page_args = parseQueryString( parts[1] ); -} -else if (full_anchor.match(/^(\w+)\/(.*)$/)) { -page_name = RegExp.$1; -page_args = RegExp.$2; -} -else { -parts = full_anchor.split(/\//); -page_name = parts[0]; -page_args = parts.slice(1); -} -Debug.trace('nav', "Calling page: " + page_name + ": " + serialize(page_args)); -hide_popup_dialog(); -var result = page_manager.click( page_name, page_args ); -if (result) { -if (window.pageTracker && (this.loc != 'init')) { -setTimeout( function() { pageTracker._trackPageview('/effect/' + anchor); }, 1000 ); -} -this.old_loc = this.loc; -if (this.old_loc == 'init') this.old_loc = 'Main'; -this.loc = anchor; -} -else { -this.go( this.loc ); -} -} -else if (sub_anchor != this.sub_anchor) { -Debug.trace('nav', "Caught sub-anchor: " + sub_anchor); -$P().gosub( sub_anchor ); -} -this.sub_anchor = sub_anchor; -setTimeout( 'Nav.monitor()', 100 ); -}, -go: function(anchor, force) { -anchor = anchor.replace(/^\#/, ''); -if (force) this.loc = 'init'; -window.location.href = '#' + anchor; -}, -prev: function() { -this.go( this.old_loc || 'Main' ); -}, -refresh: function() { -this.loc = 'refresh'; -}, -bar: function() { -var nodes = arguments; -var html = ''; -for (var idx = 0, len = nodes.length; idx < len; idx++) { -var node = nodes[idx]; -if (node) this.nodes[idx] = node; -else node = this.nodes[idx]; -if (node != '_ignore_') { -html += ''; -} -} -html += '
    '; -$('d_nav_bar').innerHTML = html; -}, -title: function(name) { -if (name) document.title = name + ' | EffectGames.com'; -else document.title = 'EffectGames.com'; -}, -currentAnchor: function() { -var parts = window.location.href.split(/\#/); -var anchor = parts[1] || ''; -var sub_anchor = ''; -anchor = anchor.replace(/\%7C/, '|'); -if (anchor.match(/\|(\w+)$/)) { -sub_anchor = RegExp.$1.toLowerCase(); -anchor = anchor.replace(/\|(\w+)$/, ''); -} -return anchor; -} -}; -var Blog = { -edit_caption: '
    *Bold*  |Italic|  {monospace}  [http://link]  Formatting Guide...
    ', -search: function(args) { -if (!args.mode) args.mode = 'and'; -if (!args.offset) args.offset = 0; -if (!args.limit) args.limit = 10; -if (!args.format) args.format = 'xml'; -var query_args = copy_object( args ); -delete query_args.callback; -effect_api_get( 'article_search', query_args, [this, 'search_response'], { _search_args: args } ); -}, -get_article_preview: function(row, args) { -var html = ''; -Debug.trace('blog', 'Row: ' + dumper(row)); -html += '
    '; -var ext_article_url = 'http://' + location.hostname + '/effect/article.psp.html' + row.Path + '/' + row.ArticleID; -var article_url = '#Article' + row.Path + '/' + row.ArticleID; -html += ''; -if (!args.title_only) { -html += '
    '; -html += row.Preview; -html += '  ' + (args.link_title || 'Read Full Story...') + ''; -html += '
    '; -html += ''; -html += '
    '; -var elem_class = args.footer_element_class || 'blog_preview_footer_element'; -if ((session.username == row.Username) || is_admin()) { -html += '
    ' + -icon('page_white_edit.png', "Edit", '#ArticleEdit?path=' + row.Path + '&id=' + row.ArticleID) + '
    '; -} -html += '
    ' + get_user_display(row.Username) + '
    '; -html += '
    ' + icon('calendar', get_short_date_time(row.Published)) + '
    '; -html += '
    ' + icon('talk', row.Comments) + '
    '; -if (0 && row.Tags) html += '
    ' + icon('note.png', make_tag_links(row.Tags, 3)) + '
    '; -html += '
    ' + icon('facebook.png', 'Facebook', "window.open('http://www.facebook.com/sharer.php?u="+encodeURIComponent(ext_article_url)+'&t='+encodeURIComponent(row.Title)+"','sharer','toolbar=0,status=0,width=626,height=436')", "Share on Facebook") + '
    '; -html += '
    ' + icon('twitter.png', 'Twitter', "window.open('http://twitter.com/home?status=Reading%20" + encodeURIComponent(row.Title) + "%3A%20" + encodeURIComponent(ext_article_url)+"')", "Share on Twitter") + '
    '; -html += '
    '; -html += '
    '; -html += '
    '; -} -html += '
    '; -return html; -}, -search_response: function(response, tx) { -var args = tx._search_args; -if (args.callback) return fire_callback(args.callback, response, args); -var div = $(args.target); -assert(div, "Could not find target DIV: " + args.target); -var html = ''; -if (response.Rows && response.Rows.Row) { -var rows = always_array( response.Rows.Row ); -for (var idx = 0, len = rows.length; idx < len; idx++) { -var row = rows[idx]; -html += this.get_article_preview( row, args ); -} -if (args.more && (rows.length == args.limit)) { -html += large_icon_button('page_white_put.png', 'More...', "Blog.more(this, "+encode_object(args)+")") + '
    '; -html += spacer(1,15) + '
    '; -} -if (args.after) html += args.after; -} -else if (response.Code != 0) { -html = 'Search Error: ' . response.Code + ': ' + response.Description; -} -else { -html = args.none_found_msg || 'No articles found.'; -} -div.innerHTML = html; -}, -more: function(div, args) { -args.offset += args.limit; -Debug.trace('blog', "More Args: " + dumper(args)); -div.innerHTML = ''; -effect_api_get( 'article_search', args, [this, 'more_response'], { _search_args: args, _div: div } ); -}, -more_response: function(response, tx) { -var args = tx._search_args; -var button = tx._div; -var html = ''; -if (response.Rows && response.Rows.Row) { -var rows = always_array( response.Rows.Row ); -for (var idx = 0, len = rows.length; idx < len; idx++) { -var row = rows[idx]; -html += this.get_article_preview( row, args ); -} -if (args.more && (rows.length == args.limit)) { -html += large_icon_button('page_white_put.png', 'More...', "Blog.more(this, "+encode_object(args)+")") + '
    '; -html += spacer(1,15) + '
    '; -} -} -else if (response.Code != 0) { -html = 'Search Error: ' . response.Code + ': ' + response.Description; -} -else { -html = args.none_found_msg || 'No more articles found.'; -} -var div = document.createElement('div'); -div.innerHTML = html; -button.parentNode.replaceChild( div, button ); -} -}; -function make_tag_links(csv, max, base_url) { -if (!base_url) base_url = ''; -var tags = csv.split(/\,\s*/); -var append = ''; -if (max && (tags.length > max)) { -tags.length = max; -append = '...'; -} -var html = ''; -for (var idx = 0, len = tags.length; idx < len; idx++) { -html += ''+tags[idx]+''; -if (idx < len - 1) html += ', '; -} -html += append; -return html; -} -function get_url_friendly_title(title) { -title = title.toString().replace(/\W+/g, '_'); -if (title.length > 40) title = title.substring(0, 40); -title = title.replace(/^_+/, ''); -title = title.replace(/_+$/, ''); -return title; -} -function get_full_url(url) { -if (url.match(/^\#/)) { -var parts = window.location.href.split(/\#/); -url = parts[0] + url; -} -return url; -} -var Comments = { -comments_per_page: 10, -get: function(page_id) { -var html = ''; -html += '
    '; -html += '
    Comments'; -html += '
    '; -html += '
    '; -html += '
    '; -setTimeout( function() { Comments.search({ page_id: page_id }); }, 1 ); -return html; -}, -search: function(args) { -if (!args.limit) args.limit = this.comments_per_page; -if (!args.offset) args.offset = 0; -assert(args.page_id, "Comments.search: No page_id specified"); -args.format = 'xml'; -this.last_search = args; -effect_api_get( 'comments_get', args, [this, 'search_response'], { _search_args: args } ); -}, -research: function(offset) { -var args = this.last_search; -if (!args) return; -args.offset = offset; -effect_api_get( 'comments_get', args, [this, 'search_response'], { _search_args: args } ); -}, -search_response: function(response, tx) { -this.comments = []; -var args = tx._search_args; -if (args.callback) return fire_callback(args.callback, response, args); -var html = ''; -html += '
    ' + -large_icon_button( 'comment_edit.png', 'Post Comment...', "Comments.add('"+args.page_id+"')" ) + '
    '; -if (args.page_id.match(/^Article\//)) { -html += '
    ' + icon('feed.png', 'RSS', '/effect/api/comment_feed/' + args.page_id + '.rss', 'Comments RSS Feed') + '
    '; -} -if (response.Items && response.Items.Item && response.List && response.List.length) { -html += ''; -html += '
    '; -var items = this.comments = always_array( response.Items.Item ); -for (var idx = 0, len = items.length; idx < len; idx++) { -var item = items[idx]; -var extra_classes = (args.highlight && (args.highlight == item.ID)) ? ' highlight' : ''; -html += '
    '; -html += '
    '; -if (item.Username) html += ''; -html += '' + item.Name.toString().toUpperCase() + ''; -if (item.Username) html += ''; -html += ', ' + get_short_date_time(item.Date) + '
    '; -html += '
    '; -html += this.get_comment_controls( args.page_id, item ); -html += '
    '; -html += '
    '; -html += '
    ' + item.Comment + '
    '; -html += '
    '; -html += ''; -if (item.LastReply && ((item.LastReply >= time_now() - (86400 * 7)) || (session.username && (session.username == item.Username)))) { -setTimeout( "Comments.show_replies('"+args.page_id+"','"+item.ID+"')", 1 ); -} -} -} -else { -} -$( 'd_comments_' + args.page_id ).innerHTML = html; -}, -get_control: function(icon, code, text, status_text) { -if (!icon.match(/\.\w+$/)) icon += '.gif'; -return '' + code_link(code, text, status_text) + ''; -}, -get_comment_controls: function(page_id, comment) { -var html = ''; -var spacer_txt = '  |  '; -if (session.user) { -html += this.get_control('comment', "Comments.reply('"+page_id+"','"+comment.ID+"')", 'Reply') + spacer_txt; -} -if (comment.Replies) { -if (comment._replies_visible) html += this.get_control('magnify_minus', "Comments.hide_replies('"+page_id+"','"+comment.ID+"')", 'Hide Replies'); -else html += this.get_control('magnify_plus', "Comments.show_replies('"+page_id+"','"+comment.ID+"')", 'Show Replies ('+comment.Replies+')'); -if (session.user) html += spacer_txt; -} -if (session.user) { -html += this.get_control( -'star', -"Comments.like('"+page_id+"','"+comment.ID+"')", -'Like' + (comment.Like ? (' ('+comment.Like+')') : ''), -comment.Like ? (comment.Like + ' ' + ((comment.Like == 1) ? 'person likes this' : 'people like this')) : 'I like this comment' -) + spacer_txt; -if (is_admin()) html += this.get_control('trash', "Comments._delete('"+page_id+"','"+comment.ID+"')", 'Delete') + spacer_txt; -html += this.get_control('warning', "Comments.report('"+page_id+"','"+comment.ID+"')", 'Report Abuse'); -} -return html; -}, -reply: function(page_id, comment_id) { -hide_popup_dialog(); -delete session.progress; -var comment = find_object( this.comments, { ID: comment_id } ); -var html = ''; -html += '
    '; -html += '\n \n \n \n \n \n \n \n \n \n '); - }, this); - __out.push('\n\n
    \n
    '; -html += '
    Reply to Comment by "'+comment.Name+'"
    '; -html += '
    '; -var name = this.get_name(); -html += '

    Posted by: ' + name; -if (!session.user) html += ' → Create Account'; -html += '


    '; -html += ''; -html += Blog.edit_caption; -html += '
    '; -html += '

    '; -html += ''; -html += ''; -html += ''; -html += '
    ' + large_icon_button('x', 'Cancel', "hide_popup_dialog()") + ' ' + large_icon_button('check', 'Post Reply', "Comments.post_reply('"+page_id+"','"+comment_id+"')") + '
    '; -html += '
    '; -html += ''; -session.hooks.keys[ESC_KEY] = 'hide_popup_dialog'; -safe_focus( 'fe_comment_body' ); -show_popup_dialog(600, 300, html); -}, -post_reply: function(page_id, comment_id) { -var value = $('fe_comment_body').value; -if (!value) return; -hide_popup_dialog(); -show_progress_dialog(1, "Posting reply..."); -var name = this.get_name(); -effect_api_mod_touch('comment_replies_get'); -effect_api_send('comment_post_reply', { -PageID: page_id, -CommentID: comment_id, -Username: session.username || '', -Name: name, -Comment: value, -PageURL: location.href -}, [this, 'post_reply_finish'], { _page_id: page_id, _comment_id: comment_id } ); -}, -post_reply_finish: function(response, tx) { -hide_popup_dialog(); -var page_id = tx._page_id; -var comment_id = tx._comment_id; -var comment = find_object( this.comments, { ID: comment_id } ); -do_message('success', "Comment reply posted successfully."); -this.show_replies(page_id, comment_id); -if (!comment.Replies) comment.Replies = 1; else comment.Replies++; -$('d_comment_controls_'+comment_id).innerHTML = this.get_comment_controls( page_id, comment ); -}, -show_replies: function(page_id, comment_id) { -var comment = find_object( this.comments, { ID: comment_id } ); -if (!comment._replies_visible) { -$('d_comment_replies_' + comment_id).show().innerHTML = ''; -} -var args = { page_id: page_id, comment_id: comment_id, offset: 0, limit: 100 }; -effect_api_get( 'comment_replies_get', args, [this, 'receive_replies_response'], { _search_args: args } ); -}, -receive_replies_response: function(response, tx) { -var page_id = tx._search_args.page_id; -var comment_id = tx._search_args.comment_id; -var comment = find_object( this.comments, { ID: comment_id } ); -var html = ''; -var replies = always_array( response.Items.Item ); -for (var idx = 0, len = replies.length; idx < len; idx++) { -var reply = replies[idx]; -html += get_chat_balloon( -(reply.Username == session.username) ? 'blue' : 'grey', -reply.Username, -reply.Comment.replace(/^]*?>(.+)<\/div>$/i, '$1') -); -} -$('d_comment_replies_' + comment_id).innerHTML = html; -if (!comment._replies_visible) { -$('d_comment_replies_' + comment_id).hide(); -animate_div_visibility( 'd_comment_replies_' + comment_id, true ); -} -comment._replies_visible = true; -$('d_comment_controls_'+comment_id).innerHTML = this.get_comment_controls( page_id, comment ); -}, -hide_replies: function(page_id, comment_id) { -var comment = find_object( this.comments, { ID: comment_id } ); -if (comment._replies_visible) { -animate_div_visibility( 'd_comment_replies_' + comment_id, false ); -comment._replies_visible = false; -$('d_comment_controls_'+comment_id).innerHTML = this.get_comment_controls( page_id, comment ); -} -}, -like: function(page_id, comment_id) { -effect_api_mod_touch('comments_get'); -effect_api_send('comment_like', { -PageID: page_id, -CommentID: comment_id -}, [this, 'like_finish'], { _page_id: page_id, _comment_id: comment_id, _on_error: [this, 'like_error'] } ); -}, -like_error: function(response, tx) { -if (response.Code == 'comment_already_like') do_message('error', "You already like this comment."); -else do_error( response.Description ); -}, -like_finish: function(resopnse, tx) { -var page_id = tx._page_id; -var comment_id = tx._comment_id; -var comment = find_object( this.comments, { ID: comment_id } ); -do_message('success', "You now like this comment."); -if (!comment.Like) comment.Like = 1; else comment.Like++; -$('d_comment_controls_'+comment_id).innerHTML = this.get_comment_controls( page_id, comment ); -}, -add: function(page_id) { -hide_popup_dialog(); -delete session.progress; -var html = ''; -html += '
    '; -html += '", "" ], - legend: [ 1, "
    ", "
    " ], - thead: [ 1, "
    '; -html += '
    Post New Comment
    '; -html += '
    '; -var name = this.get_name(); -html += '

    Posted by: ' + name; -if (!session.user) html += ' → Create Account'; -html += '


    '; -html += ''; -html += Blog.edit_caption; -html += '
    '; -html += '

    '; -html += ''; -html += ''; -html += ''; -html += '
    ' + large_icon_button('x', 'Cancel', "hide_popup_dialog()") + ' ' + large_icon_button('check', 'Post Comment', "Comments.post('"+page_id+"')") + '
    '; -html += '
    '; -html += ''; -session.hooks.keys[ESC_KEY] = 'hide_popup_dialog'; -safe_focus( 'fe_comment_body' ); -show_popup_dialog(600, 300, html); -}, -report: function(page_id, comment_id) { -if (confirm('Are you sure you want to report this comment to the site administrators as abusive and/or spam?')) { -effect_api_send('comment_report_abuse', { -PageID: page_id, -CommentID: comment_id -}, [this, 'report_finish'], { _page_id: page_id, _comment_id: comment_id } ); -} -}, -report_finish: function(response, tx) { -do_message('success', 'Your abuse report has been received, and will be evaluated by the site administrators.'); -}, -_delete: function(page_id, comment_id) { -if (confirm('Are you sure you want to permanently delete this comment?')) { -effect_api_mod_touch('comments_get'); -effect_api_send('comment_delete', { -PageID: page_id, -CommentID: comment_id -}, [this, 'delete_finish'], { _page_id: page_id, _comment_id: comment_id } ); -} -}, -delete_finish: function(response, tx) { -do_message('success', 'The comment was deleted successfully.'); -var page_id = tx._page_id; -this.search({ page_id: page_id }); -}, -get_name: function() { -var name = '(Anonymous)'; -if (session.user) { -if (get_bool_pref('public_profile')) name = session.user.FullName; -else name = session.username; -} -return name; -}, -post: function(page_id) { -var value = $('fe_comment_body').value; -if (!value) return; -hide_popup_dialog(); -show_progress_dialog(1, "Posting comment..."); -var name = this.get_name(); -effect_api_mod_touch('comments_get'); -effect_api_send('comment_post', { -PageID: page_id, -Username: session.username || '', -Name: name, -Comment: value -}, [this, 'post_finish'], { _page_id: page_id } ); -}, -post_finish: function(response, tx) { -hide_popup_dialog(); -var comment_id = response.CommentID; -var page_id = tx._page_id; -this.search({ page_id: page_id, highlight: comment_id }); -} -}; -Class.create( 'Menu', { -id: '', -menu: null, -__construct: function(id) { -this.id = id; -}, -load: function() { -if (!this.menu) { -this.menu = $(this.id); -assert( !!this.menu, "Could not locate DOM element: " + this.id ); -} -}, -get_value: function() { -this.load(); -return this.menu.options[this.menu.selectedIndex].value; -}, -set_value: function(value, auto_add) { -value = str_value(value); -this.load(); -for (var idx = 0, len = this.menu.options.length; idx < len; idx++) { -if (this.menu.options[idx].value == value) { -this.menu.selectedIndex = idx; -return true; -} -} -if (auto_add) { -this.menu.options[this.menu.options.length] = new Option(value, value); -this.menu.selectedIndex = this.menu.options.length - 1; -return true; -} -return false; -}, -disable: function() { -this.load(); -this.menu.disabled = true; -this.menu.setAttribute( 'disabled', 'disabled' ); -}, -enable: function() { -this.load(); -this.menu.setAttribute( 'disabled', '' ); -this.menu.disabled = false; -}, -populate: function(items, sel_value) { -this.load(); -this.menu.options.length = 0; -for (var idx = 0, len = items.length; idx < len; idx++) { -var item = items[idx]; -var item_name = ''; -var item_value = ''; -if (isa_hash(item)) { -item_name = item.label; -item_value = item.data; -} -else if (isa_array(item)) { -item_name = item[0]; -item_value = item[1]; -} -else { -item_name = item_value = item; -} -this.menu.options[ this.menu.options.length ] = new Option( item_name, item_value ); -if (item_value == sel_value) this.menu.selectedIndex = idx; -} -} -} ); -Class.subclass( Menu, 'MultiMenu', { -__static: { -toggle_type: function(id) { -var menu = $(id); -assert(menu, "Could not find menu in DOM: " + id); -if (menu.disabled) return; -var obj = MenuManager.find(id); -assert(obj, "Could not find menu in MenuManager: " + id); -var div = $( 'd_inner_' + id ); -var ic = $( 'ic_' + id ); -var is_multiple = (ic.src.indexOf('contract') > -1); -obj.multi = !is_multiple; -var multiple_tag = !is_multiple ? -' multiple="multiple" size=5' : ''; -var items = []; -for (var idx = 0; idx < menu.options.length; idx++) { -var option = menu.options[idx]; -array_push( items, { -value: option.value, -text: option.text, -selected: option.selected -}); -} -var html = ''; -html += ''; -div.innerHTML = html; -ic.src = images_uri + '/menu_' + (is_multiple ? 'expand' : 'contract') + '.gif'; -obj.menu = null; -} -}, -attribs: null, -multi: false, -toggle: true, -__construct: function(id, attribs) { -this.id = id; -if (attribs) this.attribs = attribs; -}, -get_html: function(items, selected_csv, attribs) { -if (!items) items = []; -if (!selected_csv) selected_csv = ''; -if (attribs) this.attribs = attribs; -var selected = csv_to_hash(selected_csv); -this.menu = null; -if (num_keys(selected) > 1) this.multi = true; -var html = '
    '; -html += ''; -html += ''; -html += ''; -if (this.toggle) html += ''; -html += '
    ' + spacer(1,1) + '
    '+spacer(1,2)+'
    '; -html += '
    '; -return html; -}, -get_value: function() { -this.load(); -var value = ''; -for (var idx = 0; idx < this.menu.options.length; idx++) { -var option = this.menu.options[idx]; -if (option.selected && option.value.length) { -if (value.length > 0) value += ','; -value += option.value; -} -} -return value; -}, -set_value: function(value, auto_add) { -value = '' + value; -this.load(); -if (!value) { -value = ''; -for (var idx = 0; idx < this.menu.options.length; idx++) { -var option = this.menu.options[idx]; -option.selected = (option.value == value); -} -return; -} -var selected = csv_to_hash(value); -if ((num_keys(selected) > 1) && !this.multi) { -MultiMenu.toggle_type(this.id); -var self = this; -setTimeout( function() { -self.set_value(value, auto_add); -}, 1 ); -return; -} -for (var idx = 0; idx < this.menu.options.length; idx++) { -var option = this.menu.options[idx]; -option.selected = selected[option.value] ? true : false; -} -}, -populate: function(items, value) { -this.load(); -this.menu.options.length = 0; -if (!value) value = ''; -var selected = csv_to_hash(value); -for (var idx = 0, len = items.length; idx < len; idx++) { -var item = items[idx]; -var item_name = ''; -var item_value = ''; -if (isa_hash(item)) { -item_name = item.label; -item_value = item.data; -} -else if (isa_array(item)) { -item_name = item[0]; -item_value = item[1]; -} -else { -item_name = item_value = item; -} -var opt = new Option( item_name, item_value ); -this.menu.options[ this.menu.options.length ] = opt; -opt.selected = selected[item_value] ? true : false; -} -}, -collapse: function() { -if (this.multi) MultiMenu.toggle_type(this.id); -}, -expand: function() { -if (!this.multi) MultiMenu.toggle_type(this.id); -} -} ); -Class.create( 'MenuManager', { -__static: { -menus: {}, -register: function(menu) { -this.menus[ menu.id ] = menu; -return menu; -}, -find: function(id) { -return this.menus[id]; -} -} -} ); -Class.create( 'GrowlManager', { -lifetime: 10, -marginRight: 0, -marginTop: 0, -__construct: function() { -this.growls = []; -}, -growl: function(type, msg) { -if (find_object(this.growls, { type: type, msg: msg })) return; -var div = $(document.createElement('div')); -div.className = 'growl_message ' + type; -div.setOpacity(0.0); -div.innerHTML = '
    ' + msg + '
    ' + spacer(1,5) + '
    '; -$('d_growl_wrapper').insertBefore( div, $('d_growl_top').nextSibling ); -var growl = { id:get_unique_id(), type: type, msg: msg, opacity:0.0, start:hires_time_now(), div:div }; -this.growls.push(growl); -this.handle_resize(); -this.animate(growl); -var self = this; -div.onclick = function() { -delete_object(self.growls, { id: growl.id }); -$('d_growl_wrapper').removeChild( div ); -}; -}, -animate: function(growl) { -if (growl.deleted) return; -var now = hires_time_now(); -var div = growl.div; -if (now - growl.start <= 0.5) { -div.setOpacity( tweenFrame(0.0, 1.0, (now - growl.start) * 2, 'EaseOut', 'Quadratic') ); -} -else if (now - growl.start <= this.lifetime) { -if (!growl._fully_opaque) { -div.setOpacity( 1.0 ); -growl._fully_opaque = true; -} -} -else if (now - growl.start <= this.lifetime + 1.0) { -div.setOpacity( tweenFrame(1.0, 0.0, (now - growl.start) - this.lifetime, 'EaseOut', 'Quadratic') ); -} -else { -delete_object(this.growls, { id: growl.id }); -$('d_growl_wrapper').removeChild( div ); -return; -} -var self = this; -setTimeout( function() { self.animate(growl); }, 33 ); -}, -handle_resize: function() { -var div = $('d_growl_wrapper'); -if (this.growls.length) { -var size = getInnerWindowSize(); -div.style.top = '' + (10 + this.marginTop) + 'px'; -div.style.left = '' + Math.floor((size.width - 310) - this.marginRight) + 'px'; -} -else { -div.style.left = '-2000px'; -} -} -} ); -window.$GR = new GrowlManager(); -if (window.addEventListener) { -window.addEventListener( "resize", function() { -$GR.handle_resize(); -}, false ); -} -else if (window.attachEvent && !ie6) { -window.attachEvent("onresize", function() { -$GR.handle_resize(); -}); -} -Class.create( 'Effect.Page', { -ID: '', -data: null, -active: false, -__construct: function(config) { -if (!config) return; -this.data = {}; -if (!config) config = {}; -for (var key in config) this[key] = config[key]; -this.div = $('page_' + this.ID); -assert(this.div, "Cannot find page div: page_" + this.ID); -}, -onInit: function() { -}, -onActivate: function() { -return true; -}, -onDeactivate: function() { -return true; -}, -show: function() { -this.div.show(); -}, -hide: function() { -this.div.hide(); -}, -gosub: function(anchor) { -} -} ); -Class.require( 'Effect.Page' ); -Class.create( 'Effect.PageManager', { -pages: null, -current_page_id: '', -on_demand: {}, -__construct: function(page_list) { -this.pages = []; -this.page_list = page_list; -for (var idx = 0, len = page_list.length; idx < len; idx++) { -Debug.trace( 'page', "Initializing page: " + page_list[idx].ID ); -if (Effect.Page[ page_list[idx].ID ]) { -var page = new Effect.Page[ page_list[idx].ID ]( page_list[idx] ); -page.onInit(); -this.pages.push(page); -} -else { -Debug.trace( 'page', 'Page ' + page_list[idx].ID + ' will be loaded on-demand' ); -} -} -}, -find: function(id) { -var page = find_object( this.pages, { ID: id } ); -if (!page) Debug.trace('PageManager', "Could not find page: " + id); -return page; -}, -notify_load: function(file, id) { -for (var idx = 0, len = this.page_list.length; idx < len; idx++) { -var page_config = this.page_list[idx]; -if (page_config.File == file) { -Debug.trace( 'page', "Initializing page on-demand: " + page_config.ID ); -var page = new Effect.Page[ page_config.ID ]( page_config ); -page.onInit(); -this.pages.push(page); -} -} -var self = this; -setTimeout( function() { -var result = self.activate(id, self.temp_args); -delete self.temp_args; -$('d_page_loading').hide(); -if (!result) { -$('page_'+id).hide(); -self.current_page_id = ''; -} -}, 1 ); -}, -activate: function(id, args) { -if (!find_object( this.pages, { ID: id } )) { -var page_config = find_object( this.page_list, { ID: id } ); -assert(!!page_config, "Page config not found: " + id ); -Debug.trace('page', "Loading file on-demand: " + page_config.File + " for page: " + id); -var url = '/effect/api/load_page/' + page_config.File + '?onafter=' + escape('page_manager.notify_load(\''+page_config.File+'\',\''+id+'\')'); -if (page_config.Requires) { -var files = page_config.Requires.split(/\,\s*/); -for (var idx = 0, len = files.length; idx < len; idx++) { -var filename = files[idx]; -if (!this.on_demand[filename]) { -Debug.trace('page', "Also loading file: " + filename); -url += '&file=' + filename; -this.on_demand[filename] = 1; -} -} -} -$('d_page_loading').show(); -this.temp_args = args; -load_script( url ); -return true; -} -$('page_'+id).show(); -var page = this.find(id); -page.active = true; -if (!args) args = []; -if (!isa_array(args)) args = [ args ]; -var result = page.onActivate.apply(page, args); -if (typeof(result) == 'boolean') return result; -else return alert("Page " + id + " onActivate did not return a boolean!"); -}, -deactivate: function(id, new_id) { -var page = this.find(id); -var result = page.onDeactivate(new_id); -if (result) { -$('page_'+id).hide(); -page.active = false; -} -return result; -}, -click: function(id, args) { -Debug.trace('page', "Switching pages to: " + id); -var old_id = this.current_page_id; -if (this.current_page_id) { -var result = this.deactivate( this.current_page_id, id ); -if (!result) return false; -} -this.current_page_id = id; -this.old_page_id = old_id; -window.scrollTo( 0, 0 ); -var result = this.activate(id, args); -if (!result) { -$('page_'+id).hide(); -this.current_page_id = ''; -} -return true; -} -} ); -Class.subclass( Effect.Page, "Effect.Page.Main", { -inited: false, -onActivate: function() { -Nav.bar( ['Main', 'EffectGames.com'] ); -Nav.title(''); -$('d_blog_news').innerHTML = loading_image(); -$('d_blog_community').innerHTML = loading_image(); -$('d_blog_featured').innerHTML = loading_image(); -Blog.search({ -stag: 'featured_game', -limit: 4, -full: 1, -callback: [this, 'receive_featured_games'] -}); -effect_api_get( 'get_site_info', { cat: 'pop_pub_games' }, [this, 'receive_pop_pub_games'], { } ); -Blog.search({ -stag: 'front_page', -limit: 5, -target: 'd_blog_news', -more: 1 -}); -Blog.search({ -path: '/community', -limit: 5, -target: 'd_blog_community', -more: 1 -}); -if (!this.inited) { -this.inited = true; -config.Strings.MainSlideshow.Slide = always_array( config.Strings.MainSlideshow.Slide ); -this.slide_idx = 0; -this.num_slides = config.Strings.MainSlideshow.Slide.length; -this.slide_div_num = 0; -this.slide_dir = 1; -this.bk_pos = -340; -this.bk_pos_target = -340; -this.slide_images = []; -for (var idx = 0, len = this.num_slides; idx < len; idx++) { -var url = images_uri + '/' + config.Strings.MainSlideshow.Slide[idx].Photo; -this.slide_images[idx] = new Image(); -this.slide_images[idx].src = png(url, true); -} -} -this.height_target = 470; -this.height_start = $('d_header').offsetHeight; -this.time_start = hires_time_now(); -this.duration = 0.75; -if (!this.timer) this.timer = setTimeout( '$P("Main").animate_mhs()', 33 ); -if (session.user) $('d_blurb_main').hide(); -else { -$('d_blurb_main').innerHTML = get_string('/Main/Blurb'); -$('d_blurb_main').show(); -} -return true; -}, -receive_pop_pub_games: function(response, tx) { -var html = ''; -if (response.Data && response.Data.Games && response.Data.Games.Game) { -var games = always_array( response.Data.Games.Game ); -for (var idx = 0, len = Math.min(games.length, 16); idx < len; idx++) { -var game = games[idx]; -html += '
    ' + -(game.Logo ? -user_image_thumbnail(game.Logo, 80, 60) : -'' -) + '
    ' + ww_fit_box(game.Title, 80, 2, session.em_width, 1) + '
    '; -} -html += '
    '; -} -else { -html += 'No active public games found! Why not create a new one?'; -} -$('d_main_pop_pub_games').innerHTML = html; -}, -receive_featured_games: function(response, tx) { -var html = ''; -if (response.Rows && response.Rows.Row) { -html += ''; -var rows = always_array( response.Rows.Row ); -for (var idx = 0, len = rows.length; idx < len; idx++) { -var row = rows[idx]; -var image_url = row.Params.featured_image; -if (image_url && image_url.match(/^(\w+)\/(\w+\.\w+)$/)) { -image_url = '/effect/api/view/users/' + RegExp.$1 + '/images/' + RegExp.$2; -} -if (idx % 2 == 0) html += ''; -html += ''; -if (idx % 2 == 1) html += ''; -} -if (rows.length % 2 == 1) { -html += ''; -html += ''; -} -html += '
    '; -html += ''; -html += ''; -html += ''; -html += ''; -html += ''; -html += '
    '; -html += ''; -html += '' + spacer(10,1) + ''; -html += ''; -html += ''; -html += '' + spacer(15,1) + '
    '; -html += spacer(1,20); -html += '
    '; -} -$('d_blog_featured').innerHTML = html; -}, -animate_mhs: function() { -var now = hires_time_now(); -if (now - this.time_start >= this.duration) { -$('d_header').style.height = '' + this.height_target + 'px'; -$('d_shadow').style.height = '' + this.height_target + 'px'; -delete this.timer; -} -else { -var height = tweenFrame(this.height_start, this.height_target, (now - this.time_start) / this.duration, 'EaseOut', 'Circular'); -$('d_header').style.height = '' + height + 'px'; -$('d_shadow').style.height = '' + height + 'px'; -this.timer = setTimeout( '$P("Main").animate_mhs()', 33 ); -} -}, -onDeactivate: function() { -$('d_blog_news').innerHTML = ''; -$('d_blog_community').innerHTML = ''; -this.height_target = 75; -this.height_start = $('d_header').offsetHeight; -this.time_start = hires_time_now(); -if (!this.timer) this.timer = setTimeout( '$P("Main").animate_mhs()', 33 ); -return true; -}, -draw_slide: function() { -if (this.slide_timer) return; -var slide = config.Strings.MainSlideshow.Slide[ this.slide_idx ]; -this.old_photo = $('d_header_slideshow_photo_' + this.slide_div_num); -this.old_text = $('d_header_slideshow_text_' + this.slide_div_num); -this.slide_div_num = 1 - this.slide_div_num; -this.new_photo = $('d_header_slideshow_photo_' + this.slide_div_num); -this.new_text = $('d_header_slideshow_text_' + this.slide_div_num); -this.new_photo.style.backgroundImage = 'url('+png(images_uri+'/'+slide.Photo, true)+')'; -this.new_photo.setOpacity(0.0); -var html = ''; -html += slide.Text; -this.slide_width = this.new_text.offsetWidth; -this.new_text.innerHTML = html; -if (this.slide_dir == 1) this.new_text.style.left = '' + this.slide_width + 'px'; -else this.new_text.style.left = '-' + this.slide_width + 'px'; -this.slide_time_start = hires_time_now(); -this.slide_timer = setTimeout( '$P("Main").animate_mhs_slide()', 33 ); -}, -animate_mhs_slide: function() { -var now = hires_time_now(); -if (now - this.slide_time_start >= this.duration) { -this.new_text.style.left = '0px'; -this.old_text.style.left = '-' + this.slide_width + 'px'; -this.new_photo.setOpacity( 1.0 ); -this.old_photo.setOpacity( 0.0 ); -delete this.slide_timer; -this.bk_pos = this.bk_pos_target; -} -else { -var value = tweenFrame(0.0, 1.0, (now - this.slide_time_start) / this.duration, 'EaseOut', 'Circular'); -if (this.slide_dir == 1) { -this.new_text.style.left = '' + Math.floor( this.slide_width - (this.slide_width * value) ) + 'px'; -this.old_text.style.left = '-' + Math.floor( this.slide_width * value ) + 'px'; -} -else { -this.new_text.style.left = '-' + Math.floor( this.slide_width - (this.slide_width * value) ) + 'px'; -this.old_text.style.left = '' + Math.floor( this.slide_width * value ) + 'px'; -} -this.new_photo.setOpacity( value ); -this.old_photo.setOpacity( 1.0 - value ); -var bkp = Math.floor( this.bk_pos + ((this.bk_pos_target - this.bk_pos) * value) ); -$('d_header').style.backgroundPosition = '' + bkp + 'px 0px'; -this.slide_timer = setTimeout( '$P("Main").animate_mhs_slide()', 33 ); -} -}, -prev_slide: function() { -this.bk_pos_target += 200; -this.slide_idx--; -if (this.slide_idx < 0) this.slide_idx += this.num_slides; -this.slide_dir = -1; -this.draw_slide(); -}, -next_slide: function() { -this.bk_pos_target -= 200; -this.slide_idx++; -if (this.slide_idx >= this.num_slides) this.slide_idx -= this.num_slides; -this.slide_dir = 1; -this.draw_slide(); -} -} ); -Class.subclass( Effect.Page, "Effect.Page.PublicGameList", { -onActivate: function() { -Nav.bar( -['Main', 'EffectGames.com'], -['PublicGameList', "All Public Games"] -); -Nav.title( "List of All Public Game Projects" ); -effect_api_get( 'get_site_info', { cat: 'all_pub_games' }, [this, 'receive_all_pub_games'], { } ); -this.div.innerHTML = loading_image(); -return true; -}, -onDeactivate: function() { -this.div.innerHTML = ''; -return true; -}, -receive_all_pub_games: function(response, tx) { -var html = ''; -html += '

    List of All Public Game Projects

    '; -html += '
    This is the complete list of public games currently being built by our users, presented in alphabetical order. Maybe they could use some help! Check out the game project pages and see (requires user account).
    '; -if (response.Data && response.Data.Games && response.Data.Games.Game) { -var games = always_array( response.Data.Games.Game ); -for (var idx = 0, len = games.length; idx < len; idx++) { -var game = games[idx]; -html += '
    ' + -(game.Logo ? -user_image_thumbnail(game.Logo, 80, 60) : -'' -) + '
    ' + ww_fit_box(game.Title, 80, 2, session.em_width, 1) + '
    '; -} -html += '
    '; -} -else { -html += 'No public games found! Why not create a new one?'; -} -this.div.innerHTML = html; -} -} ); -Class.subclass( Effect.Page, "Effect.Page.Search", { -onActivate: function(args) { -if (!args) args = {}; -var search_text = args.q; -var start = args.s || 0; -if (!start) start = 0; -var title = 'Search results for "'+search_text+'"'; -Nav.bar( -['Main', 'EffectGames.com'], -['Search?q=' + escape(search_text), "Search Results"] -); -Nav.title( title ); -this.last_search_text = search_text; -$('d_article_search').innerHTML = loading_image(); -load_script( 'http://www.google.com/uds/GwebSearch?callback=receive_google_search_results&context=0&lstkp=0&rsz=large&hl=en&source=gsc&gss=.com&sig=&q='+escape(search_text)+'%20site%3Ahttp%3A%2F%2Fwww.effectgames.com%2F&key=notsupplied&v=1.0&start='+start+'&nocache=' + (new Date()).getTime() ); -$('h_article_search').innerHTML = title; -return true; -}, -onDeactivate: function(new_page) { -$('fe_search_bar').value = ''; -$('d_article_search').innerHTML = ''; -return true; -} -} ); -function do_search_bar() { -var search_text = $('fe_search_bar').value; -if (search_text.length) { -Nav.go('Search?q=' + escape(search_text)); -} -} -function receive_google_search_results(context, response) { -var html = ''; -html += '
    Powered by
    '; -if (response.results.length) { -for (var idx = 0, len = response.results.length; idx < len; idx++) { -var row = response.results[idx]; -var url = row.unescapedUrl.replace(/^.+article\.psp\.html/, '#Article'); -html += '
    '; -html += ''; -html += '
    ' + row.content + '
    '; -html += '
    '; -} -} -else { -html += 'No results found.'; -} -if (response.cursor.pages) { -html += '
    Page: '; -for (var idx = 0, len = response.cursor.pages.length; idx < len; idx++) { -html += ''; -var page = response.cursor.pages[idx]; -var url = '#Search?q=' + escape($P('Search').last_search_text) + '&s=' + page.start; -if (response.cursor.currentPageIndex != idx) html += ''; -else html += ''; -html += page.label; -if (response.cursor.currentPageIndex != idx) html += ''; -else html += ''; -html += ''; -} -html += '
    '; -} -$('d_article_search').innerHTML = html; -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/index.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/index.js deleted file mode 100644 index 8b164a42..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/index.js +++ /dev/null @@ -1 +0,0 @@ -exports.ZeParser = require('./ZeParser').ZeParser; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/package.json b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/package.json deleted file mode 100644 index 90320447..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "author": { - "name": "Peter van der Zee", - "url": "http://qfox.nl/" - }, - "name": "zeparser", - "description": "My JavaScript parser", - "version": "0.0.5", - "homepage": "https://github.com/qfox/ZeParser/", - "repository": { - "type": "git", - "url": "git://github.com/qfox/ZeParser.git" - }, - "main": "./index", - "engines": { - "node": "*" - }, - "dependencies": {}, - "devDependencies": {}, - "readme": "This is a JavaScript parser.\nhttp://github.com/qfox/ZeParser\n(c) Peter van der Zee\nhttp://qfox.nl\n\n\nBenchmark\nhttp://qfox.github.com/ZeParser/benchmark.html\n\nThe Tokenizer is used by the parser. The parser tells the tokenizer whether the next token may be a regular expression or not. Without the parser, the tokenizer will fail if regular expression literals are used in the input.\n\nUsage:\nZeParser.parse(input);\n\nReturns a \"parse tree\" which is a tree of an array of arrays with tokens (regular objects) as leafs. Meta information embedded as properties (of the arrays and the tokens).\n\nZeParser.createParser(input);\n\nReturns a new ZeParser instance which has already parsed the input. Amongst others, the ZeParser instance will have the properties .tree, .wtree and .btree.\n\n.tree is the parse tree mentioned above.\n.wtree (\"white\" tree) is a regular array with all the tokens encountered (including whitespace, line terminators and comments)\n.btree (\"black\" tree) is just like .wtree but without the whitespace, line terminators and comments. This is what the specification would call the \"token stream\".\n\nI'm aware that the naming convention is a bit awkward. It's a tradeoff between short and descriptive. The streams are used quite often in the analysis.\n\nTokens are regular objects with several properties. Amongst them are .tokposw and .tokposw, they correspond with their own position in the .wtree and .btree.\n\nThe parser has two modes for parsing: simple and extended. Simple mode is mainly for just parsing and returning the streams and a simple parse tree. There's not so much meta information here and this mode is mainly built for speed. The other mode has everything required for Zeon to do its job. This mode is toggled by the instance property .ast, which is true by default :)\n\nNon-factory example:\n\nvar input = \"foo\";\nvar tree = []; // this should probably be refactored away some day\nvar tokenizer = new Tokenizer(input); // dito\nvar parser = new ZeParser(input, tokenizer, tree);\nparser.parse(); // returns tree..., should never throw errors\n", - "readmeFilename": "README", - "bugs": { - "url": "https://github.com/qfox/ZeParser/issues" - }, - "_id": "zeparser@0.0.5", - "_from": "zeparser@0.0.5" -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/test-parser.html b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/test-parser.html deleted file mode 100755 index 1ff5ff43..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/test-parser.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - Parser Test Suite Page - - - - (c) qfox.nl
    - Parser test suite
    -
    Running...
    - - - - - - - \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/test-tokenizer.html b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/test-tokenizer.html deleted file mode 100755 index 0e0d1b1a..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/test-tokenizer.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - Tokenizer Test Suite Page - - - - (c) qfox.nl
    - - - - - - \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/tests.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/tests.js deleted file mode 100644 index 8a4138be..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/tests.js +++ /dev/null @@ -1,478 +0,0 @@ -// tests for both the tokenizer and parser. Parser test results could be checked tighter. -// api: [input, token-output-count, ?regex-hints, desc] -// regex-hints are for tokenizer, will tell for each token whether it might parse regex or not (parser's job) -var Tests = [ - -["var abc;", 4, "Variable Declaration"], -["var abc = 5;", 8, "Variable Declaration, Assignment"], -["/* */", 1, "Block Comment"], -["/** **/", 1, "JSDoc-style Comment"], -["var f = function(){;};", 13, "Assignment, Function Expression"], -["hi; // moo", 4, "Trailing Line Comment"], -["hi; // moo\n;", 6, "Trailing Line Comment, Linefeed, `;`"], -["var varwithfunction;", 4, "Variable Declaration, Identifier Containing Reserved Words, `;`"], -["a + b;", 6, "Addition/Concatenation"], - -["'a'", 1, "Single-Quoted String"], -["'a';", 2, "Single-Quoted String, `;`"], // Taken from the parser test suite. - -["'a\\n'", 1, "Single-Quoted String With Escaped Linefeed"], -["'a\\n';", 2, "Single-Quoted String With Escaped Linefeed, `;`"], // Taken from the parser test suite. - -["\"a\"", 1, "Double-Quoted String"], -["\"a\";", 2, "Double-Quoted String, `;`"], // Taken from the parser test suite. - -["\"a\\n\"", 1, "Double-Quoted String With Escaped Linefeed"], -["\"a\\n\";", 2, "Double-Quoted String With Escaped Linefeed, `;`"], // Taken from the parser test suite. - -["500", 1, "Integer"], -["500;", 2, "Integer, `;`"], // Taken from the parser test suite. - -["500.", 1, "Double With Trailing Decimal Point"], -["500.;", 2, "Double With Trailing Decimal Point"], // Taken from the parser test suite. - -["500.432", 1, "Double With Decimal Component"], -["500.432;", 2, "Double With Decimal Component, `;`"], // Taken from the parser test suite. - -[".432432", 1, "Number, 0 < Double < 1"], -[".432432;", 2, "Number, 0 < Double < 1, `;`"], // Taken from the parser test suite. - -["(a,b,c)", 7, "Parentheses, Comma-separated identifiers"], -["(a,b,c);", 8, "Parentheses, Comma-separated identifiers, `;`"], // Taken from the parser test suite. - -["[1,2,abc]", 7, "Array literal"], -["[1,2,abc];", 8, "Array literal, `;`"], // Taken from the parser test suite. - -["{a:1,\"b\":2,c:c}", 13, "Object literal"], -["var o = {a:1,\"b\":2,c:c};", 20, "Assignment, Object Literal, `;`"], // Taken from the parser test suite. - -["var x;\nvar y;", 9, "2 Variable Declarations, Multiple lines"], -["var x;\nfunction n(){ }", 13, "Variable, Linefeed, Function Declaration"], -["var x;\nfunction n(abc){ }", 14, "Variable, Linefeed, Function Declaration With One Argument"], -["var x;\nfunction n(abc, def){ }", 17, "Variable, Linefeed, Function Declaration With Multiple Arguments"], -["function n(){ \"hello\"; }", 11, "Function Declaration, Body"], - -["/a/;", 2, [true, false], "RegExp Literal, `;`"], -["/a/b;", 2, [true, true], "RegExp Literal, Flags, `;`"], -["++x;", 3, "Unary Increment, Prefix, `;`"], -[" / /;", 3, [true, true, false], "RegExp, Leading Whitespace, `;`"], -["/ / / / /", 5, [true, false, false, false, true], "RegExp Containing One Space, Space, Division, Space, RegExp Containing One Space"], - -// Taken from the parser test suite. - -["\"var\";", 2, "Keyword String, `;`"], -["\"variable\";", 2, "String Beginning With Keyword, `;`"], -["\"somevariable\";", 2, "String Containing Keyword, `;`"], -["\"somevar\";", 2, "String Ending With Keyword, `;`"], - -["var varwithfunction;", 4, "Keywords should not be matched in identifiers"], - -["var o = {a:1};", 12, "Object Literal With Unquoted Property"], -["var o = {\"b\":2};", 12, "Object Literal With Quoted Property"], -["var o = {c:c};", 12, "Object Literal With Equivalent Property Name and Identifier"], - -["/a/ / /b/;", 6, [true, true, false, false, true, false], "RegExp, Division, RegExp, `;`"], -["a/b/c;", 6, "Triple Division (Identifier / Identifier / Identifier)"], - -["+function(){/regex/;};", 9, [false, false, false, false, false, true, false, false, false], "Unary `+` Operator, Function Expression Containing RegExp and Semicolon, `;`"], - -// Line Terminators. -["\r\n", 1, "CRLF Line Ending = 1 Linefeed"], -["\r", 1, "CR Line Ending = 1 Linefeed"], -["\n", 1, "LF Line Ending = 1 Linefeed"], -["\r\n\n\u2028\u2029\r", 5, "Various Line Terminators"], - -// Whitespace. -["a \t\u000b\u000c\u00a0\uFFFFb", 8, "Whitespace"], - -// Comments. -["//foo!@#^&$1234\nbar;", 4, "Line Comment, Linefeed, Identifier, `;`"], -["/* abcd!@#@$* { } && null*/;", 2, "Single-Line Block Comment, `;`"], -["/*foo\nbar*/;", 2, "Multi-Line Block Comment, `;`"], -["/*x*x*/;", 2, "Block Comment With Asterisks, `;`"], -["/**/;", 2, "Empty Comment, `;`"], - -// Identifiers. -["x;", 2, "Single-Character Identifier, `;`"], -["_x;", 2, "Identifier With Leading `_`, `;`"], -["xyz;", 2, "Identifier With Letters Only, `;`"], -["$x;", 2, "Identifier With Leading `$`, `;`"], -["x5;", 2, "Identifier With Number As Second Character, `;`"], -["x_y;", 2, "Identifier Containing `_`, `;`"], -["x+5;", 4, "Identifier, Binary `+` Operator, Identifier, `;`"], -["xyz123;", 2, "Alphanumeric Identifier, `;`"], -["x1y1z1;", 2, "Alternating Alphanumeric Identifier, `;`"], -["foo\\u00d8bar;", 2, "Identifier With Unicode Escape Sequence (`\\uXXXX`), `;`"], -["f\u00d8\u00d8bar;", 2, "Identifier With Embedded Unicode Character"], - -// Numbers. -["5;", 2, "Integer, `;`"], -["5.5;", 2, "Double, `;`"], -["0;", 2, "Integer Zero, `;`"], -["0.0;", 2, "Double Zero, `;`"], -["0.001;", 2, "0 < Decimalized Double < 1, `;`"], -["1.e2;", 2, "Integer With Decimal and Exponential Component (`e`), `;`"], -["1.e-2;", 2, "Integer With Decimal and Negative Exponential Component, `;`"], -["1.E2;", 2, "Integer With Decimal and Uppercase Exponential Component (`E`), `;`"], -["1.E-2;", 2, "Integer With Decimal and Uppercase Negative Exponential Component, `;`"], -[".5;", 2, "0 < Double < 1, `;`"], -[".5e3;", 2, "(0 < Double < 1) With Exponential Component"], -[".5e-3;", 2, "(0 < Double < 1) With Negative Exponential Component"], -["0.5e3;", 2, "(0 < Decimalized Double < 1) With Exponential Component"], -["55;", 2, "Two-Digit Integer, `;`"], -["123;", 2, "Three-Digit Integer, `;`"], -["55.55;", 2, "Two-Digit Double, `;`"], -["55.55e10;", 2, "Two-Digit Double With Exponential Component, `;`"], -["123.456;", 2, "Three-Digit Double, `;`"], -["1+e;", 4, "Additive Expression, `;`"], -["0x01;", 2, "Hexadecimal `1` With 1 Leading Zero, `;`"], -["0xcafe;", 2, "Hexadecimal `51966`, `;`"], -["0x12345678;", 2, "Hexadecimal `305419896`, `;`"], -["0x1234ABCD;", 2, "Hexadecimal `305441741` With Uppercase Letters, `;`"], -["0x0001;", 2, "Hexadecimal `1` with 3 Leading Zeros, `;`"], - -// Strings. -["\"foo\";", 2, "Multi-Character Double-Quoted String, `;`"], -["\"a\\n\";", 2, "Double-Quoted String Containing Linefeed, `;`"], -["\'foo\';", 2, "Single-Quoted String, `;`"], -["'a\\n';", 2, "Single-Quoted String Containing Linefeed, `;`"], -["\"x\";", 2, "Single-Character Double-Quoted String, `;`"], -["'';", 2, "Empty Single-Quoted String, `;`"], -["\"foo\\tbar\";", 2, "Double-Quoted String With Tab Character, `;`"], -["\"!@#$%^&*()_+{}[]\";", 2, "Double-Quoted String Containing Punctuators, `;`"], -["\"/*test*/\";", 2, "Double-Quoted String Containing Block Comment, `;`"], -["\"//test\";", 2, "Double-Quoted String Containing Line Comment, `;`"], -["\"\\\\\";", 2, "Double-Quoted String Containing Reverse Solidus, `;`"], -["\"\\u0001\";", 2, "Double-Quoted String Containing Numeric Unicode Escape Sequence, `;`"], -["\"\\uFEFF\";", 2, "Double-Quoted String Containing Alphanumeric Unicode Escape Sequence, `;`"], -["\"\\u10002\";", 2, "Double-Quoted String Containing 5-Digit Unicode Escape Sequence, `;`"], -["\"\\x55\";", 2, "Double-Quoted String Containing Hex Escape Sequence, `;`"], -["\"\\x55a\";", 2, "Double-Quoted String Containing Hex Escape Sequence and Additional Character, `;`"], -["\"a\\\\nb\";", 2, "Double-Quoted String Containing Escaped Linefeed, `;`"], -["\";\"", 1, "Double-Quoted String Containing `;`"], -["\"a\\\nb\";", 2, "Double-Quoted String Containing Reverse Solidus and Linefeed, `;`"], -["'\\\\'+ ''", 4, "Single-Quoted String Containing Reverse Solidus, `+`, Empty Single-Quoted String"], - -// `null`, `true`, and `false`. -["null;", 2, "`null`, `;`"], -["true;", 2, "`true`, `;`"], -["false;", 2, "`false`, `;`"], - -// RegExps -["/a/;", 2, [true, true], "Single-Character RegExp, `;`"], -["/abc/;", 2, [true, true], "Multi-Character RegExp, `;`"], -["/abc[a-z]*def/g;", 2, [true, true], "RegExp Containing Character Range and Quantifier, `;`"], -["/\\b/;", 2, [true, true], "RegExp Containing Control Character, `;`"], -["/[a-zA-Z]/;", 2, [true, true], "RegExp Containing Extended Character Range, `;`"], -["/foo(.*)/g;", 2, [true, false], "RegExp Containing Capturing Group and Quantifier, `;`"], - -// Array Literals. -["[];", 3, "Empty Array, `;`"], -["[\b\n\f\r\t\x20];", 9, "Array Containing Whitespace, `;`"], -["[1];", 4, "Array Containing 1 Element, `;`"], -["[1,2];", 6, "Array Containing 2 Elements, `;`"], -["[1,2,,];", 8, "Array Containing 2 Elisions, `;`"], -["[1,2,3];", 8, "Array Containing 3 Elements, `;`"], -["[1,2,3,,,];", 11, "Array Containing 3 Elisions, `;`"], - -// Object Literals. -["({x:5});", 8, "Object Literal Containing 1 Member; `;`"], -["({x:5,y:6});", 12, "Object Literal Containing 2 Members, `;`"], -["({x:5,});", 9, "Object Literal Containing 1 Member and Trailing Comma, `;`"], -["({if:5});", 8, "Object Literal Containing Reserved Word Property Name, `;`"], -["({ get x() {42;} });", 17, "Object Literal Containing Getter, `;`"], -["({ set y(a) {1;} });", 18, "Object Literal Containing Setter, `;`"], - -// Member Expressions. -["o.m;", 4, "Dot Member Accessor, `;`"], -["o['m'];", 5, "Square Bracket Member Accessor, `;`"], -["o['n']['m'];", 8, "Nested Square Bracket Member Accessor, `;`"], -["o.n.m;", 6, "Nested Dot Member Accessor, `;`"], -["o.if;", 4, "Dot Reserved Property Name Accessor, `;`"], - -// Function Calls. -["f();", 4, "Function Call Operator, `;`"], -["f(x);", 5, "Function Call Operator With 1 Argument, `;`"], -["f(x,y);", 7, "Function Call Operator With Multiple Arguments, `;`"], -["o.m();", 6, "Dot Member Accessor, Function Call, `;`"], -["o['m']();", 7, "Square Bracket Member Accessor, Function Call, `;`"], -["o.m(x);", 7, "Dot Member Accessor, Function Call With 1 Argument, `;`"], -["o['m'](x);", 8, "Square Bracket Member Accessor, Function Call With 1 Argument, `;`"], -["o.m(x,y);", 9, "Dot Member Accessor, Function Call With 2 Arguments, `;`"], -["o['m'](x,y);", 10, "Square Bracket Member Accessor, Function Call With 2 Arguments, `;`"], -["f(x)(y);", 8, "Nested Function Call With 1 Argument Each, `;`"], -["f().x;", 6, "Function Call, Dot Member Accessor, `;`"], - -// `eval` Function. -["eval('x');", 5, "`eval` Invocation With 1 Argument, `;`"], -["(eval)('x');", 7, "Direct `eval` Call Example, `;`"], -["(1,eval)('x');", 9, "Indirect `eval` Call Example, `;`"], -["eval(x,y);", 7, "`eval` Invocation With 2 Arguments, `;`"], - -// `new` Operator. -["new f();", 6, "`new` Operator, Function Call, `;`"], -["new o;", 4, "`new` Operator, Identifier, `;`"], -["new o.m;", 6, "`new` Operator, Dot Member Accessor, `;`"], -["new o.m(x);", 9, "`new` Operator, Dot Member Accessor, Function Call With 1 Argument, `;`"], -["new o.m(x,y);", 11, "``new` Operator, Dot Member Accessor, Function Call With 2 Arguments , `;`"], - -// Prefix and Postfix Increment. -["++x;", 3, "Prefix Increment, Identifier, `;`"], -["x++;", 3, "Identifier, Postfix Increment, `;`"], -["--x;", 3, "Prefix Decrement, Identifier, `;`"], -["x--;", 3, "Postfix Decrement, Identifier, `;`"], -["x ++;", 4, "Identifier, Space, Postfix Increment, `;`"], -["x /* comment */ ++;", 6, "Identifier, Block Comment, Postfix Increment, `;`"], -["++ /* comment */ x;", 6, "Prefix Increment, Block Comment, Identifier, `;`"], - -// Unary Operators. -["delete x;", 4, "`delete` Operator, Space, Identifier, `;`"], -["void x;", 4, "`void` Operator, Space, Identifier, `;`"], -["typeof x;", 4, "`typeof` Operator, Space, Identifier, `;`"], -["+x;", 3, "Unary `+` Operator, Identifier, `;`"], -["-x;", 3, "Unary Negation Operator, Identifier, `;`"], -["~x;", 3, "Bitwise NOT Operator, Identifier, `;`"], -["!x;", 3, "Logical NOT Operator, Identifier, `;`"], - -// Comma Operator. -["x, y;", 5, "Comma Operator"], - -// Miscellaneous. -["new Date++;", 5, "`new` Operator, Identifier, Postfix Increment, `;`"], -["+x++;", 4, "Unary `+`, Identifier, Postfix Increment, `;`"], - -// Expressions. -["1 * 2;", 6, "Integer, Multiplication, Integer, `;`"], -["1 / 2;", 6, "Integer, Division, Integer, `;`"], -["1 % 2;", 6, "Integer, Modulus, Integer, `;`"], -["1 + 2;", 6, "Integer, Addition, Integer, `;`"], -["1 - 2;", 6, "Integer, Subtraction, Integer, `;`"], -["1 << 2;", 6, "Integer, Bitwise Left Shift, Integer, `;`"], -["1 >>> 2;", 6, "Integer, Bitwise Zero-fill Right Shift, Integer, `;`"], -["1 >> 2;", 6, "Integer, Bitwise Sign-Propagating Right Shift, Integer, `;`"], -["1 * 2 + 3;", 10, "Order-of-Operations Expression, `;`"], -["(1+2)*3;", 8, "Parenthesized Additive Expression, Multiplication, `;`"], -["1*(2+3);", 8, "Multiplication, Parenthesized Additive Expression, `;`"], -["xy;", 4, "Greater-Than Relational Operator, `;`"], -["x<=y;", 4, "Less-Than-or-Equal-To Relational Operator, `;`"], -["x>=y;", 4, "Greater-Than-or-Equal-To Relational Operator, `;`"], -["x instanceof y;", 6, "`instanceof` Operator, `;`"], -["x in y;", 6, "`in` Operator, `;`"], -["x&y;", 4, "Bitwise AND Operator, `;`"], -["x^y;", 4, "Bitwise XOR Operator, `;`"], -["x|y;", 4, "Bitwise OR Operator, `;`"], -["x+y>>= y;", 6, "Bitwise Zero-Fill Right Shift Assignment, `;`"], -["x <<= y;", 6, "Bitwise Left Shift Assignment, `;`"], -["x += y;", 6, "Additive Assignment, `;`"], -["x -= y;", 6, "Subtractive Assignment, `;`"], -["x *= y;", 6, "Multiplicative Assignment, `;`"], -["x /= y;", 6, "Divisive Assignment, `;`"], -["x %= y;", 6, "Modulus Assignment, `;`"], -["x >>= y;", 6, "Bitwise Sign-Propagating Right Shift Assignment, `;`"], -["x &= y;", 6, "Bitwise AND Assignment, `;`"], -["x ^= y;", 6, "Bitwise XOR Assignment, `;`"], -["x |= y;", 6, "Bitwise OR Assignment, `;`"], - -// Blocks. -["{};", 3, "Empty Block, `;`"], -["{x;};", 5, "Block Containing 1 Identifier, `;`"], -["{x;y;};", 7, "Block Containing 2 Identifiers, `;`"], - -// Variable Declarations. -["var abc;", 4, "Variable Declaration"], -["var x,y;", 6, "Comma-Separated Variable Declarations, `;`"], -["var x=1,y=2;", 10, "Comma-Separated Variable Initializations, `;`"], -["var x,y=2;", 8, "Variable Declaration, Variable Initialization, `;`"], - -// Empty Statements. -[";", 1, "Empty Statement"], -["\n;", 2, "Linefeed, `;`"], - -// Expression Statements. -["x;", 2, "Identifier, `;`"], -["5;", 2, "Integer, `;`"], -["1+2;", 4, "Additive Statement, `;`"], - -// `if...else` Statements. -["if (c) x; else y;", 13, "Space-Delimited `if...else` Statement"], -["if (c) x;", 8, "Space-Delimited `if` Statement, `;`"], -["if (c) {} else {};", 14, "Empty Block-Delimited `if...else` Statement"], -["if (c1) if (c2) s1; else s2;", 19, "Nested `if...else` Statement Without Dangling `else`"], - -// `while` and `do...while` Loops. -["do s; while (e);", 11, "Space-Delimited `do...while` Loop"], -["do { s; } while (e);", 15, "Block-Delimited `do...while` Loop"], -["while (e) s;", 8, "Space-Delimited `while` Loop"], -["while (e) { s; };", 13, "Block-Delimited `while` Loop"], - -// `for` and `for...in` Loops. -["for (;;) ;", 8, "Infinite Space-Delimited `for` Loop"], -["for (;c;x++) x;", 12, "`for` Loop: Empty Initialization Condition; Space-Delimited Body"], -["for (i;i foo(new window[(['Active'].concat('Object').join('X'))])\n```\n\n## License\n\nLicensed under the MIT license.\n\n[socket.io]: http://socket.io/\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/felixge/node-active-x-obfuscator/issues" - }, - "_id": "active-x-obfuscator@0.0.1", - "_from": "active-x-obfuscator@0.0.1" -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/test.js deleted file mode 100644 index e8fc807f..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/test.js +++ /dev/null @@ -1,53 +0,0 @@ -var activeXObfuscator = require('./index'); -var assert = require('assert'); - -var OBFUSCATED_ACTIVE_X_OBJECT = activeXObfuscator.OBFUSCATED_ACTIVE_X_OBJECT; -var OBFUSCATED_ACTIVE_X = activeXObfuscator.OBFUSCATED_ACTIVE_X; - -var input = - "foo(new ActiveXObject('Microsoft.XMLHTTP'))"; -var expected = - "foo(new window[" + OBFUSCATED_ACTIVE_X_OBJECT + "]('Microsoft.XMLHTTP'))"; -assert.equal(activeXObfuscator(input), expected); - -var input = - "var foo = 'ActiveXObject';"; -var expected = - "var foo = " + OBFUSCATED_ACTIVE_X_OBJECT + ";"; -assert.equal(activeXObfuscator(input), expected); - -var input = - 'var foo = "ActiveXObject";'; -var expected = - "var foo = " + OBFUSCATED_ACTIVE_X_OBJECT + ";"; -assert.equal(activeXObfuscator(input), expected); - -var input = - 'var foo = o.ActiveXObject;'; -var expected = - "var foo = o[" + OBFUSCATED_ACTIVE_X_OBJECT + "];"; -assert.equal(activeXObfuscator(input), expected); - -var input = - 'var foo = "ActiveX";'; -var expected = - "var foo = " + OBFUSCATED_ACTIVE_X + ";"; -assert.equal(activeXObfuscator(input), expected); - -var input = - "var foo = 'ActiveX';"; -var expected = - "var foo = " + OBFUSCATED_ACTIVE_X + ";"; -assert.equal(activeXObfuscator(input), expected); - -var input = - "var foo; // ActiveX is cool"; -var expected = - "var foo; // Ac...eX is cool"; -assert.equal(activeXObfuscator(input), expected); - -var input = - "var foo = 'ActiveX is cool';"; -assert.throws(function() { - activeXObfuscator(input); -}, /Unknown ActiveX occurence/); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/.npmignore b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/.npmignore deleted file mode 100644 index d97eaa09..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -.DS_Store -.tmp*~ -*.local.* -.pinf-* \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/README.html b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/README.html deleted file mode 100644 index 5f37ac0f..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/README.html +++ /dev/null @@ -1,981 +0,0 @@ - - - - -UglifyJS – a JavaScript parser/compressor/beautifier - - - - - - - - - - - - - -
    - -
    - -
    -

    UglifyJS – a JavaScript parser/compressor/beautifier

    - - - - -
    -

    1 UglifyJS — a JavaScript parser/compressor/beautifier

    -
    - - -

    -This package implements a general-purpose JavaScript -parser/compressor/beautifier toolkit. It is developed on NodeJS, but it -should work on any JavaScript platform supporting the CommonJS module system -(and if your platform of choice doesn't support CommonJS, you can easily -implement it, or discard the exports.* lines from UglifyJS sources). -

    -

    -The tokenizer/parser generates an abstract syntax tree from JS code. You -can then traverse the AST to learn more about the code, or do various -manipulations on it. This part is implemented in parse-js.js and it's a -port to JavaScript of the excellent parse-js Common Lisp library from Marijn Haverbeke. -

    -

    -( See cl-uglify-js if you're looking for the Common Lisp version of -UglifyJS. ) -

    -

    -The second part of this package, implemented in process.js, inspects and -manipulates the AST generated by the parser to provide the following: -

    -
      -
    • ability to re-generate JavaScript code from the AST. Optionally - indented—you can use this if you want to “beautify” a program that has - been compressed, so that you can inspect the source. But you can also run - our code generator to print out an AST without any whitespace, so you - achieve compression as well. - -
    • -
    • shorten variable names (usually to single characters). Our mangler will - analyze the code and generate proper variable names, depending on scope - and usage, and is smart enough to deal with globals defined elsewhere, or - with eval() calls or with{} statements. In short, if eval() or - with{} are used in some scope, then all variables in that scope and any - variables in the parent scopes will remain unmangled, and any references - to such variables remain unmangled as well. - -
    • -
    • various small optimizations that may lead to faster code but certainly - lead to smaller code. Where possible, we do the following: - -
        -
      • foo["bar"] ==> foo.bar - -
      • -
      • remove block brackets {} - -
      • -
      • join consecutive var declarations: - var a = 10; var b = 20; ==> var a=10,b=20; - -
      • -
      • resolve simple constant expressions: 1 +2 * 3 ==> 7. We only do the - replacement if the result occupies less bytes; for example 1/3 would - translate to 0.333333333333, so in this case we don't replace it. - -
      • -
      • consecutive statements in blocks are merged into a sequence; in many - cases, this leaves blocks with a single statement, so then we can remove - the block brackets. - -
      • -
      • various optimizations for IF statements: - -
          -
        • if (foo) bar(); else baz(); ==> foo?bar():baz(); -
        • -
        • if (!foo) bar(); else baz(); ==> foo?baz():bar(); -
        • -
        • if (foo) bar(); ==> foo&&bar(); -
        • -
        • if (!foo) bar(); ==> foo||bar(); -
        • -
        • if (foo) return bar(); else return baz(); ==> return foo?bar():baz(); -
        • -
        • if (foo) return bar(); else something(); ==> {if(foo)return bar();something()} - -
        • -
        - -
      • -
      • remove some unreachable code and warn about it (code that follows a - return, throw, break or continue statement, except - function/variable declarations). - -
      • -
      • act a limited version of a pre-processor (c.f. the pre-processor of - C/C++) to allow you to safely replace selected global symbols with - specified values. When combined with the optimisations above this can - make UglifyJS operate slightly more like a compilation process, in - that when certain symbols are replaced by constant values, entire code - blocks may be optimised away as unreachable. -
      • -
      - -
    • -
    - - - -
    - -
    -

    1.1 Unsafe transformations

    -
    - - -

    -The following transformations can in theory break code, although they're -probably safe in most practical cases. To enable them you need to pass the ---unsafe flag. -

    - -
    - -
    -

    1.1.1 Calls involving the global Array constructor

    -
    - - -

    -The following transformations occur: -

    - - - -
    new Array(1, 2, 3, 4)  => [1,2,3,4]
    -Array(a, b, c)         => [a,b,c]
    -new Array(5)           => Array(5)
    -new Array(a)           => Array(a)
    -
    - - -

    -These are all safe if the Array name isn't redefined. JavaScript does allow -one to globally redefine Array (and pretty much everything, in fact) but I -personally don't see why would anyone do that. -

    -

    -UglifyJS does handle the case where Array is redefined locally, or even -globally but with a function or var declaration. Therefore, in the -following cases UglifyJS doesn't touch calls or instantiations of Array: -

    - - - -
    // case 1.  globally declared variable
    -  var Array;
    -  new Array(1, 2, 3);
    -  Array(a, b);
    -
    -  // or (can be declared later)
    -  new Array(1, 2, 3);
    -  var Array;
    -
    -  // or (can be a function)
    -  new Array(1, 2, 3);
    -  function Array() { ... }
    -
    -// case 2.  declared in a function
    -  (function(){
    -    a = new Array(1, 2, 3);
    -    b = Array(5, 6);
    -    var Array;
    -  })();
    -
    -  // or
    -  (function(Array){
    -    return Array(5, 6, 7);
    -  })();
    -
    -  // or
    -  (function(){
    -    return new Array(1, 2, 3, 4);
    -    function Array() { ... }
    -  })();
    -
    -  // etc.
    -
    - - -
    - -
    - -
    -

    1.1.2 obj.toString() ==> obj+“”

    -
    - - -
    -
    - -
    - -
    -

    1.2 Install (NPM)

    -
    - - -

    -UglifyJS is now available through NPM — npm install uglify-js should do -the job. -

    -
    - -
    - -
    -

    1.3 Install latest code from GitHub

    -
    - - - - - -
    ## clone the repository
    -mkdir -p /where/you/wanna/put/it
    -cd /where/you/wanna/put/it
    -git clone git://github.com/mishoo/UglifyJS.git
    -
    -## make the module available to Node
    -mkdir -p ~/.node_libraries/
    -cd ~/.node_libraries/
    -ln -s /where/you/wanna/put/it/UglifyJS/uglify-js.js
    -
    -## and if you want the CLI script too:
    -mkdir -p ~/bin
    -cd ~/bin
    -ln -s /where/you/wanna/put/it/UglifyJS/bin/uglifyjs
    -  # (then add ~/bin to your $PATH if it's not there already)
    -
    - - -
    - -
    - -
    -

    1.4 Usage

    -
    - - -

    -There is a command-line tool that exposes the functionality of this library -for your shell-scripting needs: -

    - - - -
    uglifyjs [ options... ] [ filename ]
    -
    - - -

    -filename should be the last argument and should name the file from which -to read the JavaScript code. If you don't specify it, it will read code -from STDIN. -

    -

    -Supported options: -

    -
      -
    • -b or --beautify — output indented code; when passed, additional - options control the beautifier: - -
        -
      • -i N or --indent N — indentation level (number of spaces) - -
      • -
      • -q or --quote-keys — quote keys in literal objects (by default, - only keys that cannot be identifier names will be quotes). - -
      • -
      - -
    • -
    • --ascii — pass this argument to encode non-ASCII characters as - \uXXXX sequences. By default UglifyJS won't bother to do it and will - output Unicode characters instead. (the output is always encoded in UTF8, - but if you pass this option you'll only get ASCII). - -
    • -
    • -nm or --no-mangle — don't mangle names. - -
    • -
    • -nmf or --no-mangle-functions – in case you want to mangle variable - names, but not touch function names. - -
    • -
    • -ns or --no-squeeze — don't call ast_squeeze() (which does various - optimizations that result in smaller, less readable code). - -
    • -
    • -mt or --mangle-toplevel — mangle names in the toplevel scope too - (by default we don't do this). - -
    • -
    • --no-seqs — when ast_squeeze() is called (thus, unless you pass - --no-squeeze) it will reduce consecutive statements in blocks into a - sequence. For example, "a = 10; b = 20; foo();" will be written as - "a=10,b=20,foo();". In various occasions, this allows us to discard the - block brackets (since the block becomes a single statement). This is ON - by default because it seems safe and saves a few hundred bytes on some - libs that I tested it on, but pass --no-seqs to disable it. - -
    • -
    • --no-dead-code — by default, UglifyJS will remove code that is - obviously unreachable (code that follows a return, throw, break or - continue statement and is not a function/variable declaration). Pass - this option to disable this optimization. - -
    • -
    • -nc or --no-copyright — by default, uglifyjs will keep the initial - comment tokens in the generated code (assumed to be copyright information - etc.). If you pass this it will discard it. - -
    • -
    • -o filename or --output filename — put the result in filename. If - this isn't given, the result goes to standard output (or see next one). - -
    • -
    • --overwrite — if the code is read from a file (not from STDIN) and you - pass --overwrite then the output will be written in the same file. - -
    • -
    • --ast — pass this if you want to get the Abstract Syntax Tree instead - of JavaScript as output. Useful for debugging or learning more about the - internals. - -
    • -
    • -v or --verbose — output some notes on STDERR (for now just how long - each operation takes). - -
    • -
    • -d SYMBOL[=VALUE] or --define SYMBOL[=VALUE] — will replace - all instances of the specified symbol where used as an identifier - (except where symbol has properly declared by a var declaration or - use as function parameter or similar) with the specified value. This - argument may be specified multiple times to define multiple - symbols - if no value is specified the symbol will be replaced with - the value true, or you can specify a numeric value (such as - 1024), a quoted string value (such as ="object"= or - ='https://github.com'), or the name of another symbol or keyword (such as =null or document). - This allows you, for example, to assign meaningful names to key - constant values but discard the symbolic names in the uglified - version for brevity/efficiency, or when used wth care, allows - UglifyJS to operate as a form of conditional compilation - whereby defining appropriate values may, by dint of the constant - folding and dead code removal features above, remove entire - superfluous code blocks (e.g. completely remove instrumentation or - trace code for production use). - Where string values are being defined, the handling of quotes are - likely to be subject to the specifics of your command shell - environment, so you may need to experiment with quoting styles - depending on your platform, or you may find the option - --define-from-module more suitable for use. - -
    • -
    • -define-from-module SOMEMODULE — will load the named module (as - per the NodeJS require() function) and iterate all the exported - properties of the module defining them as symbol names to be defined - (as if by the --define option) per the name of each property - (i.e. without the module name prefix) and given the value of the - property. This is a much easier way to handle and document groups of - symbols to be defined rather than a large number of --define - options. - -
    • -
    • --unsafe — enable other additional optimizations that are known to be - unsafe in some contrived situations, but could still be generally useful. - For now only these: - -
        -
      • foo.toString() ==> foo+"" -
      • -
      • new Array(x,…) ==> [x,…] -
      • -
      • new Array(x) ==> Array(x) - -
      • -
      - -
    • -
    • --max-line-len (default 32K characters) — add a newline after around - 32K characters. I've seen both FF and Chrome croak when all the code was - on a single line of around 670K. Pass –max-line-len 0 to disable this - safety feature. - -
    • -
    • --reserved-names — some libraries rely on certain names to be used, as - pointed out in issue #92 and #81, so this option allow you to exclude such - names from the mangler. For example, to keep names require and $super - intact you'd specify –reserved-names "require,$super". - -
    • -
    • --inline-script – when you want to include the output literally in an - HTML <script> tag you can use this option to prevent </script from - showing up in the output. - -
    • -
    • --lift-vars – when you pass this, UglifyJS will apply the following - transformations (see the notes in API, ast_lift_variables): - -
        -
      • put all var declarations at the start of the scope -
      • -
      • make sure a variable is declared only once -
      • -
      • discard unused function arguments -
      • -
      • discard unused inner (named) functions -
      • -
      • finally, try to merge assignments into that one var declaration, if - possible. -
      • -
      - -
    • -
    - - - -
    - -
    -

    1.4.1 API

    -
    - - -

    -To use the library from JavaScript, you'd do the following (example for -NodeJS): -

    - - - -
    var jsp = require("uglify-js").parser;
    -var pro = require("uglify-js").uglify;
    -
    -var orig_code = "... JS code here";
    -var ast = jsp.parse(orig_code); // parse code and get the initial AST
    -ast = pro.ast_mangle(ast); // get a new AST with mangled names
    -ast = pro.ast_squeeze(ast); // get an AST with compression optimizations
    -var final_code = pro.gen_code(ast); // compressed code here
    -
    - - -

    -The above performs the full compression that is possible right now. As you -can see, there are a sequence of steps which you can apply. For example if -you want compressed output but for some reason you don't want to mangle -variable names, you would simply skip the line that calls -pro.ast_mangle(ast). -

    -

    -Some of these functions take optional arguments. Here's a description: -

    -
      -
    • jsp.parse(code, strict_semicolons) – parses JS code and returns an AST. - strict_semicolons is optional and defaults to false. If you pass - true then the parser will throw an error when it expects a semicolon and - it doesn't find it. For most JS code you don't want that, but it's useful - if you want to strictly sanitize your code. - -
    • -
    • pro.ast_lift_variables(ast) – merge and move var declarations to the - scop of the scope; discard unused function arguments or variables; discard - unused (named) inner functions. It also tries to merge assignments - following the var declaration into it. - -

      - If your code is very hand-optimized concerning var declarations, this - lifting variable declarations might actually increase size. For me it - helps out. On jQuery it adds 865 bytes (243 after gzip). YMMV. Also - note that (since it's not enabled by default) this operation isn't yet - heavily tested (please report if you find issues!). -

      -

      - Note that although it might increase the image size (on jQuery it gains - 865 bytes, 243 after gzip) it's technically more correct: in certain - situations, dead code removal might drop variable declarations, which - would not happen if the variables are lifted in advance. -

      -

      - Here's an example of what it does: -

    • -
    - - - - - -
    function f(a, b, c, d, e) {
    -    var q;
    -    var w;
    -    w = 10;
    -    q = 20;
    -    for (var i = 1; i < 10; ++i) {
    -        var boo = foo(a);
    -    }
    -    for (var i = 0; i < 1; ++i) {
    -        var boo = bar(c);
    -    }
    -    function foo(){ ... }
    -    function bar(){ ... }
    -    function baz(){ ... }
    -}
    -
    -// transforms into ==>
    -
    -function f(a, b, c) {
    -    var i, boo, w = 10, q = 20;
    -    for (i = 1; i < 10; ++i) {
    -        boo = foo(a);
    -    }
    -    for (i = 0; i < 1; ++i) {
    -        boo = bar(c);
    -    }
    -    function foo() { ... }
    -    function bar() { ... }
    -}
    -
    - - -
      -
    • pro.ast_mangle(ast, options) – generates a new AST containing mangled - (compressed) variable and function names. It supports the following - options: - -
        -
      • toplevel – mangle toplevel names (by default we don't touch them). -
      • -
      • except – an array of names to exclude from compression. -
      • -
      • defines – an object with properties named after symbols to - replace (see the --define option for the script) and the values - representing the AST replacement value. - -
      • -
      - -
    • -
    • pro.ast_squeeze(ast, options) – employs further optimizations designed - to reduce the size of the code that gen_code would generate from the - AST. Returns a new AST. options can be a hash; the supported options - are: - -
        -
      • make_seqs (default true) which will cause consecutive statements in a - block to be merged using the "sequence" (comma) operator - -
      • -
      • dead_code (default true) which will remove unreachable code. - -
      • -
      - -
    • -
    • pro.gen_code(ast, options) – generates JS code from the AST. By - default it's minified, but using the options argument you can get nicely - formatted output. options is, well, optional :-) and if you pass it it - must be an object and supports the following properties (below you can see - the default values): - -
        -
      • beautify: false – pass true if you want indented output -
      • -
      • indent_start: 0 (only applies when beautify is true) – initial - indentation in spaces -
      • -
      • indent_level: 4 (only applies when beautify is true) -- - indentation level, in spaces (pass an even number) -
      • -
      • quote_keys: false – if you pass true it will quote all keys in - literal objects -
      • -
      • space_colon: false (only applies when beautify is true) – wether - to put a space before the colon in object literals -
      • -
      • ascii_only: false – pass true if you want to encode non-ASCII - characters as \uXXXX. -
      • -
      • inline_script: false – pass true to escape occurrences of - </script in strings -
      • -
      - -
    • -
    - - -
    - -
    - -
    -

    1.4.2 Beautifier shortcoming – no more comments

    -
    - - -

    -The beautifier can be used as a general purpose indentation tool. It's -useful when you want to make a minified file readable. One limitation, -though, is that it discards all comments, so you don't really want to use it -to reformat your code, unless you don't have, or don't care about, comments. -

    -

    -In fact it's not the beautifier who discards comments — they are dumped at -the parsing stage, when we build the initial AST. Comments don't really -make sense in the AST, and while we could add nodes for them, it would be -inconvenient because we'd have to add special rules to ignore them at all -the processing stages. -

    -
    - -
    - -
    -

    1.4.3 Use as a code pre-processor

    -
    - - -

    -The --define option can be used, particularly when combined with the -constant folding logic, as a form of pre-processor to enable or remove -particular constructions, such as might be used for instrumenting -development code, or to produce variations aimed at a specific -platform. -

    -

    -The code below illustrates the way this can be done, and how the -symbol replacement is performed. -

    - - - -
    CLAUSE1: if (typeof DEVMODE === 'undefined') {
    -    DEVMODE = true;
    -}
    -
    -CLAUSE2: function init() {
    -    if (DEVMODE) {
    -        console.log("init() called");
    -    }
    -    ....
    -    DEVMODE &amp;&amp; console.log("init() complete");
    -}
    -
    -CLAUSE3: function reportDeviceStatus(device) {
    -    var DEVMODE = device.mode, DEVNAME = device.name;
    -    if (DEVMODE === 'open') {
    -        ....
    -    }
    -}
    -
    - - -

    -When the above code is normally executed, the undeclared global -variable DEVMODE will be assigned the value true (see CLAUSE1) -and so the init() function (CLAUSE2) will write messages to the -console log when executed, but in CLAUSE3 a locally declared -variable will mask access to the DEVMODE global symbol. -

    -

    -If the above code is processed by UglifyJS with an argument of ---define DEVMODE=false then UglifyJS will replace DEVMODE with the -boolean constant value false within CLAUSE1 and CLAUSE2, but it -will leave CLAUSE3 as it stands because there DEVMODE resolves to -a validly declared variable. -

    -

    -And more so, the constant-folding features of UglifyJS will recognise -that the if condition of CLAUSE1 is thus always false, and so will -remove the test and body of CLAUSE1 altogether (including the -otherwise slightly problematical statement false = true; which it -will have formed by replacing DEVMODE in the body). Similarly, -within CLAUSE2 both calls to console.log() will be removed -altogether. -

    -

    -In this way you can mimic, to a limited degree, the functionality of -the C/C++ pre-processor to enable or completely remove blocks -depending on how certain symbols are defined - perhaps using UglifyJS -to generate different versions of source aimed at different -environments -

    -

    -It is recommmended (but not made mandatory) that symbols designed for -this purpose are given names consisting of UPPER_CASE_LETTERS to -distinguish them from other (normal) symbols and avoid the sort of -clash that CLAUSE3 above illustrates. -

    -
    -
    - -
    - -
    -

    1.5 Compression – how good is it?

    -
    - - -

    -Here are updated statistics. (I also updated my Google Closure and YUI -installations). -

    -

    -We're still a lot better than YUI in terms of compression, though slightly -slower. We're still a lot faster than Closure, and compression after gzip -is comparable. -

    - - -- - - - - - - - - - -
    FileUglifyJSUglifyJS+gzipClosureClosure+gzipYUIYUI+gzip
    jquery-1.6.2.js91001 (0:01.59)3189690678 (0:07.40)31979101527 (0:01.82)34646
    paper.js142023 (0:01.65)43334134301 (0:07.42)42495173383 (0:01.58)48785
    prototype.js88544 (0:01.09)2668086955 (0:06.97)2632692130 (0:00.79)28624
    thelib-full.js (DynarchLIB)251939 (0:02.55)72535249911 (0:09.05)72696258869 (0:01.94)76584
    - - -
    - -
    - -
    -

    1.6 Bugs?

    -
    - - -

    -Unfortunately, for the time being there is no automated test suite. But I -ran the compressor manually on non-trivial code, and then I tested that the -generated code works as expected. A few hundred times. -

    -

    -DynarchLIB was started in times when there was no good JS minifier. -Therefore I was quite religious about trying to write short code manually, -and as such DL contains a lot of syntactic hacks1 such as “foo == bar ? a -= 10 : b = 20”, though the more readable version would clearly be to use -“if/else”. -

    -

    -Since the parser/compressor runs fine on DL and jQuery, I'm quite confident -that it's solid enough for production use. If you can identify any bugs, -I'd love to hear about them (use the Google Group or email me directly). -

    -
    - -
    - -
    -

    1.7 Links

    -
    - - - - - -
    - -
    - -
    -

    1.8 License

    -
    - - -

    -UglifyJS is released under the BSD license: -

    - - - -
    Copyright 2010 (c) Mihai Bazon <mihai.bazon@gmail.com>
    -Based on parse-js (http://marijn.haverbeke.nl/parse-js/).
    -
    -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 HOLDER “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 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.
    -
    - - -
    -

    Footnotes:

    -
    -

    1 I even reported a few bugs and suggested some fixes in the original - parse-js library, and Marijn pushed fixes literally in minutes. -

    -
    -
    - -
    -
    -
    - -
    -

    Date: 2011-12-09 14:59:08 EET

    -

    Author: Mihai Bazon

    -

    Org version 7.7 with Emacs version 23

    -Validate XHTML 1.0 - -
    - - diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/README.org b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/README.org deleted file mode 100644 index 4d01fdfd..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/README.org +++ /dev/null @@ -1,574 +0,0 @@ -#+TITLE: UglifyJS -- a JavaScript parser/compressor/beautifier -#+KEYWORDS: javascript, js, parser, compiler, compressor, mangle, minify, minifier -#+DESCRIPTION: a JavaScript parser/compressor/beautifier in JavaScript -#+STYLE: -#+AUTHOR: Mihai Bazon -#+EMAIL: mihai.bazon@gmail.com - -* UglifyJS --- a JavaScript parser/compressor/beautifier - -This package implements a general-purpose JavaScript -parser/compressor/beautifier toolkit. It is developed on [[http://nodejs.org/][NodeJS]], but it -should work on any JavaScript platform supporting the CommonJS module system -(and if your platform of choice doesn't support CommonJS, you can easily -implement it, or discard the =exports.*= lines from UglifyJS sources). - -The tokenizer/parser generates an abstract syntax tree from JS code. You -can then traverse the AST to learn more about the code, or do various -manipulations on it. This part is implemented in [[../lib/parse-js.js][parse-js.js]] and it's a -port to JavaScript of the excellent [[http://marijn.haverbeke.nl/parse-js/][parse-js]] Common Lisp library from [[http://marijn.haverbeke.nl/][Marijn -Haverbeke]]. - -( See [[http://github.com/mishoo/cl-uglify-js][cl-uglify-js]] if you're looking for the Common Lisp version of -UglifyJS. ) - -The second part of this package, implemented in [[../lib/process.js][process.js]], inspects and -manipulates the AST generated by the parser to provide the following: - -- ability to re-generate JavaScript code from the AST. Optionally - indented---you can use this if you want to “beautify” a program that has - been compressed, so that you can inspect the source. But you can also run - our code generator to print out an AST without any whitespace, so you - achieve compression as well. - -- shorten variable names (usually to single characters). Our mangler will - analyze the code and generate proper variable names, depending on scope - and usage, and is smart enough to deal with globals defined elsewhere, or - with =eval()= calls or =with{}= statements. In short, if =eval()= or - =with{}= are used in some scope, then all variables in that scope and any - variables in the parent scopes will remain unmangled, and any references - to such variables remain unmangled as well. - -- various small optimizations that may lead to faster code but certainly - lead to smaller code. Where possible, we do the following: - - - foo["bar"] ==> foo.bar - - - remove block brackets ={}= - - - join consecutive var declarations: - var a = 10; var b = 20; ==> var a=10,b=20; - - - resolve simple constant expressions: 1 +2 * 3 ==> 7. We only do the - replacement if the result occupies less bytes; for example 1/3 would - translate to 0.333333333333, so in this case we don't replace it. - - - consecutive statements in blocks are merged into a sequence; in many - cases, this leaves blocks with a single statement, so then we can remove - the block brackets. - - - various optimizations for IF statements: - - - if (foo) bar(); else baz(); ==> foo?bar():baz(); - - if (!foo) bar(); else baz(); ==> foo?baz():bar(); - - if (foo) bar(); ==> foo&&bar(); - - if (!foo) bar(); ==> foo||bar(); - - if (foo) return bar(); else return baz(); ==> return foo?bar():baz(); - - if (foo) return bar(); else something(); ==> {if(foo)return bar();something()} - - - remove some unreachable code and warn about it (code that follows a - =return=, =throw=, =break= or =continue= statement, except - function/variable declarations). - - - act a limited version of a pre-processor (c.f. the pre-processor of - C/C++) to allow you to safely replace selected global symbols with - specified values. When combined with the optimisations above this can - make UglifyJS operate slightly more like a compilation process, in - that when certain symbols are replaced by constant values, entire code - blocks may be optimised away as unreachable. - -** <> - -The following transformations can in theory break code, although they're -probably safe in most practical cases. To enable them you need to pass the -=--unsafe= flag. - -*** Calls involving the global Array constructor - -The following transformations occur: - -#+BEGIN_SRC js -new Array(1, 2, 3, 4) => [1,2,3,4] -Array(a, b, c) => [a,b,c] -new Array(5) => Array(5) -new Array(a) => Array(a) -#+END_SRC - -These are all safe if the Array name isn't redefined. JavaScript does allow -one to globally redefine Array (and pretty much everything, in fact) but I -personally don't see why would anyone do that. - -UglifyJS does handle the case where Array is redefined locally, or even -globally but with a =function= or =var= declaration. Therefore, in the -following cases UglifyJS *doesn't touch* calls or instantiations of Array: - -#+BEGIN_SRC js -// case 1. globally declared variable - var Array; - new Array(1, 2, 3); - Array(a, b); - - // or (can be declared later) - new Array(1, 2, 3); - var Array; - - // or (can be a function) - new Array(1, 2, 3); - function Array() { ... } - -// case 2. declared in a function - (function(){ - a = new Array(1, 2, 3); - b = Array(5, 6); - var Array; - })(); - - // or - (function(Array){ - return Array(5, 6, 7); - })(); - - // or - (function(){ - return new Array(1, 2, 3, 4); - function Array() { ... } - })(); - - // etc. -#+END_SRC - -*** =obj.toString()= ==> =obj+“”= - -** Install (NPM) - -UglifyJS is now available through NPM --- =npm install uglify-js= should do -the job. - -** Install latest code from GitHub - -#+BEGIN_SRC sh -## clone the repository -mkdir -p /where/you/wanna/put/it -cd /where/you/wanna/put/it -git clone git://github.com/mishoo/UglifyJS.git - -## make the module available to Node -mkdir -p ~/.node_libraries/ -cd ~/.node_libraries/ -ln -s /where/you/wanna/put/it/UglifyJS/uglify-js.js - -## and if you want the CLI script too: -mkdir -p ~/bin -cd ~/bin -ln -s /where/you/wanna/put/it/UglifyJS/bin/uglifyjs - # (then add ~/bin to your $PATH if it's not there already) -#+END_SRC - -** Usage - -There is a command-line tool that exposes the functionality of this library -for your shell-scripting needs: - -#+BEGIN_SRC sh -uglifyjs [ options... ] [ filename ] -#+END_SRC - -=filename= should be the last argument and should name the file from which -to read the JavaScript code. If you don't specify it, it will read code -from STDIN. - -Supported options: - -- =-b= or =--beautify= --- output indented code; when passed, additional - options control the beautifier: - - - =-i N= or =--indent N= --- indentation level (number of spaces) - - - =-q= or =--quote-keys= --- quote keys in literal objects (by default, - only keys that cannot be identifier names will be quotes). - -- =--ascii= --- pass this argument to encode non-ASCII characters as - =\uXXXX= sequences. By default UglifyJS won't bother to do it and will - output Unicode characters instead. (the output is always encoded in UTF8, - but if you pass this option you'll only get ASCII). - -- =-nm= or =--no-mangle= --- don't mangle names. - -- =-nmf= or =--no-mangle-functions= -- in case you want to mangle variable - names, but not touch function names. - -- =-ns= or =--no-squeeze= --- don't call =ast_squeeze()= (which does various - optimizations that result in smaller, less readable code). - -- =-mt= or =--mangle-toplevel= --- mangle names in the toplevel scope too - (by default we don't do this). - -- =--no-seqs= --- when =ast_squeeze()= is called (thus, unless you pass - =--no-squeeze=) it will reduce consecutive statements in blocks into a - sequence. For example, "a = 10; b = 20; foo();" will be written as - "a=10,b=20,foo();". In various occasions, this allows us to discard the - block brackets (since the block becomes a single statement). This is ON - by default because it seems safe and saves a few hundred bytes on some - libs that I tested it on, but pass =--no-seqs= to disable it. - -- =--no-dead-code= --- by default, UglifyJS will remove code that is - obviously unreachable (code that follows a =return=, =throw=, =break= or - =continue= statement and is not a function/variable declaration). Pass - this option to disable this optimization. - -- =-nc= or =--no-copyright= --- by default, =uglifyjs= will keep the initial - comment tokens in the generated code (assumed to be copyright information - etc.). If you pass this it will discard it. - -- =-o filename= or =--output filename= --- put the result in =filename=. If - this isn't given, the result goes to standard output (or see next one). - -- =--overwrite= --- if the code is read from a file (not from STDIN) and you - pass =--overwrite= then the output will be written in the same file. - -- =--ast= --- pass this if you want to get the Abstract Syntax Tree instead - of JavaScript as output. Useful for debugging or learning more about the - internals. - -- =-v= or =--verbose= --- output some notes on STDERR (for now just how long - each operation takes). - -- =-d SYMBOL[=VALUE]= or =--define SYMBOL[=VALUE]= --- will replace - all instances of the specified symbol where used as an identifier - (except where symbol has properly declared by a var declaration or - use as function parameter or similar) with the specified value. This - argument may be specified multiple times to define multiple - symbols - if no value is specified the symbol will be replaced with - the value =true=, or you can specify a numeric value (such as - =1024=), a quoted string value (such as ="object"= or - ='https://github.com'=), or the name of another symbol or keyword - (such as =null= or =document=). - This allows you, for example, to assign meaningful names to key - constant values but discard the symbolic names in the uglified - version for brevity/efficiency, or when used wth care, allows - UglifyJS to operate as a form of *conditional compilation* - whereby defining appropriate values may, by dint of the constant - folding and dead code removal features above, remove entire - superfluous code blocks (e.g. completely remove instrumentation or - trace code for production use). - Where string values are being defined, the handling of quotes are - likely to be subject to the specifics of your command shell - environment, so you may need to experiment with quoting styles - depending on your platform, or you may find the option - =--define-from-module= more suitable for use. - -- =-define-from-module SOMEMODULE= --- will load the named module (as - per the NodeJS =require()= function) and iterate all the exported - properties of the module defining them as symbol names to be defined - (as if by the =--define= option) per the name of each property - (i.e. without the module name prefix) and given the value of the - property. This is a much easier way to handle and document groups of - symbols to be defined rather than a large number of =--define= - options. - -- =--unsafe= --- enable other additional optimizations that are known to be - unsafe in some contrived situations, but could still be generally useful. - For now only these: - - - foo.toString() ==> foo+"" - - new Array(x,...) ==> [x,...] - - new Array(x) ==> Array(x) - -- =--max-line-len= (default 32K characters) --- add a newline after around - 32K characters. I've seen both FF and Chrome croak when all the code was - on a single line of around 670K. Pass --max-line-len 0 to disable this - safety feature. - -- =--reserved-names= --- some libraries rely on certain names to be used, as - pointed out in issue #92 and #81, so this option allow you to exclude such - names from the mangler. For example, to keep names =require= and =$super= - intact you'd specify --reserved-names "require,$super". - -- =--inline-script= -- when you want to include the output literally in an - HTML =\n\n\n\n\n
    \n\n
    \n\n
    \n

    UglifyJS – a JavaScript parser/compressor/beautifier

    \n\n\n\n\n
    \n

    1 UglifyJS — a JavaScript parser/compressor/beautifier

    \n
    \n\n\n

    \nThis package implements a general-purpose JavaScript\nparser/compressor/beautifier toolkit. It is developed on NodeJS, but it\nshould work on any JavaScript platform supporting the CommonJS module system\n(and if your platform of choice doesn't support CommonJS, you can easily\nimplement it, or discard the exports.* lines from UglifyJS sources).\n

    \n

    \nThe tokenizer/parser generates an abstract syntax tree from JS code. You\ncan then traverse the AST to learn more about the code, or do various\nmanipulations on it. This part is implemented in parse-js.js and it's a\nport to JavaScript of the excellent parse-js Common Lisp library from Marijn Haverbeke.\n

    \n

    \n( See cl-uglify-js if you're looking for the Common Lisp version of\nUglifyJS. )\n

    \n

    \nThe second part of this package, implemented in process.js, inspects and\nmanipulates the AST generated by the parser to provide the following:\n

    \n
      \n
    • ability to re-generate JavaScript code from the AST. Optionally\n indented—you can use this if you want to “beautify” a program that has\n been compressed, so that you can inspect the source. But you can also run\n our code generator to print out an AST without any whitespace, so you\n achieve compression as well.\n\n
    • \n
    • shorten variable names (usually to single characters). Our mangler will\n analyze the code and generate proper variable names, depending on scope\n and usage, and is smart enough to deal with globals defined elsewhere, or\n with eval() calls or with{} statements. In short, if eval() or\n with{} are used in some scope, then all variables in that scope and any\n variables in the parent scopes will remain unmangled, and any references\n to such variables remain unmangled as well.\n\n
    • \n
    • various small optimizations that may lead to faster code but certainly\n lead to smaller code. Where possible, we do the following:\n\n
        \n
      • foo[\"bar\"] ==> foo.bar\n\n
      • \n
      • remove block brackets {}\n\n
      • \n
      • join consecutive var declarations:\n var a = 10; var b = 20; ==> var a=10,b=20;\n\n
      • \n
      • resolve simple constant expressions: 1 +2 * 3 ==> 7. We only do the\n replacement if the result occupies less bytes; for example 1/3 would\n translate to 0.333333333333, so in this case we don't replace it.\n\n
      • \n
      • consecutive statements in blocks are merged into a sequence; in many\n cases, this leaves blocks with a single statement, so then we can remove\n the block brackets.\n\n
      • \n
      • various optimizations for IF statements:\n\n
          \n
        • if (foo) bar(); else baz(); ==> foo?bar():baz();\n
        • \n
        • if (!foo) bar(); else baz(); ==> foo?baz():bar();\n
        • \n
        • if (foo) bar(); ==> foo&&bar();\n
        • \n
        • if (!foo) bar(); ==> foo||bar();\n
        • \n
        • if (foo) return bar(); else return baz(); ==> return foo?bar():baz();\n
        • \n
        • if (foo) return bar(); else something(); ==> {if(foo)return bar();something()}\n\n
        • \n
        \n\n
      • \n
      • remove some unreachable code and warn about it (code that follows a\n return, throw, break or continue statement, except\n function/variable declarations).\n\n
      • \n
      • act a limited version of a pre-processor (c.f. the pre-processor of\n C/C++) to allow you to safely replace selected global symbols with\n specified values. When combined with the optimisations above this can\n make UglifyJS operate slightly more like a compilation process, in\n that when certain symbols are replaced by constant values, entire code\n blocks may be optimised away as unreachable.\n
      • \n
      \n\n
    • \n
    \n\n\n\n
    \n\n
    \n

    1.1 Unsafe transformations

    \n
    \n\n\n

    \nThe following transformations can in theory break code, although they're\nprobably safe in most practical cases. To enable them you need to pass the\n--unsafe flag.\n

    \n\n
    \n\n
    \n

    1.1.1 Calls involving the global Array constructor

    \n
    \n\n\n

    \nThe following transformations occur:\n

    \n\n\n\n
    new Array(1, 2, 3, 4)  => [1,2,3,4]\nArray(a, b, c)         => [a,b,c]\nnew Array(5)           => Array(5)\nnew Array(a)           => Array(a)\n
    \n\n\n

    \nThese are all safe if the Array name isn't redefined. JavaScript does allow\none to globally redefine Array (and pretty much everything, in fact) but I\npersonally don't see why would anyone do that.\n

    \n

    \nUglifyJS does handle the case where Array is redefined locally, or even\nglobally but with a function or var declaration. Therefore, in the\nfollowing cases UglifyJS doesn't touch calls or instantiations of Array:\n

    \n\n\n\n
    // case 1.  globally declared variable\n  var Array;\n  new Array(1, 2, 3);\n  Array(a, b);\n\n  // or (can be declared later)\n  new Array(1, 2, 3);\n  var Array;\n\n  // or (can be a function)\n  new Array(1, 2, 3);\n  function Array() { ... }\n\n// case 2.  declared in a function\n  (function(){\n    a = new Array(1, 2, 3);\n    b = Array(5, 6);\n    var Array;\n  })();\n\n  // or\n  (function(Array){\n    return Array(5, 6, 7);\n  })();\n\n  // or\n  (function(){\n    return new Array(1, 2, 3, 4);\n    function Array() { ... }\n  })();\n\n  // etc.\n
    \n\n\n
    \n\n
    \n\n
    \n

    1.1.2 obj.toString() ==> obj+“”

    \n
    \n\n\n
    \n
    \n\n
    \n\n
    \n

    1.2 Install (NPM)

    \n
    \n\n\n

    \nUglifyJS is now available through NPM — npm install uglify-js should do\nthe job.\n

    \n
    \n\n
    \n\n
    \n

    1.3 Install latest code from GitHub

    \n
    \n\n\n\n\n\n
    ## clone the repository\nmkdir -p /where/you/wanna/put/it\ncd /where/you/wanna/put/it\ngit clone git://github.com/mishoo/UglifyJS.git\n\n## make the module available to Node\nmkdir -p ~/.node_libraries/\ncd ~/.node_libraries/\nln -s /where/you/wanna/put/it/UglifyJS/uglify-js.js\n\n## and if you want the CLI script too:\nmkdir -p ~/bin\ncd ~/bin\nln -s /where/you/wanna/put/it/UglifyJS/bin/uglifyjs\n  # (then add ~/bin to your $PATH if it's not there already)\n
    \n\n\n
    \n\n
    \n\n
    \n

    1.4 Usage

    \n
    \n\n\n

    \nThere is a command-line tool that exposes the functionality of this library\nfor your shell-scripting needs:\n

    \n\n\n\n
    uglifyjs [ options... ] [ filename ]\n
    \n\n\n

    \nfilename should be the last argument and should name the file from which\nto read the JavaScript code. If you don't specify it, it will read code\nfrom STDIN.\n

    \n

    \nSupported options:\n

    \n
      \n
    • -b or --beautify — output indented code; when passed, additional\n options control the beautifier:\n\n
        \n
      • -i N or --indent N — indentation level (number of spaces)\n\n
      • \n
      • -q or --quote-keys — quote keys in literal objects (by default,\n only keys that cannot be identifier names will be quotes).\n\n
      • \n
      \n\n
    • \n
    • --ascii — pass this argument to encode non-ASCII characters as\n \\uXXXX sequences. By default UglifyJS won't bother to do it and will\n output Unicode characters instead. (the output is always encoded in UTF8,\n but if you pass this option you'll only get ASCII).\n\n
    • \n
    • -nm or --no-mangle — don't mangle names.\n\n
    • \n
    • -nmf or --no-mangle-functions – in case you want to mangle variable\n names, but not touch function names.\n\n
    • \n
    • -ns or --no-squeeze — don't call ast_squeeze() (which does various\n optimizations that result in smaller, less readable code).\n\n
    • \n
    • -mt or --mangle-toplevel — mangle names in the toplevel scope too\n (by default we don't do this).\n\n
    • \n
    • --no-seqs — when ast_squeeze() is called (thus, unless you pass\n --no-squeeze) it will reduce consecutive statements in blocks into a\n sequence. For example, \"a = 10; b = 20; foo();\" will be written as\n \"a=10,b=20,foo();\". In various occasions, this allows us to discard the\n block brackets (since the block becomes a single statement). This is ON\n by default because it seems safe and saves a few hundred bytes on some\n libs that I tested it on, but pass --no-seqs to disable it.\n\n
    • \n
    • --no-dead-code — by default, UglifyJS will remove code that is\n obviously unreachable (code that follows a return, throw, break or\n continue statement and is not a function/variable declaration). Pass\n this option to disable this optimization.\n\n
    • \n
    • -nc or --no-copyright — by default, uglifyjs will keep the initial\n comment tokens in the generated code (assumed to be copyright information\n etc.). If you pass this it will discard it.\n\n
    • \n
    • -o filename or --output filename — put the result in filename. If\n this isn't given, the result goes to standard output (or see next one).\n\n
    • \n
    • --overwrite — if the code is read from a file (not from STDIN) and you\n pass --overwrite then the output will be written in the same file.\n\n
    • \n
    • --ast — pass this if you want to get the Abstract Syntax Tree instead\n of JavaScript as output. Useful for debugging or learning more about the\n internals.\n\n
    • \n
    • -v or --verbose — output some notes on STDERR (for now just how long\n each operation takes).\n\n
    • \n
    • -d SYMBOL[=VALUE] or --define SYMBOL[=VALUE] — will replace\n all instances of the specified symbol where used as an identifier\n (except where symbol has properly declared by a var declaration or\n use as function parameter or similar) with the specified value. This\n argument may be specified multiple times to define multiple\n symbols - if no value is specified the symbol will be replaced with\n the value true, or you can specify a numeric value (such as\n 1024), a quoted string value (such as =\"object\"= or\n ='https://github.com'), or the name of another symbol or keyword (such as =null or document).\n This allows you, for example, to assign meaningful names to key\n constant values but discard the symbolic names in the uglified\n version for brevity/efficiency, or when used wth care, allows\n UglifyJS to operate as a form of conditional compilation\n whereby defining appropriate values may, by dint of the constant\n folding and dead code removal features above, remove entire\n superfluous code blocks (e.g. completely remove instrumentation or\n trace code for production use).\n Where string values are being defined, the handling of quotes are\n likely to be subject to the specifics of your command shell\n environment, so you may need to experiment with quoting styles\n depending on your platform, or you may find the option\n --define-from-module more suitable for use.\n\n
    • \n
    • -define-from-module SOMEMODULE — will load the named module (as\n per the NodeJS require() function) and iterate all the exported\n properties of the module defining them as symbol names to be defined\n (as if by the --define option) per the name of each property\n (i.e. without the module name prefix) and given the value of the\n property. This is a much easier way to handle and document groups of\n symbols to be defined rather than a large number of --define\n options.\n\n
    • \n
    • --unsafe — enable other additional optimizations that are known to be\n unsafe in some contrived situations, but could still be generally useful.\n For now only these:\n\n
        \n
      • foo.toString() ==> foo+\"\"\n
      • \n
      • new Array(x,…) ==> [x,…]\n
      • \n
      • new Array(x) ==> Array(x)\n\n
      • \n
      \n\n
    • \n
    • --max-line-len (default 32K characters) — add a newline after around\n 32K characters. I've seen both FF and Chrome croak when all the code was\n on a single line of around 670K. Pass –max-line-len 0 to disable this\n safety feature.\n\n
    • \n
    • --reserved-names — some libraries rely on certain names to be used, as\n pointed out in issue #92 and #81, so this option allow you to exclude such\n names from the mangler. For example, to keep names require and $super\n intact you'd specify –reserved-names \"require,$super\".\n\n
    • \n
    • --inline-script – when you want to include the output literally in an\n HTML <script> tag you can use this option to prevent </script from\n showing up in the output.\n\n
    • \n
    • --lift-vars – when you pass this, UglifyJS will apply the following\n transformations (see the notes in API, ast_lift_variables):\n\n
        \n
      • put all var declarations at the start of the scope\n
      • \n
      • make sure a variable is declared only once\n
      • \n
      • discard unused function arguments\n
      • \n
      • discard unused inner (named) functions\n
      • \n
      • finally, try to merge assignments into that one var declaration, if\n possible.\n
      • \n
      \n\n
    • \n
    \n\n\n\n
    \n\n
    \n

    1.4.1 API

    \n
    \n\n\n

    \nTo use the library from JavaScript, you'd do the following (example for\nNodeJS):\n

    \n\n\n\n
    var jsp = require(\"uglify-js\").parser;\nvar pro = require(\"uglify-js\").uglify;\n\nvar orig_code = \"... JS code here\";\nvar ast = jsp.parse(orig_code); // parse code and get the initial AST\nast = pro.ast_mangle(ast); // get a new AST with mangled names\nast = pro.ast_squeeze(ast); // get an AST with compression optimizations\nvar final_code = pro.gen_code(ast); // compressed code here\n
    \n\n\n

    \nThe above performs the full compression that is possible right now. As you\ncan see, there are a sequence of steps which you can apply. For example if\nyou want compressed output but for some reason you don't want to mangle\nvariable names, you would simply skip the line that calls\npro.ast_mangle(ast).\n

    \n

    \nSome of these functions take optional arguments. Here's a description:\n

    \n
      \n
    • jsp.parse(code, strict_semicolons) – parses JS code and returns an AST.\n strict_semicolons is optional and defaults to false. If you pass\n true then the parser will throw an error when it expects a semicolon and\n it doesn't find it. For most JS code you don't want that, but it's useful\n if you want to strictly sanitize your code.\n\n
    • \n
    • pro.ast_lift_variables(ast) – merge and move var declarations to the\n scop of the scope; discard unused function arguments or variables; discard\n unused (named) inner functions. It also tries to merge assignments\n following the var declaration into it.\n\n

      \n If your code is very hand-optimized concerning var declarations, this\n lifting variable declarations might actually increase size. For me it\n helps out. On jQuery it adds 865 bytes (243 after gzip). YMMV. Also\n note that (since it's not enabled by default) this operation isn't yet\n heavily tested (please report if you find issues!).\n

      \n

      \n Note that although it might increase the image size (on jQuery it gains\n 865 bytes, 243 after gzip) it's technically more correct: in certain\n situations, dead code removal might drop variable declarations, which\n would not happen if the variables are lifted in advance.\n

      \n

      \n Here's an example of what it does:\n

    • \n
    \n\n\n\n\n\n
    function f(a, b, c, d, e) {\n    var q;\n    var w;\n    w = 10;\n    q = 20;\n    for (var i = 1; i < 10; ++i) {\n        var boo = foo(a);\n    }\n    for (var i = 0; i < 1; ++i) {\n        var boo = bar(c);\n    }\n    function foo(){ ... }\n    function bar(){ ... }\n    function baz(){ ... }\n}\n\n// transforms into ==>\n\nfunction f(a, b, c) {\n    var i, boo, w = 10, q = 20;\n    for (i = 1; i < 10; ++i) {\n        boo = foo(a);\n    }\n    for (i = 0; i < 1; ++i) {\n        boo = bar(c);\n    }\n    function foo() { ... }\n    function bar() { ... }\n}\n
    \n\n\n
      \n
    • pro.ast_mangle(ast, options) – generates a new AST containing mangled\n (compressed) variable and function names. It supports the following\n options:\n\n
        \n
      • toplevel – mangle toplevel names (by default we don't touch them).\n
      • \n
      • except – an array of names to exclude from compression.\n
      • \n
      • defines – an object with properties named after symbols to\n replace (see the --define option for the script) and the values\n representing the AST replacement value.\n\n
      • \n
      \n\n
    • \n
    • pro.ast_squeeze(ast, options) – employs further optimizations designed\n to reduce the size of the code that gen_code would generate from the\n AST. Returns a new AST. options can be a hash; the supported options\n are:\n\n
        \n
      • make_seqs (default true) which will cause consecutive statements in a\n block to be merged using the \"sequence\" (comma) operator\n\n
      • \n
      • dead_code (default true) which will remove unreachable code.\n\n
      • \n
      \n\n
    • \n
    • pro.gen_code(ast, options) – generates JS code from the AST. By\n default it's minified, but using the options argument you can get nicely\n formatted output. options is, well, optional :-) and if you pass it it\n must be an object and supports the following properties (below you can see\n the default values):\n\n
        \n
      • beautify: false – pass true if you want indented output\n
      • \n
      • indent_start: 0 (only applies when beautify is true) – initial\n indentation in spaces\n
      • \n
      • indent_level: 4 (only applies when beautify is true) --\n indentation level, in spaces (pass an even number)\n
      • \n
      • quote_keys: false – if you pass true it will quote all keys in\n literal objects\n
      • \n
      • space_colon: false (only applies when beautify is true) – wether\n to put a space before the colon in object literals\n
      • \n
      • ascii_only: false – pass true if you want to encode non-ASCII\n characters as \\uXXXX.\n
      • \n
      • inline_script: false – pass true to escape occurrences of\n </script in strings\n
      • \n
      \n\n
    • \n
    \n\n\n
    \n\n
    \n\n
    \n

    1.4.2 Beautifier shortcoming – no more comments

    \n
    \n\n\n

    \nThe beautifier can be used as a general purpose indentation tool. It's\nuseful when you want to make a minified file readable. One limitation,\nthough, is that it discards all comments, so you don't really want to use it\nto reformat your code, unless you don't have, or don't care about, comments.\n

    \n

    \nIn fact it's not the beautifier who discards comments — they are dumped at\nthe parsing stage, when we build the initial AST. Comments don't really\nmake sense in the AST, and while we could add nodes for them, it would be\ninconvenient because we'd have to add special rules to ignore them at all\nthe processing stages.\n

    \n
    \n\n
    \n\n
    \n

    1.4.3 Use as a code pre-processor

    \n
    \n\n\n

    \nThe --define option can be used, particularly when combined with the\nconstant folding logic, as a form of pre-processor to enable or remove\nparticular constructions, such as might be used for instrumenting\ndevelopment code, or to produce variations aimed at a specific\nplatform.\n

    \n

    \nThe code below illustrates the way this can be done, and how the\nsymbol replacement is performed.\n

    \n\n\n\n
    CLAUSE1: if (typeof DEVMODE === 'undefined') {\n    DEVMODE = true;\n}\n\nCLAUSE2: function init() {\n    if (DEVMODE) {\n        console.log(\"init() called\");\n    }\n    ....\n    DEVMODE &amp;&amp; console.log(\"init() complete\");\n}\n\nCLAUSE3: function reportDeviceStatus(device) {\n    var DEVMODE = device.mode, DEVNAME = device.name;\n    if (DEVMODE === 'open') {\n        ....\n    }\n}\n
    \n\n\n

    \nWhen the above code is normally executed, the undeclared global\nvariable DEVMODE will be assigned the value true (see CLAUSE1)\nand so the init() function (CLAUSE2) will write messages to the\nconsole log when executed, but in CLAUSE3 a locally declared\nvariable will mask access to the DEVMODE global symbol.\n

    \n

    \nIf the above code is processed by UglifyJS with an argument of\n--define DEVMODE=false then UglifyJS will replace DEVMODE with the\nboolean constant value false within CLAUSE1 and CLAUSE2, but it\nwill leave CLAUSE3 as it stands because there DEVMODE resolves to\na validly declared variable.\n

    \n

    \nAnd more so, the constant-folding features of UglifyJS will recognise\nthat the if condition of CLAUSE1 is thus always false, and so will\nremove the test and body of CLAUSE1 altogether (including the\notherwise slightly problematical statement false = true; which it\nwill have formed by replacing DEVMODE in the body). Similarly,\nwithin CLAUSE2 both calls to console.log() will be removed\naltogether.\n

    \n

    \nIn this way you can mimic, to a limited degree, the functionality of\nthe C/C++ pre-processor to enable or completely remove blocks\ndepending on how certain symbols are defined - perhaps using UglifyJS\nto generate different versions of source aimed at different\nenvironments\n

    \n

    \nIt is recommmended (but not made mandatory) that symbols designed for\nthis purpose are given names consisting of UPPER_CASE_LETTERS to\ndistinguish them from other (normal) symbols and avoid the sort of\nclash that CLAUSE3 above illustrates.\n

    \n
    \n
    \n\n
    \n\n
    \n

    1.5 Compression – how good is it?

    \n
    \n\n\n

    \nHere are updated statistics. (I also updated my Google Closure and YUI\ninstallations).\n

    \n

    \nWe're still a lot better than YUI in terms of compression, though slightly\nslower. We're still a lot faster than Closure, and compression after gzip\nis comparable.\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    FileUglifyJSUglifyJS+gzipClosureClosure+gzipYUIYUI+gzip
    jquery-1.6.2.js91001 (0:01.59)3189690678 (0:07.40)31979101527 (0:01.82)34646
    paper.js142023 (0:01.65)43334134301 (0:07.42)42495173383 (0:01.58)48785
    prototype.js88544 (0:01.09)2668086955 (0:06.97)2632692130 (0:00.79)28624
    thelib-full.js (DynarchLIB)251939 (0:02.55)72535249911 (0:09.05)72696258869 (0:01.94)76584
    \n\n\n
    \n\n
    \n\n
    \n

    1.6 Bugs?

    \n
    \n\n\n

    \nUnfortunately, for the time being there is no automated test suite. But I\nran the compressor manually on non-trivial code, and then I tested that the\ngenerated code works as expected. A few hundred times.\n

    \n

    \nDynarchLIB was started in times when there was no good JS minifier.\nTherefore I was quite religious about trying to write short code manually,\nand as such DL contains a lot of syntactic hacks1 such as “foo == bar ? a\n= 10 : b = 20”, though the more readable version would clearly be to use\n“if/else”.\n

    \n

    \nSince the parser/compressor runs fine on DL and jQuery, I'm quite confident\nthat it's solid enough for production use. If you can identify any bugs,\nI'd love to hear about them (use the Google Group or email me directly).\n

    \n
    \n\n
    \n\n
    \n

    1.7 Links

    \n
    \n\n\n\n\n\n
    \n\n
    \n\n
    \n

    1.8 License

    \n
    \n\n\n

    \nUglifyJS is released under the BSD license:\n

    \n\n\n\n
    Copyright 2010 (c) Mihai Bazon <mihai.bazon@gmail.com>\nBased on parse-js (http://marijn.haverbeke.nl/parse-js/).\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n\n    * Redistributions of source code must retain the above\n      copyright notice, this list of conditions and the following\n      disclaimer.\n\n    * Redistributions in binary form must reproduce the above\n      copyright notice, this list of conditions and the following\n      disclaimer in the documentation and/or other materials\n      provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY\nEXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,\nOR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\nPROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\nPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR\nTORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF\nTHE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGE.\n
    \n\n\n
    \n

    Footnotes:

    \n
    \n

    1 I even reported a few bugs and suggested some fixes in the original\n parse-js library, and Marijn pushed fixes literally in minutes.\n

    \n
    \n
    \n\n
    \n
    \n
    \n\n
    \n

    Date: 2011-12-09 14:59:08 EET

    \n

    Author: Mihai Bazon

    \n

    Org version 7.7 with Emacs version 23

    \nValidate XHTML 1.0\n\n
    \n\n\n", - "readmeFilename": "README.html", - "bugs": { - "url": "https://github.com/mishoo/UglifyJS/issues" - }, - "homepage": "https://github.com/mishoo/UglifyJS", - "_id": "uglify-js@1.2.5", - "_from": "uglify-js@1.2.5" -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/package.json~ b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/package.json~ deleted file mode 100644 index e4cb23d5..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/package.json~ +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name" : "uglify-js", - - "description" : "JavaScript parser and compressor/beautifier toolkit", - - "author" : { - "name" : "Mihai Bazon", - "email" : "mihai.bazon@gmail.com", - "url" : "http://mihai.bazon.net/blog" - }, - - "version" : "1.2.3", - - "main" : "./uglify-js.js", - - "bin" : { - "uglifyjs" : "./bin/uglifyjs" - }, - - "repository": { - "type": "git", - "url": "git@github.com:mishoo/UglifyJS.git" - } -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/beautify.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/beautify.js deleted file mode 100755 index f19369e3..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/beautify.js +++ /dev/null @@ -1,28 +0,0 @@ -#! /usr/bin/env node - -global.sys = require("sys"); -var fs = require("fs"); - -var jsp = require("../lib/parse-js"); -var pro = require("../lib/process"); - -var filename = process.argv[2]; -fs.readFile(filename, "utf8", function(err, text){ - try { - var ast = time_it("parse", function(){ return jsp.parse(text); }); - ast = time_it("mangle", function(){ return pro.ast_mangle(ast); }); - ast = time_it("squeeze", function(){ return pro.ast_squeeze(ast); }); - var gen = time_it("generate", function(){ return pro.gen_code(ast, false); }); - sys.puts(gen); - } catch(ex) { - sys.debug(ex.stack); - sys.debug(sys.inspect(ex)); - sys.debug(JSON.stringify(ex)); - } -}); - -function time_it(name, cont) { - var t1 = new Date().getTime(); - try { return cont(); } - finally { sys.debug("// " + name + ": " + ((new Date().getTime() - t1) / 1000).toFixed(3) + " sec."); } -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/testparser.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/testparser.js deleted file mode 100755 index 02c19a9c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/testparser.js +++ /dev/null @@ -1,403 +0,0 @@ -#! /usr/bin/env node - -var parseJS = require("../lib/parse-js"); -var sys = require("sys"); - -// write debug in a very straightforward manner -var debug = function(){ - sys.log(Array.prototype.slice.call(arguments).join(', ')); -}; - -ParserTestSuite(function(i, input, desc){ - try { - parseJS.parse(input); - debug("ok " + i + ": " + desc); - } catch(e){ - debug("FAIL " + i + " " + desc + " (" + e + ")"); - } -}); - -function ParserTestSuite(callback){ - var inps = [ - ["var abc;", "Regular variable statement w/o assignment"], - ["var abc = 5;", "Regular variable statement with assignment"], - ["/* */;", "Multiline comment"], - ['/** **/;', 'Double star multiline comment'], - ["var f = function(){;};", "Function expression in var assignment"], - ['hi; // moo\n;', 'single line comment'], - ['var varwithfunction;', 'Dont match keywords as substrings'], // difference between `var withsomevar` and `"str"` (local search and lits) - ['a + b;', 'addition'], - ["'a';", 'single string literal'], - ["'a\\n';", 'single string literal with escaped return'], - ['"a";', 'double string literal'], - ['"a\\n";', 'double string literal with escaped return'], - ['"var";', 'string is a keyword'], - ['"variable";', 'string starts with a keyword'], - ['"somevariable";', 'string contains a keyword'], - ['"somevar";', 'string ends with a keyword'], - ['500;', 'int literal'], - ['500.;', 'float literal w/o decimals'], - ['500.432;', 'float literal with decimals'], - ['.432432;', 'float literal w/o int'], - ['(a,b,c);', 'parens and comma'], - ['[1,2,abc];', 'array literal'], - ['var o = {a:1};', 'object literal unquoted key'], - ['var o = {"b":2};', 'object literal quoted key'], // opening curly may not be at the start of a statement... - ['var o = {c:c};', 'object literal keyname is identifier'], - ['var o = {a:1,"b":2,c:c};', 'object literal combinations'], - ['var x;\nvar y;', 'two lines'], - ['var x;\nfunction n(){; }', 'function def'], - ['var x;\nfunction n(abc){; }', 'function def with arg'], - ['var x;\nfunction n(abc, def){ ;}', 'function def with args'], - ['function n(){ "hello"; }', 'function def with body'], - ['/a/;', 'regex literal'], - ['/a/b;', 'regex literal with flag'], - ['/a/ / /b/;', 'regex div regex'], - ['a/b/c;', 'triple division looks like regex'], - ['+function(){/regex/;};', 'regex at start of function body'], - // http://code.google.com/p/es-lab/source/browse/trunk/tests/parser/parsertests.js?r=86 - // http://code.google.com/p/es-lab/source/browse/trunk/tests/parser/parsertests.js?r=430 - - // first tests for the lexer, should also parse as program (when you append a semi) - - // comments - ['//foo!@#^&$1234\nbar;', 'single line comment'], - ['/* abcd!@#@$* { } && null*/;', 'single line multi line comment'], - ['/*foo\nbar*/;','multi line comment'], - ['/*x*x*/;','multi line comment with *'], - ['/**/;','empty comment'], - // identifiers - ["x;",'1 identifier'], - ["_x;",'2 identifier'], - ["xyz;",'3 identifier'], - ["$x;",'4 identifier'], - ["x$;",'5 identifier'], - ["_;",'6 identifier'], - ["x5;",'7 identifier'], - ["x_y;",'8 identifier'], - ["x+5;",'9 identifier'], - ["xyz123;",'10 identifier'], - ["x1y1z1;",'11 identifier'], - ["foo\\u00D8bar;",'12 identifier unicode escape'], - //["foo�bar;",'13 identifier unicode embedded (might fail)'], - // numbers - ["5;", '1 number'], - ["5.5;", '2 number'], - ["0;", '3 number'], - ["0.0;", '4 number'], - ["0.001;", '5 number'], - ["1.e2;", '6 number'], - ["1.e-2;", '7 number'], - ["1.E2;", '8 number'], - ["1.E-2;", '9 number'], - [".5;", '10 number'], - [".5e3;", '11 number'], - [".5e-3;", '12 number'], - ["0.5e3;", '13 number'], - ["55;", '14 number'], - ["123;", '15 number'], - ["55.55;", '16 number'], - ["55.55e10;", '17 number'], - ["123.456;", '18 number'], - ["1+e;", '20 number'], - ["0x01;", '22 number'], - ["0XCAFE;", '23 number'], - ["0x12345678;", '24 number'], - ["0x1234ABCD;", '25 number'], - ["0x0001;", '26 number'], - // strings - ["\"foo\";", '1 string'], - ["\'foo\';", '2 string'], - ["\"x\";", '3 string'], - ["\'\';", '4 string'], - ["\"foo\\tbar\";", '5 string'], - ["\"!@#$%^&*()_+{}[]\";", '6 string'], - ["\"/*test*/\";", '7 string'], - ["\"//test\";", '8 string'], - ["\"\\\\\";", '9 string'], - ["\"\\u0001\";", '10 string'], - ["\"\\uFEFF\";", '11 string'], - ["\"\\u10002\";", '12 string'], - ["\"\\x55\";", '13 string'], - ["\"\\x55a\";", '14 string'], - ["\"a\\\\nb\";", '15 string'], - ['";"', '16 string: semi in a string'], - ['"a\\\nb";', '17 string: line terminator escape'], - // literals - ["null;", "null"], - ["true;", "true"], - ["false;", "false"], - // regex - ["/a/;", "1 regex"], - ["/abc/;", "2 regex"], - ["/abc[a-z]*def/g;", "3 regex"], - ["/\\b/;", "4 regex"], - ["/[a-zA-Z]/;", "5 regex"], - - // program tests (for as far as they havent been covered above) - - // regexp - ["/foo(.*)/g;", "another regexp"], - // arrays - ["[];", "1 array"], - ["[ ];", "2 array"], - ["[1];", "3 array"], - ["[1,2];", "4 array"], - ["[1,2,,];", "5 array"], - ["[1,2,3];", "6 array"], - ["[1,2,3,,,];", "7 array"], - // objects - ["{};", "1 object"], - ["({x:5});", "2 object"], - ["({x:5,y:6});", "3 object"], - ["({x:5,});", "4 object"], - ["({if:5});", "5 object"], - ["({ get x() {42;} });", "6 object"], - ["({ set y(a) {1;} });", "7 object"], - // member expression - ["o.m;", "1 member expression"], - ["o['m'];", "2 member expression"], - ["o['n']['m'];", "3 member expression"], - ["o.n.m;", "4 member expression"], - ["o.if;", "5 member expression"], - // call and invoke expressions - ["f();", "1 call/invoke expression"], - ["f(x);", "2 call/invoke expression"], - ["f(x,y);", "3 call/invoke expression"], - ["o.m();", "4 call/invoke expression"], - ["o['m'];", "5 call/invoke expression"], - ["o.m(x);", "6 call/invoke expression"], - ["o['m'](x);", "7 call/invoke expression"], - ["o.m(x,y);", "8 call/invoke expression"], - ["o['m'](x,y);", "9 call/invoke expression"], - ["f(x)(y);", "10 call/invoke expression"], - ["f().x;", "11 call/invoke expression"], - - // eval - ["eval('x');", "1 eval"], - ["(eval)('x');", "2 eval"], - ["(1,eval)('x');", "3 eval"], - ["eval(x,y);", "4 eval"], - // new expression - ["new f();", "1 new expression"], - ["new o;", "2 new expression"], - ["new o.m;", "3 new expression"], - ["new o.m(x);", "4 new expression"], - ["new o.m(x,y);", "5 new expression"], - // prefix/postfix - ["++x;", "1 pre/postfix"], - ["x++;", "2 pre/postfix"], - ["--x;", "3 pre/postfix"], - ["x--;", "4 pre/postfix"], - ["x ++;", "5 pre/postfix"], - ["x /* comment */ ++;", "6 pre/postfix"], - ["++ /* comment */ x;", "7 pre/postfix"], - // unary operators - ["delete x;", "1 unary operator"], - ["void x;", "2 unary operator"], - ["+ x;", "3 unary operator"], - ["-x;", "4 unary operator"], - ["~x;", "5 unary operator"], - ["!x;", "6 unary operator"], - // meh - ["new Date++;", "new date ++"], - ["+x++;", " + x ++"], - // expression expressions - ["1 * 2;", "1 expression expressions"], - ["1 / 2;", "2 expression expressions"], - ["1 % 2;", "3 expression expressions"], - ["1 + 2;", "4 expression expressions"], - ["1 - 2;", "5 expression expressions"], - ["1 << 2;", "6 expression expressions"], - ["1 >>> 2;", "7 expression expressions"], - ["1 >> 2;", "8 expression expressions"], - ["1 * 2 + 3;", "9 expression expressions"], - ["(1+2)*3;", "10 expression expressions"], - ["1*(2+3);", "11 expression expressions"], - ["xy;", "13 expression expressions"], - ["x<=y;", "14 expression expressions"], - ["x>=y;", "15 expression expressions"], - ["x instanceof y;", "16 expression expressions"], - ["x in y;", "17 expression expressions"], - ["x&y;", "18 expression expressions"], - ["x^y;", "19 expression expressions"], - ["x|y;", "20 expression expressions"], - ["x+y>>= y;", "1 assignment"], - ["x <<= y;", "2 assignment"], - ["x = y;", "3 assignment"], - ["x += y;", "4 assignment"], - ["x /= y;", "5 assignment"], - // comma - ["x, y;", "comma"], - // block - ["{};", "1 block"], - ["{x;};", "2 block"], - ["{x;y;};", "3 block"], - // vars - ["var x;", "1 var"], - ["var x,y;", "2 var"], - ["var x=1,y=2;", "3 var"], - ["var x,y=2;", "4 var"], - // empty - [";", "1 empty"], - ["\n;", "2 empty"], - // expression statement - ["x;", "1 expression statement"], - ["5;", "2 expression statement"], - ["1+2;", "3 expression statement"], - // if - ["if (c) x; else y;", "1 if statement"], - ["if (c) x;", "2 if statement"], - ["if (c) {} else {};", "3 if statement"], - ["if (c1) if (c2) s1; else s2;", "4 if statement"], - // while - ["do s; while (e);", "1 while statement"], - ["do { s; } while (e);", "2 while statement"], - ["while (e) s;", "3 while statement"], - ["while (e) { s; };", "4 while statement"], - // for - ["for (;;) ;", "1 for statement"], - ["for (;c;x++) x;", "2 for statement"], - ["for (i;i> 1; -var c = 8 >>> 1; \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue34.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue34.js deleted file mode 100644 index 022f7a31..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue34.js +++ /dev/null @@ -1,3 +0,0 @@ -var a = {}; -a["this"] = 1; -a["that"] = 2; \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue4.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue4.js deleted file mode 100644 index 0b761037..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue4.js +++ /dev/null @@ -1,3 +0,0 @@ -var a = 2e3; -var b = 2e-3; -var c = 2e-5; \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue48.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue48.js deleted file mode 100644 index 031e85b3..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue48.js +++ /dev/null @@ -1 +0,0 @@ -var s, i; s = ''; i = 0; \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue50.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue50.js deleted file mode 100644 index 060f9df8..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue50.js +++ /dev/null @@ -1,9 +0,0 @@ -function bar(a) { - try { - foo(); - } catch(e) { - alert("Exception caught (foo not defined)"); - } - alert(a); // 10 in FF, "[object Error]" in IE -} -bar(10); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue53.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue53.js deleted file mode 100644 index 4f8b32f1..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue53.js +++ /dev/null @@ -1 +0,0 @@ -x = (y, z) diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue54.1.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue54.1.js deleted file mode 100644 index 967052e8..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue54.1.js +++ /dev/null @@ -1,3 +0,0 @@ -foo.toString(); -a.toString(16); -b.toString.call(c); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue68.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue68.js deleted file mode 100644 index 14054d01..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue68.js +++ /dev/null @@ -1,5 +0,0 @@ -function f() { - if (a) return; - g(); - function g(){} -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue69.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue69.js deleted file mode 100644 index d25ecd67..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue69.js +++ /dev/null @@ -1 +0,0 @@ -[(a,b)] diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue9.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue9.js deleted file mode 100644 index 61588614..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue9.js +++ /dev/null @@ -1,4 +0,0 @@ -var a = { - a: 1, - b: 2, // <-- trailing comma -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/mangle.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/mangle.js deleted file mode 100644 index c271a26d..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/mangle.js +++ /dev/null @@ -1,5 +0,0 @@ -(function() { - var x = function fun(a, fun, b) { - return fun; - }; -}()); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/null_string.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/null_string.js deleted file mode 100644 index a675b1c5..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/null_string.js +++ /dev/null @@ -1 +0,0 @@ -var nullString = "\0" \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/strict-equals.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/strict-equals.js deleted file mode 100644 index b631f4c3..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/strict-equals.js +++ /dev/null @@ -1,3 +0,0 @@ -typeof a === 'string' -b + "" !== c + "" -d < e === f < g diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/var.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/var.js deleted file mode 100644 index 609a35d2..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/var.js +++ /dev/null @@ -1,3 +0,0 @@ -// var declarations after each other should be combined -var a = 1; -var b = 2; \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/whitespace.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/whitespace.js deleted file mode 100644 index 6a15c464..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/whitespace.js +++ /dev/null @@ -1,21 +0,0 @@ -function id(a) { - // Form-Feed - // Vertical Tab - // No-Break Space - ᠎// Mongolian Vowel Separator -  // En quad -  // Em quad -  // En space -  // Em space -  // Three-Per-Em Space -  // Four-Per-Em Space -  // Six-Per-Em Space -  // Figure Space -  // Punctuation Space -  // Thin Space -  // Hair Space -  // Narrow No-Break Space -  // Medium Mathematical Space -  // Ideographic Space - return a; -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/with.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/with.js deleted file mode 100644 index de266ed5..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/with.js +++ /dev/null @@ -1,2 +0,0 @@ -with({}) { -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/scripts.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/scripts.js deleted file mode 100644 index 5d334ff7..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/scripts.js +++ /dev/null @@ -1,55 +0,0 @@ -var fs = require('fs'), - uglify = require('../../uglify-js'), - jsp = uglify.parser, - nodeunit = require('nodeunit'), - path = require('path'), - pro = uglify.uglify; - -var Script = process.binding('evals').Script; - -var scriptsPath = __dirname; - -function compress(code) { - var ast = jsp.parse(code); - ast = pro.ast_mangle(ast); - ast = pro.ast_squeeze(ast, { no_warnings: true }); - ast = pro.ast_squeeze_more(ast); - return pro.gen_code(ast); -}; - -var testDir = path.join(scriptsPath, "compress", "test"); -var expectedDir = path.join(scriptsPath, "compress", "expected"); - -function getTester(script) { - return function(test) { - var testPath = path.join(testDir, script); - var expectedPath = path.join(expectedDir, script); - var content = fs.readFileSync(testPath, 'utf-8'); - var outputCompress = compress(content); - - // Check if the noncompressdata is larger or same size as the compressed data - test.ok(content.length >= outputCompress.length); - - // Check that a recompress gives the same result - var outputReCompress = compress(content); - test.equal(outputCompress, outputReCompress); - - // Check if the compressed output is what is expected - var expected = fs.readFileSync(expectedPath, 'utf-8'); - test.equal(outputCompress, expected.replace(/(\r?\n)+$/, "")); - - test.done(); - }; -}; - -var tests = {}; - -var scripts = fs.readdirSync(testDir); -for (var i in scripts) { - var script = scripts[i]; - if (/\.js$/.test(script)) { - tests[script] = getTester(script); - } -} - -module.exports = nodeunit.testCase(tests); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/269.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/269.js deleted file mode 100644 index 256ad1c9..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/269.js +++ /dev/null @@ -1,13 +0,0 @@ -var jsp = require("uglify-js").parser; -var pro = require("uglify-js").uglify; - -var test_code = "var JSON;JSON||(JSON={});"; - -var ast = jsp.parse(test_code, false, false); -var nonembed_token_code = pro.gen_code(ast); -ast = jsp.parse(test_code, false, true); -var embed_token_code = pro.gen_code(ast); - -console.log("original: " + test_code); -console.log("no token: " + nonembed_token_code); -console.log(" token: " + embed_token_code); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/app.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/app.js deleted file mode 100644 index 2c6257eb..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/app.js +++ /dev/null @@ -1,22315 +0,0 @@ -/* Modernizr 2.0.6 (Custom Build) | MIT & BSD - * Build: http://www.modernizr.com/download/#-iepp - */ -;window.Modernizr=function(a,b,c){function w(a,b){return!!~(""+a).indexOf(b)}function v(a,b){return typeof a===b}function u(a,b){return t(prefixes.join(a+";")+(b||""))}function t(a){j.cssText=a}var d="2.0.6",e={},f=b.documentElement,g=b.head||b.getElementsByTagName("head")[0],h="modernizr",i=b.createElement(h),j=i.style,k,l=Object.prototype.toString,m={},n={},o={},p=[],q,r={}.hasOwnProperty,s;!v(r,c)&&!v(r.call,c)?s=function(a,b){return r.call(a,b)}:s=function(a,b){return b in a&&v(a.constructor.prototype[b],c)};for(var x in m)s(m,x)&&(q=x.toLowerCase(),e[q]=m[x](),p.push((e[q]?"":"no-")+q));t(""),i=k=null,a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="";return a.childNodes.length!==1}()&&function(a,b){function s(a){var b=-1;while(++b to avoid XSS via location.hash (#9521) - quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, - - // Check if a string has a non-whitespace character in it - rnotwhite = /\S/, - - // Used for trimming whitespace - trimLeft = /^\s+/, - trimRight = /\s+$/, - - // Check for digits - rdigit = /\d/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, - rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - - // Useragent RegExp - rwebkit = /(webkit)[ \/]([\w.]+)/, - ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, - rmsie = /(msie) ([\w.]+)/, - rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, - - // Matches dashed string for camelizing - rdashAlpha = /-([a-z]|[0-9])/ig, - rmsPrefix = /^-ms-/, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return ( letter + "" ).toUpperCase(); - }, - - // Keep a UserAgent string for use with jQuery.browser - userAgent = navigator.userAgent, - - // For matching the engine and version of the browser - browserMatch, - - // The deferred used on DOM ready - readyList, - - // The ready event handler - DOMContentLoaded, - - // Save a reference to some core methods - toString = Object.prototype.toString, - hasOwn = Object.prototype.hasOwnProperty, - push = Array.prototype.push, - slice = Array.prototype.slice, - trim = String.prototype.trim, - indexOf = Array.prototype.indexOf, - - // [[Class]] -> type pairs - class2type = {}; - -jQuery.fn = jQuery.prototype = { - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem, ret, doc; - - // Handle $(""), $(null), or $(undefined) - if ( !selector ) { - return this; - } - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - } - - // The body element only exists once, optimize finding it - if ( selector === "body" && !context && document.body ) { - this.context = document; - this[0] = document.body; - this.selector = selector; - this.length = 1; - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - // Are we dealing with HTML string or an ID? - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = quickExpr.exec( selector ); - } - - // Verify a match, and that no context was specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - doc = (context ? context.ownerDocument || context : document); - - // If a single string is passed in and it's a single tag - // just do a createElement and skip the rest - ret = rsingleTag.exec( selector ); - - if ( ret ) { - if ( jQuery.isPlainObject( context ) ) { - selector = [ document.createElement( ret[1] ) ]; - jQuery.fn.attr.call( selector, context, true ); - - } else { - selector = [ doc.createElement( ret[1] ) ]; - } - - } else { - ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); - selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes; - } - - return jQuery.merge( this, selector ); - - // HANDLE: $("#id") - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return (context || rootjQuery).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if (selector.selector !== undefined) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.6.3", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return slice.call( this, 0 ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - // Build a new jQuery matched element set - var ret = this.constructor(); - - if ( jQuery.isArray( elems ) ) { - push.apply( ret, elems ); - - } else { - jQuery.merge( ret, elems ); - } - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) { - ret.selector = this.selector + (this.selector ? " " : "") + selector; - } else if ( name ) { - ret.selector = this.selector + "." + name + "(" + selector + ")"; - } - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Attach the listeners - jQuery.bindReady(); - - // Add the callback - readyList.done( fn ); - - return this; - }, - - eq: function( i ) { - return i === -1 ? - this.slice( i ) : - this.slice( i, +i + 1 ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ), - "slice", slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - // Either a released hold or an DOMready/load event and not yet ready - if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready, 1 ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger( "ready" ).unbind( "ready" ); - } - } - }, - - bindReady: function() { - if ( readyList ) { - return; - } - - readyList = jQuery._Deferred(); - - // Catch cases where $(document).ready() is called after the - // browser event has already occurred. - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - return setTimeout( jQuery.ready, 1 ); - } - - // Mozilla, Opera and webkit nightlies currently support this event - if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", jQuery.ready, false ); - - // If IE event model is used - } else if ( document.attachEvent ) { - // ensure firing before onload, - // maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", DOMContentLoaded ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", jQuery.ready ); - - // If IE and not a frame - // continually check to see if the document is ready - var toplevel = false; - - try { - toplevel = window.frameElement == null; - } catch(e) {} - - if ( document.documentElement.doScroll && toplevel ) { - doScrollCheck(); - } - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - // A crude way of determining if an object is a window - isWindow: function( obj ) { - return obj && typeof obj === "object" && "setInterval" in obj; - }, - - isNaN: function( obj ) { - return obj == null || !rdigit.test( obj ) || isNaN( obj ); - }, - - type: function( obj ) { - return obj == null ? - String( obj ) : - class2type[ toString.call(obj) ] || "object"; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !hasOwn.call(obj, "constructor") && - !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - for ( var name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw msg; - }, - - parseJSON: function( data ) { - if ( typeof data !== "string" || !data ) { - return null; - } - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return (new Function( "return " + data ))(); - - } - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && rnotwhite.test( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); - }, - - // args is for internal usage only - each: function( object, callback, args ) { - var name, i = 0, - length = object.length, - isObj = length === undefined || jQuery.isFunction( object ); - - if ( args ) { - if ( isObj ) { - for ( name in object ) { - if ( callback.apply( object[ name ], args ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.apply( object[ i++ ], args ) === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isObj ) { - for ( name in object ) { - if ( callback.call( object[ name ], name, object[ name ] ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) { - break; - } - } - } - } - - return object; - }, - - // Use native String.trim function wherever possible - trim: trim ? - function( text ) { - return text == null ? - "" : - trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); - }, - - // results is for internal usage only - makeArray: function( array, results ) { - var ret = results || []; - - if ( array != null ) { - // The window, strings (and functions) also have 'length' - // The extra typeof function check is to prevent crashes - // in Safari 2 (See: #3039) - // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 - var type = jQuery.type( array ); - - if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { - push.call( ret, array ); - } else { - jQuery.merge( ret, array ); - } - } - - return ret; - }, - - inArray: function( elem, array ) { - if ( !array ) { - return -1; - } - - if ( indexOf ) { - return indexOf.call( array, elem ); - } - - for ( var i = 0, length = array.length; i < length; i++ ) { - if ( array[ i ] === elem ) { - return i; - } - } - - return -1; - }, - - merge: function( first, second ) { - var i = first.length, - j = 0; - - if ( typeof second.length === "number" ) { - for ( var l = second.length; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var ret = [], retVal; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( var i = 0, length = elems.length; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, key, ret = [], - i = 0, - length = elems.length, - // jquery objects are treated as arrays - isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( key in elems ) { - value = callback( elems[ key ], key, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return ret.concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - if ( typeof context === "string" ) { - var tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - var args = slice.call( arguments, 2 ), - proxy = function() { - return fn.apply( context, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; - - return proxy; - }, - - // Mutifunctional method to get and set values to a collection - // The value/s can optionally be executed if it's a function - access: function( elems, key, value, exec, fn, pass ) { - var length = elems.length; - - // Setting many attributes - if ( typeof key === "object" ) { - for ( var k in key ) { - jQuery.access( elems, k, key[k], exec, fn, value ); - } - return elems; - } - - // Setting one attribute - if ( value !== undefined ) { - // Optionally, function values get executed if exec is true - exec = !pass && exec && jQuery.isFunction(value); - - for ( var i = 0; i < length; i++ ) { - fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); - } - - return elems; - } - - // Getting an attribute - return length ? fn( elems[0], key ) : undefined; - }, - - now: function() { - return (new Date()).getTime(); - }, - - // Use of jQuery.browser is frowned upon. - // More details: http://docs.jquery.com/Utilities/jQuery.browser - uaMatch: function( ua ) { - ua = ua.toLowerCase(); - - var match = rwebkit.exec( ua ) || - ropera.exec( ua ) || - rmsie.exec( ua ) || - ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || - []; - - return { browser: match[1] || "", version: match[2] || "0" }; - }, - - sub: function() { - function jQuerySub( selector, context ) { - return new jQuerySub.fn.init( selector, context ); - } - jQuery.extend( true, jQuerySub, this ); - jQuerySub.superclass = this; - jQuerySub.fn = jQuerySub.prototype = this(); - jQuerySub.fn.constructor = jQuerySub; - jQuerySub.sub = this.sub; - jQuerySub.fn.init = function init( selector, context ) { - if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { - context = jQuerySub( context ); - } - - return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); - }; - jQuerySub.fn.init.prototype = jQuerySub.fn; - var rootjQuerySub = jQuerySub(document); - return jQuerySub; - }, - - browser: {} -}); - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -browserMatch = jQuery.uaMatch( userAgent ); -if ( browserMatch.browser ) { - jQuery.browser[ browserMatch.browser ] = true; - jQuery.browser.version = browserMatch.version; -} - -// Deprecated, use jQuery.browser.webkit instead -if ( jQuery.browser.webkit ) { - jQuery.browser.safari = true; -} - -// IE doesn't match non-breaking spaces with \s -if ( rnotwhite.test( "\xA0" ) ) { - trimLeft = /^[\s\xA0]+/; - trimRight = /[\s\xA0]+$/; -} - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); - -// Cleanup functions for the document ready method -if ( document.addEventListener ) { - DOMContentLoaded = function() { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - }; - -} else if ( document.attachEvent ) { - DOMContentLoaded = function() { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( document.readyState === "complete" ) { - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); - } - }; -} - -// The DOM ready check for Internet Explorer -function doScrollCheck() { - if ( jQuery.isReady ) { - return; - } - - try { - // If IE is used, use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - document.documentElement.doScroll("left"); - } catch(e) { - setTimeout( doScrollCheck, 1 ); - return; - } - - // and execute any waiting functions - jQuery.ready(); -} - -return jQuery; - -})(); - - -var // Promise methods - promiseMethods = "done fail isResolved isRejected promise then always pipe".split( " " ), - // Static reference to slice - sliceDeferred = [].slice; - -jQuery.extend({ - // Create a simple deferred (one callbacks list) - _Deferred: function() { - var // callbacks list - callbacks = [], - // stored [ context , args ] - fired, - // to avoid firing when already doing so - firing, - // flag to know if the deferred has been cancelled - cancelled, - // the deferred itself - deferred = { - - // done( f1, f2, ...) - done: function() { - if ( !cancelled ) { - var args = arguments, - i, - length, - elem, - type, - _fired; - if ( fired ) { - _fired = fired; - fired = 0; - } - for ( i = 0, length = args.length; i < length; i++ ) { - elem = args[ i ]; - type = jQuery.type( elem ); - if ( type === "array" ) { - deferred.done.apply( deferred, elem ); - } else if ( type === "function" ) { - callbacks.push( elem ); - } - } - if ( _fired ) { - deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] ); - } - } - return this; - }, - - // resolve with given context and args - resolveWith: function( context, args ) { - if ( !cancelled && !fired && !firing ) { - // make sure args are available (#8421) - args = args || []; - firing = 1; - try { - while( callbacks[ 0 ] ) { - callbacks.shift().apply( context, args ); - } - } - finally { - fired = [ context, args ]; - firing = 0; - } - } - return this; - }, - - // resolve with this as context and given arguments - resolve: function() { - deferred.resolveWith( this, arguments ); - return this; - }, - - // Has this deferred been resolved? - isResolved: function() { - return !!( firing || fired ); - }, - - // Cancel - cancel: function() { - cancelled = 1; - callbacks = []; - return this; - } - }; - - return deferred; - }, - - // Full fledged deferred (two callbacks list) - Deferred: function( func ) { - var deferred = jQuery._Deferred(), - failDeferred = jQuery._Deferred(), - promise; - // Add errorDeferred methods, then and promise - jQuery.extend( deferred, { - then: function( doneCallbacks, failCallbacks ) { - deferred.done( doneCallbacks ).fail( failCallbacks ); - return this; - }, - always: function() { - return deferred.done.apply( deferred, arguments ).fail.apply( this, arguments ); - }, - fail: failDeferred.done, - rejectWith: failDeferred.resolveWith, - reject: failDeferred.resolve, - isRejected: failDeferred.isResolved, - pipe: function( fnDone, fnFail ) { - return jQuery.Deferred(function( newDefer ) { - jQuery.each( { - done: [ fnDone, "resolve" ], - fail: [ fnFail, "reject" ] - }, function( handler, data ) { - var fn = data[ 0 ], - action = data[ 1 ], - returned; - if ( jQuery.isFunction( fn ) ) { - deferred[ handler ](function() { - returned = fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise().then( newDefer.resolve, newDefer.reject ); - } else { - newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); - } - }); - } else { - deferred[ handler ]( newDefer[ action ] ); - } - }); - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - if ( obj == null ) { - if ( promise ) { - return promise; - } - promise = obj = {}; - } - var i = promiseMethods.length; - while( i-- ) { - obj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ]; - } - return obj; - } - }); - // Make sure only one callback list will be used - deferred.done( failDeferred.cancel ).fail( deferred.cancel ); - // Unexpose cancel - delete deferred.cancel; - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - return deferred; - }, - - // Deferred helper - when: function( firstParam ) { - var args = arguments, - i = 0, - length = args.length, - count = length, - deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? - firstParam : - jQuery.Deferred(); - function resolveFunc( i ) { - return function( value ) { - args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; - if ( !( --count ) ) { - // Strange bug in FF4: - // Values changed onto the arguments object sometimes end up as undefined values - // outside the $.when method. Cloning the object into a fresh array solves the issue - deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) ); - } - }; - } - if ( length > 1 ) { - for( ; i < length; i++ ) { - if ( args[ i ] && jQuery.isFunction( args[ i ].promise ) ) { - args[ i ].promise().then( resolveFunc(i), deferred.reject ); - } else { - --count; - } - } - if ( !count ) { - deferred.resolveWith( deferred, args ); - } - } else if ( deferred !== firstParam ) { - deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); - } - return deferred.promise(); - } -}); - - - -jQuery.support = (function() { - - var div = document.createElement( "div" ), - documentElement = document.documentElement, - all, - a, - select, - opt, - input, - marginDiv, - support, - fragment, - body, - testElementParent, - testElement, - testElementStyle, - tds, - events, - eventName, - i, - isSupported; - - // Preliminary tests - div.setAttribute("className", "t"); - div.innerHTML = "
    a"; - - - all = div.getElementsByTagName( "*" ); - a = div.getElementsByTagName( "a" )[ 0 ]; - - // Can't get basic test support - if ( !all || !all.length || !a ) { - return {}; - } - - // First batch of supports tests - select = document.createElement( "select" ); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName( "input" )[ 0 ]; - - support = { - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: ( div.firstChild.nodeType === 3 ), - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName( "tbody" ).length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName( "link" ).length, - - // Get the style information from getAttribute - // (IE uses .cssText instead) - style: /top/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: ( a.getAttribute( "href" ) === "/a" ), - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.55$/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Make sure that if no value is specified for a checkbox - // that it defaults to "on". - // (WebKit defaults to "" instead) - checkOn: ( input.value === "on" ), - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - getSetAttribute: div.className !== "t", - - // Will be defined later - submitBubbles: true, - changeBubbles: true, - focusinBubbles: false, - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true - }; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Test to see if it's possible to delete an expando from an element - // Fails in Internet Explorer - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { - div.attachEvent( "onclick", function() { - // Cloning a node shouldn't copy over any - // bound event handlers (IE does this) - support.noCloneEvent = false; - }); - div.cloneNode( true ).fireEvent( "onclick" ); - } - - // Check if a radio maintains it's value - // after being appended to the DOM - input = document.createElement("input"); - input.value = "t"; - input.setAttribute("type", "radio"); - support.radioValue = input.value === "t"; - - input.setAttribute("checked", "checked"); - div.appendChild( input ); - fragment = document.createDocumentFragment(); - fragment.appendChild( div.firstChild ); - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - div.innerHTML = ""; - - // Figure out if the W3C box model works as expected - div.style.width = div.style.paddingLeft = "1px"; - - body = document.getElementsByTagName( "body" )[ 0 ]; - // We use our own, invisible, body unless the body is already present - // in which case we use a div (#9239) - testElement = document.createElement( body ? "div" : "body" ); - testElementStyle = { - visibility: "hidden", - width: 0, - height: 0, - border: 0, - margin: 0, - background: "none" - }; - if ( body ) { - jQuery.extend( testElementStyle, { - position: "absolute", - left: "-1000px", - top: "-1000px" - }); - } - for ( i in testElementStyle ) { - testElement.style[ i ] = testElementStyle[ i ]; - } - testElement.appendChild( div ); - testElementParent = body || documentElement; - testElementParent.insertBefore( testElement, testElementParent.firstChild ); - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - support.boxModel = div.offsetWidth === 2; - - if ( "zoom" in div.style ) { - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - // (IE < 8 does this) - div.style.display = "inline"; - div.style.zoom = 1; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 ); - - // Check if elements with layout shrink-wrap their children - // (IE 6 does this) - div.style.display = ""; - div.innerHTML = "
    "; - support.shrinkWrapBlocks = ( div.offsetWidth !== 2 ); - } - - div.innerHTML = "
    t
    "; - tds = div.getElementsByTagName( "td" ); - - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - // (only IE 8 fails this test) - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Check if empty table cells still have offsetWidth/Height - // (IE < 8 fail this test) - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - div.innerHTML = ""; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. For more - // info see bug #3333 - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - if ( document.defaultView && document.defaultView.getComputedStyle ) { - marginDiv = document.createElement( "div" ); - marginDiv.style.width = "0"; - marginDiv.style.marginRight = "0"; - div.appendChild( marginDiv ); - support.reliableMarginRight = - ( parseInt( ( document.defaultView.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0; - } - - // Remove the body element we added - testElement.innerHTML = ""; - testElementParent.removeChild( testElement ); - - // Technique from Juriy Zaytsev - // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/ - // We only care about the case where non-standard event systems - // are used, namely in IE. Short-circuiting here helps us to - // avoid an eval call (in setAttribute) which can cause CSP - // to go haywire. See: https://developer.mozilla.org/en/Security/CSP - if ( div.attachEvent ) { - for( i in { - submit: 1, - change: 1, - focusin: 1 - } ) { - eventName = "on" + i; - isSupported = ( eventName in div ); - if ( !isSupported ) { - div.setAttribute( eventName, "return;" ); - isSupported = ( typeof div[ eventName ] === "function" ); - } - support[ i + "Bubbles" ] = isSupported; - } - } - - // Null connected elements to avoid leaks in IE - testElement = fragment = select = opt = body = marginDiv = div = input = null; - - return support; -})(); - -// Keep track of boxModel -jQuery.boxModel = jQuery.support.boxModel; - - - - -var rbrace = /^(?:\{.*\}|\[.*\])$/, - rmultiDash = /([a-z])([A-Z])/g; - -jQuery.extend({ - cache: {}, - - // Please use with caution - uuid: 0, - - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, ret, - internalKey = jQuery.expando, - getByName = typeof name === "string", - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || (pvt && id && (cache[ id ] && !cache[ id ][ internalKey ]))) && getByName && data === undefined ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ jQuery.expando ] = id = ++jQuery.uuid; - } else { - id = jQuery.expando; - } - } - - if ( !cache[ id ] ) { - cache[ id ] = {}; - - // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery - // metadata on plain JS objects when the object is serialized using - // JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name); - } else { - cache[ id ] = jQuery.extend(cache[ id ], name); - } - } - - thisCache = cache[ id ]; - - // Internal jQuery data is stored in a separate object inside the object's data - // cache in order to avoid key collisions between internal data and user-defined - // data - if ( pvt ) { - if ( !thisCache[ internalKey ] ) { - thisCache[ internalKey ] = {}; - } - - thisCache = thisCache[ internalKey ]; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should - // not attempt to inspect the internal events object using jQuery.data, as this - // internal data object is undocumented and subject to change. - if ( name === "events" && !thisCache[name] ) { - return thisCache[ internalKey ] && thisCache[ internalKey ].events; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( getByName ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; - }, - - removeData: function( elem, name, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, - - // Reference to internal data cache key - internalKey = jQuery.expando, - - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - - // See jQuery.data for more information - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ]; - - if ( thisCache ) { - - // Support interoperable removal of hyphenated or camelcased keys - if ( !thisCache[ name ] ) { - name = jQuery.camelCase( name ); - } - - delete thisCache[ name ]; - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !isEmptyDataObject(thisCache) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( pvt ) { - delete cache[ id ][ internalKey ]; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject(cache[ id ]) ) { - return; - } - } - - var internalCache = cache[ id ][ internalKey ]; - - // Browsers that fail expando deletion also refuse to delete expandos on - // the window, but it will allow it on all other JS objects; other browsers - // don't care - // Ensure that `cache` is not a window object #10080 - if ( jQuery.support.deleteExpando || !cache.setInterval ) { - delete cache[ id ]; - } else { - cache[ id ] = null; - } - - // We destroyed the entire user cache at once because it's faster than - // iterating through each key, but we need to continue to persist internal - // data if it existed - if ( internalCache ) { - cache[ id ] = {}; - // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery - // metadata on plain JS objects when the object is serialized using - // JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - - cache[ id ][ internalKey ] = internalCache; - - // Otherwise, we need to eliminate the expando on the node to avoid - // false lookups in the cache for entries that no longer exist - } else if ( isNode ) { - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( jQuery.support.deleteExpando ) { - delete elem[ jQuery.expando ]; - } else if ( elem.removeAttribute ) { - elem.removeAttribute( jQuery.expando ); - } else { - elem[ jQuery.expando ] = null; - } - } - }, - - // For internal use only. - _data: function( elem, name, data ) { - return jQuery.data( elem, name, data, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - if ( elem.nodeName ) { - var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; - - if ( match ) { - return !(match === true || elem.getAttribute("classid") !== match); - } - } - - return true; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var data = null; - - if ( typeof key === "undefined" ) { - if ( this.length ) { - data = jQuery.data( this[0] ); - - if ( this[0].nodeType === 1 ) { - var attr = this[0].attributes, name; - for ( var i = 0, l = attr.length; i < l; i++ ) { - name = attr[i].name; - - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.substring(5) ); - - dataAttr( this[0], name, data[ name ] ); - } - } - } - } - - return data; - - } else if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - var parts = key.split("."); - parts[1] = parts[1] ? "." + parts[1] : ""; - - if ( value === undefined ) { - data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); - - // Try to fetch any internally stored data first - if ( data === undefined && this.length ) { - data = jQuery.data( this[0], key ); - data = dataAttr( this[0], key, data ); - } - - return data === undefined && parts[1] ? - this.data( parts[0] ) : - data; - - } else { - return this.each(function() { - var $this = jQuery( this ), - args = [ parts[0], value ]; - - $this.triggerHandler( "setData" + parts[1] + "!", args ); - jQuery.data( this, key, value ); - $this.triggerHandler( "changeData" + parts[1] + "!", args ); - }); - } - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - var name = "data-" + key.replace( rmultiDash, "$1-$2" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - !jQuery.isNaN( data ) ? parseFloat( data ) : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// TODO: This is a hack for 1.5 ONLY to allow objects with a single toJSON -// property to be considered empty objects; this property always exists in -// order to make sure JSON.stringify does not expose internal metadata -function isEmptyDataObject( obj ) { - for ( var name in obj ) { - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} - - - - -function handleQueueMarkDefer( elem, type, src ) { - var deferDataKey = type + "defer", - queueDataKey = type + "queue", - markDataKey = type + "mark", - defer = jQuery.data( elem, deferDataKey, undefined, true ); - if ( defer && - ( src === "queue" || !jQuery.data( elem, queueDataKey, undefined, true ) ) && - ( src === "mark" || !jQuery.data( elem, markDataKey, undefined, true ) ) ) { - // Give room for hard-coded callbacks to fire first - // and eventually mark/queue something else on the element - setTimeout( function() { - if ( !jQuery.data( elem, queueDataKey, undefined, true ) && - !jQuery.data( elem, markDataKey, undefined, true ) ) { - jQuery.removeData( elem, deferDataKey, true ); - defer.resolve(); - } - }, 0 ); - } -} - -jQuery.extend({ - - _mark: function( elem, type ) { - if ( elem ) { - type = (type || "fx") + "mark"; - jQuery.data( elem, type, (jQuery.data(elem,type,undefined,true) || 0) + 1, true ); - } - }, - - _unmark: function( force, elem, type ) { - if ( force !== true ) { - type = elem; - elem = force; - force = false; - } - if ( elem ) { - type = type || "fx"; - var key = type + "mark", - count = force ? 0 : ( (jQuery.data( elem, key, undefined, true) || 1 ) - 1 ); - if ( count ) { - jQuery.data( elem, key, count, true ); - } else { - jQuery.removeData( elem, key, true ); - handleQueueMarkDefer( elem, type, "mark" ); - } - } - }, - - queue: function( elem, type, data ) { - if ( elem ) { - type = (type || "fx") + "queue"; - var q = jQuery.data( elem, type, undefined, true ); - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !q || jQuery.isArray(data) ) { - q = jQuery.data( elem, type, jQuery.makeArray(data), true ); - } else { - q.push( data ); - } - } - return q || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - fn = queue.shift(), - defer; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - } - - if ( fn ) { - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift("inprogress"); - } - - fn.call(elem, function() { - jQuery.dequeue(elem, type); - }); - } - - if ( !queue.length ) { - jQuery.removeData( elem, type + "queue", true ); - handleQueueMarkDefer( elem, type, "queue" ); - } - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - } - - if ( data === undefined ) { - return jQuery.queue( this[0], type ); - } - return this.each(function() { - var queue = jQuery.queue( this, type, data ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; - type = type || "fx"; - - return this.queue( type, function() { - var elem = this; - setTimeout(function() { - jQuery.dequeue( elem, type ); - }, time ); - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, object ) { - if ( typeof type !== "string" ) { - object = type; - type = undefined; - } - type = type || "fx"; - var defer = jQuery.Deferred(), - elements = this, - i = elements.length, - count = 1, - deferDataKey = type + "defer", - queueDataKey = type + "queue", - markDataKey = type + "mark", - tmp; - function resolve() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - } - while( i-- ) { - if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) || - ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) || - jQuery.data( elements[ i ], markDataKey, undefined, true ) ) && - jQuery.data( elements[ i ], deferDataKey, jQuery._Deferred(), true ) )) { - count++; - tmp.done( resolve ); - } - } - resolve(); - return defer.promise(); - } -}); - - - - -var rclass = /[\n\t\r]/g, - rspace = /\s+/, - rreturn = /\r/g, - rtype = /^(?:button|input)$/i, - rfocusable = /^(?:button|input|object|select|textarea)$/i, - rclickable = /^a(?:rea)?$/i, - rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, - nodeHook, boolHook; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, name, value, true, jQuery.attr ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, name, value, true, jQuery.prop ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classNames, i, l, elem, - setClass, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call(this, j, this.className) ); - }); - } - - if ( value && typeof value === "string" ) { - classNames = value.split( rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 ) { - if ( !elem.className && classNames.length === 1 ) { - elem.className = value; - - } else { - setClass = " " + elem.className + " "; - - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { - setClass += classNames[ c ] + " "; - } - } - elem.className = jQuery.trim( setClass ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classNames, i, l, elem, className, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call(this, j, this.className) ); - }); - } - - if ( (value && typeof value === "string") || value === undefined ) { - classNames = (value || "").split( rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 && elem.className ) { - if ( value ) { - className = (" " + elem.className + " ").replace( rclass, " " ); - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - className = className.replace(" " + classNames[ c ] + " ", " "); - } - elem.className = jQuery.trim( className ); - - } else { - elem.className = ""; - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.split( rspace ); - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space seperated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - } else if ( type === "undefined" || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // toggle whole className - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " "; - for ( var i = 0, l = this.length; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var hooks, ret, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return undefined; - } - - var isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var self = jQuery(this), val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, self.val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - }, - select: { - get: function( elem ) { - var value, - index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type === "select-one"; - - // Nothing was selected - if ( index < 0 ) { - return null; - } - - // Loop through all the selected options - for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { - var option = options[ i ]; - - // Don't return options that are disabled or in a disabled optgroup - if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && - (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - // Fixes Bug #2551 -- select.val() broken in IE after form.reset() - if ( one && !values.length && options.length ) { - return jQuery( options[ index ] ).val(); - } - - return values; - }, - - set: function( elem, value ) { - var values = jQuery.makeArray( value ); - - jQuery(elem).find("option").each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - attrFn: { - val: true, - css: true, - html: true, - text: true, - data: true, - width: true, - height: true, - offset: true - }, - - attrFix: { - // Always normalize to ensure hook usage - tabindex: "tabIndex" - }, - - attr: function( elem, name, value, pass ) { - var nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return undefined; - } - - if ( pass && name in jQuery.attrFn ) { - return jQuery( elem )[ name ]( value ); - } - - // Fallback to prop when attributes are not supported - if ( !("getAttribute" in elem) ) { - return jQuery.prop( elem, name, value ); - } - - var ret, hooks, - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - // Normalize the name if needed - if ( notxml ) { - name = jQuery.attrFix[ name ] || name; - - hooks = jQuery.attrHooks[ name ]; - - if ( !hooks ) { - // Use boolHook for boolean attributes - if ( rboolean.test( name ) ) { - hooks = boolHook; - - // Use nodeHook if available( IE6/7 ) - } else if ( nodeHook ) { - hooks = nodeHook; - } - } - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return undefined; - - } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, "" + value ); - return value; - } - - } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - - ret = elem.getAttribute( name ); - - // Non-existent attributes return null, we normalize to undefined - return ret === null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, name ) { - var propName; - if ( elem.nodeType === 1 ) { - name = jQuery.attrFix[ name ] || name; - - jQuery.attr( elem, name, "" ); - elem.removeAttribute( name ); - - // Set corresponding property to false for boolean attributes - if ( rboolean.test( name ) && (propName = jQuery.propFix[ name ] || name) in elem ) { - elem[ propName ] = false; - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - // We can't allow the type property to be changed (since it causes problems in IE) - if ( rtype.test( elem.nodeName ) && elem.parentNode ) { - jQuery.error( "type property can't be changed" ); - } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to it's default in case type is set after value - // This is for element creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - }, - // Use the value property for back compat - // Use the nodeHook for button elements in IE6/7 (#1954) - value: { - get: function( elem, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.get( elem, name ); - } - return name in elem ? - elem.value : - null; - }, - set: function( elem, value, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.set( elem, value, name ); - } - // Does not return so that setAttribute is also used - elem.value = value; - } - } - }, - - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - - prop: function( elem, name, value ) { - var nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return undefined; - } - - var ret, hooks, - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - return (elem[ name ] = value); - } - - } else { - if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - return elem[ name ]; - } - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - var attributeNode = elem.getAttributeNode("tabindex"); - - return attributeNode && attributeNode.specified ? - parseInt( attributeNode.value, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - } - } -}); - -// Add the tabindex propHook to attrHooks for back-compat -jQuery.attrHooks.tabIndex = jQuery.propHooks.tabIndex; - -// Hook for boolean attributes -boolHook = { - get: function( elem, name ) { - // Align boolean attributes with corresponding properties - // Fall back to attribute presence where some booleans are not supported - var attrNode; - return jQuery.prop( elem, name ) === true || ( attrNode = elem.getAttributeNode( name ) ) && attrNode.nodeValue !== false ? - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - var propName; - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - // value is true since we know at this point it's type boolean and not false - // Set boolean attributes to the same name and set the DOM property - propName = jQuery.propFix[ name ] || name; - if ( propName in elem ) { - // Only set the IDL specifically if it already exists on the element - elem[ propName ] = true; - } - - elem.setAttribute( name, name.toLowerCase() ); - } - return name; - } -}; - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !jQuery.support.getSetAttribute ) { - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = jQuery.valHooks.button = { - get: function( elem, name ) { - var ret; - ret = elem.getAttributeNode( name ); - // Return undefined if nodeValue is empty string - return ret && ret.nodeValue !== "" ? - ret.nodeValue : - undefined; - }, - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - ret = document.createAttribute( name ); - elem.setAttributeNode( ret ); - } - return (ret.nodeValue = value + ""); - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }); - }); -} - - -// Some attributes require a special call on IE -if ( !jQuery.support.hrefNormalized ) { - jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - get: function( elem ) { - var ret = elem.getAttribute( name, 2 ); - return ret === null ? undefined : ret; - } - }); - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Normalize to lowercase since IE uppercases css property names - return elem.style.cssText.toLowerCase() || undefined; - }, - set: function( elem, value ) { - return (elem.style.cssText = "" + value); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }); -} - -// Radios and checkboxes getter/setter -if ( !jQuery.support.checkOn ) { - jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - get: function( elem ) { - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); -} -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return (elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0); - } - } - }); -}); - - - - -var rnamespaces = /\.(.*)$/, - rformElems = /^(?:textarea|input|select)$/i, - rperiod = /\./g, - rspaces = / /g, - rescape = /[^\w\s.|`]/g, - fcleanup = function( nm ) { - return nm.replace(rescape, "\\$&"); - }; - -/* - * A number of helper functions used for managing events. - * Many of the ideas behind this code originated from - * Dean Edwards' addEvent library. - */ -jQuery.event = { - - // Bind an event to an element - // Original by Dean Edwards - add: function( elem, types, handler, data ) { - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - if ( handler === false ) { - handler = returnFalse; - } else if ( !handler ) { - // Fixes bug #7229. Fix recommended by jdalton - return; - } - - var handleObjIn, handleObj; - - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - } - - // Make sure that the function being executed has a unique ID - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure - var elemData = jQuery._data( elem ); - - // If no elemData is found then we must be trying to bind to one of the - // banned noData elements - if ( !elemData ) { - return; - } - - var events = elemData.events, - eventHandle = elemData.handle; - - if ( !events ) { - elemData.events = events = {}; - } - - if ( !eventHandle ) { - elemData.handle = eventHandle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.handle.apply( eventHandle.elem, arguments ) : - undefined; - }; - } - - // Add elem as a property of the handle function - // This is to prevent a memory leak with non-native events in IE. - eventHandle.elem = elem; - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = types.split(" "); - - var type, i = 0, namespaces; - - while ( (type = types[ i++ ]) ) { - handleObj = handleObjIn ? - jQuery.extend({}, handleObjIn) : - { handler: handler, data: data }; - - // Namespaced event handlers - if ( type.indexOf(".") > -1 ) { - namespaces = type.split("."); - type = namespaces.shift(); - handleObj.namespace = namespaces.slice(0).sort().join("."); - - } else { - namespaces = []; - handleObj.namespace = ""; - } - - handleObj.type = type; - if ( !handleObj.guid ) { - handleObj.guid = handler.guid; - } - - // Get the current list of functions bound to this event - var handlers = events[ type ], - special = jQuery.event.special[ type ] || {}; - - // Init the event handler queue - if ( !handlers ) { - handlers = events[ type ] = []; - - // Check for a special event handler - // Only use addEventListener/attachEvent if the special - // events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add the function to the element's handler list - handlers.push( handleObj ); - - // Keep track of which events have been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - global: {}, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, pos ) { - // don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - if ( handler === false ) { - handler = returnFalse; - } - - var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ), - events = elemData && elemData.events; - - if ( !elemData || !events ) { - return; - } - - // types is actually an event object here - if ( types && types.type ) { - handler = types.handler; - types = types.type; - } - - // Unbind all events for the element - if ( !types || typeof types === "string" && types.charAt(0) === "." ) { - types = types || ""; - - for ( type in events ) { - jQuery.event.remove( elem, type + types ); - } - - return; - } - - // Handle multiple events separated by a space - // jQuery(...).unbind("mouseover mouseout", fn); - types = types.split(" "); - - while ( (type = types[ i++ ]) ) { - origType = type; - handleObj = null; - all = type.indexOf(".") < 0; - namespaces = []; - - if ( !all ) { - // Namespaced event handlers - namespaces = type.split("."); - type = namespaces.shift(); - - namespace = new RegExp("(^|\\.)" + - jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)"); - } - - eventType = events[ type ]; - - if ( !eventType ) { - continue; - } - - if ( !handler ) { - for ( j = 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( all || namespace.test( handleObj.namespace ) ) { - jQuery.event.remove( elem, origType, handleObj.handler, j ); - eventType.splice( j--, 1 ); - } - } - - continue; - } - - special = jQuery.event.special[ type ] || {}; - - for ( j = pos || 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( handler.guid === handleObj.guid ) { - // remove the given handler for the given type - if ( all || namespace.test( handleObj.namespace ) ) { - if ( pos == null ) { - eventType.splice( j--, 1 ); - } - - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - - if ( pos != null ) { - break; - } - } - } - - // remove generic event handler if no more handlers exist - if ( eventType.length === 0 || pos != null && eventType.length === 1 ) { - if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - ret = null; - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - var handle = elemData.handle; - if ( handle ) { - handle.elem = null; - } - - delete elemData.events; - delete elemData.handle; - - if ( jQuery.isEmptyObject( elemData ) ) { - jQuery.removeData( elem, undefined, true ); - } - } - }, - - // Events that are safe to short-circuit if no handlers are attached. - // Native DOM events should not be added, they may have inline handlers. - customEvent: { - "getData": true, - "setData": true, - "changeData": true - }, - - trigger: function( event, data, elem, onlyHandlers ) { - // Event object or event type - var type = event.type || event, - namespaces = [], - exclusive; - - if ( type.indexOf("!") >= 0 ) { - // Exclusive events trigger only for the exact event (no namespaces) - type = type.slice(0, -1); - exclusive = true; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - - if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { - // No jQuery handlers for this event type, and it can't have inline handlers - return; - } - - // Caller can pass in an Event, Object, or just an event type string - event = typeof event === "object" ? - // jQuery.Event object - event[ jQuery.expando ] ? event : - // Object literal - new jQuery.Event( type, event ) : - // Just the event type (string) - new jQuery.Event( type ); - - event.type = type; - event.exclusive = exclusive; - event.namespace = namespaces.join("."); - event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)"); - - // triggerHandler() and global events don't bubble or run the default action - if ( onlyHandlers || !elem ) { - event.preventDefault(); - event.stopPropagation(); - } - - // Handle a global trigger - if ( !elem ) { - // TODO: Stop taunting the data cache; remove global events and always attach to document - jQuery.each( jQuery.cache, function() { - // internalKey variable is just used to make it easier to find - // and potentially change this stuff later; currently it just - // points to jQuery.expando - var internalKey = jQuery.expando, - internalCache = this[ internalKey ]; - if ( internalCache && internalCache.events && internalCache.events[ type ] ) { - jQuery.event.trigger( event, data, internalCache.handle.elem ); - } - }); - return; - } - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // Clean up the event in case it is being reused - event.result = undefined; - event.target = elem; - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data != null ? jQuery.makeArray( data ) : []; - data.unshift( event ); - - var cur = elem, - // IE doesn't like method names with a colon (#3533, #8272) - ontype = type.indexOf(":") < 0 ? "on" + type : ""; - - // Fire event on the current element, then bubble up the DOM tree - do { - var handle = jQuery._data( cur, "handle" ); - - event.currentTarget = cur; - if ( handle ) { - handle.apply( cur, data ); - } - - // Trigger an inline bound script - if ( ontype && jQuery.acceptData( cur ) && cur[ ontype ] && cur[ ontype ].apply( cur, data ) === false ) { - event.result = false; - event.preventDefault(); - } - - // Bubble up to document, then to window - cur = cur.parentNode || cur.ownerDocument || cur === event.target.ownerDocument && window; - } while ( cur && !event.isPropagationStopped() ); - - // If nobody prevented the default action, do it now - if ( !event.isDefaultPrevented() ) { - var old, - special = jQuery.event.special[ type ] || {}; - - if ( (!special._default || special._default.call( elem.ownerDocument, event ) === false) && - !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction)() check here because IE6/7 fails that test. - // IE<9 dies on focus to hidden element (#1486), may want to revisit a try/catch. - try { - if ( ontype && elem[ type ] ) { - // Don't re-trigger an onFOO event when we call its FOO() method - old = elem[ ontype ]; - - if ( old ) { - elem[ ontype ] = null; - } - - jQuery.event.triggered = type; - elem[ type ](); - } - } catch ( ieError ) {} - - if ( old ) { - elem[ ontype ] = old; - } - - jQuery.event.triggered = undefined; - } - } - - return event.result; - }, - - handle: function( event ) { - event = jQuery.event.fix( event || window.event ); - // Snapshot the handlers list since a called handler may add/remove events. - var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []).slice(0), - run_all = !event.exclusive && !event.namespace, - args = Array.prototype.slice.call( arguments, 0 ); - - // Use the fix-ed Event rather than the (read-only) native event - args[0] = event; - event.currentTarget = this; - - for ( var j = 0, l = handlers.length; j < l; j++ ) { - var handleObj = handlers[ j ]; - - // Triggered event must 1) be non-exclusive and have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event. - if ( run_all || event.namespace_re.test( handleObj.namespace ) ) { - // Pass in a reference to the handler function itself - // So that we can later remove it - event.handler = handleObj.handler; - event.data = handleObj.data; - event.handleObj = handleObj; - - var ret = handleObj.handler.apply( this, args ); - - if ( ret !== undefined ) { - event.result = ret; - if ( ret === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - - if ( event.isImmediatePropagationStopped() ) { - break; - } - } - } - return event.result; - }, - - props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // store a copy of the original event object - // and "clone" to set read-only properties - var originalEvent = event; - event = jQuery.Event( originalEvent ); - - for ( var i = this.props.length, prop; i; ) { - prop = this.props[ --i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Fix target property, if necessary - if ( !event.target ) { - // Fixes #1925 where srcElement might not be defined either - event.target = event.srcElement || document; - } - - // check if target is a textnode (safari) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && event.fromElement ) { - event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement; - } - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && event.clientX != null ) { - var eventDocument = event.target.ownerDocument || document, - doc = eventDocument.documentElement, - body = eventDocument.body; - - event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); - event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); - } - - // Add which for key events - if ( event.which == null && (event.charCode != null || event.keyCode != null) ) { - event.which = event.charCode != null ? event.charCode : event.keyCode; - } - - // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) - if ( !event.metaKey && event.ctrlKey ) { - event.metaKey = event.ctrlKey; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && event.button !== undefined ) { - event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); - } - - return event; - }, - - // Deprecated, use jQuery.guid instead - guid: 1E8, - - // Deprecated, use jQuery.proxy instead - proxy: jQuery.proxy, - - special: { - ready: { - // Make sure the ready event is setup - setup: jQuery.bindReady, - teardown: jQuery.noop - }, - - live: { - add: function( handleObj ) { - jQuery.event.add( this, - liveConvert( handleObj.origType, handleObj.selector ), - jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) ); - }, - - remove: function( handleObj ) { - jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj ); - } - }, - - beforeunload: { - setup: function( data, namespaces, eventHandle ) { - // We only want to do this special case on windows - if ( jQuery.isWindow( this ) ) { - this.onbeforeunload = eventHandle; - } - }, - - teardown: function( namespaces, eventHandle ) { - if ( this.onbeforeunload === eventHandle ) { - this.onbeforeunload = null; - } - } - } - } -}; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - if ( elem.detachEvent ) { - elem.detachEvent( "on" + type, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !this.preventDefault ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // timeStamp is buggy for some events on Firefox(#3843) - // So we won't rely on the native value - this.timeStamp = jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -function returnFalse() { - return false; -} -function returnTrue() { - return true; -} - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - preventDefault: function() { - this.isDefaultPrevented = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - - // if preventDefault exists run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // otherwise set the returnValue property of the original event to false (IE) - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - this.isPropagationStopped = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - // if stopPropagation exists run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - // otherwise set the cancelBubble property of the original event to true (IE) - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - }, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse -}; - -// Checks if an event happened on an element within another element -// Used in jQuery.event.special.mouseenter and mouseleave handlers -var withinElement = function( event ) { - - // Check if mouse(over|out) are still within the same parent element - var related = event.relatedTarget, - inside = false, - eventType = event.type; - - event.type = event.data; - - if ( related !== this ) { - - if ( related ) { - inside = jQuery.contains( this, related ); - } - - if ( !inside ) { - - jQuery.event.handle.apply( this, arguments ); - - event.type = eventType; - } - } -}, - -// In case of event delegation, we only need to rename the event.type, -// liveHandler will take care of the rest. -delegate = function( event ) { - event.type = event.data; - jQuery.event.handle.apply( this, arguments ); -}; - -// Create mouseenter and mouseleave events -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - setup: function( data ) { - jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig ); - }, - teardown: function( data ) { - jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement ); - } - }; -}); - -// submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function( data, namespaces ) { - if ( !jQuery.nodeName( this, "form" ) ) { - jQuery.event.add(this, "click.specialSubmit", function( e ) { - var elem = e.target, - type = jQuery.nodeName( elem, "input" ) ? elem.type : ""; - - if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) { - trigger( "submit", this, arguments ); - } - }); - - jQuery.event.add(this, "keypress.specialSubmit", function( e ) { - var elem = e.target, - type = jQuery.nodeName( elem, "input" ) ? elem.type : ""; - - if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) { - trigger( "submit", this, arguments ); - } - }); - - } else { - return false; - } - }, - - teardown: function( namespaces ) { - jQuery.event.remove( this, ".specialSubmit" ); - } - }; - -} - -// change delegation, happens here so we have bind. -if ( !jQuery.support.changeBubbles ) { - - var changeFilters, - - getVal = function( elem ) { - var type = jQuery.nodeName( elem, "input" ) ? elem.type : "", - val = elem.value; - - if ( type === "radio" || type === "checkbox" ) { - val = elem.checked; - - } else if ( type === "select-multiple" ) { - val = elem.selectedIndex > -1 ? - jQuery.map( elem.options, function( elem ) { - return elem.selected; - }).join("-") : - ""; - - } else if ( jQuery.nodeName( elem, "select" ) ) { - val = elem.selectedIndex; - } - - return val; - }, - - testChange = function testChange( e ) { - var elem = e.target, data, val; - - if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) { - return; - } - - data = jQuery._data( elem, "_change_data" ); - val = getVal(elem); - - // the current data will be also retrieved by beforeactivate - if ( e.type !== "focusout" || elem.type !== "radio" ) { - jQuery._data( elem, "_change_data", val ); - } - - if ( data === undefined || val === data ) { - return; - } - - if ( data != null || val ) { - e.type = "change"; - e.liveFired = undefined; - jQuery.event.trigger( e, arguments[1], elem ); - } - }; - - jQuery.event.special.change = { - filters: { - focusout: testChange, - - beforedeactivate: testChange, - - click: function( e ) { - var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : ""; - - if ( type === "radio" || type === "checkbox" || jQuery.nodeName( elem, "select" ) ) { - testChange.call( this, e ); - } - }, - - // Change has to be called before submit - // Keydown will be called before keypress, which is used in submit-event delegation - keydown: function( e ) { - var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : ""; - - if ( (e.keyCode === 13 && !jQuery.nodeName( elem, "textarea" ) ) || - (e.keyCode === 32 && (type === "checkbox" || type === "radio")) || - type === "select-multiple" ) { - testChange.call( this, e ); - } - }, - - // Beforeactivate happens also before the previous element is blurred - // with this event you can't trigger a change event, but you can store - // information - beforeactivate: function( e ) { - var elem = e.target; - jQuery._data( elem, "_change_data", getVal(elem) ); - } - }, - - setup: function( data, namespaces ) { - if ( this.type === "file" ) { - return false; - } - - for ( var type in changeFilters ) { - jQuery.event.add( this, type + ".specialChange", changeFilters[type] ); - } - - return rformElems.test( this.nodeName ); - }, - - teardown: function( namespaces ) { - jQuery.event.remove( this, ".specialChange" ); - - return rformElems.test( this.nodeName ); - } - }; - - changeFilters = jQuery.event.special.change.filters; - - // Handle when the input is .focus()'d - changeFilters.focus = changeFilters.beforeactivate; -} - -function trigger( type, elem, args ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - // Don't pass args or remember liveFired; they apply to the donor event. - var event = jQuery.extend( {}, args[ 0 ] ); - event.type = type; - event.originalEvent = {}; - event.liveFired = undefined; - jQuery.event.handle.call( elem, event ); - if ( event.isDefaultPrevented() ) { - args[ 0 ].preventDefault(); - } -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - - function handler( donor ) { - // Donor event is always a native one; fix it and switch its type. - // Let focusin/out handler cancel the donor focus/blur event. - var e = jQuery.event.fix( donor ); - e.type = fix; - e.originalEvent = {}; - jQuery.event.trigger( e, null, e.target ); - if ( e.isDefaultPrevented() ) { - donor.preventDefault(); - } - } - }); -} - -jQuery.each(["bind", "one"], function( i, name ) { - jQuery.fn[ name ] = function( type, data, fn ) { - var handler; - - // Handle object literals - if ( typeof type === "object" ) { - for ( var key in type ) { - this[ name ](key, data, type[key], fn); - } - return this; - } - - if ( arguments.length === 2 || data === false ) { - fn = data; - data = undefined; - } - - if ( name === "one" ) { - handler = function( event ) { - jQuery( this ).unbind( event, handler ); - return fn.apply( this, arguments ); - }; - handler.guid = fn.guid || jQuery.guid++; - } else { - handler = fn; - } - - if ( type === "unload" && name !== "one" ) { - this.one( type, data, fn ); - - } else { - for ( var i = 0, l = this.length; i < l; i++ ) { - jQuery.event.add( this[i], type, handler, data ); - } - } - - return this; - }; -}); - -jQuery.fn.extend({ - unbind: function( type, fn ) { - // Handle object literals - if ( typeof type === "object" && !type.preventDefault ) { - for ( var key in type ) { - this.unbind(key, type[key]); - } - - } else { - for ( var i = 0, l = this.length; i < l; i++ ) { - jQuery.event.remove( this[i], type, fn ); - } - } - - return this; - }, - - delegate: function( selector, types, data, fn ) { - return this.live( types, data, fn, selector ); - }, - - undelegate: function( selector, types, fn ) { - if ( arguments.length === 0 ) { - return this.unbind( "live" ); - - } else { - return this.die( types, null, fn, selector ); - } - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - - triggerHandler: function( type, data ) { - if ( this[0] ) { - return jQuery.event.trigger( type, data, this[0], true ); - } - }, - - toggle: function( fn ) { - // Save reference to arguments for access in closure - var args = arguments, - guid = fn.guid || jQuery.guid++, - i = 0, - toggler = function( event ) { - // Figure out which function to execute - var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i; - jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 ); - - // Make sure that clicks stop - event.preventDefault(); - - // and execute the function - return args[ lastToggle ].apply( this, arguments ) || false; - }; - - // link all the functions, so any of them can unbind this click handler - toggler.guid = guid; - while ( i < args.length ) { - args[ i++ ].guid = guid; - } - - return this.click( toggler ); - }, - - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -}); - -var liveMap = { - focus: "focusin", - blur: "focusout", - mouseenter: "mouseover", - mouseleave: "mouseout" -}; - -jQuery.each(["live", "die"], function( i, name ) { - jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) { - var type, i = 0, match, namespaces, preType, - selector = origSelector || this.selector, - context = origSelector ? this : jQuery( this.context ); - - if ( typeof types === "object" && !types.preventDefault ) { - for ( var key in types ) { - context[ name ]( key, data, types[key], selector ); - } - - return this; - } - - if ( name === "die" && !types && - origSelector && origSelector.charAt(0) === "." ) { - - context.unbind( origSelector ); - - return this; - } - - if ( data === false || jQuery.isFunction( data ) ) { - fn = data || returnFalse; - data = undefined; - } - - types = (types || "").split(" "); - - while ( (type = types[ i++ ]) != null ) { - match = rnamespaces.exec( type ); - namespaces = ""; - - if ( match ) { - namespaces = match[0]; - type = type.replace( rnamespaces, "" ); - } - - if ( type === "hover" ) { - types.push( "mouseenter" + namespaces, "mouseleave" + namespaces ); - continue; - } - - preType = type; - - if ( liveMap[ type ] ) { - types.push( liveMap[ type ] + namespaces ); - type = type + namespaces; - - } else { - type = (liveMap[ type ] || type) + namespaces; - } - - if ( name === "live" ) { - // bind live handler - for ( var j = 0, l = context.length; j < l; j++ ) { - jQuery.event.add( context[j], "live." + liveConvert( type, selector ), - { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } ); - } - - } else { - // unbind live handler - context.unbind( "live." + liveConvert( type, selector ), fn ); - } - } - - return this; - }; -}); - -function liveHandler( event ) { - var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret, - elems = [], - selectors = [], - events = jQuery._data( this, "events" ); - - // Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911) - if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) { - return; - } - - if ( event.namespace ) { - namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)"); - } - - event.liveFired = this; - - var live = events.live.slice(0); - - for ( j = 0; j < live.length; j++ ) { - handleObj = live[j]; - - if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) { - selectors.push( handleObj.selector ); - - } else { - live.splice( j--, 1 ); - } - } - - match = jQuery( event.target ).closest( selectors, event.currentTarget ); - - for ( i = 0, l = match.length; i < l; i++ ) { - close = match[i]; - - for ( j = 0; j < live.length; j++ ) { - handleObj = live[j]; - - if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) && !close.elem.disabled ) { - elem = close.elem; - related = null; - - // Those two events require additional checking - if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) { - event.type = handleObj.preType; - related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0]; - - // Make sure not to accidentally match a child element with the same selector - if ( related && jQuery.contains( elem, related ) ) { - related = elem; - } - } - - if ( !related || related !== elem ) { - elems.push({ elem: elem, handleObj: handleObj, level: close.level }); - } - } - } - } - - for ( i = 0, l = elems.length; i < l; i++ ) { - match = elems[i]; - - if ( maxLevel && match.level > maxLevel ) { - break; - } - - event.currentTarget = match.elem; - event.data = match.handleObj.data; - event.handleObj = match.handleObj; - - ret = match.handleObj.origHandler.apply( match.elem, arguments ); - - if ( ret === false || event.isPropagationStopped() ) { - maxLevel = match.level; - - if ( ret === false ) { - stop = false; - } - if ( event.isImmediatePropagationStopped() ) { - break; - } - } - } - - return stop; -} - -function liveConvert( type, selector ) { - return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspaces, "&"); -} - -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error").split(" "), function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - if ( fn == null ) { - fn = data; - data = null; - } - - return arguments.length > 0 ? - this.bind( name, data, fn ) : - this.trigger( name ); - }; - - if ( jQuery.attrFn ) { - jQuery.attrFn[ name ] = true; - } -}); - - - -/*! - * Sizzle CSS Selector Engine - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){ - -var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, - done = 0, - toString = Object.prototype.toString, - hasDuplicate = false, - baseHasDuplicate = true, - rBackslash = /\\/g, - rNonWord = /\W/; - -// Here we check if the JavaScript engine is using some sort of -// optimization where it does not always call our comparision -// function. If that is the case, discard the hasDuplicate value. -// Thus far that includes Google Chrome. -[0, 0].sort(function() { - baseHasDuplicate = false; - return 0; -}); - -var Sizzle = function( selector, context, results, seed ) { - results = results || []; - context = context || document; - - var origContext = context; - - if ( context.nodeType !== 1 && context.nodeType !== 9 ) { - return []; - } - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - var m, set, checkSet, extra, ret, cur, pop, i, - prune = true, - contextXML = Sizzle.isXML( context ), - parts = [], - soFar = selector; - - // Reset the position of the chunker regexp (start from head) - do { - chunker.exec( "" ); - m = chunker.exec( soFar ); - - if ( m ) { - soFar = m[3]; - - parts.push( m[1] ); - - if ( m[2] ) { - extra = m[3]; - break; - } - } - } while ( m ); - - if ( parts.length > 1 && origPOS.exec( selector ) ) { - - if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { - set = posProcess( parts[0] + parts[1], context ); - - } else { - set = Expr.relative[ parts[0] ] ? - [ context ] : - Sizzle( parts.shift(), context ); - - while ( parts.length ) { - selector = parts.shift(); - - if ( Expr.relative[ selector ] ) { - selector += parts.shift(); - } - - set = posProcess( selector, set ); - } - } - - } else { - // Take a shortcut and set the context if the root selector is an ID - // (but not if it'll be faster if the inner selector is an ID) - if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && - Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { - - ret = Sizzle.find( parts.shift(), context, contextXML ); - context = ret.expr ? - Sizzle.filter( ret.expr, ret.set )[0] : - ret.set[0]; - } - - if ( context ) { - ret = seed ? - { expr: parts.pop(), set: makeArray(seed) } : - Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); - - set = ret.expr ? - Sizzle.filter( ret.expr, ret.set ) : - ret.set; - - if ( parts.length > 0 ) { - checkSet = makeArray( set ); - - } else { - prune = false; - } - - while ( parts.length ) { - cur = parts.pop(); - pop = cur; - - if ( !Expr.relative[ cur ] ) { - cur = ""; - } else { - pop = parts.pop(); - } - - if ( pop == null ) { - pop = context; - } - - Expr.relative[ cur ]( checkSet, pop, contextXML ); - } - - } else { - checkSet = parts = []; - } - } - - if ( !checkSet ) { - checkSet = set; - } - - if ( !checkSet ) { - Sizzle.error( cur || selector ); - } - - if ( toString.call(checkSet) === "[object Array]" ) { - if ( !prune ) { - results.push.apply( results, checkSet ); - - } else if ( context && context.nodeType === 1 ) { - for ( i = 0; checkSet[i] != null; i++ ) { - if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { - results.push( set[i] ); - } - } - - } else { - for ( i = 0; checkSet[i] != null; i++ ) { - if ( checkSet[i] && checkSet[i].nodeType === 1 ) { - results.push( set[i] ); - } - } - } - - } else { - makeArray( checkSet, results ); - } - - if ( extra ) { - Sizzle( extra, origContext, results, seed ); - Sizzle.uniqueSort( results ); - } - - return results; -}; - -Sizzle.uniqueSort = function( results ) { - if ( sortOrder ) { - hasDuplicate = baseHasDuplicate; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( var i = 1; i < results.length; i++ ) { - if ( results[i] === results[ i - 1 ] ) { - results.splice( i--, 1 ); - } - } - } - } - - return results; -}; - -Sizzle.matches = function( expr, set ) { - return Sizzle( expr, null, null, set ); -}; - -Sizzle.matchesSelector = function( node, expr ) { - return Sizzle( expr, null, null, [node] ).length > 0; -}; - -Sizzle.find = function( expr, context, isXML ) { - var set; - - if ( !expr ) { - return []; - } - - for ( var i = 0, l = Expr.order.length; i < l; i++ ) { - var match, - type = Expr.order[i]; - - if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { - var left = match[1]; - match.splice( 1, 1 ); - - if ( left.substr( left.length - 1 ) !== "\\" ) { - match[1] = (match[1] || "").replace( rBackslash, "" ); - set = Expr.find[ type ]( match, context, isXML ); - - if ( set != null ) { - expr = expr.replace( Expr.match[ type ], "" ); - break; - } - } - } - } - - if ( !set ) { - set = typeof context.getElementsByTagName !== "undefined" ? - context.getElementsByTagName( "*" ) : - []; - } - - return { set: set, expr: expr }; -}; - -Sizzle.filter = function( expr, set, inplace, not ) { - var match, anyFound, - old = expr, - result = [], - curLoop = set, - isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); - - while ( expr && set.length ) { - for ( var type in Expr.filter ) { - if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { - var found, item, - filter = Expr.filter[ type ], - left = match[1]; - - anyFound = false; - - match.splice(1,1); - - if ( left.substr( left.length - 1 ) === "\\" ) { - continue; - } - - if ( curLoop === result ) { - result = []; - } - - if ( Expr.preFilter[ type ] ) { - match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); - - if ( !match ) { - anyFound = found = true; - - } else if ( match === true ) { - continue; - } - } - - if ( match ) { - for ( var i = 0; (item = curLoop[i]) != null; i++ ) { - if ( item ) { - found = filter( item, match, i, curLoop ); - var pass = not ^ !!found; - - if ( inplace && found != null ) { - if ( pass ) { - anyFound = true; - - } else { - curLoop[i] = false; - } - - } else if ( pass ) { - result.push( item ); - anyFound = true; - } - } - } - } - - if ( found !== undefined ) { - if ( !inplace ) { - curLoop = result; - } - - expr = expr.replace( Expr.match[ type ], "" ); - - if ( !anyFound ) { - return []; - } - - break; - } - } - } - - // Improper expression - if ( expr === old ) { - if ( anyFound == null ) { - Sizzle.error( expr ); - - } else { - break; - } - } - - old = expr; - } - - return curLoop; -}; - -Sizzle.error = function( msg ) { - throw "Syntax error, unrecognized expression: " + msg; -}; - -var Expr = Sizzle.selectors = { - order: [ "ID", "NAME", "TAG" ], - - match: { - ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, - ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, - TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, - CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, - POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, - PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ - }, - - leftMatch: {}, - - attrMap: { - "class": "className", - "for": "htmlFor" - }, - - attrHandle: { - href: function( elem ) { - return elem.getAttribute( "href" ); - }, - type: function( elem ) { - return elem.getAttribute( "type" ); - } - }, - - relative: { - "+": function(checkSet, part){ - var isPartStr = typeof part === "string", - isTag = isPartStr && !rNonWord.test( part ), - isPartStrNotTag = isPartStr && !isTag; - - if ( isTag ) { - part = part.toLowerCase(); - } - - for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { - if ( (elem = checkSet[i]) ) { - while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} - - checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? - elem || false : - elem === part; - } - } - - if ( isPartStrNotTag ) { - Sizzle.filter( part, checkSet, true ); - } - }, - - ">": function( checkSet, part ) { - var elem, - isPartStr = typeof part === "string", - i = 0, - l = checkSet.length; - - if ( isPartStr && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - - for ( ; i < l; i++ ) { - elem = checkSet[i]; - - if ( elem ) { - var parent = elem.parentNode; - checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; - } - } - - } else { - for ( ; i < l; i++ ) { - elem = checkSet[i]; - - if ( elem ) { - checkSet[i] = isPartStr ? - elem.parentNode : - elem.parentNode === part; - } - } - - if ( isPartStr ) { - Sizzle.filter( part, checkSet, true ); - } - } - }, - - "": function(checkSet, part, isXML){ - var nodeCheck, - doneName = done++, - checkFn = dirCheck; - - if ( typeof part === "string" && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - - checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); - }, - - "~": function( checkSet, part, isXML ) { - var nodeCheck, - doneName = done++, - checkFn = dirCheck; - - if ( typeof part === "string" && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - - checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); - } - }, - - find: { - ID: function( match, context, isXML ) { - if ( typeof context.getElementById !== "undefined" && !isXML ) { - var m = context.getElementById(match[1]); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }, - - NAME: function( match, context ) { - if ( typeof context.getElementsByName !== "undefined" ) { - var ret = [], - results = context.getElementsByName( match[1] ); - - for ( var i = 0, l = results.length; i < l; i++ ) { - if ( results[i].getAttribute("name") === match[1] ) { - ret.push( results[i] ); - } - } - - return ret.length === 0 ? null : ret; - } - }, - - TAG: function( match, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( match[1] ); - } - } - }, - preFilter: { - CLASS: function( match, curLoop, inplace, result, not, isXML ) { - match = " " + match[1].replace( rBackslash, "" ) + " "; - - if ( isXML ) { - return match; - } - - for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { - if ( elem ) { - if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { - if ( !inplace ) { - result.push( elem ); - } - - } else if ( inplace ) { - curLoop[i] = false; - } - } - } - - return false; - }, - - ID: function( match ) { - return match[1].replace( rBackslash, "" ); - }, - - TAG: function( match, curLoop ) { - return match[1].replace( rBackslash, "" ).toLowerCase(); - }, - - CHILD: function( match ) { - if ( match[1] === "nth" ) { - if ( !match[2] ) { - Sizzle.error( match[0] ); - } - - match[2] = match[2].replace(/^\+|\s*/g, ''); - - // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' - var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( - match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || - !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); - - // calculate the numbers (first)n+(last) including if they are negative - match[2] = (test[1] + (test[2] || 1)) - 0; - match[3] = test[3] - 0; - } - else if ( match[2] ) { - Sizzle.error( match[0] ); - } - - // TODO: Move to normal caching system - match[0] = done++; - - return match; - }, - - ATTR: function( match, curLoop, inplace, result, not, isXML ) { - var name = match[1] = match[1].replace( rBackslash, "" ); - - if ( !isXML && Expr.attrMap[name] ) { - match[1] = Expr.attrMap[name]; - } - - // Handle if an un-quoted value was used - match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); - - if ( match[2] === "~=" ) { - match[4] = " " + match[4] + " "; - } - - return match; - }, - - PSEUDO: function( match, curLoop, inplace, result, not ) { - if ( match[1] === "not" ) { - // If we're dealing with a complex expression, or a simple one - if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { - match[3] = Sizzle(match[3], null, null, curLoop); - - } else { - var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); - - if ( !inplace ) { - result.push.apply( result, ret ); - } - - return false; - } - - } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { - return true; - } - - return match; - }, - - POS: function( match ) { - match.unshift( true ); - - return match; - } - }, - - filters: { - enabled: function( elem ) { - return elem.disabled === false && elem.type !== "hidden"; - }, - - disabled: function( elem ) { - return elem.disabled === true; - }, - - checked: function( elem ) { - return elem.checked === true; - }, - - selected: function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - parent: function( elem ) { - return !!elem.firstChild; - }, - - empty: function( elem ) { - return !elem.firstChild; - }, - - has: function( elem, i, match ) { - return !!Sizzle( match[3], elem ).length; - }, - - header: function( elem ) { - return (/h\d/i).test( elem.nodeName ); - }, - - text: function( elem ) { - var attr = elem.getAttribute( "type" ), type = elem.type; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); - }, - - radio: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; - }, - - checkbox: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; - }, - - file: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; - }, - - password: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; - }, - - submit: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && "submit" === elem.type; - }, - - image: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; - }, - - reset: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && "reset" === elem.type; - }, - - button: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && "button" === elem.type || name === "button"; - }, - - input: function( elem ) { - return (/input|select|textarea|button/i).test( elem.nodeName ); - }, - - focus: function( elem ) { - return elem === elem.ownerDocument.activeElement; - } - }, - setFilters: { - first: function( elem, i ) { - return i === 0; - }, - - last: function( elem, i, match, array ) { - return i === array.length - 1; - }, - - even: function( elem, i ) { - return i % 2 === 0; - }, - - odd: function( elem, i ) { - return i % 2 === 1; - }, - - lt: function( elem, i, match ) { - return i < match[3] - 0; - }, - - gt: function( elem, i, match ) { - return i > match[3] - 0; - }, - - nth: function( elem, i, match ) { - return match[3] - 0 === i; - }, - - eq: function( elem, i, match ) { - return match[3] - 0 === i; - } - }, - filter: { - PSEUDO: function( elem, match, i, array ) { - var name = match[1], - filter = Expr.filters[ name ]; - - if ( filter ) { - return filter( elem, i, match, array ); - - } else if ( name === "contains" ) { - return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0; - - } else if ( name === "not" ) { - var not = match[3]; - - for ( var j = 0, l = not.length; j < l; j++ ) { - if ( not[j] === elem ) { - return false; - } - } - - return true; - - } else { - Sizzle.error( name ); - } - }, - - CHILD: function( elem, match ) { - var type = match[1], - node = elem; - - switch ( type ) { - case "only": - case "first": - while ( (node = node.previousSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - if ( type === "first" ) { - return true; - } - - node = elem; - - case "last": - while ( (node = node.nextSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - return true; - - case "nth": - var first = match[2], - last = match[3]; - - if ( first === 1 && last === 0 ) { - return true; - } - - var doneName = match[0], - parent = elem.parentNode; - - if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { - var count = 0; - - for ( node = parent.firstChild; node; node = node.nextSibling ) { - if ( node.nodeType === 1 ) { - node.nodeIndex = ++count; - } - } - - parent.sizcache = doneName; - } - - var diff = elem.nodeIndex - last; - - if ( first === 0 ) { - return diff === 0; - - } else { - return ( diff % first === 0 && diff / first >= 0 ); - } - } - }, - - ID: function( elem, match ) { - return elem.nodeType === 1 && elem.getAttribute("id") === match; - }, - - TAG: function( elem, match ) { - return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match; - }, - - CLASS: function( elem, match ) { - return (" " + (elem.className || elem.getAttribute("class")) + " ") - .indexOf( match ) > -1; - }, - - ATTR: function( elem, match ) { - var name = match[1], - result = Expr.attrHandle[ name ] ? - Expr.attrHandle[ name ]( elem ) : - elem[ name ] != null ? - elem[ name ] : - elem.getAttribute( name ), - value = result + "", - type = match[2], - check = match[4]; - - return result == null ? - type === "!=" : - type === "=" ? - value === check : - type === "*=" ? - value.indexOf(check) >= 0 : - type === "~=" ? - (" " + value + " ").indexOf(check) >= 0 : - !check ? - value && result !== false : - type === "!=" ? - value !== check : - type === "^=" ? - value.indexOf(check) === 0 : - type === "$=" ? - value.substr(value.length - check.length) === check : - type === "|=" ? - value === check || value.substr(0, check.length + 1) === check + "-" : - false; - }, - - POS: function( elem, match, i, array ) { - var name = match[2], - filter = Expr.setFilters[ name ]; - - if ( filter ) { - return filter( elem, i, match, array ); - } - } - } -}; - -var origPOS = Expr.match.POS, - fescape = function(all, num){ - return "\\" + (num - 0 + 1); - }; - -for ( var type in Expr.match ) { - Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); - Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); -} - -var makeArray = function( array, results ) { - array = Array.prototype.slice.call( array, 0 ); - - if ( results ) { - results.push.apply( results, array ); - return results; - } - - return array; -}; - -// Perform a simple check to determine if the browser is capable of -// converting a NodeList to an array using builtin methods. -// Also verifies that the returned array holds DOM nodes -// (which is not the case in the Blackberry browser) -try { - Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; - -// Provide a fallback method if it does not work -} catch( e ) { - makeArray = function( array, results ) { - var i = 0, - ret = results || []; - - if ( toString.call(array) === "[object Array]" ) { - Array.prototype.push.apply( ret, array ); - - } else { - if ( typeof array.length === "number" ) { - for ( var l = array.length; i < l; i++ ) { - ret.push( array[i] ); - } - - } else { - for ( ; array[i]; i++ ) { - ret.push( array[i] ); - } - } - } - - return ret; - }; -} - -var sortOrder, siblingCheck; - -if ( document.documentElement.compareDocumentPosition ) { - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { - return a.compareDocumentPosition ? -1 : 1; - } - - return a.compareDocumentPosition(b) & 4 ? -1 : 1; - }; - -} else { - sortOrder = function( a, b ) { - // The nodes are identical, we can exit early - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Fallback to using sourceIndex (in IE) if it's available on both nodes - } else if ( a.sourceIndex && b.sourceIndex ) { - return a.sourceIndex - b.sourceIndex; - } - - var al, bl, - ap = [], - bp = [], - aup = a.parentNode, - bup = b.parentNode, - cur = aup; - - // If the nodes are siblings (or identical) we can do a quick check - if ( aup === bup ) { - return siblingCheck( a, b ); - - // If no parents were found then the nodes are disconnected - } else if ( !aup ) { - return -1; - - } else if ( !bup ) { - return 1; - } - - // Otherwise they're somewhere else in the tree so we need - // to build up a full list of the parentNodes for comparison - while ( cur ) { - ap.unshift( cur ); - cur = cur.parentNode; - } - - cur = bup; - - while ( cur ) { - bp.unshift( cur ); - cur = cur.parentNode; - } - - al = ap.length; - bl = bp.length; - - // Start walking down the tree looking for a discrepancy - for ( var i = 0; i < al && i < bl; i++ ) { - if ( ap[i] !== bp[i] ) { - return siblingCheck( ap[i], bp[i] ); - } - } - - // We ended someplace up the tree so do a sibling check - return i === al ? - siblingCheck( a, bp[i], -1 ) : - siblingCheck( ap[i], b, 1 ); - }; - - siblingCheck = function( a, b, ret ) { - if ( a === b ) { - return ret; - } - - var cur = a.nextSibling; - - while ( cur ) { - if ( cur === b ) { - return -1; - } - - cur = cur.nextSibling; - } - - return 1; - }; -} - -// Utility function for retreiving the text value of an array of DOM nodes -Sizzle.getText = function( elems ) { - var ret = "", elem; - - for ( var i = 0; elems[i]; i++ ) { - elem = elems[i]; - - // Get the text from text nodes and CDATA nodes - if ( elem.nodeType === 3 || elem.nodeType === 4 ) { - ret += elem.nodeValue; - - // Traverse everything else, except comment nodes - } else if ( elem.nodeType !== 8 ) { - ret += Sizzle.getText( elem.childNodes ); - } - } - - return ret; -}; - -// Check to see if the browser returns elements by name when -// querying by getElementById (and provide a workaround) -(function(){ - // We're going to inject a fake input element with a specified name - var form = document.createElement("div"), - id = "script" + (new Date()).getTime(), - root = document.documentElement; - - form.innerHTML = ""; - - // Inject it into the root element, check its status, and remove it quickly - root.insertBefore( form, root.firstChild ); - - // The workaround has to do additional checks after a getElementById - // Which slows things down for other browsers (hence the branching) - if ( document.getElementById( id ) ) { - Expr.find.ID = function( match, context, isXML ) { - if ( typeof context.getElementById !== "undefined" && !isXML ) { - var m = context.getElementById(match[1]); - - return m ? - m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? - [m] : - undefined : - []; - } - }; - - Expr.filter.ID = function( elem, match ) { - var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); - - return elem.nodeType === 1 && node && node.nodeValue === match; - }; - } - - root.removeChild( form ); - - // release memory in IE - root = form = null; -})(); - -(function(){ - // Check to see if the browser returns only elements - // when doing getElementsByTagName("*") - - // Create a fake element - var div = document.createElement("div"); - div.appendChild( document.createComment("") ); - - // Make sure no comments are found - if ( div.getElementsByTagName("*").length > 0 ) { - Expr.find.TAG = function( match, context ) { - var results = context.getElementsByTagName( match[1] ); - - // Filter out possible comments - if ( match[1] === "*" ) { - var tmp = []; - - for ( var i = 0; results[i]; i++ ) { - if ( results[i].nodeType === 1 ) { - tmp.push( results[i] ); - } - } - - results = tmp; - } - - return results; - }; - } - - // Check to see if an attribute returns normalized href attributes - div.innerHTML = ""; - - if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && - div.firstChild.getAttribute("href") !== "#" ) { - - Expr.attrHandle.href = function( elem ) { - return elem.getAttribute( "href", 2 ); - }; - } - - // release memory in IE - div = null; -})(); - -if ( document.querySelectorAll ) { - (function(){ - var oldSizzle = Sizzle, - div = document.createElement("div"), - id = "__sizzle__"; - - div.innerHTML = "

    "; - - // Safari can't handle uppercase or unicode characters when - // in quirks mode. - if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { - return; - } - - Sizzle = function( query, context, extra, seed ) { - context = context || document; - - // Only use querySelectorAll on non-XML documents - // (ID selectors don't work in non-HTML documents) - if ( !seed && !Sizzle.isXML(context) ) { - // See if we find a selector to speed up - var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); - - if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { - // Speed-up: Sizzle("TAG") - if ( match[1] ) { - return makeArray( context.getElementsByTagName( query ), extra ); - - // Speed-up: Sizzle(".CLASS") - } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { - return makeArray( context.getElementsByClassName( match[2] ), extra ); - } - } - - if ( context.nodeType === 9 ) { - // Speed-up: Sizzle("body") - // The body element only exists once, optimize finding it - if ( query === "body" && context.body ) { - return makeArray( [ context.body ], extra ); - - // Speed-up: Sizzle("#ID") - } else if ( match && match[3] ) { - var elem = context.getElementById( match[3] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id === match[3] ) { - return makeArray( [ elem ], extra ); - } - - } else { - return makeArray( [], extra ); - } - } - - try { - return makeArray( context.querySelectorAll(query), extra ); - } catch(qsaError) {} - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - var oldContext = context, - old = context.getAttribute( "id" ), - nid = old || id, - hasParent = context.parentNode, - relativeHierarchySelector = /^\s*[+~]/.test( query ); - - if ( !old ) { - context.setAttribute( "id", nid ); - } else { - nid = nid.replace( /'/g, "\\$&" ); - } - if ( relativeHierarchySelector && hasParent ) { - context = context.parentNode; - } - - try { - if ( !relativeHierarchySelector || hasParent ) { - return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); - } - - } catch(pseudoError) { - } finally { - if ( !old ) { - oldContext.removeAttribute( "id" ); - } - } - } - } - - return oldSizzle(query, context, extra, seed); - }; - - for ( var prop in oldSizzle ) { - Sizzle[ prop ] = oldSizzle[ prop ]; - } - - // release memory in IE - div = null; - })(); -} - -(function(){ - var html = document.documentElement, - matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; - - if ( matches ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9 fails this) - var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), - pseudoWorks = false; - - try { - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( document.documentElement, "[test!='']:sizzle" ); - - } catch( pseudoError ) { - pseudoWorks = true; - } - - Sizzle.matchesSelector = function( node, expr ) { - // Make sure that attribute selectors are quoted - expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); - - if ( !Sizzle.isXML( node ) ) { - try { - if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { - var ret = matches.call( node, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || !disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9, so check for that - node.document && node.document.nodeType !== 11 ) { - return ret; - } - } - } catch(e) {} - } - - return Sizzle(expr, null, null, [node]).length > 0; - }; - } -})(); - -(function(){ - var div = document.createElement("div"); - - div.innerHTML = "
    "; - - // Opera can't find a second classname (in 9.6) - // Also, make sure that getElementsByClassName actually exists - if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { - return; - } - - // Safari caches class attributes, doesn't catch changes (in 3.2) - div.lastChild.className = "e"; - - if ( div.getElementsByClassName("e").length === 1 ) { - return; - } - - Expr.order.splice(1, 0, "CLASS"); - Expr.find.CLASS = function( match, context, isXML ) { - if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { - return context.getElementsByClassName(match[1]); - } - }; - - // release memory in IE - div = null; -})(); - -function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { - for ( var i = 0, l = checkSet.length; i < l; i++ ) { - var elem = checkSet[i]; - - if ( elem ) { - var match = false; - - elem = elem[dir]; - - while ( elem ) { - if ( elem.sizcache === doneName ) { - match = checkSet[elem.sizset]; - break; - } - - if ( elem.nodeType === 1 && !isXML ){ - elem.sizcache = doneName; - elem.sizset = i; - } - - if ( elem.nodeName.toLowerCase() === cur ) { - match = elem; - break; - } - - elem = elem[dir]; - } - - checkSet[i] = match; - } - } -} - -function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { - for ( var i = 0, l = checkSet.length; i < l; i++ ) { - var elem = checkSet[i]; - - if ( elem ) { - var match = false; - - elem = elem[dir]; - - while ( elem ) { - if ( elem.sizcache === doneName ) { - match = checkSet[elem.sizset]; - break; - } - - if ( elem.nodeType === 1 ) { - if ( !isXML ) { - elem.sizcache = doneName; - elem.sizset = i; - } - - if ( typeof cur !== "string" ) { - if ( elem === cur ) { - match = true; - break; - } - - } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { - match = elem; - break; - } - } - - elem = elem[dir]; - } - - checkSet[i] = match; - } - } -} - -if ( document.documentElement.contains ) { - Sizzle.contains = function( a, b ) { - return a !== b && (a.contains ? a.contains(b) : true); - }; - -} else if ( document.documentElement.compareDocumentPosition ) { - Sizzle.contains = function( a, b ) { - return !!(a.compareDocumentPosition(b) & 16); - }; - -} else { - Sizzle.contains = function() { - return false; - }; -} - -Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; - - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -var posProcess = function( selector, context ) { - var match, - tmpSet = [], - later = "", - root = context.nodeType ? [context] : context; - - // Position selectors must be done after the filter - // And so must :not(positional) so we move all PSEUDOs to the end - while ( (match = Expr.match.PSEUDO.exec( selector )) ) { - later += match[0]; - selector = selector.replace( Expr.match.PSEUDO, "" ); - } - - selector = Expr.relative[selector] ? selector + "*" : selector; - - for ( var i = 0, l = root.length; i < l; i++ ) { - Sizzle( selector, root[i], tmpSet ); - } - - return Sizzle.filter( later, tmpSet ); -}; - -// EXPOSE -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.filters; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})(); - - -var runtil = /Until$/, - rparentsprev = /^(?:parents|prevUntil|prevAll)/, - // Note: This RegExp should be improved, or likely pulled from Sizzle - rmultiselector = /,/, - isSimple = /^.[^:#\[\.,]*$/, - slice = Array.prototype.slice, - POS = jQuery.expr.match.POS, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var self = this, - i, l; - - if ( typeof selector !== "string" ) { - return jQuery( selector ).filter(function() { - for ( i = 0, l = self.length; i < l; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }); - } - - var ret = this.pushStack( "", "find", selector ), - length, n, r; - - for ( i = 0, l = this.length; i < l; i++ ) { - length = ret.length; - jQuery.find( selector, this[i], ret ); - - if ( i > 0 ) { - // Make sure that the results are unique - for ( n = length; n < ret.length; n++ ) { - for ( r = 0; r < length; r++ ) { - if ( ret[r] === ret[n] ) { - ret.splice(n--, 1); - break; - } - } - } - } - } - - return ret; - }, - - has: function( target ) { - var targets = jQuery( target ); - return this.filter(function() { - for ( var i = 0, l = targets.length; i < l; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false), "not", selector); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true), "filter", selector ); - }, - - is: function( selector ) { - return !!selector && ( typeof selector === "string" ? - jQuery.filter( selector, this ).length > 0 : - this.filter( selector ).length > 0 ); - }, - - closest: function( selectors, context ) { - var ret = [], i, l, cur = this[0]; - - // Array - if ( jQuery.isArray( selectors ) ) { - var match, selector, - matches = {}, - level = 1; - - if ( cur && selectors.length ) { - for ( i = 0, l = selectors.length; i < l; i++ ) { - selector = selectors[i]; - - if ( !matches[ selector ] ) { - matches[ selector ] = POS.test( selector ) ? - jQuery( selector, context || this.context ) : - selector; - } - } - - while ( cur && cur.ownerDocument && cur !== context ) { - for ( selector in matches ) { - match = matches[ selector ]; - - if ( match.jquery ? match.index( cur ) > -1 : jQuery( cur ).is( match ) ) { - ret.push({ selector: selector, elem: cur, level: level }); - } - } - - cur = cur.parentNode; - level++; - } - } - - return ret; - } - - // String - var pos = POS.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( i = 0, l = this.length; i < l; i++ ) { - cur = this[i]; - - while ( cur ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - - } else { - cur = cur.parentNode; - if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) { - break; - } - } - } - } - - ret = ret.length > 1 ? jQuery.unique( ret ) : ret; - - return this.pushStack( ret, "closest", selectors ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? - all : - jQuery.unique( all ) ); - }, - - andSelf: function() { - return this.add( this.prevObject ); - } -}); - -// A painfully simple check to see if an element is disconnected -// from a document (should be improved, where feasible). -function isDisconnected( node ) { - return !node || !node.parentNode || node.parentNode.nodeType === 11; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return jQuery.nth( elem, 2, "nextSibling" ); - }, - prev: function( elem ) { - return jQuery.nth( elem, 2, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( elem.parentNode.firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.makeArray( elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ), - // The variable 'args' was introduced in - // https://github.com/jquery/jquery/commit/52a0238 - // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed. - // http://code.google.com/p/v8/issues/detail?id=1050 - args = slice.call(arguments); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; - - if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret, name, args.join(",") ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - nth: function( cur, result, dir, elem ) { - result = result || 1; - var num = 0; - - for ( ; cur; cur = cur[dir] ) { - if ( cur.nodeType === 1 && ++num === result ) { - break; - } - } - - return cur; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - - // Can't pass null or undefined to indexOf in Firefox 4 - // Set to 0 to skip string check - qualifier = qualifier || 0; - - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem, i ) { - return (elem === qualifier) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem, i ) { - return (jQuery.inArray( elem, qualifier ) >= 0) === keep; - }); -} - - - - -var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, - rtagName = /<([\w:]+)/, - rtbody = /
    ", "
    " ], - tr: [ 2, "", "
    " ], - td: [ 3, "", "
    " ], - col: [ 2, "", "
    " ], - area: [ 1, "", "" ], - _default: [ 0, "", "" ] - }; - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// IE can't serialize and - - - */ - -(function() { - this.loggly = function(opts) { - this.user_agent = get_agent(); - this.browser_size = get_size(); - log_methods = {'error': 5, 'warn': 4, 'info': 3, 'debug': 2, 'log': 1}; - if (!opts.url) throw new Error("Please include a Loggly HTTP URL."); - if (!opts.level) { - this.level = log_methods['info']; - } else { - this.level = log_methods[opts.level]; - } - this.log = function(data) { - if (log_methods['log'] == this.level) { - opts.data = data; - janky(opts); - } - }; - this.debug = function(data) { - if (log_methods['debug'] >= this.level) { - opts.data = data; - janky(opts); - } - }; - this.info = function(data) { - if (log_methods['info'] >= this.level) { - opts.data = data; - janky(opts); - } - }; - this.warn = function(data) { - if (log_methods['warn'] >= this.level) { - opts.data = data; - janky(opts); - } - }; - this.error = function(data) { - if (log_methods['error'] >= this.level) { - opts.data = data; - janky(opts); - } - }; - }; - this.janky = function(opts) { - janky._form(function(iframe, form) { - form.setAttribute("action", opts.url); - form.setAttribute("method", "post"); - janky._input(iframe, form, opts.data); - form.submit(); - setTimeout(function(){ - document.body.removeChild(iframe); - }, 2000); - }); - }; - this.janky._form = function(cb) { - var iframe = document.createElement("iframe"); - document.body.appendChild(iframe); - iframe.style.display = "none"; - setTimeout(function() { - var form = iframe.contentWindow.document.createElement("form"); - iframe.contentWindow.document.body.appendChild(form); - cb(iframe, form); - }, 0); - }; - this.janky._input = function(iframe, form, data) { - var inp = iframe.contentWindow.document.createElement("input"); - inp.setAttribute("type", "hidden"); - inp.setAttribute("name", "source"); - inp.value = "castor " + data; - form.appendChild(inp); - }; - this.get_agent = function () { - return navigator.appCodeName + navigator.appName + navigator.appVersion; - }; - this.get_size = function () { - var width = 0; var height = 0; - if( typeof( window.innerWidth ) == 'number' ) { - width = window.innerWidth; height = window.innerHeight; - } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { - width = document.documentElement.clientWidth; height = document.documentElement.clientHeight; - } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { - width = document.body.clientWidth; height = document.body.clientHeight; - } - return {'height': height, 'width': width}; - }; -})(); - - -jsworld={};jsworld.formatIsoDateTime=function(a,b){if(typeof a==="undefined")a=new Date;if(typeof b==="undefined")b=false;var c=jsworld.formatIsoDate(a)+" "+jsworld.formatIsoTime(a);if(b){var d=a.getHours()-a.getUTCHours();var e=Math.abs(d);var f=a.getUTCMinutes();var g=a.getMinutes();if(g!=f&&f<30&&d<0)e--;if(g!=f&&f>30&&d>0)e--;var h;if(g!=f)h=":30";else h=":00";var i;if(e<10)i="0"+e+h;else i=""+e+h;if(d<0)i="-"+i;else i="+"+i;c=c+i}return c};jsworld.formatIsoDate=function(a){if(typeof a==="undefined")a=new Date;var b=a.getFullYear();var c=a.getMonth()+1;var d=a.getDate();return b+"-"+jsworld._zeroPad(c,2)+"-"+jsworld._zeroPad(d,2)};jsworld.formatIsoTime=function(a){if(typeof a==="undefined")a=new Date;var b=a.getHours();var c=a.getMinutes();var d=a.getSeconds();return jsworld._zeroPad(b,2)+":"+jsworld._zeroPad(c,2)+":"+jsworld._zeroPad(d,2)};jsworld.parseIsoDateTime=function(a){if(typeof a!="string")throw"Error: The parameter must be a string";var b=a.match(/^(\d\d\d\d)-(\d\d)-(\d\d)[T ](\d\d):(\d\d):(\d\d)/);if(b===null)b=a.match(/^(\d\d\d\d)(\d\d)(\d\d)[T ](\d\d)(\d\d)(\d\d)/);if(b===null)b=a.match(/^(\d\d\d\d)-(\d\d)-(\d\d)[T ](\d\d)(\d\d)(\d\d)/);if(b===null)b=a.match(/^(\d\d\d\d)-(\d\d)-(\d\d)[T ](\d\d):(\d\d):(\d\d)/);if(b===null)throw"Error: Invalid ISO-8601 date/time string";var c=parseInt(b[1],10);var d=parseInt(b[2],10);var e=parseInt(b[3],10);var f=parseInt(b[4],10);var g=parseInt(b[5],10);var h=parseInt(b[6],10);if(d<1||d>12||e<1||e>31||f<0||f>23||g<0||g>59||h<0||h>59)throw"Error: Invalid ISO-8601 date/time value";var i=new Date(c,d-1,e,f,g,h);if(i.getDate()!=e||i.getMonth()+1!=d)throw"Error: Invalid date";return i};jsworld.parseIsoDate=function(a){if(typeof a!="string")throw"Error: The parameter must be a string";var b=a.match(/^(\d\d\d\d)-(\d\d)-(\d\d)/);if(b===null)b=a.match(/^(\d\d\d\d)(\d\d)(\d\d)/);if(b===null)throw"Error: Invalid ISO-8601 date string";var c=parseInt(b[1],10);var d=parseInt(b[2],10);var e=parseInt(b[3],10);if(d<1||d>12||e<1||e>31)throw"Error: Invalid ISO-8601 date value";var f=new Date(c,d-1,e);if(f.getDate()!=e||f.getMonth()+1!=d)throw"Error: Invalid date";return f};jsworld.parseIsoTime=function(a){if(typeof a!="string")throw"Error: The parameter must be a string";var b=a.match(/^(\d\d):(\d\d):(\d\d)/);if(b===null)b=a.match(/^(\d\d)(\d\d)(\d\d)/);if(b===null)throw"Error: Invalid ISO-8601 date/time string";var c=parseInt(b[1],10);var d=parseInt(b[2],10);var e=parseInt(b[3],10);if(c<0||c>23||d<0||d>59||e<0||e>59)throw"Error: Invalid ISO-8601 time value";return new Date(0,0,0,c,d,e)};jsworld._trim=function(a){var b=" \n\r\t\f \u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000";for(var c=0;c=0;c--){if(b.indexOf(a.charAt(c))===-1){a=a.substring(0,c+1);break}}return b.indexOf(a.charAt(0))===-1?a:""};jsworld._isNumber=function(a){if(typeof a=="number")return true;if(typeof a!="string")return false;var b=a+"";return/^-?(\d+|\d*\.\d+)$/.test(b)};jsworld._isInteger=function(a){if(typeof a!="number"&&typeof a!="string")return false;var b=a+"";return/^-?\d+$/.test(b)};jsworld._isFloat=function(a){if(typeof a!="number"&&typeof a!="string")return false;var b=a+"";return/^-?\.\d+?$/.test(b)};jsworld._hasOption=function(a,b){if(typeof a!="string"||typeof b!="string")return false;if(b.indexOf(a)!=-1)return true;else return false};jsworld._stringReplaceAll=function(a,b,c){var d;if(b.length==1&&c.length==1){d="";for(var e=0;e0){if(d.length>0)g=parseInt(d.shift(),10);if(isNaN(g))throw"Error: Invalid grouping";if(g==-1){e=a.substring(0,f)+e;break}f-=g;if(f<1){e=a.substring(0,f+g)+e;break}e=c+a.substring(f,f+g)+e}return e};jsworld._formatFractionPart=function(a,b){for(var c=0;a.length0)return a;else throw"Empty or no string"};if(a==null||typeof a!="object")throw"Error: Invalid/missing locale properties";if(typeof a.decimal_point!="string")throw"Error: Invalid/missing decimal_point property";this.decimal_point=a.decimal_point;if(typeof a.thousands_sep!="string")throw"Error: Invalid/missing thousands_sep property";this.thousands_sep=a.thousands_sep;if(typeof a.grouping!="string")throw"Error: Invalid/missing grouping property";this.grouping=a.grouping;if(typeof a.int_curr_symbol!="string")throw"Error: Invalid/missing int_curr_symbol property";if(!/[A-Za-z]{3}.?/.test(a.int_curr_symbol))throw"Error: Invalid int_curr_symbol property";this.int_curr_symbol=a.int_curr_symbol;if(typeof a.currency_symbol!="string")throw"Error: Invalid/missing currency_symbol property";this.currency_symbol=a.currency_symbol;if(typeof a.frac_digits!="number"&&a.frac_digits<0)throw"Error: Invalid/missing frac_digits property";this.frac_digits=a.frac_digits;if(a.mon_decimal_point===null||a.mon_decimal_point==""){if(this.frac_digits>0)throw"Error: Undefined mon_decimal_point property";else a.mon_decimal_point=""}if(typeof a.mon_decimal_point!="string")throw"Error: Invalid/missing mon_decimal_point property";this.mon_decimal_point=a.mon_decimal_point;if(typeof a.mon_thousands_sep!="string")throw"Error: Invalid/missing mon_thousands_sep property";this.mon_thousands_sep=a.mon_thousands_sep;if(typeof a.mon_grouping!="string")throw"Error: Invalid/missing mon_grouping property";this.mon_grouping=a.mon_grouping;if(typeof a.positive_sign!="string")throw"Error: Invalid/missing positive_sign property";this.positive_sign=a.positive_sign;if(typeof a.negative_sign!="string")throw"Error: Invalid/missing negative_sign property";this.negative_sign=a.negative_sign;if(a.p_cs_precedes!==0&&a.p_cs_precedes!==1)throw"Error: Invalid/missing p_cs_precedes property, must be 0 or 1";this.p_cs_precedes=a.p_cs_precedes;if(a.n_cs_precedes!==0&&a.n_cs_precedes!==1)throw"Error: Invalid/missing n_cs_precedes, must be 0 or 1";this.n_cs_precedes=a.n_cs_precedes;if(a.p_sep_by_space!==0&&a.p_sep_by_space!==1&&a.p_sep_by_space!==2)throw"Error: Invalid/missing p_sep_by_space property, must be 0, 1 or 2";this.p_sep_by_space=a.p_sep_by_space;if(a.n_sep_by_space!==0&&a.n_sep_by_space!==1&&a.n_sep_by_space!==2)throw"Error: Invalid/missing n_sep_by_space property, must be 0, 1, or 2";this.n_sep_by_space=a.n_sep_by_space;if(a.p_sign_posn!==0&&a.p_sign_posn!==1&&a.p_sign_posn!==2&&a.p_sign_posn!==3&&a.p_sign_posn!==4)throw"Error: Invalid/missing p_sign_posn property, must be 0, 1, 2, 3 or 4";this.p_sign_posn=a.p_sign_posn;if(a.n_sign_posn!==0&&a.n_sign_posn!==1&&a.n_sign_posn!==2&&a.n_sign_posn!==3&&a.n_sign_posn!==4)throw"Error: Invalid/missing n_sign_posn property, must be 0, 1, 2, 3 or 4";this.n_sign_posn=a.n_sign_posn;if(typeof a.int_frac_digits!="number"&&a.int_frac_digits<0)throw"Error: Invalid/missing int_frac_digits property";this.int_frac_digits=a.int_frac_digits;if(a.int_p_cs_precedes!==0&&a.int_p_cs_precedes!==1)throw"Error: Invalid/missing int_p_cs_precedes property, must be 0 or 1";this.int_p_cs_precedes=a.int_p_cs_precedes;if(a.int_n_cs_precedes!==0&&a.int_n_cs_precedes!==1)throw"Error: Invalid/missing int_n_cs_precedes property, must be 0 or 1";this.int_n_cs_precedes=a.int_n_cs_precedes;if(a.int_p_sep_by_space!==0&&a.int_p_sep_by_space!==1&&a.int_p_sep_by_space!==2)throw"Error: Invalid/missing int_p_sep_by_spacev, must be 0, 1 or 2";this.int_p_sep_by_space=a.int_p_sep_by_space;if(a.int_n_sep_by_space!==0&&a.int_n_sep_by_space!==1&&a.int_n_sep_by_space!==2)throw"Error: Invalid/missing int_n_sep_by_space property, must be 0, 1, or 2";this.int_n_sep_by_space=a.int_n_sep_by_space;if(a.int_p_sign_posn!==0&&a.int_p_sign_posn!==1&&a.int_p_sign_posn!==2&&a.int_p_sign_posn!==3&&a.int_p_sign_posn!==4)throw"Error: Invalid/missing int_p_sign_posn property, must be 0, 1, 2, 3 or 4";this.int_p_sign_posn=a.int_p_sign_posn;if(a.int_n_sign_posn!==0&&a.int_n_sign_posn!==1&&a.int_n_sign_posn!==2&&a.int_n_sign_posn!==3&&a.int_n_sign_posn!==4)throw"Error: Invalid/missing int_n_sign_posn property, must be 0, 1, 2, 3 or 4";this.int_n_sign_posn=a.int_n_sign_posn;if(a==null||typeof a!="object")throw"Error: Invalid/missing time locale properties";try{this.abday=this._parseList(a.abday,7)}catch(b){throw"Error: Invalid abday property: "+b}try{this.day=this._parseList(a.day,7)}catch(b){throw"Error: Invalid day property: "+b}try{this.abmon=this._parseList(a.abmon,12)}catch(b){throw"Error: Invalid abmon property: "+b}try{this.mon=this._parseList(a.mon,12)}catch(b){throw"Error: Invalid mon property: "+b}try{this.d_fmt=this._validateFormatString(a.d_fmt)}catch(b){throw"Error: Invalid d_fmt property: "+b}try{this.t_fmt=this._validateFormatString(a.t_fmt)}catch(b){throw"Error: Invalid t_fmt property: "+b}try{this.d_t_fmt=this._validateFormatString(a.d_t_fmt)}catch(b){throw"Error: Invalid d_t_fmt property: "+b}try{var c=this._parseList(a.am_pm,2);this.am=c[0];this.pm=c[1]}catch(b){this.am="";this.pm=""}this.getAbbreviatedWeekdayName=function(a){if(typeof a=="undefined"||a===null)return this.abday;if(!jsworld._isInteger(a)||a<0||a>6)throw"Error: Invalid weekday argument, must be an integer [0..6]";return this.abday[a]};this.getWeekdayName=function(a){if(typeof a=="undefined"||a===null)return this.day;if(!jsworld._isInteger(a)||a<0||a>6)throw"Error: Invalid weekday argument, must be an integer [0..6]";return this.day[a]};this.getAbbreviatedMonthName=function(a){if(typeof a=="undefined"||a===null)return this.abmon;if(!jsworld._isInteger(a)||a<0||a>11)throw"Error: Invalid month argument, must be an integer [0..11]";return this.abmon[a]};this.getMonthName=function(a){if(typeof a=="undefined"||a===null)return this.mon;if(!jsworld._isInteger(a)||a<0||a>11)throw"Error: Invalid month argument, must be an integer [0..11]";return this.mon[a]};this.getDecimalPoint=function(){return this.decimal_point};this.getCurrencySymbol=function(){return this.currency_symbol};this.getIntCurrencySymbol=function(){return this.int_curr_symbol.substring(0,3)};this.currencySymbolPrecedes=function(){if(this.p_cs_precedes==1)return true;else return false};this.intCurrencySymbolPrecedes=function(){if(this.int_p_cs_precedes==1)return true;else return false};this.getMonetaryDecimalPoint=function(){return this.mon_decimal_point};this.getFractionalDigits=function(){return this.frac_digits};this.getIntFractionalDigits=function(){return this.int_frac_digits}};jsworld.NumericFormatter=function(a){if(typeof a!="object"||a._className!="jsworld.Locale")throw"Constructor error: You must provide a valid jsworld.Locale instance";this.lc=a;this.format=function(a,b){if(typeof a=="string")a=jsworld._trim(a);if(!jsworld._isNumber(a))throw"Error: The input is not a number";var c=parseFloat(a,10);var d=jsworld._getPrecision(b);if(d!=-1)c=Math.round(c*Math.pow(10,d))/Math.pow(10,d);var e=jsworld._splitNumber(String(c));var f;if(c===0)f="0";else f=jsworld._hasOption("^",b)?e.integer:jsworld._formatIntegerPart(e.integer,this.lc.grouping,this.lc.thousands_sep);var g=d!=-1?jsworld._formatFractionPart(e.fraction,d):e.fraction;var h=g.length?f+this.lc.decimal_point+g:f;if(jsworld._hasOption("~",b)||c===0){return h}else{if(jsworld._hasOption("+",b)||c<0){if(c>0)return"+"+h;else if(c<0)return"-"+h;else return h}else{return h}}}};jsworld.DateTimeFormatter=function(a){if(typeof a!="object"||a._className!="jsworld.Locale")throw"Constructor error: You must provide a valid jsworld.Locale instance.";this.lc=a;this.formatDate=function(a){var b=null;if(typeof a=="string"){try{b=jsworld.parseIsoDate(a)}catch(c){b=jsworld.parseIsoDateTime(a)}}else if(a!==null&&typeof a=="object"){b=a}else{throw"Error: Invalid date argument, must be a Date object or an ISO-8601 date/time string"}return this._applyFormatting(b,this.lc.d_fmt)};this.formatTime=function(a){var b=null;if(typeof a=="string"){try{b=jsworld.parseIsoTime(a)}catch(c){b=jsworld.parseIsoDateTime(a)}}else if(a!==null&&typeof a=="object"){b=a}else{throw"Error: Invalid date argument, must be a Date object or an ISO-8601 date/time string"}return this._applyFormatting(b,this.lc.t_fmt)};this.formatDateTime=function(a){var b=null;if(typeof a=="string"){b=jsworld.parseIsoDateTime(a)}else if(a!==null&&typeof a=="object"){b=a}else{throw"Error: Invalid date argument, must be a Date object or an ISO-8601 date/time string"}return this._applyFormatting(b,this.lc.d_t_fmt)};this._applyFormatting=function(a,b){b=b.replace(/%%/g,"%");b=b.replace(/%a/g,this.lc.abday[a.getDay()]);b=b.replace(/%A/g,this.lc.day[a.getDay()]);b=b.replace(/%b/g,this.lc.abmon[a.getMonth()]);b=b.replace(/%B/g,this.lc.mon[a.getMonth()]);b=b.replace(/%d/g,jsworld._zeroPad(a.getDate(),2));b=b.replace(/%e/g,jsworld._spacePad(a.getDate(),2));b=b.replace(/%F/g,a.getFullYear()+"-"+jsworld._zeroPad(a.getMonth()+1,2)+"-"+jsworld._zeroPad(a.getDate(),2));b=b.replace(/%h/g,this.lc.abmon[a.getMonth()]);b=b.replace(/%H/g,jsworld._zeroPad(a.getHours(),2));b=b.replace(/%I/g,jsworld._zeroPad(this._hours12(a.getHours()),2));b=b.replace(/%k/g,a.getHours());b=b.replace(/%l/g,this._hours12(a.getHours()));b=b.replace(/%m/g,jsworld._zeroPad(a.getMonth()+1,2));b=b.replace(/%n/g,"\n");b=b.replace(/%M/g,jsworld._zeroPad(a.getMinutes(),2));b=b.replace(/%p/g,this._getAmPm(a.getHours()));b=b.replace(/%P/g,this._getAmPm(a.getHours()).toLocaleLowerCase());b=b.replace(/%R/g,jsworld._zeroPad(a.getHours(),2)+":"+jsworld._zeroPad(a.getMinutes(),2));b=b.replace(/%S/g,jsworld._zeroPad(a.getSeconds(),2));b=b.replace(/%T/g,jsworld._zeroPad(a.getHours(),2)+":"+jsworld._zeroPad(a.getMinutes(),2)+":"+jsworld._zeroPad(a.getSeconds(),2));b=b.replace(/%w/g,this.lc.day[a.getDay()]);b=b.replace(/%y/g,(new String(a.getFullYear())).substring(2));b=b.replace(/%Y/g,a.getFullYear());b=b.replace(/%Z/g,"");b=b.replace(/%[a-zA-Z]/g,"");return b};this._hours12=function(a){if(a===0)return 12;else if(a>12)return a-12;else return a};this._getAmPm=function(a){if(a===0||a>12)return this.lc.pm;else return this.lc.am}};jsworld.MonetaryFormatter=function(a,b,c){if(typeof a!="object"||a._className!="jsworld.Locale")throw"Constructor error: You must provide a valid jsworld.Locale instance";this.lc=a;this.currencyFractionDigits={AFN:0,ALL:0,AMD:0,BHD:3,BIF:0,BYR:0,CLF:0,CLP:0,COP:0,CRC:0,DJF:0,GNF:0,GYD:0,HUF:0,IDR:0,IQD:0,IRR:0,ISK:0,JOD:3,JPY:0,KMF:0,KRW:0,KWD:3,LAK:0,LBP:0,LYD:3,MGA:0,MMK:0,MNT:0,MRO:0,MUR:0,OMR:3,PKR:0,PYG:0,RSD:0,RWF:0,SLL:0,SOS:0,STD:0,SYP:0,TND:3,TWD:0,TZS:0,UGX:0,UZS:0,VND:0,VUV:0,XAF:0,XOF:0,XPF:0,YER:0,ZMK:0};if(typeof b=="string"){this.currencyCode=b.toUpperCase();var d=this.currencyFractionDigits[this.currencyCode];if(typeof d!="number")d=2;this.lc.frac_digits=d;this.lc.int_frac_digits=d}else{this.currencyCode=this.lc.int_curr_symbol.substring(0,3).toUpperCase()}this.intSep=this.lc.int_curr_symbol.charAt(3);if(this.currencyCode==this.lc.int_curr_symbol.substring(0,3)){this.internationalFormatting=false;this.curSym=this.lc.currency_symbol}else{if(typeof c=="string"){this.curSym=c;this.internationalFormatting=false}else{this.internationalFormatting=true}}this.getCurrencySymbol=function(){return this.curSym};this.currencySymbolPrecedes=function(a){if(typeof a=="string"&&a=="i"){if(this.lc.int_p_cs_precedes==1)return true;else return false}else{if(this.internationalFormatting){if(this.lc.int_p_cs_precedes==1)return true;else return false}else{if(this.lc.p_cs_precedes==1)return true;else return false}}};this.getDecimalPoint=function(){return this.lc.mon_decimal_point};this.getFractionalDigits=function(a){if(typeof a=="string"&&a=="i"){return this.lc.int_frac_digits}else{if(this.internationalFormatting)return this.lc.int_frac_digits;else return this.lc.frac_digits}};this.format=function(a,b){var c;if(typeof a=="string"){a=jsworld._trim(a);c=parseFloat(a);if(typeof c!="number"||isNaN(c))throw"Error: Amount string not a number"}else if(typeof a=="number"){c=a}else{throw"Error: Amount not a number"}var d=jsworld._getPrecision(b);if(d==-1){if(this.internationalFormatting||jsworld._hasOption("i",b))d=this.lc.int_frac_digits;else d=this.lc.frac_digits}c=Math.round(c*Math.pow(10,d))/Math.pow(10,d);var e=jsworld._splitNumber(String(c));var f;if(c===0)f="0";else f=jsworld._hasOption("^",b)?e.integer:jsworld._formatIntegerPart(e.integer,this.lc.mon_grouping,this.lc.mon_thousands_sep);var g;if(d==-1){if(this.internationalFormatting||jsworld._hasOption("i",b))g=jsworld._formatFractionPart(e.fraction,this.lc.int_frac_digits);else g=jsworld._formatFractionPart(e.fraction,this.lc.frac_digits)}else{g=jsworld._formatFractionPart(e.fraction,d)}var h;if(this.lc.frac_digits>0||g.length)h=f+this.lc.mon_decimal_point+g;else h=f;if(jsworld._hasOption("~",b)){return h}else{var i=jsworld._hasOption("!",b)?true:false;var j=c<0?"-":"+";if(this.internationalFormatting||jsworld._hasOption("i",b)){if(i)return this._formatAsInternationalCurrencyWithNoSym(j,h);else return this._formatAsInternationalCurrency(j,h)}else{if(i)return this._formatAsLocalCurrencyWithNoSym(j,h);else return this._formatAsLocalCurrency(j,h)}}};this._formatAsLocalCurrency=function(a,b){if(a=="+"){if(this.lc.p_sign_posn===0&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===0){return"("+b+this.curSym+")"}else if(this.lc.p_sign_posn===0&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===1){return"("+this.curSym+b+")"}else if(this.lc.p_sign_posn===0&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===0){return"("+b+" "+this.curSym+")"}else if(this.lc.p_sign_posn===0&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===1){return"("+this.curSym+" "+b+")"}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===0){return this.lc.positive_sign+b+this.curSym}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+this.curSym+b}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===0){return this.lc.positive_sign+b+" "+this.curSym}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+this.curSym+" "+b}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===0){return this.lc.positive_sign+" "+b+this.curSym}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+" "+this.curSym+b}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===0){return b+this.curSym+this.lc.positive_sign}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===1){return this.curSym+b+this.lc.positive_sign}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===0){return b+" "+this.curSym+this.lc.positive_sign}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===1){return this.curSym+" "+b+this.lc.positive_sign}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===0){return b+this.curSym+" "+this.lc.positive_sign}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===1){return this.curSym+b+" "+this.lc.positive_sign}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===0){return b+this.lc.positive_sign+this.curSym}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+this.curSym+b}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===0){return b+" "+this.lc.positive_sign+this.curSym}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+this.curSym+" "+b}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===0){return b+this.lc.positive_sign+" "+this.curSym}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+" "+this.curSym+b}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===0){return b+this.curSym+this.lc.positive_sign}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===1){return this.curSym+this.lc.positive_sign+b}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===0){return b+" "+this.curSym+this.lc.positive_sign}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===1){return this.curSym+this.lc.positive_sign+" "+b}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===0){return b+this.curSym+" "+this.lc.positive_sign}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===1){return this.curSym+" "+this.lc.positive_sign+b}}else if(a=="-"){if(this.lc.n_sign_posn===0&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===0){return"("+b+this.curSym+")"}else if(this.lc.n_sign_posn===0&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===1){return"("+this.curSym+b+")"}else if(this.lc.n_sign_posn===0&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===0){return"("+b+" "+this.curSym+")"}else if(this.lc.n_sign_posn===0&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===1){return"("+this.curSym+" "+b+")"}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===0){return this.lc.negative_sign+b+this.curSym}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+this.curSym+b}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===0){return this.lc.negative_sign+b+" "+this.curSym}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+this.curSym+" "+b}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===0){return this.lc.negative_sign+" "+b+this.curSym}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+" "+this.curSym+b}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===0){return b+this.curSym+this.lc.negative_sign}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===1){return this.curSym+b+this.lc.negative_sign}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===0){return b+" "+this.curSym+this.lc.negative_sign}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===1){return this.curSym+" "+b+this.lc.negative_sign}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===0){return b+this.curSym+" "+this.lc.negative_sign}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===1){return this.curSym+b+" "+this.lc.negative_sign}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===0){return b+this.lc.negative_sign+this.curSym}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+this.curSym+b}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===0){return b+" "+this.lc.negative_sign+this.curSym}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+this.curSym+" "+b}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===0){return b+this.lc.negative_sign+" "+this.curSym}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+" "+this.curSym+b}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===0){return b+this.curSym+this.lc.negative_sign}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===1){return this.curSym+this.lc.negative_sign+b}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===0){return b+" "+this.curSym+this.lc.negative_sign}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===1){return this.curSym+this.lc.negative_sign+" "+b}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===0){return b+this.curSym+" "+this.lc.negative_sign}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===1){return this.curSym+" "+this.lc.negative_sign+b}}throw"Error: Invalid POSIX LC MONETARY definition"};this._formatAsInternationalCurrency=function(a,b){if(a=="+"){if(this.lc.int_p_sign_posn===0&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===0){return"("+b+this.currencyCode+")"}else if(this.lc.int_p_sign_posn===0&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===1){return"("+this.currencyCode+b+")"}else if(this.lc.int_p_sign_posn===0&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===0){return"("+b+this.intSep+this.currencyCode+")"}else if(this.lc.int_p_sign_posn===0&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===1){return"("+this.currencyCode+this.intSep+b+")"}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===0){return this.lc.positive_sign+b+this.currencyCode}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.currencyCode+b}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===0){return this.lc.positive_sign+b+this.intSep+this.currencyCode}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.currencyCode+this.intSep+b}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===0){return this.lc.positive_sign+this.intSep+b+this.currencyCode}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.intSep+this.currencyCode+b}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===0){return b+this.currencyCode+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===1){return this.currencyCode+b+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===0){return b+this.intSep+this.currencyCode+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===1){return this.currencyCode+this.intSep+b+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===0){return b+this.currencyCode+this.intSep+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===1){return this.currencyCode+b+this.intSep+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===0){return b+this.lc.positive_sign+this.currencyCode}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.currencyCode+b}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===0){return b+this.intSep+this.lc.positive_sign+this.currencyCode}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.currencyCode+this.intSep+b}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===0){return b+this.lc.positive_sign+this.intSep+this.currencyCode}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.intSep+this.currencyCode+b}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===0){return b+this.currencyCode+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===1){return this.currencyCode+this.lc.positive_sign+b}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===0){return b+this.intSep+this.currencyCode+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===1){return this.currencyCode+this.lc.positive_sign+this.intSep+b}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===0){return b+this.currencyCode+this.intSep+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===1){return this.currencyCode+this.intSep+this.lc.positive_sign+b}}else if(a=="-"){if(this.lc.int_n_sign_posn===0&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===0){return"("+b+this.currencyCode+")"}else if(this.lc.int_n_sign_posn===0&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===1){return"("+this.currencyCode+b+")"}else if(this.lc.int_n_sign_posn===0&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===0){return"("+b+this.intSep+this.currencyCode+")"}else if(this.lc.int_n_sign_posn===0&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===1){return"("+this.currencyCode+this.intSep+b+")"}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===0){return this.lc.negative_sign+b+this.currencyCode}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.currencyCode+b}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===0){return this.lc.negative_sign+b+this.intSep+this.currencyCode}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.currencyCode+this.intSep+b}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===0){return this.lc.negative_sign+this.intSep+b+this.currencyCode}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.intSep+this.currencyCode+b}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===0){return b+this.currencyCode+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===1){return this.currencyCode+b+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===0){return b+this.intSep+this.currencyCode+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===1){return this.currencyCode+this.intSep+b+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===0){return b+this.currencyCode+this.intSep+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===1){return this.currencyCode+b+this.intSep+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===0){return b+this.lc.negative_sign+this.currencyCode}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.currencyCode+b}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===0){return b+this.intSep+this.lc.negative_sign+this.currencyCode}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.currencyCode+this.intSep+b}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===0){return b+this.lc.negative_sign+this.intSep+this.currencyCode}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.intSep+this.currencyCode+b}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===0){return b+this.currencyCode+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===1){return this.currencyCode+this.lc.negative_sign+b}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===0){return b+this.intSep+this.currencyCode+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===1){return this.currencyCode+this.lc.negative_sign+this.intSep+b}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===0){return b+this.currencyCode+this.intSep+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===1){return this.currencyCode+this.intSep+this.lc.negative_sign+b}}throw"Error: Invalid POSIX LC MONETARY definition"};this._formatAsLocalCurrencyWithNoSym=function(a,b){if(a=="+"){if(this.lc.p_sign_posn===0){return"("+b+")"}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===0){return this.lc.positive_sign+b}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+b}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===0){return this.lc.positive_sign+b}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+b}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===0){return this.lc.positive_sign+" "+b}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+" "+b}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===0){return b+this.lc.positive_sign}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===1){return b+this.lc.positive_sign}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===0){return b+" "+this.lc.positive_sign}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===1){return b+this.lc.positive_sign}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===0){return b+this.lc.positive_sign}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===1){return b+" "+this.lc.positive_sign}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===0){return b+this.lc.positive_sign}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+b}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===0){return b+" "+this.lc.positive_sign}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+" "+b}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===0){return b+this.lc.positive_sign}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+" "+b}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===0){return b+this.lc.positive_sign}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+b}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===0){return b+" "+this.lc.positive_sign}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+" "+b}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===0){return b+" "+this.lc.positive_sign}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+b}}else if(a=="-"){if(this.lc.n_sign_posn===0){return"("+b+")"}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===0){return this.lc.negative_sign+b}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+b}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===0){return this.lc.negative_sign+b}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+" "+b}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===0){return this.lc.negative_sign+" "+b}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+" "+b}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===0){return b+this.lc.negative_sign}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===1){return b+this.lc.negative_sign}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===0){return b+" "+this.lc.negative_sign}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===1){return b+this.lc.negative_sign}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===0){return b+" "+this.lc.negative_sign}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===1){return b+" "+this.lc.negative_sign}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===0){return b+this.lc.negative_sign}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+b}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===0){return b+" "+this.lc.negative_sign}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+" "+b}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===0){return b+this.lc.negative_sign}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+" "+b}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===0){return b+this.lc.negative_sign}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+b}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===0){return b+" "+this.lc.negative_sign}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+" "+b}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===0){return b+" "+this.lc.negative_sign}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+b}}throw"Error: Invalid POSIX LC MONETARY definition"};this._formatAsInternationalCurrencyWithNoSym=function(a,b){if(a=="+"){if(this.lc.int_p_sign_posn===0){return"("+b+")"}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===0){return this.lc.positive_sign+b}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+b}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===0){return this.lc.positive_sign+b}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.intSep+b}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===0){return this.lc.positive_sign+this.intSep+b}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.intSep+b}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===0){return b+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===1){return b+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===0){return b+this.intSep+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===1){return b+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===0){return b+this.intSep+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===1){return b+this.intSep+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===0){return b+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+b}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===0){return b+this.intSep+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.intSep+b}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===0){return b+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.intSep+b}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===0){return b+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+b}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===0){return b+this.intSep+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.intSep+b}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===0){return b+this.intSep+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+b}}else if(a=="-"){if(this.lc.int_n_sign_posn===0){return"("+b+")"}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===0){return this.lc.negative_sign+b}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+b}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===0){return this.lc.negative_sign+b}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.intSep+b}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===0){return this.lc.negative_sign+this.intSep+b}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.intSep+b}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===0){return b+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===1){return b+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===0){return b+this.intSep+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===1){return b+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===0){return b+this.intSep+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===1){return b+this.intSep+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===0){return b+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+b}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===0){return b+this.intSep+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.intSep+b}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===0){return b+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.intSep+b}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===0){return b+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+b}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===0){return b+this.intSep+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.intSep+b}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===0){return b+this.intSep+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+b}}throw"Error: Invalid POSIX LC_MONETARY definition"}};jsworld.NumericParser=function(a){if(typeof a!="object"||a._className!="jsworld.Locale")throw"Constructor error: You must provide a valid jsworld.Locale instance";this.lc=a;this.parse=function(a){if(typeof a!="string")throw"Parse error: Argument must be a string";var b=jsworld._trim(a);b=jsworld._stringReplaceAll(a,this.lc.thousands_sep,"");b=jsworld._stringReplaceAll(b,this.lc.decimal_point,".");if(jsworld._isNumber(b))return parseFloat(b,10);else throw"Parse error: Invalid number string"}};jsworld.DateTimeParser=function(a){if(typeof a!="object"||a._className!="jsworld.Locale")throw"Constructor error: You must provide a valid jsworld.Locale instance.";this.lc=a;this.parseTime=function(a){if(typeof a!="string")throw"Parse error: Argument must be a string";var b=this._extractTokens(this.lc.t_fmt,a);var c=false;if(b.hour!==null&&b.minute!==null&&b.second!==null){c=true}else if(b.hourAmPm!==null&&b.am!==null&&b.minute!==null&&b.second!==null){if(b.am){b.hour=parseInt(b.hourAmPm,10)}else{if(b.hourAmPm==12)b.hour=0;else b.hour=parseInt(b.hourAmPm,10)+12}c=true}if(c)return jsworld._zeroPad(b.hour,2)+":"+jsworld._zeroPad(b.minute,2)+":"+jsworld._zeroPad(b.second,2);else throw"Parse error: Invalid/ambiguous time string"};this.parseDate=function(a){if(typeof a!="string")throw"Parse error: Argument must be a string";var b=this._extractTokens(this.lc.d_fmt,a);var c=false;if(b.year!==null&&b.month!==null&&b.day!==null){c=true}if(c)return jsworld._zeroPad(b.year,4)+"-"+jsworld._zeroPad(b.month,2)+"-"+jsworld._zeroPad(b.day,2);else throw"Parse error: Invalid date string"};this.parseDateTime=function(a){if(typeof a!="string")throw"Parse error: Argument must be a string";var b=this._extractTokens(this.lc.d_t_fmt,a);var c=false;var d=false;if(b.hour!==null&&b.minute!==null&&b.second!==null){c=true}else if(b.hourAmPm!==null&&b.am!==null&&b.minute!==null&&b.second!==null){if(b.am){b.hour=parseInt(b.hourAmPm,10)}else{if(b.hourAmPm==12)b.hour=0;else b.hour=parseInt(b.hourAmPm,10)+12}c=true}if(b.year!==null&&b.month!==null&&b.day!==null){d=true}if(d&&c)return jsworld._zeroPad(b.year,4)+"-"+jsworld._zeroPad(b.month,2)+"-"+jsworld._zeroPad(b.day,2)+" "+jsworld._zeroPad(b.hour,2)+":"+jsworld._zeroPad(b.minute,2)+":"+jsworld._zeroPad(b.second,2);else throw"Parse error: Invalid/ambiguous date/time string"};this._extractTokens=function(a,b){var c={year:null,month:null,day:null,hour:null,hourAmPm:null,am:null,minute:null,second:null,weekday:null};while(a.length>0){if(a.charAt(0)=="%"&&a.charAt(1)!=""){var d=a.substring(0,2);if(d=="%%"){b=b.substring(1)}else if(d=="%a"){for(var e=0;e31)throw"Parse error: Unrecognised day of the month (%e)";b=b.substring(f.length)}else if(d=="%F"){if(/^\d\d\d\d/.test(b)){c.year=parseInt(b.substring(0,4),10);b=b.substring(4)}else{throw"Parse error: Unrecognised date (%F)"}if(jsworld._stringStartsWith(b,"-"))b=b.substring(1);else throw"Parse error: Unrecognised date (%F)";if(/^0[1-9]|1[0-2]/.test(b)){c.month=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised date (%F)";if(jsworld._stringStartsWith(b,"-"))b=b.substring(1);else throw"Parse error: Unrecognised date (%F)";if(/^0[1-9]|[1-2][0-9]|3[0-1]/.test(b)){c.day=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised date (%F)"}else if(d=="%H"){if(/^[0-1][0-9]|2[0-3]/.test(b)){c.hour=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised hour (%H)"}else if(d=="%I"){if(/^0[1-9]|1[0-2]/.test(b)){c.hourAmPm=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised hour (%I)"}else if(d=="%k"){var g=b.match(/^(\d{1,2})/);c.hour=parseInt(g,10);if(isNaN(c.hour)||c.hour<0||c.hour>23)throw"Parse error: Unrecognised hour (%k)";b=b.substring(g.length)}else if(d=="%l"){var g=b.match(/^(\d{1,2})/);c.hourAmPm=parseInt(g,10);if(isNaN(c.hourAmPm)||c.hourAmPm<1||c.hourAmPm>12)throw"Parse error: Unrecognised hour (%l)";b=b.substring(g.length)}else if(d=="%m"){if(/^0[1-9]|1[0-2]/.test(b)){c.month=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised month (%m)"}else if(d=="%M"){if(/^[0-5][0-9]/.test(b)){c.minute=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised minute (%M)"}else if(d=="%n"){if(b.charAt(0)=="\n")b=b.substring(1);else throw"Parse error: Unrecognised new line (%n)"}else if(d=="%p"){if(jsworld._stringStartsWith(b,this.lc.am)){c.am=true;b=b.substring(this.lc.am.length)}else if(jsworld._stringStartsWith(b,this.lc.pm)){c.am=false;b=b.substring(this.lc.pm.length)}else throw"Parse error: Unrecognised AM/PM value (%p)"}else if(d=="%P"){if(jsworld._stringStartsWith(b,this.lc.am.toLowerCase())){c.am=true;b=b.substring(this.lc.am.length)}else if(jsworld._stringStartsWith(b,this.lc.pm.toLowerCase())){c.am=false;b=b.substring(this.lc.pm.length)}else throw"Parse error: Unrecognised AM/PM value (%P)"}else if(d=="%R"){if(/^[0-1][0-9]|2[0-3]/.test(b)){c.hour=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised time (%R)";if(jsworld._stringStartsWith(b,":"))b=b.substring(1);else throw"Parse error: Unrecognised time (%R)";if(/^[0-5][0-9]/.test(b)){c.minute=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised time (%R)"}else if(d=="%S"){if(/^[0-5][0-9]/.test(b)){c.second=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised second (%S)"}else if(d=="%T"){if(/^[0-1][0-9]|2[0-3]/.test(b)){c.hour=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised time (%T)";if(jsworld._stringStartsWith(b,":"))b=b.substring(1);else throw"Parse error: Unrecognised time (%T)";if(/^[0-5][0-9]/.test(b)){c.minute=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised time (%T)";if(jsworld._stringStartsWith(b,":"))b=b.substring(1);else throw"Parse error: Unrecognised time (%T)";if(/^[0-5][0-9]/.test(b)){c.second=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised time (%T)"}else if(d=="%w"){if(/^\d/.test(b)){c.weekday=parseInt(b.substring(0,1),10);b=b.substring(1)}else throw"Parse error: Unrecognised weekday number (%w)"}else if(d=="%y"){if(/^\d\d/.test(b)){var h=parseInt(b.substring(0,2),10);if(h>50)c.year=1900+h;else c.year=2e3+h;b=b.substring(2)}else throw"Parse error: Unrecognised year (%y)"}else if(d=="%Y"){if(/^\d\d\d\d/.test(b)){c.year=parseInt(b.substring(0,4),10);b=b.substring(4)}else throw"Parse error: Unrecognised year (%Y)"}else if(d=="%Z"){if(a.length===0)break}a=a.substring(2)}else{if(a.charAt(0)!=b.charAt(0))throw'Parse error: Unexpected symbol "'+b.charAt(0)+'" in date/time string';a=a.substring(1);b=b.substring(1)}}return c}};jsworld.MonetaryParser=function(a){if(typeof a!="object"||a._className!="jsworld.Locale")throw"Constructor error: You must provide a valid jsworld.Locale instance";this.lc=a;this.parse=function(a){if(typeof a!="string")throw"Parse error: Argument must be a string";var b=this._detectCurrencySymbolType(a);var c,d;if(b=="local"){c="local";d=a.replace(this.lc.getCurrencySymbol(),"")}else if(b=="int"){c="int";d=a.replace(this.lc.getIntCurrencySymbol(),"")}else if(b=="none"){c="local";d=a}else throw"Parse error: Internal assert failure";d=jsworld._stringReplaceAll(d,this.lc.mon_thousands_sep,"");d=d.replace(this.lc.mon_decimal_point,".");d=d.replace(/\s*/g,"");d=this._removeLocalNonNegativeSign(d,c);d=this._normaliseNegativeSign(d,c);if(jsworld._isNumber(d))return parseFloat(d,10);else throw"Parse error: Invalid currency amount string"};this._detectCurrencySymbolType=function(a){if(this.lc.getCurrencySymbol().length>this.lc.getIntCurrencySymbol().length){if(a.indexOf(this.lc.getCurrencySymbol())!=-1)return"local";else if(a.indexOf(this.lc.getIntCurrencySymbol())!=-1)return"int";else return"none"}else{if(a.indexOf(this.lc.getIntCurrencySymbol())!=-1)return"int";else if(a.indexOf(this.lc.getCurrencySymbol())!=-1)return"local";else return"none"}};this._removeLocalNonNegativeSign=function(a,b){a=a.replace(this.lc.positive_sign,"");if((b=="local"&&this.lc.p_sign_posn===0||b=="int"&&this.lc.int_p_sign_posn===0)&&/\(\d+\.?\d*\)/.test(a)){a=a.replace("(","");a=a.replace(")","")}return a};this._normaliseNegativeSign=function(a,b){a=a.replace(this.lc.negative_sign,"-");if(b=="local"&&this.lc.n_sign_posn===0||b=="int"&&this.lc.int_n_sign_posn===0){if(/^\(\d+\.?\d*\)$/.test(a)){a=a.replace("(","");a=a.replace(")","");return"-"+a}}if(b=="local"&&this.lc.n_sign_posn==2||b=="int"&&this.lc.int_n_sign_posn==2){if(/^\d+\.?\d*-$/.test(a)){a=a.replace("-","");return"-"+a}}if(b=="local"&&this.lc.n_cs_precedes===0&&this.lc.n_sign_posn==3||b=="local"&&this.lc.n_cs_precedes===0&&this.lc.n_sign_posn==4||b=="int"&&this.lc.int_n_cs_precedes===0&&this.lc.int_n_sign_posn==3||b=="int"&&this.lc.int_n_cs_precedes===0&&this.lc.int_n_sign_posn==4){if(/^\d+\.?\d*-$/.test(a)){a=a.replace("-","");return"-"+a}}return a}} - - -if(typeof POSIX_LC == "undefined") var POSIX_LC = {}; - -POSIX_LC.en_US = { - "decimal_point" : ".", - "thousands_sep" : ",", - "grouping" : "3", - "abday" : ["Sun","Mon","Tue","Wed","Thu","Fri","Sat"], - "day" : ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"], - "abmon" : ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"], - "mon" : ["January","February","March","April","May","June","July","August","September","October","November","December"], - "d_fmt" : "%m/%e/%y", - "t_fmt" : "%I:%M:%S %p", - "d_t_fmt" : "%B %e, %Y %I:%M:%S %p %Z", - "am_pm" : ["AM","PM"], - "int_curr_symbol" : "USD ", - "currency_symbol" : "\u0024", - "mon_decimal_point" : ".", - "mon_thousands_sep" : ",", - "mon_grouping" : "3", - "positive_sign" : "", - "negative_sign" : "-", - "int_frac_digits" : 2, - "frac_digits" : 2, - "p_cs_precedes" : 1, - "n_cs_precedes" : 1, - "p_sep_by_space" : 0, - "n_sep_by_space" : 0, - "p_sign_posn" : 1, - "n_sign_posn" : 1, - "int_p_cs_precedes" : 1, - "int_n_cs_precedes" : 1, - "int_p_sep_by_space" : 0, - "int_n_sep_by_space" : 0, - "int_p_sign_posn" : 1, - "int_n_sign_posn" : 1 -} - -if(typeof POSIX_LC == "undefined") var POSIX_LC = {}; - -POSIX_LC.fr_FR = { - "decimal_point" : ",", - "thousands_sep" : "\u00a0", - "grouping" : "3", - "abday" : ["dim.","lun.","mar.", - "mer.","jeu.","ven.", - "sam."], - "day" : ["dimanche","lundi","mardi", - "mercredi","jeudi","vendredi", - "samedi"], - "abmon" : ["janv.","f\u00e9vr.","mars", - "avr.","mai","juin", - "juil.","ao\u00fbt","sept.", - "oct.","nov.","d\u00e9c."], - "mon" : ["janvier","f\u00e9vrier","mars", - "avril","mai","juin", - "juillet","ao\u00fbt","septembre", - "octobre","novembre","d\u00e9cembre"], - "d_fmt" : "%d/%m/%y", - "t_fmt" : "%H:%M:%S", - "d_t_fmt" : "%e %B %Y %H:%M:%S %Z", - "am_pm" : ["AM","PM"], - "int_curr_symbol" : "EUR ", - "currency_symbol" : "\u20ac", - "mon_decimal_point" : ",", - "mon_thousands_sep" : "\u00a0", - "mon_grouping" : "3", - "positive_sign" : "", - "negative_sign" : "-", - "int_frac_digits" : 2, - "frac_digits" : 2, - "p_cs_precedes" : 0, - "n_cs_precedes" : 0, - "p_sep_by_space" : 1, - "n_sep_by_space" : 1, - "p_sign_posn" : 1, - "n_sign_posn" : 1, - "int_p_cs_precedes" : 0, - "int_n_cs_precedes" : 0, - "int_p_sep_by_space" : 1, - "int_n_sep_by_space" : 1, - "int_p_sign_posn" : 1, - "int_n_sign_posn" : 1 -}; - -/** https://github.com/csnover/js-iso8601 */(function(n,f){var u=n.parse,c=[1,4,5,6,7,10,11];n.parse=function(t){var i,o,a=0;if(o=/^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/.exec(t)){for(var v=0,r;r=c[v];++v)o[r]=+o[r]||0;o[2]=(+o[2]||1)-1,o[3]=+o[3]||1,o[8]!=="Z"&&o[9]!==f&&(a=o[10]*60+o[11],o[9]==="+"&&(a=0-a)),i=n.UTC(o[1],o[2],o[3],o[4],o[5]+a,o[6],o[7])}else i=u?u(t):NaN;return i}})(Date) - -/*! - * geo-location-javascript v0.4.3 - * http://code.google.com/p/geo-location-javascript/ - * - * Copyright (c) 2009 Stan Wiechers - * Licensed under the MIT licenses. - * - * Revision: $Rev: 68 $: - * Author: $Author: whoisstan $: - * Date: $Date: 2010-02-15 13:42:19 +0100 (Mon, 15 Feb 2010) $: - */ -var geo_position_js=function() { - - var pub = {}; - var provider=null; - - pub.getCurrentPosition = function(successCallback,errorCallback,options) - { - provider.getCurrentPosition(successCallback, errorCallback,options); - } - - pub.init = function() - { - try - { - if (typeof(geo_position_js_simulator)!="undefined") - { - provider=geo_position_js_simulator; - } - else if (typeof(bondi)!="undefined" && typeof(bondi.geolocation)!="undefined") - { - provider=bondi.geolocation; - } - else if (typeof(navigator.geolocation)!="undefined") - { - provider=navigator.geolocation; - pub.getCurrentPosition = function(successCallback, errorCallback, options) - { - function _successCallback(p) - { - //for mozilla geode,it returns the coordinates slightly differently - if(typeof(p.latitude)!="undefined") - { - successCallback({timestamp:p.timestamp, coords: {latitude:p.latitude,longitude:p.longitude}}); - } - else - { - successCallback(p); - } - } - provider.getCurrentPosition(_successCallback,errorCallback,options); - } - } - else if(typeof(window.google)!="undefined" && typeof(google.gears)!="undefined") - { - provider=google.gears.factory.create('beta.geolocation'); - } - else if ( typeof(Mojo) !="undefined" && typeof(Mojo.Service.Request)!="Mojo.Service.Request") - { - provider=true; - pub.getCurrentPosition = function(successCallback, errorCallback, options) - { - - parameters={}; - if(options) - { - //http://developer.palm.com/index.php?option=com_content&view=article&id=1673#GPS-getCurrentPosition - if (options.enableHighAccuracy && options.enableHighAccuracy==true) - { - parameters.accuracy=1; - } - if (options.maximumAge) - { - parameters.maximumAge=options.maximumAge; - } - if (options.responseTime) - { - if(options.responseTime<5) - { - parameters.responseTime=1; - } - else if (options.responseTime<20) - { - parameters.responseTime=2; - } - else - { - parameters.timeout=3; - } - } - } - - - r=new Mojo.Service.Request('palm://com.palm.location', { - method:"getCurrentPosition", - parameters:parameters, - onSuccess: function(p){successCallback({timestamp:p.timestamp, coords: {latitude:p.latitude, longitude:p.longitude,heading:p.heading}});}, - onFailure: function(e){ - if (e.errorCode==1) - { - errorCallback({code:3,message:"Timeout"}); - } - else if (e.errorCode==2) - { - errorCallback({code:2,message:"Position Unavailable"}); - } - else - { - errorCallback({code:0,message:"Unknown Error: webOS-code"+errorCode}); - } - } - }); - } - - } - else if (typeof(device)!="undefined" && typeof(device.getServiceObject)!="undefined") - { - provider=device.getServiceObject("Service.Location", "ILocation"); - - //override default method implementation - pub.getCurrentPosition = function(successCallback, errorCallback, options) - { - function callback(transId, eventCode, result) { - if (eventCode == 4) - { - errorCallback({message:"Position unavailable", code:2}); - } - else - { - //no timestamp of location given? - successCallback({timestamp:null, coords: {latitude:result.ReturnValue.Latitude, longitude:result.ReturnValue.Longitude, altitude:result.ReturnValue.Altitude,heading:result.ReturnValue.Heading}}); - } - } - //location criteria - var criteria = new Object(); - criteria.LocationInformationClass = "BasicLocationInformation"; - //make the call - provider.ILocation.GetLocation(criteria,callback); - } - } - } - catch (e){ - alert("error="+e); - if(typeof(console)!="undefined") - { - console.log(e); - } - return false; - } - return provider!=null; - } - - - return pub; -}(); -// Couldn't get unminified version to work , go here for docs => https://github.com/iamnoah/writeCapture -(function(E,a){var j=a.document;function A(Q){var Z=j.createElement("div");j.body.insertBefore(Z,null);E.replaceWith(Z,'\n
    \n
    \n
    \n \n\n
    \n
    \n \n
    \n

    '); - __out.push(__sanitize(t('Invite Link'))); - __out.push(' '); - __out.push(__sanitize(USER.referral_url)); - __out.push('

    \n\n \n\n
    \n\n'); - }).call(this); - - }).call(__obj); - __obj.safe = __objSafe, __obj.escape = __escape; - return __out.join(''); -}}, "templates/clients/login": function(exports, require, module) {module.exports = function(__obj) { - if (!__obj) __obj = {}; - var __out = [], __capture = function(callback) { - var out = __out, result; - __out = []; - callback.call(this); - result = __out.join(''); - __out = out; - return __safe(result); - }, __sanitize = function(value) { - if (value && value.ecoSafe) { - return value; - } else if (typeof value !== 'undefined' && value != null) { - return __escape(value); - } else { - return ''; - } - }, __safe, __objSafe = __obj.safe, __escape = __obj.escape; - __safe = __obj.safe = function(value) { - if (value && value.ecoSafe) { - return value; - } else { - if (!(typeof value !== 'undefined' && value != null)) value = ''; - var result = new String(value); - result.ecoSafe = true; - return result; - } - }; - if (!__escape) { - __escape = __obj.escape = function(value) { - return ('' + value) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); - }; - } - (function() { - (function() { - __out.push('
    \n\t

    '); - __out.push(__sanitize(t('Sign In'))); - __out.push('

    \n\t
    \n\t\t
    \n\n\t\t\t
    \n\t\t\t\t\n\t\t\t
    \n\t\t\t
    \n\t\t\t\t\n\t\t\t
    \n\n\t\t\t
    \n\n\t\t\t
    \n\t\t\t\t\n\t\t\t
    \n\t\t\t
    \n\t\t\t\t\n\t\t\t
    \n\n\t\t\t
    \n\n
    \n\n

    '); - __out.push(__sanitize(t('Forgot Password?'))); - __out.push('

    \n\n\t\t
    \n\t
    \n
    \n\n
    \n
    \n'); - }).call(this); - - }).call(__obj); - __obj.safe = __objSafe, __obj.escape = __escape; - return __out.join(''); -}}, "templates/clients/modules/credit_card": function(exports, require, module) {module.exports = function(__obj) { - if (!__obj) __obj = {}; - var __out = [], __capture = function(callback) { - var out = __out, result; - __out = []; - callback.call(this); - result = __out.join(''); - __out = out; - return __safe(result); - }, __sanitize = function(value) { - if (value && value.ecoSafe) { - return value; - } else if (typeof value !== 'undefined' && value != null) { - return __escape(value); - } else { - return ''; - } - }, __safe, __objSafe = __obj.safe, __escape = __obj.escape; - __safe = __obj.safe = function(value) { - if (value && value.ecoSafe) { - return value; - } else { - if (!(typeof value !== 'undefined' && value != null)) value = ''; - var result = new String(value); - result.ecoSafe = true; - return result; - } - }; - if (!__escape) { - __escape = __obj.escape = function(value) { - return ('' + value) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); - }; - } - (function() { - (function() { - var printCard; - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - if (this.cards === "new") { - __out.push('\n
    \n
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n'); - } else { - __out.push('\n '); - printCard = __bind(function(card, index) { - var exp, style; - __out.push('\n
    \n '); - style = "background-position:-173px"; - __out.push('\n '); - if (card.get("card_type") === "Visa") { - style = "background-position:0px"; - } - __out.push('\n '); - if (card.get("card_type") === "MasterCard") { - style = "background-position:-42px"; - } - __out.push('\n '); - if (card.get("card_type") === "American Express") { - style = "background-position:-130px"; - } - __out.push('\n '); - if (card.get("card_type") === "Discover Card") { - style = "background-position:-85px"; - } - __out.push('\n
    \n
    \n ****'); - __out.push(__sanitize(card.get("card_number"))); - __out.push('\n \n '); - if (card.get("card_expiration")) { - __out.push('\n '); - __out.push(__sanitize(t('Expiry'))); - __out.push('\n '); - exp = card.get('card_expiration').split('-'); - __out.push('\n '); - __out.push(__sanitize("" + exp[0] + "-" + exp[1])); - __out.push('\n '); - } - __out.push('\n \n \n \n '); - if (card.get("default")) { - __out.push('\n ('); - __out.push(__sanitize(t('default card'))); - __out.push(')\n '); - } - __out.push('\n '); - if (this.cards.length > 1 && !card.get("default")) { - __out.push('\n '); - __out.push(__sanitize(t('make default'))); - __out.push('\n '); - } - __out.push('\n \n '); - __out.push(__sanitize(t('Edit'))); - __out.push('\n \n '); - if (this.cards.length > 1) { - __out.push('\n '); - __out.push(__sanitize(t('Delete'))); - __out.push('\n '); - } - __out.push('\n
    \n '); - _.each(this.cards.models, printCard); - __out.push('\n
    \n
    \n\n'); - } - __out.push('\n'); - }).call(this); - - }).call(__obj); - __obj.safe = __objSafe, __obj.escape = __escape; - return __out.join(''); -}}, "templates/clients/modules/sub_header": function(exports, require, module) {module.exports = function(__obj) { - if (!__obj) __obj = {}; - var __out = [], __capture = function(callback) { - var out = __out, result; - __out = []; - callback.call(this); - result = __out.join(''); - __out = out; - return __safe(result); - }, __sanitize = function(value) { - if (value && value.ecoSafe) { - return value; - } else if (typeof value !== 'undefined' && value != null) { - return __escape(value); - } else { - return ''; - } - }, __safe, __objSafe = __obj.safe, __escape = __obj.escape; - __safe = __obj.safe = function(value) { - if (value && value.ecoSafe) { - return value; - } else { - if (!(typeof value !== 'undefined' && value != null)) value = ''; - var result = new String(value); - result.ecoSafe = true; - return result; - } - }; - if (!__escape) { - __escape = __obj.escape = function(value) { - return ('' + value) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); - }; - } - (function() { - (function() { - __out.push('
    \n
    '); - __out.push(__sanitize(this.heading)); - __out.push('
    \n
    \n '); - if (window.USER.first_name) { - __out.push('\n '); - __out.push(__sanitize(t('Hello Greeting', { - name: USER.first_name - }))); - __out.push('\n '); - } - __out.push('\n
    \n
    \n
    \n'); - }).call(this); - - }).call(__obj); - __obj.safe = __objSafe, __obj.escape = __escape; - return __out.join(''); -}}, "templates/clients/promotions": function(exports, require, module) {module.exports = function(__obj) { - if (!__obj) __obj = {}; - var __out = [], __capture = function(callback) { - var out = __out, result; - __out = []; - callback.call(this); - result = __out.join(''); - __out = out; - return __safe(result); - }, __sanitize = function(value) { - if (value && value.ecoSafe) { - return value; - } else if (typeof value !== 'undefined' && value != null) { - return __escape(value); - } else { - return ''; - } - }, __safe, __objSafe = __obj.safe, __escape = __obj.escape; - __safe = __obj.safe = function(value) { - if (value && value.ecoSafe) { - return value; - } else { - if (!(typeof value !== 'undefined' && value != null)) value = ''; - var result = new String(value); - result.ecoSafe = true; - return result; - } - }; - if (!__escape) { - __escape = __obj.escape = function(value) { - return ('' + value) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); - }; - } - (function() { - (function() { - var promo, _i, _len, _ref; - __out.push(require('templates/clients/modules/sub_header').call(this, { - heading: t("Promotions") - })); - __out.push('\n\n
    \n
    \n
    \n \n \n
    \n
    \n \n \n\n \n
    \n '); - if (this.promos.length > 0) { - __out.push('\n
    \n

    '); - __out.push(__sanitize(t('Your Available Promotions'))); - __out.push('

    \n \n \n\n \n \n \n \n \n \n \n \n '); - _ref = this.promos; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - promo = _ref[_i]; - __out.push('\n \n \n \n \n \n \n '); - } - __out.push('\n \n
    '); - __out.push(__sanitize(t('Code'))); - __out.push(''); - __out.push(__sanitize(t('Details'))); - __out.push(''); - __out.push(__sanitize(t('Starts'))); - __out.push(''); - __out.push(__sanitize(t('Expires'))); - __out.push('
    '); - __out.push(__sanitize(promo.code)); - __out.push(''); - __out.push(__sanitize(promo.description)); - __out.push(''); - __out.push(__sanitize(app.helpers.formatDate(promo.starts_at, true, "America/Los_Angeles"))); - __out.push(''); - __out.push(__sanitize(app.helpers.formatDate(promo.ends_at, true, "America/Los_Angeles"))); - __out.push('
    \n
    \n '); - } else { - __out.push('\n\n

    '); - __out.push(__sanitize(t('No Active Promotions'))); - __out.push('

    \n '); - } - __out.push('\n\n
    \n
    \n
    \n'); - }).call(this); - - }).call(__obj); - __obj.safe = __objSafe, __obj.escape = __escape; - return __out.join(''); -}}, "templates/clients/request": function(exports, require, module) {module.exports = function(__obj) { - if (!__obj) __obj = {}; - var __out = [], __capture = function(callback) { - var out = __out, result; - __out = []; - callback.call(this); - result = __out.join(''); - __out = out; - return __safe(result); - }, __sanitize = function(value) { - if (value && value.ecoSafe) { - return value; - } else if (typeof value !== 'undefined' && value != null) { - return __escape(value); - } else { - return ''; - } - }, __safe, __objSafe = __obj.safe, __escape = __obj.escape; - __safe = __obj.safe = function(value) { - if (value && value.ecoSafe) { - return value; - } else { - if (!(typeof value !== 'undefined' && value != null)) value = ''; - var result = new String(value); - result.ecoSafe = true; - return result; - } - }; - if (!__escape) { - __escape = __obj.escape = function(value) { - return ('' + value) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); - }; - } - (function() { - (function() { - var showFavoriteLocation; - showFavoriteLocation = function(location, index) { - var alphabet; - __out.push('\n '); - alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - __out.push('\n
    \n '); - __out.push(__sanitize(location.nickname)); - return __out.push('\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n

    '); - __out.push(__sanitize(t('Driver Name:'))); - __out.push('

    \n

    \n
    \n

    '); - __out.push(__sanitize(t('Driver #:'))); - __out.push('

    \n

    \n
    \n

    '); - __out.push(__sanitize(t('Pickup Address:'))); - __out.push('

    \n

    \n
    \n ');
-      __out.push(__sanitize(t('Add to Favorite Locations')));
-      __out.push('\n
    \n
    \n

    \n '); - __out.push(__sanitize(t('Nickname:'))); - __out.push('\n \n \n \n \n
    \n
    \n
    \n
    \n

    '); - __out.push(__sanitize(t('Your last trip'))); - __out.push('

    \n
    \n \n ');
-      __out.push(__sanitize(t('Star')));
-      __out.push('\n ');
-      __out.push(__sanitize(t('Star')));
-      __out.push('\n ');
-      __out.push(__sanitize(t('Star')));
-      __out.push('\n ');
-      __out.push(__sanitize(t('Star')));
-      __out.push('\n ');
-      __out.push(__sanitize(t('Star')));
-      __out.push('\n \n \n
    \n \n
    \n \n
    \n \n
    \n \n\n
    \n'); - }).call(this); - - }).call(__obj); - __obj.safe = __objSafe, __obj.escape = __escape; - return __out.join(''); -}}, "templates/shared/menu": function(exports, require, module) {module.exports = function(__obj) { - if (!__obj) __obj = {}; - var __out = [], __capture = function(callback) { - var out = __out, result; - __out = []; - callback.call(this); - result = __out.join(''); - __out = out; - return __safe(result); - }, __sanitize = function(value) { - if (value && value.ecoSafe) { - return value; - } else if (typeof value !== 'undefined' && value != null) { - return __escape(value); - } else { - return ''; - } - }, __safe, __objSafe = __obj.safe, __escape = __obj.escape; - __safe = __obj.safe = function(value) { - if (value && value.ecoSafe) { - return value; - } else { - if (!(typeof value !== 'undefined' && value != null)) value = ''; - var result = new String(value); - result.ecoSafe = true; - return result; - } - }; - if (!__escape) { - __escape = __obj.escape = function(value) { - return ('' + value) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); - }; - } - (function() { - (function() { - __out.push('\n'); - }).call(this); - - }).call(__obj); - __obj.safe = __objSafe, __obj.escape = __escape; - return __out.join(''); -}}, "translations/en": function(exports, require, module) {(function() { - exports.translations = { - "Uber": "Uber", - "Sign Up": "Sign Up", - "Ride Request": "Ride Request", - "Invite Friends": "Invite Friends", - "Promotions": "Promotions", - "Billing": "Billing", - "Settings": "Settings", - "Forgot Password?": "Forgot Password?", - "Password Recovery": "Password Recovery", - "Login": "Login", - "Trip Detail": "Trip Detail", - "Password Reset": "Password Reset", - "Confirm Email": "Confirm Email", - "Request Ride": "Request Ride", - "Credit Card Number": "Credit Card Number", - "month": "month", - "01-Jan": "01-Jan", - "02-Feb": "02-Feb", - "03-Mar": "03-Mar", - "04-Apr": "04-Apr", - "05-May": "05-May", - "06-Jun": "06-Jun", - "07-Jul": "07-Jul", - "08-Aug": "08-Aug", - "09-Sep": "09-Sep", - "10-Oct": "10-Oct", - "11-Nov": "11-Nov", - "12-Dec": "12-Dec", - "year": "year", - "CVV": "CVV", - "Category": "Category", - "personal": "personal", - "business": "business", - "Default Credit Card": "Default Credit Card", - "Add Credit Card": "Add Credit Card", - "Expiry": "Expiry", - "default card": "default card", - "make default": "make default", - "Edit": "Edit", - "Delete": "Delete", - "Expiry Month": "Expiry Month", - "Expiry Year": "Expiry Year", - "Unable to Verify Card": "Unable to verify card at this time. Please try again later.", - "Credit Card Update Succeeded": "Your card has been successfully updated!", - "Credit Card Update Failed": "We couldn't save your changes. Please try again in a few minutes.", - "Credit Card Delete Succeeded": "Your card has been deleted!", - "Credit Card Delete Failed": "We were unable to delete your card. Please try again later.", - "Credit Card Update Category Succeeded": "Successfully changed card category!", - "Credit Card Update Category Failed": "We couldn't change your card category. Please try again in a few minutes.", - "Credit Card Update Default Succeeded": "Successfully changed default card!", - "Credit Card Update Default Failed": "We couldn't change your default card. Please try again in a few minutes.", - "Hello Greeting": "Hello, <%= name %>", - "Card Ending in": "Card Ending in", - "Trip Map": "Trip Map", - "Amount": "Amount: <%= amount %>", - "Last Attempt to Bill": "Last Attempt to Bill: <%= date %>", - "Charge": "Charge", - "Uber Credit Balance Note": "Your account has an UberCredit balance of <%= amount %>. When billing for trips, we'll deplete your UberCredit balance before applying charges to your credit card.", - "Please Add Credit Card": "Please add a credit card to bill your outstanding charges.", - "Credit Cards": "Credit Cards", - "add a new credit card": "add a new credit card", - "Account Balance": "Account Balance", - "Arrears": "Arrears", - "Billing Succeeded": "Your card was successfully billed.", - "Confirm Email Succeeded": "Successfully confirmed email token, redirecting to log in page...", - "Confirm Email Failed": "Unable to confirm email. Please contact support@uber.com if this problem persists.", - "Email Already Confirmed": "Your email address has already been confirmed, redirecting to log in page...", - "Credit Card Added": "Credit Card Added", - "No Credit Card": "No Credit Card", - "Mobile Number Confirmed": "Mobile Number Confirmed", - "No Confirmed Mobile": "No Confirmed Mobile", - "E-mail Address Confirmed": "E-mail Address Confirmed", - "No Confirmed E-mail": "No Confirmed E-mail", - 'Reply to sign up text': 'Reply "GO" to the text message you received at sign up.', - "Resend text message": "Resend text message", - "Click sign up link": "Click the link in the email you received at sign up.", - "Resend email": "Resend email", - "Add a credit card to ride": "Add a credit card and you'll be ready to ride Uber.", - "Your Most Recent Trip": "Your Most Recent Trip", - "details": "details", - "Your Trip History ": "Your Trip History ", - "Status": "Status", - "Here's how it works:": "Here's how it works:", - "Show all trips": "Show all trips", - "Set your location:": "Set your location:", - "App search for address": "iPhone/Android app: fix the pin or search for an address", - "SMS text address": "SMS: text your address to UBRCAB (827222)", - "Confirm pickup request": "Confirm your pickup request", - "Uber sends ETA": "Uber will send you an ETA (usually within 5-10 minutes)", - "Car arrives": "When your car is arriving, Uber will inform you again.", - "Ride to destination": "Hop in the car and tell the driver your destination.", - "Thank your driver": "That’s it! Please thank your driver but remember that your tip is included and no cash is necessary.", - "Trip started here": "Trip started here", - "Trip ended here": "Trip ended here", - "Sending Email": "Sending email...", - "Resend Email Succeeded": "We just sent the email. Please click on the confirmation link you recieve.", - "Resend Email Failed": "There was an error sending the email. Please contact support if the problem persists.", - "Resend Text Succeeded": 'We just sent the text message. Please reply "GO" to the message you recieve. It may take a few minutes for the message to reach you phone.', - "Resend Text Failed": "There was an error sending the text message. Please contact support if the problem persists.", - "Password Reset Error": "There was an error processing your password reset request.", - "New Password": "New Password", - "Forgot Password": "Forgot Password", - "Forgot Password Error": "Your email address could not be found. Please make sure to use the same email address you used when you signed up.", - "Forgot Password Success": "Please check your email for a link to reset your password.", - "Forgot Password Enter Email": 'Enter your email address and Uber will send you a link to reset your password. If you remember your password, you can sign in here.', - "Invite friends": "Invite friends", - "Give $ Get $": "Give $10, Get $10", - "Give $ Get $ Description": "Every friend you invite to Uber gets $10 of Uber credit. After someone you’ve invited takes his/her first ride, you get $10 of Uber credits too!", - "What are you waiting for?": "So, what are you waiting for? Invite away!", - "Tweet": "Tweet", - "Invite Link": "Email or IM this link to your friends:", - "Email Address": "Email Address", - "Reset Password": "Reset Password", - "Enter Promotion Code": "If you have a promotion code, enter it here:", - "Your Active Promotions": "Your Active Promotions", - "Code": "Code", - "Details": "Details", - "Trips Remaining": "Trips Remaining", - "Expires": "Expires", - "No Active Promotions": "There are no active promotions on your account.", - "Your Available Promotions": "Your Available Promotions", - "Where do you want us to pick you up?": "Where do you want us to pick you up?", - "Address to search": "Address to search", - "Search": "Search", - "Driver Name:": "Driver Name:", - "Driver #:": "Driver #:", - "Pickup Address:": "Pickup Address:", - "Add to Favorite Locations": "Add to Favorite Locations", - "Star": "Star", - "Nickname:": "Nickname:", - "Add": "Add", - "Your last trip": "Your last trip", - "Please rate your driver:": "Please rate your driver:", - "Comments: (optional)": "Comments: (optional)", - "Rate Trip": "Rate Trip", - "Pickup time:": "Pickup time:", - "Miles:": "Miles:", - "Trip time:": "Trip time:", - "Fare:": "Fare:", - "Favorite Locations": "Favorite Locations", - "Search Results": "Search Results", - "You have no favorite locations saved.": "You have no favorite locations saved.", - "Loading...": "Loading...", - "Request Pickup": "Request Pickup", - "Cancel Pickup": "Cancel Pickup", - "Requesting Closest Driver": "Requesting the closest driver to pick you up...", - "En Route": "You are currently en route...", - "Rate Last Trip": "Please rate your trip to make another request", - "Rate Before Submitting": "Please rate your trip before submitting the form", - "Address too short": "Address too short", - "or did you mean": "or did you mean", - "Search Address Failed": "Unable to find the given address. Please enter another address close to your location.", - "Sending pickup request...": "Sending pickup request...", - "Cancel Request Prompt": "Are you sure you want to cancel your request?", - "Cancel Request Arrived Prompt": 'Are you sure you want to cancel your request? Your driver has arrived so there is a $10 cancellation fee. It may help to call your driver now', - "Favorite Location Nickname Length Error": "Nickname has to be atleast 3 characters", - "Favorite Location Save Succeeded": "Location Saved!", - "Favorite Location Save Failed": "Unable to save your location. Please try again later.", - "Favorite Location Title": "Favorite Location <%= id %>", - "Search Location Title": "Search Location <%= id %>", - "ETA Message": "ETA: Around <%= minutes %> Minutes", - "Nearest Cab Message": "The closest driver is approximately <%= minutes %> minute(s) away", - "Arrival ETA Message": "Your Uber will arrive in about <%= minutes %> minute(s)", - "Arriving Now Message": "Your Uber is arriving now...", - "Rating Driver Failed": "Unable to contact server. Please try again later or email support if this issue persists.", - "Account Information": "Account Information", - "Mobile Phone Information": "Mobile Phone Information", - "settings": "settings", - "Information": "Information", - "Picture": "Picture", - "Change password": "Change password", - "Your current Picture": "Your current Picture", - "Your Favorite Locations": "Your Favorite Locations", - "You have no favorite locations saved.": "You have no favorite locations saved.", - "Purpose of Mobile": "We send text messages to your mobile phone to tell you when your driver is arriving. You can also request trips using text messages.", - "Country": "Country", - "Mobile Number": "Mobile Number", - "Submit": "Submit", - "Favorite Location": "Favorite Location", - "No Approximate Address": "Could not find an approximate address", - "Address:": "Address:", - "Information Update Succeeded": "Your information has been updated!", - "Information Update Failed": "We couldn't update your information. Please try again in few minutes or contact support if the problem persists.", - "Location Delete Succeeded": "Location deleted!", - "Location Delete Failed": "We were unable to delete your favorite location. Please try again later or contact support of the issue persists.", - "Location Edit Succeeded": "Changes Saved!", - "Location Edit Failed": "We couldn't save your changes. Please try again in a few minutes.", - "Picture Update Succeeded": "Your picture has been updated!", - "Picture Update Failed": "We couldn't change your picture. Please try again in a few minutes.", - "Personal Information": "Personal Information", - "Mobile Phone Number": "Mobile Phone Number", - "Payment Information": "Payment Information", - "Purpose of Credit Card": "We keep your credit card on file so that your trip go as fast as possible. You will not be charged until you take a trip.", - "Your card will not be charged until you take a trip.": "Your card will not be charged until you take a trip.", - "Credit Card Number": "Credit Card Number", - "Expiration Date": "Expiration Date", - "Promotion Code": "Promotion Code", - "Enter Promo Here": "If you have a code for a promotion, invitation or group deal, you can enter it here.", - "Promotion Code Input Label": "Promotion, Invite or Groupon Code (optional)", - "Terms and Conditions": "Terms and Conditions", - "HELP": "HELP", - "STOP": "STOP", - "Legal Information": "Legal Information", - "Sign Up Agreement": "By signing up, I agree to the Uber <%= terms_link %> and <%= privacy_link %> and understand that Uber is a request tool, not a transportation carrier.", - "Sign Up Agreement Error": "You must agree to the Uber Terms and Conditions and Privacy Policy to continue.", - "Message and Data Rates Disclosure": "Message and Data Rates May Apply. Reply <%= help_string %> to 827-222 for help. Reply <%= stop_string %> to 827-222 to stop texts. For additional assistance, visit support.uber.com or call (866) 576-1039. Supported Carriers: AT&T, Sprint, Verizon, and T-Mobile.", - "I Agree": "I agree to the Terms & Conditions and Privacy Policy", - "Security Code": "Security Code", - "Type of Card": "Type of Card", - "Personal": "Personal", - "Business": "Business", - "Code": "Code", - "Zip or Postal Code": "Zip or Postal Code", - "Your Trip": "Your Trip", - "Trip Info": "Trip Info", - "Request a fare review": "Request a fare review", - "Fare Review Submitted": "Your fare review has been submitted. We'll get back to you soon about your request. Sorry for any inconvenience this may have caused!", - "Fair Price Consideration": "We're committed to delivering Uber service at a fair price. Before requesting a fare review, please consider:", - "Your Fare Calculation": "Your Fare Calculation", - "Charges": "Charges", - "Discounts": "Discounts", - "Total Charge": "Total Charge", - "Uber pricing information": "Uber pricing information", - "Uber Pricing Information Message": "<%= learn_link %> is published on our website.", - "GPS Point Capture Disclosure": "Due to a finite number of GPS point captures, corners on your trip map may appear cut off or rounded. These minor inaccuracies result in a shorter measured distance, which always results in a cheaper trip.", - "Fare Review Note": "Please elaborate on why this trip requires a fare review. Your comments below will help us better establish the correct price for your trip:", - "Fare Review Error": "There was an error submitting the review. Please ensure that you have a message.", - "Sign In": "Sign In" - }; -}).call(this); -}, "translations/fr": function(exports, require, module) {(function() { - exports.translations = { - "Uber": "Uber", - "Sign Up": "Inscription", - "Ride Request": "Passer une Commande", - "Invite Friends": "Inviter vos Amis", - "Promotions": "Promotions", - "Billing": "Paiement", - "Settings": "Paramètres", - "Forgot Password?": "Mot de passe oublié ?", - "Password Recovery": "Récupération du mot de passe", - "Login": "Connexion", - "Trip Detail": "Détail de la Course", - "Password Reset": "Réinitialisation du mot de passe", - "Confirm Email": "Confirmation de l’e-mail", - "Request Ride": "Passer une Commande", - "Credit Card Number": "Numéro de Carte de Crédit", - "month": "mois", - "01-Jan": "01-Jan", - "02-Feb": "02-Fév", - "03-Mar": "03-Mar", - "04-Apr": "04-Avr", - "05-May": "05-Mai", - "06-Jun": "06-Juin", - "07-Jul": "07-Jui", - "08-Aug": "08-Aoû", - "09-Sep": "09-Sep", - "10-Oct": "10-Oct", - "11-Nov": "11-Nov", - "12-Dec": "12-Déc", - "year": "année", - "CVV": "Code de Sécurité", - "Category": "Type", - "personal": "personnel", - "business": "entreprise", - "Default Credit Card": "Carte par Défaut", - "Add Credit Card": "Ajouter une Carte", - "Expiry": "Expire", - "default card": "carte par défaut", - "make default": "choisir par défaut", - "Edit": "Modifier", - "Delete": "Supprimer", - "Expiry Month": "Mois d’Expiration", - "Expiry Year": "Année d’Expiration", - "Unable to Verify Card": "Impossible de vérifier la carte pour le moment. Merci de réessayer un peu plus tard.", - "Credit Card Update Succeeded": "Votre carte a été mise à jour avec succès !", - "Credit Card Update Failed": "Nous ne pouvons enregistrer vos changements. Merci de réessayer dans quelques minutes.", - "Credit Card Delete Succeeded": "Votre carte a été supprimée !", - "Credit Card Delete Failed": "Nous n’avons pas été en mesure de supprimer votre carte. Merci de réessayer plus tard.", - "Credit Card Update Category Succeeded": "Changement de catégorie de carte réussi !", - "Credit Card Update Category Failed": "Nous ne pouvons pas changer la catégorie de votre carte. Merci de réessayer dans quelques minutes.", - "Credit Card Update Default Succeeded": "Carte par défaut changée avec succès !", - "Credit Card Update Default Failed": "Nous ne pouvons pas changer votre carte par défaut. Merci de réessayer dans quelques minutes.", - "Hello Greeting": "Bonjour, <%= name %>", - "Card Ending in": "La carte expire dans", - "Trip Map": "Carte des Courses", - "Amount": "Montant: <%= amount %>", - "Last Attempt to Bill": "Dernière tentative de prélèvement : <%= date %>", - "Charge": "Débit", - "Uber Credit Balance Note": "Votre compte a un solde de <%= amount %> UberCredits. Lorsque nous facturons des courses, nous réduirons votre solde d’UberCredits avant de prélever votre carte de crédit.", - "Please Add Credit Card": "Merci d’ajouter une carte de crédit pour que nous puissions vous facturer.", - "Credit Cards": "Cartes de crédit", - "add a new credit card": "Ajouter une nouvelle carte de crédit", - "Account Balance": "Solde du compte", - "Arrears": "Arriérés", - "Billing Succeeded": "Votre carte a été correctement débitée.", - "Confirm Email Succeeded": "L’adresse e-mail a bien été validée, vous êtes redirigé vers le tableau de bord...", - "Confirm Email Failed": "Impossible de confirmer l’adresse e-mail. Merci de contacter support@uber.com si le problème persiste.", - "Credit Card Added": "Carte de crédit ajoutée", - "No Credit Card": "Pas de carte de crédit", - "Mobile Number Confirmed": "Numéro de téléphone confirmé", - "No Confirmed Mobile": "Pas de numéro de téléphone confirmé", - "E-mail Address Confirmed": "Adresse e-mail confirmée", - "No Confirmed E-mail": "Pas d’adresse e-mail confirmée", - 'Reply to sign up text': 'Répondre "GO" au SMS que vous avez reçu à l’inscription.', - "Resend text message": "Renvoyer le SMS", - "Click sign up link": "Cliquez sur le lien contenu dans l’e-mail reçu à l’inscription.", - "Resend email": "Renvoyer l’e-mail", - "Add a credit card to ride": "Ajouter une carte de crédit et vous serez prêt à voyager avec Uber.", - "Your Most Recent Trip": "Votre course la plus récente", - "details": "détails", - "Your Trip History": "Historique de votre trajet", - "Status": "Statut", - "Here's how it works:": "Voici comment ça marche :", - "Show all trips": "Montrer toutes les courses", - "Set your location:": "Définir votre position :", - "App search for address": "Application iPhone/Android : positionner la punaise ou rechercher une adresse", - "SMS text address": "SMS : envoyez votre adresse à UBRCAB (827222)", - "Confirm pickup request": "Validez la commande", - "Uber sends ETA": "Uber envoie un temps d’attente estimé (habituellement entre 5 et 10 minutes)", - "Car arrives": "Lorsque votre voiture arrive, Uber vous en informera encore..", - "Ride to destination": "Montez dans la voiture et donnez votre destination au chauffeur.", - "Thank your driver": "C’est tout ! Remerciez le chauffeur mais souvenez-vous que les pourboires sont compris et qu’il n’est pas nécessaire d’avoir du liquide sur soi.", - "Trip started here": "La course a commencé ici.", - "Trip ended here": "La course s’est terminée ici.", - "Sending Email": "Envoi de l’e-mail...", - "Resend Email Succeeded": "Nous venons d’envoyer l’e-mail. Merci de cliquer sur le lien de confirmation que vous avez reçu.", - "Resend Email Failed": "Il y a eu un problème lors de l’envoi de l’email. Merci de contacter le support si le problème persiste.", - "Resend Text Succeeded": 'Nous venons d’envoyer le SMS. Merci de répondre "GO" au message que vous avez reçu. Il se peut que cela prenne quelques minutes pour que le message arrive sur votre téléphone.', - "Resend Text Failed": "Il y a eu un problème lors de l’envoi du SMS. Merci de contacter le support si le problème persiste.", - "Password Reset Error": "Il y a eu une error lors de la réinitialisation de votre mot de passe.", - "New Password:": "Nouveau mot de passe:", - "Forgot Password Error": "Votre nom d’utilisateur / adresse email ne peut être trouvé. Merci d’utiliser la même qu’à l’inscription.", - "Forgot Password Success": "Merci de consulter votre boîte mail pour suivre la demande de ‘réinitialisation de mot de passe.", - "Forgot Password Enter Email": "Merci de saisir votre adresse email et nous vous enverrons un lien vous permettant de réinitialiser votre mot de passe :", - "Invite friends": "Inviter vos amis", - "Give $ Get $": "Donnez $10, Recevez $10", - "Give $ Get $ Description": "Chaque ami que vous invitez à Uber recevra $10 de crédits Uber. Dès lors qu’une personne que vous aurez invité aura utilisé Uber pour la première, vous recevrez $10 de crédits Uber également !", - "What are you waiting for?": "N’attendez plus ! Lancez les invitations !", - "Tweet": "Tweeter", - "Invite Link": "Envoyez ce lien par email ou messagerie instantanée à vos amis :", - "Enter Promotion Code": "Si vous avez un code promo, saisissez-le ici:", - "Your Active Promotions": "Vos Codes Promos Actifs", - "Code": "Code", - "Details": "Détails", - "Trips Remaining": "Courses restantes", - "Expires": "Expire", - "No Active Promotions": "Vous n’avez pas de code promo actif.", - "Your Available Promotions": "Votres Promos Disponibles", - "Where do you want us to pick you up?": "Où souhaitez-vous que nous vous prenions en charge ?", - "Address to search": "Adresse à rechercher", - "Search": "Chercher", - "Driver Name:": "Nom du chauffeur:", - "Driver #:": "# Chauffeur:", - "Pickup Address:": "Lieu de prise en charge:", - "Add to Favorite Locations": "Ajoutez aux Lieux Favoris", - "Star": "Étoiles", - "Nickname:": "Pseudo", - "Add": "Ajouter", - "Your last trip": "Votre dernière course", - "Please rate your driver:": "Merci de noter votre chauffeur :", - "Comments: (optional)": "Commentaires: (optionnel)", - "Rate Trip": "Notez votre course", - "Pickup time:": "Heure de Prise en Charge :", - "Miles:": "Kilomètres :", - "Trip time:": "Temps de course :", - "Fare:": "Tarif :", - "Favorite Locations": "Lieux Favoris", - "Search Results": "Résultats", - "You have no favorite locations saved.": "Vous n’avez pas de lieux de prise en charge favoris.", - "Loading...": "Chargement...", - "Request Pickup": "Commander ici", - "Cancel Pickup": "Annuler", - "Requesting Closest Driver": "Nous demandons au chauffeur le plus proche de vous prendre en charge...", - "En Route": "Vous êtes actuellement en route...", - "Rate Last Trip": "Merci de noter votre précédent trajet pour faire une autre course.", - "Rate Before Submitting": "Merci de noter votre trajet avant de le valider.", - "Address too short": "L’adresse est trop courte", - "or did you mean": "ou vouliez-vous dire", - "Search Address Failed": "Impossible de trouver l’adresse spécifiée. Merci de saisir une autre adresse proche de l’endroit où vous vous trouvez.", - "Sending pickup request...": "Envoi de la demande de prise en charge...", - "Cancel Request Prompt": "Voulez-vous vraiment annuler votre demande ?", - "Cancel Request Arrived Prompt": 'Voulez-vous vraiment annuler votre demande ? Votre chauffeur est arrivé, vous serez donc facturé de $10 de frais d’annulation. Il pourrait être utile que vous appeliez votre chauffeur maintenant.', - "Favorite Location Nickname Length Error": "Le pseudo doit faire au moins 3 caractères de long", - "Favorite Location Save Succeeded": "Adresse enregistrée !", - "Favorite Location Save Failed": "Impossible d’enregistrer votre adresse. Merci de réessayer ultérieurement.", - "Favorite Location Title": "Adresse favorie <%= id %>", - "Search Location Title": "Recherche d’adresse <%= id %>", - "ETA Message": "Temps d’attente estimé: environ <%= minutes %> minutes", - "Nearest Cab Message": "Le chauffeur le plus proche sera là dans <%= minutes %> minute(s)", - "Arrival ETA Message": "Votre chauffeur arrivera dans <%= minutes %> minute(s)", - "Arriving Now Message": "Votre chauffeur est en approche...", - "Rating Driver Failed": "Impossible de contacter le serveur. Merci de réessayer ultérieurement ou de contacter le support si le problème persiste.", - "settings": "Paramètres", - "Information": "Information", - "Picture": "Photo", - "Change password": "Modifier votre mot de passe", - "Your current Picture": "Votre photo", - "Your Favorite Locations": "Vos lieux favoris", - "You have no favorite locations saved.": "Vous n’avez pas de lieu favori", - "Account Information": "Informations Personnelles", - "Mobile Phone Information": "Informations de Mobile", - "Change Your Password": "Changez votre mot de passe.", - "Country": "Pays", - "Language": "Langue", - "Favorite Location": "Lieu favori", - "No Approximate Address": "Impossible de trouver une adresse même approximative", - "Address:": "Adresse :", - "Information Update Succeeded": "Vos informations ont été mises à jour !", - "Information Update Failed": "Nous n’avons pas pu mettre à jour vos informations. Merci de réessayer dans quelques instants ou de contacter le support si le problème persiste.", - "Location Delete Succeeded": "Adresse supprimée !", - "Location Delete Failed": "Nous n’avons pas pu supprimée votre adresse favorie. Merci de réessayer plus tard ou de contacter le support si le problème persiste.", - "Location Edit Succeeded": "Modifications sauvegardées !", - "Location Edit Failed": "Nous n’avons pas pu sauvegarder vos modifications. Merci de réessayer dans quelques minutes.", - "Picture Update Succeeded": "Votre photo a été mise à jour !", - "Picture Update Failed": "Nous n’avons pas pu mettre à jour votre photo. Merci de réessayer dans quelques instants.", - "Personal Information": "Informations Personnelles", - "Mobile Phone Number": "Numéro de Téléphone Portable", - "Payment Information": "Informations de Facturation", - "Your card will not be charged until you take a trip.": "Votre carte ne sera pas débitée avant votre premier trajet.", - "Card Number": "Numéro de Carte", - "Promotion Code Input Label": "Code promo, code d’invitation ou “deal” acheté en ligne (optionnel)", - "Terms and Conditions": "Conditions Générales", - "HELP": "HELP", - "STOP": "STOP", - "Sign Up Agreement": "En souscrivant, j’accepte les <%= terms_link %> et <%= privacy_link %> et comprends qu’Uber est un outil de commande de chauffeur, et non un transporteur.", - "Sign Up Agreement Error": "Vous devez accepter les Conditions Générales d’utilisation d’Uber Terms and Conditions et la Politique de Confidentialité pour continuer.", - "Message and Data Rates Disclosure": "Les frais d’envoi de SMS et de consommation de données peuvent s’appliquer. Répondez <%= help_string %> au 827-222 pour obtenir de l’aide. Répondez <%= stop_string %> au 827-222 pour ne plus recevoir de SMS. Pour plus d’aide, visitez support.uber.com ou appelez le (866) 576-1039. Opérateurs supportés: AT&T, Sprint, Verizon, T-Mobile, Orange, SFR et Bouygues Telecom.", - "Zip/Postal Code": "Code Postal", - "Expiration Date": "Date D'expiration", - "Security Code": "Code de Sécurité", - "Type of Card": "Type", - "Personal": "Personnel", - "Business": "Entreprise", - "Promotion Code": "Code Promo", - "Legal Information": "Mentions Légales", - "I Agree": "J'accepte.", - "Your Trip": "Votre Course", - "Trip Info": "Informations de la Course", - "Request a fare review": "Demander un contrôle du tarif", - "Fare Review Submitted": "Votre demande de contrôle du tarif a été soumis. Nous reviendrons vers vous rapidement concernant cette demande. Nous nous excusons pour les dérangements éventuellement occasionnés !", - "Fair Price Consideration": "Nous nous engageons à proposer Uber à un tarif juste. Avant de demander un contrôle du tarif, merci de prendre en compte :", - "Your Fare Calculation": "Calcul du Prix", - "Charges": "Coûts", - "Discounts": "Réductions", - "Total Charge": "Coût total", - "Uber pricing information": "Information sur les prix d’Uber", - "Uber Pricing Information Message": "<%= learn_link %> est disponible sur notre site web.", - "GPS Point Capture Disclosure": "A cause d’un nombre limité de coordonnées GPS sauvegardées, les angles de votre trajet sur la carte peuvent apparaître coupés ou arrondis. Ces légères incohérences débouchent sur des distances mesurées plus courtes, ce qui implique toujours un prix du trajet moins élevé.", - "Fare Review Note": "Merci de nous expliquer pourquoi le tarif de cette course nécessite d’être contrôlé. Vos commentaires ci-dessous nous aideront à établir un prix plus juste si nécessaire :", - "Fare Review Error": "Il y a eu une erreur lors de l’envoi de la demande. Assurez-vous d’avoir bien ajouté une description à votre demande." - }; -}).call(this); -}, "views/clients/billing": function(exports, require, module) {(function() { - var clientsBillingTemplate; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - clientsBillingTemplate = require('templates/clients/billing'); - exports.ClientsBillingView = (function() { - __extends(ClientsBillingView, UberView); - function ClientsBillingView() { - ClientsBillingView.__super__.constructor.apply(this, arguments); - } - ClientsBillingView.prototype.id = 'billing_view'; - ClientsBillingView.prototype.className = 'view_container'; - ClientsBillingView.prototype.events = { - 'click a#add_card': 'addCard', - 'click .charge_arrear': 'chargeArrear' - }; - ClientsBillingView.prototype.render = function() { - this.RefreshUserInfo(__bind(function() { - var cards, newForm; - this.HideSpinner(); - $(this.el).html(clientsBillingTemplate()); - if (USER.payment_gateway.payment_profiles.length === 0) { - newForm = new app.views.clients.modules.creditcard; - $(this.el).find("#add_card_wrapper").html(newForm.render(0).el); - } else { - cards = new app.views.clients.modules.creditcard; - $("#cards").html(cards.render("all").el); - } - return this.delegateEvents(); - }, this)); - return this; - }; - ClientsBillingView.prototype.addCard = function(e) { - var newCard; - e.preventDefault(); - newCard = new app.views.clients.modules.creditcard; - $('#cards').append(newCard.render("new").el); - return $("a#add_card").hide(); - }; - ClientsBillingView.prototype.chargeArrear = function(e) { - var $el, arrearId, attrs, cardId, options, tryCharge; - e.preventDefault(); - $(".error_message").text(""); - $el = $(e.currentTarget); - arrearId = $el.attr('id'); - cardId = $el.parent().find('#card_to_charge').val(); - this.ShowSpinner('submit'); - tryCharge = new app.models.clientbills({ - id: arrearId - }); - attrs = { - payment_profile_id: cardId, - dataType: 'json' - }; - options = { - success: __bind(function(data, textStatus, jqXHR) { - $el.parent().find(".success_message").text(t("Billing Succeeded")); - $el.hide(); - return $el.parent().find('#card_to_charge').hide(); - }, this), - error: __bind(function(jqXHR, status, errorThrown) { - return $el.parent().find(".error_message").text(JSON.parse(status.responseText).error); - }, this), - complete: __bind(function() { - return this.HideSpinner(); - }, this) - }; - return tryCharge.save(attrs, options); - }; - return ClientsBillingView; - })(); -}).call(this); -}, "views/clients/confirm_email": function(exports, require, module) {(function() { - var clientsConfirmEmailTemplate; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - clientsConfirmEmailTemplate = require('templates/clients/confirm_email'); - exports.ClientsConfirmEmailView = (function() { - __extends(ClientsConfirmEmailView, UberView); - function ClientsConfirmEmailView() { - ClientsConfirmEmailView.__super__.constructor.apply(this, arguments); - } - ClientsConfirmEmailView.prototype.id = 'confirm_email_view'; - ClientsConfirmEmailView.prototype.className = 'view_container'; - ClientsConfirmEmailView.prototype.render = function(token) { - var attrs; - $(this.el).html(clientsConfirmEmailTemplate()); - attrs = { - data: { - email_token: token - }, - success: __bind(function(data, textStatus, jqXHR) { - var show_dashboard; - this.HideSpinner(); - show_dashboard = function() { - return app.routers.clients.navigate('!/dashboard', true); - }; - if (data.status === 'OK') { - $('.success_message').show(); - return _.delay(show_dashboard, 3000); - } else if (data.status === 'ALREADY_COMFIRMED') { - $('.already_confirmed_message').show(); - return _.delay(show_dashboard, 3000); - } else { - return $('.error_message').show(); - } - }, this), - error: __bind(function(e) { - this.HideSpinner(); - return $('.error_message').show(); - }, this), - complete: function(status) { - return $('#attempt_text').hide(); - }, - dataType: 'json', - type: 'PUT', - url: "" + API + "/users/self" - }; - $.ajax(attrs); - this.ShowSpinner('submit'); - return this; - }; - return ClientsConfirmEmailView; - })(); -}).call(this); -}, "views/clients/dashboard": function(exports, require, module) {(function() { - var clientsDashboardTemplate; - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - clientsDashboardTemplate = require('templates/clients/dashboard'); - exports.ClientsDashboardView = (function() { - var displayFirstTrip; - __extends(ClientsDashboardView, UberView); - function ClientsDashboardView() { - this.showAllTrips = __bind(this.showAllTrips, this); - this.render = __bind(this.render, this); - ClientsDashboardView.__super__.constructor.apply(this, arguments); - } - ClientsDashboardView.prototype.id = 'dashboard_view'; - ClientsDashboardView.prototype.className = 'view_container'; - ClientsDashboardView.prototype.events = { - 'click a.confirmation': 'confirmationClick', - 'click #resend_email': 'resendEmail', - 'click #resend_mobile': 'resendMobile', - 'click #show_all_trips': 'showAllTrips' - }; - ClientsDashboardView.prototype.render = function() { - var displayPage, downloadTrips; - this.HideSpinner(); - displayPage = __bind(function() { - $(this.el).html(clientsDashboardTemplate()); - this.confirmationsSetup(); - return this.RequireMaps(__bind(function() { - if (USER.trips.models[0]) { - if (!USER.trips.models[0].get("points")) { - return USER.trips.models[0].fetch({ - data: { - relationships: 'points' - }, - success: __bind(function() { - this.CacheData("USERtrips", USER.trips); - return displayFirstTrip(); - }, this) - }); - } else { - return displayFirstTrip(); - } - } - }, this)); - }, this); - downloadTrips = __bind(function() { - return this.DownloadUserTrips(displayPage, false, 10); - }, this); - this.RefreshUserInfo(downloadTrips); - return this; - }; - displayFirstTrip = __bind(function() { - var bounds, endPos, map, myOptions, path, polyline, startPos; - myOptions = { - zoom: 12, - mapTypeId: google.maps.MapTypeId.ROADMAP, - zoomControl: false, - rotateControl: false, - panControl: false, - mapTypeControl: false, - scrollwheel: false - }; - if (USER.trips.length === 10) { - $("#show_all_trips").show(); - } - if (USER.trips.length > 0) { - map = new google.maps.Map(document.getElementById("trip_details_map"), myOptions); - bounds = new google.maps.LatLngBounds(); - path = []; - _.each(USER.trips.models[0].get('points'), __bind(function(point) { - path.push(new google.maps.LatLng(point.lat, point.lng)); - return bounds.extend(_.last(path)); - }, this)); - map.fitBounds(bounds); - startPos = new google.maps.Marker({ - position: _.first(path), - map: map, - title: t('Trip started here'), - icon: 'https://uber-static.s3.amazonaws.com/marker_start.png' - }); - endPos = new google.maps.Marker({ - position: _.last(path), - map: map, - title: t('Trip ended here'), - icon: 'https://uber-static.s3.amazonaws.com/marker_end.png' - }); - polyline = new google.maps.Polyline({ - path: path, - strokeColor: '#003F87', - strokeOpacity: 1, - strokeWeight: 5 - }); - return polyline.setMap(map); - } - }, ClientsDashboardView); - ClientsDashboardView.prototype.confirmationsSetup = function() { - var blink, cardForm, element, _ref, _ref2, _ref3, _ref4, _ref5; - blink = function(element) { - var opacity; - opacity = 0.5; - if (element.css('opacity') === "0.5") { - opacity = 1.0; - } - return element.fadeTo(2000, opacity, function() { - return blink(element); - }); - }; - if (((_ref = window.USER) != null ? (_ref2 = _ref.payment_gateway) != null ? (_ref3 = _ref2.payment_profiles) != null ? _ref3.length : void 0 : void 0 : void 0) === 0) { - element = $('#confirmed_credit_card'); - cardForm = new app.views.clients.modules.creditcard; - $('#card.info').append(cardForm.render().el); - blink(element); - } - if (((_ref4 = window.USER) != null ? _ref4.confirm_email : void 0) === false) { - element = $('#confirmed_email'); - blink(element); - } - if ((((_ref5 = window.USER) != null ? _ref5.confirm_mobile : void 0) != null) === false) { - element = $('#confirmed_mobile'); - return blink(element); - } - }; - ClientsDashboardView.prototype.confirmationClick = function(e) { - e.preventDefault(); - $('.info').hide(); - $('#more_info').show(); - switch (e.currentTarget.id) { - case "card": - return $('#card.info').slideToggle(); - case "mobile": - return $('#mobile.info').slideToggle(); - case "email": - return $('#email.info').slideToggle(); - } - }; - ClientsDashboardView.prototype.resendEmail = function(e) { - var $el; - e.preventDefault(); - $el = $(e.currentTarget); - $el.removeAttr('href').prop({ - disabled: true - }); - $el.html(t("Sending Email")); - return $.ajax({ - type: 'GET', - url: API + '/users/request_confirm_email', - data: { - token: USER.token - }, - dataType: 'json', - success: __bind(function(data, textStatus, jqXHR) { - return $el.html(t("Resend Email Succeeded")); - }, this), - error: __bind(function(jqXHR, textStatus, errorThrown) { - return $el.html(t("Resend Email Failed")); - }, this) - }); - }; - ClientsDashboardView.prototype.resendMobile = function(e) { - var $el; - e.preventDefault(); - $el = $(e.currentTarget); - $el.removeAttr('href').prop({ - disabled: true - }); - $el.html("Sending message..."); - return $.ajax({ - type: 'GET', - url: API + '/users/request_confirm_mobile', - data: { - token: USER.token - }, - dataType: 'json', - success: __bind(function(data, textStatus, jqXHR) { - return $el.html(t("Resend Text Succeeded")); - }, this), - error: __bind(function(jqXHR, textStatus, errorThrown) { - return $el.html(t("Resend Text Failed")); - }, this) - }); - }; - ClientsDashboardView.prototype.showAllTrips = function(e) { - e.preventDefault(); - $(e.currentTarget).hide(); - return this.DownloadUserTrips(this.render, true, 1000); - }; - return ClientsDashboardView; - }).call(this); -}).call(this); -}, "views/clients/forgot_password": function(exports, require, module) {(function() { - var clientsForgotPasswordTemplate; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - clientsForgotPasswordTemplate = require('templates/clients/forgot_password'); - exports.ClientsForgotPasswordView = (function() { - __extends(ClientsForgotPasswordView, UberView); - function ClientsForgotPasswordView() { - ClientsForgotPasswordView.__super__.constructor.apply(this, arguments); - } - ClientsForgotPasswordView.prototype.id = 'forgotpassword_view'; - ClientsForgotPasswordView.prototype.className = 'view_container modal_view_container'; - ClientsForgotPasswordView.prototype.events = { - "submit #password_reset": "passwordReset", - "click #password_reset_submit": "passwordReset", - "submit #forgot_password": "forgotPassword", - "click #forgot_password_submit": "forgotPassword" - }; - ClientsForgotPasswordView.prototype.render = function(token) { - this.HideSpinner(); - $(this.el).html(clientsForgotPasswordTemplate({ - token: token - })); - this.delegateEvents(); - return this; - }; - ClientsForgotPasswordView.prototype.forgotPassword = function(e) { - var attrs; - e.preventDefault(); - $('.success_message').hide(); - $(".error_message").hide(); - attrs = { - data: { - login: $("#login").val() - }, - success: __bind(function(data, textStatus, jqXHR) { - this.HideSpinner(); - $('.success_message').show(); - return $("#forgot_password").hide(); - }, this), - error: __bind(function(e) { - this.HideSpinner(); - return $('.error_message').show(); - }, this), - dataType: 'json', - type: 'PUT', - url: "" + API + "/users/forgot_password" - }; - $.ajax(attrs); - return this.ShowSpinner('submit'); - }; - ClientsForgotPasswordView.prototype.passwordReset = function(e) { - var attrs; - e.preventDefault(); - attrs = { - data: { - email_token: $("#token").val(), - password: $("#password").val() - }, - success: __bind(function(data, textStatus, jqXHR) { - this.HideSpinner(); - $.cookie('token', data.token); - amplify.store('USERjson', data); - app.refreshMenu(); - return location.hash = '!/dashboard'; - }, this), - error: __bind(function(e) { - this.HideSpinner(); - return $('#error_reset').show(); - }, this), - dataType: 'json', - type: 'PUT', - url: "" + API + "/users/self" - }; - $.ajax(attrs); - return this.ShowSpinner('submit'); - }; - return ClientsForgotPasswordView; - })(); -}).call(this); -}, "views/clients/invite": function(exports, require, module) {(function() { - var clientsInviteTemplate; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - clientsInviteTemplate = require('templates/clients/invite'); - exports.ClientsInviteView = (function() { - __extends(ClientsInviteView, UberView); - function ClientsInviteView() { - ClientsInviteView.__super__.constructor.apply(this, arguments); - } - ClientsInviteView.prototype.id = 'invite_view'; - ClientsInviteView.prototype.className = 'view_container'; - ClientsInviteView.prototype.render = function() { - this.ReadUserInfo(); - this.HideSpinner(); - $(this.el).html(clientsInviteTemplate()); - console.log(screen); - return this; - }; - return ClientsInviteView; - })(); -}).call(this); -}, "views/clients/login": function(exports, require, module) {(function() { - var clientsLoginTemplate; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - clientsLoginTemplate = require('templates/clients/login'); - exports.ClientsLoginView = (function() { - __extends(ClientsLoginView, UberView); - function ClientsLoginView() { - ClientsLoginView.__super__.constructor.apply(this, arguments); - } - ClientsLoginView.prototype.id = 'login_view'; - ClientsLoginView.prototype.className = 'view_container modal_view_container'; - ClientsLoginView.prototype.events = { - 'submit form': 'authenticate', - 'click button': 'authenticate' - }; - ClientsLoginView.prototype.initialize = function() { - _.bindAll(this, 'render'); - return this.render(); - }; - ClientsLoginView.prototype.render = function() { - this.HideSpinner(); - $(this.el).html(clientsLoginTemplate()); - this.delegateEvents(); - return this.place(); - }; - ClientsLoginView.prototype.authenticate = function(e) { - e.preventDefault(); - return $.ajax({ - type: 'POST', - url: API + '/auth/web_login/client', - data: { - login: $("#login").val(), - password: $("#password").val() - }, - dataType: 'json', - success: function(data, textStatus, jqXHR) { - $.cookie('user', JSON.stringify(data)); - $.cookie('token', data.token); - amplify.store('USERjson', data); - $('header').html(app.views.shared.menu.render().el); - return app.routers.clients.navigate('!/dashboard', true); - }, - error: function(jqXHR, textStatus, errorThrown) { - $.cookie('user', null); - $.cookie('token', null); - if (jqXHR.status === 403) { - $.cookie('redirected_user', JSON.stringify(JSON.parse(jqXHR.responseText).error_obj), { - domain: '.uber.com' - }); - window.location = 'http://partners.uber.com/'; - } - return $('.error_message').html(JSON.parse(jqXHR.responseText).error).hide().fadeIn(); - } - }); - }; - return ClientsLoginView; - })(); -}).call(this); -}, "views/clients/modules/credit_card": function(exports, require, module) {(function() { - var creditCardTemplate; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - creditCardTemplate = require('templates/clients/modules/credit_card'); - exports.CreditCardView = (function() { - __extends(CreditCardView, UberView); - function CreditCardView() { - CreditCardView.__super__.constructor.apply(this, arguments); - } - CreditCardView.prototype.id = 'creditcard_view'; - CreditCardView.prototype.className = 'module_container'; - CreditCardView.prototype.events = { - 'submit #credit_card_form': 'processNewCard', - 'click #new_card': 'processNewCard', - 'change #card_number': 'showCardType', - 'click .edit_card_show': 'showEditCard', - 'click .edit_card': 'editCard', - 'click .delete_card': 'deleteCard', - 'click .make_default': 'makeDefault', - 'change .use_case': 'saveUseCase' - }; - CreditCardView.prototype.initialize = function() { - return app.collections.paymentprofiles.bind("refresh", __bind(function() { - return this.RefreshUserInfo(__bind(function() { - this.render("all"); - return this.HideSpinner(); - }, this)); - }, this)); - }; - CreditCardView.prototype.render = function(cards) { - if (cards == null) { - cards = "new"; - } - if (cards === "all") { - app.collections.paymentprofiles.reset(USER.payment_gateway.payment_profiles); - cards = app.collections.paymentprofiles; - } - $(this.el).html(creditCardTemplate({ - cards: cards - })); - return this; - }; - CreditCardView.prototype.processNewCard = function(e) { - var $el, attrs, model, options; - e.preventDefault(); - this.ClearGlobalStatus(); - $el = $("#credit_card_form"); - $el.find('.error_message').html(""); - attrs = { - card_number: $el.find('#card_number').val(), - card_code: $el.find('#card_code').val(), - card_expiration_month: $el.find('#card_expiration_month').val(), - card_expiration_year: $el.find('#card_expiration_year').val(), - use_case: $el.find('#use_case').val(), - "default": $el.find('#default_check').prop("checked") - }; - options = { - statusCode: { - 200: __bind(function(e) { - this.HideSpinner(); - $('#cc_form_wrapper').hide(); - app.collections.paymentprofiles.trigger("refresh"); - $(this.el).remove(); - $("a#add_card").show(); - return $('section').html(app.views.clients.billing.render().el); - }, this), - 406: __bind(function(e) { - var error, errors, _i, _len, _ref, _results; - this.HideSpinner(); - errors = JSON.parse(e.responseText); - _ref = _.keys(errors); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - error = _ref[_i]; - _results.push(error === "top_of_form" ? $("#top_of_form").html(errors[error]) : $("#credit_card_form").find("#" + error).parent().find(".error_message").html(errors[error])); - } - return _results; - }, this), - 420: __bind(function(e) { - this.HideSpinner(); - return $("#top_of_form").html(t("Unable to Verify Card")); - }, this) - } - }; - this.ShowSpinner("submit"); - model = new app.models.paymentprofile; - model.save(attrs, options); - return app.collections.paymentprofiles.add(model); - }; - CreditCardView.prototype.showCardType = function(e) { - var $el, reAmerica, reDiscover, reMaster, reVisa, validCard; - reVisa = /^4\d{3}-?\d{4}-?\d{4}-?\d{4}$/; - reMaster = /^5[1-5]\d{2}-?\d{4}-?\d{4}-?\d{4}$/; - reAmerica = /^6011-?\d{4}-?\d{4}-?\d{4}$/; - reDiscover = /^3[4,7]\d{13}$/; - $el = $("#card_logos"); - validCard = false; - if (e.currentTarget.value.match(reVisa)) { - validCard = true; - } else if (e.currentTarget.value.match(reMaster)) { - $el.css('background-position', "-60px"); - validCard = true; - } else if (e.currentTarget.value.match(reAmerica)) { - $el.css('background-position', "-120px"); - validCard = true; - } else if (e.currentTarget.value.match(reDiscover)) { - $el.css('background-position', "-180px"); - validCard = true; - } - if (validCard) { - $el.css('width', "60px"); - return $el.css('margin-left', "180px"); - } else { - $el.css('width', "250px"); - return $el.css('margin-left', "80px"); - } - }; - CreditCardView.prototype.showEditCard = function(e) { - var $el, id; - e.preventDefault(); - $el = $(e.currentTarget); - if ($el.html() === t("Edit")) { - id = $el.html(t("Cancel")).parents("tr").attr("id").substring(1); - return $("#e" + id).show(); - } else { - id = $el.html(t("Edit")).parents("tr").attr("id").substring(1); - return $("#e" + id).hide(); - } - }; - CreditCardView.prototype.editCard = function(e) { - var $el, attrs, id, options; - e.preventDefault(); - this.ClearGlobalStatus(); - $el = $(e.currentTarget).parents("td"); - id = $el.parents("tr").attr("id").substring(1); - $el.attr('disabled', 'disabled'); - this.ShowSpinner('submit'); - attrs = { - card_expiration_month: $el.find('#card_expiration_month').val(), - card_expiration_year: $el.find('#card_expiration_year').val(), - card_code: $el.find('#card_code').val() - }; - options = { - success: __bind(function(response) { - this.HideSpinner(); - this.ShowSuccess(t("Credit Card Update Succeeded")); - $("#e" + id).hide(); - $("#d" + id).find(".edit_card_show").html(t("Edit")); - return app.collections.paymentprofiles.trigger("refresh"); - }, this), - error: __bind(function(e) { - this.HideSpinner(); - this.ShowError(t("Credit Card Update Failed")); - return $el.removeAttr('disabled'); - }, this) - }; - app.collections.paymentprofiles.models[id].set(attrs); - return app.collections.paymentprofiles.models[id].save({}, options); - }; - CreditCardView.prototype.deleteCard = function(e) { - var $el, id, options; - e.preventDefault(); - $el = $(e.currentTarget).parents("td"); - id = $el.parents("tr").attr("id").substring(1); - this.ClearGlobalStatus(); - this.ShowSpinner('submit'); - options = { - success: __bind(function(response) { - this.ShowSuccess(t("Credit Card Delete Succeeded")); - $("form").hide(); - app.collections.paymentprofiles.trigger("refresh"); - return $('section').html(app.views.clients.billing.render().el); - }, this), - error: __bind(function(xhr, e) { - this.HideSpinner(); - return this.ShowError(t("Credit Card Delete Failed")); - }, this) - }; - return app.collections.paymentprofiles.models[id].destroy(options); - }; - CreditCardView.prototype.saveUseCase = function(e) { - var $el, attrs, id, options, use_case; - this.ClearGlobalStatus(); - $el = $(e.currentTarget); - use_case = $el.val(); - id = $el.parents("tr").attr("id").substring(1); - attrs = { - use_case: use_case - }; - options = { - success: __bind(function(response) { - return this.ShowSuccess(t("Credit Card Update Category Succeeded")); - }, this), - error: __bind(function(e) { - return this.ShowError(t("Credit Card Update Category Failed")); - }, this) - }; - app.collections.paymentprofiles.models[id].set(attrs); - return app.collections.paymentprofiles.models[id].save({}, options); - }; - CreditCardView.prototype.makeDefault = function(e) { - var $el, attrs, id, options; - e.preventDefault(); - this.ClearGlobalStatus(); - $el = $(e.currentTarget).parents("td"); - id = $el.parents("tr").attr("id").substring(1); - attrs = { - "default": true - }; - options = { - success: __bind(function(response) { - this.ShowSuccess(t("Credit Card Update Default Succeeded")); - return app.collections.paymentprofiles.trigger("refresh"); - }, this), - error: __bind(function(e) { - return this.ShowError(t("Credit Card Update Default Failed")); - }, this) - }; - app.collections.paymentprofiles.models[id].set(attrs); - return app.collections.paymentprofiles.models[id].save({}, options); - }; - return CreditCardView; - })(); -}).call(this); -}, "views/clients/promotions": function(exports, require, module) {(function() { - var clientsPromotionsTemplate; - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - clientsPromotionsTemplate = require('templates/clients/promotions'); - exports.ClientsPromotionsView = (function() { - __extends(ClientsPromotionsView, UberView); - function ClientsPromotionsView() { - this.render = __bind(this.render, this); - ClientsPromotionsView.__super__.constructor.apply(this, arguments); - } - ClientsPromotionsView.prototype.id = 'promotions_view'; - ClientsPromotionsView.prototype.className = 'view_container'; - ClientsPromotionsView.prototype.events = { - 'submit form': 'submitPromo', - 'click button': 'submitPromo' - }; - ClientsPromotionsView.prototype.initialize = function() { - if (this.model) { - return this.RefreshUserInfo(this.render); - } - }; - ClientsPromotionsView.prototype.render = function() { - var renderTemplate; - this.ReadUserInfo(); - renderTemplate = __bind(function() { - $(this.el).html(clientsPromotionsTemplate({ - promos: window.USER.unexpired_client_promotions || [] - })); - return this.HideSpinner(); - }, this); - this.DownloadUserPromotions(renderTemplate); - return this; - }; - ClientsPromotionsView.prototype.submitPromo = function(e) { - var attrs, model, options, refreshTable; - e.preventDefault(); - this.ClearGlobalStatus(); - refreshTable = __bind(function() { - $('section').html(this.render().el); - return this.HideSpinner(); - }, this); - attrs = { - code: $('#code').val() - }; - options = { - success: __bind(function(response) { - this.HideSpinner(); - if (response.get('first_name')) { - return this.ShowSuccess("Your promotion has been applied in the form of an account credit. Click here to check your balance."); - } else { - this.ShowSuccess("Your promotion has successfully been applied"); - return this.RefreshUserInfo(this.render, true); - } - }, this), - statusCode: { - 400: __bind(function(e) { - this.ShowError(JSON.parse(e.responseText).error); - return this.HideSpinner(); - }, this) - } - }; - this.ShowSpinner("submit"); - model = new app.models.promotions; - return model.save(attrs, options); - }; - return ClientsPromotionsView; - })(); -}).call(this); -}, "views/clients/request": function(exports, require, module) {(function() { - var clientsRequestTemplate; - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - clientsRequestTemplate = require('templates/clients/request'); - exports.ClientsRequestView = (function() { - __extends(ClientsRequestView, UberView); - function ClientsRequestView() { - this.AjaxCall = __bind(this.AjaxCall, this); - this.AskDispatch = __bind(this.AskDispatch, this); - this.removeMarkers = __bind(this.removeMarkers, this); - this.displaySearchLoc = __bind(this.displaySearchLoc, this); - this.displayFavLoc = __bind(this.displayFavLoc, this); - this.showFavLoc = __bind(this.showFavLoc, this); - this.addToFavLoc = __bind(this.addToFavLoc, this); - this.removeCabs = __bind(this.removeCabs, this); - this.requestRide = __bind(this.requestRide, this); - this.rateTrip = __bind(this.rateTrip, this); - this.locationChange = __bind(this.locationChange, this); - this.panToLocation = __bind(this.panToLocation, this); - this.clickLocation = __bind(this.clickLocation, this); - this.searchLocation = __bind(this.searchLocation, this); - this.mouseoutLocation = __bind(this.mouseoutLocation, this); - this.mouseoverLocation = __bind(this.mouseoverLocation, this); - this.fetchTripDetails = __bind(this.fetchTripDetails, this); - this.submitRating = __bind(this.submitRating, this); - this.setStatus = __bind(this.setStatus, this); - this.initialize = __bind(this.initialize, this); - ClientsRequestView.__super__.constructor.apply(this, arguments); - } - ClientsRequestView.prototype.id = 'request_view'; - ClientsRequestView.prototype.className = 'view_container'; - ClientsRequestView.prototype.pollInterval = 2 * 1000; - ClientsRequestView.prototype.events = { - "submit #search_form": "searchAddress", - "click .locations_link": "locationLinkHandle", - "mouseover .location_row": "mouseoverLocation", - "mouseout .location_row": "mouseoutLocation", - "click .location_row": "clickLocation", - "click #search_location": "searchLocation", - "click #pickupHandle": "pickupHandle", - "click .stars": "rateTrip", - "submit #rating_form": "submitRating", - "click #addToFavButton": "showFavLoc", - "click #favLocNickname": "selectInputText", - "submit #favLoc_form": "addToFavLoc" - }; - ClientsRequestView.prototype.status = ""; - ClientsRequestView.prototype.pickupMarker = "https://uber-static.s3.amazonaws.com/pickup_marker.png"; - ClientsRequestView.prototype.cabMarker = "https://uber-static.s3.amazonaws.com/cab_marker.png"; - ClientsRequestView.prototype.initialize = function() { - var displayCabs; - displayCabs = __bind(function() { - return this.AskDispatch("NearestCab"); - }, this); - this.showCabs = _.throttle(displayCabs, this.pollInterval); - return this.numSearchToDisplay = 1; - }; - ClientsRequestView.prototype.setStatus = function(status) { - var autocomplete; - if (this.status === status) { - return; - } - try { - google.maps.event.trigger(this.map, 'resize'); - } catch (_e) {} - switch (status) { - case "init": - this.AskDispatch("StatusClient"); - this.status = "init"; - return this.ShowSpinner("load"); - case "ready": - this.HideSpinner(); - $(".panel").hide(); - $("#top_bar").fadeIn(); - $("#location_panel").fadeIn(); - $("#location_panel_control").fadeIn(); - $("#pickupHandle").attr("class", "button_green").fadeIn().find("span").html(t("Request Pickup")); - this.pickup_icon.setDraggable(true); - this.map.panTo(this.pickup_icon.getPosition()); - this.showCabs(); - try { - this.pickup_icon.setMap(this.map); - this.displayFavLoc(); - autocomplete = new google.maps.places.Autocomplete(document.getElementById('address'), { - types: ['geocode'] - }); - autocomplete.bindTo('bounds', this.map); - } catch (_e) {} - return this.status = "ready"; - case "searching": - this.HideSpinner(); - this.removeMarkers(); - $(".panel").hide(); - $("#top_bar").fadeOut(); - $("#status_message").html(t("Requesting Closest Driver")); - $("#pickupHandle").attr("class", "button_red").fadeIn().find("span").html(t("Cancel Pickup")); - this.pickup_icon.setDraggable(false); - this.pickup_icon.setMap(this.map); - return this.status = "searching"; - case "waiting": - this.HideSpinner(); - this.removeMarkers(); - $(".panel").hide(); - $("#top_bar").fadeOut(); - $("#pickupHandle").attr("class", "button_red").fadeIn().find("span").html(t("Cancel Pickup")); - $("#waiting_riding").fadeIn(); - this.pickup_icon.setDraggable(false); - this.pickup_icon.setMap(this.map); - return this.status = "waiting"; - case "arriving": - this.HideSpinner(); - this.removeMarkers(); - $(".panel").hide(); - $("#top_bar").fadeOut(); - $("#pickupHandle").attr("class", "button_red").fadeIn().find("span").html(t("Cancel Pickup")); - $("#waiting_riding").fadeIn(); - this.pickup_icon.setDraggable(false); - this.pickup_icon.setMap(this.map); - return this.status = "arriving"; - case "riding": - this.HideSpinner(); - this.removeMarkers(); - $(".panel").hide(); - $("#top_bar").fadeOut(); - $("#pickupHandle").fadeIn().attr("class", "button_red").find("span").html(t("Cancel Pickup")); - $("#waiting_riding").fadeIn(); - this.pickup_icon.setDraggable(false); - this.status = "riding"; - return $("#status_message").html(t("En Route")); - case "rate": - this.HideSpinner(); - $(".panel").hide(); - $("#pickupHandle").fadeOut(); - $("#trip_completed_panel").fadeIn(); - $('#status_message').html(t("Rate Last Trip")); - return this.status = "rate"; - } - }; - ClientsRequestView.prototype.render = function() { - this.ReadUserInfo(); - this.HideSpinner(); - this.ShowSpinner("load"); - $(this.el).html(clientsRequestTemplate()); - this.cabs = []; - this.RequireMaps(__bind(function() { - var center, myOptions, streetViewPano; - center = new google.maps.LatLng(37.7749295, -122.4194155); - this.markers = []; - this.pickup_icon = new google.maps.Marker({ - position: center, - draggable: true, - clickable: true, - icon: this.pickupMarker - }); - this.geocoder = new google.maps.Geocoder(); - myOptions = { - zoom: 12, - center: center, - mapTypeId: google.maps.MapTypeId.ROADMAP, - rotateControl: false, - rotateControl: false, - panControl: false - }; - this.map = new google.maps.Map($(this.el).find("#map_wrapper_right")[0], myOptions); - if (this.status === "ready") { - this.pickup_icon.setMap(this.map); - } - if (geo_position_js.init()) { - geo_position_js.getCurrentPosition(__bind(function(data) { - var location; - location = new google.maps.LatLng(data.coords.latitude, data.coords.longitude); - this.pickup_icon.setPosition(location); - this.map.panTo(location); - return this.map.setZoom(16); - }, this)); - } - this.setStatus("init"); - streetViewPano = this.map.getStreetView(); - google.maps.event.addListener(streetViewPano, 'visible_changed', __bind(function() { - if (streetViewPano.getVisible()) { - this.pickupMarker = "https://uber-static.s3.amazonaws.com/pickup_marker_large.png"; - this.cabMarker = "https://uber-static.s3.amazonaws.com/cab_marker_large.png"; - } else { - this.pickupMarker = "https://uber-static.s3.amazonaws.com/pickup_marker.png"; - this.cabMarker = "https://uber-static.s3.amazonaws.com/cab_marker.png"; - } - this.pickup_icon.setIcon(this.pickupMarker); - return _.each(this.cabs, __bind(function(cab) { - return cab.setIcon(this.cabMarker); - }, this)); - }, this)); - if (this.status === "ready") { - return this.displayFavLoc(); - } - }, this)); - return this; - }; - ClientsRequestView.prototype.submitRating = function(e) { - var $el, message, rating; - e.preventDefault(); - $el = $(e.currentTarget); - rating = 0; - _(5).times(function(num) { - if ($el.find(".stars#" + (num + 1)).attr("src") === "/web/img/star_active.png") { - return rating = num + 1; - } - }); - if (rating === 0) { - $("#status_message").html("").html(t("Rate Before Submitting")); - } else { - this.ShowSpinner("submit"); - this.AskDispatch("RatingDriver", { - rating: rating - }); - } - message = $el.find("#comments").val().toString(); - if (message.length > 5) { - return this.AskDispatch("Feedback", { - message: message - }); - } - }; - ClientsRequestView.prototype.fetchTripDetails = function(id) { - var trip; - trip = new app.models.trip({ - id: id - }); - return trip.fetch({ - data: { - relationships: 'points,driver,city' - }, - dataType: 'json', - success: __bind(function() { - var bounds, endPos, path, polyline, startPos; - bounds = new google.maps.LatLngBounds(); - path = []; - _.each(trip.get('points'), __bind(function(point) { - path.push(new google.maps.LatLng(point.lat, point.lng)); - return bounds.extend(_.last(path)); - }, this)); - startPos = new google.maps.Marker({ - position: _.first(path), - map: this.map, - title: t("Trip started here"), - icon: 'https://uber-static.s3.amazonaws.com/carstart.png' - }); - endPos = new google.maps.Marker({ - position: _.last(path), - map: this.map, - title: t("Trip ended here"), - icon: 'https://uber-static.s3.amazonaws.com/carstop.png' - }); - polyline = new google.maps.Polyline({ - path: path, - strokeColor: '#003F87', - strokeOpacity: 1, - strokeWeight: 5 - }); - polyline.setMap(this.map); - this.map.fitBounds(bounds); - $("#tripTime").html(app.helpers.parseDateTime(trip.get('pickup_local_time'), trip.get('city.timezone'))); - $("#tripDist").html(app.helpers.RoundNumber(trip.get('distance'), 2)); - $("#tripDur").html(app.helpers.FormatSeconds(trip.get('duration'))); - return $("#tripFare").html(app.helpers.FormatCurrency(trip.get('fare'))); - }, this) - }); - }; - ClientsRequestView.prototype.searchAddress = function(e) { - var $locationsDiv, address, alphabet, bounds, showResults; - alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - try { - e.preventDefault(); - } catch (_e) {} - $('.error_message').html(""); - $locationsDiv = $("
    "); - address = $('#address').val(); - bounds = new google.maps.LatLngBounds(); - if (address.length < 5) { - $('#status_message').html(t("Address too short")).fadeIn(); - return false; - } - showResults = __bind(function(address, index) { - var first_cell, row, second_cell; - if (index < this.numSearchToDisplay) { - first_cell = "
    " + address.formatted_address + "
    " + (t('or did you mean')) + "
    " + address.formatted_address + "
    - - - -
    Rod VaggGitHub/rvaggTwitter/@rvagg
    Benjamin ByholmGitHub/kkoopa
    Trevor NorrisGitHub/trevnorrisTwitter/@trevnorris
    - -Licence & copyright ------------------------ - -Copyright (c) 2013 Rod Vagg & 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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/nan.h b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/nan.h deleted file mode 100644 index b3eb02db..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/nan.h +++ /dev/null @@ -1,884 +0,0 @@ -/********************************************************************************** - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2013 NAN contributors: - * - Rod Vagg - * - Benjamin Byholm - * - Trevor Norris - * - * MIT +no-false-attribs License - * - * Version 0.3.2 (current Node unstable: 0.11.6, Node stable: 0.10.17) - * - * ChangeLog: - * * 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 - -// some generic helpers - -template static inline bool NanSetPointerSafe(T *var, T val) { - if (var) { - *var = val; - return true; - } else { - return false; - } -} - -template static inline T NanGetPointerSafe( - T *var, - T fallback = reinterpret_cast(0)) { - if (var) { - return *var; - } else { - return fallback; - } -} - -#define NanSymbol(value) v8::String::NewSymbol(value) - -static 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(); - } -} - -static inline bool NanBooleanOptionValue( - v8::Local optionsObj - , v8::Handle opt) { - return NanBooleanOptionValue(optionsObj, opt, false); -} - -static 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) - -static v8::Isolate* nan_isolate = v8::Isolate::GetCurrent(); - -# define _NAN_METHOD_ARGS const v8::FunctionCallbackInfo& args -# define NAN_METHOD(name) void name(_NAN_METHOD_ARGS) -# define _NAN_GETTER_ARGS const v8::PropertyCallbackInfo& args -# define NAN_GETTER(name) \ - void name(v8::Local property, _NAN_GETTER_ARGS) -# define _NAN_SETTER_ARGS const v8::PropertyCallbackInfo& args -# define NAN_SETTER(name) \ - void name( \ - v8::Local property \ - , v8::Local value \ - , _NAN_SETTER_ARGS) -# define _NAN_PROPERTY_GETTER_ARGS \ - const v8::PropertyCallbackInfo& args -# define NAN_PROPERTY_GETTER(name) \ - void name(v8::Local property \ - , _NAN_PROPERTY_GETTER_ARGS) -# define _NAN_PROPERTY_SETTER_ARGS \ - const v8::PropertyCallbackInfo& args -# define NAN_PROPERTY_SETTER(name) \ - void name(v8::Local property \ - , v8::Local value \ - , _NAN_PROPERTY_SETTER_ARGS) -# define _NAN_PROPERTY_ENUMERATOR_ARGS \ - const v8::PropertyCallbackInfo& args -# define NAN_PROPERTY_ENUMERATOR(name) \ - void name(_NAN_PROPERTY_ENUMERATOR_ARGS) -# define _NAN_PROPERTY_DELETER_ARGS \ - const v8::PropertyCallbackInfo& args -# define NAN_PROPERTY_DELETER(name) \ - void name( \ - v8::Local property \ - , _NAN_PROPERTY_DELETER_ARGS) -# define _NAN_PROPERTY_QUERY_ARGS \ - const v8::PropertyCallbackInfo& args -# define NAN_PROPERTY_QUERY(name) \ - void name(v8::Local property, _NAN_PROPERTY_QUERY_ARGS) -# define NanGetInternalFieldPointer(object, index) \ - object->GetAlignedPointerFromInternalField(index) -# define NanSetInternalFieldPointer(object, index, value) \ - object->SetAlignedPointerInInternalField(index, value) - -# define NAN_WEAK_CALLBACK(type, name) \ - void name( \ - v8::Isolate* isolate, \ - v8::Persistent* object, \ - type data) -# define NAN_WEAK_CALLBACK_OBJECT (*object) -# define NAN_WEAK_CALLBACK_DATA(type) ((type) data) - -# define NanScope() v8::HandleScope scope(nan_isolate) -# 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 NanAssignPersistent(type, handle, obj) handle.Reset(nan_isolate, obj) -# define NanInitPersistent(type, name, obj) \ - v8::Persistent name(nan_isolate, obj) -# define NanObjectWrapHandle(obj) obj->handle() -# define NanMakeWeak(handle, parameter, callback) \ - handle.MakeWeak(nan_isolate, parameter, callback) - -# define _NAN_THROW_ERROR(fun, errmsg) \ - do { \ - NanScope(); \ - v8::ThrowException(fun(v8::String::New(errmsg))); \ - } while (0); - - inline static void NanThrowError(const char* errmsg) { - _NAN_THROW_ERROR(v8::Exception::Error, errmsg); - } - - inline static void NanThrowError(v8::Handle error) { - NanScope(); - v8::ThrowException(error); - } - - inline static void NanThrowError(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)); - NanThrowError(err); - } - - inline static void NanThrowTypeError(const char* errmsg) { - _NAN_THROW_ERROR(v8::Exception::TypeError, errmsg); - } - - inline static void NanThrowRangeError(const char* errmsg) { - _NAN_THROW_ERROR(v8::Exception::RangeError, errmsg); - } - - template static inline void NanDispose(v8::Persistent &handle) { - handle.Dispose(nan_isolate); - handle.Clear(); - } - - static inline v8::Local NanNewBufferHandle ( - char *data, - size_t length, - node::smalloc::FreeCallback callback, - void *hint) { - return node::Buffer::New(data, length, callback, hint); - } - - static inline v8::Local NanNewBufferHandle ( - char *data, uint32_t size) { - return node::Buffer::New(data, size); - } - - static inline v8::Local NanNewBufferHandle (uint32_t size) { - return node::Buffer::New(size); - } - - static inline v8::Local NanBufferUse(char* data, uint32_t size) { - return node::Buffer::Use(data, size); - } - - template - inline v8::Local NanPersistentToLocal( - const v8::Persistent& persistent) { - if (persistent.IsWeak()) { - return v8::Local::New(nan_isolate, persistent); - } else { - return *reinterpret_cast*>( - const_cast*>(&persistent)); - } - } - - inline bool NanHasInstance( - v8::Persistent& function_template - , v8::Handle value) { - return NanPersistentToLocal(function_template)->HasInstance(value); - } - - static 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)); - } - -#else -// Node 0.8 and 0.10 - -# define _NAN_METHOD_ARGS const v8::Arguments& args -# define NAN_METHOD(name) v8::Handle name(_NAN_METHOD_ARGS) -# define _NAN_GETTER_ARGS const v8::AccessorInfo &args -# define NAN_GETTER(name) \ - v8::Handle name(v8::Local property, _NAN_GETTER_ARGS) -# define _NAN_SETTER_ARGS const v8::AccessorInfo &args -# define NAN_SETTER(name) \ - void name( \ - v8::Local property \ - , v8::Local value \ - , _NAN_SETTER_ARGS) -# define _NAN_PROPERTY_GETTER_ARGS const v8::AccessorInfo& args -# define NAN_PROPERTY_GETTER(name) \ - v8::Handle name(v8::Local property \ - , _NAN_PROPERTY_GETTER_ARGS) -# define _NAN_PROPERTY_SETTER_ARGS const v8::AccessorInfo& args -# define NAN_PROPERTY_SETTER(name) \ - v8::Handle name(v8::Local property \ - , v8::Local value \ - , _NAN_PROPERTY_SETTER_ARGS) -# define _NAN_PROPERTY_ENUMERATOR_ARGS const v8::AccessorInfo& args -# define NAN_PROPERTY_ENUMERATOR(name) \ - v8::Handle name(_NAN_PROPERTY_ENUMERATOR_ARGS) -# define _NAN_PROPERTY_DELETER_ARGS const v8::AccessorInfo& args -# define NAN_PROPERTY_DELETER(name) \ - v8::Handle name( \ - v8::Local property \ - , _NAN_PROPERTY_DELETER_ARGS) -# define _NAN_PROPERTY_QUERY_ARGS const v8::AccessorInfo& args -# define NAN_PROPERTY_QUERY(name) \ - v8::Handle name( \ - v8::Local property \ - , _NAN_PROPERTY_QUERY_ARGS) - -# define NanGetInternalFieldPointer(object, index) \ - object->GetPointerFromInternalField(index) -# define NanSetInternalFieldPointer(object, index, value) \ - object->SetPointerInInternalField(index, value) -# define NAN_WEAK_CALLBACK(type, name) void name( \ - v8::Persistent object, \ - void *data) -# define NAN_WEAK_CALLBACK_OBJECT object -# define NAN_WEAK_CALLBACK_DATA(type) ((type) data) - -# define NanScope() v8::HandleScope scope -# 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 NanInitPersistent(type, name, obj) \ - v8::Persistent name = v8::Persistent::New(obj) -# define NanAssignPersistent(type, handle, obj) \ - handle = v8::Persistent::New(obj) -# define NanObjectWrapHandle(obj) obj->handle_ -# define NanMakeWeak(handle, parameters, callback) \ - handle.MakeWeak(parameters, callback) - -# define _NAN_THROW_ERROR(fun, errmsg) \ - do { \ - NanScope(); \ - return v8::ThrowException(fun(v8::String::New(errmsg))); \ - } while (0); - - inline static v8::Handle NanThrowError(const char* errmsg) { - _NAN_THROW_ERROR(v8::Exception::Error, errmsg); - } - - inline static v8::Handle NanThrowError( - v8::Handle error) { - NanScope(); - return v8::ThrowException(error); - } - - inline static v8::Handle NanThrowError( - 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 NanThrowError(err); - } - - inline static v8::Handle NanThrowTypeError(const char* errmsg) { - _NAN_THROW_ERROR(v8::Exception::TypeError, errmsg); - } - - inline static v8::Handle NanThrowRangeError(const char* errmsg) { - _NAN_THROW_ERROR(v8::Exception::RangeError, errmsg); - } - - template static inline void NanDispose(v8::Persistent &handle) { - handle.Dispose(); - handle.Clear(); - } - - static inline v8::Local NanNewBufferHandle ( - char *data, - size_t length, - node::Buffer::free_callback callback, - void *hint) { - return v8::Local::New( - node::Buffer::New(data, length, callback, hint)->handle_); - } - - static inline v8::Local NanNewBufferHandle ( - char *data, uint32_t size) { - return v8::Local::New(node::Buffer::New(data, size)->handle_); - } - - static inline v8::Local NanNewBufferHandle (uint32_t size) { - return v8::Local::New(node::Buffer::New(size)->handle_); - } - - static inline void FreeData(char *data, void *hint) { - delete[] data; - } - - static inline v8::Local NanBufferUse(char* data, uint32_t size) { - return v8::Local::New( - node::Buffer::New(data, size, FreeData, NULL)->handle_); - } - - template - inline v8::Local NanPersistentToLocal( - const v8::Persistent& persistent) { - if (persistent.IsWeak()) { - return v8::Local::New(persistent); - } else { - return *reinterpret_cast*>( - const_cast*>(&persistent)); - } - } - - inline bool NanHasInstance( - v8::Persistent& function_template - , v8::Handle value) { - return function_template->HasInstance(value); - } - - static 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 = v8::Local::New(ctx); - ctx.Dispose(); - return lctx; - } - -#endif // node version - -class NanCallback { - public: - NanCallback(const v8::Local &fn) { - NanScope(); - v8::Local obj = v8::Object::New(); - obj->Set(NanSymbol("callback"), fn); - NanAssignPersistent(v8::Object, handle, obj); - } - - ~NanCallback() { - if (handle.IsEmpty()) return; - handle.Dispose(); - handle.Clear(); - } - - inline v8::Local GetFunction () { - return NanPersistentToLocal(handle)->Get(NanSymbol("callback")) - .As(); - } - - // deprecated - void Run(int argc, v8::Local argv[]) { - Call(argc, argv); - } - - void Call(int argc, v8::Local argv[]) { - NanScope(); - - v8::Local callback = NanPersistentToLocal(handle)-> - Get(NanSymbol("callback")).As(); - v8::TryCatch try_catch; - callback->Call(v8::Context::GetCurrent()->Global(), argc, argv); - if (try_catch.HasCaught()) { - node::FatalException(try_catch); - } - } - - private: - v8::Persistent handle; -}; - -/* abstract */ class NanAsyncWorker { -public: - NanAsyncWorker (NanCallback *callback) : callback(callback) { - request.data = this; - errmsg = NULL; - } - - virtual ~NanAsyncWorker () { - NanScope(); - - if (!persistentHandle.IsEmpty()) - NanDispose(persistentHandle); - if (callback) - delete callback; - if (errmsg) - delete errmsg; - } - - virtual void WorkComplete () { - NanScope(); - - if (errmsg == NULL) - HandleOKCallback(); - else - HandleErrorCallback(); - delete callback; - callback = NULL; - } - - virtual void Execute () =0; - - uv_work_t request; - -protected: - v8::Persistent persistentHandle; - NanCallback *callback; - const char *errmsg; - - void SavePersistent(const char *key, v8::Local &obj) { - NanScope(); - - v8::Local handle = NanPersistentToLocal(persistentHandle); - handle->Set(NanSymbol(key), obj); - } - - v8::Local GetFromPersistent(const char *key) { - NanScope(); - - v8::Local handle = NanPersistentToLocal(persistentHandle); - return handle->Get(NanSymbol(key)).As(); - } - - virtual void HandleOKCallback () { - NanScope(); - - callback->Call(0, NULL); - }; - - virtual void HandleErrorCallback () { - NanScope(); - - v8::Local argv[] = { - v8::Exception::Error(v8::String::New(errmsg)) - }; - callback->Call(1, argv); - } -}; - -inline void NanAsyncExecute (uv_work_t* req) { - NanAsyncWorker *worker = static_cast(req->data); - worker->Execute(); -} - -inline void NanAsyncExecuteComplete (uv_work_t* req) { - NanAsyncWorker* worker = static_cast(req->data); - worker->WorkComplete(); - delete worker; -} - -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. -static 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 -static size_t _nan_base64_decoded_size(const TypeName* 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 TypeName* src, - const size_t srcLen) { - char a, b, c, d; - char* dst = buf; - char* dstEnd = buf + len; - const TypeName* srcEnd = src + srcLen; - - while (src < srcEnd && dst < dstEnd) { - int remaining = srcEnd - src; - - 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(TypeName 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 TypeName* 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 = v8::Local::New(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}; -} - -static inline char* NanFromV8String( - v8::Handle from - , enum Nan::Encoding encoding = Nan::UTF8 - , size_t *datalen = NULL - , char *buf = NULL - , size_t buflen = 0 - , int flags = v8::String::NO_NULL_TERMINATION - | v8::String::HINT_MANY_WRITES_EXPECTED) { - - 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 = buf; - - v8::String::AsciiValue value(toStr); - switch(encoding) { - case Nan::ASCII: -#if NODE_MODULE_VERSION < 0x0C - 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, 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 < 0x0C - // TODO(isaacs): THIS IS AWFUL!!! - // AGREE(kkoopa) - { - uint16_t* twobytebuf = new uint16_t[sz_ + term_len]; - - size_t len = toStr->Write(twobytebuf, 0, 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 - , 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, sz_ + term_len, NULL, flags) - term_len); - return to; - case Nan::BASE64: - sz_ = _nan_base64_decoded_size(*value, toStr->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 - , sz_ + term_len - , flags); - NanSetPointerSafe(datalen, bc); - return to; - } - case Nan::HEX: - sz_ = toStr->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; -} - -#endif diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/package.json b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/package.json deleted file mode 100644 index 34ba61a9..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "nan", - "version": "0.3.2", - "description": "Native Abstractions for Node.js: C++ header for Node 0.8->0.12 compatibility", - "main": ".index.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" - } - ], - "license": "MIT", - "readme": "Native Abstractions for Node.js\n===============================\n\n**A header file filled with macro and utility goodness for making addon development for Node.js easier across versions 0.8, 0.10 and 0.11, and eventually 0.12.**\n\n***Current version: 0.3.2*** *(See [nan.h](https://github.com/rvagg/nan/blob/master/nan.h) for changelog)*\n\n[![NPM](https://nodei.co/npm/nan.png?downloads=true&stars=true)](https://nodei.co/npm/nan/) [![NPM](https://nodei.co/npm-dl/nan.png?months=6)](https://nodei.co/npm/nan/)\n\nThanks 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.\n\nThis project also contains some helper utilities that make addon development a bit more pleasant.\n\n * **[Usage](#usage)**\n * **[Example](#example)**\n * **[API](#api)**\n\n\n## Usage\n\nSimply add **NAN** as a dependency in the *package.json* of your Node addon:\n\n```js\n\"dependencies\": {\n ...\n \"nan\" : \"~0.3.1\"\n ...\n}\n```\n\nPull in the path to **NAN** in your *binding.gyp* so that you can use `#include \"nan.h\"` in your *.cpp*:\n\n```js\n\"include_dirs\" : [\n ...\n \"` when compiling your addon.\n\n\n## Example\n\nSee **[LevelDOWN](https://github.com/rvagg/node-leveldown/pull/48)** for a full example of **NAN** in use.\n\nFor 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**.\n\nCompare 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).\n\nNote 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.\n\n```c++\n// addon.cc\n#include \n#include \"nan.h\"\n// ...\n\nusing namespace v8;\n\nvoid InitAll(Handle exports) {\n exports->Set(NanSymbol(\"calculateSync\"),\n FunctionTemplate::New(CalculateSync)->GetFunction());\n\n exports->Set(NanSymbol(\"calculateAsync\"),\n FunctionTemplate::New(CalculateAsync)->GetFunction());\n}\n\nNODE_MODULE(addon, InitAll)\n```\n\n```c++\n// sync.h\n#include \n#include \"nan.h\"\n\nNAN_METHOD(CalculateSync);\n```\n\n```c++\n// sync.cc\n#include \n#include \"nan.h\"\n#include \"sync.h\"\n// ...\n\nusing namespace v8;\n\n// Simple synchronous access to the `Estimate()` function\nNAN_METHOD(CalculateSync) {\n NanScope();\n\n // expect a number as the first argument\n int points = args[0]->Uint32Value();\n double est = Estimate(points);\n\n NanReturnValue(Number::New(est));\n}\n```\n\n```c++\n// async.cc\n#include \n#include \"nan.h\"\n#include \"async.h\"\n\n// ...\n\nusing namespace v8;\n\nclass PiWorker : public NanAsyncWorker {\n public:\n PiWorker(NanCallback *callback, int points)\n : NanAsyncWorker(callback), points(points) {}\n ~PiWorker() {}\n\n // Executed inside the worker-thread.\n // It is not safe to access V8, or V8 data structures\n // here, so everything we need for input and output\n // should go on `this`.\n void Execute () {\n estimate = Estimate(points);\n }\n\n // Executed when the async work is complete\n // this function will be run inside the main event loop\n // so it is safe to use V8 again\n void HandleOKCallback () {\n NanScope();\n\n Local argv[] = {\n Local::New(Null())\n , Number::New(estimate)\n };\n\n callback->Call(2, argv);\n };\n\n private:\n int points;\n double estimate;\n};\n\n// Asynchronous access to the `Estimate()` function\nNAN_METHOD(CalculateAsync) {\n NanScope();\n\n int points = args[0]->Uint32Value();\n NanCallback *callback = new NanCallback(args[1].As());\n\n NanAsyncQueueWorker(new PiWorker(callback, points));\n NanReturnUndefined();\n}\n```\n\n\n## API\n\n * NAN_METHOD\n * NAN_GETTER\n * NAN_SETTER\n * NAN_PROPERTY_GETTER\n * NAN_PROPERTY_SETTER\n * NAN_PROPERTY_ENUMERATOR\n * NAN_PROPERTY_DELETER\n * NAN_PROPERTY_QUERY\n * NAN_WEAK_CALLBACK\n * NanReturnValue\n * NanReturnUndefined\n * NanReturnNull\n * NanReturnEmptyString\n * NanScope\n * NanLocker\n * NanUnlocker\n * NanGetInternalFieldPointer\n * NanSetInternalFieldPointer\n * NanObjectWrapHandle\n * NanMakeWeak\n * NanSymbol\n * NanGetPointerSafe\n * NanSetPointerSafe\n * NanFromV8String\n * NanBooleanOptionValue\n * NanUInt32OptionValue\n * NanThrowError, NanThrowTypeError, NanThrowRangeError, NanThrowError(Handle), NanThrowError(Handle, int)\n * NanNewBufferHandle(char *, size_t, FreeCallback, void *), NanNewBufferHandle(char *, uint32_t), NanNewBufferHandle(uint32_t)\n * NanBufferUse(char *, uint32_t)\n * NanNewContextHandle\n * NanHasInstance\n * NanPersistentToLocal\n * NanDispose\n * NanAssignPersistent\n * NanInitPersistent\n * NanCallback\n * NanAsyncWorker\n * NanAsyncQueueWorker\n\n\n### NAN_METHOD(methodname)\n\nUse `NAN_METHOD` to define your V8 accessible methods:\n\n```c++\n// .h:\nclass Foo : public node::ObjectWrap {\n ...\n\n static NAN_METHOD(Bar);\n static NAN_METHOD(Baz);\n}\n\n\n// .cc:\nNAN_METHOD(Foo::Bar) {\n ...\n}\n\nNAN_METHOD(Foo::Baz) {\n ...\n}\n```\n\nThe reason for this macro is because of the method signature change in 0.11:\n\n```c++\n// 0.10 and below:\nHandle name(const Arguments& args)\n\n// 0.11 and above\nvoid name(const FunctionCallbackInfo& args)\n```\n\nThe introduction of `FunctionCallbackInfo` brings additional complications:\n\n\n### NAN_GETTER(methodname)\n\nUse `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.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_GETTER`.\n\n\n### NAN_SETTER(methodname)\n\nUse `NAN_SETTER` to declare your V8 accessible setters. Same as `NAN_GETTER` but you also get a `Local` `value` object to work with.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_SETTER`.\n\n\n### NAN_PROPERTY_GETTER(cbname)\nUse `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.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_GETTER`.\n\n\n### NAN_PROPERTY_SETTER(cbname)\nUse `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.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_SETTER`.\n\n\n### NAN_PROPERTY_ENUMERATOR(cbname)\nUse `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.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_ENUMERATOR`.\n\n\n### NAN_PROPERTY_DELETER(cbname)\nUse `NAN_PROPERTY_DELETER` to declare your V8 accessible property deleters. Same as `NAN_PROPERTY_GETTER`.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_DELETER`.\n\n\n### NAN_PROPERTY_QUERY(cbname)\nUse `NAN_PROPERTY_QUERY` to declare your V8 accessible property queries. Same as `NAN_PROPERTY_GETTER`.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_QUERY`.\n\n\n### NAN_WEAK_CALLBACK(type, cbname)\n\nUse `NAN_WEAK_CALLBACK` to declare your V8 WeakReference callbacks. There is an object argument accessible through `NAN_WEAK_CALLBACK_OBJECT`. The `type` argument gives the type of the `data` argument, accessible through `NAN_WEAK_CALLBACK_DATA(type)`.\n\n```c++\nstatic NAN_WEAK_CALLBACK(BufferReference*, WeakCheck) {\n if (NAN_WEAK_CALLBACK_DATA(BufferReference*)->noLongerNeeded_) {\n delete NAN_WEAK_CALLBACK_DATA(BufferReference*);\n } else {\n // Still in use, revive, prevent GC\n NanMakeWeak(NAN_WEAK_CALLBACK_OBJECT, NAN_WEAK_CALLBACK_DATA(BufferReference*), &WeakCheck);\n }\n}\n\n```\n\n### NanReturnValue(Handle<Value>)\n\nUse `NanReturnValue` when you want to return a value from your V8 accessible method:\n\n```c++\nNAN_METHOD(Foo::Bar) {\n ...\n\n NanReturnValue(String::New(\"FooBar!\"));\n}\n```\n\nNo `return` statement required.\n\n\n### NanReturnUndefined()\n\nUse `NanReturnUndefined` when you don't want to return anything from your V8 accessible method:\n\n```c++\nNAN_METHOD(Foo::Baz) {\n ...\n\n NanReturnUndefined();\n}\n```\n\n\n### NanReturnNull()\n\nUse `NanReturnNull` when you want to return `Null` from your V8 accessible method:\n\n```c++\nNAN_METHOD(Foo::Baz) {\n ...\n\n NanReturnNull();\n}\n```\n\n\n### NanReturnEmptyString()\n\nUse `NanReturnEmptyString` when you want to return an empty `String` from your V8 accessible method:\n\n```c++\nNAN_METHOD(Foo::Baz) {\n ...\n\n NanReturnEmptyString();\n}\n```\n\n\n### NanScope()\n\nThe introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanScope()` necessary, use it in place of `HandleScope scope`:\n\n```c++\nNAN_METHOD(Foo::Bar) {\n NanScope();\n\n NanReturnValue(String::New(\"FooBar!\"));\n}\n```\n\n\n### NanLocker()\n\nThe introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanLocker()` necessary, use it in place of `Locker locker`:\n\n```c++\nNAN_METHOD(Foo::Bar) {\n NanLocker();\n ...\n NanUnlocker();\n}\n```\n\n\n### NanUnlocker()\n\nThe introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanUnlocker()` necessary, use it in place of `Unlocker unlocker`:\n\n```c++\nNAN_METHOD(Foo::Bar) {\n NanLocker();\n ...\n NanUnlocker();\n}\n```\n\n\n### void * NanGetInternalFieldPointer(Handle<Object>, int)\n\nGets a pointer to the internal field with at `index` from a V8 `Object` handle.\n\n```c++\nLocal obj;\n...\nNanGetInternalFieldPointer(obj, 0);\n```\n\n### void NanSetInternalFieldPointer(Handle<Object>, int, void *)\n\nSets the value of the internal field at `index` on a V8 `Object` handle.\n\n```c++\nstatic Persistent dataWrapperCtor;\n...\nLocal wrapper = NanPersistentToLocal(dataWrapperCtor)->NewInstance();\nNanSetInternalFieldPointer(wrapper, 0, this);\n```\n\n\n### Local<Object> NanObjectWrapHandle(Object)\n\nWhen you want to fetch the V8 object handle from a native object you've wrapped with Node's `ObjectWrap`, you should use `NanObjectWrapHandle`:\n\n```c++\nNanObjectWrapHandle(iterator)->Get(String::NewSymbol(\"end\"))\n```\n\n\n### NanMakeWeak(Persistent<T>, parameter, callback)\n\nMake a persistent reference weak.\n\n\n### String NanSymbol(char *)\n\nThis isn't strictly about compatibility, it's just an easier way to create string symbol objects (i.e. `String::NewSymbol(x)`), for getting and setting object properties, or names of objects.\n\n```c++\nbool foo = false;\nif (obj->Has(NanSymbol(\"foo\")))\n foo = optionsObj->Get(NanSymbol(\"foo\"))->BooleanValue()\n```\n\n\n### Type NanGetPointerSafe(Type *[, Type])\n\nA 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.\n\n```c++\nchar *plugh(uint32_t *optional) {\n char res[] = \"xyzzy\";\n uint32_t param = NanGetPointerSafe(optional, 0x1337);\n switch (param) {\n ...\n }\n NanSetPointerSafe(optional, 0xDEADBEEF);\n} \n```\n\n\n### bool NanSetPointerSafe(Type *, Type)\n\nA helper for setting optional argument pointers. If the pointer is `NULL`, the function simply return `false`. Otherwise, the value is assigned to the variable the pointer points to.\n\n```c++\nconst char *plugh(size_t *outputsize) {\n char res[] = \"xyzzy\";\n if !(NanSetPointerSafe(outputsize, strlen(res) + 1)) {\n ...\n }\n\n ...\n}\n```\n\n\n### char* NanFromV8String(Handle<Value>[, enum Nan::Encoding, size_t *, char *, size_t, int])\n\nWhen you want to convert a V8 `String` to a `char*` use `NanFromV8String`. It is possible to define an encoding that defaults to `Nan::UTF8` 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 optionally setting `String::WriteOptions`, which default to `String::HINT_MANY_WRITES_EXPECTED | String::NO_NULL_TERMINATION`.\nJust remember that you'll end up with an object that you'll need to `delete[]` at some point unless you supply your own buffer:\n\n```c++\nsize_t count;\nchar* name = NanFromV8String(args[0]);\nchar* decoded = NanFromV8String(args[1], Nan::BASE64, &count, NULL, 0, String::HINT_MANY_WRITES_EXPECTED);\nchar param_copy[count];\nmemcpy(param_copy, decoded, count);\ndelete[] decoded;\n```\n\n\n### bool NanBooleanOptionValue(Handle<Value>, Handle<String>[, bool])\n\nWhen 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`.\n\nThe optional last parameter is the *default* value, which is `false` if left off:\n\n```c++\n// `foo` is false unless the user supplies a truthy value for it\nbool foo = NanBooleanOptionValue(optionsObj, NanSymbol(\"foo\"));\n// `bar` is true unless the user supplies a falsy value for it\nbool bar = NanBooleanOptionValueDefTrue(optionsObj, NanSymbol(\"bar\"), true);\n```\n\n\n### uint32_t NanUInt32OptionValue(Handle<Value>, Handle<String>, uint32_t)\n\nSimilar 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.\n\nRequires all 3 arguments as a default is not optional:\n\n```c++\nuint32_t count = NanUInt32OptionValue(optionsObj, NanSymbol(\"count\"), 1024);\n```\n\n\n### NanThrowError(message), NanThrowTypeError(message), NanThrowRangeError(message), NanThrowError(Local<Value>), NanThrowError(Local<Value>, int)\n\nFor throwing `Error`, `TypeError` and `RangeError` objects. You should `return` this call:\n\n```c++\nreturn NanThrowError(\"you must supply a callback argument\");\n```\n\nCan 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`.\n\n\n### Local<Object> NanNewBufferHandle(char *, uint32_t), Local<Object> NanNewBufferHandle(uint32_t)\n\nThe `Buffer` API has changed a little in Node 0.11, this helper provides consistent access to `Buffer` creation:\n\n```c++\nNanNewBufferHandle((char*)value.data(), value.size());\n```\n\nCan also be used to initialize a `Buffer` with just a `size` argument.\n\nCan also be supplied with a `NAN_WEAK_CALLBACK` and a hint for the garbage collector, when dealing with weak references.\n\n\n### Local<Object> NanBufferUse(char*, uint32_t)\n\n`Buffer::New(char*, uint32_t)` prior to 0.11 would make a copy of the data.\nWhile it was possible to get around this, it required a shim by passing a\ncallback. So the new API `Buffer::Use(char*, uint32_t)` was introduced to remove\nneeding to use this shim.\n\n`NanBufferUse` uses the `char*` passed as the backing data, and will free the\nmemory automatically when the weak callback is called. Keep this in mind, as\ncareless use can lead to \"double free or corruption\" and other cryptic failures.\n\n\n### bool NanHasInstance(Persistent<FunctionTemplate>&, Handle<Value>)\n\nCan 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.\n\n\n### Local<Type> NanPersistentToLocal(Persistent<Type>&)\n\nAside from `FunctionCallbackInfo`, the biggest and most painful change to V8 in Node 0.11 is the many restrictions now placed on `Persistent` handles. They are difficult to assign and difficult to fetch the original value out of.\n\nUse `NanPersistentToLocal` to convert a `Persistent` handle back to a `Local` handle.\n\n```c++\nLocal handle = NanPersistentToLocal(persistentHandle);\n```\n\n\n### Local<Context> NanNewContextHandle([ExtensionConfiguration*, Handle<ObjectTemplate>, Handle<Value>])\nCreates a new `Local` handle.\n\n```c++\nLocal ftmpl = FunctionTemplate::New();\nLocal otmpl = ftmpl->InstanceTemplate();\nLocal ctx = NanNewContextHandle(NULL, otmpl);\n```\n\n\n### void NanDispose(Persistent<T> &)\n\nUse `NanDispose` to dispose a `Persistent` handle.\n\n```c++\nNanDispose(persistentHandle);\n```\n\n\n### NanAssignPersistent(type, handle, object)\n\nUse `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.\n\nIn 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`:\n\n```c++\nPersistent persistentHandle;\n\n...\n\nLocal obj = Object::New();\nobj->Set(NanSymbol(\"key\"), keyHandle); // where keyHandle might be a Local\nNanAssignPersistent(Object, persistentHandle, obj)\n```\n\n\n### NanInitPersistent(type, name, object)\n\nUser `NanInitPersistent` to declare and initialize a new `Persistent` with the supplied object. The assignment operator for `Persistent` is no longer public in Node 0.11, so this macro makes it easier to declare and initializing a new `Persistent`. See NanAssignPersistent for more information.\n\n```c++\nLocal obj = Object::New();\nobj->Set(NanSymbol(\"key\"), keyHandle); // where keyHandle might be a Local\nNanInitPersistent(Object, persistentHandle, obj);\n```\n\n\n### NanCallback\n\nBecause of the difficulties imposed by the changes to `Persistent` handles in V8 in Node 0.11, creating `Persistent` versions of your `Local` handles is annoyingly tricky. `NanCallback` makes it easier by taking your `Local` handle, making it persistent until the `NanCallback` is deleted and even providing a handy `Call()` method to fetch and execute the callback `Function`.\n\n```c++\nLocal callbackHandle = callback = args[0].As();\nNanCallback *callback = new NanCallback(callbackHandle);\n// pass `callback` around and it's safe from GC until you:\ndelete callback;\n```\n\nYou can execute the callback like so:\n\n```c++\n// no arguments:\ncallback->Call(0, NULL);\n\n// an error argument:\nLocal argv[] = {\n Exception::Error(String::New(\"fail!\"))\n};\ncallback->Call(1, argv);\n\n// a success argument:\nLocal argv[] = {\n Local::New(Null()),\n String::New(\"w00t!\")\n};\ncallback->Call(2, argv);\n```\n\n`NanCallback` also has a `Local GetCallback()` method that you can use to fetch a local handle to the underlying callback function if you need it.\n\n\n### NanAsyncWorker\n\n`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.\n\nSee a rough outline of the implementation:\n\n```c++\nclass NanAsyncWorker {\npublic:\n NanAsyncWorker (NanCallback *callback);\n\n // Clean up persistent handles and delete the *callback\n virtual ~NanAsyncWorker ();\n\n // Check the `char *errmsg` property and call HandleOKCallback()\n // or HandleErrorCallback depending on whether it has been set or not\n virtual void WorkComplete ();\n\n // You must implement this to do some async work. If there is an\n // error then allocate `errmsg` to to a message and the callback will\n // be passed that string in an Error object\n virtual void Execute ();\n\nprotected:\n // Set this if there is an error, otherwise it's NULL\n const char *errmsg;\n\n // Save a V8 object in a Persistent handle to protect it from GC\n void SavePersistent(const char *key, Local &obj);\n\n // Fetch a stored V8 object (don't call from within `Execute()`)\n Local GetFromPersistent(const char *key);\n\n // Default implementation calls the callback function with no arguments.\n // Override this to return meaningful data\n virtual void HandleOKCallback ();\n\n // Default implementation calls the callback function with an Error object\n // wrapping the `errmsg` string\n virtual void HandleErrorCallback ();\n};\n```\n\n\n### NanAsyncQueueWorker(NanAsyncWorker *)\n\n`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`.\n\n### Contributors\n\nNAN is only possible due to the excellent work of the following contributors:\n\n\n\n\n\n
    Rod VaggGitHub/rvaggTwitter/@rvagg
    Benjamin ByholmGitHub/kkoopa
    Trevor NorrisGitHub/trevnorrisTwitter/@trevnorris
    \n\nLicence & copyright\n-----------------------\n\nCopyright (c) 2013 Rod Vagg & NAN contributors (listed above).\n\nNative 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.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/rvagg/nan/issues" - }, - "homepage": "https://github.com/rvagg/nan", - "_id": "nan@0.3.2", - "_from": "nan@~0.3.0" -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/.npmignore b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/.npmignore deleted file mode 100644 index 6bfffbb7..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -npm-debug.log -node_modules -.*.swp -.lock-* -build/ diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/Makefile b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/Makefile deleted file mode 100644 index 7496b6fc..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/README.md b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/README.md deleted file mode 100644 index 4b39a2a7..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# options.js # - -A very light-weight in-code option parsers for node.js. - -## 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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/lib/options.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/lib/options.js deleted file mode 100644 index 4fc45e90..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/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/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/package.json b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/package.json deleted file mode 100644 index cbdc5c21..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/package.json +++ /dev/null @@ -1,33 +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.5", - "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" - }, - "readme": "# options.js #\n\nA very light-weight in-code option parsers for node.js.\n\n## License ##\n\n(The MIT License)\n\nCopyright (c) 2012 Einar Otto Stangvik <einaros@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/einaros/options.js/issues" - }, - "homepage": "https://github.com/einaros/options.js", - "_id": "options@0.0.5", - "_from": "options@>=0.0.5" -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/test/fixtures/test.conf b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/test/fixtures/test.conf deleted file mode 100644 index 6e624441..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/test/fixtures/test.conf +++ /dev/null @@ -1,4 +0,0 @@ -{ - "a": "foobar", - "b": false -} \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/test/options.test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/test/options.test.js deleted file mode 100644 index 6a1d9f5b..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/test/options.test.js +++ /dev/null @@ -1,140 +0,0 @@ -var Options = require('options') - , assert = require('assert'); - -describe('Options', function() { - describe('#ctor', function() { - it('initializes options', function() { - var option = new Options({a: true, b: false}); - assert.strictEqual(true, option.value.a); - assert.strictEqual(false, option.value.b); - }); - }); - - describe('#merge', function() { - it('merges options from another object', function() { - var option = new Options({a: true, b: false}); - option.merge({b: true}); - assert.strictEqual(true, option.value.a); - assert.strictEqual(true, option.value.b); - }); - it('does nothing when arguments are undefined', function() { - var option = new Options({a: true, b: false}); - option.merge(undefined); - assert.strictEqual(true, option.value.a); - assert.strictEqual(false, option.value.b); - }); - it('cannot set values that werent already there', function() { - var option = new Options({a: true, b: false}); - option.merge({c: true}); - assert.strictEqual('undefined', typeof option.value.c); - }); - it('can require certain options to be defined', function() { - var option = new Options({a: true, b: false, c: 3}); - var caughtException = false; - try { - option.merge({}, ['a', 'b', 'c']); - } - catch (e) { - caughtException = e.toString() == 'Error: options a, b and c must be defined'; - } - assert.strictEqual(true, caughtException); - }); - it('can require certain options to be defined, when options are undefined', function() { - var option = new Options({a: true, b: false, c: 3}); - var caughtException = false; - try { - option.merge(undefined, ['a', 'b', 'c']); - } - catch (e) { - caughtException = e.toString() == 'Error: options a, b and c must be defined'; - } - assert.strictEqual(true, caughtException); - }); - it('returns "this"', function() { - var option = new Options({a: true, b: false, c: 3}); - assert.strictEqual(option, option.merge()); - }); - }); - - describe('#copy', function() { - it('returns a new object with the indicated options', function() { - var option = new Options({a: true, b: false, c: 3}); - option.merge({c: 4}); - var obj = option.copy(['a', 'c']); - assert.strictEqual(true, obj.a); - assert.strictEqual(4, obj.c); - assert.strictEqual('undefined', typeof obj.b); - }); - }); - - describe('#value', function() { - it('can be enumerated', function() { - var option = new Options({a: true, b: false}); - assert.strictEqual(2, Object.keys(option.value).length); - }); - it('can not be used to set values', function() { - var option = new Options({a: true, b: false}); - option.value.b = true; - assert.strictEqual(false, option.value.b); - }); - it('can not be used to add values', function() { - var option = new Options({a: true, b: false}); - option.value.c = 3; - assert.strictEqual('undefined', typeof option.value.c); - }); - }); - - describe('#isDefined', function() { - it('returns true if the named value is defined', function() { - var option = new Options({a: undefined}); - assert.strictEqual(false, option.isDefined('a')); - option.merge({a: false}); - assert.strictEqual(true, option.isDefined('a')); - }); - }); - - describe('#isDefinedAndNonNull', function() { - it('returns true if the named value is defined and non-null', function() { - var option = new Options({a: undefined}); - assert.strictEqual(false, option.isDefinedAndNonNull('a')); - option.merge({a: null}); - assert.strictEqual(false, option.isDefinedAndNonNull('a')); - option.merge({a: 2}); - assert.strictEqual(true, option.isDefinedAndNonNull('a')); - }); - }); - - describe('#read', function() { - it('reads and merges config from a file', function() { - var option = new Options({a: true, b: true}); - option.read(__dirname + '/fixtures/test.conf'); - assert.strictEqual('foobar', option.value.a); - assert.strictEqual(false, option.value.b); - }); - - it('asynchronously reads and merges config from a file when a callback is passed', function(done) { - var option = new Options({a: true, b: true}); - option.read(__dirname + '/fixtures/test.conf', function(error) { - assert.strictEqual('foobar', option.value.a); - assert.strictEqual(false, option.value.b); - done(); - }); - }); - }); - - describe('#reset', function() { - it('resets options to defaults', function() { - var option = new Options({a: true, b: false}); - option.merge({b: true}); - assert.strictEqual(true, option.value.b); - option.reset(); - assert.strictEqual(false, option.value.b); - }); - }); - - it('is immutable', function() { - var option = new Options({a: true, b: false}); - option.foo = 2; - assert.strictEqual('undefined', typeof option.foo); - }); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/.npmignore b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/.npmignore deleted file mode 100644 index 6bfffbb7..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -npm-debug.log -node_modules -.*.swp -.lock-* -build/ diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/README.md b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/README.md deleted file mode 100644 index 55eb3c11..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# tinycolor # - -This is a no-fuzz, barebone, zero muppetry color module for node.js. \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/example.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/example.js deleted file mode 100644 index f7540468..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/example.js +++ /dev/null @@ -1,3 +0,0 @@ -require('./tinycolor'); -console.log('this should be red and have an underline!'.grey.underline); -console.log('this should have a blue background!'.bgBlue); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/package.json b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/package.json deleted file mode 100644 index c9a34e93..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "author": { - "name": "Einar Otto Stangvik", - "email": "einaros@gmail.com", - "url": "http://2x.io" - }, - "name": "tinycolor", - "description": "a to-the-point color module for node", - "version": "0.0.1", - "repository": { - "type": "git", - "url": "git://github.com/einaros/tinycolor.git" - }, - "engines": { - "node": ">=0.4.0" - }, - "dependencies": {}, - "devDependencies": {}, - "main": "tinycolor", - "readme": "# tinycolor #\n\nThis is a no-fuzz, barebone, zero muppetry color module for node.js.", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/einaros/tinycolor/issues" - }, - "homepage": "https://github.com/einaros/tinycolor", - "_id": "tinycolor@0.0.1", - "_from": "tinycolor@0.x" -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/tinycolor.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/tinycolor.js deleted file mode 100644 index 36e552c4..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/tinycolor.js +++ /dev/null @@ -1,31 +0,0 @@ -var styles = { - 'bold': ['\033[1m', '\033[22m'], - 'italic': ['\033[3m', '\033[23m'], - 'underline': ['\033[4m', '\033[24m'], - 'inverse': ['\033[7m', '\033[27m'], - 'black': ['\033[30m', '\033[39m'], - 'red': ['\033[31m', '\033[39m'], - 'green': ['\033[32m', '\033[39m'], - 'yellow': ['\033[33m', '\033[39m'], - 'blue': ['\033[34m', '\033[39m'], - 'magenta': ['\033[35m', '\033[39m'], - 'cyan': ['\033[36m', '\033[39m'], - 'white': ['\033[37m', '\033[39m'], - 'default': ['\033[39m', '\033[39m'], - 'grey': ['\033[90m', '\033[39m'], - 'bgBlack': ['\033[40m', '\033[49m'], - 'bgRed': ['\033[41m', '\033[49m'], - 'bgGreen': ['\033[42m', '\033[49m'], - 'bgYellow': ['\033[43m', '\033[49m'], - 'bgBlue': ['\033[44m', '\033[49m'], - 'bgMagenta': ['\033[45m', '\033[49m'], - 'bgCyan': ['\033[46m', '\033[49m'], - 'bgWhite': ['\033[47m', '\033[49m'], - 'bgDefault': ['\033[49m', '\033[49m'] -} -Object.keys(styles).forEach(function(style) { - Object.defineProperty(String.prototype, style, { - get: function() { return styles[style][0] + this + styles[style][1]; }, - enumerable: false - }); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/package.json b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/package.json deleted file mode 100644 index 71f2d880..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/package.json +++ /dev/null @@ -1,61 +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.4.31", - "keywords": [ - "Hixie", - "HyBi", - "Push", - "RFC-6455", - "WebSocket", - "WebSockets", - "real-time" - ], - "repository": { - "type": "git", - "url": "git://github.com/einaros/ws.git" - }, - "bin": { - "wscat": "./bin/wscat" - }, - "scripts": { - "test": "make test", - "install": "(node-gyp rebuild 2> builderror.log) || (exit 0)" - }, - "engines": { - "node": ">=0.4.0" - }, - "dependencies": { - "commander": "~0.6.1", - "nan": "~0.3.0", - "tinycolor": "0.x", - "options": ">=0.0.5" - }, - "devDependencies": { - "mocha": "1.12.0", - "should": "1.2.x", - "expect.js": "0.2.x", - "benchmark": "0.3.x", - "ansi": "latest" - }, - "browser": "./lib/browser.js", - "component": { - "scripts": { - "ws/index.js": "./lib/browser.js" - } - }, - "gypfile": true, - "readme": "[![Build Status](https://secure.travis-ci.org/einaros/ws.png)](http://travis-ci.org/einaros/ws)\n\n# ws: a node.js websocket library #\n\n`ws` is a simple to use websocket implementation, up-to-date against RFC-6455, and [probably the fastest WebSocket library for node.js](http://web.archive.org/web/20130314230536/http://hobbycoding.posterous.com/the-fastest-websocket-module-for-nodejs).\n\nPasses the quite extensive Autobahn test suite. See http://einaros.github.com/ws for the full reports.\n\nComes with a command line utility, `wscat`, which can either act as a server (--listen), or client (--connect); Use it to debug simple websocket services.\n\n## Protocol support ##\n\n* **Hixie draft 76** (Old and deprecated, but still in use by Safari and Opera. Added to ws version 0.4.2, but server only. Can be disabled by setting the `disableHixie` option to true.)\n* **HyBi drafts 07-12** (Use the option `protocolVersion: 8`, or argument `-p 8` for wscat)\n* **HyBi drafts 13-17** (Current default, alternatively option `protocolVersion: 13`, or argument `-p 13` for wscat)\n\n_See the echo.websocket.org example below for how to use the `protocolVersion` option._\n\n## Usage ##\n\n### Installing ###\n\n`npm install ws`\n\n### Sending and receiving text data ###\n\n```js\nvar WebSocket = require('ws');\nvar ws = new WebSocket('ws://www.host.com/path');\nws.on('open', function() {\n ws.send('something');\n});\nws.on('message', function(data, flags) {\n // flags.binary will be set if a binary data is received\n // flags.masked will be set if the data was masked\n});\n```\n\n### Sending binary data ###\n\n```js\nvar WebSocket = require('ws');\nvar ws = new WebSocket('ws://www.host.com/path');\nws.on('open', function() {\n var array = new Float32Array(5);\n for (var i = 0; i < array.length; ++i) array[i] = i / 2;\n ws.send(array, {binary: true, mask: true});\n});\n```\n\nSetting `mask`, as done for the send options above, will cause the data to be masked according to the websocket protocol. The same option applies for text data.\n\n### Server example ###\n\n```js\nvar WebSocketServer = require('ws').Server\n , wss = new WebSocketServer({port: 8080});\nwss.on('connection', function(ws) {\n ws.on('message', function(message) {\n console.log('received: %s', message);\n });\n ws.send('something');\n});\n```\n\n### Server sending broadcast data ###\n\n```js\nvar WebSocketServer = require('ws').Server\n , wss = new WebSocketServer({port: 8080});\n \nwss.broadcast = function(data) {\n\tfor(var i in this.clients)\n\t\tthis.clients[i].send(data);\n};\n```\n\n### Error handling best practices ###\n\n```js\n// If the WebSocket is closed before the following send is attempted\nws.send('something');\n\n// Errors (both immediate and async write errors) can be detected in an optional callback.\n// The callback is also the only way of being notified that data has actually been sent.\nws.send('something', function(error) {\n // if error is null, the send has been completed,\n // otherwise the error object will indicate what failed.\n});\n\n// Immediate errors can also be handled with try/catch-blocks, but **note**\n// that since sends are inherently asynchronous, socket write failures will *not*\n// be captured when this technique is used.\ntry {\n ws.send('something');\n}\ncatch (e) {\n // handle error\n}\n```\n\n### echo.websocket.org demo ###\n\n```js\nvar WebSocket = require('ws');\nvar ws = new WebSocket('ws://echo.websocket.org/', {protocolVersion: 8, origin: 'http://websocket.org'});\nws.on('open', function() {\n console.log('connected');\n ws.send(Date.now().toString(), {mask: true});\n});\nws.on('close', function() {\n console.log('disconnected');\n});\nws.on('message', function(data, flags) {\n console.log('Roundtrip time: ' + (Date.now() - parseInt(data)) + 'ms', flags);\n setTimeout(function() {\n ws.send(Date.now().toString(), {mask: true});\n }, 500);\n});\n```\n\n### wscat against echo.websocket.org ###\n\n $ npm install -g ws\n $ wscat -c ws://echo.websocket.org -p 8\n connected (press CTRL+C to quit)\n > hi there\n < hi there\n > are you a happy parrot?\n < are you a happy parrot?\n\n### Other examples ###\n\nFor a full example with a browser client communicating with a ws server, see the examples folder.\n\nNote that the usage together with Express 3.0 is quite different from Express 2.x. The difference is expressed in the two different serverstats-examples.\n\nOtherwise, see the test cases.\n\n### Running the tests ###\n\n`make test`\n\n## API Docs ##\n\nSee the doc/ directory for Node.js-like docs for the ws classes.\n\n## License ##\n\n(The MIT License)\n\nCopyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/einaros/ws/issues" - }, - "homepage": "https://github.com/einaros/ws", - "_id": "ws@0.4.31", - "_from": "ws@0.4.x" -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/src/bufferutil.cc b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/src/bufferutil.cc deleted file mode 100644 index f06777f4..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/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 = FunctionTemplate::New(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(String::NewSymbol("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(True()); - } - - 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(True()); - } - - 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(True()); - } -}; - -extern "C" void init (Handle target) -{ - NanScope(); - BufferUtil::Initialize(target); -} - -NODE_MODULE(bufferutil, init) - diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/src/validation.cc b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/src/validation.cc deleted file mode 100644 index 528eda1f..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/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) - { - HandleScope scope; - Local t = FunctionTemplate::New(New); - t->InstanceTemplate()->SetInternalFieldCount(1); - NODE_SET_METHOD(t, "isValidUTF8", Validation::IsValidUTF8); - target->Set(String::NewSymbol("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 ? True() : False()); - } -}; - -extern "C" void init (Handle target) -{ - NanScope(); - Validation::Initialize(target); -} - -NODE_MODULE(validation, init) - diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/BufferPool.test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/BufferPool.test.js deleted file mode 100644 index 1ee7ff0f..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/BufferPool.test.js +++ /dev/null @@ -1,63 +0,0 @@ -var BufferPool = require('../lib/BufferPool'); -require('should'); - -describe('BufferPool', function() { - describe('#ctor', function() { - it('allocates pool', function() { - var db = new BufferPool(1000); - db.size.should.eql(1000); - }); - }); - describe('#get', function() { - it('grows the pool if necessary', function() { - var db = new BufferPool(1000); - var buf = db.get(2000); - db.size.should.be.above(1000); - db.used.should.eql(2000); - buf.length.should.eql(2000); - }); - it('grows the pool after the first call, if necessary', function() { - var db = new BufferPool(1000); - var buf = db.get(1000); - db.used.should.eql(1000); - db.size.should.eql(1000); - buf.length.should.eql(1000); - var buf2 = db.get(1000); - db.used.should.eql(2000); - db.size.should.be.above(1000); - buf2.length.should.eql(1000); - }); - it('grows the pool according to the growStrategy if necessary', function() { - var db = new BufferPool(1000, function(db, length) { - return db.size + 2345; - }); - var buf = db.get(2000); - db.size.should.eql(3345); - buf.length.should.eql(2000); - }); - it('doesnt grow the pool if theres enough room available', function() { - var db = new BufferPool(1000); - var buf = db.get(1000); - db.size.should.eql(1000); - buf.length.should.eql(1000); - }); - }); - describe('#reset', function() { - it('shinks the pool', function() { - var db = new BufferPool(1000); - var buf = db.get(2000); - db.reset(true); - db.size.should.eql(1000); - }); - it('shrinks the pool according to the shrinkStrategy', function() { - var db = new BufferPool(1000, function(db, length) { - return db.used + length; - }, function(db) { - return 0; - }); - var buf = db.get(2000); - db.reset(true); - db.size.should.eql(0); - }); - }); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Receiver.hixie.test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Receiver.hixie.test.js deleted file mode 100644 index 043d3bc4..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Receiver.hixie.test.js +++ /dev/null @@ -1,158 +0,0 @@ -var assert = require('assert') - , expect = require('expect.js') - , Receiver = require('../lib/Receiver.hixie'); -require('./hybi-common'); - -describe('Receiver', function() { - it('can parse text message', function() { - var p = new Receiver(); - var packet = '00 48 65 6c 6c 6f ff'; - - var gotData = false; - p.ontext = function(data) { - gotData = true; - assert.equal('Hello', data); - }; - - p.add(getBufferFromHexString(packet)); - expect(gotData).to.equal(true); - }); - - it('can parse multiple text messages', function() { - var p = new Receiver(); - var packet = '00 48 65 6c 6c 6f ff 00 48 65 6c 6c 6f ff'; - - var gotData = false; - var messages = []; - p.ontext = function(data) { - gotData = true; - messages.push(data); - }; - - p.add(getBufferFromHexString(packet)); - expect(gotData).to.equal(true); - for (var i = 0; i < 2; ++i) { - expect(messages[i]).to.equal('Hello'); - } - }); - - it('can parse empty message', function() { - var p = new Receiver(); - var packet = '00 ff'; - - var gotData = false; - p.ontext = function(data) { - gotData = true; - assert.equal('', data); - }; - - p.add(getBufferFromHexString(packet)); - expect(gotData).to.equal(true); - }); - - it('can parse text messages delivered over multiple frames', function() { - var p = new Receiver(); - var packets = [ - '00 48', - '65 6c 6c', - '6f ff 00 48', - '65', - '6c 6c 6f', - 'ff' - ]; - - var gotData = false; - var messages = []; - p.ontext = function(data) { - gotData = true; - messages.push(data); - }; - - for (var i = 0; i < packets.length; ++i) { - p.add(getBufferFromHexString(packets[i])); - } - expect(gotData).to.equal(true); - for (var i = 0; i < 2; ++i) { - expect(messages[i]).to.equal('Hello'); - } - }); - - it('emits an error if a payload doesnt start with 0x00', function() { - var p = new Receiver(); - var packets = [ - '00 6c ff', - '00 6c ff ff', - 'ff 00 6c ff 00 6c ff', - '00', - '6c 6c 6f', - 'ff' - ]; - - var gotData = false; - var gotError = false; - var messages = []; - p.ontext = function(data) { - gotData = true; - messages.push(data); - }; - p.onerror = function(reason, code) { - gotError = code == true; - }; - - for (var i = 0; i < packets.length && !gotError; ++i) { - p.add(getBufferFromHexString(packets[i])); - } - expect(gotError).to.equal(true); - expect(messages[0]).to.equal('l'); - expect(messages[1]).to.equal('l'); - expect(messages.length).to.equal(2); - }); - - it('can parse close messages', function() { - var p = new Receiver(); - var packets = [ - 'ff 00' - ]; - - var gotClose = false; - var gotError = false; - p.onclose = function() { - gotClose = true; - }; - p.onerror = function(reason, code) { - gotError = code == true; - }; - - for (var i = 0; i < packets.length && !gotError; ++i) { - p.add(getBufferFromHexString(packets[i])); - } - expect(gotClose).to.equal(true); - expect(gotError).to.equal(false); - }); - - it('can parse binary messages delivered over multiple frames', function() { - var p = new Receiver(); - var packets = [ - '80 05 48', - '65 6c 6c', - '6f 80 80 05 48', - '65', - '6c 6c 6f' - ]; - - var gotData = false; - var messages = []; - p.ontext = function(data) { - gotData = true; - messages.push(data); - }; - - for (var i = 0; i < packets.length; ++i) { - p.add(getBufferFromHexString(packets[i])); - } - expect(gotData).to.equal(true); - for (var i = 0; i < 2; ++i) { - expect(messages[i]).to.equal('Hello'); - } - }); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Receiver.test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Receiver.test.js deleted file mode 100644 index b0b5c0a4..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Receiver.test.js +++ /dev/null @@ -1,255 +0,0 @@ -var assert = require('assert') - , Receiver = require('../lib/Receiver'); -require('should'); -require('./hybi-common'); - -describe('Receiver', function() { - it('can parse unmasked text message', function() { - var p = new Receiver(); - var packet = '81 05 48 65 6c 6c 6f'; - - var gotData = false; - p.ontext = function(data) { - gotData = true; - assert.equal('Hello', data); - }; - - p.add(getBufferFromHexString(packet)); - gotData.should.be.ok; - }); - it('can parse close message', function() { - var p = new Receiver(); - var packet = '88 00'; - - var gotClose = false; - p.onclose = function(data) { - gotClose = true; - }; - - p.add(getBufferFromHexString(packet)); - gotClose.should.be.ok; - }); - it('can parse masked text message', function() { - var p = new Receiver(); - var packet = '81 93 34 83 a8 68 01 b9 92 52 4f a1 c6 09 59 e6 8a 52 16 e6 cb 00 5b a1 d5'; - - var gotData = false; - p.ontext = function(data) { - gotData = true; - assert.equal('5:::{"name":"echo"}', data); - }; - - p.add(getBufferFromHexString(packet)); - gotData.should.be.ok; - }); - it('can parse a masked text message longer than 125 bytes', function() { - var p = new Receiver(); - var message = 'A'; - for (var i = 0; i < 300; ++i) message += (i % 5).toString(); - var packet = '81 FE ' + pack(4, message.length) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(message, '34 83 a8 68')); - - var gotData = false; - p.ontext = function(data) { - gotData = true; - assert.equal(message, data); - }; - - p.add(getBufferFromHexString(packet)); - gotData.should.be.ok; - }); - it('can parse a really long masked text message', function() { - var p = new Receiver(); - var message = 'A'; - for (var i = 0; i < 64*1024; ++i) message += (i % 5).toString(); - var packet = '81 FF ' + pack(16, message.length) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(message, '34 83 a8 68')); - - var gotData = false; - p.ontext = function(data) { - gotData = true; - assert.equal(message, data); - }; - - p.add(getBufferFromHexString(packet)); - gotData.should.be.ok; - }); - it('can parse a fragmented masked text message of 300 bytes', function() { - var p = new Receiver(); - var message = 'A'; - for (var i = 0; i < 300; ++i) message += (i % 5).toString(); - var msgpiece1 = message.substr(0, 150); - var msgpiece2 = message.substr(150); - var packet1 = '01 FE ' + pack(4, msgpiece1.length) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(msgpiece1, '34 83 a8 68')); - var packet2 = '80 FE ' + pack(4, msgpiece2.length) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(msgpiece2, '34 83 a8 68')); - - var gotData = false; - p.ontext = function(data) { - gotData = true; - assert.equal(message, data); - }; - - p.add(getBufferFromHexString(packet1)); - p.add(getBufferFromHexString(packet2)); - gotData.should.be.ok; - }); - it('can parse a ping message', function() { - var p = new Receiver(); - var message = 'Hello'; - var packet = '89 ' + getHybiLengthAsHexString(message.length, true) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(message, '34 83 a8 68')); - - var gotPing = false; - p.onping = function(data) { - gotPing = true; - assert.equal(message, data); - }; - - p.add(getBufferFromHexString(packet)); - gotPing.should.be.ok; - }); - it('can parse a ping with no data', function() { - var p = new Receiver(); - var packet = '89 00'; - - var gotPing = false; - p.onping = function(data) { - gotPing = true; - }; - - p.add(getBufferFromHexString(packet)); - gotPing.should.be.ok; - }); - it('can parse a fragmented masked text message of 300 bytes with a ping in the middle', function() { - var p = new Receiver(); - var message = 'A'; - for (var i = 0; i < 300; ++i) message += (i % 5).toString(); - - var msgpiece1 = message.substr(0, 150); - var packet1 = '01 FE ' + pack(4, msgpiece1.length) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(msgpiece1, '34 83 a8 68')); - - var pingMessage = 'Hello'; - var pingPacket = '89 ' + getHybiLengthAsHexString(pingMessage.length, true) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(pingMessage, '34 83 a8 68')); - - var msgpiece2 = message.substr(150); - var packet2 = '80 FE ' + pack(4, msgpiece2.length) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(msgpiece2, '34 83 a8 68')); - - var gotData = false; - p.ontext = function(data) { - gotData = true; - assert.equal(message, data); - }; - var gotPing = false; - p.onping = function(data) { - gotPing = true; - assert.equal(pingMessage, data); - }; - - p.add(getBufferFromHexString(packet1)); - p.add(getBufferFromHexString(pingPacket)); - p.add(getBufferFromHexString(packet2)); - gotData.should.be.ok; - gotPing.should.be.ok; - }); - it('can parse a fragmented masked text message of 300 bytes with a ping in the middle, which is delievered over sevaral tcp packets', function() { - var p = new Receiver(); - var message = 'A'; - for (var i = 0; i < 300; ++i) message += (i % 5).toString(); - - var msgpiece1 = message.substr(0, 150); - var packet1 = '01 FE ' + pack(4, msgpiece1.length) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(msgpiece1, '34 83 a8 68')); - - var pingMessage = 'Hello'; - var pingPacket = '89 ' + getHybiLengthAsHexString(pingMessage.length, true) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(pingMessage, '34 83 a8 68')); - - var msgpiece2 = message.substr(150); - var packet2 = '80 FE ' + pack(4, msgpiece2.length) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(msgpiece2, '34 83 a8 68')); - - var gotData = false; - p.ontext = function(data) { - gotData = true; - assert.equal(message, data); - }; - var gotPing = false; - p.onping = function(data) { - gotPing = true; - assert.equal(pingMessage, data); - }; - - var buffers = []; - buffers = buffers.concat(splitBuffer(getBufferFromHexString(packet1))); - buffers = buffers.concat(splitBuffer(getBufferFromHexString(pingPacket))); - buffers = buffers.concat(splitBuffer(getBufferFromHexString(packet2))); - for (var i = 0; i < buffers.length; ++i) { - p.add(buffers[i]); - } - gotData.should.be.ok; - gotPing.should.be.ok; - }); - it('can parse a 100 byte long masked binary message', function() { - var p = new Receiver(); - var length = 100; - var message = new Buffer(length); - for (var i = 0; i < length; ++i) message[i] = i % 256; - var originalMessage = getHexStringFromBuffer(message); - var packet = '82 ' + getHybiLengthAsHexString(length, true) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(message, '34 83 a8 68')); - - var gotData = false; - p.onbinary = function(data) { - gotData = true; - assert.equal(originalMessage, getHexStringFromBuffer(data)); - }; - - p.add(getBufferFromHexString(packet)); - gotData.should.be.ok; - }); - it('can parse a 256 byte long masked binary message', function() { - var p = new Receiver(); - var length = 256; - var message = new Buffer(length); - for (var i = 0; i < length; ++i) message[i] = i % 256; - var originalMessage = getHexStringFromBuffer(message); - var packet = '82 ' + getHybiLengthAsHexString(length, true) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(message, '34 83 a8 68')); - - var gotData = false; - p.onbinary = function(data) { - gotData = true; - assert.equal(originalMessage, getHexStringFromBuffer(data)); - }; - - p.add(getBufferFromHexString(packet)); - gotData.should.be.ok; - }); - it('can parse a 200kb long masked binary message', function() { - var p = new Receiver(); - var length = 200 * 1024; - var message = new Buffer(length); - for (var i = 0; i < length; ++i) message[i] = i % 256; - var originalMessage = getHexStringFromBuffer(message); - var packet = '82 ' + getHybiLengthAsHexString(length, true) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(message, '34 83 a8 68')); - - var gotData = false; - p.onbinary = function(data) { - gotData = true; - assert.equal(originalMessage, getHexStringFromBuffer(data)); - }; - - p.add(getBufferFromHexString(packet)); - gotData.should.be.ok; - }); - it('can parse a 200kb long unmasked binary message', function() { - var p = new Receiver(); - var length = 200 * 1024; - var message = new Buffer(length); - for (var i = 0; i < length; ++i) message[i] = i % 256; - var originalMessage = getHexStringFromBuffer(message); - var packet = '82 ' + getHybiLengthAsHexString(length, false) + ' ' + getHexStringFromBuffer(message); - - var gotData = false; - p.onbinary = function(data) { - gotData = true; - assert.equal(originalMessage, getHexStringFromBuffer(data)); - }; - - p.add(getBufferFromHexString(packet)); - gotData.should.be.ok; - }); -}); - diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Sender.hixie.test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Sender.hixie.test.js deleted file mode 100644 index 783f8922..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Sender.hixie.test.js +++ /dev/null @@ -1,134 +0,0 @@ -var assert = require('assert') - , Sender = require('../lib/Sender.hixie'); -require('should'); -require('./hybi-common'); - -describe('Sender', function() { - describe('#send', function() { - it('frames and sends a text message', function(done) { - var message = 'Hello world'; - var received; - var socket = { - write: function(data, encoding, cb) { - received = data; - process.nextTick(cb); - } - }; - var sender = new Sender(socket, {}); - sender.send(message, {}, function() { - received.toString('utf8').should.eql('\u0000' + message + '\ufffd'); - done(); - }); - }); - - it('frames and sends an empty message', function(done) { - var socket = { - write: function(data, encoding, cb) { - done(); - } - }; - var sender = new Sender(socket, {}); - sender.send('', {}, function() {}); - }); - - it('frames and sends a buffer', function(done) { - var received; - var socket = { - write: function(data, encoding, cb) { - received = data; - process.nextTick(cb); - } - }; - var sender = new Sender(socket, {}); - sender.send(new Buffer('foobar'), {}, function() { - received.toString('utf8').should.eql('\u0000foobar\ufffd'); - done(); - }); - }); - - it('frames and sends a binary message', function(done) { - var message = 'Hello world'; - var received; - var socket = { - write: function(data, encoding, cb) { - received = data; - process.nextTick(cb); - } - }; - var sender = new Sender(socket, {}); - sender.send(message, {binary: true}, function() { - received.toString('hex').should.eql( - // 0x80 0x0b H e l l o w o r l d - '800b48656c6c6f20776f726c64'); - done(); - }); - }); -/* - it('throws an exception for binary data', function(done) { - var socket = { - write: function(data, encoding, cb) { - process.nextTick(cb); - } - }; - var sender = new Sender(socket, {}); - sender.on('error', function() { - done(); - }); - sender.send(new Buffer(100), {binary: true}, function() {}); - }); -*/ - it('can fauxe stream data', function(done) { - var received = []; - var socket = { - write: function(data, encoding, cb) { - received.push(data); - process.nextTick(cb); - } - }; - var sender = new Sender(socket, {}); - sender.send(new Buffer('foobar'), { fin: false }, function() {}); - sender.send('bazbar', { fin: false }, function() {}); - sender.send(new Buffer('end'), { fin: true }, function() { - received[0].toString('utf8').should.eql('\u0000foobar'); - received[1].toString('utf8').should.eql('bazbar'); - received[2].toString('utf8').should.eql('end\ufffd'); - done(); - }); - }); - }); - - describe('#close', function() { - it('sends a hixie close frame', function(done) { - var received; - var socket = { - write: function(data, encoding, cb) { - received = data; - process.nextTick(cb); - } - }; - var sender = new Sender(socket, {}); - sender.close(null, null, null, function() { - received.toString('utf8').should.eql('\ufffd\u0000'); - done(); - }); - }); - - it('sends a message end marker if fauxe streaming has started, before hixie close frame', function(done) { - var received = []; - var socket = { - write: function(data, encoding, cb) { - received.push(data); - if (cb) process.nextTick(cb); - } - }; - var sender = new Sender(socket, {}); - sender.send(new Buffer('foobar'), { fin: false }, function() {}); - sender.close(null, null, null, function() { - received[0].toString('utf8').should.eql('\u0000foobar'); - received[1].toString('utf8').should.eql('\ufffd'); - received[2].toString('utf8').should.eql('\ufffd\u0000'); - done(); - }); - }); - }); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Sender.test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Sender.test.js deleted file mode 100644 index 43b4864d..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Sender.test.js +++ /dev/null @@ -1,24 +0,0 @@ -var Sender = require('../lib/Sender'); -require('should'); - -describe('Sender', function() { - describe('#frameAndSend', function() { - it('does not modify a masked binary buffer', function() { - var sender = new Sender({ write: function() {} }); - var buf = new Buffer([1, 2, 3, 4, 5]); - sender.frameAndSend(2, buf, true, true); - buf[0].should.eql(1); - buf[1].should.eql(2); - buf[2].should.eql(3); - buf[3].should.eql(4); - buf[4].should.eql(5); - }); - - it('does not modify a masked text buffer', function() { - var sender = new Sender({ write: function() {} }); - var text = 'hi there'; - sender.frameAndSend(1, text, true, true); - text.should.eql('hi there'); - }); - }); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Validation.test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Validation.test.js deleted file mode 100644 index 37c33993..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Validation.test.js +++ /dev/null @@ -1,23 +0,0 @@ -var Validation = require('../lib/Validation').Validation; -require('should'); - -describe('Validation', function() { - describe('isValidUTF8', function() { - it('should return true for a valid utf8 string', function() { - var validBuffer = new Buffer('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque gravida mattis rhoncus. Donec iaculis, metus quis varius accumsan, erat mauris condimentum diam, et egestas erat enim ut ligula. Praesent sollicitudin tellus eget dolor euismod euismod. Nullam ac augue nec neque varius luctus. Curabitur elit mi, consequat ultricies adipiscing mollis, scelerisque in erat. Phasellus facilisis fermentum ullamcorper. Nulla et sem eu arcu pharetra pellentesque. Praesent consectetur tempor justo, vel iaculis dui ullamcorper sit amet. Integer tristique viverra ullamcorper. Vivamus laoreet, nulla eget suscipit eleifend, lacus lectus feugiat libero, non fermentum erat nisi at risus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut pulvinar dignissim tellus, eu dignissim lorem vulputate quis. Morbi ut pulvinar augue.'); - Validation.isValidUTF8(validBuffer).should.be.ok; - }); - it('should return false for an erroneous string', function() { - var invalidBuffer = new Buffer([0xce, 0xba, 0xe1, 0xbd, 0xb9, 0xcf, 0x83, 0xce, 0xbc, 0xce, 0xb5, 0xed, 0xa0, 0x80, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64]); - Validation.isValidUTF8(invalidBuffer).should.not.be.ok; - }); - it('should return true for valid cases from the autobahn test suite', function() { - Validation.isValidUTF8(new Buffer('\xf0\x90\x80\x80')).should.be.ok; - Validation.isValidUTF8(new Buffer([0xf0, 0x90, 0x80, 0x80])).should.be.ok; - }); - it('should return false for erroneous autobahn strings', function() { - Validation.isValidUTF8(new Buffer([0xce, 0xba, 0xe1, 0xbd])).should.not.be.ok; - }); - }); -}); - diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocket.integration.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocket.integration.js deleted file mode 100644 index 5d4f426f..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocket.integration.js +++ /dev/null @@ -1,44 +0,0 @@ -var assert = require('assert') - , WebSocket = require('../') - , server = require('./testserver'); - -var port = 20000; - -function getArrayBuffer(buf) { - var l = buf.length; - var arrayBuf = new ArrayBuffer(l); - var uint8View = new Uint8Array(arrayBuf); - - for (var i = 0; i < l; i++) { - uint8View[i] = buf[i]; - } - return uint8View.buffer; -} - -function areArraysEqual(x, y) { - if (x.length != y.length) return false; - for (var i = 0, l = x.length; i < l; ++i) { - if (x[i] !== y[i]) return false; - } - return true; -} - -describe('WebSocket', function() { - it('communicates successfully with echo service', function(done) { - var ws = new WebSocket('ws://echo.websocket.org/', {protocolVersion: 13, origin: 'http://websocket.org'}); - var str = Date.now().toString(); - var dataReceived = false; - ws.on('open', function() { - ws.send(str, {mask: true}); - }); - ws.on('close', function() { - assert.equal(true, dataReceived); - done(); - }); - ws.on('message', function(data, flags) { - assert.equal(str, data); - ws.terminate(); - dataReceived = true; - }); - }); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocket.test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocket.test.js deleted file mode 100644 index 91336b93..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocket.test.js +++ /dev/null @@ -1,1724 +0,0 @@ -var assert = require('assert') - , https = require('https') - , http = require('http') - , should = require('should') - , WebSocket = require('../') - , WebSocketServer = require('../').Server - , fs = require('fs') - , server = require('./testserver') - , crypto = require('crypto'); - -var port = 20000; - -function getArrayBuffer(buf) { - var l = buf.length; - var arrayBuf = new ArrayBuffer(l); - var uint8View = new Uint8Array(arrayBuf); - for (var i = 0; i < l; i++) { - uint8View[i] = buf[i]; - } - return uint8View.buffer; -} - - -function areArraysEqual(x, y) { - if (x.length != y.length) return false; - for (var i = 0, l = x.length; i < l; ++i) { - if (x[i] !== y[i]) return false; - } - return true; -} - -describe('WebSocket', function() { - describe('#ctor', function() { - it('throws exception for invalid url', function(done) { - try { - var ws = new WebSocket('echo.websocket.org'); - } - catch (e) { - done(); - } - }); - }); - - describe('options', function() { - it('should accept an `agent` option', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var agent = { - addRequest: function() { - wss.close(); - done(); - } - }; - var ws = new WebSocket('ws://localhost:' + port, { agent: agent }); - }); - }); - // GH-227 - it('should accept the `options` object as the 3rd argument', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var agent = { - addRequest: function() { - wss.close(); - done(); - } - }; - var ws = new WebSocket('ws://localhost:' + port, [], { agent: agent }); - }); - }); - }); - - describe('properties', function() { - it('#bytesReceived exposes number of bytes received', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('message', function() { - ws.bytesReceived.should.eql(8); - wss.close(); - done(); - }); - }); - wss.on('connection', function(ws) { - ws.send('foobar'); - }); - }); - - it('#url exposes the server url', function(done) { - server.createServer(++port, function(srv) { - var url = 'ws://localhost:' + port; - var ws = new WebSocket(url); - assert.equal(url, ws.url); - ws.terminate(); - ws.on('close', function() { - srv.close(); - done(); - }); - }); - }); - - it('#protocolVersion exposes the protocol version', function(done) { - server.createServer(++port, function(srv) { - var url = 'ws://localhost:' + port; - var ws = new WebSocket(url); - assert.equal(13, ws.protocolVersion); - ws.terminate(); - ws.on('close', function() { - srv.close(); - done(); - }); - }); - }); - - describe('#bufferedAmount', function() { - it('defaults to zero', function(done) { - server.createServer(++port, function(srv) { - var url = 'ws://localhost:' + port; - var ws = new WebSocket(url); - assert.equal(0, ws.bufferedAmount); - ws.terminate(); - ws.on('close', function() { - srv.close(); - done(); - }); - }); - }); - - it('defaults to zero upon "open"', function(done) { - server.createServer(++port, function(srv) { - var url = 'ws://localhost:' + port; - var ws = new WebSocket(url); - ws.onopen = function() { - assert.equal(0, ws.bufferedAmount); - ws.terminate(); - ws.on('close', function() { - srv.close(); - done(); - }); - }; - }); - }); - - it('stress kernel write buffer', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port); - }); - wss.on('connection', function(ws) { - while (true) { - if (ws.bufferedAmount > 0) break; - ws.send((new Array(10000)).join('hello')); - } - ws.terminate(); - ws.on('close', function() { - wss.close(); - done(); - }); - }); - }); - }); - - describe('Custom headers', function() { - it('request has an authorization header', function (done) { - var auth = 'test:testpass'; - var srv = http.createServer(function (req, res) {}); - var wss = new WebSocketServer({server: srv}); - srv.listen(++port); - var ws = new WebSocket('ws://' + auth + '@localhost:' + port); - srv.on('upgrade', function (req, socket, head) { - assert(req.headers.authorization, 'auth header exists'); - assert.equal(req.headers.authorization, 'Basic ' + new Buffer(auth).toString('base64')); - ws.terminate(); - ws.on('close', function () { - srv.close(); - wss.close(); - done(); - }); - }); - }); - - it('accepts custom headers', function (done) { - var srv = http.createServer(function (req, res) {}); - var wss = new WebSocketServer({server: srv}); - srv.listen(++port); - - var ws = new WebSocket('ws://localhost:' + port, { - headers: { - 'Cookie': 'foo=bar' - } - }); - - srv.on('upgrade', function (req, socket, head) { - assert(req.headers.cookie, 'auth header exists'); - assert.equal(req.headers.cookie, 'foo=bar'); - - ws.terminate(); - ws.on('close', function () { - srv.close(); - wss.close(); - done(); - }); - }); - }); - }); - - describe('#readyState', function() { - it('defaults to connecting', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - assert.equal(WebSocket.CONNECTING, ws.readyState); - ws.terminate(); - ws.on('close', function() { - srv.close(); - done(); - }); - }); - }); - - it('set to open once connection is established', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - assert.equal(WebSocket.OPEN, ws.readyState); - srv.close(); - done(); - }); - }); - }); - - it('set to closed once connection is closed', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.close(1001); - ws.on('close', function() { - assert.equal(WebSocket.CLOSED, ws.readyState); - srv.close(); - done(); - }); - }); - }); - - it('set to closed once connection is terminated', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.terminate(); - ws.on('close', function() { - assert.equal(WebSocket.CLOSED, ws.readyState); - srv.close(); - done(); - }); - }); - }); - }); - - /* - * Ready state constants - */ - - var readyStates = { - CONNECTING: 0, - OPEN: 1, - CLOSING: 2, - CLOSED: 3 - }; - - /* - * Ready state constant tests - */ - - Object.keys(readyStates).forEach(function(state) { - describe('.' + state, function() { - it('is enumerable property of class', function() { - var propertyDescripter = Object.getOwnPropertyDescriptor(WebSocket, state) - assert.equal(readyStates[state], propertyDescripter.value); - assert.equal(true, propertyDescripter.enumerable); - }); - }); - }); - - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - Object.keys(readyStates).forEach(function(state) { - describe('.' + state, function() { - it('is property of instance', function() { - assert.equal(readyStates[state], ws[state]); - }); - }); - }); - }); - }); - - describe('events', function() { - it('emits a ping event', function(done) { - var wss = new WebSocketServer({port: ++port}); - wss.on('connection', function(client) { - client.ping(); - }); - var ws = new WebSocket('ws://localhost:' + port); - ws.on('ping', function() { - ws.terminate(); - wss.close(); - done(); - }); - }); - - it('emits a pong event', function(done) { - var wss = new WebSocketServer({port: ++port}); - wss.on('connection', function(client) { - client.pong(); - }); - var ws = new WebSocket('ws://localhost:' + port); - ws.on('pong', function() { - ws.terminate(); - wss.close(); - done(); - }); - }); - }); - - describe('connection establishing', function() { - it('can disconnect before connection is established', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.terminate(); - ws.on('open', function() { - assert.fail('connect shouldnt be raised here'); - }); - ws.on('close', function() { - srv.close(); - done(); - }); - }); - }); - - it('can close before connection is established', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.close(1001); - ws.on('open', function() { - assert.fail('connect shouldnt be raised here'); - }); - ws.on('close', function() { - srv.close(); - done(); - }); - }); - }); - - it('invalid server key is denied', function(done) { - server.createServer(++port, server.handlers.invalidKey, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('error', function() { - srv.close(); - done(); - }); - }); - }); - - it('close event is raised when server closes connection', function(done) { - server.createServer(++port, server.handlers.closeAfterConnect, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('close', function() { - srv.close(); - done(); - }); - }); - }); - - it('error is emitted if server aborts connection', function(done) { - server.createServer(++port, server.handlers.return401, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - assert.fail('connect shouldnt be raised here'); - }); - ws.on('error', function() { - srv.close(); - done(); - }); - }); - }); - }); - - describe('#pause and #resume', function() { - it('pauses the underlying stream', function(done) { - // this test is sort-of racecondition'y, since an unlikely slow connection - // to localhost can cause the test to succeed even when the stream pausing - // isn't working as intended. that is an extremely unlikely scenario, though - // and an acceptable risk for the test. - var client; - var serverClient; - var openCount = 0; - function onOpen() { - if (++openCount == 2) { - var paused = true; - serverClient.on('message', function() { - paused.should.not.be.ok; - wss.close(); - done(); - }); - serverClient.pause(); - setTimeout(function() { - paused = false; - serverClient.resume(); - }, 200); - client.send('foo'); - } - } - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port); - serverClient = ws; - serverClient.on('open', onOpen); - }); - wss.on('connection', function(ws) { - client = ws; - onOpen(); - }); - }); - }); - - describe('#ping', function() { - it('before connect should fail', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('error', function() {}); - try { - ws.ping(); - } - catch (e) { - srv.close(); - ws.terminate(); - done(); - } - }); - }); - - it('before connect can silently fail', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('error', function() {}); - ws.ping('', {}, true); - srv.close(); - ws.terminate(); - done(); - }); - }); - - it('without message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.ping(); - }); - srv.on('ping', function(message) { - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('with message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.ping('hi'); - }); - srv.on('ping', function(message) { - assert.equal('hi', message); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('with encoded message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.ping('hi', {mask: true}); - }); - srv.on('ping', function(message, flags) { - assert.ok(flags.masked); - assert.equal('hi', message); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - }); - - describe('#pong', function() { - it('before connect should fail', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('error', function() {}); - try { - ws.pong(); - } - catch (e) { - srv.close(); - ws.terminate(); - done(); - } - }); - }); - - it('before connect can silently fail', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('error', function() {}); - ws.pong('', {}, true); - srv.close(); - ws.terminate(); - done(); - }); - }); - - it('without message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.pong(); - }); - srv.on('pong', function(message) { - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('with message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.pong('hi'); - }); - srv.on('pong', function(message) { - assert.equal('hi', message); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('with encoded message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.pong('hi', {mask: true}); - }); - srv.on('pong', function(message, flags) { - assert.ok(flags.masked); - assert.equal('hi', message); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - }); - - describe('#send', function() { - it('very long binary data can be sent and received (with echoing server)', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var array = new Float32Array(5 * 1024 * 1024); - for (var i = 0; i < array.length; ++i) array[i] = i / 5; - ws.on('open', function() { - ws.send(array, {binary: true}); - }); - ws.on('message', function(message, flags) { - assert.ok(flags.binary); - assert.ok(areArraysEqual(array, new Float32Array(getArrayBuffer(message)))); - ws.terminate(); - srv.close(); - done(); - }); - }); - }); - - it('can send and receive text data', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.send('hi'); - }); - ws.on('message', function(message, flags) { - assert.equal('hi', message); - ws.terminate(); - srv.close(); - done(); - }); - }); - }); - - it('send and receive binary data as an array', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var array = new Float32Array(6); - for (var i = 0; i < array.length; ++i) array[i] = i / 2; - var partial = array.subarray(2, 5); - ws.on('open', function() { - ws.send(partial, {binary: true}); - }); - ws.on('message', function(message, flags) { - assert.ok(flags.binary); - assert.ok(areArraysEqual(partial, new Float32Array(getArrayBuffer(message)))); - ws.terminate(); - srv.close(); - done(); - }); - }); - }); - - it('binary data can be sent and received as buffer', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var buf = new Buffer('foobar'); - ws.on('open', function() { - ws.send(buf, {binary: true}); - }); - ws.on('message', function(message, flags) { - assert.ok(flags.binary); - assert.ok(areArraysEqual(buf, message)); - ws.terminate(); - srv.close(); - done(); - }); - }); - }); - - it('ArrayBuffer is auto-detected without binary flag', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var array = new Float32Array(5); - for (var i = 0; i < array.length; ++i) array[i] = i / 2; - ws.on('open', function() { - ws.send(array.buffer); - }); - ws.onmessage = function (event) { - assert.ok(event.type = 'Binary'); - assert.ok(areArraysEqual(array, new Float32Array(getArrayBuffer(event.data)))); - ws.terminate(); - srv.close(); - done(); - }; - }); - }); - - it('Buffer is auto-detected without binary flag', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var buf = new Buffer('foobar'); - ws.on('open', function() { - ws.send(buf); - }); - ws.onmessage = function (event) { - assert.ok(event.type = 'Binary'); - assert.ok(areArraysEqual(event.data, buf)); - ws.terminate(); - srv.close(); - done(); - }; - }); - }); - - it('before connect should fail', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('error', function() {}); - try { - ws.send('hi'); - } - catch (e) { - ws.terminate(); - srv.close(); - done(); - } - }); - }); - - it('before connect should pass error through callback, if present', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('error', function() {}); - ws.send('hi', function(error) { - assert.ok(error instanceof Error); - ws.terminate(); - srv.close(); - done(); - }); - }); - }); - - it('without data should be successful', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.send(); - }); - srv.on('message', function(message, flags) { - assert.equal('', message); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('calls optional callback when flushed', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.send('hi', function() { - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - }); - - it('with unencoded message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.send('hi'); - }); - srv.on('message', function(message, flags) { - assert.equal('hi', message); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('with encoded message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.send('hi', {mask: true}); - }); - srv.on('message', function(message, flags) { - assert.ok(flags.masked); - assert.equal('hi', message); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('with unencoded binary message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var array = new Float32Array(5); - for (var i = 0; i < array.length; ++i) array[i] = i / 2; - ws.on('open', function() { - ws.send(array, {binary: true}); - }); - srv.on('message', function(message, flags) { - assert.ok(flags.binary); - assert.ok(areArraysEqual(array, new Float32Array(getArrayBuffer(message)))); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('with encoded binary message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var array = new Float32Array(5); - for (var i = 0; i < array.length; ++i) array[i] = i / 2; - ws.on('open', function() { - ws.send(array, {mask: true, binary: true}); - }); - srv.on('message', function(message, flags) { - assert.ok(flags.binary); - assert.ok(flags.masked); - assert.ok(areArraysEqual(array, new Float32Array(getArrayBuffer(message)))); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('with binary stream will send fragmented data', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var callbackFired = false; - ws.on('open', function() { - var fileStream = fs.createReadStream('test/fixtures/textfile'); - fileStream.bufferSize = 100; - ws.send(fileStream, {binary: true}, function(error) { - assert.equal(null, error); - callbackFired = true; - }); - }); - srv.on('message', function(data, flags) { - assert.ok(flags.binary); - assert.ok(areArraysEqual(fs.readFileSync('test/fixtures/textfile'), data)); - ws.terminate(); - }); - ws.on('close', function() { - assert.ok(callbackFired); - srv.close(); - done(); - }); - }); - }); - - it('with text stream will send fragmented data', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var callbackFired = false; - ws.on('open', function() { - var fileStream = fs.createReadStream('test/fixtures/textfile'); - fileStream.setEncoding('utf8'); - fileStream.bufferSize = 100; - ws.send(fileStream, {binary: false}, function(error) { - assert.equal(null, error); - callbackFired = true; - }); - }); - srv.on('message', function(data, flags) { - assert.ok(!flags.binary); - assert.ok(areArraysEqual(fs.readFileSync('test/fixtures/textfile', 'utf8'), data)); - ws.terminate(); - }); - ws.on('close', function() { - assert.ok(callbackFired); - srv.close(); - done(); - }); - }); - }); - - it('will cause intermittent send to be delayed in order', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - var fileStream = fs.createReadStream('test/fixtures/textfile'); - fileStream.setEncoding('utf8'); - fileStream.bufferSize = 100; - ws.send(fileStream); - ws.send('foobar'); - ws.send('baz'); - }); - var receivedIndex = 0; - srv.on('message', function(data, flags) { - ++receivedIndex; - if (receivedIndex == 1) { - assert.ok(!flags.binary); - assert.ok(areArraysEqual(fs.readFileSync('test/fixtures/textfile', 'utf8'), data)); - } - else if (receivedIndex == 2) { - assert.ok(!flags.binary); - assert.equal('foobar', data); - } - else { - assert.ok(!flags.binary); - assert.equal('baz', data); - srv.close(); - ws.terminate(); - done(); - } - }); - }); - }); - - it('will cause intermittent stream to be delayed in order', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - var fileStream = fs.createReadStream('test/fixtures/textfile'); - fileStream.setEncoding('utf8'); - fileStream.bufferSize = 100; - ws.send(fileStream); - var i = 0; - ws.stream(function(error, send) { - assert.ok(!error); - if (++i == 1) send('foo'); - else send('bar', true); - }); - }); - var receivedIndex = 0; - srv.on('message', function(data, flags) { - ++receivedIndex; - if (receivedIndex == 1) { - assert.ok(!flags.binary); - assert.ok(areArraysEqual(fs.readFileSync('test/fixtures/textfile', 'utf8'), data)); - } - else if (receivedIndex == 2) { - assert.ok(!flags.binary); - assert.equal('foobar', data); - srv.close(); - ws.terminate(); - done(); - } - }); - }); - }); - - it('will cause intermittent ping to be delivered', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - var fileStream = fs.createReadStream('test/fixtures/textfile'); - fileStream.setEncoding('utf8'); - fileStream.bufferSize = 100; - ws.send(fileStream); - ws.ping('foobar'); - }); - var receivedIndex = 0; - srv.on('message', function(data, flags) { - assert.ok(!flags.binary); - assert.ok(areArraysEqual(fs.readFileSync('test/fixtures/textfile', 'utf8'), data)); - if (++receivedIndex == 2) { - srv.close(); - ws.terminate(); - done(); - } - }); - srv.on('ping', function(data) { - assert.equal('foobar', data); - if (++receivedIndex == 2) { - srv.close(); - ws.terminate(); - done(); - } - }); - }); - }); - - it('will cause intermittent pong to be delivered', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - var fileStream = fs.createReadStream('test/fixtures/textfile'); - fileStream.setEncoding('utf8'); - fileStream.bufferSize = 100; - ws.send(fileStream); - ws.pong('foobar'); - }); - var receivedIndex = 0; - srv.on('message', function(data, flags) { - assert.ok(!flags.binary); - assert.ok(areArraysEqual(fs.readFileSync('test/fixtures/textfile', 'utf8'), data)); - if (++receivedIndex == 2) { - srv.close(); - ws.terminate(); - done(); - } - }); - srv.on('pong', function(data) { - assert.equal('foobar', data); - if (++receivedIndex == 2) { - srv.close(); - ws.terminate(); - done(); - } - }); - }); - }); - - it('will cause intermittent close to be delivered', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - var fileStream = fs.createReadStream('test/fixtures/textfile'); - fileStream.setEncoding('utf8'); - fileStream.bufferSize = 100; - ws.send(fileStream); - ws.close(1000, 'foobar'); - }); - ws.on('close', function() { - srv.close(); - ws.terminate(); - done(); - }); - ws.on('error', function() { /* That's quite alright -- a send was attempted after close */ }); - srv.on('message', function(data, flags) { - assert.ok(!flags.binary); - assert.ok(areArraysEqual(fs.readFileSync('test/fixtures/textfile', 'utf8'), data)); - }); - srv.on('close', function(code, data) { - assert.equal(1000, code); - assert.equal('foobar', data); - }); - }); - }); - }); - - describe('#stream', function() { - it('very long binary data can be streamed', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var buffer = new Buffer(10 * 1024); - for (var i = 0; i < buffer.length; ++i) buffer[i] = i % 0xff; - ws.on('open', function() { - var i = 0; - var blockSize = 800; - var bufLen = buffer.length; - ws.stream({binary: true}, function(error, send) { - assert.ok(!error); - var start = i * blockSize; - var toSend = Math.min(blockSize, bufLen - (i * blockSize)); - var end = start + toSend; - var isFinal = toSend < blockSize; - send(buffer.slice(start, end), isFinal); - i += 1; - }); - }); - srv.on('message', function(data, flags) { - assert.ok(flags.binary); - assert.ok(areArraysEqual(buffer, data)); - ws.terminate(); - srv.close(); - done(); - }); - }); - }); - - it('before connect should pass error through callback', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('error', function() {}); - ws.stream(function(error) { - assert.ok(error instanceof Error); - ws.terminate(); - srv.close(); - done(); - }); - }); - }); - - it('without callback should fail', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var payload = 'HelloWorld'; - ws.on('open', function() { - try { - ws.stream(); - } - catch (e) { - srv.close(); - ws.terminate(); - done(); - } - }); - }); - }); - - it('will cause intermittent send to be delayed in order', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var payload = 'HelloWorld'; - ws.on('open', function() { - var i = 0; - ws.stream(function(error, send) { - assert.ok(!error); - if (++i == 1) { - send(payload.substr(0, 5)); - ws.send('foobar'); - ws.send('baz'); - } - else { - send(payload.substr(5, 5), true); - } - }); - }); - var receivedIndex = 0; - srv.on('message', function(data, flags) { - ++receivedIndex; - if (receivedIndex == 1) { - assert.ok(!flags.binary); - assert.equal(payload, data); - } - else if (receivedIndex == 2) { - assert.ok(!flags.binary); - assert.equal('foobar', data); - } - else { - assert.ok(!flags.binary); - assert.equal('baz', data); - srv.close(); - ws.terminate(); - done(); - } - }); - }); - }); - - it('will cause intermittent stream to be delayed in order', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var payload = 'HelloWorld'; - ws.on('open', function() { - var i = 0; - ws.stream(function(error, send) { - assert.ok(!error); - if (++i == 1) { - send(payload.substr(0, 5)); - var i2 = 0; - ws.stream(function(error, send) { - assert.ok(!error); - if (++i2 == 1) send('foo'); - else send('bar', true); - }); - ws.send('baz'); - } - else send(payload.substr(5, 5), true); - }); - }); - var receivedIndex = 0; - srv.on('message', function(data, flags) { - ++receivedIndex; - if (receivedIndex == 1) { - assert.ok(!flags.binary); - assert.equal(payload, data); - } - else if (receivedIndex == 2) { - assert.ok(!flags.binary); - assert.equal('foobar', data); - } - else if (receivedIndex == 3){ - assert.ok(!flags.binary); - assert.equal('baz', data); - setTimeout(function() { - srv.close(); - ws.terminate(); - done(); - }, 1000); - } - else throw new Error('more messages than we actually sent just arrived'); - }); - }); - }); - - it('will cause intermittent ping to be delivered', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var payload = 'HelloWorld'; - ws.on('open', function() { - var i = 0; - ws.stream(function(error, send) { - assert.ok(!error); - if (++i == 1) { - send(payload.substr(0, 5)); - ws.ping('foobar'); - } - else { - send(payload.substr(5, 5), true); - } - }); - }); - var receivedIndex = 0; - srv.on('message', function(data, flags) { - assert.ok(!flags.binary); - assert.equal(payload, data); - if (++receivedIndex == 2) { - srv.close(); - ws.terminate(); - done(); - } - }); - srv.on('ping', function(data) { - assert.equal('foobar', data); - if (++receivedIndex == 2) { - srv.close(); - ws.terminate(); - done(); - } - }); - }); - }); - - it('will cause intermittent pong to be delivered', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var payload = 'HelloWorld'; - ws.on('open', function() { - var i = 0; - ws.stream(function(error, send) { - assert.ok(!error); - if (++i == 1) { - send(payload.substr(0, 5)); - ws.pong('foobar'); - } - else { - send(payload.substr(5, 5), true); - } - }); - }); - var receivedIndex = 0; - srv.on('message', function(data, flags) { - assert.ok(!flags.binary); - assert.equal(payload, data); - if (++receivedIndex == 2) { - srv.close(); - ws.terminate(); - done(); - } - }); - srv.on('pong', function(data) { - assert.equal('foobar', data); - if (++receivedIndex == 2) { - srv.close(); - ws.terminate(); - done(); - } - }); - }); - }); - - it('will cause intermittent close to be delivered', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var payload = 'HelloWorld'; - var errorGiven = false; - ws.on('open', function() { - var i = 0; - ws.stream(function(error, send) { - if (++i == 1) { - send(payload.substr(0, 5)); - ws.close(1000, 'foobar'); - } - else if(i == 2) { - send(payload.substr(5, 5), true); - } - else if (i == 3) { - assert.ok(error); - errorGiven = true; - } - }); - }); - ws.on('close', function() { - assert.ok(errorGiven); - srv.close(); - ws.terminate(); - done(); - }); - srv.on('message', function(data, flags) { - assert.ok(!flags.binary); - assert.equal(payload, data); - }); - srv.on('close', function(code, data) { - assert.equal(1000, code); - assert.equal('foobar', data); - }); - }); - }); - }); - - describe('#close', function() { - it('will raise error callback, if any, if called during send stream', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var errorGiven = false; - ws.on('open', function() { - var fileStream = fs.createReadStream('test/fixtures/textfile'); - fileStream.setEncoding('utf8'); - fileStream.bufferSize = 100; - ws.send(fileStream, function(error) { - errorGiven = error != null; - }); - ws.close(1000, 'foobar'); - }); - ws.on('close', function() { - setTimeout(function() { - assert.ok(errorGiven); - srv.close(); - ws.terminate(); - done(); - }, 1000); - }); - }); - }); - - it('without invalid first argument throws exception', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - try { - ws.close('error'); - } - catch (e) { - srv.close(); - ws.terminate(); - done(); - } - }); - }); - }); - - it('without reserved error code 1004 throws exception', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - try { - ws.close(1004); - } - catch (e) { - srv.close(); - ws.terminate(); - done(); - } - }); - }); - }); - - it('without message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.close(1000); - }); - srv.on('close', function(code, message, flags) { - assert.equal('', message); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('with message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.close(1000, 'some reason'); - }); - srv.on('close', function(code, message, flags) { - assert.ok(flags.masked); - assert.equal('some reason', message); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('with encoded message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.close(1000, 'some reason', {mask: true}); - }); - srv.on('close', function(code, message, flags) { - assert.ok(flags.masked); - assert.equal('some reason', message); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('ends connection to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var connectedOnce = false; - ws.on('open', function() { - connectedOnce = true; - ws.close(1000, 'some reason', {mask: true}); - }); - ws.on('close', function() { - assert.ok(connectedOnce); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - }); - - describe('W3C API emulation', function() { - it('should not throw errors when getting and setting', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var listener = function () {}; - - ws.onmessage = listener; - ws.onerror = listener; - ws.onclose = listener; - ws.onopen = listener; - - assert.ok(ws.onopen === listener); - assert.ok(ws.onmessage === listener); - assert.ok(ws.onclose === listener); - assert.ok(ws.onerror === listener); - - srv.close(); - ws.terminate(); - done(); - }); - }); - - it('should work the same as the EventEmitter api', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var listener = function() {}; - var message = 0; - var close = 0; - var open = 0; - - ws.onmessage = function(messageEvent) { - assert.ok(!!messageEvent.data); - ++message; - ws.close(); - }; - - ws.onopen = function() { - ++open; - } - - ws.onclose = function() { - ++close; - } - - ws.on('open', function() { - ws.send('foo'); - }); - - ws.on('close', function() { - process.nextTick(function() { - assert.ok(message === 1); - assert.ok(open === 1); - assert.ok(close === 1); - - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - }); - - it('should receive text data wrapped in a MessageEvent when using addEventListener', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.addEventListener('open', function() { - ws.send('hi'); - }); - ws.addEventListener('message', function(messageEvent) { - assert.equal('hi', messageEvent.data); - ws.terminate(); - srv.close(); - done(); - }); - }); - }); - - it('should receive valid CloseEvent when server closes with code 1000', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port); - ws.addEventListener('close', function(closeEvent) { - assert.equal(true, closeEvent.wasClean); - assert.equal(1000, closeEvent.code); - ws.terminate(); - wss.close(); - done(); - }); - }); - wss.on('connection', function(client) { - client.close(1000); - }); - }); - - it('should receive valid CloseEvent when server closes with code 1001', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port); - ws.addEventListener('close', function(closeEvent) { - assert.equal(false, closeEvent.wasClean); - assert.equal(1001, closeEvent.code); - assert.equal('some daft reason', closeEvent.reason); - ws.terminate(); - wss.close(); - done(); - }); - }); - wss.on('connection', function(client) { - client.close(1001, 'some daft reason'); - }); - }); - - it('should have target set on Events', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port); - ws.addEventListener('open', function(openEvent) { - assert.equal(ws, openEvent.target); - }); - ws.addEventListener('message', function(messageEvent) { - assert.equal(ws, messageEvent.target); - wss.close(); - }); - ws.addEventListener('close', function(closeEvent) { - assert.equal(ws, closeEvent.target); - ws.emit('error', new Error('forced')); - }); - ws.addEventListener('error', function(errorEvent) { - assert.equal(errorEvent.message, 'forced'); - assert.equal(ws, errorEvent.target); - ws.terminate(); - done(); - }); - }); - wss.on('connection', function(client) { - client.send('hi') - }); - }); - }); - - describe('ssl', function() { - it('can connect to secure websocket server', function(done) { - var options = { - key: fs.readFileSync('test/fixtures/key.pem'), - cert: fs.readFileSync('test/fixtures/certificate.pem') - }; - var app = https.createServer(options, function (req, res) { - res.writeHead(200); - res.end(); - }); - var wss = new WebSocketServer({server: app}); - app.listen(++port, function() { - var ws = new WebSocket('wss://localhost:' + port); - }); - wss.on('connection', function(ws) { - app.close(); - ws.terminate(); - wss.close(); - done(); - }); - }); - - it('can connect to secure websocket server with client side certificate', function(done) { - var options = { - key: fs.readFileSync('test/fixtures/key.pem'), - cert: fs.readFileSync('test/fixtures/certificate.pem'), - ca: [fs.readFileSync('test/fixtures/ca1-cert.pem')], - requestCert: true - }; - var clientOptions = { - key: fs.readFileSync('test/fixtures/agent1-key.pem'), - cert: fs.readFileSync('test/fixtures/agent1-cert.pem') - }; - var app = https.createServer(options, function (req, res) { - res.writeHead(200); - res.end(); - }); - var success = false; - var wss = new WebSocketServer({ - server: app, - verifyClient: function(info) { - success = !!info.req.client.authorized; - return true; - } - }); - app.listen(++port, function() { - var ws = new WebSocket('wss://localhost:' + port, clientOptions); - }); - wss.on('connection', function(ws) { - app.close(); - ws.terminate(); - wss.close(); - success.should.be.ok; - done(); - }); - }); - - it('cannot connect to secure websocket server via ws://', function(done) { - var options = { - key: fs.readFileSync('test/fixtures/key.pem'), - cert: fs.readFileSync('test/fixtures/certificate.pem') - }; - var app = https.createServer(options, function (req, res) { - res.writeHead(200); - res.end(); - }); - var wss = new WebSocketServer({server: app}); - app.listen(++port, function() { - var ws = new WebSocket('ws://localhost:' + port, { rejectUnauthorized :false }); - ws.on('error', function() { - app.close(); - ws.terminate(); - wss.close(); - done(); - }); - }); - }); - - it('can send and receive text data', function(done) { - var options = { - key: fs.readFileSync('test/fixtures/key.pem'), - cert: fs.readFileSync('test/fixtures/certificate.pem') - }; - var app = https.createServer(options, function (req, res) { - res.writeHead(200); - res.end(); - }); - var wss = new WebSocketServer({server: app}); - app.listen(++port, function() { - var ws = new WebSocket('wss://localhost:' + port); - ws.on('open', function() { - ws.send('foobar'); - }); - }); - wss.on('connection', function(ws) { - ws.on('message', function(message, flags) { - message.should.eql('foobar'); - app.close(); - ws.terminate(); - wss.close(); - done(); - }); - }); - }); - - it('can send and receive very long binary data', function(done) { - var options = { - key: fs.readFileSync('test/fixtures/key.pem'), - cert: fs.readFileSync('test/fixtures/certificate.pem') - } - var app = https.createServer(options, function (req, res) { - res.writeHead(200); - res.end(); - }); - crypto.randomBytes(5 * 1024 * 1024, function(ex, buf) { - if (ex) throw ex; - var wss = new WebSocketServer({server: app}); - app.listen(++port, function() { - var ws = new WebSocket('wss://localhost:' + port); - ws.on('open', function() { - ws.send(buf, {binary: true}); - }); - ws.on('message', function(message, flags) { - flags.binary.should.be.ok; - areArraysEqual(buf, message).should.be.ok; - app.close(); - ws.terminate(); - wss.close(); - done(); - }); - }); - wss.on('connection', function(ws) { - ws.on('message', function(message, flags) { - ws.send(message, {binary: true}); - }); - }); - }); - }); - }); - - describe('protocol support discovery', function() { - describe('#supports', function() { - describe('#binary', function() { - it('returns true for hybi transport', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port); - }); - wss.on('connection', function(client) { - assert.equal(true, client.supports.binary); - wss.close(); - done(); - }); - }); - - it('returns false for hixie transport', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90' - } - }; - var req = http.request(options); - req.write('WjN}|M(6'); - req.end(); - }); - wss.on('connection', function(client) { - assert.equal(false, client.supports.binary); - wss.close(); - done(); - }); - }); - }); - }); - }); - - describe('host and origin headers', function() { - it('includes the host header with port number', function(done) { - var srv = http.createServer(); - srv.listen(++port, function(){ - srv.on('upgrade', function(req, socket, upgradeHeade) { - assert.equal('localhost:' + port, req.headers['host']); - srv.close(); - done(); - }); - var ws = new WebSocket('ws://localhost:' + port); - }); - }); - - it('includes the origin header with port number', function(done) { - var srv = http.createServer(); - srv.listen(++port, function() { - srv.on('upgrade', function(req, socket, upgradeHeade) { - assert.equal('localhost:' + port, req.headers['origin']); - srv.close(); - done(); - }); - var ws = new WebSocket('ws://localhost:' + port); - }); - }); - }); - -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocketServer.test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocketServer.test.js deleted file mode 100644 index c21fd97f..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocketServer.test.js +++ /dev/null @@ -1,1103 +0,0 @@ -var http = require('http') - , https = require('https') - , WebSocket = require('../') - , WebSocketServer = WebSocket.Server - , fs = require('fs') - , should = require('should'); - -var port = 8000; - -function getArrayBuffer(buf) { - var l = buf.length; - var arrayBuf = new ArrayBuffer(l); - for (var i = 0; i < l; ++i) { - arrayBuf[i] = buf[i]; - } - return arrayBuf; -} - -function areArraysEqual(x, y) { - if (x.length != y.length) return false; - for (var i = 0, l = x.length; i < l; ++i) { - if (x[i] !== y[i]) return false; - } - return true; -} - -describe('WebSocketServer', function() { - describe('#ctor', function() { - it('throws an error if no option object is passed', function() { - var gotException = false; - try { - var wss = new WebSocketServer(); - } - catch (e) { - gotException = true; - } - gotException.should.be.ok; - }); - - it('throws an error if no port or server is specified', function() { - var gotException = false; - try { - var wss = new WebSocketServer({}); - } - catch (e) { - gotException = true; - } - gotException.should.be.ok; - }); - - it('does not throw an error if no port or server is specified, when the noServer option is true', function() { - var gotException = false; - try { - var wss = new WebSocketServer({noServer: true}); - } - catch (e) { - gotException = true; - } - gotException.should.eql(false); - }); - - it('emits an error if http server bind fails', function(done) { - var wss = new WebSocketServer({port: 1}); - wss.on('error', function() { done(); }); - }); - - it('starts a server on a given port', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port); - }); - wss.on('connection', function(client) { - wss.close(); - done(); - }); - }); - - it('uses a precreated http server', function (done) { - var srv = http.createServer(); - srv.listen(++port, function () { - var wss = new WebSocketServer({server: srv}); - var ws = new WebSocket('ws://localhost:' + port); - - wss.on('connection', function(client) { - wss.close(); - srv.close(); - done(); - }); - }); - }); - - it('uses a precreated http server listening on unix socket', function (done) { - var srv = http.createServer(); - var sockPath = '/tmp/ws_socket_'+new Date().getTime()+'.'+Math.floor(Math.random() * 1000); - srv.listen(sockPath, function () { - var wss = new WebSocketServer({server: srv}); - var ws = new WebSocket('ws+unix://'+sockPath); - - wss.on('connection', function(client) { - wss.close(); - srv.close(); - done(); - }); - }); - }); - - it('emits path specific connection event', function (done) { - var srv = http.createServer(); - srv.listen(++port, function () { - var wss = new WebSocketServer({server: srv}); - var ws = new WebSocket('ws://localhost:' + port+'/endpointName'); - - wss.on('connection/endpointName', function(client) { - wss.close(); - srv.close(); - done(); - }); - }); - }); - - it('can have two different instances listening on the same http server with two different paths', function(done) { - var srv = http.createServer(); - srv.listen(++port, function () { - var wss1 = new WebSocketServer({server: srv, path: '/wss1'}) - , wss2 = new WebSocketServer({server: srv, path: '/wss2'}); - var doneCount = 0; - wss1.on('connection', function(client) { - wss1.close(); - if (++doneCount == 2) { - srv.close(); - done(); - } - }); - wss2.on('connection', function(client) { - wss2.close(); - if (++doneCount == 2) { - srv.close(); - done(); - } - }); - var ws1 = new WebSocket('ws://localhost:' + port + '/wss1'); - var ws2 = new WebSocket('ws://localhost:' + port + '/wss2?foo=1'); - }); - }); - - it('cannot have two different instances listening on the same http server with the same path', function(done) { - var srv = http.createServer(); - srv.listen(++port, function () { - var wss1 = new WebSocketServer({server: srv, path: '/wss1'}); - try { - var wss2 = new WebSocketServer({server: srv, path: '/wss1'}); - } - catch (e) { - wss1.close(); - srv.close(); - done(); - } - }); - }); - }); - - describe('#close', function() { - it('will close all clients', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('close', function() { - if (++closes == 2) done(); - }); - }); - var closes = 0; - wss.on('connection', function(client) { - client.on('close', function() { - if (++closes == 2) done(); - }); - wss.close(); - }); - }); - - it('does not close a precreated server', function(done) { - var srv = http.createServer(); - var realClose = srv.close; - srv.close = function() { - should.fail('must not close pre-created server'); - } - srv.listen(++port, function () { - var wss = new WebSocketServer({server: srv}); - var ws = new WebSocket('ws://localhost:' + port); - wss.on('connection', function(client) { - wss.close(); - srv.close = realClose; - srv.close(); - done(); - }); - }); - }); - - it('cleans up websocket data on a precreated server', function(done) { - var srv = http.createServer(); - srv.listen(++port, function () { - var wss1 = new WebSocketServer({server: srv, path: '/wss1'}) - , wss2 = new WebSocketServer({server: srv, path: '/wss2'}); - (typeof srv._webSocketPaths).should.eql('object'); - Object.keys(srv._webSocketPaths).length.should.eql(2); - wss1.close(); - Object.keys(srv._webSocketPaths).length.should.eql(1); - wss2.close(); - (typeof srv._webSocketPaths).should.eql('undefined'); - srv.close(); - done(); - }); - }); - }); - - describe('#clients', function() { - it('returns a list of connected clients', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - wss.clients.length.should.eql(0); - var ws = new WebSocket('ws://localhost:' + port); - }); - wss.on('connection', function(client) { - wss.clients.length.should.eql(1); - wss.close(); - done(); - }); - }); - - it('can be disabled', function(done) { - var wss = new WebSocketServer({port: ++port, clientTracking: false}, function() { - wss.clients.length.should.eql(0); - var ws = new WebSocket('ws://localhost:' + port); - }); - wss.on('connection', function(client) { - wss.clients.length.should.eql(0); - wss.close(); - done(); - }); - }); - - it('is updated when client terminates the connection', function(done) { - var ws; - var wss = new WebSocketServer({port: ++port}, function() { - ws = new WebSocket('ws://localhost:' + port); - }); - wss.on('connection', function(client) { - client.on('close', function() { - wss.clients.length.should.eql(0); - wss.close(); - done(); - }); - ws.terminate(); - }); - }); - - it('is updated when client closes the connection', function(done) { - var ws; - var wss = new WebSocketServer({port: ++port}, function() { - ws = new WebSocket('ws://localhost:' + port); - }); - wss.on('connection', function(client) { - client.on('close', function() { - wss.clients.length.should.eql(0); - wss.close(); - done(); - }); - ws.close(); - }); - }); - }); - - describe('#options', function() { - it('exposes options passed to constructor', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - wss.options.port.should.eql(port); - wss.close(); - done(); - }); - }); - }); - - describe('#handleUpgrade', function() { - it('can be used for a pre-existing server', function (done) { - var srv = http.createServer(); - srv.listen(++port, function () { - var wss = new WebSocketServer({noServer: true}); - srv.on('upgrade', function(req, socket, upgradeHead) { - wss.handleUpgrade(req, socket, upgradeHead, function(client) { - client.send('hello'); - }); - }); - var ws = new WebSocket('ws://localhost:' + port); - ws.on('message', function(message) { - message.should.eql('hello'); - wss.close(); - srv.close(); - done(); - }); - }); - }); - }); - - describe('hybi mode', function() { - describe('connection establishing', function() { - it('does not accept connections with no sec-websocket-key', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket' - } - }; - var req = http.request(options); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(400); - wss.close(); - done(); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - - it('does not accept connections with no sec-websocket-version', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==' - } - }; - var req = http.request(options); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(400); - wss.close(); - done(); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - - it('does not accept connections with invalid sec-websocket-version', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Version': 12 - } - }; - var req = http.request(options); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(400); - wss.close(); - done(); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - - it('client can be denied', function(done) { - var wss = new WebSocketServer({port: ++port, verifyClient: function(o) { - return false; - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Version': 8, - 'Sec-WebSocket-Origin': 'http://foobar.com' - } - }; - var req = http.request(options); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(401); - process.nextTick(function() { - wss.close(); - done(); - }); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - - it('client can be accepted', function(done) { - var wss = new WebSocketServer({port: ++port, verifyClient: function(o) { - return true; - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Version': 13, - 'Origin': 'http://foobar.com' - } - }; - var req = http.request(options); - req.end(); - }); - wss.on('connection', function(ws) { - ws.terminate(); - wss.close(); - done(); - }); - wss.on('error', function() {}); - }); - - it('verifyClient gets client origin', function(done) { - var verifyClientCalled = false; - var wss = new WebSocketServer({port: ++port, verifyClient: function(info) { - info.origin.should.eql('http://foobarbaz.com'); - verifyClientCalled = true; - return false; - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Version': 13, - 'Origin': 'http://foobarbaz.com' - } - }; - var req = http.request(options); - req.end(); - req.on('response', function(res) { - verifyClientCalled.should.be.ok; - wss.close(); - done(); - }); - }); - wss.on('error', function() {}); - }); - - it('verifyClient gets original request', function(done) { - var verifyClientCalled = false; - var wss = new WebSocketServer({port: ++port, verifyClient: function(info) { - info.req.headers['sec-websocket-key'].should.eql('dGhlIHNhbXBsZSBub25jZQ=='); - verifyClientCalled = true; - return false; - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Version': 13, - 'Origin': 'http://foobarbaz.com' - } - }; - var req = http.request(options); - req.end(); - req.on('response', function(res) { - verifyClientCalled.should.be.ok; - wss.close(); - done(); - }); - }); - wss.on('error', function() {}); - }); - - it('verifyClient has secure:true for ssl connections', function(done) { - var options = { - key: fs.readFileSync('test/fixtures/key.pem'), - cert: fs.readFileSync('test/fixtures/certificate.pem') - }; - var app = https.createServer(options, function (req, res) { - res.writeHead(200); - res.end(); - }); - var success = false; - var wss = new WebSocketServer({ - server: app, - verifyClient: function(info) { - success = info.secure === true; - return true; - } - }); - app.listen(++port, function() { - var ws = new WebSocket('wss://localhost:' + port); - }); - wss.on('connection', function(ws) { - app.close(); - ws.terminate(); - wss.close(); - success.should.be.ok; - done(); - }); - }); - - it('verifyClient has secure:false for non-ssl connections', function(done) { - var app = http.createServer(function (req, res) { - res.writeHead(200); - res.end(); - }); - var success = false; - var wss = new WebSocketServer({ - server: app, - verifyClient: function(info) { - success = info.secure === false; - return true; - } - }); - app.listen(++port, function() { - var ws = new WebSocket('ws://localhost:' + port); - }); - wss.on('connection', function(ws) { - app.close(); - ws.terminate(); - wss.close(); - success.should.be.ok; - done(); - }); - }); - - it('client can be denied asynchronously', function(done) { - var wss = new WebSocketServer({port: ++port, verifyClient: function(o, cb) { - process.nextTick(function() { - cb(false); - }); - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Version': 8, - 'Sec-WebSocket-Origin': 'http://foobar.com' - } - }; - var req = http.request(options); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(401); - process.nextTick(function() { - wss.close(); - done(); - }); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - - it('client can be accepted asynchronously', function(done) { - var wss = new WebSocketServer({port: ++port, verifyClient: function(o, cb) { - process.nextTick(function() { - cb(true); - }); - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Version': 13, - 'Origin': 'http://foobar.com' - } - }; - var req = http.request(options); - req.end(); - }); - wss.on('connection', function(ws) { - ws.terminate(); - wss.close(); - done(); - }); - wss.on('error', function() {}); - }); - - it('handles messages passed along with the upgrade request (upgrade head)', function(done) { - var wss = new WebSocketServer({port: ++port, verifyClient: function(o) { - return true; - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Version': 13, - 'Origin': 'http://foobar.com' - } - }; - var req = http.request(options); - req.write(new Buffer([0x81, 0x05, 0x48, 0x65, 0x6c, 0x6c, 0x6f], 'binary')); - req.end(); - }); - wss.on('connection', function(ws) { - ws.on('message', function(data) { - data.should.eql('Hello'); - ws.terminate(); - wss.close(); - done(); - }); - }); - wss.on('error', function() {}); - }); - - it('selects the first protocol by default', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port, {protocol: 'prot1, prot2'}); - ws.on('open', function(client) { - ws.protocol.should.eql('prot1'); - wss.close(); - done(); - }); - }); - }); - - it('selects the last protocol via protocol handler', function(done) { - var wss = new WebSocketServer({port: ++port, handleProtocols: function(ps, cb) { - cb(true, ps[ps.length-1]); }}, function() { - var ws = new WebSocket('ws://localhost:' + port, {protocol: 'prot1, prot2'}); - ws.on('open', function(client) { - ws.protocol.should.eql('prot2'); - wss.close(); - done(); - }); - }); - }); - - it('client detects invalid server protocol', function(done) { - var wss = new WebSocketServer({port: ++port, handleProtocols: function(ps, cb) { - cb(true, 'prot3'); }}, function() { - var ws = new WebSocket('ws://localhost:' + port, {protocol: 'prot1, prot2'}); - ws.on('open', function(client) { - done(new Error('connection must not be established')); - }); - ws.on('error', function() { - done(); - }); - }); - }); - - it('client detects no server protocol', function(done) { - var wss = new WebSocketServer({port: ++port, handleProtocols: function(ps, cb) { - cb(true); }}, function() { - var ws = new WebSocket('ws://localhost:' + port, {protocol: 'prot1, prot2'}); - ws.on('open', function(client) { - done(new Error('connection must not be established')); - }); - ws.on('error', function() { - done(); - }); - }); - }); - - it('client refuses server protocols', function(done) { - var wss = new WebSocketServer({port: ++port, handleProtocols: function(ps, cb) { - cb(false); }}, function() { - var ws = new WebSocket('ws://localhost:' + port, {protocol: 'prot1, prot2'}); - ws.on('open', function(client) { - done(new Error('connection must not be established')); - }); - ws.on('error', function() { - done(); - }); - }); - }); - - it('server detects invalid protocol handler', function(done) { - var wss = new WebSocketServer({port: ++port, handleProtocols: function(ps, cb) { - // not calling callback is an error and shouldn't timeout - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Version': 13, - 'Sec-WebSocket-Origin': 'http://foobar.com' - } - }; - options.port = port; - var req = http.request(options); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(501); - wss.close(); - done(); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - }); - - describe('messaging', function() { - it('can send and receive data', function(done) { - var data = new Array(65*1024); - for (var i = 0; i < data.length; ++i) { - data[i] = String.fromCharCode(65 + ~~(25 * Math.random())); - } - data = data.join(''); - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('message', function(message, flags) { - ws.send(message); - }); - }); - wss.on('connection', function(client) { - client.on('message', function(message) { - message.should.eql(data); - wss.close(); - done(); - }); - client.send(data); - }); - }); - }); - }); - - describe('hixie mode', function() { - it('can be disabled', function(done) { - var wss = new WebSocketServer({port: ++port, disableHixie: true}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90' - } - }; - var req = http.request(options); - req.write('WjN}|M(6'); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(401); - process.nextTick(function() { - wss.close(); - done(); - }); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - - describe('connection establishing', function() { - it('does not accept connections with no sec-websocket-key1', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80' - } - }; - var req = http.request(options); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(400); - wss.close(); - done(); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - - it('does not accept connections with no sec-websocket-key2', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90' - } - }; - var req = http.request(options); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(400); - wss.close(); - done(); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - - it('accepts connections with valid handshake', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90' - } - }; - var req = http.request(options); - req.write('WjN}|M(6'); - req.end(); - }); - wss.on('connection', function(ws) { - ws.terminate(); - wss.close(); - done(); - }); - wss.on('error', function() {}); - }); - - it('client can be denied', function(done) { - var wss = new WebSocketServer({port: ++port, verifyClient: function(o) { - return false; - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90' - } - }; - var req = http.request(options); - req.write('WjN}|M(6'); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(401); - process.nextTick(function() { - wss.close(); - done(); - }); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - - it('client can be accepted', function(done) { - var wss = new WebSocketServer({port: ++port, verifyClient: function(o) { - return true; - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90' - } - }; - var req = http.request(options); - req.write('WjN}|M(6'); - req.end(); - }); - wss.on('connection', function(ws) { - ws.terminate(); - wss.close(); - done(); - }); - wss.on('error', function() {}); - }); - - it('verifyClient gets client origin', function(done) { - var verifyClientCalled = false; - var wss = new WebSocketServer({port: ++port, verifyClient: function(info) { - info.origin.should.eql('http://foobarbaz.com'); - verifyClientCalled = true; - return false; - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Origin': 'http://foobarbaz.com', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90' - } - }; - var req = http.request(options); - req.write('WjN}|M(6'); - req.end(); - req.on('response', function(res) { - verifyClientCalled.should.be.ok; - wss.close(); - done(); - }); - }); - wss.on('error', function() {}); - }); - - it('verifyClient gets original request', function(done) { - var verifyClientCalled = false; - var wss = new WebSocketServer({port: ++port, verifyClient: function(info) { - info.req.headers['sec-websocket-key1'].should.eql('3e6b263 4 17 80'); - verifyClientCalled = true; - return false; - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Origin': 'http://foobarbaz.com', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90' - } - }; - var req = http.request(options); - req.write('WjN}|M(6'); - req.end(); - req.on('response', function(res) { - verifyClientCalled.should.be.ok; - wss.close(); - done(); - }); - }); - wss.on('error', function() {}); - }); - - it('client can be denied asynchronously', function(done) { - var wss = new WebSocketServer({port: ++port, verifyClient: function(o, cb) { - cb(false); - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Origin': 'http://foobarbaz.com', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90' - } - }; - var req = http.request(options); - req.write('WjN}|M(6'); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(401); - process.nextTick(function() { - wss.close(); - done(); - }); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - - it('client can be accepted asynchronously', function(done) { - var wss = new WebSocketServer({port: ++port, verifyClient: function(o, cb) { - cb(true); - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Origin': 'http://foobarbaz.com', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90' - } - }; - var req = http.request(options); - req.write('WjN}|M(6'); - req.end(); - }); - wss.on('connection', function(ws) { - wss.close(); - done(); - }); - wss.on('error', function() {}); - }); - - it('handles messages passed along with the upgrade request (upgrade head)', function(done) { - var wss = new WebSocketServer({port: ++port, verifyClient: function(o) { - return true; - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90', - 'Origin': 'http://foobar.com' - } - }; - var req = http.request(options); - req.write('WjN}|M(6'); - req.write(new Buffer([0x00, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0xff], 'binary')); - req.end(); - }); - wss.on('connection', function(ws) { - ws.on('message', function(data) { - data.should.eql('Hello'); - ws.terminate(); - wss.close(); - done(); - }); - }); - wss.on('error', function() {}); - }); - }); - }); - - describe('client properties', function() { - it('protocol is exposed', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port, {protocol: 'hi'}); - }); - wss.on('connection', function(client) { - client.protocol.should.eql('hi'); - wss.close(); - done(); - }); - }); - - it('protocolVersion is exposed', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port, {protocolVersion: 8}); - }); - wss.on('connection', function(client) { - client.protocolVersion.should.eql(8); - wss.close(); - done(); - }); - }); - - it('upgradeReq is the original request object', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port, {protocolVersion: 8}); - }); - wss.on('connection', function(client) { - client.upgradeReq.httpVersion.should.eql('1.1'); - wss.close(); - done(); - }); - }); - }); - -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/autobahn-server.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/autobahn-server.js deleted file mode 100644 index 36fe0c24..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/autobahn-server.js +++ /dev/null @@ -1,29 +0,0 @@ -var WebSocketServer = require('../').Server; - -process.on('uncaughtException', function(err) { - console.log('Caught exception: ', err, err.stack); -}); - -process.on('SIGINT', function () { - try { - console.log('Updating reports and shutting down'); - var ws = new WebSocket('ws://localhost:9001/updateReports?agent=ws'); - ws.on('close', function() { - process.exit(); - }); - } - catch(e) { - process.exit(); - } -}); - -var wss = new WebSocketServer({port: 8181}); -wss.on('connection', function(ws) { - console.log('new connection'); - ws.on('message', function(data, flags) { - ws.send(flags.buffer, {binary: flags.binary === true}); - }); - ws.on('error', function() { - console.log('error', arguments); - }); -}); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/autobahn.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/autobahn.js deleted file mode 100644 index 048cc904..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/autobahn.js +++ /dev/null @@ -1,52 +0,0 @@ -var WebSocket = require('../'); -var currentTest = 1; -var lastTest = -1; -var testCount = null; - -process.on('uncaughtException', function(err) { - console.log('Caught exception: ', err, err.stack); -}); - -process.on('SIGINT', function () { - try { - console.log('Updating reports and shutting down'); - var ws = new WebSocket('ws://localhost:9001/updateReports?agent=ws'); - ws.on('close', function() { - process.exit(); - }); - } - catch(e) { - process.exit(); - } -}); - -function nextTest() { - if (currentTest > testCount || (lastTest != -1 && currentTest > lastTest)) { - console.log('Updating reports and shutting down'); - var ws = new WebSocket('ws://localhost:9001/updateReports?agent=ws'); - ws.on('close', function() { - process.exit(); - }); - return; - }; - console.log('Running test case ' + currentTest + '/' + testCount); - var ws = new WebSocket('ws://localhost:9001/runCase?case=' + currentTest + '&agent=ws'); - ws.on('message', function(data, flags) { - ws.send(flags.buffer, {binary: flags.binary === true, mask: true}); - }); - ws.on('close', function(data) { - currentTest += 1; - process.nextTick(nextTest); - }); - ws.on('error', function(e) {}); -} - -var ws = new WebSocket('ws://localhost:9001/getCaseCount'); -ws.on('message', function(data, flags) { - testCount = parseInt(data); -}); -ws.on('close', function() { - if (testCount > 0) { - nextTest(); - } -}); \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/agent1-cert.pem b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/agent1-cert.pem deleted file mode 100644 index cccb9fb4..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/agent1-cert.pem +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICbjCCAdcCCQCVvok5oeLpqzANBgkqhkiG9w0BAQUFADB6MQswCQYDVQQGEwJV -UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO -BgNVBAsTB05vZGUuanMxDDAKBgNVBAMTA2NhMTEgMB4GCSqGSIb3DQEJARYRcnlA -dGlueWNsb3Vkcy5vcmcwHhcNMTMwMzA4MDAzMDIyWhcNNDAwNzIzMDAzMDIyWjB9 -MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQK -EwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MTEgMB4G -CSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwgZ8wDQYJKoZIhvcNAQEBBQAD -gY0AMIGJAoGBAL6GwKosYb0Yc3Qo0OtQVlCJ4208Idw11ij+t2W5sfYbCil5tyQo -jnhGM1CJhEXynQpXXwjKJuIeTQCkeUibTyFKa0bs8+li2FiGoKYbb4G81ovnqkmE -2iDVb8Gw3rrM4zeZ0ZdFnjMsAZac8h6+C4sB/pS9BiMOo6qTl15RQlcJAgMBAAEw -DQYJKoZIhvcNAQEFBQADgYEAOtmLo8DwTPnI4wfQbQ3hWlTS/9itww6IsxH2ODt9 -ggB7wi7N3uAdIWRZ54ke0NEAO5CW1xNTwsWcxQbiHrDOqX1vfVCjIenI76jVEEap -/Ay53ydHNBKdsKkib61Me14Mu0bA3lUul57VXwmH4NUEFB3w973Q60PschUhOEXj -7DY= ------END CERTIFICATE----- diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/agent1-key.pem b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/agent1-key.pem deleted file mode 100644 index cbd5f0c2..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/agent1-key.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXAIBAAKBgQC+hsCqLGG9GHN0KNDrUFZQieNtPCHcNdYo/rdlubH2Gwopebck -KI54RjNQiYRF8p0KV18IyibiHk0ApHlIm08hSmtG7PPpYthYhqCmG2+BvNaL56pJ -hNog1W/BsN66zOM3mdGXRZ4zLAGWnPIevguLAf6UvQYjDqOqk5deUUJXCQIDAQAB -AoGANu/CBA+SCyVOvRK70u4yRTzNMAUjukxnuSBhH1rg/pajYnwvG6T6F6IeT72n -P0gKkh3JUE6B0bds+p9yPUZTFUXghxjcF33wlIY44H6gFE4K5WutsFJ9c450wtuu -8rXZTsIg7lAXWjTFVmdtOEPetcGlO2Hpi1O7ZzkzHgB2w9ECQQDksCCYx78or1zY -ZSokm8jmpIjG3VLKdvI9HAoJRN40ldnwFoigrFa1AHwsFtWNe8bKyVRPDoLDUjpB -dkPWgweVAkEA1UfgqguQ2KIkbtp9nDBionu3QaajksrRHwIa8vdfRfLxszfHk2fh -NGY3dkRZF8HUAbzYLrd9poVhCBAEjWekpQJASOM6AHfpnXYHCZF01SYx6hEW5wsz -kARJQODm8f1ZNTlttO/5q/xBxn7ZFNRSTD3fJlL05B2j380ddC/Vf1FT4QJAP1BC -GliqnBSuGhZUWYxni3KMeTm9rzL0F29pjpzutHYlWB2D6ndY/FQnvL0XcZ0Bka58 -womIDGnl3x3aLBwLXQJBAJv6h5CHbXHx7VyDJAcNfppAqZGcEaiVg8yf2F33iWy2 -FLthhJucx7df7SO2aw5h06bRDRAhb9br0R9/3mLr7RE= ------END RSA PRIVATE KEY----- diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/ca1-cert.pem b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/ca1-cert.pem deleted file mode 100644 index 1d0c0d68..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/ca1-cert.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICazCCAdQCCQC9/g69HtxXRzANBgkqhkiG9w0BAQUFADB6MQswCQYDVQQGEwJV -UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO -BgNVBAsTB05vZGUuanMxDDAKBgNVBAMTA2NhMTEgMB4GCSqGSIb3DQEJARYRcnlA -dGlueWNsb3Vkcy5vcmcwHhcNMTMwMzA4MDAzMDIyWhcNNDAwNzIzMDAzMDIyWjB6 -MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQK -EwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDDAKBgNVBAMTA2NhMTEgMB4GCSqG -SIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwgZ8wDQYJKoZIhvcNAQEBBQADgY0A -MIGJAoGBAKxr1mARUcv7zaqx5y4AxJPK6c1jdbSg7StcL4vg8klaPAlfNO6o+/Cl -w5CdQD3ukaVUwUOJ4T/+b3Xf7785XcWBC33GdjVQkfbHATJYcka7j7JDw3qev5Jk -1rAbRw48hF6rYlSGcx1mccAjoLoa3I8jgxCNAYHIjUQXgdmU893rAgMBAAEwDQYJ -KoZIhvcNAQEFBQADgYEAis05yxjCtJRuv8uX/DK6TX/j9C9Lzp1rKDNFTaTZ0iRw -KCw1EcNx4OXSj9gNblW4PWxpDvygrt1AmH9h2cb8K859NSHa9JOBFw6MA5C2A4Sj -NQfNATqUl4T6cdORlcDEZwHtT8b6D4A6Er31G/eJF4Sen0TUFpjdjd+l9RBjHlo= ------END CERTIFICATE----- diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/ca1-key.pem b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/ca1-key.pem deleted file mode 100644 index df149508..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/ca1-key.pem +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIICxjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIFeWxJE1BrRECAggA -MBQGCCqGSIb3DQMHBAgu9PlMSQ+BOASCAoDEZN2tX0xWo/N+Jg+PrvCrFDk3P+3x -5xG/PEDjtMCAWPBEwbnaYHDzYmhNcAmxzGqEHGMDiWYs46LbO560VS3uMvFbEWPo -KYYVb13vkxl2poXdonCb5cHZA5GUYzTIVVJFptl4LHwBczHoMHtA4FqAhKlYvlWw -EOrdLB8XcwMmGPFabbbGxno0+EWWM27uNjlogfoxj35mQqSW4rOlhZ460XjOB1Zx -LjXMuZeONojkGYQRG5EUMchBoctQpCOM6cAi9r1B9BvtFCBpDV1c1zEZBzTEUd8o -kLn6tjLmY+QpTdylFjEWc7U3ppLY/pkoTBv4r85a2sEMWqkhSJboLaTboWzDJcU3 -Ke61pMpovt/3yCUd3TKgwduVwwQtDVTlBe0p66aN9QVj3CrFy/bKAGO3vxlli24H -aIjZf+OVoBY21ESlW3jLvNlBf7Ezf///2E7j4SCDLyZSFMTpFoAG/jDRyvi+wTKX -Kh485Bptnip6DCSuoH4u2SkOqwz3gJS/6s02YKe4m311QT4Pzne5/FwOFaS/HhQg -Xvyh2/d00OgJ0Y0PYQsHILPRgTUCKUXvj1O58opn3fxSacsPxIXwj6Z4FYAjUTaV -2B85k1lpant/JJEilDqMjqzx4pHZ/Z3Uto1lSM1JZs9SNL/0UR+6F0TXZTULVU9V -w8jYzz4sPr7LEyrrTbzmjQgnQFVbhAN/eKgRZK/SpLjxpmBV5MfpbPKsPUZqT4UC -4nXa8a/NYUQ9e+QKK8enq9E599c2W442W7Z1uFRZTWReMx/lF8wwA6G8zOPG0bdj -d+T5Gegzd5mvRiXMBklCo8RLxOOvgxun1n3PY4a63aH6mqBhdfhiLp5j ------END ENCRYPTED PRIVATE KEY----- diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/certificate.pem b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/certificate.pem deleted file mode 100644 index 0efc2ef5..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/certificate.pem +++ /dev/null @@ -1,13 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICATCCAWoCCQDPufXH86n2QzANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJu -bzETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0 -cyBQdHkgTHRkMB4XDTEyMDEwMTE0NDQwMFoXDTIwMDMxOTE0NDQwMFowRTELMAkG -A1UEBhMCbm8xEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0 -IFdpZGdpdHMgUHR5IEx0ZDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAtrQ7 -+r//2iV/B6F+4boH0XqFn7alcV9lpjvAmwRXNKnxAoa0f97AjYPGNLKrjpkNXXhB -JROIdbRbZnCNeC5fzX1a+JCo7KStzBXuGSZr27TtFmcV4H+9gIRIcNHtZmJLnxbJ -sIhkGR8yVYdmJZe4eT5ldk1zoB1adgPF1hZhCBMCAwEAATANBgkqhkiG9w0BAQUF -AAOBgQCeWBEHYJ4mCB5McwSSUox0T+/mJ4W48L/ZUE4LtRhHasU9hiW92xZkTa7E -QLcoJKQiWfiLX2ysAro0NX4+V8iqLziMqvswnPzz5nezaOLE/9U/QvH3l8qqNkXu -rNbsW1h/IO6FV8avWFYVFoutUwOaZ809k7iMh2F2JMgXQ5EymQ== ------END CERTIFICATE----- diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/key.pem b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/key.pem deleted file mode 100644 index 176fe320..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/key.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXAIBAAKBgQC2tDv6v//aJX8HoX7hugfReoWftqVxX2WmO8CbBFc0qfEChrR/ -3sCNg8Y0squOmQ1deEElE4h1tFtmcI14Ll/NfVr4kKjspK3MFe4ZJmvbtO0WZxXg -f72AhEhw0e1mYkufFsmwiGQZHzJVh2Yll7h5PmV2TXOgHVp2A8XWFmEIEwIDAQAB -AoGAAlVY8sHi/aE+9xT77twWX3mGHV0SzdjfDnly40fx6S1Gc7bOtVdd9DC7pk6l -3ENeJVR02IlgU8iC5lMHq4JEHPE272jtPrLlrpWLTGmHEqoVFv9AITPqUDLhB9Kk -Hjl7h8NYBKbr2JHKICr3DIPKOT+RnXVb1PD4EORbJ3ooYmkCQQDfknUnVxPgxUGs -ouABw1WJIOVgcCY/IFt4Ihf6VWTsxBgzTJKxn3HtgvE0oqTH7V480XoH0QxHhjLq -DrgobWU9AkEA0TRJ8/ouXGnFEPAXjWr9GdPQRZ1Use2MrFjneH2+Sxc0CmYtwwqL -Kr5kS6mqJrxprJeluSjBd+3/ElxURrEXjwJAUvmlN1OPEhXDmRHd92mKnlkyKEeX -OkiFCiIFKih1S5Y/sRJTQ0781nyJjtJqO7UyC3pnQu1oFEePL+UEniRztQJAMfav -AtnpYKDSM+1jcp7uu9BemYGtzKDTTAYfoiNF42EzSJiGrWJDQn4eLgPjY0T0aAf/ -yGz3Z9ErbhMm/Ysl+QJBAL4kBxRT8gM4ByJw4sdOvSeCCANFq8fhbgm8pGWlCPb5 -JGmX3/GHFM8x2tbWMGpyZP1DLtiNEFz7eCGktWK5rqE= ------END RSA PRIVATE KEY----- diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/request.pem b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/request.pem deleted file mode 100644 index 51bc7f62..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/request.pem +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIIBhDCB7gIBADBFMQswCQYDVQQGEwJubzETMBEGA1UECAwKU29tZS1TdGF0ZTEh -MB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIGfMA0GCSqGSIb3DQEB -AQUAA4GNADCBiQKBgQC2tDv6v//aJX8HoX7hugfReoWftqVxX2WmO8CbBFc0qfEC -hrR/3sCNg8Y0squOmQ1deEElE4h1tFtmcI14Ll/NfVr4kKjspK3MFe4ZJmvbtO0W -ZxXgf72AhEhw0e1mYkufFsmwiGQZHzJVh2Yll7h5PmV2TXOgHVp2A8XWFmEIEwID -AQABoAAwDQYJKoZIhvcNAQEFBQADgYEAjsUXEARgfxZNkMjuUcudgU2w4JXS0gGI -JQ0U1LmU0vMDSKwqndMlvCbKzEgPbJnGJDI8D4MeINCJHa5Ceyb8c+jaJYUcCabl -lQW5Psn3+eWp8ncKlIycDRj1Qk615XuXtV0fhkrgQM2ZCm9LaQ1O1Gd/CzLihLjF -W0MmgMKMMRk= ------END CERTIFICATE REQUEST----- diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/textfile b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/textfile deleted file mode 100644 index a10483b0..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/textfile +++ /dev/null @@ -1,9 +0,0 @@ -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam egestas, massa at aliquam luctus, sapien erat viverra elit, nec pulvinar turpis eros sagittis urna. Pellentesque imperdiet tempor varius. Pellentesque blandit, ipsum in imperdiet venenatis, mi elit faucibus odio, id condimentum ante enim sed lectus. Aliquam et odio non odio pellentesque pulvinar. Vestibulum a erat dolor. Integer pretium risus sit amet nisl volutpat nec venenatis magna egestas. Ut bibendum felis eu tellus laoreet eleifend. Nam pulvinar auctor tortor, eu iaculis leo vestibulum quis. In euismod risus ac purus vehicula et fermentum ligula consectetur. Vivamus condimentum tempus lacinia. - -Curabitur sodales condimentum urna id dictum. Sed quis justo sit amet quam ultrices tincidunt vel laoreet nulla. Nullam quis ipsum sed nisi mollis bibendum at sit amet nisi. Donec laoreet consequat velit sit amet mollis. Nam sed sapien a massa iaculis dapibus. Sed dui nunc, ultricies et pellentesque ullamcorper, aliquet vitae ligula. Integer eu velit in neque iaculis venenatis. Ut rhoncus cursus est, ac dignissim leo vehicula a. Nulla ullamcorper vulputate mauris id blandit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque eleifend, nisi a tempor sollicitudin, odio massa pretium urna, quis congue sapien elit at tortor. Curabitur ipsum orci, vehicula non commodo molestie, laoreet id enim. Pellentesque convallis ultrices congue. Pellentesque nec iaculis lorem. In sagittis pharetra ipsum eget sodales. - -Fusce id nulla odio. Nunc nibh justo, placerat vel tincidunt sed, ornare et enim. Nulla vel urna vel ante commodo bibendum in vitae metus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Duis erat nunc, semper eget sagittis sit amet, ullamcorper eget lacus. Donec hendrerit ipsum vitae eros vestibulum eu gravida neque tincidunt. Ut molestie lacinia nulla. Donec mattis odio at magna egestas at pellentesque eros accumsan. Praesent interdum sem sit amet nibh commodo dignissim. Duis laoreet, enim ultricies fringilla suscipit, enim libero cursus nulla, sollicitudin adipiscing erat velit ut dui. Nulla eleifend mauris at velit fringilla a molestie lorem venenatis. - -Donec sit amet scelerisque metus. Cras ac felis a nulla venenatis vulputate. Duis porttitor eros ac neque rhoncus eget aliquet neque egestas. Quisque sed nunc est, vitae dapibus quam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In vehicula, est vitae posuere ultricies, diam purus pretium sapien, nec rhoncus dolor nisl eget arcu. Aliquam et nisi vitae risus tincidunt auctor. In vehicula, erat a cursus adipiscing, lorem orci congue est, nec ultricies elit dui in nunc. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Lorem ipsum dolor sit amet, consectetur adipiscing elit. - -Duis congue tempus elit sit amet auctor. Duis dignissim, risus ut sollicitudin ultricies, dolor ligula gravida odio, nec congue orci purus ut ligula. Fusce pretium dictum lectus at volutpat. Sed non auctor mauris. Etiam placerat vestibulum massa id blandit. Quisque consequat lacus ut nulla euismod facilisis. Sed aliquet ipsum nec mi imperdiet viverra. Pellentesque ullamcorper, lectus nec varius gravida, odio justo cursus risus, eu sagittis metus arcu quis felis. Phasellus consectetur vehicula libero, at condimentum orci euismod vel. Nunc purus tortor, suscipit nec fringilla nec, vulputate et nibh. Nam porta vehicula neque. Praesent porttitor, sapien eu auctor euismod, arcu quam elementum urna, sed hendrerit magna augue sed quam. \ No newline at end of file diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/hybi-common.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/hybi-common.js deleted file mode 100644 index 006f9c69..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/hybi-common.js +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Returns a Buffer from a "ff 00 ff"-type hex string. - */ - -getBufferFromHexString = function(byteStr) { - var bytes = byteStr.split(' '); - var buf = new Buffer(bytes.length); - for (var i = 0; i < bytes.length; ++i) { - buf[i] = parseInt(bytes[i], 16); - } - return buf; -} - -/** - * Returns a hex string from a Buffer. - */ - -getHexStringFromBuffer = function(data) { - var s = ''; - for (var i = 0; i < data.length; ++i) { - s += padl(data[i].toString(16), 2, '0') + ' '; - } - return s.trim(); -} - -/** - * Splits a buffer in two parts. - */ - -splitBuffer = function(buffer) { - var b1 = new Buffer(Math.ceil(buffer.length / 2)); - buffer.copy(b1, 0, 0, b1.length); - var b2 = new Buffer(Math.floor(buffer.length / 2)); - buffer.copy(b2, 0, b1.length, b1.length + b2.length); - return [b1, b2]; -} - -/** - * Performs hybi07+ type masking on a hex string or buffer. - */ - -mask = function(buf, maskString) { - if (typeof buf == 'string') buf = new Buffer(buf); - var mask = getBufferFromHexString(maskString || '34 83 a8 68'); - for (var i = 0; i < buf.length; ++i) { - buf[i] ^= mask[i % 4]; - } - return buf; -} - -/** - * Returns a hex string representing the length of a message - */ - -getHybiLengthAsHexString = function(len, masked) { - if (len < 126) { - var buf = new Buffer(1); - buf[0] = (masked ? 0x80 : 0) | len; - } - else if (len < 65536) { - var buf = new Buffer(3); - buf[0] = (masked ? 0x80 : 0) | 126; - getBufferFromHexString(pack(4, len)).copy(buf, 1); - } - else { - var buf = new Buffer(9); - buf[0] = (masked ? 0x80 : 0) | 127; - getBufferFromHexString(pack(16, len)).copy(buf, 1); - } - return getHexStringFromBuffer(buf); -} - -/** - * Unpacks a Buffer into a number. - */ - -unpack = function(buffer) { - var n = 0; - for (var i = 0; i < buffer.length; ++i) { - n = (i == 0) ? buffer[i] : (n * 256) + buffer[i]; - } - return n; -} - -/** - * Returns a hex string, representing a specific byte count 'length', from a number. - */ - -pack = function(length, number) { - return padl(number.toString(16), length, '0').replace(/([0-9a-f][0-9a-f])/gi, '$1 ').trim(); -} - -/** - * Left pads the string 's' to a total length of 'n' with char 'c'. - */ - -padl = function(s, n, c) { - return new Array(1 + n - s.length).join(c) + s; -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/testserver.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/testserver.js deleted file mode 100644 index 3e7a9667..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/testserver.js +++ /dev/null @@ -1,180 +0,0 @@ -var http = require('http') - , util = require('util') - , crypto = require('crypto') - , events = require('events') - , Sender = require('../lib/Sender') - , Receiver = require('../lib/Receiver'); - -module.exports = { - handlers: { - valid: validServer, - invalidKey: invalidRequestHandler, - closeAfterConnect: closeAfterConnectHandler, - return401: return401 - }, - createServer: function(port, handler, cb) { - if (handler && !cb) { - cb = handler; - handler = null; - } - var webServer = http.createServer(function (req, res) { - res.writeHead(200, {'Content-Type': 'text/plain'}); - res.end('okay'); - }); - var srv = new Server(webServer); - webServer.on('upgrade', function(req, socket) { - webServer._socket = socket; - (handler || validServer)(srv, req, socket); - }); - webServer.listen(port, '127.0.0.1', function() { cb(srv); }); - } -}; - -/** - * Test strategies - */ - -function validServer(server, req, socket) { - if (typeof req.headers.upgrade === 'undefined' || - req.headers.upgrade.toLowerCase() !== 'websocket') { - throw new Error('invalid headers'); - return; - } - - if (!req.headers['sec-websocket-key']) { - socket.end(); - throw new Error('websocket key is missing'); - } - - // 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 - ]; - - socket.write(headers.concat('', '').join('\r\n')); - socket.setTimeout(0); - socket.setNoDelay(true); - - var sender = new Sender(socket); - var receiver = new Receiver(); - receiver.ontext = function (message, flags) { - server.emit('message', message, flags); - sender.send(message); - }; - receiver.onbinary = function (message, flags) { - flags = flags || {}; - flags.binary = true; - server.emit('message', message, flags); - sender.send(message, {binary: true}); - }; - receiver.onping = function (message, flags) { - flags = flags || {}; - server.emit('ping', message, flags); - }; - receiver.onpong = function (message, flags) { - flags = flags || {}; - server.emit('pong', message, flags); - }; - receiver.onclose = function (code, message, flags) { - flags = flags || {}; - server.emit('close', code, message, flags); - }; - socket.on('data', function (data) { - receiver.add(data); - }); - socket.on('end', function() { - socket.end(); - }); -} - -function invalidRequestHandler(server, req, socket) { - if (typeof req.headers.upgrade === 'undefined' || - req.headers.upgrade.toLowerCase() !== 'websocket') { - throw new Error('invalid headers'); - return; - } - - if (!req.headers['sec-websocket-key']) { - socket.end(); - throw new Error('websocket key is missing'); - } - - // calc key - var key = req.headers['sec-websocket-key']; - var shasum = crypto.createHash('sha1'); - shasum.update(key + "bogus"); - key = shasum.digest('base64'); - - var headers = [ - 'HTTP/1.1 101 Switching Protocols' - , 'Upgrade: websocket' - , 'Connection: Upgrade' - , 'Sec-WebSocket-Accept: ' + key - ]; - - socket.write(headers.concat('', '').join('\r\n')); - socket.end(); -} - -function closeAfterConnectHandler(server, req, socket) { - if (typeof req.headers.upgrade === 'undefined' || - req.headers.upgrade.toLowerCase() !== 'websocket') { - throw new Error('invalid headers'); - return; - } - - if (!req.headers['sec-websocket-key']) { - socket.end(); - throw new Error('websocket key is missing'); - } - - // 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 - ]; - - socket.write(headers.concat('', '').join('\r\n')); - socket.end(); -} - - -function return401(server, req, socket) { - var headers = [ - 'HTTP/1.1 401 Unauthorized' - , 'Content-type: text/html' - ]; - - socket.write(headers.concat('', '').join('\r\n')); - socket.end(); -} - -/** - * Server object, which will do the actual emitting - */ - -function Server(webServer) { - this.webServer = webServer; -} - -util.inherits(Server, events.EventEmitter); - -Server.prototype.close = function() { - this.webServer.close(); - if (this._socket) this._socket.end(); -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/README.md b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/README.md deleted file mode 100644 index 22aab8bd..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# node-XMLHttpRequest # - -node-XMLHttpRequest is a wrapper for the built-in http client to emulate the -browser XMLHttpRequest object. - -This can be used with JS designed for browsers to improve reuse of code and -allow the use of existing libraries. - -Note: This library currently conforms to [XMLHttpRequest 1](http://www.w3.org/TR/XMLHttpRequest/). Version 2.0 will target [XMLHttpRequest Level 2](http://www.w3.org/TR/XMLHttpRequest2/). - -## Usage ## - -Here's how to include the module in your project and use as the browser-based -XHR object. - - var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; - var xhr = new XMLHttpRequest(); - -Note: use the lowercase string "xmlhttprequest" in your require(). On -case-sensitive systems (eg Linux) using uppercase letters won't work. - -## Versions ## - -Prior to 1.4.0 version numbers were arbitrary. From 1.4.0 on they conform to -the standard major.minor.bugfix. 1.x shouldn't necessarily be considered -stable just because it's above 0.x. - -Since the XMLHttpRequest API is stable this library's API is stable as -well. Major version numbers indicate significant core code changes. -Minor versions indicate minor core code changes or better conformity to -the W3C spec. - -## Supports ## - -* Async and synchronous requests -* GET, POST, PUT, and DELETE requests -* All spec methods (open, send, abort, getRequestHeader, - getAllRequestHeaders, event methods) -* Requests to all domains - -## Known Issues / Missing Features ## - -For a list of open issues or to report your own visit the [github issues -page](https://github.com/driverdan/node-XMLHttpRequest/issues). - -* Local file access may have unexpected results for non-UTF8 files -* Synchronous requests don't set headers properly -* Synchronous requests freeze node while waiting for response (But that's what you want, right? Stick with async!). -* Some events are missing, such as abort -* getRequestHeader is case-sensitive -* Cookies aren't persisted between requests -* Missing XML support -* Missing basic auth diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/autotest.watchr b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/autotest.watchr deleted file mode 100644 index 5324db6c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/autotest.watchr +++ /dev/null @@ -1,8 +0,0 @@ -def run_all_tests - puts `clear` - puts `node tests/test-constants.js` - puts `node tests/test-headers.js` - puts `node tests/test-request.js` -end -watch('.*.js') { run_all_tests } -run_all_tests diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/example/demo.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/example/demo.js deleted file mode 100644 index 4f333de9..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/example/demo.js +++ /dev/null @@ -1,16 +0,0 @@ -var sys = require('util'); -var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; - -var xhr = new XMLHttpRequest(); - -xhr.onreadystatechange = function() { - sys.puts("State: " + this.readyState); - - if (this.readyState == 4) { - sys.puts("Complete.\nBody length: " + this.responseText.length); - sys.puts("Body:\n" + this.responseText); - } -}; - -xhr.open("GET", "http://driverdan.com"); -xhr.send(); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/lib/XMLHttpRequest.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/lib/XMLHttpRequest.js deleted file mode 100644 index 214a2e3b..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/lib/XMLHttpRequest.js +++ /dev/null @@ -1,548 +0,0 @@ -/** - * Wrapper for built-in http.js to emulate the browser XMLHttpRequest object. - * - * This can be used with JS designed for browsers to improve reuse of code and - * allow the use of existing libraries. - * - * Usage: include("XMLHttpRequest.js") and use XMLHttpRequest per W3C specs. - * - * @author Dan DeFelippi - * @contributor David Ellis - * @license MIT - */ - -var Url = require("url") - , spawn = require("child_process").spawn - , fs = require('fs'); - -exports.XMLHttpRequest = function() { - /** - * Private variables - */ - var self = this; - var http = require('http'); - var https = require('https'); - - // Holds http.js objects - var client; - var request; - var response; - - // Request settings - var settings = {}; - - // Set some default headers - var defaultHeaders = { - "User-Agent": "node-XMLHttpRequest", - "Accept": "*/*", - }; - - var headers = defaultHeaders; - - // These headers are not user setable. - // The following are allowed but banned in the spec: - // * user-agent - var forbiddenRequestHeaders = [ - "accept-charset", - "accept-encoding", - "access-control-request-headers", - "access-control-request-method", - "connection", - "content-length", - "content-transfer-encoding", - "cookie", - "cookie2", - "date", - "expect", - "host", - "keep-alive", - "origin", - "referer", - "te", - "trailer", - "transfer-encoding", - "upgrade", - "via" - ]; - - // These request methods are not allowed - var forbiddenRequestMethods = [ - "TRACE", - "TRACK", - "CONNECT" - ]; - - // Send flag - var sendFlag = false; - // Error flag, used when errors occur or abort is called - var errorFlag = false; - - // Event listeners - var listeners = {}; - - /** - * Constants - */ - - this.UNSENT = 0; - this.OPENED = 1; - this.HEADERS_RECEIVED = 2; - this.LOADING = 3; - this.DONE = 4; - - /** - * Public vars - */ - - // Current state - this.readyState = this.UNSENT; - - // default ready state change handler in case one is not set or is set late - this.onreadystatechange = null; - - // Result & response - this.responseText = ""; - this.responseXML = ""; - this.status = null; - this.statusText = null; - - /** - * Private methods - */ - - /** - * Check if the specified header is allowed. - * - * @param string header Header to validate - * @return boolean False if not allowed, otherwise true - */ - var isAllowedHttpHeader = function(header) { - return (header && forbiddenRequestHeaders.indexOf(header.toLowerCase()) === -1); - }; - - /** - * Check if the specified method is allowed. - * - * @param string method Request method to validate - * @return boolean False if not allowed, otherwise true - */ - var isAllowedHttpMethod = function(method) { - return (method && forbiddenRequestMethods.indexOf(method) === -1); - }; - - /** - * Public methods - */ - - /** - * Open the connection. Currently supports local server requests. - * - * @param string method Connection method (eg GET, POST) - * @param string url URL for the connection. - * @param boolean async Asynchronous connection. Default is true. - * @param string user Username for basic authentication (optional) - * @param string password Password for basic authentication (optional) - */ - this.open = function(method, url, async, user, password) { - this.abort(); - errorFlag = false; - - // Check for valid request method - if (!isAllowedHttpMethod(method)) { - throw "SecurityError: Request method not allowed"; - return; - } - - settings = { - "method": method, - "url": url.toString(), - "async": (typeof async !== "boolean" ? true : async), - "user": user || null, - "password": password || null - }; - - setState(this.OPENED); - }; - - /** - * Sets a header for the request. - * - * @param string header Header name - * @param string value Header value - */ - this.setRequestHeader = function(header, value) { - if (this.readyState != this.OPENED) { - throw "INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN"; - } - if (!isAllowedHttpHeader(header)) { - console.warn('Refused to set unsafe header "' + header + '"'); - return; - } - if (sendFlag) { - throw "INVALID_STATE_ERR: send flag is true"; - } - headers[header] = value; - }; - - /** - * Gets a header from the server response. - * - * @param string header Name of header to get. - * @return string Text of the header or null if it doesn't exist. - */ - this.getResponseHeader = function(header) { - if (typeof header === "string" - && this.readyState > this.OPENED - && response.headers[header.toLowerCase()] - && !errorFlag - ) { - return response.headers[header.toLowerCase()]; - } - - return null; - }; - - /** - * Gets all the response headers. - * - * @return string A string with all response headers separated by CR+LF - */ - this.getAllResponseHeaders = function() { - if (this.readyState < this.HEADERS_RECEIVED || errorFlag) { - return ""; - } - var result = ""; - - for (var i in response.headers) { - // Cookie headers are excluded - if (i !== "set-cookie" && i !== "set-cookie2") { - result += i + ": " + response.headers[i] + "\r\n"; - } - } - return result.substr(0, result.length - 2); - }; - - /** - * Gets a request header - * - * @param string name Name of header to get - * @return string Returns the request header or empty string if not set - */ - this.getRequestHeader = function(name) { - // @TODO Make this case insensitive - if (typeof name === "string" && headers[name]) { - return headers[name]; - } - - return ""; - } - - /** - * Sends the request to the server. - * - * @param string data Optional data to send as request body. - */ - this.send = function(data) { - if (this.readyState != this.OPENED) { - throw "INVALID_STATE_ERR: connection must be opened before send() is called"; - } - - if (sendFlag) { - throw "INVALID_STATE_ERR: send has already been called"; - } - - var ssl = false, local = false; - var url = Url.parse(settings.url); - - // Determine the server - switch (url.protocol) { - case 'https:': - ssl = true; - // SSL & non-SSL both need host, no break here. - case 'http:': - var host = url.hostname; - break; - - case 'file:': - local = true; - break; - - case undefined: - case '': - var host = "localhost"; - break; - - default: - throw "Protocol not supported."; - } - - // Load files off the local filesystem (file://) - if (local) { - if (settings.method !== "GET") { - throw "XMLHttpRequest: Only GET method is supported"; - } - - if (settings.async) { - fs.readFile(url.pathname, 'utf8', function(error, data) { - if (error) { - self.handleError(error); - } else { - self.status = 200; - self.responseText = data; - setState(self.DONE); - } - }); - } else { - try { - this.responseText = fs.readFileSync(url.pathname, 'utf8'); - this.status = 200; - setState(self.DONE); - } catch(e) { - this.handleError(e); - } - } - - return; - } - - // Default to port 80. If accessing localhost on another port be sure - // to use http://localhost:port/path - var port = url.port || (ssl ? 443 : 80); - // Add query string if one is used - var uri = url.pathname + (url.search ? url.search : ''); - - // Set the Host header or the server may reject the request - headers["Host"] = host; - if (!((ssl && port === 443) || port === 80)) { - headers["Host"] += ':' + url.port; - } - - // Set Basic Auth if necessary - if (settings.user) { - if (typeof settings.password == "undefined") { - settings.password = ""; - } - var authBuf = new Buffer(settings.user + ":" + settings.password); - headers["Authorization"] = "Basic " + authBuf.toString("base64"); - } - - // Set content length header - if (settings.method === "GET" || settings.method === "HEAD") { - data = null; - } else if (data) { - headers["Content-Length"] = Buffer.byteLength(data); - - if (!headers["Content-Type"]) { - headers["Content-Type"] = "text/plain;charset=UTF-8"; - } - } else if (settings.method === "POST") { - // For a post with no data set Content-Length: 0. - // This is required by buggy servers that don't meet the specs. - headers["Content-Length"] = 0; - } - - var options = { - host: host, - port: port, - path: uri, - method: settings.method, - headers: headers - }; - - // Reset error flag - errorFlag = false; - - // Handle async requests - if (settings.async) { - // Use the proper protocol - var doRequest = ssl ? https.request : http.request; - - // Request is being sent, set send flag - sendFlag = true; - - // As per spec, this is called here for historical reasons. - self.dispatchEvent("readystatechange"); - - // Create the request - request = doRequest(options, function(resp) { - response = resp; - response.setEncoding("utf8"); - - setState(self.HEADERS_RECEIVED); - self.status = response.statusCode; - - response.on('data', function(chunk) { - // Make sure there's some data - if (chunk) { - self.responseText += chunk; - } - // Don't emit state changes if the connection has been aborted. - if (sendFlag) { - setState(self.LOADING); - } - }); - - response.on('end', function() { - if (sendFlag) { - // Discard the 'end' event if the connection has been aborted - setState(self.DONE); - sendFlag = false; - } - }); - - response.on('error', function(error) { - self.handleError(error); - }); - }).on('error', function(error) { - self.handleError(error); - }); - - // Node 0.4 and later won't accept empty data. Make sure it's needed. - if (data) { - request.write(data); - } - - request.end(); - - self.dispatchEvent("loadstart"); - } else { // Synchronous - // Create a temporary file for communication with the other Node process - var syncFile = ".node-xmlhttprequest-sync-" + process.pid; - fs.writeFileSync(syncFile, "", "utf8"); - // The async request the other Node process executes - var execString = "var http = require('http'), https = require('https'), fs = require('fs');" - + "var doRequest = http" + (ssl ? "s" : "") + ".request;" - + "var options = " + JSON.stringify(options) + ";" - + "var responseText = '';" - + "var req = doRequest(options, function(response) {" - + "response.setEncoding('utf8');" - + "response.on('data', function(chunk) {" - + "responseText += chunk;" - + "});" - + "response.on('end', function() {" - + "fs.writeFileSync('" + syncFile + "', 'NODE-XMLHTTPREQUEST-STATUS:' + response.statusCode + ',' + responseText, 'utf8');" - + "});" - + "response.on('error', function(error) {" - + "fs.writeFileSync('" + syncFile + "', 'NODE-XMLHTTPREQUEST-ERROR:' + JSON.stringify(error), 'utf8');" - + "});" - + "}).on('error', function(error) {" - + "fs.writeFileSync('" + syncFile + "', 'NODE-XMLHTTPREQUEST-ERROR:' + JSON.stringify(error), 'utf8');" - + "});" - + (data ? "req.write('" + data.replace(/'/g, "\\'") + "');":"") - + "req.end();"; - // Start the other Node Process, executing this string - syncProc = spawn(process.argv[0], ["-e", execString]); - while((self.responseText = fs.readFileSync(syncFile, 'utf8')) == "") { - // Wait while the file is empty - } - // Kill the child process once the file has data - syncProc.stdin.end(); - // Remove the temporary file - fs.unlinkSync(syncFile); - if (self.responseText.match(/^NODE-XMLHTTPREQUEST-ERROR:/)) { - // If the file returned an error, handle it - var errorObj = self.responseText.replace(/^NODE-XMLHTTPREQUEST-ERROR:/, ""); - self.handleError(errorObj); - } else { - // If the file returned okay, parse its data and move to the DONE state - self.status = self.responseText.replace(/^NODE-XMLHTTPREQUEST-STATUS:([0-9]*),.*/, "$1"); - self.responseText = self.responseText.replace(/^NODE-XMLHTTPREQUEST-STATUS:[0-9]*,(.*)/, "$1"); - setState(self.DONE); - } - } - }; - - /** - * Called when an error is encountered to deal with it. - */ - this.handleError = function(error) { - this.status = 503; - this.statusText = error; - this.responseText = error.stack; - errorFlag = true; - setState(this.DONE); - }; - - /** - * Aborts a request. - */ - this.abort = function() { - if (request) { - request.abort(); - request = null; - } - - headers = defaultHeaders; - this.responseText = ""; - this.responseXML = ""; - - errorFlag = true; - - if (this.readyState !== this.UNSENT - && (this.readyState !== this.OPENED || sendFlag) - && this.readyState !== this.DONE) { - sendFlag = false; - setState(this.DONE); - } - this.readyState = this.UNSENT; - }; - - /** - * Adds an event listener. Preferred method of binding to events. - */ - this.addEventListener = function(event, callback) { - if (!(event in listeners)) { - listeners[event] = []; - } - // Currently allows duplicate callbacks. Should it? - listeners[event].push(callback); - }; - - /** - * Remove an event callback that has already been bound. - * Only works on the matching funciton, cannot be a copy. - */ - this.removeEventListener = function(event, callback) { - if (event in listeners) { - // Filter will return a new array with the callback removed - listeners[event] = listeners[event].filter(function(ev) { - return ev !== callback; - }); - } - }; - - /** - * Dispatch any events, including both "on" methods and events attached using addEventListener. - */ - this.dispatchEvent = function(event) { - if (typeof self["on" + event] === "function") { - self["on" + event](); - } - if (event in listeners) { - for (var i = 0, len = listeners[event].length; i < len; i++) { - listeners[event][i].call(self); - } - } - }; - - /** - * Changes readyState and calls onreadystatechange. - * - * @param int state New state - */ - var setState = function(state) { - if (self.readyState !== state) { - self.readyState = state; - - if (settings.async || self.readyState < self.OPENED || self.readyState === self.DONE) { - self.dispatchEvent("readystatechange"); - } - - if (self.readyState === self.DONE && !errorFlag) { - self.dispatchEvent("load"); - // @TODO figure out InspectorInstrumentation::didLoadXHR(cookie) - self.dispatchEvent("loadend"); - } - } - }; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/package.json b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/package.json deleted file mode 100644 index e1f4bf34..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "xmlhttprequest", - "description": "XMLHttpRequest for Node", - "version": "1.4.2", - "author": { - "name": "Dan DeFelippi", - "url": "http://driverdan.com" - }, - "keywords": [ - "xhr", - "ajax" - ], - "licenses": [ - { - "type": "MIT", - "url": "http://creativecommons.org/licenses/MIT/" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/driverdan/node-XMLHttpRequest.git" - }, - "bugs": { - "url": "http://github.com/driverdan/node-XMLHttpRequest/issues" - }, - "engines": { - "node": ">=0.4.0" - }, - "directories": { - "lib": "./lib", - "example": "./example" - }, - "main": "./lib/XMLHttpRequest.js", - "readme": "# node-XMLHttpRequest #\n\nnode-XMLHttpRequest is a wrapper for the built-in http client to emulate the\nbrowser XMLHttpRequest object.\n\nThis can be used with JS designed for browsers to improve reuse of code and\nallow the use of existing libraries.\n\nNote: This library currently conforms to [XMLHttpRequest 1](http://www.w3.org/TR/XMLHttpRequest/). Version 2.0 will target [XMLHttpRequest Level 2](http://www.w3.org/TR/XMLHttpRequest2/).\n\n## Usage ##\n\nHere's how to include the module in your project and use as the browser-based\nXHR object.\n\n\tvar XMLHttpRequest = require(\"xmlhttprequest\").XMLHttpRequest;\n\tvar xhr = new XMLHttpRequest();\n\nNote: use the lowercase string \"xmlhttprequest\" in your require(). On\ncase-sensitive systems (eg Linux) using uppercase letters won't work.\n\n## Versions ##\n\nPrior to 1.4.0 version numbers were arbitrary. From 1.4.0 on they conform to\nthe standard major.minor.bugfix. 1.x shouldn't necessarily be considered\nstable just because it's above 0.x.\n\nSince the XMLHttpRequest API is stable this library's API is stable as\nwell. Major version numbers indicate significant core code changes.\nMinor versions indicate minor core code changes or better conformity to\nthe W3C spec.\n\n## Supports ##\n\n* Async and synchronous requests\n* GET, POST, PUT, and DELETE requests\n* All spec methods (open, send, abort, getRequestHeader,\n getAllRequestHeaders, event methods)\n* Requests to all domains\n\n## Known Issues / Missing Features ##\n\nFor a list of open issues or to report your own visit the [github issues\npage](https://github.com/driverdan/node-XMLHttpRequest/issues).\n\n* Local file access may have unexpected results for non-UTF8 files\n* Synchronous requests don't set headers properly\n* Synchronous requests freeze node while waiting for response (But that's what you want, right? Stick with async!).\n* Some events are missing, such as abort\n* getRequestHeader is case-sensitive\n* Cookies aren't persisted between requests\n* Missing XML support\n* Missing basic auth\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/driverdan/node-XMLHttpRequest", - "_id": "xmlhttprequest@1.4.2", - "_from": "xmlhttprequest@1.4.2" -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-constants.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-constants.js deleted file mode 100644 index 372e46cc..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-constants.js +++ /dev/null @@ -1,13 +0,0 @@ -var sys = require("util") - , assert = require("assert") - , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest - , xhr = new XMLHttpRequest(); - -// Test constant values -assert.equal(0, xhr.UNSENT); -assert.equal(1, xhr.OPENED); -assert.equal(2, xhr.HEADERS_RECEIVED); -assert.equal(3, xhr.LOADING); -assert.equal(4, xhr.DONE); - -sys.puts("done"); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-events.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-events.js deleted file mode 100644 index c72f001d..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-events.js +++ /dev/null @@ -1,50 +0,0 @@ -var sys = require("util") - , assert = require("assert") - , http = require("http") - , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest - , xhr; - -// Test server -var server = http.createServer(function (req, res) { - var body = (req.method != "HEAD" ? "Hello World" : ""); - - res.writeHead(200, { - "Content-Type": "text/plain", - "Content-Length": Buffer.byteLength(body) - }); - // HEAD has no body - if (req.method != "HEAD") { - res.write(body); - } - res.end(); - assert.equal(onreadystatechange, true); - assert.equal(readystatechange, true); - assert.equal(removed, true); - sys.puts("done"); - this.close(); -}).listen(8000); - -xhr = new XMLHttpRequest(); - -// Track event calls -var onreadystatechange = false; -var readystatechange = false; -var removed = true; -var removedEvent = function() { - removed = false; -}; - -xhr.onreadystatechange = function() { - onreadystatechange = true; -}; - -xhr.addEventListener("readystatechange", function() { - readystatechange = true; -}); - -// This isn't perfect, won't guarantee it was added in the first place -xhr.addEventListener("readystatechange", removedEvent); -xhr.removeEventListener("readystatechange", removedEvent); - -xhr.open("GET", "http://localhost:8000"); -xhr.send(); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-exceptions.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-exceptions.js deleted file mode 100644 index f1edd71f..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-exceptions.js +++ /dev/null @@ -1,62 +0,0 @@ -var sys = require("util") - , assert = require("assert") - , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest - , xhr = new XMLHttpRequest(); - -// Test request methods that aren't allowed -try { - xhr.open("TRACK", "http://localhost:8000/"); - console.log("ERROR: TRACK should have thrown exception"); -} catch(e) {} -try { - xhr.open("TRACE", "http://localhost:8000/"); - console.log("ERROR: TRACE should have thrown exception"); -} catch(e) {} -try { - xhr.open("CONNECT", "http://localhost:8000/"); - console.log("ERROR: CONNECT should have thrown exception"); -} catch(e) {} -// Test valid request method -try { - xhr.open("GET", "http://localhost:8000/"); -} catch(e) { - console.log("ERROR: Invalid exception for GET", e); -} - -// Test forbidden headers -var forbiddenRequestHeaders = [ - "accept-charset", - "accept-encoding", - "access-control-request-headers", - "access-control-request-method", - "connection", - "content-length", - "content-transfer-encoding", - "cookie", - "cookie2", - "date", - "expect", - "host", - "keep-alive", - "origin", - "referer", - "te", - "trailer", - "transfer-encoding", - "upgrade", - "user-agent", - "via" -]; - -for (var i in forbiddenRequestHeaders) { - try { - xhr.setRequestHeader(forbiddenRequestHeaders[i], "Test"); - console.log("ERROR: " + forbiddenRequestHeaders[i] + " should have thrown exception"); - } catch(e) { - } -} - -// Try valid header -xhr.setRequestHeader("X-Foobar", "Test"); - -console.log("Done"); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-headers.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-headers.js deleted file mode 100644 index 2ecb045d..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-headers.js +++ /dev/null @@ -1,61 +0,0 @@ -var sys = require("util") - , assert = require("assert") - , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest - , xhr = new XMLHttpRequest() - , http = require("http"); - -// Test server -var server = http.createServer(function (req, res) { - // Test setRequestHeader - assert.equal("Foobar", req.headers["x-test"]); - - var body = "Hello World"; - res.writeHead(200, { - "Content-Type": "text/plain", - "Content-Length": Buffer.byteLength(body), - // Set cookie headers to see if they're correctly suppressed - // Actual values don't matter - "Set-Cookie": "foo=bar", - "Set-Cookie2": "bar=baz", - "Connection": "close" - }); - res.write("Hello World"); - res.end(); - - this.close(); -}).listen(8000); - -xhr.onreadystatechange = function() { - if (this.readyState == 4) { - // Test getAllResponseHeaders() - var headers = "content-type: text/plain\r\ncontent-length: 11\r\nconnection: close"; - assert.equal(headers, this.getAllResponseHeaders()); - - // Test case insensitivity - assert.equal('text/plain', this.getResponseHeader('Content-Type')); - assert.equal('text/plain', this.getResponseHeader('Content-type')); - assert.equal('text/plain', this.getResponseHeader('content-Type')); - assert.equal('text/plain', this.getResponseHeader('content-type')); - - // Test aborted getAllResponseHeaders - this.abort(); - assert.equal("", this.getAllResponseHeaders()); - assert.equal(null, this.getResponseHeader("Connection")); - - sys.puts("done"); - } -}; - -assert.equal(null, xhr.getResponseHeader("Content-Type")); -try { - xhr.open("GET", "http://localhost:8000/"); - // Valid header - xhr.setRequestHeader("X-Test", "Foobar"); - // Invalid header - xhr.setRequestHeader("Content-Length", 0); - // Test getRequestHeader - assert.equal("Foobar", xhr.getRequestHeader("X-Test")); - xhr.send(); -} catch(e) { - console.log("ERROR: Exception raised", e); -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-request-methods.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-request-methods.js deleted file mode 100644 index fa1b1bed..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-request-methods.js +++ /dev/null @@ -1,62 +0,0 @@ -var sys = require("util") - , assert = require("assert") - , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest - , http = require("http") - , xhr; - -// Test server -var server = http.createServer(function (req, res) { - // Check request method and URL - assert.equal(methods[curMethod], req.method); - assert.equal("/" + methods[curMethod], req.url); - - var body = (req.method != "HEAD" ? "Hello World" : ""); - - res.writeHead(200, { - "Content-Type": "text/plain", - "Content-Length": Buffer.byteLength(body) - }); - // HEAD has no body - if (req.method != "HEAD") { - res.write(body); - } - res.end(); - - if (curMethod == methods.length - 1) { - this.close(); - sys.puts("done"); - } -}).listen(8000); - -// Test standard methods -var methods = ["GET", "POST", "HEAD", "PUT", "DELETE"]; -var curMethod = 0; - -function start(method) { - // Reset each time - xhr = new XMLHttpRequest(); - - xhr.onreadystatechange = function() { - if (this.readyState == 4) { - if (method == "HEAD") { - assert.equal("", this.responseText); - } else { - assert.equal("Hello World", this.responseText); - } - - curMethod++; - - if (curMethod < methods.length) { - sys.puts("Testing " + methods[curMethod]); - start(methods[curMethod]); - } - } - }; - - var url = "http://localhost:8000/" + method; - xhr.open(method, url); - xhr.send(); -} - -sys.puts("Testing " + methods[curMethod]); -start(methods[curMethod]); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-request-protocols.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-request-protocols.js deleted file mode 100644 index cd4e1745..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-request-protocols.js +++ /dev/null @@ -1,34 +0,0 @@ -var sys = require("util") - , assert = require("assert") - , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest - , xhr; - -xhr = new XMLHttpRequest(); - -xhr.onreadystatechange = function() { - if (this.readyState == 4) { - assert.equal("Hello World", this.responseText); - this.close(); - runSync(); - } -}; - -// Async -var url = "file://" + __dirname + "/testdata.txt"; -xhr.open("GET", url); -xhr.send(); - -// Sync -var runSync = function() { - xhr = new XMLHttpRequest(); - - xhr.onreadystatechange = function() { - if (this.readyState == 4) { - assert.equal("Hello World", this.responseText); - this.close(); - sys.puts("done"); - } - }; - xhr.open("GET", url, false); - xhr.send(); -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/testdata.txt b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/testdata.txt deleted file mode 100644 index 557db03d..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/testdata.txt +++ /dev/null @@ -1 +0,0 @@ -Hello World diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/package.json b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/package.json deleted file mode 100644 index 1cb2e6ff..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "socket.io-client", - "description": "Socket.IO client for the browser and node.js", - "version": "0.9.11", - "main": "./lib/io.js", - "browserify": "./dist/socket.io.js", - "homepage": "http://socket.io", - "keywords": [ - "websocket", - "socket", - "realtime", - "socket.io", - "comet", - "ajax" - ], - "author": { - "name": "Guillermo Rauch", - "email": "guillermo@learnboost.com" - }, - "contributors": [ - { - "name": "Guillermo Rauch", - "email": "rauchg@gmail.com" - }, - { - "name": "Arnout Kazemier", - "email": "info@3rd-eden.com" - }, - { - "name": "Vladimir Dronnikov", - "email": "dronnikov@gmail.com" - }, - { - "name": "Einar Otto Stangvik", - "email": "einaros@gmail.com" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/LearnBoost/socket.io-client.git" - }, - "dependencies": { - "uglify-js": "1.2.5", - "ws": "0.4.x", - "xmlhttprequest": "1.4.2", - "active-x-obfuscator": "0.0.1" - }, - "devDependencies": { - "expresso": "*", - "express": "2.5.x", - "jade": "*", - "stylus": "*", - "socket.io": "0.9.11", - "socket.io-client": "0.9.11", - "should": "*" - }, - "engines": { - "node": ">= 0.4.0" - }, - "readme": "socket.io\n=========\n\n#### Sockets for the rest of us\n\nThe `socket.io` client is basically a simple HTTP Socket interface implementation.\nIt looks similar to WebSocket while providing additional features and\nleveraging other transports when WebSocket is not supported by the user's\nbrowser.\n\n```js\nvar socket = io.connect('http://domain.com');\nsocket.on('connect', function () {\n // socket connected\n});\nsocket.on('custom event', function () {\n // server emitted a custom event\n});\nsocket.on('disconnect', function () {\n // socket disconnected\n});\nsocket.send('hi there');\n```\n\n### Recipes\n\n#### Utilizing namespaces (ie: multiple sockets)\n\nIf you want to namespace all the messages and events emitted to a particular\nendpoint, simply specify it as part of the `connect` uri:\n\n```js\nvar chat = io.connect('http://localhost/chat');\nchat.on('connect', function () {\n // chat socket connected\n});\n\nvar news = io.connect('/news'); // io.connect auto-detects host\nnews.on('connect', function () {\n // news socket connected\n});\n```\n\n#### Emitting custom events\n\nTo ease with the creation of applications, you can emit custom events outside\nof the global `message` event.\n\n```js\nvar socket = io.connect();\nsocket.emit('server custom event', { my: 'data' });\n```\n\n#### Forcing disconnection\n\n```js\nvar socket = io.connect();\nsocket.on('connect', function () {\n socket.disconnect();\n});\n```\n\n### Documentation \n\n#### io#connect\n\n```js\nio.connect(uri, [options]);\n```\n\n##### Options:\n\n- *resource*\n\n socket.io\n\n The resource is what allows the `socket.io` server to identify incoming connections by `socket.io` clients. In other words, any HTTP server can implement socket.io and still serve other normal, non-realtime HTTP requests.\n\n- *transports*\n\n```js\n['websocket', 'flashsocket', 'htmlfile', 'xhr-multipart', 'xhr-polling', 'jsonp-polling']\n```\n\n A list of the transports to attempt to utilize (in order of preference).\n\n- *'connect timeout'*\n\n```js\n5000\n```\n\n The amount of milliseconds a transport has to create a connection before we consider it timed out.\n \n- *'try multiple transports'*\n\n```js\ntrue\n```\n\n A boolean indicating if we should try other transports when the connectTimeout occurs.\n \n- *reconnect*\n\n```js\ntrue\n```\n\n A boolean indicating if we should automatically reconnect if a connection is disconnected. \n \n- *'reconnection delay'*\n\n```js\n500\n```\n\n The amount of milliseconds before we try to connect to the server again. We are using a exponential back off algorithm for the following reconnections, on each reconnect attempt this value will get multiplied (500 > 1000 > 2000 > 4000 > 8000).\n \n\n- *'max reconnection attempts'*\n\n```js\n10\n```\n\n The amount of attempts should we make using the current transport to connect to the server? After this we will do one final attempt, and re-try with all enabled transport methods before we give up.\n\n##### Properties:\n\n- *options*\n\n The passed in options combined with the defaults.\n\n- *connected*\n\n Whether the socket is connected or not.\n \n- *connecting*\n\n Whether the socket is connecting or not.\n\n- *reconnecting*\n\n Whether we are reconnecting or not.\n \n- *transport* \n\n The transport instance.\n\n##### Methods:\n \n- *connect(λ)*\n\n Establishes a connection. If λ is supplied as argument, it will be called once the connection is established.\n \n- *send(message)*\n \n A string of data to send.\n \n- *disconnect*\n\n Closes the connection.\n \n- *on(event, λ)*\n\n Adds a listener for the event *event*.\n\n- *once(event, λ)*\n\n Adds a one time listener for the event *event*. The listener is removed after the first time the event is fired.\n \n- *removeListener(event, λ)*\n\n Removes the listener λ for the event *event*.\n \n##### Events:\n\n- *connect*\n\n Fired when the connection is established and the handshake successful.\n \n- *connecting(transport_type)*\n\n Fired when a connection is attempted, passing the transport name.\n \n- *connect_failed*\n\n Fired when the connection timeout occurs after the last connection attempt.\n This only fires if the `connectTimeout` option is set.\n If the `tryTransportsOnConnectTimeout` option is set, this only fires once all\n possible transports have been tried.\n \n- *message(message)*\n \n Fired when a message arrives from the server\n\n- *close*\n\n Fired when the connection is closed. Be careful with using this event, as some transports will fire it even under temporary, expected disconnections (such as XHR-Polling).\n \n- *disconnect*\n\n Fired when the connection is considered disconnected.\n \n- *reconnect(transport_type,reconnectionAttempts)*\n\n Fired when the connection has been re-established. This only fires if the `reconnect` option is set.\n\n- *reconnecting(reconnectionDelay,reconnectionAttempts)*\n\n Fired when a reconnection is attempted, passing the next delay for the next reconnection.\n\n- *reconnect_failed*\n\n Fired when all reconnection attempts have failed and we where unsuccessful in reconnecting to the server. \n\n### Contributors\n\nGuillermo Rauch <guillermo@learnboost.com>\n\nArnout Kazemier <info@3rd-eden.com>\n\n### License \n\n(The MIT License)\n\nCopyright (c) 2010 LearnBoost <dev@learnboost.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/LearnBoost/socket.io-client/issues" - }, - "_id": "socket.io-client@0.9.11", - "_from": "socket.io-client@0.9.11" -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/events.test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/events.test.js deleted file mode 100644 index 365c4223..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/events.test.js +++ /dev/null @@ -1,120 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (module, io, should) { - - module.exports = { - - 'add listeners': function () { - var event = new io.EventEmitter - , calls = 0; - - event.on('test', function (a, b) { - ++calls; - a.should().eql('a'); - b.should().eql('b'); - }); - - event.emit('test', 'a', 'b'); - calls.should().eql(1); - event.on.should().eql(event.addListener); - }, - - 'remove listener': function () { - var event = new io.EventEmitter; - function empty () { } - - event.on('test', empty); - event.on('test:more', empty); - event.removeAllListeners('test'); - - event.listeners('test').should().eql([]); - event.listeners('test:more').should().eql([empty]); - }, - - 'remove all listeners with no arguments': function () { - var event = new io.EventEmitter; - function empty () { } - - event.on('test', empty); - event.on('test:more', empty); - event.removeAllListeners(); - - event.listeners('test').should().eql([]); - event.listeners('test:more').should().eql([]); - }, - - 'remove listeners functions': function () { - var event = new io.EventEmitter - , calls = 0; - - function one () { ++calls } - function two () { ++calls } - function three () { ++calls } - - event.on('one', one); - event.removeListener('one', one); - event.listeners('one').should().eql([]); - - event.on('two', two); - event.removeListener('two', one); - event.listeners('two').should().eql([two]); - - event.on('three', three); - event.on('three', two); - event.removeListener('three', three); - event.listeners('three').should().eql([two]); - }, - - 'number of arguments': function () { - var event = new io.EventEmitter - , number = []; - - event.on('test', function () { - number.push(arguments.length); - }); - - event.emit('test'); - event.emit('test', null); - event.emit('test', null, null); - event.emit('test', null, null, null); - event.emit('test', null, null, null, null); - event.emit('test', null, null, null, null, null); - - [0, 1, 2, 3, 4, 5].should().eql(number); - }, - - 'once': function () { - var event = new io.EventEmitter - , calls = 0; - - event.once('test', function (a, b) { - ++calls; - }); - - event.emit('test', 'a', 'b'); - event.emit('test', 'a', 'b'); - event.emit('test', 'a', 'b'); - - function removed () { - should().fail('not removed'); - }; - - event.once('test:removed', removed); - event.removeListener('test:removed', removed); - event.emit('test:removed'); - - calls.should().eql(1); - } - - }; - -})( - 'undefined' == typeof module ? module = {} : module - , 'undefined' == typeof io ? require('socket.io-client') : io - , 'undefined' == typeof should || !should.fail ? require('should') : should -); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/io.test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/io.test.js deleted file mode 100644 index d9f0b09e..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/io.test.js +++ /dev/null @@ -1,31 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (module, io, should) { - - module.exports = { - - 'client version number': function () { - io.version.should().match(/([0-9]+)\.([0-9]+)\.([0-9]+)/); - }, - - 'socket.io protocol version': function () { - io.protocol.should().be.a('number'); - io.protocol.toString().should().match(/^\d+$/); - }, - - 'socket.io available transports': function () { - (io.transports.length > 0).should().be_true; - } - - }; - -})( - 'undefined' == typeof module ? module = {} : module - , 'undefined' == typeof io ? require('socket.io-client') : io - , 'undefined' == typeof should ? require('should') : should -); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/node/builder.common.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/node/builder.common.js deleted file mode 100644 index fa8d46ed..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/node/builder.common.js +++ /dev/null @@ -1,102 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -var vm = require('vm') - , should = require('should'); - -/** - * Generates evn variables for the vm so we can `emulate` a browser. - * @returns {Object} evn variables - */ - -exports.env = function env () { - var details = { - location: { - port: 8080 - , host: 'www.example.org' - , hostname: 'www.example.org' - , href: 'http://www.example.org/example/' - , pathname: '/example/' - , protocol: 'http:' - , search: '' - , hash: '' - } - , console: { - log: function(){}, - info: function(){}, - warn: function(){}, - error: function(){} - } - , navigator: { - userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit' - + '/534.27 (KHTML, like Gecko) Chrome/12.0.716.0 Safari/534.27' - , appName: 'socket.io' - , platform: process.platform - , appVersion: process.version - , } - , name: 'socket.io' - , innerWidth: 1024 - , innerHeight: 768 - , length: 1 - , outerWidth: 1024 - , outerHeight: 768 - , pageXOffset: 0 - , pageYOffset: 0 - , screenX: 0 - , screenY: 0 - , screenLeft: 0 - , screenTop: 0 - , scrollX: 0 - , scrollY: 0 - , scrollTop: 0 - , scrollLeft: 0 - , screen: { - width: 0 - , height: 0 - } - }; - - // circular references - details.window = details.self = details.contentWindow = details; - - // callable methods - details.Image = details.scrollTo = details.scrollBy = details.scroll = - details.resizeTo = details.resizeBy = details.prompt = details.print = - details.open = details.moveTo = details.moveBy = details.focus = - details.createPopup = details.confirm = details.close = details.blur = - details.alert = details.clearTimeout = details.clearInterval = - details.setInterval = details.setTimeout = details.XMLHttpRequest = - details.getComputedStyle = details.trigger = details.dispatchEvent = - details.removeEventListener = details.addEventListener = function(){}; - - // frames - details.frames = [details]; - - // document - details.document = details; - details.document.domain = details.location.href; - - return details; -}; - -/** - * Executes a script in a browser like env and returns - * the result - * - * @param {String} contents The script content - * @returns {Object} The evaluated script. - */ - -exports.execute = function execute (contents) { - var env = exports.env() - , script = vm.createScript(contents); - - // run the script with `browser like` globals - script.runInNewContext(env); - - return env; -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/node/builder.test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/node/builder.test.js deleted file mode 100644 index 989e2bc5..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/node/builder.test.js +++ /dev/null @@ -1,131 +0,0 @@ -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Test dependencies. - */ - -var builder = require('../../bin/builder') - , common = require('./builder.common') - , should = require('should'); - -/** - * Tests. - */ - -module.exports = { - - 'version number': function () { - builder.version.should().match(/([0-9]+)\.([0-9]+)\.([0-9]+)/); - builder.version.should().equal(require('../../lib/io').version); - }, - - 'production build LOC': function () { - builder(function (err, result) { - should.strictEqual(err, null) - - var lines = result.split('\n'); - lines.length.should().be.below(5); - lines[0].should().match(/production/gi); - Buffer.byteLength(result).should().be.below(43000); - }); - }, - - 'development build LOC': function () { - builder({ minify: false }, function (err, result) { - should.strictEqual(err, null) - - var lines = result.split('\n'); - lines.length.should().be.above(5); - lines[0].should().match(/development/gi); - Buffer.byteLength(result).should().be.above(35000); - }); - }, - - 'default builds': function () { - builder(function (err, result) { - should.strictEqual(err, null); - - var io = common.execute(result).io - , transports = Object.keys(io.Transport) - , defaults = Object.keys(builder.transports); - - /* XHR transport is private, but still available */ - transports.length.should().be.equal(defaults.length + 1); - - defaults.forEach(function (transport) { - transports.indexOf(transport).should().be.above(-1); - }) - }); - }, - - 'custom build': function () { - builder(['websocket'], function (err, result) { - should.strictEqual(err, null); - - var io = common.execute(result).io - , transports = Object.keys(io.Transport); - - transports.should().have.length(1); - transports[0].should().eql('websocket'); - }); - }, - - 'custom code': function () { - var custom = 'var hello = "world";'; - builder({ custom: [custom], minify: false }, function (err, result) { - should.strictEqual(err, null); - - result.should().include.string(custom); - }); - }, - - 'node if': function () { - var custom = '// if node \nvar hello = "world";\n' - + '// end node\nvar pew = "pew";'; - - builder({ custom: [custom], minify: false }, function (err, result) { - should.strictEqual(err, null); - - result.should().not.include.string(custom); - result.should().not.include.string('// if node'); - result.should().not.include.string('// end node'); - result.should().not.include.string('"world"'); - - result.should().include.string('var pew = "pew"'); - }); - }, - - 'preserve the encoding during minification': function () { - builder(function (err, result) { - should.strictEqual(err, null); - - result.should().match(/(\\ufffd)/g); - }) - }, - - 'globals': function () { - builder(function (err, result) { - should.strictEqual(err, null); - - var io = common.execute(result) - , env = common.env() - , allowed = ['io', 'swfobject', 'WEB_SOCKET_DISABLE_AUTO_INITIALIZATION']; - - Array.prototype.push.apply(allowed, Object.keys(env)); - - Object.keys(io).forEach(function (global) { - var index = allowed.indexOf(global); - - // the global is not allowed! - if (!~index) { - throw new Error('Global leak: ' + global); - } - }); - }) - } - -}; diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/parser.test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/parser.test.js deleted file mode 100644 index 0022afb2..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/parser.test.js +++ /dev/null @@ -1,360 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (module, io, should) { - - var parser = io.parser; - - module.exports = { - - 'decoding error packet': function () { - parser.decodePacket('7:::').should().eql({ - type: 'error' - , reason: '' - , advice: '' - , endpoint: '' - }); - }, - - 'decoding error packet with reason': function () { - parser.decodePacket('7:::0').should().eql({ - type: 'error' - , reason: 'transport not supported' - , advice: '' - , endpoint: '' - }); - }, - - 'decoding error packet with reason and advice': function () { - parser.decodePacket('7:::2+0').should().eql({ - type: 'error' - , reason: 'unauthorized' - , advice: 'reconnect' - , endpoint: '' - }); - }, - - 'decoding error packet with endpoint': function () { - parser.decodePacket('7::/woot').should().eql({ - type: 'error' - , reason: '' - , advice: '' - , endpoint: '/woot' - }); - }, - - 'decoding ack packet': function () { - parser.decodePacket('6:::140').should().eql({ - type: 'ack' - , ackId: '140' - , endpoint: '' - , args: [] - }); - }, - - 'decoding ack packet with args': function () { - parser.decodePacket('6:::12+["woot","wa"]').should().eql({ - type: 'ack' - , ackId: '12' - , endpoint: '' - , args: ['woot', 'wa'] - }); - }, - - 'decoding ack packet with bad json': function () { - var thrown = false; - - try { - parser.decodePacket('6:::1+{"++]').should().eql({ - type: 'ack' - , ackId: '1' - , endpoint: '' - , args: [] - }); - } catch (e) { - thrown = true; - } - - thrown.should().be_false; - }, - - 'decoding json packet': function () { - parser.decodePacket('4:::"2"').should().eql({ - type: 'json' - , endpoint: '' - , data: '2' - }); - }, - - 'decoding json packet with message id and ack data': function () { - parser.decodePacket('4:1+::{"a":"b"}').should().eql({ - type: 'json' - , id: 1 - , ack: 'data' - , endpoint: '' - , data: { a: 'b' } - }); - }, - - 'decoding an event packet': function () { - parser.decodePacket('5:::{"name":"woot"}').should().eql({ - type: 'event' - , name: 'woot' - , endpoint: '' - , args: [] - }); - }, - - 'decoding an event packet with message id and ack': function () { - parser.decodePacket('5:1+::{"name":"tobi"}').should().eql({ - type: 'event' - , id: 1 - , ack: 'data' - , endpoint: '' - , name: 'tobi' - , args: [] - }); - }, - - 'decoding an event packet with data': function () { - parser.decodePacket('5:::{"name":"edwald","args":[{"a": "b"},2,"3"]}') - .should().eql({ - type: 'event' - , name: 'edwald' - , endpoint: '' - , args: [{a: 'b'}, 2, '3'] - }); - }, - - 'decoding a message packet': function () { - parser.decodePacket('3:::woot').should().eql({ - type: 'message' - , endpoint: '' - , data: 'woot' - }); - }, - - 'decoding a message packet with id and endpoint': function () { - parser.decodePacket('3:5:/tobi').should().eql({ - type: 'message' - , id: 5 - , ack: true - , endpoint: '/tobi' - , data: '' - }); - }, - - 'decoding a heartbeat packet': function () { - parser.decodePacket('2:::').should().eql({ - type: 'heartbeat' - , endpoint: '' - }); - }, - - 'decoding a connection packet': function () { - parser.decodePacket('1::/tobi').should().eql({ - type: 'connect' - , endpoint: '/tobi' - , qs: '' - }); - }, - - 'decoding a connection packet with query string': function () { - parser.decodePacket('1::/test:?test=1').should().eql({ - type: 'connect' - , endpoint: '/test' - , qs: '?test=1' - }); - }, - - 'decoding a disconnection packet': function () { - parser.decodePacket('0::/woot').should().eql({ - type: 'disconnect' - , endpoint: '/woot' - }); - }, - - 'encoding error packet': function () { - parser.encodePacket({ - type: 'error' - , reason: '' - , advice: '' - , endpoint: '' - }).should().eql('7::'); - }, - - 'encoding error packet with reason': function () { - parser.encodePacket({ - type: 'error' - , reason: 'transport not supported' - , advice: '' - , endpoint: '' - }).should().eql('7:::0'); - }, - - 'encoding error packet with reason and advice': function () { - parser.encodePacket({ - type: 'error' - , reason: 'unauthorized' - , advice: 'reconnect' - , endpoint: '' - }).should().eql('7:::2+0'); - }, - - 'encoding error packet with endpoint': function () { - parser.encodePacket({ - type: 'error' - , reason: '' - , advice: '' - , endpoint: '/woot' - }).should().eql('7::/woot'); - }, - - 'encoding ack packet': function () { - parser.encodePacket({ - type: 'ack' - , ackId: '140' - , endpoint: '' - , args: [] - }).should().eql('6:::140'); - }, - - 'encoding ack packet with args': function () { - parser.encodePacket({ - type: 'ack' - , ackId: '12' - , endpoint: '' - , args: ['woot', 'wa'] - }).should().eql('6:::12+["woot","wa"]'); - }, - - 'encoding json packet': function () { - parser.encodePacket({ - type: 'json' - , endpoint: '' - , data: '2' - }).should().eql('4:::"2"'); - }, - - 'encoding json packet with message id and ack data': function () { - parser.encodePacket({ - type: 'json' - , id: 1 - , ack: 'data' - , endpoint: '' - , data: { a: 'b' } - }).should().eql('4:1+::{"a":"b"}'); - }, - - 'encoding an event packet': function () { - parser.encodePacket({ - type: 'event' - , name: 'woot' - , endpoint: '' - , args: [] - }).should().eql('5:::{"name":"woot"}'); - }, - - 'encoding an event packet with message id and ack': function () { - parser.encodePacket({ - type: 'event' - , id: 1 - , ack: 'data' - , endpoint: '' - , name: 'tobi' - , args: [] - }).should().eql('5:1+::{"name":"tobi"}'); - }, - - 'encoding an event packet with data': function () { - parser.encodePacket({ - type: 'event' - , name: 'edwald' - , endpoint: '' - , args: [{a: 'b'}, 2, '3'] - }).should().eql('5:::{"name":"edwald","args":[{"a":"b"},2,"3"]}'); - }, - - 'encoding a message packet': function () { - parser.encodePacket({ - type: 'message' - , endpoint: '' - , data: 'woot' - }).should().eql('3:::woot'); - }, - - 'encoding a message packet with id and endpoint': function () { - parser.encodePacket({ - type: 'message' - , id: 5 - , ack: true - , endpoint: '/tobi' - , data: '' - }).should().eql('3:5:/tobi'); - }, - - 'encoding a heartbeat packet': function () { - parser.encodePacket({ - type: 'heartbeat' - , endpoint: '' - }).should().eql('2::'); - }, - - 'encoding a connection packet': function () { - parser.encodePacket({ - type: 'connect' - , endpoint: '/tobi' - , qs: '' - }).should().eql('1::/tobi'); - }, - - 'encoding a connection packet with query string': function () { - parser.encodePacket({ - type: 'connect' - , endpoint: '/test' - , qs: '?test=1' - }).should().eql('1::/test:?test=1'); - }, - - 'encoding a disconnection packet': function () { - parser.encodePacket({ - type: 'disconnect' - , endpoint: '/woot' - }).should().eql('0::/woot'); - }, - - 'test decoding a payload': function () { - parser.decodePayload('\ufffd5\ufffd3:::5\ufffd7\ufffd3:::53d' - + '\ufffd3\ufffd0::').should().eql([ - { type: 'message', data: '5', endpoint: '' } - , { type: 'message', data: '53d', endpoint: '' } - , { type: 'disconnect', endpoint: '' } - ]); - }, - - 'test encoding a payload': function () { - parser.encodePayload([ - parser.encodePacket({ type: 'message', data: '5', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: '53d', endpoint: '' }) - ]).should().eql('\ufffd5\ufffd3:::5\ufffd7\ufffd3:::53d') - }, - - 'test decoding newline': function () { - parser.decodePacket('3:::\n').should().eql({ - type: 'message' - , endpoint: '' - , data: '\n' - }); - } - - }; - -})( - 'undefined' == typeof module ? module = {} : module - , 'undefined' == typeof io ? require('socket.io-client') : io - , 'undefined' == typeof should ? require('should') : should -); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/socket.test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/socket.test.js deleted file mode 100644 index eae49564..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/socket.test.js +++ /dev/null @@ -1,422 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (module, io, should) { - - if ('object' == typeof global) { - return module.exports = { '': function () {} }; - } - - module.exports = { - - 'test connecting the socket and disconnecting': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('connect', function () { - socket.disconnect(); - next(); - }); - }, - - 'test receiving messages': function (next) { - var socket = create() - , connected = false - , messages = 0; - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('connect', function () { - connected = true; - }); - - socket.on('message', function (i) { - String(++messages).should().equal(i); - }); - - socket.on('disconnect', function (reason) { - connected.should().be_true; - messages.should().equal(3); - reason.should().eql('booted'); - next(); - }); - }, - - 'test sending messages': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('connect', function () { - socket.send('echo'); - - socket.on('message', function (msg) { - msg.should().equal('echo'); - socket.disconnect(); - next(); - }); - }); - }, - - 'test manual buffer flushing': function (next) { - var socket = create(); - - socket.socket.options['manualFlush'] = true; - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('connect', function () { - socket.socket.connected = false; - socket.send('buffered'); - socket.socket.onConnect(); - socket.socket.flushBuffer(); - - socket.on('message', function (msg) { - msg.should().equal('buffered'); - socket.disconnect(); - next(); - }); - }); - }, - - 'test automatic buffer flushing': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('connect', function () { - socket.socket.connected = false; - socket.send('buffered'); - socket.socket.onConnect(); - - socket.on('message', function (msg) { - msg.should().equal('buffered'); - socket.disconnect(); - next(); - }); - }); - }, - - 'test acks sent from client': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('connect', function () { - socket.on('message', function (msg) { - if ('tobi 2' == msg) { - socket.disconnect(); - next(); - } - }); - }); - }, - - 'test acks sent from server': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('connect', function () { - socket.send('ooo', function () { - socket.disconnect(); - next(); - }); - }); - }, - - 'test connecting to namespaces': function (next) { - var io = create() - , socket = io.socket - , namespaces = 2 - , connect = 0; - - function finish () { - socket.of('').disconnect(); - connect.should().equal(3); - next(); - } - - socket.on('connect', function(){ - connect++; - }); - - socket.of('/woot').on('connect', function () { - connect++; - }).on('message', function (msg) { - msg.should().equal('connected to woot'); - --namespaces || finish(); - }).on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.of('/chat').on('connect', function () { - connect++; - }).on('message', function (msg) { - msg.should().equal('connected to chat'); - --namespaces || finish(); - }).on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - }, - - 'test disconnecting from namespaces': function (next) { - var socket = create().socket - , namespaces = 2 - , disconnections = 0; - - function finish () { - socket.of('').disconnect(); - next(); - }; - - socket.of('/a').on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.of('/a').on('connect', function () { - socket.of('/a').disconnect(); - }); - - socket.of('/a').on('disconnect', function () { - --namespaces || finish(); - }); - - socket.of('/b').on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.of('/b').on('connect', function () { - socket.of('/b').disconnect(); - }); - - socket.of('/b').on('disconnect', function () { - --namespaces || finish(); - }); - }, - - 'test authorizing for namespaces': function (next) { - var socket = create().socket - - function finish () { - socket.of('').disconnect(); - next(); - }; - - socket.of('/a') - .on('connect_failed', function (msg) { - next(); - }) - .on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - }, - - 'test sending json from server': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('message', function (msg) { - msg.should().eql(3141592); - socket.disconnect(); - next(); - }); - }, - - 'test sending json from client': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.json.send([1, 2, 3]); - socket.on('message', function (msg) { - msg.should().equal('echo'); - socket.disconnect(); - next(); - }); - }, - - 'test emitting an event from server': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('woot', function () { - socket.disconnect(); - next(); - }); - }, - - 'test emitting an event to server': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.emit('woot'); - socket.on('echo', function () { - socket.disconnect(); - next(); - }) - }, - - 'test emitting multiple events at once to the server': function (next) { - var socket = create(); - - socket.on('connect', function () { - socket.emit('print', 'foo'); - socket.emit('print', 'bar'); - }); - - socket.on('done', function () { - socket.disconnect(); - next(); - }); - }, - - 'test emitting an event from server and sending back data': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('woot', function (a, fn) { - a.should().eql(1); - fn('test'); - - socket.on('done', function () { - socket.disconnect(); - next(); - }); - }); - }, - - 'test emitting an event to server and sending back data': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.emit('tobi', 1, 2, function (a) { - a.should().eql({ hello: 'world' }); - socket.disconnect(); - next(); - }); - }, - - 'test encoding a payload': function (next) { - var socket = create('/woot'); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('connect', function () { - socket.socket.setBuffer(true); - socket.send('ñ'); - socket.send('ñ'); - socket.send('ñ'); - socket.send('ñ'); - socket.socket.setBuffer(false); - }); - - socket.on('done', function () { - socket.disconnect(); - next(); - }); - }, - - 'test sending query strings to the server': function (next) { - var socket = create('?foo=bar'); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('message', function (data) { - data.query.foo.should().eql('bar'); - - socket.disconnect(); - next(); - }); - }, - - 'test sending newline': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.send('\n'); - - socket.on('done', function () { - socket.disconnect(); - next(); - }); - }, - - 'test sending unicode': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.json.send({ test: "☃" }); - - socket.on('done', function () { - socket.disconnect(); - next(); - }); - }, - - 'test webworker connection': function (next) { - if (!window.Worker) { - return next(); - } - - var worker = new Worker('/test/worker.js'); - worker.postMessage(uri()); - worker.onmessage = function (ev) { - if ('done!' == ev.data) return next(); - throw new Error('Unexpected message: ' + ev.data); - } - } - - }; - -})( - 'undefined' == typeof module ? module = {} : module - , 'undefined' == typeof io ? require('socket.io-client') : io - , 'undefined' == typeof should ? require('should-browser') : should -); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/util.test.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/util.test.js deleted file mode 100644 index 30db5a63..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/util.test.js +++ /dev/null @@ -1,156 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (module, io, should) { - - module.exports = { - - 'parse uri': function () { - var http = io.util.parseUri('http://google.com') - , https = io.util.parseUri('https://www.google.com:80') - , query = io.util.parseUri('google.com:8080/foo/bar?foo=bar'); - - http.protocol.should().eql('http'); - http.port.should().eql(''); - http.host.should().eql('google.com'); - https.protocol.should().eql('https'); - https.port.should().eql('80'); - https.host.should().eql('www.google.com'); - query.port.should().eql('8080'); - query.query.should().eql('foo=bar'); - query.path.should().eql('/foo/bar'); - query.relative.should().eql('/foo/bar?foo=bar'); - }, - - 'unique uri': function () { - var protocol = io.util.parseUri('http://google.com') - , noprotocol = io.util.parseUri('google.com') - , https = io.util.parseUri('https://google.com') - , path = io.util.parseUri('https://google.com/google.com/com/?foo=bar'); - - if ('object' == typeof window) { - io.util.uniqueUri(protocol).should().eql('http://google.com:3000'); - io.util.uniqueUri(noprotocol).should().eql('http://google.com:3000'); - } else { - io.util.uniqueUri(protocol).should().eql('http://google.com:80'); - io.util.uniqueUri(noprotocol).should().eql('http://google.com:80'); - } - - io.util.uniqueUri(https).should().eql('https://google.com:443'); - io.util.uniqueUri(path).should().eql('https://google.com:443'); - }, - - 'chunk query string': function () { - io.util.chunkQuery('foo=bar').should().be.a('object'); - io.util.chunkQuery('foo=bar').foo.should().eql('bar'); - }, - - 'merge query strings': function () { - var base = io.util.query('foo=bar', 'foo=baz') - , add = io.util.query('foo=bar', 'bar=foo') - - base.should().eql('?foo=baz'); - add.should().eql('?foo=bar&bar=foo'); - - io.util.query('','').should().eql(''); - io.util.query('foo=bar', '').should().eql('?foo=bar'); - io.util.query('', 'foo=bar').should().eql('?foo=bar'); - }, - - 'request': function () { - var type = typeof io.util.request(); - type.should().eql('object'); - }, - - 'is array': function () { - io.util.isArray([]).should().be_true; - io.util.isArray({}).should().be_false; - io.util.isArray('str').should().be_false; - io.util.isArray(new Date).should().be_false; - io.util.isArray(true).should().be_false; - io.util.isArray(arguments).should().be_false; - }, - - 'merge, deep merge': function () { - var start = { - foo: 'bar' - , bar: 'baz' - } - , duplicate = { - foo: 'foo' - , bar: 'bar' - } - , extra = { - ping: 'pong' - } - , deep = { - level1:{ - foo: 'bar' - , level2: { - foo: 'bar' - , level3:{ - foo: 'bar' - , rescursive: deep - } - } - } - } - // same structure, but changed names - , deeper = { - foo: 'bar' - , level1:{ - foo: 'baz' - , level2: { - foo: 'foo' - , level3:{ - foo: 'pewpew' - , rescursive: deep - } - } - } - }; - - io.util.merge(start, duplicate); - - start.foo.should().eql('foo'); - start.bar.should().eql('bar'); - - io.util.merge(start, extra); - start.ping.should().eql('pong'); - start.foo.should().eql('foo'); - - io.util.merge(deep, deeper); - - deep.foo.should().eql('bar'); - deep.level1.foo.should().eql('baz'); - deep.level1.level2.foo.should().eql('foo'); - deep.level1.level2.level3.foo.should().eql('pewpew'); - }, - - 'defer': function (next) { - var now = +new Date; - - io.util.defer(function () { - ((new Date - now) >= ( io.util.webkit ? 100 : 0 )).should().be_true(); - next(); - }) - }, - - 'indexOf': function () { - var data = ['socket', 2, 3, 4, 'socket', 5, 6, 7, 'io']; - io.util.indexOf(data, 'socket', 1).should().eql(4); - io.util.indexOf(data, 'socket').should().eql(0); - io.util.indexOf(data, 'waffles').should().eql(-1); - } - - }; - -})( - 'undefined' == typeof module ? module = {} : module - , 'undefined' == typeof io ? require('socket.io-client') : io - , 'undefined' == typeof should ? require('should') : should -); diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/worker.js b/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/worker.js deleted file mode 100644 index c5426326..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/test/worker.js +++ /dev/null @@ -1,20 +0,0 @@ -importScripts('/socket.io/socket.io.js'); - -self.onmessage = function (ev) { - var url = ev.data - , socket = io.connect(url); - - socket.on('done', function () { - self.postMessage('done!'); - }); - - socket.on('connect_failed', function () { - self.postMessage('connect failed'); - }); - - socket.on('error', function () { - self.postMessage('error'); - }); - - socket.send('woot'); -} diff --git a/tty.js/node_modules/tty.js/node_modules/socket.io/package.json b/tty.js/node_modules/tty.js/node_modules/socket.io/package.json deleted file mode 100644 index c20396fb..00000000 --- a/tty.js/node_modules/tty.js/node_modules/socket.io/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "socket.io", - "version": "0.9.13", - "description": "Real-time apps made cross-browser & easy with a WebSocket-like API", - "homepage": "http://socket.io", - "keywords": [ - "websocket", - "socket", - "realtime", - "socket.io", - "comet", - "ajax" - ], - "author": { - "name": "Guillermo Rauch", - "email": "guillermo@learnboost.com" - }, - "contributors": [ - { - "name": "Guillermo Rauch", - "email": "rauchg@gmail.com" - }, - { - "name": "Arnout Kazemier", - "email": "info@3rd-eden.com" - }, - { - "name": "Vladimir Dronnikov", - "email": "dronnikov@gmail.com" - }, - { - "name": "Einar Otto Stangvik", - "email": "einaros@gmail.com" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/LearnBoost/socket.io.git" - }, - "dependencies": { - "socket.io-client": "0.9.11", - "policyfile": "0.0.4", - "base64id": "0.1.0", - "redis": "0.7.3" - }, - "devDependencies": { - "expresso": "0.9.2", - "should": "*", - "benchmark": "0.2.2", - "microtime": "0.1.3-1", - "colors": "0.5.1" - }, - "optionalDependencies": { - "redis": "0.7.3" - }, - "main": "index", - "engines": { - "node": ">= 0.4.0" - }, - "scripts": { - "test": "make test" - }, - "readme": "# Socket.IO\n\nSocket.IO is a Node.JS project that makes WebSockets and realtime possible in\nall browsers. It also enhances WebSockets by providing built-in multiplexing,\nhorizontal scalability, automatic JSON encoding/decoding, and more.\n\n## How to Install\n\n```bash\nnpm install socket.io\n```\n\n## How to use\n\nFirst, require `socket.io`:\n\n```js\nvar io = require('socket.io');\n```\n\nNext, attach it to a HTTP/HTTPS server. If you're using the fantastic `express`\nweb framework:\n\n#### Express 3.x\n\n```js\nvar app = express()\n , server = require('http').createServer(app)\n , io = io.listen(server);\n\nserver.listen(80);\n\nio.sockets.on('connection', function (socket) {\n socket.emit('news', { hello: 'world' });\n socket.on('my other event', function (data) {\n console.log(data);\n });\n});\n```\n\n#### Express 2.x\n\n```js\nvar app = express.createServer()\n , io = io.listen(app);\n\napp.listen(80);\n\nio.sockets.on('connection', function (socket) {\n socket.emit('news', { hello: 'world' });\n socket.on('my other event', function (data) {\n console.log(data);\n });\n});\n```\n\nFinally, load it from the client side code:\n\n```html\n\n\n```\n\nFor more thorough examples, look at the `examples/` directory.\n\n## Short recipes\n\n### Sending and receiving events.\n\nSocket.IO allows you to emit and receive custom events.\nBesides `connect`, `message` and `disconnect`, you can emit custom events:\n\n```js\n// note, io.listen() will create a http server for you\nvar io = require('socket.io').listen(80);\n\nio.sockets.on('connection', function (socket) {\n io.sockets.emit('this', { will: 'be received by everyone' });\n\n socket.on('private message', function (from, msg) {\n console.log('I received a private message by ', from, ' saying ', msg);\n });\n\n socket.on('disconnect', function () {\n io.sockets.emit('user disconnected');\n });\n});\n```\n\n### Storing data associated to a client\n\nSometimes it's necessary to store data associated with a client that's\nnecessary for the duration of the session.\n\n#### Server side\n\n```js\nvar io = require('socket.io').listen(80);\n\nio.sockets.on('connection', function (socket) {\n socket.on('set nickname', function (name) {\n socket.set('nickname', name, function () { socket.emit('ready'); });\n });\n\n socket.on('msg', function () {\n socket.get('nickname', function (err, name) {\n console.log('Chat message by ', name);\n });\n });\n});\n```\n\n#### Client side\n\n```html\n\n```\n\n### Restricting yourself to a namespace\n\nIf you have control over all the messages and events emitted for a particular\napplication, using the default `/` namespace works.\n\nIf you want to leverage 3rd-party code, or produce code to share with others,\nsocket.io provides a way of namespacing a `socket`.\n\nThis has the benefit of `multiplexing` a single connection. Instead of\nsocket.io using two `WebSocket` connections, it'll use one.\n\nThe following example defines a socket that listens on '/chat' and one for\n'/news':\n\n#### Server side\n\n```js\nvar io = require('socket.io').listen(80);\n\nvar chat = io\n .of('/chat')\n .on('connection', function (socket) {\n socket.emit('a message', { that: 'only', '/chat': 'will get' });\n chat.emit('a message', { everyone: 'in', '/chat': 'will get' });\n });\n\nvar news = io\n .of('/news');\n .on('connection', function (socket) {\n socket.emit('item', { news: 'item' });\n });\n```\n\n#### Client side:\n\n```html\n\n```\n\n### Sending volatile messages.\n\nSometimes certain messages can be dropped. Let's say you have an app that\nshows realtime tweets for the keyword `bieber`. \n\nIf a certain client is not ready to receive messages (because of network slowness\nor other issues, or because he's connected through long polling and is in the\nmiddle of a request-response cycle), if he doesn't receive ALL the tweets related\nto bieber your application won't suffer.\n\nIn that case, you might want to send those messages as volatile messages.\n\n#### Server side\n\n```js\nvar io = require('socket.io').listen(80);\n\nio.sockets.on('connection', function (socket) {\n var tweets = setInterval(function () {\n getBieberTweet(function (tweet) {\n socket.volatile.emit('bieber tweet', tweet);\n });\n }, 100);\n\n socket.on('disconnect', function () {\n clearInterval(tweets);\n });\n});\n```\n\n#### Client side\n\nIn the client side, messages are received the same way whether they're volatile\nor not.\n\n### Getting acknowledgements\n\nSometimes, you might want to get a callback when the client confirmed the message\nreception.\n\nTo do this, simply pass a function as the last parameter of `.send` or `.emit`.\nWhat's more, when you use `.emit`, the acknowledgement is done by you, which\nmeans you can also pass data along:\n\n#### Server side\n\n```js\nvar io = require('socket.io').listen(80);\n\nio.sockets.on('connection', function (socket) {\n socket.on('ferret', function (name, fn) {\n fn('woot');\n });\n});\n```\n\n#### Client side\n\n```html\n\n```\n\n### Broadcasting messages\n\nTo broadcast, simply add a `broadcast` flag to `emit` and `send` method calls.\nBroadcasting means sending a message to everyone else except for the socket\nthat starts it.\n\n#### Server side\n\n```js\nvar io = require('socket.io').listen(80);\n\nio.sockets.on('connection', function (socket) {\n socket.broadcast.emit('user connected');\n socket.broadcast.json.send({ a: 'message' });\n});\n```\n\n### Rooms\n\nSometimes you want to put certain sockets in the same room, so that it's easy\nto broadcast to all of them together.\n\nThink of this as built-in channels for sockets. Sockets `join` and `leave`\nrooms in each socket.\n\n#### Server side\n\n```js\nvar io = require('socket.io').listen(80);\n\nio.sockets.on('connection', function (socket) {\n socket.join('justin bieber fans');\n socket.broadcast.to('justin bieber fans').emit('new fan');\n io.sockets.in('rammstein fans').emit('new non-fan');\n});\n```\n\n### Using it just as a cross-browser WebSocket\n\nIf you just want the WebSocket semantics, you can do that too.\nSimply leverage `send` and listen on the `message` event:\n\n#### Server side\n\n```js\nvar io = require('socket.io').listen(80);\n\nio.sockets.on('connection', function (socket) {\n socket.on('message', function () { });\n socket.on('disconnect', function () { });\n});\n```\n\n#### Client side\n\n```html\n\n```\n\n### Changing configuration\n\nConfiguration in socket.io is TJ-style:\n\n#### Server side\n\n```js\nvar io = require('socket.io').listen(80);\n\nio.configure(function () {\n io.set('transports', ['websocket', 'flashsocket', 'xhr-polling']);\n});\n\nio.configure('development', function () {\n io.set('transports', ['websocket', 'xhr-polling']);\n io.enable('log');\n});\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 Guillermo Rauch <guillermo@learnboost.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/LearnBoost/socket.io/issues" - }, - "_id": "socket.io@0.9.13", - "_from": "socket.io@0.9.13" -} diff --git a/tty.js/node_modules/tty.js/node_modules/term.js/.npmignore b/tty.js/node_modules/tty.js/node_modules/term.js/.npmignore deleted file mode 100644 index 8961f804..00000000 --- a/tty.js/node_modules/tty.js/node_modules/term.js/.npmignore +++ /dev/null @@ -1,12 +0,0 @@ -.git* -build/ -.lock-wscript -out/ -Makefile.gyp -*.Makefile -*.target.gyp.mk -node_modules/ -img/ -test/ -*.node -example/*.log diff --git a/tty.js/node_modules/tty.js/node_modules/term.js/LICENSE b/tty.js/node_modules/tty.js/node_modules/term.js/LICENSE deleted file mode 100644 index 259500c9..00000000 --- a/tty.js/node_modules/tty.js/node_modules/term.js/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012-2013, Christopher Jeffrey (https://github.com/chjj/) - -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/tty.js/node_modules/tty.js/node_modules/term.js/Makefile b/tty.js/node_modules/tty.js/node_modules/term.js/Makefile deleted file mode 100644 index a425d1c9..00000000 --- a/tty.js/node_modules/tty.js/node_modules/term.js/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -all: - @cp src/term.js term.js - @uglifyjs -o term.min.js term.js - -clean: - @rm term.js - @rm term.min.js - -bench: - @node test/bench - -.PHONY: clean all diff --git a/tty.js/node_modules/tty.js/node_modules/term.js/README.md b/tty.js/node_modules/tty.js/node_modules/term.js/README.md deleted file mode 100644 index 4564ad72..00000000 --- a/tty.js/node_modules/tty.js/node_modules/term.js/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# term.js - -A full xterm clone written in javascript. Used by -[**tty.js**](https://github.com/chjj/tty.js). - -## Example - -Server: - -``` js -var term = require('term.js'); -app.use(term.middleware()); -... -``` - -Client: - -``` js -window.addEventListener('load', function() { - var socket = io.connect(); - socket.on('connect', function() { - var term = new Terminal({ - cols: 80, - rows: 24, - screenKeys: true - }); - - term.on('data', function(data) { - socket.emit('data', data); - }); - - term.on('title', function(title) { - document.title = title; - }); - - term.open(document.body); - - term.write('\x1b[31mWelcome to term.js!\x1b[m\r\n'); - - socket.on('data', function(data) { - term.write(data); - }); - - socket.on('disconnect', function() { - term.destroy(); - }); - }); -}, false); -``` - -## Tmux-like - -While term.js has always supported copy/paste using the mouse, it now also -supports several keyboard based solutions for copy/paste. - -term.js includes a tmux-like selection mode (enabled with the `screenKeys` -option) which makes copy and paste very simple. `Ctrl-A` enters `prefix` mode, -from here you can type `Ctrl-V` to paste. Press `[` in prefix mode to enter -selection mode. To select text press `v` (or `space`) to enter visual mode, use -`hjkl` to navigate and create a selection, and press `Ctrl-C` to copy. - -`Ctrl-C` (in visual mode) and `Ctrl-V` (in prefix mode) should work in any OS -for copy and paste. `y` (in visual mode) will work for copying only on X11 -systems. It will copy to the primary selection. - -Note: `Ctrl-C` will also work in prefix mode for the regular OS/browser -selection. If you want to select text with your mouse and copy it to the -clipboard, simply select the text and type `Ctrl-A + Ctrl-C`, and -`Ctrl-A + Ctrl-V` to paste it. - -For mac users: consider `Ctrl` to be `Command/Apple` above. - -## License - -Copyright (c) 2012-2013, Christopher Jeffrey (MIT License) diff --git a/tty.js/node_modules/tty.js/node_modules/term.js/example/index.html b/tty.js/node_modules/tty.js/node_modules/term.js/example/index.html deleted file mode 100644 index ccac5f51..00000000 --- a/tty.js/node_modules/tty.js/node_modules/term.js/example/index.html +++ /dev/null @@ -1,66 +0,0 @@ - -term.js - - -

    term.js

    - - - diff --git a/tty.js/node_modules/tty.js/node_modules/term.js/example/index.js b/tty.js/node_modules/tty.js/node_modules/term.js/example/index.js deleted file mode 100644 index 2c999a40..00000000 --- a/tty.js/node_modules/tty.js/node_modules/term.js/example/index.js +++ /dev/null @@ -1,124 +0,0 @@ -/** - * term.js - * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License) - */ - -var http = require('http') - , express = require('express') - , io = require('socket.io') - , pty = require('pty.js') - , terminal = require('../'); - -/** - * term.js - */ - -process.title = 'term.js'; - -/** - * Dump - */ - -var stream; -if (process.argv[2] === '--dump') { - stream = require('fs').createWriteStream(__dirname + '/dump.log'); -} - -/** - * Open Terminal - */ - -var buff = [] - , socket - , term; - -term = pty.fork(process.env.SHELL || 'sh', [], { - name: require('fs').existsSync('/usr/share/terminfo/x/xterm-256color') - ? 'xterm-256color' - : 'xterm', - cols: 80, - rows: 24, - cwd: process.env.HOME -}); - -term.on('data', function(data) { - if (stream) stream.write('OUT: ' + data + '\n-\n'); - return !socket - ? buff.push(data) - : socket.emit('data', data); -}); - -console.log('' - + 'Created shell with pty master/slave' - + ' pair (master: %d, pid: %d)', - term.fd, term.pid); - -/** - * App & Server - */ - -var app = express() - , server = http.createServer(app); - -app.use(function(req, res, next) { - var setHeader = res.setHeader; - res.setHeader = function(name) { - switch (name) { - case 'Cache-Control': - case 'Last-Modified': - case 'ETag': - return; - } - return setHeader.apply(res, arguments); - }; - next(); -}); - -app.use(express.basicAuth(function(user, pass, next) { - if (user !== 'foo' || pass !== 'bar') { - return next(true); - } - return next(null, user); -})); - -app.use(express.static(__dirname)); -app.use(terminal.middleware()); - -server.listen(8080); - -server.on('connection', function(socket) { - var address = socket.remoteAddress; - if (address !== '127.0.0.1' && address !== '::1') { - try { - socket.destroy(); - } catch (e) { - ; - } - console.log('Attempted connection from %s. Refused.', address); - } -}); - -/** - * Sockets - */ - -io = io.listen(server, { - log: false -}); - -io.sockets.on('connection', function(sock) { - socket = sock; - - socket.on('data', function(data) { - if (stream) stream.write('IN: ' + data + '\n-\n'); - term.write(data); - }); - - socket.on('disconnect', function() { - socket = null; - }); - - while (buff.length) { - socket.emit('data', buff.shift()); - } -}); diff --git a/tty.js/node_modules/tty.js/node_modules/term.js/index.js b/tty.js/node_modules/tty.js/node_modules/term.js/index.js deleted file mode 100644 index bf4d18ac..00000000 --- a/tty.js/node_modules/tty.js/node_modules/term.js/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/index.js'); diff --git a/tty.js/node_modules/tty.js/node_modules/term.js/lib/index.js b/tty.js/node_modules/tty.js/node_modules/term.js/lib/index.js deleted file mode 100644 index 6a24d707..00000000 --- a/tty.js/node_modules/tty.js/node_modules/term.js/lib/index.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * term.js - an xterm emulator - * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License) - * https://github.com/chjj/term.js - */ - -function term(options) { - return new term.Terminal(options); -} - -term.middleware = function(options) { - var url = require('url'); - return function(req, res, next) { - if (url.parse(req.url).pathname !== '/term.js') { - return next(); - } - - if (+new Date(req.headers['if-modified-since']) === term.last) { - res.statusCode = 304; - res.end(); - return; - } - - res.writeHead(200, { - 'Content-Type': 'application/javascript; charset=utf-8', - 'Content-Length': Buffer.byteLength(term.script), - 'Last-Modified': term.last - }); - - res.end(term.script); - }; -}; - -term.path = __dirname + '/../src/term.js'; - -term.__defineGetter__('script', function() { - if (term._script) return term._script; - term.last = +new Date; - return term._script = require('fs').readFileSync(term.path, 'utf8'); -}); - -term.__defineGetter__('Terminal', function() { - if (term._Terminal) return term._Terminal; - return term._Terminal = require('../src/term'); -}); - -/** - * Expose - */ - -module.exports = term; diff --git a/tty.js/node_modules/tty.js/node_modules/term.js/package.json b/tty.js/node_modules/tty.js/node_modules/term.js/package.json deleted file mode 100644 index b342249c..00000000 --- a/tty.js/node_modules/tty.js/node_modules/term.js/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "term.js", - "description": "A terminal written in javascript", - "author": { - "name": "Christopher Jeffrey" - }, - "version": "0.0.3", - "main": "./index.js", - "preferGlobal": false, - "repository": { - "type": "git", - "url": "git://github.com/chjj/term.js.git" - }, - "homepage": "https://github.com/chjj/term.js", - "bugs": { - "url": "https://github.com/chjj/term.js/issues" - }, - "keywords": [ - "tty", - "terminal", - "term", - "xterm" - ], - "tags": [ - "tty", - "terminal", - "term", - "xterm" - ], - "engines": { - "node": ">= 0.8.0" - }, - "devDependencies": { - "express": "3.1.0", - "socket.io": "0.9.13", - "pty.js": "0.2.3" - }, - "readme": "# term.js\n\nA full xterm clone written in javascript. Used by\n[**tty.js**](https://github.com/chjj/tty.js).\n\n## Example\n\nServer:\n\n``` js\nvar term = require('term.js');\napp.use(term.middleware());\n...\n```\n\nClient:\n\n``` js\nwindow.addEventListener('load', function() {\n var socket = io.connect();\n socket.on('connect', function() {\n var term = new Terminal({\n cols: 80,\n rows: 24,\n screenKeys: true\n });\n\n term.on('data', function(data) {\n socket.emit('data', data);\n });\n\n term.on('title', function(title) {\n document.title = title;\n });\n\n term.open(document.body);\n\n term.write('\\x1b[31mWelcome to term.js!\\x1b[m\\r\\n');\n\n socket.on('data', function(data) {\n term.write(data);\n });\n\n socket.on('disconnect', function() {\n term.destroy();\n });\n });\n}, false);\n```\n\n## Tmux-like\n\nWhile term.js has always supported copy/paste using the mouse, it now also\nsupports several keyboard based solutions for copy/paste.\n\nterm.js includes a tmux-like selection mode (enabled with the `screenKeys`\noption) which makes copy and paste very simple. `Ctrl-A` enters `prefix` mode,\nfrom here you can type `Ctrl-V` to paste. Press `[` in prefix mode to enter\nselection mode. To select text press `v` (or `space`) to enter visual mode, use\n`hjkl` to navigate and create a selection, and press `Ctrl-C` to copy.\n\n`Ctrl-C` (in visual mode) and `Ctrl-V` (in prefix mode) should work in any OS\nfor copy and paste. `y` (in visual mode) will work for copying only on X11\nsystems. It will copy to the primary selection.\n\nNote: `Ctrl-C` will also work in prefix mode for the regular OS/browser\nselection. If you want to select text with your mouse and copy it to the\nclipboard, simply select the text and type `Ctrl-A + Ctrl-C`, and\n`Ctrl-A + Ctrl-V` to paste it.\n\nFor mac users: consider `Ctrl` to be `Command/Apple` above.\n\n## License\n\nCopyright (c) 2012-2013, Christopher Jeffrey (MIT License)\n", - "readmeFilename": "README.md", - "_id": "term.js@0.0.3", - "_from": "term.js@0.0.3" -} diff --git a/tty.js/node_modules/tty.js/node_modules/term.js/src/term.js b/tty.js/node_modules/tty.js/node_modules/term.js/src/term.js deleted file mode 100644 index 67a5ca55..00000000 --- a/tty.js/node_modules/tty.js/node_modules/term.js/src/term.js +++ /dev/null @@ -1,5726 +0,0 @@ -/** - * term.js - an xterm emulator - * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License) - * https://github.com/chjj/term.js - * - * 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. - * - * Originally forked from (with the author's permission): - * Fabrice Bellard's javascript vt100 for jslinux: - * http://bellard.org/jslinux/ - * Copyright (c) 2011 Fabrice Bellard - * The original design remains. The terminal itself - * has been extended to include xterm CSI codes, among - * other features. - */ - -;(function() { - -/** - * Terminal Emulation References: - * http://vt100.net/ - * http://invisible-island.net/xterm/ctlseqs/ctlseqs.txt - * http://invisible-island.net/xterm/ctlseqs/ctlseqs.html - * http://invisible-island.net/vttest/ - * http://www.inwap.com/pdp10/ansicode.txt - * http://linux.die.net/man/4/console_codes - * http://linux.die.net/man/7/urxvt - */ - -'use strict'; - -/** - * Shared - */ - -var window = this - , document = this.document; - -/** - * EventEmitter - */ - -function EventEmitter() { - this._events = this._events || {}; -} - -EventEmitter.prototype.addListener = function(type, listener) { - this._events[type] = this._events[type] || []; - this._events[type].push(listener); -}; - -EventEmitter.prototype.on = EventEmitter.prototype.addListener; - -EventEmitter.prototype.removeListener = function(type, listener) { - if (!this._events[type]) return; - - var obj = this._events[type] - , i = obj.length; - - while (i--) { - if (obj[i] === listener || obj[i].listener === listener) { - obj.splice(i, 1); - return; - } - } -}; - -EventEmitter.prototype.off = EventEmitter.prototype.removeListener; - -EventEmitter.prototype.removeAllListeners = function(type) { - if (this._events[type]) delete this._events[type]; -}; - -EventEmitter.prototype.once = function(type, listener) { - function on() { - var args = Array.prototype.slice.call(arguments); - this.removeListener(type, on); - return listener.apply(this, args); - } - on.listener = listener; - return this.on(type, on); -}; - -EventEmitter.prototype.emit = function(type) { - if (!this._events[type]) return; - - var args = Array.prototype.slice.call(arguments, 1) - , obj = this._events[type] - , l = obj.length - , i = 0; - - for (; i < l; i++) { - obj[i].apply(this, args); - } -}; - -EventEmitter.prototype.listeners = function(type) { - return this._events[type] = this._events[type] || []; -}; - -/** - * States - */ - -var normal = 0 - , escaped = 1 - , csi = 2 - , osc = 3 - , charset = 4 - , dcs = 5 - , ignore = 6; - -/** - * Terminal - */ - -function Terminal(options) { - var self = this; - - if (!(this instanceof Terminal)) { - return new Terminal(arguments[0], arguments[1], arguments[2]); - } - - EventEmitter.call(this); - - if (typeof options === 'number') { - options = { - cols: arguments[0], - rows: arguments[1], - handler: arguments[2] - }; - } - - options = options || {}; - - each(keys(Terminal.defaults), function(key) { - if (options[key] == null) { - options[key] = Terminal.options[key]; - // Legacy: - if (Terminal[key] !== Terminal.defaults[key]) { - options[key] = Terminal[key]; - } - } - self[key] = options[key]; - }); - - if (options.colors.length === 8) { - options.colors = options.colors.concat(Terminal._colors.slice(8)); - } else if (options.colors.length === 16) { - options.colors = options.colors.concat(Terminal._colors.slice(16)); - } else if (options.colors.length === 10) { - options.colors = options.colors.slice(0, -2).concat( - Terminal._colors.slice(8, -2), options.colors.slice(-2)); - } else if (options.colors.length === 18) { - options.colors = options.colors.concat( - Terminal._colors.slice(16, -2), options.colors.slice(-2)); - } - this.colors = options.colors; - - this.options = options; - - // this.context = options.context || window; - // this.document = options.document || document; - this.parent = options.body || options.parent - || (document ? document.getElementsByTagName('body')[0] : null); - - this.cols = options.cols || options.geometry[0]; - this.rows = options.rows || options.geometry[1]; - - if (options.handler) { - this.on('data', options.handler); - } - - this.ybase = 0; - this.ydisp = 0; - this.x = 0; - this.y = 0; - this.cursorState = 0; - this.cursorHidden = false; - this.convertEol; - this.state = 0; - this.queue = ''; - this.scrollTop = 0; - this.scrollBottom = this.rows - 1; - - // modes - this.applicationKeypad = false; - this.applicationCursor = false; - this.originMode = false; - this.insertMode = false; - this.wraparoundMode = false; - this.normal = null; - - // select modes - this.prefixMode = false; - this.selectMode = false; - this.visualMode = false; - this.searchMode = false; - this.searchDown; - this.entry = ''; - this.entryPrefix = ''; - this._real; - this._selected; - this._textarea; - - // charset - this.charset = null; - this.gcharset = null; - this.glevel = 0; - this.charsets = [null]; - - // mouse properties - this.decLocator; - this.x10Mouse; - this.vt200Mouse; - this.vt300Mouse; - this.normalMouse; - this.mouseEvents; - this.sendFocus; - this.utfMouse; - this.sgrMouse; - this.urxvtMouse; - - // misc - this.element; - this.children; - this.refreshStart; - this.refreshEnd; - this.savedX; - this.savedY; - this.savedCols; - - // stream - this.readable = true; - this.writable = true; - - this.defAttr = (0 << 18) | (257 << 9) | (256 << 0); - this.curAttr = this.defAttr; - - this.params = []; - this.currentParam = 0; - this.prefix = ''; - this.postfix = ''; - - this.lines = []; - var i = this.rows; - while (i--) { - this.lines.push(this.blankLine()); - } - - this.tabs; - this.setupStops(); -} - -inherits(Terminal, EventEmitter); - -// back_color_erase feature for xterm. -Terminal.prototype.eraseAttr = function() { - // if (this.is('screen')) return this.defAttr; - return (this.defAttr & ~0x1ff) | (this.curAttr & 0x1ff); -}; - -/** - * Colors - */ - -// Colors 0-15 -Terminal.tangoColors = [ - // dark: - '#2e3436', - '#cc0000', - '#4e9a06', - '#c4a000', - '#3465a4', - '#75507b', - '#06989a', - '#d3d7cf', - // bright: - '#555753', - '#ef2929', - '#8ae234', - '#fce94f', - '#729fcf', - '#ad7fa8', - '#34e2e2', - '#eeeeec' -]; - -Terminal.xtermColors = [ - // dark: - '#000000', // black - '#cd0000', // red3 - '#00cd00', // green3 - '#cdcd00', // yellow3 - '#0000ee', // blue2 - '#cd00cd', // magenta3 - '#00cdcd', // cyan3 - '#e5e5e5', // gray90 - // bright: - '#7f7f7f', // gray50 - '#ff0000', // red - '#00ff00', // green - '#ffff00', // yellow - '#5c5cff', // rgb:5c/5c/ff - '#ff00ff', // magenta - '#00ffff', // cyan - '#ffffff' // white -]; - -// Colors 0-15 + 16-255 -// Much thanks to TooTallNate for writing this. -Terminal.colors = (function() { - var colors = Terminal.tangoColors.slice() - , r = [0x00, 0x5f, 0x87, 0xaf, 0xd7, 0xff] - , i; - - // 16-231 - i = 0; - for (; i < 216; i++) { - out(r[(i / 36) % 6 | 0], r[(i / 6) % 6 | 0], r[i % 6]); - } - - // 232-255 (grey) - i = 0; - for (; i < 24; i++) { - r = 8 + i * 10; - out(r, r, r); - } - - function out(r, g, b) { - colors.push('#' + hex(r) + hex(g) + hex(b)); - } - - function hex(c) { - c = c.toString(16); - return c.length < 2 ? '0' + c : c; - } - - return colors; -})(); - -// Default BG/FG -Terminal.colors[256] = '#000000'; -Terminal.colors[257] = '#f0f0f0'; - -Terminal._colors = Terminal.colors.slice(); - -Terminal.vcolors = (function() { - var out = [] - , colors = Terminal.colors - , i = 0 - , color; - - for (; i < 256; i++) { - color = parseInt(colors[i].substring(1), 16); - out.push([ - (color >> 16) & 0xff, - (color >> 8) & 0xff, - color & 0xff - ]); - } - - return out; -})(); - -/** - * Options - */ - -Terminal.defaults = { - colors: Terminal.colors, - convertEol: false, - termName: 'xterm', - geometry: [80, 24], - cursorBlink: true, - visualBell: false, - popOnBell: false, - scrollback: 1000, - screenKeys: false, - debug: false, - useStyle: false - // programFeatures: false, - // focusKeys: false, -}; - -Terminal.options = {}; - -each(keys(Terminal.defaults), function(key) { - Terminal[key] = Terminal.defaults[key]; - Terminal.options[key] = Terminal.defaults[key]; -}); - -/** - * Focused Terminal - */ - -Terminal.focus = null; - -Terminal.prototype.focus = function() { - if (Terminal.focus === this) return; - - if (Terminal.focus) { - Terminal.focus.blur(); - } - - if (this.sendFocus) this.send('\x1b[I'); - this.showCursor(); - - // try { - // this.element.focus(); - // } catch (e) { - // ; - // } - - // this.emit('focus'); - - Terminal.focus = this; -}; - -Terminal.prototype.blur = function() { - if (Terminal.focus !== this) return; - - this.cursorState = 0; - this.refresh(this.y, this.y); - if (this.sendFocus) this.send('\x1b[O'); - - // try { - // this.element.blur(); - // } catch (e) { - // ; - // } - - // this.emit('blur'); - - Terminal.focus = null; -}; - -/** - * Initialize global behavior - */ - -Terminal.prototype.initGlobal = function() { - var document = this.document; - - Terminal._boundDocs = Terminal._boundDocs || []; - if (~indexOf(Terminal._boundDocs, document)) { - return; - } - Terminal._boundDocs.push(document); - - Terminal.bindPaste(document); - - Terminal.bindKeys(document); - - Terminal.bindCopy(document); - - if (this.isIpad) { - Terminal.fixIpad(document); - } - - if (this.useStyle) { - Terminal.insertStyle(document, this.colors[256], this.colors[257]); - } -}; - -/** - * Bind to paste event - */ - -Terminal.bindPaste = function(document) { - // This seems to work well for ctrl-V and middle-click, - // even without the contentEditable workaround. - var window = document.defaultView; - on(window, 'paste', function(ev) { - var term = Terminal.focus; - if (!term) return; - if (ev.clipboardData) { - term.send(ev.clipboardData.getData('text/plain')); - } else if (term.context.clipboardData) { - term.send(term.context.clipboardData.getData('Text')); - } - // Not necessary. Do it anyway for good measure. - term.element.contentEditable = 'inherit'; - return cancel(ev); - }); -}; - -/** - * Global Events for key handling - */ - -Terminal.bindKeys = function(document) { - // We should only need to check `target === body` below, - // but we can check everything for good measure. - on(document, 'keydown', function(ev) { - if (!Terminal.focus) return; - var target = ev.target || ev.srcElement; - if (!target) return; - if (target === Terminal.focus.element - || target === Terminal.focus.context - || target === Terminal.focus.document - || target === Terminal.focus.body - || target === Terminal._textarea - || target === Terminal.focus.parent) { - return Terminal.focus.keyDown(ev); - } - }, true); - - on(document, 'keypress', function(ev) { - if (!Terminal.focus) return; - var target = ev.target || ev.srcElement; - if (!target) return; - if (target === Terminal.focus.element - || target === Terminal.focus.context - || target === Terminal.focus.document - || target === Terminal.focus.body - || target === Terminal._textarea - || target === Terminal.focus.parent) { - return Terminal.focus.keyPress(ev); - } - }, true); - - // If we click somewhere other than a - // terminal, unfocus the terminal. - on(document, 'mousedown', function(ev) { - if (!Terminal.focus) return; - - var el = ev.target || ev.srcElement; - if (!el) return; - - do { - if (el === Terminal.focus.element) return; - } while (el = el.parentNode); - - Terminal.focus.blur(); - }); -}; - -/** - * Copy Selection w/ Ctrl-C (Select Mode) - */ - -Terminal.bindCopy = function(document) { - var window = document.defaultView; - - // if (!('onbeforecopy' in document)) { - // // Copies to *only* the clipboard. - // on(window, 'copy', function fn(ev) { - // var term = Terminal.focus; - // if (!term) return; - // if (!term._selected) return; - // var text = term.grabText( - // term._selected.x1, term._selected.x2, - // term._selected.y1, term._selected.y2); - // term.emit('copy', text); - // ev.clipboardData.setData('text/plain', text); - // }); - // return; - // } - - // Copies to primary selection *and* clipboard. - // NOTE: This may work better on capture phase, - // or using the `beforecopy` event. - on(window, 'copy', function(ev) { - var term = Terminal.focus; - if (!term) return; - if (!term._selected) return; - var textarea = term.getCopyTextarea(); - var text = term.grabText( - term._selected.x1, term._selected.x2, - term._selected.y1, term._selected.y2); - term.emit('copy', text); - textarea.focus(); - textarea.textContent = text; - textarea.value = text; - textarea.setSelectionRange(0, text.length); - setTimeout(function() { - term.element.focus(); - term.focus(); - }, 1); - }); -}; - -/** - * Fix iPad - no idea if this works - */ - -Terminal.fixIpad = function(document) { - var textarea = document.createElement('textarea'); - textarea.style.position = 'absolute'; - textarea.style.left = '-32000px'; - textarea.style.top = '-32000px'; - textarea.style.width = '0px'; - textarea.style.height = '0px'; - textarea.style.opacity = '0'; - textarea.style.backgroundColor = 'transparent'; - textarea.style.borderStyle = 'none'; - textarea.style.outlineStyle = 'none'; - - document.getElementsByTagName('body')[0].appendChild(textarea); - - Terminal._textarea = textarea; - - setTimeout(function() { - textarea.focus(); - }, 1000); -}; - -/** - * Insert a default style - */ - -Terminal.insertStyle = function(document, bg, fg) { - var style = document.getElementById('term-style'); - if (style) return; - - var head = document.getElementsByTagName('head')[0]; - if (!head) return; - - var style = document.createElement('style'); - style.id = 'term-style'; - - // textContent doesn't work well with IE for