podcast manager
3
fork

Configure Feed

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

formatting and clean up and hooks

+58 -3
+48
.githooks/pre-commit
··· 1 + #!/bin/bash 2 + 3 + # Get all staged files 4 + staged_files=$(git diff --cached --name-only --diff-filter=ACM) 5 + if [ -z "$staged_files" ]; then 6 + echo "No staged files found." 7 + exit 0 8 + fi 9 + 10 + echo "📦 staged files:" 11 + echo "$staged_files" | sed 's/^/ /' 12 + 13 + # Format all staged files that deno can handle 14 + formattable=$(echo "$staged_files" | grep -E '\.(ts|tsx|js|jsx|json|jsonc)$' || true) 15 + 16 + if [ -n "$formattable" ]; then 17 + echo "🎨 deno fmt..." 18 + echo "$formattable" | xargs deno fmt 19 + 20 + # Re-stage formatted files 21 + echo "$formattable" | xargs git add 22 + echo " ✓ formatted and re-staged files" 23 + fi 24 + 25 + # Type check TypeScript files 26 + checkable=$(echo "$staged_files" | grep -E '\.(ts|tsx)$' || true) 27 + if [ -n "$checkable" ] && [ "$SKIP_DENO_CHECK" != "1" ]; then 28 + failed=0 29 + echo "🧹 deno lint..." 30 + if echo "$checkable" | xargs deno lint --fix; then 31 + echo " ✓ lint passed" 32 + else 33 + echo "lint failed; skip with SKIP_DENO_CHECK=1 git commit" 34 + echo "skip: SKIP_DENO_CHECK=1 git commit" 35 + failed=1 36 + fi 37 + echo "🔧 deno check..." 38 + if deno check; then 39 + echo " ✓ type check passed" 40 + else 41 + echo "type check failed; skip with SKIP_DENO_CHECK=1 git commit" 42 + failed=1 43 + fi 44 + 45 + [[ $failed -ne 0 ]] && exit 1 46 + fi 47 + echo "🚀 All checks passed!" 48 + exit 0
+7
readme.org
··· 19 19 20 20 * Development 21 21 22 + Run the pwa+server with: 23 + 22 24 #+BEGIN_SRC bash 23 25 $ deno run dev 24 26 #+END_SRC ··· 38 40 - docker compose for deployment with self-hosted KV 39 41 40 42 See [[./devlog.org]] for design and architecture information. 43 + 44 + * Contributing 45 + 46 + - run ~git config core.hooksPath .githooks~ to install pre-commit hooks for lint/fmt 47 + - not really open to contributions right now, come back later. 41 48 42 49 * License & Copyright 43 50
+3 -3
src/types/branded-id.ts
··· 3 3 import { z } from "zod/v4"; 4 4 5 5 /** result from a branded id maker invocation */ 6 - export interface BrandedIdResult<T extends string, Z extends z.ZodType> { 6 + export interface BrandedId<T extends string, Z extends z.ZodType> { 7 7 generator: () => T; 8 8 validator: (i?: unknown) => i is T; 9 9 parser: (i?: unknown) => T; ··· 11 11 } 12 12 13 13 /** given a branded id maker, return the branded id type */ 14 - export type inferBrandedId<T> = T extends BrandedIdResult<infer U, infer _> ? U 14 + export type inferBrandedId<T> = T extends BrandedId<infer U, infer _> ? U 15 15 : never; 16 16 17 17 /** ··· 51 51 validator, 52 52 parser, 53 53 schema, 54 - } satisfies BrandedIdResult<BrandType, typeof schema>; 54 + } satisfies BrandedId<BrandType, typeof schema>; 55 55 }