/** * Sandbox implementation for v2. * * A sandbox is a single-project environment with its own: * - Virtual filesystem (sync) * - Installed packages (tracked in /package.json) * - Build configuration (entry point, tsconfig) * * The sandbox exposes both direct methods (install, build, etc.) and * shell commands via exec() for flexibility. * * Build produces a code string but does NOT load or execute it. * Execution is handled by an external executor (main thread, worker, iframe, etc.) * which provides appropriate isolation and security boundaries. */ import type { IBundler, ITypechecker, ITypesResolver, ISharedModuleRegistry, IExecutor, Sandbox, SandboxOptions } from "../types"; import { Filesystem } from "./fs"; import type { ICache } from "./persistor"; import type { ResolvedTypes } from "./esm-types-resolver"; export interface SandboxContext { bundler: IBundler; typechecker?: ITypechecker; typesResolver?: ITypesResolver; /** Cache for package types (used by ensureTypesInstalled) */ packageTypesCache?: ICache; sharedModuleRegistry: ISharedModuleRegistry | null; executor?: IExecutor; } /** * Create a sandbox instance. * This is called by createSandlot().createSandbox(). */ export declare function createSandboxImpl(fs: Filesystem, options: SandboxOptions, context: SandboxContext): Promise; //# sourceMappingURL=sandbox.d.ts.map