Merge pull request #1069 from buster-so/nate/start-commands

Add turbo start commands
This commit is contained in:
Nate Kelley 2025-09-23 11:18:48 -06:00 committed by GitHub
commit 0fd7ef7d53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
39 changed files with 111 additions and 29 deletions

View File

@ -1,3 +1,6 @@
build:
cargo build --release --bin buster_server
dev:
docker stop buster-redis-make || true && \
docker rm buster-redis-make || true && \
@ -22,6 +25,15 @@ update-seed:
--exclude-table=users \
> libs/database/seed.sql
start:
@PID=$$(lsof -ti:3001); \
if [ -n "$$PID" ]; then \
echo "Killing process on port 3001 (PID: $$PID)"; \
kill -9 $$PID; \
sleep 1; \
fi; \
./target/release/buster_server
stop:
docker stop buster-redis-make || true && \
docker rm buster-redis-make || true && \

View File

@ -4,8 +4,10 @@
"description": "Legacy API for Buster. This package.json is just used to make the build and dev work.",
"type": "module",
"scripts": {
"build": "make build",
"dev": "make fast-no-migrations",
"dev:fast": "make fast-no-migrations"
"dev:fast": "make fast-no-migrations",
"start": "make start"
},
"dependencies": {
"@buster/database": "workspace:*"

View File

@ -2,14 +2,31 @@
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["@buster/database#build"],
"outputs": ["target/release/**"],
"inputs": [
"server/**/*",
"libs/**/*",
"Cargo.toml",
"Cargo.lock"
]
},
"start": {
"dependsOn": ["@buster/database#start", "build"],
"cache": true,
"persistent": true
},
"dev": {
"dependsOn": ["@buster/database#start"],
"with": [],
"cache": false,
"persistent": true,
"outputs": []
},
"dev:fast": {
"dependsOn": ["@buster/database#start"],
"with": [],
"cache": false,
"persistent": true,
"outputs": []
}
}

View File

@ -4,14 +4,20 @@
"tasks": {
"start": {
"dependsOn": ["@buster/database#start"],
"cache": true,
"persistent": false,
"outputs": []
},
"dev": {
"dependsOn": ["@buster/database#start"],
"cache": false,
"persistent": true,
"outputs": []
},
"dev:fast": {
"dependsOn": ["@buster/database#start"],
"cache": false,
"persistent": true,
"outputs": []
}
}

View File

@ -6,6 +6,11 @@
"dependsOn": ["^build"],
"outputs": ["dist/**"]
},
"start": {
"dependsOn": ["@buster/database#start", "build"],
"cache": true,
"persistent": true
},
"dev": {
"cache": false,
"persistent": true,

View File

@ -0,0 +1,13 @@
{
"name": "@buster-app/supabase",
"version": "0.0.1",
"private": false,
"dependencies": {
"@buster/database": "workspace:*"
},
"scripts": {
"lint": "biome check . --write",
"lint:fix": "biome check . --write",
"start": "echo 'Please run this command through Turbo from the root: turbo start'"
}
}

15
apps/supabase/turbo.json Normal file
View File

@ -0,0 +1,15 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"tasks": {
"build": {
"outputs": []
},
"start": {
"dependsOn": ["@buster/database#start"],
"cache": false,
"persistent": false,
"outputs": []
}
}
}

View File

@ -29,6 +29,7 @@
"@buster/search": "workspace:*",
"@buster/server-shared": "workspace:*",
"@buster/slack": "workspace:*",
"@buster-app/supabase": "workspace:*",
"@buster/test-utils": "workspace:*",
"@buster/typescript-config": "workspace:*",
"@buster/vitest-config": "workspace:*",

View File

