@yume-chan/adb 0.0.18 → 0.0.19

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 (164) hide show
  1. package/CHANGELOG.json +21 -0
  2. package/CHANGELOG.md +11 -1
  3. package/esm/adb.d.ts +63 -60
  4. package/esm/adb.d.ts.map +1 -1
  5. package/esm/adb.js +257 -249
  6. package/esm/adb.js.map +1 -1
  7. package/esm/auth.d.ts +51 -51
  8. package/esm/auth.d.ts.map +1 -1
  9. package/esm/auth.js +95 -96
  10. package/esm/auth.js.map +1 -1
  11. package/esm/backend.d.ts +8 -8
  12. package/esm/backend.d.ts.map +1 -1
  13. package/esm/backend.js +1 -1
  14. package/esm/commands/base.d.ts +6 -6
  15. package/esm/commands/base.d.ts.map +1 -1
  16. package/esm/commands/base.js +8 -8
  17. package/esm/commands/framebuffer.d.ts +53 -53
  18. package/esm/commands/framebuffer.d.ts.map +1 -1
  19. package/esm/commands/framebuffer.js +46 -46
  20. package/esm/commands/framebuffer.js.map +1 -1
  21. package/esm/commands/index.d.ts +7 -8
  22. package/esm/commands/index.d.ts.map +1 -1
  23. package/esm/commands/index.js +7 -8
  24. package/esm/commands/index.js.map +1 -1
  25. package/esm/commands/install.d.ts +9 -3
  26. package/esm/commands/install.d.ts.map +1 -1
  27. package/esm/commands/install.js +26 -26
  28. package/esm/commands/install.js.map +1 -1
  29. package/esm/commands/power.d.ts +22 -22
  30. package/esm/commands/power.js +48 -48
  31. package/esm/commands/reverse.d.ts +41 -28
  32. package/esm/commands/reverse.d.ts.map +1 -1
  33. package/esm/commands/reverse.js +125 -100
  34. package/esm/commands/reverse.js.map +1 -1
  35. package/esm/commands/subprocess/command.d.ts +57 -51
  36. package/esm/commands/subprocess/command.d.ts.map +1 -1
  37. package/esm/commands/subprocess/command.js +86 -80
  38. package/esm/commands/subprocess/command.js.map +1 -1
  39. package/esm/commands/subprocess/index.d.ts +3 -3
  40. package/esm/commands/subprocess/index.js +3 -3
  41. package/esm/commands/subprocess/protocols/index.d.ts +3 -3
  42. package/esm/commands/subprocess/protocols/index.js +3 -3
  43. package/esm/commands/subprocess/protocols/none.d.ts +35 -35
  44. package/esm/commands/subprocess/protocols/none.d.ts.map +1 -1
  45. package/esm/commands/subprocess/protocols/none.js +65 -55
  46. package/esm/commands/subprocess/protocols/none.js.map +1 -1
  47. package/esm/commands/subprocess/protocols/shell.d.ts +39 -38
  48. package/esm/commands/subprocess/protocols/shell.d.ts.map +1 -1
  49. package/esm/commands/subprocess/protocols/shell.js +166 -162
  50. package/esm/commands/subprocess/protocols/shell.js.map +1 -1
  51. package/esm/commands/subprocess/protocols/types.d.ts +49 -49
  52. package/esm/commands/subprocess/protocols/types.d.ts.map +1 -1
  53. package/esm/commands/subprocess/protocols/types.js +1 -1
  54. package/esm/commands/subprocess/utils.d.ts +1 -1
  55. package/esm/commands/subprocess/utils.js +18 -18
  56. package/esm/commands/sync/index.d.ts +8 -7
  57. package/esm/commands/sync/index.d.ts.map +1 -1
  58. package/esm/commands/sync/index.js +8 -7
  59. package/esm/commands/sync/index.js.map +1 -1
  60. package/esm/commands/sync/list.d.ts +42 -40
  61. package/esm/commands/sync/list.d.ts.map +1 -1
  62. package/esm/commands/sync/list.js +67 -47
  63. package/esm/commands/sync/list.js.map +1 -1
  64. package/esm/commands/sync/pull.d.ts +13 -11
  65. package/esm/commands/sync/pull.d.ts.map +1 -1
  66. package/esm/commands/sync/pull.js +35 -37
  67. package/esm/commands/sync/pull.js.map +1 -1
  68. package/esm/commands/sync/push.d.ts +46 -7
  69. package/esm/commands/sync/push.d.ts.map +1 -1
  70. package/esm/commands/sync/push.js +89 -22
  71. package/esm/commands/sync/push.js.map +1 -1
  72. package/esm/commands/sync/request.d.ts +26 -23
  73. package/esm/commands/sync/request.d.ts.map +1 -1
  74. package/esm/commands/sync/request.js +40 -42
  75. package/esm/commands/sync/request.js.map +1 -1
  76. package/esm/commands/sync/response.d.ts +19 -19
  77. package/esm/commands/sync/response.d.ts.map +1 -1
  78. package/esm/commands/sync/response.js +54 -54
  79. package/esm/commands/sync/response.js.map +1 -1
  80. package/esm/commands/sync/socket.d.ts +27 -0
  81. package/esm/commands/sync/socket.d.ts.map +1 -0
  82. package/esm/commands/sync/socket.js +66 -0
  83. package/esm/commands/sync/socket.js.map +1 -0
  84. package/esm/commands/sync/stat.d.ts +72 -72
  85. package/esm/commands/sync/stat.d.ts.map +1 -1
  86. package/esm/commands/sync/stat.js +116 -104
  87. package/esm/commands/sync/stat.js.map +1 -1
  88. package/esm/commands/sync/sync.d.ts +72 -60
  89. package/esm/commands/sync/sync.d.ts.map +1 -1
  90. package/esm/commands/sync/sync.js +127 -149
  91. package/esm/commands/sync/sync.js.map +1 -1
  92. package/esm/commands/tcpip.d.ts +5 -5
  93. package/esm/commands/tcpip.js +18 -18
  94. package/esm/crypto.d.ts +36 -36
  95. package/esm/crypto.js +248 -248
  96. package/esm/features.d.ts +10 -7
  97. package/esm/features.d.ts.map +1 -1
  98. package/esm/features.js +13 -10
  99. package/esm/features.js.map +1 -1
  100. package/esm/index.d.ts +9 -9
  101. package/esm/index.js +9 -9
  102. package/esm/packet.d.ts +45 -46
  103. package/esm/packet.d.ts.map +1 -1
  104. package/esm/packet.js +43 -48
  105. package/esm/packet.js.map +1 -1
  106. package/esm/socket/dispatcher.d.ts +59 -59
  107. package/esm/socket/dispatcher.d.ts.map +1 -1
  108. package/esm/socket/dispatcher.js +223 -234
  109. package/esm/socket/dispatcher.js.map +1 -1
  110. package/esm/socket/index.d.ts +2 -2
  111. package/esm/socket/index.js +2 -2
  112. package/esm/socket/socket.d.ts +59 -59
  113. package/esm/socket/socket.d.ts.map +1 -1
  114. package/esm/socket/socket.js +118 -118
  115. package/esm/socket/socket.js.map +1 -1
  116. package/esm/utils/auto-reset-event.d.ts +9 -9
  117. package/esm/utils/auto-reset-event.d.ts.map +1 -1
  118. package/esm/utils/auto-reset-event.js +33 -33
  119. package/esm/utils/auto-reset-event.js.map +1 -1
  120. package/esm/utils/base64.d.ts +27 -27
  121. package/esm/utils/base64.js +246 -246
  122. package/esm/utils/conditional-variable.d.ts +9 -0
  123. package/esm/utils/conditional-variable.d.ts.map +1 -0
  124. package/esm/utils/conditional-variable.js +34 -0
  125. package/esm/utils/conditional-variable.js.map +1 -0
  126. package/esm/utils/index.d.ts +4 -3
  127. package/esm/utils/index.d.ts.map +1 -1
  128. package/esm/utils/index.js +4 -3
  129. package/esm/utils/index.js.map +1 -1
  130. package/package.json +11 -10
  131. package/src/adb.ts +47 -37
  132. package/src/auth.ts +7 -6
  133. package/src/backend.ts +4 -4
  134. package/src/commands/base.ts +1 -1
  135. package/src/commands/framebuffer.ts +4 -4
  136. package/src/commands/index.ts +7 -8
  137. package/src/commands/reverse.ts +35 -10
  138. package/src/commands/subprocess/command.ts +12 -4
  139. package/src/commands/subprocess/index.ts +3 -3
  140. package/src/commands/subprocess/protocols/index.ts +3 -3
  141. package/src/commands/subprocess/protocols/none.ts +25 -11
  142. package/src/commands/subprocess/protocols/shell.ts +50 -28
  143. package/src/commands/subprocess/protocols/types.ts +8 -7
  144. package/src/commands/subprocess/utils.ts +1 -1
  145. package/src/commands/sync/index.ts +8 -7
  146. package/src/commands/sync/list.ts +42 -23
  147. package/src/commands/sync/pull.ts +40 -45
  148. package/src/commands/sync/push.ts +146 -39
  149. package/src/commands/sync/request.ts +20 -15
  150. package/src/commands/sync/response.ts +7 -6
  151. package/src/commands/sync/socket.ts +97 -0
  152. package/src/commands/sync/stat.ts +47 -42
  153. package/src/commands/sync/sync.ts +68 -108
  154. package/src/commands/tcpip.ts +5 -5
  155. package/src/features.ts +9 -6
  156. package/src/packet.ts +19 -34
  157. package/src/socket/dispatcher.ts +32 -47
  158. package/src/socket/index.ts +2 -2
  159. package/src/socket/socket.ts +26 -17
  160. package/src/utils/auto-reset-event.ts +14 -15
  161. package/src/utils/conditional-variable.ts +45 -0
  162. package/src/utils/index.ts +4 -3
  163. package/tsconfig.build.tsbuildinfo +1 -1
  164. package/src/commands/install.ts +0 -40
