mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
JSRuntime: remove WebContainer type dependency
This commit is contained in:
2 files changed
+43
-22
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { WebContainer, type WebContainerProcess } from '@webcontainer/api';
|
||||
import type { JSRuntime, JSRuntimeFS, DirectoryEntry } from './JSRuntime';
|
||||
import { WebContainer } from '@webcontainer/api';
|
||||
import type { JSRuntime, JSRuntimeFS, JSRuntimeChildProcess, DirectoryEntry } from './JSRuntime';
|
||||
|
||||
/**
|
||||
* WebContainer adapter that implements the JSRuntime interface
|
||||
@@ -36,7 +36,7 @@ export class WebContainerAdapter implements JSRuntime {
|
||||
* Spawn a process in the WebContainer
|
||||
* Automatically boots the container on first call
|
||||
*/
|
||||
async spawn(command: string, args: string[] = [], options: Record<string, unknown> = {}): Promise<WebContainerProcess> {
|
||||
async spawn(command: string, args: string[] = [], options: Record<string, unknown> = {}): Promise<JSRuntimeChildProcess> {
|
||||
const webcontainer = await this.ensureBooted();
|
||||
return webcontainer.spawn(command, args, options);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user