modal 0.3.23 → 0.3.25

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/dist/index.d.cts CHANGED
@@ -111,7 +111,9 @@ declare class Secret {
111
111
  type ImageDeleteOptions = Record<never, never>;
112
112
  /** Options for Image.dockerfileCommands(). */
113
113
  type ImageDockerfileCommandsOptions = {
114
- /** Secrets that will be made available to this layer's build environment. */
114
+ /** Environment variables to set in the build environment. */
115
+ env?: Record<string, string>;
116
+ /** Secrets that will be made available as environment variables to this layer's build environment. */
115
117
  secrets?: Secret[];
116
118
  /** GPU reservation for this layer's build environment (e.g. "A100", "T4:2", "A100-80GB:4"). */
117
119
  gpu?: string;
@@ -121,6 +123,7 @@ type ImageDockerfileCommandsOptions = {
121
123
  /** Represents a single image layer with its build configuration. */
122
124
  type Layer = {
123
125
  commands: string[];
126
+ env?: Record<string, string>;
124
127
  secrets?: Secret[];
125
128
  gpuConfig?: GPUConfig;
126
129
  forceBuild?: boolean;
@@ -281,7 +284,9 @@ type ExecOptions = {
281
284
  workdir?: string;
282
285
  /** Timeout for the process in milliseconds. Defaults to 0 (no timeout). */
283
286
  timeout?: number;
284
- /** Secrets with environment variables for the command. */
287
+ /** Environment variables to set for the command. */
288
+ env?: Record<string, string>;
289
+ /** Secrets to inject as environment variables for the commmand.*/
285
290
  secrets?: Secret[];
286
291
  /** Enable a PTY for the command. */
287
292
  pty?: boolean;
@@ -312,6 +317,8 @@ declare class Sandbox {
312
317
  constructor(sandboxId: string);
313
318
  /** Set tags (key-value pairs) on the Sandbox. Tags can be used to filter results in `Sandbox.list`. */
314
319
  setTags(tags: Record<string, string>): Promise<void>;
320
+ /** Get tags (key-value pairs) currently attached to this Sandbox from the server. */
321
+ getTags(): Promise<Record<string, string>>;
315
322
  /** Returns a running Sandbox object from an ID.
316
323
  *
317
324
  * @returns Sandbox with ID
@@ -481,7 +488,9 @@ type SandboxCreateOptions = {
481
488
  * Default behavior is to sleep indefinitely until timeout or termination.
482
489
  */
483
490
  command?: string[];
484
- /** Secrets to inject into the Sandbox. */
491
+ /** Environment variables to set in the Sandbox. */
492
+ env?: Record<string, string>;
493
+ /** Secrets to inject into the Sandbox as environment variables. */
485
494
  secrets?: Secret[];
486
495
  /** Mount points for Modal Volumes. */
487
496
  volumes?: Record<string, Volume>;
@@ -621,6 +630,7 @@ type ClsOptions = {
621
630
  cpu?: number;
622
631
  memory?: number;
623
632
  gpu?: string;
633
+ env?: Record<string, string>;
624
634
  secrets?: Secret[];
625
635
  volumes?: Record<string, Volume>;
626
636
  retries?: number | Retries;
package/dist/index.d.ts CHANGED
@@ -111,7 +111,9 @@ declare class Secret {
111
111
  type ImageDeleteOptions = Record<never, never>;
112
112
  /** Options for Image.dockerfileCommands(). */
113
113
  type ImageDockerfileCommandsOptions = {
114
- /** Secrets that will be made available to this layer's build environment. */
114
+ /** Environment variables to set in the build environment. */
115
+ env?: Record<string, string>;
116
+ /** Secrets that will be made available as environment variables to this layer's build environment. */
115
117
  secrets?: Secret[];
116
118
  /** GPU reservation for this layer's build environment (e.g. "A100", "T4:2", "A100-80GB:4"). */
117
119
  gpu?: string;
@@ -121,6 +123,7 @@ type ImageDockerfileCommandsOptions = {
121
123
  /** Represents a single image layer with its build configuration. */
122
124
  type Layer = {
123
125
  commands: string[];
126
+ env?: Record<string, string>;
124
127
  secrets?: Secret[];
125
128
  gpuConfig?: GPUConfig;
126
129
  forceBuild?: boolean;
@@ -281,7 +284,9 @@ type ExecOptions = {
281
284
  workdir?: string;
282
285
  /** Timeout for the process in milliseconds. Defaults to 0 (no timeout). */
283
286
  timeout?: number;
284
- /** Secrets with environment variables for the command. */
287
+ /** Environment variables to set for the command. */
288
+ env?: Record<string, string>;
289
+ /** Secrets to inject as environment variables for the commmand.*/
285
290
  secrets?: Secret[];
286
291
  /** Enable a PTY for the command. */
287
292
  pty?: boolean;
@@ -312,6 +317,8 @@ declare class Sandbox {
312
317
  constructor(sandboxId: string);
313
318
  /** Set tags (key-value pairs) on the Sandbox. Tags can be used to filter results in `Sandbox.list`. */
314
319
  setTags(tags: Record<string, string>): Promise<void>;
320
+ /** Get tags (key-value pairs) currently attached to this Sandbox from the server. */
321
+ getTags(): Promise<Record<string, string>>;
315
322
  /** Returns a running Sandbox object from an ID.
316
323
  *
317
324
  * @returns Sandbox with ID
@@ -481,7 +488,9 @@ type SandboxCreateOptions = {
481
488
  * Default behavior is to sleep indefinitely until timeout or termination.
482
489
  */
483
490
  command?: string[];
484
- /** Secrets to inject into the Sandbox. */
491
+ /** Environment variables to set in the Sandbox. */
492
+ env?: Record<string, string>;
493
+ /** Secrets to inject into the Sandbox as environment variables. */
485
494
  secrets?: Secret[];
486
495
  /** Mount points for Modal Volumes. */
487
496
  volumes?: Record<string, Volume>;
@@ -621,6 +630,7 @@ type ClsOptions = {
621
630
  cpu?: number;
622
631
  memory?: number;
623
632
  gpu?: string;
633
+ env?: Record<string, string>;
624
634
  secrets?: Secret[];
625
635
  volumes?: Record<string, Volume>;
626
636
  retries?: number | Retries;