@@ -1,52 +1,58 @@
1
- import { AdbCommandBase } from "../base.js";
2
- import { type AdbSubprocessProtocol, type AdbSubprocessProtocolConstructor } from "./protocols/index.js";
3
- export interface AdbSubprocessOptions {
4
- /**
5
- * A list of `AdbSubprocessProtocolConstructor`s to be used.
6
- *
7
- * Different `AdbSubprocessProtocol` has different capabilities, thus requires specific adaptations.
8
- * Check their documentations for details.
9
- *
10
- * The first protocol whose `isSupported` returns `true` will be used.
11
- * If no `AdbSubprocessProtocol` is supported, an error will be thrown.
12
- *
13
- * @default [AdbSubprocessShellProtocol, AdbSubprocessNoneProtocol]
14
- */
15
- protocols: AdbSubprocessProtocolConstructor[];
16
- }
17
- export interface AdbSubprocessWaitResult {
18
- stdout: string;
19
- stderr: string;
20
- exitCode: number;
21
- }
22
- export declare class AdbSubprocess extends AdbCommandBase {
23
- private createProtocol;
24
- /**
25
- * Spawns an executable in PTY (interactive) mode.
26
- * @param command The command to run. If omitted, the default shell will be spawned.
27
- * @param options The options for creating the `AdbSubprocessProtocol`
28
- * @returns A new `AdbSubprocessProtocol` instance connecting to the spawned process.
29
- */
30
- shell(command?: string | string[], options?: Partial<AdbSubprocessOptions>): Promise<AdbSubprocessProtocol>;
31
- /**
32
- * Spawns an executable and pipe the output.
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 `AdbSubprocessProtocol`
35
- * @returns A new `AdbSubprocessProtocol` instance connecting to the spawned process.
36
- */
37
- spawn(command: string | string[], options?: Partial<AdbSubprocessOptions>): Promise<AdbSubprocessProtocol>;
38
- /**
39
- * Spawns a new process, waits until it exits, and returns the entire output.
40
- * @param command The command to run
41
- * @param options The options for creating the `AdbSubprocessProtocol`
42
- * @returns The entire output of the command
43
- */
44
- spawnAndWait(command: string | string[], options?: Partial<AdbSubprocessOptions>): Promise<AdbSubprocessWaitResult>;
45
- /**
46
- * Spawns a new process, waits until it exits, and returns the entire output.
47
- * @param command The command to run
48
- * @returns The entire output of the command
49
- */
50
- spawnAndWaitLegacy(command: string | string[]): Promise<string>;
51
- }
1
+ import { AdbCommandBase } from "../base.js";
2
+ import type { AdbSubprocessProtocol, AdbSubprocessProtocolConstructor } from "./protocols/index.js";
3
+ export interface AdbSubprocessOptions {
4
+ /**
5
+ * A list of `AdbSubprocessProtocolConstructor`s to be used.
6
+ *
7
+ * Different `AdbSubprocessProtocol` has different capabilities, thus requires specific adaptations.
8
+ * Check their documentations for details.
9
+ *
10
+ * The first protocol whose `isSupported` returns `true` will be used.
11
+ * If no `AdbSubprocessProtocol` is supported, an error will be thrown.
12
+ *
13
+ * @default [AdbSubprocessShellProtocol, AdbSubprocessNoneProtocol]
14
+ */
15
+ protocols: AdbSubprocessProtocolConstructor[];
16
+ }
17
+ export interface AdbSubprocessWaitResult {
18
+ stdout: string;
19
+ stderr: string;
20
+ exitCode: number;
21
+ }
22
+ export declare class AdbSubprocess extends AdbCommandBase {
23
+ private createProtocol;
24
+ /**
25
+ * Spawns an executable in PTY mode.
26
+ *
27
+ * Redirection mode is enough for most simple commands, but PTY mode is required for
28
+ * commands that manipulate the terminal, such as `vi` and `less`.
29
+ * @param command The command to run. If omitted, the default shell will be spawned.
30
+ * @param options The options for creating the `AdbSubprocessProtocol`
31
+ * @returns A new `AdbSubprocessProtocol` instance connecting to the spawned process.
32
+ */
33
+ shell(command?: string | string[], options?: Partial<AdbSubprocessOptions>): Promise<AdbSubprocessProtocol>;
34
+ /**
35
+ * Spawns an executable and redirect the standard input/output stream.
36
+ *
37
+ * Redirection mode is enough for most simple commands, but PTY mode is required for
38
+ * commands that manipulate the terminal, such as `vi` and `less`.
39
+ * @param command The command to run, or an array of strings containing both command and args.
40
+ * @param options The options for creating the `AdbSubprocessProtocol`
41
+ * @returns A new `AdbSubprocessProtocol` instance connecting to the spawned process.
42
+ */
43
+ spawn(command: string | string[], options?: Partial<AdbSubprocessOptions>): Promise<AdbSubprocessProtocol>;
44
+ /**
45
+ * Spawns a new process, waits until it exits, and returns the entire output.
46
+ * @param command The command to run
47
+ * @param options The options for creating the `AdbSubprocessProtocol`
48
+ * @returns The entire output of the command
49
+ */
50
+ spawnAndWait(command: string | string[], options?: Partial<AdbSubprocessOptions>): Promise<AdbSubprocessWaitResult>;
51
+ /**
52
+ * Spawns a new process, waits until it exits, and returns the entire output.
53
+ * @param command The command to run
54
+ * @returns The entire output of the command
55
+ */
56
+ spawnAndWaitLegacy(command: string | string[]): Promise<string>;
57
+ }
52
58
  //# sourceMappingURL=command.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/commands/subprocess/command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAGH,KAAK,qBAAqB,EAC1B,KAAK,gCAAgC,EACxC,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,oBAAoB;IACjC;;;;;;;;;;OAUG;IACH,SAAS,EAAE,gCAAgC,EAAE,CAAC;CACjD;AAMD,MAAM,WAAW,uBAAuB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,aAAc,SAAQ,cAAc;YAC/B,cAAc;IA6B5B;;;;;OAKG;IACI,KAAK,CACR,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EAC3B,OAAO,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,GACxC,OAAO,CAAC,qBAAqB,CAAC;IAIjC;;;;;OAKG;IACI,KAAK,CACR,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,GACxC,OAAO,CAAC,qBAAqB,CAAC;IAIjC;;;;;OAKG;IACU,YAAY,CACrB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,GACxC,OAAO,CAAC,uBAAuB,CAAC;IAmBnC;;;;OAIG;IACU,kBAAkB,CAC3B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAC3B,OAAO,CAAC,MAAM,CAAC;CAMrB"}
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/commands/subprocess/command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,KAAK,EACR,qBAAqB,EACrB,gCAAgC,EACnC,MAAM,sBAAsB,CAAC;AAM9B,MAAM,WAAW,oBAAoB;IACjC;;;;;;;;;;OAUG;IACH,SAAS,EAAE,gCAAgC,EAAE,CAAC;CACjD;AAMD,MAAM,WAAW,uBAAuB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,aAAc,SAAQ,cAAc;YAC/B,cAAc;IA6B5B;;;;;;;;OAQG;IACI,KAAK,CACR,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EAC3B,OAAO,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,GACxC,OAAO,CAAC,qBAAqB,CAAC;IAIjC;;;;;;;;OAQG;IACI,KAAK,CACR,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,GACxC,OAAO,CAAC,qBAAqB,CAAC;IAIjC;;;;;OAKG;IACU,YAAY,CACrB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,GACxC,OAAO,CAAC,uBAAuB,CAAC;IAmBnC;;;;OAIG;IACU,kBAAkB,CAC3B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAC3B,OAAO,CAAC,MAAM,CAAC;CAMrB"}
@@ -1,81 +1,87 @@
1
- import { DecodeUtf8Stream, GatherStringStream } from "@yume-chan/stream-extra";
2
- import { AdbCommandBase } from "../base.js";
3
- import { AdbSubprocessNoneProtocol, AdbSubprocessShellProtocol, } from "./protocols/index.js";
4
- const DEFAULT_OPTIONS = {
5
- protocols: [AdbSubprocessShellProtocol, AdbSubprocessNoneProtocol],
6
- };
7
- export class AdbSubprocess extends AdbCommandBase {
8
- async createProtocol(mode, command, options) {
9
- const { protocols } = { ...DEFAULT_OPTIONS, ...options };
10
- let Constructor;
11
- for (const item of protocols) {
12
- // It's async so can't use `Array#find`
13
- if (await item.isSupported(this.adb)) {
14
- Constructor = item;
15
- break;
16
- }
17
- }
18
- if (!Constructor) {
19
- throw new Error("No specified protocol is supported by the device");
20
- }
21
- if (Array.isArray(command)) {
22
- command = command.join(" ");
23
- }
24
- else if (command === undefined) {
25
- // spawn the default shell
26
- command = "";
27
- }
28
- return await Constructor[mode](this.adb, command);
29
- }
30
- /**
31
- * Spawns an executable in PTY (interactive) mode.
32
- * @param command The command to run. If omitted, the default shell will be spawned.
33
- * @param options The options for creating the `AdbSubprocessProtocol`
34
- * @returns A new `AdbSubprocessProtocol` instance connecting to the spawned process.
35
- */
36
- shell(command, options) {
37
- return this.createProtocol("pty", command, options);
38
- }
39
- /**
40
- * Spawns an executable and pipe the output.
41
- * @param command The command to run, or an array of strings containing both command and args.
42
- * @param options The options for creating the `AdbSubprocessProtocol`
43
- * @returns A new `AdbSubprocessProtocol` instance connecting to the spawned process.
44
- */
45
- spawn(command, options) {
46
- return this.createProtocol("raw", command, options);
47
- }
48
- /**
49
- * Spawns a new process, waits until it exits, and returns the entire output.
50
- * @param command The command to run
51
- * @param options The options for creating the `AdbSubprocessProtocol`
52
- * @returns The entire output of the command
53
- */
54
- async spawnAndWait(command, options) {
55
- const shell = await this.spawn(command, options);
56
- const stdout = new GatherStringStream();
57
- const stderr = new GatherStringStream();
58
- const [, , exitCode] = await Promise.all([
59
- shell.stdout.pipeThrough(new DecodeUtf8Stream()).pipeTo(stdout),
60
- shell.stderr.pipeThrough(new DecodeUtf8Stream()).pipeTo(stderr),
61
- shell.exit,
62
- ]);
63
- return {
64
- stdout: stdout.result,
65
- stderr: stderr.result,
66
- exitCode,
67
- };
68
- }
69
- /**
70
- * Spawns a new process, waits until it exits, and returns the entire output.
71
- * @param command The command to run
72
- * @returns The entire output of the command
73
- */
74
- async spawnAndWaitLegacy(command) {
75
- const { stdout } = await this.spawnAndWait(command, {
76
- protocols: [AdbSubprocessNoneProtocol],
77
- });
78
- return stdout;
79
- }
80
- }
1
+ import { DecodeUtf8Stream, GatherStringStream } from "@yume-chan/stream-extra";
2
+ import { AdbCommandBase } from "../base.js";
3
+ import { AdbSubprocessNoneProtocol, AdbSubprocessShellProtocol, } from "./protocols/index.js";
4
+ const DEFAULT_OPTIONS = {
5
+ protocols: [AdbSubprocessShellProtocol, AdbSubprocessNoneProtocol],
6
+ };
7
+ export class AdbSubprocess extends AdbCommandBase {
8
+ async createProtocol(mode, command, options) {
9
+ const { protocols } = { ...DEFAULT_OPTIONS, ...options };
10
+ let Constructor;
11
+ for (const item of protocols) {
12
+ // It's async so can't use `Array#find`
13
+ if (await item.isSupported(this.adb)) {
14
+ Constructor = item;
15
+ break;
16
+ }
17
+ }
18
+ if (!Constructor) {
19
+ throw new Error("No specified protocol is supported by the device");
20
+ }
21
+ if (Array.isArray(command)) {
22
+ command = command.join(" ");
23
+ }
24
+ else if (command === undefined) {
25
+ // spawn the default shell
26
+ command = "";
27
+ }
28
+ return await Constructor[mode](this.adb, command);
29
+ }
30
+ /**
31
+ * Spawns an executable in PTY mode.
32
+ *
33
+ * Redirection mode is enough for most simple commands, but PTY mode is required for
34
+ * commands that manipulate the terminal, such as `vi` and `less`.
35
+ * @param command The command to run. If omitted, the default shell will be spawned.
36
+ * @param options The options for creating the `AdbSubprocessProtocol`
37
+ * @returns A new `AdbSubprocessProtocol` instance connecting to the spawned process.
38
+ */
39
+ shell(command, options) {
40
+ return this.createProtocol("pty", command, options);
41
+ }
42
+ /**
43
+ * Spawns an executable and redirect the standard input/output stream.
44
+ *
45
+ * Redirection mode is enough for most simple commands, but PTY mode is required for
46
+ * commands that manipulate the terminal, such as `vi` and `less`.
47
+ * @param command The command to run, or an array of strings containing both command and args.
48
+ * @param options The options for creating the `AdbSubprocessProtocol`
49
+ * @returns A new `AdbSubprocessProtocol` instance connecting to the spawned process.
50
+ */
51
+ spawn(command, options) {
52
+ return this.createProtocol("raw", command, options);
53
+ }
54
+ /**
55
+ * Spawns a new process, waits until it exits, and returns the entire output.
56
+ * @param command The command to run
57
+ * @param options The options for creating the `AdbSubprocessProtocol`
58
+ * @returns The entire output of the command
59
+ */
60
+ async spawnAndWait(command, options) {
61
+ const shell = await this.spawn(command, options);
62
+ const stdout = new GatherStringStream();
63
+ const stderr = new GatherStringStream();
64
+ const [, , exitCode] = await Promise.all([
65
+ shell.stdout.pipeThrough(new DecodeUtf8Stream()).pipeTo(stdout),
66
+ shell.stderr.pipeThrough(new DecodeUtf8Stream()).pipeTo(stderr),
67
+ shell.exit,
68
+ ]);
69
+ return {
70
+ stdout: stdout.result,
71
+ stderr: stderr.result,
72
+ exitCode,
73
+ };
74
+ }
75
+ /**
76
+ * Spawns a new process, waits until it exits, and returns the entire output.
77
+ * @param command The command to run
78
+ * @returns The entire output of the command
79
+ */
80
+ async spawnAndWaitLegacy(command) {
81
+ const { stdout } = await this.spawnAndWait(command, {
82
+ protocols: [AdbSubprocessNoneProtocol],
83
+ });
84
+ return stdout;
85
+ }
86
+ }
81
87
  //# sourceMappingURL=command.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"command.js","sourceRoot":"","sources":["../../../src/commands/subprocess/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE/E,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EACH,yBAAyB,EACzB,0BAA0B,GAG7B,MAAM,sBAAsB,CAAC;AA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CAAC;QAEjD,MAAM,MAAM,GAAG,IAAI,kBAAkB,EAAE,CAAC;QACxC,MAAM,MAAM,GAAG,IAAI,kBAAkB,EAAE,CAAC;QAExC,MAAM,CAAC,EAAE,AAAD,EAAG,QAAQ,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACrC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,gBAAgB,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;YAC/D,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,gBAAgB,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;YAC/D,KAAK,CAAC,IAAI;SACb,CAAC,CAAC;QAEH,OAAO;YACH,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,QAAQ;SACX,CAAC;IACN,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,kBAAkB,CAC3B,OAA0B;QAE1B,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;YAChD,SAAS,EAAE,CAAC,yBAAyB,CAAC;SACzC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ"}
