Skip to content

Commit 74b22f1

Browse files
committed
feat: turborepo with deploy package
1 parent 9f7f6d6 commit 74b22f1

File tree

166 files changed

+1543
-159
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+1543
-159
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ tls/
4141
dist/
4242

4343
.env
44+
.turbo

README.md

+57-2

apps/browser-proxy/README.md

+3-11

apps/deploy-worker/README.md

+6-7

apps/deploy-worker/package.json

+4-5
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,23 @@
33
"type": "module",
44
"scripts": {
55
"start": "node --env-file=.env --experimental-strip-types src/index.ts",
6-
"dev": "node --watch --env-file=.env --experimental-strip-types src/index.ts",
6+
"dev": "npm run start",
77
"type-check": "tsc",
8-
"generate:database-types": "npx supabase gen types --lang=typescript --local > src/supabase/database-types.ts",
9-
"generate:management-api-types": "npx openapi-typescript https://api.supabase.com/api/v1-json -o ./src/supabase/management-api/types.ts"
8+
"generate:database-types": "npx supabase gen types --lang=typescript --local > ./supabase/database-types.ts",
9+
"generate:management-api-types": "npx openapi-typescript https://api.supabase.com/api/v1-json -o ./supabase/management-api/types.ts"
1010
},
1111
"dependencies": {
12+
"@database.build/deploy": "*",
1213
"@hono/node-server": "^1.13.2",
1314
"@hono/zod-validator": "^0.4.1",
1415
"@supabase/supabase-js": "^2.45.4",
15-
"debug": "^4.3.7",
1616
"hono": "^4.6.5",
1717
"neverthrow": "^8.0.0",
1818
"openapi-fetch": "^0.13.0",
1919
"zod": "^3.23.8"
2020
},
2121
"devDependencies": {
2222
"@total-typescript/tsconfig": "^1.0.4",
23-
"@types/debug": "^4.1.12",
2423
"@types/node": "^22.5.4",
2524
"openapi-typescript": "^7.4.2",
2625
"typescript": "^5.5.4"

apps/deploy-worker/src/debug.ts

-3
This file was deleted.

apps/deploy-worker/src/index.ts

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
import { DeployError, IntegrationRevokedError } from '@database.build/deploy'
2+
import { createClient } from '@database.build/deploy/supabase'
3+
import { deploy } from '@database.build/deploy/supabase'
4+
import { revokeIntegration } from '@database.build/deploy/supabase'
15
import { serve } from '@hono/node-server'
6+
import { zValidator } from '@hono/zod-validator'
27
import { Hono } from 'hono'
38
import { cors } from 'hono/cors'
4-
import { z } from 'zod'
5-
import { zValidator } from '@hono/zod-validator'
6-
import { createClient } from './supabase/client.ts'
79
import { HTTPException } from 'hono/http-exception'
8-
import { deploy } from './supabase/deploy.ts'
9-
import { DeployError, IntegrationRevokedError } from './error.ts'
10-
import { revokeIntegration } from './supabase/revoke-integration.ts'
10+
import { z } from 'zod'
1111

1212
const app = new Hono()
1313

@@ -60,6 +60,8 @@ app.post(
6060
}
6161
)
6262

63+
app.get('')
64+
6365
const port = 4000
6466
console.log(`Server is running on port ${port}`)
6567

apps/deploy-worker/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"include": ["src/**/*.ts"],
44
"compilerOptions": {
55
"noEmit": true,
6-
"allowImportingTsExtensions": true,
76
"outDir": "dist"
87
}
98
}

apps/postgres-new/.env.example renamed to apps/web/.env.example

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
NEXT_PUBLIC_SUPABASE_ANON_KEY="<supabase-anon-key>"
22
NEXT_PUBLIC_SUPABASE_URL="<supabase-api-url>"
3-
NEXT_PUBLIC_BROWSER_PROXY_DOMAIN="<browser-proxy-domain>"
4-
NEXT_PUBLIC_DEPLOY_WORKER_DOMAIN="<deploy-worker-domain>"
3+
NEXT_PUBLIC_BROWSER_PROXY_DOMAIN="browser.dev.db.build"
4+
NEXT_PUBLIC_DEPLOY_WORKER_DOMAIN="http://localhost:4000"
55
NEXT_PUBLIC_SUPABASE_OAUTH_CLIENT_ID="<supabase-oauth-client-id>"
66
NEXT_PUBLIC_SUPABASE_PLATFORM_API_URL=https://api.supabase.com
77

apps/postgres-new/README.md renamed to apps/web/README.md

+1-36
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { NextRequest } from 'next/server'
2+
import { createClient } from '~/utils/supabase/server'
3+
4+
export async function GET(req: NextRequest) {
5+
const supabase = createClient()
6+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

apps/postgres-new/package.json renamed to apps/web/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
{
2-
"name": "postgres-new",
2+
"name": "@database.build/web",
33
"version": "0.0.0",
44
"private": true,
55
"scripts": {
66
"dev": "next dev",
77
"build": "next build",
88
"start": "next start",
99
"lint": "next lint",
10+
"check-types": "tsc --noEmit",
1011
"generate:database-types": "supabase gen types --lang=typescript --local > utils/supabase/db-types.ts"
1112
},
1213
"dependencies": {
1314
"@ai-sdk/openai": "^0.0.21",
1415
"@dagrejs/dagre": "^1.1.2",
16+
"@database.build/deploy": "*",
1517
"@electric-sql/pglite": "^0.2.9",
1618
"@gregnr/postgres-meta": "^0.82.0-dev.2",
1719
"@monaco-editor/react": "^4.6.0",
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)