modal 0.9.0 → 0.10.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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Modal JavaScript SDK
2
2
 
3
- [![JS Reference Documentation](https://img.shields.io/badge/docs-reference-blue)](https://modal-labs.github.io/libmodal/)
3
+ [![JS Reference Documentation](https://img.shields.io/badge/docs-reference-blue)](https://modal.com/docs/sdk/js)
4
4
  [![npm Version](https://img.shields.io/npm/v/modal.svg)](https://www.npmjs.org/package/modal)
5
5
  [![npm Downloads](https://img.shields.io/npm/dm/modal.svg)](https://www.npmjs.com/package/modal)
6
6
 
@@ -35,7 +35,7 @@ load the package with either `import` or `require()` in any project.
35
35
  See the main [Modal documentation](https://modal.com/docs) and
36
36
  [user guides](https://modal.com/docs/guide) for high-level overviews. For
37
37
  details, see the
38
- [API reference documentation for for JS](https://modal-labs.github.io/libmodal/).
38
+ [API reference documentation for JS](https://modal.com/docs/sdk/js).
39
39
 
40
40
  We also provide a number of examples:
41
41
 
@@ -48,7 +48,10 @@ We also provide a number of examples:
48
48
  - [Create a named Sandbox](https://github.com/modal-labs/modal-client/blob/main/js/examples/sandbox-named.ts)
49
49
  - [Create a Sandbox with GPU](https://github.com/modal-labs/modal-client/blob/main/js/examples/sandbox-gpu.ts)
50
50
  - [Create a Sandbox using a private image from AWS ECR](https://github.com/modal-labs/modal-client/blob/main/js/examples/sandbox-private-image.ts)
51
+ - [Run a Sidecar and snapshot its filesystem](https://github.com/modal-labs/modal-client/blob/main/js/examples/sandbox-sidecar.ts)
52
+ - [Persist a workspace across Sidecars](https://github.com/modal-labs/modal-client/blob/main/js/examples/sandbox-sidecar-directory-snapshot.ts)
51
53
  - [Take a snapshot of the filesystem of a Sandbox](https://github.com/modal-labs/modal-client/blob/main/js/examples/sandbox-filesystem-snapshot.ts)
54
+ - [Snapshot the filesystem of a Sandbox when it exits](https://github.com/modal-labs/modal-client/blob/main/js/examples/sandbox-exit-snapshot.ts)
52
55
  - [Snapshot a directory, and mount it in a running Sandbox](https://github.com/modal-labs/modal-client/blob/main/js/examples/sandbox-directory-snapshot.ts)
53
56
  - [Snapshot and restore a directory with a customer-supplied encryption key](https://github.com/modal-labs/modal-client/blob/main/js/examples/sandbox-directory-snapshot-csek.ts)
54
57
  - [Execute Sandbox commands](https://github.com/modal-labs/modal-client/blob/main/js/examples/sandbox-exec.ts)
@@ -66,6 +69,7 @@ We also provide a number of examples:
66
69
  - [Eagerly build an Image for a Sandbox](https://github.com/modal-labs/modal-client/blob/main/js/examples/sandbox-prewarm.ts)
67
70
  - [Building custom Images](https://github.com/modal-labs/modal-client/blob/main/js/examples/image-building.ts)
68
71
  - [Add telemetry and tracing with custom middleware](https://github.com/modal-labs/modal-client/blob/main/js/examples/telemetry.ts)
72
+ - [Configure a client with OAuth credentials](https://github.com/modal-labs/modal-client/blob/main/js/examples/custom-client.ts)
69
73
 
70
74
  ### Configuration
71
75
 
@@ -85,6 +89,12 @@ export MODAL_TOKEN_ID=ak-NOTAREALTOKENSTRINGXYZ
85
89
  export MODAL_TOKEN_SECRET=as-FAKESECRETSTRINGABCDEF
86
90
  ```
87
91
 
92
+ OAuth integrations can instead set `MODAL_OAUTH_REFRESH_TOKEN`,
93
+ `MODAL_OAUTH_CLIENT_ID`, and exactly one of `MODAL_OAUTH_CLIENT_SECRET` or
94
+ `MODAL_OAUTH_JWT_KEY` (an unencrypted RSA private key in PEM). See the
95
+ [custom client example](https://github.com/modal-labs/modal-client/blob/main/js/examples/custom-client.ts)
96
+ for explicit client configuration.
97
+
88
98
  ### Telemetry and Observability
89
99
 
90
100
  The Modal JavaScript SDK supports custom gRPC middleware for telemetry, tracing,