feat: remove neon; use standard postgres for db for now

pull/715/head
Travis Fischer 2025-06-25 04:13:10 -05:00
rodzic 16fcec103a
commit e439c271c9
4 zmienionych plików z 68 dodań i 422 usunięć

Wyświetl plik

@ -38,7 +38,6 @@
"@fisch0920/drizzle-zod": "catalog:",
"@hono/node-server": "catalog:",
"@hono/zod-openapi": "catalog:",
"@neondatabase/serverless": "catalog:",
"@paralleldrive/cuid2": "catalog:",
"@sentry/node": "catalog:",
"bcryptjs": "catalog:",

Wyświetl plik

@ -1,34 +1,20 @@
import { drizzle as neonPostgresDrizzle } from '@fisch0920/drizzle-orm/neon-http'
import { drizzle as postgresDrizzle } from '@fisch0920/drizzle-orm/postgres-js'
import { neon } from '@neondatabase/serverless'
import postgres from 'postgres'
import { env } from '@/lib/env'
import * as schema from './schema'
type PostgresClient = ReturnType<typeof postgres> | ReturnType<typeof neon>
type PostgresClient = ReturnType<typeof postgres>
// TODO: consider using neon for both dev and prod; it would be simpler, but
// we'd lose the ability to connect to a 100% local postgres database which is
// nice for flights. could also consider just using `postgres-js` for both, but
// would need to find a different prod db hosting provider.
let _postgresClient: PostgresClient | undefined
const postgresClient =
_postgresClient ??
(_postgresClient = env.isDev
? postgres(env.DATABASE_URL)
: neon(env.DATABASE_URL))
_postgresClient ?? (_postgresClient = postgres(env.DATABASE_URL))
export const db = env.isDev
? postgresDrizzle({
client: postgresClient as ReturnType<typeof postgres>,
schema
})
: neonPostgresDrizzle({
client: postgresClient as ReturnType<typeof neon>,
schema
})
export const db = postgresDrizzle({
client: postgresClient,
schema
})
export * as schema from './schema'
export {

Wyświetl plik

@ -6,408 +6,66 @@ settings:
catalogs:
default:
'@agentic/core':
specifier: ^7.6.7
version: 7.6.7
'@agentic/serper':
specifier: ^7.6.7
version: 7.6.7
'@apideck/better-ajv-errors':
specifier: ^0.3.6
version: 0.3.6
'@clack/prompts':
specifier: ^0.11.0
version: 0.11.0
'@cloudflare/workers-types':
specifier: ^4.20250620.0
version: 4.20250620.0
'@commander-js/extra-typings':
specifier: ^14.0.0
version: 14.0.0
'@dotenvx/dotenvx':
specifier: ^1.45.1
version: 1.45.1
'@edge-runtime/vm':
specifier: ^5.0.0
version: 5.0.0
'@fisch0920/config':
specifier: ^1.1.3
version: 1.1.4
'@fisch0920/drizzle-orm':
specifier: ^0.43.7
version: 0.43.7
'@fisch0920/drizzle-zod':
specifier: ^0.7.9
version: 0.7.9
'@hono/mcp':
specifier: ^0.1.0
version: 0.1.0
'@hono/node-server':
specifier: 1.14.4
version: 1.14.4
'@hono/sentry':
specifier: ^1.2.2
version: 1.2.2
'@hono/zod-openapi':
specifier: ^0.19.8
version: 0.19.8
'@hono/zod-validator':
specifier: ^0.7.0
version: 0.7.0
'@modelcontextprotocol/sdk':
specifier: ^1.13.0
version: 1.13.0
'@neondatabase/serverless':
specifier: ^1.0.1
version: 1.0.1
'@number-flow/react':
specifier: ^0.5.10
version: 0.5.10
'@paralleldrive/cuid2':
specifier: ^2.2.2
version: 2.2.2
'@pmndrs/assets':
specifier: ^1.7.0
version: 1.7.0
'@radix-ui/react-dropdown-menu':
specifier: ^2.1.15
version: 2.1.15
'@radix-ui/react-label':
specifier: ^2.1.7
version: 2.1.7
'@radix-ui/react-slot':
specifier: ^1.2.3
version: 1.2.3
'@radix-ui/react-tabs':
specifier: ^1.1.12
version: 1.1.12
'@radix-ui/react-tooltip':
specifier: ^1.2.7
version: 1.2.7
'@react-email/components':
specifier: ^0.1.0
version: 0.1.0
'@react-three/cannon':
specifier: ^6.6.0
version: 6.6.0
'@react-three/drei':
specifier: ^10.2.0
version: 10.3.0
'@react-three/fiber':
specifier: ^9.1.2
version: 9.1.2
'@react-three/postprocessing':
specifier: ^3.0.4
version: 3.0.4
'@react-three/rapier':
specifier: ^2.1.0
version: 2.1.0
'@redocly/openapi-core':
specifier: ^1.34.3
version: 1.34.3
'@sentry/cli':
specifier: ^2.46.0
version: 2.46.0
'@sentry/cloudflare':
specifier: ^9.30.0
version: 9.30.0
'@sentry/core':
specifier: ^9.30.0
version: 9.30.0
'@sentry/node':
specifier: ^9.30.0
version: 9.30.0
'@standard-schema/spec':
specifier: ^1.0.0
version: 1.0.0
'@tailwindcss/postcss':
specifier: ^4.1.10
version: 4.1.10
'@tailwindcss/typography':
specifier: ^0.5.16
version: 0.5.16
'@tanstack/react-form':
specifier: ^1.12.3
version: 1.12.3
'@tanstack/react-query':
specifier: ^5.80.10
version: 5.80.10
'@tanstack/react-query-devtools':
specifier: ^5.80.10
version: 5.80.10
'@types/canvas-confetti':
specifier: ^1.9.0
version: 1.9.0
'@types/ms':
specifier: ^2.1.0
version: 2.1.0
'@types/node':
specifier: ^24.0.4
version: 24.0.4
'@types/react':
specifier: ^19.1.8
version: 19.1.8
'@types/react-dom':
specifier: ^19.1.6
version: 19.1.6
'@types/semver':
specifier: ^7.7.0
version: 7.7.0
'@types/three':
specifier: ^0.177.0
version: 0.177.0
agents:
specifier: ^0.0.95
version: 0.0.95
ajv:
specifier: ^8.17.1
version: 8.17.1
ajv-formats:
specifier: ^3.0.1
version: 3.0.1
autoprefixer:
specifier: ^10.4.21
version: 10.4.21
bcryptjs:
specifier: ^3.0.2
version: 3.0.2
bumpp:
specifier: ^10.2.0
version: 10.2.0
camelcase:
specifier: ^8.0.0
version: 8.0.0
canvas-confetti:
specifier: ^1.9.3
version: 1.9.3
class-variance-authority:
specifier: ^0.7.1
version: 0.7.1
clsx:
specifier: ^2.1.1
version: 2.1.1
commander:
specifier: ^14.0.0
version: 14.0.0
conf:
specifier: ^14.0.0
version: 14.0.0
decamelize:
specifier: ^6.0.0
version: 6.0.0
decircular:
specifier: ^1.0.0
version: 1.0.0
del-cli:
specifier: ^6.0.0
version: 6.0.0
dotenv:
specifier: ^16.5.0
version: 16.5.0
drizzle-kit:
specifier: ^0.31.1
version: 0.31.1
drizzle-orm:
specifier: ^0.44.2
version: 0.44.2
email-validator:
specifier: ^2.0.4
version: 2.0.4
eslint:
specifier: ^9.29.0
version: 9.29.0
eslint-plugin-drizzle:
specifier: ^0.2.3
version: 0.2.3
eventid:
specifier: ^2.0.1
version: 2.0.1
exit-hook:
specifier: 4.0.0
version: 4.0.0
fast-content-type-parse:
specifier: ^3.0.0
version: 3.0.0
fast-uri:
specifier: ^3.0.6
version: 3.0.6
fastmcp:
specifier: ^3.4.0
version: 3.4.0
get-port:
specifier: ^7.1.0
version: 7.1.0
hast-util-to-jsx-runtime:
specifier: ^2.3.6
version: 2.3.6
hono:
specifier: 4.8.1
version: 4.8.1
is-obj:
specifier: ^3.0.0
version: 3.0.0
knip:
specifier: ^5.61.2
version: 5.61.2
ky:
specifier: 1.8.1
version: 1.8.1
lint-staged:
specifier: ^16.1.2
version: 16.1.2
lucide-react:
specifier: ^0.518.0
version: 0.518.0
motion:
specifier: ^12.18.1
version: 12.18.1
ms:
specifier: ^2.1.3
version: 2.1.3
next:
specifier: ^15.3.4
version: 15.3.4
next-themes:
specifier: ^0.4.6
version: 0.4.6
npm-run-all2:
specifier: ^8.0.4
version: 8.0.4
octokit:
specifier: ^5.0.3
version: 5.0.3
only-allow:
specifier: ^1.2.1
version: 1.2.1
open:
specifier: ^10.1.2
version: 10.1.2
openapi-typescript:
specifier: ^7.8.0
version: 7.8.0
ora:
specifier: ^8.2.0
version: 8.2.0
p-all:
specifier: ^5.0.0
version: 5.0.0
p-map:
specifier: 7.0.3
version: 7.0.3
p-times:
specifier: ^4.0.0
version: 4.0.0
parse-json:
specifier: ^8.3.0
version: 8.3.0
plur:
specifier: ^5.1.0
version: 5.1.0
postcss:
specifier: ^8.5.6
version: 8.5.6
postgres:
specifier: ^3.4.7
version: 3.4.7
posthog-js:
specifier: ^1.255.0
version: 1.255.0
prettier:
specifier: ^3.6.0
version: 3.6.0
react:
specifier: ^19.1.0
version: 19.1.0
react-dom:
specifier: ^19.1.0
version: 19.1.0
react-email:
specifier: ^4.0.16
version: 4.0.16
react-infinite-scroll-hook:
specifier: ^6.0.1
version: 6.0.1
react-lottie-player:
specifier: ^2.1.0
version: 2.1.0
react-use:
specifier: ^17.6.0
version: 17.6.0
resend:
specifier: ^4.6.0
version: 4.6.0
restore-cursor:
specifier: ^5.1.0
version: 5.1.0
semver:
specifier: ^7.7.2
version: 7.7.2
server-only:
specifier: ^0.0.1
version: 0.0.1
shiki:
specifier: ^3.7.0
version: 3.7.0
simple-git-hooks:
specifier: ^2.13.0
version: 2.13.0
sonner:
specifier: ^2.0.5
version: 2.0.5
sort-keys:
specifier: ^5.1.0
version: 5.1.0
stripe:
specifier: ^18.2.1
version: 18.2.1
suspend-react:
specifier: ^0.1.3
version: 0.1.3
tailwind-merge:
specifier: ^3.3.1
version: 3.3.1
tailwindcss:
specifier: ^4.1.10
version: 4.1.10
three:
specifier: ^0.177.0
version: 0.177.0
tsup:
specifier: ^8.5.0
version: 8.5.0
tsx:
specifier: ^4.20.3
version: 4.20.3
turbo:
specifier: ^2.5.4
version: 2.5.4
tw-animate-css:
specifier: ^1.3.4
version: 1.3.4
type-fest:
specifier: ^4.41.0
version: 4.41.0
typescript:
specifier: ^5.8.3
version: 5.8.3
unconfig:
specifier: ^7.3.2
version: 7.3.2
vite-tsconfig-paths:
specifier: ^5.1.4
version: 5.1.4
vitest:
specifier: ^3.2.4
version: 3.2.4
wrangler:
specifier: ^4.21.0
version: 4.21.0
zod:
specifier: ^3.25.67
version: 3.25.67
zod-to-json-schema:
specifier: ^3.24.5
version: 3.24.5
zod-validation-error:
specifier: ^3.5.2
version: 3.5.2
@ -509,9 +167,6 @@ importers:
'@hono/zod-openapi':
specifier: 'catalog:'
version: 0.19.8(hono@4.8.1)(zod@3.25.67)
'@neondatabase/serverless':
specifier: 'catalog:'
version: 1.0.1
'@paralleldrive/cuid2':
specifier: 'catalog:'
version: 2.2.2
@ -8858,6 +8513,7 @@ snapshots:
dependencies:
'@types/node': 22.15.33
'@types/pg': 8.15.4
optional: true
'@next/env@15.3.4': {}
@ -10301,6 +9957,7 @@ snapshots:
'@types/node@22.15.33':
dependencies:
undici-types: 6.21.0
optional: true
'@types/node@24.0.4':
dependencies:
@ -11092,6 +10749,10 @@ snapshots:
dependencies:
ms: 2.1.3
debug@4.4.1:
dependencies:
ms: 2.1.3
debug@4.4.1(supports-color@10.0.0):
dependencies:
ms: 2.1.3
@ -11392,7 +11053,7 @@ snapshots:
esbuild-register@3.6.0(esbuild@0.25.5):
dependencies:
debug: 4.4.1(supports-color@10.0.0)
debug: 4.4.1
esbuild: 0.25.5
transitivePeerDependencies:
- supports-color
@ -13724,7 +13385,7 @@ snapshots:
require-in-the-middle@7.5.2:
dependencies:
debug: 4.4.1(supports-color@10.0.0)
debug: 4.4.1
module-details-from-path: 1.0.4
resolve: 1.22.10
transitivePeerDependencies:
@ -14585,7 +14246,8 @@ snapshots:
jiti: 2.4.2
quansync: 0.2.10
undici-types@6.21.0: {}
undici-types@6.21.0:
optional: true
undici-types@7.8.0: {}

Wyświetl plik

@ -4,61 +4,60 @@ packages:
- examples/*
- packages/fixtures/valid/*
ignoredBuiltDependencies:
- "@fisch0920/config"
- '@fisch0920/config'
onlyBuiltDependencies:
- "@sentry/cli"
- '@sentry/cli'
catalog:
"@agentic/core": ^7.6.7
"@agentic/serper": ^7.6.7
"@ai-sdk/openai": ^1.3.22
"@apideck/better-ajv-errors": ^0.3.6
"@clack/prompts": ^0.11.0
"@cloudflare/workers-types": ^4.20250620.0
"@commander-js/extra-typings": ^14.0.0
"@dotenvx/dotenvx": ^1.45.1
"@edge-runtime/vm": ^5.0.0
"@fisch0920/config": ^1.1.3
"@fisch0920/drizzle-orm": ^0.43.7
"@fisch0920/drizzle-zod": ^0.7.9
"@hono/mcp": ^0.1.0
"@hono/node-server": 1.14.4
"@hono/sentry": ^1.2.2
"@hono/zod-openapi": ^0.19.8
"@hono/zod-validator": ^0.7.0
"@modelcontextprotocol/sdk": ^1.13.0
"@neondatabase/serverless": ^1.0.1
"@number-flow/react": ^0.5.10
"@paralleldrive/cuid2": ^2.2.2
"@pmndrs/assets": ^1.7.0
"@radix-ui/react-dropdown-menu": ^2.1.15
"@radix-ui/react-label": ^2.1.7
"@radix-ui/react-slot": ^1.2.3
"@radix-ui/react-tabs": ^1.1.12
"@radix-ui/react-tooltip": ^1.2.7
"@react-email/components": ^0.1.0
"@react-three/cannon": ^6.6.0
"@react-three/drei": ^10.2.0
"@react-three/fiber": ^9.1.2
"@react-three/postprocessing": ^3.0.4
"@react-three/rapier": ^2.1.0
"@redocly/openapi-core": ^1.34.3
"@sentry/cli": ^2.46.0
"@sentry/cloudflare": ^9.30.0
"@sentry/core": ^9.30.0
"@sentry/node": ^9.30.0
"@standard-schema/spec": ^1.0.0
"@tailwindcss/postcss": ^4.1.10
"@tailwindcss/typography": ^0.5.16
"@tanstack/react-form": ^1.12.3
"@tanstack/react-query": ^5.80.10
"@tanstack/react-query-devtools": ^5.80.10
"@types/canvas-confetti": ^1.9.0
"@types/ms": ^2.1.0
"@types/node": ^24.0.4
"@types/react": ^19.1.8
"@types/react-dom": ^19.1.6
"@types/semver": ^7.7.0
"@types/three": ^0.177.0
'@agentic/core': ^7.6.7
'@agentic/serper': ^7.6.7
'@ai-sdk/openai': ^1.3.22
'@apideck/better-ajv-errors': ^0.3.6
'@clack/prompts': ^0.11.0
'@cloudflare/workers-types': ^4.20250620.0
'@commander-js/extra-typings': ^14.0.0
'@dotenvx/dotenvx': ^1.45.1
'@edge-runtime/vm': ^5.0.0
'@fisch0920/config': ^1.1.3
'@fisch0920/drizzle-orm': ^0.43.7
'@fisch0920/drizzle-zod': ^0.7.9
'@hono/mcp': ^0.1.0
'@hono/node-server': 1.14.4
'@hono/sentry': ^1.2.2
'@hono/zod-openapi': ^0.19.8
'@hono/zod-validator': ^0.7.0
'@modelcontextprotocol/sdk': ^1.13.0
'@number-flow/react': ^0.5.10
'@paralleldrive/cuid2': ^2.2.2
'@pmndrs/assets': ^1.7.0
'@radix-ui/react-dropdown-menu': ^2.1.15
'@radix-ui/react-label': ^2.1.7
'@radix-ui/react-slot': ^1.2.3
'@radix-ui/react-tabs': ^1.1.12
'@radix-ui/react-tooltip': ^1.2.7
'@react-email/components': ^0.1.0
'@react-three/cannon': ^6.6.0
'@react-three/drei': ^10.2.0
'@react-three/fiber': ^9.1.2
'@react-three/postprocessing': ^3.0.4
'@react-three/rapier': ^2.1.0
'@redocly/openapi-core': ^1.34.3
'@sentry/cli': ^2.46.0
'@sentry/cloudflare': ^9.30.0
'@sentry/core': ^9.30.0
'@sentry/node': ^9.30.0
'@standard-schema/spec': ^1.0.0
'@tailwindcss/postcss': ^4.1.10
'@tailwindcss/typography': ^0.5.16
'@tanstack/react-form': ^1.12.3
'@tanstack/react-query': ^5.80.10
'@tanstack/react-query-devtools': ^5.80.10
'@types/canvas-confetti': ^1.9.0
'@types/ms': ^2.1.0
'@types/node': ^24.0.4
'@types/react': ^19.1.8
'@types/react-dom': ^19.1.6
'@types/semver': ^7.7.0
'@types/three': ^0.177.0
agents: ^0.0.95
ai: ^4.3.15
ajv: ^8.17.1