chore: experimental moving to rush

This commit is contained in:
Simon Chan 2021-05-14 15:31:59 +08:00
parent 963ac49d14
commit d80288ec9b
209 changed files with 9508 additions and 27413 deletions

View file

@ -0,0 +1,21 @@
import { AdbCommandBase } from './base';
export class AdbTcpIpCommand extends AdbCommandBase {
public async setPort(port: number): Promise<void> {
if (port <= 0) {
throw new Error(`Invalid port ${port}`);
}
const output = await this.adb.createSocketAndReadAll(`tcpip:${port}`);
if (output !== `restarting in TCP mode port: ${port}\n`) {
throw new Error('Invalid response');
}
}
public async disable(): Promise<void> {
const output = await this.adb.createSocketAndReadAll('usb:');
if (output !== 'restarting in USB mode\n') {
throw new Error('Invalid response');
}
}
}