Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

vendoring node_modules not necessary

  • Loading branch information...
commit b4bfa6ffc094e20679bda5757347db8e275bd47e 1 parent 7a80afa
James Halliday authored
Showing with 0 additions and 29,747 deletions.
  1. +0 −2  roll_your_own_socketio/node_modules/JSONStream/.npmignore
  2. +0 −4 roll_your_own_socketio/node_modules/JSONStream/.travis.yml
  3. +0 −15 roll_your_own_socketio/node_modules/JSONStream/LICENSE.APACHE2
  4. +0 −24 roll_your_own_socketio/node_modules/JSONStream/LICENSE.MIT
  5. +0 −13 roll_your_own_socketio/node_modules/JSONStream/examples/all_docs.js
  6. +0 −171 roll_your_own_socketio/node_modules/JSONStream/index.js
  7. +0 −414 roll_your_own_socketio/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js
  8. +0 −25 roll_your_own_socketio/node_modules/JSONStream/node_modules/jsonparse/package.json
  9. +0 −35 roll_your_own_socketio/node_modules/JSONStream/package.json
  10. +0 −145 roll_your_own_socketio/node_modules/JSONStream/readme.markdown
  11. +0 −41 roll_your_own_socketio/node_modules/JSONStream/test/bool.js
  12. +0 −4,030 roll_your_own_socketio/node_modules/JSONStream/test/fixtures/all_npm.json
  13. +0 −39 roll_your_own_socketio/node_modules/JSONStream/test/fn.js
  14. +0 −28 roll_your_own_socketio/node_modules/JSONStream/test/parsejson.js
  15. +0 −41 roll_your_own_socketio/node_modules/JSONStream/test/stringify.js
  16. +0 −47 roll_your_own_socketio/node_modules/JSONStream/test/stringify_object.js
  17. +0 −35 roll_your_own_socketio/node_modules/JSONStream/test/test.js
  18. +0 −29 roll_your_own_socketio/node_modules/JSONStream/test/test2.js
  19. +0 −41 roll_your_own_socketio/node_modules/JSONStream/test/two-ways.js
  20. +0 −82 roll_your_own_socketio/node_modules/ecstatic/README.md
  21. +0 −6 roll_your_own_socketio/node_modules/ecstatic/example/core.js
  22. +0 −8 roll_your_own_socketio/node_modules/ecstatic/example/express.js
  23. +0 −1  roll_your_own_socketio/node_modules/ecstatic/example/public/beep/index.html
  24. +0 −1  roll_your_own_socketio/node_modules/ecstatic/example/public/hello.txt
  25. +0 −1  roll_your_own_socketio/node_modules/ecstatic/example/public/subdir/world.txt
  26. BIN  roll_your_own_socketio/node_modules/ecstatic/example/public/turtle.png
  27. +0 −10 roll_your_own_socketio/node_modules/ecstatic/example/union.js
  28. +0 −132 roll_your_own_socketio/node_modules/ecstatic/lib/ecstatic.js
  29. +0 −3  roll_your_own_socketio/node_modules/ecstatic/lib/ecstatic/etag.js
  30. +0 −22 roll_your_own_socketio/node_modules/ecstatic/lib/ecstatic/opts.js
  31. +0 −113 roll_your_own_socketio/node_modules/ecstatic/lib/ecstatic/showdir.js
  32. +0 −47 roll_your_own_socketio/node_modules/ecstatic/lib/ecstatic/status-handlers.js
  33. +0 −19 roll_your_own_socketio/node_modules/ecstatic/lib/templates/showdir.html
  34. +0 −1  roll_your_own_socketio/node_modules/ecstatic/node_modules/ent/.npmignore
  35. +0 −35 roll_your_own_socketio/node_modules/ecstatic/node_modules/ent/README.markdown
  36. +0 −255 roll_your_own_socketio/node_modules/ecstatic/node_modules/ent/entities.json
  37. +0 −3  roll_your_own_socketio/node_modules/ecstatic/node_modules/ent/examples/simple.js
  38. +0 −65 roll_your_own_socketio/node_modules/ecstatic/node_modules/ent/index.js
  39. +0 −33 roll_your_own_socketio/node_modules/ecstatic/node_modules/ent/package.json
  40. +0 −56 roll_your_own_socketio/node_modules/ecstatic/node_modules/ent/test/codes.js
  41. +0 −19 roll_your_own_socketio/node_modules/ecstatic/node_modules/mime/LICENSE
  42. +0 −63 roll_your_own_socketio/node_modules/ecstatic/node_modules/mime/README.md
  43. +0 −93 roll_your_own_socketio/node_modules/ecstatic/node_modules/mime/mime.js
  44. +0 −31 roll_your_own_socketio/node_modules/ecstatic/node_modules/mime/package.json
  45. +0 −53 roll_your_own_socketio/node_modules/ecstatic/node_modules/mime/test.js
  46. +0 −1,510 roll_your_own_socketio/node_modules/ecstatic/node_modules/mime/types/mime.types
  47. +0 −48 roll_your_own_socketio/node_modules/ecstatic/node_modules/mime/types/node.types
  48. +0 −43 roll_your_own_socketio/node_modules/ecstatic/package.json
  49. +0 −85 roll_your_own_socketio/node_modules/ecstatic/test/express.js
  50. +0 −1  roll_your_own_socketio/node_modules/ecstatic/test/express/a.txt
  51. +0 −1  roll_your_own_socketio/node_modules/ecstatic/test/express/b.txt
  52. +0 −1  roll_your_own_socketio/node_modules/ecstatic/test/express/c.js
  53. +0 −1  roll_your_own_socketio/node_modules/ecstatic/test/express/subdir/e.html
  54. +0 −1  roll_your_own_socketio/node_modules/ecstatic/test/express/subdir/index.html
  55. +0 −4 roll_your_own_socketio/node_modules/emit-stream/.travis.yml
  56. +0 −18 roll_your_own_socketio/node_modules/emit-stream/LICENSE
  57. +0 −16 roll_your_own_socketio/node_modules/emit-stream/example/client-server/client.js
  58. +0 −30 roll_your_own_socketio/node_modules/emit-stream/example/client-server/server.js
  59. +0 −45 roll_your_own_socketio/node_modules/emit-stream/example/emit.js
  60. +0 −49 roll_your_own_socketio/node_modules/emit-stream/index.js
  61. +0 −41 roll_your_own_socketio/node_modules/emit-stream/package.json
  62. +0 −117 roll_your_own_socketio/node_modules/emit-stream/readme.markdown
  63. +0 −73 roll_your_own_socketio/node_modules/emit-stream/test/emit.js
  64. +0 −1  roll_your_own_socketio/node_modules/shoe/.npmignore
  65. +0 −18 roll_your_own_socketio/node_modules/shoe/LICENSE
  66. +0 −207 roll_your_own_socketio/node_modules/shoe/README.markdown
  67. +0 −66 roll_your_own_socketio/node_modules/shoe/browser.js
  68. +0 −2  roll_your_own_socketio/node_modules/shoe/example/dnode/Makefile
  69. +0 −16 roll_your_own_socketio/node_modules/shoe/example/dnode/client.js
  70. +0 −11 roll_your_own_socketio/node_modules/shoe/example/dnode/package.json
  71. +0 −19 roll_your_own_socketio/node_modules/shoe/example/dnode/server.js
  72. +0 −4,579 roll_your_own_socketio/node_modules/shoe/example/dnode/static/bundle.js
  73. +0 −2  roll_your_own_socketio/node_modules/shoe/example/dnode/static/index.html
  74. +0 −2  roll_your_own_socketio/node_modules/shoe/example/invert/Makefile
  75. +0 −14 roll_your_own_socketio/node_modules/shoe/example/invert/client.js
  76. +0 −11 roll_your_own_socketio/node_modules/shoe/example/invert/package.json
  77. +0 −19 roll_your_own_socketio/node_modules/shoe/example/invert/server.js
  78. +0 −4,103 roll_your_own_socketio/node_modules/shoe/example/invert/static/bundle.js
  79. +0 −2  roll_your_own_socketio/node_modules/shoe/example/invert/static/index.html
  80. +0 −36 roll_your_own_socketio/node_modules/shoe/index.js
  81. +0 −3  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/.npmignore
  82. +0 −11 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/COPYING
  83. +0 −128 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/Changelog
  84. +0 −19 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/LICENSE-MIT-SockJS
  85. +0 −107 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/Makefile
  86. +0 −379 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/README.md
  87. +0 −17 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/VERSION-GEN
  88. +0 −111 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/bin/render.coffee
  89. +0 −135 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/bin/run_testling.sh
  90. +0 −9 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/all.js
  91. +0 −205 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/dom.js
  92. +0 −191 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/dom2.js
  93. +0 −31 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/eventemitter.js
  94. +0 −41 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/index.js
  95. +0 −114 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/info.js
  96. +0 −1  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/json2.min.js
  97. +0 −55 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/reventtarget.js
  98. +0 −28 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/simpleevent.js
  99. +0 −261 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/sockjs.js
  100. +0 −16 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/test-hooks.js
  101. +0 −29 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-iframe-eventsource.js
  102. +0 −35 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-iframe-htmlfile.js
  103. +0 −94 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-iframe-within.js
  104. +0 −30 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-iframe-xhr-polling.js
  105. +0 −93 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-iframe.js
  106. +0 −85 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-jsonp-polling.js
  107. +0 −114 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-jsonp-receiver.js
  108. +0 −44 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-polling.js
  109. +0 −41 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-receiver-eventsource.js
  110. +0 −65 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-receiver-htmlfile.js
  111. +0 −42 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-receiver-xhr.js
  112. +0 −135 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-sender.js
  113. +0 −60 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-websocket.js
  114. +0 −89 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/trans-xhr.js
  115. +0 −325 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/lib/utils.js
  116. +0 −30 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/package.json
  117. +0 −2,323 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/sockjs.js
  118. +0 −1  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-client/version
  119. +0 −5 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/.npmignore
  120. +0 −6 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/COPYING
  121. +0 −126 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/Changelog
  122. +0 −19 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/LICENSE-MIT-SockJS
  123. +0 −55 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/Makefile
  124. +0 −429 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/README.md
  125. +0 −15 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/echo/README.md
  126. +0 −71 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/echo/index.html
  127. +0 −8 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/echo/package.json
  128. +0 −30 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/echo/server.js
  129. +0 −71 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/express-3.x/index.html
  130. +0 −8 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/express-3.x/package.json
  131. +0 −26 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/express-3.x/server.js
  132. +0 −71 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/express/index.html
  133. +0 −8 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/express/package.json
  134. +0 −23 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/express/server.js
  135. +0 −42 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/haproxy.cfg
  136. +0 −26 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/multiplex/README.md
  137. +0 −96 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/multiplex/index.html
  138. +0 −9 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/multiplex/package.json
  139. +0 −52 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/multiplex/server.js
  140. +0 −30 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/test_server/README.md
  141. +0 −9 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/test_server/config.js
  142. +0 −7 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/test_server/package.json
  143. +0 −19 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/test_server/server.js
  144. +0 −85 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/examples/test_server/sockjs_app.js
  145. +0 −1  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/index.js
  146. +0 −73 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/chunking-test.js
  147. +0 −29 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/iframe.js
  148. +0 −217 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/sockjs.js
  149. +0 −40 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/trans-eventsource.js
  150. +0 −58 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/trans-htmlfile.js
  151. +0 −104 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/trans-jsonp.js
  152. +0 −207 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/trans-websocket.js
  153. +0 −116 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/trans-xhr.js
  154. +0 −372 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/transport.js
  155. +0 −169 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/utils.js
  156. +0 −283 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/lib/webjs.js
  157. +0 −40 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/CHANGELOG.txt
  158. +0 −248 ...your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/README.markdown
  159. +0 −40 ...ketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/examples/autobahn_client.js
  160. +0 −22 ...r_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/examples/client.js
  161. +0 −21 ...wn_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/examples/haproxy.conf
  162. +0 −70 ...r_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/examples/server.js
  163. +0 −39 ...ur_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/examples/sse.html
  164. +0 −44 ...our_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/examples/ws.html
  165. +0 −104 ..._socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/eventsource.js
  166. +0 −91 ...wn_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/websocket.js
  167. +0 −83 ...ocketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/websocket/api.js
  168. +0 −21 ...o/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/websocket/api/event.js
  169. +0 −47 ...modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/websocket/api/event_target.js
  170. +0 −83 ...etio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/websocket/client.js
  171. +0 −98 ...e_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/websocket/draft75_parser.js
  172. +0 −99 ...e_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/websocket/draft76_parser.js
  173. +0 −354 ...node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/websocket/hybi_parser.js
  174. +0 −91 ...es/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/websocket/hybi_parser/handshake.js
  175. +0 −43 ...hoe/node_modules/sockjs-windows/node_modules/faye-websocket/lib/faye/websocket/hybi_parser/stream_reader.js
  176. +0 −41 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/package.json
  177. +0 −162 ...ode_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/spec/faye/websocket/client_spec.js
  178. +0 −72 ...ules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/spec/faye/websocket/draft75parser_spec.js
  179. +0 −28 ...ules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/spec/faye/websocket/draft76parser_spec.js
  180. +0 −157 ...odules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/spec/faye/websocket/hybi_parser_spec.js
  181. +0 −54 ..._your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/spec/runner.js
  182. +0 −15 ...your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/spec/server.crt
  183. +0 −15 ...your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/faye-websocket/spec/server.key
  184. +0 −2  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/node-uuid/.npmignore
  185. +0 −3  roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/node-uuid/LICENSE.md
  186. +0 −199 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/node-uuid/README.md
  187. +0 −53 ..._your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/node-uuid/benchmark/README.md
  188. +0 −174 ..._your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/node-uuid/benchmark/bench.gnu
  189. +0 −34 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/node-uuid/benchmark/bench.sh
  190. +0 −34 ..._socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/node-uuid/benchmark/benchmark-native.c
  191. +0 −84 ...ur_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/node-uuid/benchmark/benchmark.js
  192. +0 −30 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/node-uuid/package.json
  193. +0 −63 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/node-uuid/test/compare_v1.js
  194. +0 −17 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/node-uuid/test/test.html
  195. +0 −240 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/node-uuid/test/test.js
  196. +0 −249 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/node_modules/node-uuid/uuid.js
  197. +0 −28 roll_your_own_socketio/node_modules/shoe/node_modules/sockjs-windows/package.json
  198. +0 −37 roll_your_own_socketio/node_modules/shoe/package.json
  199. +0 −4 roll_your_own_socketio/node_modules/through/.travis.yml
  200. +0 −15 roll_your_own_socketio/node_modules/through/LICENSE.APACHE2
  201. +0 −24 roll_your_own_socketio/node_modules/through/LICENSE.MIT
  202. +0 −67 roll_your_own_socketio/node_modules/through/index.js
  203. +0 −34 roll_your_own_socketio/node_modules/through/package.json
  204. +0 −26 roll_your_own_socketio/node_modules/through/readme.markdown
  205. +0 −113 roll_your_own_socketio/node_modules/through/test/index.js
