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.

fix: make oauth/backfill fields optional in defineConfig, add hatk.config.ts to tsconfig template

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

+10 -4
+1 -1
packages/hatk/package.json
··· 1 1 { 2 2 "name": "@hatk/hatk", 3 - "version": "0.0.1-alpha.20", 3 + "version": "0.0.1-alpha.21", 4 4 "license": "MIT", 5 5 "bin": { 6 6 "hatk": "dist/cli.js"
+1 -1
packages/hatk/src/cli.ts
··· 1047 1047 allowImportingTsExtensions: true, 1048 1048 resolveJsonModule: true, 1049 1049 }, 1050 - include: ['feeds', 'xrpc', 'og', 'seeds', 'labels', 'jobs', 'setup', 'hatk.generated.ts'], 1050 + include: ['feeds', 'xrpc', 'og', 'seeds', 'labels', 'jobs', 'setup', 'hatk.generated.ts', 'hatk.config.ts'], 1051 1051 }, 1052 1052 null, 1053 1053 2,
+8 -2
packages/hatk/src/config.ts
··· 50 50 admins: string[] // DIDs allowed to access /admin/* endpoints 51 51 } 52 52 53 + /** Input type for defineConfig — fields that have defaults are optional. */ 54 + export type HatkConfigInput = Partial<Omit<HatkConfig, 'oauth' | 'backfill'>> & { 55 + oauth?: (Partial<OAuthConfig> & { clients: OAuthClientConfig[] }) | null 56 + backfill?: Partial<BackfillConfig> 57 + } 58 + 53 59 /** Identity function that provides type inference for hatk config files. */ 54 - export function defineConfig(config: Partial<HatkConfig>): Partial<HatkConfig> { 60 + export function defineConfig(config: HatkConfigInput): HatkConfigInput { 55 61 return config 56 62 } 57 63 ··· 79 85 console.error(err.message || err) 80 86 process.exit(1) 81 87 } 82 - const parsed: Partial<HatkConfig> & Record<string, any> = mod.default || {} 88 + const parsed: HatkConfigInput & Record<string, any> = mod.default || {} 83 89 84 90 const backfillRaw = parsed.backfill || ({} as Partial<BackfillConfig>) 85 91 const env = process.env