@lynx-js/devtool-connector 0.0.0 → 0.1.1

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.
@@ -0,0 +1,8 @@
1
+ import { TransformStream } from 'node:stream/web';
2
+ import type { Response } from '../types.ts';
3
+ export declare class PeertalkToMessageTransformStream extends TransformStream<Uint8Array, Response> {
4
+ constructor();
5
+ }
6
+ export declare class MessageToPeertalkTransformStream<TMessage = unknown> extends TransformStream<TMessage, Uint8Array> {
7
+ constructor();
8
+ }
@@ -0,0 +1,7 @@
1
+ import { TransformStream } from 'node:stream/web';
2
+ export declare class FilterTransformStream<T, P extends T> extends TransformStream<T, P> {
3
+ constructor(filter: (chunk: T) => chunk is P);
4
+ }
5
+ export declare class InspectStream<T> extends TransformStream<T, T> {
6
+ constructor(callback: (message: T) => void);
7
+ }
@@ -0,0 +1 @@
1
+ export declare function takeoverDebugRouterLock(): Promise<void>;
@@ -0,0 +1,12 @@
1
+ import type { SocketConnectOpts } from 'node:net';
2
+ import type { App, Connection, Device, OpenAppOptions, Transport, TransportConnectOptions } from './transport.js';
3
+ export declare class AndroidTransport implements Transport {
4
+ #private;
5
+ constructor(spec?: SocketConnectOpts);
6
+ close(): Promise<void>;
7
+ connect({ deviceId, port, signal }: TransportConnectOptions): Promise<Connection>;
8
+ withConnection<T>(options: TransportConnectOptions, callback: (conn: Connection) => Promise<T>): Promise<T>;
9
+ listDevices(): Promise<Device[]>;
10
+ listAvailableApps(deviceId: string): Promise<App[]>;
11
+ openApp(deviceId: string, packageName: string, { withDataCleared }?: OpenAppOptions): Promise<void>;
12
+ }
@@ -0,0 +1,8 @@
1
+ import type { App, Connection, Device, Transport, TransportConnectOptions } from './transport.ts';
2
+ export declare class DesktopTransport implements Transport {
3
+ close(): Promise<void>;
4
+ listDevices(): Promise<Device[]>;
5
+ listAvailableApps(): Promise<App[]>;
6
+ openApp(): Promise<void>;
7
+ connect({ deviceId, port, signal, }: TransportConnectOptions): Promise<Connection>;
8
+ }
@@ -0,0 +1,4 @@
1
+ export * from './android.ts';
2
+ export * from './desktop.ts';
3
+ export * from './ios.ts';
4
+ export * from './transport.ts';