You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api.md
+21-12Lines changed: 21 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,18 @@ The main export of this library. An instance of `WebContainer` represents a runt
30
30
31
31
Gives access to the underlying file system.
32
32
33
+
<br />
34
+
35
+
#### <code>path: string</code>
36
+
37
+
The default value of the `PATH` environment variable for processes started through [`spawn`](#▸-spawn).
38
+
39
+
<br />
40
+
41
+
#### <code>workdir: string</code>
42
+
43
+
The full path to the working directory (see [FileSystemAPI](#filesystemapi)).
44
+
33
45
### `WebContainer` Methods
34
46
35
47
### ▸ `boot`
@@ -245,16 +257,6 @@ All entities derived from this instance (e.g. processes, the file system, etc.)
245
257
246
258
## `auth`
247
259
248
-
::: warning
249
-
This namespace is currently only available under the `beta` tag. If you want to use it you will need to install this version specifically:
250
-
251
-
```bash
252
-
npm install @webcontainer/api@beta
253
-
```
254
-
255
-
We don't guarantee backwards compatibility between beta versions.
256
-
:::
257
-
258
260
The authentication API is exported under the `auth` namespace. It allows you to authenticate users visiting your website via StackBlitz. In order for users to be authenticated via this method, they must:
259
261
260
262
* Be logged in on StackBlitz.
@@ -265,8 +267,6 @@ Once logged in, you'll be able to install private packages that those users have
265
267
266
268
### `auth` Functions
267
269
268
-
<br />
269
-
270
270
### ▸ `init`
271
271
272
272
Intialize the authentication for use in WebContainer. This method should be called as soon as possible as part of the loading phase of your page. For example at the top of a module that gets loaded as soon as the page loads. This is important for multiple reasons:
@@ -851,6 +851,7 @@ Options that control spawning a process.
Current working directory for the process, relative to [`workdir`](#workdir-string) this instance (which you can change when [booting `WebContainer`](#▸-boot)).
868
+
869
+
By default, the working directory of the spawned process is [`workdir`](#workdir-string).
870
+
871
+
<br />
872
+
864
873
#### ▸ `env?: Record<string, string | number | boolean>`
0 commit comments