AppView in a box as a Vite plugin thing hatk.dev
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: make SQLite the default database engine

SQLite is now the default for new projects and when no databaseEngine
is specified in config. Use --duckdb flag with hatk new to opt in.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+6 -6
+5 -5
packages/hatk/src/cli.ts
··· 67 67 Usage: hatk <command> [options] 68 68 69 69 Getting Started 70 - new <name> [--svelte] [--template <t>] Create a new hatk project 70 + new <name> [--svelte] [--duckdb] [--template <t>] Create a new hatk project 71 71 72 72 Running 73 73 start Start the hatk server ··· 333 333 if (command === 'new') { 334 334 const name = args[1] 335 335 if (!name) { 336 - console.error('Usage: hatk new <name> [--svelte] [--sqlite] [--template <template-name>]') 336 + console.error('Usage: hatk new <name> [--svelte] [--duckdb] [--template <template-name>]') 337 337 process.exit(1) 338 338 } 339 339 ··· 374 374 } 375 375 376 376 const withSvelte = args.includes('--svelte') 377 - const withSqlite = args.includes('--sqlite') 378 - const dbEngine = withSqlite ? 'sqlite' : 'duckdb' 377 + const withDuckdb = args.includes('--duckdb') 378 + const dbEngine = withDuckdb ? 'duckdb' : 'sqlite' 379 379 mkdirSync(dir) 380 380 const subs = [ 381 381 'lexicons', ··· 1036 1036 ) 1037 1037 1038 1038 const pkgDeps: Record<string, string> = { '@hatk/oauth-client': '*', hatk: '*' } 1039 - if (withSqlite) { 1039 + if (!withDuckdb) { 1040 1040 pkgDeps['better-sqlite3'] = '^11' 1041 1041 } 1042 1042 const pkgDevDeps: Record<string, string> = {
+1 -1
packages/hatk/src/config.ts
··· 96 96 relay: env.RELAY || parsed.relay || 'ws://localhost:2583', 97 97 plc: env.DID_PLC_URL || parsed.plc || 'https://plc.directory', 98 98 port: parseInt(env.PORT || '') || parsed.port || 3000, 99 - databaseEngine: ((env.DATABASE_ENGINE || parsed.databaseEngine || 'duckdb') as HatkConfig['databaseEngine']), 99 + databaseEngine: ((env.DATABASE_ENGINE || parsed.databaseEngine || 'sqlite') as HatkConfig['databaseEngine']), 100 100 database: database ? resolve(configDir, database) : ':memory:', 101 101 publicDir: parsed.publicDir === null ? null : resolve(configDir, parsed.publicDir || './public'), 102 102 collections: parsed.collections || [],