db init
Scaffold the mini-ORM at src/helpers/db.ts. Idempotent — safe to run again.
vsceasy db initFlags
| Flag | Type | Notes |
|---|---|---|
--provider | storage | global | Where data lives. Default storage. |
--force | boolean | Overwrite an existing db.ts. |
Providers
storage— writes under the workspace storage dir. Falls back to global storage automatically when no folder is open (so activation never fails).global— writes under the global storage dir, shared across workspaces.
Wire it on activate
import { bootstrap } from '../shared/vsceasy';import { registry } from './_registry';import { initDb } from '../helpers/db';
export const activate = bootstrap(registry, { onActivate: [initDb] });Next: define a model, then use it via its repo. See the mini-ORM guide for the full API.