@marktrue/dsh-mobile-remote 3.2.2-alpha.1 → 3.2.2-rc.1-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 (353) hide show
  1. package/DSH-Remote-v3.2.2.apk +4 -0
  2. package/README.md +6 -253
  3. package/manifest.json +21 -0
  4. package/package.json +12 -65
  5. package/CHANGELOG.md +0 -1223
  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 -125
  10. package/docs/01-PRD.md +0 -148
  11. package/docs/02-architecture.md +0 -249
  12. package/docs/03-api.md +0 -930
  13. package/docs/04-security.md +0 -100
  14. package/docs/05-test-cases.md +0 -366
  15. package/docs/06-install-run.md +0 -372
  16. package/docs/07-user-manual.md +0 -66
  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 -223
  19. package/docs/10-release.md +0 -929
  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/docs/spec-app-auto-update.md +0 -143
  30. package/lib/account-usage.js +0 -145
  31. package/lib/app-alignment.js +0 -112
  32. package/lib/app-carrier-store.js +0 -1972
  33. package/lib/app-carrier.js +0 -609
  34. package/lib/client.js +0 -1174
  35. package/lib/desktop-form.js +0 -738
  36. package/lib/endpoint-registry.js +0 -165
  37. package/lib/git-read-bundled-provider.js +0 -255
  38. package/lib/git-read-service.js +0 -322
  39. package/lib/index.js +0 -9467
  40. package/lib/npm-update-source.js +0 -226
  41. package/lib/plugin-content-digest.js +0 -80
  42. package/lib/plugin-self-update.js +0 -997
  43. package/lib/plugin-update-controller.js +0 -274
  44. package/lib/plugin-update-log.js +0 -164
  45. package/lib/plugin-update-transaction.js +0 -322
  46. package/lib/plugin-update.js +0 -309
  47. package/lib/runtime-dependency-snapshot.js +0 -345
  48. package/lib/session-title-cache.js +0 -123
  49. package/lib/session-title-refresh.js +0 -261
  50. package/lib/tool-process.js +0 -20
  51. package/lib/update-fetch.js +0 -24
  52. package/lib/update-lock-arbiter.js +0 -170
  53. package/lib/update-supervisor.js +0 -346
  54. package/node_modules/ansi-regex/index.d.ts +0 -37
  55. package/node_modules/ansi-regex/index.js +0 -10
  56. package/node_modules/ansi-regex/license +0 -9
  57. package/node_modules/ansi-regex/package.json +0 -55
  58. package/node_modules/ansi-regex/readme.md +0 -78
  59. package/node_modules/ansi-styles/index.d.ts +0 -345
  60. package/node_modules/ansi-styles/index.js +0 -163
  61. package/node_modules/ansi-styles/license +0 -9
  62. package/node_modules/ansi-styles/package.json +0 -56
  63. package/node_modules/ansi-styles/readme.md +0 -152
  64. package/node_modules/camelcase/index.d.ts +0 -63
  65. package/node_modules/camelcase/index.js +0 -76
  66. package/node_modules/camelcase/license +0 -9
  67. package/node_modules/camelcase/package.json +0 -43
  68. package/node_modules/camelcase/readme.md +0 -99
  69. package/node_modules/cliui/CHANGELOG.md +0 -76
  70. package/node_modules/cliui/LICENSE.txt +0 -14
  71. package/node_modules/cliui/README.md +0 -115
  72. package/node_modules/cliui/index.js +0 -354
  73. package/node_modules/cliui/package.json +0 -65
  74. package/node_modules/color-convert/CHANGELOG.md +0 -54
  75. package/node_modules/color-convert/LICENSE +0 -21
  76. package/node_modules/color-convert/README.md +0 -68
  77. package/node_modules/color-convert/conversions.js +0 -839
  78. package/node_modules/color-convert/index.js +0 -81
  79. package/node_modules/color-convert/package.json +0 -48
  80. package/node_modules/color-convert/route.js +0 -97
  81. package/node_modules/color-name/LICENSE +0 -8
  82. package/node_modules/color-name/README.md +0 -11
  83. package/node_modules/color-name/index.js +0 -152
  84. package/node_modules/color-name/package.json +0 -28
  85. package/node_modules/decamelize/index.js +0 -13
  86. package/node_modules/decamelize/license +0 -21
  87. package/node_modules/decamelize/package.json +0 -38
  88. package/node_modules/decamelize/readme.md +0 -48
  89. package/node_modules/dijkstrajs/.travis.yml +0 -4
  90. package/node_modules/dijkstrajs/CONTRIBUTING.md +0 -8
  91. package/node_modules/dijkstrajs/LICENSE.md +0 -19
  92. package/node_modules/dijkstrajs/README.md +0 -18
  93. package/node_modules/dijkstrajs/dijkstra.js +0 -165
  94. package/node_modules/dijkstrajs/package.json +0 -60
  95. package/node_modules/dijkstrajs/test/dijkstra.test.js +0 -96
  96. package/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
  97. package/node_modules/emoji-regex/README.md +0 -73
  98. package/node_modules/emoji-regex/es2015/index.js +0 -6
  99. package/node_modules/emoji-regex/es2015/text.js +0 -6
  100. package/node_modules/emoji-regex/index.d.ts +0 -23
  101. package/node_modules/emoji-regex/index.js +0 -6
  102. package/node_modules/emoji-regex/package.json +0 -50
  103. package/node_modules/emoji-regex/text.js +0 -6
  104. package/node_modules/find-up/index.d.ts +0 -137
  105. package/node_modules/find-up/index.js +0 -89
  106. package/node_modules/find-up/license +0 -9
  107. package/node_modules/find-up/package.json +0 -53
  108. package/node_modules/find-up/readme.md +0 -156
  109. package/node_modules/get-caller-file/LICENSE.md +0 -6
  110. package/node_modules/get-caller-file/README.md +0 -41
  111. package/node_modules/get-caller-file/index.d.ts +0 -2
  112. package/node_modules/get-caller-file/index.js +0 -22
  113. package/node_modules/get-caller-file/index.js.map +0 -1
  114. package/node_modules/get-caller-file/package.json +0 -42
  115. package/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
  116. package/node_modules/is-fullwidth-code-point/index.js +0 -50
  117. package/node_modules/is-fullwidth-code-point/license +0 -9
  118. package/node_modules/is-fullwidth-code-point/package.json +0 -42
  119. package/node_modules/is-fullwidth-code-point/readme.md +0 -39
  120. package/node_modules/locate-path/index.d.ts +0 -83
  121. package/node_modules/locate-path/index.js +0 -65
  122. package/node_modules/locate-path/license +0 -9
  123. package/node_modules/locate-path/package.json +0 -45
  124. package/node_modules/locate-path/readme.md +0 -122
  125. package/node_modules/p-limit/index.d.ts +0 -38
  126. package/node_modules/p-limit/index.js +0 -57
  127. package/node_modules/p-limit/license +0 -9
  128. package/node_modules/p-limit/package.json +0 -52
  129. package/node_modules/p-limit/readme.md +0 -101
  130. package/node_modules/p-locate/index.d.ts +0 -64
  131. package/node_modules/p-locate/index.js +0 -52
  132. package/node_modules/p-locate/license +0 -9
  133. package/node_modules/p-locate/package.json +0 -53
  134. package/node_modules/p-locate/readme.md +0 -90
  135. package/node_modules/p-try/index.d.ts +0 -39
  136. package/node_modules/p-try/index.js +0 -9
  137. package/node_modules/p-try/license +0 -9
  138. package/node_modules/p-try/package.json +0 -42
  139. package/node_modules/p-try/readme.md +0 -58
  140. package/node_modules/path-exists/index.d.ts +0 -28
  141. package/node_modules/path-exists/index.js +0 -23
  142. package/node_modules/path-exists/license +0 -9
  143. package/node_modules/path-exists/package.json +0 -39
  144. package/node_modules/path-exists/readme.md +0 -52
  145. package/node_modules/pngjs/.eslintignore +0 -2
  146. package/node_modules/pngjs/.eslintrc.json +0 -19
  147. package/node_modules/pngjs/.prettierignore +0 -3
  148. package/node_modules/pngjs/LICENSE +0 -20
  149. package/node_modules/pngjs/README.md +0 -429
  150. package/node_modules/pngjs/browser.js +0 -16096
  151. package/node_modules/pngjs/coverage/lcov-report/base.css +0 -354
  152. package/node_modules/pngjs/coverage/lcov-report/bitmapper.js.html +0 -881
  153. package/node_modules/pngjs/coverage/lcov-report/bitpacker.js.html +0 -554
  154. package/node_modules/pngjs/coverage/lcov-report/block-navigation.js +0 -77
  155. package/node_modules/pngjs/coverage/lcov-report/chunkstream.js.html +0 -647
  156. package/node_modules/pngjs/coverage/lcov-report/constants.js.html +0 -176
  157. package/node_modules/pngjs/coverage/lcov-report/crc.js.html +0 -200
  158. package/node_modules/pngjs/coverage/lcov-report/favicon.png +0 -0
  159. package/node_modules/pngjs/coverage/lcov-report/filter-pack.js.html +0 -593
  160. package/node_modules/pngjs/coverage/lcov-report/filter-parse-async.js.html +0 -152
  161. package/node_modules/pngjs/coverage/lcov-report/filter-parse-sync.js.html +0 -143
  162. package/node_modules/pngjs/coverage/lcov-report/filter-parse.js.html +0 -611
  163. package/node_modules/pngjs/coverage/lcov-report/format-normaliser.js.html +0 -359
  164. package/node_modules/pngjs/coverage/lcov-report/index.html +0 -426
  165. package/node_modules/pngjs/coverage/lcov-report/interlace.js.html +0 -365
  166. package/node_modules/pngjs/coverage/lcov-report/packer-async.js.html +0 -230
  167. package/node_modules/pngjs/coverage/lcov-report/packer-sync.js.html +0 -248
  168. package/node_modules/pngjs/coverage/lcov-report/packer.js.html +0 -467
  169. package/node_modules/pngjs/coverage/lcov-report/paeth-predictor.js.html +0 -128
  170. package/node_modules/pngjs/coverage/lcov-report/parser-async.js.html +0 -575
  171. package/node_modules/pngjs/coverage/lcov-report/parser-sync.js.html +0 -404
  172. package/node_modules/pngjs/coverage/lcov-report/parser.js.html +0 -950
  173. package/node_modules/pngjs/coverage/lcov-report/png-sync.js.html +0 -116
  174. package/node_modules/pngjs/coverage/lcov-report/png.js.html +0 -662
  175. package/node_modules/pngjs/coverage/lcov-report/prettify.css +0 -101
  176. package/node_modules/pngjs/coverage/lcov-report/prettify.js +0 -1007
  177. package/node_modules/pngjs/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  178. package/node_modules/pngjs/coverage/lcov-report/sorter.js +0 -169
  179. package/node_modules/pngjs/coverage/lcov-report/sync-inflate.js.html +0 -584
  180. package/node_modules/pngjs/coverage/lcov-report/sync-reader.js.html +0 -215
  181. package/node_modules/pngjs/coverage/lcov.info +0 -2177
  182. package/node_modules/pngjs/lib/bitmapper.js +0 -267
  183. package/node_modules/pngjs/lib/bitpacker.js +0 -158
  184. package/node_modules/pngjs/lib/chunkstream.js +0 -189
  185. package/node_modules/pngjs/lib/constants.js +0 -32
  186. package/node_modules/pngjs/lib/crc.js +0 -40
  187. package/node_modules/pngjs/lib/filter-pack.js +0 -171
  188. package/node_modules/pngjs/lib/filter-parse-async.js +0 -24
  189. package/node_modules/pngjs/lib/filter-parse-sync.js +0 -21
  190. package/node_modules/pngjs/lib/filter-parse.js +0 -177
  191. package/node_modules/pngjs/lib/format-normaliser.js +0 -93
  192. package/node_modules/pngjs/lib/interlace.js +0 -95
  193. package/node_modules/pngjs/lib/packer-async.js +0 -50
  194. package/node_modules/pngjs/lib/packer-sync.js +0 -56
  195. package/node_modules/pngjs/lib/packer.js +0 -129
  196. package/node_modules/pngjs/lib/paeth-predictor.js +0 -16
  197. package/node_modules/pngjs/lib/parser-async.js +0 -165
  198. package/node_modules/pngjs/lib/parser-sync.js +0 -108
  199. package/node_modules/pngjs/lib/parser.js +0 -290
  200. package/node_modules/pngjs/lib/png-sync.js +0 -12
  201. package/node_modules/pngjs/lib/png.js +0 -194
  202. package/node_modules/pngjs/lib/sync-inflate.js +0 -168
  203. package/node_modules/pngjs/lib/sync-reader.js +0 -45
  204. package/node_modules/pngjs/package.json +0 -73
  205. package/node_modules/qrcode/README.md +0 -770
  206. package/node_modules/qrcode/bin/qrcode +0 -159
  207. package/node_modules/qrcode/helper/to-sjis-browser.js +0 -2
  208. package/node_modules/qrcode/helper/to-sjis.js +0 -105
  209. package/node_modules/qrcode/lib/browser.js +0 -76
  210. package/node_modules/qrcode/lib/can-promise.js +0 -7
  211. package/node_modules/qrcode/lib/core/alignment-pattern.js +0 -83
  212. package/node_modules/qrcode/lib/core/alphanumeric-data.js +0 -59
  213. package/node_modules/qrcode/lib/core/bit-buffer.js +0 -37
  214. package/node_modules/qrcode/lib/core/bit-matrix.js +0 -65
  215. package/node_modules/qrcode/lib/core/byte-data.js +0 -30
  216. package/node_modules/qrcode/lib/core/error-correction-code.js +0 -135
  217. package/node_modules/qrcode/lib/core/error-correction-level.js +0 -50
  218. package/node_modules/qrcode/lib/core/finder-pattern.js +0 -22
  219. package/node_modules/qrcode/lib/core/format-info.js +0 -29
  220. package/node_modules/qrcode/lib/core/galois-field.js +0 -69
  221. package/node_modules/qrcode/lib/core/kanji-data.js +0 -54
  222. package/node_modules/qrcode/lib/core/mask-pattern.js +0 -234
  223. package/node_modules/qrcode/lib/core/mode.js +0 -167
  224. package/node_modules/qrcode/lib/core/numeric-data.js +0 -43
  225. package/node_modules/qrcode/lib/core/polynomial.js +0 -62
  226. package/node_modules/qrcode/lib/core/qrcode.js +0 -495
  227. package/node_modules/qrcode/lib/core/reed-solomon-encoder.js +0 -56
  228. package/node_modules/qrcode/lib/core/regex.js +0 -31
  229. package/node_modules/qrcode/lib/core/segments.js +0 -330
  230. package/node_modules/qrcode/lib/core/utils.js +0 -63
  231. package/node_modules/qrcode/lib/core/version-check.js +0 -9
  232. package/node_modules/qrcode/lib/core/version.js +0 -163
  233. package/node_modules/qrcode/lib/index.js +0 -12
  234. package/node_modules/qrcode/lib/renderer/canvas.js +0 -63
  235. package/node_modules/qrcode/lib/renderer/png.js +0 -78
  236. package/node_modules/qrcode/lib/renderer/svg-tag.js +0 -81
  237. package/node_modules/qrcode/lib/renderer/svg.js +0 -19
  238. package/node_modules/qrcode/lib/renderer/terminal/terminal-small.js +0 -85
  239. package/node_modules/qrcode/lib/renderer/terminal/terminal.js +0 -49
  240. package/node_modules/qrcode/lib/renderer/terminal.js +0 -9
  241. package/node_modules/qrcode/lib/renderer/utf8.js +0 -71
  242. package/node_modules/qrcode/lib/renderer/utils.js +0 -99
  243. package/node_modules/qrcode/lib/server.js +0 -138
  244. package/node_modules/qrcode/license +0 -10
  245. package/node_modules/qrcode/package.json +0 -77
  246. package/node_modules/require-directory/.jshintrc +0 -67
  247. package/node_modules/require-directory/.npmignore +0 -1
  248. package/node_modules/require-directory/.travis.yml +0 -3
  249. package/node_modules/require-directory/LICENSE +0 -22
  250. package/node_modules/require-directory/README.markdown +0 -184
  251. package/node_modules/require-directory/index.js +0 -86
  252. package/node_modules/require-directory/package.json +0 -40
  253. package/node_modules/require-main-filename/CHANGELOG.md +0 -26
  254. package/node_modules/require-main-filename/LICENSE.txt +0 -14
  255. package/node_modules/require-main-filename/README.md +0 -26
  256. package/node_modules/require-main-filename/index.js +0 -18
  257. package/node_modules/require-main-filename/package.json +0 -35
  258. package/node_modules/set-blocking/CHANGELOG.md +0 -26
  259. package/node_modules/set-blocking/LICENSE.txt +0 -14
  260. package/node_modules/set-blocking/README.md +0 -31
  261. package/node_modules/set-blocking/index.js +0 -7
  262. package/node_modules/set-blocking/package.json +0 -42
  263. package/node_modules/string-width/index.d.ts +0 -29
  264. package/node_modules/string-width/index.js +0 -47
  265. package/node_modules/string-width/license +0 -9
  266. package/node_modules/string-width/package.json +0 -56
  267. package/node_modules/string-width/readme.md +0 -50
  268. package/node_modules/strip-ansi/index.d.ts +0 -17
  269. package/node_modules/strip-ansi/index.js +0 -4
  270. package/node_modules/strip-ansi/license +0 -9
  271. package/node_modules/strip-ansi/package.json +0 -54
  272. package/node_modules/strip-ansi/readme.md +0 -46
  273. package/node_modules/which-module/LICENSE +0 -13
  274. package/node_modules/which-module/README.md +0 -58
  275. package/node_modules/which-module/index.js +0 -9
  276. package/node_modules/which-module/package.json +0 -41
  277. package/node_modules/wrap-ansi/index.js +0 -186
  278. package/node_modules/wrap-ansi/license +0 -9
  279. package/node_modules/wrap-ansi/package.json +0 -61
  280. package/node_modules/wrap-ansi/readme.md +0 -97
  281. package/node_modules/y18n/CHANGELOG.md +0 -35
  282. package/node_modules/y18n/LICENSE +0 -13
  283. package/node_modules/y18n/README.md +0 -109
  284. package/node_modules/y18n/index.js +0 -188
  285. package/node_modules/y18n/package.json +0 -39
  286. package/node_modules/yargs/CHANGELOG.md +0 -420
  287. package/node_modules/yargs/LICENSE +0 -21
  288. package/node_modules/yargs/README.md +0 -140
  289. package/node_modules/yargs/build/lib/apply-extends.d.ts +0 -2
  290. package/node_modules/yargs/build/lib/apply-extends.js +0 -65
  291. package/node_modules/yargs/build/lib/argsert.d.ts +0 -2
  292. package/node_modules/yargs/build/lib/argsert.js +0 -65
  293. package/node_modules/yargs/build/lib/command.d.ts +0 -64
  294. package/node_modules/yargs/build/lib/command.js +0 -416
  295. package/node_modules/yargs/build/lib/common-types.d.ts +0 -36
  296. package/node_modules/yargs/build/lib/common-types.js +0 -25
  297. package/node_modules/yargs/build/lib/completion-templates.d.ts +0 -2
  298. package/node_modules/yargs/build/lib/completion-templates.js +0 -50
  299. package/node_modules/yargs/build/lib/completion.d.ts +0 -21
  300. package/node_modules/yargs/build/lib/completion.js +0 -135
  301. package/node_modules/yargs/build/lib/is-promise.d.ts +0 -1
  302. package/node_modules/yargs/build/lib/is-promise.js +0 -9
  303. package/node_modules/yargs/build/lib/levenshtein.d.ts +0 -1
  304. package/node_modules/yargs/build/lib/levenshtein.js +0 -58
  305. package/node_modules/yargs/build/lib/middleware.d.ts +0 -10
  306. package/node_modules/yargs/build/lib/middleware.js +0 -57
  307. package/node_modules/yargs/build/lib/obj-filter.d.ts +0 -1
  308. package/node_modules/yargs/build/lib/obj-filter.js +0 -14
  309. package/node_modules/yargs/build/lib/parse-command.d.ts +0 -11
  310. package/node_modules/yargs/build/lib/parse-command.js +0 -36
  311. package/node_modules/yargs/build/lib/process-argv.d.ts +0 -2
  312. package/node_modules/yargs/build/lib/process-argv.js +0 -31
  313. package/node_modules/yargs/build/lib/usage.d.ts +0 -49
  314. package/node_modules/yargs/build/lib/usage.js +0 -540
  315. package/node_modules/yargs/build/lib/validation.d.ts +0 -34
  316. package/node_modules/yargs/build/lib/validation.js +0 -330
  317. package/node_modules/yargs/build/lib/yargs.d.ts +0 -274
  318. package/node_modules/yargs/build/lib/yargs.js +0 -1190
  319. package/node_modules/yargs/build/lib/yerror.d.ts +0 -4
  320. package/node_modules/yargs/build/lib/yerror.js +0 -11
  321. package/node_modules/yargs/index.js +0 -40
  322. package/node_modules/yargs/locales/be.json +0 -46
  323. package/node_modules/yargs/locales/de.json +0 -46
  324. package/node_modules/yargs/locales/en.json +0 -51
  325. package/node_modules/yargs/locales/es.json +0 -46
  326. package/node_modules/yargs/locales/fi.json +0 -49
  327. package/node_modules/yargs/locales/fr.json +0 -53
  328. package/node_modules/yargs/locales/hi.json +0 -49
  329. package/node_modules/yargs/locales/hu.json +0 -46
  330. package/node_modules/yargs/locales/id.json +0 -50
  331. package/node_modules/yargs/locales/it.json +0 -46
  332. package/node_modules/yargs/locales/ja.json +0 -51
  333. package/node_modules/yargs/locales/ko.json +0 -49
  334. package/node_modules/yargs/locales/nb.json +0 -44
  335. package/node_modules/yargs/locales/nl.json +0 -49
  336. package/node_modules/yargs/locales/nn.json +0 -44
  337. package/node_modules/yargs/locales/pirate.json +0 -13
  338. package/node_modules/yargs/locales/pl.json +0 -49
  339. package/node_modules/yargs/locales/pt.json +0 -45
  340. package/node_modules/yargs/locales/pt_BR.json +0 -48
  341. package/node_modules/yargs/locales/ru.json +0 -46
  342. package/node_modules/yargs/locales/th.json +0 -46
  343. package/node_modules/yargs/locales/tr.json +0 -48
  344. package/node_modules/yargs/locales/zh_CN.json +0 -48
  345. package/node_modules/yargs/locales/zh_TW.json +0 -47
  346. package/node_modules/yargs/package.json +0 -92
  347. package/node_modules/yargs/yargs.js +0 -14
  348. package/node_modules/yargs-parser/CHANGELOG.md +0 -601
  349. package/node_modules/yargs-parser/LICENSE.txt +0 -14
  350. package/node_modules/yargs-parser/README.md +0 -449
  351. package/node_modules/yargs-parser/index.js +0 -1032
  352. package/node_modules/yargs-parser/lib/tokenize-arg-string.js +0 -40
  353. package/node_modules/yargs-parser/package.json +0 -46
