├── .editorconfig ├── .gitignore ├── README.md ├── Vagrantfile ├── css ├── css.css └── font-awesome-4.4.0 │ ├── HELP-US-OUT.txt │ ├── css │ ├── font-awesome.css │ └── font-awesome.min.css │ ├── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ └── fontawesome-webfont.woff2 │ ├── less │ ├── animated.less │ ├── bordered-pulled.less │ ├── core.less │ ├── fixed-width.less │ ├── font-awesome.less │ ├── icons.less │ ├── larger.less │ ├── list.less │ ├── mixins.less │ ├── path.less │ ├── rotated-flipped.less │ ├── stacked.less │ └── variables.less │ └── scss │ ├── _animated.scss │ ├── _bordered-pulled.scss │ ├── _core.scss │ ├── _fixed-width.scss │ ├── _icons.scss │ ├── _larger.scss │ ├── _list.scss │ ├── _mixins.scss │ ├── _path.scss │ ├── _rotated-flipped.scss │ ├── _stacked.scss │ ├── _variables.scss │ └── font-awesome.scss ├── favicon.ico ├── img ├── favicon.ico ├── favicon.png └── rect.png ├── index.xhtml ├── js ├── backend │ ├── generator.js │ └── system │ │ └── metafora │ │ ├── distrito-a │ │ ├── angular-1.js │ │ └── index.js │ │ ├── distrito-b │ │ ├── index-2.js │ │ └── index.js │ │ └── index.js ├── city.js ├── config.json ├── interface.js ├── lib │ ├── MooTools-Core-Server.js │ ├── OrbitControls.js │ ├── controles.js │ ├── esprima.js │ ├── mootools-yui-compressed.js │ ├── raf-polyfill.js │ └── three.min.js ├── main.js ├── node_modules │ ├── .bin │ │ ├── mime │ │ └── mime.cmd │ ├── mime │ │ ├── .npmignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── build │ │ │ ├── build.js │ │ │ └── test.js │ │ ├── cli.js │ │ ├── mime.js │ │ ├── package.json │ │ └── types.json │ ├── minimatch │ │ ├── LICENSE │ │ ├── README.md │ │ ├── minimatch.js │ │ ├── node_modules │ │ │ └── brace-expansion │ │ │ │ ├── .npmignore │ │ │ │ ├── README.md │ │ │ │ ├── example.js │ │ │ │ ├── index.js │ │ │ │ ├── node_modules │ │ │ │ ├── balanced-match │ │ │ │ │ ├── .npmignore │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── README.md │ │ │ │ │ ├── example.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── package.json │ │ │ │ │ └── test │ │ │ │ │ │ └── balanced.js │ │ │ │ └── concat-map │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.markdown │ │ │ │ │ ├── example │ │ │ │ │ └── map.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── package.json │ │ │ │ │ └── test │ │ │ │ │ └── map.js │ │ │ │ └── package.json │ │ └── package.json │ ├── mysql │ │ ├── Changes.md │ │ ├── License │ │ ├── Readme.md │ │ ├── index.js │ │ ├── lib │ │ │ ├── Connection.js │ │ │ ├── ConnectionConfig.js │ │ │ ├── Pool.js │ │ │ ├── PoolCluster.js │ │ │ ├── PoolConfig.js │ │ │ ├── PoolConnection.js │ │ │ ├── PoolNamespace.js │ │ │ ├── PoolSelector.js │ │ │ └── protocol │ │ │ │ ├── Auth.js │ │ │ │ ├── PacketHeader.js │ │ │ │ ├── PacketWriter.js │ │ │ │ ├── Parser.js │ │ │ │ ├── Protocol.js │ │ │ │ ├── ResultSet.js │ │ │ │ ├── SqlString.js │ │ │ │ ├── constants │ │ │ │ ├── charsets.js │ │ │ │ ├── client.js │ │ │ │ ├── errors.js │ │ │ │ ├── field_flags.js │ │ │ │ ├── server_status.js │ │ │ │ ├── ssl_profiles.js │ │ │ │ └── types.js │ │ │ │ ├── packets │ │ │ │ ├── ClientAuthenticationPacket.js │ │ │ │ ├── ComChangeUserPacket.js │ │ │ │ ├── ComPingPacket.js │ │ │ │ ├── ComQueryPacket.js │ │ │ │ ├── ComQuitPacket.js │ │ │ │ ├── ComStatisticsPacket.js │ │ │ │ ├── EmptyPacket.js │ │ │ │ ├── EofPacket.js │ │ │ │ ├── ErrorPacket.js │ │ │ │ ├── Field.js │ │ │ │ ├── FieldPacket.js │ │ │ │ ├── HandshakeInitializationPacket.js │ │ │ │ ├── LocalDataFilePacket.js │ │ │ │ ├── OkPacket.js │ │ │ │ ├── OldPasswordPacket.js │ │ │ │ ├── ResultSetHeaderPacket.js │ │ │ │ ├── RowDataPacket.js │ │ │ │ ├── SSLRequestPacket.js │ │ │ │ ├── StatisticsPacket.js │ │ │ │ ├── UseOldPasswordPacket.js │ │ │ │ └── index.js │ │ │ │ └── sequences │ │ │ │ ├── ChangeUser.js │ │ │ │ ├── Handshake.js │ │ │ │ ├── Ping.js │ │ │ │ ├── Query.js │ │ │ │ ├── Quit.js │ │ │ │ ├── Sequence.js │ │ │ │ ├── Statistics.js │ │ │ │ └── index.js │ │ ├── node_modules │ │ │ ├── bignumber.js │ │ │ │ ├── .npmignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENCE │ │ │ │ ├── README.md │ │ │ │ ├── bignumber.js │ │ │ │ ├── bignumber.js.map │ │ │ │ ├── bignumber.min.js │ │ │ │ ├── bower.json │ │ │ │ ├── doc │ │ │ │ │ └── API.html │ │ │ │ └── package.json │ │ │ ├── readable-stream │ │ │ │ ├── .npmignore │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── duplex.js │ │ │ │ ├── float.patch │ │ │ │ ├── lib │ │ │ │ │ ├── _stream_duplex.js │ │ │ │ │ ├── _stream_passthrough.js │ │ │ │ │ ├── _stream_readable.js │ │ │ │ │ ├── _stream_transform.js │ │ │ │ │ └── _stream_writable.js │ │ │ │ ├── node_modules │ │ │ │ │ ├── core-util-is │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── float.patch │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ └── util.js │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── util.js │ │ │ │ │ ├── inherits │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── inherits.js │ │ │ │ │ │ ├── inherits_browser.js │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── isarray │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── build │ │ │ │ │ │ │ └── build.js │ │ │ │ │ │ ├── component.json │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── package.json │ │ │ │ │ └── string_decoder │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── package.json │ │ │ │ ├── package.json │ │ │ │ ├── passthrough.js │ │ │ │ ├── readable.js │ │ │ │ ├── transform.js │ │ │ │ └── writable.js │ │ │ └── require-all │ │ │ │ ├── .npmignore │ │ │ │ ├── License │ │ │ │ ├── Readme.md │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ └── package.json │ ├── nomnom │ │ ├── .npmignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── node_modules │ │ │ ├── chalk │ │ │ │ ├── index.js │ │ │ │ ├── node_modules │ │ │ │ │ ├── .bin │ │ │ │ │ │ ├── strip-ansi │ │ │ │ │ │ └── strip-ansi.cmd │ │ │ │ │ ├── ansi-styles │ │ │ │ │ │ ├── ansi-styles.js │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── readme.md │ │ │ │ │ ├── has-color │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── readme.md │ │ │ │ │ └── strip-ansi │ │ │ │ │ │ ├── cli.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── readme.md │ │ │ │ ├── package.json │ │ │ │ └── readme.md │ │ │ └── underscore │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── package.json │ │ │ │ ├── underscore-min.js │ │ │ │ └── underscore.js │ │ ├── nomnom.js │ │ ├── num-vals-fix.diff │ │ ├── package.json │ │ ├── test.js │ │ └── test │ │ │ ├── callback.js │ │ │ ├── commands.js │ │ │ ├── expected.js │ │ │ ├── matching.js │ │ │ ├── option.js │ │ │ ├── transform.js │ │ │ ├── usage.js │ │ │ └── values.js │ └── yuidoc-lucid-theme │ │ ├── .npmignore │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── assets │ │ ├── css │ │ │ ├── custom.css │ │ │ ├── external-small.png │ │ │ ├── lucid.css │ │ │ └── main.css │ │ ├── favicon.png │ │ ├── img │ │ │ └── spinner.gif │ │ ├── index.html │ │ ├── js │ │ │ └── yuidoc-bootstrap.js │ │ └── vendor │ │ │ ├── bootstrap │ │ │ ├── css │ │ │ │ ├── bootstrap.css │ │ │ │ └── bootstrap.min.css │ │ │ ├── img │ │ │ │ ├── glyphicons-halflings-white.png │ │ │ │ └── glyphicons-halflings.png │ │ │ └── js │ │ │ │ ├── bootstrap.js │ │ │ │ └── bootstrap.min.js │ │ │ ├── jquery │ │ │ └── jquery-1.8.2.min.js │ │ │ └── prettify │ │ │ ├── prettify-min.css │ │ │ └── prettify-min.js │ │ ├── helpers │ │ └── helpers.js │ │ ├── layouts │ │ ├── main.handlebars │ │ └── xhr.handlebars │ │ ├── package.json │ │ ├── partials │ │ ├── attrs.handlebars │ │ ├── classes.handlebars │ │ ├── events.handlebars │ │ ├── files.handlebars │ │ ├── index.handlebars │ │ ├── method.handlebars │ │ ├── module.handlebars │ │ ├── options.handlebars │ │ ├── props.handlebars │ │ └── sidebar.handlebars │ │ └── theme.json └── server.js ├── license.md ├── package.json ├── provision_script.sh └── sql └── schema.sql /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = tab 5 | end_of_line = lf 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [*.md] 11 | trim_trailing_whitespace = false 12 | 13 | [*.bat] 14 | end_of_line = crlf 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant 2 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | # All Vagrant configuration is done below. The "2" in Vagrant.configure 5 | # configures the configuration version (we support older styles for 6 | # backwards compatibility). Please don't change it unless you know what 7 | # you're doing. 8 | Vagrant.configure(2) do |config| 9 | # The most common configuration options are documented and commented below. 10 | # For a complete reference, please see the online documentation at 11 | # https://docs.vagrantup.com. 12 | 13 | # Every Vagrant development environment requires a box. You can search for 14 | # boxes at https://atlas.hashicorp.com/search. 15 | config.vm.box = "ubuntu/trusty64" 16 | 17 | # Disable automatic box update checking. If you disable this, then 18 | # boxes will only be checked for updates when the user runs 19 | # `vagrant box outdated`. This is not recommended. 20 | # config.vm.box_check_update = false 21 | 22 | # Create a forwarded port mapping which allows access to a specific port 23 | # within the machine from a port on the host machine. In the example below, 24 | # accessing "localhost:8080" will access port 80 on the guest machine. 25 | config.vm.network "forwarded_port", guest: 800, host: 8080 26 | 27 | # Create a private network, which allows host-only access to the machine 28 | # using a specific IP. 29 | # config.vm.network "private_network", ip: "192.168.33.10" 30 | 31 | # Create a public network, which generally matched to bridged network. 32 | # Bridged networks make the machine appear as another physical device on 33 | # your network. 34 | # config.vm.network "public_network" 35 | 36 | # Share an additional folder to the guest VM. The first argument is 37 | # the path on the host to the actual folder. The second argument is 38 | # the path on the guest to mount the folder. And the optional third 39 | # argument is a set of non-required options. 40 | # config.vm.synced_folder "../data", "/vagrant_data" 41 | 42 | # Provider-specific configuration so you can fine-tune various 43 | # backing providers for Vagrant. These expose provider-specific options. 44 | # Example for VirtualBox: 45 | # 46 | # config.vm.provider "virtualbox" do |vb| 47 | # # Display the VirtualBox GUI when booting the machine 48 | # vb.gui = true 49 | # 50 | # # Customize the amount of memory on the VM: 51 | # vb.memory = "1024" 52 | # end 53 | # 54 | # View the documentation for the provider you are using for more 55 | # information on available options. 56 | 57 | # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies 58 | # such as FTP and Heroku are also available. See the documentation at 59 | # https://docs.vagrantup.com/v2/push/atlas.html for more information. 60 | # config.push.define "atlas" do |push| 61 | # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME" 62 | # end 63 | 64 | # Enable provisioning with a shell script. Additional provisioners such as 65 | # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the 66 | # documentation for more information about their specific syntax and use. 67 | config.vm.provision "shell", path: "provision_script.sh" 68 | end 69 | -------------------------------------------------------------------------------- /css/css.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | -webkit-tab-size:3; 5 | -o-tab-size:3; 6 | -ms-tab-size:3; 7 | -moz-tab-size:3; 8 | tab-size:3; 9 | } 10 | html, 11 | body { 12 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 13 | height: 100%; 14 | overflow: hidden; 15 | } 16 | /*html { 17 | forçando barras de rolagem para reduzir chances de rolagem horizontal 18 | overflow: scroll; 19 | }*/ 20 | #interface { 21 | background-color: rgba(255,255,255,.6); 22 | border-color: #e7e7e7; 23 | border-style: solid; 24 | border-width: 0 0 1px; 25 | color: #000; 26 | left: 0; 27 | overflow: visible; 28 | position: fixed; 29 | top: 0; 30 | width: 100%; 31 | } 32 | #interface>*, 33 | #interface .painel>* { 34 | display: inline-block; 35 | } 36 | #interface h1 { 37 | color: #777; 38 | font-size:18px; 39 | height:20px; 40 | line-height:20px; 41 | padding: 15px; 42 | } 43 | #cities { 44 | max-height: 500px; 45 | overflow: auto; 46 | } 47 | ul.menu, 48 | ul.menu * { 49 | list-style: none; 50 | } 51 | ul.menu { 52 | font-size: 0; 53 | } 54 | ul.menu li { 55 | font-size: 14px; 56 | position: relative; 57 | white-space: nowrap; 58 | } 59 | ul.menu li:hover { 60 | background-color: #F5F5F5; 61 | color: #262626; 62 | } 63 | ul.menu .active { 64 | background-color: #D0D0F5; 65 | color: #010126; 66 | } 67 | ul.menu>li { 68 | display: inline-block; 69 | } 70 | ul.menu>li:hover { 71 | background-color: #E7E7E7; 72 | color: #555; 73 | } 74 | ul.menu li>a, 75 | ul.menu li>span { 76 | color: #333; 77 | display: block; 78 | padding: 3px 20px; 79 | } 80 | ul.menu li>span { 81 | cursor: default; 82 | } 83 | ul.menu>li>a, 84 | ul.menu>li>span { 85 | color: #777; 86 | padding: 15px; 87 | } 88 | ul.menu li>ul { 89 | background-color: #FFF; 90 | border: 1px solid rgba(0, 0, 0, 0.15); 91 | box-shadow: 0 6px 12px rgba(0, 0, 0, 0.176); 92 | display: none; 93 | min-width: 160px; 94 | padding: 5px 0; 95 | position: absolute; 96 | top:100%; 97 | z-index: 99; 98 | } 99 | ul.menu li:hover>ul { 100 | display: block; 101 | } 102 | #interface .painel { 103 | float: right; 104 | } 105 | #interface .painel>* { 106 | padding: 15px; 107 | vertical-align: middle; 108 | } 109 | #interface .painel>#stats { 110 | padding: 0; 111 | } 112 | .pop .content { 113 | display: none; 114 | background-color: #FFF; 115 | border: 1px solid rgba(0, 0, 0, 0.15); 116 | box-shadow: 0 6px 12px rgba(0, 0, 0, 0.176); 117 | } 118 | .pop .content>.titulo { 119 | background-color: #E7E7E7; 120 | color: #555; 121 | padding: 5px 20px; 122 | } 123 | .pop .content>.texto { 124 | padding: 15px 20px 20px; 125 | } 126 | .cities { 127 | position: absolute; 128 | } 129 | #vis { 130 | cursor: default; /* webkit... :( */ 131 | height: 100%; 132 | width: 100%; 133 | } 134 | 135 | /* Cores devem ser as mesmas definidas no gerador.js */ 136 | .i-nomeada, 137 | .fa-circle.e { 138 | color:#337AB7; 139 | } 140 | .i-anonima, 141 | .fa-circle.d { 142 | color:#4CAE4C; 143 | } 144 | .i-arquivo, 145 | .fa-circle.c { 146 | color:#D9534F; 147 | } 148 | .i-diretorio, 149 | .fa-circle.b { 150 | color:#F0AD4E; 151 | } 152 | .i-cidade, 153 | .fa-circle.a { 154 | color:#BFBFBF; 155 | } 156 | .i-modulo, 157 | .fa-circle.a { 158 | color:#000000; 159 | } 160 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/HELP-US-OUT.txt: -------------------------------------------------------------------------------- 1 | I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project, 2 | Fonticons (https://fonticons.com). It makes it easy to put the perfect icons on your website. Choose from our awesome, 3 | comprehensive icon sets or copy and paste your own. 4 | 5 | Please. Check it out. 6 | 7 | -Dave Gandy 8 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserg-ufmg/JSCity/1d54dc991a768294be21b73ef8b0445b40f4fea5/css/font-awesome-4.4.0/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserg-ufmg/JSCity/1d54dc991a768294be21b73ef8b0445b40f4fea5/css/font-awesome-4.4.0/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserg-ufmg/JSCity/1d54dc991a768294be21b73ef8b0445b40f4fea5/css/font-awesome-4.4.0/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserg-ufmg/JSCity/1d54dc991a768294be21b73ef8b0445b40f4fea5/css/font-awesome-4.4.0/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserg-ufmg/JSCity/1d54dc991a768294be21b73ef8b0445b40f4fea5/css/font-awesome-4.4.0/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/less/animated.less: -------------------------------------------------------------------------------- 1 | // Animated Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .@{fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .@{fa-css-prefix}-pull-left { float: left; } 11 | .@{fa-css-prefix}-pull-right { float: right; } 12 | 13 | .@{fa-css-prefix} { 14 | &.@{fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.@{fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .@{fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.4.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "animated.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: (-@fa-li-width + (4em / 14)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | 14 | .fa-icon-rotate(@degrees, @rotation) { 15 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); 16 | -webkit-transform: rotate(@degrees); 17 | -ms-transform: rotate(@degrees); 18 | transform: rotate(@degrees); 19 | } 20 | 21 | .fa-icon-flip(@horiz, @vert, @rotation) { 22 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1); 23 | -webkit-transform: scale(@horiz, @vert); 24 | -ms-transform: scale(@horiz, @vert); 25 | transform: scale(@horiz, @vert); 26 | } 27 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); 7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), 8 | url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), 9 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), 10 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), 11 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .@{fa-css-prefix}-rotate-90, 15 | :root .@{fa-css-prefix}-rotate-180, 16 | :root .@{fa-css-prefix}-rotate-270, 17 | :root .@{fa-css-prefix}-flip-horizontal, 18 | :root .@{fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/scss/_animated.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .#{$fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .#{$fa-css-prefix}-pull-left { float: left; } 11 | .#{$fa-css-prefix}-pull-right { float: right; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.#{$fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.#{$fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .#{$fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/scss/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | 14 | @mixin fa-icon-rotate($degrees, $rotation) { 15 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 16 | -webkit-transform: rotate($degrees); 17 | -ms-transform: rotate($degrees); 18 | transform: rotate($degrees); 19 | } 20 | 21 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 22 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 23 | -webkit-transform: scale($horiz, $vert); 24 | -ms-transform: scale($horiz, $vert); 25 | transform: scale($horiz, $vert); 26 | } 27 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), 9 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 10 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 11 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .#{$fa-css-prefix}-rotate-90, 15 | :root .#{$fa-css-prefix}-rotate-180, 16 | :root .#{$fa-css-prefix}-rotate-270, 17 | :root .#{$fa-css-prefix}-flip-horizontal, 18 | :root .#{$fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /css/font-awesome-4.4.0/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.4.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "animated"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserg-ufmg/JSCity/1d54dc991a768294be21b73ef8b0445b40f4fea5/favicon.ico -------------------------------------------------------------------------------- /img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserg-ufmg/JSCity/1d54dc991a768294be21b73ef8b0445b40f4fea5/img/favicon.ico -------------------------------------------------------------------------------- /img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserg-ufmg/JSCity/1d54dc991a768294be21b73ef8b0445b40f4fea5/img/favicon.png -------------------------------------------------------------------------------- /img/rect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserg-ufmg/JSCity/1d54dc991a768294be21b73ef8b0445b40f4fea5/img/rect.png -------------------------------------------------------------------------------- /index.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | JS CITY - A Tool for 3D visualization for javascript systems 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 |

JSCITY

21 | 37 |
38 | 39 | Mouse: X=?, Y=? 40 | Ray: X=?, Y=?, Z=? 41 | Speed: ... 42 |
43 | Help 44 |
45 |

Help

46 |
47 | How to use

48 |

Use scroll up to zoom in

49 |

Use scroll down to zoom out

50 |

Use mouse left button to move around the screen

51 |

Use mouse right button to move sidewards

52 | 53 |

City Metaphor

54 | Program [City]
55 | Folder [District]
56 | File [Sub-District]
57 | AMD Module [Building]
58 | Named Function [Building]
59 | Anonymous Function [Building]

