@async/db

generated output

Commit generated contracts only when the app imports them.

Sync writes runtime metadata and state under .db/. 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 viewer 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

basicadvancedproduction-jsonschema-manifestschema-uicomputed-fieldscontent-collections