@ -2,17 +2,27 @@
"extends": ["//"],
"$schema": "https://turbo.build/schema.json",
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": []
},
"start": {
"cache": false,
"persistent": true,
"dependsOn": ["^build"],
"with": ["@buster-app/supabase#start"]
},
"dev": {
"cache": false,
"persistent": true,
"dependsOn": ["^build"],
"with": ["@buster/database#dev"]
"with": ["@buster-app/supabase#start"]
},
"dev:fast": {
"cache": false,
"persistent": true,
"dependsOn": ["^build"],
"with": ["@buster/database#dev"]
"with": ["@buster-app/supabase#start"]
}
}
}

View File

@ -5,7 +5,8 @@
"version": "0.0.4",
"scripts": {
"prebuild": "tsx scripts/validate-env.ts",
"build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build -- --typecheck",
"build:vercel": "pnpm prebuild && cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build -- --typecheck",
"build": "pnpm build:local",
"build:staging": "cross-env NODE_OPTIONS=--max-old-space-size=8192 pnpm run prebuild && vite build --mode staging -- --typecheck",
"build:production": "cross-env NODE_OPTIONS=--max-old-space-size=8192 pnpm run prebuild && vite build --mode production -- --typecheck",
"build:local": "pnpm prebuild && cross-env NODE_OPTIONS=--max-old-space-size=12288 vite build -- --typecheck --local",
@ -16,8 +17,8 @@
"generate-routes": "tsr generate",
"lint": "biome check --write",
"serve": "vite preview",
"start": "echo 'For Vercel deployment, no start command is needed. Use start:local for local builds'",
"start:local": "bun .output/server/index.mjs",
"start": "pnpm start:local",
"start:local": "bun ./.output/server/index.mjs",
"storybook": "storybook dev -p 6006",
"test": "vitest run",
"test:ui": "vitest --ui",

View File

@ -16,6 +16,11 @@
],
"outputs": [".output/**", ".vercel/**"]
},
"start": {
"dependsOn": ["build"],
"cache": true,
"persistent": true
},
"test": {
"inputs": [
"src/**/*",
@ -28,6 +33,8 @@
},
"dev": {
"dependsOn": ["@buster/server-shared#build"],
"cache": false,
"persistent": true,
"inputs": [
"src/**/*",
"!src/**/*.test.{ts,tsx,js,jsx}",
@ -40,6 +47,8 @@
},
"dev:fast": {
"dependsOn": ["@buster/server-shared#build"],
"cache": false,
"persistent": true,
"inputs": [
"src/**/*",
"!src/**/*.test.{ts,tsx,js,jsx}",

View File

@ -13,7 +13,8 @@
},
"start": {
"cache": false,
"persistent": false
"persistent": false,
"outputs": []
},
"db:reset": {
"cache": false,

View File

@ -1,9 +0,0 @@
{
"name": "@buster/supabase",
"version": "0.0.1",
"private": false,
"scripts": {
"lint": "biome check . --write",
"lint:fix": "biome check . --write"
}
}

View File

@ -1,9 +0,0 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"tasks": {
"build": {
"outputs": []
}
}
}

View File

@ -329,6 +329,12 @@ importers:
specifier: ^4.17.12
version: 4.17.12
apps/supabase:
dependencies:
'@buster/database':
specifier: workspace:*
version: link:../../packages/database
apps/trigger:
dependencies:
'@aws-sdk/client-s3':
@ -337,6 +343,9 @@ importers:
'@aws-sdk/s3-request-presigner':
specifier: 'catalog:'
version: 3.888.0
'@buster-app/supabase':
specifier: workspace:*
version: link:../supabase
'@buster/access-controls':
specifier: workspace:*
version: link:../../packages/access-controls
@ -1336,8 +1345,6 @@ importers:
specifier: 'catalog:'
version: 4.20.5
packages/supabase: {}
packages/test-utils:
dependencies:
'@buster/database':

View File

@ -7,6 +7,7 @@ packages:
- apps/api
- apps/cli
- apps/web
- apps/supabase
catalog:
'@aws-sdk/client-s3': ^3.888.0