@nestos/vfsdriver-indexeddb
v0.5.1
Published
IndexedDB storage backend for @nestos/vfs-core — persistent browser-side VFS driver.
Maintainers
Readme
@nestos/vfsdriver-indexeddb
Browser IndexedDB storage backend for @nestos/vfs-core. Supports files,
directories, tags, SeqFile records and native transactions for host adapters.
The driver implements storage mechanisms; synchronization policy belongs to the host.
Its only runtime dependency is @nestos/vfs-core.
Development
git clone [email protected]:nest-agentos/vfsdriver-indexeddb.git
cd vfsdriver-indexeddb
pnpm install --frozen-lockfile
pnpm typecheck
pnpm test
pnpm build
pnpm packDevelopment and packed releases both depend on the npm latest tag of @nestos/vfs-core.
No core source checkout or Git submodule is required. The lockfile records the exact
version used for development and CI; frozen installs do not automatically upgrade it.
To refresh core, run pnpm update @nestos/vfs-core, then run typechecking, tests and
the build. The latest tag can also advance to a new major version.
Usage
import { createVFS } from '@nestos/vfs-core';
import { IndexedDBBackend } from '@nestos/vfsdriver-indexeddb';
const backend = new IndexedDBBackend({ dbName: 'my-project' });
const { manager } = await createVFS({ rootBackend: backend });
const fs = await manager.openFileSystem('/');
await fs.driver.createFile({ parentPath: '/', name: 'hello.txt', content: 'Hello' });
await manager.dispose();IndexedDB persistence follows the browser storage policy. Application-level pins cannot prevent browser eviction. Hosts should detect lost control storage and request persistent storage when appropriate.
itookit integration
itookit installs the driver and core from npm. For example:
pnpm add @nestos/vfsdriver-indexeddb @nestos/vfs-core --save-exactDatabase schema and driver implementation notes are in AGENTS.md.
