Skip to content

Commit 81645b4

Browse files
authored
chore: update docs to v1.3.0 (#88)
1 parent 2f588dc commit 81645b4

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

docs/api.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ interface UnhandledRejectionMessage {
236236
interface ConsoleErrorMessage {
237237
type: PreviewMessageType.ConsoleError;
238238
args: any[];
239+
stack: string;
239240
}
240241
```
241242

@@ -350,6 +351,25 @@ Reload the provided iframe by sending a message to the iframe and falling back t
350351

351352
Returns a `Promise` that resolves when the reload has completed.
352353

354+
## `configureAPIKey`
355+
356+
Added in version `1.3.0`.
357+
358+
Configure an API key to be used for commercial usage of the WebContainer API. See https://webcontainers.io/enterprise for more information.
359+
360+
<h4 id="configureapikey-signature">
361+
<a id="configureapikey-signature">Signature</a>
362+
<a href="#configureapikey-signature" class="header-anchor" aria-hidden="true">#</a>
363+
</h4>
364+
365+
<br />
366+
367+
<h4 id="configureapikey-signature">
368+
<code>configureAPIKey(key: string): void</code>
369+
</h4>
370+
371+
This function will throw an exception if `WebContainer.boot` was called before `configureAPIKey`.
372+
353373
## `auth`
354374

355375
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:
@@ -377,6 +397,9 @@ Intialize the authentication for use in WebContainer. This method should be call
377397

378398
<code>init(options: <a href="#authinit-options">AuthInitOptions</a>): { status: 'need-auth' | 'authorized' } | <a href="#authfailed-error">AuthFailedError</a></code>
379399

400+
This function will throw an exception if `WebContainer.boot` was called before `auth.init`.
401+
402+
<br />
380403

381404
<h4 id="authinit-options">
382405
<a id="authinit-options"><code>AuthInitOptions</code></a>

docs/changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ head:
1010

1111
# Changelog
1212

13+
## 1.3.0
14+
15+
* Breaking change: we now throw if [`auth.init`](api#▸-init) is called after [`WebContainer.boot`](api#▸-boot)
16+
* Add [`configureAPIKey`](api#configureapikey) to use the API with an API key.
17+
* Add `stack` information to `console.error` messages coming from previews.
18+
1319
## 1.2.4
1420

1521
* Bug fix: [`reloadPreview`](api#reloadpreview) was always doing a hard refresh as the port was not transferred.

0 commit comments

Comments
 (0)