// Row-history backend for the {{projectName}} project. // // `rowHistoryPlugin()` rides the post-commit ChangeEvent tap and records a FULL // snapshot of every insert/update/delete into row history. It covers every table // this app declares BY DEFAULT — `exclude: [someTable]` opts one out, and // `include: [pluginTable]` adds a plugin-owned one (those are out by default, // since the busiest framework tables are append-only logs). Read it back with `rowHistory(store, table, id)` (every // version) and `rowAsOf(store, table, id, when)` (the value at a past instant // — time-travel). This is what-changed-to-what; `audit()` is who/when. // Memory history store — zero infra. import { defineEnv, envVar } from '@voltro/env' import { rowHistoryPlugin } from '@voltro/plugin-row-history' export const env = defineEnv({ LOG_LEVEL: envVar.enum(['debug', 'info', 'warn', 'error'], { access: 'public', default: 'info' }), }) export default { type: 'api' as const, name: '{{capProjectName}}{{capAppName}}', store: 'memory' as const, plugins: [ rowHistoryPlugin({}), ], env, }