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

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 (349) hide show
  1. package/DSH-Remote-v3.2.1.apk +4 -0
  2. package/README.md +6 -253
  3. package/manifest.json +21 -0
  4. package/package.json +10 -65
  5. package/CHANGELOG.md +0 -796
  6. package/CONTRIBUTING.md +0 -59
  7. package/FAQ.md +0 -111
  8. package/cordis.patch.yml +0 -14
  9. package/docs/00-/345/274/200/345/217/221/346/200/273/347/272/262.md +0 -122
  10. package/docs/01-PRD.md +0 -148
  11. package/docs/02-architecture.md +0 -249
  12. package/docs/03-api.md +0 -816
  13. package/docs/04-security.md +0 -96
  14. package/docs/05-test-cases.md +0 -326
  15. package/docs/06-install-run.md +0 -308
  16. package/docs/07-user-manual.md +0 -65
  17. package/docs/08-/346/211/251/345/261/225/345/274/200/345/217/221/346/214/207/345/215/227.md +0 -86
  18. package/docs/09-compatibility.md +0 -195
  19. package/docs/10-release.md +0 -927
  20. package/docs/screenshots/01-home.png +0 -0
  21. package/docs/screenshots/02-notifications.png +0 -0
  22. package/docs/screenshots/03-sessions.png +0 -0
  23. package/docs/screenshots/04-chat.png +0 -0
  24. package/docs/screenshots/05-settings.png +0 -0
  25. package/docs/screenshots/06-new-session.png +0 -0
  26. package/docs/screenshots/pgy-appstore.jpg +0 -0
  27. package/docs/screenshots/pgy-mobile-app.jpg +0 -0
  28. package/docs/screenshots/pgy-pc-client.jpg +0 -0
  29. package/lib/account-usage.js +0 -145
  30. package/lib/app-alignment.js +0 -112
  31. package/lib/app-carrier-store.js +0 -1972
  32. package/lib/app-carrier.js +0 -602
  33. package/lib/client.js +0 -706
  34. package/lib/desktop-form.js +0 -738
  35. package/lib/endpoint-registry.js +0 -162
  36. package/lib/git-read-bundled-provider.js +0 -255
  37. package/lib/git-read-service.js +0 -322
  38. package/lib/index.js +0 -9292
  39. package/lib/plugin-content-digest.js +0 -80
  40. package/lib/plugin-self-update.js +0 -758
  41. package/lib/plugin-update-controller.js +0 -95
  42. package/lib/plugin-update-transaction.js +0 -322
  43. package/lib/plugin-update.js +0 -309
  44. package/lib/runtime-dependency-snapshot.js +0 -345
  45. package/lib/session-title-cache.js +0 -123
  46. package/lib/session-title-refresh.js +0 -261
  47. package/lib/update-fetch.js +0 -24
  48. package/lib/update-lock-arbiter.js +0 -158
  49. package/lib/update-supervisor.js +0 -312
  50. package/node_modules/ansi-regex/index.d.ts +0 -37
  51. package/node_modules/ansi-regex/index.js +0 -10
  52. package/node_modules/ansi-regex/license +0 -9
  53. package/node_modules/ansi-regex/package.json +0 -55
  54. package/node_modules/ansi-regex/readme.md +0 -78
  55. package/node_modules/ansi-styles/index.d.ts +0 -345
  56. package/node_modules/ansi-styles/index.js +0 -163
  57. package/node_modules/ansi-styles/license +0 -9
  58. package/node_modules/ansi-styles/package.json +0 -56
  59. package/node_modules/ansi-styles/readme.md +0 -152
  60. package/node_modules/camelcase/index.d.ts +0 -63
  61. package/node_modules/camelcase/index.js +0 -76
  62. package/node_modules/camelcase/license +0 -9
  63. package/node_modules/camelcase/package.json +0 -43
  64. package/node_modules/camelcase/readme.md +0 -99
  65. package/node_modules/cliui/CHANGELOG.md +0 -76
  66. package/node_modules/cliui/LICENSE.txt +0 -14
  67. package/node_modules/cliui/README.md +0 -115
  68. package/node_modules/cliui/index.js +0 -354
  69. package/node_modules/cliui/package.json +0 -65
  70. package/node_modules/color-convert/CHANGELOG.md +0 -54
  71. package/node_modules/color-convert/LICENSE +0 -21
  72. package/node_modules/color-convert/README.md +0 -68
  73. package/node_modules/color-convert/conversions.js +0 -839
  74. package/node_modules/color-convert/index.js +0 -81
  75. package/node_modules/color-convert/package.json +0 -48
  76. package/node_modules/color-convert/route.js +0 -97
  77. package/node_modules/color-name/LICENSE +0 -8
  78. package/node_modules/color-name/README.md +0 -11
  79. package/node_modules/color-name/index.js +0 -152
  80. package/node_modules/color-name/package.json +0 -28
  81. package/node_modules/decamelize/index.js +0 -13
  82. package/node_modules/decamelize/license +0 -21
  83. package/node_modules/decamelize/package.json +0 -38
  84. package/node_modules/decamelize/readme.md +0 -48
  85. package/node_modules/dijkstrajs/.travis.yml +0 -4
  86. package/node_modules/dijkstrajs/CONTRIBUTING.md +0 -8
  87. package/node_modules/dijkstrajs/LICENSE.md +0 -19
  88. package/node_modules/dijkstrajs/README.md +0 -18
  89. package/node_modules/dijkstrajs/dijkstra.js +0 -165
  90. package/node_modules/dijkstrajs/package.json +0 -60
  91. package/node_modules/dijkstrajs/test/dijkstra.test.js +0 -96
  92. package/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
  93. package/node_modules/emoji-regex/README.md +0 -73
  94. package/node_modules/emoji-regex/es2015/index.js +0 -6
  95. package/node_modules/emoji-regex/es2015/text.js +0 -6
  96. package/node_modules/emoji-regex/index.d.ts +0 -23
  97. package/node_modules/emoji-regex/index.js +0 -6
  98. package/node_modules/emoji-regex/package.json +0 -50
  99. package/node_modules/emoji-regex/text.js +0 -6
  100. package/node_modules/find-up/index.d.ts +0 -137
  101. package/node_modules/find-up/index.js +0 -89
  102. package/node_modules/find-up/license +0 -9
  103. package/node_modules/find-up/package.json +0 -53
  104. package/node_modules/find-up/readme.md +0 -156
  105. package/node_modules/get-caller-file/LICENSE.md +0 -6
  106. package/node_modules/get-caller-file/README.md +0 -41
  107. package/node_modules/get-caller-file/index.d.ts +0 -2
  108. package/node_modules/get-caller-file/index.js +0 -22
  109. package/node_modules/get-caller-file/index.js.map +0 -1
  110. package/node_modules/get-caller-file/package.json +0 -42
  111. package/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
  112. package/node_modules/is-fullwidth-code-point/index.js +0 -50
  113. package/node_modules/is-fullwidth-code-point/license +0 -9
  114. package/node_modules/is-fullwidth-code-point/package.json +0 -42
  115. package/node_modules/is-fullwidth-code-point/readme.md +0 -39
  116. package/node_modules/locate-path/index.d.ts +0 -83
  117. package/node_modules/locate-path/index.js +0 -65
  118. package/node_modules/locate-path/license +0 -9
  119. package/node_modules/locate-path/package.json +0 -45
  120. package/node_modules/locate-path/readme.md +0 -122
  121. package/node_modules/p-limit/index.d.ts +0 -38
  122. package/node_modules/p-limit/index.js +0 -57
  123. package/node_modules/p-limit/license +0 -9
  124. package/node_modules/p-limit/package.json +0 -52
  125. package/node_modules/p-limit/readme.md +0 -101
  126. package/node_modules/p-locate/index.d.ts +0 -64
  127. package/node_modules/p-locate/index.js +0 -52
  128. package/node_modules/p-locate/license +0 -9
  129. package/node_modules/p-locate/package.json +0 -53
  130. package/node_modules/p-locate/readme.md +0 -90
  131. package/node_modules/p-try/index.d.ts +0 -39
  132. package/node_modules/p-try/index.js +0 -9
  133. package/node_modules/p-try/license +0 -9
  134. package/node_modules/p-try/package.json +0 -42
  135. package/node_modules/p-try/readme.md +0 -58
  136. package/node_modules/path-exists/index.d.ts +0 -28
  137. package/node_modules/path-exists/index.js +0 -23
  138. package/node_modules/path-exists/license +0 -9
  139. package/node_modules/path-exists/package.json +0 -39
  140. package/node_modules/path-exists/readme.md +0 -52
  141. package/node_modules/pngjs/.eslintignore +0 -2
  142. package/node_modules/pngjs/.eslintrc.json +0 -19
  143. package/node_modules/pngjs/.prettierignore +0 -3
  144. package/node_modules/pngjs/LICENSE +0 -20
  145. package/node_modules/pngjs/README.md +0 -429
  146. package/node_modules/pngjs/browser.js +0 -16096
  147. package/node_modules/pngjs/coverage/lcov-report/base.css +0 -354
  148. package/node_modules/pngjs/coverage/lcov-report/bitmapper.js.html +0 -881
  149. package/node_modules/pngjs/coverage/lcov-report/bitpacker.js.html +0 -554
  150. package/node_modules/pngjs/coverage/lcov-report/block-navigation.js +0 -77
  151. package/node_modules/pngjs/coverage/lcov-report/chunkstream.js.html +0 -647
  152. package/node_modules/pngjs/coverage/lcov-report/constants.js.html +0 -176
  153. package/node_modules/pngjs/coverage/lcov-report/crc.js.html +0 -200
  154. package/node_modules/pngjs/coverage/lcov-report/favicon.png +0 -0
  155. package/node_modules/pngjs/coverage/lcov-report/filter-pack.js.html +0 -593
  156. package/node_modules/pngjs/coverage/lcov-report/filter-parse-async.js.html +0 -152
  157. package/node_modules/pngjs/coverage/lcov-report/filter-parse-sync.js.html +0 -143
  158. package/node_modules/pngjs/coverage/lcov-report/filter-parse.js.html +0 -611
  159. package/node_modules/pngjs/coverage/lcov-report/format-normaliser.js.html +0 -359
  160. package/node_modules/pngjs/coverage/lcov-report/index.html +0 -426
  161. package/node_modules/pngjs/coverage/lcov-report/interlace.js.html +0 -365
  162. package/node_modules/pngjs/coverage/lcov-report/packer-async.js.html +0 -230
  163. package/node_modules/pngjs/coverage/lcov-report/packer-sync.js.html +0 -248
  164. package/node_modules/pngjs/coverage/lcov-report/packer.js.html +0 -467
  165. package/node_modules/pngjs/coverage/lcov-report/paeth-predictor.js.html +0 -128
  166. package/node_modules/pngjs/coverage/lcov-report/parser-async.js.html +0 -575
  167. package/node_modules/pngjs/coverage/lcov-report/parser-sync.js.html +0 -404
  168. package/node_modules/pngjs/coverage/lcov-report/parser.js.html +0 -950
  169. package/node_modules/pngjs/coverage/lcov-report/png-sync.js.html +0 -116
  170. package/node_modules/pngjs/coverage/lcov-report/png.js.html +0 -662
  171. package/node_modules/pngjs/coverage/lcov-report/prettify.css +0 -101
  172. package/node_modules/pngjs/coverage/lcov-report/prettify.js +0 -1007
  173. package/node_modules/pngjs/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  174. package/node_modules/pngjs/coverage/lcov-report/sorter.js +0 -169
  175. package/node_modules/pngjs/coverage/lcov-report/sync-inflate.js.html +0 -584
  176. package/node_modules/pngjs/coverage/lcov-report/sync-reader.js.html +0 -215
  177. package/node_modules/pngjs/coverage/lcov.info +0 -2177
  178. package/node_modules/pngjs/lib/bitmapper.js +0 -267
  179. package/node_modules/pngjs/lib/bitpacker.js +0 -158
  180. package/node_modules/pngjs/lib/chunkstream.js +0 -189
  181. package/node_modules/pngjs/lib/constants.js +0 -32
  182. package/node_modules/pngjs/lib/crc.js +0 -40
  183. package/node_modules/pngjs/lib/filter-pack.js +0 -171
  184. package/node_modules/pngjs/lib/filter-parse-async.js +0 -24
  185. package/node_modules/pngjs/lib/filter-parse-sync.js +0 -21
  186. package/node_modules/pngjs/lib/filter-parse.js +0 -177
  187. package/node_modules/pngjs/lib/format-normaliser.js +0 -93
  188. package/node_modules/pngjs/lib/interlace.js +0 -95
  189. package/node_modules/pngjs/lib/packer-async.js +0 -50
  190. package/node_modules/pngjs/lib/packer-sync.js +0 -56
  191. package/node_modules/pngjs/lib/packer.js +0 -129
  192. package/node_modules/pngjs/lib/paeth-predictor.js +0 -16
  193. package/node_modules/pngjs/lib/parser-async.js +0 -165
  194. package/node_modules/pngjs/lib/parser-sync.js +0 -108
  195. package/node_modules/pngjs/lib/parser.js +0 -290
  196. package/node_modules/pngjs/lib/png-sync.js +0 -12
  197. package/node_modules/pngjs/lib/png.js +0 -194
  198. package/node_modules/pngjs/lib/sync-inflate.js +0 -168
  199. package/node_modules/pngjs/lib/sync-reader.js +0 -45
  200. package/node_modules/pngjs/package.json +0 -73
  201. package/node_modules/qrcode/README.md +0 -770
  202. package/node_modules/qrcode/bin/qrcode +0 -159
  203. package/node_modules/qrcode/helper/to-sjis-browser.js +0 -2
  204. package/node_modules/qrcode/helper/to-sjis.js +0 -105
  205. package/node_modules/qrcode/lib/browser.js +0 -76
  206. package/node_modules/qrcode/lib/can-promise.js +0 -7
  207. package/node_modules/qrcode/lib/core/alignment-pattern.js +0 -83
  208. package/node_modules/qrcode/lib/core/alphanumeric-data.js +0 -59
  209. package/node_modules/qrcode/lib/core/bit-buffer.js +0 -37
  210. package/node_modules/qrcode/lib/core/bit-matrix.js +0 -65
  211. package/node_modules/qrcode/lib/core/byte-data.js +0 -30
  212. package/node_modules/qrcode/lib/core/error-correction-code.js +0 -135
  213. package/node_modules/qrcode/lib/core/error-correction-level.js +0 -50
  214. package/node_modules/qrcode/lib/core/finder-pattern.js +0 -22
  215. package/node_modules/qrcode/lib/core/format-info.js +0 -29
  216. package/node_modules/qrcode/lib/core/galois-field.js +0 -69
  217. package/node_modules/qrcode/lib/core/kanji-data.js +0 -54
  218. package/node_modules/qrcode/lib/core/mask-pattern.js +0 -234
  219. package/node_modules/qrcode/lib/core/mode.js +0 -167
  220. package/node_modules/qrcode/lib/core/numeric-data.js +0 -43
  221. package/node_modules/qrcode/lib/core/polynomial.js +0 -62
  222. package/node_modules/qrcode/lib/core/qrcode.js +0 -495
  223. package/node_modules/qrcode/lib/core/reed-solomon-encoder.js +0 -56
  224. package/node_modules/qrcode/lib/core/regex.js +0 -31
  225. package/node_modules/qrcode/lib/core/segments.js +0 -330
  226. package/node_modules/qrcode/lib/core/utils.js +0 -63
  227. package/node_modules/qrcode/lib/core/version-check.js +0 -9
  228. package/node_modules/qrcode/lib/core/version.js +0 -163
  229. package/node_modules/qrcode/lib/index.js +0 -12
  230. package/node_modules/qrcode/lib/renderer/canvas.js +0 -63
  231. package/node_modules/qrcode/lib/renderer/png.js +0 -78
  232. package/node_modules/qrcode/lib/renderer/svg-tag.js +0 -81
  233. package/node_modules/qrcode/lib/renderer/svg.js +0 -19
  234. package/node_modules/qrcode/lib/renderer/terminal/terminal-small.js +0 -85
  235. package/node_modules/qrcode/lib/renderer/terminal/terminal.js +0 -49
  236. package/node_modules/qrcode/lib/renderer/terminal.js +0 -9
  237. package/node_modules/qrcode/lib/renderer/utf8.js +0 -71
  238. package/node_modules/qrcode/lib/renderer/utils.js +0 -99
  239. package/node_modules/qrcode/lib/server.js +0 -138
  240. package/node_modules/qrcode/license +0 -10
  241. package/node_modules/qrcode/package.json +0 -77
  242. package/node_modules/require-directory/.jshintrc +0 -67
  243. package/node_modules/require-directory/.npmignore +0 -1
  244. package/node_modules/require-directory/.travis.yml +0 -3
  245. package/node_modules/require-directory/LICENSE +0 -22
  246. package/node_modules/require-directory/README.markdown +0 -184
  247. package/node_modules/require-directory/index.js +0 -86
  248. package/node_modules/require-directory/package.json +0 -40
  249. package/node_modules/require-main-filename/CHANGELOG.md +0 -26
  250. package/node_modules/require-main-filename/LICENSE.txt +0 -14
  251. package/node_modules/require-main-filename/README.md +0 -26
  252. package/node_modules/require-main-filename/index.js +0 -18
  253. package/node_modules/require-main-filename/package.json +0 -35
  254. package/node_modules/set-blocking/CHANGELOG.md +0 -26
  255. package/node_modules/set-blocking/LICENSE.txt +0 -14
  256. package/node_modules/set-blocking/README.md +0 -31
  257. package/node_modules/set-blocking/index.js +0 -7
  258. package/node_modules/set-blocking/package.json +0 -42
  259. package/node_modules/string-width/index.d.ts +0 -29
  260. package/node_modules/string-width/index.js +0 -47
  261. package/node_modules/string-width/license +0 -9
  262. package/node_modules/string-width/package.json +0 -56
  263. package/node_modules/string-width/readme.md +0 -50
  264. package/node_modules/strip-ansi/index.d.ts +0 -17
  265. package/node_modules/strip-ansi/index.js +0 -4
  266. package/node_modules/strip-ansi/license +0 -9
  267. package/node_modules/strip-ansi/package.json +0 -54
  268. package/node_modules/strip-ansi/readme.md +0 -46
  269. package/node_modules/which-module/LICENSE +0 -13
  270. package/node_modules/which-module/README.md +0 -58
  271. package/node_modules/which-module/index.js +0 -9
  272. package/node_modules/which-module/package.json +0 -41
  273. package/node_modules/wrap-ansi/index.js +0 -186
  274. package/node_modules/wrap-ansi/license +0 -9
  275. package/node_modules/wrap-ansi/package.json +0 -61
  276. package/node_modules/wrap-ansi/readme.md +0 -97
  277. package/node_modules/y18n/CHANGELOG.md +0 -35
  278. package/node_modules/y18n/LICENSE +0 -13
  279. package/node_modules/y18n/README.md +0 -109
  280. package/node_modules/y18n/index.js +0 -188
  281. package/node_modules/y18n/package.json +0 -39
  282. package/node_modules/yargs/CHANGELOG.md +0 -420
  283. package/node_modules/yargs/LICENSE +0 -21
  284. package/node_modules/yargs/README.md +0 -140
  285. package/node_modules/yargs/build/lib/apply-extends.d.ts +0 -2
  286. package/node_modules/yargs/build/lib/apply-extends.js +0 -65
  287. package/node_modules/yargs/build/lib/argsert.d.ts +0 -2
  288. package/node_modules/yargs/build/lib/argsert.js +0 -65
  289. package/node_modules/yargs/build/lib/command.d.ts +0 -64
  290. package/node_modules/yargs/build/lib/command.js +0 -416
  291. package/node_modules/yargs/build/lib/common-types.d.ts +0 -36
  292. package/node_modules/yargs/build/lib/common-types.js +0 -25
  293. package/node_modules/yargs/build/lib/completion-templates.d.ts +0 -2
  294. package/node_modules/yargs/build/lib/completion-templates.js +0 -50
  295. package/node_modules/yargs/build/lib/completion.d.ts +0 -21
  296. package/node_modules/yargs/build/lib/completion.js +0 -135
  297. package/node_modules/yargs/build/lib/is-promise.d.ts +0 -1
  298. package/node_modules/yargs/build/lib/is-promise.js +0 -9
  299. package/node_modules/yargs/build/lib/levenshtein.d.ts +0 -1
  300. package/node_modules/yargs/build/lib/levenshtein.js +0 -58
  301. package/node_modules/yargs/build/lib/middleware.d.ts +0 -10
  302. package/node_modules/yargs/build/lib/middleware.js +0 -57
  303. package/node_modules/yargs/build/lib/obj-filter.d.ts +0 -1
  304. package/node_modules/yargs/build/lib/obj-filter.js +0 -14
  305. package/node_modules/yargs/build/lib/parse-command.d.ts +0 -11
  306. package/node_modules/yargs/build/lib/parse-command.js +0 -36
  307. package/node_modules/yargs/build/lib/process-argv.d.ts +0 -2
  308. package/node_modules/yargs/build/lib/process-argv.js +0 -31
  309. package/node_modules/yargs/build/lib/usage.d.ts +0 -49
  310. package/node_modules/yargs/build/lib/usage.js +0 -540
  311. package/node_modules/yargs/build/lib/validation.d.ts +0 -34
  312. package/node_modules/yargs/build/lib/validation.js +0 -330
  313. package/node_modules/yargs/build/lib/yargs.d.ts +0 -274
  314. package/node_modules/yargs/build/lib/yargs.js +0 -1190
  315. package/node_modules/yargs/build/lib/yerror.d.ts +0 -4
  316. package/node_modules/yargs/build/lib/yerror.js +0 -11
  317. package/node_modules/yargs/index.js +0 -40
  318. package/node_modules/yargs/locales/be.json +0 -46
  319. package/node_modules/yargs/locales/de.json +0 -46
  320. package/node_modules/yargs/locales/en.json +0 -51
  321. package/node_modules/yargs/locales/es.json +0 -46
  322. package/node_modules/yargs/locales/fi.json +0 -49
  323. package/node_modules/yargs/locales/fr.json +0 -53
  324. package/node_modules/yargs/locales/hi.json +0 -49
  325. package/node_modules/yargs/locales/hu.json +0 -46
  326. package/node_modules/yargs/locales/id.json +0 -50
  327. package/node_modules/yargs/locales/it.json +0 -46
  328. package/node_modules/yargs/locales/ja.json +0 -51
  329. package/node_modules/yargs/locales/ko.json +0 -49
  330. package/node_modules/yargs/locales/nb.json +0 -44
  331. package/node_modules/yargs/locales/nl.json +0 -49
  332. package/node_modules/yargs/locales/nn.json +0 -44
  333. package/node_modules/yargs/locales/pirate.json +0 -13
  334. package/node_modules/yargs/locales/pl.json +0 -49
  335. package/node_modules/yargs/locales/pt.json +0 -45
  336. package/node_modules/yargs/locales/pt_BR.json +0 -48
  337. package/node_modules/yargs/locales/ru.json +0 -46
  338. package/node_modules/yargs/locales/th.json +0 -46
  339. package/node_modules/yargs/locales/tr.json +0 -48
  340. package/node_modules/yargs/locales/zh_CN.json +0 -48
  341. package/node_modules/yargs/locales/zh_TW.json +0 -47
  342. package/node_modules/yargs/package.json +0 -92
  343. package/node_modules/yargs/yargs.js +0 -14
  344. package/node_modules/yargs-parser/CHANGELOG.md +0 -601
  345. package/node_modules/yargs-parser/LICENSE.txt +0 -14
  346. package/node_modules/yargs-parser/README.md +0 -449
  347. package/node_modules/yargs-parser/index.js +0 -1032
  348. package/node_modules/yargs-parser/lib/tokenize-arg-string.js +0 -40
  349. package/node_modules/yargs-parser/package.json +0 -46
