UNPKG

framework

Version:

The (AI) Framework: turnkey, zero-config AI orchestration that wraps a coding-agent CLI (Claude Code) as a black box and takes you from an idea to a running app. Vite for AI.

57 lines 1.84 kB
/** The `node:fs/promises` implementation of {@link NodeFs}. */ export function nodeFs() { return { async read(path) { const { readFile } = await import('node:fs/promises'); return readFile(path, 'utf8'); }, async write(path, contents) { const { writeFile } = await import('node:fs/promises'); await writeFile(path, contents, 'utf8'); }, async append(path, contents) { const { appendFile } = await import('node:fs/promises'); await appendFile(path, contents, 'utf8'); }, async exists(path) { const { stat } = await import('node:fs/promises'); try { return (await stat(path)).isFile(); } catch { return false; } }, async isDirectory(path) { const { stat } = await import('node:fs/promises'); try { return (await stat(path)).isDirectory(); } catch { return false; } }, async mkdir(path) { const { mkdir } = await import('node:fs/promises'); await mkdir(path, { recursive: true }); }, async readdir(path) { const { readdir } = await import('node:fs/promises'); try { return await readdir(path); } catch { return []; } }, async rename(from, to) { const { rename } = await import('node:fs/promises'); await rename(from, to); }, async chmod(path, mode) { const { chmod } = await import('node:fs/promises'); await chmod(path, mode); }, }; } //# sourceMappingURL=node-fs.js.map