60 | 61 |
62 |
63 |
64 |
65 |
66 |
...
67 | 68 | 69 | -------------------------------------------------------------------------------- /js/backend/system/metafora/distrito-a/angular-1.js: -------------------------------------------------------------------------------- 1 | var myModule = angular.module('myModule', [], function () { 2 | function xxx(p) { 3 | var n = 9; 4 | return n * p; 5 | } 6 | }); 7 | -------------------------------------------------------------------------------- /js/backend/system/metafora/distrito-a/index.js: -------------------------------------------------------------------------------- 1 | /*/ 2 | Copyright (c) 1637, Blaise Pascal 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, 6 | are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 3. Neither the name of the copyright holder nor the names of its contributors 14 | may be used to endorse or promote products derived from this software without 15 | specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 21 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 23 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | POSSIBILITY OF SUCH DAMAGE. 27 | /*/ 28 | function C(x, y, z) { 29 | if(x>y) { 30 | for(var i=0; i<10; ++i) { 31 | if(z>i) { 32 | if(i>z) { 33 | z = x+y+i; 34 | } 35 | } 36 | } 37 | ; 38 | ; 39 | ; 40 | ; 41 | ; 42 | ; 43 | ; 44 | ; 45 | ; 46 | ; 47 | ; 48 | ; 49 | ; 50 | ; 51 | ; 52 | ; 53 | ; 54 | ; 55 | ; 56 | ; 57 | ; 58 | ; 59 | ; 60 | ; 61 | ; 62 | ; 63 | ; 64 | ; 65 | ; 66 | ; 67 | ; 68 | ; 69 | ; 70 | ; 71 | ; 72 | ; 73 | ; 74 | ; 75 | ; 76 | ; 77 | ; 78 | ; 79 | ; 80 | ; 81 | ; 82 | ; 83 | ; 84 | ; 85 | ; 86 | ; 87 | ; 88 | ; 89 | ; 90 | ; 91 | ; 92 | ; 93 | ; 94 | ; 95 | ; 96 | ; 97 | ; 98 | ; 99 | ; 100 | } 101 | return z; 102 | } 103 | 104 | function B(v1, v2) { 105 | if(v1 > v2) { 106 | function A(n, m) { 107 | return [m, n]; 108 | } 109 | var tmp = A(v1, v2); 110 | v1 = tmp[0]; 111 | v2 = tmp[1]; 112 | } 113 | return [v1, v2]; 114 | } 115 | 116 | if(C(1, 2, 3)>10) { 117 | console.log(B(1, 2)); 118 | } else { 119 | console.log(B(8, 9)); 120 | } 121 | -------------------------------------------------------------------------------- /js/backend/system/metafora/distrito-b/index-2.js: -------------------------------------------------------------------------------- 1 | /*/ 2 | Copyright (c) 1637, Blaise Pascal 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, 6 | are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 3. Neither the name of the copyright holder nor the names of its contributors 14 | may be used to endorse or promote products derived from this software without 15 | specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 21 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 23 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | POSSIBILITY OF SUCH DAMAGE. 27 | /*/ 28 | function C(x, y, z) { 29 | if(x>y) { 30 | for(var i=0; i<10; ++i) { 31 | if(z>i) { 32 | if(i>z) { 33 | z = x+y+i; 34 | } 35 | } 36 | } 37 | } 38 | return z; 39 | } 40 | 41 | function B(v1, v2) { 42 | if(v1 > v2) { 43 | function A(n, m) { 44 | return [m, n]; 45 | } 46 | var tmp = A(v1, v2); 47 | v1 = tmp[0]; 48 | v2 = tmp[1]; 49 | } 50 | return [v1, v2]; 51 | } 52 | 53 | if(C(1, 2, 3)>10) { 54 | console.log(B(1, 2)); 55 | } else { 56 | console.log(B(8, 9)); 57 | } 58 | 59 | D = function (x, y, z) { 60 | if(x>y) { 61 | for(var i=0; i<10; ++i) { 62 | if(z>i) { 63 | if(i>z) { 64 | z = x+y+i; 65 | } 66 | } 67 | } 68 | } 69 | return z; 70 | } 71 | 72 | E = function (v1, v2) { 73 | if(v1 > v2) { 74 | F = function (n, m) { 75 | return [m, n]; 76 | } 77 | var tmp = A(v1, v2); 78 | v1 = tmp[0]; 79 | v2 = tmp[1]; 80 | } 81 | return [v1, v2]; 82 | } 83 | 84 | 85 | -------------------------------------------------------------------------------- /js/backend/system/metafora/distrito-b/index.js: -------------------------------------------------------------------------------- 1 | define(["./cart", "./inventory"], function(cart, inventory) { 2 | //return an object to define the "my/shirt" module. 3 | 4 | function C(x, y, z) { 5 | if(x>y) { 6 | for(var i=0; i<10; ++i) { 7 | if(z>i) { 8 | if(i>z) { 9 | z = x+y+i; 10 | } 11 | } 12 | } 13 | } 14 | return z; 15 | } 16 | 17 | function B(v1, v2) { 18 | if(v1 > v2) { 19 | function A(n, m) { 20 | return [m, n]; 21 | } 22 | var tmp = A(v1, v2); 23 | v1 = tmp[0]; 24 | v2 = tmp[1]; 25 | } 26 | return [v1, v2]; 27 | } 28 | 29 | if(C(1, 2, 3)>10) { 30 | console.log(B(1, 2)); 31 | } else { 32 | console.log(B(8, 9)); 33 | } 34 | 35 | 36 | 37 | return { 38 | color: "blue", 39 | size: "large", 40 | addToCart: function() { 41 | inventory.decrement(this); 42 | cart.add(this); 43 | } 44 | } 45 | } 46 | ); 47 | 48 | 49 | -------------------------------------------------------------------------------- /js/backend/system/metafora/index.js: -------------------------------------------------------------------------------- 1 | /*/ 2 | Copyright (c) 1637, Blaise Pascal 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, 6 | are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 3. Neither the name of the copyright holder nor the names of its contributors 14 | may be used to endorse or promote products derived from this software without 15 | specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 21 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 23 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | POSSIBILITY OF SUCH DAMAGE. 27 | /*/ 28 | function A(n, m) { 29 | var a, 30 | b, 31 | c, 32 | d, 33 | e, 34 | f, 35 | g, 36 | h, 37 | i, 38 | j, 39 | k, 40 | l; 41 | var a, 42 | b, 43 | c, 44 | d, 45 | e, 46 | f, 47 | g, 48 | h, 49 | i, 50 | j, 51 | k, 52 | l; 53 | return [m, n]; 54 | } 55 | 56 | (function () { 57 | function C(x, y, z) { 58 | if(x>y) { 59 | for(var i=0; i<10; ++i) { 60 | if(z>i) { 61 | if(i>z) { 62 | z = x+y+i; 63 | } 64 | } 65 | } 66 | } 67 | return z; 68 | } 69 | 70 | function B(v1, v2) { 71 | if(v1 > v2) { 72 | var tmp = A(v1, v2); 73 | v1 = tmp[0]; 74 | v2 = tmp[1]; 75 | } 76 | return [v1, v2]; 77 | } 78 | 79 | if(C(1, 2, 3)>10) { 80 | console.log(B(1, 2)); 81 | } else { 82 | console.log(B(8, 9)); 83 | } 84 | })(); 85 | -------------------------------------------------------------------------------- /js/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "porta": 8888, 3 | "debug": false, 4 | "conexao": "local", 5 | "cache-local": false, 6 | "expires": { 7 | "padrao": 900, 8 | "application/json": 300, 9 | "text/css": 3600 10 | }, 11 | "conexoes": { 12 | "local": { 13 | "connectionLimit": 200, 14 | "waitForConnections": true, 15 | "host": "localhost", 16 | "user": "jscity", 17 | "password": "", 18 | "database": "jscity" 19 | }, 20 | "amazon": { 21 | "connectionLimit": 10000, 22 | "waitForConnections": true, 23 | "host": "localhost", 24 | "user": "jscity", 25 | "password": "", 26 | "database": "jscity" 27 | }, 28 | "azure": { 29 | "connectionLimit": 4, 30 | "waitForConnections": true, 31 | "host": "localhost", 32 | "user": "jscity", 33 | "password": "", 34 | "database": "jscity" 35 | } 36 | }, 37 | "paths": { 38 | "raiz_web": ".." 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /js/lib/controles.js: -------------------------------------------------------------------------------- 1 | Controls = new Class({ 2 | Implements: [Events], 3 | initialize: function (keyconf, elRef) { 4 | var self = this, cmd = {}, 5 | mouse = {x: 0, y: 0}, 6 | mouseRef = {x: 0, y: 0}; 7 | 8 | // TODO: garantir funcionamento em browsers+os que repetem envio de keydown/up 9 | if(!elRef) elRef = document; 10 | elRef.addEvents({ 11 | 'keydown': function (ev) { 12 | if(typeof(keyconf[ev.key])!='undefined') { 13 | cmd[keyconf[ev.key]] = true; 14 | self.fireEvent(keyconf[ev.key], [true]); 15 | } 16 | }, 17 | 'keyup': function (ev) { 18 | if(typeof(keyconf[ev.key])!='undefined') { 19 | cmd[keyconf[ev.key]] = false; 20 | self.fireEvent(keyconf[ev.key], [false]); 21 | } 22 | }, 23 | 'mousedown': function (ev) { 24 | if(typeof(keyconf['mouse'])!='undefined') { 25 | cmd[keyconf['mouse']] = true; 26 | self.fireEvent(keyconf['mouse'], [true]); 27 | } 28 | mouseRef = ev.client; 29 | }, 30 | 'mousemove': function (ev) { 31 | mouse = ev.client; 32 | }, 33 | 'mouseup': function (/*ev*/) { 34 | if(typeof(keyconf['mouse'])!='undefined') { 35 | cmd[keyconf['mouse']] = false; 36 | self.fireEvent(keyconf['mouse'], [false]); 37 | } 38 | } 39 | }); 40 | self.active = function (nome) { 41 | return !!cmd[nome]; 42 | }; 43 | self.mouse = function (nref) { 44 | if(nref) { 45 | mouseRef = nref; 46 | } 47 | return { 48 | 'pos': Object.clone(mouse), 49 | 'ref': Object.clone(mouseRef) 50 | }; 51 | }; 52 | self.ativos = function () { 53 | return Object.filter(cmd, function (v, n) { 54 | return v; 55 | }); 56 | }; 57 | self.setCmd = function (tecla, nome) { 58 | var valido = (typeof(tecla)=='string' && typeof(nome) == 'string'); 59 | if(valido) { 60 | keyconf[tecla] = nome; 61 | } 62 | return valido; 63 | }.overloadSetter(); 64 | } 65 | }); 66 | -------------------------------------------------------------------------------- /js/lib/raf-polyfill.js: -------------------------------------------------------------------------------- 1 | // utf-8 2 | // baseado no código de Paul Irish com pequenas modificações para otimizar minificação 3 | (function(window) { 4 | var lastTime = 0, x, pref, 5 | vendors = ['webkit', 'o', 'ms', 'moz']; 6 | for(x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { 7 | pref = vendors[x]; 8 | window.requestAnimationFrame = window[pref+'RequestAnimationFrame']; 9 | window.cancelAnimationFrame = 10 | window[pref+'CancelAnimationFrame'] || window[pref+'CancelRequestAnimationFrame']; 11 | } 12 | 13 | if(!window.requestAnimationFrame){ 14 | window.requestAnimationFrame = function(callback, element) { 15 | var currTime = new Date().getTime(), 16 | timeToCall = Math.max(0, 16 - (currTime - lastTime)), 17 | id = setTimeout(function() {callback(currTime + timeToCall);}, timeToCall); 18 | lastTime = currTime + timeToCall; 19 | return id; 20 | }; 21 | } 22 | 23 | if(!window.cancelAnimationFrame){ 24 | window.cancelAnimationFrame = function(id) { 25 | clearTimeout(id); 26 | }; 27 | } 28 | })(window); 29 | -------------------------------------------------------------------------------- /js/node_modules/.bin/mime: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=`dirname "$0"` 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../mime/cli.js" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../mime/cli.js" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /js/node_modules/.bin/mime.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\mime\cli.js" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\mime\cli.js" %* 7 | ) -------------------------------------------------------------------------------- /js/node_modules/mime/.npmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserg-ufmg/JSCity/1d54dc991a768294be21b73ef8b0445b40f4fea5/js/node_modules/mime/.npmignore -------------------------------------------------------------------------------- /js/node_modules/mime/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 Benjamin Thomas, Robert Kieffer 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /js/node_modules/mime/README.md: -------------------------------------------------------------------------------- 1 | # mime 2 | 3 | Comprehensive MIME type mapping API based on mime-db module. 4 | 5 | ## Install 6 | 7 | Install with [npm](http://github.com/isaacs/npm): 8 | 9 | npm install mime 10 | 11 | ## Contributing / Testing 12 | 13 | npm run test 14 | 15 | ## Command Line 16 | 17 | mime [path_string] 18 | 19 | E.g. 20 | 21 | > mime scripts/jquery.js 22 | application/javascript 23 | 24 | ## API - Queries 25 | 26 | ### mime.lookup(path) 27 | Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g. 28 | 29 | ```js 30 | var mime = require('mime'); 31 | 32 | mime.lookup('/path/to/file.txt'); // => 'text/plain' 33 | mime.lookup('file.txt'); // => 'text/plain' 34 | mime.lookup('.TXT'); // => 'text/plain' 35 | mime.lookup('htm'); // => 'text/html' 36 | ``` 37 | 38 | ### mime.default_type 39 | Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.) 40 | 41 | ### mime.extension(type) 42 | Get the default extension for `type` 43 | 44 | ```js 45 | mime.extension('text/html'); // => 'html' 46 | mime.extension('application/octet-stream'); // => 'bin' 47 | ``` 48 | 49 | ### mime.charsets.lookup() 50 | 51 | Map mime-type to charset 52 | 53 | ```js 54 | mime.charsets.lookup('text/plain'); // => 'UTF-8' 55 | ``` 56 | 57 | (The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.) 58 | 59 | ## API - Defining Custom Types 60 | 61 | Custom type mappings can be added on a per-project basis via the following APIs. 62 | 63 | ### mime.define() 64 | 65 | Add custom mime/extension mappings 66 | 67 | ```js 68 | mime.define({ 69 | 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'], 70 | 'application/x-my-type': ['x-mt', 'x-mtt'], 71 | // etc ... 72 | }); 73 | 74 | mime.lookup('x-sft'); // => 'text/x-some-format' 75 | ``` 76 | 77 | The first entry in the extensions array is returned by `mime.extension()`. E.g. 78 | 79 | ```js 80 | mime.extension('text/x-some-format'); // => 'x-sf' 81 | ``` 82 | 83 | ### mime.load(filepath) 84 | 85 | Load mappings from an Apache ".types" format file 86 | 87 | ```js 88 | mime.load('./my_project.types'); 89 | ``` 90 | The .types file format is simple - See the `types` dir for examples. 91 | -------------------------------------------------------------------------------- /js/node_modules/mime/build/build.js: -------------------------------------------------------------------------------- 1 | var db = require('mime-db'); 2 | 3 | var mapByType = {}; 4 | Object.keys(db).forEach(function(key) { 5 | var extensions = db[key].extensions; 6 | if (extensions) { 7 | mapByType[key] = extensions; 8 | } 9 | }); 10 | 11 | console.log(JSON.stringify(mapByType)); 12 | -------------------------------------------------------------------------------- /js/node_modules/mime/build/test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Usage: node test.js 3 | */ 4 | 5 | var mime = require('../mime'); 6 | var assert = require('assert'); 7 | var path = require('path'); 8 | 9 | // 10 | // Test mime lookups 11 | // 12 | 13 | assert.equal('text/plain', mime.lookup('text.txt')); // normal file 14 | assert.equal('text/plain', mime.lookup('TEXT.TXT')); // uppercase 15 | assert.equal('text/plain', mime.lookup('dir/text.txt')); // dir + file 16 | assert.equal('text/plain', mime.lookup('.text.txt')); // hidden file 17 | assert.equal('text/plain', mime.lookup('.txt')); // nameless 18 | assert.equal('text/plain', mime.lookup('txt')); // extension-only 19 | assert.equal('text/plain', mime.lookup('/txt')); // extension-less () 20 | assert.equal('text/plain', mime.lookup('\\txt')); // Windows, extension-less 21 | assert.equal('application/octet-stream', mime.lookup('text.nope')); // unrecognized 22 | assert.equal('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default 23 | 24 | // 25 | // Test extensions 26 | // 27 | 28 | assert.equal('txt', mime.extension(mime.types.text)); 29 | assert.equal('html', mime.extension(mime.types.htm)); 30 | assert.equal('bin', mime.extension('application/octet-stream')); 31 | assert.equal('bin', mime.extension('application/octet-stream ')); 32 | assert.equal('html', mime.extension(' text/html; charset=UTF-8')); 33 | assert.equal('html', mime.extension('text/html; charset=UTF-8 ')); 34 | assert.equal('html', mime.extension('text/html; charset=UTF-8')); 35 | assert.equal('html', mime.extension('text/html ; charset=UTF-8')); 36 | assert.equal('html', mime.extension('text/html;charset=UTF-8')); 37 | assert.equal('html', mime.extension('text/Html;charset=UTF-8')); 38 | assert.equal(undefined, mime.extension('unrecognized')); 39 | 40 | // 41 | // Test node.types lookups 42 | // 43 | 44 | assert.equal('application/font-woff', mime.lookup('file.woff')); 45 | assert.equal('application/octet-stream', mime.lookup('file.buffer')); 46 | assert.equal('audio/mp4', mime.lookup('file.m4a')); 47 | assert.equal('font/opentype', mime.lookup('file.otf')); 48 | 49 | // 50 | // Test charsets 51 | // 52 | 53 | assert.equal('UTF-8', mime.charsets.lookup('text/plain')); 54 | assert.equal(undefined, mime.charsets.lookup(mime.types.js)); 55 | assert.equal('fallback', mime.charsets.lookup('application/octet-stream', 'fallback')); 56 | 57 | console.log('\nAll tests passed'); 58 | -------------------------------------------------------------------------------- /js/node_modules/mime/cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var mime = require('./mime.js'); 4 | var file = process.argv[2]; 5 | var type = mime.lookup(file); 6 | 7 | process.stdout.write(type + '\n'); 8 | 9 | -------------------------------------------------------------------------------- /js/node_modules/mime/mime.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var fs = require('fs'); 3 | 4 | function Mime() { 5 | // Map of extension -> mime type 6 | this.types = Object.create(null); 7 | 8 | // Map of mime type -> extension 9 | this.extensions = Object.create(null); 10 | } 11 | 12 | /** 13 | * Define mimetype -> extension mappings. Each key is a mime-type that maps 14 | * to an array of extensions associated with the type. The first extension is 15 | * used as the default extension for the type. 16 | * 17 | * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); 18 | * 19 | * @param map (Object) type definitions 20 | */ 21 | Mime.prototype.define = function (map) { 22 | for (var type in map) { 23 | var exts = map[type]; 24 | for (var i = 0; i < exts.length; i++) { 25 | if (process.env.DEBUG_MIME && this.types[exts]) { 26 | console.warn(this._loading.replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' + 27 | this.types[exts] + ' to ' + type); 28 | } 29 | 30 | this.types[exts[i]] = type; 31 | } 32 | 33 | // Default extension is the first one we encounter 34 | if (!this.extensions[type]) { 35 | this.extensions[type] = exts[0]; 36 | } 37 | } 38 | }; 39 | 40 | /** 41 | * Load an Apache2-style ".types" file 42 | * 43 | * This may be called multiple times (it's expected). Where files declare 44 | * overlapping types/extensions, the last file wins. 45 | * 46 | * @param file (String) path of file to load. 47 | */ 48 | Mime.prototype.load = function(file) { 49 | this._loading = file; 50 | // Read file and split into lines 51 | var map = {}, 52 | content = fs.readFileSync(file, 'ascii'), 53 | lines = content.split(/[\r\n]+/); 54 | 55 | lines.forEach(function(line) { 56 | // Clean up whitespace/comments, and split into fields 57 | var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/); 58 | map[fields.shift()] = fields; 59 | }); 60 | 61 | this.define(map); 62 | 63 | this._loading = null; 64 | }; 65 | 66 | /** 67 | * Lookup a mime type based on extension 68 | */ 69 | Mime.prototype.lookup = function(path, fallback) { 70 | var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase(); 71 | 72 | return this.types[ext] || fallback || this.default_type; 73 | }; 74 | 75 | /** 76 | * Return file extension associated with a mime type 77 | */ 78 | Mime.prototype.extension = function(mimeType) { 79 | var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase(); 80 | return this.extensions[type]; 81 | }; 82 | 83 | // Default instance 84 | var mime = new Mime(); 85 | 86 | // Define built-in types 87 | mime.define(require('./types.json')); 88 | 89 | // Default type 90 | mime.default_type = mime.lookup('bin'); 91 | 92 | // 93 | // Additional API specific to the default instance 94 | // 95 | 96 | mime.Mime = Mime; 97 | 98 | /** 99 | * Lookup a charset based on mime type. 100 | */ 101 | mime.charsets = { 102 | lookup: function(mimeType, fallback) { 103 | // Assume text types are utf8 104 | return (/^text\//).test(mimeType) ? 'UTF-8' : fallback; 105 | } 106 | }; 107 | 108 | module.exports = mime; 109 | -------------------------------------------------------------------------------- /js/node_modules/mime/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "name": "Robert Kieffer", 4 | "email": "robert@broofa.com", 5 | "url": "http://github.com/broofa" 6 | }, 7 | "scripts": { 8 | "prepublish": "node build/build.js > types.json", 9 | "test": "node build/test.js" 10 | }, 11 | "bin": { 12 | "mime": "cli.js" 13 | }, 14 | "contributors": [ 15 | { 16 | "name": "Benjamin Thomas", 17 | "email": "benjamin@benjaminthomas.org", 18 | "url": "http://github.com/bentomas" 19 | } 20 | ], 21 | "description": "A comprehensive library for mime-type mapping", 22 | "licenses": [ 23 | { 24 | "type": "MIT", 25 | "url": "https://raw.github.com/broofa/node-mime/master/LICENSE" 26 | } 27 | ], 28 | "dependencies": {}, 29 | "devDependencies": { 30 | "mime-db": "^1.2.0" 31 | }, 32 | "keywords": [ 33 | "util", 34 | "mime" 35 | ], 36 | "main": "mime.js", 37 | "name": "mime", 38 | "repository": { 39 | "url": "https://github.com/broofa/node-mime", 40 | "type": "git" 41 | }, 42 | "version": "1.3.4", 43 | "gitHead": "1628f6e0187095009dcef4805c3a49706f137974", 44 | "bugs": { 45 | "url": "https://github.com/broofa/node-mime/issues" 46 | }, 47 | "homepage": "https://github.com/broofa/node-mime", 48 | "_id": "mime@1.3.4", 49 | "_shasum": "115f9e3b6b3daf2959983cb38f149a2d40eb5d53", 50 | "_from": "mime@*", 51 | "_npmVersion": "1.4.28", 52 | "_npmUser": { 53 | "name": "broofa", 54 | "email": "robert@broofa.com" 55 | }, 56 | "maintainers": [ 57 | { 58 | "name": "broofa", 59 | "email": "robert@broofa.com" 60 | }, 61 | { 62 | "name": "bentomas", 63 | "email": "benjamin@benjaminthomas.org" 64 | } 65 | ], 66 | "dist": { 67 | "shasum": "115f9e3b6b3daf2959983cb38f149a2d40eb5d53", 68 | "tarball": "http://registry.npmjs.org/mime/-/mime-1.3.4.tgz" 69 | }, 70 | "directories": {}, 71 | "_resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz" 72 | } 73 | -------------------------------------------------------------------------------- /js/node_modules/minimatch/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /js/node_modules/minimatch/node_modules/brace-expansion/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | .gitignore 3 | .travis.yml 4 | -------------------------------------------------------------------------------- /js/node_modules/minimatch/node_modules/brace-expansion/example.js: -------------------------------------------------------------------------------- 1 | var expand = require('./'); 2 | 3 | console.log(expand('http://any.org/archive{1996..1999}/vol{1..4}/part{a,b,c}.html')); 4 | console.log(expand('http://www.numericals.com/file{1..100..10}.txt')); 5 | console.log(expand('http://www.letters.com/file{a..z..2}.txt')); 6 | console.log(expand('mkdir /usr/local/src/bash/{old,new,dist,bugs}')); 7 | console.log(expand('chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}')); 8 | 9 | -------------------------------------------------------------------------------- /js/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /js/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | -------------------------------------------------------------------------------- /js/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @node_modules/.bin/tape test/*.js 4 | 5 | .PHONY: test 6 | 7 | -------------------------------------------------------------------------------- /js/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md: -------------------------------------------------------------------------------- 1 | # balanced-match 2 | 3 | Match balanced string pairs, like `{` and `}` or `` and ``. 4 | 5 | [![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) 6 | [![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) 7 | 8 | [![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) 9 | 10 | ## Example 11 | 12 | Get the first matching pair of braces: 13 | 14 | ```js 15 | var balanced = require('balanced-match'); 16 | 17 | console.log(balanced('{', '}', 'pre{in{nested}}post')); 18 | console.log(balanced('{', '}', 'pre{first}between{second}post')); 19 | ``` 20 | 21 | The matches are: 22 | 23 | ```bash 24 | $ node example.js 25 | { start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } 26 | { start: 3, 27 | end: 9, 28 | pre: 'pre', 29 | body: 'first', 30 | post: 'between{second}post' } 31 | ``` 32 | 33 | ## API 34 | 35 | ### var m = balanced(a, b, str) 36 | 37 | For the first non-nested matching pair of `a` and `b` in `str`, return an 38 | object with those keys: 39 | 40 | * **start** the index of the first match of `a` 41 | * **end** the index of the matching `b` 42 | * **pre** the preamble, `a` and `b` not included 43 | * **body** the match, `a` and `b` not included 44 | * **post** the postscript, `a` and `b` not included 45 | 46 | If there's no match, `undefined` will be returned. 47 | 48 | If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']`. 49 | 50 | ## Installation 51 | 52 | With [npm](https://npmjs.org) do: 53 | 54 | ```bash 55 | npm install balanced-match 56 | ``` 57 | 58 | ## License 59 | 60 | (MIT) 61 | 62 | Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> 63 | 64 | Permission is hereby granted, free of charge, to any person obtaining a copy of 65 | this software and associated documentation files (the "Software"), to deal in 66 | the Software without restriction, including without limitation the rights to 67 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 68 | of the Software, and to permit persons to whom the Software is furnished to do 69 | so, subject to the following conditions: 70 | 71 | The above copyright notice and this permission notice shall be included in all 72 | copies or substantial portions of the Software. 73 | 74 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 75 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 76 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 77 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 78 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 79 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 80 | SOFTWARE. 81 | -------------------------------------------------------------------------------- /js/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js: -------------------------------------------------------------------------------- 1 | var balanced = require('./'); 2 | 3 | console.log(balanced('{', '}', 'pre{in{nested}}post')); 4 | console.log(balanced('{', '}', 'pre{first}between{second}post')); 5 | 6 | -------------------------------------------------------------------------------- /js/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js: -------------------------------------------------------------------------------- 1 | module.exports = balanced; 2 | function balanced(a, b, str) { 3 | var bal = 0; 4 | var m = {}; 5 | var ended = false; 6 | 7 | for (var i = 0; i < str.length; i++) { 8 | if (a == str.substr(i, a.length)) { 9 | if (!('start' in m)) m.start = i; 10 | bal++; 11 | } 12 | else if (b == str.substr(i, b.length) && 'start' in m) { 13 | ended = true; 14 | bal--; 15 | if (!bal) { 16 | m.end = i; 17 | m.pre = str.substr(0, m.start); 18 | m.body = (m.end - m.start > 1) 19 | ? str.substring(m.start + a.length, m.end) 20 | : ''; 21 | m.post = str.slice(m.end + b.length); 22 | return m; 23 | } 24 | } 25 | } 26 | 27 | // if we opened more than we closed, find the one we closed 28 | if (bal && ended) { 29 | var start = m.start + a.length; 30 | m = balanced(a, b, str.substr(start)); 31 | if (m) { 32 | m.start += start; 33 | m.end += start; 34 | m.pre = str.slice(0, start) + m.pre; 35 | } 36 | return m; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /js/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "balanced-match", 3 | "description": "Match balanced character pairs, like \"{\" and \"}\"", 4 | "version": "0.2.0", 5 | "repository": { 6 | "type": "git", 7 | "url": "git://github.com/juliangruber/balanced-match.git" 8 | }, 9 | "homepage": "https://github.com/juliangruber/balanced-match", 10 | "main": "index.js", 11 | "scripts": { 12 | "test": "make test" 13 | }, 14 | "dependencies": {}, 15 | "devDependencies": { 16 | "tape": "~1.1.1" 17 | }, 18 | "keywords": [ 19 | "match", 20 | "regexp", 21 | "test", 22 | "balanced", 23 | "parse" 24 | ], 25 | "author": { 26 | "name": "Julian Gruber", 27 | "email": "mail@juliangruber.com", 28 | "url": "http://juliangruber.com" 29 | }, 30 | "license": "MIT", 31 | "testling": { 32 | "files": "test/*.js", 33 | "browsers": [ 34 | "ie/8..latest", 35 | "firefox/20..latest", 36 | "firefox/nightly", 37 | "chrome/25..latest", 38 | "chrome/canary", 39 | "opera/12..latest", 40 | "opera/next", 41 | "safari/5.1..latest", 42 | "ipad/6.0..latest", 43 | "iphone/6.0..latest", 44 | "android-browser/4.2..latest" 45 | ] 46 | }, 47 | "gitHead": "ba40ed78e7114a4a67c51da768a100184dead39c", 48 | "bugs": { 49 | "url": "https://github.com/juliangruber/balanced-match/issues" 50 | }, 51 | "_id": "balanced-match@0.2.0", 52 | "_shasum": "38f6730c03aab6d5edbb52bd934885e756d71674", 53 | "_from": "balanced-match@>=0.2.0 <0.3.0", 54 | "_npmVersion": "2.1.8", 55 | "_nodeVersion": "0.10.32", 56 | "_npmUser": { 57 | "name": "juliangruber", 58 | "email": "julian@juliangruber.com" 59 | }, 60 | "maintainers": [ 61 | { 62 | "name": "juliangruber", 63 | "email": "julian@juliangruber.com" 64 | } 65 | ], 66 | "dist": { 67 | "shasum": "38f6730c03aab6d5edbb52bd934885e756d71674", 68 | "tarball": "http://registry.npmjs.org/balanced-match/-/balanced-match-0.2.0.tgz" 69 | }, 70 | "directories": {}, 71 | "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.0.tgz", 72 | "readme": "ERROR: No README data found!" 73 | } 74 | -------------------------------------------------------------------------------- /js/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var balanced = require('..'); 3 | 4 | test('balanced', function(t) { 5 | t.deepEqual(balanced('{', '}', 'pre{in{nest}}post'), { 6 | start: 3, 7 | end: 12, 8 | pre: 'pre', 9 | body: 'in{nest}', 10 | post: 'post' 11 | }); 12 | t.deepEqual(balanced('{', '}', '{{{{{{{{{in}post'), { 13 | start: 8, 14 | end: 11, 15 | pre: '{{{{{{{{', 16 | body: 'in', 17 | post: 'post' 18 | }); 19 | t.deepEqual(balanced('{', '}', 'pre{body{in}post'), { 20 | start: 8, 21 | end: 11, 22 | pre: 'pre{body', 23 | body: 'in', 24 | post: 'post' 25 | }); 26 | t.deepEqual(balanced('{', '}', 'pre}{in{nest}}post'), { 27 | start: 4, 28 | end: 13, 29 | pre: 'pre}', 30 | body: 'in{nest}', 31 | post: 'post' 32 | }); 33 | t.deepEqual(balanced('{', '}', 'pre{body}between{body2}post'), { 34 | start: 3, 35 | end: 8, 36 | pre: 'pre', 37 | body: 'body', 38 | post: 'between{body2}post' 39 | }); 40 | t.notOk(balanced('{', '}', 'nope'), 'should be notOk'); 41 | t.deepEqual(balanced('', '', 'preinnestpost'), { 42 | start: 3, 43 | end: 19, 44 | pre: 'pre', 45 | body: 'innest', 46 | post: 'post' 47 | }); 48 | t.deepEqual(balanced('', '', 'preinnestpost'), { 49 | start: 7, 50 | end: 23, 51 | pre: 'pre', 52 | body: 'innest', 53 | post: 'post' 54 | }); 55 | t.end(); 56 | }); 57 | -------------------------------------------------------------------------------- /js/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.4 4 | - 0.6 5 | -------------------------------------------------------------------------------- /js/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE: -------------------------------------------------------------------------------- 1 | This software is released under the MIT license: 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /js/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown: -------------------------------------------------------------------------------- 1 | concat-map 2 | ========== 3 | 4 | Concatenative mapdashery. 5 | 6 | [![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) 7 | 8 | [![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) 9 | 10 | example 11 | ======= 12 | 13 | ``` js 14 | var concatMap = require('concat-map'); 15 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 16 | var ys = concatMap(xs, function (x) { 17 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 18 | }); 19 | console.dir(ys); 20 | ``` 21 | 22 | *** 23 | 24 | ``` 25 | [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] 26 | ``` 27 | 28 | methods 29 | ======= 30 | 31 | ``` js 32 | var concatMap = require('concat-map') 33 | ``` 34 | 35 | concatMap(xs, fn) 36 | ----------------- 37 | 38 | Return an array of concatenated elements by calling `fn(x, i)` for each element 39 | `x` and each index `i` in the array `xs`. 40 | 41 | When `fn(x, i)` returns an array, its result will be concatenated with the 42 | result array. If `fn(x, i)` returns anything else, that value will be pushed 43 | onto the end of the result array. 44 | 45 | install 46 | ======= 47 | 48 | With [npm](http://npmjs.org) do: 49 | 50 | ``` 51 | npm install concat-map 52 | ``` 53 | 54 | license 55 | ======= 56 | 57 | MIT 58 | 59 | notes 60 | ===== 61 | 62 | This module was written while sitting high above the ground in a tree. 63 | -------------------------------------------------------------------------------- /js/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js: -------------------------------------------------------------------------------- 1 | var concatMap = require('../'); 2 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 3 | var ys = concatMap(xs, function (x) { 4 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 5 | }); 6 | console.dir(ys); 7 | -------------------------------------------------------------------------------- /js/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js: -------------------------------------------------------------------------------- 1 | module.exports = function (xs, fn) { 2 | var res = []; 3 | for (var i = 0; i < xs.length; i++) { 4 | var x = fn(xs[i], i); 5 | if (isArray(x)) res.push.apply(res, x); 6 | else res.push(x); 7 | } 8 | return res; 9 | }; 10 | 11 | var isArray = Array.isArray || function (xs) { 12 | return Object.prototype.toString.call(xs) === '[object Array]'; 13 | }; 14 | -------------------------------------------------------------------------------- /js/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "concat-map", 3 | "description": "concatenative mapdashery", 4 | "version": "0.0.1", 5 | "repository": { 6 | "type": "git", 7 | "url": "git://github.com/substack/node-concat-map.git" 8 | }, 9 | "main": "index.js", 10 | "keywords": [ 11 | "concat", 12 | "concatMap", 13 | "map", 14 | "functional", 15 | "higher-order" 16 | ], 17 | "directories": { 18 | "example": "example", 19 | "test": "test" 20 | }, 21 | "scripts": { 22 | "test": "tape test/*.js" 23 | }, 24 | "devDependencies": { 25 | "tape": "~2.4.0" 26 | }, 27 | "license": "MIT", 28 | "author": { 29 | "name": "James Halliday", 30 | "email": "mail@substack.net", 31 | "url": "http://substack.net" 32 | }, 33 | "testling": { 34 | "files": "test/*.js", 35 | "browsers": { 36 | "ie": [ 37 | 6, 38 | 7, 39 | 8, 40 | 9 41 | ], 42 | "ff": [ 43 | 3.5, 44 | 10, 45 | 15 46 | ], 47 | "chrome": [ 48 | 10, 49 | 22 50 | ], 51 | "safari": [ 52 | 5.1 53 | ], 54 | "opera": [ 55 | 12 56 | ] 57 | } 58 | }, 59 | "bugs": { 60 | "url": "https://github.com/substack/node-concat-map/issues" 61 | }, 62 | "homepage": "https://github.com/substack/node-concat-map", 63 | "_id": "concat-map@0.0.1", 64 | "dist": { 65 | "shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", 66 | "tarball": "http://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" 67 | }, 68 | "_from": "concat-map@0.0.1", 69 | "_npmVersion": "1.3.21", 70 | "_npmUser": { 71 | "name": "substack", 72 | "email": "mail@substack.net" 73 | }, 74 | "maintainers": [ 75 | { 76 | "name": "substack", 77 | "email": "mail@substack.net" 78 | } 79 | ], 80 | "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", 81 | "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 82 | "readme": "ERROR: No README data found!" 83 | } 84 | -------------------------------------------------------------------------------- /js/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js: -------------------------------------------------------------------------------- 1 | var concatMap = require('../'); 2 | var test = require('tape'); 3 | 4 | test('empty or not', function (t) { 5 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 6 | var ixes = []; 7 | var ys = concatMap(xs, function (x, ix) { 8 | ixes.push(ix); 9 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 10 | }); 11 | t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); 12 | t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); 13 | t.end(); 14 | }); 15 | 16 | test('always something', function (t) { 17 | var xs = [ 'a', 'b', 'c', 'd' ]; 18 | var ys = concatMap(xs, function (x) { 19 | return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; 20 | }); 21 | t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); 22 | t.end(); 23 | }); 24 | 25 | test('scalars', function (t) { 26 | var xs = [ 'a', 'b', 'c', 'd' ]; 27 | var ys = concatMap(xs, function (x) { 28 | return x === 'b' ? [ 'B', 'B', 'B' ] : x; 29 | }); 30 | t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); 31 | t.end(); 32 | }); 33 | 34 | test('undefs', function (t) { 35 | var xs = [ 'a', 'b', 'c', 'd' ]; 36 | var ys = concatMap(xs, function () {}); 37 | t.same(ys, [ undefined, undefined, undefined, undefined ]); 38 | t.end(); 39 | }); 40 | -------------------------------------------------------------------------------- /js/node_modules/minimatch/node_modules/brace-expansion/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "brace-expansion", 3 | "description": "Brace expansion as known from sh/bash", 4 | "version": "1.1.1", 5 | "repository": { 6 | "type": "git", 7 | "url": "git://github.com/juliangruber/brace-expansion.git" 8 | }, 9 | "homepage": "https://github.com/juliangruber/brace-expansion", 10 | "main": "index.js", 11 | "scripts": { 12 | "test": "tape test/*.js", 13 | "gentest": "bash test/generate.sh" 14 | }, 15 | "dependencies": { 16 | "balanced-match": "^0.2.0", 17 | "concat-map": "0.0.1" 18 | }, 19 | "devDependencies": { 20 | "tape": "^3.0.3" 21 | }, 22 | "keywords": [], 23 | "author": { 24 | "name": "Julian Gruber", 25 | "email": "mail@juliangruber.com", 26 | "url": "http://juliangruber.com" 27 | }, 28 | "license": "MIT", 29 | "testling": { 30 | "files": "test/*.js", 31 | "browsers": [ 32 | "ie/8..latest", 33 | "firefox/20..latest", 34 | "firefox/nightly", 35 | "chrome/25..latest", 36 | "chrome/canary", 37 | "opera/12..latest", 38 | "opera/next", 39 | "safari/5.1..latest", 40 | "ipad/6.0..latest", 41 | "iphone/6.0..latest", 42 | "android-browser/4.2..latest" 43 | ] 44 | }, 45 | "gitHead": "f50da498166d76ea570cf3b30179f01f0f119612", 46 | "bugs": { 47 | "url": "https://github.com/juliangruber/brace-expansion/issues" 48 | }, 49 | "_id": "brace-expansion@1.1.1", 50 | "_shasum": "da5fb78aef4c44c9e4acf525064fb3208ebab045", 51 | "_from": "brace-expansion@>=1.0.0 <2.0.0", 52 | "_npmVersion": "2.6.1", 53 | "_nodeVersion": "0.10.36", 54 | "_npmUser": { 55 | "name": "juliangruber", 56 | "email": "julian@juliangruber.com" 57 | }, 58 | "maintainers": [ 59 | { 60 | "name": "juliangruber", 61 | "email": "julian@juliangruber.com" 62 | }, 63 | { 64 | "name": "isaacs", 65 | "email": "isaacs@npmjs.com" 66 | } 67 | ], 68 | "dist": { 69 | "shasum": "da5fb78aef4c44c9e4acf525064fb3208ebab045", 70 | "tarball": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.1.tgz" 71 | }, 72 | "directories": {}, 73 | "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.1.tgz", 74 | "readme": "ERROR: No README data found!" 75 | } 76 | -------------------------------------------------------------------------------- /js/node_modules/minimatch/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "name": "Isaac Z. Schlueter", 4 | "email": "i@izs.me", 5 | "url": "http://blog.izs.me" 6 | }, 7 | "name": "minimatch", 8 | "description": "a glob matcher in javascript", 9 | "version": "3.0.0", 10 | "repository": { 11 | "type": "git", 12 | "url": "git://github.com/isaacs/minimatch.git" 13 | }, 14 | "main": "minimatch.js", 15 | "scripts": { 16 | "posttest": "standard minimatch.js test/*.js", 17 | "test": "tap test/*.js" 18 | }, 19 | "engines": { 20 | "node": "*" 21 | }, 22 | "dependencies": { 23 | "brace-expansion": "^1.0.0" 24 | }, 25 | "devDependencies": { 26 | "standard": "^3.7.2", 27 | "tap": "^1.2.0" 28 | }, 29 | "license": "ISC", 30 | "files": [ 31 | "minimatch.js" 32 | ], 33 | "gitHead": "270dbea567f0af6918cb18103e98c612aa717a20", 34 | "bugs": { 35 | "url": "https://github.com/isaacs/minimatch/issues" 36 | }, 37 | "homepage": "https://github.com/isaacs/minimatch#readme", 38 | "_id": "minimatch@3.0.0", 39 | "_shasum": "5236157a51e4f004c177fb3c527ff7dd78f0ef83", 40 | "_from": "minimatch@*", 41 | "_npmVersion": "3.3.2", 42 | "_nodeVersion": "4.0.0", 43 | "_npmUser": { 44 | "name": "isaacs", 45 | "email": "isaacs@npmjs.com" 46 | }, 47 | "dist": { 48 | "shasum": "5236157a51e4f004c177fb3c527ff7dd78f0ef83", 49 | "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz" 50 | }, 51 | "maintainers": [ 52 | { 53 | "name": "isaacs", 54 | "email": "i@izs.me" 55 | } 56 | ], 57 | "directories": {}, 58 | "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz", 59 | "readme": "ERROR: No README data found!" 60 | } 61 | -------------------------------------------------------------------------------- /js/node_modules/mysql/License: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /js/node_modules/mysql/index.js: -------------------------------------------------------------------------------- 1 | var Connection = require('./lib/Connection'); 2 | var ConnectionConfig = require('./lib/ConnectionConfig'); 3 | var Types = require('./lib/protocol/constants/types'); 4 | var SqlString = require('./lib/protocol/SqlString'); 5 | var Pool = require('./lib/Pool'); 6 | var PoolConfig = require('./lib/PoolConfig'); 7 | var PoolCluster = require('./lib/PoolCluster'); 8 | 9 | exports.createConnection = function(config) { 10 | return new Connection({config: new ConnectionConfig(config)}); 11 | }; 12 | 13 | exports.createPool = function(config) { 14 | return new Pool({config: new PoolConfig(config)}); 15 | }; 16 | 17 | exports.createPoolCluster = function(config) { 18 | return new PoolCluster(config); 19 | }; 20 | 21 | exports.createQuery = Connection.createQuery; 22 | 23 | exports.Types = Types; 24 | exports.escape = SqlString.escape; 25 | exports.escapeId = SqlString.escapeId; 26 | exports.format = SqlString.format; 27 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/PoolConfig.js: -------------------------------------------------------------------------------- 1 | 2 | var ConnectionConfig = require('./ConnectionConfig'); 3 | 4 | module.exports = PoolConfig; 5 | function PoolConfig(options) { 6 | if (typeof options === 'string') { 7 | options = ConnectionConfig.parseUrl(options); 8 | } 9 | 10 | this.acquireTimeout = (options.acquireTimeout === undefined) 11 | ? 10 * 1000 12 | : Number(options.acquireTimeout); 13 | this.connectionConfig = new ConnectionConfig(options); 14 | this.waitForConnections = (options.waitForConnections === undefined) 15 | ? true 16 | : Boolean(options.waitForConnections); 17 | this.connectionLimit = (options.connectionLimit === undefined) 18 | ? 10 19 | : Number(options.connectionLimit); 20 | this.queueLimit = (options.queueLimit === undefined) 21 | ? 0 22 | : Number(options.queueLimit); 23 | } 24 | 25 | PoolConfig.prototype.newConnectionConfig = function newConnectionConfig() { 26 | var connectionConfig = new ConnectionConfig(this.connectionConfig); 27 | 28 | connectionConfig.clientFlags = this.connectionConfig.clientFlags; 29 | connectionConfig.maxPacketSize = this.connectionConfig.maxPacketSize; 30 | 31 | return connectionConfig; 32 | }; 33 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/PoolConnection.js: -------------------------------------------------------------------------------- 1 | var inherits = require('util').inherits; 2 | var Connection = require('./Connection') 3 | var __changeUser = Connection.prototype.changeUser; 4 | 5 | module.exports = PoolConnection; 6 | inherits(PoolConnection, Connection); 7 | 8 | function PoolConnection(pool, options) { 9 | Connection.call(this, options); 10 | this._pool = pool; 11 | this._purge = false 12 | 13 | // When a fatal error occurs the connection's protocol ends, which will cause 14 | // the connection to end as well, thus we only need to watch for the end event 15 | // and we will be notified of disconnects. 16 | this.on('end', this._removeFromPool); 17 | this.on('error', this._removeFromPool); 18 | } 19 | 20 | PoolConnection.prototype.changeUser = function changeUser(options, callback) { 21 | this._purge = true; 22 | 23 | return __changeUser.apply(this, arguments); 24 | }; 25 | 26 | PoolConnection.prototype.release = function release() { 27 | var pool = this._pool; 28 | 29 | if (!pool || pool._closed) { 30 | return; 31 | } 32 | 33 | return pool.releaseConnection(this); 34 | }; 35 | 36 | // TODO: Remove this when we are removing PoolConnection#end 37 | PoolConnection.prototype._realEnd = Connection.prototype.end; 38 | 39 | PoolConnection.prototype.end = function () { 40 | console.warn( 'Calling conn.end() to release a pooled connection is ' 41 | + 'deprecated. In next version calling conn.end() will be ' 42 | + 'restored to default conn.end() behavior. Use ' 43 | + 'conn.release() instead.' 44 | ); 45 | this.release(); 46 | }; 47 | 48 | PoolConnection.prototype.destroy = function () { 49 | this._removeFromPool(this); 50 | return Connection.prototype.destroy.apply(this, arguments); 51 | }; 52 | 53 | PoolConnection.prototype._removeFromPool = function(connection) { 54 | if (!this._pool || this._pool._closed) { 55 | return; 56 | } 57 | 58 | var pool = this._pool; 59 | this._pool = null; 60 | 61 | pool._removeConnection(this); 62 | }; 63 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/PoolNamespace.js: -------------------------------------------------------------------------------- 1 | var PoolSelector = require('./PoolSelector'); 2 | 3 | module.exports = PoolNamespace; 4 | 5 | /** 6 | * PoolNamespace 7 | */ 8 | function PoolNamespace(cluster, pattern, selector) { 9 | this._cluster = cluster; 10 | this._pattern = pattern; 11 | this._selector = new PoolSelector[selector](); 12 | } 13 | 14 | PoolNamespace.prototype.getConnection = function(cb) { 15 | var clusterNode = this._getClusterNode(); 16 | var cluster = this._cluster; 17 | var namespace = this; 18 | 19 | if (clusterNode === null) { 20 | var err = null; 21 | 22 | if (this._cluster._findNodeIds(this._pattern, true).length !== 0) { 23 | err = new Error('Pool does not have online node.'); 24 | err.code = 'POOL_NONEONLINE'; 25 | } else { 26 | err = new Error('Pool does not exist.'); 27 | err.code = 'POOL_NOEXIST'; 28 | } 29 | 30 | return cb(err); 31 | } 32 | 33 | cluster._getConnection(clusterNode, function(err, connection) { 34 | var retry = err && cluster._canRetry 35 | && cluster._findNodeIds(namespace._pattern).length !== 0; 36 | 37 | if (retry) { 38 | return namespace.getConnection(cb); 39 | } 40 | 41 | if (err) { 42 | return cb(err); 43 | } 44 | 45 | cb(null, connection); 46 | }); 47 | }; 48 | 49 | PoolNamespace.prototype._getClusterNode = function _getClusterNode() { 50 | var foundNodeIds = this._cluster._findNodeIds(this._pattern); 51 | var nodeId; 52 | 53 | switch (foundNodeIds.length) { 54 | case 0: 55 | nodeId = null; 56 | break; 57 | case 1: 58 | nodeId = foundNodeIds[0]; 59 | break; 60 | default: 61 | nodeId = this._selector(foundNodeIds); 62 | break; 63 | } 64 | 65 | return nodeId !== null 66 | ? this._cluster._getNode(nodeId) 67 | : null; 68 | }; 69 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/PoolSelector.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * PoolSelector 4 | */ 5 | var PoolSelector = module.exports = {}; 6 | 7 | PoolSelector.RR = function PoolSelectorRoundRobin() { 8 | var index = 0; 9 | 10 | return function(clusterIds) { 11 | if (index >= clusterIds.length) { 12 | index = 0; 13 | } 14 | 15 | var clusterId = clusterIds[index++]; 16 | 17 | return clusterId; 18 | }; 19 | }; 20 | 21 | PoolSelector.RANDOM = function PoolSelectorRandom() { 22 | return function(clusterIds) { 23 | return clusterIds[Math.floor(Math.random() * clusterIds.length)]; 24 | }; 25 | }; 26 | 27 | PoolSelector.ORDER = function PoolSelectorOrder() { 28 | return function(clusterIds) { 29 | return clusterIds[0]; 30 | }; 31 | }; 32 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/PacketHeader.js: -------------------------------------------------------------------------------- 1 | module.exports = PacketHeader; 2 | function PacketHeader(length, number) { 3 | this.length = length; 4 | this.number = number; 5 | } 6 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/ResultSet.js: -------------------------------------------------------------------------------- 1 | module.exports = ResultSet; 2 | function ResultSet(resultSetHeaderPacket) { 3 | this.resultSetHeaderPacket = resultSetHeaderPacket; 4 | this.fieldPackets = []; 5 | this.eofPackets = []; 6 | this.rows = []; 7 | } 8 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/constants/client.js: -------------------------------------------------------------------------------- 1 | // Manually extracted from mysql-5.5.23/include/mysql_com.h 2 | exports.CLIENT_LONG_PASSWORD = 1; /* new more secure passwords */ 3 | exports.CLIENT_FOUND_ROWS = 2; /* Found instead of affected rows */ 4 | exports.CLIENT_LONG_FLAG = 4; /* Get all column flags */ 5 | exports.CLIENT_CONNECT_WITH_DB = 8; /* One can specify db on connect */ 6 | exports.CLIENT_NO_SCHEMA = 16; /* Don't allow database.table.column */ 7 | exports.CLIENT_COMPRESS = 32; /* Can use compression protocol */ 8 | exports.CLIENT_ODBC = 64; /* Odbc client */ 9 | exports.CLIENT_LOCAL_FILES = 128; /* Can use LOAD DATA LOCAL */ 10 | exports.CLIENT_IGNORE_SPACE = 256; /* Ignore spaces before '(' */ 11 | exports.CLIENT_PROTOCOL_41 = 512; /* New 4.1 protocol */ 12 | exports.CLIENT_INTERACTIVE = 1024; /* This is an interactive client */ 13 | exports.CLIENT_SSL = 2048; /* Switch to SSL after handshake */ 14 | exports.CLIENT_IGNORE_SIGPIPE = 4096; /* IGNORE sigpipes */ 15 | exports.CLIENT_TRANSACTIONS = 8192; /* Client knows about transactions */ 16 | exports.CLIENT_RESERVED = 16384; /* Old flag for 4.1 protocol */ 17 | exports.CLIENT_SECURE_CONNECTION = 32768; /* New 4.1 authentication */ 18 | 19 | exports.CLIENT_MULTI_STATEMENTS = 65536; /* Enable/disable multi-stmt support */ 20 | exports.CLIENT_MULTI_RESULTS = 131072; /* Enable/disable multi-results */ 21 | exports.CLIENT_PS_MULTI_RESULTS = 262144; /* Multi-results in PS-protocol */ 22 | 23 | exports.CLIENT_PLUGIN_AUTH = 524288; /* Client supports plugin authentication */ 24 | 25 | exports.CLIENT_SSL_VERIFY_SERVER_CERT = 1073741824; 26 | exports.CLIENT_REMEMBER_OPTIONS = 2147483648; 27 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/constants/field_flags.js: -------------------------------------------------------------------------------- 1 | // Manually extracted from mysql-5.5.23/include/mysql_com.h 2 | exports.NOT_NULL_FLAG = 1; /* Field can't be NULL */ 3 | exports.PRI_KEY_FLAG = 2; /* Field is part of a primary key */ 4 | exports.UNIQUE_KEY_FLAG = 4; /* Field is part of a unique key */ 5 | exports.MULTIPLE_KEY_FLAG = 8; /* Field is part of a key */ 6 | exports.BLOB_FLAG = 16; /* Field is a blob */ 7 | exports.UNSIGNED_FLAG = 32; /* Field is unsigned */ 8 | exports.ZEROFILL_FLAG = 64; /* Field is zerofill */ 9 | exports.BINARY_FLAG = 128; /* Field is binary */ 10 | 11 | /* The following are only sent to new clients */ 12 | exports.ENUM_FLAG = 256; /* field is an enum */ 13 | exports.AUTO_INCREMENT_FLAG = 512; /* field is a autoincrement field */ 14 | exports.TIMESTAMP_FLAG = 1024; /* Field is a timestamp */ 15 | exports.SET_FLAG = 2048; /* field is a set */ 16 | exports.NO_DEFAULT_VALUE_FLAG = 4096; /* Field doesn't have default value */ 17 | exports.ON_UPDATE_NOW_FLAG = 8192; /* Field is set to NOW on UPDATE */ 18 | exports.NUM_FLAG = 32768; /* Field is num (for clients) */ 19 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/constants/server_status.js: -------------------------------------------------------------------------------- 1 | // Manually extracted from mysql-5.5.23/include/mysql_com.h 2 | 3 | /** 4 | Is raised when a multi-statement transaction 5 | has been started, either explicitly, by means 6 | of BEGIN or COMMIT AND CHAIN, or 7 | implicitly, by the first transactional 8 | statement, when autocommit=off. 9 | */ 10 | exports.SERVER_STATUS_IN_TRANS = 1; 11 | exports.SERVER_STATUS_AUTOCOMMIT = 2; /* Server in auto_commit mode */ 12 | exports.SERVER_MORE_RESULTS_EXISTS = 8; /* Multi query - next query exists */ 13 | exports.SERVER_QUERY_NO_GOOD_INDEX_USED = 16; 14 | exports.SERVER_QUERY_NO_INDEX_USED = 32; 15 | /** 16 | The server was able to fulfill the clients request and opened a 17 | read-only non-scrollable cursor for a query. This flag comes 18 | in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands. 19 | */ 20 | exports.SERVER_STATUS_CURSOR_EXISTS = 64; 21 | /** 22 | This flag is sent when a read-only cursor is exhausted, in reply to 23 | COM_STMT_FETCH command. 24 | */ 25 | exports.SERVER_STATUS_LAST_ROW_SENT = 128; 26 | exports.SERVER_STATUS_DB_DROPPED = 256; /* A database was dropped */ 27 | exports.SERVER_STATUS_NO_BACKSLASH_ESCAPES = 512; 28 | /** 29 | Sent to the client if after a prepared statement reprepare 30 | we discovered that the new statement returns a different 31 | number of result set columns. 32 | */ 33 | exports.SERVER_STATUS_METADATA_CHANGED = 1024; 34 | exports.SERVER_QUERY_WAS_SLOW = 2048; 35 | 36 | /** 37 | To mark ResultSet containing output parameter values. 38 | */ 39 | exports.SERVER_PS_OUT_PARAMS = 4096; 40 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/constants/types.js: -------------------------------------------------------------------------------- 1 | // Manually extracted from mysql-5.5.23/include/mysql_com.h 2 | // some more info here: http://dev.mysql.com/doc/refman/5.5/en/c-api-prepared-statement-type-codes.html 3 | exports.DECIMAL = 0x00; // aka DECIMAL (http://dev.mysql.com/doc/refman/5.0/en/precision-math-decimal-changes.html) 4 | exports.TINY = 0x01; // aka TINYINT, 1 byte 5 | exports.SHORT = 0x02; // aka SMALLINT, 2 bytes 6 | exports.LONG = 0x03; // aka INT, 4 bytes 7 | exports.FLOAT = 0x04; // aka FLOAT, 4-8 bytes 8 | exports.DOUBLE = 0x05; // aka DOUBLE, 8 bytes 9 | exports.NULL = 0x06; // NULL (used for prepared statements, I think) 10 | exports.TIMESTAMP = 0x07; // aka TIMESTAMP 11 | exports.LONGLONG = 0x08; // aka BIGINT, 8 bytes 12 | exports.INT24 = 0x09; // aka MEDIUMINT, 3 bytes 13 | exports.DATE = 0x0a; // aka DATE 14 | exports.TIME = 0x0b; // aka TIME 15 | exports.DATETIME = 0x0c; // aka DATETIME 16 | exports.YEAR = 0x0d; // aka YEAR, 1 byte (don't ask) 17 | exports.NEWDATE = 0x0e; // aka ? 18 | exports.VARCHAR = 0x0f; // aka VARCHAR (?) 19 | exports.BIT = 0x10; // aka BIT, 1-8 byte 20 | exports.NEWDECIMAL = 0xf6; // aka DECIMAL 21 | exports.ENUM = 0xf7; // aka ENUM 22 | exports.SET = 0xf8; // aka SET 23 | exports.TINY_BLOB = 0xf9; // aka TINYBLOB, TINYTEXT 24 | exports.MEDIUM_BLOB = 0xfa; // aka MEDIUMBLOB, MEDIUMTEXT 25 | exports.LONG_BLOB = 0xfb; // aka LONGBLOG, LONGTEXT 26 | exports.BLOB = 0xfc; // aka BLOB, TEXT 27 | exports.VAR_STRING = 0xfd; // aka VARCHAR, VARBINARY 28 | exports.STRING = 0xfe; // aka CHAR, BINARY 29 | exports.GEOMETRY = 0xff; // aka GEOMETRY 30 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/packets/ClientAuthenticationPacket.js: -------------------------------------------------------------------------------- 1 | module.exports = ClientAuthenticationPacket; 2 | function ClientAuthenticationPacket(options) { 3 | options = options || {}; 4 | 5 | this.clientFlags = options.clientFlags; 6 | this.maxPacketSize = options.maxPacketSize; 7 | this.charsetNumber = options.charsetNumber; 8 | this.filler = undefined; 9 | this.user = options.user; 10 | this.scrambleBuff = options.scrambleBuff; 11 | this.database = options.database; 12 | this.protocol41 = options.protocol41; 13 | } 14 | 15 | ClientAuthenticationPacket.prototype.parse = function(parser) { 16 | if (this.protocol41) { 17 | this.clientFlags = parser.parseUnsignedNumber(4); 18 | this.maxPacketSize = parser.parseUnsignedNumber(4); 19 | this.charsetNumber = parser.parseUnsignedNumber(1); 20 | this.filler = parser.parseFiller(23); 21 | this.user = parser.parseNullTerminatedString(); 22 | this.scrambleBuff = parser.parseLengthCodedBuffer(); 23 | this.database = parser.parseNullTerminatedString(); 24 | } else { 25 | this.clientFlags = parser.parseUnsignedNumber(2); 26 | this.maxPacketSize = parser.parseUnsignedNumber(3); 27 | this.user = parser.parseNullTerminatedString(); 28 | this.scrambleBuff = parser.parseBuffer(8); 29 | this.database = parser.parseLengthCodedBuffer(); 30 | } 31 | }; 32 | 33 | ClientAuthenticationPacket.prototype.write = function(writer) { 34 | if (this.protocol41) { 35 | writer.writeUnsignedNumber(4, this.clientFlags); 36 | writer.writeUnsignedNumber(4, this.maxPacketSize); 37 | writer.writeUnsignedNumber(1, this.charsetNumber); 38 | writer.writeFiller(23); 39 | writer.writeNullTerminatedString(this.user); 40 | writer.writeLengthCodedBuffer(this.scrambleBuff); 41 | writer.writeNullTerminatedString(this.database); 42 | } else { 43 | writer.writeUnsignedNumber(2, this.clientFlags); 44 | writer.writeUnsignedNumber(3, this.maxPacketSize); 45 | writer.writeNullTerminatedString(this.user); 46 | writer.writeBuffer(this.scrambleBuff); 47 | if (this.database && this.database.length) { 48 | writer.writeFiller(1); 49 | writer.writeBuffer(new Buffer(this.database)); 50 | } 51 | } 52 | }; 53 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/packets/ComChangeUserPacket.js: -------------------------------------------------------------------------------- 1 | module.exports = ComChangeUserPacket; 2 | function ComChangeUserPacket(options) { 3 | options = options || {}; 4 | 5 | this.command = 0x11; 6 | this.user = options.user; 7 | this.scrambleBuff = options.scrambleBuff; 8 | this.database = options.database; 9 | this.charsetNumber = options.charsetNumber; 10 | } 11 | 12 | ComChangeUserPacket.prototype.parse = function(parser) { 13 | this.command = parser.parseUnsignedNumber(1); 14 | this.user = parser.parseNullTerminatedString(); 15 | this.scrambleBuff = parser.parseLengthCodedBuffer(); 16 | this.database = parser.parseNullTerminatedString(); 17 | this.charsetNumber = parser.parseUnsignedNumber(1); 18 | }; 19 | 20 | ComChangeUserPacket.prototype.write = function(writer) { 21 | writer.writeUnsignedNumber(1, this.command); 22 | writer.writeNullTerminatedString(this.user); 23 | writer.writeLengthCodedBuffer(this.scrambleBuff); 24 | writer.writeNullTerminatedString(this.database); 25 | writer.writeUnsignedNumber(2, this.charsetNumber); 26 | }; 27 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/packets/ComPingPacket.js: -------------------------------------------------------------------------------- 1 | module.exports = ComPingPacket; 2 | function ComPingPacket(sql) { 3 | this.command = 0x0e; 4 | } 5 | 6 | ComPingPacket.prototype.write = function(writer) { 7 | writer.writeUnsignedNumber(1, this.command); 8 | }; 9 | 10 | ComPingPacket.prototype.parse = function(parser) { 11 | this.command = parser.parseUnsignedNumber(1); 12 | }; 13 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/packets/ComQueryPacket.js: -------------------------------------------------------------------------------- 1 | module.exports = ComQueryPacket; 2 | function ComQueryPacket(sql) { 3 | this.command = 0x03; 4 | this.sql = sql; 5 | } 6 | 7 | ComQueryPacket.prototype.write = function(writer) { 8 | writer.writeUnsignedNumber(1, this.command); 9 | writer.writeString(this.sql); 10 | }; 11 | 12 | ComQueryPacket.prototype.parse = function(parser) { 13 | this.command = parser.parseUnsignedNumber(1); 14 | this.sql = parser.parsePacketTerminatedString(); 15 | }; 16 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/packets/ComQuitPacket.js: -------------------------------------------------------------------------------- 1 | module.exports = ComQuitPacket; 2 | function ComQuitPacket(sql) { 3 | this.command = 0x01; 4 | } 5 | 6 | ComQuitPacket.prototype.parse = function parse(parser) { 7 | this.command = parser.parseUnsignedNumber(1); 8 | }; 9 | 10 | ComQuitPacket.prototype.write = function write(writer) { 11 | writer.writeUnsignedNumber(1, this.command); 12 | }; 13 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/packets/ComStatisticsPacket.js: -------------------------------------------------------------------------------- 1 | module.exports = ComStatisticsPacket; 2 | function ComStatisticsPacket(sql) { 3 | this.command = 0x09; 4 | } 5 | 6 | ComStatisticsPacket.prototype.write = function(writer) { 7 | writer.writeUnsignedNumber(1, this.command); 8 | }; 9 | 10 | ComStatisticsPacket.prototype.parse = function(parser) { 11 | this.command = parser.parseUnsignedNumber(1); 12 | }; 13 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/packets/EmptyPacket.js: -------------------------------------------------------------------------------- 1 | module.exports = EmptyPacket; 2 | function EmptyPacket() { 3 | } 4 | 5 | EmptyPacket.prototype.write = function(writer) { 6 | }; 7 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/packets/EofPacket.js: -------------------------------------------------------------------------------- 1 | module.exports = EofPacket; 2 | function EofPacket(options) { 3 | options = options || {}; 4 | 5 | this.fieldCount = undefined; 6 | this.warningCount = options.warningCount; 7 | this.serverStatus = options.serverStatus; 8 | this.protocol41 = options.protocol41; 9 | } 10 | 11 | EofPacket.prototype.parse = function(parser) { 12 | this.fieldCount = parser.parseUnsignedNumber(1); 13 | if (this.protocol41) { 14 | this.warningCount = parser.parseUnsignedNumber(2); 15 | this.serverStatus = parser.parseUnsignedNumber(2); 16 | } 17 | }; 18 | 19 | EofPacket.prototype.write = function(writer) { 20 | writer.writeUnsignedNumber(1, 0xfe); 21 | if (this.protocol41) { 22 | writer.writeUnsignedNumber(2, this.warningCount); 23 | writer.writeUnsignedNumber(2, this.serverStatus); 24 | } 25 | }; 26 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/packets/ErrorPacket.js: -------------------------------------------------------------------------------- 1 | module.exports = ErrorPacket; 2 | function ErrorPacket(options) { 3 | options = options || {}; 4 | 5 | this.fieldCount = options.fieldCount; 6 | this.errno = options.errno; 7 | this.sqlStateMarker = options.sqlStateMarker; 8 | this.sqlState = options.sqlState; 9 | this.message = options.message; 10 | } 11 | 12 | ErrorPacket.prototype.parse = function(parser) { 13 | this.fieldCount = parser.parseUnsignedNumber(1); 14 | this.errno = parser.parseUnsignedNumber(2); 15 | 16 | // sqlStateMarker ('#' = 0x23) indicates error packet format 17 | if (parser.peak() === 0x23) { 18 | this.sqlStateMarker = parser.parseString(1); 19 | this.sqlState = parser.parseString(5); 20 | } 21 | 22 | this.message = parser.parsePacketTerminatedString(); 23 | }; 24 | 25 | ErrorPacket.prototype.write = function(writer) { 26 | writer.writeUnsignedNumber(1, 0xff); 27 | writer.writeUnsignedNumber(2, this.errno); 28 | 29 | if (this.sqlStateMarker) { 30 | writer.writeString(this.sqlStateMarker); 31 | writer.writeString(this.sqlState); 32 | } 33 | 34 | writer.writeString(this.message); 35 | }; 36 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/packets/Field.js: -------------------------------------------------------------------------------- 1 | var Types = require('../constants/types'); 2 | 3 | module.exports = Field; 4 | function Field(options) { 5 | options = options || {}; 6 | 7 | this.parser = options.parser; 8 | this.packet = options.packet; 9 | this.db = options.packet.db; 10 | this.table = options.packet.table; 11 | this.name = options.packet.name; 12 | this.type = typeToString(options.packet.type); 13 | this.length = options.packet.length; 14 | } 15 | 16 | Field.prototype.string = function () { 17 | return this.parser.parseLengthCodedString(); 18 | }; 19 | 20 | Field.prototype.buffer = function () { 21 | return this.parser.parseLengthCodedBuffer(); 22 | }; 23 | 24 | Field.prototype.geometry = function () { 25 | return this.parser.parseGeometryValue(); 26 | }; 27 | 28 | function typeToString(t) { 29 | for (var k in Types) { 30 | if (Types[k] == t) return k; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/packets/LocalDataFilePacket.js: -------------------------------------------------------------------------------- 1 | module.exports = LocalDataFilePacket; 2 | /** 3 | * @param {Buffer} data 4 | */ 5 | function LocalDataFilePacket(data) { 6 | this.data = data; 7 | } 8 | 9 | LocalDataFilePacket.prototype.write = function(writer) { 10 | writer.writeBuffer(this.data); 11 | }; 12 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/packets/OkPacket.js: -------------------------------------------------------------------------------- 1 | module.exports = OkPacket; 2 | function OkPacket(options) { 3 | options = options || {}; 4 | 5 | this.fieldCount = undefined; 6 | this.affectedRows = undefined; 7 | this.insertId = undefined; 8 | this.serverStatus = undefined; 9 | this.warningCount = undefined; 10 | this.message = undefined; 11 | this.protocol41 = options.protocol41; 12 | } 13 | 14 | OkPacket.prototype.parse = function(parser) { 15 | this.fieldCount = parser.parseUnsignedNumber(1); 16 | this.affectedRows = parser.parseLengthCodedNumber(); 17 | this.insertId = parser.parseLengthCodedNumber(); 18 | if (this.protocol41) { 19 | this.serverStatus = parser.parseUnsignedNumber(2); 20 | this.warningCount = parser.parseUnsignedNumber(2); 21 | } 22 | this.message = parser.parsePacketTerminatedString(); 23 | this.changedRows = 0; 24 | 25 | var m = this.message.match(/\schanged:\s*(\d+)/i); 26 | 27 | if (m !== null) { 28 | this.changedRows = parseInt(m[1], 10); 29 | } 30 | }; 31 | 32 | OkPacket.prototype.write = function(writer) { 33 | writer.writeUnsignedNumber(1, 0x00); 34 | writer.writeLengthCodedNumber(this.affectedRows || 0); 35 | writer.writeLengthCodedNumber(this.insertId || 0); 36 | if (this.protocol41) { 37 | writer.writeUnsignedNumber(2, this.serverStatus || 0); 38 | writer.writeUnsignedNumber(2, this.warningCount || 0); 39 | } 40 | writer.writeString(this.message); 41 | }; 42 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/packets/OldPasswordPacket.js: -------------------------------------------------------------------------------- 1 | module.exports = OldPasswordPacket; 2 | function OldPasswordPacket(options) { 3 | options = options || {}; 4 | 5 | this.scrambleBuff = options.scrambleBuff; 6 | } 7 | 8 | OldPasswordPacket.prototype.parse = function(parser) { 9 | this.scrambleBuff = parser.parseNullTerminatedBuffer(); 10 | }; 11 | 12 | OldPasswordPacket.prototype.write = function(writer) { 13 | writer.writeBuffer(this.scrambleBuff); 14 | writer.writeFiller(1); 15 | }; 16 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/packets/ResultSetHeaderPacket.js: -------------------------------------------------------------------------------- 1 | module.exports = ResultSetHeaderPacket; 2 | function ResultSetHeaderPacket(options) { 3 | options = options || {}; 4 | 5 | this.fieldCount = options.fieldCount; 6 | this.extra = options.extra; 7 | } 8 | 9 | ResultSetHeaderPacket.prototype.parse = function(parser) { 10 | this.fieldCount = parser.parseLengthCodedNumber(); 11 | 12 | if (parser.reachedPacketEnd()) return; 13 | 14 | this.extra = (this.fieldCount === null) 15 | ? parser.parsePacketTerminatedString() 16 | : parser.parseLengthCodedNumber(); 17 | }; 18 | 19 | ResultSetHeaderPacket.prototype.write = function(writer) { 20 | writer.writeLengthCodedNumber(this.fieldCount); 21 | 22 | if (this.extra !== undefined) { 23 | writer.writeLengthCodedNumber(this.extra); 24 | } 25 | }; 26 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/packets/SSLRequestPacket.js: -------------------------------------------------------------------------------- 1 | // http://dev.mysql.com/doc/internals/en/ssl.html 2 | // http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::SSLRequest 3 | 4 | var ClientConstants = require('../constants/client'); 5 | 6 | module.exports = SSLRequestPacket; 7 | 8 | function SSLRequestPacket(options) { 9 | options = options || {}; 10 | this.clientFlags = options.clientFlags | ClientConstants.CLIENT_SSL; 11 | this.maxPacketSize = options.maxPacketSize; 12 | this.charsetNumber = options.charsetNumber; 13 | } 14 | 15 | SSLRequestPacket.prototype.parse = function(parser) { 16 | // TODO: check SSLRequest packet v41 vs pre v41 17 | this.clientFlags = parser.parseUnsignedNumber(4); 18 | this.maxPacketSize = parser.parseUnsignedNumber(4); 19 | this.charsetNumber = parser.parseUnsignedNumber(1); 20 | }; 21 | 22 | SSLRequestPacket.prototype.write = function(writer) { 23 | writer.writeUnsignedNumber(4, this.clientFlags); 24 | writer.writeUnsignedNumber(4, this.maxPacketSize); 25 | writer.writeUnsignedNumber(1, this.charsetNumber); 26 | writer.writeFiller(23); 27 | }; 28 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/packets/StatisticsPacket.js: -------------------------------------------------------------------------------- 1 | module.exports = StatisticsPacket; 2 | function StatisticsPacket() { 3 | this.message = undefined; 4 | } 5 | 6 | StatisticsPacket.prototype.parse = function(parser) { 7 | this.message = parser.parsePacketTerminatedString(); 8 | 9 | var items = this.message.split(/\s\s/); 10 | for (var i = 0; i < items.length; i++) { 11 | var m = items[i].match(/^(.+)\:\s+(.+)$/); 12 | if (m !== null) { 13 | this[m[1].toLowerCase().replace(/\s/g, '_')] = Number(m[2]); 14 | } 15 | } 16 | }; 17 | 18 | StatisticsPacket.prototype.write = function(writer) { 19 | writer.writeString(this.message); 20 | }; 21 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js: -------------------------------------------------------------------------------- 1 | module.exports = UseOldPasswordPacket; 2 | function UseOldPasswordPacket(options) { 3 | options = options || {}; 4 | 5 | this.firstByte = options.firstByte || 0xfe; 6 | } 7 | 8 | UseOldPasswordPacket.prototype.parse = function(parser) { 9 | this.firstByte = parser.parseUnsignedNumber(1); 10 | }; 11 | 12 | UseOldPasswordPacket.prototype.write = function(writer) { 13 | writer.writeUnsignedNumber(1, this.firstByte); 14 | }; 15 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/packets/index.js: -------------------------------------------------------------------------------- 1 | var Elements = module.exports = require('require-all')({ 2 | dirname : __dirname, 3 | filter : /([A-Z].+)\.js$/, 4 | }); 5 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/sequences/ChangeUser.js: -------------------------------------------------------------------------------- 1 | var Sequence = require('./Sequence'); 2 | var Util = require('util'); 3 | var Packets = require('../packets'); 4 | var Auth = require('../Auth'); 5 | 6 | module.exports = ChangeUser; 7 | Util.inherits(ChangeUser, Sequence); 8 | function ChangeUser(options, callback) { 9 | Sequence.call(this, options, callback); 10 | 11 | this._user = options.user; 12 | this._password = options.password; 13 | this._database = options.database; 14 | this._charsetNumber = options.charsetNumber; 15 | this._currentConfig = options.currentConfig; 16 | } 17 | 18 | ChangeUser.prototype.start = function(handshakeInitializationPacket) { 19 | var scrambleBuff = handshakeInitializationPacket.scrambleBuff(); 20 | scrambleBuff = Auth.token(this._password, scrambleBuff); 21 | 22 | var packet = new Packets.ComChangeUserPacket({ 23 | user : this._user, 24 | scrambleBuff : scrambleBuff, 25 | database : this._database, 26 | charsetNumber : this._charsetNumber, 27 | }); 28 | 29 | this._currentConfig.user = this._user; 30 | this._currentConfig.password = this._password; 31 | this._currentConfig.database = this._database; 32 | this._currentConfig.charsetNumber = this._charsetNumber; 33 | 34 | this.emit('packet', packet); 35 | }; 36 | 37 | ChangeUser.prototype['ErrorPacket'] = function(packet) { 38 | var err = this._packetToError(packet); 39 | err.fatal = true; 40 | this.end(err); 41 | }; 42 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/sequences/Ping.js: -------------------------------------------------------------------------------- 1 | var Sequence = require('./Sequence'); 2 | var Util = require('util'); 3 | var Packets = require('../packets'); 4 | 5 | module.exports = Ping; 6 | Util.inherits(Ping, Sequence); 7 | 8 | function Ping(options, callback) { 9 | if (!callback && typeof options === 'function') { 10 | callback = options; 11 | options = {}; 12 | } 13 | 14 | Sequence.call(this, options, callback); 15 | } 16 | 17 | Ping.prototype.start = function() { 18 | this.emit('packet', new Packets.ComPingPacket); 19 | }; 20 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/sequences/Quit.js: -------------------------------------------------------------------------------- 1 | var Sequence = require('./Sequence'); 2 | var Util = require('util'); 3 | var Packets = require('../packets'); 4 | 5 | module.exports = Quit; 6 | Util.inherits(Quit, Sequence); 7 | function Quit(options, callback) { 8 | if (!callback && typeof options === 'function') { 9 | callback = options; 10 | options = {}; 11 | } 12 | 13 | Sequence.call(this, options, callback); 14 | } 15 | 16 | Quit.prototype.start = function() { 17 | this.emit('packet', new Packets.ComQuitPacket); 18 | }; 19 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/sequences/Statistics.js: -------------------------------------------------------------------------------- 1 | var Sequence = require('./Sequence'); 2 | var Util = require('util'); 3 | var Packets = require('../packets'); 4 | 5 | module.exports = Statistics; 6 | Util.inherits(Statistics, Sequence); 7 | function Statistics(options, callback) { 8 | if (!callback && typeof options === 'function') { 9 | callback = options; 10 | options = {}; 11 | } 12 | 13 | Sequence.call(this, options, callback); 14 | } 15 | 16 | Statistics.prototype.start = function() { 17 | this.emit('packet', new Packets.ComStatisticsPacket); 18 | }; 19 | 20 | Statistics.prototype['StatisticsPacket'] = function (packet) { 21 | this.end(null, packet); 22 | }; 23 | 24 | Statistics.prototype.determinePacket = function(firstByte, parser) { 25 | if (firstByte === 0x55) { 26 | return Packets.StatisticsPacket; 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /js/node_modules/mysql/lib/protocol/sequences/index.js: -------------------------------------------------------------------------------- 1 | var Elements = module.exports = require('require-all')({ 2 | dirname : __dirname, 3 | filter : /([A-Z].+)\.js$/, 4 | }); 5 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/bignumber.js/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | perf 3 | coverage 4 | 5 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/bignumber.js/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.12" 4 | - "0.11" 5 | - "0.10" 6 | - "0.8" 7 | - "0.6" 8 | - iojs 9 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/bignumber.js/LICENCE: -------------------------------------------------------------------------------- 1 | The MIT Expat Licence. 2 | 3 | Copyright (c) 2012 Michael Mclaughlin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/bignumber.js/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bignumber.js", 3 | "main": "bignumber.js", 4 | "version": "2.0.7", 5 | "homepage": "https://github.com/MikeMcl/bignumber.js", 6 | "authors": [ 7 | "Michael Mclaughlin " 8 | ], 9 | "description": "A library for arbitrary-precision decimal and non-decimal arithmetic", 10 | "moduleType": [ 11 | "amd", 12 | "globals", 13 | "node" 14 | ], 15 | "keywords": [ 16 | "arbitrary", 17 | "precision", 18 | "arithmetic", 19 | "big", 20 | "number", 21 | "decimal", 22 | "float", 23 | "biginteger", 24 | "bigdecimal", 25 | "bignumber", 26 | "bigint", 27 | "bignum" 28 | ], 29 | "license": "MIT", 30 | "ignore": [ 31 | ".*", 32 | "*.json", 33 | "test" 34 | ] 35 | } 36 | 37 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/.npmignore: -------------------------------------------------------------------------------- 1 | build/ 2 | test/ 3 | examples/ 4 | fs.js 5 | zlib.js -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 | Permission is hereby granted, free of charge, to any person obtaining a copy 3 | of this software and associated documentation files (the "Software"), to 4 | deal in the Software without restriction, including without limitation the 5 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 6 | sell copies of the Software, and to permit persons to whom the Software is 7 | furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in 10 | all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 18 | IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/README.md: -------------------------------------------------------------------------------- 1 | # readable-stream 2 | 3 | ***Node-core streams for userland*** 4 | 5 | [![NPM](https://nodei.co/npm/readable-stream.png?downloads=true)](https://nodei.co/npm/readable-stream/) 6 | [![NPM](https://nodei.co/npm-dl/readable-stream.png)](https://nodei.co/npm/readable-stream/) 7 | 8 | This package is a mirror of the Streams2 and Streams3 implementations in Node-core. 9 | 10 | If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core. 11 | 12 | **readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12. 13 | 14 | **readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"` 15 | 16 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/duplex.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./lib/_stream_duplex.js") 2 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/lib/_stream_duplex.js: -------------------------------------------------------------------------------- 1 | // Copyright Joyent, Inc. and other Node contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the 5 | // "Software"), to deal in the Software without restriction, including 6 | // without limitation the rights to use, copy, modify, merge, publish, 7 | // distribute, sublicense, and/or sell copies of the Software, and to permit 8 | // persons to whom the Software is furnished to do so, subject to the 9 | // following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included 12 | // in all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 17 | // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 18 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 19 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 20 | // USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | // a duplex stream is just a stream that is both readable and writable. 23 | // Since JS doesn't have multiple prototypal inheritance, this class 24 | // prototypally inherits from Readable, and then parasitically from 25 | // Writable. 26 | 27 | module.exports = Duplex; 28 | 29 | /**/ 30 | var objectKeys = Object.keys || function (obj) { 31 | var keys = []; 32 | for (var key in obj) keys.push(key); 33 | return keys; 34 | } 35 | /**/ 36 | 37 | 38 | /**/ 39 | var util = require('core-util-is'); 40 | util.inherits = require('inherits'); 41 | /**/ 42 | 43 | var Readable = require('./_stream_readable'); 44 | var Writable = require('./_stream_writable'); 45 | 46 | util.inherits(Duplex, Readable); 47 | 48 | forEach(objectKeys(Writable.prototype), function(method) { 49 | if (!Duplex.prototype[method]) 50 | Duplex.prototype[method] = Writable.prototype[method]; 51 | }); 52 | 53 | function Duplex(options) { 54 | if (!(this instanceof Duplex)) 55 | return new Duplex(options); 56 | 57 | Readable.call(this, options); 58 | Writable.call(this, options); 59 | 60 | if (options && options.readable === false) 61 | this.readable = false; 62 | 63 | if (options && options.writable === false) 64 | this.writable = false; 65 | 66 | this.allowHalfOpen = true; 67 | if (options && options.allowHalfOpen === false) 68 | this.allowHalfOpen = false; 69 | 70 | this.once('end', onend); 71 | } 72 | 73 | // the no-half-open enforcer 74 | function onend() { 75 | // if we allow half-open state, or if the writable side ended, 76 | // then we're ok. 77 | if (this.allowHalfOpen || this._writableState.ended) 78 | return; 79 | 80 | // no more data can be written. 81 | // But allow more writes to happen in this tick. 82 | process.nextTick(this.end.bind(this)); 83 | } 84 | 85 | function forEach (xs, f) { 86 | for (var i = 0, l = xs.length; i < l; i++) { 87 | f(xs[i], i); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/lib/_stream_passthrough.js: -------------------------------------------------------------------------------- 1 | // Copyright Joyent, Inc. and other Node contributors. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a 4 | // copy of this software and associated documentation files (the 5 | // "Software"), to deal in the Software without restriction, including 6 | // without limitation the rights to use, copy, modify, merge, publish, 7 | // distribute, sublicense, and/or sell copies of the Software, and to permit 8 | // persons to whom the Software is furnished to do so, subject to the 9 | // following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included 12 | // in all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 17 | // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 18 | // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 19 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 20 | // USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | // a passthrough stream. 23 | // basically just the most minimal sort of Transform stream. 24 | // Every written chunk gets output as-is. 25 | 26 | module.exports = PassThrough; 27 | 28 | var Transform = require('./_stream_transform'); 29 | 30 | /**/ 31 | var util = require('core-util-is'); 32 | util.inherits = require('inherits'); 33 | /**/ 34 | 35 | util.inherits(PassThrough, Transform); 36 | 37 | function PassThrough(options) { 38 | if (!(this instanceof PassThrough)) 39 | return new PassThrough(options); 40 | 41 | Transform.call(this, options); 42 | } 43 | 44 | PassThrough.prototype._transform = function(chunk, encoding, cb) { 45 | cb(null, chunk); 46 | }; 47 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/node_modules/core-util-is/README.md: -------------------------------------------------------------------------------- 1 | # core-util-is 2 | 3 | The `util.is*` functions introduced in Node v0.12. 4 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/node_modules/core-util-is/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core-util-is", 3 | "version": "1.0.1", 4 | "description": "The `util.is*` functions introduced in Node v0.12.", 5 | "main": "lib/util.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git://github.com/isaacs/core-util-is" 9 | }, 10 | "keywords": [ 11 | "util", 12 | "isBuffer", 13 | "isArray", 14 | "isNumber", 15 | "isString", 16 | "isRegExp", 17 | "isThis", 18 | "isThat", 19 | "polyfill" 20 | ], 21 | "author": { 22 | "name": "Isaac Z. Schlueter", 23 | "email": "i@izs.me", 24 | "url": "http://blog.izs.me/" 25 | }, 26 | "license": "MIT", 27 | "bugs": { 28 | "url": "https://github.com/isaacs/core-util-is/issues" 29 | }, 30 | "readme": "# core-util-is\n\nThe `util.is*` functions introduced in Node v0.12.\n", 31 | "readmeFilename": "README.md", 32 | "_id": "core-util-is@1.0.1", 33 | "dist": { 34 | "shasum": "c4920ccaaa682ff4950a0e7aa8f5ab6e2814cd4a" 35 | }, 36 | "_from": "core-util-is@~1.0.0", 37 | "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz" 38 | } 39 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/node_modules/inherits/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 10 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 11 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 12 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 14 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | PERFORMANCE OF THIS SOFTWARE. 16 | 17 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/node_modules/inherits/README.md: -------------------------------------------------------------------------------- 1 | Browser-friendly inheritance fully compatible with standard node.js 2 | [inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). 3 | 4 | This package exports standard `inherits` from node.js `util` module in 5 | node environment, but also provides alternative browser-friendly 6 | implementation through [browser 7 | field](https://gist.github.com/shtylman/4339901). Alternative 8 | implementation is a literal copy of standard one located in standalone 9 | module to avoid requiring of `util`. It also has a shim for old 10 | browsers with no `Object.create` support. 11 | 12 | While keeping you sure you are using standard `inherits` 13 | implementation in node.js environment, it allows bundlers such as 14 | [browserify](https://github.com/substack/node-browserify) to not 15 | include full `util` package to your client code if all you need is 16 | just `inherits` function. It worth, because browser shim for `util` 17 | package is large and `inherits` is often the single function you need 18 | from it. 19 | 20 | It's recommended to use this package instead of 21 | `require('util').inherits` for any code that has chances to be used 22 | not only in node.js but in browser too. 23 | 24 | ## usage 25 | 26 | ```js 27 | var inherits = require('inherits'); 28 | // then use exactly as the standard one 29 | ``` 30 | 31 | ## note on version ~1.0 32 | 33 | Version ~1.0 had completely different motivation and is not compatible 34 | neither with 2.0 nor with standard node.js `inherits`. 35 | 36 | If you are using version ~1.0 and planning to switch to ~2.0, be 37 | careful: 38 | 39 | * new version uses `super_` instead of `super` for referencing 40 | superclass 41 | * new version overwrites current prototype while old one preserves any 42 | existing fields on it 43 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/node_modules/inherits/inherits.js: -------------------------------------------------------------------------------- 1 | module.exports = require('util').inherits 2 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/node_modules/inherits/inherits_browser.js: -------------------------------------------------------------------------------- 1 | if (typeof Object.create === 'function') { 2 | // implementation from standard node.js 'util' module 3 | module.exports = function inherits(ctor, superCtor) { 4 | ctor.super_ = superCtor 5 | ctor.prototype = Object.create(superCtor.prototype, { 6 | constructor: { 7 | value: ctor, 8 | enumerable: false, 9 | writable: true, 10 | configurable: true 11 | } 12 | }); 13 | }; 14 | } else { 15 | // old school shim for old browsers 16 | module.exports = function inherits(ctor, superCtor) { 17 | ctor.super_ = superCtor 18 | var TempCtor = function () {} 19 | TempCtor.prototype = superCtor.prototype 20 | ctor.prototype = new TempCtor() 21 | ctor.prototype.constructor = ctor 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/node_modules/inherits/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "inherits", 3 | "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", 4 | "version": "2.0.1", 5 | "keywords": [ 6 | "inheritance", 7 | "class", 8 | "klass", 9 | "oop", 10 | "object-oriented", 11 | "inherits", 12 | "browser", 13 | "browserify" 14 | ], 15 | "main": "./inherits.js", 16 | "browser": "./inherits_browser.js", 17 | "repository": { 18 | "type": "git", 19 | "url": "git://github.com/isaacs/inherits" 20 | }, 21 | "license": "ISC", 22 | "scripts": { 23 | "test": "node test" 24 | }, 25 | "readme": "Browser-friendly inheritance fully compatible with standard node.js\n[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).\n\nThis package exports standard `inherits` from node.js `util` module in\nnode environment, but also provides alternative browser-friendly\nimplementation through [browser\nfield](https://gist.github.com/shtylman/4339901). Alternative\nimplementation is a literal copy of standard one located in standalone\nmodule to avoid requiring of `util`. It also has a shim for old\nbrowsers with no `Object.create` support.\n\nWhile keeping you sure you are using standard `inherits`\nimplementation in node.js environment, it allows bundlers such as\n[browserify](https://github.com/substack/node-browserify) to not\ninclude full `util` package to your client code if all you need is\njust `inherits` function. It worth, because browser shim for `util`\npackage is large and `inherits` is often the single function you need\nfrom it.\n\nIt's recommended to use this package instead of\n`require('util').inherits` for any code that has chances to be used\nnot only in node.js but in browser too.\n\n## usage\n\n```js\nvar inherits = require('inherits');\n// then use exactly as the standard one\n```\n\n## note on version ~1.0\n\nVersion ~1.0 had completely different motivation and is not compatible\nneither with 2.0 nor with standard node.js `inherits`.\n\nIf you are using version ~1.0 and planning to switch to ~2.0, be\ncareful:\n\n* new version uses `super_` instead of `super` for referencing\n superclass\n* new version overwrites current prototype while old one preserves any\n existing fields on it\n", 26 | "readmeFilename": "README.md", 27 | "bugs": { 28 | "url": "https://github.com/isaacs/inherits/issues" 29 | }, 30 | "_id": "inherits@2.0.1", 31 | "dist": { 32 | "shasum": "4f98e79cb3646f4bfe839934e12008b16b07e670" 33 | }, 34 | "_from": "inherits@~2.0.1", 35 | "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" 36 | } 37 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/node_modules/inherits/test.js: -------------------------------------------------------------------------------- 1 | var inherits = require('./inherits.js') 2 | var assert = require('assert') 3 | 4 | function test(c) { 5 | assert(c.constructor === Child) 6 | assert(c.constructor.super_ === Parent) 7 | assert(Object.getPrototypeOf(c) === Child.prototype) 8 | assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) 9 | assert(c instanceof Child) 10 | assert(c instanceof Parent) 11 | } 12 | 13 | function Child() { 14 | Parent.call(this) 15 | test(this) 16 | } 17 | 18 | function Parent() {} 19 | 20 | inherits(Child, Parent) 21 | 22 | var c = new Child 23 | test(c) 24 | 25 | console.log('ok') 26 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/node_modules/isarray/README.md: -------------------------------------------------------------------------------- 1 | 2 | # isarray 3 | 4 | `Array#isArray` for older browsers. 5 | 6 | ## Usage 7 | 8 | ```js 9 | var isArray = require('isarray'); 10 | 11 | console.log(isArray([])); // => true 12 | console.log(isArray({})); // => false 13 | ``` 14 | 15 | ## Installation 16 | 17 | With [npm](http://npmjs.org) do 18 | 19 | ```bash 20 | $ npm install isarray 21 | ``` 22 | 23 | Then bundle for the browser with 24 | [browserify](https://github.com/substack/browserify). 25 | 26 | With [component](http://component.io) do 27 | 28 | ```bash 29 | $ component install juliangruber/isarray 30 | ``` 31 | 32 | ## License 33 | 34 | (MIT) 35 | 36 | Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> 37 | 38 | Permission is hereby granted, free of charge, to any person obtaining a copy of 39 | this software and associated documentation files (the "Software"), to deal in 40 | the Software without restriction, including without limitation the rights to 41 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 42 | of the Software, and to permit persons to whom the Software is furnished to do 43 | so, subject to the following conditions: 44 | 45 | The above copyright notice and this permission notice shall be included in all 46 | copies or substantial portions of the Software. 47 | 48 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 49 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 50 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 51 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 52 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 53 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 54 | SOFTWARE. 55 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/node_modules/isarray/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "isarray", 3 | "description" : "Array#isArray for older browsers", 4 | "version" : "0.0.1", 5 | "repository" : "juliangruber/isarray", 6 | "homepage": "https://github.com/juliangruber/isarray", 7 | "main" : "index.js", 8 | "scripts" : [ 9 | "index.js" 10 | ], 11 | "dependencies" : {}, 12 | "keywords": ["browser","isarray","array"], 13 | "author": { 14 | "name": "Julian Gruber", 15 | "email": "mail@juliangruber.com", 16 | "url": "http://juliangruber.com" 17 | }, 18 | "license": "MIT" 19 | } 20 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/node_modules/isarray/index.js: -------------------------------------------------------------------------------- 1 | module.exports = Array.isArray || function (arr) { 2 | return Object.prototype.toString.call(arr) == '[object Array]'; 3 | }; 4 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/node_modules/isarray/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "isarray", 3 | "description": "Array#isArray for older browsers", 4 | "version": "0.0.1", 5 | "repository": { 6 | "type": "git", 7 | "url": "git://github.com/juliangruber/isarray.git" 8 | }, 9 | "homepage": "https://github.com/juliangruber/isarray", 10 | "main": "index.js", 11 | "scripts": { 12 | "test": "tap test/*.js" 13 | }, 14 | "dependencies": {}, 15 | "devDependencies": { 16 | "tap": "*" 17 | }, 18 | "keywords": [ 19 | "browser", 20 | "isarray", 21 | "array" 22 | ], 23 | "author": { 24 | "name": "Julian Gruber", 25 | "email": "mail@juliangruber.com", 26 | "url": "http://juliangruber.com" 27 | }, 28 | "license": "MIT", 29 | "readme": "\n# isarray\n\n`Array#isArray` for older browsers.\n\n## Usage\n\n```js\nvar isArray = require('isarray');\n\nconsole.log(isArray([])); // => true\nconsole.log(isArray({})); // => false\n```\n\n## Installation\n\nWith [npm](http://npmjs.org) do\n\n```bash\n$ npm install isarray\n```\n\nThen bundle for the browser with\n[browserify](https://github.com/substack/browserify).\n\nWith [component](http://component.io) do\n\n```bash\n$ component install juliangruber/isarray\n```\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber <julian@juliangruber.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", 30 | "readmeFilename": "README.md", 31 | "bugs": { 32 | "url": "https://github.com/juliangruber/isarray/issues" 33 | }, 34 | "_id": "isarray@0.0.1", 35 | "dist": { 36 | "shasum": "4b074bdd7df684e0c90117a1248e4b223f6276cd" 37 | }, 38 | "_from": "isarray@0.0.1", 39 | "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" 40 | } 41 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/node_modules/string_decoder/.npmignore: -------------------------------------------------------------------------------- 1 | build 2 | test 3 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/node_modules/string_decoder/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Joyent, Inc. and other Node contributors. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a 4 | copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to permit 8 | persons to whom the Software is furnished to do so, subject to the 9 | following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included 12 | in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 17 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 18 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 19 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 20 | USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/node_modules/string_decoder/README.md: -------------------------------------------------------------------------------- 1 | **string_decoder.js** (`require('string_decoder')`) from Node.js core 2 | 3 | Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. 4 | 5 | Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** 6 | 7 | The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/node_modules/string_decoder/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "string_decoder", 3 | "version": "0.10.31", 4 | "description": "The string_decoder module from Node core", 5 | "main": "index.js", 6 | "dependencies": {}, 7 | "devDependencies": { 8 | "tap": "~0.4.8" 9 | }, 10 | "scripts": { 11 | "test": "tap test/simple/*.js" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "git://github.com/rvagg/string_decoder.git" 16 | }, 17 | "homepage": "https://github.com/rvagg/string_decoder", 18 | "keywords": [ 19 | "string", 20 | "decoder", 21 | "browser", 22 | "browserify" 23 | ], 24 | "license": "MIT", 25 | "readme": "**string_decoder.js** (`require('string_decoder')`) from Node.js core\n\nCopyright Joyent, Inc. and other Node contributors. See LICENCE file for details.\n\nVersion numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.**\n\nThe *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version.", 26 | "readmeFilename": "README.md", 27 | "bugs": { 28 | "url": "https://github.com/rvagg/string_decoder/issues" 29 | }, 30 | "_id": "string_decoder@0.10.31", 31 | "dist": { 32 | "shasum": "90fe182c2092ffcb1b5111b0421da4f0cd345d6c" 33 | }, 34 | "_from": "string_decoder@~0.10.x", 35 | "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" 36 | } 37 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "readable-stream", 3 | "version": "1.1.13-1", 4 | "description": "Streams3, a user-land copy of the stream library from Node.js v0.11.x", 5 | "main": "readable.js", 6 | "dependencies": { 7 | "core-util-is": "~1.0.0", 8 | "isarray": "0.0.1", 9 | "string_decoder": "~0.10.x", 10 | "inherits": "~2.0.1" 11 | }, 12 | "devDependencies": { 13 | "tap": "~0.2.6" 14 | }, 15 | "scripts": { 16 | "test": "tap test/simple/*.js" 17 | }, 18 | "repository": { 19 | "type": "git", 20 | "url": "git://github.com/isaacs/readable-stream" 21 | }, 22 | "keywords": [ 23 | "readable", 24 | "stream", 25 | "pipe" 26 | ], 27 | "browser": { 28 | "util": false 29 | }, 30 | "author": { 31 | "name": "Isaac Z. Schlueter", 32 | "email": "i@izs.me", 33 | "url": "http://blog.izs.me/" 34 | }, 35 | "license": "MIT", 36 | "readme": "# readable-stream\n\n***Node-core streams for userland***\n\n[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true)](https://nodei.co/npm/readable-stream/)\n[![NPM](https://nodei.co/npm-dl/readable-stream.png)](https://nodei.co/npm/readable-stream/)\n\nThis package is a mirror of the Streams2 and Streams3 implementations in Node-core.\n\nIf you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *\"stream\"* module in Node-core.\n\n**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12.\n\n**readable-stream** uses proper patch-level versioning so if you pin to `\"~1.0.0\"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `\"~1.1.0\"`\n\n", 37 | "readmeFilename": "README.md", 38 | "bugs": { 39 | "url": "https://github.com/isaacs/readable-stream/issues" 40 | }, 41 | "_id": "readable-stream@1.1.13-1", 42 | "dist": { 43 | "shasum": "09386026cdfc655458b7d8ec5e3099bf807b86ce" 44 | }, 45 | "_from": "readable-stream@~1.1.13", 46 | "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13-1.tgz" 47 | } 48 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/passthrough.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./lib/_stream_passthrough.js") 2 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/readable.js: -------------------------------------------------------------------------------- 1 | exports = module.exports = require('./lib/_stream_readable.js'); 2 | exports.Stream = require('stream'); 3 | exports.Readable = exports; 4 | exports.Writable = require('./lib/_stream_writable.js'); 5 | exports.Duplex = require('./lib/_stream_duplex.js'); 6 | exports.Transform = require('./lib/_stream_transform.js'); 7 | exports.PassThrough = require('./lib/_stream_passthrough.js'); 8 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/transform.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./lib/_stream_transform.js") 2 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/readable-stream/writable.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./lib/_stream_writable.js") 2 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/require-all/.npmignore: -------------------------------------------------------------------------------- 1 | test/ 2 | *.un~ 3 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/require-all/License: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/require-all/Readme.md: -------------------------------------------------------------------------------- 1 | # require-all 2 | 3 | An easy way to require all files within a directory. 4 | 5 | ## Usage 6 | 7 | ```js 8 | var controllers = require('require-all')({ 9 | dirname : __dirname + '/controllers', 10 | filter : /(.+Controller)\.js$/, 11 | excludeDirs : /^\.(git|svn)$/ 12 | }); 13 | 14 | // controllers now is an object with references to all modules matching the filter 15 | // for example: 16 | // { HomeController: function HomeController() {...}, ...} 17 | ``` 18 | 19 | ## Advanced usage 20 | 21 | If your objective is to simply require all .js and .json files in a directory you can just pass a string to require-all: 22 | 23 | ``` js 24 | var libs = require('require-all')(__dirname + '/lib'); 25 | ``` 26 | 27 | ## Constructed object usage 28 | 29 | If your directory contains files that all export constructors, you can require them all and automatically construct the objects using `resolve`: 30 | 31 | ```js 32 | var controllers = require('require-all')({ 33 | dirname : __dirname + '/controllers', 34 | filter : /(.+Controller)\.js$/, 35 | excludeDirs : /^\.(git|svn)$/, 36 | resolve : function (Controller) { 37 | return new Controller(); 38 | } 39 | }); 40 | ``` 41 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/require-all/index.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | 3 | module.exports = function requireAll(options) { 4 | if (typeof options === 'string') { 5 | options = { 6 | dirname: options, 7 | filter: /(.+)\.js(on)?$/, 8 | excludeDirs: /^\.(git|svn)$/ 9 | }; 10 | } 11 | 12 | var files = fs.readdirSync(options.dirname); 13 | var modules = {}; 14 | var resolve = options.resolve || identity; 15 | 16 | function excludeDirectory(dirname) { 17 | return options.excludeDirs && dirname.match(options.excludeDirs); 18 | } 19 | 20 | files.forEach(function (file) { 21 | var filepath = options.dirname + '/' + file; 22 | if (fs.statSync(filepath).isDirectory()) { 23 | 24 | if (excludeDirectory(file)) return; 25 | 26 | modules[file] = requireAll({ 27 | dirname: filepath, 28 | filter: options.filter, 29 | excludeDirs: options.excludeDirs, 30 | resolve: resolve 31 | }); 32 | 33 | } else { 34 | var match = file.match(options.filter); 35 | if (!match) return; 36 | 37 | modules[match[1]] = resolve(require(filepath)); 38 | } 39 | }); 40 | 41 | return modules; 42 | }; 43 | 44 | function identity(val) { 45 | return val; 46 | } 47 | -------------------------------------------------------------------------------- /js/node_modules/mysql/node_modules/require-all/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "name": "Felix Geisendörfer", 4 | "email": "felix@debuggable.com", 5 | "url": "http://debuggable.com/" 6 | }, 7 | "name": "require-all", 8 | "description": "An easy way to require all files within a directory.", 9 | "version": "1.0.0", 10 | "scripts": { 11 | "test": "node test/test.js" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "git://github.com/felixge/node-require-all.git" 16 | }, 17 | "licenses": [ 18 | { 19 | "type": "MIT", 20 | "url": "https://github.com/felixge/node-require-all/blob/master/License" 21 | } 22 | ], 23 | "main": "./index", 24 | "engines": { 25 | "node": "*" 26 | }, 27 | "dependencies": {}, 28 | "devDependencies": { 29 | "semver": "~2.1.0" 30 | }, 31 | "optionalDependencies": {}, 32 | "readme": "# require-all\n\nAn easy way to require all files within a directory.\n\n## Usage\n\n```js\nvar controllers = require('require-all')({\n dirname : __dirname + '/controllers',\n filter : /(.+Controller)\\.js$/,\n excludeDirs : /^\\.(git|svn)$/\n});\n\n// controllers now is an object with references to all modules matching the filter\n// for example:\n// { HomeController: function HomeController() {...}, ...}\n```\n\n## Advanced usage\n\nIf your objective is to simply require all .js and .json files in a directory you can just pass a string to require-all:\n\n``` js\nvar libs = require('require-all')(__dirname + '/lib');\n```\n\n## Constructed object usage\n\nIf your directory contains files that all export constructors, you can require them all and automatically construct the objects using `resolve`:\n\n```js\nvar controllers = require('require-all')({\n dirname : __dirname + '/controllers',\n filter : /(.+Controller)\\.js$/,\n excludeDirs : /^\\.(git|svn)$/,\n resolve : function (Controller) {\n return new Controller();\n }\n});\n```\n", 33 | "readmeFilename": "Readme.md", 34 | "bugs": { 35 | "url": "https://github.com/felixge/node-require-all/issues" 36 | }, 37 | "_id": "require-all@1.0.0", 38 | "dist": { 39 | "shasum": "abf8364c4fa19fe0bd33c977702295617dcb421d" 40 | }, 41 | "_from": "require-all@~1.0.0", 42 | "_resolved": "https://registry.npmjs.org/require-all/-/require-all-1.0.0.tgz" 43 | } 44 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 Heather Arthur 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/node_modules/chalk/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var ansi = require('ansi-styles'); 3 | var stripAnsi = require('strip-ansi'); 4 | var hasColor = require('has-color'); 5 | var defineProps = Object.defineProperties; 6 | var chalk = module.exports; 7 | 8 | var styles = (function () { 9 | var ret = {}; 10 | 11 | ansi.grey = ansi.gray; 12 | 13 | Object.keys(ansi).forEach(function (key) { 14 | ret[key] = { 15 | get: function () { 16 | this._styles.push(key); 17 | return this; 18 | } 19 | }; 20 | }); 21 | 22 | return ret; 23 | })(); 24 | 25 | function init() { 26 | var ret = {}; 27 | 28 | Object.keys(styles).forEach(function (name) { 29 | ret[name] = { 30 | get: function () { 31 | var obj = defineProps(function self() { 32 | var str = [].slice.call(arguments).join(' '); 33 | 34 | if (!chalk.enabled) { 35 | return str; 36 | } 37 | 38 | return self._styles.reduce(function (str, name) { 39 | var code = ansi[name]; 40 | return str ? code.open + str + code.close : ''; 41 | }, str); 42 | }, styles); 43 | 44 | obj._styles = []; 45 | 46 | return obj[name]; 47 | } 48 | } 49 | }); 50 | 51 | return ret; 52 | } 53 | 54 | defineProps(chalk, init()); 55 | 56 | chalk.styles = ansi; 57 | chalk.stripColor = stripAnsi; 58 | chalk.supportsColor = hasColor; 59 | 60 | // detect mode if not set manually 61 | if (chalk.enabled === undefined) { 62 | chalk.enabled = chalk.supportsColor; 63 | } 64 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/node_modules/chalk/node_modules/.bin/strip-ansi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=`dirname "$0"` 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../strip-ansi/cli.js" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../strip-ansi/cli.js" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/node_modules/chalk/node_modules/.bin/strip-ansi.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\strip-ansi\cli.js" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\strip-ansi\cli.js" %* 7 | ) -------------------------------------------------------------------------------- /js/node_modules/nomnom/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var styles = module.exports; 3 | 4 | var codes = { 5 | reset: [0, 0], 6 | 7 | bold: [1, 22], 8 | italic: [3, 23], 9 | underline: [4, 24], 10 | inverse: [7, 27], 11 | strikethrough: [9, 29], 12 | 13 | black: [30, 39], 14 | red: [31, 39], 15 | green: [32, 39], 16 | yellow: [33, 39], 17 | blue: [34, 39], 18 | magenta: [35, 39], 19 | cyan: [36, 39], 20 | white: [37, 39], 21 | gray: [90, 39], 22 | 23 | bgBlack: [40, 49], 24 | bgRed: [41, 49], 25 | bgGreen: [42, 49], 26 | bgYellow: [43, 49], 27 | bgBlue: [44, 49], 28 | bgMagenta: [45, 49], 29 | bgCyan: [46, 49], 30 | bgWhite: [47, 49] 31 | }; 32 | 33 | Object.keys(codes).forEach(function (key) { 34 | var val = codes[key]; 35 | var style = styles[key] = {}; 36 | style.open = '\x1b[' + val[0] + 'm'; 37 | style.close = '\x1b[' + val[1] + 'm'; 38 | }); 39 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/node_modules/chalk/node_modules/ansi-styles/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ansi-styles", 3 | "version": "1.0.0", 4 | "description": "ANSI escape codes for colorizing strings in the terminal", 5 | "keywords": [ 6 | "ansi", 7 | "styles", 8 | "color", 9 | "colour", 10 | "colors", 11 | "terminal", 12 | "console", 13 | "cli", 14 | "string", 15 | "tty", 16 | "escape", 17 | "formatting", 18 | "rgb", 19 | "256", 20 | "shell", 21 | "xterm", 22 | "log", 23 | "logging", 24 | "command-line", 25 | "text" 26 | ], 27 | "homepage": "https://github.com/sindresorhus/ansi-styles", 28 | "bugs": { 29 | "url": "https://github.com/sindresorhus/ansi-styles/issues" 30 | }, 31 | "license": "MIT", 32 | "author": { 33 | "name": "Sindre Sorhus", 34 | "email": "sindresorhus@gmail.com", 35 | "url": "http://sindresorhus.com" 36 | }, 37 | "files": [ 38 | "ansi-styles.js" 39 | ], 40 | "main": "ansi-styles", 41 | "repository": { 42 | "type": "git", 43 | "url": "git://github.com/sindresorhus/ansi-styles.git" 44 | }, 45 | "scripts": { 46 | "test": "mocha" 47 | }, 48 | "devDependencies": { 49 | "mocha": "~1.12.0" 50 | }, 51 | "engines": { 52 | "node": ">=0.8.0" 53 | }, 54 | "_id": "ansi-styles@1.0.0", 55 | "dist": { 56 | "shasum": "cb102df1c56f5123eab8b67cd7b98027a0279178", 57 | "tarball": "http://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz" 58 | }, 59 | "_from": "ansi-styles@>=1.0.0 <1.1.0", 60 | "_npmVersion": "1.3.15", 61 | "_npmUser": { 62 | "name": "sindresorhus", 63 | "email": "sindresorhus@gmail.com" 64 | }, 65 | "maintainers": [ 66 | { 67 | "name": "sindresorhus", 68 | "email": "sindresorhus@gmail.com" 69 | } 70 | ], 71 | "directories": {}, 72 | "_shasum": "cb102df1c56f5123eab8b67cd7b98027a0279178", 73 | "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz" 74 | } 75 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/node_modules/chalk/node_modules/ansi-styles/readme.md: -------------------------------------------------------------------------------- 1 | # ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles) 2 | 3 | > [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for colorizing strings in the terminal. 4 | 5 | You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings. 6 | 7 | ![screenshot](screenshot.png) 8 | 9 | 10 | ## Install 11 | 12 | Install with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles` 13 | 14 | 15 | ## Example 16 | 17 | ```js 18 | var ansi = require('ansi-styles'); 19 | 20 | console.log(ansi.green.open + 'Hello world!' + ansi.green.close); 21 | ``` 22 | 23 | ## API 24 | 25 | Each style has an `open` and `close` property. 26 | 27 | 28 | ## Styles 29 | 30 | ### General 31 | 32 | - reset 33 | - bold 34 | - italic 35 | - underline 36 | - inverse 37 | - strikethrough 38 | 39 | ### Text colors 40 | 41 | - black 42 | - red 43 | - green 44 | - yellow 45 | - blue 46 | - magenta 47 | - cyan 48 | - white 49 | - gray 50 | 51 | ### Background colors 52 | 53 | - bgBlack 54 | - bgRed 55 | - bgGreen 56 | - bgYellow 57 | - bgBlue 58 | - bgMagenta 59 | - bgCyan 60 | - bgWhite 61 | 62 | 63 | ## License 64 | 65 | MIT © [Sindre Sorhus](http://sindresorhus.com) 66 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/node_modules/chalk/node_modules/has-color/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = (function () { 3 | if (process.argv.indexOf('--no-color') !== -1) { 4 | return false; 5 | } 6 | 7 | if (process.argv.indexOf('--color') !== -1) { 8 | return true; 9 | } 10 | 11 | if (process.stdout && !process.stdout.isTTY) { 12 | return false; 13 | } 14 | 15 | if (process.platform === 'win32') { 16 | return true; 17 | } 18 | 19 | if ('COLORTERM' in process.env) { 20 | return true; 21 | } 22 | 23 | if (process.env.TERM === 'dumb') { 24 | return false; 25 | } 26 | 27 | if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { 28 | return true; 29 | } 30 | 31 | return false; 32 | })(); 33 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/node_modules/chalk/node_modules/has-color/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "has-color", 3 | "version": "0.1.7", 4 | "description": "Detect whether a terminal supports color", 5 | "license": "MIT", 6 | "repository": { 7 | "type": "git", 8 | "url": "git://github.com/sindresorhus/has-color" 9 | }, 10 | "author": { 11 | "name": "Sindre Sorhus", 12 | "email": "sindresorhus@gmail.com", 13 | "url": "http://sindresorhus.com" 14 | }, 15 | "engines": { 16 | "node": ">=0.10.0" 17 | }, 18 | "scripts": { 19 | "test": "mocha" 20 | }, 21 | "files": [ 22 | "index.js" 23 | ], 24 | "keywords": [ 25 | "color", 26 | "colour", 27 | "colors", 28 | "terminal", 29 | "console", 30 | "cli", 31 | "ansi", 32 | "styles", 33 | "tty", 34 | "rgb", 35 | "256", 36 | "shell", 37 | "xterm", 38 | "command-line", 39 | "support", 40 | "capability", 41 | "detect" 42 | ], 43 | "devDependencies": { 44 | "mocha": "*" 45 | }, 46 | "bugs": { 47 | "url": "https://github.com/sindresorhus/has-color/issues" 48 | }, 49 | "homepage": "https://github.com/sindresorhus/has-color", 50 | "_id": "has-color@0.1.7", 51 | "dist": { 52 | "shasum": "67144a5260c34fc3cca677d041daf52fe7b78b2f", 53 | "tarball": "http://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz" 54 | }, 55 | "_from": "has-color@>=0.1.0 <0.2.0", 56 | "_npmVersion": "1.4.6", 57 | "_npmUser": { 58 | "name": "sindresorhus", 59 | "email": "sindresorhus@gmail.com" 60 | }, 61 | "maintainers": [ 62 | { 63 | "name": "sindresorhus", 64 | "email": "sindresorhus@gmail.com" 65 | } 66 | ], 67 | "directories": {}, 68 | "_shasum": "67144a5260c34fc3cca677d041daf52fe7b78b2f", 69 | "_resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz" 70 | } 71 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/node_modules/chalk/node_modules/has-color/readme.md: -------------------------------------------------------------------------------- 1 | # has-color [![Build Status](https://travis-ci.org/sindresorhus/has-color.svg?branch=master)](https://travis-ci.org/sindresorhus/has-color) 2 | 3 | > Detect whether a terminal supports color. 4 | 5 | Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). 6 | 7 | 8 | ## Install 9 | 10 | ```bash 11 | $ npm install --save has-color 12 | ``` 13 | 14 | 15 | ## Usage 16 | 17 | ```js 18 | var hasColor = require('has-color'); 19 | 20 | if (hasColor) { 21 | console.log('Terminal supports color.'); 22 | } 23 | ``` 24 | 25 | It obeys the `--color` and `--no-color` CLI flags. 26 | 27 | 28 | ## License 29 | 30 | [MIT](http://opensource.org/licenses/MIT) © [Sindre Sorhus](http://sindresorhus.com) 31 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/node_modules/chalk/node_modules/strip-ansi/cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 'use strict'; 3 | var fs = require('fs'); 4 | var strip = require('./index'); 5 | var input = process.argv[2]; 6 | 7 | if (process.argv.indexOf('-h') !== -1 || process.argv.indexOf('--help') !== -1) { 8 | console.log('strip-ansi > '); 9 | console.log('or'); 10 | console.log('cat | strip-ansi > '); 11 | return; 12 | } 13 | 14 | if (process.argv.indexOf('-v') !== -1 || process.argv.indexOf('--version') !== -1) { 15 | console.log(require('./package').version); 16 | return; 17 | } 18 | 19 | if (input) { 20 | process.stdout.write(strip(fs.readFileSync(input, 'utf8'))); 21 | return; 22 | } 23 | 24 | process.stdin.setEncoding('utf8'); 25 | process.stdin.on('data', function (data) { 26 | process.stdout.write(strip(data)); 27 | }); 28 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/node_modules/chalk/node_modules/strip-ansi/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = function (str) { 3 | return typeof str === 'string' ? str.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, '') : str; 4 | }; 5 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/node_modules/chalk/node_modules/strip-ansi/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "strip-ansi", 3 | "version": "0.1.1", 4 | "description": "Strip ANSI escape codes (used for colorizing strings in the terminal)", 5 | "license": "MIT", 6 | "bin": { 7 | "strip-ansi": "cli.js" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git://github.com/sindresorhus/strip-ansi" 12 | }, 13 | "author": { 14 | "name": "Sindre Sorhus", 15 | "email": "sindresorhus@gmail.com", 16 | "url": "http://sindresorhus.com" 17 | }, 18 | "engines": { 19 | "node": ">=0.8.0" 20 | }, 21 | "scripts": { 22 | "test": "mocha" 23 | }, 24 | "files": [ 25 | "index.js", 26 | "cli.js" 27 | ], 28 | "keywords": [ 29 | "strip", 30 | "trim", 31 | "remove", 32 | "ansi", 33 | "styles", 34 | "color", 35 | "colour", 36 | "colors", 37 | "terminal", 38 | "console", 39 | "cli", 40 | "string", 41 | "tty", 42 | "escape", 43 | "formatting", 44 | "rgb", 45 | "256", 46 | "shell", 47 | "xterm", 48 | "log", 49 | "logging", 50 | "command-line", 51 | "text" 52 | ], 53 | "devDependencies": { 54 | "mocha": "~1.x" 55 | }, 56 | "bugs": { 57 | "url": "https://github.com/sindresorhus/strip-ansi/issues" 58 | }, 59 | "homepage": "https://github.com/sindresorhus/strip-ansi", 60 | "_id": "strip-ansi@0.1.1", 61 | "dist": { 62 | "shasum": "39e8a98d044d150660abe4a6808acf70bb7bc991", 63 | "tarball": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz" 64 | }, 65 | "_from": "strip-ansi@>=0.1.0 <0.2.0", 66 | "_npmVersion": "1.3.15", 67 | "_npmUser": { 68 | "name": "sindresorhus", 69 | "email": "sindresorhus@gmail.com" 70 | }, 71 | "maintainers": [ 72 | { 73 | "name": "sindresorhus", 74 | "email": "sindresorhus@gmail.com" 75 | } 76 | ], 77 | "directories": {}, 78 | "_shasum": "39e8a98d044d150660abe4a6808acf70bb7bc991", 79 | "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz" 80 | } 81 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/node_modules/chalk/node_modules/strip-ansi/readme.md: -------------------------------------------------------------------------------- 1 | # strip-ansi [![Build Status](https://secure.travis-ci.org/sindresorhus/strip-ansi.png?branch=master)](http://travis-ci.org/sindresorhus/strip-ansi) 2 | 3 | > Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) (used for colorizing strings in the terminal) 4 | 5 | Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). 6 | 7 | 8 | ## Install 9 | 10 | Install locally with [npm](https://npmjs.org/package/strip-ansi): 11 | 12 | ``` 13 | npm install --save strip-ansi 14 | ``` 15 | 16 | Or globally if you want to use it as a CLI app: 17 | 18 | ``` 19 | npm install --global strip-ansi 20 | ``` 21 | 22 | You can then use it in your Terminal like: 23 | 24 | ``` 25 | strip-ansi file-with-color-codes 26 | ``` 27 | 28 | Or pipe something to it: 29 | 30 | ``` 31 | ls | strip-ansi 32 | ``` 33 | 34 | 35 | ## Example 36 | 37 | ```js 38 | var stripAnsi = require('strip-ansi'); 39 | stripAnsi('\x1b[4mcake\x1b[0m'); 40 | //=> cake 41 | ``` 42 | 43 | 44 | ## License 45 | 46 | MIT © [Sindre Sorhus](http://sindresorhus.com) 47 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/node_modules/chalk/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chalk", 3 | "version": "0.4.0", 4 | "description": "Terminal string styling done right. Created because the `colors` module does some really horrible things.", 5 | "license": "MIT", 6 | "repository": { 7 | "type": "git", 8 | "url": "git://github.com/sindresorhus/chalk" 9 | }, 10 | "author": { 11 | "name": "Sindre Sorhus", 12 | "email": "sindresorhus@gmail.com", 13 | "url": "http://sindresorhus.com" 14 | }, 15 | "engines": { 16 | "node": ">=0.8.0" 17 | }, 18 | "scripts": { 19 | "test": "mocha" 20 | }, 21 | "files": [ 22 | "index.js" 23 | ], 24 | "keywords": [ 25 | "color", 26 | "colour", 27 | "colors", 28 | "terminal", 29 | "console", 30 | "cli", 31 | "string", 32 | "ansi", 33 | "styles", 34 | "tty", 35 | "formatting", 36 | "rgb", 37 | "256", 38 | "shell", 39 | "xterm", 40 | "log", 41 | "logging", 42 | "command-line", 43 | "text" 44 | ], 45 | "dependencies": { 46 | "has-color": "~0.1.0", 47 | "ansi-styles": "~1.0.0", 48 | "strip-ansi": "~0.1.0" 49 | }, 50 | "devDependencies": { 51 | "mocha": "~1.x" 52 | }, 53 | "bugs": { 54 | "url": "https://github.com/sindresorhus/chalk/issues" 55 | }, 56 | "homepage": "https://github.com/sindresorhus/chalk", 57 | "_id": "chalk@0.4.0", 58 | "dist": { 59 | "shasum": "5199a3ddcd0c1efe23bc08c1b027b06176e0c64f", 60 | "tarball": "http://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz" 61 | }, 62 | "_from": "chalk@>=0.4.0 <0.5.0", 63 | "_npmVersion": "1.3.17", 64 | "_npmUser": { 65 | "name": "sindresorhus", 66 | "email": "sindresorhus@gmail.com" 67 | }, 68 | "maintainers": [ 69 | { 70 | "name": "sindresorhus", 71 | "email": "sindresorhus@gmail.com" 72 | } 73 | ], 74 | "directories": {}, 75 | "_shasum": "5199a3ddcd0c1efe23bc08c1b027b06176e0c64f", 76 | "_resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz" 77 | } 78 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/node_modules/underscore/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative 2 | Reporters & Editors 3 | 4 | Permission is hereby granted, free of charge, to any person 5 | obtaining a copy of this software and associated documentation 6 | files (the "Software"), to deal in the Software without 7 | restriction, including without limitation the rights to use, 8 | copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the 10 | Software is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/node_modules/underscore/README.md: -------------------------------------------------------------------------------- 1 | __ 2 | /\ \ __ 3 | __ __ ___ \_\ \ __ _ __ ____ ___ ___ _ __ __ /\_\ ____ 4 | /\ \/\ \ /' _ `\ /'_ \ /'__`\/\ __\/ ,__\ / ___\ / __`\/\ __\/'__`\ \/\ \ /',__\ 5 | \ \ \_\ \/\ \/\ \/\ \ \ \/\ __/\ \ \//\__, `\/\ \__//\ \ \ \ \ \//\ __/ __ \ \ \/\__, `\ 6 | \ \____/\ \_\ \_\ \___,_\ \____\\ \_\\/\____/\ \____\ \____/\ \_\\ \____\/\_\ _\ \ \/\____/ 7 | \/___/ \/_/\/_/\/__,_ /\/____/ \/_/ \/___/ \/____/\/___/ \/_/ \/____/\/_//\ \_\ \/___/ 8 | \ \____/ 9 | \/___/ 10 | 11 | Underscore.js is a utility-belt library for JavaScript that provides 12 | support for the usual functional suspects (each, map, reduce, filter...) 13 | without extending any core JavaScript objects. 14 | 15 | For Docs, License, Tests, and pre-packed downloads, see: 16 | http://underscorejs.org 17 | 18 | Underscore is an open-sourced component of DocumentCloud: 19 | https://github.com/documentcloud 20 | 21 | Many thanks to our contributors: 22 | https://github.com/jashkenas/underscore/contributors 23 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/node_modules/underscore/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "underscore", 3 | "description": "JavaScript's functional programming helper library.", 4 | "homepage": "http://underscorejs.org", 5 | "keywords": [ 6 | "util", 7 | "functional", 8 | "server", 9 | "client", 10 | "browser" 11 | ], 12 | "author": { 13 | "name": "Jeremy Ashkenas", 14 | "email": "jeremy@documentcloud.org" 15 | }, 16 | "repository": { 17 | "type": "git", 18 | "url": "git://github.com/jashkenas/underscore.git" 19 | }, 20 | "main": "underscore.js", 21 | "version": "1.6.0", 22 | "devDependencies": { 23 | "docco": "0.6.x", 24 | "phantomjs": "1.9.0-1", 25 | "uglify-js": "2.4.x" 26 | }, 27 | "scripts": { 28 | "test": "phantomjs test/vendor/runner.js test/index.html?noglobals=true", 29 | "build": "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m --source-map underscore-min.map -o underscore-min.js", 30 | "doc": "docco underscore.js" 31 | }, 32 | "licenses": [ 33 | { 34 | "type": "MIT", 35 | "url": "https://raw.github.com/jashkenas/underscore/master/LICENSE" 36 | } 37 | ], 38 | "files": [ 39 | "underscore.js", 40 | "underscore-min.js", 41 | "LICENSE" 42 | ], 43 | "bugs": { 44 | "url": "https://github.com/jashkenas/underscore/issues" 45 | }, 46 | "_id": "underscore@1.6.0", 47 | "dist": { 48 | "shasum": "8b38b10cacdef63337b8b24e4ff86d45aea529a8", 49 | "tarball": "http://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz" 50 | }, 51 | "_from": "underscore@>=1.6.0 <1.7.0", 52 | "_npmVersion": "1.3.21", 53 | "_npmUser": { 54 | "name": "jashkenas", 55 | "email": "jashkenas@gmail.com" 56 | }, 57 | "maintainers": [ 58 | { 59 | "name": "jashkenas", 60 | "email": "jashkenas@gmail.com" 61 | } 62 | ], 63 | "directories": {}, 64 | "_shasum": "8b38b10cacdef63337b8b24e4ff86d45aea529a8", 65 | "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz" 66 | } 67 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/num-vals-fix.diff: -------------------------------------------------------------------------------- 1 | diff --git a/test/values.js b/test/values.js 2 | index efad789..7fa1078 100644 3 | --- a/test/values.js 4 | +++ b/test/values.js 5 | @@ -26,6 +26,12 @@ var opts = { 6 | }, 7 | def2: { 8 | default: "val1" 9 | + }, 10 | + "2d": { 11 | + flag: true 12 | + }, 13 | + "3d": { 14 | + abbr: "3" 15 | } 16 | } 17 | 18 | @@ -80,8 +86,12 @@ exports.testDash = function(test) { 19 | }; 20 | 21 | exports.testNumbers = function(test) { 22 | - var options = parser.parseArgs(['sum', '-1', '2.5', '-3.5', '4']); 23 | + var options = parser.parseArgs(['sum', '-1', '2.5', '-3.5', '4', '--2d', '-3', 'test']); 24 | 25 | test.deepEqual(options.list3, ['-1', '2.5', '-3.5', '4']); 26 | + test.strictEqual(options['2d'], true); 27 | + test.strictEqual(options['3d'], "test") 28 | test.done(); 29 | }; 30 | + 31 | + 32 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nomnom", 3 | "description": "Option parser with generated usage and commands", 4 | "version": "1.8.1", 5 | "author": { 6 | "name": "Heather Arthur", 7 | "email": "fayearthur@gmail.com" 8 | }, 9 | "scripts": { 10 | "test": "nodeunit test/*.js" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "http://github.com/harthur/nomnom.git" 15 | }, 16 | "main": "./nomnom", 17 | "keywords": [ 18 | "arguments", 19 | "option parser", 20 | "command line", 21 | "options", 22 | "parser" 23 | ], 24 | "dependencies": { 25 | "underscore": "~1.6.0", 26 | "chalk": "~0.4.0" 27 | }, 28 | "devDependencies": { 29 | "nodeunit": "~0.7.4" 30 | }, 31 | "bugs": { 32 | "url": "https://github.com/harthur/nomnom/issues" 33 | }, 34 | "homepage": "https://github.com/harthur/nomnom", 35 | "_id": "nomnom@1.8.1", 36 | "dist": { 37 | "shasum": "2151f722472ba79e50a76fc125bb8c8f2e4dc2a7", 38 | "tarball": "http://registry.npmjs.org/nomnom/-/nomnom-1.8.1.tgz" 39 | }, 40 | "_from": "nomnom@*", 41 | "_npmVersion": "1.4.3", 42 | "_npmUser": { 43 | "name": "harth", 44 | "email": "fayearthur@gmail.com" 45 | }, 46 | "maintainers": [ 47 | { 48 | "name": "harth", 49 | "email": "fayearthur@gmail.com" 50 | } 51 | ], 52 | "directories": {}, 53 | "_shasum": "2151f722472ba79e50a76fc125bb8c8f2e4dc2a7", 54 | "_resolved": "https://registry.npmjs.org/nomnom/-/nomnom-1.8.1.tgz" 55 | } 56 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/test.js: -------------------------------------------------------------------------------- 1 | var opts = require("./nomnom") 2 | .option('debug', { 3 | abbr: 'd', 4 | flag: true, 5 | help: 'Print debugging info' 6 | }) 7 | .option('config', { 8 | abbr: 'c', 9 | default: 'config.json', 10 | help: 'JSON file with tests to run' 11 | }) 12 | .option('version', { 13 | flag: true, 14 | help: 'print version and exit', 15 | callback: function() { 16 | return "version 1.2.4"; 17 | } 18 | }) 19 | .parse(); 20 | 21 | if (opts.debug) { 22 | console.log("debug") 23 | } 24 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/test/callback.js: -------------------------------------------------------------------------------- 1 | var nomnom = require("../nomnom"); 2 | 3 | exports.testVersion = function(test) { 4 | test.expect(1); 5 | 6 | nomnom().options({ 7 | date: { 8 | callback: function(date) { 9 | test.equal(date, "2010-02-03", "date should match value") 10 | } 11 | } 12 | }).parse(["--date=2010-02-03"]); 13 | 14 | test.done(); 15 | } 16 | 17 | exports.testReturnString = function(test) { 18 | test.expect(1); 19 | 20 | nomnom().options({ 21 | version: { 22 | flag: true, 23 | callback: function() { 24 | return "v0.3"; 25 | } 26 | } 27 | }) 28 | .printer(function(string) { 29 | test.equal(0, string.indexOf("v0.3")) 30 | test.done(); 31 | }) 32 | .parse(["--version"]); 33 | } -------------------------------------------------------------------------------- /js/node_modules/nomnom/test/commands.js: -------------------------------------------------------------------------------- 1 | var nomnom = require("../nomnom"); 2 | 3 | function strip(str) { 4 | return str.replace(/\s+/g, ''); 5 | } 6 | 7 | exports.testCallback = function(test) { 8 | test.expect(1); 9 | 10 | var parser = nomnom(); 11 | parser.command('run').callback(function(options) { 12 | test.equal(options.v, 3); 13 | }); 14 | parser.command('other').callback(function() { 15 | test.ok(false, "callback for other command shouldn't be called"); 16 | }); 17 | 18 | parser.parse(["run","-v", "3"]); 19 | test.done(); 20 | } 21 | 22 | exports.testMissingCommand = function(test) { 23 | test.expect(1); 24 | 25 | var parser = nomnom().scriptName("test"); 26 | 27 | parser.command('run'); 28 | 29 | parser.printer(function(string) { 30 | test.equal(string, "test: no such command 'other'"); 31 | test.done(); 32 | }); 33 | 34 | parser.parse(["other"]); 35 | } 36 | 37 | exports.testNoCommand = function(test) { 38 | test.expect(2); 39 | 40 | var parser = nomnom(); 41 | 42 | parser.nocommand() 43 | .options({ 44 | version: { 45 | flag: true 46 | } 47 | }) 48 | .callback(function(options) { 49 | test.strictEqual(options.version, true); 50 | }) 51 | .usage("fallback usage"); 52 | 53 | parser.command('run'); 54 | 55 | var options = parser.parse(["--version"]); 56 | 57 | test.strictEqual(options.version, true); 58 | test.done(); 59 | } 60 | 61 | function createParser() { 62 | var parser = nomnom().scriptName("test") 63 | .options({ 64 | debug: { 65 | flag: true 66 | } 67 | }); 68 | 69 | parser.command('run') 70 | .options({ 71 | file: { 72 | help: 'file to run' 73 | } 74 | }) 75 | .help("run all"); 76 | 77 | parser.command('test').usage("test usage"); 78 | 79 | parser.nocommand() 80 | .options({ 81 | verbose: { 82 | flag: true 83 | } 84 | }) 85 | .help("nocommand"); 86 | 87 | return parser; 88 | } 89 | 90 | exports.testUsage = function(test) { 91 | test.expect(4); 92 | 93 | var parser = createParser(); 94 | parser.printer(function(string) { 95 | test.equal(strip(string), "testusage"); 96 | }); 97 | parser.parse(["test", "-h"]); 98 | 99 | parser = createParser().nocolors(); 100 | parser.printer(function(string) { 101 | test.equal(strip(string), "Usage:testrun[options]Options:--debug--filefiletorunrunall"); 102 | }); 103 | parser.parse(["run", "-h"]); 104 | 105 | parser = createParser().nocolors(); 106 | parser.printer(function(string) { 107 | test.equal(strip(string), "Usage:test[command][options]commandoneof:run,testOptions:--debug--verbosenocommand"); 108 | }); 109 | parser.parse(["-h"]); 110 | 111 | parser = createParser().nocolors(); 112 | parser.nocommand() 113 | .usage("fallback"); 114 | parser.printer(function(string) { 115 | test.equal(strip(string), "fallback"); 116 | }); 117 | parser.parse(["-h"]); 118 | 119 | test.done(); 120 | } 121 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/test/expected.js: -------------------------------------------------------------------------------- 1 | var nomnom = require("../nomnom"); 2 | 3 | var opts = { 4 | file: { 5 | position: 0, 6 | required: true 7 | } 8 | } 9 | 10 | var parser = nomnom().options(opts); 11 | 12 | exports.testFlag = function(test) { 13 | test.expect(1); 14 | 15 | nomnom().options({ 16 | file: { 17 | position: 0, 18 | } 19 | }) 20 | .printer(function(string) { 21 | test.equal(0, string.indexOf("'--key1' expects a value")) 22 | test.done(); 23 | }) 24 | .parse(["--key1"]); 25 | } 26 | 27 | exports.testRequired = function(test) { 28 | test.expect(1); 29 | 30 | nomnom().options({ 31 | file: { 32 | required: true 33 | } 34 | }) 35 | .printer(function(string) { 36 | test.equal(0, string.trim().indexOf("file argument is required")) 37 | test.done(); 38 | }) 39 | .nocolors() 40 | .parse([]); 41 | } 42 | 43 | exports.testChoices = function(test) { 44 | test.expect(2); 45 | 46 | var parser = nomnom().options({ 47 | color: { 48 | choices: ['green', 'blue'] 49 | } 50 | }) 51 | .printer(function(string) { 52 | test.equal(0, string.indexOf("color must be one of: green, blue")) 53 | }); 54 | 55 | parser.parse(['--color', 'red']); 56 | 57 | var options = parser.parse(['--color', 'green']); 58 | test.equal(options.color, 'green'); 59 | test.done(); 60 | } 61 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/test/matching.js: -------------------------------------------------------------------------------- 1 | var nomnom = require("../nomnom"); 2 | 3 | var opts = { 4 | pos1: { 5 | position: 0 6 | }, 7 | pos2: { 8 | position: 1 9 | }, 10 | flag1: { 11 | flag: true 12 | }, 13 | debug: { 14 | abbr: 'd' 15 | }, 16 | numLines: { 17 | abbr: 'n', 18 | full: 'num-lines' 19 | }, 20 | version: { 21 | string: '-v, --version' 22 | }, 23 | config: { 24 | string: '-c FILE, --config=FILE' 25 | }, 26 | skey : { 27 | string: '-k val' 28 | }, 29 | skey2: { 30 | string: '-k2 val2, --key2 val2' 31 | }, 32 | skey3: { 33 | string: '--key3=val' 34 | }, 35 | skey4: { 36 | string: '--key4=val, -y val' 37 | } 38 | } 39 | 40 | var parser = nomnom().options(opts); 41 | 42 | exports.testPositional = function(test) { 43 | var options = parser.parse(["--flag1", "val1", "--config", "file", "val2"]); 44 | 45 | test.equal(options.pos1, "val1"); 46 | test.equal(options.pos2, "val2"); 47 | test.deepEqual(options._, ["val1", "val2"]) 48 | test.done(); 49 | } 50 | 51 | exports.testAbbr = function(test) { 52 | var options = parser.parse(["-d", "yes", "--num-lines", "3"]); 53 | 54 | test.equal(options.debug, "yes") 55 | test.equal(options.numLines, 3) 56 | test.done(); 57 | } 58 | 59 | exports.testString = function(test) { 60 | var options = parser.parse(["-k", "val", "--config=test.js", 61 | "--key2", "val2", "--key3", "val3", "--key4=val4", "-v", "v0.3"]); 62 | 63 | test.equal(options.version, "v0.3") 64 | test.equal(options.config, "test.js") 65 | test.equal(options.skey, "val") 66 | test.equal(options.skey2, "val2") 67 | test.equal(options.skey3, "val3") 68 | test.equal(options.skey4, "val4") 69 | test.done(); 70 | } 71 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/test/option.js: -------------------------------------------------------------------------------- 1 | var nomnom = require("../nomnom"); 2 | 3 | var parser = nomnom() 4 | .option('debug', { 5 | abbr: 'x', 6 | flag: true, 7 | help: 'Print debugging info' 8 | }) 9 | .option('config', { 10 | abbr: 'c', 11 | default: 'config.json', 12 | help: 'JSON file with tests to run' 13 | }) 14 | .option('version', { 15 | flag: true, 16 | help: 'print version and exit', 17 | callback: function() { 18 | return "version 1.2.4"; 19 | } 20 | }); 21 | 22 | 23 | exports.testOption = function(test) { 24 | var opts = parser.parse(["-x", "--no-verbose"]); 25 | 26 | test.strictEqual(opts.debug, true); 27 | test.equal(opts.config, "config.json"); 28 | test.done(); 29 | } 30 | 31 | 32 | exports.testCommandOption = function(test) { 33 | var parser = nomnom() 34 | parser.command('test') 35 | .option('fruit', { 36 | abbr: 'f', 37 | flag: true 38 | }) 39 | 40 | var opts = parser.parse(["test", "-f"]); 41 | 42 | test.strictEqual(opts.fruit, true); 43 | test.done(); 44 | } 45 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/test/transform.js: -------------------------------------------------------------------------------- 1 | var nomnom = require("../nomnom"); 2 | 3 | var parser = nomnom() 4 | .option("addr", { 5 | abbr: "a", 6 | help: "host:port address", 7 | transform: function(value) { 8 | var parts = value.split(":"); 9 | return {host: parts[0], port: Number(parts[1])}; 10 | } 11 | }) 12 | .option("string", { 13 | abbr: "s", 14 | help: "always a string", 15 | transform: function(value) { 16 | return value.toString(); 17 | } 18 | }); 19 | 20 | 21 | exports.testTransformComplexValue = function(test) { 22 | var opts = parser.parse(["-a", "localhost:1234"]); 23 | 24 | test.strictEqual(opts.addr.host, "localhost"); 25 | test.strictEqual(opts.addr.port, 1234); 26 | test.done(); 27 | }; 28 | 29 | 30 | exports.testTransformString = function(test) { 31 | var opts = parser.parse(["-s", "3"]); 32 | 33 | test.strictEqual(opts.string, "3"); 34 | test.done(); 35 | }; 36 | 37 | 38 | exports.testTransformCommand = function(test) { 39 | test.expect(1); 40 | 41 | var parser = nomnom().scriptName("test") 42 | .options({ 43 | addr: { 44 | transform: function(value) { 45 | var parts = value.split(":"); 46 | return {host: parts[0], port: Number(parts[1])}; 47 | } 48 | } 49 | }); 50 | 51 | parser.command("run") 52 | .options({ 53 | string: { 54 | transform: function(value) { 55 | return value.toString(); 56 | } 57 | } 58 | }) 59 | .callback(function(options) { 60 | test.strictEqual(options.string, "true"); 61 | }); 62 | 63 | parser.parse(["run", "--string=true"]); 64 | test.done(); 65 | }; 66 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/test/usage.js: -------------------------------------------------------------------------------- 1 | var nomnom = require("../nomnom"); 2 | 3 | function strip(str) { 4 | return str.replace(/\s+/g, ''); 5 | }; 6 | 7 | var opts = { 8 | apple: { 9 | abbr: 'a', 10 | help: 'how many apples' 11 | }, 12 | 13 | banana: { 14 | full: "b-nana" 15 | }, 16 | 17 | carrot: { 18 | string: '-c NUM, --carrots=NUM' 19 | }, 20 | 21 | dill: { 22 | metavar: 'PICKLE' 23 | }, 24 | 25 | egg: { 26 | position: 0, 27 | help: 'robin' 28 | } 29 | } 30 | 31 | var parser = nomnom().options(opts).help("all the best foods").scriptName("test").nocolors(); 32 | 33 | var expected = "Usage:test[egg][options]eggrobinOptions:-a,--applehowmanyapples--b-nana-cNUM,--carrots=NUM--dillPICKLEallthebestfoods" 34 | 35 | exports.testH = function(test) { 36 | test.expect(1); 37 | 38 | parser.printer(function(string) { 39 | test.equal(strip(string), expected) 40 | test.done(); 41 | }) 42 | .nocolors() 43 | .parse(["-h"]); 44 | } 45 | 46 | exports.testHelp = function(test) { 47 | test.expect(1); 48 | 49 | parser.printer(function(string) { 50 | test.equal(strip(string), expected) 51 | test.done(); 52 | }) 53 | .nocolors() 54 | .parse(["--help"]); 55 | } 56 | 57 | exports.testScriptName = function(test) { 58 | test.expect(1); 59 | 60 | nomnom() 61 | .script("test") 62 | .printer(function(string) { 63 | test.equal(strip(string),"Usage:test") 64 | test.done(); 65 | }) 66 | .nocolors() 67 | .parse(["-h"]); 68 | } 69 | 70 | exports.testUsage = function(test) { 71 | test.expect(1); 72 | 73 | parser 74 | .usage("test usage") 75 | .printer(function(string) { 76 | test.equal(string, "test usage") 77 | test.done(); 78 | }) 79 | .nocolors() 80 | .parse(["--help"]); 81 | } 82 | 83 | exports.testHidden = function(test) { 84 | test.expect(1); 85 | 86 | nomnom().options({ 87 | file: { 88 | hidden: true 89 | } 90 | }) 91 | .scriptName("test") 92 | .printer(function(string) { 93 | test.equal(strip("Usage:test[options]Options:"), strip(string)) 94 | test.done(); 95 | }) 96 | .nocolors() 97 | .parse(["-h"]); 98 | } 99 | 100 | exports.testRequiredOptional = function(test) { 101 | test.expect(1); 102 | 103 | nomnom().options({ 104 | foo: { 105 | position: 0, 106 | required: true, 107 | help: 'The foo' 108 | }, 109 | bar: { 110 | position: 1, 111 | help: 'The bar' 112 | } 113 | }) 114 | .scriptName("test") 115 | .printer(function(string) { 116 | test.equal(strip("Usage:test[bar]fooThefoobarThebar"), strip(string)) 117 | test.done(); 118 | }) 119 | .nocolors() 120 | .parse(["-h"]); 121 | } 122 | -------------------------------------------------------------------------------- /js/node_modules/nomnom/test/values.js: -------------------------------------------------------------------------------- 1 | var nomnom = require("../nomnom"); 2 | 3 | var opts = { 4 | debug: { 5 | flag: true 6 | }, 7 | verbose: { 8 | flag: true, 9 | default: true 10 | }, 11 | list1: { 12 | list: true 13 | }, 14 | list2: { 15 | list: true 16 | }, 17 | list3: { 18 | position: 1, 19 | list: true 20 | }, 21 | num1: { 22 | type: "string" 23 | }, 24 | def1: { 25 | default: "val1" 26 | }, 27 | def2: { 28 | default: "val1" 29 | } 30 | } 31 | 32 | var parser = nomnom().options(opts); 33 | 34 | exports.testFlag = function(test) { 35 | var options = parser.parse(["--debug", "pos0", "--no-verbose"]); 36 | 37 | test.strictEqual(options.debug, true); 38 | test.strictEqual(options.verbose, false); 39 | test.equal(options[0], "pos0"); 40 | test.equal(options._[0], "pos0"); 41 | test.done(); 42 | } 43 | 44 | exports.testList = function(test) { 45 | var options = parser.parse(["pos0", "pos1", "--list1=val0", "--list2", "val1", 46 | "--list2", "val2", "pos2"]); 47 | 48 | test.deepEqual(options.list1, ["val0"]); 49 | test.deepEqual(options.list2, ["val1", "val2"]); 50 | test.deepEqual(options.list3, ["pos1", "pos2"]); 51 | test.done(); 52 | } 53 | 54 | exports.testDefault = function(test) { 55 | var options = parser.parse(["--def2", "val2", "--def3", "val3"]); 56 | 57 | test.strictEqual(options.def1, "val1"); 58 | test.strictEqual(options.def2, "val2"); 59 | test.strictEqual(options.def3, "val3"); 60 | test.done(); 61 | } 62 | 63 | exports.testTypes = function(test) { 64 | var options = parser.parseArgs(["", "-x", "3.14", "-w", "true", "-q", "120", 65 | "--num1", "4"]); 66 | 67 | test.strictEqual(options[0], ""); 68 | test.strictEqual(options.x, 3.14); 69 | test.strictEqual(options.w, true); 70 | test.strictEqual(options.q, 120); 71 | test.strictEqual(options.num1, "4"); 72 | test.done(); 73 | } 74 | 75 | 76 | -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/.npmignore: -------------------------------------------------------------------------------- 1 | .project 2 | *.swp 3 | out 4 | -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Kevin Lakotko, Tony Barone, Brian Reavis 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: release 2 | 3 | release: 4 | ifeq ($(strip $(version)),) 5 | @echo "\033[31mERROR:\033[0;39m No version provided." 6 | @echo "\033[1;30mmake release version=1.0.0\033[0;39m" 7 | else 8 | sed -i.bak 's/"version": "[^"]*"/"version": "$(version)"/' package.json 9 | rm *.bak 10 | git add . 11 | git commit --allow-empty -a -m "Released $(version)." 12 | git tag v$(version) 13 | git push origin master 14 | git push origin --tags 15 | npm publish 16 | @echo "\033[32mv${version} released\033[0;39m" 17 | endif -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/README.md: -------------------------------------------------------------------------------- 1 | # yuidoc-lucid-theme 2 | 3 | A simple [YUIDoc](http://yui.github.io/yuidoc/) theme for single-module libraries. Based off [yuidoc-bootstrap-theme](https://github.com/kevinlacotaco/yuidoc-bootstrap-theme). 4 | 5 | ```sh 6 | $ npm install yuidoc-lucid-theme 7 | ``` 8 | 9 | [**Live Example**](http://naturalatlas.github.io/node-gdal/classes/gdal.html) 10 | 11 | ## Configuration 12 | 13 | ### Command-Line 14 | 15 | When running yuidoc directly from the command line without a configuration file, specify the theme with the following two arguments: 16 | 17 | - `-t` Theme directory 18 | - `-H` Template helpers 19 | 20 | ```sh 21 | $ yuidoc -t node_modules/yuidoc-lucid-theme -H node_modules/yuidoc-bootstrap-theme/helpers/helpers.js 22 | ``` 23 | 24 | ### Configuration File 25 | 26 | If your project uses a "yuidoc.json" file for configuration, add: 27 | 28 | ```js 29 | "themedir" : "node_modules/yuidoc-lucid-theme", 30 | "helpers" : ["node_modules/yuidoc-lucid-theme/helpers/helpers.js"] 31 | ``` 32 | 33 | Example: 34 | 35 | ```json 36 | { 37 | "name": "Example", 38 | "url": "www.example.com", 39 | "version": "0.1.0", 40 | "options": { 41 | "paths": "_location to parse_", 42 | "outdir": "build/docs", 43 | "exclude": "lib,docs,build", 44 | "themedir": "node_modules/yuidoc-lucid-theme", 45 | "helpers": ["node_modules/yuidoc-lucid-theme/helpers/helpers.js"] 46 | } 47 | } 48 | ``` 49 | 50 | ## License 51 | 52 | The MIT License (MIT) 53 | 54 | Copyright (c) 2014 [Kevin Lakotko](https://github.com/kevinlacotaco), [Tony Barone](https://github.com/tonybaroneee), [Brian Reavis](https://github.com/brianreavis) 55 | 56 | Permission is hereby granted, free of charge, to any person obtaining a copy 57 | of this software and associated documentation files (the "Software"), to deal 58 | in the Software without restriction, including without limitation the rights 59 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 60 | copies of the Software, and to permit persons to whom the Software is 61 | furnished to do so, subject to the following conditions: 62 | 63 | The above copyright notice and this permission notice shall be included in all 64 | copies or substantial portions of the Software. 65 | 66 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 67 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 68 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 69 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 70 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 71 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 72 | SOFTWARE. -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/assets/css/custom.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Custom styles for the YUIDoc Bootstrap Theme 3 | * Authors: kevinlacotaco 4 | * tonybaroneee 5 | */ 6 | 7 | /* -- Navigation Bar -------------------------------------------------------- */ 8 | 9 | .navbar .navbar-inner .brand { 10 | height: 40px; 11 | margin: 0; 12 | padding: 0 5px 0 10px; 13 | cursor: default; 14 | } 15 | 16 | .navbar-text { 17 | font-size: 12px; 18 | padding-left: 5px; 19 | cursor: default; 20 | } 21 | 22 | .navbar-form { 23 | margin-right: 3px; 24 | } 25 | 26 | #options-form { 27 | margin-top: 20px; 28 | padding-right: 20px; 29 | } 30 | 31 | /* -- Sidebar --------------------------------------------------------------- */ 32 | 33 | #sidebar .tab-content { 34 | border: 1px solid #DFDFDF; 35 | border-top: 0px; 36 | padding-bottom: 5px; 37 | -webkit-border-radius: 0 0 4px 4px; 38 | -moz-border-radius: 0 0 4px 4px; 39 | border-radius: 0 0 4px 4px; 40 | } 41 | 42 | #api-tabview-filter input { 43 | width: 94.5%; 44 | } 45 | 46 | #sidebar .tab-pane li a { 47 | overflow: hidden; 48 | white-space: nowrap; 49 | text-overflow: ellipsis; 50 | } 51 | 52 | #sidebar .tab-pane li a:hover, 53 | #sidebar .tab-pane li a:focus { 54 | outline: 0; 55 | border: 0; 56 | text-decoration: none; 57 | color: #ffffff; 58 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); 59 | background-color: #0088cc; 60 | } 61 | 62 | /* -- Content --------------------------------------------------------------- */ 63 | 64 | #docs-main { 65 | margin-top: 65px; 66 | } 67 | 68 | .content { 69 | padding-bottom: 50px; 70 | } 71 | 72 | .content .page-header h1 small { 73 | padding-left: 5px; 74 | } 75 | 76 | .content .well:not(.moduledesc) p { 77 | margin: 9px 0; 78 | } 79 | -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/assets/css/external-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserg-ufmg/JSCity/1d54dc991a768294be21b73ef8b0445b40f4fea5/js/node_modules/yuidoc-lucid-theme/assets/css/external-small.png -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserg-ufmg/JSCity/1d54dc991a768294be21b73ef8b0445b40f4fea5/js/node_modules/yuidoc-lucid-theme/assets/favicon.png -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/assets/img/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserg-ufmg/JSCity/1d54dc991a768294be21b73ef8b0445b40f4fea5/js/node_modules/yuidoc-lucid-theme/assets/img/spinner.gif -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/assets/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Redirector 5 | 6 | 7 | 8 | Click here to redirect 9 | 10 | 11 | -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/assets/vendor/bootstrap/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserg-ufmg/JSCity/1d54dc991a768294be21b73ef8b0445b40f4fea5/js/node_modules/yuidoc-lucid-theme/assets/vendor/bootstrap/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/assets/vendor/bootstrap/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aserg-ufmg/JSCity/1d54dc991a768294be21b73ef8b0445b40f4fea5/js/node_modules/yuidoc-lucid-theme/assets/vendor/bootstrap/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/assets/vendor/prettify/prettify-min.css: -------------------------------------------------------------------------------- 1 | .com {color: #93a1a1;}.lit{ color: #195f91;}.pun,.opn,.clo { color: #93a1a1;}.fun { color: #dc322f;}.str,.atv {color: #D14;}.kwd, .prettyprint .tag { color: #1e347b; }.typ, .atn, .dec, .var { color: teal; }.pln { color: #48484c; }.prettyprint {padding: 8px;background-color: #f7f7f9;border: 1px solid #e1e1e8;}.prettyprint.linenums {-webkit-box-shadow: inset 45px 0 0 #fbfbfc, inset 46px 0 0 #ececf0;-moz-box-shadow: inset 45px 0 0 #fbfbfc, inset 46px 0 0 #ececf0;box-shadow: inset 45px 0 0 #fbfbfc, inset 46px 0 0 #ececf0;}ol.linenums {margin: 0 0 0 43px;}ol.linenums li {padding-left: 12px;color: #bebec5;line-height: 20px;text-shadow: 0 1px 0 #fff;} -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/helpers/helpers.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | publicClasses: function(context, options) { 3 | 'use strict'; 4 | var ret = ""; 5 | 6 | for(var i=0; i < context.length; i++) { 7 | if(!context[i].itemtype && context[i].access === 'public') { 8 | ret = ret + options.fn(context[i]); 9 | } else if (context[i].itemtype) { 10 | ret = ret + options.fn(context[i]); 11 | } 12 | } 13 | 14 | return ret; 15 | }, 16 | /** 17 | * Hack for: 18 | * https://github.com/yui/yuidoc/issues/198 19 | * 20 | * Usage: 21 | * {{#crossLinkWrapper type}}{{#crossLink type}}{{/crossLink}}{{/crossLinkWrapper}} 22 | */ 23 | crossLinkWrapper: function(context, options) { 24 | if (!context) return ''; 25 | var types_raw = context.split('|'); 26 | var types_linked = options.fn(this).split('|'); 27 | 28 | return types_raw.map(function(type, i) { 29 | if (/\[\]/.test(type)) { 30 | if (/<\/a>/.test(types_linked[i])) { 31 | return types_linked[i].replace('', '[]'); 32 | } else { 33 | return types_linked[i].trim() + '[]'; 34 | } 35 | } else { 36 | return types_linked[i]; 37 | } 38 | }).join(' | '); 39 | }, 40 | notEmpty: function(context, options) { 41 | 'use strict'; 42 | if (!context || !String(context).replace(/\s/g, '')) return options.inverse(this); 43 | return options.fn(this); 44 | }, 45 | hasStaticMethods: function(context, options) { 46 | 'use strict'; 47 | var hasStatic = false; 48 | if (!context) return ''; 49 | for(var i=0; i < context.length; i++) { 50 | if (context[i]['static']) { 51 | hasStatic = true; 52 | break; 53 | } 54 | } 55 | if (hasStatic) { 56 | return options.fn(this); 57 | } 58 | return ''; 59 | }, 60 | hasInstanceMethods: function(context, options) { 61 | 'use strict'; 62 | var hasInstance = false; 63 | if (!context) return ''; 64 | for(var i=0; i < context.length; i++) { 65 | if (!context[i]['static']) { 66 | hasInstance = true; 67 | break; 68 | } 69 | } 70 | if (hasInstance) { 71 | return options.fn(this); 72 | } 73 | return ''; 74 | }, 75 | search : function(classes, modules) { 76 | 'use strict'; 77 | var ret = ''; 78 | 79 | for(var i=0; i < classes.length; i++) { 80 | if(i > 0) { 81 | ret += ', '; 82 | } 83 | ret += "\"" + 'classes/' + classes[i].displayName + "\""; 84 | } 85 | 86 | if(ret.length > 0 && modules.length > 0) { 87 | ret += ', '; 88 | } 89 | 90 | for(var j=0; j < modules.length; j++) { 91 | if(j > 0) { 92 | ret += ', '; 93 | } 94 | ret += "\"" + 'modules/' + modules[j].displayName + "\""; 95 | } 96 | 97 | return ret; 98 | } 99 | }; 100 | -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/layouts/main.handlebars: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{htmlTitle}} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 36 |
37 |
38 |
39 | {{>sidebar}} 40 |
41 |
42 | {{>options}} 43 |
44 |
45 |
46 | {{>layout_content}} 47 |
48 |
49 |
50 |
51 |
52 |
53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/layouts/xhr.handlebars: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{>layout_content}} 4 |
5 |
6 | 7 | 8 | -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "yuidoc-lucid-theme", 3 | "version": "0.1.1", 4 | "description": "A simple YUIDoc theme for single-module libraries.", 5 | "repository": { 6 | "type": "git", 7 | "url": "git://github.com/naturalatlas/yuidoc-lucid-theme.git" 8 | }, 9 | "keywords": [ 10 | "yuidoc" 11 | ], 12 | "author": { 13 | "name": "Brian Reavis" 14 | }, 15 | "contributors": [ 16 | { 17 | "name": "Brian Reavis", 18 | "email": "brian@thirdroute.com" 19 | }, 20 | { 21 | "name": "Anthony Barone", 22 | "email": "tonybaroneee@gmail.com" 23 | } 24 | ], 25 | "bugs": { 26 | "url": "https://github.com/naturalatlas/yuidoc-lucid-theme/issues" 27 | }, 28 | "homepage": "https://github.com/naturalatlas/yuidoc-lucid-theme", 29 | "license": "MIT", 30 | "_id": "yuidoc-lucid-theme@0.1.1", 31 | "dist": { 32 | "shasum": "d35847bfc06c909bda1aab8c3f6062fc36cfe1c8", 33 | "tarball": "http://registry.npmjs.org/yuidoc-lucid-theme/-/yuidoc-lucid-theme-0.1.1.tgz" 34 | }, 35 | "_from": "yuidoc-lucid-theme@*", 36 | "_npmVersion": "1.4.3", 37 | "_npmUser": { 38 | "name": "brianreavis", 39 | "email": "brian@thirdroute.com" 40 | }, 41 | "maintainers": [ 42 | { 43 | "name": "brianreavis", 44 | "email": "brian@thirdroute.com" 45 | } 46 | ], 47 | "directories": {}, 48 | "_shasum": "d35847bfc06c909bda1aab8c3f6062fc36cfe1c8", 49 | "_resolved": "https://registry.npmjs.org/yuidoc-lucid-theme/-/yuidoc-lucid-theme-0.1.1.tgz" 50 | } 51 | -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/partials/files.handlebars: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 |
 7 | {{fileData}}
 8 |     
