@daytonaio/sdk 0.128.0-alpha.1 → 0.128.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/package.json +8 -20
- package/{cjs → src}/CodeInterpreter.d.ts +0 -1
- package/src/CodeInterpreter.js.map +1 -0
- package/{esm → src}/ComputerUse.d.ts +0 -1
- package/src/ComputerUse.js.map +1 -0
- package/{cjs → src}/Daytona.d.ts +0 -1
- package/{cjs → src}/Daytona.js +0 -1
- package/src/Daytona.js.map +1 -0
- package/{esm → src}/FileSystem.d.ts +0 -1
- package/src/FileSystem.js.map +1 -0
- package/{esm → src}/Git.d.ts +0 -1
- package/src/Git.js.map +1 -0
- package/{cjs → src}/Image.d.ts +0 -21
- package/{cjs → src}/Image.js +91 -123
- package/src/Image.js.map +1 -0
- package/{cjs → src}/LspServer.d.ts +0 -1
- package/src/LspServer.js.map +1 -0
- package/{esm → src}/ObjectStorage.d.ts +0 -1
- package/src/ObjectStorage.js.map +1 -0
- package/{cjs → src}/Process.d.ts +0 -1
- package/src/Process.js.map +1 -0
- package/{cjs → src}/PtyHandle.d.ts +0 -1
- package/src/PtyHandle.js.map +1 -0
- package/{cjs → src}/Sandbox.d.ts +17 -2
- package/{cjs → src}/Sandbox.js +27 -1
- package/src/Sandbox.js.map +1 -0
- package/{cjs → src}/Snapshot.d.ts +0 -2
- package/{cjs → src}/Snapshot.js +1 -9
- package/src/Snapshot.js.map +1 -0
- package/{esm → src}/Volume.d.ts +0 -1
- package/src/Volume.js.map +1 -0
- package/{cjs → src}/code-toolbox/SandboxJsCodeToolbox.d.ts +0 -1
- package/src/code-toolbox/SandboxJsCodeToolbox.js.map +1 -0
- package/{cjs → src}/code-toolbox/SandboxPythonCodeToolbox.d.ts +0 -1
- package/src/code-toolbox/SandboxPythonCodeToolbox.js.map +1 -0
- package/{cjs → src}/code-toolbox/SandboxTsCodeToolbox.d.ts +0 -1
- package/src/code-toolbox/SandboxTsCodeToolbox.js.map +1 -0
- package/{esm → src}/errors/DaytonaError.d.ts +0 -1
- package/src/errors/DaytonaError.js.map +1 -0
- package/{cjs → src}/index.d.ts +0 -1
- package/src/index.js.map +1 -0
- package/{esm → src}/types/Charts.d.ts +0 -1
- package/src/types/Charts.js.map +1 -0
- package/{esm → src}/types/CodeInterpreter.d.ts +0 -1
- package/src/types/CodeInterpreter.js.map +1 -0
- package/{cjs → src}/types/ExecuteResponse.d.ts +0 -1
- package/src/types/ExecuteResponse.js.map +1 -0
- package/{cjs → src}/types/Pty.d.ts +0 -1
- package/src/types/Pty.js.map +1 -0
- package/{cjs → src}/utils/ArtifactParser.d.ts +0 -1
- package/src/utils/ArtifactParser.js.map +1 -0
- package/{esm → src}/utils/Binary.d.ts +0 -1
- package/src/utils/Binary.js.map +1 -0
- package/{cjs → src}/utils/FileTransfer.d.ts +0 -1
- package/src/utils/FileTransfer.js.map +1 -0
- package/{cjs → src}/utils/Import.d.ts +15 -2
- package/src/utils/Import.js +77 -0
- package/src/utils/Import.js.map +1 -0
- package/{esm → src}/utils/Multipart.d.ts +0 -1
- package/src/utils/Multipart.js.map +1 -0
- package/{cjs → src}/utils/Runtime.d.ts +0 -1
- package/src/utils/Runtime.js.map +1 -0
- package/{cjs → src}/utils/Stream.d.ts +0 -1
- package/src/utils/Stream.js.map +1 -0
- package/{esm → src}/utils/WebSocket.d.ts +0 -1
- package/src/utils/WebSocket.js.map +1 -0
- package/LICENSE +0 -190
- package/cjs/CodeInterpreter.d.ts.map +0 -1
- package/cjs/CodeInterpreter.js.map +0 -1
- package/cjs/ComputerUse.d.ts +0 -443
- package/cjs/ComputerUse.d.ts.map +0 -1
- package/cjs/ComputerUse.js.map +0 -1
- package/cjs/Daytona.d.ts.map +0 -1
- package/cjs/Daytona.js.map +0 -1
- package/cjs/FileSystem.d.ts +0 -328
- package/cjs/FileSystem.d.ts.map +0 -1
- package/cjs/FileSystem.js.map +0 -1
- package/cjs/Git.d.ts +0 -203
- package/cjs/Git.d.ts.map +0 -1
- package/cjs/Git.js.map +0 -1
- package/cjs/Image.d.ts.map +0 -1
- package/cjs/Image.js.map +0 -1
- package/cjs/LspServer.d.ts.map +0 -1
- package/cjs/LspServer.js.map +0 -1
- package/cjs/ObjectStorage.d.ts +0 -79
- package/cjs/ObjectStorage.d.ts.map +0 -1
- package/cjs/ObjectStorage.js.map +0 -1
- package/cjs/Process.d.ts.map +0 -1
- package/cjs/Process.js.map +0 -1
- package/cjs/PtyHandle.d.ts.map +0 -1
- package/cjs/PtyHandle.js.map +0 -1
- package/cjs/README.md +0 -147
- package/cjs/Sandbox.d.ts.map +0 -1
- package/cjs/Sandbox.js.map +0 -1
- package/cjs/Snapshot.d.ts.map +0 -1
- package/cjs/Snapshot.js.map +0 -1
- package/cjs/Volume.d.ts +0 -84
- package/cjs/Volume.d.ts.map +0 -1
- package/cjs/Volume.js.map +0 -1
- package/cjs/code-toolbox/SandboxJsCodeToolbox.d.ts.map +0 -1
- package/cjs/code-toolbox/SandboxJsCodeToolbox.js.map +0 -1
- package/cjs/code-toolbox/SandboxPythonCodeToolbox.d.ts.map +0 -1
- package/cjs/code-toolbox/SandboxPythonCodeToolbox.js.map +0 -1
- package/cjs/code-toolbox/SandboxTsCodeToolbox.d.ts.map +0 -1
- package/cjs/code-toolbox/SandboxTsCodeToolbox.js.map +0 -1
- package/cjs/errors/DaytonaError.d.ts +0 -32
- package/cjs/errors/DaytonaError.d.ts.map +0 -1
- package/cjs/errors/DaytonaError.js.map +0 -1
- package/cjs/index.d.ts.map +0 -1
- package/cjs/index.js.map +0 -1
- package/cjs/package.json +0 -3
- package/cjs/types/Charts.d.ts +0 -152
- package/cjs/types/Charts.d.ts.map +0 -1
- package/cjs/types/Charts.js.map +0 -1
- package/cjs/types/CodeInterpreter.d.ts +0 -77
- package/cjs/types/CodeInterpreter.d.ts.map +0 -1
- package/cjs/types/CodeInterpreter.js.map +0 -1
- package/cjs/types/ExecuteResponse.d.ts.map +0 -1
- package/cjs/types/ExecuteResponse.js.map +0 -1
- package/cjs/types/Pty.d.ts.map +0 -1
- package/cjs/types/Pty.js.map +0 -1
- package/cjs/utils/ArtifactParser.d.ts.map +0 -1
- package/cjs/utils/ArtifactParser.js.map +0 -1
- package/cjs/utils/Binary.d.ts +0 -39
- package/cjs/utils/Binary.d.ts.map +0 -1
- package/cjs/utils/Binary.js.map +0 -1
- package/cjs/utils/FileTransfer.d.ts.map +0 -1
- package/cjs/utils/FileTransfer.js.map +0 -1
- package/cjs/utils/Import.d.ts.map +0 -1
- package/cjs/utils/Import.js +0 -81
- package/cjs/utils/Import.js.map +0 -1
- package/cjs/utils/Multipart.d.ts +0 -27
- package/cjs/utils/Multipart.d.ts.map +0 -1
- package/cjs/utils/Multipart.js.map +0 -1
- package/cjs/utils/Runtime.d.ts.map +0 -1
- package/cjs/utils/Runtime.js.map +0 -1
- package/cjs/utils/Stream.d.ts.map +0 -1
- package/cjs/utils/Stream.js.map +0 -1
- package/cjs/utils/WebSocket.d.ts +0 -10
- package/cjs/utils/WebSocket.d.ts.map +0 -1
- package/cjs/utils/WebSocket.js.map +0 -1
- package/esm/CodeInterpreter.d.ts +0 -96
- package/esm/CodeInterpreter.d.ts.map +0 -1
- package/esm/CodeInterpreter.js +0 -295
- package/esm/CodeInterpreter.js.map +0 -1
- package/esm/ComputerUse.d.ts.map +0 -1
- package/esm/ComputerUse.js +0 -509
- package/esm/ComputerUse.js.map +0 -1
- package/esm/Daytona.d.ts +0 -354
- package/esm/Daytona.d.ts.map +0 -1
- package/esm/Daytona.js +0 -410
- package/esm/Daytona.js.map +0 -1
- package/esm/FileSystem.d.ts.map +0 -1
- package/esm/FileSystem.js +0 -331
- package/esm/FileSystem.js.map +0 -1
- package/esm/Git.d.ts.map +0 -1
- package/esm/Git.js +0 -260
- package/esm/Git.js.map +0 -1
- package/esm/Image.d.ts +0 -285
- package/esm/Image.d.ts.map +0 -1
- package/esm/Image.js +0 -569
- package/esm/Image.js.map +0 -1
- package/esm/LspServer.d.ts +0 -172
- package/esm/LspServer.d.ts.map +0 -1
- package/esm/LspServer.js +0 -204
- package/esm/LspServer.js.map +0 -1
- package/esm/ObjectStorage.d.ts.map +0 -1
- package/esm/ObjectStorage.js +0 -187
- package/esm/ObjectStorage.js.map +0 -1
- package/esm/Process.d.ts +0 -442
- package/esm/Process.d.ts.map +0 -1
- package/esm/Process.js +0 -644
- package/esm/Process.js.map +0 -1
- package/esm/PtyHandle.d.ts +0 -155
- package/esm/PtyHandle.d.ts.map +0 -1
- package/esm/PtyHandle.js +0 -374
- package/esm/PtyHandle.js.map +0 -1
- package/esm/README.md +0 -147
- package/esm/Sandbox.d.ts +0 -359
- package/esm/Sandbox.d.ts.map +0 -1
- package/esm/Sandbox.js +0 -532
- package/esm/Sandbox.js.map +0 -1
- package/esm/Snapshot.d.ts +0 -138
- package/esm/Snapshot.d.ts.map +0 -1
- package/esm/Snapshot.js +0 -207
- package/esm/Snapshot.js.map +0 -1
- package/esm/Volume.d.ts.map +0 -1
- package/esm/Volume.js +0 -95
- package/esm/Volume.js.map +0 -1
- package/esm/code-toolbox/SandboxJsCodeToolbox.d.ts +0 -6
- package/esm/code-toolbox/SandboxJsCodeToolbox.d.ts.map +0 -1
- package/esm/code-toolbox/SandboxJsCodeToolbox.js +0 -13
- package/esm/code-toolbox/SandboxJsCodeToolbox.js.map +0 -1
- package/esm/code-toolbox/SandboxPythonCodeToolbox.d.ts +0 -12
- package/esm/code-toolbox/SandboxPythonCodeToolbox.d.ts.map +0 -1
- package/esm/code-toolbox/SandboxPythonCodeToolbox.js +0 -355
- package/esm/code-toolbox/SandboxPythonCodeToolbox.js.map +0 -1
- package/esm/code-toolbox/SandboxTsCodeToolbox.d.ts +0 -6
- package/esm/code-toolbox/SandboxTsCodeToolbox.d.ts.map +0 -1
- package/esm/code-toolbox/SandboxTsCodeToolbox.js +0 -14
- package/esm/code-toolbox/SandboxTsCodeToolbox.js.map +0 -1
- package/esm/errors/DaytonaError.d.ts.map +0 -1
- package/esm/errors/DaytonaError.js +0 -44
- package/esm/errors/DaytonaError.js.map +0 -1
- package/esm/index.d.ts +0 -22
- package/esm/index.d.ts.map +0 -1
- package/esm/index.js +0 -22
- package/esm/index.js.map +0 -1
- package/esm/package.json +0 -3
- package/esm/types/Charts.d.ts.map +0 -1
- package/esm/types/Charts.js +0 -42
- package/esm/types/Charts.js.map +0 -1
- package/esm/types/CodeInterpreter.d.ts.map +0 -1
- package/esm/types/CodeInterpreter.js +0 -6
- package/esm/types/CodeInterpreter.js.map +0 -1
- package/esm/types/ExecuteResponse.d.ts +0 -26
- package/esm/types/ExecuteResponse.d.ts.map +0 -1
- package/esm/types/ExecuteResponse.js +0 -6
- package/esm/types/ExecuteResponse.js.map +0 -1
- package/esm/types/Pty.d.ts +0 -48
- package/esm/types/Pty.d.ts.map +0 -1
- package/esm/types/Pty.js +0 -6
- package/esm/types/Pty.js.map +0 -1
- package/esm/utils/ArtifactParser.d.ts +0 -14
- package/esm/utils/ArtifactParser.d.ts.map +0 -1
- package/esm/utils/ArtifactParser.js +0 -51
- package/esm/utils/ArtifactParser.js.map +0 -1
- package/esm/utils/Binary.d.ts.map +0 -1
- package/esm/utils/Binary.js +0 -157
- package/esm/utils/Binary.js.map +0 -1
- package/esm/utils/FileTransfer.d.ts +0 -15
- package/esm/utils/FileTransfer.d.ts.map +0 -1
- package/esm/utils/FileTransfer.js +0 -209
- package/esm/utils/FileTransfer.js.map +0 -1
- package/esm/utils/Import.d.ts +0 -211
- package/esm/utils/Import.d.ts.map +0 -1
- package/esm/utils/Import.js +0 -45
- package/esm/utils/Import.js.map +0 -1
- package/esm/utils/Multipart.d.ts.map +0 -1
- package/esm/utils/Multipart.js +0 -107
- package/esm/utils/Multipart.js.map +0 -1
- package/esm/utils/Runtime.d.ts +0 -37
- package/esm/utils/Runtime.d.ts.map +0 -1
- package/esm/utils/Runtime.js +0 -57
- package/esm/utils/Runtime.js.map +0 -1
- package/esm/utils/Stream.d.ts +0 -20
- package/esm/utils/Stream.d.ts.map +0 -1
- package/esm/utils/Stream.js +0 -360
- package/esm/utils/Stream.js.map +0 -1
- package/esm/utils/WebSocket.d.ts.map +0 -1
- package/esm/utils/WebSocket.js +0 -22
- package/esm/utils/WebSocket.js.map +0 -1
- /package/{cjs → src}/CodeInterpreter.js +0 -0
- /package/{cjs → src}/ComputerUse.js +0 -0
- /package/{cjs → src}/FileSystem.js +0 -0
- /package/{cjs → src}/Git.js +0 -0
- /package/{cjs → src}/LspServer.js +0 -0
- /package/{cjs → src}/ObjectStorage.js +0 -0
- /package/{cjs → src}/Process.js +0 -0
- /package/{cjs → src}/PtyHandle.js +0 -0
- /package/{cjs → src}/Volume.js +0 -0
- /package/{cjs → src}/code-toolbox/SandboxJsCodeToolbox.js +0 -0
- /package/{cjs → src}/code-toolbox/SandboxPythonCodeToolbox.js +0 -0
- /package/{cjs → src}/code-toolbox/SandboxTsCodeToolbox.js +0 -0
- /package/{cjs → src}/errors/DaytonaError.js +0 -0
- /package/{cjs → src}/index.js +0 -0
- /package/{cjs → src}/types/Charts.js +0 -0
- /package/{cjs → src}/types/CodeInterpreter.js +0 -0
- /package/{cjs → src}/types/ExecuteResponse.js +0 -0
- /package/{cjs → src}/types/Pty.js +0 -0
- /package/{cjs → src}/utils/ArtifactParser.js +0 -0
- /package/{cjs → src}/utils/Binary.js +0 -0
- /package/{cjs → src}/utils/FileTransfer.js +0 -0
- /package/{cjs → src}/utils/Multipart.js +0 -0
- /package/{cjs → src}/utils/Runtime.js +0 -0
- /package/{cjs → src}/utils/Stream.js +0 -0
- /package/{cjs → src}/utils/WebSocket.js +0 -0
package/esm/Image.d.ts
DELETED
|
@@ -1,285 +0,0 @@
|
|
|
1
|
-
declare const SUPPORTED_PYTHON_SERIES: readonly ["3.9", "3.10", "3.11", "3.12", "3.13"];
|
|
2
|
-
type SupportedPythonSeries = (typeof SUPPORTED_PYTHON_SERIES)[number];
|
|
3
|
-
/**
|
|
4
|
-
* Represents a context file to be added to the image.
|
|
5
|
-
*
|
|
6
|
-
* @interface
|
|
7
|
-
* @property {string} sourcePath - The path to the source file or directory.
|
|
8
|
-
* @property {string} archivePath - The path inside the archive file in object storage.
|
|
9
|
-
*/
|
|
10
|
-
export interface Context {
|
|
11
|
-
sourcePath: string;
|
|
12
|
-
archivePath: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Options for the pip install command.
|
|
16
|
-
*
|
|
17
|
-
* @interface
|
|
18
|
-
* @property {string[]} findLinks - The find-links to use for the pip install command.
|
|
19
|
-
* @property {string} indexUrl - The index URL to use for the pip install command.
|
|
20
|
-
* @property {string[]} extraIndexUrls - The extra index URLs to use for the pip install command.
|
|
21
|
-
* @property {boolean} pre - Whether to install pre-release versions.
|
|
22
|
-
* @property {string} extraOptions - The extra options to use for the pip install command. Given string is passed directly to the pip install command.
|
|
23
|
-
*/
|
|
24
|
-
export interface PipInstallOptions {
|
|
25
|
-
findLinks?: string[];
|
|
26
|
-
indexUrl?: string;
|
|
27
|
-
extraIndexUrls?: string[];
|
|
28
|
-
pre?: boolean;
|
|
29
|
-
extraOptions?: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Options for the pip install command from a pyproject.toml file.
|
|
33
|
-
*
|
|
34
|
-
* @interface
|
|
35
|
-
* @property {string[]} optionalDependencies - The optional dependencies to install.
|
|
36
|
-
*
|
|
37
|
-
* @extends {PipInstallOptions}
|
|
38
|
-
*/
|
|
39
|
-
export interface PyprojectOptions extends PipInstallOptions {
|
|
40
|
-
optionalDependencies?: string[];
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Represents an image definition for a Daytona sandbox.
|
|
44
|
-
* Do not construct this class directly. Instead use one of its static factory methods,
|
|
45
|
-
* such as `Image.base()`, `Image.debianSlim()` or `Image.fromDockerfile()`.
|
|
46
|
-
*
|
|
47
|
-
* @class
|
|
48
|
-
* @property {string} dockerfile - The Dockerfile content.
|
|
49
|
-
* @property {Context[]} contextList - The list of context files to be added to the image.
|
|
50
|
-
*/
|
|
51
|
-
export declare class Image {
|
|
52
|
-
private _dockerfile;
|
|
53
|
-
private _contextList;
|
|
54
|
-
private _promiseChain;
|
|
55
|
-
private constructor();
|
|
56
|
-
get dockerfile(): string;
|
|
57
|
-
get contextList(): Context[];
|
|
58
|
-
/**
|
|
59
|
-
* Makes the Image class thenable, allowing it to be used with `await`.
|
|
60
|
-
* When awaited, all queued async operations are executed and the Image instance resolves to itself.
|
|
61
|
-
*
|
|
62
|
-
* @param {function} onfulfilled - Called when the Image is resolved.
|
|
63
|
-
* @param {function} onrejected - Called when the Image is rejected.
|
|
64
|
-
* @returns {Promise} A promise that resolves to the transformation result.
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
* const image = await Image.debianSlim('3.12').pipInstall('numpy')
|
|
68
|
-
*/
|
|
69
|
-
then<TResult1 = Image, TResult2 = never>(onfulfilled?: ((value: Image) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
|
|
70
|
-
/**
|
|
71
|
-
* Queues an async operation to be executed when the Image is awaited.
|
|
72
|
-
*
|
|
73
|
-
* @param {function} operation - The async operation to queue.
|
|
74
|
-
* @returns {Image} The Image instance for chaining.
|
|
75
|
-
*/
|
|
76
|
-
private queueAsyncOperation;
|
|
77
|
-
/**
|
|
78
|
-
* Adds commands to install packages using pip.
|
|
79
|
-
*
|
|
80
|
-
* @param {string | string[]} packages - The packages to install.
|
|
81
|
-
* @param {Object} options - The options for the pip install command.
|
|
82
|
-
* @param {string[]} options.findLinks - The find-links to use for the pip install command.
|
|
83
|
-
* @returns {Image} The Image instance.
|
|
84
|
-
*
|
|
85
|
-
* @example
|
|
86
|
-
* const image = Image.debianSlim('3.12').pipInstall('numpy', { findLinks: ['https://pypi.org/simple'] })
|
|
87
|
-
*/
|
|
88
|
-
pipInstall(packages: string | string[], options?: PipInstallOptions): Image;
|
|
89
|
-
/**
|
|
90
|
-
* Installs dependencies from a requirements.txt file.
|
|
91
|
-
*
|
|
92
|
-
* @param {string} requirementsTxt - The path to the requirements.txt file.
|
|
93
|
-
* @param {PipInstallOptions} options - The options for the pip install command.
|
|
94
|
-
* @returns {Image} The Image instance.
|
|
95
|
-
*
|
|
96
|
-
* @example
|
|
97
|
-
* const image = Image.debianSlim('3.12')
|
|
98
|
-
* image.pipInstallFromRequirements('requirements.txt', { findLinks: ['https://pypi.org/simple'] })
|
|
99
|
-
*/
|
|
100
|
-
pipInstallFromRequirements(requirementsTxt: string, options?: PipInstallOptions): Image;
|
|
101
|
-
/**
|
|
102
|
-
* Installs dependencies from a pyproject.toml file.
|
|
103
|
-
*
|
|
104
|
-
* @param {string} pyprojectToml - The path to the pyproject.toml file.
|
|
105
|
-
* @param {PyprojectOptions} options - The options for the pip install command.
|
|
106
|
-
* @returns {Image} The Image instance.
|
|
107
|
-
*
|
|
108
|
-
* @example
|
|
109
|
-
* const image = Image.debianSlim('3.12')
|
|
110
|
-
* image.pipInstallFromPyproject('pyproject.toml', { optionalDependencies: ['dev'] })
|
|
111
|
-
*/
|
|
112
|
-
pipInstallFromPyproject(pyprojectToml: string, options?: PyprojectOptions): Image;
|
|
113
|
-
/**
|
|
114
|
-
* Adds a local file to the image.
|
|
115
|
-
*
|
|
116
|
-
* @param {string} localPath - The path to the local file.
|
|
117
|
-
* @param {string} remotePath - The path of the file in the image.
|
|
118
|
-
* @returns {Image} The Image instance.
|
|
119
|
-
*
|
|
120
|
-
* @example
|
|
121
|
-
* const image = Image
|
|
122
|
-
* .debianSlim('3.12')
|
|
123
|
-
* .addLocalFile('requirements.txt', '/home/daytona/requirements.txt')
|
|
124
|
-
*/
|
|
125
|
-
addLocalFile(localPath: string, remotePath: string): Image;
|
|
126
|
-
/**
|
|
127
|
-
* Adds a local directory to the image.
|
|
128
|
-
*
|
|
129
|
-
* @param {string} localPath - The path to the local directory.
|
|
130
|
-
* @param {string} remotePath - The path of the directory in the image.
|
|
131
|
-
* @returns {Image} The Image instance.
|
|
132
|
-
*
|
|
133
|
-
* @example
|
|
134
|
-
* const image = Image
|
|
135
|
-
* .debianSlim('3.12')
|
|
136
|
-
* .addLocalDir('src', '/home/daytona/src')
|
|
137
|
-
*/
|
|
138
|
-
addLocalDir(localPath: string, remotePath: string): Image;
|
|
139
|
-
/**
|
|
140
|
-
* Runs commands in the image.
|
|
141
|
-
*
|
|
142
|
-
* @param {string | string[]} commands - The commands to run.
|
|
143
|
-
* @returns {Image} The Image instance.
|
|
144
|
-
*
|
|
145
|
-
* @example
|
|
146
|
-
* const image = Image
|
|
147
|
-
* .debianSlim('3.12')
|
|
148
|
-
* .runCommands(
|
|
149
|
-
* 'echo "Hello, world!"',
|
|
150
|
-
* ['bash', '-c', 'echo Hello, world, again!']
|
|
151
|
-
* )
|
|
152
|
-
*/
|
|
153
|
-
runCommands(...commands: (string | string[])[]): Image;
|
|
154
|
-
/**
|
|
155
|
-
* Sets environment variables in the image.
|
|
156
|
-
*
|
|
157
|
-
* @param {Record<string, string>} envVars - The environment variables to set.
|
|
158
|
-
* @returns {Image} The Image instance.
|
|
159
|
-
*
|
|
160
|
-
* @example
|
|
161
|
-
* const image = Image
|
|
162
|
-
* .debianSlim('3.12')
|
|
163
|
-
* .env({ FOO: 'bar' })
|
|
164
|
-
*/
|
|
165
|
-
env(envVars: Record<string, string>): Image;
|
|
166
|
-
/**
|
|
167
|
-
* Sets the working directory in the image.
|
|
168
|
-
*
|
|
169
|
-
* @param {string} dirPath - The path to the working directory.
|
|
170
|
-
* @returns {Image} The Image instance.
|
|
171
|
-
*
|
|
172
|
-
* @example
|
|
173
|
-
* const image = Image
|
|
174
|
-
* .debianSlim('3.12')
|
|
175
|
-
* .workdir('/home/daytona')
|
|
176
|
-
*/
|
|
177
|
-
workdir(dirPath: string): Image;
|
|
178
|
-
/**
|
|
179
|
-
* Sets the entrypoint for the image.
|
|
180
|
-
*
|
|
181
|
-
* @param {string[]} entrypointCommands - The commands to set as the entrypoint.
|
|
182
|
-
* @returns {Image} The Image instance.
|
|
183
|
-
*
|
|
184
|
-
* @example
|
|
185
|
-
* const image = Image
|
|
186
|
-
* .debianSlim('3.12')
|
|
187
|
-
* .entrypoint(['/bin/bash'])
|
|
188
|
-
*/
|
|
189
|
-
entrypoint(entrypointCommands: string[]): Image;
|
|
190
|
-
/**
|
|
191
|
-
* Sets the default command for the image.
|
|
192
|
-
*
|
|
193
|
-
* @param {string[]} cmd - The command to set as the default command.
|
|
194
|
-
* @returns {Image} The Image instance.
|
|
195
|
-
*
|
|
196
|
-
* @example
|
|
197
|
-
* const image = Image
|
|
198
|
-
* .debianSlim('3.12')
|
|
199
|
-
* .cmd(['/bin/bash'])
|
|
200
|
-
*/
|
|
201
|
-
cmd(cmd: string[]): Image;
|
|
202
|
-
/**
|
|
203
|
-
* Extends an image with arbitrary Dockerfile-like commands.
|
|
204
|
-
*
|
|
205
|
-
* @param {string | string[]} dockerfileCommands - The commands to add to the Dockerfile.
|
|
206
|
-
* @param {string} contextDir - The path to the context directory.
|
|
207
|
-
* @returns {Image} The Image instance.
|
|
208
|
-
*
|
|
209
|
-
* @example
|
|
210
|
-
* const image = Image
|
|
211
|
-
* .debianSlim('3.12')
|
|
212
|
-
* .dockerfileCommands(['RUN echo "Hello, world!"'])
|
|
213
|
-
*/
|
|
214
|
-
dockerfileCommands(dockerfileCommands: string[], contextDir?: string): Image;
|
|
215
|
-
/**
|
|
216
|
-
* Creates an Image from an existing Dockerfile.
|
|
217
|
-
*
|
|
218
|
-
* @param {string} path - The path to the Dockerfile.
|
|
219
|
-
* @returns {Image} The Image instance.
|
|
220
|
-
*
|
|
221
|
-
* @example
|
|
222
|
-
* const image = Image.fromDockerfile('Dockerfile')
|
|
223
|
-
*/
|
|
224
|
-
static fromDockerfile(path: string): Image;
|
|
225
|
-
/**
|
|
226
|
-
* Creates an Image from an existing base image.
|
|
227
|
-
*
|
|
228
|
-
* @param {string} image - The base image to use.
|
|
229
|
-
* @returns {Image} The Image instance.
|
|
230
|
-
*
|
|
231
|
-
* @example
|
|
232
|
-
* const image = Image.base('python:3.12-slim-bookworm')
|
|
233
|
-
*/
|
|
234
|
-
static base(image: string): Image;
|
|
235
|
-
/**
|
|
236
|
-
* Creates a Debian slim image based on the official Python Docker image.
|
|
237
|
-
*
|
|
238
|
-
* @param {string} pythonVersion - The Python version to use.
|
|
239
|
-
* @returns {Image} The Image instance.
|
|
240
|
-
*
|
|
241
|
-
* @example
|
|
242
|
-
* const image = Image.debianSlim('3.12')
|
|
243
|
-
*/
|
|
244
|
-
static debianSlim(pythonVersion?: SupportedPythonSeries): Image;
|
|
245
|
-
/**
|
|
246
|
-
* Formats pip install arguments in a single string.
|
|
247
|
-
*
|
|
248
|
-
* @param {PipInstallOptions} options - The options for the pip install command.
|
|
249
|
-
* @returns {string} The formatted pip install arguments.
|
|
250
|
-
*/
|
|
251
|
-
private formatPipInstallArgs;
|
|
252
|
-
/**
|
|
253
|
-
* Flattens a string argument.
|
|
254
|
-
*
|
|
255
|
-
* @param {string} functionName - The name of the function.
|
|
256
|
-
* @param {string} argName - The name of the argument.
|
|
257
|
-
* @param {any} args - The argument to flatten.
|
|
258
|
-
* @returns {string[]} The flattened argument.
|
|
259
|
-
*/
|
|
260
|
-
private flattenStringArgs;
|
|
261
|
-
/**
|
|
262
|
-
* Processes the Python version.
|
|
263
|
-
*
|
|
264
|
-
* @param {string} pythonVersion - The Python version to use.
|
|
265
|
-
* @returns {string} The processed Python version.
|
|
266
|
-
*/
|
|
267
|
-
private static processPythonVersion;
|
|
268
|
-
/**
|
|
269
|
-
* Extracts source files from COPY commands in a Dockerfile.
|
|
270
|
-
*
|
|
271
|
-
* @param {string} dockerfileContent - The content of the Dockerfile.
|
|
272
|
-
* @param {string} pathPrefix - The path prefix to use for the sources.
|
|
273
|
-
* @returns {Array<[string, string]>} The list of the actual file path and its corresponding COPY-command source path.
|
|
274
|
-
*/
|
|
275
|
-
private static extractCopySources;
|
|
276
|
-
/**
|
|
277
|
-
* Parses a COPY command to extract sources and destination.
|
|
278
|
-
*
|
|
279
|
-
* @param {string} line - The line to parse.
|
|
280
|
-
* @returns {Object} The parsed sources and destination.
|
|
281
|
-
*/
|
|
282
|
-
private static parseCopyCommand;
|
|
283
|
-
}
|
|
284
|
-
export {};
|
|
285
|
-
//# sourceMappingURL=Image.d.ts.map
|
package/esm/Image.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../../libs/sdk-typescript/src/Image.ts"],"names":[],"mappings":"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"}
|