@@ -1,64 +0,0 @@
1
- declare namespace pLocate {
2
- interface Options {
3
- /**
4
- Number of concurrently pending promises returned by `tester`. Minimum: `1`.
5
-
6
- @default Infinity
7
- */
8
- readonly concurrency?: number;
9
-
10
- /**
11
- Preserve `input` order when searching.
12
-
13
- Disable this to improve performance if you don't care about the order.
14
-
15
- @default true
16
- */
17
- readonly preserveOrder?: boolean;
18
- }
19
- }
20
-
21
- declare const pLocate: {
22
- /**
23
- Get the first fulfilled promise that satisfies the provided testing function.
24
-
25
- @param input - An iterable of promises/values to test.
26
- @param tester - This function will receive resolved values from `input` and is expected to return a `Promise<boolean>` or `boolean`.
27
- @returns A `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`.
28
-
29
- @example
30
- ```
31
- import pathExists = require('path-exists');
32
- import pLocate = require('p-locate');
33
-
34
- const files = [
35
- 'unicorn.png',
36
- 'rainbow.png', // Only this one actually exists on disk
37
- 'pony.png'
38
- ];
39
-
40
- (async () => {
41
- const foundPath = await pLocate(files, file => pathExists(file));
42
-
43
- console.log(foundPath);
44
- //=> 'rainbow'
45
- })();
46
- ```
47
- */
48
- <ValueType>(
49
- input: Iterable<PromiseLike<ValueType> | ValueType>,
50
- tester: (element: ValueType) => PromiseLike<boolean> | boolean,
51
- options?: pLocate.Options
52
- ): Promise<ValueType | undefined>;
53
-
54
- // TODO: Remove this for the next major release, refactor the whole definition to:
55
- // declare function pLocate<ValueType>(
56
- // input: Iterable<PromiseLike<ValueType> | ValueType>,
57
- // tester: (element: ValueType) => PromiseLike<boolean> | boolean,
58
- // options?: pLocate.Options
59
- // ): Promise<ValueType | undefined>;
60
- // export = pLocate;
61
- default: typeof pLocate;
62
- };
63
-
64
- export = pLocate;
@@ -1,52 +0,0 @@
1
- 'use strict';
2
- const pLimit = require('p-limit');
3
-
4
- class EndError extends Error {
5
- constructor(value) {
6
- super();
7
- this.value = value;
8
- }
9
- }
10
-
11
- // The input can also be a promise, so we await it
12
- const testElement = async (element, tester) => tester(await element);
13
-
14
- // The input can also be a promise, so we `Promise.all()` them both
15
- const finder = async element => {
16
- const values = await Promise.all(element);
17
- if (values[1] === true) {
18
- throw new EndError(values[0]);
19
- }
20
-
21
- return false;
22
- };
23
-
24
- const pLocate = async (iterable, tester, options) => {
25
- options = {
26
- concurrency: Infinity,
27
- preserveOrder: true,
28
- ...options
29
- };
30
-
31
- const limit = pLimit(options.concurrency);
32
-
33
- // Start all the promises concurrently with optional limit
34
- const items = [...iterable].map(element => [element, limit(testElement, element, tester)]);
35
-
36
- // Check the promises either serially or concurrently
37
- const checkLimit = pLimit(options.preserveOrder ? 1 : Infinity);
38
-
39
- try {
40
- await Promise.all(items.map(element => checkLimit(finder, element)));
41
- } catch (error) {
42
- if (error instanceof EndError) {
43
- return error.value;
44
- }
45
-
46
- throw error;
47
- }
48
- };
49
-
50
- module.exports = pLocate;
51
- // TODO: Remove this for the next major release
52
- module.exports.default = pLocate;
@@ -1,9 +0,0 @@
1
- MIT License
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 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:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- 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.
@@ -1,53 +0,0 @@
1
- {
2
- "name": "p-locate",
3
- "version": "4.1.0",
4
- "description": "Get the first fulfilled promise that satisfies the provided testing function",
5
- "license": "MIT",
6
- "repository": "sindresorhus/p-locate",
7
- "author": {
8
- "name": "Sindre Sorhus",
9
- "email": "sindresorhus@gmail.com",
10
- "url": "sindresorhus.com"
11
- },
12
- "engines": {
13
- "node": ">=8"
14
- },
15
- "scripts": {
16
- "test": "xo && ava && tsd"
17
- },
18
- "files": [
19
- "index.js",
20
- "index.d.ts"
21
- ],
22
- "keywords": [
23
- "promise",
24
- "locate",
25
- "find",
26
- "finder",
27
- "search",
28
- "searcher",
29
- "test",
30
- "array",
31
- "collection",
32
- "iterable",
33
- "iterator",
34
- "race",
35
- "fulfilled",
36
- "fastest",
37
- "async",
38
- "await",
39
- "promises",
40
- "bluebird"
41
- ],
42
- "dependencies": {
43
- "p-limit": "^2.2.0"
44
- },
45
- "devDependencies": {
46
- "ava": "^1.4.1",
47
- "delay": "^4.1.0",
48
- "in-range": "^1.0.0",
49
- "time-span": "^3.0.0",
50
- "tsd": "^0.7.2",
51
- "xo": "^0.24.0"
52
- }
53
- }
@@ -1,90 +0,0 @@
1
- # p-locate [![Build Status](https://travis-ci.org/sindresorhus/p-locate.svg?branch=master)](https://travis-ci.org/sindresorhus/p-locate)
2
-
3
- > Get the first fulfilled promise that satisfies the provided testing function
4
-
5
- Think of it like an async version of [`Array#find`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find).
6
-
7
-
8
- ## Install
9
-
10
- ```
11
- $ npm install p-locate
12
- ```
13
-
14
-
15
- ## Usage
16
-
17
- Here we find the first file that exists on disk, in array order.
18
-
19
- ```js
20
- const pathExists = require('path-exists');
21
- const pLocate = require('p-locate');
22
-
23
- const files = [
24
- 'unicorn.png',
25
- 'rainbow.png', // Only this one actually exists on disk
26
- 'pony.png'
27
- ];
28
-
29
- (async () => {
30
- const foundPath = await pLocate(files, file => pathExists(file));
31
-
32
- console.log(foundPath);
33
- //=> 'rainbow'
34
- })();
35
- ```
36
-
37
- *The above is just an example. Use [`locate-path`](https://github.com/sindresorhus/locate-path) if you need this.*
38
-
39
-
40
- ## API
41
-
42
- ### pLocate(input, tester, [options])
43
-
44
- Returns a `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`.
45
-
46
- #### input
47
-
48
- Type: `Iterable<Promise | unknown>`
49
-
50
- An iterable of promises/values to test.
51
-
52
- #### tester(element)
53
-
54
- Type: `Function`
55
-
56
- This function will receive resolved values from `input` and is expected to return a `Promise<boolean>` or `boolean`.
57
-
58
- #### options
59
-
60
- Type: `Object`
61
-
62
- ##### concurrency
63
-
64
- Type: `number`<br>
65
- Default: `Infinity`<br>
66
- Minimum: `1`
67
-
68
- Number of concurrently pending promises returned by `tester`.
69
-
70
- ##### preserveOrder
71
-
72
- Type: `boolean`<br>
73
- Default: `true`
74
-
75
- Preserve `input` order when searching.
76
-
77
- Disable this to improve performance if you don't care about the order.
78
-
79
-
80
- ## Related
81
-
82
- - [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently
83
- - [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently
84
- - [p-any](https://github.com/sindresorhus/p-any) - Wait for any promise to be fulfilled
85
- - [More…](https://github.com/sindresorhus/promise-fun)
86
-
87
-
88
- ## License
89
-
90
- MIT © [Sindre Sorhus](https://sindresorhus.com)
@@ -1,39 +0,0 @@
1
- declare const pTry: {
2
- /**
3
- Start a promise chain.
4
-
5
- @param fn - The function to run to start the promise chain.
6
- @param arguments - Arguments to pass to `fn`.
7
- @returns The value of calling `fn(...arguments)`. If the function throws an error, the returned `Promise` will be rejected with that error.
8
-
9
- @example
10
- ```
11
- import pTry = require('p-try');
12
-
13
- (async () => {
14
- try {
15
- const value = await pTry(() => {
16
- return synchronousFunctionThatMightThrow();
17
- });
18
- console.log(value);
19
- } catch (error) {
20
- console.error(error);
21
- }
22
- })();
23
- ```
24
- */
25
- <ValueType, ArgumentsType extends unknown[]>(
26
- fn: (...arguments: ArgumentsType) => PromiseLike<ValueType> | ValueType,
27
- ...arguments: ArgumentsType
28
- ): Promise<ValueType>;
29
-
30
- // TODO: remove this in the next major version, refactor the whole definition to:
31
- // declare function pTry<ValueType, ArgumentsType extends unknown[]>(
32
- // fn: (...arguments: ArgumentsType) => PromiseLike<ValueType> | ValueType,
33
- // ...arguments: ArgumentsType
34
- // ): Promise<ValueType>;
35
- // export = pTry;
36
- default: typeof pTry;
37
- };
38
-
39
- export = pTry;
@@ -1,9 +0,0 @@
1
- 'use strict';
2
-
3
- const pTry = (fn, ...arguments_) => new Promise(resolve => {
4
- resolve(fn(...arguments_));
5
- });
6
-
7
- module.exports = pTry;
8
- // TODO: remove this in the next major version
9
- module.exports.default = pTry;
@@ -1,9 +0,0 @@
1
- MIT License
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 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:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- 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.
@@ -1,42 +0,0 @@
1
- {
2
- "name": "p-try",
3
- "version": "2.2.0",
4
- "description": "`Start a promise chain",
5
- "license": "MIT",
6
- "repository": "sindresorhus/p-try",
7
- "author": {
8
- "name": "Sindre Sorhus",
9
- "email": "sindresorhus@gmail.com",
10
- "url": "sindresorhus.com"
11
- },
12
- "engines": {
13
- "node": ">=6"
14
- },
15
- "scripts": {
16
- "test": "xo && ava && tsd"
17
- },
18
- "files": [
19
- "index.js",
20
- "index.d.ts"
21
- ],
22
- "keywords": [
23
- "promise",
24
- "try",
25
- "resolve",
26
- "function",
27
- "catch",
28
- "async",
29
- "await",
30
- "promises",
31
- "settled",
32
- "ponyfill",
33
- "polyfill",
34
- "shim",
35
- "bluebird"
36
- ],
37
- "devDependencies": {
38
- "ava": "^1.4.1",
39
- "tsd": "^0.7.1",
40
- "xo": "^0.24.0"
41
- }
42
- }
@@ -1,58 +0,0 @@
1
- # p-try [![Build Status](https://travis-ci.org/sindresorhus/p-try.svg?branch=master)](https://travis-ci.org/sindresorhus/p-try)
2
-
3
- > Start a promise chain
4
-
5
- [How is it useful?](http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/)
6
-
7
-
8
- ## Install
9
-
10
- ```
11
- $ npm install p-try
12
- ```
13
-
14
-
15
- ## Usage
16
-
17
- ```js
18
- const pTry = require('p-try');
19
-
20
- (async () => {
21
- try {
22
- const value = await pTry(() => {
23
- return synchronousFunctionThatMightThrow();
24
- });
25
- console.log(value);
26
- } catch (error) {
27
- console.error(error);
28
- }
29
- })();
30
- ```
31
-
32
-
33
- ## API
34
-
35
- ### pTry(fn, ...arguments)
36
-
37
- Returns a `Promise` resolved with the value of calling `fn(...arguments)`. If the function throws an error, the returned `Promise` will be rejected with that error.
38
-
39
- Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a *lot* of functions.
40
-
41
- #### fn
42
-
43
- The function to run to start the promise chain.
44
-
45
- #### arguments
46
-
47
- Arguments to pass to `fn`.
48
-
49
-
50
- ## Related
51
-
52
- - [p-finally](https://github.com/sindresorhus/p-finally) - `Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome
53
- - [More…](https://github.com/sindresorhus/promise-fun)
54
-
55
-
56
- ## License
57
-
58
- MIT © [Sindre Sorhus](https://sindresorhus.com)
@@ -1,28 +0,0 @@
1
- declare const pathExists: {
2
- /**
3
- Check if a path exists.
4
-
5
- @returns Whether the path exists.
6
-
7
- @example
8
- ```
9
- // foo.ts
10
- import pathExists = require('path-exists');
11
-
12
- (async () => {
13
- console.log(await pathExists('foo.ts'));
14
- //=> true
15
- })();
16
- ```
17
- */
18
- (path: string): Promise<boolean>;
19
-
20
- /**
21
- Synchronously check if a path exists.
22
-
23
- @returns Whether the path exists.
24
- */
25
- sync(path: string): boolean;
26
- };
27
-
28
- export = pathExists;
@@ -1,23 +0,0 @@
1
- 'use strict';
2
- const fs = require('fs');
3
- const {promisify} = require('util');
4
-
5
- const pAccess = promisify(fs.access);
6
-
7
- module.exports = async path => {
8
- try {
9
- await pAccess(path);
10
- return true;
11
- } catch (_) {
12
- return false;
13
- }
14
- };
15
-
16
- module.exports.sync = path => {
17
- try {
18
- fs.accessSync(path);
19
- return true;
20
- } catch (_) {
21
- return false;
22
- }
23
- };
@@ -1,9 +0,0 @@
1
- MIT License
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 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:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- 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.
@@ -1,39 +0,0 @@
1
- {
2
- "name": "path-exists",
3
- "version": "4.0.0",
4
- "description": "Check if a path exists",
5
- "license": "MIT",
6
- "repository": "sindresorhus/path-exists",
7
- "author": {
8
- "name": "Sindre Sorhus",
9
- "email": "sindresorhus@gmail.com",
10
- "url": "sindresorhus.com"
11
- },
12
- "engines": {
13
- "node": ">=8"
14
- },
15
- "scripts": {
16
- "test": "xo && ava && tsd"
17
- },
18
- "files": [
19
- "index.js",
20
- "index.d.ts"
21
- ],
22
- "keywords": [
23
- "path",
24
- "exists",
25
- "exist",
26
- "file",
27
- "filepath",
28
- "fs",
29
- "filesystem",
30
- "file-system",
31
- "access",
32
- "stat"
33
- ],
34
- "devDependencies": {
35
- "ava": "^1.4.1",
36
- "tsd": "^0.7.2",
37
- "xo": "^0.24.0"
38
- }
39
- }
@@ -1,52 +0,0 @@
1
- # path-exists [![Build Status](https://travis-ci.org/sindresorhus/path-exists.svg?branch=master)](https://travis-ci.org/sindresorhus/path-exists)
2
-
3
- > Check if a path exists
4
-
5
- NOTE: `fs.existsSync` has been un-deprecated in Node.js since 6.8.0. If you only need to check synchronously, this module is not needed.
6
-
7
- While [`fs.exists()`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback) is being [deprecated](https://github.com/iojs/io.js/issues/103), there's still a genuine use-case of being able to check if a path exists for other purposes than doing IO with it.
8
-
9
- Never use this before handling a file though:
10
-
11
- > In particular, checking if a file exists before opening it is an anti-pattern that leaves you vulnerable to race conditions: another process may remove the file between the calls to `fs.exists()` and `fs.open()`. Just open the file and handle the error when it's not there.
12
-
13
-
14
- ## Install
15
-
16
- ```
17
- $ npm install path-exists
18
- ```
19
-
20
-
21
- ## Usage
22
-
23
- ```js
24
- // foo.js
25
- const pathExists = require('path-exists');
26
-
27
- (async () => {
28
- console.log(await pathExists('foo.js'));
29
- //=> true
30
- })();
31
- ```
32
-
33
-
34
- ## API
35
-
36
- ### pathExists(path)
37
-
38
- Returns a `Promise<boolean>` of whether the path exists.
39
-
40
- ### pathExists.sync(path)
41
-
42
- Returns a `boolean` of whether the path exists.
43
-
44
-
45
- ## Related
46
-
47
- - [path-exists-cli](https://github.com/sindresorhus/path-exists-cli) - CLI for this module
48
-
49
-
50
- ## License
51
-
52
- MIT © [Sindre Sorhus](https://sindresorhus.com)
@@ -1,2 +0,0 @@
1
- /browser.js
2
- /test/imagediff.js
@@ -1,19 +0,0 @@
1
- {
2
- "parserOptions": { "ecmaVersion": 2018 },
3
- "extends": ["eslint:recommended", "prettier"],
4
- "env": {
5
- "node": true,
6
- "es6": true
7
- },
8
- "rules": {
9
- "no-var": "error"
10
- },
11
- "overrides": [
12
- {
13
- "files": ["test/*.js", "examples/*.js"],
14
- "rules": {
15
- "no-console": "off"
16
- }
17
- }
18
- ]
19
- }
@@ -1,3 +0,0 @@
1
- /browser.js
2
- /test/imagediff.js
3
- .nyc_output
@@ -1,20 +0,0 @@
1
- pngjs2 original work Copyright (c) 2015 Luke Page & Original Contributors
2
- pngjs derived work Copyright (c) 2012 Kuba Niegowski
3
-
4
- Permission is hereby granted, free of charge, to any person obtaining a copy
5
- of this software and associated documentation files (the "Software"), to deal
6
- in the Software without restriction, including without limitation the rights
7
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- copies of the Software, and to permit persons to whom the Software is
9
- furnished to do so, subject to the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be included in
12
- all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
- THE SOFTWARE.