@@ -1,4 +1,4 @@
1
- export * from './command.js';
2
- export * from './protocols/index.js';
3
- export * from './utils.js';
1
+ export * from "./command.js";
2
+ export * from "./protocols/index.js";
3
+ export * from "./utils.js";
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- export * from './command.js';
2
- export * from './protocols/index.js';
3
- export * from './utils.js';
1
+ export * from "./command.js";
2
+ export * from "./protocols/index.js";
3
+ export * from "./utils.js";
4
4
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- export * from './none.js';
2
- export * from './shell.js';
3
- export * from './types.js';
1
+ export * from "./none.js";
2
+ export * from "./shell.js";
3
+ export * from "./types.js";
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- export * from './none.js';
2
- export * from './shell.js';
3
- export * from './types.js';
1
+ export * from "./none.js";
2
+ export * from "./shell.js";
3
+ export * from "./types.js";
4
4
  //# sourceMappingURL=index.js.map
@@ -1,36 +1,36 @@
1
- import { ReadableStream } from '@yume-chan/stream-extra';
2
- import { type Adb } from "../../../adb.js";
3
- import { type AdbSocket } from "../../../socket/index.js";
4
- import { type AdbSubprocessProtocol } from "./types.js";
5
- /**
6
- * The legacy shell
7
- *
8
- * Features:
9
- * * `stderr`: No
10
- * * `exit` exit code: No
11
- * * `resize`: No
12
- */
13
- export declare class AdbSubprocessNoneProtocol implements AdbSubprocessProtocol {
14
- static isSupported(): boolean;
15
- static pty(adb: Adb, command: string): Promise<AdbSubprocessNoneProtocol>;
16
- static raw(adb: Adb, command: string): Promise<AdbSubprocessNoneProtocol>;
17
- private readonly socket;
18
- private readonly duplex;
19
- get stdin(): import("@yume-chan/stream-extra").WritableStream<Uint8Array>;
20
- private _stdout;
21
- /**
22
- * Legacy shell mixes stdout and stderr.
23
- */
24
- get stdout(): ReadableStream<Uint8Array>;
25
- private _stderr;
26
- /**
27
- * `stderr` will always be empty.
28
- */
29
- get stderr(): ReadableStream<Uint8Array>;
30
- private _exit;
31
- get exit(): Promise<number>;
32
- constructor(socket: AdbSocket);
33
- resize(): void;
34
- kill(): Promise<void>;
35
- }
1
+ import { ReadableStream } from "@yume-chan/stream-extra";
2
+ import type { Adb } from "../../../adb.js";
3
+ import type { AdbSocket } from "../../../socket/index.js";
4
+ import type { AdbSubprocessProtocol } from "./types.js";
5
+ /**
6
+ * The legacy shell
7
+ *
8
+ * Features:
9
+ * * `stderr`: No
10
+ * * `exit` exit code: No
11
+ * * `resize`: No
12
+ */
13
+ export declare class AdbSubprocessNoneProtocol implements AdbSubprocessProtocol {
14
+ static isSupported(): boolean;
15
+ static pty(adb: Adb, command: string): Promise<AdbSubprocessNoneProtocol>;
16
+ static raw(adb: Adb, command: string): Promise<AdbSubprocessNoneProtocol>;
17
+ private readonly socket;
18
+ private readonly duplex;
19
+ get stdin(): import("@yume-chan/stream-extra").WritableStream<import("@yume-chan/stream-extra").Consumable<Uint8Array>>;
20
+ private _stdout;
21
+ /**
22
+ * Legacy shell mixes stdout and stderr.
23
+ */
24
+ get stdout(): ReadableStream<Uint8Array>;
25
+ private _stderr;
26
+ /**
27
+ * `stderr` will always be empty.
28
+ */
29
+ get stderr(): ReadableStream<Uint8Array>;
30
+ private _exit;
31
+ get exit(): Promise<number>;
32
+ constructor(socket: AdbSocket);
33
+ resize(): void;
34
+ kill(): Promise<void>;
35
+ }
36
36
  //# sourceMappingURL=none.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"none.d.ts","sourceRoot":"","sources":["../../../../src/commands/subprocess/protocols/none.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9E,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD;;;;;;;GAOG;AACH,qBAAa,yBAA0B,YAAW,qBAAqB;WACrD,WAAW;WAEL,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM;WAI7B,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM;IAMjD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAY;IAEnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA8C;IAGrE,IAAW,KAAK,iEAAmC;IAEnD,OAAO,CAAC,OAAO,CAA6B;IAC5C;;OAEG;IACH,IAAW,MAAM,+BAA2B;IAE5C,OAAO,CAAC,OAAO,CAA6B;IAC5C;;OAEG;IACH,IAAW,MAAM,+BAA2B;IAE5C,OAAO,CAAC,KAAK,CAAkB;IAC/B,IAAW,IAAI,oBAAyB;gBAErB,MAAM,EAAE,SAAS;IAgB7B,MAAM;IAIN,IAAI;CAGd"}
