@devicefarmer/adbkit 2.11.3 → 3.2.2

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 (445) hide show
  1. package/.github/dependabot.yml +46 -0
  2. package/CONTRIBUTING.md +28 -0
  3. package/README.md +749 -759
  4. package/bin/adbkit +1 -1
  5. package/dist/index.d.ts +24 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +19 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/package.json +84 -0
  10. package/dist/src/Callback.d.ts +2 -0
  11. package/dist/src/Callback.d.ts.map +1 -0
  12. package/dist/src/Callback.js +3 -0
  13. package/dist/src/Callback.js.map +1 -0
  14. package/dist/src/ClientOptions.d.ts +6 -0
  15. package/dist/src/ClientOptions.d.ts.map +1 -0
  16. package/dist/src/ClientOptions.js +3 -0
  17. package/dist/src/ClientOptions.js.map +1 -0
  18. package/dist/src/CpuStats.d.ts +17 -0
  19. package/dist/src/CpuStats.d.ts.map +1 -0
  20. package/dist/src/CpuStats.js +3 -0
  21. package/dist/src/CpuStats.js.map +1 -0
  22. package/dist/src/Device.d.ts +5 -0
  23. package/dist/src/Device.d.ts.map +1 -0
  24. package/dist/src/Device.js +3 -0
  25. package/dist/src/Device.js.map +1 -0
  26. package/dist/src/DeviceWithPath.d.ts +9 -0
  27. package/dist/src/DeviceWithPath.d.ts.map +1 -0
  28. package/dist/src/DeviceWithPath.js +3 -0
  29. package/dist/src/DeviceWithPath.js.map +1 -0
  30. package/dist/src/ExtendedPublicKey.d.ts +7 -0
  31. package/dist/src/ExtendedPublicKey.d.ts.map +1 -0
  32. package/dist/src/ExtendedPublicKey.js +3 -0
  33. package/dist/src/ExtendedPublicKey.js.map +1 -0
  34. package/dist/src/Features.d.ts +2 -0
  35. package/dist/src/Features.d.ts.map +1 -0
  36. package/dist/src/Features.js +3 -0
  37. package/dist/src/Features.js.map +1 -0
  38. package/dist/src/Forward.d.ts +6 -0
  39. package/dist/src/Forward.d.ts.map +1 -0
  40. package/dist/src/Forward.js +3 -0
  41. package/dist/src/Forward.js.map +1 -0
  42. package/dist/src/FramebufferMeta.d.ts +60 -0
  43. package/dist/src/FramebufferMeta.d.ts.map +1 -0
  44. package/dist/src/FramebufferMeta.js +3 -0
  45. package/dist/src/FramebufferMeta.js.map +1 -0
  46. package/dist/src/FramebufferStreamWithMeta.d.ts +10 -0
  47. package/dist/src/FramebufferStreamWithMeta.d.ts.map +1 -0
  48. package/dist/src/FramebufferStreamWithMeta.js +3 -0
  49. package/dist/src/FramebufferStreamWithMeta.js.map +1 -0
  50. package/dist/src/Properties.d.ts +2 -0
  51. package/dist/src/Properties.d.ts.map +1 -0
  52. package/dist/src/Properties.js +3 -0
  53. package/dist/src/Properties.js.map +1 -0
  54. package/dist/src/Reverse.d.ts +5 -0
  55. package/dist/src/Reverse.d.ts.map +1 -0
  56. package/dist/src/Reverse.js +3 -0
  57. package/dist/src/Reverse.js.map +1 -0
  58. package/dist/src/SocketOptions.d.ts +6 -0
  59. package/dist/src/SocketOptions.d.ts.map +1 -0
  60. package/dist/src/SocketOptions.js +3 -0
  61. package/dist/src/SocketOptions.js.map +1 -0
  62. package/dist/src/StartActivityOptions.d.ts +12 -0
  63. package/dist/src/StartActivityOptions.d.ts.map +1 -0
  64. package/dist/src/StartActivityOptions.js +3 -0
  65. package/dist/src/StartActivityOptions.js.map +1 -0
  66. package/dist/src/StartServiceOptions.d.ts +57 -0
  67. package/dist/src/StartServiceOptions.d.ts.map +1 -0
  68. package/dist/src/StartServiceOptions.js +3 -0
  69. package/dist/src/StartServiceOptions.js.map +1 -0
  70. package/dist/src/TrackerChangeSet.d.ts +7 -0
  71. package/dist/src/TrackerChangeSet.d.ts.map +1 -0
  72. package/dist/src/TrackerChangeSet.js +3 -0
  73. package/dist/src/TrackerChangeSet.js.map +1 -0
  74. package/dist/src/WithToString.d.ts +4 -0
  75. package/dist/src/WithToString.d.ts.map +1 -0
  76. package/dist/src/WithToString.js +3 -0
  77. package/dist/src/WithToString.js.map +1 -0
  78. package/dist/src/adb/DeviceClient.d.ts +376 -0
  79. package/dist/src/adb/DeviceClient.d.ts.map +1 -0
  80. package/dist/src/adb/DeviceClient.js +517 -0
  81. package/dist/src/adb/DeviceClient.js.map +1 -0
  82. package/dist/src/adb/auth.d.ts +8 -0
  83. package/dist/src/adb/auth.d.ts.map +1 -0
  84. package/dist/src/adb/auth.js +87 -0
  85. package/dist/src/adb/auth.js.map +1 -0
  86. package/dist/src/adb/client.d.ts +29 -0
  87. package/dist/src/adb/client.d.ts.map +1 -0
  88. package/dist/src/adb/client.js +73 -0
  89. package/dist/src/adb/client.js.map +1 -0
  90. package/dist/src/adb/command/host/connect.d.ts +6 -0
  91. package/dist/src/adb/command/host/connect.d.ts.map +1 -0
  92. package/dist/src/adb/command/host/connect.js +36 -0
  93. package/dist/src/adb/command/host/connect.js.map +1 -0
  94. package/dist/src/adb/command/host/devices.d.ts +10 -0
  95. package/dist/src/adb/command/host/devices.d.ts.map +1 -0
  96. package/dist/src/adb/command/host/devices.js +40 -0
  97. package/dist/src/adb/command/host/devices.js.map +1 -0
  98. package/dist/src/adb/command/host/deviceswithpaths.d.ts +9 -0
  99. package/dist/src/adb/command/host/deviceswithpaths.d.ts.map +1 -0
  100. package/dist/src/adb/command/host/deviceswithpaths.js +46 -0
  101. package/dist/src/adb/command/host/deviceswithpaths.js.map +1 -0
  102. package/dist/src/adb/command/host/disconnect.d.ts +6 -0
  103. package/dist/src/adb/command/host/disconnect.d.ts.map +1 -0
  104. package/dist/src/adb/command/host/disconnect.js +35 -0
  105. package/dist/src/adb/command/host/disconnect.js.map +1 -0
  106. package/dist/src/adb/command/host/index.d.ts +9 -0
  107. package/dist/src/adb/command/host/index.d.ts.map +1 -0
  108. package/dist/src/adb/command/host/index.js +23 -0
  109. package/dist/src/adb/command/host/index.js.map +1 -0
  110. package/dist/src/adb/command/host/kill.d.ts +6 -0
  111. package/dist/src/adb/command/host/kill.d.ts.map +1 -0
  112. package/dist/src/adb/command/host/kill.js +24 -0
  113. package/dist/src/adb/command/host/kill.js.map +1 -0
  114. package/dist/src/adb/command/host/trackdevices.d.ts +6 -0
  115. package/dist/src/adb/command/host/trackdevices.d.ts.map +1 -0
  116. package/dist/src/adb/command/host/trackdevices.js +27 -0
  117. package/dist/src/adb/command/host/trackdevices.js.map +1 -0
  118. package/dist/src/adb/command/host/transport.d.ts +6 -0
  119. package/dist/src/adb/command/host/transport.d.ts.map +1 -0
  120. package/dist/src/adb/command/host/transport.js +24 -0
  121. package/dist/src/adb/command/host/transport.js.map +1 -0
  122. package/dist/src/adb/command/host/version.d.ts +7 -0
  123. package/dist/src/adb/command/host/version.d.ts.map +1 -0
  124. package/dist/src/adb/command/host/version.js +29 -0
  125. package/dist/src/adb/command/host/version.js.map +1 -0
  126. package/dist/src/adb/command/host-serial/forward.d.ts +6 -0
  127. package/dist/src/adb/command/host-serial/forward.d.ts.map +1 -0
  128. package/dist/src/adb/command/host-serial/forward.js +33 -0
  129. package/dist/src/adb/command/host-serial/forward.js.map +1 -0
  130. package/dist/src/adb/command/host-serial/getdevicepath.d.ts +6 -0
  131. package/dist/src/adb/command/host-serial/getdevicepath.d.ts.map +1 -0
  132. package/dist/src/adb/command/host-serial/getdevicepath.js +26 -0
  133. package/dist/src/adb/command/host-serial/getdevicepath.js.map +1 -0
  134. package/dist/src/adb/command/host-serial/getserialno.d.ts +6 -0
  135. package/dist/src/adb/command/host-serial/getserialno.d.ts.map +1 -0
  136. package/dist/src/adb/command/host-serial/getserialno.js +24 -0
  137. package/dist/src/adb/command/host-serial/getserialno.js.map +1 -0
  138. package/dist/src/adb/command/host-serial/getstate.d.ts +6 -0
  139. package/dist/src/adb/command/host-serial/getstate.d.ts.map +1 -0
  140. package/dist/src/adb/command/host-serial/getstate.js +24 -0
  141. package/dist/src/adb/command/host-serial/getstate.js.map +1 -0
  142. package/dist/src/adb/command/host-serial/index.d.ts +7 -0
  143. package/dist/src/adb/command/host-serial/index.d.ts.map +1 -0
  144. package/dist/src/adb/command/host-serial/index.js +19 -0
  145. package/dist/src/adb/command/host-serial/index.js.map +1 -0
  146. package/dist/src/adb/command/host-serial/listforwards.d.ts +8 -0
  147. package/dist/src/adb/command/host-serial/listforwards.d.ts.map +1 -0
  148. package/dist/src/adb/command/host-serial/listforwards.js +34 -0
  149. package/dist/src/adb/command/host-serial/listforwards.js.map +1 -0
  150. package/dist/src/adb/command/host-serial/waitfordevice.d.ts +6 -0
  151. package/dist/src/adb/command/host-serial/waitfordevice.d.ts.map +1 -0
  152. package/dist/src/adb/command/host-serial/waitfordevice.js +33 -0
  153. package/dist/src/adb/command/host-serial/waitfordevice.js.map +1 -0
  154. package/dist/src/adb/command/host-transport/clear.d.ts +6 -0
  155. package/dist/src/adb/command/host-transport/clear.d.ts.map +1 -0
  156. package/dist/src/adb/command/host-transport/clear.js +39 -0
  157. package/dist/src/adb/command/host-transport/clear.js.map +1 -0
  158. package/dist/src/adb/command/host-transport/framebuffer.d.ts +12 -0
  159. package/dist/src/adb/command/host-transport/framebuffer.d.ts.map +1 -0
  160. package/dist/src/adb/command/host-transport/framebuffer.js +113 -0
  161. package/dist/src/adb/command/host-transport/framebuffer.js.map +1 -0
  162. package/dist/src/adb/command/host-transport/getfeatures.d.ts +8 -0
  163. package/dist/src/adb/command/host-transport/getfeatures.d.ts.map +1 -0
  164. package/dist/src/adb/command/host-transport/getfeatures.js +35 -0
  165. package/dist/src/adb/command/host-transport/getfeatures.js.map +1 -0
  166. package/dist/src/adb/command/host-transport/getpackages.d.ts +7 -0
  167. package/dist/src/adb/command/host-transport/getpackages.d.ts.map +1 -0
  168. package/dist/src/adb/command/host-transport/getpackages.js +45 -0
  169. package/dist/src/adb/command/host-transport/getpackages.js.map +1 -0
  170. package/dist/src/adb/command/host-transport/getproperties.d.ts +8 -0
  171. package/dist/src/adb/command/host-transport/getproperties.d.ts.map +1 -0
  172. package/dist/src/adb/command/host-transport/getproperties.js +37 -0
  173. package/dist/src/adb/command/host-transport/getproperties.js.map +1 -0
  174. package/dist/src/adb/command/host-transport/index.d.ts +28 -0
  175. package/dist/src/adb/command/host-transport/index.d.ts.map +1 -0
  176. package/dist/src/adb/command/host-transport/index.js +61 -0
  177. package/dist/src/adb/command/host-transport/index.js.map +1 -0
  178. package/dist/src/adb/command/host-transport/install.d.ts +6 -0
  179. package/dist/src/adb/command/host-transport/install.d.ts.map +1 -0
  180. package/dist/src/adb/command/host-transport/install.js +42 -0
  181. package/dist/src/adb/command/host-transport/install.js.map +1 -0
  182. package/dist/src/adb/command/host-transport/isinstalled.d.ts +6 -0
  183. package/dist/src/adb/command/host-transport/isinstalled.d.ts.map +1 -0
  184. package/dist/src/adb/command/host-transport/isinstalled.js +37 -0
  185. package/dist/src/adb/command/host-transport/isinstalled.js.map +1 -0
  186. package/dist/src/adb/command/host-transport/listreverses.d.ts +8 -0
  187. package/dist/src/adb/command/host-transport/listreverses.d.ts.map +1 -0
  188. package/dist/src/adb/command/host-transport/listreverses.js +38 -0
  189. package/dist/src/adb/command/host-transport/listreverses.js.map +1 -0
  190. package/dist/src/adb/command/host-transport/local.d.ts +8 -0
  191. package/dist/src/adb/command/host-transport/local.d.ts.map +1 -0
  192. package/dist/src/adb/command/host-transport/local.js +24 -0
  193. package/dist/src/adb/command/host-transport/local.js.map +1 -0
  194. package/dist/src/adb/command/host-transport/log.d.ts +8 -0
  195. package/dist/src/adb/command/host-transport/log.d.ts.map +1 -0
  196. package/dist/src/adb/command/host-transport/log.js +24 -0
  197. package/dist/src/adb/command/host-transport/log.js.map +1 -0
  198. package/dist/src/adb/command/host-transport/logcat.d.ts +9 -0
  199. package/dist/src/adb/command/host-transport/logcat.d.ts.map +1 -0
  200. package/dist/src/adb/command/host-transport/logcat.js +37 -0
  201. package/dist/src/adb/command/host-transport/logcat.js.map +1 -0
  202. package/dist/src/adb/command/host-transport/monkey.d.ts +8 -0
  203. package/dist/src/adb/command/host-transport/monkey.d.ts.map +1 -0
  204. package/dist/src/adb/command/host-transport/monkey.js +50 -0
  205. package/dist/src/adb/command/host-transport/monkey.js.map +1 -0
  206. package/dist/src/adb/command/host-transport/reboot.d.ts +6 -0
  207. package/dist/src/adb/command/host-transport/reboot.d.ts.map +1 -0
  208. package/dist/src/adb/command/host-transport/reboot.js +24 -0
  209. package/dist/src/adb/command/host-transport/reboot.js.map +1 -0
  210. package/dist/src/adb/command/host-transport/remount.d.ts +6 -0
  211. package/dist/src/adb/command/host-transport/remount.d.ts.map +1 -0
  212. package/dist/src/adb/command/host-transport/remount.js +24 -0
  213. package/dist/src/adb/command/host-transport/remount.js.map +1 -0
  214. package/dist/src/adb/command/host-transport/reverse.d.ts +6 -0
  215. package/dist/src/adb/command/host-transport/reverse.d.ts.map +1 -0
  216. package/dist/src/adb/command/host-transport/reverse.js +33 -0
  217. package/dist/src/adb/command/host-transport/reverse.js.map +1 -0
  218. package/dist/src/adb/command/host-transport/root.d.ts +6 -0
  219. package/dist/src/adb/command/host-transport/root.d.ts.map +1 -0
  220. package/dist/src/adb/command/host-transport/root.js +32 -0
  221. package/dist/src/adb/command/host-transport/root.js.map +1 -0
  222. package/dist/src/adb/command/host-transport/screencap.d.ts +8 -0
  223. package/dist/src/adb/command/host-transport/screencap.d.ts.map +1 -0
  224. package/dist/src/adb/command/host-transport/screencap.js +36 -0
  225. package/dist/src/adb/command/host-transport/screencap.js.map +1 -0
  226. package/dist/src/adb/command/host-transport/shell.d.ts +9 -0
  227. package/dist/src/adb/command/host-transport/shell.d.ts.map +1 -0
  228. package/dist/src/adb/command/host-transport/shell.js +27 -0
  229. package/dist/src/adb/command/host-transport/shell.js.map +1 -0
  230. package/dist/src/adb/command/host-transport/startactivity.d.ts +13 -0
  231. package/dist/src/adb/command/host-transport/startactivity.d.ts.map +1 -0
  232. package/dist/src/adb/command/host-transport/startactivity.js +166 -0
  233. package/dist/src/adb/command/host-transport/startactivity.js.map +1 -0
  234. package/dist/src/adb/command/host-transport/startservice.d.ts +7 -0
  235. package/dist/src/adb/command/host-transport/startservice.d.ts.map +1 -0
  236. package/dist/src/adb/command/host-transport/startservice.js +17 -0
  237. package/dist/src/adb/command/host-transport/startservice.js.map +1 -0
  238. package/dist/src/adb/command/host-transport/sync.d.ts +7 -0
  239. package/dist/src/adb/command/host-transport/sync.d.ts.map +1 -0
  240. package/dist/src/adb/command/host-transport/sync.js +25 -0
  241. package/dist/src/adb/command/host-transport/sync.js.map +1 -0
  242. package/dist/src/adb/command/host-transport/tcp.d.ts +8 -0
  243. package/dist/src/adb/command/host-transport/tcp.d.ts.map +1 -0
  244. package/dist/src/adb/command/host-transport/tcp.js +24 -0
  245. package/dist/src/adb/command/host-transport/tcp.js.map +1 -0
  246. package/dist/src/adb/command/host-transport/tcpip.d.ts +6 -0
  247. package/dist/src/adb/command/host-transport/tcpip.d.ts.map +1 -0
  248. package/dist/src/adb/command/host-transport/tcpip.js +32 -0
  249. package/dist/src/adb/command/host-transport/tcpip.js.map +1 -0
  250. package/dist/src/adb/command/host-transport/trackjdwp.d.ts +7 -0
  251. package/dist/src/adb/command/host-transport/trackjdwp.d.ts.map +1 -0
  252. package/dist/src/adb/command/host-transport/trackjdwp.js +25 -0
  253. package/dist/src/adb/command/host-transport/trackjdwp.js.map +1 -0
  254. package/dist/src/adb/command/host-transport/uninstall.d.ts +6 -0
  255. package/dist/src/adb/command/host-transport/uninstall.d.ts.map +1 -0
  256. package/dist/src/adb/command/host-transport/uninstall.js +40 -0
  257. package/dist/src/adb/command/host-transport/uninstall.js.map +1 -0
  258. package/dist/src/adb/command/host-transport/usb.d.ts +6 -0
  259. package/dist/src/adb/command/host-transport/usb.d.ts.map +1 -0
  260. package/dist/src/adb/command/host-transport/usb.js +32 -0
  261. package/dist/src/adb/command/host-transport/usb.js.map +1 -0
  262. package/dist/src/adb/command/host-transport/waitbootcomplete.d.ts +6 -0
  263. package/dist/src/adb/command/host-transport/waitbootcomplete.d.ts.map +1 -0
  264. package/dist/src/adb/command/host-transport/waitbootcomplete.js +27 -0
  265. package/dist/src/adb/command/host-transport/waitbootcomplete.js.map +1 -0
  266. package/dist/src/adb/command.d.ts +17 -0
  267. package/dist/src/adb/command.d.ts.map +1 -0
  268. package/dist/src/adb/command.js +43 -0
  269. package/dist/src/adb/command.js.map +1 -0
  270. package/dist/src/adb/connection.d.ts +24 -0
  271. package/dist/src/adb/connection.d.ts.map +1 -0
  272. package/dist/src/adb/connection.js +115 -0
  273. package/dist/src/adb/connection.js.map +1 -0
  274. package/dist/src/adb/dump.d.ts +4 -0
  275. package/dist/src/adb/dump.d.ts.map +1 -0
  276. package/dist/src/adb/dump.js +38 -0
  277. package/dist/src/adb/dump.js.map +1 -0
  278. package/dist/src/adb/framebuffer/rgbtransform.d.ts +16 -0
  279. package/dist/src/adb/framebuffer/rgbtransform.d.ts.map +1 -0
  280. package/dist/src/adb/framebuffer/rgbtransform.js +47 -0
  281. package/dist/src/adb/framebuffer/rgbtransform.js.map +1 -0
  282. package/dist/src/adb/jdwptracker.d.ts +41 -0
  283. package/dist/src/adb/jdwptracker.d.ts.map +1 -0
  284. package/dist/src/adb/jdwptracker.js +85 -0
  285. package/dist/src/adb/jdwptracker.js.map +1 -0
  286. package/dist/src/adb/keycode.d.ts +292 -0
  287. package/dist/src/adb/keycode.d.ts.map +1 -0
  288. package/dist/src/adb/keycode.js +298 -0
  289. package/dist/src/adb/keycode.js.map +1 -0
  290. package/dist/src/adb/linetransform.d.ts +17 -0
  291. package/dist/src/adb/linetransform.d.ts.map +1 -0
  292. package/dist/src/adb/linetransform.js +93 -0
  293. package/dist/src/adb/linetransform.js.map +1 -0
  294. package/dist/src/adb/parser.d.ts +37 -0
  295. package/dist/src/adb/parser.d.ts.map +1 -0
  296. package/dist/src/adb/parser.js +269 -0
  297. package/dist/src/adb/parser.js.map +1 -0
  298. package/dist/src/adb/proc/stat.d.ts +30 -0
  299. package/dist/src/adb/proc/stat.d.ts.map +1 -0
  300. package/dist/src/adb/proc/stat.js +131 -0
  301. package/dist/src/adb/proc/stat.js.map +1 -0
  302. package/dist/src/adb/protocol.d.ts +17 -0
  303. package/dist/src/adb/protocol.d.ts.map +1 -0
  304. package/dist/src/adb/protocol.js +29 -0
  305. package/dist/src/adb/protocol.js.map +1 -0
  306. package/dist/src/adb/sync/entry.d.ts +8 -0
  307. package/dist/src/adb/sync/entry.d.ts.map +1 -0
  308. package/dist/src/adb/sync/entry.js +16 -0
  309. package/dist/src/adb/sync/entry.js.map +1 -0
  310. package/dist/src/adb/sync/pulltransfer.d.ts +10 -0
  311. package/dist/src/adb/sync/pulltransfer.d.ts.map +1 -0
  312. package/dist/src/adb/sync/pulltransfer.js +24 -0
  313. package/dist/src/adb/sync/pulltransfer.js.map +1 -0
  314. package/dist/src/adb/sync/pushtransfer.d.ts +13 -0
  315. package/dist/src/adb/sync/pushtransfer.d.ts.map +1 -0
  316. package/dist/src/adb/sync/pushtransfer.js +30 -0
  317. package/dist/src/adb/sync/pushtransfer.js.map +1 -0
  318. package/dist/src/adb/sync/stats.d.ts +23 -0
  319. package/dist/src/adb/sync/stats.d.ts.map +1 -0
  320. package/dist/src/adb/sync/stats.js +54 -0
  321. package/dist/src/adb/sync/stats.js.map +1 -0
  322. package/dist/src/adb/sync.d.ts +31 -0
  323. package/dist/src/adb/sync.d.ts.map +1 -0
  324. package/dist/src/adb/sync.js +322 -0
  325. package/dist/src/adb/sync.js.map +1 -0
  326. package/dist/src/adb/tcpusb/packet.d.ts +27 -0
  327. package/dist/src/adb/tcpusb/packet.d.ts.map +1 -0
  328. package/dist/src/adb/tcpusb/packet.js +94 -0
  329. package/dist/src/adb/tcpusb/packet.js.map +1 -0
  330. package/dist/src/adb/tcpusb/packetreader.d.ts +26 -0
  331. package/dist/src/adb/tcpusb/packetreader.d.ts.map +1 -0
  332. package/dist/src/adb/tcpusb/packetreader.js +100 -0
  333. package/dist/src/adb/tcpusb/packetreader.js.map +1 -0
  334. package/dist/src/adb/tcpusb/rollingcounter.d.ts +8 -0
  335. package/dist/src/adb/tcpusb/rollingcounter.d.ts.map +1 -0
  336. package/dist/src/adb/tcpusb/rollingcounter.js +17 -0
  337. package/dist/src/adb/tcpusb/rollingcounter.js.map +1 -0
  338. package/dist/src/adb/tcpusb/server.d.ts +19 -0
  339. package/dist/src/adb/tcpusb/server.d.ts.map +1 -0
  340. package/dist/src/adb/tcpusb/server.js +78 -0
  341. package/dist/src/adb/tcpusb/server.js.map +1 -0
  342. package/dist/src/adb/tcpusb/service.d.ts +37 -0
  343. package/dist/src/adb/tcpusb/service.d.ts.map +1 -0
  344. package/dist/src/adb/tcpusb/service.js +173 -0
  345. package/dist/src/adb/tcpusb/service.js.map +1 -0
  346. package/dist/src/adb/tcpusb/servicemap.d.ts +10 -0
  347. package/dist/src/adb/tcpusb/servicemap.d.ts.map +1 -0
  348. package/dist/src/adb/tcpusb/servicemap.js +42 -0
  349. package/dist/src/adb/tcpusb/servicemap.js.map +1 -0
  350. package/dist/src/adb/tcpusb/socket.d.ts +45 -0
  351. package/dist/src/adb/tcpusb/socket.d.ts.map +1 -0
  352. package/dist/src/adb/tcpusb/socket.js +284 -0
  353. package/dist/src/adb/tcpusb/socket.js.map +1 -0
  354. package/dist/src/adb/tracker.d.ts +17 -0
  355. package/dist/src/adb/tracker.d.ts.map +1 -0
  356. package/dist/src/adb/tracker.js +72 -0
  357. package/dist/src/adb/tracker.js.map +1 -0
  358. package/dist/src/adb/util.d.ts +10 -0
  359. package/dist/src/adb/util.d.ts.map +1 -0
  360. package/dist/src/adb/util.js +17 -0
  361. package/dist/src/adb/util.js.map +1 -0
  362. package/dist/src/adb.d.ts +13 -0
  363. package/dist/src/adb.d.ts.map +1 -0
  364. package/dist/src/adb.js +28 -0
  365. package/dist/src/adb.js.map +1 -0
  366. package/dist/src/cli.d.ts +2 -0
  367. package/dist/src/cli.d.ts.map +1 -0
  368. package/dist/src/cli.js +86 -0
  369. package/dist/src/cli.js.map +1 -0
  370. package/dist/src/index.d.ts +19 -0
  371. package/dist/src/index.d.ts.map +1 -0
  372. package/dist/src/index.js +12 -0
  373. package/dist/src/index.js.map +1 -0
  374. package/package.json +53 -33
  375. package/.semaphore/publish.yml +0 -19
  376. package/.semaphore/semaphore.yml +0 -27
  377. package/index.js +0 -4
  378. package/lib/adb/auth.js +0 -78
  379. package/lib/adb/client.js +0 -576
  380. package/lib/adb/command/host/connect.js +0 -46
  381. package/lib/adb/command/host/devices.js +0 -64
  382. package/lib/adb/command/host/deviceswithpaths.js +0 -70
  383. package/lib/adb/command/host/disconnect.js +0 -46
  384. package/lib/adb/command/host/kill.js +0 -36
  385. package/lib/adb/command/host/trackdevices.js +0 -40
  386. package/lib/adb/command/host/transport.js +0 -36
  387. package/lib/adb/command/host/version.js +0 -42
  388. package/lib/adb/command/host-serial/forward.js +0 -45
  389. package/lib/adb/command/host-serial/getdevicepath.js +0 -38
  390. package/lib/adb/command/host-serial/getserialno.js +0 -38
  391. package/lib/adb/command/host-serial/getstate.js +0 -38
  392. package/lib/adb/command/host-serial/listforwards.js +0 -56
  393. package/lib/adb/command/host-serial/waitfordevice.js +0 -45
  394. package/lib/adb/command/host-transport/clear.js +0 -45
  395. package/lib/adb/command/host-transport/framebuffer.js +0 -114
  396. package/lib/adb/command/host-transport/getfeatures.js +0 -51
  397. package/lib/adb/command/host-transport/getpackages.js +0 -51
  398. package/lib/adb/command/host-transport/getproperties.js +0 -51
  399. package/lib/adb/command/host-transport/install.js +0 -48
  400. package/lib/adb/command/host-transport/isinstalled.js +0 -47
  401. package/lib/adb/command/host-transport/listreverses.js +0 -55
  402. package/lib/adb/command/host-transport/local.js +0 -36
  403. package/lib/adb/command/host-transport/log.js +0 -36
  404. package/lib/adb/command/host-transport/logcat.js +0 -48
  405. package/lib/adb/command/host-transport/monkey.js +0 -42
  406. package/lib/adb/command/host-transport/reboot.js +0 -36
  407. package/lib/adb/command/host-transport/remount.js +0 -36
  408. package/lib/adb/command/host-transport/reverse.js +0 -45
  409. package/lib/adb/command/host-transport/root.js +0 -46
  410. package/lib/adb/command/host-transport/screencap.js +0 -52
  411. package/lib/adb/command/host-transport/shell.js +0 -39
  412. package/lib/adb/command/host-transport/startactivity.js +0 -184
  413. package/lib/adb/command/host-transport/startservice.js +0 -33
  414. package/lib/adb/command/host-transport/sync.js +0 -38
  415. package/lib/adb/command/host-transport/tcp.js +0 -36
  416. package/lib/adb/command/host-transport/tcpip.js +0 -46
  417. package/lib/adb/command/host-transport/trackjdwp.js +0 -120
  418. package/lib/adb/command/host-transport/uninstall.js +0 -44
  419. package/lib/adb/command/host-transport/usb.js +0 -46
  420. package/lib/adb/command/host-transport/waitbootcomplete.js +0 -42
  421. package/lib/adb/command.js +0 -56
  422. package/lib/adb/connection.js +0 -117
  423. package/lib/adb/dump.js +0 -15
  424. package/lib/adb/framebuffer/rgbtransform.js +0 -55
  425. package/lib/adb/keycode.js +0 -225
  426. package/lib/adb/linetransform.js +0 -87
  427. package/lib/adb/parser.js +0 -291
  428. package/lib/adb/proc/stat.js +0 -137
  429. package/lib/adb/protocol.js +0 -45
  430. package/lib/adb/sync/entry.js +0 -23
  431. package/lib/adb/sync/pulltransfer.js +0 -31
  432. package/lib/adb/sync/pushtransfer.js +0 -40
  433. package/lib/adb/sync/stats.js +0 -54
  434. package/lib/adb/sync.js +0 -343
  435. package/lib/adb/tcpusb/packet.js +0 -112
  436. package/lib/adb/tcpusb/packetreader.js +0 -121
  437. package/lib/adb/tcpusb/rollingcounter.js +0 -21
  438. package/lib/adb/tcpusb/server.js +0 -79
  439. package/lib/adb/tcpusb/service.js +0 -203
  440. package/lib/adb/tcpusb/servicemap.js +0 -48
  441. package/lib/adb/tcpusb/socket.js +0 -312
  442. package/lib/adb/tracker.js +0 -89
  443. package/lib/adb/util.js +0 -13
  444. package/lib/adb.js +0 -29
  445. package/lib/cli.js +0 -66
