@seanhogg/builderforce-webcontainers 2026.10.4 → 2026.10.6

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
@@ -9,19 +9,19 @@ headers, no session caps, MIT licensed.
9
9
  scope stays off the rest of your app. You can resolve its path with
10
10
  `import.meta.resolve('@seanhogg/builderforce-webcontainers/sw.js')`, or copy it
11
11
  in your build.
12
- 2. Boot and mount:
12
+ 2. Start and write the files:
13
13
 
14
14
  ```ts
15
- import { bootPreviewRuntime } from '@seanhogg/builderforce-webcontainers';
15
+ import { startPreviewRuntime } from '@seanhogg/builderforce-webcontainers';
16
16
 
17
- const runtime = await bootPreviewRuntime({ serviceWorkerUrl: '/__bfwc/sw.js', id: projectId });
18
- runtime.mount(files);
17
+ const runtime = await startPreviewRuntime({ serviceWorkerUrl: '/__bfwc/sw.js', id: projectId });
18
+ runtime.writeTree(files);
19
19
  if (runtime.profile().supported) iframe.src = runtime.url;
20
20
  else showFallback(runtime.profile().reason);
21
21
  ```
22
22
 
23
23
  To run untrusted code (AI-written, arbitrary packages), isolate the preview on its
24
- own origin with `bootPreviewRuntime({ relayUrl })`. That origin serves
24
+ own origin with `startPreviewRuntime({ relayUrl })`. That origin serves
25
25
  `relay.html`, `sw.js` and `process-worker.js` (strings in `@seanhogg/builderforce-webcontainers/assets`)
26
26
  with `Content-Security-Policy: frame-ancestors` limited to your app. See the
27
27
  [root README](../../README.md#isolating-the-preview-relay-mode).