-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
55 lines (48 loc) · 1.51 KB
/
Copy pathtypes.ts
File metadata and controls
55 lines (48 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
* Shared type definitions for the react-web-cli package.
* Replaces `any` casts with proper types for type safety.
*/
import type { ConnectionStatus } from "./AblyCliTerminal";
/**
* Control messages sent from the server over WebSocket.
*/
export interface ControlMessageHello {
type: "hello";
sessionId: string;
}
export interface ControlMessageStatus {
type: "status";
payload: string;
reason?: string;
code?: number;
}
export type ControlMessage = ControlMessageHello | ControlMessageStatus;
/**
* Terminal instance augmented with connection tracking fields.
* xterm.js Terminal instances are extended at runtime with these properties.
*/
export interface TerminalWithConnectingState {
_connectingLine?: number;
_connectingMessageLength?: number;
}
/**
* Global augmentation for debug flags and test helpers injected at runtime.
*/
export interface AblyCliGlobals {
ABLY_CLI_DEBUG?: boolean;
ablyCliSocket?: WebSocket;
setWindowTestFlagOnStatusChange?: (status: ConnectionStatus) => void;
getAblyCliTerminalReactState?: () => Record<string, unknown>;
getTerminalBufferText?: () => string;
getTerminalBufferInfo?: () => Record<string, unknown>;
/** CI auth token injected during E2E test execution */
__ABLY_CLI_CI_AUTH_TOKEN__?: string;
__ABLY_CLI_CI_MODE__?: string;
__ABLY_CLI_TEST_GROUP__?: string;
__ABLY_CLI_RUN_ID__?: string;
}
/**
* WebSocket message data types the browser may deliver.
*/
export type WebSocketMessageData =
string | Blob | ArrayBuffer | ArrayBufferView;