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,14 +1,105 @@
|
|
|
1
1
|
import type { Runtime } from "../client.js";
|
|
2
|
-
import type { Sandbox } from "../sandbox.js";
|
|
3
|
-
import {
|
|
2
|
+
import type { Sandbox, Terminal } from "../sandbox.js";
|
|
3
|
+
import type { Snapshot } from "../snapshots.js";
|
|
4
|
+
import { CompatibilityError, type ClientOptions, type Refused, type RefusedAsync } from "../compat/core.js";
|
|
4
5
|
export { CompatibilityError };
|
|
5
6
|
export type VmState = "starting" | "running" | "pausing" | "paused" | "stopped";
|
|
7
|
+
export interface FreestyleErrorBody {
|
|
8
|
+
code: string;
|
|
9
|
+
message: string;
|
|
10
|
+
}
|
|
11
|
+
/** What every failed Runtime call becomes, as Freestyle throws it for a
|
|
12
|
+
* non-2xx response: `code` is Runtime's error code in upper case
|
|
13
|
+
* (`NOT_FOUND`), `status` its HTTP status, and `cause` the RuntimeError. */
|
|
14
|
+
export declare class FreestyleApiError extends Error {
|
|
15
|
+
readonly code: string;
|
|
16
|
+
readonly status: number;
|
|
17
|
+
readonly path?: string;
|
|
18
|
+
constructor(status: number, body: FreestyleErrorBody, path?: string);
|
|
19
|
+
}
|
|
20
|
+
export interface FreestyleConnectionError {
|
|
21
|
+
name?: string;
|
|
22
|
+
message?: string;
|
|
23
|
+
code?: string;
|
|
24
|
+
errno?: string | number;
|
|
25
|
+
syscall?: string;
|
|
26
|
+
address?: string;
|
|
27
|
+
port?: number;
|
|
28
|
+
}
|
|
29
|
+
/** What a call that got no answer from Runtime becomes, as Freestyle 0.2.17
|
|
30
|
+
* throws a failed fetch: a TypeError whose `cause` is the RuntimeError
|
|
31
|
+
* ConnectionError and whose `errors` carry it as one entry. */
|
|
32
|
+
export declare class FreestyleTransportError extends TypeError {
|
|
33
|
+
readonly errors: FreestyleConnectionError[];
|
|
34
|
+
constructor(cause: unknown, errors: FreestyleConnectionError[]);
|
|
35
|
+
toJSON(): {
|
|
36
|
+
name: string;
|
|
37
|
+
message: string;
|
|
38
|
+
errors: FreestyleConnectionError[];
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export declare class FirewallRuleValidationError extends Error {
|
|
42
|
+
readonly path: string;
|
|
43
|
+
constructor(path: string, message: string);
|
|
44
|
+
}
|
|
45
|
+
export declare class TlsRuleValidationError extends Error {
|
|
46
|
+
readonly path: string;
|
|
47
|
+
constructor(path: string, message: string);
|
|
48
|
+
}
|
|
49
|
+
export declare class TlsForwardAuthValidationError extends Error {
|
|
50
|
+
readonly path: string;
|
|
51
|
+
constructor(path: string, message: string);
|
|
52
|
+
}
|
|
53
|
+
export declare const FirewallNamespace: Refused;
|
|
54
|
+
export declare const FirewallRulesNamespace: Refused;
|
|
55
|
+
export declare const validateFirewallEndpoint: Refused;
|
|
56
|
+
export declare const validateFirewallRule: Refused;
|
|
57
|
+
export declare const validateFirewallSpec: Refused;
|
|
58
|
+
export declare const TlsNamespace: Refused;
|
|
59
|
+
export declare const TlsRulesNamespace: Refused;
|
|
60
|
+
export declare const TlsForwardAuthNamespace: Refused;
|
|
61
|
+
export declare const hasTlsIdentity: Refused;
|
|
62
|
+
export declare const resolveTlsProtocol: Refused;
|
|
63
|
+
export declare const validateTlsDomain: Refused;
|
|
64
|
+
export declare const validateTlsEndpoint: Refused;
|
|
65
|
+
export declare const validateTlsForwardAuth: Refused;
|
|
66
|
+
export declare const validateTlsMailRoute: Refused;
|
|
67
|
+
export declare const validateTlsRule: Refused;
|
|
68
|
+
export declare const validateTlsSpec: Refused;
|
|
69
|
+
export declare const TunnelsNamespace: Refused;
|
|
70
|
+
export declare const VpcNamespace: Refused;
|
|
71
|
+
export declare const Vpc: Refused;
|
|
72
|
+
export declare const VpcTunnelNamespace: Refused;
|
|
73
|
+
export type FirewallProtocol = "tcp" | "udp" | "icmp";
|
|
74
|
+
export interface FirewallEndpoint {
|
|
75
|
+
vmId?: string;
|
|
76
|
+
vpcId?: string;
|
|
77
|
+
tunnelId?: string;
|
|
78
|
+
cidr?: string;
|
|
79
|
+
public?: true;
|
|
80
|
+
port?: number;
|
|
81
|
+
protocol?: FirewallProtocol;
|
|
82
|
+
}
|
|
6
83
|
export interface FirewallRule {
|
|
7
84
|
action: "allow";
|
|
8
|
-
source:
|
|
9
|
-
destination:
|
|
10
|
-
|
|
11
|
-
|
|
85
|
+
source: FirewallEndpoint;
|
|
86
|
+
destination: FirewallEndpoint;
|
|
87
|
+
description?: string;
|
|
88
|
+
}
|
|
89
|
+
export interface FirewallRuleData {
|
|
90
|
+
id: string;
|
|
91
|
+
action: "allow";
|
|
92
|
+
source: FirewallEndpoint;
|
|
93
|
+
destination: FirewallEndpoint;
|
|
94
|
+
description?: string | null;
|
|
95
|
+
dependencies: {
|
|
96
|
+
kind: string;
|
|
97
|
+
id: string;
|
|
98
|
+
slug?: string | null;
|
|
99
|
+
displayName?: string | null;
|
|
100
|
+
}[];
|
|
101
|
+
createdAt: string;
|
|
102
|
+
updatedAt: string;
|
|
12
103
|
}
|
|
13
104
|
export interface CreateVmOptions {
|
|
14
105
|
snapshotId?: string | null;
|
|
@@ -27,14 +118,42 @@ export interface ExecOptions {
|
|
|
27
118
|
env?: Record<string, string>;
|
|
28
119
|
stdin?: string;
|
|
29
120
|
}
|
|
121
|
+
export interface FreestyleOptions extends ClientOptions {
|
|
122
|
+
teamId?: string;
|
|
123
|
+
stackAccessToken?: string;
|
|
124
|
+
identityAccessToken?: string;
|
|
125
|
+
}
|
|
30
126
|
export declare class Freestyle {
|
|
31
127
|
readonly vms: VmsNamespace;
|
|
32
|
-
|
|
128
|
+
readonly fetch: RefusedAsync;
|
|
129
|
+
constructor(options?: FreestyleOptions);
|
|
130
|
+
get firewall(): never;
|
|
131
|
+
get tls(): never;
|
|
132
|
+
get tunnels(): never;
|
|
133
|
+
get vpc(): never;
|
|
33
134
|
}
|
|
34
|
-
export declare class
|
|
135
|
+
export declare class VmSnapshotsNamespace {
|
|
35
136
|
private readonly runtime;
|
|
36
|
-
|
|
37
|
-
|
|
137
|
+
constructor(runtime: Runtime);
|
|
138
|
+
/** A snapshot by id or by its slug (Runtime's snapshot name). */
|
|
139
|
+
resolve(id: string): Promise<Snapshot>;
|
|
140
|
+
get(snapshotId: string): Promise<{
|
|
141
|
+
id: string;
|
|
142
|
+
sourceVmId: string;
|
|
143
|
+
slug: string | null;
|
|
144
|
+
displayName: string | null;
|
|
145
|
+
public: boolean;
|
|
146
|
+
createdAt: string;
|
|
147
|
+
updatedAt: string;
|
|
148
|
+
ttlSeconds: number | null;
|
|
149
|
+
}>;
|
|
150
|
+
delete(snapshotId: string): Promise<void>;
|
|
151
|
+
list(options?: {
|
|
152
|
+
sourceVmId?: string;
|
|
153
|
+
limit?: number;
|
|
154
|
+
offset?: number;
|
|
155
|
+
}): Promise<{
|
|
156
|
+
snapshots: {
|
|
38
157
|
id: string;
|
|
39
158
|
sourceVmId: string;
|
|
40
159
|
slug: string | null;
|
|
@@ -42,29 +161,31 @@ export declare class VmsNamespace {
|
|
|
42
161
|
public: boolean;
|
|
43
162
|
createdAt: string;
|
|
44
163
|
updatedAt: string;
|
|
45
|
-
ttlSeconds: number;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
164
|
+
ttlSeconds: number | null;
|
|
165
|
+
}[];
|
|
166
|
+
totalCount: number;
|
|
167
|
+
}>;
|
|
168
|
+
/** Renames, relabels and re-times a snapshot: slug is its Runtime name,
|
|
169
|
+
* ttlSeconds whole days from now. */
|
|
170
|
+
update(snapshotId: string, options: {
|
|
171
|
+
slug?: string;
|
|
172
|
+
displayName?: string;
|
|
173
|
+
ttlSeconds?: number;
|
|
174
|
+
}): Promise<{
|
|
175
|
+
id: string;
|
|
176
|
+
sourceVmId: string;
|
|
177
|
+
slug: string | null;
|
|
178
|
+
displayName: string | null;
|
|
179
|
+
public: boolean;
|
|
180
|
+
createdAt: string;
|
|
181
|
+
updatedAt: string;
|
|
182
|
+
ttlSeconds: number | null;
|
|
183
|
+
}>;
|
|
184
|
+
}
|
|
185
|
+
export declare class VmsNamespace {
|
|
186
|
+
private readonly runtime;
|
|
187
|
+
readonly snapshots: VmSnapshotsNamespace;
|
|
66
188
|
constructor(runtime: Runtime);
|
|
67
|
-
private resolveSnapshot;
|
|
68
189
|
create(options: CreateVmOptions): Promise<{
|
|
69
190
|
vm: Vm;
|
|
70
191
|
vmId: string;
|
|
@@ -89,13 +210,15 @@ export declare class VmsNamespace {
|
|
|
89
210
|
};
|
|
90
211
|
firewallRules: {
|
|
91
212
|
id: string;
|
|
213
|
+
action: "allow";
|
|
92
214
|
source: {
|
|
93
215
|
vmId: string;
|
|
94
216
|
};
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
217
|
+
destination: FirewallEndpoint;
|
|
218
|
+
description: null;
|
|
219
|
+
dependencies: never[];
|
|
220
|
+
createdAt: string;
|
|
221
|
+
updatedAt: string;
|
|
99
222
|
}[];
|
|
100
223
|
tlsRules: never[];
|
|
101
224
|
}>;
|
|
@@ -196,10 +319,118 @@ export declare class VmFilesystem {
|
|
|
196
319
|
modified: string;
|
|
197
320
|
}>;
|
|
198
321
|
}
|
|
322
|
+
export interface PtySessionInfo {
|
|
323
|
+
sessionId: number;
|
|
324
|
+
state: string;
|
|
325
|
+
createdUnix: number;
|
|
326
|
+
cols: number;
|
|
327
|
+
rows: number;
|
|
328
|
+
exitCode?: number | null;
|
|
329
|
+
linuxUser?: string | null;
|
|
330
|
+
slug?: string | null;
|
|
331
|
+
}
|
|
332
|
+
export interface PtyOpenOptions {
|
|
333
|
+
exec?: string;
|
|
334
|
+
cols?: number;
|
|
335
|
+
rows?: number;
|
|
336
|
+
linuxUser?: string;
|
|
337
|
+
slug?: string;
|
|
338
|
+
}
|
|
339
|
+
export type PtySessionSelector = number | string;
|
|
340
|
+
export interface PtyAttachOptions {
|
|
341
|
+
session: PtySessionSelector;
|
|
342
|
+
linuxUser?: string;
|
|
343
|
+
}
|
|
344
|
+
export interface PtySessionEvents {
|
|
345
|
+
onData?: (data: Uint8Array) => void;
|
|
346
|
+
onExit?: (exitCode: number) => void;
|
|
347
|
+
onClose?: (info: {
|
|
348
|
+
wasClean: boolean;
|
|
349
|
+
code: number;
|
|
350
|
+
reason: string;
|
|
351
|
+
}) => void;
|
|
352
|
+
onError?: (err: unknown) => void;
|
|
353
|
+
}
|
|
354
|
+
/** A session's number: FNV-1a of its process id, 31 bits, never 0. */
|
|
355
|
+
export declare function sessionNumber(processId: string): number;
|
|
356
|
+
export declare class PtySession {
|
|
357
|
+
#private;
|
|
358
|
+
private readonly terminal;
|
|
359
|
+
private readonly sandbox;
|
|
360
|
+
private readonly processId;
|
|
361
|
+
readonly sessionId: number;
|
|
362
|
+
readonly slug: string | undefined;
|
|
363
|
+
readonly created: boolean;
|
|
364
|
+
constructor(terminal: Terminal, sandbox: Sandbox, processId: string, sessionId: number, slug: string | undefined, created: boolean, events: PtySessionEvents);
|
|
365
|
+
private readonly onError;
|
|
366
|
+
write(data: Uint8Array | string): void;
|
|
367
|
+
resize(options: {
|
|
368
|
+
cols: number;
|
|
369
|
+
rows: number;
|
|
370
|
+
}): void;
|
|
371
|
+
signal(sig: "sigint" | "sigkill"): void;
|
|
372
|
+
/** Closes the connection; the shell keeps running and attach() finds it. */
|
|
373
|
+
detach(): void;
|
|
374
|
+
get readyState(): number;
|
|
375
|
+
}
|
|
376
|
+
export declare class VmPty {
|
|
377
|
+
private readonly get;
|
|
378
|
+
constructor(get: () => Promise<Sandbox>);
|
|
379
|
+
private sessions;
|
|
380
|
+
private find;
|
|
381
|
+
private connect;
|
|
382
|
+
open(options?: PtyOpenOptions & PtySessionEvents): Promise<PtySession>;
|
|
383
|
+
attach(options: PtyAttachOptions & PtySessionEvents): Promise<PtySession>;
|
|
384
|
+
list(options?: {
|
|
385
|
+
linuxUser?: string;
|
|
386
|
+
}): Promise<{
|
|
387
|
+
sessions: PtySessionInfo[];
|
|
388
|
+
}>;
|
|
389
|
+
/** Ends a session's shell. An exited session stays in the list. */
|
|
390
|
+
close(session: PtySessionSelector, options?: {
|
|
391
|
+
linuxUser?: string;
|
|
392
|
+
}): Promise<{
|
|
393
|
+
sessionId: number;
|
|
394
|
+
exitCode: number | null | undefined;
|
|
395
|
+
} | {
|
|
396
|
+
sessionId: number;
|
|
397
|
+
exitCode?: undefined;
|
|
398
|
+
}>;
|
|
399
|
+
}
|
|
400
|
+
export declare class VmLinuxUserPty {
|
|
401
|
+
private readonly pty;
|
|
402
|
+
private readonly linuxUser;
|
|
403
|
+
constructor(pty: VmPty, linuxUser: string);
|
|
404
|
+
open(options?: Omit<PtyOpenOptions, "linuxUser"> & PtySessionEvents): Promise<PtySession>;
|
|
405
|
+
attach(options: Omit<PtyAttachOptions, "linuxUser"> & PtySessionEvents): Promise<PtySession>;
|
|
406
|
+
list(): Promise<{
|
|
407
|
+
sessions: PtySessionInfo[];
|
|
408
|
+
}>;
|
|
409
|
+
close(session: PtySessionSelector): Promise<{
|
|
410
|
+
sessionId: number;
|
|
411
|
+
exitCode: number | null | undefined;
|
|
412
|
+
} | {
|
|
413
|
+
sessionId: number;
|
|
414
|
+
exitCode?: undefined;
|
|
415
|
+
}>;
|
|
416
|
+
}
|
|
417
|
+
export declare class VmLinuxUser {
|
|
418
|
+
private readonly vm;
|
|
419
|
+
private readonly linuxUser;
|
|
420
|
+
readonly pty: VmLinuxUserPty;
|
|
421
|
+
constructor(vm: Vm, linuxUser: string);
|
|
422
|
+
exec(options: string | Omit<ExecOptions, "linuxUser">): Promise<{
|
|
423
|
+
stdout: string;
|
|
424
|
+
stderr: string;
|
|
425
|
+
statusCode: number | null;
|
|
426
|
+
}>;
|
|
427
|
+
}
|
|
199
428
|
export declare class Vm {
|
|
200
429
|
private readonly runtime;
|
|
201
430
|
readonly id: string;
|
|
202
431
|
readonly fs: VmFilesystem;
|
|
432
|
+
readonly pty: VmPty;
|
|
433
|
+
readonly resize: RefusedAsync;
|
|
203
434
|
constructor(runtime: Runtime, id: string);
|
|
204
435
|
data(): Promise<{
|
|
205
436
|
id: string;
|
|
@@ -259,6 +490,23 @@ export declare class Vm {
|
|
|
259
490
|
updatedAt: string;
|
|
260
491
|
}>;
|
|
261
492
|
delete(): Promise<void>;
|
|
493
|
+
/** The VM's outbound rules, read back from its network settings. */
|
|
494
|
+
firewallRules(): Promise<{
|
|
495
|
+
rules: {
|
|
496
|
+
id: string;
|
|
497
|
+
action: "allow";
|
|
498
|
+
source: {
|
|
499
|
+
vmId: string;
|
|
500
|
+
};
|
|
501
|
+
destination: FirewallEndpoint;
|
|
502
|
+
description: null;
|
|
503
|
+
dependencies: never[];
|
|
504
|
+
createdAt: string;
|
|
505
|
+
updatedAt: string;
|
|
506
|
+
}[];
|
|
507
|
+
totalCount: number;
|
|
508
|
+
}>;
|
|
509
|
+
linuxUser(linuxUser: string): VmLinuxUser;
|
|
262
510
|
update(options: {
|
|
263
511
|
slug?: string;
|
|
264
512
|
displayName?: string;
|
|
@@ -303,7 +551,7 @@ export declare class Vm {
|
|
|
303
551
|
public: boolean;
|
|
304
552
|
createdAt: string;
|
|
305
553
|
updatedAt: string;
|
|
306
|
-
ttlSeconds: number;
|
|
554
|
+
ttlSeconds: number | null;
|
|
307
555
|
};
|
|
308
556
|
}>;
|
|
309
557
|
}
|