@yume-chan/adb 0.0.10 → 0.0.11

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 (318) hide show
  1. package/CHANGELOG.json +26 -0
  2. package/CHANGELOG.md +15 -1
  3. package/LICENSE +1 -1
  4. package/README.md +56 -43
  5. package/esm/adb.d.ts +48 -0
  6. package/esm/adb.d.ts.map +1 -0
  7. package/esm/adb.js +141 -146
  8. package/esm/adb.js.map +1 -1
  9. package/{dts → esm}/auth.d.ts +8 -8
  10. package/esm/auth.d.ts.map +1 -0
  11. package/esm/auth.js +68 -108
  12. package/esm/auth.js.map +1 -1
  13. package/esm/backend.d.ts +9 -0
  14. package/esm/backend.d.ts.map +1 -0
  15. package/{dts → esm}/commands/base.d.ts +1 -1
  16. package/esm/commands/base.d.ts.map +1 -0
  17. package/esm/commands/base.js +1 -0
  18. package/esm/commands/base.js.map +1 -1
  19. package/{dts → esm}/commands/framebuffer.d.ts +3 -3
  20. package/esm/commands/framebuffer.d.ts.map +1 -0
  21. package/esm/commands/framebuffer.js +15 -18
  22. package/esm/commands/framebuffer.js.map +1 -1
  23. package/esm/commands/index.d.ts +9 -0
  24. package/esm/commands/index.d.ts.map +1 -0
  25. package/esm/commands/index.js +8 -8
  26. package/esm/commands/index.js.map +1 -1
  27. package/esm/commands/install.d.ts +4 -0
  28. package/esm/commands/install.d.ts.map +1 -0
  29. package/esm/commands/install.js +21 -13
  30. package/esm/commands/install.js.map +1 -1
  31. package/esm/commands/power.d.ts +23 -0
  32. package/esm/commands/power.d.ts.map +1 -0
  33. package/esm/commands/power.js +45 -0
  34. package/esm/commands/power.js.map +1 -0
  35. package/{dts → esm}/commands/reverse.d.ts +3 -3
  36. package/esm/commands/reverse.d.ts.map +1 -0
  37. package/esm/commands/reverse.js +49 -60
  38. package/esm/commands/reverse.js.map +1 -1
  39. package/esm/commands/subprocess/index.d.ts +57 -0
  40. package/esm/commands/subprocess/index.d.ts.map +1 -0
  41. package/esm/commands/subprocess/index.js +83 -0
  42. package/esm/commands/subprocess/index.js.map +1 -0
  43. package/esm/commands/subprocess/legacy.d.ts +28 -0
  44. package/esm/commands/subprocess/legacy.d.ts.map +1 -0
  45. package/esm/commands/subprocess/legacy.js +44 -0
  46. package/esm/commands/subprocess/legacy.js.map +1 -0
  47. package/esm/commands/subprocess/protocol.d.ts +38 -0
  48. package/esm/commands/subprocess/protocol.d.ts.map +1 -0
  49. package/esm/commands/subprocess/protocol.js +155 -0
  50. package/esm/commands/subprocess/protocol.js.map +1 -0
  51. package/esm/commands/subprocess/types.d.ts +47 -0
  52. package/esm/commands/subprocess/types.d.ts.map +1 -0
  53. package/esm/commands/{shell → subprocess}/types.js +0 -0
  54. package/esm/commands/{shell → subprocess}/types.js.map +1 -1
  55. package/{dts/commands/shell → esm/commands/subprocess}/utils.d.ts +0 -0
  56. package/esm/commands/subprocess/utils.d.ts.map +1 -0
  57. package/esm/commands/{shell → subprocess}/utils.js +0 -0
  58. package/esm/commands/subprocess/utils.js.map +1 -0
  59. package/esm/commands/sync/index.d.ts +8 -0
  60. package/esm/commands/sync/index.d.ts.map +1 -0
  61. package/esm/commands/sync/index.js +7 -7
  62. package/esm/commands/sync/index.js.map +1 -1
  63. package/{dts → esm}/commands/sync/list.d.ts +4 -4
  64. package/esm/commands/sync/list.d.ts.map +1 -0
  65. package/esm/commands/sync/list.js +16 -19
  66. package/esm/commands/sync/list.js.map +1 -1
  67. package/esm/commands/sync/pull.d.ts +11 -0
  68. package/esm/commands/sync/pull.d.ts.map +1 -0
  69. package/esm/commands/sync/pull.js +17 -11
  70. package/esm/commands/sync/pull.js.map +1 -1
  71. package/esm/commands/sync/push.d.ts +8 -0
  72. package/esm/commands/sync/push.d.ts.map +1 -0
  73. package/esm/commands/sync/push.js +19 -37
  74. package/esm/commands/sync/push.js.map +1 -1
  75. package/{dts → esm}/commands/sync/request.d.ts +3 -3
  76. package/esm/commands/sync/request.d.ts.map +1 -0
  77. package/esm/commands/sync/request.js +24 -27
  78. package/esm/commands/sync/request.js.map +1 -1
  79. package/{dts → esm}/commands/sync/response.d.ts +2 -2
  80. package/esm/commands/sync/response.d.ts.map +1 -0
  81. package/esm/commands/sync/response.js +16 -20
  82. package/esm/commands/sync/response.js.map +1 -1
  83. package/{dts → esm}/commands/sync/stat.d.ts +4 -4
  84. package/esm/commands/sync/stat.d.ts.map +1 -0
  85. package/esm/commands/sync/stat.js +22 -27
  86. package/esm/commands/sync/stat.js.map +1 -1
  87. package/esm/commands/sync/sync.d.ts +83 -0
  88. package/esm/commands/sync/sync.d.ts.map +1 -0
  89. package/esm/commands/sync/sync.js +92 -89
  90. package/esm/commands/sync/sync.js.map +1 -1
  91. package/{dts → esm}/commands/tcpip.d.ts +1 -1
  92. package/{dts → esm}/commands/tcpip.d.ts.map +1 -1
  93. package/esm/commands/tcpip.js +14 -19
  94. package/esm/commands/tcpip.js.map +1 -1
  95. package/{dts → esm}/crypto.d.ts +7 -7
  96. package/esm/crypto.d.ts.map +1 -0
  97. package/esm/crypto.js +26 -29
  98. package/esm/crypto.js.map +1 -1
  99. package/{dts → esm}/features.d.ts +0 -0
  100. package/{dts → esm}/features.d.ts.map +0 -0
  101. package/esm/features.js +1 -1
  102. package/esm/features.js.map +1 -1
  103. package/esm/index.d.ts +11 -0
  104. package/esm/index.d.ts.map +1 -0
  105. package/esm/index.js +10 -10
  106. package/esm/index.js.map +1 -1
  107. package/esm/packet.d.ts +28 -0
  108. package/esm/packet.d.ts.map +1 -0
  109. package/esm/packet.js +26 -51
  110. package/esm/packet.js.map +1 -1
  111. package/esm/socket/controller.d.ts +37 -0
  112. package/esm/socket/controller.d.ts.map +1 -0
  113. package/esm/socket/controller.js +52 -66
  114. package/esm/socket/controller.js.map +1 -1
  115. package/{dts → esm}/socket/dispatcher.d.ts +10 -23
  116. package/esm/socket/dispatcher.d.ts.map +1 -0
  117. package/esm/socket/dispatcher.js +148 -164
  118. package/esm/socket/dispatcher.js.map +1 -1
  119. package/esm/socket/index.d.ts +3 -0
  120. package/esm/socket/index.d.ts.map +1 -0
  121. package/esm/socket/index.js +2 -6
  122. package/esm/socket/index.js.map +1 -1
  123. package/esm/socket/socket.d.ts +34 -0
  124. package/esm/socket/socket.d.ts.map +1 -0
  125. package/esm/socket/socket.js +69 -14
  126. package/esm/socket/socket.js.map +1 -1
  127. package/esm/stream/buffered.d.ts +35 -0
  128. package/esm/stream/buffered.d.ts.map +1 -0
  129. package/esm/stream/buffered.js +123 -0
  130. package/esm/stream/buffered.js.map +1 -0
  131. package/esm/stream/detect.bak.d.ts +240 -0
  132. package/esm/stream/detect.bak.d.ts.map +1 -0
  133. package/esm/stream/detect.bak.js +60 -0
  134. package/esm/stream/detect.bak.js.map +1 -0
  135. package/esm/stream/detect.d.ts +18 -0
  136. package/esm/stream/detect.d.ts.map +1 -0
  137. package/esm/stream/detect.js +6 -0
  138. package/esm/stream/detect.js.map +1 -0
  139. package/esm/stream/detect.native.d.ts +240 -0
  140. package/esm/stream/detect.native.d.ts.map +1 -0
  141. package/esm/stream/detect.native.js +60 -0
  142. package/esm/stream/detect.native.js.map +1 -0
  143. package/esm/stream/detect.polyfill.d.ts +18 -0
  144. package/esm/stream/detect.polyfill.d.ts.map +1 -0
  145. package/esm/stream/detect.polyfill.js +6 -0
  146. package/esm/stream/detect.polyfill.js.map +1 -0
  147. package/esm/stream/index.d.ts +4 -0
  148. package/esm/stream/index.d.ts.map +1 -0
  149. package/esm/stream/index.js +3 -2
  150. package/esm/stream/index.js.map +1 -1
  151. package/esm/stream/transform.d.ts +98 -0
  152. package/esm/stream/transform.d.ts.map +1 -0
  153. package/esm/stream/transform.js +352 -0
  154. package/esm/stream/transform.js.map +1 -0
  155. package/{dts → esm}/utils/auto-reset-event.d.ts +1 -1
  156. package/esm/utils/auto-reset-event.d.ts.map +1 -0
  157. package/esm/utils/auto-reset-event.js +2 -1
  158. package/esm/utils/auto-reset-event.js.map +1 -1
  159. package/esm/utils/base64.d.ts +5 -0
  160. package/esm/utils/base64.d.ts.map +1 -0
  161. package/esm/utils/base64.js +116 -80
  162. package/esm/utils/base64.js.map +1 -1
  163. package/esm/utils/encoding.d.ts +3 -0
  164. package/{dts → esm}/utils/encoding.d.ts.map +1 -1
  165. package/esm/utils/encoding.js +1 -1
  166. package/esm/utils/encoding.js.map +1 -1
  167. package/esm/utils/index.d.ts +4 -0
  168. package/esm/utils/index.d.ts.map +1 -0
  169. package/esm/utils/index.js +3 -5
  170. package/esm/utils/index.js.map +1 -1
  171. package/package.json +50 -44
  172. package/src/adb.ts +147 -143
  173. package/src/auth.ts +23 -19
  174. package/src/backend.ts +3 -12
  175. package/src/commands/base.ts +1 -1
  176. package/src/commands/framebuffer.ts +4 -4
  177. package/src/commands/index.ts +8 -8
  178. package/src/commands/install.ts +26 -15
  179. package/src/commands/power.ts +54 -0
  180. package/src/commands/reverse.ts +10 -8
  181. package/src/commands/subprocess/index.ts +124 -0
  182. package/src/commands/subprocess/legacy.ts +58 -0
  183. package/src/commands/subprocess/protocol.ts +185 -0
  184. package/src/commands/subprocess/types.ts +55 -0
  185. package/src/commands/{shell → subprocess}/utils.ts +0 -0
  186. package/src/commands/sync/index.ts +7 -7
  187. package/src/commands/sync/list.ts +7 -6
  188. package/src/commands/sync/pull.ts +27 -18
  189. package/src/commands/sync/push.ts +25 -30
  190. package/src/commands/sync/request.ts +7 -7
  191. package/src/commands/sync/response.ts +4 -4
  192. package/src/commands/sync/stat.ts +8 -6
  193. package/src/commands/sync/sync.ts +64 -32
  194. package/src/commands/tcpip.ts +3 -3
  195. package/src/crypto.ts +38 -43
  196. package/src/index.ts +11 -10
  197. package/src/packet.ts +37 -52
  198. package/src/socket/dispatcher.ts +90 -103
  199. package/src/socket/index.ts +2 -6
  200. package/src/socket/socket.ts +117 -16
  201. package/src/stream/buffered.ts +147 -0
  202. package/src/stream/detect.native.ts +362 -0
  203. package/src/stream/detect.polyfill.ts +25 -0
  204. package/src/stream/detect.ts +25 -0
  205. package/src/stream/index.ts +3 -2
  206. package/src/stream/transform.ts +427 -0
  207. package/src/utils/auto-reset-event.ts +1 -1
  208. package/src/utils/base64.ts +161 -129
  209. package/src/utils/encoding.ts +3 -3
  210. package/src/utils/index.ts +3 -5
  211. package/tsconfig.build.json +3 -0
  212. package/tsconfig.build.tsbuildinfo +1 -0
  213. package/tsconfig.test.json +10 -0
  214. package/dts/adb.d.ts +0 -46
  215. package/dts/adb.d.ts.map +0 -1
  216. package/dts/auth.d.ts.map +0 -1
  217. package/dts/backend.d.ts +0 -13
  218. package/dts/backend.d.ts.map +0 -1
  219. package/dts/commands/base.d.ts.map +0 -1
  220. package/dts/commands/demo-mode.d.ts +0 -41
  221. package/dts/commands/demo-mode.d.ts.map +0 -1
  222. package/dts/commands/framebuffer.d.ts.map +0 -1
  223. package/dts/commands/index.d.ts +0 -9
  224. package/dts/commands/index.d.ts.map +0 -1
  225. package/dts/commands/install.d.ts +0 -3
  226. package/dts/commands/install.d.ts.map +0 -1
  227. package/dts/commands/reverse.d.ts.map +0 -1
  228. package/dts/commands/shell/index.d.ts +0 -46
  229. package/dts/commands/shell/index.d.ts.map +0 -1
  230. package/dts/commands/shell/legacy.d.ts +0 -38
  231. package/dts/commands/shell/legacy.d.ts.map +0 -1
  232. package/dts/commands/shell/protocol.d.ts +0 -45
  233. package/dts/commands/shell/protocol.d.ts.map +0 -1
  234. package/dts/commands/shell/types.d.ts +0 -47
  235. package/dts/commands/shell/types.d.ts.map +0 -1
  236. package/dts/commands/shell/utils.d.ts.map +0 -1
  237. package/dts/commands/sync/index.d.ts +0 -8
  238. package/dts/commands/sync/index.d.ts.map +0 -1
  239. package/dts/commands/sync/list.d.ts.map +0 -1
  240. package/dts/commands/sync/pull.d.ts +0 -11
  241. package/dts/commands/sync/pull.d.ts.map +0 -1
  242. package/dts/commands/sync/push.d.ts +0 -8
  243. package/dts/commands/sync/push.d.ts.map +0 -1
  244. package/dts/commands/sync/request.d.ts.map +0 -1
  245. package/dts/commands/sync/response.d.ts.map +0 -1
  246. package/dts/commands/sync/stat.d.ts.map +0 -1
  247. package/dts/commands/sync/sync.d.ts +0 -68
  248. package/dts/commands/sync/sync.d.ts.map +0 -1
  249. package/dts/crypto.d.ts.map +0 -1
  250. package/dts/index.d.ts +0 -11
  251. package/dts/index.d.ts.map +0 -1
  252. package/dts/packet.d.ts +0 -27
  253. package/dts/packet.d.ts.map +0 -1
  254. package/dts/socket/close-event-emitter.d.ts +0 -8
  255. package/dts/socket/close-event-emitter.d.ts.map +0 -1
  256. package/dts/socket/controller.d.ts +0 -43
  257. package/dts/socket/controller.d.ts.map +0 -1
  258. package/dts/socket/data-event-emitter.d.ts +0 -10
  259. package/dts/socket/data-event-emitter.d.ts.map +0 -1
  260. package/dts/socket/dispatcher.d.ts.map +0 -1
  261. package/dts/socket/index.d.ts +0 -7
  262. package/dts/socket/index.d.ts.map +0 -1
  263. package/dts/socket/logger.d.ts +0 -9
  264. package/dts/socket/logger.d.ts.map +0 -1
  265. package/dts/socket/socket.d.ts +0 -22
  266. package/dts/socket/socket.d.ts.map +0 -1
  267. package/dts/stream/buffered-stream.d.ts +0 -28
  268. package/dts/stream/buffered-stream.d.ts.map +0 -1
  269. package/dts/stream/index.d.ts +0 -3
  270. package/dts/stream/index.d.ts.map +0 -1
  271. package/dts/stream/stream.d.ts +0 -15
  272. package/dts/stream/stream.d.ts.map +0 -1
  273. package/dts/utils/auto-reset-event.d.ts.map +0 -1
  274. package/dts/utils/base64.d.ts +0 -7
  275. package/dts/utils/base64.d.ts.map +0 -1
  276. package/dts/utils/chunk.d.ts +0 -3
  277. package/dts/utils/chunk.d.ts.map +0 -1
  278. package/dts/utils/encoding.d.ts +0 -3
  279. package/dts/utils/event-queue.d.ts +0 -35
  280. package/dts/utils/event-queue.d.ts.map +0 -1
  281. package/dts/utils/index.d.ts +0 -6
  282. package/dts/utils/index.d.ts.map +0 -1
  283. package/esm/commands/demo-mode.js +0 -170
  284. package/esm/commands/demo-mode.js.map +0 -1
  285. package/esm/commands/shell/index.js +0 -62
  286. package/esm/commands/shell/index.js.map +0 -1
  287. package/esm/commands/shell/legacy.js +0 -49
  288. package/esm/commands/shell/legacy.js.map +0 -1
  289. package/esm/commands/shell/protocol.js +0 -106
  290. package/esm/commands/shell/protocol.js.map +0 -1
  291. package/esm/commands/shell/utils.js.map +0 -1
  292. package/esm/socket/close-event-emitter.js +0 -28
  293. package/esm/socket/close-event-emitter.js.map +0 -1
  294. package/esm/socket/data-event-emitter.js +0 -25
  295. package/esm/socket/data-event-emitter.js.map +0 -1
  296. package/esm/socket/logger.js +0 -2
  297. package/esm/socket/logger.js.map +0 -1
  298. package/esm/stream/buffered-stream.js +0 -67
  299. package/esm/stream/buffered-stream.js.map +0 -1
  300. package/esm/stream/stream.js +0 -41
  301. package/esm/stream/stream.js.map +0 -1
  302. package/esm/utils/chunk.js +0 -70
  303. package/esm/utils/chunk.js.map +0 -1
  304. package/esm/utils/event-queue.js +0 -104
  305. package/esm/utils/event-queue.js.map +0 -1
  306. package/src/commands/demo-mode.ts +0 -160
  307. package/src/commands/shell/index.ts +0 -87
  308. package/src/commands/shell/legacy.ts +0 -59
  309. package/src/commands/shell/protocol.ts +0 -121
  310. package/src/commands/shell/types.ts +0 -55
  311. package/src/socket/close-event-emitter.ts +0 -28
  312. package/src/socket/controller.ts +0 -105
  313. package/src/socket/data-event-emitter.ts +0 -27
  314. package/src/socket/logger.ts +0 -12
  315. package/src/stream/buffered-stream.ts +0 -92
  316. package/src/stream/stream.ts +0 -50
  317. package/src/utils/chunk.ts +0 -70
  318. package/src/utils/event-queue.ts +0 -145
