@async/db

Generated Files

Sync writes runtime metadata and state under .db/. Commit generated contracts only when the app imports them. That directory usually stays uncommitted. Configured generated types, manifests, and operation refs can be committed when they are part of the application contract.

Output policy

OutputPathCommit?
Runtime state.db/state/*.jsonNo, unless a task explicitly asks for runtime state.
Generated typesoutputs.committedTypesYes, when TypeScript imports need a fresh-checkout contract.
Schema manifestoutputs.schemaManifestYes, when a local UI imports field metadata.
Viewer manifestoutputs.viewerManifestYes, when a custom data explorer imports route and capability metadata.
Operation refsoutputs.operationRefsYes, when client code imports approved callable refs.
Operation registryoutputs.operationRegistryServer-side only. Do not ship full templates to browser code.

Generated contract config

export default defineConfig({
  outputs: {
    committedTypes: './src/generated/db.types.d.ts',
    schemaManifest: './src/generated/db.schema.json',
    operationRefs: './src/generated/db.operation-refs.json',
  },
});

Examples that commit contracts

basic, advanced, production-json, schema-manifest, schema-ui, computed-fields, and content-collections commit generated types or manifests when the example imports them.

See Generated Files in the main guide for the full output map.