@marktrue/dsh-mobile-remote 3.2.1-rc.1-app → 3.2.1-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (352) hide show
  1. package/CHANGELOG.md +835 -0
  2. package/CONTRIBUTING.md +59 -0
  3. package/FAQ.md +111 -0
  4. package/README.md +253 -6
  5. package/cordis.patch.yml +14 -0
  6. package/docs/00-/345/274/200/345/217/221/346/200/273/347/272/262.md +122 -0
  7. package/docs/01-PRD.md +148 -0
  8. package/docs/02-architecture.md +249 -0
  9. package/docs/03-api.md +816 -0
  10. package/docs/04-security.md +96 -0
  11. package/docs/05-test-cases.md +326 -0
  12. package/docs/06-install-run.md +308 -0
  13. package/docs/07-user-manual.md +65 -0
  14. package/docs/08-/346/211/251/345/261/225/345/274/200/345/217/221/346/214/207/345/215/227.md +86 -0
  15. package/docs/09-compatibility.md +195 -0
  16. package/docs/10-release.md +927 -0
  17. package/docs/screenshots/01-home.png +0 -0
  18. package/docs/screenshots/02-notifications.png +0 -0
  19. package/docs/screenshots/03-sessions.png +0 -0
  20. package/docs/screenshots/04-chat.png +0 -0
  21. package/docs/screenshots/05-settings.png +0 -0
  22. package/docs/screenshots/06-new-session.png +0 -0
  23. package/docs/screenshots/pgy-appstore.jpg +0 -0
  24. package/docs/screenshots/pgy-mobile-app.jpg +0 -0
  25. package/docs/screenshots/pgy-pc-client.jpg +0 -0
  26. package/lib/account-usage.js +145 -0
  27. package/lib/app-alignment.js +112 -0
  28. package/lib/app-carrier-store.js +1972 -0
  29. package/lib/app-carrier.js +609 -0
  30. package/lib/client.js +1174 -0
  31. package/lib/desktop-form.js +738 -0
  32. package/lib/endpoint-registry.js +165 -0
  33. package/lib/git-read-bundled-provider.js +255 -0
  34. package/lib/git-read-service.js +322 -0
  35. package/lib/index.js +9338 -0
  36. package/lib/npm-update-source.js +226 -0
  37. package/lib/plugin-content-digest.js +80 -0
  38. package/lib/plugin-self-update.js +997 -0
  39. package/lib/plugin-update-controller.js +274 -0
  40. package/lib/plugin-update-log.js +164 -0
  41. package/lib/plugin-update-transaction.js +322 -0
  42. package/lib/plugin-update.js +309 -0
  43. package/lib/runtime-dependency-snapshot.js +345 -0
  44. package/lib/session-title-cache.js +123 -0
  45. package/lib/session-title-refresh.js +261 -0
  46. package/lib/tool-process.js +20 -0
  47. package/lib/update-fetch.js +24 -0
  48. package/lib/update-lock-arbiter.js +170 -0
  49. package/lib/update-supervisor.js +346 -0
  50. package/node_modules/ansi-regex/index.d.ts +37 -0
  51. package/node_modules/ansi-regex/index.js +10 -0
  52. package/node_modules/ansi-regex/license +9 -0
  53. package/node_modules/ansi-regex/package.json +55 -0
  54. package/node_modules/ansi-regex/readme.md +78 -0
  55. package/node_modules/ansi-styles/index.d.ts +345 -0
  56. package/node_modules/ansi-styles/index.js +163 -0
  57. package/node_modules/ansi-styles/license +9 -0
  58. package/node_modules/ansi-styles/package.json +56 -0
  59. package/node_modules/ansi-styles/readme.md +152 -0
  60. package/node_modules/camelcase/index.d.ts +63 -0
  61. package/node_modules/camelcase/index.js +76 -0
  62. package/node_modules/camelcase/license +9 -0
  63. package/node_modules/camelcase/package.json +43 -0
  64. package/node_modules/camelcase/readme.md +99 -0
  65. package/node_modules/cliui/CHANGELOG.md +76 -0
  66. package/node_modules/cliui/LICENSE.txt +14 -0
  67. package/node_modules/cliui/README.md +115 -0
  68. package/node_modules/cliui/index.js +354 -0
  69. package/node_modules/cliui/package.json +65 -0
  70. package/node_modules/color-convert/CHANGELOG.md +54 -0
  71. package/node_modules/color-convert/LICENSE +21 -0
  72. package/node_modules/color-convert/README.md +68 -0
  73. package/node_modules/color-convert/conversions.js +839 -0
  74. package/node_modules/color-convert/index.js +81 -0
  75. package/node_modules/color-convert/package.json +48 -0
  76. package/node_modules/color-convert/route.js +97 -0
  77. package/node_modules/color-name/LICENSE +8 -0
  78. package/node_modules/color-name/README.md +11 -0
  79. package/node_modules/color-name/index.js +152 -0
  80. package/node_modules/color-name/package.json +28 -0
  81. package/node_modules/decamelize/index.js +13 -0
  82. package/node_modules/decamelize/license +21 -0
  83. package/node_modules/decamelize/package.json +38 -0
  84. package/node_modules/decamelize/readme.md +48 -0
  85. package/node_modules/dijkstrajs/.travis.yml +4 -0
  86. package/node_modules/dijkstrajs/CONTRIBUTING.md +8 -0
  87. package/node_modules/dijkstrajs/LICENSE.md +19 -0
  88. package/node_modules/dijkstrajs/README.md +18 -0
  89. package/node_modules/dijkstrajs/dijkstra.js +165 -0
  90. package/node_modules/dijkstrajs/package.json +60 -0
  91. package/node_modules/dijkstrajs/test/dijkstra.test.js +96 -0
  92. package/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  93. package/node_modules/emoji-regex/README.md +73 -0
  94. package/node_modules/emoji-regex/es2015/index.js +6 -0
  95. package/node_modules/emoji-regex/es2015/text.js +6 -0
  96. package/node_modules/emoji-regex/index.d.ts +23 -0
  97. package/node_modules/emoji-regex/index.js +6 -0
  98. package/node_modules/emoji-regex/package.json +50 -0
  99. package/node_modules/emoji-regex/text.js +6 -0
  100. package/node_modules/find-up/index.d.ts +137 -0
  101. package/node_modules/find-up/index.js +89 -0
  102. package/node_modules/find-up/license +9 -0
  103. package/node_modules/find-up/package.json +53 -0
  104. package/node_modules/find-up/readme.md +156 -0
  105. package/node_modules/get-caller-file/LICENSE.md +6 -0
  106. package/node_modules/get-caller-file/README.md +41 -0
  107. package/node_modules/get-caller-file/index.d.ts +2 -0
  108. package/node_modules/get-caller-file/index.js +22 -0
  109. package/node_modules/get-caller-file/index.js.map +1 -0
  110. package/node_modules/get-caller-file/package.json +42 -0
  111. package/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
  112. package/node_modules/is-fullwidth-code-point/index.js +50 -0
  113. package/node_modules/is-fullwidth-code-point/license +9 -0
  114. package/node_modules/is-fullwidth-code-point/package.json +42 -0
  115. package/node_modules/is-fullwidth-code-point/readme.md +39 -0
  116. package/node_modules/locate-path/index.d.ts +83 -0
  117. package/node_modules/locate-path/index.js +65 -0
  118. package/node_modules/locate-path/license +9 -0
  119. package/node_modules/locate-path/package.json +45 -0
  120. package/node_modules/locate-path/readme.md +122 -0
  121. package/node_modules/p-limit/index.d.ts +38 -0
  122. package/node_modules/p-limit/index.js +57 -0
  123. package/node_modules/p-limit/license +9 -0
  124. package/node_modules/p-limit/package.json +52 -0
  125. package/node_modules/p-limit/readme.md +101 -0
  126. package/node_modules/p-locate/index.d.ts +64 -0
  127. package/node_modules/p-locate/index.js +52 -0
  128. package/node_modules/p-locate/license +9 -0
  129. package/node_modules/p-locate/package.json +53 -0
  130. package/node_modules/p-locate/readme.md +90 -0
  131. package/node_modules/p-try/index.d.ts +39 -0
  132. package/node_modules/p-try/index.js +9 -0
  133. package/node_modules/p-try/license +9 -0
  134. package/node_modules/p-try/package.json +42 -0
  135. package/node_modules/p-try/readme.md +58 -0
  136. package/node_modules/path-exists/index.d.ts +28 -0
  137. package/node_modules/path-exists/index.js +23 -0
  138. package/node_modules/path-exists/license +9 -0
  139. package/node_modules/path-exists/package.json +39 -0
  140. package/node_modules/path-exists/readme.md +52 -0
  141. package/node_modules/pngjs/.eslintignore +2 -0
  142. package/node_modules/pngjs/.eslintrc.json +19 -0
  143. package/node_modules/pngjs/.prettierignore +3 -0
  144. package/node_modules/pngjs/LICENSE +20 -0
  145. package/node_modules/pngjs/README.md +429 -0
  146. package/node_modules/pngjs/browser.js +16096 -0
  147. package/node_modules/pngjs/coverage/lcov-report/base.css +354 -0
  148. package/node_modules/pngjs/coverage/lcov-report/bitmapper.js.html +881 -0
  149. package/node_modules/pngjs/coverage/lcov-report/bitpacker.js.html +554 -0
  150. package/node_modules/pngjs/coverage/lcov-report/block-navigation.js +77 -0
  151. package/node_modules/pngjs/coverage/lcov-report/chunkstream.js.html +647 -0
  152. package/node_modules/pngjs/coverage/lcov-report/constants.js.html +176 -0
  153. package/node_modules/pngjs/coverage/lcov-report/crc.js.html +200 -0
  154. package/node_modules/pngjs/coverage/lcov-report/favicon.png +0 -0
  155. package/node_modules/pngjs/coverage/lcov-report/filter-pack.js.html +593 -0
  156. package/node_modules/pngjs/coverage/lcov-report/filter-parse-async.js.html +152 -0
  157. package/node_modules/pngjs/coverage/lcov-report/filter-parse-sync.js.html +143 -0
  158. package/node_modules/pngjs/coverage/lcov-report/filter-parse.js.html +611 -0
  159. package/node_modules/pngjs/coverage/lcov-report/format-normaliser.js.html +359 -0
  160. package/node_modules/pngjs/coverage/lcov-report/index.html +426 -0
  161. package/node_modules/pngjs/coverage/lcov-report/interlace.js.html +365 -0
  162. package/node_modules/pngjs/coverage/lcov-report/packer-async.js.html +230 -0
  163. package/node_modules/pngjs/coverage/lcov-report/packer-sync.js.html +248 -0
  164. package/node_modules/pngjs/coverage/lcov-report/packer.js.html +467 -0
  165. package/node_modules/pngjs/coverage/lcov-report/paeth-predictor.js.html +128 -0
  166. package/node_modules/pngjs/coverage/lcov-report/parser-async.js.html +575 -0
  167. package/node_modules/pngjs/coverage/lcov-report/parser-sync.js.html +404 -0
  168. package/node_modules/pngjs/coverage/lcov-report/parser.js.html +950 -0
  169. package/node_modules/pngjs/coverage/lcov-report/png-sync.js.html +116 -0
  170. package/node_modules/pngjs/coverage/lcov-report/png.js.html +662 -0
  171. package/node_modules/pngjs/coverage/lcov-report/prettify.css +101 -0
  172. package/node_modules/pngjs/coverage/lcov-report/prettify.js +1007 -0
  173. package/node_modules/pngjs/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  174. package/node_modules/pngjs/coverage/lcov-report/sorter.js +169 -0
  175. package/node_modules/pngjs/coverage/lcov-report/sync-inflate.js.html +584 -0
  176. package/node_modules/pngjs/coverage/lcov-report/sync-reader.js.html +215 -0
  177. package/node_modules/pngjs/coverage/lcov.info +2177 -0
  178. package/node_modules/pngjs/lib/bitmapper.js +267 -0
  179. package/node_modules/pngjs/lib/bitpacker.js +158 -0
  180. package/node_modules/pngjs/lib/chunkstream.js +189 -0
  181. package/node_modules/pngjs/lib/constants.js +32 -0
  182. package/node_modules/pngjs/lib/crc.js +40 -0
  183. package/node_modules/pngjs/lib/filter-pack.js +171 -0
  184. package/node_modules/pngjs/lib/filter-parse-async.js +24 -0
  185. package/node_modules/pngjs/lib/filter-parse-sync.js +21 -0
  186. package/node_modules/pngjs/lib/filter-parse.js +177 -0
  187. package/node_modules/pngjs/lib/format-normaliser.js +93 -0
  188. package/node_modules/pngjs/lib/interlace.js +95 -0
  189. package/node_modules/pngjs/lib/packer-async.js +50 -0
  190. package/node_modules/pngjs/lib/packer-sync.js +56 -0
  191. package/node_modules/pngjs/lib/packer.js +129 -0
  192. package/node_modules/pngjs/lib/paeth-predictor.js +16 -0
  193. package/node_modules/pngjs/lib/parser-async.js +165 -0
  194. package/node_modules/pngjs/lib/parser-sync.js +108 -0
  195. package/node_modules/pngjs/lib/parser.js +290 -0
  196. package/node_modules/pngjs/lib/png-sync.js +12 -0
  197. package/node_modules/pngjs/lib/png.js +194 -0
  198. package/node_modules/pngjs/lib/sync-inflate.js +168 -0
  199. package/node_modules/pngjs/lib/sync-reader.js +45 -0
  200. package/node_modules/pngjs/package.json +73 -0
  201. package/node_modules/qrcode/README.md +770 -0
  202. package/node_modules/qrcode/bin/qrcode +159 -0
  203. package/node_modules/qrcode/helper/to-sjis-browser.js +2 -0
  204. package/node_modules/qrcode/helper/to-sjis.js +105 -0
  205. package/node_modules/qrcode/lib/browser.js +76 -0
  206. package/node_modules/qrcode/lib/can-promise.js +7 -0
  207. package/node_modules/qrcode/lib/core/alignment-pattern.js +83 -0
  208. package/node_modules/qrcode/lib/core/alphanumeric-data.js +59 -0
  209. package/node_modules/qrcode/lib/core/bit-buffer.js +37 -0
  210. package/node_modules/qrcode/lib/core/bit-matrix.js +65 -0
  211. package/node_modules/qrcode/lib/core/byte-data.js +30 -0
  212. package/node_modules/qrcode/lib/core/error-correction-code.js +135 -0
  213. package/node_modules/qrcode/lib/core/error-correction-level.js +50 -0
  214. package/node_modules/qrcode/lib/core/finder-pattern.js +22 -0
  215. package/node_modules/qrcode/lib/core/format-info.js +29 -0
  216. package/node_modules/qrcode/lib/core/galois-field.js +69 -0
  217. package/node_modules/qrcode/lib/core/kanji-data.js +54 -0
  218. package/node_modules/qrcode/lib/core/mask-pattern.js +234 -0
  219. package/node_modules/qrcode/lib/core/mode.js +167 -0
  220. package/node_modules/qrcode/lib/core/numeric-data.js +43 -0
  221. package/node_modules/qrcode/lib/core/polynomial.js +62 -0
  222. package/node_modules/qrcode/lib/core/qrcode.js +495 -0
  223. package/node_modules/qrcode/lib/core/reed-solomon-encoder.js +56 -0
  224. package/node_modules/qrcode/lib/core/regex.js +31 -0
  225. package/node_modules/qrcode/lib/core/segments.js +330 -0
  226. package/node_modules/qrcode/lib/core/utils.js +63 -0
  227. package/node_modules/qrcode/lib/core/version-check.js +9 -0
  228. package/node_modules/qrcode/lib/core/version.js +163 -0
  229. package/node_modules/qrcode/lib/index.js +12 -0
  230. package/node_modules/qrcode/lib/renderer/canvas.js +63 -0
  231. package/node_modules/qrcode/lib/renderer/png.js +78 -0
  232. package/node_modules/qrcode/lib/renderer/svg-tag.js +81 -0
  233. package/node_modules/qrcode/lib/renderer/svg.js +19 -0
  234. package/node_modules/qrcode/lib/renderer/terminal/terminal-small.js +85 -0
  235. package/node_modules/qrcode/lib/renderer/terminal/terminal.js +49 -0
  236. package/node_modules/qrcode/lib/renderer/terminal.js +9 -0
  237. package/node_modules/qrcode/lib/renderer/utf8.js +71 -0
  238. package/node_modules/qrcode/lib/renderer/utils.js +99 -0
  239. package/node_modules/qrcode/lib/server.js +138 -0
  240. package/node_modules/qrcode/license +10 -0
  241. package/node_modules/qrcode/package.json +77 -0
  242. package/node_modules/require-directory/.jshintrc +67 -0
  243. package/node_modules/require-directory/.npmignore +1 -0
  244. package/node_modules/require-directory/.travis.yml +3 -0
  245. package/node_modules/require-directory/LICENSE +22 -0
  246. package/node_modules/require-directory/README.markdown +184 -0
  247. package/node_modules/require-directory/index.js +86 -0
  248. package/node_modules/require-directory/package.json +40 -0
  249. package/node_modules/require-main-filename/CHANGELOG.md +26 -0
  250. package/node_modules/require-main-filename/LICENSE.txt +14 -0
  251. package/node_modules/require-main-filename/README.md +26 -0
  252. package/node_modules/require-main-filename/index.js +18 -0
  253. package/node_modules/require-main-filename/package.json +35 -0
  254. package/node_modules/set-blocking/CHANGELOG.md +26 -0
  255. package/node_modules/set-blocking/LICENSE.txt +14 -0
  256. package/node_modules/set-blocking/README.md +31 -0
  257. package/node_modules/set-blocking/index.js +7 -0
  258. package/node_modules/set-blocking/package.json +42 -0
  259. package/node_modules/string-width/index.d.ts +29 -0
  260. package/node_modules/string-width/index.js +47 -0
  261. package/node_modules/string-width/license +9 -0
  262. package/node_modules/string-width/package.json +56 -0
  263. package/node_modules/string-width/readme.md +50 -0
  264. package/node_modules/strip-ansi/index.d.ts +17 -0
  265. package/node_modules/strip-ansi/index.js +4 -0
  266. package/node_modules/strip-ansi/license +9 -0
  267. package/node_modules/strip-ansi/package.json +54 -0
  268. package/node_modules/strip-ansi/readme.md +46 -0
  269. package/node_modules/which-module/LICENSE +13 -0
  270. package/node_modules/which-module/README.md +58 -0
  271. package/node_modules/which-module/index.js +9 -0
  272. package/node_modules/which-module/package.json +41 -0
  273. package/node_modules/wrap-ansi/index.js +186 -0
  274. package/node_modules/wrap-ansi/license +9 -0
  275. package/node_modules/wrap-ansi/package.json +61 -0
  276. package/node_modules/wrap-ansi/readme.md +97 -0
  277. package/node_modules/y18n/CHANGELOG.md +35 -0
  278. package/node_modules/y18n/LICENSE +13 -0
  279. package/node_modules/y18n/README.md +109 -0
  280. package/node_modules/y18n/index.js +188 -0
  281. package/node_modules/y18n/package.json +39 -0
  282. package/node_modules/yargs/CHANGELOG.md +420 -0
  283. package/node_modules/yargs/LICENSE +21 -0
  284. package/node_modules/yargs/README.md +140 -0
  285. package/node_modules/yargs/build/lib/apply-extends.d.ts +2 -0
  286. package/node_modules/yargs/build/lib/apply-extends.js +65 -0
  287. package/node_modules/yargs/build/lib/argsert.d.ts +2 -0
  288. package/node_modules/yargs/build/lib/argsert.js +65 -0
  289. package/node_modules/yargs/build/lib/command.d.ts +64 -0
  290. package/node_modules/yargs/build/lib/command.js +416 -0
  291. package/node_modules/yargs/build/lib/common-types.d.ts +36 -0
  292. package/node_modules/yargs/build/lib/common-types.js +25 -0
  293. package/node_modules/yargs/build/lib/completion-templates.d.ts +2 -0
  294. package/node_modules/yargs/build/lib/completion-templates.js +50 -0
  295. package/node_modules/yargs/build/lib/completion.d.ts +21 -0
  296. package/node_modules/yargs/build/lib/completion.js +135 -0
  297. package/node_modules/yargs/build/lib/is-promise.d.ts +1 -0
  298. package/node_modules/yargs/build/lib/is-promise.js +9 -0
  299. package/node_modules/yargs/build/lib/levenshtein.d.ts +1 -0
  300. package/node_modules/yargs/build/lib/levenshtein.js +58 -0
  301. package/node_modules/yargs/build/lib/middleware.d.ts +10 -0
  302. package/node_modules/yargs/build/lib/middleware.js +57 -0
  303. package/node_modules/yargs/build/lib/obj-filter.d.ts +1 -0
  304. package/node_modules/yargs/build/lib/obj-filter.js +14 -0
  305. package/node_modules/yargs/build/lib/parse-command.d.ts +11 -0
  306. package/node_modules/yargs/build/lib/parse-command.js +36 -0
  307. package/node_modules/yargs/build/lib/process-argv.d.ts +2 -0
  308. package/node_modules/yargs/build/lib/process-argv.js +31 -0
  309. package/node_modules/yargs/build/lib/usage.d.ts +49 -0
  310. package/node_modules/yargs/build/lib/usage.js +540 -0
  311. package/node_modules/yargs/build/lib/validation.d.ts +34 -0
  312. package/node_modules/yargs/build/lib/validation.js +330 -0
  313. package/node_modules/yargs/build/lib/yargs.d.ts +274 -0
  314. package/node_modules/yargs/build/lib/yargs.js +1190 -0
  315. package/node_modules/yargs/build/lib/yerror.d.ts +4 -0
  316. package/node_modules/yargs/build/lib/yerror.js +11 -0
  317. package/node_modules/yargs/index.js +40 -0
  318. package/node_modules/yargs/locales/be.json +46 -0
  319. package/node_modules/yargs/locales/de.json +46 -0
  320. package/node_modules/yargs/locales/en.json +51 -0
  321. package/node_modules/yargs/locales/es.json +46 -0
  322. package/node_modules/yargs/locales/fi.json +49 -0
  323. package/node_modules/yargs/locales/fr.json +53 -0
  324. package/node_modules/yargs/locales/hi.json +49 -0
  325. package/node_modules/yargs/locales/hu.json +46 -0
  326. package/node_modules/yargs/locales/id.json +50 -0
  327. package/node_modules/yargs/locales/it.json +46 -0
  328. package/node_modules/yargs/locales/ja.json +51 -0
  329. package/node_modules/yargs/locales/ko.json +49 -0
  330. package/node_modules/yargs/locales/nb.json +44 -0
  331. package/node_modules/yargs/locales/nl.json +49 -0
  332. package/node_modules/yargs/locales/nn.json +44 -0
  333. package/node_modules/yargs/locales/pirate.json +13 -0
  334. package/node_modules/yargs/locales/pl.json +49 -0
  335. package/node_modules/yargs/locales/pt.json +45 -0
  336. package/node_modules/yargs/locales/pt_BR.json +48 -0
  337. package/node_modules/yargs/locales/ru.json +46 -0
  338. package/node_modules/yargs/locales/th.json +46 -0
  339. package/node_modules/yargs/locales/tr.json +48 -0
  340. package/node_modules/yargs/locales/zh_CN.json +48 -0
  341. package/node_modules/yargs/locales/zh_TW.json +47 -0
  342. package/node_modules/yargs/package.json +92 -0
  343. package/node_modules/yargs/yargs.js +14 -0
  344. package/node_modules/yargs-parser/CHANGELOG.md +601 -0
  345. package/node_modules/yargs-parser/LICENSE.txt +14 -0
  346. package/node_modules/yargs-parser/README.md +449 -0
  347. package/node_modules/yargs-parser/index.js +1032 -0
  348. package/node_modules/yargs-parser/lib/tokenize-arg-string.js +40 -0
  349. package/node_modules/yargs-parser/package.json +46 -0
  350. package/package.json +65 -12
  351. package/DSH-Remote-v3.2.1.apk +0 -4
  352. package/manifest.json +0 -21
