@daytonaio/sdk 0.170.0 → 0.171.0-alpha.3
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/LICENSE +190 -0
- package/cjs/CodeInterpreter.d.ts +95 -0
- package/cjs/CodeInterpreter.d.ts.map +1 -0
- package/cjs/CodeInterpreter.js +297 -0
- package/cjs/CodeInterpreter.js.map +1 -0
- package/cjs/ComputerUse.d.ts +539 -0
- package/cjs/ComputerUse.d.ts.map +1 -0
- package/cjs/ComputerUse.js +808 -0
- package/cjs/ComputerUse.js.map +1 -0
- package/cjs/Daytona.d.ts +355 -0
- package/cjs/Daytona.d.ts.map +1 -0
- package/cjs/Daytona.js +527 -0
- package/cjs/Daytona.js.map +1 -0
- package/cjs/FileSystem.d.ts +371 -0
- package/cjs/FileSystem.d.ts.map +1 -0
- package/cjs/FileSystem.js +489 -0
- package/cjs/FileSystem.js.map +1 -0
- package/cjs/Git.d.ts +203 -0
- package/cjs/Git.d.ts.map +1 -0
- package/cjs/Git.js +326 -0
- package/cjs/Git.js.map +1 -0
- package/cjs/Image.d.ts +265 -0
- package/cjs/Image.d.ts.map +1 -0
- package/cjs/Image.js +586 -0
- package/cjs/Image.js.map +1 -0
- package/cjs/LspServer.d.ts +172 -0
- package/cjs/LspServer.d.ts.map +1 -0
- package/cjs/LspServer.js +259 -0
- package/cjs/LspServer.js.map +1 -0
- package/cjs/ObjectStorage.d.ts +79 -0
- package/cjs/ObjectStorage.d.ts.map +1 -0
- package/cjs/ObjectStorage.js +199 -0
- package/cjs/ObjectStorage.js.map +1 -0
- package/cjs/Process.d.ts +490 -0
- package/cjs/Process.d.ts.map +1 -0
- package/cjs/Process.js +647 -0
- package/cjs/Process.js.map +1 -0
- package/cjs/PtyHandle.d.ts +155 -0
- package/cjs/PtyHandle.d.ts.map +1 -0
- package/cjs/PtyHandle.js +416 -0
- package/cjs/PtyHandle.js.map +1 -0
- package/cjs/README.md +180 -0
- package/cjs/Sandbox.d.ts +476 -0
- package/cjs/Sandbox.d.ts.map +1 -0
- package/cjs/Sandbox.js +905 -0
- package/cjs/Sandbox.js.map +1 -0
- package/cjs/Snapshot.d.ts +140 -0
- package/cjs/Snapshot.d.ts.map +1 -0
- package/cjs/Snapshot.js +248 -0
- package/cjs/Snapshot.js.map +1 -0
- package/cjs/Volume.d.ts +84 -0
- package/cjs/Volume.d.ts.map +1 -0
- package/cjs/Volume.js +119 -0
- package/cjs/Volume.js.map +1 -0
- package/cjs/__tests__/helpers.d.ts +6 -0
- package/cjs/__tests__/helpers.d.ts.map +1 -0
- package/cjs/__tests__/helpers.js +26 -0
- package/cjs/__tests__/helpers.js.map +1 -0
- package/cjs/errors/DaytonaError.d.ts +171 -0
- package/cjs/errors/DaytonaError.d.ts.map +1 -0
- package/cjs/errors/DaytonaError.js +258 -0
- package/cjs/errors/DaytonaError.js.map +1 -0
- package/cjs/index.d.ts +22 -0
- package/cjs/index.d.ts.map +1 -0
- package/cjs/index.js +49 -0
- package/cjs/index.js.map +1 -0
- package/cjs/package.json +3 -0
- package/cjs/types/Charts.d.ts +38 -0
- package/cjs/types/Charts.d.ts.map +1 -0
- package/cjs/types/Charts.js +37 -0
- package/cjs/types/Charts.js.map +1 -0
- package/cjs/types/CodeInterpreter.d.ts +77 -0
- package/cjs/types/CodeInterpreter.d.ts.map +1 -0
- package/cjs/types/CodeInterpreter.js +7 -0
- package/cjs/types/CodeInterpreter.js.map +1 -0
- package/cjs/types/ExecuteResponse.d.ts +26 -0
- package/cjs/types/ExecuteResponse.d.ts.map +1 -0
- package/cjs/types/ExecuteResponse.js +7 -0
- package/cjs/types/ExecuteResponse.js.map +1 -0
- package/cjs/types/Pty.d.ts +48 -0
- package/cjs/types/Pty.d.ts.map +1 -0
- package/cjs/types/Pty.js +7 -0
- package/cjs/types/Pty.js.map +1 -0
- package/cjs/utils/Binary.d.ts +39 -0
- package/cjs/utils/Binary.d.ts.map +1 -0
- package/cjs/utils/Binary.js +168 -0
- package/cjs/utils/Binary.js.map +1 -0
- package/cjs/utils/FileTransfer.d.ts +15 -0
- package/cjs/utils/FileTransfer.d.ts.map +1 -0
- package/cjs/utils/FileTransfer.js +261 -0
- package/cjs/utils/FileTransfer.js.map +1 -0
- package/cjs/utils/Import.d.ts +125 -0
- package/cjs/utils/Import.d.ts.map +1 -0
- package/cjs/utils/Import.js +112 -0
- package/cjs/utils/Import.js.map +1 -0
- package/cjs/utils/Multipart.d.ts +29 -0
- package/cjs/utils/Multipart.d.ts.map +1 -0
- package/cjs/utils/Multipart.js +115 -0
- package/cjs/utils/Multipart.js.map +1 -0
- package/cjs/utils/Runtime.d.ts +44 -0
- package/cjs/utils/Runtime.d.ts.map +1 -0
- package/cjs/utils/Runtime.js +95 -0
- package/cjs/utils/Runtime.js.map +1 -0
- package/cjs/utils/Stream.d.ts +20 -0
- package/cjs/utils/Stream.d.ts.map +1 -0
- package/cjs/utils/Stream.js +364 -0
- package/cjs/utils/Stream.js.map +1 -0
- package/cjs/utils/WebSocket.d.ts +10 -0
- package/cjs/utils/WebSocket.d.ts.map +1 -0
- package/cjs/utils/WebSocket.js +26 -0
- package/cjs/utils/WebSocket.js.map +1 -0
- package/cjs/utils/otel.decorator.d.ts +83 -0
- package/cjs/utils/otel.decorator.d.ts.map +1 -0
- package/cjs/utils/otel.decorator.js +141 -0
- package/cjs/utils/otel.decorator.js.map +1 -0
- package/esm/CodeInterpreter.d.ts +95 -0
- package/esm/CodeInterpreter.d.ts.map +1 -0
- package/esm/CodeInterpreter.js +292 -0
- package/esm/CodeInterpreter.js.map +1 -0
- package/esm/ComputerUse.d.ts +539 -0
- package/esm/ComputerUse.d.ts.map +1 -0
- package/esm/ComputerUse.js +799 -0
- package/esm/ComputerUse.js.map +1 -0
- package/esm/Daytona.d.ts +355 -0
- package/esm/Daytona.d.ts.map +1 -0
- package/esm/Daytona.js +523 -0
- package/esm/Daytona.js.map +1 -0
- package/esm/FileSystem.d.ts +371 -0
- package/esm/FileSystem.d.ts.map +1 -0
- package/esm/FileSystem.js +485 -0
- package/esm/FileSystem.js.map +1 -0
- package/esm/Git.d.ts +203 -0
- package/esm/Git.d.ts.map +1 -0
- package/esm/Git.js +322 -0
- package/esm/Git.js.map +1 -0
- package/esm/Image.d.ts +265 -0
- package/esm/Image.d.ts.map +1 -0
- package/esm/Image.js +581 -0
- package/esm/Image.js.map +1 -0
- package/esm/LspServer.d.ts +172 -0
- package/esm/LspServer.d.ts.map +1 -0
- package/esm/LspServer.js +255 -0
- package/esm/LspServer.js.map +1 -0
- package/esm/ObjectStorage.d.ts +79 -0
- package/esm/ObjectStorage.d.ts.map +1 -0
- package/esm/ObjectStorage.js +195 -0
- package/esm/ObjectStorage.js.map +1 -0
- package/esm/Process.d.ts +490 -0
- package/esm/Process.d.ts.map +1 -0
- package/esm/Process.js +642 -0
- package/esm/Process.js.map +1 -0
- package/esm/PtyHandle.d.ts +155 -0
- package/esm/PtyHandle.d.ts.map +1 -0
- package/esm/PtyHandle.js +412 -0
- package/esm/PtyHandle.js.map +1 -0
- package/esm/README.md +180 -0
- package/esm/Sandbox.d.ts +476 -0
- package/esm/Sandbox.d.ts.map +1 -0
- package/esm/Sandbox.js +901 -0
- package/esm/Sandbox.js.map +1 -0
- package/esm/Snapshot.d.ts +140 -0
- package/esm/Snapshot.d.ts.map +1 -0
- package/esm/Snapshot.js +244 -0
- package/esm/Snapshot.js.map +1 -0
- package/esm/Volume.d.ts +84 -0
- package/esm/Volume.d.ts.map +1 -0
- package/esm/Volume.js +115 -0
- package/esm/Volume.js.map +1 -0
- package/esm/__tests__/helpers.d.ts +6 -0
- package/esm/__tests__/helpers.d.ts.map +1 -0
- package/esm/__tests__/helpers.js +20 -0
- package/esm/__tests__/helpers.js.map +1 -0
- package/esm/errors/DaytonaError.d.ts +171 -0
- package/esm/errors/DaytonaError.d.ts.map +1 -0
- package/esm/errors/DaytonaError.js +243 -0
- package/esm/errors/DaytonaError.js.map +1 -0
- package/esm/index.d.ts +22 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +21 -0
- package/esm/index.js.map +1 -0
- package/esm/package.json +3 -0
- package/esm/types/Charts.d.ts +38 -0
- package/esm/types/Charts.d.ts.map +1 -0
- package/esm/types/Charts.js +33 -0
- package/esm/types/Charts.js.map +1 -0
- package/esm/types/CodeInterpreter.d.ts +77 -0
- package/esm/types/CodeInterpreter.d.ts.map +1 -0
- package/esm/types/CodeInterpreter.js +6 -0
- package/esm/types/CodeInterpreter.js.map +1 -0
- package/esm/types/ExecuteResponse.d.ts +26 -0
- package/esm/types/ExecuteResponse.d.ts.map +1 -0
- package/esm/types/ExecuteResponse.js +6 -0
- package/esm/types/ExecuteResponse.js.map +1 -0
- package/esm/types/Pty.d.ts +48 -0
- package/esm/types/Pty.d.ts.map +1 -0
- package/esm/types/Pty.js +6 -0
- package/esm/types/Pty.js.map +1 -0
- package/esm/utils/Binary.d.ts +39 -0
- package/esm/utils/Binary.d.ts.map +1 -0
- package/esm/utils/Binary.js +157 -0
- package/esm/utils/Binary.js.map +1 -0
- package/esm/utils/FileTransfer.d.ts +15 -0
- package/esm/utils/FileTransfer.d.ts.map +1 -0
- package/esm/utils/FileTransfer.js +254 -0
- package/esm/utils/FileTransfer.js.map +1 -0
- package/esm/utils/Import.d.ts +95 -0
- package/esm/utils/Import.d.ts.map +1 -0
- package/esm/utils/Import.js +77 -0
- package/esm/utils/Import.js.map +1 -0
- package/esm/utils/Multipart.d.ts +29 -0
- package/esm/utils/Multipart.d.ts.map +1 -0
- package/esm/utils/Multipart.js +109 -0
- package/esm/utils/Multipart.js.map +1 -0
- package/esm/utils/Runtime.d.ts +44 -0
- package/esm/utils/Runtime.d.ts.map +1 -0
- package/esm/utils/Runtime.js +89 -0
- package/esm/utils/Runtime.js.map +1 -0
- package/esm/utils/Stream.d.ts +20 -0
- package/esm/utils/Stream.d.ts.map +1 -0
- package/esm/utils/Stream.js +360 -0
- package/esm/utils/Stream.js.map +1 -0
- package/esm/utils/WebSocket.d.ts +10 -0
- package/esm/utils/WebSocket.d.ts.map +1 -0
- package/esm/utils/WebSocket.js +22 -0
- package/esm/utils/WebSocket.js.map +1 -0
- package/esm/utils/otel.decorator.d.ts +83 -0
- package/esm/utils/otel.decorator.d.ts.map +1 -0
- package/esm/utils/otel.decorator.js +136 -0
- package/esm/utils/otel.decorator.js.map +1 -0
- package/package.json +20 -8
- package/src/ComputerUse.d.ts +4 -4
- package/src/ComputerUse.js +4 -4
- package/src/Sandbox.d.ts +1 -18
- package/src/Sandbox.js +0 -29
- package/src/Sandbox.js.map +1 -1
- package/src/__tests__/helpers.js +0 -2
- package/src/__tests__/helpers.js.map +1 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module code-interpreter
|
|
3
|
+
*/
|
|
4
|
+
import { InterpreterContext } from '@daytona/toolbox-api-client';
|
|
5
|
+
/**
|
|
6
|
+
* Represents stdout or stderr output from code execution.
|
|
7
|
+
*/
|
|
8
|
+
export interface OutputMessage {
|
|
9
|
+
/**
|
|
10
|
+
* Output content.
|
|
11
|
+
*/
|
|
12
|
+
output: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Represents an error that occurred during code execution.
|
|
16
|
+
*/
|
|
17
|
+
export interface ExecutionError {
|
|
18
|
+
/**
|
|
19
|
+
* Error type/class name (e.g., "ValueError", "SyntaxError").
|
|
20
|
+
*/
|
|
21
|
+
name: string;
|
|
22
|
+
/**
|
|
23
|
+
* Error value/message.
|
|
24
|
+
*/
|
|
25
|
+
value: string;
|
|
26
|
+
/**
|
|
27
|
+
* Full traceback for the error, if available.
|
|
28
|
+
*/
|
|
29
|
+
traceback?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Result of code execution.
|
|
33
|
+
*/
|
|
34
|
+
export interface ExecutionResult {
|
|
35
|
+
/**
|
|
36
|
+
* Standard output captured during execution.
|
|
37
|
+
*/
|
|
38
|
+
stdout: string;
|
|
39
|
+
/**
|
|
40
|
+
* Standard error captured during execution.
|
|
41
|
+
*/
|
|
42
|
+
stderr: string;
|
|
43
|
+
/**
|
|
44
|
+
* Details about an execution error, if one occurred.
|
|
45
|
+
*/
|
|
46
|
+
error?: ExecutionError;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Options for executing code in the interpreter.
|
|
50
|
+
*/
|
|
51
|
+
export interface RunCodeOptions {
|
|
52
|
+
/**
|
|
53
|
+
* Interpreter context to run code in.
|
|
54
|
+
*/
|
|
55
|
+
context?: InterpreterContext;
|
|
56
|
+
/**
|
|
57
|
+
* Environment variables for this execution.
|
|
58
|
+
*/
|
|
59
|
+
envs?: Record<string, string>;
|
|
60
|
+
/**
|
|
61
|
+
* Timeout in seconds. Set to 0 for no timeout. Default is 10 minutes.
|
|
62
|
+
*/
|
|
63
|
+
timeout?: number;
|
|
64
|
+
/**
|
|
65
|
+
* Callback for stdout messages.
|
|
66
|
+
*/
|
|
67
|
+
onStdout?: (message: OutputMessage) => any | Promise<any>;
|
|
68
|
+
/**
|
|
69
|
+
* Callback for stderr messages.
|
|
70
|
+
*/
|
|
71
|
+
onStderr?: (message: OutputMessage) => any | Promise<any>;
|
|
72
|
+
/**
|
|
73
|
+
* Callback for execution errors (e.g., runtime exceptions).
|
|
74
|
+
*/
|
|
75
|
+
onError?: (error: ExecutionError) => any | Promise<any>;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=CodeInterpreter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeInterpreter.d.ts","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/types/CodeInterpreter.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAEhE;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,cAAc,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAA;IAC5B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;IACzD;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;IACzD;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;CACxD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeInterpreter.js","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/types/CodeInterpreter.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Chart } from './Charts';
|
|
2
|
+
/**
|
|
3
|
+
* Artifacts from the command execution.
|
|
4
|
+
*
|
|
5
|
+
* @interface
|
|
6
|
+
* @property stdout - Standard output from the command, same as `result` in `ExecuteResponse`
|
|
7
|
+
* @property charts - List of chart metadata from matplotlib
|
|
8
|
+
*/
|
|
9
|
+
export interface ExecutionArtifacts {
|
|
10
|
+
stdout: string;
|
|
11
|
+
charts?: Chart[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Response from the command execution.
|
|
15
|
+
*
|
|
16
|
+
* @interface
|
|
17
|
+
* @property exitCode - The exit code from the command execution
|
|
18
|
+
* @property result - The output from the command execution
|
|
19
|
+
* @property artifacts - Artifacts from the command execution
|
|
20
|
+
*/
|
|
21
|
+
export interface ExecuteResponse {
|
|
22
|
+
exitCode: number;
|
|
23
|
+
result: string;
|
|
24
|
+
artifacts?: ExecutionArtifacts;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=ExecuteResponse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExecuteResponse.d.ts","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/types/ExecuteResponse.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAErC;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,KAAK,EAAE,CAAA;CACjB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,kBAAkB,CAAA;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExecuteResponse.js","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/types/ExecuteResponse.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for creating a PTY session
|
|
3
|
+
*/
|
|
4
|
+
export interface PtyCreateOptions {
|
|
5
|
+
/**
|
|
6
|
+
* The unique identifier for the PTY session
|
|
7
|
+
*/
|
|
8
|
+
id: string;
|
|
9
|
+
/**
|
|
10
|
+
* Starting directory for the PTY session, defaults to the sandbox's working directory
|
|
11
|
+
*/
|
|
12
|
+
cwd?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Environment variables for the PTY session
|
|
15
|
+
*/
|
|
16
|
+
envs?: Record<string, string>;
|
|
17
|
+
/**
|
|
18
|
+
* Number of terminal columns
|
|
19
|
+
*/
|
|
20
|
+
cols?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Number of terminal rows
|
|
23
|
+
*/
|
|
24
|
+
rows?: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Options for connecting to a PTY session
|
|
28
|
+
*/
|
|
29
|
+
export interface PtyConnectOptions {
|
|
30
|
+
/**
|
|
31
|
+
* Callback to handle PTY output data
|
|
32
|
+
*/
|
|
33
|
+
onData: (data: Uint8Array) => void | Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* PTY session result on exit
|
|
37
|
+
*/
|
|
38
|
+
export interface PtyResult {
|
|
39
|
+
/**
|
|
40
|
+
* Exit code when the PTY process ends
|
|
41
|
+
*/
|
|
42
|
+
exitCode?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Error message if the PTY failed
|
|
45
|
+
*/
|
|
46
|
+
error?: string;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=Pty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pty.d.ts","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/types/Pty.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAE7B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf"}
|
package/cjs/types/Pty.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pty.js","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/types/Pty.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Buffer } from 'buffer';
|
|
2
|
+
/**
|
|
3
|
+
* Converts various data types to Uint8Array
|
|
4
|
+
*/
|
|
5
|
+
export declare function toUint8Array(data: string | ArrayBuffer | ArrayBufferView): Uint8Array;
|
|
6
|
+
/**
|
|
7
|
+
* Concatenates multiple Uint8Array chunks into a single Uint8Array
|
|
8
|
+
*/
|
|
9
|
+
export declare function concatUint8Arrays(parts: Uint8Array[]): Uint8Array;
|
|
10
|
+
/**
|
|
11
|
+
* Converts Uint8Array to Buffer (uses polyfill in non-Node environments)
|
|
12
|
+
*/
|
|
13
|
+
export declare function toBuffer(data: Uint8Array): Buffer;
|
|
14
|
+
/**
|
|
15
|
+
* Decodes Uint8Array to UTF-8 string
|
|
16
|
+
*/
|
|
17
|
+
export declare function utf8Decode(data: Uint8Array): string;
|
|
18
|
+
/**
|
|
19
|
+
* Finds all occurrences of a pattern in a byte buffer
|
|
20
|
+
*/
|
|
21
|
+
export declare function findAllBytes(buffer: Uint8Array, pattern: Uint8Array): number[];
|
|
22
|
+
/**
|
|
23
|
+
* Finds the first occurrence of a pattern in a byte buffer within a range
|
|
24
|
+
*/
|
|
25
|
+
export declare function findBytesInRange(buffer: Uint8Array, start: number, end: number, pattern: Uint8Array): number;
|
|
26
|
+
/**
|
|
27
|
+
* Checks if a sequence starts at a given position in a byte buffer
|
|
28
|
+
* Returns the position after the sequence if found, -1 otherwise
|
|
29
|
+
*/
|
|
30
|
+
export declare function indexAfterSequence(buffer: Uint8Array, start: number, sequence: Uint8Array): number;
|
|
31
|
+
/**
|
|
32
|
+
* Collects all bytes from various stream types into a single Uint8Array
|
|
33
|
+
*/
|
|
34
|
+
export declare function collectStreamBytes(stream: any): Promise<Uint8Array>;
|
|
35
|
+
/**
|
|
36
|
+
* Checks if value is a File object (browser environment)
|
|
37
|
+
*/
|
|
38
|
+
export declare function isFile(value: any): boolean;
|
|
39
|
+
//# sourceMappingURL=Binary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Binary.d.ts","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/utils/Binary.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAG/B;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,UAAU,CAWrF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,UAAU,CASjE;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAEjD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAEnD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,GAAG,MAAM,EAAE,CAmB9E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,MAAM,CAc5G;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,GAAG,MAAM,CAKlG;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,CAgDzE;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAG1C"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2025 Daytona Platforms Inc.
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.toUint8Array = toUint8Array;
|
|
8
|
+
exports.concatUint8Arrays = concatUint8Arrays;
|
|
9
|
+
exports.toBuffer = toBuffer;
|
|
10
|
+
exports.utf8Decode = utf8Decode;
|
|
11
|
+
exports.findAllBytes = findAllBytes;
|
|
12
|
+
exports.findBytesInRange = findBytesInRange;
|
|
13
|
+
exports.indexAfterSequence = indexAfterSequence;
|
|
14
|
+
exports.collectStreamBytes = collectStreamBytes;
|
|
15
|
+
exports.isFile = isFile;
|
|
16
|
+
const buffer_1 = require("buffer");
|
|
17
|
+
const DaytonaError_1 = require("../errors/DaytonaError");
|
|
18
|
+
/**
|
|
19
|
+
* Converts various data types to Uint8Array
|
|
20
|
+
*/
|
|
21
|
+
function toUint8Array(data) {
|
|
22
|
+
if (typeof data === 'string') {
|
|
23
|
+
return new TextEncoder().encode(data);
|
|
24
|
+
}
|
|
25
|
+
if (data instanceof ArrayBuffer) {
|
|
26
|
+
return new Uint8Array(data);
|
|
27
|
+
}
|
|
28
|
+
if (ArrayBuffer.isView(data)) {
|
|
29
|
+
return new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
|
|
30
|
+
}
|
|
31
|
+
throw new DaytonaError_1.DaytonaError('Unsupported data type for byte conversion.');
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Concatenates multiple Uint8Array chunks into a single Uint8Array
|
|
35
|
+
*/
|
|
36
|
+
function concatUint8Arrays(parts) {
|
|
37
|
+
const size = parts.reduce((sum, part) => sum + part.byteLength, 0);
|
|
38
|
+
const result = new Uint8Array(size);
|
|
39
|
+
let offset = 0;
|
|
40
|
+
for (const part of parts) {
|
|
41
|
+
result.set(part, offset);
|
|
42
|
+
offset += part.byteLength;
|
|
43
|
+
}
|
|
44
|
+
return result;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Converts Uint8Array to Buffer (uses polyfill in non-Node environments)
|
|
48
|
+
*/
|
|
49
|
+
function toBuffer(data) {
|
|
50
|
+
return buffer_1.Buffer.from(data);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Decodes Uint8Array to UTF-8 string
|
|
54
|
+
*/
|
|
55
|
+
function utf8Decode(data) {
|
|
56
|
+
return new TextDecoder('utf-8').decode(data);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Finds all occurrences of a pattern in a byte buffer
|
|
60
|
+
*/
|
|
61
|
+
function findAllBytes(buffer, pattern) {
|
|
62
|
+
const results = [];
|
|
63
|
+
let i = 0;
|
|
64
|
+
while (i <= buffer.length - pattern.length) {
|
|
65
|
+
let match = true;
|
|
66
|
+
for (let j = 0; j < pattern.length; j++) {
|
|
67
|
+
if (buffer[i + j] !== pattern[j]) {
|
|
68
|
+
match = false;
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (match) {
|
|
73
|
+
results.push(i);
|
|
74
|
+
i += pattern.length;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
i++;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return results;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Finds the first occurrence of a pattern in a byte buffer within a range
|
|
84
|
+
*/
|
|
85
|
+
function findBytesInRange(buffer, start, end, pattern) {
|
|
86
|
+
let i = start;
|
|
87
|
+
while (i <= end - pattern.length) {
|
|
88
|
+
let match = true;
|
|
89
|
+
for (let j = 0; j < pattern.length; j++) {
|
|
90
|
+
if (buffer[i + j] !== pattern[j]) {
|
|
91
|
+
match = false;
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (match)
|
|
96
|
+
return i;
|
|
97
|
+
i++;
|
|
98
|
+
}
|
|
99
|
+
return -1;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Checks if a sequence starts at a given position in a byte buffer
|
|
103
|
+
* Returns the position after the sequence if found, -1 otherwise
|
|
104
|
+
*/
|
|
105
|
+
function indexAfterSequence(buffer, start, sequence) {
|
|
106
|
+
for (let j = 0; j < sequence.length; j++) {
|
|
107
|
+
if (buffer[start + j] !== sequence[j])
|
|
108
|
+
return -1;
|
|
109
|
+
}
|
|
110
|
+
return start + sequence.length;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Collects all bytes from various stream types into a single Uint8Array
|
|
114
|
+
*/
|
|
115
|
+
async function collectStreamBytes(stream) {
|
|
116
|
+
if (!stream)
|
|
117
|
+
return new Uint8Array(0);
|
|
118
|
+
// ReadableStream (WHATWG)
|
|
119
|
+
if (typeof stream.getReader === 'function') {
|
|
120
|
+
const reader = stream.getReader();
|
|
121
|
+
const chunks = [];
|
|
122
|
+
try {
|
|
123
|
+
while (true) {
|
|
124
|
+
const { done, value } = await reader.read();
|
|
125
|
+
if (done)
|
|
126
|
+
break;
|
|
127
|
+
if (value?.byteLength) {
|
|
128
|
+
chunks.push(value);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
finally {
|
|
133
|
+
await reader.cancel();
|
|
134
|
+
}
|
|
135
|
+
return concatUint8Arrays(chunks);
|
|
136
|
+
}
|
|
137
|
+
// AsyncIterable
|
|
138
|
+
if (stream?.[Symbol.asyncIterator]) {
|
|
139
|
+
const chunks = [];
|
|
140
|
+
for await (const chunk of stream) {
|
|
141
|
+
chunks.push(toUint8Array(chunk));
|
|
142
|
+
}
|
|
143
|
+
return concatUint8Arrays(chunks);
|
|
144
|
+
}
|
|
145
|
+
// Direct data types
|
|
146
|
+
if (typeof stream === 'string' || stream instanceof ArrayBuffer || ArrayBuffer.isView(stream)) {
|
|
147
|
+
return toUint8Array(stream);
|
|
148
|
+
}
|
|
149
|
+
// Blob
|
|
150
|
+
if (typeof Blob !== 'undefined' && stream instanceof Blob) {
|
|
151
|
+
const arrayBuffer = await stream.arrayBuffer();
|
|
152
|
+
return new Uint8Array(arrayBuffer);
|
|
153
|
+
}
|
|
154
|
+
// Response
|
|
155
|
+
if (typeof Response !== 'undefined' && stream instanceof Response) {
|
|
156
|
+
const arrayBuffer = await stream.arrayBuffer();
|
|
157
|
+
return new Uint8Array(arrayBuffer);
|
|
158
|
+
}
|
|
159
|
+
throw new DaytonaError_1.DaytonaError('Unsupported stream type for byte collection.');
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Checks if value is a File object (browser environment)
|
|
163
|
+
*/
|
|
164
|
+
function isFile(value) {
|
|
165
|
+
const FileConstructor = globalThis.File;
|
|
166
|
+
return typeof FileConstructor !== 'undefined' && value instanceof FileConstructor;
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=Binary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Binary.js","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/utils/Binary.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAQH,oCAWC;AAKD,8CASC;AAKD,4BAEC;AAKD,gCAEC;AAKD,oCAmBC;AAKD,4CAcC;AAMD,gDAKC;AAKD,gDAgDC;AAKD,wBAGC;AAhKD,mCAA+B;AAC/B,yDAAqD;AAErD;;GAEG;AACH,SAAgB,YAAY,CA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EAAE,CAAA;QAC/B,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YACjC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAA;QAClC,CAAC;QACD,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAA;IAClC,CAAC;IAED,oBAAoB;IACpB,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,YAAY,WAAW,IAAI,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9F,OAAO,YAAY,CAAC,MAAM,CAAC,CAAA;IAC7B,CAAC;IAED,OAAO;IACP,IAAI,OAAO,IAAI,KAAK,WAAW,IAAI,MAAM,YAAY,IAAI,EAAE,CAAC;QAC1D,MAAM,WAAW,GAAG,MAAM,MAAM,CAAC,WAAW,EAAE,CAAA;QAC9C,OAAO,IAAI,UAAU,CAAC,WAAW,CAAC,CAAA;IACpC,CAAC;IAED,WAAW;IACX,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,MAAM,YAAY,QAAQ,EAAE,CAAC;QAClE,MAAM,WAAW,GAAG,MAAM,MAAM,CAAC,WAAW,EAAE,CAAA;QAC9C,OAAO,IAAI,UAAU,CAAC,WAAW,CAAC,CAAA;IACpC,CAAC;IAED,MAAM,IAAI,2BAAY,CAAC,8CAA8C,CAAC,CAAA;AACxE,CAAC;AAED;;GAEG;AACH,SAAgB,MAAM,CAAC,KAAU;IAC/B,MAAM,eAAe,GAAI,UAAkB,CAAC,IAAI,CAAA;IAChD,OAAO,OAAO,eAAe,KAAK,WAAW,IAAI,KAAK,YAAY,eAAe,CAAA;AACnF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DownloadMetadata } from '../FileSystem';
|
|
2
|
+
/**
|
|
3
|
+
* Safely aborts a stream
|
|
4
|
+
*/
|
|
5
|
+
export declare function abortStream(stream: any): void;
|
|
6
|
+
/**
|
|
7
|
+
* Normalizes response data to extract the actual stream
|
|
8
|
+
*/
|
|
9
|
+
export declare function normalizeResponseStream(responseData: any): any;
|
|
10
|
+
/**
|
|
11
|
+
* Processes multipart response using busboy (Node.js path)
|
|
12
|
+
*/
|
|
13
|
+
export declare function processDownloadFilesResponseWithBusboy(stream: any, headers: Record<string, string>, metadataMap: Map<string, DownloadMetadata>, onFileStream?: (source: string, fileStream: any) => void): Promise<void>;
|
|
14
|
+
export declare function processDownloadFilesResponseWithBuffered(stream: any, headers: Record<string, string>, metadataMap: Map<string, DownloadMetadata>): Promise<void>;
|
|
15
|
+
//# sourceMappingURL=FileTransfer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileTransfer.d.ts","sourceRoot":"","sources":["../../../../../../libs/sdk-typescript/src/utils/FileTransfer.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,gBAAgB,EAA4B,MAAM,eAAe,CAAA;AAqD/E;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CAM7C;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,GAAG,GAAG,GAAG,CAgB9D;AAED;;GAEG;AACH,wBAAsB,sCAAsC,CAC1D,MAAM,EAAE,GAAG,EACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAC1C,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,IAAI,GACvD,OAAO,CAAC,IAAI,CAAC,CAyFf;AA8CD,wBAAsB,wCAAwC,CAC5D,MAAM,EAAE,GAAG,EACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,GACzC,OAAO,CAAC,IAAI,CAAC,CAgDf"}
|