1
+ {"version":3,"file":"none.d.ts","sourceRoot":"","sources":["../../../../src/commands/subprocess/protocols/none.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD;;;;;;;GAOG;AACH,qBAAa,yBAA0B,YAAW,qBAAqB;WACrD,WAAW;WAIL,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM;WAM7B,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM;IAQjD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAY;IAEnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA8C;IAGrE,IAAW,KAAK,+GAEf;IAED,OAAO,CAAC,OAAO,CAA6B;IAC5C;;OAEG;IACH,IAAW,MAAM,+BAEhB;IAED,OAAO,CAAC,OAAO,CAA6B;IAC5C;;OAEG;IACH,IAAW,MAAM,+BAEhB;IAED,OAAO,CAAC,KAAK,CAAkB;IAC/B,IAAW,IAAI,oBAEd;gBAEkB,MAAM,EAAE,SAAS;IAgB7B,MAAM;IAIN,IAAI;CAGd"}
@@ -1,56 +1,66 @@
1
- import { DuplexStreamFactory, ReadableStream } from '@yume-chan/stream-extra';
2
- /**
3
- * The legacy shell
4
- *
5
- * Features:
6
- * * `stderr`: No
7
- * * `exit` exit code: No
8
- * * `resize`: No
9
- */
10
- export class AdbSubprocessNoneProtocol {
11
- static isSupported() { return true; }
12
- static async pty(adb, command) {
13
- return new AdbSubprocessNoneProtocol(await adb.createSocket(`shell:${command}`));
14
- }
15
- static async raw(adb, command) {
16
- // `shell,raw:${command}` also triggers raw mode,
17
- // But is not supported on Android version <7.
18
- return new AdbSubprocessNoneProtocol(await adb.createSocket(`exec:${command}`));
19
- }
20
- socket;
21
- duplex;
22
- // Legacy shell forwards all data to stdin.
23
- get stdin() { return this.socket.writable; }
24
- _stdout;
25
- /**
26
- * Legacy shell mixes stdout and stderr.
27
- */
28
- get stdout() { return this._stdout; }
29
- _stderr;
30
- /**
31
- * `stderr` will always be empty.
32
- */
33
- get stderr() { return this._stderr; }
34
- _exit;
35
- get exit() { return this._exit; }
36
- constructor(socket) {
37
- this.socket = socket;
38
- // Link `stdout`, `stderr` and `stdin` together,
39
- // so closing any of them will close the others.
40
- this.duplex = new DuplexStreamFactory({
41
- close: async () => {
42
- await this.socket.close();
43
- },
44
- });
45
- this._stdout = this.duplex.wrapReadable(this.socket.readable);
46
- this._stderr = this.duplex.wrapReadable(new ReadableStream());
47
- this._exit = this.duplex.closed.then(() => 0);
48
- }
49
- resize() {
50
- // Not supported, but don't throw.
51
- }
52
- kill() {
53
- return this.duplex.close();
54
- }
55
- }
1
+ import { DuplexStreamFactory, ReadableStream } from "@yume-chan/stream-extra";
2
+ /**
3
+ * The legacy shell
4
+ *
5
+ * Features:
6
+ * * `stderr`: No
7
+ * * `exit` exit code: No
8
+ * * `resize`: No
9
+ */
10
+ export class AdbSubprocessNoneProtocol {
11
+ static isSupported() {
12
+ return true;
13
+ }
14
+ static async pty(adb, command) {
15
+ return new AdbSubprocessNoneProtocol(await adb.createSocket(`shell:${command}`));
16
+ }
17
+ static async raw(adb, command) {
18
+ // `shell,raw:${command}` also triggers raw mode,
19
+ // But is not supported on Android version <7.
20
+ return new AdbSubprocessNoneProtocol(await adb.createSocket(`exec:${command}`));
21
+ }
22
+ socket;
23
+ duplex;
24
+ // Legacy shell forwards all data to stdin.
25
+ get stdin() {
26
+ return this.socket.writable;
27
+ }
28
+ _stdout;
29
+ /**
30
+ * Legacy shell mixes stdout and stderr.
31
+ */
32
+ get stdout() {
33
+ return this._stdout;
34
+ }
35
+ _stderr;
36
+ /**
37
+ * `stderr` will always be empty.
38
+ */
39
+ get stderr() {
40
+ return this._stderr;
41
+ }
42
+ _exit;
43
+ get exit() {
44
+ return this._exit;
45
+ }
46
+ constructor(socket) {
47
+ this.socket = socket;
48
+ // Link `stdout`, `stderr` and `stdin` together,
49
+ // so closing any of them will close the others.
50
+ this.duplex = new DuplexStreamFactory({
51
+ close: async () => {
52
+ await this.socket.close();
53
+ },
54
+ });
55
+ this._stdout = this.duplex.wrapReadable(this.socket.readable);
56
+ this._stderr = this.duplex.wrapReadable(new ReadableStream());
57
+ this._exit = this.duplex.closed.then(() => 0);
58
+ }
59
+ resize() {
60
+ // Not supported, but don't throw.
61
+ }
62
+ kill() {
63
+ return this.duplex.close();
64
+ }
65
+ }
56
66
  //# sourceMappingURL=none.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"none.js","sourceRoot":"","sources":["../../../../src/commands/subprocess/protocols/none.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAO9E;;;;;;;GAOG;AACH,MAAM,OAAO,yBAAyB;IAC3B,MAAM,CAAC,WAAW,KAAK,OAAO,IAAI,CAAC,CAAC,CAAC;IAErC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,GAAQ,EAAE,OAAe;QAC7C,OAAO,IAAI,yBAAyB,CAAC,MAAM,GAAG,CAAC,YAAY,CAAC,SAAS,OAAO,EAAE,CAAC,CAAC,CAAC;IACrF,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,GAAQ,EAAE,OAAe;QAC7C,iDAAiD;QACjD,8CAA8C;QAC9C,OAAO,IAAI,yBAAyB,CAAC,MAAM,GAAG,CAAC,YAAY,CAAC,QAAQ,OAAO,EAAE,CAAC,CAAC,CAAC;IACpF,CAAC;IAEgB,MAAM,CAAY;IAElB,MAAM,CAA8C;IAErE,2CAA2C;IAC3C,I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