postdoc 0.1.2 → 0.2.0.beta4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (372) hide show
  1. checksums.yaml +5 -5
  2. data/lib/pdf.js +27 -0
  3. data/lib/postdoc.rb +3 -7
  4. data/node_modules/agent-base/History.md +113 -0
  5. data/node_modules/agent-base/README.md +145 -0
  6. data/node_modules/agent-base/index.js +160 -0
  7. data/node_modules/agent-base/package.json +35 -0
  8. data/node_modules/agent-base/patch-core.js +37 -0
  9. data/node_modules/agent-base/test/ssl-cert-snakeoil.key +15 -0
  10. data/node_modules/agent-base/test/ssl-cert-snakeoil.pem +12 -0
  11. data/node_modules/agent-base/test/test.js +673 -0
  12. data/node_modules/async-limiter/LICENSE +8 -0
  13. data/node_modules/async-limiter/coverage/coverage.json +1 -0
  14. data/node_modules/async-limiter/coverage/lcov-report/async-throttle/index.html +73 -0
  15. data/node_modules/async-limiter/coverage/lcov-report/async-throttle/index.js.html +246 -0
  16. data/node_modules/async-limiter/coverage/lcov-report/base.css +182 -0
  17. data/node_modules/async-limiter/coverage/lcov-report/index.html +73 -0
  18. data/node_modules/async-limiter/coverage/lcov-report/prettify.css +1 -0
  19. data/node_modules/async-limiter/coverage/lcov-report/prettify.js +1 -0
  20. data/node_modules/async-limiter/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  21. data/node_modules/async-limiter/coverage/lcov-report/sorter.js +156 -0
  22. data/node_modules/async-limiter/coverage/lcov.info +74 -0
  23. data/node_modules/async-limiter/index.js +67 -0
  24. data/node_modules/async-limiter/package.json +35 -0
  25. data/node_modules/async-limiter/readme.md +132 -0
  26. data/node_modules/balanced-match/LICENSE.md +21 -0
  27. data/node_modules/balanced-match/README.md +91 -0
  28. data/node_modules/balanced-match/index.js +59 -0
  29. data/node_modules/balanced-match/package.json +49 -0
  30. data/node_modules/brace-expansion/LICENSE +21 -0
  31. data/node_modules/brace-expansion/README.md +129 -0
  32. data/node_modules/brace-expansion/index.js +201 -0
  33. data/node_modules/brace-expansion/package.json +47 -0
  34. data/node_modules/buffer-from/index.js +69 -0
  35. data/node_modules/buffer-from/package.json +16 -0
  36. data/node_modules/buffer-from/readme.md +69 -0
  37. data/node_modules/buffer-from/test.js +12 -0
  38. data/node_modules/concat-map/LICENSE +18 -0
  39. data/node_modules/concat-map/README.markdown +62 -0
  40. data/node_modules/concat-map/example/map.js +6 -0
  41. data/node_modules/concat-map/index.js +13 -0
  42. data/node_modules/concat-map/package.json +43 -0
  43. data/node_modules/concat-map/test/map.js +39 -0
  44. data/node_modules/concat-stream/LICENSE +24 -0
  45. data/node_modules/concat-stream/index.js +144 -0
  46. data/node_modules/concat-stream/package.json +55 -0
  47. data/node_modules/concat-stream/readme.md +102 -0
  48. data/node_modules/core-util-is/LICENSE +19 -0
  49. data/node_modules/core-util-is/README.md +3 -0
  50. data/node_modules/core-util-is/float.patch +604 -0
  51. data/node_modules/core-util-is/lib/util.js +107 -0
  52. data/node_modules/core-util-is/package.json +32 -0
  53. data/node_modules/core-util-is/test.js +68 -0
  54. data/node_modules/debug/CHANGELOG.md +395 -0
  55. data/node_modules/debug/LICENSE +19 -0
  56. data/node_modules/debug/Makefile +58 -0
  57. data/node_modules/debug/README.md +368 -0
  58. data/node_modules/debug/karma.conf.js +70 -0
  59. data/node_modules/debug/node.js +1 -0
  60. data/node_modules/debug/package.json +43 -0
  61. data/node_modules/debug/src/browser.js +195 -0
  62. data/node_modules/debug/src/debug.js +225 -0
  63. data/node_modules/debug/src/index.js +10 -0
  64. data/node_modules/debug/src/node.js +186 -0
  65. data/node_modules/es6-promise/CHANGELOG.md +151 -0
  66. data/node_modules/es6-promise/LICENSE +19 -0
  67. data/node_modules/es6-promise/README.md +97 -0
  68. data/node_modules/es6-promise/auto.js +4 -0
  69. data/node_modules/es6-promise/dist/es6-promise.auto.js +1181 -0
  70. data/node_modules/es6-promise/dist/es6-promise.auto.map +1 -0
  71. data/node_modules/es6-promise/dist/es6-promise.auto.min.js +1 -0
  72. data/node_modules/es6-promise/dist/es6-promise.auto.min.map +1 -0
  73. data/node_modules/es6-promise/dist/es6-promise.js +1179 -0
  74. data/node_modules/es6-promise/dist/es6-promise.map +1 -0
  75. data/node_modules/es6-promise/dist/es6-promise.min.js +1 -0
  76. data/node_modules/es6-promise/dist/es6-promise.min.map +1 -0
  77. data/node_modules/es6-promise/es6-promise.d.ts +81 -0
  78. data/node_modules/es6-promise/lib/es6-promise/-internal.js +266 -0
  79. data/node_modules/es6-promise/lib/es6-promise/asap.js +119 -0
  80. data/node_modules/es6-promise/lib/es6-promise/enumerator.js +113 -0
  81. data/node_modules/es6-promise/lib/es6-promise/polyfill.js +35 -0
  82. data/node_modules/es6-promise/lib/es6-promise/promise/all.js +52 -0
  83. data/node_modules/es6-promise/lib/es6-promise/promise/race.js +84 -0
  84. data/node_modules/es6-promise/lib/es6-promise/promise/reject.js +46 -0
  85. data/node_modules/es6-promise/lib/es6-promise/promise/resolve.js +48 -0
  86. data/node_modules/es6-promise/lib/es6-promise/promise.js +427 -0
  87. data/node_modules/es6-promise/lib/es6-promise/then.js +32 -0
  88. data/node_modules/es6-promise/lib/es6-promise/utils.js +21 -0
  89. data/node_modules/es6-promise/lib/es6-promise.auto.js +3 -0
  90. data/node_modules/es6-promise/lib/es6-promise.js +7 -0
  91. data/node_modules/es6-promise/package.json +75 -0
  92. data/node_modules/es6-promisify/README.md +89 -0
  93. data/node_modules/es6-promisify/dist/promise.js +73 -0
  94. data/node_modules/es6-promisify/dist/promisify.js +85 -0
  95. data/node_modules/es6-promisify/package.json +41 -0
  96. data/node_modules/extract-zip/CONTRIBUTING.md +1 -0
  97. data/node_modules/extract-zip/LICENSE +23 -0
  98. data/node_modules/extract-zip/cli.js +20 -0
  99. data/node_modules/extract-zip/index.js +205 -0
  100. data/node_modules/extract-zip/node_modules/debug/CHANGELOG.md +362 -0
  101. data/node_modules/extract-zip/node_modules/debug/LICENSE +19 -0
  102. data/node_modules/extract-zip/node_modules/debug/Makefile +50 -0
  103. data/node_modules/extract-zip/node_modules/debug/README.md +312 -0
  104. data/node_modules/extract-zip/node_modules/debug/component.json +19 -0
  105. data/node_modules/extract-zip/node_modules/debug/karma.conf.js +70 -0
  106. data/node_modules/extract-zip/node_modules/debug/node.js +1 -0
  107. data/node_modules/extract-zip/node_modules/debug/package.json +49 -0
  108. data/node_modules/extract-zip/node_modules/debug/src/browser.js +185 -0
  109. data/node_modules/extract-zip/node_modules/debug/src/debug.js +202 -0
  110. data/node_modules/extract-zip/node_modules/debug/src/index.js +10 -0
  111. data/node_modules/extract-zip/node_modules/debug/src/inspector-log.js +15 -0
  112. data/node_modules/extract-zip/node_modules/debug/src/node.js +248 -0
  113. data/node_modules/extract-zip/package.json +35 -0
  114. data/node_modules/extract-zip/readme.md +49 -0
  115. data/node_modules/fd-slicer/CHANGELOG.md +49 -0
  116. data/node_modules/fd-slicer/LICENSE +21 -0
  117. data/node_modules/fd-slicer/README.md +189 -0
  118. data/node_modules/fd-slicer/index.js +277 -0
  119. data/node_modules/fd-slicer/package.json +36 -0
  120. data/node_modules/fd-slicer/test/test.js +350 -0
  121. data/node_modules/fs.realpath/LICENSE +43 -0
  122. data/node_modules/fs.realpath/README.md +33 -0
  123. data/node_modules/fs.realpath/index.js +66 -0
  124. data/node_modules/fs.realpath/old.js +303 -0
  125. data/node_modules/fs.realpath/package.json +26 -0
  126. data/node_modules/glob/LICENSE +15 -0
  127. data/node_modules/glob/README.md +368 -0
  128. data/node_modules/glob/changelog.md +67 -0
  129. data/node_modules/glob/common.js +240 -0
  130. data/node_modules/glob/glob.js +790 -0
  131. data/node_modules/glob/package.json +43 -0
  132. data/node_modules/glob/sync.js +486 -0
  133. data/node_modules/https-proxy-agent/History.md +124 -0
  134. data/node_modules/https-proxy-agent/README.md +137 -0
  135. data/node_modules/https-proxy-agent/index.js +229 -0
  136. data/node_modules/https-proxy-agent/package.json +35 -0
  137. data/node_modules/https-proxy-agent/test/ssl-cert-snakeoil.key +15 -0
  138. data/node_modules/https-proxy-agent/test/ssl-cert-snakeoil.pem +12 -0
  139. data/node_modules/https-proxy-agent/test/test.js +342 -0
  140. data/node_modules/inflight/LICENSE +15 -0
  141. data/node_modules/inflight/README.md +37 -0
  142. data/node_modules/inflight/inflight.js +54 -0
  143. data/node_modules/inflight/package.json +29 -0
  144. data/node_modules/inherits/LICENSE +16 -0
  145. data/node_modules/inherits/README.md +42 -0
  146. data/node_modules/inherits/inherits.js +7 -0
  147. data/node_modules/inherits/inherits_browser.js +23 -0
  148. data/node_modules/inherits/package.json +29 -0
  149. data/node_modules/isarray/Makefile +6 -0
  150. data/node_modules/isarray/README.md +60 -0
  151. data/node_modules/isarray/component.json +19 -0
  152. data/node_modules/isarray/index.js +5 -0
  153. data/node_modules/isarray/package.json +45 -0
  154. data/node_modules/isarray/test.js +20 -0
  155. data/node_modules/mime/CHANGELOG.md +225 -0
  156. data/node_modules/mime/CONTRIBUTING.md +5 -0
  157. data/node_modules/mime/LICENSE +21 -0
  158. data/node_modules/mime/Mime.js +89 -0
  159. data/node_modules/mime/README.md +188 -0
  160. data/node_modules/mime/cli.js +10 -0
  161. data/node_modules/mime/index.js +4 -0
  162. data/node_modules/mime/lite.js +4 -0
  163. data/node_modules/mime/package.json +43 -0
  164. data/node_modules/mime/src/README_js.md +179 -0
  165. data/node_modules/mime/src/build.js +71 -0
  166. data/node_modules/mime/src/test.js +257 -0
  167. data/node_modules/mime/types/other.json +1 -0
  168. data/node_modules/mime/types/standard.json +1 -0
  169. data/node_modules/minimatch/LICENSE +15 -0
  170. data/node_modules/minimatch/README.md +209 -0
  171. data/node_modules/minimatch/minimatch.js +923 -0
  172. data/node_modules/minimatch/package.json +30 -0
  173. data/node_modules/minimist/LICENSE +18 -0
  174. data/node_modules/minimist/example/parse.js +2 -0
  175. data/node_modules/minimist/index.js +187 -0
  176. data/node_modules/minimist/package.json +40 -0
  177. data/node_modules/minimist/readme.markdown +73 -0
  178. data/node_modules/minimist/test/dash.js +24 -0
  179. data/node_modules/minimist/test/default_bool.js +20 -0
  180. data/node_modules/minimist/test/dotted.js +16 -0
  181. data/node_modules/minimist/test/long.js +31 -0
  182. data/node_modules/minimist/test/parse.js +318 -0
  183. data/node_modules/minimist/test/parse_modified.js +9 -0
  184. data/node_modules/minimist/test/short.js +67 -0
  185. data/node_modules/minimist/test/whitespace.js +8 -0
  186. data/node_modules/mkdirp/LICENSE +21 -0
  187. data/node_modules/mkdirp/bin/cmd.js +33 -0
  188. data/node_modules/mkdirp/bin/usage.txt +12 -0
  189. data/node_modules/mkdirp/examples/pow.js +6 -0
  190. data/node_modules/mkdirp/index.js +98 -0
  191. data/node_modules/mkdirp/package.json +27 -0
  192. data/node_modules/mkdirp/readme.markdown +100 -0
  193. data/node_modules/mkdirp/test/chmod.js +41 -0
  194. data/node_modules/mkdirp/test/clobber.js +38 -0
  195. data/node_modules/mkdirp/test/mkdirp.js +28 -0
  196. data/node_modules/mkdirp/test/opts_fs.js +29 -0
  197. data/node_modules/mkdirp/test/opts_fs_sync.js +27 -0
  198. data/node_modules/mkdirp/test/perm.js +32 -0
  199. data/node_modules/mkdirp/test/perm_sync.js +36 -0
  200. data/node_modules/mkdirp/test/race.js +37 -0
  201. data/node_modules/mkdirp/test/rel.js +32 -0
  202. data/node_modules/mkdirp/test/return.js +25 -0
  203. data/node_modules/mkdirp/test/return_sync.js +24 -0
  204. data/node_modules/mkdirp/test/root.js +19 -0
  205. data/node_modules/mkdirp/test/sync.js +32 -0
  206. data/node_modules/mkdirp/test/umask.js +28 -0
  207. data/node_modules/mkdirp/test/umask_sync.js +32 -0
  208. data/node_modules/ms/index.js +152 -0
  209. data/node_modules/ms/license.md +21 -0
  210. data/node_modules/ms/package.json +37 -0
  211. data/node_modules/ms/readme.md +51 -0
  212. data/node_modules/once/LICENSE +15 -0
  213. data/node_modules/once/README.md +79 -0
  214. data/node_modules/once/once.js +42 -0
  215. data/node_modules/once/package.json +33 -0
  216. data/node_modules/path-is-absolute/index.js +20 -0
  217. data/node_modules/path-is-absolute/license +21 -0
  218. data/node_modules/path-is-absolute/package.json +43 -0
  219. data/node_modules/path-is-absolute/readme.md +59 -0
  220. data/node_modules/pend/LICENSE +23 -0
  221. data/node_modules/pend/README.md +41 -0
  222. data/node_modules/pend/index.js +55 -0
  223. data/node_modules/pend/package.json +18 -0
  224. data/node_modules/pend/test.js +137 -0
  225. data/node_modules/process-nextick-args/index.js +44 -0
  226. data/node_modules/process-nextick-args/license.md +19 -0
  227. data/node_modules/process-nextick-args/package.json +25 -0
  228. data/node_modules/process-nextick-args/readme.md +18 -0
  229. data/node_modules/progress/CHANGELOG.md +115 -0
  230. data/node_modules/progress/LICENSE +22 -0
  231. data/node_modules/progress/Makefile +8 -0
  232. data/node_modules/progress/README.md +146 -0
  233. data/node_modules/progress/index.js +1 -0
  234. data/node_modules/progress/lib/node-progress.js +231 -0
  235. data/node_modules/progress/package.json +25 -0
  236. data/node_modules/proxy-from-env/README.md +131 -0
  237. data/node_modules/proxy-from-env/index.js +103 -0
  238. data/node_modules/proxy-from-env/package.json +35 -0
  239. data/node_modules/proxy-from-env/test.js +393 -0
  240. data/node_modules/puppeteer/CONTRIBUTING.md +206 -0
  241. data/node_modules/puppeteer/DeviceDescriptors.js +704 -0
  242. data/node_modules/puppeteer/LICENSE +202 -0
  243. data/node_modules/puppeteer/README.md +306 -0
  244. data/node_modules/puppeteer/index.js +28 -0
  245. data/node_modules/puppeteer/install.js +122 -0
  246. data/node_modules/puppeteer/lib/Browser.js +186 -0
  247. data/node_modules/puppeteer/lib/BrowserFetcher.js +279 -0
  248. data/node_modules/puppeteer/lib/Connection.js +246 -0
  249. data/node_modules/puppeteer/lib/Coverage.js +301 -0
  250. data/node_modules/puppeteer/lib/Dialog.js +84 -0
  251. data/node_modules/puppeteer/lib/ElementHandle.js +328 -0
  252. data/node_modules/puppeteer/lib/EmulationManager.js +89 -0
  253. data/node_modules/puppeteer/lib/ExecutionContext.js +232 -0
  254. data/node_modules/puppeteer/lib/FrameManager.js +997 -0
  255. data/node_modules/puppeteer/lib/Input.js +309 -0
  256. data/node_modules/puppeteer/lib/Launcher.js +310 -0
  257. data/node_modules/puppeteer/lib/Multimap.js +95 -0
  258. data/node_modules/puppeteer/lib/NavigatorWatcher.js +137 -0
  259. data/node_modules/puppeteer/lib/NetworkManager.js +796 -0
  260. data/node_modules/puppeteer/lib/Page.js +1098 -0
  261. data/node_modules/puppeteer/lib/Pipe.js +69 -0
  262. data/node_modules/puppeteer/lib/Puppeteer.js +60 -0
  263. data/node_modules/puppeteer/lib/Target.js +88 -0
  264. data/node_modules/puppeteer/lib/TaskQueue.js +17 -0
  265. data/node_modules/puppeteer/lib/Tracing.js +99 -0
  266. data/node_modules/puppeteer/lib/USKeyboardLayout.js +281 -0
  267. data/node_modules/puppeteer/lib/helper.js +248 -0
  268. data/node_modules/puppeteer/node6/lib/Browser.js +394 -0
  269. data/node_modules/puppeteer/node6/lib/BrowserFetcher.js +357 -0
  270. data/node_modules/puppeteer/node6/lib/Connection.js +350 -0
  271. data/node_modules/puppeteer/node6/lib/Coverage.js +561 -0
  272. data/node_modules/puppeteer/node6/lib/Dialog.js +136 -0
  273. data/node_modules/puppeteer/node6/lib/ElementHandle.js +796 -0
  274. data/node_modules/puppeteer/node6/lib/EmulationManager.js +115 -0
  275. data/node_modules/puppeteer/node6/lib/ExecutionContext.js +414 -0
  276. data/node_modules/puppeteer/node6/lib/FrameManager.js +1621 -0
  277. data/node_modules/puppeteer/node6/lib/Input.js +569 -0
  278. data/node_modules/puppeteer/node6/lib/Launcher.js +362 -0
  279. data/node_modules/puppeteer/node6/lib/Multimap.js +95 -0
  280. data/node_modules/puppeteer/node6/lib/NavigatorWatcher.js +163 -0
  281. data/node_modules/puppeteer/node6/lib/NetworkManager.js +1108 -0
  282. data/node_modules/puppeteer/node6/lib/Page.js +2242 -0
  283. data/node_modules/puppeteer/node6/lib/Pipe.js +69 -0
  284. data/node_modules/puppeteer/node6/lib/Puppeteer.js +60 -0
  285. data/node_modules/puppeteer/node6/lib/Target.js +114 -0
  286. data/node_modules/puppeteer/node6/lib/TaskQueue.js +17 -0
  287. data/node_modules/puppeteer/node6/lib/Tracing.js +177 -0
  288. data/node_modules/puppeteer/node6/lib/USKeyboardLayout.js +281 -0
  289. data/node_modules/puppeteer/node6/lib/helper.js +274 -0
  290. data/node_modules/puppeteer/package.json +61 -0
  291. data/node_modules/readable-stream/CONTRIBUTING.md +38 -0
  292. data/node_modules/readable-stream/GOVERNANCE.md +136 -0
  293. data/node_modules/readable-stream/LICENSE +47 -0
  294. data/node_modules/readable-stream/README.md +58 -0
  295. data/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
  296. data/node_modules/readable-stream/duplex-browser.js +1 -0
  297. data/node_modules/readable-stream/duplex.js +1 -0
  298. data/node_modules/readable-stream/lib/_stream_duplex.js +131 -0
  299. data/node_modules/readable-stream/lib/_stream_passthrough.js +47 -0
  300. data/node_modules/readable-stream/lib/_stream_readable.js +1019 -0
  301. data/node_modules/readable-stream/lib/_stream_transform.js +214 -0
  302. data/node_modules/readable-stream/lib/_stream_writable.js +687 -0
  303. data/node_modules/readable-stream/lib/internal/streams/BufferList.js +79 -0
  304. data/node_modules/readable-stream/lib/internal/streams/destroy.js +74 -0
  305. data/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
  306. data/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
  307. data/node_modules/readable-stream/package.json +52 -0
  308. data/node_modules/readable-stream/passthrough.js +1 -0
  309. data/node_modules/readable-stream/readable-browser.js +7 -0
  310. data/node_modules/readable-stream/readable.js +19 -0
  311. data/node_modules/readable-stream/transform.js +1 -0
  312. data/node_modules/readable-stream/writable-browser.js +1 -0
  313. data/node_modules/readable-stream/writable.js +8 -0
  314. data/node_modules/rimraf/LICENSE +15 -0
  315. data/node_modules/rimraf/README.md +101 -0
  316. data/node_modules/rimraf/bin.js +50 -0
  317. data/node_modules/rimraf/package.json +26 -0
  318. data/node_modules/rimraf/rimraf.js +364 -0
  319. data/node_modules/safe-buffer/LICENSE +21 -0
  320. data/node_modules/safe-buffer/README.md +584 -0
  321. data/node_modules/safe-buffer/index.d.ts +187 -0
  322. data/node_modules/safe-buffer/index.js +62 -0
  323. data/node_modules/safe-buffer/package.json +37 -0
  324. data/node_modules/string_decoder/LICENSE +48 -0
  325. data/node_modules/string_decoder/README.md +47 -0
  326. data/node_modules/string_decoder/lib/string_decoder.js +296 -0
  327. data/node_modules/string_decoder/package.json +31 -0
  328. data/node_modules/typedarray/LICENSE +35 -0
  329. data/node_modules/typedarray/example/tarray.js +4 -0
  330. data/node_modules/typedarray/index.js +630 -0
  331. data/node_modules/typedarray/package.json +55 -0
  332. data/node_modules/typedarray/readme.markdown +61 -0
  333. data/node_modules/typedarray/test/server/undef_globals.js +19 -0
  334. data/node_modules/typedarray/test/tarray.js +10 -0
  335. data/node_modules/ultron/LICENSE +22 -0
  336. data/node_modules/ultron/README.md +113 -0
  337. data/node_modules/ultron/index.js +136 -0
  338. data/node_modules/ultron/package.json +41 -0
  339. data/node_modules/util-deprecate/History.md +16 -0
  340. data/node_modules/util-deprecate/LICENSE +24 -0
  341. data/node_modules/util-deprecate/README.md +53 -0
  342. data/node_modules/util-deprecate/browser.js +67 -0
  343. data/node_modules/util-deprecate/node.js +6 -0
  344. data/node_modules/util-deprecate/package.json +27 -0
  345. data/node_modules/wrappy/LICENSE +15 -0
  346. data/node_modules/wrappy/README.md +36 -0
  347. data/node_modules/wrappy/package.json +29 -0
  348. data/node_modules/wrappy/wrappy.js +33 -0
  349. data/node_modules/ws/LICENSE +21 -0
  350. data/node_modules/ws/README.md +341 -0
  351. data/node_modules/ws/index.js +15 -0
  352. data/node_modules/ws/lib/BufferUtil.js +71 -0
  353. data/node_modules/ws/lib/Constants.js +10 -0
  354. data/node_modules/ws/lib/ErrorCodes.js +28 -0
  355. data/node_modules/ws/lib/EventTarget.js +151 -0
  356. data/node_modules/ws/lib/Extensions.js +203 -0
  357. data/node_modules/ws/lib/PerMessageDeflate.js +507 -0
  358. data/node_modules/ws/lib/Receiver.js +553 -0
  359. data/node_modules/ws/lib/Sender.js +412 -0
  360. data/node_modules/ws/lib/Validation.js +17 -0
  361. data/node_modules/ws/lib/WebSocket.js +717 -0
  362. data/node_modules/ws/lib/WebSocketServer.js +326 -0
  363. data/node_modules/ws/package.json +46 -0
  364. data/node_modules/yauzl/LICENSE +21 -0
  365. data/node_modules/yauzl/README.md +467 -0
  366. data/node_modules/yauzl/index.js +626 -0
  367. data/node_modules/yauzl/package.json +36 -0
  368. data/package.json +5 -0
  369. data/yarn.lock +240 -0
  370. metadata +372 -7
  371. data/app/assets/stylesheets/default.css +0 -4
  372. data/lib/postdoc/postdoc_view_helper.rb +0 -22
