@yume-chan/adb 0.0.16 → 0.0.18
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.
- package/CHANGELOG.json +18 -0
- package/CHANGELOG.md +13 -1
- package/LICENSE +1 -1
- package/esm/adb.d.ts +13 -8
- package/esm/adb.d.ts.map +1 -1
- package/esm/adb.js +63 -38
- package/esm/adb.js.map +1 -1
- package/esm/auth.d.ts +4 -4
- package/esm/auth.d.ts.map +1 -1
- package/esm/auth.js +6 -6
- package/esm/auth.js.map +1 -1
- package/esm/backend.d.ts +3 -3
- package/esm/backend.d.ts.map +1 -1
- package/esm/commands/base.d.ts +2 -2
- package/esm/commands/base.d.ts.map +1 -1
- package/esm/commands/base.js +1 -1
- package/esm/commands/base.js.map +1 -1
- package/esm/commands/framebuffer.d.ts +22 -6
- package/esm/commands/framebuffer.d.ts.map +1 -1
- package/esm/commands/framebuffer.js +33 -45
- package/esm/commands/framebuffer.js.map +1 -1
- package/esm/commands/install.d.ts +2 -2
- package/esm/commands/install.d.ts.map +1 -1
- package/esm/commands/install.js +12 -5
- package/esm/commands/install.js.map +1 -1
- package/esm/commands/power.d.ts.map +1 -1
- package/esm/commands/power.js +13 -9
- package/esm/commands/power.js.map +1 -1
- package/esm/commands/reverse.d.ts +5 -5
- package/esm/commands/reverse.d.ts.map +1 -1
- package/esm/commands/reverse.js +20 -18
- package/esm/commands/reverse.js.map +1 -1
- package/esm/commands/subprocess/command.d.ts +52 -0
- package/esm/commands/subprocess/command.d.ts.map +1 -0
- package/esm/commands/subprocess/command.js +81 -0
- package/esm/commands/subprocess/command.js.map +1 -0
- package/esm/commands/subprocess/index.d.ts +1 -53
- package/esm/commands/subprocess/index.d.ts.map +1 -1
- package/esm/commands/subprocess/index.js +1 -85
- package/esm/commands/subprocess/index.js.map +1 -1
- package/esm/commands/subprocess/protocols/none.d.ts +5 -5
- package/esm/commands/subprocess/protocols/none.d.ts.map +1 -1
- package/esm/commands/subprocess/protocols/none.js +5 -3
- package/esm/commands/subprocess/protocols/none.js.map +1 -1
- package/esm/commands/subprocess/protocols/shell.d.ts +4 -4
- package/esm/commands/subprocess/protocols/shell.d.ts.map +1 -1
- package/esm/commands/subprocess/protocols/shell.js +28 -20
- package/esm/commands/subprocess/protocols/shell.js.map +1 -1
- package/esm/commands/subprocess/protocols/types.d.ts +7 -7
- package/esm/commands/subprocess/protocols/types.d.ts.map +1 -1
- package/esm/commands/sync/index.d.ts +1 -1
- package/esm/commands/sync/index.d.ts.map +1 -1
- package/esm/commands/sync/index.js +1 -1
- package/esm/commands/sync/index.js.map +1 -1
- package/esm/commands/sync/list.d.ts +7 -7
- package/esm/commands/sync/list.d.ts.map +1 -1
- package/esm/commands/sync/list.js +34 -50
- package/esm/commands/sync/list.js.map +1 -1
- package/esm/commands/sync/pull.d.ts +5 -4
- package/esm/commands/sync/pull.d.ts.map +1 -1
- package/esm/commands/sync/pull.js +21 -22
- package/esm/commands/sync/pull.js.map +1 -1
- package/esm/commands/sync/push.d.ts +4 -4
- package/esm/commands/sync/push.d.ts.map +1 -1
- package/esm/commands/sync/push.js +7 -11
- package/esm/commands/sync/push.js.map +1 -1
- package/esm/commands/sync/request.d.ts +4 -4
- package/esm/commands/sync/request.d.ts.map +1 -1
- package/esm/commands/sync/request.js +6 -6
- package/esm/commands/sync/request.js.map +1 -1
- package/esm/commands/sync/response.d.ts +5 -10
- package/esm/commands/sync/response.d.ts.map +1 -1
- package/esm/commands/sync/response.js +35 -26
- package/esm/commands/sync/response.js.map +1 -1
- package/esm/commands/sync/stat.d.ts +7 -7
- package/esm/commands/sync/stat.d.ts.map +1 -1
- package/esm/commands/sync/stat.js +48 -55
- package/esm/commands/sync/stat.js.map +1 -1
- package/esm/commands/sync/sync.d.ts +7 -7
- package/esm/commands/sync/sync.d.ts.map +1 -1
- package/esm/commands/sync/sync.js +25 -22
- package/esm/commands/sync/sync.js.map +1 -1
- package/esm/crypto.d.ts.map +1 -1
- package/esm/crypto.js +26 -16
- package/esm/crypto.js.map +1 -1
- package/esm/index.d.ts +9 -10
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +9 -10
- package/esm/index.js.map +1 -1
- package/esm/packet.d.ts +8 -8
- package/esm/packet.d.ts.map +1 -1
- package/esm/packet.js +14 -12
- package/esm/packet.js.map +1 -1
- package/esm/socket/dispatcher.d.ts +11 -6
- package/esm/socket/dispatcher.d.ts.map +1 -1
- package/esm/socket/dispatcher.js +28 -20
- package/esm/socket/dispatcher.js.map +1 -1
- package/esm/socket/index.d.ts +1 -1
- package/esm/socket/index.d.ts.map +1 -1
- package/esm/socket/index.js +1 -1
- package/esm/socket/index.js.map +1 -1
- package/esm/socket/socket.d.ts +5 -5
- package/esm/socket/socket.d.ts.map +1 -1
- package/esm/socket/socket.js +37 -17
- package/esm/socket/socket.js.map +1 -1
- package/esm/utils/auto-reset-event.d.ts +1 -1
- package/esm/utils/auto-reset-event.d.ts.map +1 -1
- package/esm/utils/auto-reset-event.js +2 -2
- package/esm/utils/base64.d.ts +23 -0
- package/esm/utils/base64.d.ts.map +1 -1
- package/esm/utils/base64.js +36 -29
- package/esm/utils/base64.js.map +1 -1
- package/package.json +19 -17
- package/src/adb.ts +140 -86
- package/src/auth.ts +27 -18
- package/src/backend.ts +7 -4
- package/src/commands/base.ts +3 -2
- package/src/commands/framebuffer.ts +48 -47
- package/src/commands/install.ts +20 -10
- package/src/commands/power.ts +14 -10
- package/src/commands/reverse.ts +53 -33
- package/src/commands/subprocess/command.ts +134 -0
- package/src/commands/subprocess/index.ts +1 -137
- package/src/commands/subprocess/protocols/none.ts +10 -6
- package/src/commands/subprocess/protocols/shell.ts +72 -39
- package/src/commands/subprocess/protocols/types.ts +12 -8
- package/src/commands/sync/index.ts +1 -1
- package/src/commands/sync/list.ts +63 -68
- package/src/commands/sync/pull.ts +53 -37
- package/src/commands/sync/push.ts +26 -15
- package/src/commands/sync/request.ts +20 -21
- package/src/commands/sync/response.ts +63 -53
- package/src/commands/sync/stat.ts +91 -90
- package/src/commands/sync/sync.ts +56 -34
- package/src/crypto.ts +61 -33
- package/src/features.ts +1 -1
- package/src/index.ts +9 -11
- package/src/packet.ts +40 -30
- package/src/socket/dispatcher.ts +119 -77
- package/src/socket/index.ts +1 -1
- package/src/socket/socket.ts +68 -26
- package/src/utils/auto-reset-event.ts +3 -3
- package/src/utils/base64.ts +75 -42
- package/tsconfig.build.json +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/esm/stream/buffered.d.ts +0 -39
- package/esm/stream/buffered.d.ts.map +0 -1
- package/esm/stream/buffered.js +0 -143
- package/esm/stream/buffered.js.map +0 -1
- package/esm/stream/detect.d.ts +0 -2
- package/esm/stream/detect.d.ts.map +0 -1
- package/esm/stream/detect.js +0 -6
- package/esm/stream/detect.js.map +0 -1
- package/esm/stream/detect.native.d.ts +0 -240
- package/esm/stream/detect.native.d.ts.map +0 -1
- package/esm/stream/detect.native.js +0 -60
- package/esm/stream/detect.native.js.map +0 -1
- package/esm/stream/detect.polyfill.d.ts +0 -18
- package/esm/stream/detect.polyfill.d.ts.map +0 -1
- package/esm/stream/detect.polyfill.js +0 -4
- package/esm/stream/detect.polyfill.js.map +0 -1
- package/esm/stream/index.d.ts +0 -4
- package/esm/stream/index.d.ts.map +0 -1
- package/esm/stream/index.js +0 -4
- package/esm/stream/index.js.map +0 -1
- package/esm/stream/transform.d.ts +0 -124
- package/esm/stream/transform.d.ts.map +0 -1
- package/esm/stream/transform.js +0 -379
- package/esm/stream/transform.js.map +0 -1
- package/src/stream/buffered.ts +0 -168
- package/src/stream/detect.native.ts +0 -362
- package/src/stream/detect.polyfill.ts +0 -22
- package/src/stream/detect.ts +0 -7
- package/src/stream/index.ts +0 -3
- package/src/stream/transform.ts +0 -474
- package/tsconfig.test.json +0 -9
- package/web-streams-polyfill-4.0.0-beta.2.tgz +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PromiseResolver } from
|
|
1
|
+
import { PromiseResolver } from "@yume-chan/async";
|
|
2
2
|
export class AutoResetEvent {
|
|
3
3
|
list = [];
|
|
4
4
|
blocking;
|
|
@@ -26,7 +26,7 @@ export class AutoResetEvent {
|
|
|
26
26
|
}
|
|
27
27
|
dispose() {
|
|
28
28
|
for (const item of this.list) {
|
|
29
|
-
item.reject(new Error(
|
|
29
|
+
item.reject(new Error("The AutoResetEvent has been disposed"));
|
|
30
30
|
}
|
|
31
31
|
this.list.length = 0;
|
|
32
32
|
}
|
package/esm/utils/base64.d.ts
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculate the required length of the output buffer for the given input length.
|
|
3
|
+
*
|
|
4
|
+
* @param inputLength Length of the input in bytes
|
|
5
|
+
* @returns Length of the output in bytes
|
|
6
|
+
*/
|
|
1
7
|
export declare function calculateBase64EncodedLength(inputLength: number): [outputLength: number, paddingLength: number];
|
|
8
|
+
/**
|
|
9
|
+
* Encode the given input buffer into base64.
|
|
10
|
+
*
|
|
11
|
+
* @param input The input buffer
|
|
12
|
+
* @returns The encoded output buffer
|
|
13
|
+
*/
|
|
2
14
|
export declare function encodeBase64(input: Uint8Array): Uint8Array;
|
|
15
|
+
/**
|
|
16
|
+
* Encode the given input into base64 and write it to the output buffer.
|
|
17
|
+
*
|
|
18
|
+
* The output buffer must be at least as long as the value returned by `calculateBase64EncodedLength`.
|
|
19
|
+
* It can points to the same buffer as the input, as long as `output.offset <= input.offset - input.length / 3`,
|
|
20
|
+
* or `output.offset >= input.offset - 1`
|
|
21
|
+
*
|
|
22
|
+
* @param input The input buffer
|
|
23
|
+
* @param output The output buffer
|
|
24
|
+
* @returns The number of bytes written to the output buffer
|
|
25
|
+
*/
|
|
3
26
|
export declare function encodeBase64(input: Uint8Array, output: Uint8Array): number;
|
|
4
27
|
export declare function decodeBase64(input: string): Uint8Array;
|
|
5
28
|
//# sourceMappingURL=base64.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../src/utils/base64.ts"],"names":[],"mappings":"AAqBA,wBAAgB,4BAA4B,
|
|
1
|
+
{"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../src/utils/base64.ts"],"names":[],"mappings":"AAqBA;;;;;GAKG;AACH,wBAAgB,4BAA4B,CACxC,WAAW,EAAE,MAAM,GACpB,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,CAI/C;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CAAC;AAC5D;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC;AAiO5E,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CA4DtD"}
|
package/esm/utils/base64.js
CHANGED
|
@@ -1,24 +1,30 @@
|
|
|
1
|
-
//
|
|
2
|
-
const charToIndex =
|
|
1
|
+
// Array is faster than object literal or `Map`
|
|
2
|
+
const charToIndex = [];
|
|
3
3
|
const indexToChar = [];
|
|
4
|
-
const paddingChar =
|
|
4
|
+
const paddingChar = "=".charCodeAt(0);
|
|
5
5
|
function addRange(start, end) {
|
|
6
6
|
const charCodeStart = start.charCodeAt(0);
|
|
7
7
|
const charCodeEnd = end.charCodeAt(0);
|
|
8
8
|
for (let charCode = charCodeStart; charCode <= charCodeEnd; charCode += 1) {
|
|
9
|
-
charToIndex[
|
|
9
|
+
charToIndex[charCode] = indexToChar.length;
|
|
10
10
|
indexToChar.push(charCode);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
addRange(
|
|
14
|
-
addRange(
|
|
15
|
-
addRange(
|
|
16
|
-
addRange(
|
|
17
|
-
addRange(
|
|
13
|
+
addRange("A", "Z");
|
|
14
|
+
addRange("a", "z");
|
|
15
|
+
addRange("0", "9");
|
|
16
|
+
addRange("+", "+");
|
|
17
|
+
addRange("/", "/");
|
|
18
|
+
/**
|
|
19
|
+
* Calculate the required length of the output buffer for the given input length.
|
|
20
|
+
*
|
|
21
|
+
* @param inputLength Length of the input in bytes
|
|
22
|
+
* @returns Length of the output in bytes
|
|
23
|
+
*/
|
|
18
24
|
export function calculateBase64EncodedLength(inputLength) {
|
|
19
25
|
const remainder = inputLength % 3;
|
|
20
26
|
const paddingLength = remainder !== 0 ? 3 - remainder : 0;
|
|
21
|
-
return [(inputLength + paddingLength) / 3 * 4, paddingLength];
|
|
27
|
+
return [((inputLength + paddingLength) / 3) * 4, paddingLength];
|
|
22
28
|
}
|
|
23
29
|
export function encodeBase64(input, output) {
|
|
24
30
|
const [outputLength, paddingLength] = calculateBase64EncodedLength(input.length);
|
|
@@ -29,7 +35,7 @@ export function encodeBase64(input, output) {
|
|
|
29
35
|
}
|
|
30
36
|
else {
|
|
31
37
|
if (output.length < outputLength) {
|
|
32
|
-
throw new Error(
|
|
38
|
+
throw new Error("output buffer is too small");
|
|
33
39
|
}
|
|
34
40
|
output = output.subarray(0, outputLength);
|
|
35
41
|
// When input and output are on same ArrayBuffer,
|
|
@@ -37,7 +43,8 @@ export function encodeBase64(input, output) {
|
|
|
37
43
|
if (input.buffer !== output.buffer) {
|
|
38
44
|
encodeForward(input, output, paddingLength);
|
|
39
45
|
}
|
|
40
|
-
else if (output.byteOffset + output.length - (paddingLength + 1) <=
|
|
46
|
+
else if (output.byteOffset + output.length - (paddingLength + 1) <=
|
|
47
|
+
input.byteOffset + input.length) {
|
|
41
48
|
// Output ends before input ends
|
|
42
49
|
// So output won't catch up with input.
|
|
43
50
|
// Depends on padding length,
|
|
@@ -70,7 +77,7 @@ export function encodeBase64(input, output) {
|
|
|
70
77
|
else {
|
|
71
78
|
// Input is in the middle of output,
|
|
72
79
|
// not possible to read neither first or last three bytes,
|
|
73
|
-
throw new Error(
|
|
80
|
+
throw new Error("input and output cannot overlap");
|
|
74
81
|
}
|
|
75
82
|
return outputLength;
|
|
76
83
|
}
|
|
@@ -107,7 +114,7 @@ function encodeForward(input, output, paddingLength) {
|
|
|
107
114
|
inputIndex += 1;
|
|
108
115
|
output[outputIndex] = indexToChar[x >> 2];
|
|
109
116
|
outputIndex += 1;
|
|
110
|
-
output[outputIndex] = indexToChar[(
|
|
117
|
+
output[outputIndex] = indexToChar[(x & 0b11) << 4];
|
|
111
118
|
outputIndex += 1;
|
|
112
119
|
output[outputIndex] = paddingChar;
|
|
113
120
|
outputIndex += 1;
|
|
@@ -126,7 +133,7 @@ function encodeForward(input, output, paddingLength) {
|
|
|
126
133
|
outputIndex += 1;
|
|
127
134
|
output[outputIndex] = indexToChar[((x & 0b11) << 4) | (y >> 4)];
|
|
128
135
|
outputIndex += 1;
|
|
129
|
-
output[outputIndex] = indexToChar[(
|
|
136
|
+
output[outputIndex] = indexToChar[(y & 0b1111) << 2];
|
|
130
137
|
outputIndex += 1;
|
|
131
138
|
output[outputIndex] = paddingChar;
|
|
132
139
|
}
|
|
@@ -143,7 +150,7 @@ function encodeBackward(input, output, paddingLength) {
|
|
|
143
150
|
outputIndex -= 1;
|
|
144
151
|
output[outputIndex] = paddingChar;
|
|
145
152
|
outputIndex -= 1;
|
|
146
|
-
output[outputIndex] = indexToChar[(
|
|
153
|
+
output[outputIndex] = indexToChar[(x & 0b11) << 4];
|
|
147
154
|
outputIndex -= 1;
|
|
148
155
|
output[outputIndex] = indexToChar[x >> 2];
|
|
149
156
|
outputIndex -= 1;
|
|
@@ -159,7 +166,7 @@ function encodeBackward(input, output, paddingLength) {
|
|
|
159
166
|
inputIndex -= 1;
|
|
160
167
|
output[outputIndex] = paddingChar;
|
|
161
168
|
outputIndex -= 1;
|
|
162
|
-
output[outputIndex] = indexToChar[(
|
|
169
|
+
output[outputIndex] = indexToChar[(y & 0b1111) << 2];
|
|
163
170
|
outputIndex -= 1;
|
|
164
171
|
output[outputIndex] = indexToChar[((x & 0b11) << 4) | (y >> 4)];
|
|
165
172
|
outputIndex -= 1;
|
|
@@ -191,26 +198,26 @@ function encodeBackward(input, output, paddingLength) {
|
|
|
191
198
|
}
|
|
192
199
|
export function decodeBase64(input) {
|
|
193
200
|
let padding;
|
|
194
|
-
if (input[input.length - 2] ===
|
|
201
|
+
if (input[input.length - 2] === "=") {
|
|
195
202
|
padding = 2;
|
|
196
203
|
}
|
|
197
|
-
else if (input[input.length - 1] ===
|
|
204
|
+
else if (input[input.length - 1] === "=") {
|
|
198
205
|
padding = 1;
|
|
199
206
|
}
|
|
200
207
|
else {
|
|
201
208
|
padding = 0;
|
|
202
209
|
}
|
|
203
|
-
const result = new Uint8Array(input.length / 4 * 3 - padding);
|
|
210
|
+
const result = new Uint8Array((input.length / 4) * 3 - padding);
|
|
204
211
|
let sIndex = 0;
|
|
205
212
|
let dIndex = 0;
|
|
206
213
|
while (sIndex < input.length - (padding !== 0 ? 4 : 0)) {
|
|
207
|
-
const a = charToIndex[input
|
|
214
|
+
const a = charToIndex[input.charCodeAt(sIndex)];
|
|
208
215
|
sIndex += 1;
|
|
209
|
-
const b = charToIndex[input
|
|
216
|
+
const b = charToIndex[input.charCodeAt(sIndex)];
|
|
210
217
|
sIndex += 1;
|
|
211
|
-
const c = charToIndex[input
|
|
218
|
+
const c = charToIndex[input.charCodeAt(sIndex)];
|
|
212
219
|
sIndex += 1;
|
|
213
|
-
const d = charToIndex[input
|
|
220
|
+
const d = charToIndex[input.charCodeAt(sIndex)];
|
|
214
221
|
sIndex += 1;
|
|
215
222
|
result[dIndex] = (a << 2) | ((b & 48) >> 4);
|
|
216
223
|
dIndex += 1;
|
|
@@ -220,19 +227,19 @@ export function decodeBase64(input) {
|
|
|
220
227
|
dIndex += 1;
|
|
221
228
|
}
|
|
222
229
|
if (padding === 1) {
|
|
223
|
-
const a = charToIndex[input
|
|
230
|
+
const a = charToIndex[input.charCodeAt(sIndex)];
|
|
224
231
|
sIndex += 1;
|
|
225
|
-
const b = charToIndex[input
|
|
232
|
+
const b = charToIndex[input.charCodeAt(sIndex)];
|
|
226
233
|
sIndex += 1;
|
|
227
|
-
const c = charToIndex[input
|
|
234
|
+
const c = charToIndex[input.charCodeAt(sIndex)];
|
|
228
235
|
result[dIndex] = (a << 2) | ((b & 48) >> 4);
|
|
229
236
|
dIndex += 1;
|
|
230
237
|
result[dIndex] = ((b & 0b1111) << 4) | ((c & 60) >> 2);
|
|
231
238
|
}
|
|
232
239
|
else if (padding === 2) {
|
|
233
|
-
const a = charToIndex[input
|
|
240
|
+
const a = charToIndex[input.charCodeAt(sIndex)];
|
|
234
241
|
sIndex += 1;
|
|
235
|
-
const b = charToIndex[input
|
|
242
|
+
const b = charToIndex[input.charCodeAt(sIndex)];
|
|
236
243
|
result[dIndex] = (a << 2) | ((b & 48) >> 4);
|
|
237
244
|
}
|
|
238
245
|
return result;
|
package/esm/utils/base64.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base64.js","sourceRoot":"","sources":["../../src/utils/base64.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"base64.js","sourceRoot":"","sources":["../../src/utils/base64.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,MAAM,WAAW,GAAa,EAAE,CAAC;AACjC,MAAM,WAAW,GAAa,EAAE,CAAC;AACjC,MAAM,WAAW,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAEtC,SAAS,QAAQ,CAAC,KAAa,EAAE,GAAW;IACxC,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAC1C,MAAM,WAAW,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAEtC,KAAK,IAAI,QAAQ,GAAG,aAAa,EAAE,QAAQ,IAAI,WAAW,EAAE,QAAQ,IAAI,CAAC,EAAE;QACvE,WAAW,CAAC,QAAQ,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC;QAC3C,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KAC9B;AACL,CAAC;AAED,Q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K,CAAC,UAAU,CAAC,MAAM,CAAC,CAAE,CAAC;QACjD,MAAM,IAAI,CAAC,CAAC;QAEZ,MAAM,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAE,CAAC;QACjD,MAAM,IAAI,CAAC,CAAC;QAEZ,MAAM,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAE,CAAC;QAEjD,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAS,CAAC,IAAI,CAAC,CAAC,CAAC;QACnD,MAAM,IAAI,CAAC,CAAC;QAEZ,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAS,CAAC,IAAI,CAAC,CAAC,CAAC;KACjE;SAAM,IAAI,OAAO,KAAK,CAAC,EAAE;QACtB,MAAM,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAE,CAAC;QACjD,MAAM,IAAI,CAAC,CAAC;QAEZ,MAAM,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAE,CAAC;QAEjD,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAS,CAAC,IAAI,CAAC,CAAC,CAAC;KACtD;IAED,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yume-chan/adb",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"description": "TypeScript implementation of Android Debug Bridge (ADB) protocol.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"adb",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"email": "cnsimonchan@live.com",
|
|
13
13
|
"url": "https://chensi.moe/blog"
|
|
14
14
|
},
|
|
15
|
-
"homepage": "https://github.com/yume-chan/ya-webadb/tree/
|
|
15
|
+
"homepage": "https://github.com/yume-chan/ya-webadb/tree/main/libraries/adb#readme",
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
18
|
"url": "git+https://github.com/yume-chan/ya-webadb.git",
|
|
@@ -25,26 +25,28 @@
|
|
|
25
25
|
"main": "esm/index.js",
|
|
26
26
|
"types": "esm/index.d.ts",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@yume-chan/async": "^2.
|
|
29
|
-
"@yume-chan/dataview-bigint-polyfill": "^0.0.
|
|
30
|
-
"@yume-chan/event": "^0.0.
|
|
31
|
-
"@yume-chan/
|
|
32
|
-
"
|
|
33
|
-
"
|
|
28
|
+
"@yume-chan/async": "^2.2.0",
|
|
29
|
+
"@yume-chan/dataview-bigint-polyfill": "^0.0.18",
|
|
30
|
+
"@yume-chan/event": "^0.0.18",
|
|
31
|
+
"@yume-chan/stream-extra": "^0.0.18",
|
|
32
|
+
"@yume-chan/struct": "^0.0.18",
|
|
33
|
+
"tslib": "^2.4.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@jest/globals": "^
|
|
37
|
-
"@types/node": "^
|
|
38
|
-
"@yume-chan/
|
|
36
|
+
"@jest/globals": "^29.3.1",
|
|
37
|
+
"@types/node": "^18.11.18",
|
|
38
|
+
"@yume-chan/eslint-config": "^1.0.0",
|
|
39
|
+
"@yume-chan/tsconfig": "^1.0.0",
|
|
39
40
|
"cross-env": "^7.0.3",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
41
|
+
"eslint": "^8.31.0",
|
|
42
|
+
"jest": "^29.3.1",
|
|
43
|
+
"ts-jest": "^29.0.4",
|
|
44
|
+
"typescript": "^4.9.4"
|
|
43
45
|
},
|
|
44
46
|
"scripts": {
|
|
45
47
|
"build": "tsc -b tsconfig.build.json",
|
|
46
48
|
"build:watch": "tsc -b tsconfig.build.json",
|
|
47
|
-
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage"
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage",
|
|
50
|
+
"lint": "eslint src/**/*.ts --fix"
|
|
51
|
+
}
|
|
50
52
|
}
|