modal 0.3.22 → 0.3.24

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,8 +284,12 @@ 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[];
291
+ /** Enable a PTY for the command. */
292
+ pty?: boolean;
286
293
  };
287
294
  /** A port forwarded from within a running Modal Sandbox. */
288
295
  declare class Tunnel {
@@ -310,6 +317,8 @@ declare class Sandbox {
310
317
  constructor(sandboxId: string);
311
318
  /** Set tags (key-value pairs) on the Sandbox. Tags can be used to filter results in `Sandbox.list`. */
312
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>>;
313
322
  /** Returns a running Sandbox object from an ID.
314
323
  *
315
324
  * @returns Sandbox with ID
@@ -479,12 +488,16 @@ type SandboxCreateOptions = {
479
488
  * Default behavior is to sleep indefinitely until timeout or termination.
480
489
  */
481
490
  command?: string[];
482
- /** 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. */
483
494
  secrets?: Secret[];
484
495
  /** Mount points for Modal Volumes. */
485
496
  volumes?: Record<string, Volume>;
486
497
  /** Mount points for cloud buckets. */
487
498
  cloudBucketMounts?: Record<string, CloudBucketMount>;
499
+ /** Enable a PTY for the Sandbox. */
500
+ pty?: boolean;
488
501
  /** List of ports to tunnel into the Sandbox. Encrypted ports are tunneled with TLS. */
489
502
  encryptedPorts?: number[];
490
503
  /** List of encrypted ports to tunnel into the Sandbox, using HTTP/2. */
@@ -617,6 +630,7 @@ type ClsOptions = {
617
630
  cpu?: number;
618
631
  memory?: number;
619
632
  gpu?: string;
633
+ env?: Record<string, string>;
620
634
  secrets?: Secret[];
621
635
  volumes?: Record<string, Volume>;
622
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,8 +284,12 @@ 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[];
291
+ /** Enable a PTY for the command. */
292
+ pty?: boolean;
286
293
  };
287
294
  /** A port forwarded from within a running Modal Sandbox. */
288
295
  declare class Tunnel {
@@ -310,6 +317,8 @@ declare class Sandbox {
310
317
  constructor(sandboxId: string);
311
318
  /** Set tags (key-value pairs) on the Sandbox. Tags can be used to filter results in `Sandbox.list`. */
312
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>>;
313
322
  /** Returns a running Sandbox object from an ID.
314
323
  *
315
324
  * @returns Sandbox with ID
@@ -479,12 +488,16 @@ type SandboxCreateOptions = {
479
488
  * Default behavior is to sleep indefinitely until timeout or termination.
480
489
  */
481
490
  command?: string[];
482
- /** 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. */
483
494
  secrets?: Secret[];
484
495
  /** Mount points for Modal Volumes. */
485
496
  volumes?: Record<string, Volume>;
486
497
  /** Mount points for cloud buckets. */
487
498
  cloudBucketMounts?: Record<string, CloudBucketMount>;
499
+ /** Enable a PTY for the Sandbox. */
500
+ pty?: boolean;
488
501
  /** List of ports to tunnel into the Sandbox. Encrypted ports are tunneled with TLS. */
489
502
  encryptedPorts?: number[];
490
503
  /** List of encrypted ports to tunnel into the Sandbox, using HTTP/2. */
@@ -617,6 +630,7 @@ type ClsOptions = {
617
630
  cpu?: number;
618
631
  memory?: number;
619
632
  gpu?: string;
633
+ env?: Record<string, string>;
620
634
  secrets?: Secret[];
621
635
  volumes?: Record<string, Volume>;
622
636
  retries?: number | Retries;