- Replace in-memory Maps with Drizzle ORM queries for all CRUD operations - Use integer IDs matching SQLite schema instead of UUIDs - Fix scriptId to projectId inconsistency in characters and scenes - Add project ownership verification on all mutation procedures - Make getCharacter/getScene procedures protected (not public) - Proper JWT-based userId validation via context - Add cascade delete for characters/relationships/scenes on project deletion - Add verifyProjectOwnership helper for authorization checks - Rewrite tests with createCallerFactory pattern for tRPC v11 - Use better-sqlite3 for in-memory test database - Split vitest config into separate file from vite config
34 lines
677 B
TypeScript
34 lines
677 B
TypeScript
import { defineConfig } from 'vite';
|
|
import solid from 'vite-plugin-solid';
|
|
import { resolve } from 'path';
|
|
|
|
export default defineConfig({
|
|
plugins: [solid()],
|
|
resolve: {
|
|
alias: {
|
|
'@lib': resolve(__dirname, './src/lib'),
|
|
'@components': resolve(__dirname, './src/components'),
|
|
'@types': resolve(__dirname, './src/types'),
|
|
},
|
|
},
|
|
build: {
|
|
target: 'esnext',
|
|
outDir: 'dist',
|
|
sourcemap: true,
|
|
rollupOptions: {
|
|
input: {
|
|
main: resolve(__dirname, 'index.html'),
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
proxy: {
|
|
'/sync': {
|
|
target: 'ws://localhost:8080',
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
});
|