@@ -0,0 +1,81 @@
1
+ const conversions = require('./conversions');
2
+ const route = require('./route');
3
+
4
+ const convert = {};
5
+
6
+ const models = Object.keys(conversions);
7
+
8
+ function wrapRaw(fn) {
9
+ const wrappedFn = function (...args) {
10
+ const arg0 = args[0];
11
+ if (arg0 === undefined || arg0 === null) {
12
+ return arg0;
13
+ }
14
+
15
+ if (arg0.length > 1) {
16
+ args = arg0;
17
+ }
18
+
19
+ return fn(args);
20
+ };
21
+
22
+ // Preserve .conversion property if there is one
23
+ if ('conversion' in fn) {
24
+ wrappedFn.conversion = fn.conversion;
25
+ }
26
+
27
+ return wrappedFn;
28
+ }
29
+
30
+ function wrapRounded(fn) {
31
+ const wrappedFn = function (...args) {
32
+ const arg0 = args[0];
33
+
34
+ if (arg0 === undefined || arg0 === null) {
35
+ return arg0;
36
+ }
37
+
38
+ if (arg0.length > 1) {
39
+ args = arg0;
40
+ }
41
+
42
+ const result = fn(args);
43
+
44
+ // We're assuming the result is an array here.
45
+ // see notice in conversions.js; don't use box types
46
+ // in conversion functions.
47
+ if (typeof result === 'object') {
48
+ for (let len = result.length, i = 0; i < len; i++) {
49
+ result[i] = Math.round(result[i]);
50
+ }
51
+ }
52
+
53
+ return result;
54
+ };
55
+
56
+ // Preserve .conversion property if there is one
57
+ if ('conversion' in fn) {
58
+ wrappedFn.conversion = fn.conversion;
59
+ }
60
+
61
+ return wrappedFn;
62
+ }
63
+
64
+ models.forEach(fromModel => {
65
+ convert[fromModel] = {};
66
+
67
+ Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});
68
+ Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});
69
+
70
+ const routes = route(fromModel);
71
+ const routeModels = Object.keys(routes);
72
+
73
+ routeModels.forEach(toModel => {
74
+ const fn = routes[toModel];
75
+
76
+ convert[fromModel][toModel] = wrapRounded(fn);
77
+ convert[fromModel][toModel].raw = wrapRaw(fn);
78
+ });
79
+ });
80
+
81
+ module.exports = convert;
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "color-convert",
3
+ "description": "Plain color conversion functions",
4
+ "version": "2.0.1",
5
+ "author": "Heather Arthur <fayearthur@gmail.com>",
6
+ "license": "MIT",
7
+ "repository": "Qix-/color-convert",
8
+ "scripts": {
9
+ "pretest": "xo",
10
+ "test": "node test/basic.js"
11
+ },
12
+ "engines": {
13
+ "node": ">=7.0.0"
14
+ },
15
+ "keywords": [
16
+ "color",
17
+ "colour",
18
+ "convert",
19
+ "converter",
20
+ "conversion",
21
+ "rgb",
22
+ "hsl",
23
+ "hsv",
24
+ "hwb",
25
+ "cmyk",
26
+ "ansi",
27
+ "ansi16"
28
+ ],
29
+ "files": [
30
+ "index.js",
31
+ "conversions.js",
32
+ "route.js"
33
+ ],
34
+ "xo": {
35
+ "rules": {
36
+ "default-case": 0,
37
+ "no-inline-comments": 0,
38
+ "operator-linebreak": 0
39
+ }
40
+ },
41
+ "devDependencies": {
42
+ "chalk": "^2.4.2",
43
+ "xo": "^0.24.0"
44
+ },
45
+ "dependencies": {
46
+ "color-name": "~1.1.4"
47
+ }
48
+ }
@@ -0,0 +1,97 @@
1
+ const conversions = require('./conversions');
2
+
3
+ /*
4
+ This function routes a model to all other models.
5
+
6
+ all functions that are routed have a property `.conversion` attached
7
+ to the returned synthetic function. This property is an array
8
+ of strings, each with the steps in between the 'from' and 'to'
9
+ color models (inclusive).
10
+
11
+ conversions that are not possible simply are not included.
12
+ */
13
+
14
+ function buildGraph() {
15
+ const graph = {};
16
+ // https://jsperf.com/object-keys-vs-for-in-with-closure/3
17
+ const models = Object.keys(conversions);
18
+
19
+ for (let len = models.length, i = 0; i < len; i++) {
20
+ graph[models[i]] = {
21
+ // http://jsperf.com/1-vs-infinity
22
+ // micro-opt, but this is simple.
23
+ distance: -1,
24
+ parent: null
25
+ };
26
+ }
27
+
28
+ return graph;
29
+ }
30
+
31
+ // https://en.wikipedia.org/wiki/Breadth-first_search
32
+ function deriveBFS(fromModel) {
33
+ const graph = buildGraph();
34
+ const queue = [fromModel]; // Unshift -> queue -> pop
35
+
36
+ graph[fromModel].distance = 0;
37
+
38
+ while (queue.length) {
39
+ const current = queue.pop();
40
+ const adjacents = Object.keys(conversions[current]);
41
+
42
+ for (let len = adjacents.length, i = 0; i < len; i++) {
43
+ const adjacent = adjacents[i];
44
+ const node = graph[adjacent];
45
+
46
+ if (node.distance === -1) {
47
+ node.distance = graph[current].distance + 1;
48
+ node.parent = current;
49
+ queue.unshift(adjacent);
50
+ }
51
+ }
52
+ }
53
+
54
+ return graph;
55
+ }
56
+
57
+ function link(from, to) {
58
+ return function (args) {
59
+ return to(from(args));
60
+ };
61
+ }
62
+
63
+ function wrapConversion(toModel, graph) {
64
+ const path = [graph[toModel].parent, toModel];
65
+ let fn = conversions[graph[toModel].parent][toModel];
66
+
67
+ let cur = graph[toModel].parent;
68
+ while (graph[cur].parent) {
69
+ path.unshift(graph[cur].parent);
70
+ fn = link(conversions[graph[cur].parent][cur], fn);
71
+ cur = graph[cur].parent;
72
+ }
73
+
74
+ fn.conversion = path;
75
+ return fn;
76
+ }
77
+
78
+ module.exports = function (fromModel) {
79
+ const graph = deriveBFS(fromModel);
80
+ const conversion = {};
81
+
82
+ const models = Object.keys(graph);
83
+ for (let len = models.length, i = 0; i < len; i++) {
84
+ const toModel = models[i];
85
+ const node = graph[toModel];
86
+
87
+ if (node.parent === null) {
88
+ // No possible conversion, or this node is the source model.
89
+ continue;
90
+ }
91
+
92
+ conversion[toModel] = wrapConversion(toModel, graph);
93
+ }
94
+
95
+ return conversion;
96
+ };
97
+
@@ -0,0 +1,8 @@
1
+ The MIT License (MIT)
2
+ Copyright (c) 2015 Dmitry Ivanov
3
+
4
+ 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:
5
+
6
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7
+
8
+ 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.
@@ -0,0 +1,11 @@
1
+ A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors.
2
+
3
+ [![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/)
4
+
5
+
6
+ ```js
7
+ var colors = require('color-name');
8
+ colors.red //[255,0,0]
9
+ ```
10
+
11
+ <a href="LICENSE"><img src="https://upload.wikimedia.org/wikipedia/commons/0/0c/MIT_logo.svg" width="120"/></a>
@@ -0,0 +1,152 @@
1
+ 'use strict'
2
+
3
+ module.exports = {
4
+ "aliceblue": [240, 248, 255],
5
+ "antiquewhite": [250, 235, 215],
6
+ "aqua": [0, 255, 255],
7
+ "aquamarine": [127, 255, 212],
8
+ "azure": [240, 255, 255],
9
+ "beige": [245, 245, 220],
10
+ "bisque": [255, 228, 196],
11
+ "black": [0, 0, 0],
12
+ "blanchedalmond": [255, 235, 205],
13
+ "blue": [0, 0, 255],
14
+ "blueviolet": [138, 43, 226],
15
+ "brown": [165, 42, 42],
16
+ "burlywood": [222, 184, 135],
17
+ "cadetblue": [95, 158, 160],
18
+ "chartreuse": [127, 255, 0],
19
+ "chocolate": [210, 105, 30],
20
+ "coral": [255, 127, 80],
21
+ "cornflowerblue": [100, 149, 237],
22
+ "cornsilk": [255, 248, 220],
23
+ "crimson": [220, 20, 60],
24
+ "cyan": [0, 255, 255],
25
+ "darkblue": [0, 0, 139],
26
+ "darkcyan": [0, 139, 139],
27
+ "darkgoldenrod": [184, 134, 11],
28
+ "darkgray": [169, 169, 169],
29
+ "darkgreen": [0, 100, 0],
30
+ "darkgrey": [169, 169, 169],
31
+ "darkkhaki": [189, 183, 107],
32
+ "darkmagenta": [139, 0, 139],
33
+ "darkolivegreen": [85, 107, 47],
34
+ "darkorange": [255, 140, 0],
35
+ "darkorchid": [153, 50, 204],
36
+ "darkred": [139, 0, 0],
37
+ "darksalmon": [233, 150, 122],
38
+ "darkseagreen": [143, 188, 143],
39
+ "darkslateblue": [72, 61, 139],
40
+ "darkslategray": [47, 79, 79],
41
+ "darkslategrey": [47, 79, 79],
42
+ "darkturquoise": [0, 206, 209],
43
+ "darkviolet": [148, 0, 211],
44
+ "deeppink": [255, 20, 147],
45
+ "deepskyblue": [0, 191, 255],
46
+ "dimgray": [105, 105, 105],
47
+ "dimgrey": [105, 105, 105],
48
+ "dodgerblue": [30, 144, 255],
49
+ "firebrick": [178, 34, 34],
50
+ "floralwhite": [255, 250, 240],
51
+ "forestgreen": [34, 139, 34],
52
+ "fuchsia": [255, 0, 255],
53
+ "gainsboro": [220, 220, 220],
54
+ "ghostwhite": [248, 248, 255],
55
+ "gold": [255, 215, 0],
56
+ "goldenrod": [218, 165, 32],
57
+ "gray": [128, 128, 128],
58
+ "green": [0, 128, 0],
59
+ "greenyellow": [173, 255, 47],
60
+ "grey": [128, 128, 128],
61
+ "honeydew": [240, 255, 240],
62
+ "hotpink": [255, 105, 180],
63
+ "indianred": [205, 92, 92],
64
+ "indigo": [75, 0, 130],
65
+ "ivory": [255, 255, 240],
66
+ "khaki": [240, 230, 140],
67
+ "lavender": [230, 230, 250],
68
+ "lavenderblush": [255, 240, 245],
69
+ "lawngreen": [124, 252, 0],
70
+ "lemonchiffon": [255, 250, 205],
71
+ "lightblue": [173, 216, 230],
72
+ "lightcoral": [240, 128, 128],
73
+ "lightcyan": [224, 255, 255],
74
+ "lightgoldenrodyellow": [250, 250, 210],
75
+ "lightgray": [211, 211, 211],
76
+ "lightgreen": [144, 238, 144],
77
+ "lightgrey": [211, 211, 211],
78
+ "lightpink": [255, 182, 193],
79
+ "lightsalmon": [255, 160, 122],
80
+ "lightseagreen": [32, 178, 170],
81
+ "lightskyblue": [135, 206, 250],
82
+ "lightslategray": [119, 136, 153],
83
+ "lightslategrey": [119, 136, 153],
84
+ "lightsteelblue": [176, 196, 222],
85
+ "lightyellow": [255, 255, 224],
86
+ "lime": [0, 255, 0],
87
+ "limegreen": [50, 205, 50],
88
+ "linen": [250, 240, 230],
89
+ "magenta": [255, 0, 255],
90
+ "maroon": [128, 0, 0],
91
+ "mediumaquamarine": [102, 205, 170],
92
+ "mediumblue": [0, 0, 205],
93
+ "mediumorchid": [186, 85, 211],
94
+ "mediumpurple": [147, 112, 219],
95
+ "mediumseagreen": [60, 179, 113],
96
+ "mediumslateblue": [123, 104, 238],
97
+ "mediumspringgreen": [0, 250, 154],
98
+ "mediumturquoise": [72, 209, 204],
99
+ "mediumvioletred": [199, 21, 133],
100
+ "midnightblue": [25, 25, 112],
101
+ "mintcream": [245, 255, 250],
102
+ "mistyrose": [255, 228, 225],
103
+ "moccasin": [255, 228, 181],
104
+ "navajowhite": [255, 222, 173],
105
+ "navy": [0, 0, 128],
106
+ "oldlace": [253, 245, 230],
107
+ "olive": [128, 128, 0],
108
+ "olivedrab": [107, 142, 35],
109
+ "orange": [255, 165, 0],
110
+ "orangered": [255, 69, 0],
111
+ "orchid": [218, 112, 214],
112
+ "palegoldenrod": [238, 232, 170],
113
+ "palegreen": [152, 251, 152],
114
+ "paleturquoise": [175, 238, 238],
115
+ "palevioletred": [219, 112, 147],
116
+ "papayawhip": [255, 239, 213],
117
+ "peachpuff": [255, 218, 185],
118
+ "peru": [205, 133, 63],
119
+ "pink": [255, 192, 203],
120
+ "plum": [221, 160, 221],
121
+ "powderblue": [176, 224, 230],
122
+ "purple": [128, 0, 128],
123
+ "rebeccapurple": [102, 51, 153],
124
+ "red": [255, 0, 0],
125
+ "rosybrown": [188, 143, 143],
126
+ "royalblue": [65, 105, 225],
127
+ "saddlebrown": [139, 69, 19],
128
+ "salmon": [250, 128, 114],
129
+ "sandybrown": [244, 164, 96],
130
+ "seagreen": [46, 139, 87],
131
+ "seashell": [255, 245, 238],
132
+ "sienna": [160, 82, 45],
133
+ "silver": [192, 192, 192],
134
+ "skyblue": [135, 206, 235],
135
+ "slateblue": [106, 90, 205],
136
+ "slategray": [112, 128, 144],
137
+ "slategrey": [112, 128, 144],
138
+ "snow": [255, 250, 250],
139
+ "springgreen": [0, 255, 127],
140
+ "steelblue": [70, 130, 180],
141
+ "tan": [210, 180, 140],
142
+ "teal": [0, 128, 128],
143
+ "thistle": [216, 191, 216],
144
+ "tomato": [255, 99, 71],
145
+ "turquoise": [64, 224, 208],
146
+ "violet": [238, 130, 238],
147
+ "wheat": [245, 222, 179],
148
+ "white": [255, 255, 255],
149
+ "whitesmoke": [245, 245, 245],
150
+ "yellow": [255, 255, 0],
151
+ "yellowgreen": [154, 205, 50]
152
+ };
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "color-name",
3
+ "version": "1.1.4",
4
+ "description": "A list of color names and its values",
5
+ "main": "index.js",
6
+ "files": [
7
+ "index.js"
8
+ ],
9
+ "scripts": {
10
+ "test": "node test.js"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git@github.com:colorjs/color-name.git"
15
+ },
16
+ "keywords": [
17
+ "color-name",
18
+ "color",
19
+ "color-keyword",
20
+ "keyword"
21
+ ],
22
+ "author": "DY <dfcreative@gmail.com>",
23
+ "license": "MIT",
24
+ "bugs": {
25
+ "url": "https://github.com/colorjs/color-name/issues"
26
+ },
27
+ "homepage": "https://github.com/colorjs/color-name"
28
+ }
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+ module.exports = function (str, sep) {
3
+ if (typeof str !== 'string') {
4
+ throw new TypeError('Expected a string');
5
+ }
6
+
7
+ sep = typeof sep === 'undefined' ? '_' : sep;
8
+
9
+ return str
10
+ .replace(/([a-z\d])([A-Z])/g, '$1' + sep + '$2')
11
+ .replace(/([A-Z]+)([A-Z][a-z\d]+)/g, '$1' + sep + '$2')
12
+ .toLowerCase();
13
+ };
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "decamelize",
3
+ "version": "1.2.0",
4
+ "description": "Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow",
5
+ "license": "MIT",
6
+ "repository": "sindresorhus/decamelize",
7
+ "author": {
8
+ "name": "Sindre Sorhus",
9
+ "email": "sindresorhus@gmail.com",
10
+ "url": "sindresorhus.com"
11
+ },
12
+ "engines": {
13
+ "node": ">=0.10.0"
14
+ },
15
+ "scripts": {
16
+ "test": "xo && ava"
17
+ },
18
+ "files": [
19
+ "index.js"
20
+ ],
21
+ "keywords": [
22
+ "decamelize",
23
+ "decamelcase",
24
+ "camelcase",
25
+ "lowercase",
26
+ "case",
27
+ "dash",
28
+ "hyphen",
29
+ "string",
30
+ "str",
31
+ "text",
32
+ "convert"
33
+ ],
34
+ "devDependencies": {
35
+ "ava": "*",
36
+ "xo": "*"
37
+ }
38
+ }
@@ -0,0 +1,48 @@
1
+ # decamelize [![Build Status](https://travis-ci.org/sindresorhus/decamelize.svg?branch=master)](https://travis-ci.org/sindresorhus/decamelize)
2
+
3
+ > Convert a camelized string into a lowercased one with a custom separator<br>
4
+ > Example: `unicornRainbow` → `unicorn_rainbow`
5
+
6
+
7
+ ## Install
8
+
9
+ ```
10
+ $ npm install --save decamelize
11
+ ```
12
+
13
+
14
+ ## Usage
15
+
16
+ ```js
17
+ const decamelize = require('decamelize');
18
+
19
+ decamelize('unicornRainbow');
20
+ //=> 'unicorn_rainbow'
21
+
22
+ decamelize('unicornRainbow', '-');
23
+ //=> 'unicorn-rainbow'
24
+ ```
25
+
26
+
27
+ ## API
28
+
29
+ ### decamelize(input, [separator])
30
+
31
+ #### input
32
+
33
+ Type: `string`
34
+
35
+ #### separator
36
+
37
+ Type: `string`<br>
38
+ Default: `_`
39
+
40
+
41
+ ## Related
42
+
43
+ See [`camelcase`](https://github.com/sindresorhus/camelcase) for the inverse.
44
+
45
+
46
+ ## License
47
+
48
+ MIT © [Sindre Sorhus](https://sindresorhus.com)
@@ -0,0 +1,4 @@
1
+ language: node_js
2
+ node_js:
3
+ - "stable"
4
+ sudo: false
@@ -0,0 +1,8 @@
1
+ Contributing
2
+ ============
3
+
4
+ 1. Fork it
5
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
6
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
7
+ 4. Push to the branch (`git push origin my-new-feature`)
8
+ 5. Create new Pull Request
@@ -0,0 +1,19 @@
1
+ ```
2
+ Dijkstra path-finding functions. Adapted from the Dijkstar Python project.
3
+
4
+ Copyright (C) 2008
5
+ Wyatt Baldwin <self@wyattbaldwin.com>
6
+ All rights reserved
7
+
8
+ Licensed under the MIT license.
9
+
10
+ http://www.opensource.org/licenses/mit-license.php
11
+
12
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18
+ THE SOFTWARE.
19
+ ```
@@ -0,0 +1,18 @@
1
+ # dijkstrajs.js
2
+
3
+ dijkstrajs is a simple JavaScript implementation of Dijkstra's single-source shortest-paths algorithm.
4
+
5
+ The code was originally written by Wyatt Baldwin and turned into a node module by Thomas Cort.
6
+
7
+ ## Requirements
8
+
9
+ * [nodejs](http://nodejs.org/)
10
+
11
+ ## Installation
12
+
13
+ npm install dijkstrajs
14
+
15
+ ## Examples
16
+
17
+ See `test/dijkstra.test.js` in the sources for some example code.
18
+