@lynx-js/devtool-connector 0.19.0 → 0.19.2
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.md +32 -0
- package/dist/2.js +1 -1
- package/dist/a.js +9305 -566
- package/dist/az.js +616 -0
- package/dist/daemon/entry.js +5 -3
- package/dist/daemon/index.js +1 -1
- package/dist/f.js +4 -4
- package/dist/f1.js +201 -135
- package/dist/h.js +143 -9426
- package/dist/h6.js +578 -0
- package/dist/index.js +2 -2
- package/dist/main.js +1 -1
- package/dist/streams/index.js +1 -1
- package/dist/t.js +2472 -1274
- package/dist/transport/hdt.d.ts +15 -0
- package/dist/transport/index.d.ts +1 -0
- package/dist/transport/index.js +2 -1
- package/dist/transport/peertalk.d.ts +0 -3
- package/dist/transport/simulator.d.ts +62 -0
- package/dist/tw.js +1397 -0
- package/dist/ws-stream.js +2 -2
- package/package.json +7 -5
- package/public/simulator/bind-darwin-arm64.dylib +0 -0
- package/public/simulator/bind-darwin-x64.dylib +0 -0
- package/public/simulator/bind-linux-x64.so +0 -0
- package/public/simulator/entry.mjs +68 -0
- package/public/simulator/extensions.mjs +230 -0
- package/dist/hb.js +0 -203
- package/dist/u.js +0 -2525
package/dist/transport/hdt.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ReadableStream } from "node:stream/web";
|
|
2
|
+
import { WritableStream } from "node:stream/web";
|
|
1
3
|
import type { App, Client, Connection, Device, Transport, TransportConnectOptions } from "./transport.js";
|
|
2
4
|
export declare class HDTTransport implements Transport {
|
|
3
5
|
#private;
|
|
@@ -11,4 +13,17 @@ export declare class HDTTransport implements Transport {
|
|
|
11
13
|
listAvailableApps(): Promise<App[]>;
|
|
12
14
|
openApp(): Promise<void>;
|
|
13
15
|
connect<TInput = unknown, TOutput = unknown>(options: TransportConnectOptions): Promise<Connection<TOutput, TInput>>;
|
|
16
|
+
protected filterClient(client: Client): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Read messages from the stream until one with the specified event type is found.
|
|
19
|
+
* Earlier messages are discarded. This is used during the handshake to wait for
|
|
20
|
+
* server acknowledgments (Registered, RoomJoined) before proceeding.
|
|
21
|
+
*/
|
|
22
|
+
protected readUntilEvent(readable: ReadableStream<string>, eventName: string, signal?: AbortSignal): Promise<{
|
|
23
|
+
event: string;
|
|
24
|
+
data: unknown;
|
|
25
|
+
}>;
|
|
26
|
+
protected writeMessage(writable: WritableStream<string>, chunk: string, signal?: AbortSignal): Promise<void>;
|
|
27
|
+
protected completeRegistration(readable: ReadableStream<string>, writable: WritableStream<string>, signal?: AbortSignal): Promise<void>;
|
|
28
|
+
protected requestClientList(readable: ReadableStream<string>, writable: WritableStream<string>, signal?: AbortSignal): Promise<void>;
|
|
14
29
|
}
|
package/dist/transport/index.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { AndroidTransport,
|
|
1
|
+
export { AndroidTransport, Usbmux, iOSTransport } from "../a.js";
|
|
2
2
|
export { DaemonTransport, HDTTransport, requireNumericPort, withTransports } from "../f1.js";
|
|
3
|
+
export { DesktopTransport, LynxSimulatorTransport, PeertalkToMessageTransformStream, connectWithPeertalk, encodePeertalkMessage } from "../h6.js";
|
|
@@ -3,7 +3,4 @@ import type { CustomizedResponse, Response } from "../types.js";
|
|
|
3
3
|
export declare class PeertalkToMessageTransformStream<Output extends Response | CustomizedResponse = Response> extends TransformStream<Uint8Array, Output> {
|
|
4
4
|
constructor();
|
|
5
5
|
}
|
|
6
|
-
export declare class MessageToPeertalkTransformStream<TMessage = unknown> extends TransformStream<TMessage, Uint8Array> {
|
|
7
|
-
constructor();
|
|
8
|
-
}
|
|
9
6
|
export declare function encodePeertalkMessage(message: unknown): Uint8Array;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { Connector } from "../index.js";
|
|
2
|
+
import { DesktopTransport } from "./desktop.js";
|
|
3
|
+
import type { Client, Connection, Device, TransportConnectOptions } from "./transport.js";
|
|
4
|
+
export interface LynxSimulatorConfig {
|
|
5
|
+
registry: string;
|
|
6
|
+
core: {
|
|
7
|
+
name: string;
|
|
8
|
+
version: string;
|
|
9
|
+
};
|
|
10
|
+
lynxtron: {
|
|
11
|
+
name: string;
|
|
12
|
+
version: string;
|
|
13
|
+
};
|
|
14
|
+
jsb?: string[];
|
|
15
|
+
nativeExtensions?: (version: string) => string[];
|
|
16
|
+
}
|
|
17
|
+
type LynxSimulatorInfo = {
|
|
18
|
+
clientId: string;
|
|
19
|
+
pid: number | null;
|
|
20
|
+
port: number;
|
|
21
|
+
status: "starting" | "running" | "stopping" | "stopped" | "exited" | "failed";
|
|
22
|
+
logPath: string;
|
|
23
|
+
startedAt: string;
|
|
24
|
+
endedAt?: string;
|
|
25
|
+
expiresAt?: string;
|
|
26
|
+
exitCode: number | null;
|
|
27
|
+
signal: NodeJS.Signals | null;
|
|
28
|
+
error?: string;
|
|
29
|
+
stopReason?: string;
|
|
30
|
+
coreVersion: string;
|
|
31
|
+
lynxtronVersion: string;
|
|
32
|
+
jsb: string[];
|
|
33
|
+
nativeExtensions: string[];
|
|
34
|
+
};
|
|
35
|
+
export declare class LynxSimulatorTransport extends DesktopTransport {
|
|
36
|
+
#private;
|
|
37
|
+
readonly id = "simulator";
|
|
38
|
+
readonly persistent = true;
|
|
39
|
+
get active(): boolean;
|
|
40
|
+
constructor(config?: LynxSimulatorConfig);
|
|
41
|
+
listDevices(): Promise<Device[]>;
|
|
42
|
+
listClients(): Promise<Client[]>;
|
|
43
|
+
list(): LynxSimulatorInfo[];
|
|
44
|
+
get(clientId: string): LynxSimulatorInfo;
|
|
45
|
+
logs(clientId: string, offset?: number): Promise<{
|
|
46
|
+
content: string;
|
|
47
|
+
offset: number;
|
|
48
|
+
size: number;
|
|
49
|
+
eof: boolean;
|
|
50
|
+
finished: boolean;
|
|
51
|
+
}>;
|
|
52
|
+
wait(clientId: string, timeoutMs: number, signal?: AbortSignal): Promise<LynxSimulatorInfo>;
|
|
53
|
+
stop(clientId: string): Promise<LynxSimulatorInfo>;
|
|
54
|
+
connect<TInput = unknown, TOutput = unknown>(options: TransportConnectOptions): Promise<Connection<TOutput, TInput>>;
|
|
55
|
+
run(connector: Connector, signal?: AbortSignal, ttlMs?: number, options?: {
|
|
56
|
+
jsb?: unknown;
|
|
57
|
+
nativeExtensions?: unknown;
|
|
58
|
+
lynxtronVersion?: unknown;
|
|
59
|
+
}): Promise<LynxSimulatorInfo>;
|
|
60
|
+
close(): Promise<void>;
|
|
61
|
+
}
|
|
62
|
+
export {};
|