9 |
10 | -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/partials/index.handlebars: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 | Browse to a module or class using the sidebar to view its API documentation. 5 |

6 | 7 |

Keyboard Shortcuts

8 | 9 |
    10 |
  • Press s to focus the API search box.

  • 11 | 12 |
  • Use Up and Down to select classes, modules, and search results.

  • 13 | 14 |
  • With the API search box or sidebar focused, use -Left or -Right to switch sidebar tabs.

  • 15 | 16 |
  • With the API search box or sidebar focused, use Ctrl+Left and Ctrl+Right to switch sidebar tabs.

  • 17 |
18 |
19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/partials/module.handlebars: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 | {{#extra}} 7 | {{#selleck}} 8 | User Guide & Examples 9 | {{/selleck}} 10 | {{/extra}} 11 | 12 | {{#if requires}} 13 |
14 | Requires 15 |
    16 | {{#requires}} 17 |
  • {{#crossLinkModule .}}{{/crossLinkModule}}
  • 18 | {{/requires}} 19 |
20 |
21 | {{/if}} 22 | 23 | {{#if foundAt}} 24 |
25 | Defined in: `{{{file}}}:{{{line}}}` 26 |
27 | {{/if}} 28 | 29 | {{#if since}} 30 |

Available since {{since}}

31 | {{/if}} 32 |
33 | 34 | {{#if deprecated}} 35 |
36 |

37 | {{#if deprecationMessage}} 38 | Deprecated: {{deprecationMessage}} 39 | {{else}} 40 | This module is deprecated. 41 | {{/if}} 42 |

43 |
44 | {{/if}} 45 | 46 |
47 | {{{moduleDescription}}} 48 |
49 | 50 | {{#example}} 51 |
52 |

Example:

53 |
54 | {{{.}}} 55 |
56 |
57 | {{/example}} 58 | 59 |
60 |
61 | {{#if moduleClasses}} 62 |

This module provides the following classes:

63 | 64 | 73 | {{/if}} 74 |
75 | 76 |
77 | {{#if subModules}} 78 |

This module is a rollup of the following modules:

79 | 80 | 93 | {{/if}} 94 |
95 |
96 | -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/partials/options.handlebars: -------------------------------------------------------------------------------- 1 |
2 | Show: 3 | 7 | 8 | 12 | 13 | 17 | 21 | 22 |
23 | 24 | -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/partials/sidebar.handlebars: -------------------------------------------------------------------------------- 1 |
2 | 11 |
12 | -------------------------------------------------------------------------------- /js/node_modules/yuidoc-lucid-theme/theme.json: -------------------------------------------------------------------------------- 1 | { 2 | "yuiSeedUrl": "http://yui.yahooapis.com/combo?3.7.0/build/yui/yui-min.js" 3 | } 4 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "js-city", 3 | "version": "1.1.0", 4 | "description": "A Tool for 3D visualization of javascript systems", 5 | "homepage": "http://aserg.labsoft.dcc.ufmg.br/", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/aserg-ufmg/JSCity.git" 9 | }, 10 | "engines": { 11 | "node": ">= 0.12" 12 | }, 13 | "scripts": { 14 | "start": "node ./js/server.js" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /provision_script.sh: -------------------------------------------------------------------------------- 1 | # provision_script.sh 2 | apt-get update 3 | debconf-set-selections <<< 'mysql-server mysql-server/root_password password your_password' 4 | debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password your_password' 5 | apt-get -y install mysql-server 6 | apt-get -y install nodejs 7 | cd /vagrant 8 | /usr/bin/mysql --user=root --password=your_password < sql/schema.sql 9 | /usr/bin/perl -i.bak -ne 's/"password": ""/"password": "your_password"/g; print;' js/config.json 10 | /usr/bin/nodejs js/server.js > /var/log/node-server-log.log 2>&1 & 11 | echo "" 12 | echo "------------------------------------------------------" 13 | echo "You can now visit http://localhost:8080 to see a city!" 14 | echo "------------------------------------------------------" 15 | echo "" 16 | --------------------------------------------------------------------------------