@@ -0,0 +1,281 @@
1
+ /**
2
+ * Copyright 2017 Google Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the 'License');
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an 'AS IS' BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ /**
18
+ * @typedef {Object} KeyDefinition
19
+ * @property {number=} keyCode
20
+ * @property {number=} shiftKeyCode
21
+ * @property {string=} key
22
+ * @property {string=} shiftKey
23
+ * @property {string=} code
24
+ * @property {string=} text
25
+ * @property {string=} shiftText
26
+ * @property {number=} location
27
+ */
28
+
29
+ /**
30
+ * @type {Object<string, KeyDefinition>}
31
+ */
32
+ module.exports = {
33
+ '0': {'keyCode': 48, 'key': '0', 'code': 'Digit0'},
34
+ '1': {'keyCode': 49, 'key': '1', 'code': 'Digit1'},
35
+ '2': {'keyCode': 50, 'key': '2', 'code': 'Digit2'},
36
+ '3': {'keyCode': 51, 'key': '3', 'code': 'Digit3'},
37
+ '4': {'keyCode': 52, 'key': '4', 'code': 'Digit4'},
38
+ '5': {'keyCode': 53, 'key': '5', 'code': 'Digit5'},
39
+ '6': {'keyCode': 54, 'key': '6', 'code': 'Digit6'},
40
+ '7': {'keyCode': 55, 'key': '7', 'code': 'Digit7'},
41
+ '8': {'keyCode': 56, 'key': '8', 'code': 'Digit8'},
42
+ '9': {'keyCode': 57, 'key': '9', 'code': 'Digit9'},
43
+ 'Power': {'key': 'Power', 'code': 'Power'},
44
+ 'Eject': {'key': 'Eject', 'code': 'Eject'},
45
+ 'Abort': {'keyCode': 3, 'code': 'Abort', 'key': 'Cancel'},
46
+ 'Help': {'keyCode': 6, 'code': 'Help', 'key': 'Help'},
47
+ 'Backspace': {'keyCode': 8, 'code': 'Backspace', 'key': 'Backspace'},
48
+ 'Tab': {'keyCode': 9, 'code': 'Tab', 'key': 'Tab'},
49
+ 'Numpad5': {'keyCode': 12, 'shiftKeyCode': 101, 'key': 'Clear', 'code': 'Numpad5', 'shiftKey': '5', 'location': 3},
50
+ 'NumpadEnter': {'keyCode': 13, 'code': 'NumpadEnter', 'key': 'Enter', 'text': '\r', 'location': 3},
51
+ 'Enter': {'keyCode': 13, 'code': 'Enter', 'key': 'Enter', 'text': '\r'},
52
+ '\r': {'keyCode': 13, 'code': 'Enter', 'key': 'Enter', 'text': '\r'},
53
+ '\n': {'keyCode': 13, 'code': 'Enter', 'key': 'Enter', 'text': '\r'},
54
+ 'ShiftLeft': {'keyCode': 16, 'code': 'ShiftLeft', 'key': 'Shift', 'location': 1},
55
+ 'ShiftRight': {'keyCode': 16, 'code': 'ShiftRight', 'key': 'Shift', 'location': 2},
56
+ 'ControlLeft': {'keyCode': 17, 'code': 'ControlLeft', 'key': 'Control', 'location': 1},
57
+ 'ControlRight': {'keyCode': 17, 'code': 'ControlRight', 'key': 'Control', 'location': 2},
58
+ 'AltLeft': {'keyCode': 18, 'code': 'AltLeft', 'key': 'Alt', 'location': 1},
59
+ 'AltRight': {'keyCode': 18, 'code': 'AltRight', 'key': 'Alt', 'location': 2},
60
+ 'Pause': {'keyCode': 19, 'code': 'Pause', 'key': 'Pause'},
61
+ 'CapsLock': {'keyCode': 20, 'code': 'CapsLock', 'key': 'CapsLock'},
62
+ 'Escape': {'keyCode': 27, 'code': 'Escape', 'key': 'Escape'},
63
+ 'Convert': {'keyCode': 28, 'code': 'Convert', 'key': 'Convert'},
64
+ 'NonConvert': {'keyCode': 29, 'code': 'NonConvert', 'key': 'NonConvert'},
65
+ 'Space': {'keyCode': 32, 'code': 'Space', 'key': ' '},
66
+ 'Numpad9': {'keyCode': 33, 'shiftKeyCode': 105, 'key': 'PageUp', 'code': 'Numpad9', 'shiftKey': '9', 'location': 3},
67
+ 'PageUp': {'keyCode': 33, 'code': 'PageUp', 'key': 'PageUp'},
68
+ 'Numpad3': {'keyCode': 34, 'shiftKeyCode': 99, 'key': 'PageDown', 'code': 'Numpad3', 'shiftKey': '3', 'location': 3},
69
+ 'PageDown': {'keyCode': 34, 'code': 'PageDown', 'key': 'PageDown'},
70
+ 'End': {'keyCode': 35, 'code': 'End', 'key': 'End'},
71
+ 'Numpad1': {'keyCode': 35, 'shiftKeyCode': 97, 'key': 'End', 'code': 'Numpad1', 'shiftKey': '1', 'location': 3},
72
+ 'Home': {'keyCode': 36, 'code': 'Home', 'key': 'Home'},
73
+ 'Numpad7': {'keyCode': 36, 'shiftKeyCode': 103, 'key': 'Home', 'code': 'Numpad7', 'shiftKey': '7', 'location': 3},
74
+ 'ArrowLeft': {'keyCode': 37, 'code': 'ArrowLeft', 'key': 'ArrowLeft'},
75
+ 'Numpad4': {'keyCode': 37, 'shiftKeyCode': 100, 'key': 'ArrowLeft', 'code': 'Numpad4', 'shiftKey': '4', 'location': 3},
76
+ 'Numpad8': {'keyCode': 38, 'shiftKeyCode': 104, 'key': 'ArrowUp', 'code': 'Numpad8', 'shiftKey': '8', 'location': 3},
77
+ 'ArrowUp': {'keyCode': 38, 'code': 'ArrowUp', 'key': 'ArrowUp'},
78
+ 'ArrowRight': {'keyCode': 39, 'code': 'ArrowRight', 'key': 'ArrowRight'},
79
+ 'Numpad6': {'keyCode': 39, 'shiftKeyCode': 102, 'key': 'ArrowRight', 'code': 'Numpad6', 'shiftKey': '6', 'location': 3},
80
+ 'Numpad2': {'keyCode': 40, 'shiftKeyCode': 98, 'key': 'ArrowDown', 'code': 'Numpad2', 'shiftKey': '2', 'location': 3},
81
+ 'ArrowDown': {'keyCode': 40, 'code': 'ArrowDown', 'key': 'ArrowDown'},
82
+ 'Select': {'keyCode': 41, 'code': 'Select', 'key': 'Select'},
83
+ 'Open': {'keyCode': 43, 'code': 'Open', 'key': 'Execute'},
84
+ 'PrintScreen': {'keyCode': 44, 'code': 'PrintScreen', 'key': 'PrintScreen'},
85
+ 'Insert': {'keyCode': 45, 'code': 'Insert', 'key': 'Insert'},
86
+ 'Numpad0': {'keyCode': 45, 'shiftKeyCode': 96, 'key': 'Insert', 'code': 'Numpad0', 'shiftKey': '0', 'location': 3},
87
+ 'Delete': {'keyCode': 46, 'code': 'Delete', 'key': 'Delete'},
88
+ 'NumpadDecimal': {'keyCode': 46, 'shiftKeyCode': 110, 'code': 'NumpadDecimal', 'key': '\u0000', 'shiftKey': '.', 'location': 3},
89
+ 'Digit0': {'keyCode': 48, 'code': 'Digit0', 'shiftKey': ')', 'key': '0'},
90
+ 'Digit1': {'keyCode': 49, 'code': 'Digit1', 'shiftKey': '!', 'key': '1'},
91
+ 'Digit2': {'keyCode': 50, 'code': 'Digit2', 'shiftKey': '@', 'key': '2'},
92
+ 'Digit3': {'keyCode': 51, 'code': 'Digit3', 'shiftKey': '#', 'key': '3'},
93
+ 'Digit4': {'keyCode': 52, 'code': 'Digit4', 'shiftKey': '$', 'key': '4'},
94
+ 'Digit5': {'keyCode': 53, 'code': 'Digit5', 'shiftKey': '%', 'key': '5'},
95
+ 'Digit6': {'keyCode': 54, 'code': 'Digit6', 'shiftKey': '^', 'key': '6'},
96
+ 'Digit7': {'keyCode': 55, 'code': 'Digit7', 'shiftKey': '&', 'key': '7'},
97
+ 'Digit8': {'keyCode': 56, 'code': 'Digit8', 'shiftKey': '*', 'key': '8'},
98
+ 'Digit9': {'keyCode': 57, 'code': 'Digit9', 'shiftKey': '\(', 'key': '9'},
99
+ 'KeyA': {'keyCode': 65, 'code': 'KeyA', 'shiftKey': 'A', 'key': 'a'},
100
+ 'KeyB': {'keyCode': 66, 'code': 'KeyB', 'shiftKey': 'B', 'key': 'b'},
101
+ 'KeyC': {'keyCode': 67, 'code': 'KeyC', 'shiftKey': 'C', 'key': 'c'},
102
+ 'KeyD': {'keyCode': 68, 'code': 'KeyD', 'shiftKey': 'D', 'key': 'd'},
103
+ 'KeyE': {'keyCode': 69, 'code': 'KeyE', 'shiftKey': 'E', 'key': 'e'},
104
+ 'KeyF': {'keyCode': 70, 'code': 'KeyF', 'shiftKey': 'F', 'key': 'f'},
105
+ 'KeyG': {'keyCode': 71, 'code': 'KeyG', 'shiftKey': 'G', 'key': 'g'},
106
+ 'KeyH': {'keyCode': 72, 'code': 'KeyH', 'shiftKey': 'H', 'key': 'h'},
107
+ 'KeyI': {'keyCode': 73, 'code': 'KeyI', 'shiftKey': 'I', 'key': 'i'},
108
+ 'KeyJ': {'keyCode': 74, 'code': 'KeyJ', 'shiftKey': 'J', 'key': 'j'},
109
+ 'KeyK': {'keyCode': 75, 'code': 'KeyK', 'shiftKey': 'K', 'key': 'k'},
110
+ 'KeyL': {'keyCode': 76, 'code': 'KeyL', 'shiftKey': 'L', 'key': 'l'},
111
+ 'KeyM': {'keyCode': 77, 'code': 'KeyM', 'shiftKey': 'M', 'key': 'm'},
112
+ 'KeyN': {'keyCode': 78, 'code': 'KeyN', 'shiftKey': 'N', 'key': 'n'},
113
+ 'KeyO': {'keyCode': 79, 'code': 'KeyO', 'shiftKey': 'O', 'key': 'o'},
114
+ 'KeyP': {'keyCode': 80, 'code': 'KeyP', 'shiftKey': 'P', 'key': 'p'},
115
+ 'KeyQ': {'keyCode': 81, 'code': 'KeyQ', 'shiftKey': 'Q', 'key': 'q'},
116
+ 'KeyR': {'keyCode': 82, 'code': 'KeyR', 'shiftKey': 'R', 'key': 'r'},
117
+ 'KeyS': {'keyCode': 83, 'code': 'KeyS', 'shiftKey': 'S', 'key': 's'},
118
+ 'KeyT': {'keyCode': 84, 'code': 'KeyT', 'shiftKey': 'T', 'key': 't'},
119
+ 'KeyU': {'keyCode': 85, 'code': 'KeyU', 'shiftKey': 'U', 'key': 'u'},
120
+ 'KeyV': {'keyCode': 86, 'code': 'KeyV', 'shiftKey': 'V', 'key': 'v'},
121
+ 'KeyW': {'keyCode': 87, 'code': 'KeyW', 'shiftKey': 'W', 'key': 'w'},
122
+ 'KeyX': {'keyCode': 88, 'code': 'KeyX', 'shiftKey': 'X', 'key': 'x'},
123
+ 'KeyY': {'keyCode': 89, 'code': 'KeyY', 'shiftKey': 'Y', 'key': 'y'},
124
+ 'KeyZ': {'keyCode': 90, 'code': 'KeyZ', 'shiftKey': 'Z', 'key': 'z'},
125
+ 'MetaLeft': {'keyCode': 91, 'code': 'MetaLeft', 'key': 'Meta'},
126
+ 'MetaRight': {'keyCode': 92, 'code': 'MetaRight', 'key': 'Meta'},
127
+ 'ContextMenu': {'keyCode': 93, 'code': 'ContextMenu', 'key': 'ContextMenu'},
128
+ 'NumpadMultiply': {'keyCode': 106, 'code': 'NumpadMultiply', 'key': '*', 'location': 3},
129
+ 'NumpadAdd': {'keyCode': 107, 'code': 'NumpadAdd', 'key': '+', 'location': 3},
130
+ 'NumpadSubtract': {'keyCode': 109, 'code': 'NumpadSubtract', 'key': '-', 'location': 3},
131
+ 'NumpadDivide': {'keyCode': 111, 'code': 'NumpadDivide', 'key': '/', 'location': 3},
132
+ 'F1': {'keyCode': 112, 'code': 'F1', 'key': 'F1'},
133
+ 'F2': {'keyCode': 113, 'code': 'F2', 'key': 'F2'},
134
+ 'F3': {'keyCode': 114, 'code': 'F3', 'key': 'F3'},
135
+ 'F4': {'keyCode': 115, 'code': 'F4', 'key': 'F4'},
136
+ 'F5': {'keyCode': 116, 'code': 'F5', 'key': 'F5'},
137
+ 'F6': {'keyCode': 117, 'code': 'F6', 'key': 'F6'},
138
+ 'F7': {'keyCode': 118, 'code': 'F7', 'key': 'F7'},
139
+ 'F8': {'keyCode': 119, 'code': 'F8', 'key': 'F8'},
140
+ 'F9': {'keyCode': 120, 'code': 'F9', 'key': 'F9'},
141
+ 'F10': {'keyCode': 121, 'code': 'F10', 'key': 'F10'},
142
+ 'F11': {'keyCode': 122, 'code': 'F11', 'key': 'F11'},
143
+ 'F12': {'keyCode': 123, 'code': 'F12', 'key': 'F12'},
144
+ 'F13': {'keyCode': 124, 'code': 'F13', 'key': 'F13'},
145
+ 'F14': {'keyCode': 125, 'code': 'F14', 'key': 'F14'},
146
+ 'F15': {'keyCode': 126, 'code': 'F15', 'key': 'F15'},
147
+ 'F16': {'keyCode': 127, 'code': 'F16', 'key': 'F16'},
148
+ 'F17': {'keyCode': 128, 'code': 'F17', 'key': 'F17'},
149
+ 'F18': {'keyCode': 129, 'code': 'F18', 'key': 'F18'},
150
+ 'F19': {'keyCode': 130, 'code': 'F19', 'key': 'F19'},
151
+ 'F20': {'keyCode': 131, 'code': 'F20', 'key': 'F20'},
152
+ 'F21': {'keyCode': 132, 'code': 'F21', 'key': 'F21'},
153
+ 'F22': {'keyCode': 133, 'code': 'F22', 'key': 'F22'},
154
+ 'F23': {'keyCode': 134, 'code': 'F23', 'key': 'F23'},
155
+ 'F24': {'keyCode': 135, 'code': 'F24', 'key': 'F24'},
156
+ 'NumLock': {'keyCode': 144, 'code': 'NumLock', 'key': 'NumLock'},
157
+ 'ScrollLock': {'keyCode': 145, 'code': 'ScrollLock', 'key': 'ScrollLock'},
158
+ 'AudioVolumeMute': {'keyCode': 173, 'code': 'AudioVolumeMute', 'key': 'AudioVolumeMute'},
159
+ 'AudioVolumeDown': {'keyCode': 174, 'code': 'AudioVolumeDown', 'key': 'AudioVolumeDown'},
160
+ 'AudioVolumeUp': {'keyCode': 175, 'code': 'AudioVolumeUp', 'key': 'AudioVolumeUp'},
161
+ 'MediaTrackNext': {'keyCode': 176, 'code': 'MediaTrackNext', 'key': 'MediaTrackNext'},
162
+ 'MediaTrackPrevious': {'keyCode': 177, 'code': 'MediaTrackPrevious', 'key': 'MediaTrackPrevious'},
163
+ 'MediaStop': {'keyCode': 178, 'code': 'MediaStop', 'key': 'MediaStop'},
164
+ 'MediaPlayPause': {'keyCode': 179, 'code': 'MediaPlayPause', 'key': 'MediaPlayPause'},
165
+ 'Semicolon': {'keyCode': 186, 'code': 'Semicolon', 'shiftKey': ':', 'key': ';'},
166
+ 'Equal': {'keyCode': 187, 'code': 'Equal', 'shiftKey': '+', 'key': '='},
167
+ 'NumpadEqual': {'keyCode': 187, 'code': 'NumpadEqual', 'key': '=', 'location': 3},
168
+ 'Comma': {'keyCode': 188, 'code': 'Comma', 'shiftKey': '\<', 'key': ','},
169
+ 'Minus': {'keyCode': 189, 'code': 'Minus', 'shiftKey': '_', 'key': '-'},
170
+ 'Period': {'keyCode': 190, 'code': 'Period', 'shiftKey': '>', 'key': '.'},
171
+ 'Slash': {'keyCode': 191, 'code': 'Slash', 'shiftKey': '?', 'key': '/'},
172
+ 'Backquote': {'keyCode': 192, 'code': 'Backquote', 'shiftKey': '~', 'key': '`'},
173
+ 'BracketLeft': {'keyCode': 219, 'code': 'BracketLeft', 'shiftKey': '{', 'key': '['},
174
+ 'Backslash': {'keyCode': 220, 'code': 'Backslash', 'shiftKey': '|', 'key': '\\'},
175
+ 'BracketRight': {'keyCode': 221, 'code': 'BracketRight', 'shiftKey': '}', 'key': ']'},
176
+ 'Quote': {'keyCode': 222, 'code': 'Quote', 'shiftKey': '"', 'key': '\''},
177
+ 'AltGraph': {'keyCode': 225, 'code': 'AltGraph', 'key': 'AltGraph'},
178
+ 'Props': {'keyCode': 247, 'code': 'Props', 'key': 'CrSel'},
179
+ 'Cancel': {'keyCode': 3, 'key': 'Cancel', 'code': 'Abort'},
180
+ 'Clear': {'keyCode': 12, 'key': 'Clear', 'code': 'Numpad5', 'location': 3},
181
+ 'Shift': {'keyCode': 16, 'key': 'Shift', 'code': 'ShiftLeft'},
182
+ 'Control': {'keyCode': 17, 'key': 'Control', 'code': 'ControlLeft'},
183
+ 'Alt': {'keyCode': 18, 'key': 'Alt', 'code': 'AltLeft'},
184
+ 'Accept': {'keyCode': 30, 'key': 'Accept'},
185
+ 'ModeChange': {'keyCode': 31, 'key': 'ModeChange'},
186
+ ' ': {'keyCode': 32, 'key': ' ', 'code': 'Space'},
187
+ 'Print': {'keyCode': 42, 'key': 'Print'},
188
+ 'Execute': {'keyCode': 43, 'key': 'Execute', 'code': 'Open'},
189
+ '\u0000': {'keyCode': 46, 'key': '\u0000', 'code': 'NumpadDecimal', 'location': 3},
190
+ 'a': {'keyCode': 65, 'key': 'a', 'code': 'KeyA'},
191
+ 'b': {'keyCode': 66, 'key': 'b', 'code': 'KeyB'},
192
+ 'c': {'keyCode': 67, 'key': 'c', 'code': 'KeyC'},
193
+ 'd': {'keyCode': 68, 'key': 'd', 'code': 'KeyD'},
194
+ 'e': {'keyCode': 69, 'key': 'e', 'code': 'KeyE'},
195
+ 'f': {'keyCode': 70, 'key': 'f', 'code': 'KeyF'},
196
+ 'g': {'keyCode': 71, 'key': 'g', 'code': 'KeyG'},
197
+ 'h': {'keyCode': 72, 'key': 'h', 'code': 'KeyH'},
198
+ 'i': {'keyCode': 73, 'key': 'i', 'code': 'KeyI'},
199
+ 'j': {'keyCode': 74, 'key': 'j', 'code': 'KeyJ'},
200
+ 'k': {'keyCode': 75, 'key': 'k', 'code': 'KeyK'},
201
+ 'l': {'keyCode': 76, 'key': 'l', 'code': 'KeyL'},
202
+ 'm': {'keyCode': 77, 'key': 'm', 'code': 'KeyM'},
203
+ 'n': {'keyCode': 78, 'key': 'n', 'code': 'KeyN'},
204
+ 'o': {'keyCode': 79, 'key': 'o', 'code': 'KeyO'},
205
+ 'p': {'keyCode': 80, 'key': 'p', 'code': 'KeyP'},
206
+ 'q': {'keyCode': 81, 'key': 'q', 'code': 'KeyQ'},
207
+ 'r': {'keyCode': 82, 'key': 'r', 'code': 'KeyR'},
208
+ 's': {'keyCode': 83, 'key': 's', 'code': 'KeyS'},
209
+ 't': {'keyCode': 84, 'key': 't', 'code': 'KeyT'},
210
+ 'u': {'keyCode': 85, 'key': 'u', 'code': 'KeyU'},
211
+ 'v': {'keyCode': 86, 'key': 'v', 'code': 'KeyV'},
212
+ 'w': {'keyCode': 87, 'key': 'w', 'code': 'KeyW'},
213
+ 'x': {'keyCode': 88, 'key': 'x', 'code': 'KeyX'},
214
+ 'y': {'keyCode': 89, 'key': 'y', 'code': 'KeyY'},
215
+ 'z': {'keyCode': 90, 'key': 'z', 'code': 'KeyZ'},
216
+ 'Meta': {'keyCode': 91, 'key': 'Meta', 'code': 'MetaLeft'},
217
+ '*': {'keyCode': 106, 'key': '*', 'code': 'NumpadMultiply', 'location': 3},
218
+ '+': {'keyCode': 107, 'key': '+', 'code': 'NumpadAdd', 'location': 3},
219
+ '-': {'keyCode': 109, 'key': '-', 'code': 'NumpadSubtract', 'location': 3},
220
+ '/': {'keyCode': 111, 'key': '/', 'code': 'NumpadDivide', 'location': 3},
221
+ ';': {'keyCode': 186, 'key': ';', 'code': 'Semicolon'},
222
+ '=': {'keyCode': 187, 'key': '=', 'code': 'Equal'},
223
+ ',': {'keyCode': 188, 'key': ',', 'code': 'Comma'},
224
+ '.': {'keyCode': 190, 'key': '.', 'code': 'Period'},
225
+ '`': {'keyCode': 192, 'key': '`', 'code': 'Backquote'},
226
+ '[': {'keyCode': 219, 'key': '[', 'code': 'BracketLeft'},
227
+ '\\': {'keyCode': 220, 'key': '\\', 'code': 'Backslash'},
228
+ ']': {'keyCode': 221, 'key': ']', 'code': 'BracketRight'},
229
+ '\'': {'keyCode': 222, 'key': '\'', 'code': 'Quote'},
230
+ 'Attn': {'keyCode': 246, 'key': 'Attn'},
231
+ 'CrSel': {'keyCode': 247, 'key': 'CrSel', 'code': 'Props'},
232
+ 'ExSel': {'keyCode': 248, 'key': 'ExSel'},
233
+ 'EraseEof': {'keyCode': 249, 'key': 'EraseEof'},
234
+ 'Play': {'keyCode': 250, 'key': 'Play'},
235
+ 'ZoomOut': {'keyCode': 251, 'key': 'ZoomOut'},
236
+ ')': {'keyCode': 48, 'key': ')', 'code': 'Digit0'},
237
+ '!': {'keyCode': 49, 'key': '!', 'code': 'Digit1'},
238
+ '@': {'keyCode': 50, 'key': '@', 'code': 'Digit2'},
239
+ '#': {'keyCode': 51, 'key': '#', 'code': 'Digit3'},
240
+ '$': {'keyCode': 52, 'key': '$', 'code': 'Digit4'},
241
+ '%': {'keyCode': 53, 'key': '%', 'code': 'Digit5'},
242
+ '^': {'keyCode': 54, 'key': '^', 'code': 'Digit6'},
243
+ '&': {'keyCode': 55, 'key': '&', 'code': 'Digit7'},
244
+ '(': {'keyCode': 57, 'key': '\(', 'code': 'Digit9'},
245
+ 'A': {'keyCode': 65, 'key': 'A', 'code': 'KeyA'},
246
+ 'B': {'keyCode': 66, 'key': 'B', 'code': 'KeyB'},
247
+ 'C': {'keyCode': 67, 'key': 'C', 'code': 'KeyC'},
248
+ 'D': {'keyCode': 68, 'key': 'D', 'code': 'KeyD'},
249
+ 'E': {'keyCode': 69, 'key': 'E', 'code': 'KeyE'},
250
+ 'F': {'keyCode': 70, 'key': 'F', 'code': 'KeyF'},
251
+ 'G': {'keyCode': 71, 'key': 'G', 'code': 'KeyG'},
252
+ 'H': {'keyCode': 72, 'key': 'H', 'code': 'KeyH'},
253
+ 'I': {'keyCode': 73, 'key': 'I', 'code': 'KeyI'},
254
+ 'J': {'keyCode': 74, 'key': 'J', 'code': 'KeyJ'},
255
+ 'K': {'keyCode': 75, 'key': 'K', 'code': 'KeyK'},
256
+ 'L': {'keyCode': 76, 'key': 'L', 'code': 'KeyL'},
257
+ 'M': {'keyCode': 77, 'key': 'M', 'code': 'KeyM'},
258
+ 'N': {'keyCode': 78, 'key': 'N', 'code': 'KeyN'},
259
+ 'O': {'keyCode': 79, 'key': 'O', 'code': 'KeyO'},
260
+ 'P': {'keyCode': 80, 'key': 'P', 'code': 'KeyP'},
261
+ 'Q': {'keyCode': 81, 'key': 'Q', 'code': 'KeyQ'},
262
+ 'R': {'keyCode': 82, 'key': 'R', 'code': 'KeyR'},
263
+ 'S': {'keyCode': 83, 'key': 'S', 'code': 'KeyS'},
264
+ 'T': {'keyCode': 84, 'key': 'T', 'code': 'KeyT'},
265
+ 'U': {'keyCode': 85, 'key': 'U', 'code': 'KeyU'},
266
+ 'V': {'keyCode': 86, 'key': 'V', 'code': 'KeyV'},
267
+ 'W': {'keyCode': 87, 'key': 'W', 'code': 'KeyW'},
268
+ 'X': {'keyCode': 88, 'key': 'X', 'code': 'KeyX'},
269
+ 'Y': {'keyCode': 89, 'key': 'Y', 'code': 'KeyY'},
270
+ 'Z': {'keyCode': 90, 'key': 'Z', 'code': 'KeyZ'},
271
+ ':': {'keyCode': 186, 'key': ':', 'code': 'Semicolon'},
272
+ '<': {'keyCode': 188, 'key': '\<', 'code': 'Comma'},
273
+ '_': {'keyCode': 189, 'key': '_', 'code': 'Minus'},
274
+ '>': {'keyCode': 190, 'key': '>', 'code': 'Period'},
275
+ '?': {'keyCode': 191, 'key': '?', 'code': 'Slash'},
276
+ '~': {'keyCode': 192, 'key': '~', 'code': 'Backquote'},
277
+ '{': {'keyCode': 219, 'key': '{', 'code': 'BracketLeft'},
278
+ '|': {'keyCode': 220, 'key': '|', 'code': 'Backslash'},
279
+ '}': {'keyCode': 221, 'key': '}', 'code': 'BracketRight'},
280
+ '"': {'keyCode': 222, 'key': '"', 'code': 'Quote'}
281
+ };
@@ -0,0 +1,274 @@
1
+ /**
2
+ * Copyright 2017 Google Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ const fs = require('fs');
17
+ const path = require('path');
18
+
19
+ const debugError = require('debug')(`puppeteer:error`);
20
+ /** @type {?Map<string, boolean>} */
21
+ let apiCoverage = null;
22
+ let projectRoot = null;
23
+ class Helper {
24
+ /**
25
+ * @param {Function|string} fun
26
+ * @param {!Array<*>} args
27
+ * @return {string}
28
+ */
29
+ static evaluationString(fun, ...args) {
30
+ if (Helper.isString(fun)) {
31
+ console.assert(args.length === 0, 'Cannot evaluate a string with arguments');
32
+ return /** @type {string} */ (fun);
33
+ }
34
+ return `(${fun})(${args.map(serializeArgument).join(',')})`;
35
+
36
+ /**
37
+ * @param {*} arg
38
+ * @return {string}
39
+ */
40
+ function serializeArgument(arg) {
41
+ if (Object.is(arg, undefined))
42
+ return 'undefined';
43
+ return JSON.stringify(arg);
44
+ }
45
+ }
46
+
47
+ /**
48
+ * @return {string}
49
+ */
50
+ static projectRoot() {
51
+ if (!projectRoot) {
52
+ // Project root will be different for node6-transpiled code.
53
+ projectRoot = fs.existsSync(path.join(__dirname, '..', 'package.json')) ? path.join(__dirname, '..') : path.join(__dirname, '..', '..');
54
+ }
55
+ return projectRoot;
56
+ }
57
+
58
+ /**
59
+ * @param {!Protocol.Runtime.ExceptionDetails} exceptionDetails
60
+ * @return {string}
61
+ */
62
+ static getExceptionMessage(exceptionDetails) {
63
+ if (exceptionDetails.exception)
64
+ return exceptionDetails.exception.description;
65
+ let message = exceptionDetails.text;
66
+ if (exceptionDetails.stackTrace) {
67
+ for (const callframe of exceptionDetails.stackTrace.callFrames) {
68
+ const location = callframe.url + ':' + callframe.lineNumber + ':' + callframe.columnNumber;
69
+ const functionName = callframe.functionName || '<anonymous>';
70
+ message += `\n at ${functionName} (${location})`;
71
+ }
72
+ }
73
+ return message;
74
+ }
75
+
76
+ /**
77
+ * @param {!Protocol.Runtime.RemoteObject} remoteObject
78
+ * @return {*}
79
+ */
80
+ static valueFromRemoteObject(remoteObject) {
81
+ console.assert(!remoteObject.objectId, 'Cannot extract value when objectId is given');
82
+ if (remoteObject.unserializableValue) {
83
+ switch (remoteObject.unserializableValue) {
84
+ case '-0':
85
+ return -0;
86
+ case 'NaN':
87
+ return NaN;
88
+ case 'Infinity':
89
+ return Infinity;
90
+ case '-Infinity':
91
+ return -Infinity;
92
+ default:
93
+ throw new Error('Unsupported unserializable value: ' + remoteObject.unserializableValue);
94
+ }
95
+ }
96
+ return remoteObject.value;
97
+ }
98
+
99
+ /**
100
+ * @param {!Puppeteer.CDPSession} client
101
+ * @param {!Protocol.Runtime.RemoteObject} remoteObject
102
+ */
103
+ static /* async */ releaseObject(client, remoteObject) {return (fn => {
104
+ const gen = fn.call(this);
105
+ return new Promise((resolve, reject) => {
106
+ function step(key, arg) {
107
+ let info, value;
108
+ try {
109
+ info = gen[key](arg);
110
+ value = info.value;
111
+ } catch (error) {
112
+ reject(error);
113
+ return;
114
+ }
115
+ if (info.done) {
116
+ resolve(value);
117
+ } else {
118
+ return Promise.resolve(value).then(
119
+ value => {
120
+ step('next', value);
121
+ },
122
+ err => {
123
+ step('throw', err);
124
+ });
125
+ }
126
+ }
127
+ return step('next');
128
+ });
129
+ })(function*(){
130
+ if (!remoteObject.objectId)
131
+ return;
132
+ (yield client.send('Runtime.releaseObject', {objectId: remoteObject.objectId}).catch(error => {
133
+ // Exceptions might happen in case of a page been navigated or closed.
134
+ // Swallow these since they are harmless and we don't leak anything in this case.
135
+ debugError(error);
136
+ }));
137
+ });}
138
+
139
+ /**
140
+ * @param {!Object} classType
141
+ * @param {string=} publicName
142
+ */
143
+ static tracePublicAPI(classType, publicName) {
144
+ let className = publicName || classType.prototype.constructor.name;
145
+ className = className.substring(0, 1).toLowerCase() + className.substring(1);
146
+ const debug = require('debug')(`puppeteer:${className}`);
147
+ if (!debug.enabled && !apiCoverage)
148
+ return;
149
+ for (const methodName of Reflect.ownKeys(classType.prototype)) {
150
+ const method = Reflect.get(classType.prototype, methodName);
151
+ if (methodName === 'constructor' || typeof methodName !== 'string' || methodName.startsWith('_') || typeof method !== 'function')
152
+ continue;
153
+ if (apiCoverage)
154
+ apiCoverage.set(`${className}.${methodName}`, false);
155
+ Reflect.set(classType.prototype, methodName, function(...args) {
156
+ const argsText = args.map(stringifyArgument).join(', ');
157
+ const callsite = `${className}.${methodName}(${argsText})`;
158
+ if (debug.enabled)
159
+ debug(callsite);
160
+ if (apiCoverage)
161
+ apiCoverage.set(`${className}.${methodName}`, true);
162
+ return method.call(this, ...args);
163
+ });
164
+ }
165
+
166
+ if (classType.Events) {
167
+ if (apiCoverage) {
168
+ for (const event of Object.values(classType.Events))
169
+ apiCoverage.set(`${className}.emit(${JSON.stringify(event)})`, false);
170
+ }
171
+ const method = Reflect.get(classType.prototype, 'emit');
172
+ Reflect.set(classType.prototype, 'emit', function(event, ...args) {
173
+ const argsText = [JSON.stringify(event)].concat(args.map(stringifyArgument)).join(', ');
174
+ if (debug.enabled && this.listenerCount(event))
175
+ debug(`${className}.emit(${argsText})`);
176
+ if (apiCoverage && this.listenerCount(event))
177
+ apiCoverage.set(`${className}.emit(${JSON.stringify(event)})`, true);
178
+ return method.call(this, event, ...args);
179
+ });
180
+ }
181
+
182
+ /**
183
+ * @param {!Object} arg
184
+ * @return {string}
185
+ */
186
+ function stringifyArgument(arg) {
187
+ if (Helper.isString(arg) || Helper.isNumber(arg) || !arg)
188
+ return JSON.stringify(arg);
189
+ if (typeof arg === 'function') {
190
+ let text = arg.toString().split('\n').map(line => line.trim()).join('');
191
+ if (text.length > 20)
192
+ text = text.substring(0, 20) + '…';
193
+ return `"${text}"`;
194
+ }
195
+ const state = {};
196
+ const keys = Object.keys(arg);
197
+ for (const key of keys) {
198
+ const value = arg[key];
199
+ if (Helper.isString(value) || Helper.isNumber(value))
200
+ state[key] = JSON.stringify(value);
201
+ }
202
+ const name = arg.constructor.name === 'Object' ? '' : arg.constructor.name;
203
+ return name + JSON.stringify(state);
204
+ }
205
+ }
206
+
207
+ /**
208
+ * @param {!NodeJS.EventEmitter} emitter
209
+ * @param {string} eventName
210
+ * @param {function(?)} handler
211
+ * @return {{emitter: !NodeJS.EventEmitter, eventName: string, handler: function(?)}}
212
+ */
213
+ static addEventListener(emitter, eventName, handler) {
214
+ emitter.on(eventName, handler);
215
+ return { emitter, eventName, handler };
216
+ }
217
+
218
+ /**
219
+ * @param {!Array<{emitter: !NodeJS.EventEmitter, eventName: string, handler: function(?)}>} listeners
220
+ */
221
+ static removeEventListeners(listeners) {
222
+ for (const listener of listeners)
223
+ listener.emitter.removeListener(listener.eventName, listener.handler);
224
+ listeners.splice(0, listeners.length);
225
+ }
226
+
227
+ /**
228
+ * @return {?Map<string, boolean>}
229
+ */
230
+ static publicAPICoverage() {
231
+ return apiCoverage;
232
+ }
233
+
234
+ static recordPublicAPICoverage() {
235
+ apiCoverage = new Map();
236
+ }
237
+
238
+ /**
239
+ * @param {!Object} obj
240
+ * @return {boolean}
241
+ */
242
+ static isString(obj) {
243
+ return typeof obj === 'string' || obj instanceof String;
244
+ }
245
+
246
+ /**
247
+ * @param {!Object} obj
248
+ * @return {boolean}
249
+ */
250
+ static isNumber(obj) {
251
+ return typeof obj === 'number' || obj instanceof Number;
252
+ }
253
+
254
+ static promisify(nodeFunction) {
255
+ function promisified(...args) {
256
+ return new Promise((resolve, reject) => {
257
+ function callback(err, ...result) {
258
+ if (err)
259
+ return reject(err);
260
+ if (result.length === 1)
261
+ return resolve(result[0]);
262
+ return resolve(result);
263
+ }
264
+ nodeFunction.call(null, ...args, callback);
265
+ });
266
+ }
267
+ return promisified;
268
+ }
269
+ }
270
+
271
+ module.exports = {
272
+ helper: Helper,
273
+ debugError
274
+ };
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "puppeteer",
3
+ "version": "1.4.0",
4
+ "description": "A high-level API to control headless Chrome over the DevTools Protocol",
5
+ "main": "index.js",
6
+ "repository": "github:GoogleChrome/puppeteer",
7
+ "engines": {
8
+ "node": ">=6.4.0"
9
+ },
10
+ "scripts": {
11
+ "unit": "node test/test.js",
12
+ "debug-unit": "node --inspect-brk test/test.js",
13
+ "test-doclint": "node utils/doclint/check_public_api/test/test.js && node utils/doclint/preprocessor/test.js",
14
+ "test": "npm run lint --silent && npm run coverage && npm run test-doclint && npm run test-node6-transformer",
15
+ "install": "node install.js",
16
+ "lint": "([ \"$CI\" = true ] && eslint --quiet -f codeframe . || eslint .) && npm run tsc && npm run doc",
17
+ "doc": "node utils/doclint/cli.js",
18
+ "coverage": "cross-env COVERAGE=true npm run unit",
19
+ "test-node6-transformer": "node utils/node6-transform/test/test.js",
20
+ "build": "node utils/node6-transform/index.js",
21
+ "unit-node6": "node node6/test/test.js",
22
+ "tsc": "node utils/protocol-types-generator && tsc -p .",
23
+ "prepublishOnly": "npm run build",
24
+ "apply-next-version": "node utils/apply_next_version.js"
25
+ },
26
+ "author": "The Chromium Authors",
27
+ "license": "Apache-2.0",
28
+ "dependencies": {
29
+ "debug": "^3.1.0",
30
+ "extract-zip": "^1.6.5",
31
+ "https-proxy-agent": "^2.1.0",
32
+ "mime": "^2.0.3",
33
+ "progress": "^2.0.0",
34
+ "proxy-from-env": "^1.0.0",
35
+ "rimraf": "^2.6.1",
36
+ "ws": "^3.0.0"
37
+ },
38
+ "puppeteer": {
39
+ "chromium_revision": "555668"
40
+ },
41
+ "devDependencies": {
42
+ "@types/debug": "0.0.30",
43
+ "@types/extract-zip": "^1.6.2",
44
+ "@types/mime": "^2.0.0",
45
+ "@types/node": "^8.0.26",
46
+ "@types/rimraf": "^2.0.2",
47
+ "@types/ws": "^3.0.2",
48
+ "commonmark": "^0.27.0",
49
+ "cross-env": "^5.0.5",
50
+ "eslint": "^4.0.0",
51
+ "esprima": "^4.0.0",
52
+ "markdown-toc": "^1.1.0",
53
+ "minimist": "^1.2.0",
54
+ "ncp": "^2.0.0",
55
+ "pdfjs-dist": "^1.8.595",
56
+ "pixelmatch": "^4.0.2",
57
+ "pngjs": "^3.3.3",
58
+ "text-diff": "^1.0.1",
59
+ "typescript": "~2.8.1"
60
+ }
61
+ }