withruntime 0.11.2 → 0.12.0
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/BLAXEL.md +2 -2
- package/COMPATIBILITY.md +74 -9
- package/DAYTONA.md +33 -5
- package/E2B.md +85 -24
- package/README.md +9 -8
- package/README.src.md +8 -7
- package/VERCEL.md +43 -5
- package/compatibility-lock.json +58 -49
- package/dist/billing-cli.d.ts +1 -1
- package/dist/billing-cli.js +77 -1
- package/dist/blaxel/errors.d.ts +14 -0
- package/dist/blaxel/errors.js +29 -0
- package/dist/blaxel/index.d.ts +2 -2
- package/dist/blaxel/index.js +4 -4
- package/dist/blaxel/interpreter.d.ts +2 -5
- package/dist/blaxel/sandbox.d.ts +14 -5
- package/dist/blaxel/sandbox.js +63 -7
- package/dist/blaxel/snapshot.d.ts +4 -0
- package/dist/blaxel/snapshot.js +4 -0
- package/dist/cli/logs.d.ts +21 -0
- package/dist/cli/logs.js +188 -0
- package/dist/cli/logs.test.d.ts +1 -0
- package/dist/cli/logs.test.js +272 -0
- package/dist/cli-extras.d.ts +3 -3
- package/dist/cli-extras.js +17 -12
- package/dist/cli-words.d.ts +10 -1
- package/dist/cli-words.js +18 -0
- package/dist/cli.d.ts +5 -1
- package/dist/cli.js +405 -204
- package/dist/client.d.ts +2 -4
- package/dist/client.js +27 -11
- package/dist/cloudflare/errors.d.ts +143 -0
- package/dist/cloudflare/errors.js +167 -0
- package/dist/cloudflare/index.d.ts +175 -6
- package/dist/cloudflare/index.js +416 -26
- package/dist/cloudflare/interpreter.d.ts +119 -0
- package/dist/cloudflare/interpreter.js +223 -0
- package/dist/cloudflare/streams.d.ts +38 -0
- package/dist/cloudflare/streams.js +145 -0
- package/dist/cloudflare/watch.d.ts +9 -0
- package/dist/cloudflare/watch.js +24 -0
- package/dist/codesandbox/index.d.ts +216 -28
- package/dist/codesandbox/index.js +478 -78
- package/dist/compat/core.d.ts +18 -0
- package/dist/compat/core.js +29 -0
- package/dist/compat/files.d.ts +1 -0
- package/dist/compat/files.js +25 -5
- package/dist/daytona/computer-use.d.ts +13 -4
- package/dist/daytona/computer-use.js +66 -8
- package/dist/daytona/daytona.d.ts +6 -0
- package/dist/daytona/daytona.js +30 -3
- package/dist/daytona/errors.d.ts +11 -0
- package/dist/daytona/errors.js +18 -0
- package/dist/daytona/filesystem.js +2 -1
- package/dist/daytona/image.d.ts +13 -9
- package/dist/daytona/image.js +18 -12
- package/dist/daytona/index.d.ts +1 -1
- package/dist/daytona/sandbox.d.ts +8 -2
- package/dist/daytona/sandbox.js +16 -2
- package/dist/domains/index.d.ts +9 -0
- package/dist/domains/index.js +10 -0
- package/dist/e2b/commands.d.ts +1 -1
- package/dist/e2b/commands.js +6 -7
- package/dist/e2b/errors.d.ts +17 -0
- package/dist/e2b/errors.js +40 -1
- package/dist/e2b/index.d.ts +2 -2
- package/dist/e2b/index.js +1 -1
- package/dist/e2b/sandbox.d.ts +27 -21
- package/dist/e2b/sandbox.js +34 -8
- package/dist/e2b/unsupported.js +1 -1
- package/dist/errors.d.ts +10 -1
- package/dist/errors.js +16 -4
- package/dist/freestyle/index.d.ts +285 -37
- package/dist/freestyle/index.js +656 -144
- package/dist/identity.d.ts +3 -0
- package/dist/identity.js +27 -0
- package/dist/images/index.d.ts +9 -0
- package/dist/images/index.js +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/ips/index.d.ts +9 -0
- package/dist/ips/index.js +10 -0
- package/dist/jobs/index.d.ts +9 -0
- package/dist/jobs/index.js +10 -0
- package/dist/keys.js +2 -0
- package/dist/login.js +2 -0
- package/dist/machine.d.ts +12 -3
- package/dist/machine.js +20 -3
- package/dist/mcp.js +1 -1
- package/dist/modal/index.d.ts +339 -61
- package/dist/modal/index.js +781 -121
- package/dist/network-cli.d.ts +3 -1
- package/dist/network-cli.js +78 -36
- package/dist/networks/index.d.ts +11 -0
- package/dist/networks/index.js +10 -0
- package/dist/ports/index.d.ts +9 -0
- package/dist/ports/index.js +10 -0
- package/dist/product-names.d.ts +52 -0
- package/dist/product-names.js +164 -0
- package/dist/product-renames.d.ts +103 -0
- package/dist/product-renames.js +189 -0
- package/dist/products/apps.d.ts +176 -0
- package/dist/products/apps.js +165 -0
- package/dist/products/billing.d.ts +41 -0
- package/dist/products/billing.js +13 -0
- package/dist/products/browser.d.ts +10 -0
- package/dist/products/browsers.d.ts +71 -0
- package/dist/products/browsers.js +102 -0
- package/dist/products/builds.d.ts +126 -0
- package/dist/products/builds.js +221 -0
- package/dist/products/index.d.ts +3 -16
- package/dist/products/index.js +3 -14
- package/dist/products/jobs.d.ts +17 -0
- package/dist/products/jobs.js +27 -10
- package/dist/products/logs.d.ts +245 -0
- package/dist/products/logs.js +274 -0
- package/dist/products/logs.test.d.ts +1 -0
- package/dist/products/logs.test.js +343 -0
- package/dist/products/network-products.d.ts +38 -7
- package/dist/products/network-products.js +31 -18
- package/dist/products/observability.d.ts +3 -2
- package/dist/products/private-network.js +1 -1
- package/dist/products/queues.d.ts +149 -0
- package/dist/products/queues.js +213 -0
- package/dist/products/referrals.d.ts +21 -7
- package/dist/products/referrals.js +3 -3
- package/dist/products/secrets.d.ts +7 -3
- package/dist/products/secrets.js +39 -18
- package/dist/products/signed-requests.d.ts +21 -0
- package/dist/products/signed-requests.js +11 -0
- package/dist/products/streams.d.ts +73 -0
- package/dist/products/streams.js +17 -0
- package/dist/products/switching.d.ts +35 -7
- package/dist/products/switching.js +4 -3
- package/dist/products/volumes.d.ts +3 -0
- package/dist/record-cli.d.ts +23 -0
- package/dist/record-cli.js +308 -0
- package/dist/renamed-products.d.ts +38 -0
- package/dist/renamed-products.js +34 -0
- package/dist/runloop/index.d.ts +9 -2
- package/dist/runloop/index.js +29 -8
- package/dist/runloop/sdk.d.ts +131 -0
- package/dist/runloop/sdk.js +167 -0
- package/dist/sandbox.d.ts +3 -2
- package/dist/sandbox.js +14 -9
- package/dist/sandboxes/index.d.ts +11 -0
- package/dist/sandboxes/index.js +12 -0
- package/dist/snapshots/index.d.ts +9 -0
- package/dist/snapshots/index.js +11 -0
- package/dist/snapshots.d.ts +7 -4
- package/dist/sprites/index.d.ts +343 -31
- package/dist/sprites/index.js +866 -84
- package/dist/ssh.d.ts +1 -1
- package/dist/ssh.js +11 -11
- package/dist/terminal.d.ts +24 -0
- package/dist/terminal.js +32 -0
- package/dist/transport.d.ts +15 -1
- package/dist/transport.js +56 -3
- package/dist/tunnel.js +1 -1
- package/dist/types.d.ts +63 -0
- package/dist/vercel/sandbox.js +5 -3
- package/dist/vercel/snapshot.js +10 -2
- package/dist/volumes/index.d.ts +9 -0
- package/dist/volumes/index.js +10 -0
- package/package.json +48 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Runtime } from "../client.js";
|
|
2
2
|
import type { Sandbox as NativeSandbox, Process } from "../sandbox.js";
|
|
3
|
-
import { CompatibilityError, type ClientOptions } from "../compat/core.js";
|
|
3
|
+
import { CompatibilityError, type ClientOptions, type Refused, type RefusedAsync } from "../compat/core.js";
|
|
4
4
|
import { ManagedTasks } from "./guest-service.js";
|
|
5
5
|
export { CompatibilityError };
|
|
6
6
|
export declare class VMTier {
|
|
@@ -24,19 +24,39 @@ export declare class VMTier {
|
|
|
24
24
|
diskGB?: number;
|
|
25
25
|
}): VMTier | undefined;
|
|
26
26
|
}
|
|
27
|
-
export type
|
|
27
|
+
export type StartSandboxOpts = {
|
|
28
|
+
vmTier?: VMTier;
|
|
29
|
+
hibernationTimeoutSeconds?: number;
|
|
30
|
+
/** Runtime wakes a paused sandbox on any request, preview visit, command or
|
|
31
|
+
* file call: both true or both false. */
|
|
32
|
+
automaticWakeupConfig?: {
|
|
33
|
+
http: boolean;
|
|
34
|
+
websocket: boolean;
|
|
35
|
+
};
|
|
36
|
+
ipcountry?: string;
|
|
37
|
+
};
|
|
38
|
+
export type CreateSandboxOpts = StartSandboxOpts & {
|
|
28
39
|
id?: string;
|
|
29
40
|
title?: string;
|
|
30
41
|
description?: string;
|
|
31
42
|
tags?: string[];
|
|
32
43
|
privacy?: "private" | "public" | "public-hosts" | "unlisted";
|
|
33
|
-
vmTier?: VMTier;
|
|
34
|
-
hibernationTimeoutSeconds?: number;
|
|
35
44
|
};
|
|
36
45
|
export type SessionCreateOptions = {
|
|
37
46
|
id?: string;
|
|
38
47
|
env?: Record<string, string>;
|
|
39
48
|
permission?: "read" | "write";
|
|
49
|
+
git?: {
|
|
50
|
+
provider: string;
|
|
51
|
+
username?: string;
|
|
52
|
+
accessToken?: string;
|
|
53
|
+
email: string;
|
|
54
|
+
name?: string;
|
|
55
|
+
};
|
|
56
|
+
hostToken?: {
|
|
57
|
+
token: string;
|
|
58
|
+
sandboxId: string;
|
|
59
|
+
};
|
|
40
60
|
};
|
|
41
61
|
export type ShellRunOpts = {
|
|
42
62
|
env?: Record<string, string>;
|
|
@@ -50,11 +70,28 @@ export type ShellRunOpts = {
|
|
|
50
70
|
};
|
|
51
71
|
export declare class CodeSandbox {
|
|
52
72
|
readonly sandboxes: Sandboxes;
|
|
53
|
-
|
|
73
|
+
readonly hosts: HostTokens;
|
|
74
|
+
constructor(apiToken?: string, options?: ClientOptions & {
|
|
75
|
+
headers?: Record<string, string>;
|
|
76
|
+
tracer?: unknown;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
/** CodeSandbox's host tokens open private previews. Runtime's private
|
|
80
|
+
* previews carry their own signed token: `sandbox.previews.create(port)`. */
|
|
81
|
+
export declare class HostTokens {
|
|
82
|
+
readonly createToken: RefusedAsync;
|
|
83
|
+
readonly listTokens: RefusedAsync;
|
|
84
|
+
readonly revokeToken: RefusedAsync;
|
|
85
|
+
readonly revokeAllTokens: RefusedAsync;
|
|
86
|
+
readonly updateToken: RefusedAsync;
|
|
87
|
+
readonly getUrl: Refused;
|
|
88
|
+
readonly getHeaders: Refused;
|
|
89
|
+
readonly getCookies: Refused;
|
|
54
90
|
}
|
|
55
91
|
export declare class Sandboxes {
|
|
56
92
|
private readonly runtime;
|
|
57
93
|
constructor(runtime: Runtime);
|
|
94
|
+
get defaultTemplateId(): string;
|
|
58
95
|
create(options?: CreateSandboxOpts): Promise<Sandbox>;
|
|
59
96
|
resume(id: string): Promise<Sandbox>;
|
|
60
97
|
hibernate(id: string): Promise<void>;
|
|
@@ -63,7 +100,24 @@ export declare class Sandboxes {
|
|
|
63
100
|
restart(id: string, options?: {
|
|
64
101
|
hibernationTimeoutSeconds?: number;
|
|
65
102
|
}): Promise<Sandbox>;
|
|
66
|
-
fork(id: string, options?:
|
|
103
|
+
fork(id: string, options?: StartSandboxOpts & Pick<CreateSandboxOpts, "title" | "description" | "tags" | "privacy">): Promise<Sandbox>;
|
|
104
|
+
/** The account's running CodeSandbox-adapter sandboxes. Runtime has no
|
|
105
|
+
* per-account count of running machines, so the limit is null. */
|
|
106
|
+
listRunning(): Promise<{
|
|
107
|
+
concurrentVmCount: number;
|
|
108
|
+
concurrentVmLimit: number | null;
|
|
109
|
+
vms: {
|
|
110
|
+
id: string;
|
|
111
|
+
creditBasis: string | undefined;
|
|
112
|
+
lastActiveAt: Date | undefined;
|
|
113
|
+
sessionStartedAt: Date | undefined;
|
|
114
|
+
specs: {
|
|
115
|
+
cpu: number;
|
|
116
|
+
memory: number;
|
|
117
|
+
storage: number;
|
|
118
|
+
};
|
|
119
|
+
}[];
|
|
120
|
+
}>;
|
|
67
121
|
get(id: string): Promise<{
|
|
68
122
|
id: string;
|
|
69
123
|
createdAt: Date;
|
|
@@ -108,6 +162,12 @@ export declare class Sandbox {
|
|
|
108
162
|
constructor(native: NativeSandbox, bootupType: "RUNNING" | "CLEAN" | "RESUME" | "FORK");
|
|
109
163
|
get id(): string;
|
|
110
164
|
get cluster(): string;
|
|
165
|
+
/** Runtime's guest agent is updated with the host: always current. */
|
|
166
|
+
get isUpToDate(): boolean;
|
|
167
|
+
/** Resizes to the tier's CPUs and memory; a running sandbox restarts, as CodeSandbox's does. */
|
|
168
|
+
updateTier(tier: VMTier): Promise<void>;
|
|
169
|
+
readonly createSession: RefusedAsync;
|
|
170
|
+
readonly createBrowserSession: RefusedAsync;
|
|
111
171
|
updateHibernationTimeout(timeoutSeconds: number): Promise<void>;
|
|
112
172
|
connect(options?: SessionCreateOptions): Promise<SandboxClient>;
|
|
113
173
|
}
|
|
@@ -183,6 +243,20 @@ export declare class FileSystem {
|
|
|
183
243
|
type: string;
|
|
184
244
|
isSymlink: boolean;
|
|
185
245
|
}[]>;
|
|
246
|
+
/** Changes under a path, as CodeSandbox's add, change and remove events. */
|
|
247
|
+
watch(path: string, options?: {
|
|
248
|
+
recursive?: boolean;
|
|
249
|
+
excludes?: readonly string[];
|
|
250
|
+
}): Promise<{
|
|
251
|
+
onEvent: (listener: (value: {
|
|
252
|
+
paths: string[];
|
|
253
|
+
type: "add" | "change" | "remove";
|
|
254
|
+
}) => void) => {
|
|
255
|
+
dispose: () => boolean;
|
|
256
|
+
};
|
|
257
|
+
dispose: () => void;
|
|
258
|
+
}>;
|
|
259
|
+
readonly download: RefusedAsync;
|
|
186
260
|
stat(path: string): Promise<{
|
|
187
261
|
type: string;
|
|
188
262
|
isSymlink: boolean;
|
|
@@ -192,46 +266,160 @@ export declare class FileSystem {
|
|
|
192
266
|
ctime: number;
|
|
193
267
|
}>;
|
|
194
268
|
}
|
|
269
|
+
type SavedCommand = {
|
|
270
|
+
version: 1;
|
|
271
|
+
/** A terminal from terminals.create; absent for a command. */
|
|
272
|
+
kind?: "terminal";
|
|
273
|
+
command: string;
|
|
274
|
+
name?: string;
|
|
275
|
+
options: Parameters<NativeSandbox["spawn"]>[1];
|
|
276
|
+
taskId?: string;
|
|
277
|
+
};
|
|
278
|
+
type ShellSize = {
|
|
279
|
+
cols: number;
|
|
280
|
+
rows: number;
|
|
281
|
+
};
|
|
282
|
+
/** A shell CodeSandbox lists: a command's name is JSON whose type is "command". */
|
|
283
|
+
export declare function isCommandShell(shell: {
|
|
284
|
+
shellId?: string;
|
|
285
|
+
name: string;
|
|
286
|
+
status?: string;
|
|
287
|
+
exitCode?: number;
|
|
288
|
+
shellType?: string;
|
|
289
|
+
startCommand?: string;
|
|
290
|
+
ownerUsername?: string;
|
|
291
|
+
isSystemShell?: boolean;
|
|
292
|
+
}): boolean;
|
|
293
|
+
/** What the client's commands, terminals and ports share with it. */
|
|
294
|
+
type Session = {
|
|
295
|
+
native: NativeSandbox;
|
|
296
|
+
env: Record<string, string>;
|
|
297
|
+
workspacePath: string;
|
|
298
|
+
assertConnected(): void;
|
|
299
|
+
start(saved: SavedCommand): Promise<Process>;
|
|
300
|
+
attach(process: Process, saved: SavedCommand): Command;
|
|
301
|
+
previewURLs: Map<number, string>;
|
|
302
|
+
};
|
|
303
|
+
export declare class SandboxCommands {
|
|
304
|
+
private readonly session;
|
|
305
|
+
constructor(session: Session);
|
|
306
|
+
runBackground(command: string | string[], options?: ShellRunOpts): Promise<Command>;
|
|
307
|
+
run(command: string | string[], options?: ShellRunOpts): Promise<string>;
|
|
308
|
+
getAll(): Promise<Command[]>;
|
|
309
|
+
}
|
|
310
|
+
export declare class Ports {
|
|
311
|
+
private readonly session;
|
|
312
|
+
private readonly opened;
|
|
313
|
+
private readonly closed;
|
|
314
|
+
private watching?;
|
|
315
|
+
private known?;
|
|
316
|
+
private polling;
|
|
317
|
+
constructor(session: Session);
|
|
318
|
+
/** A port's events start a watch of the sandbox's listening ports, once a second. */
|
|
319
|
+
get onDidPortOpen(): (listener: (port: {
|
|
320
|
+
port: number;
|
|
321
|
+
host: string;
|
|
322
|
+
}) => void) => {
|
|
323
|
+
dispose: () => void;
|
|
324
|
+
};
|
|
325
|
+
get onDidPortClose(): (listener: (port: number) => void) => {
|
|
326
|
+
dispose: () => void;
|
|
327
|
+
};
|
|
328
|
+
private subscribe;
|
|
329
|
+
/** The ports listening now. */
|
|
330
|
+
listening(): Promise<number[]>;
|
|
331
|
+
private poll;
|
|
332
|
+
dispose(): void;
|
|
333
|
+
get(port: number): Promise<{
|
|
334
|
+
port: number;
|
|
335
|
+
host: string;
|
|
336
|
+
}>;
|
|
337
|
+
getAll(): Promise<{
|
|
338
|
+
port: number;
|
|
339
|
+
host: string;
|
|
340
|
+
}[]>;
|
|
341
|
+
waitForPort(port: number, options?: {
|
|
342
|
+
timeoutMs?: number;
|
|
343
|
+
}): Promise<{
|
|
344
|
+
port: number;
|
|
345
|
+
host: string;
|
|
346
|
+
}>;
|
|
347
|
+
}
|
|
348
|
+
/** URLs of the ports this client exposed with ports.get or listed with ports.getAll. */
|
|
349
|
+
export declare class Hosts {
|
|
350
|
+
private readonly session;
|
|
351
|
+
constructor(session: Session);
|
|
352
|
+
getUrl(port: number, protocol?: string): string;
|
|
353
|
+
/** Public previews need no token: nothing to send. */
|
|
354
|
+
getHeaders(): Record<string, string>;
|
|
355
|
+
getCookies(): Record<string, string>;
|
|
356
|
+
}
|
|
357
|
+
/** Interactive shells, each a process with a terminal of its own. */
|
|
358
|
+
export declare class Terminals {
|
|
359
|
+
private readonly session;
|
|
360
|
+
constructor(session: Session);
|
|
361
|
+
create(command?: "bash" | "zsh" | "fish" | "ksh" | "dash", options?: ShellRunOpts): Promise<Terminal>;
|
|
362
|
+
get(shellId: string): Promise<Terminal | undefined>;
|
|
363
|
+
getAll(): Promise<Terminal[]>;
|
|
364
|
+
}
|
|
365
|
+
export declare class Terminal {
|
|
366
|
+
private readonly process;
|
|
367
|
+
readonly name: string;
|
|
368
|
+
private readonly outputEvent;
|
|
369
|
+
readonly onOutput: (listener: (value: string) => void) => {
|
|
370
|
+
dispose: () => boolean;
|
|
371
|
+
};
|
|
372
|
+
private output;
|
|
373
|
+
private following?;
|
|
374
|
+
constructor(process: Process, name: string);
|
|
375
|
+
get id(): string;
|
|
376
|
+
/** Its output so far, and what it prints from now on through onOutput. */
|
|
377
|
+
open(dimensions?: ShellSize): Promise<string>;
|
|
378
|
+
write(input: string, dimensions?: ShellSize): Promise<void>;
|
|
379
|
+
run(input: string, dimensions?: ShellSize): Promise<void>;
|
|
380
|
+
kill(): Promise<void>;
|
|
381
|
+
}
|
|
382
|
+
/** One-off JavaScript and Python snippets, run as CodeSandbox runs them: the
|
|
383
|
+
* last line's value is printed. */
|
|
384
|
+
export declare class Interpreters {
|
|
385
|
+
private readonly commands;
|
|
386
|
+
constructor(commands: SandboxCommands);
|
|
387
|
+
javascript(code: string): Promise<string>;
|
|
388
|
+
python(code: string): Promise<string>;
|
|
389
|
+
}
|
|
195
390
|
export declare class SandboxClient {
|
|
196
391
|
private readonly native;
|
|
197
392
|
private readonly env;
|
|
198
393
|
readonly fs: FileSystem;
|
|
199
|
-
readonly commands:
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
readonly ports: {
|
|
205
|
-
get: (port: number) => Promise<{
|
|
206
|
-
port: number;
|
|
207
|
-
host: string;
|
|
208
|
-
}>;
|
|
209
|
-
getAll: () => Promise<{
|
|
210
|
-
port: number;
|
|
211
|
-
host: string;
|
|
212
|
-
}[]>;
|
|
213
|
-
waitForPort: (port: number, options?: {
|
|
214
|
-
timeoutMs?: number;
|
|
215
|
-
}) => Promise<{
|
|
216
|
-
port: number;
|
|
217
|
-
host: string;
|
|
218
|
-
}>;
|
|
219
|
-
};
|
|
394
|
+
readonly commands: SandboxCommands;
|
|
395
|
+
readonly ports: Ports;
|
|
396
|
+
readonly terminals: Terminals;
|
|
397
|
+
readonly interpreters: Interpreters;
|
|
398
|
+
readonly hosts: Hosts;
|
|
220
399
|
readonly tasks: Tasks;
|
|
221
400
|
readonly setup: Setup;
|
|
222
401
|
readonly workspacePath = "/project/sandbox";
|
|
402
|
+
static readonly create: RefusedAsync;
|
|
223
403
|
private disconnected;
|
|
224
404
|
private readonly attached;
|
|
225
405
|
private readonly previewURLs;
|
|
406
|
+
private readonly stateEvent;
|
|
226
407
|
private stopKeepAlive?;
|
|
227
408
|
constructor(native: NativeSandbox, env: Record<string, string>);
|
|
409
|
+
/** Runtime's guest agent is updated with the host: always current. */
|
|
410
|
+
get isUpToDate(): boolean;
|
|
411
|
+
/** The sandbox's page in Runtime's console. */
|
|
412
|
+
get editorUrl(): string;
|
|
413
|
+
get onStateChange(): (listener: (value: "CONNECTED" | "DISCONNECTED") => void) => {
|
|
414
|
+
dispose: () => boolean;
|
|
415
|
+
};
|
|
228
416
|
initialize(): Promise<void>;
|
|
229
417
|
previewURL(port: number): string;
|
|
230
418
|
private assertConnected;
|
|
231
419
|
private start;
|
|
232
420
|
private attach;
|
|
233
421
|
get id(): string;
|
|
234
|
-
get state(): "
|
|
422
|
+
get state(): "CONNECTED" | "DISCONNECTED";
|
|
235
423
|
disconnect(): Promise<void>;
|
|
236
424
|
reconnect(): Promise<void>;
|
|
237
425
|
keepActiveWhileConnected(enabled: boolean): void;
|