@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.js
DELETED
|
@@ -1,569 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Daytona Platforms Inc.
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
import * as pathe from 'pathe';
|
|
6
|
-
import { quote, parse as parseShellQuote } from 'shell-quote';
|
|
7
|
-
import { DaytonaError } from './errors/DaytonaError.js';
|
|
8
|
-
import { dynamicImport } from './utils/Import.js';
|
|
9
|
-
const SUPPORTED_PYTHON_SERIES = ['3.9', '3.10', '3.11', '3.12', '3.13'];
|
|
10
|
-
const LATEST_PYTHON_MICRO_VERSIONS = ['3.9.22', '3.10.17', '3.11.12', '3.12.10', '3.13.3'];
|
|
11
|
-
/**
|
|
12
|
-
* Represents an image definition for a Daytona sandbox.
|
|
13
|
-
* Do not construct this class directly. Instead use one of its static factory methods,
|
|
14
|
-
* such as `Image.base()`, `Image.debianSlim()` or `Image.fromDockerfile()`.
|
|
15
|
-
*
|
|
16
|
-
* @class
|
|
17
|
-
* @property {string} dockerfile - The Dockerfile content.
|
|
18
|
-
* @property {Context[]} contextList - The list of context files to be added to the image.
|
|
19
|
-
*/
|
|
20
|
-
export class Image {
|
|
21
|
-
_dockerfile = '';
|
|
22
|
-
_contextList = [];
|
|
23
|
-
_promiseChain = Promise.resolve();
|
|
24
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
25
|
-
constructor() { }
|
|
26
|
-
get dockerfile() {
|
|
27
|
-
return this._dockerfile;
|
|
28
|
-
}
|
|
29
|
-
get contextList() {
|
|
30
|
-
return this._contextList;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Makes the Image class thenable, allowing it to be used with `await`.
|
|
34
|
-
* When awaited, all queued async operations are executed and the Image instance resolves to itself.
|
|
35
|
-
*
|
|
36
|
-
* @param {function} onfulfilled - Called when the Image is resolved.
|
|
37
|
-
* @param {function} onrejected - Called when the Image is rejected.
|
|
38
|
-
* @returns {Promise} A promise that resolves to the transformation result.
|
|
39
|
-
*
|
|
40
|
-
* @example
|
|
41
|
-
* const image = await Image.debianSlim('3.12').pipInstall('numpy')
|
|
42
|
-
*/
|
|
43
|
-
then(onfulfilled, onrejected) {
|
|
44
|
-
return this._promiseChain.then(() => this).then(onfulfilled, onrejected);
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Queues an async operation to be executed when the Image is awaited.
|
|
48
|
-
*
|
|
49
|
-
* @param {function} operation - The async operation to queue.
|
|
50
|
-
* @returns {Image} The Image instance for chaining.
|
|
51
|
-
*/
|
|
52
|
-
queueAsyncOperation(operation) {
|
|
53
|
-
this._promiseChain = this._promiseChain.then(operation);
|
|
54
|
-
return this;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Adds commands to install packages using pip.
|
|
58
|
-
*
|
|
59
|
-
* @param {string | string[]} packages - The packages to install.
|
|
60
|
-
* @param {Object} options - The options for the pip install command.
|
|
61
|
-
* @param {string[]} options.findLinks - The find-links to use for the pip install command.
|
|
62
|
-
* @returns {Image} The Image instance.
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* const image = Image.debianSlim('3.12').pipInstall('numpy', { findLinks: ['https://pypi.org/simple'] })
|
|
66
|
-
*/
|
|
67
|
-
pipInstall(packages, options) {
|
|
68
|
-
const pkgs = this.flattenStringArgs('pipInstall', 'packages', packages);
|
|
69
|
-
if (!pkgs.length)
|
|
70
|
-
return this;
|
|
71
|
-
const extraArgs = this.formatPipInstallArgs(options);
|
|
72
|
-
this._dockerfile += `RUN python -m pip install ${quote(pkgs.sort())}${extraArgs}\n`;
|
|
73
|
-
return this;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Installs dependencies from a requirements.txt file.
|
|
77
|
-
*
|
|
78
|
-
* @param {string} requirementsTxt - The path to the requirements.txt file.
|
|
79
|
-
* @param {PipInstallOptions} options - The options for the pip install command.
|
|
80
|
-
* @returns {Image} The Image instance.
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* const image = Image.debianSlim('3.12')
|
|
84
|
-
* image.pipInstallFromRequirements('requirements.txt', { findLinks: ['https://pypi.org/simple'] })
|
|
85
|
-
*/
|
|
86
|
-
pipInstallFromRequirements(requirementsTxt, options) {
|
|
87
|
-
return this.queueAsyncOperation(async () => {
|
|
88
|
-
const importErrorPrefix = '"pipInstallFromRequirements" is not supported: ';
|
|
89
|
-
const expandTilde = await dynamicImport('expand-tilde', importErrorPrefix);
|
|
90
|
-
const fs = await dynamicImport('fs', importErrorPrefix);
|
|
91
|
-
const expandedPath = expandTilde(requirementsTxt);
|
|
92
|
-
if (!fs.existsSync(expandedPath)) {
|
|
93
|
-
throw new Error(`Requirements file ${requirementsTxt} does not exist`);
|
|
94
|
-
}
|
|
95
|
-
const extraArgs = this.formatPipInstallArgs(options);
|
|
96
|
-
this._contextList.push({ sourcePath: expandedPath, archivePath: expandedPath });
|
|
97
|
-
this._dockerfile += `COPY ${expandedPath} /.requirements.txt\n`;
|
|
98
|
-
this._dockerfile += `RUN python -m pip install -r /.requirements.txt${extraArgs}\n`;
|
|
99
|
-
});
|
|
100
|
-
}
|
|
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, options) {
|
|
113
|
-
return this.queueAsyncOperation(async () => {
|
|
114
|
-
const importErrorPrefix = '"pipInstallFromPyproject" is not supported: ';
|
|
115
|
-
const expandTilde = await dynamicImport('expand-tilde', importErrorPrefix);
|
|
116
|
-
const toml = await dynamicImport('@iarna/toml', importErrorPrefix);
|
|
117
|
-
const fs = await dynamicImport('fs', importErrorPrefix);
|
|
118
|
-
const tomlData = toml.parse(fs.readFileSync(expandTilde(pyprojectToml), 'utf-8'));
|
|
119
|
-
const dependencies = [];
|
|
120
|
-
if (!tomlData || !tomlData.project || !Array.isArray(tomlData.project.dependencies)) {
|
|
121
|
-
const msg = 'No [project.dependencies] section in pyproject.toml file. ' +
|
|
122
|
-
'See https://packaging.python.org/en/latest/guides/writing-pyproject-toml ' +
|
|
123
|
-
'for further file format guidelines.';
|
|
124
|
-
throw new DaytonaError(msg);
|
|
125
|
-
}
|
|
126
|
-
dependencies.push(...tomlData.project.dependencies);
|
|
127
|
-
if (options?.optionalDependencies && tomlData.project['optional-dependencies']) {
|
|
128
|
-
const optionalGroups = tomlData.project['optional-dependencies'];
|
|
129
|
-
for (const group of options.optionalDependencies) {
|
|
130
|
-
const deps = optionalGroups[group];
|
|
131
|
-
if (Array.isArray(deps)) {
|
|
132
|
-
dependencies.push(...deps);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
this.pipInstall(dependencies, options);
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Adds a local file to the image.
|
|
141
|
-
*
|
|
142
|
-
* @param {string} localPath - The path to the local file.
|
|
143
|
-
* @param {string} remotePath - The path of the file in the image.
|
|
144
|
-
* @returns {Image} The Image instance.
|
|
145
|
-
*
|
|
146
|
-
* @example
|
|
147
|
-
* const image = Image
|
|
148
|
-
* .debianSlim('3.12')
|
|
149
|
-
* .addLocalFile('requirements.txt', '/home/daytona/requirements.txt')
|
|
150
|
-
*/
|
|
151
|
-
addLocalFile(localPath, remotePath) {
|
|
152
|
-
return this.queueAsyncOperation(async () => {
|
|
153
|
-
const importErrorPrefix = '"addLocalFile" is not supported: ';
|
|
154
|
-
const expandTilde = await dynamicImport('expand-tilde', importErrorPrefix);
|
|
155
|
-
if (remotePath.endsWith('/')) {
|
|
156
|
-
remotePath = remotePath + pathe.basename(localPath);
|
|
157
|
-
}
|
|
158
|
-
const expandedPath = expandTilde(localPath);
|
|
159
|
-
this._contextList.push({ sourcePath: expandedPath, archivePath: expandedPath });
|
|
160
|
-
this._dockerfile += `COPY ${expandedPath} ${remotePath}\n`;
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Adds a local directory to the image.
|
|
165
|
-
*
|
|
166
|
-
* @param {string} localPath - The path to the local directory.
|
|
167
|
-
* @param {string} remotePath - The path of the directory in the image.
|
|
168
|
-
* @returns {Image} The Image instance.
|
|
169
|
-
*
|
|
170
|
-
* @example
|
|
171
|
-
* const image = Image
|
|
172
|
-
* .debianSlim('3.12')
|
|
173
|
-
* .addLocalDir('src', '/home/daytona/src')
|
|
174
|
-
*/
|
|
175
|
-
addLocalDir(localPath, remotePath) {
|
|
176
|
-
return this.queueAsyncOperation(async () => {
|
|
177
|
-
const importErrorPrefix = '"addLocalDir" is not supported: ';
|
|
178
|
-
const expandTilde = await dynamicImport('expand-tilde', importErrorPrefix);
|
|
179
|
-
const expandedPath = expandTilde(localPath);
|
|
180
|
-
this._contextList.push({ sourcePath: expandedPath, archivePath: expandedPath });
|
|
181
|
-
this._dockerfile += `COPY ${expandedPath} ${remotePath}\n`;
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Runs commands in the image.
|
|
186
|
-
*
|
|
187
|
-
* @param {string | string[]} commands - The commands to run.
|
|
188
|
-
* @returns {Image} The Image instance.
|
|
189
|
-
*
|
|
190
|
-
* @example
|
|
191
|
-
* const image = Image
|
|
192
|
-
* .debianSlim('3.12')
|
|
193
|
-
* .runCommands(
|
|
194
|
-
* 'echo "Hello, world!"',
|
|
195
|
-
* ['bash', '-c', 'echo Hello, world, again!']
|
|
196
|
-
* )
|
|
197
|
-
*/
|
|
198
|
-
runCommands(...commands) {
|
|
199
|
-
for (const command of commands) {
|
|
200
|
-
if (Array.isArray(command)) {
|
|
201
|
-
this._dockerfile += `RUN ${command.map((c) => `"${c.replace(/"/g, '\\\\\\"').replace(/'/g, "\\'")}"`).join(' ')}\n`;
|
|
202
|
-
}
|
|
203
|
-
else {
|
|
204
|
-
this._dockerfile += `RUN ${command}\n`;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
return this;
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Sets environment variables in the image.
|
|
211
|
-
*
|
|
212
|
-
* @param {Record<string, string>} envVars - The environment variables to set.
|
|
213
|
-
* @returns {Image} The Image instance.
|
|
214
|
-
*
|
|
215
|
-
* @example
|
|
216
|
-
* const image = Image
|
|
217
|
-
* .debianSlim('3.12')
|
|
218
|
-
* .env({ FOO: 'bar' })
|
|
219
|
-
*/
|
|
220
|
-
env(envVars) {
|
|
221
|
-
const nonStringKeys = Object.entries(envVars)
|
|
222
|
-
.filter(([, value]) => typeof value !== 'string')
|
|
223
|
-
.map(([key]) => key);
|
|
224
|
-
if (nonStringKeys.length) {
|
|
225
|
-
throw new Error(`Image ENV variables must be strings. Invalid keys: ${nonStringKeys}`);
|
|
226
|
-
}
|
|
227
|
-
for (const [key, val] of Object.entries(envVars)) {
|
|
228
|
-
this._dockerfile += `ENV ${key}=${quote([val])}\n`;
|
|
229
|
-
}
|
|
230
|
-
return this;
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Sets the working directory in the image.
|
|
234
|
-
*
|
|
235
|
-
* @param {string} dirPath - The path to the working directory.
|
|
236
|
-
* @returns {Image} The Image instance.
|
|
237
|
-
*
|
|
238
|
-
* @example
|
|
239
|
-
* const image = Image
|
|
240
|
-
* .debianSlim('3.12')
|
|
241
|
-
* .workdir('/home/daytona')
|
|
242
|
-
*/
|
|
243
|
-
workdir(dirPath) {
|
|
244
|
-
this._dockerfile += `WORKDIR ${quote([dirPath])}\n`;
|
|
245
|
-
return this;
|
|
246
|
-
}
|
|
247
|
-
/**
|
|
248
|
-
* Sets the entrypoint for the image.
|
|
249
|
-
*
|
|
250
|
-
* @param {string[]} entrypointCommands - The commands to set as the entrypoint.
|
|
251
|
-
* @returns {Image} The Image instance.
|
|
252
|
-
*
|
|
253
|
-
* @example
|
|
254
|
-
* const image = Image
|
|
255
|
-
* .debianSlim('3.12')
|
|
256
|
-
* .entrypoint(['/bin/bash'])
|
|
257
|
-
*/
|
|
258
|
-
entrypoint(entrypointCommands) {
|
|
259
|
-
if (!Array.isArray(entrypointCommands) || !entrypointCommands.every((x) => typeof x === 'string')) {
|
|
260
|
-
throw new Error('entrypoint_commands must be a list of strings');
|
|
261
|
-
}
|
|
262
|
-
const argsStr = entrypointCommands.map((arg) => `"${arg}"`).join(', ');
|
|
263
|
-
this._dockerfile += `ENTRYPOINT [${argsStr}]\n`;
|
|
264
|
-
return this;
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* Sets the default command for the image.
|
|
268
|
-
*
|
|
269
|
-
* @param {string[]} cmd - The command to set as the default command.
|
|
270
|
-
* @returns {Image} The Image instance.
|
|
271
|
-
*
|
|
272
|
-
* @example
|
|
273
|
-
* const image = Image
|
|
274
|
-
* .debianSlim('3.12')
|
|
275
|
-
* .cmd(['/bin/bash'])
|
|
276
|
-
*/
|
|
277
|
-
cmd(cmd) {
|
|
278
|
-
if (!Array.isArray(cmd) || !cmd.every((x) => typeof x === 'string')) {
|
|
279
|
-
throw new Error('Image CMD must be a list of strings');
|
|
280
|
-
}
|
|
281
|
-
const cmdStr = cmd.map((arg) => `"${arg}"`).join(', ');
|
|
282
|
-
this._dockerfile += `CMD [${cmdStr}]\n`;
|
|
283
|
-
return this;
|
|
284
|
-
}
|
|
285
|
-
/**
|
|
286
|
-
* Extends an image with arbitrary Dockerfile-like commands.
|
|
287
|
-
*
|
|
288
|
-
* @param {string | string[]} dockerfileCommands - The commands to add to the Dockerfile.
|
|
289
|
-
* @param {string} contextDir - The path to the context directory.
|
|
290
|
-
* @returns {Image} The Image instance.
|
|
291
|
-
*
|
|
292
|
-
* @example
|
|
293
|
-
* const image = Image
|
|
294
|
-
* .debianSlim('3.12')
|
|
295
|
-
* .dockerfileCommands(['RUN echo "Hello, world!"'])
|
|
296
|
-
*/
|
|
297
|
-
dockerfileCommands(dockerfileCommands, contextDir) {
|
|
298
|
-
return this.queueAsyncOperation(async () => {
|
|
299
|
-
if (contextDir) {
|
|
300
|
-
const importErrorPrefix = '"dockerfileCommands" is not supported: ';
|
|
301
|
-
const expandTilde = await dynamicImport('expand-tilde', importErrorPrefix);
|
|
302
|
-
const fs = await dynamicImport('fs', importErrorPrefix);
|
|
303
|
-
const expandedPath = expandTilde(contextDir);
|
|
304
|
-
if (!fs.existsSync(expandedPath) || !fs.statSync(expandedPath).isDirectory()) {
|
|
305
|
-
throw new Error(`Context directory ${contextDir} does not exist`);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
for (const [contextPath, originalPath] of await Image.extractCopySources(dockerfileCommands.join('\n'), contextDir || '')) {
|
|
309
|
-
let archiveBasePath = contextPath;
|
|
310
|
-
if (contextDir && !originalPath.startsWith(contextDir)) {
|
|
311
|
-
archiveBasePath = contextPath.substring(contextDir.length);
|
|
312
|
-
// Remove leading separators
|
|
313
|
-
// eslint-disable-next-line no-useless-escape
|
|
314
|
-
archiveBasePath = archiveBasePath.replace(/^[\/\\]+/, '');
|
|
315
|
-
}
|
|
316
|
-
this._contextList.push({ sourcePath: contextPath, archivePath: archiveBasePath });
|
|
317
|
-
}
|
|
318
|
-
this._dockerfile += dockerfileCommands.join('\n') + '\n';
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
/**
|
|
322
|
-
* Creates an Image from an existing Dockerfile.
|
|
323
|
-
*
|
|
324
|
-
* @param {string} path - The path to the Dockerfile.
|
|
325
|
-
* @returns {Image} The Image instance.
|
|
326
|
-
*
|
|
327
|
-
* @example
|
|
328
|
-
* const image = Image.fromDockerfile('Dockerfile')
|
|
329
|
-
*/
|
|
330
|
-
static fromDockerfile(path) {
|
|
331
|
-
const img = new Image();
|
|
332
|
-
return img.queueAsyncOperation(async () => {
|
|
333
|
-
const importErrorPrefix = '"fromDockerfile" is not supported: ';
|
|
334
|
-
const expandTilde = await dynamicImport('expand-tilde', importErrorPrefix);
|
|
335
|
-
const fs = await dynamicImport('fs', importErrorPrefix);
|
|
336
|
-
const expandedPath = pathe.resolve(expandTilde(path));
|
|
337
|
-
if (!fs.existsSync(expandedPath)) {
|
|
338
|
-
throw new Error(`Dockerfile ${path} does not exist`);
|
|
339
|
-
}
|
|
340
|
-
const dockerfileContent = fs.readFileSync(expandedPath, 'utf-8');
|
|
341
|
-
img._dockerfile = dockerfileContent;
|
|
342
|
-
// Remove dockerfile filename from path to get the path prefix
|
|
343
|
-
const pathPrefix = pathe.dirname(expandedPath) + pathe.sep;
|
|
344
|
-
for (const [contextPath, originalPath] of await Image.extractCopySources(dockerfileContent, pathPrefix)) {
|
|
345
|
-
let archiveBasePath = contextPath;
|
|
346
|
-
if (!originalPath.startsWith(pathPrefix)) {
|
|
347
|
-
// Remove the path prefix from the context path to get the archive path
|
|
348
|
-
archiveBasePath = contextPath.substring(pathPrefix.length);
|
|
349
|
-
// Remove leading separators
|
|
350
|
-
// eslint-disable-next-line no-useless-escape
|
|
351
|
-
archiveBasePath = archiveBasePath.replace(/^[\/\\]+/, '');
|
|
352
|
-
}
|
|
353
|
-
img._contextList.push({ sourcePath: contextPath, archivePath: archiveBasePath });
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
/**
|
|
358
|
-
* Creates an Image from an existing base image.
|
|
359
|
-
*
|
|
360
|
-
* @param {string} image - The base image to use.
|
|
361
|
-
* @returns {Image} The Image instance.
|
|
362
|
-
*
|
|
363
|
-
* @example
|
|
364
|
-
* const image = Image.base('python:3.12-slim-bookworm')
|
|
365
|
-
*/
|
|
366
|
-
static base(image) {
|
|
367
|
-
const img = new Image();
|
|
368
|
-
img._dockerfile = `FROM ${image}\n`;
|
|
369
|
-
return img;
|
|
370
|
-
}
|
|
371
|
-
/**
|
|
372
|
-
* Creates a Debian slim image based on the official Python Docker image.
|
|
373
|
-
*
|
|
374
|
-
* @param {string} pythonVersion - The Python version to use.
|
|
375
|
-
* @returns {Image} The Image instance.
|
|
376
|
-
*
|
|
377
|
-
* @example
|
|
378
|
-
* const image = Image.debianSlim('3.12')
|
|
379
|
-
*/
|
|
380
|
-
static debianSlim(pythonVersion) {
|
|
381
|
-
const version = Image.processPythonVersion(pythonVersion);
|
|
382
|
-
const img = new Image();
|
|
383
|
-
const commands = [
|
|
384
|
-
`FROM python:${version}-slim-bookworm`,
|
|
385
|
-
'RUN apt-get update',
|
|
386
|
-
'RUN apt-get install -y gcc gfortran build-essential',
|
|
387
|
-
'RUN pip install --upgrade pip',
|
|
388
|
-
// Set debian front-end to non-interactive to avoid users getting stuck with input prompts.
|
|
389
|
-
"RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections",
|
|
390
|
-
];
|
|
391
|
-
img._dockerfile = commands.join('\n') + '\n';
|
|
392
|
-
return img;
|
|
393
|
-
}
|
|
394
|
-
/**
|
|
395
|
-
* Formats pip install arguments in a single string.
|
|
396
|
-
*
|
|
397
|
-
* @param {PipInstallOptions} options - The options for the pip install command.
|
|
398
|
-
* @returns {string} The formatted pip install arguments.
|
|
399
|
-
*/
|
|
400
|
-
formatPipInstallArgs(options) {
|
|
401
|
-
if (!options)
|
|
402
|
-
return '';
|
|
403
|
-
let extraArgs = '';
|
|
404
|
-
if (options.findLinks) {
|
|
405
|
-
for (const findLink of options.findLinks) {
|
|
406
|
-
extraArgs += ` --find-links ${quote([findLink])}`;
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
if (options.indexUrl) {
|
|
410
|
-
extraArgs += ` --index-url ${quote([options.indexUrl])}`;
|
|
411
|
-
}
|
|
412
|
-
if (options.extraIndexUrls) {
|
|
413
|
-
for (const extraIndexUrl of options.extraIndexUrls) {
|
|
414
|
-
extraArgs += ` --extra-index-url ${quote([extraIndexUrl])}`;
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
if (options.pre) {
|
|
418
|
-
extraArgs += ' --pre';
|
|
419
|
-
}
|
|
420
|
-
if (options.extraOptions) {
|
|
421
|
-
extraArgs += ` ${options.extraOptions.trim()}`;
|
|
422
|
-
}
|
|
423
|
-
return extraArgs;
|
|
424
|
-
}
|
|
425
|
-
/**
|
|
426
|
-
* Flattens a string argument.
|
|
427
|
-
*
|
|
428
|
-
* @param {string} functionName - The name of the function.
|
|
429
|
-
* @param {string} argName - The name of the argument.
|
|
430
|
-
* @param {any} args - The argument to flatten.
|
|
431
|
-
* @returns {string[]} The flattened argument.
|
|
432
|
-
*/
|
|
433
|
-
flattenStringArgs(functionName, argName, args) {
|
|
434
|
-
const result = [];
|
|
435
|
-
const flatten = (arg) => {
|
|
436
|
-
if (typeof arg === 'string') {
|
|
437
|
-
result.push(arg);
|
|
438
|
-
}
|
|
439
|
-
else if (Array.isArray(arg)) {
|
|
440
|
-
for (const item of arg) {
|
|
441
|
-
flatten(item);
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
else {
|
|
445
|
-
throw new Error(`${functionName}: ${argName} must only contain strings`);
|
|
446
|
-
}
|
|
447
|
-
};
|
|
448
|
-
flatten(args);
|
|
449
|
-
return result;
|
|
450
|
-
}
|
|
451
|
-
/**
|
|
452
|
-
* Processes the Python version.
|
|
453
|
-
*
|
|
454
|
-
* @param {string} pythonVersion - The Python version to use.
|
|
455
|
-
* @returns {string} The processed Python version.
|
|
456
|
-
*/
|
|
457
|
-
static processPythonVersion(pythonVersion) {
|
|
458
|
-
if (!pythonVersion) {
|
|
459
|
-
// Default to latest
|
|
460
|
-
pythonVersion = SUPPORTED_PYTHON_SERIES[SUPPORTED_PYTHON_SERIES.length - 1];
|
|
461
|
-
}
|
|
462
|
-
if (!SUPPORTED_PYTHON_SERIES.includes(pythonVersion)) {
|
|
463
|
-
throw new Error(`Unsupported Python version: ${pythonVersion}. ` +
|
|
464
|
-
`Daytona supports the following series: ${SUPPORTED_PYTHON_SERIES.join(', ')}`);
|
|
465
|
-
}
|
|
466
|
-
// Map series to latest micro version
|
|
467
|
-
const seriesMap = Object.fromEntries(LATEST_PYTHON_MICRO_VERSIONS.map((v) => {
|
|
468
|
-
const [major, minor, micro] = v.split('.');
|
|
469
|
-
return [`${major}.${minor}`, micro];
|
|
470
|
-
}));
|
|
471
|
-
const micro = seriesMap[pythonVersion];
|
|
472
|
-
return `${pythonVersion}.${micro}`;
|
|
473
|
-
}
|
|
474
|
-
/**
|
|
475
|
-
* Extracts source files from COPY commands in a Dockerfile.
|
|
476
|
-
*
|
|
477
|
-
* @param {string} dockerfileContent - The content of the Dockerfile.
|
|
478
|
-
* @param {string} pathPrefix - The path prefix to use for the sources.
|
|
479
|
-
* @returns {Array<[string, string]>} The list of the actual file path and its corresponding COPY-command source path.
|
|
480
|
-
*/
|
|
481
|
-
static async extractCopySources(dockerfileContent, pathPrefix = '') {
|
|
482
|
-
const sources = [];
|
|
483
|
-
const lines = dockerfileContent.split('\n');
|
|
484
|
-
for (const line of lines) {
|
|
485
|
-
// Skip empty lines and comments
|
|
486
|
-
if (!line.trim() || line.trim().startsWith('#')) {
|
|
487
|
-
continue;
|
|
488
|
-
}
|
|
489
|
-
// Check if the line contains a COPY command
|
|
490
|
-
if (/^\s*COPY\s+(?!.*--from=)/i.test(line)) {
|
|
491
|
-
const importErrorPrefix = '"extractCopySources" is not supported: ';
|
|
492
|
-
const fg = await dynamicImport('fast-glob', importErrorPrefix);
|
|
493
|
-
const commandParts = this.parseCopyCommand(line);
|
|
494
|
-
if (commandParts) {
|
|
495
|
-
// Get source paths from the parsed command parts
|
|
496
|
-
for (const source of commandParts.sources) {
|
|
497
|
-
// Handle absolute and relative paths differently
|
|
498
|
-
const fullPathPattern = pathe.isAbsolute(source) ? source : pathe.join(pathPrefix, source);
|
|
499
|
-
const matchingFiles = fg.sync([fullPathPattern], { dot: true });
|
|
500
|
-
if (matchingFiles.length > 0) {
|
|
501
|
-
for (const matchingFile of matchingFiles) {
|
|
502
|
-
sources.push([matchingFile, source]);
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
else {
|
|
506
|
-
sources.push([fullPathPattern, source]);
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
return sources;
|
|
513
|
-
}
|
|
514
|
-
/**
|
|
515
|
-
* Parses a COPY command to extract sources and destination.
|
|
516
|
-
*
|
|
517
|
-
* @param {string} line - The line to parse.
|
|
518
|
-
* @returns {Object} The parsed sources and destination.
|
|
519
|
-
*/
|
|
520
|
-
static parseCopyCommand(line) {
|
|
521
|
-
// Remove initial "COPY" and strip whitespace
|
|
522
|
-
const parts = line.trim().substring(4).trim();
|
|
523
|
-
// Handle JSON array format: COPY ["src1", "src2", "dest"]
|
|
524
|
-
if (parts.startsWith('[')) {
|
|
525
|
-
try {
|
|
526
|
-
// Parse the JSON-like array format
|
|
527
|
-
const elements = parseShellQuote(parts.replace('[', '').replace(']', '')).filter((x) => typeof x === 'string');
|
|
528
|
-
if (elements.length < 2) {
|
|
529
|
-
return null;
|
|
530
|
-
}
|
|
531
|
-
return {
|
|
532
|
-
sources: elements.slice(0, -1),
|
|
533
|
-
dest: elements[elements.length - 1],
|
|
534
|
-
};
|
|
535
|
-
}
|
|
536
|
-
catch {
|
|
537
|
-
return null;
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
// Handle regular format with possible flags
|
|
541
|
-
const splitParts = parseShellQuote(parts).filter((x) => typeof x === 'string');
|
|
542
|
-
// Extract flags like --chown, --chmod, --from
|
|
543
|
-
let sourcesStartIdx = 0;
|
|
544
|
-
for (let i = 0; i < splitParts.length; i++) {
|
|
545
|
-
const part = splitParts[i];
|
|
546
|
-
if (part.startsWith('--')) {
|
|
547
|
-
// Skip the flag and its value if it has one
|
|
548
|
-
if (!part.includes('=') && i + 1 < splitParts.length && !splitParts[i + 1].startsWith('--')) {
|
|
549
|
-
sourcesStartIdx = i + 2;
|
|
550
|
-
}
|
|
551
|
-
else {
|
|
552
|
-
sourcesStartIdx = i + 1;
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
else {
|
|
556
|
-
break;
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
// After skipping flags, we need at least one source and one destination
|
|
560
|
-
if (splitParts.length - sourcesStartIdx < 2) {
|
|
561
|
-
return null;
|
|
562
|
-
}
|
|
563
|
-
return {
|
|
564
|
-
sources: splitParts.slice(sourcesStartIdx, -1),
|
|
565
|
-
dest: splitParts[splitParts.length - 1],
|
|
566
|
-
};
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
//# sourceMappingURL=Image.js.map
|
package/esm/Image.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Image.js","sourceRoot":"","sources":["../../../../../libs/sdk-typescript/src/Image.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE9C,MAAM,uBAAuB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAU,CAAA;AAEhF,MAAM,4BAA4B,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAA;AA4C1F;;;;;;;;GAQG;AACH,MAAM,OAAO,KAAK;IACR,WAAW,GAAG,EAAE,CAAA;IAChB,YAAY,GAAc,EAAE,CAAA;IAC5B,aAAa,GAAkB,OAAO,CAAC,OAAO,EAAE,CAAA;IAExD,gEAAgE;IAChE,gBAAuB,CAAC;IAExB,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,WAAW,CAAA;IACzB,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAA;IAC1B,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,WAAyE,EACzE,UAAuE;QAEvE,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI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