From 6c4234f59be4c5f9b9057bf2c28a433970267a68 Mon Sep 17 00:00:00 2001 From: Maxence Maireaux Date: Sun, 28 Apr 2024 23:10:04 +0200 Subject: [PATCH] feat: use internal package for Database --- .github/workflows/main.yaml | 2 +- apps/web/package.json | 10 +- apps/web/server/api/auth/github.get.ts | 7 +- apps/web/server/database/migrate.ts | 15 -- apps/web/server/plugins/migrations.ts | 7 - apps/web/server/trpc/context.ts | 6 +- apps/web/server/trpc/routers/tokens.ts | 11 +- apps/web/server/utils/db.ts | 8 +- {apps/web => internal/db}/drizzle.config.ts | 5 +- internal/db/package.json | 28 ++++ .../db.ts => internal/db/src/index.ts | 31 ++-- internal/db/src/migrate.ts | 9 ++ .../migrations/0000_brave_rocket_racer.sql | 0 .../migrations/0001_remarkable_stature.sql | 0 .../db/src}/migrations/0002_next_thor.sql | 0 .../src}/migrations/meta/0000_snapshot.json | 0 .../src}/migrations/meta/0001_snapshot.json | 0 .../src}/migrations/meta/0002_snapshot.json | 0 .../db/src}/migrations/meta/_journal.json | 0 .../database => internal/db/src}/schema.ts | 0 internal/db/src/types.ts | 5 + internal/db/tsconfig.json | 7 + package.json | 5 +- pnpm-lock.yaml | 141 ++++++++++++++++-- pnpm-workspace.yaml | 1 + turbo.json | 3 + 26 files changed, 225 insertions(+), 76 deletions(-) delete mode 100644 apps/web/server/database/migrate.ts delete mode 100644 apps/web/server/plugins/migrations.ts rename {apps/web => internal/db}/drizzle.config.ts (50%) create mode 100644 internal/db/package.json rename apps/web/server/database/db.ts => internal/db/src/index.ts (64%) create mode 100644 internal/db/src/migrate.ts rename {apps/web/server/database => internal/db/src}/migrations/0000_brave_rocket_racer.sql (100%) rename {apps/web/server/database => internal/db/src}/migrations/0001_remarkable_stature.sql (100%) rename {apps/web/server/database => internal/db/src}/migrations/0002_next_thor.sql (100%) rename {apps/web/server/database => internal/db/src}/migrations/meta/0000_snapshot.json (100%) rename {apps/web/server/database => internal/db/src}/migrations/meta/0001_snapshot.json (100%) rename {apps/web/server/database => internal/db/src}/migrations/meta/0002_snapshot.json (100%) rename {apps/web/server/database => internal/db/src}/migrations/meta/_journal.json (100%) rename {apps/web/server/database => internal/db/src}/schema.ts (100%) create mode 100644 internal/db/src/types.ts create mode 100644 internal/db/tsconfig.json diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 37449df..d49a354 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -29,7 +29,7 @@ jobs: - name: Install uses: ./.github/actions/install - name: Migrate Database - run: pnpm run -C ./apps/web db:migrate + run: pnpm run db:migrate env: DATABASE_URL: ${{ secrets.DATABASE_URL }} - name: Build diff --git a/apps/web/package.json b/apps/web/package.json index e7e2323..0fe8d98 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -6,18 +6,16 @@ "scripts": { "build": "nuxi build", "dev": "nuxi dev", - "generate": "nuxt generate && pnpm run db:generate", + "generate": "nuxt generate", "preview": "npm run build && wrangler pages dev", "postinstall": "nuxt prepare", "deploy:production": "npm run build && wrangler pages deploy --env=production", - "cf-typegen": "wrangler types", - "db:generate": "drizzle-kit generate:pg", - "db:migrate": "tsx server/database/migrate.ts" + "cf-typegen": "wrangler types" }, "dependencies": { + "@getlicensed/db": "workspace:^", "@headlessui/vue": "^1.7.20", "@heroicons/vue": "^2.1.3", - "@neondatabase/serverless": "^0.9.1", "@nuxt/ui": "^2.15.2", "@nuxthub/core": "^0.5.11", "@nuxtjs/tailwindcss": "^6.12.0", @@ -39,9 +37,7 @@ "devDependencies": { "@cloudflare/workers-types": "^4.20240419.0", "dotenv": "^16.4.5", - "drizzle-kit": "^0.20.17", "nitro-cloudflare-dev": "^0.1.4", - "pg": "^8.11.5", "ts-node": "^10.9.2", "tsx": "^4.7.2", "typescript": "^5.4.5", diff --git a/apps/web/server/api/auth/github.get.ts b/apps/web/server/api/auth/github.get.ts index 78b0c40..a58bfb2 100644 --- a/apps/web/server/api/auth/github.get.ts +++ b/apps/web/server/api/auth/github.get.ts @@ -1,10 +1,11 @@ +import { schema } from '@getlicensed/db'; import { eq } from 'drizzle-orm'; async function getUserByEmail(email: string) { return useDB() .select() - .from(tables.users) - .where(eq(tables.users.email, email)) + .from(schema.users) + .where(eq(schema.users.email, email)) .limit(1); } @@ -14,7 +15,7 @@ async function createUser(param: { email: string; }) { return useDB() - .insert(tables.users) + .insert(schema.users) .values({ name: param.name, email: param.email, diff --git a/apps/web/server/database/migrate.ts b/apps/web/server/database/migrate.ts deleted file mode 100644 index 9bc6de1..0000000 --- a/apps/web/server/database/migrate.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { dbMigrate } from '~/server/database/db'; - -export const runMigrate = async () => { - console.log('Running database migrations...'); - - await dbMigrate() - .then(() => { - console.log('Database migrations done'); - }) - .catch((err) => { - console.error('Database migrations failed', err); - }); -}; - -await runMigrate(); diff --git a/apps/web/server/plugins/migrations.ts b/apps/web/server/plugins/migrations.ts deleted file mode 100644 index ba240b5..0000000 --- a/apps/web/server/plugins/migrations.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { runMigrate } from '~/server/database/migrate'; - -export default defineNitroPlugin(async () => { - if (!import.meta.dev) return; - - await runMigrate(); -}); diff --git a/apps/web/server/trpc/context.ts b/apps/web/server/trpc/context.ts index 838e4d0..953146b 100644 --- a/apps/web/server/trpc/context.ts +++ b/apps/web/server/trpc/context.ts @@ -1,5 +1,7 @@ +import { schema } from '@getlicensed/db'; /* eslint-disable @typescript-eslint/no-unused-vars */ import type { inferAsyncReturnType } from '@trpc/server'; +import { eq } from 'drizzle-orm'; import type { H3Event } from 'h3'; export type Context = inferAsyncReturnType; @@ -8,9 +10,9 @@ export async function createContext(event: H3Event) { const session = await requireUserSession(event); const user = await useDB() .select() - .from(tables.users) + .from(schema.users) // @ts-ignore - .where(eq(tables.users.githubId, session.user.id)) + .where(eq(schema.users.githubId, session.user.id)) .limit(1); return { diff --git a/apps/web/server/trpc/routers/tokens.ts b/apps/web/server/trpc/routers/tokens.ts index c6045b8..1002eff 100644 --- a/apps/web/server/trpc/routers/tokens.ts +++ b/apps/web/server/trpc/routers/tokens.ts @@ -1,4 +1,5 @@ -import { desc } from 'drizzle-orm'; +import { schema } from '@getlicensed/db'; +import { desc, eq } from 'drizzle-orm'; import { generateRandomString } from 'ts-randomstring/lib'; import { z } from 'zod'; import { protectedProcedure, t } from '~/server/trpc/trpc'; @@ -11,12 +12,12 @@ export const tokensRouter = t.router({ all: protectedProcedure.query(({ ctx }) => { return useDB() .select() - .from(tables.tokens) - .where(eq(tables.tokens.userId, ctx.userId)) - .orderBy(desc(tables.tokens.createdAt)); + .from(schema.tokens) + .where(eq(schema.tokens.userId, ctx.userId)) + .orderBy(desc(schema.tokens.createdAt)); }), add: protectedProcedure.input(AddShape).mutation(({ input, ctx }) => { - return useDB().insert(tables.tokens).values({ + return useDB().insert(schema.tokens).values({ name: input.name, userId: ctx.userId, token: generateRandomString(), diff --git a/apps/web/server/utils/db.ts b/apps/web/server/utils/db.ts index e8bc92f..9a254c5 100644 --- a/apps/web/server/utils/db.ts +++ b/apps/web/server/utils/db.ts @@ -1,10 +1,10 @@ -import { queryClient } from '~/server/database/db'; -import * as schema from '~/server/database/schema'; - -export { sql, eq, and, or } from 'drizzle-orm'; +import { queryClient } from '@getlicensed/db'; +import * as schema from '@getlicensed/db'; export const tables = schema; export function useDB() { return queryClient; } + +export * from '@getlicensed/db'; diff --git a/apps/web/drizzle.config.ts b/internal/db/drizzle.config.ts similarity index 50% rename from apps/web/drizzle.config.ts rename to internal/db/drizzle.config.ts index 3a874bb..71e6b45 100644 --- a/apps/web/drizzle.config.ts +++ b/internal/db/drizzle.config.ts @@ -1,6 +1,7 @@ import type { Config } from 'drizzle-kit'; export default { - schema: './server/database/schema.ts', - out: './server/database/migrations', + verbose: true, + schema: './src/schema.ts', + out: './src/migrations', } satisfies Config; diff --git a/internal/db/package.json b/internal/db/package.json new file mode 100644 index 0000000..d44a143 --- /dev/null +++ b/internal/db/package.json @@ -0,0 +1,28 @@ +{ + "name": "@getlicensed/db", + "version": "0.0.0", + "description": "", + "main": "./src/index.ts", + "types": "./src/index.ts", + "keywords": [], + "author": "Maxence Maireaux", + "license": "AGPL-3.0", + "scripts": { + "studio": "dotenv -e .env drizzle-kit studio ", + "db:generate": "drizzle-kit generate:pg", + "db:migrate": "tsx src/migrate.ts" + }, + "devDependencies": { + "@types/node": "^20.12.7", + "dotenv-cli": "^7.4.1", + "drizzle-kit": "^0.20.17", + "drizzle-orm": "^0.30.9", + "pg": "^8.11.5", + "ts-node": "^10.9.2", + "tsx": "^4.7.2", + "typescript": "^5.4.5" + }, + "dependencies": { + "@neondatabase/serverless": "^0.9.1" + } +} \ No newline at end of file diff --git a/apps/web/server/database/db.ts b/internal/db/src/index.ts similarity index 64% rename from apps/web/server/database/db.ts rename to internal/db/src/index.ts index e671fe0..94993ef 100644 --- a/apps/web/server/database/db.ts +++ b/internal/db/src/index.ts @@ -9,6 +9,11 @@ import { migrate as migrateNode } from 'drizzle-orm/node-postgres/migrator'; // @ts-ignore import pg from 'pg'; +export * from './types'; +import * as schema from './schema'; +export { schema }; +export * from 'drizzle-orm'; + const DATABASE_URL = process.env.DATABASE_URL; if (!DATABASE_URL) { @@ -24,23 +29,23 @@ export async function dbMigrate() { if (process.env.ENVIRONMENT === 'local') // @ts-ignore await migrateNode(queryClient, { - migrationsFolder: 'server/database/migrations', + migrationsFolder: 'src/migrations', }); // @ts-ignore else await migrateHttp(queryClient, { - migrationsFolder: 'server/database/migrations', + migrationsFolder: 'src/migrations', }); } -// console.log('DATABASE_URL', DATABASE_URL); -// console.log('ENVIRONMENT', process.env.ENVIRONMENT); -// if (process.env.ENVIRONMENT === 'local') { -// console.log('Running in local environment'); -// neonConfig.pipelineConnect = false; -// neonConfig.pipelineTLS = false; -// neonConfig.useSecureWebSocket = false; -// neonConfig.wsProxy = () => "127.0.0.1:5433"; -// } -// -// export const queryClient = neon(DATABASE_URL); +export const runMigrate = async () => { + console.log('Running database migrations...'); + + await dbMigrate() + .then(() => { + console.log('Database migrations done'); + }) + .catch((err) => { + console.error('Database migrations failed', err); + }); +}; diff --git a/internal/db/src/migrate.ts b/internal/db/src/migrate.ts new file mode 100644 index 0000000..d4aee62 --- /dev/null +++ b/internal/db/src/migrate.ts @@ -0,0 +1,9 @@ +import { runMigrate } from './index'; + +runMigrate() + .then(() => { + console.log('Database migrations fully done'); + }) + .catch((err) => { + console.error('Database migrations failed', err); + }); diff --git a/apps/web/server/database/migrations/0000_brave_rocket_racer.sql b/internal/db/src/migrations/0000_brave_rocket_racer.sql similarity index 100% rename from apps/web/server/database/migrations/0000_brave_rocket_racer.sql rename to internal/db/src/migrations/0000_brave_rocket_racer.sql diff --git a/apps/web/server/database/migrations/0001_remarkable_stature.sql b/internal/db/src/migrations/0001_remarkable_stature.sql similarity index 100% rename from apps/web/server/database/migrations/0001_remarkable_stature.sql rename to internal/db/src/migrations/0001_remarkable_stature.sql diff --git a/apps/web/server/database/migrations/0002_next_thor.sql b/internal/db/src/migrations/0002_next_thor.sql similarity index 100% rename from apps/web/server/database/migrations/0002_next_thor.sql rename to internal/db/src/migrations/0002_next_thor.sql diff --git a/apps/web/server/database/migrations/meta/0000_snapshot.json b/internal/db/src/migrations/meta/0000_snapshot.json similarity index 100% rename from apps/web/server/database/migrations/meta/0000_snapshot.json rename to internal/db/src/migrations/meta/0000_snapshot.json diff --git a/apps/web/server/database/migrations/meta/0001_snapshot.json b/internal/db/src/migrations/meta/0001_snapshot.json similarity index 100% rename from apps/web/server/database/migrations/meta/0001_snapshot.json rename to internal/db/src/migrations/meta/0001_snapshot.json diff --git a/apps/web/server/database/migrations/meta/0002_snapshot.json b/internal/db/src/migrations/meta/0002_snapshot.json similarity index 100% rename from apps/web/server/database/migrations/meta/0002_snapshot.json rename to internal/db/src/migrations/meta/0002_snapshot.json diff --git a/apps/web/server/database/migrations/meta/_journal.json b/internal/db/src/migrations/meta/_journal.json similarity index 100% rename from apps/web/server/database/migrations/meta/_journal.json rename to internal/db/src/migrations/meta/_journal.json diff --git a/apps/web/server/database/schema.ts b/internal/db/src/schema.ts similarity index 100% rename from apps/web/server/database/schema.ts rename to internal/db/src/schema.ts diff --git a/internal/db/src/types.ts b/internal/db/src/types.ts new file mode 100644 index 0000000..954ab62 --- /dev/null +++ b/internal/db/src/types.ts @@ -0,0 +1,5 @@ +import type { InferSelectModel } from 'drizzle-orm'; +import type * as schema from './schema'; + +export type Users = InferSelectModel; +export type Tokens = InferSelectModel; diff --git a/internal/db/tsconfig.json b/internal/db/tsconfig.json new file mode 100644 index 0000000..1647d5e --- /dev/null +++ b/internal/db/tsconfig.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "exclude": ["dist"], + "compilerOptions": { + "outDir": "dist" + } +} \ No newline at end of file diff --git a/package.json b/package.json index f6a891f..9213bc7 100644 --- a/package.json +++ b/package.json @@ -3,12 +3,13 @@ "private": true, "license": "AGPL-3.0", "version": "0.0.0", - "workspaces": ["apps/*", "packages/*"], + "workspaces": ["apps/*", "packages/*", "internal/*"], "author": "Maxence Maireaux", "scripts": { "prepare": "husky", "build": "dotenv -e .env -- turbo build", - "dev": "dotenv -e .env -- turbo dev", + "dev": "dotenv -e .env -- pnpm run db:migrate && dotenv -e .env -- turbo dev", + "db:migrate": "dotenv -e .env -- turbo db:migrate --filter './internal/db'", "fmt": "biome format . --write && biome check . --apply", "bump-versions": "pnpm changeset version && pnpm install" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c288b2f..29439d5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -41,15 +41,15 @@ importers: apps/web: dependencies: + '@getlicensed/db': + specifier: workspace:^ + version: link:../../internal/db '@headlessui/vue': specifier: ^1.7.20 version: 1.7.21(vue@3.4.25) '@heroicons/vue': specifier: ^2.1.3 version: 2.1.3(vue@3.4.25) - '@neondatabase/serverless': - specifier: ^0.9.1 - version: 0.9.1 '@nuxt/ui': specifier: ^2.15.2 version: 2.15.2(nuxt@3.11.2)(ts-node@10.9.2)(vite@5.2.10)(vue@3.4.25) @@ -70,7 +70,7 @@ importers: version: 10.45.2 drizzle-orm: specifier: ^0.30.9 - version: 0.30.9(@cloudflare/workers-types@4.20240423.0)(@neondatabase/serverless@0.9.1)(pg@8.11.5) + version: 0.30.9(@cloudflare/workers-types@4.20240423.0) h3-zod: specifier: ^0.5.3 version: 0.5.3(h3@1.11.1)(zod@3.23.4) @@ -108,15 +108,9 @@ importers: dotenv: specifier: ^16.4.5 version: 16.4.5 - drizzle-kit: - specifier: ^0.20.17 - version: 0.20.17 nitro-cloudflare-dev: specifier: ^0.1.4 version: 0.1.4 - pg: - specifier: ^8.11.5 - version: 8.11.5 ts-node: specifier: ^10.9.2 version: 10.9.2(@types/node@20.12.7)(typescript@5.4.5) @@ -130,6 +124,37 @@ importers: specifier: ^3.51.2 version: 3.52.0(@cloudflare/workers-types@4.20240423.0) + internal/db: + dependencies: + '@neondatabase/serverless': + specifier: ^0.9.1 + version: 0.9.1 + devDependencies: + '@types/node': + specifier: ^20.12.7 + version: 20.12.7 + dotenv-cli: + specifier: ^7.4.1 + version: 7.4.1 + drizzle-kit: + specifier: ^0.20.17 + version: 0.20.17 + drizzle-orm: + specifier: ^0.30.9 + version: 0.30.9(@neondatabase/serverless@0.9.1)(pg@8.11.5) + pg: + specifier: ^8.11.5 + version: 8.11.5 + ts-node: + specifier: ^10.9.2 + version: 10.9.2(@types/node@20.12.7)(typescript@5.4.5) + tsx: + specifier: ^4.7.2 + version: 4.7.3 + typescript: + specifier: ^5.4.5 + version: 5.4.5 + packages: /@alloc/quick-lru@5.2.0: @@ -2706,7 +2731,6 @@ packages: resolution: {integrity: sha512-Xi+tVIXuaeB24BHzhr0W/4vcbb9WwIaB6yK0RsMIteLtzNB86+am6EDFovd3rYCYM1ea7rWcwte2dLOrzW7eqA==} dependencies: '@types/pg': 8.6.6 - dev: false /@netlify/functions@2.6.0: resolution: {integrity: sha512-vU20tij0fb4nRGACqb+5SQvKd50JYyTyEhQetCMHdakcJFzjLDivvRR16u1G2Oy4A7xNAtGJF1uz8reeOtTVcQ==} @@ -4053,7 +4077,6 @@ packages: '@types/node': 20.12.7 pg-protocol: 1.6.1 pg-types: 2.2.0 - dev: false /@types/prismjs@1.26.3: resolution: {integrity: sha512-A0D0aTXvjlqJ5ZILMz3rNfDBOx9hHxLZYv2by47Sm/pqW35zzjusrZTryatjN/Rf8Us2gZrJD+KeHbUSTux1Cw==} @@ -6142,7 +6165,7 @@ packages: drizzle-orm: optional: true dependencies: - drizzle-orm: 0.30.9(@cloudflare/workers-types@4.20240423.0)(@neondatabase/serverless@0.9.1)(pg@8.11.5) + drizzle-orm: 0.30.9(@cloudflare/workers-types@4.20240423.0) dev: false /debug@2.6.9: @@ -6479,7 +6502,7 @@ packages: - supports-color dev: true - /drizzle-orm@0.30.9(@cloudflare/workers-types@4.20240423.0)(@neondatabase/serverless@0.9.1)(pg@8.11.5): + /drizzle-orm@0.30.9(@cloudflare/workers-types@4.20240423.0): resolution: {integrity: sha512-VOiCFsexErmgqvNCOmbzmqDCZzZsHoz6SkWAjTFxsTr1AllKDbDJ2+GgedLXsXMDgpg/ljDG1zItIFeZtiO2LA==} peerDependencies: '@aws-sdk/client-rds-data': '>=3' @@ -6560,9 +6583,91 @@ packages: optional: true dependencies: '@cloudflare/workers-types': 4.20240423.0 + dev: false + + /drizzle-orm@0.30.9(@neondatabase/serverless@0.9.1)(pg@8.11.5): + resolution: {integrity: sha512-VOiCFsexErmgqvNCOmbzmqDCZzZsHoz6SkWAjTFxsTr1AllKDbDJ2+GgedLXsXMDgpg/ljDG1zItIFeZtiO2LA==} + peerDependencies: + '@aws-sdk/client-rds-data': '>=3' + '@cloudflare/workers-types': '>=3' + '@electric-sql/pglite': '>=0.1.1' + '@libsql/client': '*' + '@neondatabase/serverless': '>=0.1' + '@op-engineering/op-sqlite': '>=2' + '@opentelemetry/api': ^1.4.1 + '@planetscale/database': '>=1' + '@types/better-sqlite3': '*' + '@types/pg': '*' + '@types/react': '>=18' + '@types/sql.js': '*' + '@vercel/postgres': '>=0.8.0' + '@xata.io/client': '*' + better-sqlite3: '>=7' + bun-types: '*' + expo-sqlite: '>=13.2.0' + knex: '*' + kysely: '*' + mysql2: '>=2' + pg: '>=8' + postgres: '>=3' + react: '>=18' + sql.js: '>=1' + sqlite3: '>=5' + peerDependenciesMeta: + '@aws-sdk/client-rds-data': + optional: true + '@cloudflare/workers-types': + optional: true + '@electric-sql/pglite': + optional: true + '@libsql/client': + optional: true + '@neondatabase/serverless': + optional: true + '@op-engineering/op-sqlite': + optional: true + '@opentelemetry/api': + optional: true + '@planetscale/database': + optional: true + '@types/better-sqlite3': + optional: true + '@types/pg': + optional: true + '@types/react': + optional: true + '@types/sql.js': + optional: true + '@vercel/postgres': + optional: true + '@xata.io/client': + optional: true + better-sqlite3: + optional: true + bun-types: + optional: true + expo-sqlite: + optional: true + knex: + optional: true + kysely: + optional: true + mysql2: + optional: true + pg: + optional: true + postgres: + optional: true + react: + optional: true + sql.js: + optional: true + sqlite3: + optional: true + dependencies: '@neondatabase/serverless': 0.9.1 pg: 8.11.5 - dev: false + dev: true /duplexer@0.1.2: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} @@ -11090,10 +11195,12 @@ packages: /pg-cloudflare@1.1.1: resolution: {integrity: sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==} requiresBuild: true + dev: true optional: true /pg-connection-string@2.6.4: resolution: {integrity: sha512-v+Z7W/0EO707aNMaAEfiGnGL9sxxumwLl2fJvCQtMn9Fxsg+lPpPkdcyBSv/KFgpGdYkMfn+EI1Or2EHjpgLCA==} + dev: true /pg-int8@1.0.1: resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==} @@ -11105,6 +11212,7 @@ packages: pg: '>=8.0' dependencies: pg: 8.11.5 + dev: true /pg-protocol@1.6.1: resolution: {integrity: sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg==} @@ -11135,11 +11243,13 @@ packages: pgpass: 1.0.5 optionalDependencies: pg-cloudflare: 1.1.1 + dev: true /pgpass@1.0.5: resolution: {integrity: sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==} dependencies: split2: 4.2.0 + dev: true /picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} @@ -12669,6 +12779,7 @@ packages: /split2@4.2.0: resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} engines: {node: '>= 10.x'} + dev: true /splitpanes@3.1.5: resolution: {integrity: sha512-r3Mq2ITFQ5a2VXLOy4/Sb2Ptp7OfEO8YIbhVJqJXoFc9hc5nTXXkCvtVDjIGbvC0vdE7tse+xTM9BMjsszP6bw==} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 3ff5faa..e820acd 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,3 +1,4 @@ packages: - "apps/*" - "packages/*" + - "internal/*" diff --git a/turbo.json b/turbo.json index c145618..ad34aa6 100644 --- a/turbo.json +++ b/turbo.json @@ -20,6 +20,9 @@ "dev": { "cache": false, "persistent": true + }, + "db:migrate": { + "cache": false } } }