2  roll_your_own_socketio/node_modules/JSONStream/.npmignore
View
@@ -1,2 +0,0 @@
-node_modules/*
-node_modules
4 roll_your_own_socketio/node_modules/JSONStream/.travis.yml
View
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - 0.4
- - 0.6
15 roll_your_own_socketio/node_modules/JSONStream/LICENSE.APACHE2
View
@@ -1,15 +0,0 @@
-Apache License, Version 2.0
-
-Copyright (c) 2011 Dominic Tarr
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
24 roll_your_own_socketio/node_modules/JSONStream/LICENSE.MIT
View
@@ -1,24 +0,0 @@
-The MIT License
-
-Copyright (c) 2011 Dominic Tarr
-
-Permission is hereby granted, free of charge,
-to any person obtaining a copy of this software and
-associated documentation files (the "Software"), to
-deal in the Software without restriction, including
-without limitation the rights to use, copy, modify,
-merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom
-the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice
-shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13 roll_your_own_socketio/node_modules/JSONStream/examples/all_docs.js
View
@@ -1,13 +0,0 @@
-var request = require('request')
- , JSONStream = require('JSONStream')
- , es = require('event-stream')
-
-var parser = JSONStream.parse(['rows', true]) //emit parts that match this path (any element of the rows array)
- , req = request({url: 'http://isaacs.couchone.com/registry/_all_docs'})
- , logger = es.mapSync(function (data) { //create a stream that logs to stderr,
- console.error(data)
- return data
- })
-
-req.pipe(parser)
-parser.pipe(logger)
171 roll_your_own_socketio/node_modules/JSONStream/index.js
View
@@ -1,171 +0,0 @@
-var Parser = require('jsonparse')
- , Stream = require('stream').Stream
-
-/*
-
- the value of this.stack that creationix's jsonparse has is weird.
-
- it makes this code ugly, but his problem is way harder that mine,
- so i'll forgive him.
-
-*/
-
-exports.parse = function (path) {
-
- var stream = new Stream()
- var parser = new Parser()
- var count = 0
- if(!path.length)
- path = null
- parser.onValue = function () {
- if(!this.root && this.stack.length == 1){
- stream.root = this.value
- }
- if(!path || this.stack.length !== path.length)
- return
- var _path = []
- for( var i = 0; i < (path.length - 1); i++) {
- var key = path[i]
- var c = this.stack[1 + (+i)]
-
- if(!c) {
- return
- }
- var m = check(key, c.key)
- _path.push(c.key)
-
- if(!m)
- return
-
- }
- var c = this
-
- var key = path[path.length - 1]
- var m = check(key, c.key)
- if(!m)
- return
- _path.push(c.key)
-
- count ++
- stream.emit('data', this.value[this.key])
- }
-
-
- parser.onError = function (err) {
- stream.emit('error', err)
- }
- stream.readable = true
- stream.writable = true
- stream.write = function (chunk) {
- if('string' === typeof chunk) {
- if ('undefined' === typeof Buffer) {
- var buf = new Array(chunk.length)
- for (var i = 0; i < chunk.length; i++) buf[i] = chunk.charCodeAt(i)
- chunk = new Int32Array(buf)
- } else {
- chunk = new Buffer(chunk)
- }
- }
- parser.write(chunk)
- }
- stream.end = function (data) {
- if(data)
- stream.write(data)
- stream.emit('root', stream.root, count)
- stream.emit('end')
- }
- return stream
-}
-
-function check (x, y) {
- if ('string' === typeof x)
- return y == x
- else if (x && 'function' === typeof x.exec)
- return x.exec(y)
- else if ('boolean' === typeof x)
- return x
- else if ('function' === typeof x)
- return x(y)
- return false
-}
-
-exports.stringify = function (op, sep, cl) {
- if (op === false){
- op = ''
- sep = '\n'
- cl = ''
- } else if (op == null) {
-
- op = '[\n'
- sep = '\n,\n'
- cl = '\n]\n'
-
- }
-
- //else, what ever you like
-
- var stream = new Stream ()
- , first = true
- , ended = false
- , anyData = false
- stream.write = function (data) {
- anyData = true
- var json = JSON.stringify(data)
- if(first) { first = false ; stream.emit('data', op + json)}
- else stream.emit('data', sep + json)
- }
- stream.end = function (data) {
- if(ended)
- return
- ended = true
- if(data) stream.write(data)
- if(!anyData) stream.emit('data', op)
- stream.emit('data', cl)
-
- stream.emit('end')
- }
- stream.writable = true
- stream.readable = true
-
- return stream
-}
-
-exports.stringifyObject = function (op, sep, cl) {
- if (op === false){
- op = ''
- sep = '\n'
- cl = ''
- } else if (op == null) {
-
- op = '{\n'
- sep = '\n,\n'
- cl = '\n}\n'
-
- }
-
- //else, what ever you like
-
- var stream = new Stream ()
- , first = true
- , ended = false
- , anyData = false
- stream.write = function (data) {
- anyData = true
- var json = JSON.stringify(data[0]) + ':' + JSON.stringify(data[1])
- if(first) { first = false ; stream.emit('data', op + json)}
- else stream.emit('data', sep + json)
- }
- stream.end = function (data) {
- if(ended) return
- ended = true
- if(data) stream.write(data)
- if(!anyData) stream.emit('data', op)
- stream.emit('data', cl)
-
- stream.emit('end')
- }
- stream.writable = true
- stream.readable = true
-
- return stream
-}
414 roll_your_own_socketio/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js
View
@@ -1,414 +0,0 @@
-/*global Buffer*/
-// Named constants with unique integer values
-var C = {};
-// Tokens
-var LEFT_BRACE = C.LEFT_BRACE = 0x1;
-var RIGHT_BRACE = C.RIGHT_BRACE = 0x2;
-var LEFT_BRACKET = C.LEFT_BRACKET = 0x3;
-var RIGHT_BRACKET = C.RIGHT_BRACKET = 0x4;
-var COLON = C.COLON = 0x5;
-var COMMA = C.COMMA = 0x6;
-var TRUE = C.TRUE = 0x7;
-var FALSE = C.FALSE = 0x8;
-var NULL = C.NULL = 0x9;
-var STRING = C.STRING = 0xa;
-var NUMBER = C.NUMBER = 0xb;
-// Tokenizer States
-var START = C.START = 0x11;
-var TRUE1 = C.TRUE1 = 0x21;
-var TRUE2 = C.TRUE2 = 0x22;
-var TRUE3 = C.TRUE3 = 0x23;
-var FALSE1 = C.FALSE1 = 0x31;
-var FALSE2 = C.FALSE2 = 0x32;
-var FALSE3 = C.FALSE3 = 0x33;
-var FALSE4 = C.FALSE4 = 0x34;
-var NULL1 = C.NULL1 = 0x41;
-var NULL2 = C.NULL3 = 0x42;
-var NULL3 = C.NULL2 = 0x43;
-var NUMBER1 = C.NUMBER1 = 0x51;
-var NUMBER2 = C.NUMBER2 = 0x52;
-var NUMBER3 = C.NUMBER3 = 0x53;
-var NUMBER4 = C.NUMBER4 = 0x54;
-var NUMBER5 = C.NUMBER5 = 0x55;
-var NUMBER6 = C.NUMBER6 = 0x56;
-var NUMBER7 = C.NUMBER7 = 0x57;
-var NUMBER8 = C.NUMBER8 = 0x58;
-var STRING1 = C.STRING1 = 0x61;
-var STRING2 = C.STRING2 = 0x62;
-var STRING3 = C.STRING3 = 0x63;
-var STRING4 = C.STRING4 = 0x64;
-var STRING5 = C.STRING5 = 0x65;
-var STRING6 = C.STRING6 = 0x66;
-// Parser States
-var VALUE = C.VALUE = 0x71;
-var KEY = C.KEY = 0x72;
-// Parser Modes
-var OBJECT = C.OBJECT = 0x81;
-var ARRAY = C.ARRAY = 0x82;
-
-// Slow code to string converter (only used when throwing syntax errors)
-function toknam(code) {
- var keys = Object.keys(C);
- for (var i = 0, l = keys.length; i < l; i++) {
- var key = keys[i];
- if (C[key] === code) { return key; }
- }
- return code && ("0x" + code.toString(16));
-}
-
-
-function Parser() {
- this.tState = START;
- this.value = undefined;
-
- this.string = undefined; // string data
- this.unicode = undefined; // unicode escapes
-
- // For number parsing
- this.negative = undefined;
- this.magnatude = undefined;
- this.position = undefined;
- this.exponent = undefined;
- this.negativeExponent = undefined;
-
- this.key = undefined;
- this.mode = undefined;
- this.stack = [];
- this.state = VALUE;
-}
-var proto = Parser.prototype;
-proto.charError = function (buffer, i) {
- this.onError(new Error("Unexpected " + JSON.stringify(String.fromCharCode(buffer[i])) + " at position " + i + " in state " + toknam(this.tState)));
-};
-proto.onError = function (err) { throw err; };
-proto.write = function (buffer) {
- //process.stdout.write("Input: ");
- //console.dir(buffer.toString());
- var n;
- for (var i = 0, l = buffer.length; i < l; i++) {
- switch (this.tState) {
- case START:
- n = buffer[i];
- switch (n) {
- case 0x7b: this.onToken(LEFT_BRACE, "{"); break; // {
- case 0x7d: this.onToken(RIGHT_BRACE, "}"); break; // }
- case 0x5b: this.onToken(LEFT_BRACKET, "["); break; // [
- case 0x5d: this.onToken(RIGHT_BRACKET, "]"); break; // ]
- case 0x3a: this.onToken(COLON, ":"); break; // :
- case 0x2c: this.onToken(COMMA, ","); break; // ,
- case 0x74: this.tState = TRUE1; break; // t
- case 0x66: this.tState = FALSE1; break; // f
- case 0x6e: this.tState = NULL1; break; // n
- case 0x22: this.string = ""; this.tState = STRING1; break; // "
- case 0x2d: this.negative = true; this.tState = NUMBER1; break; // -
- case 0x30: this.magnatude = 0; this.tState = NUMBER2; break; // 0
- default:
- if (n > 0x30 && n < 0x40) { // 1-9
- this.magnatude = n - 0x30; this.tState = NUMBER3;
- } else if (n === 0x20 || n === 0x09 || n === 0x0a || n === 0x0d) {
- // whitespace
- } else { this.charError(buffer, i); }
- break;
- }
- break;
- case STRING1: // After open quote
- n = buffer[i];
- // TODO: Handle native utf8 characters, this code assumes ASCII input
- if (n === 0x22) { this.tState = START; this.onToken(STRING, this.string); this.string = undefined; }
- else if (n === 0x5c) { this.tState = STRING2; }
- else if (n >= 0x20) { this.string += String.fromCharCode(n); }
- else { this.charError(buffer, i); }
- break;
- case STRING2: // After backslash
- n = buffer[i];
- switch (n) {
- case 0x22: this.string += "\""; this.tState = STRING1; break;
- case 0x5c: this.string += "\\"; this.tState = STRING1; break;
- case 0x2f: this.string += "\/"; this.tState = STRING1; break;
- case 0x62: this.string += "\b"; this.tState = STRING1; break;
- case 0x66: this.string += "\f"; this.tState = STRING1; break;
- case 0x6e: this.string += "\n"; this.tState = STRING1; break;
- case 0x72: this.string += "\r"; this.tState = STRING1; break;
- case 0x74: this.string += "\t"; this.tState = STRING1; break;
- case 0x75: this.unicode = ""; this.tState = STRING3; break;
- default: this.charError(buffer, i); break;
- }
- break;
- case STRING3: case STRING4: case STRING5: case STRING6: // unicode hex codes
- n = buffer[i];
- // 0-9 A-F a-f
- if ((n >= 0x30 && n < 0x40) || (n > 0x40 && n <= 0x46) || (n > 0x60 && n <= 0x66)) {
- this.unicode += String.fromCharCode(n);
- if (this.tState++ === STRING6) {
- this.string += String.fromCharCode(parseInt(this.unicode, 16));
- this.unicode = undefined;
- this.tState = STRING1;
- }
- } else {
- this.charError(buffer, i);
- }
- break;
- case NUMBER1: // after minus
- n = buffer[i];
- if (n === 0x30) { this.magnatude = 0; this.tState = NUMBER2; }
- else if (n > 0x30 && n < 0x40) { this.magnatude = n - 0x30; this.tState = NUMBER3; }
- else { this.charError(buffer, i); }
- break;
- case NUMBER2: // * After initial zero
- switch (buffer[i]) {
- case 0x2e: // .
- this.position = 0.1; this.tState = NUMBER4; break;
- case 0x65: case 0x45: // e/E
- this.exponent = 0; this.tState = NUMBER6; break;
- default:
- this.tState = START;
- this.onToken(NUMBER, 0);
- this.magnatude = undefined;
- this.negative = undefined;
- i--;
- break;
- }
- break;
- case NUMBER3: // * After digit (before period)
- n = buffer[i];
- switch (n) {
- case 0x2e: // .
- this.position = 0.1; this.tState = NUMBER4; break;
- case 0x65: case 0x45: // e/E
- this.exponent = 0; this.tState = NUMBER6; break;
- default:
- if (n >= 0x30 && n < 0x40) { this.magnatude = this.magnatude * 10 + n - 0x30; }
- else {
- this.tState = START;
- if (this.negative) {
- this.magnatude = -this.magnatude;
- this.negative = undefined;
- }
- this.onToken(NUMBER, this.magnatude);
- this.magnatude = undefined;
- i--;
- }
- break;
- }
- break;
- case NUMBER4: // After period
- n = buffer[i];
- if (n >= 0x30 && n < 0x40) { // 0-9
- this.magnatude += this.position * (n - 0x30);
- this.position /= 10;
- this.tState = NUMBER5;
- } else { this.charError(buffer, i); }
- break;
- case NUMBER5: // * After digit (after period)
- n = buffer[i];
- if (n >= 0x30 && n < 0x40) { // 0-9
- this.magnatude += this.position * (n - 0x30);
- this.position /= 10;
- }
- else if (n === 0x65 || n === 0x45) { this.exponent = 0; this.tState = NUMBER6; } // E/e
- else {
- this.tState = START;
- if (this.negative) {
- this.magnatude = -this.magnatude;
- this.negative = undefined;
- }
- this.onToken(NUMBER, this.negative ? -this.magnatude : this.magnatude);
- this.magnatude = undefined;
- this.position = undefined;
- i--;
- }
- break;
- case NUMBER6: // After E
- n = buffer[i];
- if (n === 0x2b || n === 0x2d) { // +/-
- if (n === 0x2d) { this.negativeExponent = true; }
- this.tState = NUMBER7;
- }
- else if (n >= 0x30 && n < 0x40) {
- this.exponent = this.exponent * 10 + (n - 0x30);
- this.tState = NUMBER8;
- }
- else { this.charError(buffer, i); }
- break;
- case NUMBER7: // After +/-
- n = buffer[i];
- if (n >= 0x30 && n < 0x40) { // 0-9
- this.exponent = this.exponent * 10 + (n - 0x30);
- this.state = NUMBER8;
- }
- else { this.charError(buffer, i); }
- break;
- case NUMBER8: // * After digit (after +/-)
- n = buffer[i];
- if (n >= 0x30 && n < 0x40) { // 0-9
- this.exponent = this.exponent * 10 + (n - 0x30);
- }
- else {
- if (this.negativeExponent) {
- this.exponent = -this.exponent;
- this.negativeExponent = undefined;
- }
- this.magnatude *= Math.pow(10, this.exponent);
- this.exponent = undefined;
- if (this.negative) {
- this.magnatude = -this.magnatude;
- this.negative = undefined;
- }
- this.tState = START;
- this.onToken(NUMBER, this.magnatude);
- this.magnatude = undefined;
- i--;
- }
- break;
- case TRUE1: // r
- if (buffer[i] === 0x72) { this.tState = TRUE2; }
- else { this.charError(buffer, i); }
- break;
- case TRUE2: // u
- if (buffer[i] === 0x75) { this.tState = TRUE3; }
- else { this.charError(buffer, i); }
- break;
- case TRUE3: // e
- if (buffer[i] === 0x65) { this.tState = START; this.onToken(TRUE, true); }
- else { this.charError(buffer, i); }
- break;
- case FALSE1: // a
- if (buffer[i] === 0x61) { this.tState = FALSE2; }
- else { this.charError(buffer, i); }
- break;
- case FALSE2: // l
- if (buffer[i] === 0x6c) { this.tState = FALSE3; }
- else { this.charError(buffer, i); }
- break;
- case FALSE3: // s
- if (buffer[i] === 0x73) { this.tState = FALSE4; }
- else { this.charError(buffer, i); }
- break;
- case FALSE4: // e
- if (buffer[i] === 0x65) { this.tState = START; this.onToken(FALSE, false); }
- else { this.charError(buffer, i); }
- break;
- case NULL1: // u
- if (buffer[i] === 0x75) { this.tState = NULL2; }
- else { this.charError(buffer, i); }
- break;
- case NULL2: // l
- if (buffer[i] === 0x6c) { this.tState = NULL3; }
- else { this.charError(buffer, i); }
- break;
- case NULL3: // l
- if (buffer[i] === 0x6c) { this.tState = START; this.onToken(NULL, null); }
- else { this.charError(buffer, i); }
- break;
- }
- }
-};
-proto.onToken = function (token, value) {
- // Override this to get events
-};
-
-proto.parseError = function (token, value) {
- this.onError(new Error("Unexpected " + toknam(token) + (value ? ("(" + JSON.stringify(value) + ")") : "") + " in state " + toknam(this.state)));
-};
-proto.onError = function (err) { throw err; };
-proto.push = function () {
- this.stack.push({value: this.value, key: this.key, mode: this.mode});
-};
-proto.pop = function () {
- var value = this.value;
- var parent = this.stack.pop();
- this.value = parent.value;
- this.key = parent.key;
- this.mode = parent.mode;
- this.emit(value);
- if (!this.mode) { this.state = VALUE; }
-};
-proto.emit = function (value) {
- if (this.mode) { this.state = COMMA; }
- this.onValue(value);
-};
-proto.onValue = function (value) {
- // Override me
-};
-proto.onToken = function (token, value) {
- //console.log("OnToken: state=%s token=%s %s", toknam(this.state), toknam(token), value?JSON.stringify(value):"");
- switch (this.state) {
- case VALUE:
- switch (token) {
- case STRING: case NUMBER: case TRUE: case FALSE: case NULL:
- if (this.value) {
- this.value[this.key] = value;
- }
- this.emit(value);
- break;
- case LEFT_BRACE:
- this.push();
- if (this.value) {
- this.value = this.value[this.key] = {};
- } else {
- this.value = {};
- }
- this.key = undefined;
- this.state = KEY;
- this.mode = OBJECT;
- break;
- case LEFT_BRACKET:
- this.push();
- if (this.value) {
- this.value = this.value[this.key] = [];
- } else {
- this.value = [];
- }
- this.key = 0;
- this.mode = ARRAY;
- this.state = VALUE;
- break;
- case RIGHT_BRACE:
- if (this.mode === OBJECT) {
- this.pop();
- } else {
- this.parseError(token, value);
- }
- break;
- case RIGHT_BRACKET:
- if (this.mode === ARRAY) {
- this.pop();
- } else {
- this.parseError(token, value);
- }
- break;
- default:
- this.parseError(token, value); break;
- }
- break;
- case KEY:
- if (token === STRING) {
- this.key = value;
- this.state = COLON;
- } else if (token === RIGHT_BRACE) {
- this.pop();
- } else {
- this.parseError(token, value);
- }
- break;
- case COLON:
- if (token === COLON) { this.state = VALUE; }
- else { this.parseError(token, value); }
- break;
- case COMMA:
- if (token === COMMA) {
- if (this.mode === ARRAY) { this.key++; this.state = VALUE; }
- else if (this.mode === OBJECT) { this.state = KEY; }
-
- } else if (token === RIGHT_BRACKET && this.mode === ARRAY || token === RIGHT_BRACE && this.mode === OBJECT) {
- this.pop();
- } else {
- this.parseError(token, value);
- }
- break;
- default:
- this.parseError(token, value);
- }
-};
-
-module.exports = Parser;
25 roll_your_own_socketio/node_modules/JSONStream/node_modules/jsonparse/package.json
View
@@ -1,25 +0,0 @@
-{
- "name": "jsonparse",
- "description": "This is a pure-js JSON streaming parser for node.js",
- "tags": [
- "json",
- "stream"
- ],
- "version": "0.0.1",
- "author": {
- "name": "Tim Caswell",
- "email": "tim@creationix.com"
- },
- "repository": {
- "type": "git",
- "url": "http://github.com/creationix/jsonparse.git"
- },
- "bugs": "http://github.com/creationix/jsonparse/issues",
- "engines": [
- "node >= 0.2.0"
- ],
- "main": "jsonparse.js",
- "_id": "jsonparse@0.0.1",
- "readme": "ERROR: No README.md file found!",
- "_from": "jsonparse@0.0.1"
-}
35 roll_your_own_socketio/node_modules/JSONStream/package.json
View
@@ -1,35 +0,0 @@
-{
- "name": "JSONStream",
- "version": "0.3.1",
- "description": "rawStream.pipe(JSONStream.parse()).pipe(streamOfObjects)",
- "homepage": "http://github.com/dominictarr/JSONStream",
- "repository": {
- "type": "git",
- "url": "git://github.com/dominictarr/JSONStream.git"
- },
- "dependencies": {
- "jsonparse": "0.0.1"
- },
- "devDependencies": {
- "it-is": "~1",
- "assertions": "~2.2.2",
- "render": "~0.1.1",
- "trees": "~0.0.3",
- "event-stream": "~0.7.0"
- },
- "author": {
- "name": "Dominic Tarr",
- "email": "dominic.tarr@gmail.com",
- "url": "http://bit.ly/dominictarr"
- },
- "scripts": {
- "test": "for t in test/*.js; do echo *** $t ***; node $t; done"
- },
- "optionalDependencies": {},
- "engines": {
- "node": "*"
- },
- "readme": "# JSONStream\n\nstreaming JSON.parse and stringify\n\n<img src=https://secure.travis-ci.org/dominictarr/JSONStream.png?branch=master>\n\n## example\n\n```javascript\n\nvar request = require('request')\n , JSONStream = require('JSONStream')\n , es = require('event-stream')\n\nvar parser = JSONStream.parse(['rows', true])\n , req = request({url: 'http://isaacs.couchone.com/registry/_all_docs'})\n , logger = es.mapSync(function (data) {\n console.error(data)\n return data\n })\n```\n\nin node 0.4.x\n\n``` javascript\n\nreq.pipe(parser)\nparser.pipe(logger)\n\n```\n\nin node v0.5.x\n\n``` javascript\nreq.pipe(parser).pipe(logger)\n\n```\n\n## JSONStream.parse(path)\n\nusally, a json API will return a list of objects.\n\n`path` should be an array of property names, `RegExp`s, booleans, and/or functions.\nany object that matches the path will be emitted as 'data' (and `pipe`d down stream)\n\na 'root' event is emitted when all data has been received. The 'root' event passes the root object & the count of matched objects.\n\nif `path` is empty or null, no 'data' events are emitted.\n\n### example\n\nquery a couchdb view:\n\n``` bash\ncurl -sS localhost:5984/tests/_all_docs&include_docs=true\n```\nyou will get something like this:\n\n``` js\n{\"total_rows\":129,\"offset\":0,\"rows\":[\n { \"id\":\"change1_0.6995461115147918\"\n , \"key\":\"change1_0.6995461115147918\"\n , \"value\":{\"rev\":\"1-e240bae28c7bb3667f02760f6398d508\"}\n , \"doc\":{\n \"_id\": \"change1_0.6995461115147918\"\n , \"_rev\": \"1-e240bae28c7bb3667f02760f6398d508\",\"hello\":1}\n },\n { \"id\":\"change2_0.6995461115147918\"\n , \"key\":\"change2_0.6995461115147918\"\n , \"value\":{\"rev\":\"1-13677d36b98c0c075145bb8975105153\"}\n , \"doc\":{\n \"_id\":\"change2_0.6995461115147918\"\n , \"_rev\":\"1-13677d36b98c0c075145bb8975105153\"\n , \"hello\":2\n }\n },\n]}\n\n```\n\nwe are probably most interested in the `rows.*.docs`\n\ncreate a `Stream` that parses the documents from the feed like this:\n\n``` js\nvar stream = JSONStream.parse(['rows', true, 'doc']) //rows, ANYTHING, doc\n\nstream.on('data', function(data) {\n console.log('received:', data);\n});\n\nstream.on('root', function(root, count) {\n if (!count) {\n console.log('no matches found:', root);\n }\n});\n```\nawesome!\n\n## JSONStream.stringify(open, sep, close)\n\nCreate a writable stream.\n\nyou may pass in custom `open`, `close`, and `seperator` strings.\nBut, by default, `JSONStream.stringify()` will create an array,\n(with default options `open='[\\n', sep='\\n,\\n', close='\\n]\\n'`)\n\nIf you call `JSONStream.stringify(false)`\nthe elements will only be seperated by a newline.\n\nIf you only write one item this will be valid JSON.\n\nIf you write many items,\nyou can use a `RegExp` to split it into valid chunks.\n\n## JSONStream.stringifyObject(open, sep, close)\n\nVery much like `JSONStream.stringify`,\nbut creates a writable stream for objects instead of arrays.\n\nAccordingly, `open='{\\n', sep='\\n,\\n', close='\\n}\\n'`.\n\nWhen you `.write()` to the stream you must supply an array with `[ key, data ]`\nas the first argument.\n\n## numbers\n\nThere are occasional problems parsing and unparsing very precise numbers.\n\nI have opened an issue here:\n\nhttps://github.com/creationix/jsonparse/issues/2\n\n+1\n\n## Acknowlegements\n\nthis module depends on https://github.com/creationix/jsonparse\nby Tim Caswell\nand also thanks to Florent Jaby for teaching me about parsing with:\nhttps://github.com/Floby/node-json-streams\n\n## license\n\nMIT / APACHE2\n",
- "_id": "JSONStream@0.3.1",
- "_from": "JSONStream"
-}
145 roll_your_own_socketio/node_modules/JSONStream/readme.markdown
View
@@ -1,145 +0,0 @@
-# JSONStream
-
-streaming JSON.parse and stringify
-
-<img src=https://secure.travis-ci.org/dominictarr/JSONStream.png?branch=master>
-
-## example
-
-```javascript
-
-var request = require('request')
- , JSONStream = require('JSONStream')
- , es = require('event-stream')
-
-var parser = JSONStream.parse(['rows', true])
- , req = request({url: 'http://isaacs.couchone.com/registry/_all_docs'})
- , logger = es.mapSync(function (data) {
- console.error(data)
- return data
- })
-```
-
-in node 0.4.x
-
-``` javascript
-
-req.pipe(parser)
-parser.pipe(logger)
-
-```
-
-in node v0.5.x
-
-``` javascript
-req.pipe(parser).pipe(logger)
-
-```
-
-## JSONStream.parse(path)
-
-usally, a json API will return a list of objects.
-
-`path` should be an array of property names, `RegExp`s, booleans, and/or functions.
-any object that matches the path will be emitted as 'data' (and `pipe`d down stream)
-
-a 'root' event is emitted when all data has been received. The 'root' event passes the root object & the count of matched objects.
-
-if `path` is empty or null, no 'data' events are emitted.
-
-### example
-
-query a couchdb view:
-
-``` bash
-curl -sS localhost:5984/tests/_all_docs&include_docs=true
-```
-you will get something like this:
-
-``` js
-{"total_rows":129,"offset":0,"rows":[
- { "id":"change1_0.6995461115147918"
- , "key":"change1_0.6995461115147918"
- , "value":{"rev":"1-e240bae28c7bb3667f02760f6398d508"}
- , "doc":{
- "_id": "change1_0.6995461115147918"
- , "_rev": "1-e240bae28c7bb3667f02760f6398d508","hello":1}
- },
- { "id":"change2_0.6995461115147918"
- , "key":"change2_0.6995461115147918"
- , "value":{"rev":"1-13677d36b98c0c075145bb8975105153"}
- , "doc":{
- "_id":"change2_0.6995461115147918"
- , "_rev":"1-13677d36b98c0c075145bb8975105153"
- , "hello":2
- }
- },
-]}
-
-```
-
-we are probably most interested in the `rows.*.docs`
-
-create a `Stream` that parses the documents from the feed like this:
-
-``` js
-var stream = JSONStream.parse(['rows', true, 'doc']) //rows, ANYTHING, doc
-
-stream.on('data', function(data) {
- console.log('received:', data);
-});
-
-stream.on('root', function(root, count) {
- if (!count) {
- console.log('no matches found:', root);
- }
-});
-```
-awesome!
-
-## JSONStream.stringify(open, sep, close)
-
-Create a writable stream.
-
-you may pass in custom `open`, `close`, and `seperator` strings.
-But, by default, `JSONStream.stringify()` will create an array,
-(with default options `open='[\n', sep='\n,\n', close='\n]\n'`)
-
-If you call `JSONStream.stringify(false)`
-the elements will only be seperated by a newline.
-
-If you only write one item this will be valid JSON.
-
-If you write many items,
-you can use a `RegExp` to split it into valid chunks.
-
-## JSONStream.stringifyObject(open, sep, close)
-
-Very much like `JSONStream.stringify`,
-but creates a writable stream for objects instead of arrays.
-
-Accordingly, `open='{\n', sep='\n,\n', close='\n}\n'`.
-
-When you `.write()` to the stream you must supply an array with `[ key, data ]`
-as the first argument.
-
-## numbers
-
-There are occasional problems parsing and unparsing very precise numbers.
-
-I have opened an issue here:
-
-https://github.com/creationix/jsonparse/issues/2
-
-+1
-
-## Acknowlegements
-
-this module depends on https://github.com/creationix/jsonparse
-by Tim Caswell
-and also thanks to Florent Jaby for teaching me about parsing with:
-https://github.com/Floby/node-json-streams
-
-## license
-
-MIT / APACHE2
41 roll_your_own_socketio/node_modules/JSONStream/test/bool.js
View
@@ -1,41 +0,0 @@
-
-var fs = require ('fs')
- , join = require('path').join
- , file = join(__dirname, 'fixtures','all_npm.json')
- , JSONStream = require('../')
- , it = require('it-is').style('colour')
-
- function randomObj () {
- return (
- Math.random () < 0.4
- ? {hello: 'eonuhckmqjk',
- whatever: 236515,
- lies: true,
- nothing: [null],
-// stuff: [Math.random(),Math.random(),Math.random()]
- }
- : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]]
- )
- }
-
-var expected = []
- , stringify = JSONStream.stringify()
- , es = require('event-stream')
- , stringified = ''
- , called = 0
- , count = 10
- , ended = false
-
-while (count --)
- expected.push(randomObj())
-
- es.connect(
- es.readArray(expected),
- stringify,
- JSONStream.parse([true]),
- es.writeArray(function (err, lines) {
-
- it(lines).has(expected)
- console.error('PASSED')
- })
- )
4,030 roll_your_own_socketio/node_modules/JSONStream/test/fixtures/all_npm.json
View
0 additions, 4,030 deletions not shown
39 roll_your_own_socketio/node_modules/JSONStream/test/fn.js
View
@@ -1,39 +0,0 @@
-
-
-var fs = require ('fs')
- , join = require('path').join
- , file = join(__dirname, 'fixtures','all_npm.json')
- , JSONStream = require('../')
- , it = require('it-is')
-
-function fn (s) {
- return !isNaN(parseInt(s, 10))
-}
-
-var expected = JSON.parse(fs.readFileSync(file))
- , parser = JSONStream.parse(['rows', fn])
- , called = 0
- , ended = false
- , parsed = []
-
-fs.createReadStream(file).pipe(parser)
-
-parser.on('data', function (data) {
- called ++
- it.has({
- id: it.typeof('string'),
- value: {rev: it.typeof('string')},
- key:it.typeof('string')
- })
- parsed.push(data)
-})
-
-parser.on('end', function () {
- ended = true
-})
-
-process.on('exit', function () {
- it(called).equal(expected.rows.length)
- it(parsed).deepEqual(expected.rows)
- console.error('PASSED')
-})
28 roll_your_own_socketio/node_modules/JSONStream/test/parsejson.js
View
@@ -1,28 +0,0 @@
-
-
-/*
- sometimes jsonparse changes numbers slightly.
-*/
-
-var r = Math.random()
- , Parser = require('jsonparse')
- , p = new Parser()
- , assert = require('assert')
- , times = 20
-while (times --) {
-
- assert.equal(JSON.parse(JSON.stringify(r)), r, 'core JSON')
-
- p.onValue = function (v) {
- console.error('parsed', v)
- assert.equal(
- String(v).slice(0,12),
- String(r).slice(0,12)
- )
- }
- console.error('correct', r)
- p.write (new Buffer(JSON.stringify([r])))
-
-
-
-}
41 roll_your_own_socketio/node_modules/JSONStream/test/stringify.js
View
@@ -1,41 +0,0 @@
-
-var fs = require ('fs')
- , join = require('path').join
- , file = join(__dirname, 'fixtures','all_npm.json')
- , JSONStream = require('../')
- , it = require('it-is').style('colour')
-
- function randomObj () {
- return (
- Math.random () < 0.4
- ? {hello: 'eonuhckmqjk',
- whatever: 236515,
- lies: true,
- nothing: [null],
- stuff: [Math.random(),Math.random(),Math.random()]
- }
- : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]]
- )
- }
-
-var expected = []
- , stringify = JSONStream.stringify()
- , es = require('event-stream')
- , stringified = ''
- , called = 0
- , count = 10
- , ended = false
-
-while (count --)
- expected.push(randomObj())
-
- es.connect(
- es.readArray(expected),
- stringify,
- //JSONStream.parse([/./]),
- es.writeArray(function (err, lines) {
-
- it(JSON.parse(lines.join(''))).deepEqual(expected)
- console.error('PASSED')
- })
- )
47 roll_your_own_socketio/node_modules/JSONStream/test/stringify_object.js
View
@@ -1,47 +0,0 @@
-
-var fs = require ('fs')
- , join = require('path').join
- , file = join(__dirname, 'fixtures','all_npm.json')
- , JSONStream = require('../')
- , it = require('it-is').style('colour')
- , es = require('event-stream')
- , pending = 10
- , passed = true
-
- function randomObj () {
- return (
- Math.random () < 0.4
- ? {hello: 'eonuhckmqjk',
- whatever: 236515,
- lies: true,
- nothing: [null],
- stuff: [Math.random(),Math.random(),Math.random()]
- }
- : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]]
- )
- }
-
-for (var ix = 0; ix < pending; ix++) (function (count) {
- var expected = {}
- , stringify = JSONStream.stringifyObject()
-
- es.connect(
- stringify,
- es.writeArray(function (err, lines) {
- it(JSON.parse(lines.join(''))).deepEqual(expected)
- if (--pending === 0) {
- console.error('PASSED')
- }
- })
- )
-
- while (count --) {
- var key = Math.random().toString(16).slice(2)
- expected[key] = randomObj()
- stringify.write([ key, expected[key] ])
- }
-
- process.nextTick(function () {
- stringify.end()
- })
-})(ix)
35 roll_your_own_socketio/node_modules/JSONStream/test/test.js
View
@@ -1,35 +0,0 @@
-
-
-var fs = require ('fs')
- , join = require('path').join
- , file = join(__dirname, 'fixtures','all_npm.json')
- , JSONStream = require('../')
- , it = require('it-is')
-
-var expected = JSON.parse(fs.readFileSync(file))
- , parser = JSONStream.parse(['rows', /\d+/ /*, 'value'*/])
- , called = 0
- , ended = false
- , parsed = []
-
-fs.createReadStream(file).pipe(parser)
-
-parser.on('data', function (data) {
- called ++
- it.has({
- id: it.typeof('string'),
- value: {rev: it.typeof('string')},
- key:it.typeof('string')
- })
- parsed.push(data)
-})
-
-parser.on('end', function () {
- ended = true
-})
-
-process.on('exit', function () {
- it(called).equal(expected.rows.length)
- it(parsed).deepEqual(expected.rows)
- console.error('PASSED')
-})
29 roll_your_own_socketio/node_modules/JSONStream/test/test2.js
View
@@ -1,29 +0,0 @@
-
-
-var fs = require ('fs')
- , join = require('path').join
- , file = join(__dirname, '..','package.json')
- , JSONStream = require('../')
- , it = require('it-is')
-
-var expected = JSON.parse(fs.readFileSync(file))
- , parser = JSONStream.parse([])
- , called = 0
- , ended = false
- , parsed = []
-
-fs.createReadStream(file).pipe(parser)
-
-parser.on('data', function (data) {
- called ++
- it(data).deepEqual(expected)
-})
-
-parser.on('end', function () {
- ended = true
-})
-
-process.on('exit', function () {
- it(called).equal(1)
- console.error('PASSED')
-})
41 roll_your_own_socketio/node_modules/JSONStream/test/two-ways.js
View
@@ -1,41 +0,0 @@
-
-var fs = require ('fs')
- , join = require('path').join
- , file = join(__dirname, 'fixtures','all_npm.json')
- , JSONStream = require('../')
- , it = require('it-is').style('colour')
-
- function randomObj () {
- return (
- Math.random () < 0.4
- ? {hello: 'eonuhckmqjk',
- whatever: 236515,
- lies: true,
- nothing: [null],
-// stuff: [Math.random(),Math.random(),Math.random()]
- }
- : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]]
- )
- }
-
-var expected = []
- , stringify = JSONStream.stringify()
- , es = require('event-stream')
- , stringified = ''
- , called = 0
- , count = 10
- , ended = false
-
-while (count --)
- expected.push(randomObj())
-
- es.connect(
- es.readArray(expected),
- stringify,
- JSONStream.parse([/./]),
- es.writeArray(function (err, lines) {
-
- it(lines).has(expected)
- console.error('PASSED')
- })
- )
82 roll_your_own_socketio/node_modules/ecstatic/README.md
View
@@ -1,82 +0,0 @@
-# Ecstatic
-
-A simple static file server middleware that works with both Express and Flatiron
-
-* Built-in simple directory listings
-* Shows index.html files at directory roots when they exist
-* Use it with a raw http server, express/connect, or flatiron/union!
-
-# Examples:
-
-## express
-
-``` js
-var express = require('express');
-var ecstatic = require('ecstatic');
-
-var app = express.createServer();
-app.use(ecstatic(__dirname + '/public'));
-app.listen(8080);
-
-console.log('Listening on :8080');
-```
-
-## union
-
-``` js
-var union = require('union');
-var ecstatic = require('ecstatic');
-
-union.createServer({
- before: [
- ecstatic(__dirname + '/public'),
- ]
-}).listen(8080);
-
-console.log('Listening on :8080');
-```
-
-## flatiron
-
-``` js
-var union = require('union');
-var flatiron = require('flatiron');
-var ecstatic = require('ecstatic');
-
-app = new flatiron.App();
-app.use(flatiron.plugins.http);
-
-app.http.before = [
- ecstatic(__dirname + '/public')
-];
-
-app.start(8080);
-
-console.log('Listening on :8080');
-```
-
-# API:
-
-## ecstatic(folder, opts={});
-
-Pass ecstatic a folder, and it will return your middleware!
-
-Turn on cache-control with `opts.cache`, in seconds.
-
-Turn off directory listings with `opts.autoIndex === false`.
-
-### middleware(req, res, next);
-
-This works more or less as you'd expect.
-
-## ecstatic.showDir(folder);
-
-This returns another middleware which will attempt to show a directory view. Turning on auto-indexing is roughly equivalent to adding this middleware after an ecstatic middleware with autoindexing disabled.
-
-# Tests:
-
- npm test
-
-# License:
-
-MIT/X11.
6 roll_your_own_socketio/node_modules/ecstatic/example/core.js
View
@@ -1,6 +0,0 @@
-var http = require('http');
-var ecstatic = require('../lib/ecstatic')(__dirname + '/public');
-
-http.createServer(ecstatic).listen(8080);
-
-console.log('Listening on :8080');
8 roll_your_own_socketio/node_modules/ecstatic/example/express.js
View
@@ -1,8 +0,0 @@
-var express = require('express');
-var ecstatic = require('../lib/ecstatic');
-
-var app = express.createServer();
-app.use(ecstatic(__dirname + '/public', { showdir : true }));
-app.listen(8080);
-
-console.log('Listening on :8080');
1  roll_your_own_socketio/node_modules/ecstatic/example/public/beep/index.html
View
@@ -1 +0,0 @@
-<b>boop!</b>
1  roll_your_own_socketio/node_modules/ecstatic/example/public/hello.txt
View
@@ -1 +0,0 @@
-Hello world!
1  roll_your_own_socketio/node_modules/ecstatic/example/public/subdir/world.txt
View
@@ -1 +0,0 @@
-hello cruel world!
BIN  roll_your_own_socketio/node_modules/ecstatic/example/public/turtle.png
View
Deleted file not rendered
10 roll_your_own_socketio/node_modules/ecstatic/example/union.js
View
@@ -1,10 +0,0 @@
-var union = require('union');
-var ecstatic = require('../');
-
-union.createServer({
- before: [
- ecstatic(__dirname + '/public')
- ]
-}).listen(8080);
-
-console.log('Listening on :8080');
132 roll_your_own_socketio/node_modules/ecstatic/lib/ecstatic.js
View
@@ -1,132 +0,0 @@
-var path = require('path'),
- fs = require('fs'),
- url = require('url'),
- mime = require('mime'),
- showDir = require('./ecstatic/showdir'),
- version = JSON.parse(
- fs.readFileSync(__dirname + '/../package.json').toString()
- ).version,
- status = require('./ecstatic/status-handlers'),
- etag = require('./ecstatic/etag'),
- optsParser = require('./ecstatic/opts');
-
-var ecstatic = module.exports = function (dir, options) {
- var root = path.join(path.resolve(dir), '/'),
- opts = optsParser(options),
- cache = opts.cache,
- autoIndex = opts.autoIndex;
-
- return function middleware (req, res, next) {
-
- // Figure out the path for the file from the given url
- var parsed = url.parse(req.url),
- pathname = decodeURI(parsed.pathname),
- file = path.normalize(path.join(root, pathname));
-
- // Set common headers.
- res.setHeader('server', 'ecstatic-'+version);
- res.setHeader('date', (new Date()).toUTCString());
-
- if (file.slice(0, root.length) !== root) {
- return status[403](res, next);
- }
-
- if (req.method && (req.method !== 'GET' && req.method !== 'HEAD' )) {
- return status[405](res, next);
- }
-
- fs.stat(file, function (err, stat) {
- if (err && err.code === 'ENOENT') {
-
- if (req.statusCode == 404) {
- // This means we're already trying ./404.html
- status[404](res, next);
- }
- else if(req.showDir) {
- // In this case, we were probably attempting to autoindex with
- // 'index.html' and it didn't work. This should prompt the
- // "showdir" function, which should've been set to `next`.
- // TODO: Re-evaluate this dependence on recursion. Could the confusion
- // introduced be eliminated?
- // TODO: We're attaching this random property to req to make it work,
- // which is BAD FORM. This *needs* a refactor but I think making it
- // not broken is the lesser of two evils.
- // NOTE: Alternate check here was:
- // `path.basename(req.url) === 'index.html' && autoIndex
- next();
- }
- else {
- // Try for ./404.html
- middleware({
- url: '/404.html',
- statusCode: 404 // Override the response status code
- }, res, next);
- }
- }
- else if (err) {
- status[500](res, next, { error: err });
- }
- else if (stat.isDirectory()) {
-
- // retry for the index.html, if that's not there fall back to the
- // directory view (if activated)
- var handler = (typeof next === 'function' && !autoIndex)
- ? next
- : function () {
- showDir(root, pathname, stat, cache)(req, res);
- };
-
- middleware({
- url: path.join(pathname, '/index.html'),
- showDir: true
- }, res, handler);
- }
- else {
-
- // TODO: Helper for this, with default headers.
- res.setHeader('etag', etag(stat));
- res.setHeader('last-modified', (new Date(stat.mtime)).toUTCString());
- res.setHeader('cache-control', 'max-age='+cache);
-
- // Return a 304 if necessary
- if ( req.headers
- && ( (req.headers['if-none-match'] === etag(stat))
- || (Date.parse(req.headers['if-none-match']) >= stat.mtime )
- )
- ) {
- status[304](res, next);
- }
- else {
-
- res.setHeader(
- 'content-type',
- mime.lookup(file) || 'application/octet-stream'
- );
-
- if (req.method === "HEAD") {
- res.statusCode = req.statusCode || 200; // overridden for 404's
- res.end();
- }
- else {
-
- var stream = fs.createReadStream(file);
-
- stream.pipe(res);
- stream.on('error', function (err) {
- status['500'](res, next, { error: err });
- });
-
- stream.on('end', function () {
- res.statusCode = 200;
- res.end();
- });
- }
- }
- }
- });
- };
-};
-
-ecstatic.version = version;
-ecstatic.showDir = showDir;
-
3  roll_your_own_socketio/node_modules/ecstatic/lib/ecstatic/etag.js
View
@@ -1,3 +0,0 @@
-module.exports = function (stat) {
- return JSON.stringify([stat.ino, stat.size, stat.mtime].join('-'));
-}
22 roll_your_own_socketio/node_modules/ecstatic/lib/ecstatic/opts.js
View
@@ -1,22 +0,0 @@
-// This is so you can have options aliasing and defaults in one place.
-
-module.exports = function (opts) {
-
- var autoIndex = !opts
- || [
- 'showDir',
- 'showdir',
- 'autoIndex',
- 'autoindex'
- ].some(function (k) {
- // at least one of the flags is truthy.
- // This means that, in a conflict, showing the directory wins.
- // Not sure if this is the right behavior or not.
- return opts[k];
- });
-
- return {
- cache: (opts && opts.cache) || 3600,
- autoIndex: autoIndex
- }
-}
113 roll_your_own_socketio/node_modules/ecstatic/lib/ecstatic/showdir.js
View
@@ -1,113 +0,0 @@
-var ecstatic = require('../ecstatic'),
- fs = require('fs'),
- path = require('path'),
- ent = require('ent'),
- etag = require('./etag'),
- url = require('url'),
- status = require('./status-handlers');
-
-module.exports = function (dir, pathname, stat, cache) {
- var root = path.resolve(dir) + '/';
-
- return function (req, res, next) {
-
- if (typeof pathname === 'undefined') {
- pathname = url.parse(req.url).pathname;
- }
-
- if (typeof file === 'undefined') {
- file = path.normalize(path.join(root, pathname));
- }
-
- if (typeof cache === 'undefined') {
- cache = 3600;
- }
-
- (function (cb) {
- fs.stat(file, cb);
- })(function (err, stat) {
- if (err) {
- return status[500](res, next, { error: err });
- }
-
- fs.readdir(dir + pathname, function (err, files) {
- if (err) {
- return status[500](res, next, { error: err });
- }
-
- res.setHeader('content-type', 'text/html');
- res.setHeader('etag', etag(stat));
- res.setHeader('last-modified', (new Date(stat.mtime)).toUTCString());
- res.setHeader('cache-control', 'max-age='+cache);
-
- var sortByIsDirectory = function (paths, cb) {
- var pending = paths.length,
- errs = [],
- dirs = [],
- files = [];
-
- paths.forEach(function (file) {
- fs.stat(dir + pathname + '/' + file, function (err, s) {
- if (err) {
- errs.push(err);
- }
- else if (s.isDirectory()) {
- dirs.push(file);
- }
- else {
- files.push(file);
- }
-
- if (--pending === 0) {
- cb(errs, dirs, files);
- }
- });
- });
- }
-
- sortByIsDirectory(files, function (errs, dirs, files) {
-
- if (errs.length > 0) {
- return status[500](res, next, { error: errs[0] });
- }
-
- // Lifted from nodejitsu's http server.
- var html = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"\
- "http://www.w3.org/TR/html4/loose.dtd">\
- <html> \
- <head> \
- <title>Index of ' + pathname +'</title> \
- </head> \
- <body> \
- <h1>Index of ' + pathname + '</h1>';
-
- html += '<table>';
-
- var writeRow = function (file, i) {
- html += '<tr><td>' + '<a href="'
- + ent.encode(encodeURI(
- ((req.url == '/') ? '' : req.url)
- + '/'
- + file
- )) + '">' + ent.encode(file) + '</a></td></tr>';
- }
-
- dirs.sort().forEach(writeRow);
- files.sort().forEach(writeRow);
-
- html += '</table>';
- html += '<br><address>Node.js '
- + process.version
- + '/<a href="https://github.com/jesusabdullah/node-ecstatic">ecstatic</a>'
- + ' server running @ '
- + ent.encode(req.headers.host) + '</address>'
- + '</body></html>'
- ;
-
- res.writeHead(200, { "Content-Type": "text/html" });
- res.end(html);
- });
- });
- });
- }
-};
47 roll_your_own_socketio/node_modules/ecstatic/lib/ecstatic/status-handlers.js
View
@@ -1,47 +0,0 @@
-exports['304'] = function (res, next) {
- res.writeHead(304, res.headers);
- res.end();
-};
-
-exports['403'] = function (res, next) {
- if (typeof next === "function") {
- next();
- }
- else {
- if (res.writable) {
- res.setHeader('content-type', 'text/plain');
- res.writeHead(403, res.headers);
- res.end('ACCESS DENIED');
- }
- }
-};
-
-exports['405'] = function (res, next, opts) {
- if (typeof next === "function") {
- next();
- }
- else {
- res.setHeader('allow', (opts && opts.allow) || 'GET, HEAD');
- res.writeHead(405, res.headers);
- res.end();
- }
-};
-
-exports['404'] = function (res, next) {
- if (typeof next === "function") {
- next();
- }
- else {
- if (res.writable) {
- res.setHeader('content-type', 'text/plain');
- res.writeHead(404, res.headers);
- res.end('File not found. :(');
- }
- }
-};
-
-exports['500'] = function (res, next, opts) {
- // TODO: Return nicer messages
- res.writeHead(500, res.headers);
- res.end(opts.error.stack || opts.error.toString() || "No specified error");
-};
19 roll_your_own_socketio/node_modules/ecstatic/lib/templates/showdir.html
View
@@ -1,19 +0,0 @@
-<!doctype html>
-
-<html>
- <head>
- <title>Index of /</title>
- </head>
- <body>
- <h1>Index of /</h1>
- <table>
- <tr>
- <td>
- <a href="/beep">beep</a>
- </td>
- </tr>
- </table>
- <br>
- <address>Node.js v0.6.10/<a href="https://github.com/jesusabdullah/node-ecstatic">ecstatic</a> server running @ localhost:8080</address>
- </body>
-</html>
1  roll_your_own_socketio/node_modules/ecstatic/node_modules/ent/.npmignore
View
@@ -1 +0,0 @@
-node_modules
35 roll_your_own_socketio/node_modules/ecstatic/node_modules/ent/README.markdown
View
@@ -1,35 +0,0 @@
-ent
-===
-
-Encode and decode HTML entities
-
-example
-=======
-
- var ent = require('ent');
- console.log(ent.encode('<span>©moo</span>'))
- console.log(ent.decode('&pi; &amp; &rho;'));
-
-output:
-
- &lt;span&gt;&copy;moo&lt;/span&gt;
- π & ρ
-
-methods
-=======
-
-encode(str)
------------
-
-Escape unsafe characters in `str` with html entities.
-
-decode(str)
------------
-
-Convert html entities in `str` back to raw text.
-
-credits
-=======
-
-HTML entity tables shamelessly lifted from perl's
-[HTML::Entities](http://cpansearch.perl.org/src/GAAS/HTML-Parser-3.68/lib/HTML/Entities.pm)
255 roll_your_own_socketio/node_modules/ecstatic/node_modules/ent/entities.json
View
@@ -1,255 +0,0 @@
-{
- "amp" : "&",
- "gt" : ">",
- "lt" : "<",
- "quot" : "\"",
- "apos" : "'",
- "AElig" : 198,
- "Aacute" : 193,
- "Acirc" : 194,
- "Agrave" : 192,
- "Aring" : 197,
- "Atilde" : 195,
- "Auml" : 196,
- "Ccedil" : 199,
- "ETH" : 208,
- "Eacute" : 201,
- "Ecirc" : 202,
- "Egrave" : 200,
- "Euml" : 203,
- "Iacute" : 205,
- "Icirc" : 206,
- "Igrave" : 204,
- "Iuml" : 207,
- "Ntilde" : 209,
- "Oacute" : 211,
- "Ocirc" : 212,
- "Ograve" : 210,
- "Oslash" : 216,
- "Otilde" : 213,
- "Ouml" : 214,
- "THORN" : 222,
- "Uacute" : 218,
- "Ucirc" : 219,
- "Ugrave" : 217,
- "Uuml" : 220,
- "Yacute" : 221,
- "aacute" : 225,
- "acirc" : 226,
- "aelig" : 230,
- "agrave" : 224,
- "aring" : 229,
- "atilde" : 227,
- "auml" : 228,
- "ccedil" : 231,
- "eacute" : 233,
- "ecirc" : 234,
- "egrave" : 232,
- "eth" : 240,
- "euml" : 235,
- "iacute" : 237,
- "icirc" : 238,
- "igrave" : 236,
- "iuml" : 239,
- "ntilde" : 241,
- "oacute" : 243,
- "ocirc" : 244,
- "ograve" : 242,
- "oslash" : 248,
- "otilde" : 245,
- "ouml" : 246,
- "szlig" : 223,
- "thorn" : 254,
- "uacute" : 250,
- "ucirc" : 251,
- "ugrave" : 249,
- "uuml" : 252,
- "yacute" : 253,
- "yuml" : 255,
- "copy" : 169,
- "reg" : 174,
- "nbsp" : 160,
- "iexcl" : 161,
- "cent" : 162,
- "pound" : 163,
- "curren" : 164,
- "yen" : 165,
- "brvbar" : 166,
- "sect" : 167,
- "uml" : 168,
- "ordf" : 170,
- "laquo" : 171,
- "not" : 172,
- "shy" : 173,
- "macr" : 175,
- "deg" : 176,
- "plusmn" : 177,
- "sup1" : 185,
- "sup2" : 178,
- "sup3" : 179,
- "acute" : 180,
- "micro" : 181,
- "para" : 182,
- "middot" : 183,
- "cedil" : 184,
- "ordm" : 186,
- "raquo" : 187,
- "frac14" : 188,
- "frac12" : 189,
- "frac34" : 190,
- "iquest" : 191,
- "times" : 215,
- "divide" : 247,
- "OElig;" : 338,
- "oelig;" : 339,
- "Scaron;" : 352,
- "scaron;" : 353,
- "Yuml;" : 376,
- "fnof;" : 402,
- "circ;" : 710,
- "tilde;" : 732,
- "Alpha;" : 913,
- "Beta;" : 914,
- "Gamma;" : 915,
- "Delta;" : 916,
- "Epsilon;" : 917,
- "Zeta;" : 918,
- "Eta;" : 919,
- "Theta;" : 920,
- "Iota;" : 921,
- "Kappa;" : 922,
- "Lambda;" : 923,
- "Mu;" : 924,
- "Nu;" : 925,
- "Xi;" : 926,
- "Omicron;" : 927,
- "Pi;" : 928,
- "Rho;" : 929,
- "Sigma;" : 931,
- "Tau;" : 932,
- "Upsilon;" : 933,
- "Phi;" : 934,
- "Chi;" : 935,
- "Psi;" : 936,
- "Omega;" : 937,
- "alpha;" : 945,
- "beta;" : 946,
- "gamma;" : 947,
- "delta;" : 948,
- "epsilon;" : 949,
- "zeta;" : 950,
- "eta;" : 951,
- "theta;" : 952,
- "iota;" : 953,
- "kappa;" : 954,
- "lambda;" : 955,
- "mu;" : 956,
- "nu;" : 957,
- "xi;" : 958,
- "omicron;" : 959,
- "pi;" : 960,
- "rho;" : 961,
- "sigmaf;" : 962,
- "sigma;" : 963,
- "tau;" : 964,
- "upsilon;" : 965,
- "phi;" : 966,
- "chi;" : 967,
- "psi;" : 968,
- "omega;" : 969,
- "thetasym;" : 977,
- "upsih;" : 978,
- "piv;" : 982,
- "ensp;" : 8194,
- "emsp;" : 8195,
- "thinsp;" : 8201,
- "zwnj;" : 8204,
- "zwj;" : 8205,
- "lrm;" : 8206,
- "rlm;" : 8207,
- "ndash;" : 8211,
- "mdash;" : 8212,
- "lsquo;" : 8216,
- "rsquo;" : 8217,
- "sbquo;" : 8218,
- "ldquo;" : 8220,
- "rdquo;" : 8221,
- "bdquo;" : 8222,
- "dagger;" : 8224,
- "Dagger;" : 8225,
- "bull;" : 8226,
- "hellip;" : 8230,
- "permil;" : 8240,
- "prime;" : 8242,
- "Prime;" : 8243,
- "lsaquo;" : 8249,
- "rsaquo;" : 8250,
- "oline;" : 8254,
- "frasl;" : 8260,
- "euro;" : 8364,
- "image;" : 8465,
- "weierp;" : 8472,
- "real;" : 8476,
- "trade;" : 8482,
- "alefsym;" : 8501,
- "larr;" : 8592,
- "uarr;" : 8593,
- "rarr;" : 8594,
- "darr;" : 8595,
- "harr;" : 8596,
- "crarr;" : 8629,
- "lArr;" : 8656,
- "uArr;" : 8657,
- "rArr;" : 8658,
- "dArr;" : 8659,
- "hArr;" : 8660,
- "forall;" : 8704,
- "part;" : 8706,
- "exist;" : 8707,
- "empty;" : 8709,
- "nabla;" : 8711,
- "isin;" : 8712,
- "notin;" : 8713,
- "ni;" : 8715,
- "prod;" : 8719,
- "sum;" : 8721,
- "minus;" : 8722,
- "lowast;" : 8727,
- "radic;" : 8730,
- "prop;" : 8733,
- "infin;" : 8734,
- "ang;" : 8736,
- "and;" : 8743,
- "or;" : 8744,
- "cap;" : 8745,
- "cup;" : 8746,
- "int;" : 8747,
- "there4;" : 8756,
- "sim;" : 8764,
- "cong;" : 8773,
- "asymp;" : 8776,
- "ne;" : 8800,
- "equiv;" : 8801,
- "le;" : 8804,
- "ge;" : 8805,
- "sub;" : 8834,
- "sup;" : 8835,
- "nsub;" : 8836,
- "sube;" : 8838,
- "supe;" : 8839,
- "oplus;" : 8853,
- "otimes;" : 8855,
- "perp;" : 8869,
- "sdot;" : 8901,
- "lceil;" : 8968,
- "rceil;" : 8969,
- "lfloor;" : 8970,
- "rfloor;" : 8971,
- "lang;" : 9001,
- "rang;" : 9002,
- "loz;" : 9674,
- "spades;" : 9824,
- "clubs;" : 9827,
- "hearts;" : 9829,
- "diams;" : 9830
-}
3  roll_your_own_socketio/node_modules/ecstatic/node_modules/ent/examples/simple.js
View
@@ -1,3 +0,0 @@
-var ent = require('ent');
-console.log(ent.encode('<span>©moo</span>'))
-console.log(ent.decode('&pi; &amp; &rho;'));
65 roll_your_own_socketio/node_modules/ecstatic/node_modules/ent/index.js
View
@@ -1,65 +0,0 @@
-var fs = require('fs');
-var entities = JSON.parse(
- fs.readFileSync(__dirname + '/entities.json', 'utf8')
-);
-
-var revEntities = {};
-Object.keys(entities).forEach(function (key) {
- var e = entities[key];
- var s = typeof e === 'number' ? String.fromCharCode(e) : e;
- revEntities[s] = key;
-});
-
-exports.encode = function (str) {
- if (typeof str !== 'string') {
- throw new TypeError('Expected a String');
- }
-
- return str.split('').map(function (c) {
- var e = revEntities[c];
- var cc = c.charCodeAt(0);
- if (e) {
- return '&' + (e.match(/;$/) ? e : e + ';');
- }
- else if (c.match(/\s/)) {
- return c;
- }
- else if (cc < 32 || cc >= 127) {
- return '&#' + cc + ';';
- }
- else {
- return c;
- }
- }).join('');
-};