@daytonaio/sdk 0.128.0-alpha.1 → 0.128.1

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.
Files changed (276) hide show
  1. package/package.json +8 -20
  2. package/{cjs → src}/CodeInterpreter.d.ts +0 -1
  3. package/src/CodeInterpreter.js.map +1 -0
  4. package/{esm → src}/ComputerUse.d.ts +0 -1
  5. package/src/ComputerUse.js.map +1 -0
  6. package/{cjs → src}/Daytona.d.ts +1 -2
  7. package/{cjs → src}/Daytona.js +8 -6
  8. package/{cjs → src}/Daytona.js.map +1 -1
  9. package/{esm → src}/FileSystem.d.ts +0 -1
  10. package/src/FileSystem.js.map +1 -0
  11. package/{esm → src}/Git.d.ts +0 -1
  12. package/src/Git.js.map +1 -0
  13. package/{cjs → src}/Image.d.ts +0 -21
  14. package/{cjs → src}/Image.js +91 -123
  15. package/src/Image.js.map +1 -0
  16. package/{cjs → src}/LspServer.d.ts +0 -1
  17. package/src/LspServer.js.map +1 -0
  18. package/{esm → src}/ObjectStorage.d.ts +0 -1
  19. package/src/ObjectStorage.js.map +1 -0
  20. package/{cjs → src}/Process.d.ts +0 -1
  21. package/src/Process.js.map +1 -0
  22. package/{cjs → src}/PtyHandle.d.ts +0 -1
  23. package/src/PtyHandle.js.map +1 -0
  24. package/{cjs → src}/Sandbox.d.ts +17 -2
  25. package/{cjs → src}/Sandbox.js +27 -1
  26. package/src/Sandbox.js.map +1 -0
  27. package/{cjs → src}/Snapshot.d.ts +0 -2
  28. package/{cjs → src}/Snapshot.js +1 -9
  29. package/src/Snapshot.js.map +1 -0
  30. package/{esm → src}/Volume.d.ts +0 -1
  31. package/src/Volume.js.map +1 -0
  32. package/{cjs → src}/code-toolbox/SandboxJsCodeToolbox.d.ts +0 -1
  33. package/src/code-toolbox/SandboxJsCodeToolbox.js.map +1 -0
  34. package/{cjs → src}/code-toolbox/SandboxPythonCodeToolbox.d.ts +0 -1
  35. package/src/code-toolbox/SandboxPythonCodeToolbox.js.map +1 -0
  36. package/{cjs → src}/code-toolbox/SandboxTsCodeToolbox.d.ts +0 -1
  37. package/src/code-toolbox/SandboxTsCodeToolbox.js.map +1 -0
  38. package/{esm → src}/errors/DaytonaError.d.ts +0 -1
  39. package/src/errors/DaytonaError.js.map +1 -0
  40. package/{cjs → src}/index.d.ts +0 -1
  41. package/src/index.js.map +1 -0
  42. package/{esm → src}/types/Charts.d.ts +0 -1
  43. package/src/types/Charts.js.map +1 -0
  44. package/{esm → src}/types/CodeInterpreter.d.ts +0 -1
  45. package/src/types/CodeInterpreter.js.map +1 -0
  46. package/{cjs → src}/types/ExecuteResponse.d.ts +0 -1
  47. package/src/types/ExecuteResponse.js.map +1 -0
  48. package/{cjs → src}/types/Pty.d.ts +0 -1
  49. package/src/types/Pty.js.map +1 -0
  50. package/{cjs → src}/utils/ArtifactParser.d.ts +0 -1
  51. package/src/utils/ArtifactParser.js.map +1 -0
  52. package/{esm → src}/utils/Binary.d.ts +0 -1
  53. package/src/utils/Binary.js.map +1 -0
  54. package/{cjs → src}/utils/FileTransfer.d.ts +0 -1
  55. package/src/utils/FileTransfer.js.map +1 -0
  56. package/{cjs → src}/utils/Import.d.ts +15 -2
  57. package/src/utils/Import.js +77 -0
  58. package/src/utils/Import.js.map +1 -0
  59. package/{esm → src}/utils/Multipart.d.ts +0 -1
  60. package/src/utils/Multipart.js.map +1 -0
  61. package/{cjs → src}/utils/Runtime.d.ts +0 -1
  62. package/src/utils/Runtime.js.map +1 -0
  63. package/{cjs → src}/utils/Stream.d.ts +0 -1
  64. package/src/utils/Stream.js.map +1 -0
  65. package/{esm → src}/utils/WebSocket.d.ts +0 -1
  66. package/src/utils/WebSocket.js.map +1 -0
  67. package/LICENSE +0 -190
  68. package/cjs/CodeInterpreter.d.ts.map +0 -1
  69. package/cjs/CodeInterpreter.js.map +0 -1
  70. package/cjs/ComputerUse.d.ts +0 -443
  71. package/cjs/ComputerUse.d.ts.map +0 -1
  72. package/cjs/ComputerUse.js.map +0 -1
  73. package/cjs/Daytona.d.ts.map +0 -1
  74. package/cjs/FileSystem.d.ts +0 -328
  75. package/cjs/FileSystem.d.ts.map +0 -1
  76. package/cjs/FileSystem.js.map +0 -1
  77. package/cjs/Git.d.ts +0 -203
  78. package/cjs/Git.d.ts.map +0 -1
  79. package/cjs/Git.js.map +0 -1
  80. package/cjs/Image.d.ts.map +0 -1
  81. package/cjs/Image.js.map +0 -1
  82. package/cjs/LspServer.d.ts.map +0 -1
  83. package/cjs/LspServer.js.map +0 -1
  84. package/cjs/ObjectStorage.d.ts +0 -79
  85. package/cjs/ObjectStorage.d.ts.map +0 -1
  86. package/cjs/ObjectStorage.js.map +0 -1
  87. package/cjs/Process.d.ts.map +0 -1
  88. package/cjs/Process.js.map +0 -1
  89. package/cjs/PtyHandle.d.ts.map +0 -1
  90. package/cjs/PtyHandle.js.map +0 -1
  91. package/cjs/README.md +0 -147
  92. package/cjs/Sandbox.d.ts.map +0 -1
  93. package/cjs/Sandbox.js.map +0 -1
  94. package/cjs/Snapshot.d.ts.map +0 -1
  95. package/cjs/Snapshot.js.map +0 -1
  96. package/cjs/Volume.d.ts +0 -84
  97. package/cjs/Volume.d.ts.map +0 -1
  98. package/cjs/Volume.js.map +0 -1
  99. package/cjs/code-toolbox/SandboxJsCodeToolbox.d.ts.map +0 -1
  100. package/cjs/code-toolbox/SandboxJsCodeToolbox.js.map +0 -1
  101. package/cjs/code-toolbox/SandboxPythonCodeToolbox.d.ts.map +0 -1
  102. package/cjs/code-toolbox/SandboxPythonCodeToolbox.js.map +0 -1
  103. package/cjs/code-toolbox/SandboxTsCodeToolbox.d.ts.map +0 -1
  104. package/cjs/code-toolbox/SandboxTsCodeToolbox.js.map +0 -1
  105. package/cjs/errors/DaytonaError.d.ts +0 -32
  106. package/cjs/errors/DaytonaError.d.ts.map +0 -1
  107. package/cjs/errors/DaytonaError.js.map +0 -1
  108. package/cjs/index.d.ts.map +0 -1
  109. package/cjs/index.js.map +0 -1
  110. package/cjs/package.json +0 -3
  111. package/cjs/types/Charts.d.ts +0 -152
  112. package/cjs/types/Charts.d.ts.map +0 -1
  113. package/cjs/types/Charts.js.map +0 -1
  114. package/cjs/types/CodeInterpreter.d.ts +0 -77
  115. package/cjs/types/CodeInterpreter.d.ts.map +0 -1
  116. package/cjs/types/CodeInterpreter.js.map +0 -1
  117. package/cjs/types/ExecuteResponse.d.ts.map +0 -1
  118. package/cjs/types/ExecuteResponse.js.map +0 -1
  119. package/cjs/types/Pty.d.ts.map +0 -1
  120. package/cjs/types/Pty.js.map +0 -1
  121. package/cjs/utils/ArtifactParser.d.ts.map +0 -1
  122. package/cjs/utils/ArtifactParser.js.map +0 -1
  123. package/cjs/utils/Binary.d.ts +0 -39
  124. package/cjs/utils/Binary.d.ts.map +0 -1
  125. package/cjs/utils/Binary.js.map +0 -1
  126. package/cjs/utils/FileTransfer.d.ts.map +0 -1
  127. package/cjs/utils/FileTransfer.js.map +0 -1
  128. package/cjs/utils/Import.d.ts.map +0 -1
  129. package/cjs/utils/Import.js +0 -81
  130. package/cjs/utils/Import.js.map +0 -1
  131. package/cjs/utils/Multipart.d.ts +0 -27
  132. package/cjs/utils/Multipart.d.ts.map +0 -1
  133. package/cjs/utils/Multipart.js.map +0 -1
  134. package/cjs/utils/Runtime.d.ts.map +0 -1
  135. package/cjs/utils/Runtime.js.map +0 -1
  136. package/cjs/utils/Stream.d.ts.map +0 -1
  137. package/cjs/utils/Stream.js.map +0 -1
  138. package/cjs/utils/WebSocket.d.ts +0 -10
  139. package/cjs/utils/WebSocket.d.ts.map +0 -1
  140. package/cjs/utils/WebSocket.js.map +0 -1
  141. package/esm/CodeInterpreter.d.ts +0 -96
  142. package/esm/CodeInterpreter.d.ts.map +0 -1
  143. package/esm/CodeInterpreter.js +0 -295
  144. package/esm/CodeInterpreter.js.map +0 -1
  145. package/esm/ComputerUse.d.ts.map +0 -1
  146. package/esm/ComputerUse.js +0 -509
  147. package/esm/ComputerUse.js.map +0 -1
  148. package/esm/Daytona.d.ts +0 -354
  149. package/esm/Daytona.d.ts.map +0 -1
  150. package/esm/Daytona.js +0 -410
  151. package/esm/Daytona.js.map +0 -1
  152. package/esm/FileSystem.d.ts.map +0 -1
  153. package/esm/FileSystem.js +0 -331
  154. package/esm/FileSystem.js.map +0 -1
  155. package/esm/Git.d.ts.map +0 -1
  156. package/esm/Git.js +0 -260
  157. package/esm/Git.js.map +0 -1
  158. package/esm/Image.d.ts +0 -285
  159. package/esm/Image.d.ts.map +0 -1
  160. package/esm/Image.js +0 -569
  161. package/esm/Image.js.map +0 -1
  162. package/esm/LspServer.d.ts +0 -172
  163. package/esm/LspServer.d.ts.map +0 -1
  164. package/esm/LspServer.js +0 -204
  165. package/esm/LspServer.js.map +0 -1
  166. package/esm/ObjectStorage.d.ts.map +0 -1
  167. package/esm/ObjectStorage.js +0 -187
  168. package/esm/ObjectStorage.js.map +0 -1
  169. package/esm/Process.d.ts +0 -442
  170. package/esm/Process.d.ts.map +0 -1
  171. package/esm/Process.js +0 -644
  172. package/esm/Process.js.map +0 -1
  173. package/esm/PtyHandle.d.ts +0 -155
  174. package/esm/PtyHandle.d.ts.map +0 -1
  175. package/esm/PtyHandle.js +0 -374
  176. package/esm/PtyHandle.js.map +0 -1
  177. package/esm/README.md +0 -147
  178. package/esm/Sandbox.d.ts +0 -359
  179. package/esm/Sandbox.d.ts.map +0 -1
  180. package/esm/Sandbox.js +0 -532
  181. package/esm/Sandbox.js.map +0 -1
  182. package/esm/Snapshot.d.ts +0 -138
  183. package/esm/Snapshot.d.ts.map +0 -1
  184. package/esm/Snapshot.js +0 -207
  185. package/esm/Snapshot.js.map +0 -1
  186. package/esm/Volume.d.ts.map +0 -1
  187. package/esm/Volume.js +0 -95
  188. package/esm/Volume.js.map +0 -1
  189. package/esm/code-toolbox/SandboxJsCodeToolbox.d.ts +0 -6
  190. package/esm/code-toolbox/SandboxJsCodeToolbox.d.ts.map +0 -1
  191. package/esm/code-toolbox/SandboxJsCodeToolbox.js +0 -13
  192. package/esm/code-toolbox/SandboxJsCodeToolbox.js.map +0 -1
  193. package/esm/code-toolbox/SandboxPythonCodeToolbox.d.ts +0 -12
  194. package/esm/code-toolbox/SandboxPythonCodeToolbox.d.ts.map +0 -1
  195. package/esm/code-toolbox/SandboxPythonCodeToolbox.js +0 -355
  196. package/esm/code-toolbox/SandboxPythonCodeToolbox.js.map +0 -1
  197. package/esm/code-toolbox/SandboxTsCodeToolbox.d.ts +0 -6
  198. package/esm/code-toolbox/SandboxTsCodeToolbox.d.ts.map +0 -1
  199. package/esm/code-toolbox/SandboxTsCodeToolbox.js +0 -14
  200. package/esm/code-toolbox/SandboxTsCodeToolbox.js.map +0 -1
  201. package/esm/errors/DaytonaError.d.ts.map +0 -1
  202. package/esm/errors/DaytonaError.js +0 -44
  203. package/esm/errors/DaytonaError.js.map +0 -1
  204. package/esm/index.d.ts +0 -22
  205. package/esm/index.d.ts.map +0 -1
  206. package/esm/index.js +0 -22
  207. package/esm/index.js.map +0 -1
  208. package/esm/package.json +0 -3
  209. package/esm/types/Charts.d.ts.map +0 -1
  210. package/esm/types/Charts.js +0 -42
  211. package/esm/types/Charts.js.map +0 -1
  212. package/esm/types/CodeInterpreter.d.ts.map +0 -1
  213. package/esm/types/CodeInterpreter.js +0 -6
  214. package/esm/types/CodeInterpreter.js.map +0 -1
  215. package/esm/types/ExecuteResponse.d.ts +0 -26
  216. package/esm/types/ExecuteResponse.d.ts.map +0 -1
  217. package/esm/types/ExecuteResponse.js +0 -6
  218. package/esm/types/ExecuteResponse.js.map +0 -1
  219. package/esm/types/Pty.d.ts +0 -48
  220. package/esm/types/Pty.d.ts.map +0 -1
  221. package/esm/types/Pty.js +0 -6
  222. package/esm/types/Pty.js.map +0 -1
  223. package/esm/utils/ArtifactParser.d.ts +0 -14
  224. package/esm/utils/ArtifactParser.d.ts.map +0 -1
  225. package/esm/utils/ArtifactParser.js +0 -51
  226. package/esm/utils/ArtifactParser.js.map +0 -1
  227. package/esm/utils/Binary.d.ts.map +0 -1
  228. package/esm/utils/Binary.js +0 -157
  229. package/esm/utils/Binary.js.map +0 -1
  230. package/esm/utils/FileTransfer.d.ts +0 -15
  231. package/esm/utils/FileTransfer.d.ts.map +0 -1
  232. package/esm/utils/FileTransfer.js +0 -209
  233. package/esm/utils/FileTransfer.js.map +0 -1
  234. package/esm/utils/Import.d.ts +0 -211
  235. package/esm/utils/Import.d.ts.map +0 -1
  236. package/esm/utils/Import.js +0 -45
  237. package/esm/utils/Import.js.map +0 -1
  238. package/esm/utils/Multipart.d.ts.map +0 -1
  239. package/esm/utils/Multipart.js +0 -107
  240. package/esm/utils/Multipart.js.map +0 -1
  241. package/esm/utils/Runtime.d.ts +0 -37
  242. package/esm/utils/Runtime.d.ts.map +0 -1
  243. package/esm/utils/Runtime.js +0 -57
  244. package/esm/utils/Runtime.js.map +0 -1
  245. package/esm/utils/Stream.d.ts +0 -20
  246. package/esm/utils/Stream.d.ts.map +0 -1
  247. package/esm/utils/Stream.js +0 -360
  248. package/esm/utils/Stream.js.map +0 -1
  249. package/esm/utils/WebSocket.d.ts.map +0 -1
  250. package/esm/utils/WebSocket.js +0 -22
  251. package/esm/utils/WebSocket.js.map +0 -1
  252. /package/{cjs → src}/CodeInterpreter.js +0 -0
  253. /package/{cjs → src}/ComputerUse.js +0 -0
  254. /package/{cjs → src}/FileSystem.js +0 -0
  255. /package/{cjs → src}/Git.js +0 -0
  256. /package/{cjs → src}/LspServer.js +0 -0
  257. /package/{cjs → src}/ObjectStorage.js +0 -0
  258. /package/{cjs → src}/Process.js +0 -0
  259. /package/{cjs → src}/PtyHandle.js +0 -0
  260. /package/{cjs → src}/Volume.js +0 -0
  261. /package/{cjs → src}/code-toolbox/SandboxJsCodeToolbox.js +0 -0
  262. /package/{cjs → src}/code-toolbox/SandboxPythonCodeToolbox.js +0 -0
  263. /package/{cjs → src}/code-toolbox/SandboxTsCodeToolbox.js +0 -0
  264. /package/{cjs → src}/errors/DaytonaError.js +0 -0
  265. /package/{cjs → src}/index.js +0 -0
  266. /package/{cjs → src}/types/Charts.js +0 -0
  267. /package/{cjs → src}/types/CodeInterpreter.js +0 -0
  268. /package/{cjs → src}/types/ExecuteResponse.js +0 -0
  269. /package/{cjs → src}/types/Pty.js +0 -0
  270. /package/{cjs → src}/utils/ArtifactParser.js +0 -0
  271. /package/{cjs → src}/utils/Binary.js +0 -0
  272. /package/{cjs → src}/utils/FileTransfer.js +0 -0
  273. /package/{cjs → src}/utils/Multipart.js +0 -0
  274. /package/{cjs → src}/utils/Runtime.js +0 -0
  275. /package/{cjs → src}/utils/Stream.js +0 -0
  276. /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
@@ -1 +0,0 @@
1
- {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../../libs/sdk-typescript/src/Image.ts"],"names":[],"mappings":"AAUA,QAAA,MAAM,uBAAuB,kDAAmD,CAAA;AAChF,KAAK,qBAAqB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAA;AAGrE;;;;;;GAMG;AACH,MAAM,WAAW,OAAO;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;;;;GASG;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