@@ -1,70 +0,0 @@
1
- var Command, HostDevicesWithPathsCommand, Protocol,
2
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
3
- hasProp = {}.hasOwnProperty;
4
-
5
- Command = require('../../command');
6
-
7
- Protocol = require('../../protocol');
8
-
9
- HostDevicesWithPathsCommand = (function(superClass) {
10
- extend(HostDevicesWithPathsCommand, superClass);
11
-
12
- function HostDevicesWithPathsCommand() {
13
- return HostDevicesWithPathsCommand.__super__.constructor.apply(this, arguments);
14
- }
15
-
16
- HostDevicesWithPathsCommand.prototype.execute = function() {
17
- this._send('host:devices-l');
18
- return this.parser.readAscii(4).then((function(_this) {
19
- return function(reply) {
20
- switch (reply) {
21
- case Protocol.OKAY:
22
- return _this._readDevices();
23
- case Protocol.FAIL:
24
- return _this.parser.readError();
25
- default:
26
- return _this.parser.unexpected(reply, 'OKAY or FAIL');
27
- }
28
- };
29
- })(this));
30
- };
31
-
32
- HostDevicesWithPathsCommand.prototype._readDevices = function() {
33
- return this.parser.readValue().then((function(_this) {
34
- return function(value) {
35
- return _this._parseDevices(value);
36
- };
37
- })(this));
38
- };
39
-
40
- HostDevicesWithPathsCommand.prototype._parseDevices = function(value) {
41
- var device, devices, i, id, len, line, model, path, product, ref, ref1, transportId, type;
42
- devices = [];
43
- if (!value.length) {
44
- return devices;
45
- }
46
- ref = value.toString('ascii').split('\n');
47
- for (i = 0, len = ref.length; i < len; i++) {
48
- line = ref[i];
49
- if (line) {
50
- ref1 = line.split(/\s+/), id = ref1[0], type = ref1[1], path = ref1[2], product = ref1[3], model = ref1[4], device = ref1[5], transportId = ref1[6];
51
- devices.push({
52
- id: id,
53
- type: type,
54
- path: path,
55
- product: product
56
- }, {
57
- model: model,
58
- device: device,
59
- transportId: transportId
60
- });
61
- }
62
- }
63
- return devices;
64
- };
65
-
66
- return HostDevicesWithPathsCommand;
67
-
68
- })(Command);
69
-
70
- module.exports = HostDevicesWithPathsCommand;
@@ -1,46 +0,0 @@
1
- var Command, DisconnectCommand, Protocol,
2
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
3
- hasProp = {}.hasOwnProperty;
4
-
5
- Command = require('../../command');
6
-
7
- Protocol = require('../../protocol');
8
-
9
- DisconnectCommand = (function(superClass) {
10
- var RE_OK;
11
-
12
- extend(DisconnectCommand, superClass);
13
-
14
- function DisconnectCommand() {
15
- return DisconnectCommand.__super__.constructor.apply(this, arguments);
16
- }
17
-
18
- RE_OK = /^$/;
19
-
20
- DisconnectCommand.prototype.execute = function(host, port) {
21
- this._send("host:disconnect:" + host + ":" + port);
22
- return this.parser.readAscii(4).then((function(_this) {
23
- return function(reply) {
24
- switch (reply) {
25
- case Protocol.OKAY:
26
- return _this.parser.readValue().then(function(value) {
27
- if (RE_OK.test(value)) {
28
- return host + ":" + port;
29
- } else {
30
- throw new Error(value.toString());
31
- }
32
- });
33
- case Protocol.FAIL:
34
- return _this.parser.readError();
35
- default:
36
- return _this.parser.unexpected(reply, 'OKAY or FAIL');
37
- }
38
- };
39
- })(this));
40
- };
41
-
42
- return DisconnectCommand;
43
-
44
- })(Command);
45
-
46
- module.exports = DisconnectCommand;
@@ -1,36 +0,0 @@
1
- var Command, HostKillCommand, Protocol,
2
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
3
- hasProp = {}.hasOwnProperty;
4
-
5
- Command = require('../../command');
6
-
7
- Protocol = require('../../protocol');
8
-
9
- HostKillCommand = (function(superClass) {
10
- extend(HostKillCommand, superClass);
11
-
12
- function HostKillCommand() {
13
- return HostKillCommand.__super__.constructor.apply(this, arguments);
14
- }
15
-
16
- HostKillCommand.prototype.execute = function() {
17
- this._send('host:kill');
18
- return this.parser.readAscii(4).then((function(_this) {
19
- return function(reply) {
20
- switch (reply) {
21
- case Protocol.OKAY:
22
- return true;
23
- case Protocol.FAIL:
24
- return _this.parser.readError();
25
- default:
26
- return _this.parser.unexpected(reply, 'OKAY or FAIL');
27
- }
28
- };
29
- })(this));
30
- };
31
-
32
- return HostKillCommand;
33
-
34
- })(Command);
35
-
36
- module.exports = HostKillCommand;
@@ -1,40 +0,0 @@
1
- var Command, HostDevicesCommand, HostTrackDevicesCommand, Protocol, Tracker,
2
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
3
- hasProp = {}.hasOwnProperty;
4
-
5
- Command = require('../../command');
6
-
7
- Protocol = require('../../protocol');
8
-
9
- Tracker = require('../../tracker');
10
-
11
- HostDevicesCommand = require('./devices');
12
-
13
- HostTrackDevicesCommand = (function(superClass) {
14
- extend(HostTrackDevicesCommand, superClass);
15
-
16
- function HostTrackDevicesCommand() {
17
- return HostTrackDevicesCommand.__super__.constructor.apply(this, arguments);
18
- }
19
-
20
- HostTrackDevicesCommand.prototype.execute = function() {
21
- this._send('host:track-devices');
22
- return this.parser.readAscii(4).then((function(_this) {
23
- return function(reply) {
24
- switch (reply) {
25
- case Protocol.OKAY:
26
- return new Tracker(_this);
27
- case Protocol.FAIL:
28
- return _this.parser.readError();
29
- default:
30
- return _this.parser.unexpected(reply, 'OKAY or FAIL');
31
- }
32
- };
33
- })(this));
34
- };
35
-
36
- return HostTrackDevicesCommand;
37
-
38
- })(HostDevicesCommand);
39
-
40
- module.exports = HostTrackDevicesCommand;
@@ -1,36 +0,0 @@
1
- var Command, HostTransportCommand, Protocol,
2
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
3
- hasProp = {}.hasOwnProperty;
4
-
5
- Command = require('../../command');
6
-
7
- Protocol = require('../../protocol');
8
-
9
- HostTransportCommand = (function(superClass) {
10
- extend(HostTransportCommand, superClass);
11
-
12
- function HostTransportCommand() {
13
- return HostTransportCommand.__super__.constructor.apply(this, arguments);
14
- }
15
-
16
- HostTransportCommand.prototype.execute = function(serial) {
17
- this._send("host:transport:" + serial);
18
- return this.parser.readAscii(4).then((function(_this) {
19
- return function(reply) {
20
- switch (reply) {
21
- case Protocol.OKAY:
22
- return true;
23
- case Protocol.FAIL:
24
- return _this.parser.readError();
25
- default:
26
- return _this.parser.unexpected(reply, 'OKAY or FAIL');
27
- }
28
- };
29
- })(this));
30
- };
31
-
32
- return HostTransportCommand;
33
-
34
- })(Command);
35
-
36
- module.exports = HostTransportCommand;
@@ -1,42 +0,0 @@
1
- var Command, HostVersionCommand, Protocol,
2
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
3
- hasProp = {}.hasOwnProperty;
4
-
5
- Command = require('../../command');
6
-
7
- Protocol = require('../../protocol');
8
-
9
- HostVersionCommand = (function(superClass) {
10
- extend(HostVersionCommand, superClass);
11
-
12
- function HostVersionCommand() {
13
- return HostVersionCommand.__super__.constructor.apply(this, arguments);
14
- }
15
-
16
- HostVersionCommand.prototype.execute = function() {
17
- this._send('host:version');
18
- return this.parser.readAscii(4).then((function(_this) {
19
- return function(reply) {
20
- switch (reply) {
21
- case Protocol.OKAY:
22
- return _this.parser.readValue().then(function(value) {
23
- return _this._parseVersion(value);
24
- });
25
- case Protocol.FAIL:
26
- return _this.parser.readError();
27
- default:
28
- return _this._parseVersion(reply);
29
- }
30
- };
31
- })(this));
32
- };
33
-
34
- HostVersionCommand.prototype._parseVersion = function(version) {
35
- return parseInt(version, 16);
36
- };
37
-
38
- return HostVersionCommand;
39
-
40
- })(Command);
41
-
42
- module.exports = HostVersionCommand;
@@ -1,45 +0,0 @@
1
- var Command, ForwardCommand, Protocol,
2
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
3
- hasProp = {}.hasOwnProperty;
4
-
5
- Command = require('../../command');
6
-
7
- Protocol = require('../../protocol');
8
-
9
- ForwardCommand = (function(superClass) {
10
- extend(ForwardCommand, superClass);
11
-
12
- function ForwardCommand() {
13
- return ForwardCommand.__super__.constructor.apply(this, arguments);
14
- }
15
-
16
- ForwardCommand.prototype.execute = function(serial, local, remote) {
17
- this._send("host-serial:" + serial + ":forward:" + local + ";" + remote);
18
- return this.parser.readAscii(4).then((function(_this) {
19
- return function(reply) {
20
- switch (reply) {
21
- case Protocol.OKAY:
22
- return _this.parser.readAscii(4).then(function(reply) {
23
- switch (reply) {
24
- case Protocol.OKAY:
25
- return true;
26
- case Protocol.FAIL:
27
- return _this.parser.readError();
28
- default:
29
- return _this.parser.unexpected(reply, 'OKAY or FAIL');
30
- }
31
- });
32
- case Protocol.FAIL:
33
- return _this.parser.readError();
34
- default:
35
- return _this.parser.unexpected(reply, 'OKAY or FAIL');
36
- }
37
- };
38
- })(this));
39
- };
40
-
41
- return ForwardCommand;
42
-
43
- })(Command);
44
-
45
- module.exports = ForwardCommand;
@@ -1,38 +0,0 @@
1
- var Command, GetDevicePathCommand, Protocol,
2
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
3
- hasProp = {}.hasOwnProperty;
4
-
5
- Command = require('../../command');
6
-
7
- Protocol = require('../../protocol');
8
-
9
- GetDevicePathCommand = (function(superClass) {
10
- extend(GetDevicePathCommand, superClass);
11
-
12
- function GetDevicePathCommand() {
13
- return GetDevicePathCommand.__super__.constructor.apply(this, arguments);
14
- }
15
-
16
- GetDevicePathCommand.prototype.execute = function(serial) {
17
- this._send("host-serial:" + serial + ":get-devpath");
18
- return this.parser.readAscii(4).then((function(_this) {
19
- return function(reply) {
20
- switch (reply) {
21
- case Protocol.OKAY:
22
- return _this.parser.readValue().then(function(value) {
23
- return value.toString();
24
- });
25
- case Protocol.FAIL:
26
- return _this.parser.readError();
27
- default:
28
- return _this.parser.unexpected(reply, 'OKAY or FAIL');
29
- }
30
- };
31
- })(this));
32
- };
33
-
34
- return GetDevicePathCommand;
35
-
36
- })(Command);
37
-
38
- module.exports = GetDevicePathCommand;
@@ -1,38 +0,0 @@
1
- var Command, GetSerialNoCommand, Protocol,
2
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
3
- hasProp = {}.hasOwnProperty;
4
-
5
- Command = require('../../command');
6
-
7
- Protocol = require('../../protocol');
8
-
9
- GetSerialNoCommand = (function(superClass) {
10
- extend(GetSerialNoCommand, superClass);
11
-
12
- function GetSerialNoCommand() {
13
- return GetSerialNoCommand.__super__.constructor.apply(this, arguments);
14
- }
15
-
16
- GetSerialNoCommand.prototype.execute = function(serial) {
17
- this._send("host-serial:" + serial + ":get-serialno");
18
- return this.parser.readAscii(4).then((function(_this) {
19
- return function(reply) {
20
- switch (reply) {
21
- case Protocol.OKAY:
22
- return _this.parser.readValue().then(function(value) {
23
- return value.toString();
24
- });
25
- case Protocol.FAIL:
26
- return _this.parser.readError();
27
- default:
28
- return _this.parser.unexpected(reply, 'OKAY or FAIL');
29
- }
30
- };
31
- })(this));
32
- };
33
-
34
- return GetSerialNoCommand;
35
-
36
- })(Command);
37
-
38
- module.exports = GetSerialNoCommand;
@@ -1,38 +0,0 @@
1
- var Command, GetStateCommand, Protocol,
2
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
3
- hasProp = {}.hasOwnProperty;
4
-
5
- Command = require('../../command');
6
-
7
- Protocol = require('../../protocol');
8
-
9
- GetStateCommand = (function(superClass) {
10
- extend(GetStateCommand, superClass);
11
-
12
- function GetStateCommand() {
13
- return GetStateCommand.__super__.constructor.apply(this, arguments);
14
- }
15
-
16
- GetStateCommand.prototype.execute = function(serial) {
17
- this._send("host-serial:" + serial + ":get-state");
18
- return this.parser.readAscii(4).then((function(_this) {
19
- return function(reply) {
20
- switch (reply) {
21
- case Protocol.OKAY:
22
- return _this.parser.readValue().then(function(value) {
23
- return value.toString();
24
- });
25
- case Protocol.FAIL:
26
- return _this.parser.readError();
27
- default:
28
- return _this.parser.unexpected(reply, 'OKAY or FAIL');
29
- }
30
- };
31
- })(this));
32
- };
33
-
34
- return GetStateCommand;
35
-
36
- })(Command);
37
-
38
- module.exports = GetStateCommand;
@@ -1,56 +0,0 @@
1
- var Command, ListForwardsCommand, Protocol,
2
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
3
- hasProp = {}.hasOwnProperty;
4
-
5
- Command = require('../../command');
6
-
7
- Protocol = require('../../protocol');
8
-
9
- ListForwardsCommand = (function(superClass) {
10
- extend(ListForwardsCommand, superClass);
11
-
12
- function ListForwardsCommand() {
13
- return ListForwardsCommand.__super__.constructor.apply(this, arguments);
14
- }
15
-
16
- ListForwardsCommand.prototype.execute = function(serial) {
17
- this._send("host-serial:" + serial + ":list-forward");
18
- return this.parser.readAscii(4).then((function(_this) {
19
- return function(reply) {
20
- switch (reply) {
21
- case Protocol.OKAY:
22
- return _this.parser.readValue().then(function(value) {
23
- return _this._parseForwards(value);
24
- });
25
- case Protocol.FAIL:
26
- return _this.parser.readError();
27
- default:
28
- return _this.parser.unexpected(reply, 'OKAY or FAIL');
29
- }
30
- };
31
- })(this));
32
- };
33
-
34
- ListForwardsCommand.prototype._parseForwards = function(value) {
35
- var forward, forwards, i, len, local, ref, ref1, remote, serial;
36
- forwards = [];
37
- ref = value.toString().split('\n');
38
- for (i = 0, len = ref.length; i < len; i++) {
39
- forward = ref[i];
40
- if (forward) {
41
- ref1 = forward.split(/\s+/), serial = ref1[0], local = ref1[1], remote = ref1[2];
42
- forwards.push({
43
- serial: serial,
44
- local: local,
45
- remote: remote
46
- });
47
- }
48
- }
49
- return forwards;
50
- };
51
-
52
- return ListForwardsCommand;
53
-
54
- })(Command);
55
-
56
- module.exports = ListForwardsCommand;
@@ -1,45 +0,0 @@
1
- var Command, Protocol, WaitForDeviceCommand,
2
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
3
- hasProp = {}.hasOwnProperty;
4
-
5
- Command = require('../../command');
6
-
7
- Protocol = require('../../protocol');
8
-
9
- WaitForDeviceCommand = (function(superClass) {
10
- extend(WaitForDeviceCommand, superClass);
11
-
12
- function WaitForDeviceCommand() {
13
- return WaitForDeviceCommand.__super__.constructor.apply(this, arguments);
14
- }
15
-
16
- WaitForDeviceCommand.prototype.execute = function(serial) {
17
- this._send("host-serial:" + serial + ":wait-for-any");
18
- return this.parser.readAscii(4).then((function(_this) {
19
- return function(reply) {
20
- switch (reply) {
21
- case Protocol.OKAY:
22
- return _this.parser.readAscii(4).then(function(reply) {
23
- switch (reply) {
24
- case Protocol.OKAY:
25
- return serial;
26
- case Protocol.FAIL:
27
- return _this.parser.readError();
28
- default:
29
- return _this.parser.unexpected(reply, 'OKAY or FAIL');
30
- }
31
- });
32
- case Protocol.FAIL:
33
- return _this.parser.readError();
34
- default:
35
- return _this.parser.unexpected(reply, 'OKAY or FAIL');
36
- }
37
- };
38
- })(this));
39
- };
40
-
41
- return WaitForDeviceCommand;
42
-
43
- })(Command);
44
-
45
- module.exports = WaitForDeviceCommand;
@@ -1,45 +0,0 @@
1
- var ClearCommand, Command, Protocol,
2
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
3
- hasProp = {}.hasOwnProperty;
4
-
5
- Command = require('../../command');
6
-
7
- Protocol = require('../../protocol');
8
-
9
- ClearCommand = (function(superClass) {
10
- extend(ClearCommand, superClass);
11
-
12
- function ClearCommand() {
13
- return ClearCommand.__super__.constructor.apply(this, arguments);
14
- }
15
-
16
- ClearCommand.prototype.execute = function(pkg) {
17
- this._send("shell:pm clear " + pkg);
18
- return this.parser.readAscii(4).then((function(_this) {
19
- return function(reply) {
20
- switch (reply) {
21
- case Protocol.OKAY:
22
- return _this.parser.searchLine(/^(Success|Failed)$/)["finally"](function() {
23
- return _this.parser.end();
24
- }).then(function(result) {
25
- switch (result[0]) {
26
- case 'Success':
27
- return true;
28
- case 'Failed':
29
- throw new Error("Package '" + pkg + "' could not be cleared");
30
- }
31
- });
32
- case Protocol.FAIL:
33
- return _this.parser.readError();
34
- default:
35
- return _this.parser.unexpected(reply, 'OKAY or FAIL');
36
- }
37
- };
38
- })(this));
39
- };
40
-
41
- return ClearCommand;
42
-
43
- })(Command);
44
-
45
- module.exports = ClearCommand;