@@ -1 +0,0 @@
1
- {"version":3,"file":"framebuffer.d.ts","sourceRoot":"","sources":["../../src/commands/framebuffer.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAoB7B,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;yBAc8B,CAAC;AAE5D,oBAAY,gBAAgB,GAAG,OAAO,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;AAE7E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;yBAe8B,CAAC;AAE5D,oBAAY,gBAAgB,GAAG,OAAO,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;AAE7E,oBAAY,cAAc,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;AAEjE,wBAAsB,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,cAAc,CAAC,CAYnE"}
@@ -1,9 +0,0 @@
1
- export * from './base';
2
- export * from './demo-mode';
3
- export * from './framebuffer';
4
- export * from './install';
5
- export * from './reverse';
6
- export * from './shell';
7
- export * from './sync';
8
- export * from './tcpip';
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
@@ -1,3 +0,0 @@
1
- import { Adb } from "../adb";
2
- export declare function install(adb: Adb, apk: ArrayLike<number> | ArrayBufferLike | AsyncIterable<ArrayBuffer>, onProgress?: (uploaded: number) => void): Promise<void>;
3
- //# sourceMappingURL=install.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAG7B,wBAAsB,OAAO,CACzB,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,eAAe,GAAG,aAAa,CAAC,WAAW,CAAC,EACrE,UAAU,CAAC,EAAE,CAAC,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../adb';
2
- import type { AdbShell, AdbShellConstructor } from './types';
3
- export * from './legacy';
4
- export * from './protocol';
5
- export * from './types';
6
- export * from './utils';
7
- export interface AdbChildProcessOptions {
8
- /**
9
- * A list of `AdbShellConstructor`s to be used.
10
- *
11
- * Different `AdbShell` has different capabilities, thus requires specific adaptations.
12
- * Check each `AdbShell`'s documentation for details.
13
- *
14
- * The first one whose `isSupported` returns `true` will be used.
15
- * If no `AdbShell` is supported, an error will be thrown.
16
- *
17
- * The default value is `[AdbShellProtocol, AdbLegacyShell]`.
18
- */
19
- shells: AdbShellConstructor[];
20
- }
21
- export declare class AdbChildProcess {
22
- readonly adb: Adb;
23
- constructor(adb: Adb);
24
- private createShell;
25
- /**
26
- * Spawns the default shell in interactive mode.
27
- * @param options The options for creating the `AdbShell`
28
- * @returns A new `AdbShell` instance connecting to the spawned shell process.
29
- */
30
- shell(options?: Partial<AdbChildProcessOptions>): Promise<AdbShell>;
31
- /**
32
- * Spawns a new process using the given `command`.
33
- * @param command The command to run, or an array of strings containing both command and args.
34
- * @param options The options for creating the `AdbShell`
35
- * @returns A new `AdbShell` instance connecting to the spawned process.
36
- */
37
- spawn(command: string | string[], options?: Partial<AdbChildProcessOptions>): Promise<AdbShell>;
38
- /**
39
- * Spawns a new process, waits until it exits, and returns the entire output.
40
- * @param command The command to run
41
- * @param args List of command arguments
42
- * @returns The entire output of the command
43
- */
44
- exec(command: string, ...args: string[]): Promise<string>;
45
- }
46
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/shell/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAGrC,OAAO,KAAK,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE7D,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AAExB,MAAM,WAAW,sBAAsB;IACnC;;;;;;;;;;OAUG;IACH,MAAM,EAAE,mBAAmB,EAAE,CAAC;CACjC;AAMD,qBAAa,eAAe;IACxB,SAAgB,GAAG,EAAE,GAAG,CAAC;gBAEN,GAAG,EAAE,GAAG;YAIb,WAAW;IAkBzB;;;;OAIG;IACI,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC;IAI1E;;;;;OAKG;IACI,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC;IAOtG;;;;;OAKG;IACI,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;CAInE"}
@@ -1,38 +0,0 @@
1
- import type { Adb } from "../../adb";
2
- import type { AdbSocket } from "../../socket";
3
- import type { AdbShell } from "./types";
4
- /**
5
- * The legacy shell
6
- *
7
- * Features:
8
- * * `onStderr`: No
9
- * * `onExit` exit code: No
10
- * * `resize`: No
11
- */
12
- export declare class AdbLegacyShell implements AdbShell {
13
- static isSupported(): boolean;
14
- static spawn(adb: Adb, command: string): Promise<AdbLegacyShell>;
15
- private readonly socket;
16
- private readonly stdoutEvent;
17
- get onStdout(): {
18
- (listener: import("@yume-chan/event").EventListener<ArrayBuffer, unknown, [], unknown>): import("@yume-chan/event").RemoveEventListener;
19
- <TThis, TArgs extends unknown[]>(listener: import("@yume-chan/event").EventListener<ArrayBuffer, TThis, TArgs, unknown>, thisArg: TThis, ...args: TArgs): import("@yume-chan/event").RemoveEventListener;
20
- };
21
- private readonly stderrEvent;
22
- get onStderr(): {
23
- (listener: import("@yume-chan/event").EventListener<ArrayBuffer, unknown, [], unknown>): import("@yume-chan/event").RemoveEventListener;
24
- <TThis, TArgs extends unknown[]>(listener: import("@yume-chan/event").EventListener<ArrayBuffer, TThis, TArgs, unknown>, thisArg: TThis, ...args: TArgs): import("@yume-chan/event").RemoveEventListener;
25
- };
26
- private readonly exitEvent;
27
- get onExit(): {
28
- (listener: import("@yume-chan/event").EventListener<number, unknown, [], unknown>): import("@yume-chan/event").RemoveEventListener;
29
- <TThis, TArgs extends unknown[]>(listener: import("@yume-chan/event").EventListener<number, TThis, TArgs, unknown>, thisArg: TThis, ...args: TArgs): import("@yume-chan/event").RemoveEventListener;
30
- };
31
- constructor(socket: AdbSocket);
32
- private handleData;
33
- private handleExit;
34
- write(data: ArrayBuffer): Promise<void>;
35
- resize(): void;
36
- kill(): Promise<void>;
37
- }
38
- //# sourceMappingURL=legacy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"legacy.d.ts","sourceRoot":"","sources":["../../../src/commands/shell/legacy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC;;;;;;;GAOG;AACH,qBAAa,cAAe,YAAW,QAAQ;WAC7B,WAAW;WAEL,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM;IAInD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAY;IAEnC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAmC;IAC/D,IAAW,QAAQ;;;MAAqC;IAExD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAmC;IAC/D,IAAW,QAAQ;;;MAAqC;IAExD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA8B;IACxD,IAAW,MAAM;;;MAAmC;gBAEjC,MAAM,EAAE,SAAS;IAMpC,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,UAAU;IAKL,KAAK,CAAC,IAAI,EAAE,WAAW;IAI7B,MAAM;IAIN,IAAI;CAGd"}
@@ -1,45 +0,0 @@
1
- import type { Adb } from "../../adb";
2
- import type { AdbSocket } from "../../socket";
3
- import type { AdbShell } from "./types";
4
- export declare enum AdbShellProtocolId {
5
- Stdin = 0,
6
- Stdout = 1,
7
- Stderr = 2,
8
- Exit = 3,
9
- CloseStdin = 4,
10
- WindowSizeChange = 5
11
- }
12
- /**
13
- * Shell v2 a.k.a Shell Protocol
14
- *
15
- * Features:
16
- * * `onStderr`: Yes
17
- * * `onExit` exit code: Yes
18
- * * `resize`: Yes
19
- */
20
- export declare class AdbShellProtocol implements AdbShell {
21
- static isSupported(adb: Adb): boolean;
22
- static spawn(adb: Adb, command: string): Promise<AdbShellProtocol>;
23
- private readonly stream;
24
- private readonly stdoutEvent;
25
- get onStdout(): {
26
- (listener: import("@yume-chan/event").EventListener<ArrayBuffer, unknown, [], unknown>): import("@yume-chan/event").RemoveEventListener;
27
- <TThis, TArgs extends unknown[]>(listener: import("@yume-chan/event").EventListener<ArrayBuffer, TThis, TArgs, unknown>, thisArg: TThis, ...args: TArgs): import("@yume-chan/event").RemoveEventListener;
28
- };
29
- private readonly stderrEvent;
30
- get onStderr(): {
31
- (listener: import("@yume-chan/event").EventListener<ArrayBuffer, unknown, [], unknown>): import("@yume-chan/event").RemoveEventListener;
32
- <TThis, TArgs extends unknown[]>(listener: import("@yume-chan/event").EventListener<ArrayBuffer, TThis, TArgs, unknown>, thisArg: TThis, ...args: TArgs): import("@yume-chan/event").RemoveEventListener;
33
- };
34
- private readonly exitEvent;
35
- get onExit(): {
36
- (listener: import("@yume-chan/event").EventListener<number, unknown, [], unknown>): import("@yume-chan/event").RemoveEventListener;
37
- <TThis, TArgs extends unknown[]>(listener: import("@yume-chan/event").EventListener<number, TThis, TArgs, unknown>, thisArg: TThis, ...args: TArgs): import("@yume-chan/event").RemoveEventListener;
38
- };
39
- constructor(socket: AdbSocket);
40
- private readData;
41
- write(data: ArrayBuffer): Promise<void>;
42
- resize(rows: number, cols: number): Promise<void>;
43
- kill(): void;
44
- }
45
- //# sourceMappingURL=protocol.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../src/commands/shell/protocol.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAErC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,oBAAY,kBAAkB;IAC1B,KAAK,IAAA;IACL,MAAM,IAAA;IACN,MAAM,IAAA;IACN,IAAI,IAAA;IACJ,UAAU,IAAA;IACV,gBAAgB,IAAA;CACnB;AAYD;;;;;;;GAOG;AACH,qBAAa,gBAAiB,YAAW,QAAQ;WAC/B,WAAW,CAAC,GAAG,EAAE,GAAG;WAId,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM;IAKnD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoB;IAE3C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAmC;IAC/D,IAAW,QAAQ;;;MAAqC;IAExD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAmC;IAC/D,IAAW,QAAQ;;;MAAqC;IAExD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA8B;IACxD,IAAW,MAAM;;;MAAmC;gBAEjC,MAAM,EAAE,SAAS;YAKtB,QAAQ;IA4BT,KAAK,CAAC,IAAI,EAAE,WAAW;IAWvB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAgBvC,IAAI;CAGd"}
@@ -1,47 +0,0 @@
1
- import type { Event } from "@yume-chan/event";
2
- import type { ValueOrPromise } from "@yume-chan/struct";
3
- import type { Adb } from "../../adb";
4
- import type { AdbSocket } from "../../socket";
5
- export interface AdbShell {
6
- /**
7
- * Notifies that new data has been written into the `stdout` stream.
8
- */
9
- readonly onStdout: Event<ArrayBuffer>;
10
- /**
11
- * Notifies that new data has been written into the `stderr` stream.
12
- *
13
- * Some `AdbShell`s may not support separate output streams
14
- * and will always fire the `onStdout` event instead.
15
- */
16
- readonly onStderr: Event<ArrayBuffer>;
17
- /**
18
- * Notifies that the current process has exited.
19
- *
20
- * The event arg is the exit code.
21
- * Some `AdbShell`s may not support returning exit code and will always return `0` instead.
22
- */
23
- readonly onExit: Event<number>;
24
- /**
25
- * Writes raw PTY data into the `stdin` stream.
26
- */
27
- write(data: ArrayBuffer): Promise<void>;
28
- /**
29
- * Resizes the current shell.
30
- *
31
- * Some `AdbShell`s may not support resizing and will always ignore calls to this method.
32
- */
33
- resize(rows: number, cols: number): ValueOrPromise<void>;
34
- /**
35
- * Kills the current process.
36
- */
37
- kill(): ValueOrPromise<void>;
38
- }
39
- export interface AdbShellConstructor {
40
- /** Returns `true` if the `adb` instance supports this shell */
41
- isSupported(adb: Adb): ValueOrPromise<boolean>;
42
- /** Creates a new `AdbShell` using the specified `Adb` and `command` */
43
- spawn(adb: Adb, command: string): ValueOrPromise<AdbShell>;
44
- /** Creates a new `AdbShell` by attaching to an exist `AdbSocket` */
45
- new (socket: AdbSocket): AdbShell;
46
- }
47
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/commands/shell/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,WAAW,QAAQ;IACrB;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAEtC;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAEtC;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE/B;;OAEG;IACH,KAAK,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IAEzD;;OAEG;IACH,IAAI,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,mBAAmB;IAChC,+DAA+D;IAC/D,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAE/C,uEAAuE;IACvE,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;IAE3D,oEAAoE;IACpE,KAAI,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;CACpC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/commands/shell/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,UAmBlC"}
@@ -1,8 +0,0 @@
1
- export * from './list';
2
- export * from './pull';
3
- export * from './request';
4
- export * from './response';
5
- export * from './push';
6
- export * from './stat';
7
- export * from './sync';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/list.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,EAA4C,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGzF,eAAO,MAAM,oBAAoB;;;;;;;;;;aAKuB,CAAC;AAEzD,oBAAY,oBAAoB,GAAG,OAAO,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;AAOrF,wBAAuB,cAAc,CACjC,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE,MAAM,GACb,cAAc,CAAC,oBAAoB,EAAE,IAAI,EAAE,IAAI,CAAC,CAelD"}
@@ -1,11 +0,0 @@
1
- import Struct from '@yume-chan/struct';
2
- import { AdbBufferedStream } from '../../stream';
3
- import { AdbSyncResponseId } from './response';
4
- export declare const AdbSyncDataResponse: Struct<{
5
- dataLength: number;
6
- data: ArrayBuffer;
7
- }, "dataLength", {
8
- id: AdbSyncResponseId.Data;
9
- }, undefined>;
10
- export declare function adbSyncPull(stream: AdbBufferedStream, path: string): AsyncGenerator<ArrayBuffer, void, void>;
11
- //# sourceMappingURL=pull.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pull.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/pull.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,EAA4C,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEzF,eAAO,MAAM,mBAAmB;;;;;aAIuB,CAAC;AAOxD,wBAAuB,WAAW,CAC9B,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE,MAAM,GACb,cAAc,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAczC"}
@@ -1,8 +0,0 @@
1
- import Struct from '@yume-chan/struct';
2
- import { AdbBufferedStream } from '../../stream';
3
- export declare const AdbSyncOkResponse: Struct<{
4
- unused: number;
5
- }, never, {}, undefined>;
6
- export declare const AdbSyncMaxPacketSize: number;
7
- export declare function adbSyncPush(stream: AdbBufferedStream, filename: string, content: ArrayLike<number> | ArrayBufferLike | AsyncIterable<ArrayBuffer>, mode?: number, mtime?: number, packetSize?: number, onProgress?: (uploaded: number) => void): Promise<void>;
8
- //# sourceMappingURL=push.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/push.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAMjD,eAAO,MAAM,iBAAiB;;wBAEL,CAAC;AAM1B,eAAO,MAAM,oBAAoB,QAAY,CAAC;AAE9C,wBAAsB,WAAW,CAC7B,MAAM,EAAE,iBAAiB,EACzB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,eAAe,GAAG,aAAa,CAAC,WAAW,CAAC,EACzE,IAAI,GAAE,MAA2C,EACjD,KAAK,GAAE,MAAgC,EACvC,UAAU,GAAE,MAA6B,EACzC,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,GACxC,OAAO,CAAC,IAAI,CAAC,CAoBf"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/request.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGtD,oBAAY,gBAAgB;IACxB,IAAI,SAAS;IACb,IAAI,SAAS;IACb,KAAK,SAAS;IACd,IAAI,SAAS;IACb,MAAM,SAAS;IACf,IAAI,SAAS;IACb,IAAI,SAAS;IACb,OAAO,SAAS;CACnB;AAED,eAAO,MAAM,oBAAoB;;;wBAGX,CAAC;AAEvB,eAAO,MAAM,kBAAkB;;;;wBAGqB,CAAC;AAErD,wBAAsB,mBAAmB,CACrC,MAAM,EAAE,iBAAiB,EACzB,EAAE,EAAE,gBAAgB,GAAG,MAAM,EAC7B,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,WAAW,GACrC,OAAO,CAAC,IAAI,CAAC,CAmBf"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/response.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,4BAA4B,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACtG,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGjD,oBAAY,iBAAiB;IACzB,KAAK,SAAS;IACd,KAAK,SAAS;IACd,IAAI,SAAS;IACb,MAAM,SAAS;IACf,IAAI,SAAS;IACb,IAAI,SAAS;IACb,EAAE,SAAS;IACX,IAAI,SAAS;CAChB;AAMD,qBAAa,mBAAoB,YAAW,UAAU,CAAC,mBAAmB,CAAC;IACvE,OAAO,CAAC,MAAM,CAAS;IAEvB,SAAgB,EAAE,0BAA0B;gBAEzB,MAAM,EAAE,MAAM;IAIpB,WAAW,CAAC,MAAM,EAAE,4BAA4B,GAAG,OAAO,CAAC,IAAI,CAAC;CAIhF;AAED,eAAO,MAAM,mBAAmB;;;8BAMtB,CAAC;AAEX,wBAAsB,mBAAmB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,EAC/E,MAAM,EAAE,iBAAiB,EACzB,KAAK,EAAE,CAAC,GACT,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAYtC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"stat.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/stat.ts"],"names":[],"mappings":"AAAA,OAAO,MAAuB,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,EAAuB,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGpE,oBAAY,aAAa;IACrB,SAAS,IAAO;IAChB,IAAI,IAAO;IACX,IAAI,KAAO;CACd;AAED,eAAO,MAAM,oBAAoB;;;;;;;;aAiBvB,CAAC;AAEX,oBAAY,oBAAoB,GAAG,OAAO,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;AAErF,oBAAY,oBAAoB;IAC5B,MAAM,KAAK;IACX,MAAM,KAAK;IACX,MAAM,KAAK;IACX,KAAK,KAAK;IACV,KAAK,IAAI;IACT,MAAM,KAAK;IACX,GAAG,IAAI;IACP,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,KAAK;IACX,YAAY,KAAK;IACjB,MAAM,KAAK;IACX,MAAM,IAAI;IACV,MAAM,KAAK;IACX,MAAM,KAAK;IACX,OAAO,KAAK;IACZ,SAAS,KAAK;IACd,KAAK,IAAI;IACT,KAAK,KAAK;IACV,OAAO,KAAK;CACf;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;aAsBtB,CAAC;AAEX,oBAAY,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;AAcnF,wBAAsB,YAAY,CAC9B,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,OAAO,GACZ,OAAO,CAAC,oBAAoB,GAAG,mBAAmB,CAAC,CAcrD;AAED,wBAAsB,WAAW,CAC7B,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE,MAAM,GACb,OAAO,CAAC,mBAAmB,CAAC,CAG9B"}
@@ -1,68 +0,0 @@
1
- import { AutoDisposable } from '@yume-chan/event';
2
- import { Adb } from '../../adb';
3
- import { AdbSocket } from '../../socket';
4
- import { AdbBufferedStream } from '../../stream';
5
- import { AutoResetEvent } from '../../utils';
6
- import { AdbSyncEntryResponse } from './list';
7
- export declare class AdbSync extends AutoDisposable {
8
- protected adb: Adb;
9
- protected stream: AdbBufferedStream;
10
- protected sendLock: AutoResetEvent;
11
- get supportsStat(): boolean;
12
- constructor(adb: Adb, socket: AdbSocket);
13
- lstat(path: string): Promise<{
14
- id: import("./response").AdbSyncResponseId.Lstat;
15
- readonly type: import("./stat").LinuxFileType;
16
- readonly permission: number;
17
- mode: number;
18
- size: number;
19
- mtime: number;
20
- } | {
21
- id: import("./response").AdbSyncResponseId.Stat;
22
- readonly type: import("./stat").LinuxFileType;
23
- readonly permission: number;
24
- error: import("./stat").AdbSyncStatErrorCode;
25
- dev: bigint;
26
- ino: bigint;
27
- mode: number;
28
- nlink: number;
29
- uid: number;
30
- gid: number;
31
- size: bigint;
32
- atime: bigint;
33
- mtime: bigint;
34
- ctime: bigint;
35
- }>;
36
- stat(path: string): Promise<{
37
- id: import("./response").AdbSyncResponseId.Stat;
38
- readonly type: import("./stat").LinuxFileType;
39
- readonly permission: number;
40
- error: import("./stat").AdbSyncStatErrorCode;
41
- dev: bigint;
42
- ino: bigint;
43
- mode: number;
44
- nlink: number;
45
- uid: number;
46
- gid: number;
47
- size: bigint;
48
- atime: bigint;
49
- mtime: bigint;
50
- ctime: bigint;
51
- }>;
52
- isDirectory(path: string): Promise<boolean>;
53
- opendir(path: string): AsyncGenerator<AdbSyncEntryResponse, void, void>;
54
- readdir(path: string): Promise<{
55
- id: import("./response").AdbSyncResponseId.Entry;
56
- readonly type: import("./stat").LinuxFileType;
57
- readonly permission: number;
58
- mode: number;
59
- size: number;
60
- mtime: number;
61
- nameLength: number;
62
- name: string;
63
- }[]>;
64
- read(filename: string): AsyncGenerator<ArrayBuffer, void, void>;
65
- write(filename: string, content: ArrayLike<number> | ArrayBufferLike | AsyncIterable<ArrayBuffer>, mode?: number, mtime?: number, onProgress?: (uploaded: number) => void): Promise<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;AAC7B,eAAO,MAAM,OAAO,IAAO,CAAC;AAG5B,eAAO,MAAM,cAAc,UAO1B,CAAC;AAQF,wBAAgB,IAAI,CAAC,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,GAAG,WAAW,CAoC5E"}
package/dts/index.d.ts DELETED
@@ -1,11 +0,0 @@
1
- export * from './adb';
2
- export * from './auth';
3
- export * from './backend';
4
- export * from './commands';
5
- export * from './crypto';
6
- export * from './features';
7
- export * from './packet';
8
- export * from './socket';
9
- export * from './stream';
10
- export * from './utils';
11
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
package/dts/packet.d.ts DELETED
@@ -1,27 +0,0 @@
1
- import Struct from '@yume-chan/struct';
2
- import { AdbBackend } from './backend';
3
- export declare enum AdbCommand {
4
- Auth = 1213486401,
5
- Close = 1163086915,
6
- Connect = 1314410051,
7
- OK = 1497451343,
8
- Open = 1313165391,
9
- Write = 1163154007
10
- }
11
- declare const AdbPacketStruct: Struct<{
12
- command: number;
13
- arg0: number;
14
- arg1: number;
15
- payloadLength: number;
16
- checksum: number;
17
- magic: number;
18
- payload: ArrayBuffer;
19
- }, "payloadLength", {}, undefined>;
20
- export declare type AdbPacket = typeof AdbPacketStruct['TDeserializeResult'];
21
- export declare type AdbPacketInit = Omit<typeof AdbPacketStruct['TInit'], 'checksum' | 'magic'>;
22
- export declare namespace AdbPacket {
23
- function read(backend: AdbBackend): Promise<AdbPacket>;
24
- function write(init: AdbPacketInit, calculateChecksum: boolean, backend: AdbBackend): Promise<void>;
25
- }
26
- export {};
27
- //# sourceMappingURL=packet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"packet.d.ts","sourceRoot":"","sources":["../src/packet.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC,oBAAY,UAAU;IAClB,IAAI,aAAa;IACjB,KAAK,aAAa;IAClB,OAAO,aAAa;IACpB,EAAE,aAAa;IACf,IAAI,aAAa;IACjB,KAAK,aAAa;CACrB;AAWD,QAAA,MAAM,eAAe;;;;;;;;kCAG4C,CAAC;AAElE,oBAAY,SAAS,GAAG,OAAO,eAAe,CAAC,oBAAoB,CAAC,CAAC;AAErE,oBAAY,aAAa,GAAG,IAAI,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC;AAExF,yBAAiB,SAAS,CAAC;IACvB,SAAsB,IAAI,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,CAsBlE;IAED,SAAsB,KAAK,CACvB,IAAI,EAAE,aAAa,EACnB,iBAAiB,EAAE,OAAO,EAC1B,OAAO,EAAE,UAAU,GACpB,OAAO,CAAC,IAAI,CAAC,CAsBf;CACJ"}
@@ -1,8 +0,0 @@
1
- import { EventEmitter, EventListenerInfo, RemoveEventListener } from '@yume-chan/event';
2
- export declare class CloseEventEmitter extends EventEmitter<void, void> {
3
- private closed;
4
- protected addEventListener(info: EventListenerInfo<void, void>): RemoveEventListener;
5
- fire(): void;
6
- dispose(): void;
7
- }
8
- //# sourceMappingURL=close-event-emitter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"close-event-emitter.d.ts","sourceRoot":"","sources":["../../src/socket/close-event-emitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAKxF,qBAAa,iBAAkB,SAAQ,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC;IAC3D,OAAO,CAAC,MAAM,CAAS;cAEJ,gBAAgB,CAAC,IAAI,EAAE,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC;IASvD,IAAI;IAMJ,OAAO;CAI1B"}
@@ -1,43 +0,0 @@
1
- import { AutoDisposable } from '@yume-chan/event';
2
- import { AdbBackend } from '../backend';
3
- import { DataEventEmitter } from './data-event-emitter';
4
- import { AdbPacketDispatcher } from './dispatcher';
5
- export interface AdbSocketInfo {
6
- backend: AdbBackend;
7
- localId: number;
8
- remoteId: number;
9
- localCreated: boolean;
10
- serviceString: string;
11
- }
12
- export interface AdbSocketConstructionOptions {
13
- dispatcher: AdbPacketDispatcher;
14
- localId: number;
15
- remoteId: number;
16
- localCreated: boolean;
17
- serviceString: string;
18
- }
19
- export declare class AdbSocketController extends AutoDisposable implements AdbSocketInfo {
20
- private readonly writeChunkLock;
21
- private readonly writeLock;
22
- private readonly dispatcher;
23
- get backend(): AdbBackend;
24
- readonly localId: number;
25
- readonly remoteId: number;
26
- readonly localCreated: boolean;
27
- readonly serviceString: string;
28
- readonly dataEvent: DataEventEmitter<ArrayBuffer>;
29
- private _closed;
30
- get closed(): boolean;
31
- private readonly closeEvent;
32
- get onClose(): {
33
- (listener: import("@yume-chan/event").EventListener<void, unknown, [], void>): import("@yume-chan/event").RemoveEventListener;
34
- <TThis, TArgs extends unknown[]>(listener: import("@yume-chan/event").EventListener<void, TThis, TArgs, void>, thisArg: TThis, ...args: TArgs): import("@yume-chan/event").RemoveEventListener;
35
- };
36
- constructor(options: AdbSocketConstructionOptions);
37
- private writeChunk;
38
- write(data: ArrayBuffer): Promise<void>;
39
- ack(): void;
40
- close(): Promise<void>;
41
- dispose(): void;
42
- }
43
- //# sourceMappingURL=controller.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/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C;IAe7C,GAAG;IAIG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAWnB,OAAO;CAK1B"}
@@ -1,10 +0,0 @@
1
- import { Event, EventEmitter, EventListenerInfo } from '@yume-chan/event';
2
- import { ValueOrPromise } from '@yume-chan/struct';
3
- export declare type AsyncEventResult = ValueOrPromise<void>;
4
- export declare type AsyncEvent<TEvent> = Event<TEvent, AsyncEventResult>;
5
- export declare class DataEventEmitter<TEvent> extends EventEmitter<TEvent, AsyncEventResult> {
6
- private dispatchLock;
7
- protected addEventListener(info: EventListenerInfo<TEvent, AsyncEventResult>): import("@yume-chan/event").RemoveEventListener;
8
- fire(e: TEvent): Promise<void>;
9
- }
10
- //# sourceMappingURL=data-event-emitter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"data-event-emitter.d.ts","sourceRoot":"","sources":["../../src/socket/data-event-emitter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,oBAAY,gBAAgB,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;AAEpD,oBAAY,UAAU,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAEjE,qBAAa,gBAAgB,CAAC,MAAM,CAAE,SAAQ,YAAY,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAChF,OAAO,CAAC,YAAY,CAA+B;cAEhC,gBAAgB,CAAC,IAAI,EAAE,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAQ/D,IAAI,CAAC,CAAC,EAAE,MAAM;CAOvC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"dispatcher.d.ts","sourceRoot":"","sources":["../../src/socket/dispatcher.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAgB,MAAM,kBAAkB,CAAC;AAChE,OAAO,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,OAAO,CAAC,SAAS,CAAC;IAqB7D,UAAU,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAChD,UAAU,CACb,OAAO,EAAE,UAAU,EACnB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,GAC/B,OAAO,CAAC,IAAI,CAAC;IAqCA,OAAO;CAU1B"}
@@ -1,7 +0,0 @@
1
- export * from './close-event-emitter';
2
- export * from './controller';
3
- export * from './data-event-emitter';
4
- export * from './dispatcher';
5
- export * from './logger';
6
- export * from './socket';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/socket/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
@@ -1,9 +0,0 @@
1
- import { AdbPacket, AdbPacketInit } from '../packet';
2
- import { AdbSocket } from './socket';
3
- export interface AdbLogger {
4
- onIncomingPacket?(packet: AdbPacket): void;
5
- onOutgoingPacket?(packet: AdbPacketInit): void;
6
- onSocketOpened?(socket: AdbSocket): void;
7
- onSocketClosed?(socket: AdbSocket): void;
8
- }
9
- //# sourceMappingURL=logger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/socket/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,MAAM,WAAW,SAAS;IACtB,gBAAgB,CAAC,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC;IAE3C,gBAAgB,CAAC,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;IAE/C,cAAc,CAAC,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC;IAEzC,cAAc,CAAC,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC;CAC5C"}
@@ -1,22 +0,0 @@
1
- import { AdbSocketController, AdbSocketInfo } from './controller';
2
- export declare class AdbSocket implements AdbSocketInfo {
3
- private readonly controller;
4
- get backend(): import("..").AdbBackend;
5
- get localId(): number;
6
- get remoteId(): number;
7
- get localCreated(): boolean;
8
- get serviceString(): string;
9
- get closed(): boolean;
10
- get onData(): {
11
- (listener: import("@yume-chan/event").EventListener<ArrayBuffer, unknown, [], import("./data-event-emitter").AsyncEventResult>): import("@yume-chan/event").RemoveEventListener;
12
- <TThis, TArgs extends unknown[]>(listener: import("@yume-chan/event").EventListener<ArrayBuffer, TThis, TArgs, import("./data-event-emitter").AsyncEventResult>, thisArg: TThis, ...args: TArgs): import("@yume-chan/event").RemoveEventListener;
13
- };
14
- get onClose(): {
15
- (listener: import("@yume-chan/event").EventListener<void, unknown, [], void>): import("@yume-chan/event").RemoveEventListener;
16
- <TThis, TArgs extends unknown[]>(listener: import("@yume-chan/event").EventListener<void, TThis, TArgs, void>, thisArg: TThis, ...args: TArgs): import("@yume-chan/event").RemoveEventListener;
17
- };
18
- constructor(controller: AdbSocketController);
19
- write(data: ArrayBuffer): Promise<void>;
20
- close(): Promise<void>;
21
- }
22
- //# sourceMappingURL=socket.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"socket.d.ts","sourceRoot":"","sources":["../../src/socket/socket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElE,qBAAa,SAAU,YAAW,aAAa;IAC3C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsB;IAEjD,IAAW,OAAO,4BAAsC;IACxD,IAAW,OAAO,WAAsC;IACxD,IAAW,QAAQ,WAAuC;IAC1D,IAAW,YAAY,YAA2C;IAClE,IAAW,aAAa,WAA4C;IAEpE,IAAW,MAAM,YAAqC;IAEtD,IAAW,MAAM;;;MAA8C;IAC/D,IAAW,OAAO;;;MAAsC;gBAErC,UAAU,EAAE,mBAAmB;IAI3C,KAAK,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAGhC"}
@@ -1,28 +0,0 @@
1
- import { StructAsyncDeserializeStream } from '@yume-chan/struct';
2
- import { AdbSocket, AdbSocketInfo } from '../socket';
3
- import { AdbSocketStream } from './stream';
4
- export interface Stream {
5
- /**
6
- * @param length A hint of how much data should be read.
7
- * @returns Data, which can be either more or less than `length`
8
- */
9
- read(length: number): ArrayBuffer | Promise<ArrayBuffer>;
10
- close?(): void;
11
- }
12
- export declare class BufferedStream<T extends Stream> {
13
- private buffer;
14
- protected readonly stream: T;
15
- constructor(stream: T);
16
- read(length: number): Promise<ArrayBuffer>;
17
- close(): void;
18
- }
19
- export declare class AdbBufferedStream extends BufferedStream<AdbSocketStream> implements AdbSocketInfo, StructAsyncDeserializeStream {
20
- get backend(): import("..").AdbBackend;
21
- get localId(): number;
22
- get remoteId(): number;
23
- get localCreated(): boolean;
24
- get serviceString(): string;
25
- constructor(socket: AdbSocket);
26
- write(data: ArrayBuffer): Promise<void>;
27
- }
28
- //# sourceMappingURL=buffered-stream.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buffered-stream.d.ts","sourceRoot":"","sources":["../../src/stream/buffered-stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,WAAW,MAAM;IACnB;;;OAGG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEzD,KAAK,CAAC,IAAI,IAAI,CAAC;CAClB;AAED,qBAAa,cAAc,CAAC,CAAC,SAAS,MAAM;IACxC,OAAO,CAAC,MAAM,CAAyB;IAEvC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;gBAEV,MAAM,EAAE,CAAC;IAIf,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IA+ChD,KAAK;CAGf;AAED,qBAAa,iBACT,SAAQ,cAAc,CAAC,eAAe,CACtC,YAAW,aAAa,EAAE,4BAA4B;IACtD,IAAW,OAAO,4BAAkC;IACpD,IAAW,OAAO,WAAkC;IACpD,IAAW,QAAQ,WAAmC;IACtD,IAAW,YAAY,YAAuC;IAC9D,IAAW,aAAa,WAAwC;gBAE7C,MAAM,EAAE,SAAS;IAI7B,KAAK,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAGjD"}
@@ -1,3 +0,0 @@
1
- export * from './buffered-stream';
2
- export * from './stream';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stream/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC"}