@@ -1,50 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.completionZshTemplate = exports.completionShTemplate = void 0;
4
- exports.completionShTemplate = `###-begin-{{app_name}}-completions-###
5
- #
6
- # yargs command completion script
7
- #
8
- # Installation: {{app_path}} {{completion_command}} >> ~/.bashrc
9
- # or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.
10
- #
11
- _yargs_completions()
12
- {
13
- local cur_word args type_list
14
-
15
- cur_word="\${COMP_WORDS[COMP_CWORD]}"
16
- args=("\${COMP_WORDS[@]}")
17
-
18
- # ask yargs to generate completions.
19
- type_list=$({{app_path}} --get-yargs-completions "\${args[@]}")
20
-
21
- COMPREPLY=( $(compgen -W "\${type_list}" -- \${cur_word}) )
22
-
23
- # if no match was found, fall back to filename completion
24
- if [ \${#COMPREPLY[@]} -eq 0 ]; then
25
- COMPREPLY=()
26
- fi
27
-
28
- return 0
29
- }
30
- complete -o default -F _yargs_completions {{app_name}}
31
- ###-end-{{app_name}}-completions-###
32
- `;
33
- exports.completionZshTemplate = `###-begin-{{app_name}}-completions-###
34
- #
35
- # yargs command completion script
36
- #
37
- # Installation: {{app_path}} {{completion_command}} >> ~/.zshrc
38
- # or {{app_path}} {{completion_command}} >> ~/.zsh_profile on OSX.
39
- #
40
- _{{app_name}}_yargs_completions()
41
- {
42
- local reply
43
- local si=$IFS
44
- IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}"))
45
- IFS=$si
46
- _describe 'values' reply
47
- }
48
- compdef _{{app_name}}_yargs_completions {{app_name}}
49
- ###-end-{{app_name}}-completions-###
50
- `;
@@ -1,21 +0,0 @@
1
- import { CommandInstance } from './command';
2
- import { UsageInstance } from './usage';
3
- import { YargsInstance } from './yargs';
4
- import { Arguments, DetailedArguments } from 'yargs-parser';
5
- export declare function completion(yargs: YargsInstance, usage: UsageInstance, command: CommandInstance): CompletionInstance;
6
- /** Instance of the completion module. */
7
- export interface CompletionInstance {
8
- completionKey: string;
9
- generateCompletionScript($0: string, cmd: string): string;
10
- getCompletion(args: string[], done: (completions: string[]) => any): any;
11
- registerFunction(fn: CompletionFunction): void;
12
- setParsed(parsed: DetailedArguments): void;
13
- }
14
- export declare type CompletionFunction = SyncCompletionFunction | AsyncCompletionFunction;
15
- interface SyncCompletionFunction {
16
- (current: string, argv: Arguments): string[] | Promise<string[]>;
17
- }
18
- interface AsyncCompletionFunction {
19
- (current: string, argv: Arguments, done: (completions: string[]) => any): any;
20
- }
21
- export {};
@@ -1,135 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.completion = void 0;
4
- const command_1 = require("./command");
5
- const templates = require("./completion-templates");
6
- const is_promise_1 = require("./is-promise");
7
- const parse_command_1 = require("./parse-command");
8
- const path = require("path");
9
- const common_types_1 = require("./common-types");
10
- // add bash completions to your
11
- // yargs-powered applications.
12
- function completion(yargs, usage, command) {
13
- const self = {
14
- completionKey: 'get-yargs-completions'
15
- };
16
- let aliases;
17
- self.setParsed = function setParsed(parsed) {
18
- aliases = parsed.aliases;
19
- };
20
- const zshShell = (process.env.SHELL && process.env.SHELL.indexOf('zsh') !== -1) ||
21
- (process.env.ZSH_NAME && process.env.ZSH_NAME.indexOf('zsh') !== -1);
22
- // get a list of completion commands.
23
- // 'args' is the array of strings from the line to be completed
24
- self.getCompletion = function getCompletion(args, done) {
25
- const completions = [];
26
- const current = args.length ? args[args.length - 1] : '';
27
- const argv = yargs.parse(args, true);
28
- const parentCommands = yargs.getContext().commands;
29
- // a custom completion function can be provided
30
- // to completion().
31
- function runCompletionFunction(argv) {
32
- common_types_1.assertNotStrictEqual(completionFunction, null);
33
- if (isSyncCompletionFunction(completionFunction)) {
34
- const result = completionFunction(current, argv);
35
- // promise based completion function.
36
- if (is_promise_1.isPromise(result)) {
37
- return result.then((list) => {
38
- process.nextTick(() => { done(list); });
39
- }).catch((err) => {
40
- process.nextTick(() => { throw err; });
41
- });
42
- }
43
- // synchronous completion function.
44
- return done(result);
45
- }
46
- else {
47
- // asynchronous completion function
48
- return completionFunction(current, argv, (completions) => {
49
- done(completions);
50
- });
51
- }
52
- }
53
- if (completionFunction) {
54
- return is_promise_1.isPromise(argv) ? argv.then(runCompletionFunction) : runCompletionFunction(argv);
55
- }
56
- const handlers = command.getCommandHandlers();
57
- for (let i = 0, ii = args.length; i < ii; ++i) {
58
- if (handlers[args[i]] && handlers[args[i]].builder) {
59
- const builder = handlers[args[i]].builder;
60
- if (command_1.isCommandBuilderCallback(builder)) {
61
- const y = yargs.reset();
62
- builder(y);
63
- return y.argv;
64
- }
65
- }
66
- }
67
- if (!current.match(/^-/) && parentCommands[parentCommands.length - 1] !== current) {
68
- usage.getCommands().forEach((usageCommand) => {
69
- const commandName = parse_command_1.parseCommand(usageCommand[0]).cmd;
70
- if (args.indexOf(commandName) === -1) {
71
- if (!zshShell) {
72
- completions.push(commandName);
73
- }
74
- else {
75
- const desc = usageCommand[1] || '';
76
- completions.push(commandName.replace(/:/g, '\\:') + ':' + desc);
77
- }
78
- }
79
- });
80
- }
81
- if (current.match(/^-/) || (current === '' && completions.length === 0)) {
82
- const descs = usage.getDescriptions();
83
- const options = yargs.getOptions();
84
- Object.keys(options.key).forEach((key) => {
85
- const negable = !!options.configuration['boolean-negation'] && options.boolean.includes(key);
86
- // If the key and its aliases aren't in 'args', add the key to 'completions'
87
- let keyAndAliases = [key].concat(aliases[key] || []);
88
- if (negable)
89
- keyAndAliases = keyAndAliases.concat(keyAndAliases.map(key => `no-${key}`));
90
- function completeOptionKey(key) {
91
- const notInArgs = keyAndAliases.every(val => args.indexOf(`--${val}`) === -1);
92
- if (notInArgs) {
93
- const startsByTwoDashes = (s) => /^--/.test(s);
94
- const isShortOption = (s) => /^[^0-9]$/.test(s);
95
- const dashes = !startsByTwoDashes(current) && isShortOption(key) ? '-' : '--';
96
- if (!zshShell) {
97
- completions.push(dashes + key);
98
- }
99
- else {
100
- const desc = descs[key] || '';
101
- completions.push(dashes + `${key.replace(/:/g, '\\:')}:${desc.replace('__yargsString__:', '')}`);
102
- }
103
- }
104
- }
105
- completeOptionKey(key);
106
- if (negable && !!options.default[key])
107
- completeOptionKey(`no-${key}`);
108
- });
109
- }
110
- done(completions);
111
- };
112
- // generate the completion script to add to your .bashrc.
113
- self.generateCompletionScript = function generateCompletionScript($0, cmd) {
114
- let script = zshShell ? templates.completionZshTemplate : templates.completionShTemplate;
115
- const name = path.basename($0);
116
- // add ./to applications not yet installed as bin.
117
- if ($0.match(/\.js$/))
118
- $0 = `./${$0}`;
119
- script = script.replace(/{{app_name}}/g, name);
120
- script = script.replace(/{{completion_command}}/g, cmd);
121
- return script.replace(/{{app_path}}/g, $0);
122
- };
123
- // register a function to perform your own custom
124
- // completions., this function can be either
125
- // synchrnous or asynchronous.
126
- let completionFunction = null;
127
- self.registerFunction = (fn) => {
128
- completionFunction = fn;
129
- };
130
- return self;
131
- }
132
- exports.completion = completion;
133
- function isSyncCompletionFunction(completionFunction) {
134
- return completionFunction.length < 3;
135
- }
@@ -1 +0,0 @@
1
- export declare function isPromise<T>(maybePromise: T | Promise<T>): maybePromise is Promise<T>;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isPromise = void 0;
4
- function isPromise(maybePromise) {
5
- return !!maybePromise &&
6
- !!maybePromise.then &&
7
- (typeof maybePromise.then === 'function');
8
- }
9
- exports.isPromise = isPromise;
@@ -1 +0,0 @@
1
- export declare function levenshtein(a: string, b: string): number;
@@ -1,58 +0,0 @@
1
- "use strict";
2
- /*
3
- Copyright (c) 2011 Andrei Mackenzie
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of
6
- this software and associated documentation files (the "Software"), to deal in
7
- the Software without restriction, including without limitation the rights to
8
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
- the Software, and to permit persons to whom the Software is furnished to do so,
10
- subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
- */
22
- Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.levenshtein = void 0;
24
- // levenshtein distance algorithm, pulled from Andrei Mackenzie's MIT licensed.
25
- // gist, which can be found here: https://gist.github.com/andrei-m/982927
26
- // Compute the edit distance between the two given strings
27
- function levenshtein(a, b) {
28
- if (a.length === 0)
29
- return b.length;
30
- if (b.length === 0)
31
- return a.length;
32
- const matrix = [];
33
- // increment along the first column of each row
34
- let i;
35
- for (i = 0; i <= b.length; i++) {
36
- matrix[i] = [i];
37
- }
38
- // increment each column in the first row
39
- let j;
40
- for (j = 0; j <= a.length; j++) {
41
- matrix[0][j] = j;
42
- }
43
- // Fill in the rest of the matrix
44
- for (i = 1; i <= b.length; i++) {
45
- for (j = 1; j <= a.length; j++) {
46
- if (b.charAt(i - 1) === a.charAt(j - 1)) {
47
- matrix[i][j] = matrix[i - 1][j - 1];
48
- }
49
- else {
50
- matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution
51
- Math.min(matrix[i][j - 1] + 1, // insertion
52
- matrix[i - 1][j] + 1)); // deletion
53
- }
54
- }
55
- }
56
- return matrix[b.length][a.length];
57
- }
58
- exports.levenshtein = levenshtein;
@@ -1,10 +0,0 @@
1
- import { YargsInstance, Arguments } from './yargs';
2
- export declare function globalMiddlewareFactory<T>(globalMiddleware: Middleware[], context: T): (callback: MiddlewareCallback | MiddlewareCallback[], applyBeforeValidation?: boolean) => T;
3
- export declare function commandMiddlewareFactory(commandMiddleware?: MiddlewareCallback[]): Middleware[];
4
- export declare function applyMiddleware(argv: Arguments | Promise<Arguments>, yargs: YargsInstance, middlewares: Middleware[], beforeValidation: boolean): Arguments | Promise<Arguments>;
5
- export interface MiddlewareCallback {
6
- (argv: Arguments, yargs: YargsInstance): Partial<Arguments> | Promise<Partial<Arguments>>;
7
- }
8
- export interface Middleware extends MiddlewareCallback {
9
- applyBeforeValidation: boolean;
10
- }
@@ -1,57 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.applyMiddleware = exports.commandMiddlewareFactory = exports.globalMiddlewareFactory = void 0;
4
- const argsert_1 = require("./argsert");
5
- const is_promise_1 = require("./is-promise");
6
- function globalMiddlewareFactory(globalMiddleware, context) {
7
- return function (callback, applyBeforeValidation = false) {
8
- argsert_1.argsert('<array|function> [boolean]', [callback, applyBeforeValidation], arguments.length);
9
- if (Array.isArray(callback)) {
10
- for (let i = 0; i < callback.length; i++) {
11
- if (typeof callback[i] !== 'function') {
12
- throw Error('middleware must be a function');
13
- }
14
- callback[i].applyBeforeValidation = applyBeforeValidation;
15
- }
16
- Array.prototype.push.apply(globalMiddleware, callback);
17
- }
18
- else if (typeof callback === 'function') {
19
- callback.applyBeforeValidation = applyBeforeValidation;
20
- globalMiddleware.push(callback);
21
- }
22
- return context;
23
- };
24
- }
25
- exports.globalMiddlewareFactory = globalMiddlewareFactory;
26
- function commandMiddlewareFactory(commandMiddleware) {
27
- if (!commandMiddleware)
28
- return [];
29
- return commandMiddleware.map(middleware => {
30
- middleware.applyBeforeValidation = false;
31
- return middleware;
32
- });
33
- }
34
- exports.commandMiddlewareFactory = commandMiddlewareFactory;
35
- function applyMiddleware(argv, yargs, middlewares, beforeValidation) {
36
- const beforeValidationError = new Error('middleware cannot return a promise when applyBeforeValidation is true');
37
- return middlewares
38
- .reduce((acc, middleware) => {
39
- if (middleware.applyBeforeValidation !== beforeValidation) {
40
- return acc;
41
- }
42
- if (is_promise_1.isPromise(acc)) {
43
- return acc
44
- .then(initialObj => Promise.all([initialObj, middleware(initialObj, yargs)]))
45
- .then(([initialObj, middlewareObj]) => Object.assign(initialObj, middlewareObj));
46
- }
47
- else {
48
- const result = middleware(acc, yargs);
49
- if (beforeValidation && is_promise_1.isPromise(result))
50
- throw beforeValidationError;
51
- return is_promise_1.isPromise(result)
52
- ? result.then(middlewareObj => Object.assign(acc, middlewareObj))
53
- : Object.assign(acc, result);
54
- }
55
- }, argv);
56
- }
57
- exports.applyMiddleware = applyMiddleware;
@@ -1 +0,0 @@
1
- export declare function objFilter<T extends object>(original?: T, filter?: (k: keyof T, v: T[keyof T]) => boolean): T;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.objFilter = void 0;
4
- const common_types_1 = require("./common-types");
5
- function objFilter(original = {}, filter = () => true) {
6
- const obj = {};
7
- common_types_1.objectKeys(original).forEach((key) => {
8
- if (filter(key, original[key])) {
9
- obj[key] = original[key];
10
- }
11
- });
12
- return obj;
13
- }
14
- exports.objFilter = objFilter;
@@ -1,11 +0,0 @@
1
- import { NotEmptyArray } from './common-types';
2
- export declare function parseCommand(cmd: string): ParsedCommand;
3
- export interface ParsedCommand {
4
- cmd: string;
5
- demanded: Positional[];
6
- optional: Positional[];
7
- }
8
- export interface Positional {
9
- cmd: NotEmptyArray<string>;
10
- variadic: boolean;
11
- }
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseCommand = void 0;
4
- function parseCommand(cmd) {
5
- const extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, ' ');
6
- const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/);
7
- const bregex = /\.*[\][<>]/g;
8
- const firstCommand = splitCommand.shift();
9
- if (!firstCommand)
10
- throw new Error(`No command found in: ${cmd}`);
11
- const parsedCommand = {
12
- cmd: firstCommand.replace(bregex, ''),
13
- demanded: [],
14
- optional: []
15
- };
16
- splitCommand.forEach((cmd, i) => {
17
- let variadic = false;
18
- cmd = cmd.replace(/\s/g, '');
19
- if (/\.+[\]>]/.test(cmd) && i === splitCommand.length - 1)
20
- variadic = true;
21
- if (/^\[/.test(cmd)) {
22
- parsedCommand.optional.push({
23
- cmd: cmd.replace(bregex, '').split('|'),
24
- variadic
25
- });
26
- }
27
- else {
28
- parsedCommand.demanded.push({
29
- cmd: cmd.replace(bregex, '').split('|'),
30
- variadic
31
- });
32
- }
33
- });
34
- return parsedCommand;
35
- }
36
- exports.parseCommand = parseCommand;
@@ -1,2 +0,0 @@
1
- export declare function getProcessArgvWithoutBin(): string[];
2
- export declare function getProcessArgvBin(): string;
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getProcessArgvBin = exports.getProcessArgvWithoutBin = void 0;
4
- function getProcessArgvBinIndex() {
5
- // The binary name is the first command line argument for:
6
- // - bundled Electron apps: bin argv1 argv2 ... argvn
7
- if (isBundledElectronApp())
8
- return 0;
9
- // or the second one (default) for:
10
- // - standard node apps: node bin.js argv1 argv2 ... argvn
11
- // - unbundled Electron apps: electron bin.js argv1 arg2 ... argvn
12
- return 1;
13
- }
14
- function isBundledElectronApp() {
15
- // process.defaultApp is either set by electron in an electron unbundled app, or undefined
16
- // see https://github.com/electron/electron/blob/master/docs/api/process.md#processdefaultapp-readonly
17
- return isElectronApp() && !process.defaultApp;
18
- }
19
- function isElectronApp() {
20
- // process.versions.electron is either set by electron, or undefined
21
- // see https://github.com/electron/electron/blob/master/docs/api/process.md#processversionselectron-readonly
22
- return !!process.versions.electron;
23
- }
24
- function getProcessArgvWithoutBin() {
25
- return process.argv.slice(getProcessArgvBinIndex() + 1);
26
- }
27
- exports.getProcessArgvWithoutBin = getProcessArgvWithoutBin;
28
- function getProcessArgvBin() {
29
- return process.argv[getProcessArgvBinIndex()];
30
- }
31
- exports.getProcessArgvBin = getProcessArgvBin;
@@ -1,49 +0,0 @@
1
- import { Dictionary } from './common-types';
2
- import { YargsInstance } from './yargs';
3
- import { YError } from './yerror';
4
- import { Y18N } from 'y18n';
5
- export declare function usage(yargs: YargsInstance, y18n: Y18N): UsageInstance;
6
- /** Instance of the usage module. */
7
- export interface UsageInstance {
8
- cacheHelpMessage(): void;
9
- clearCachedHelpMessage(): void;
10
- command(cmd: string, description: string | undefined, isDefault: boolean, aliases: string[], deprecated?: boolean): void;
11
- deferY18nLookup(str: string): string;
12
- describe(keys: string | string[] | Dictionary<string>, desc?: string): void;
13
- epilog(msg: string): void;
14
- example(cmd: string, description?: string): void;
15
- fail(msg?: string | null, err?: YError | string): void;
16
- failFn(f: FailureFunction): void;
17
- freeze(): void;
18
- functionDescription(fn: {
19
- name?: string;
20
- }): string;
21
- getCommands(): [string, string, boolean, string[], boolean][];
22
- getDescriptions(): Dictionary<string | undefined>;
23
- getPositionalGroupName(): string;
24
- getUsage(): [string, string][];
25
- getUsageDisabled(): boolean;
26
- help(): string;
27
- reset(localLookup: Dictionary<boolean>): UsageInstance;
28
- showHelp(level: 'error' | 'log' | ((message: string) => void)): void;
29
- showHelpOnFail(enabled?: boolean | string, message?: string): UsageInstance;
30
- showVersion(): void;
31
- stringifiedValues(values?: any[], separator?: string): string;
32
- unfreeze(): void;
33
- usage(msg: string | null, description?: string | false): UsageInstance;
34
- version(ver: any): void;
35
- wrap(cols: number | null | undefined): void;
36
- }
37
- export interface FailureFunction {
38
- (msg: string | undefined | null, err: YError | string | undefined, usage: UsageInstance): void;
39
- }
40
- export interface FrozenUsageInstance {
41
- failMessage: string | undefined | null;
42
- failureOutput: boolean;
43
- usages: [string, string][];
44
- usageDisabled: boolean;
45
- epilogs: string[];
46
- examples: [string, string][];
47
- commands: [string, string, boolean, string[], boolean][];
48
- descriptions: Dictionary<string | undefined>;
49
- }