Import
import {
createEscapeBuffer,
createFileSystem,
createFSAdapter,
createInMemoryHostRuntime,
createKVStore,
createMockAdapter,
} from "veryfront/platform";
Exports
Functions
| Name | Description | Source |
|---|---|---|
createEscapeBuffer | Create an escape sequence buffer. | source |
createFileSystem | Create the runtime-native filesystem implementation. | source |
createFSAdapter | source | |
createInMemoryHostRuntime | The test adapter: an isolated env map, a fixed cwd and argv, recorded exits, and signal subscribers a test fires with emitSignal. Two instances never share state, and nothing here reads or writes the real process. | source |
createKVStore | Create a cross-runtime KV store. | source |
createMockAdapter | source | |
cwd | Return the current working directory. | source |
enhanceAdapterWithFS | source | |
execPath | Get the executable path of the current runtime | source |
exists | Return false for a missing path and propagate every other filesystem error. | source |
getArgs | Get command-line arguments (cross-runtime: Deno.args or process.argv). | source |
getEnv | Read an environment variable from the active project scope. | source |
getOsType | Get the operating system type Returns: “darwin” (macOS), “linux”, “windows”, or the raw platform string | source |
getRuntimeVersion | Get runtime version string | source |
getStdinReader | Get a reader for stdin (for raw mode character reading) Returns an object with read() and releaseLock() methods | source |
getStdout | Get stdout stream for writing Returns null if not available (e.g., in browser/workers) | source |
getTerminalSize | Get terminal size (columns and rows) Returns default fallback values if terminal size cannot be determined | source |
isExtendedFSAdapter | source | |
isHostExit | Return whether a value is an exit raised by an in-memory host. | source |
isInteractive | Check if stdin is a TTY (terminal) | source |
isNotFoundError | source | |
isStdoutTTY | Check if stdout is a TTY (terminal) | source |
lookupMimeType | source | |
mkdir | Create a directory. | source |
promptSync | Synchronous prompt function that works across Deno and Bun. Displays a message and reads user input from stdin. | source |
readDir | Read directory entries. | source |
readStdinByteSync | Read a single byte from stdin synchronously. Requires raw mode to be enabled for character-by-character reading. Returns null on EOF or if stdin is not available. | source |
readStdinLine | Read one line from stdin and release the reader when complete. | source |
readTextFile | Read a file as text. | source |
remove | Remove a file or directory, rejecting when the path does not exist. | source |
resolveHostAddresses | source | |
setRawMode | Set raw mode on stdin (enables character-by-character input) | source |
writeStdout | Write text directly to stdout (sync) No-op if stdout is not available | source |
writeStdoutAsync | Write data to stdout asynchronously Returns a promise that resolves when the write is complete | source |
writeTextFile | Write text to a file. | source |
Classes
Types
| Name | Description | Source |
|---|---|---|
CommandResult | source | |
FileSystem | Runtime-neutral filesystem contract. | source |
HostRuntime | The process a unit of framework code runs in, as seen by that code. | source |
HostRuntimeEnv | Environment access through a host. Structurally a superset of EnvironmentAdapter in platform/adapters/base.ts, so a host env satisfies that contract too. | source |
HostSignal | Signals a host can deliver to a subscriber. | source |
InMemoryHostRuntime | The in-memory adapter, with the hooks a test needs to observe and drive it. | source |
InMemoryHostRuntimeInit | Initial state for createInMemoryHostRuntime. Everything is optional. | source |
ResolveHostAddressesOptions | source | |
RuntimeAdapter | Core runtime adapter interface | source |
StdinReader | Stdin reader interface for cross-runtime compatibility | source |
Constants
| Name | Description | Source |
|---|---|---|
isDeno | True if running in the real Deno runtime rather than a dnt shim. | source |
Deep imports
These import paths group focused functionality under this module. Each is a separate barrel; import only what you need.veryfront/platform/env
Public environment facade for the veryfront/platform/env subpath. Exposes only project-scoped readers. Privileged or mutating accessors (getHostEnv, env, setEnv, deleteEnv) stay internal so a tenant project cannot read or alter the host process environment through a supported package export.
import { getEnv, getEnvBoolean, getEnvNumber } from "veryfront/platform/env";
Functions
Types
| Name | Description | Source |
|---|---|---|
EnvBooleanOptions | source |
veryfront/platform/path
Compat - Path
import { basename, dirname, extname } from "veryfront/platform/path";
Components
| Name | Description | Source |
|---|---|---|
SEPARATOR | source |
Functions
| Name | Description | Source |
|---|---|---|
basename | Return the last path segment. | source |
dirname | Return the parent directory path. | source |
extname | Return the file extension for a path. | source |
format | source | |
fromFileUrl | Convert a file URL to a runtime-native filesystem path. | source |
isAbsolute | source | |
join | Join and normalize path segments using their detected path flavor. | source |
normalize | source | |
parse | source | |
relative | source | |
resolve | Resolve path segments to an absolute, normalized path. | source |
toFileUrl | source | |
validatePathSecurity | source |