UNPKG

@codesandbox/sandpack-client

Version:

<img style="width:100%" src="https://user-images.githubusercontent.com/4838076/143581035-ebee5ba2-9cb1-4fe8-a05b-2f44bd69bb4b.gif" alt="Component toolkit for live running code editing experiences" />

12 lines (11 loc) 704 B
import type { ShellCommandOptions } from "@codesandbox/nodebox/build/modules/shell"; import type { SandpackBundlerFiles } from "../.."; export declare function generateRandomId(): string; export declare const writeBuffer: (content: string | Uint8Array) => Uint8Array; export declare const readBuffer: (content: string | Uint8Array) => string; export declare const fromBundlerFilesToFS: (files: SandpackBundlerFiles) => Record<string, Uint8Array>; /** * Figure out which script it must run to start a server */ export declare const findStartScriptPackageJson: (packageJson: string) => [string, string[], ShellCommandOptions]; export declare const getMessageFromError: (error: Error | string) => string;