This commit is contained in:
bkellam 2025-10-02 22:33:54 -07:00
parent c10010eb99
commit 11553714fd
14 changed files with 153 additions and 20 deletions

10
.gitignore vendored
View file

@ -1,5 +1,5 @@
# Created by https://www.toptal.com/developers/gitignore/api/yarn,node
# Edit at https://www.toptal.com/developers/gitignore?templates=yarn,node
# Created by https://www.toptal.com/developers/gitignore/api/node,yarn,turbo
# Edit at https://www.toptal.com/developers/gitignore?templates=node,yarn,turbo
### Node ###
# Logs
@ -141,6 +141,10 @@ dist
# SvelteKit build / generate output
.svelte-kit
### Turbo ###
# Turborepo task cache
.turbo
### yarn ###
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
@ -158,7 +162,7 @@ dist
# and uncomment the following lines
.pnp.*
# End of https://www.toptal.com/developers/gitignore/api/yarn,node
# End of https://www.toptal.com/developers/gitignore/api/node,yarn,turbo
.sourcebot
/bin

View file

@ -20,22 +20,34 @@ clean:
rm -rf \
bin \
node_modules \
.turbo \
packages/web/.turbo \
packages/web/node_modules \
packages/web/.next \
packages/backend/.turbo \
packages/backend/dist \
packages/backend/node_modules \
packages/db/.turbo \
packages/db/node_modules \
packages/db/dist \
packages/schemas/.turbo \
packages/schemas/node_modules \
packages/schemas/dist \
packages/crypto/.turbo \
packages/crypto/node_modules \
packages/crypto/dist \
packages/error/node_modules \
packages/error/dist \
packages/mcp/.turbo \
packages/mcp/node_modules \
packages/mcp/dist \
packages/shared/.turbo \
packages/shared/node_modules \
packages/shared/dist \
packages/zoekt/.turbo \
packages/zoekt/node_modules \
packages/zoekt/dist \
packages/zoekt/bin \
.sourcebot
soft-reset:

View file

@ -4,15 +4,10 @@
"packages/*"
],
"scripts": {
"build": "cross-env SKIP_ENV_VALIDATION=1 yarn workspaces foreach -A run build",
"build": "turbo build",
"test": "yarn workspaces foreach -A run test",
"dev": "yarn dev:prisma:migrate:dev && npm-run-all --print-label --parallel dev:zoekt dev:backend dev:web watch:mcp watch:schemas",
"with-env": "cross-env PATH=\"$PWD/bin:$PATH\" dotenv -e .env.development -c --",
"dev:zoekt": "yarn with-env zoekt-webserver -index .sourcebot/index -rpc",
"dev:backend": "yarn with-env yarn workspace @sourcebot/backend dev:watch",
"dev:web": "yarn with-env yarn workspace @sourcebot/web dev",
"watch:mcp": "yarn workspace @sourcebot/mcp build:watch",
"watch:schemas": "yarn workspace @sourcebot/schemas watch",
"dev": "yarn with-env turbo dev zoekt:webserver",
"with-env": "cross-env PATH=\"$PROJECT_CWD/packages/zoekt/bin:$PATH\" dotenv -e .env.development -c --",
"dev:prisma:migrate:dev": "yarn with-env yarn workspace @sourcebot/db prisma:migrate:dev",
"dev:prisma:generate": "yarn with-env yarn workspace @sourcebot/db prisma:generate",
"dev:prisma:studio": "yarn with-env yarn workspace @sourcebot/db prisma:studio",
@ -23,7 +18,8 @@
"devDependencies": {
"cross-env": "^7.0.3",
"dotenv-cli": "^8.0.0",
"npm-run-all": "^4.1.5"
"npm-run-all": "^4.1.5",
"turbo": "^2.5.8"
},
"packageManager": "yarn@4.7.0",
"resolutions": {

View file

@ -5,9 +5,8 @@
"main": "index.js",
"type": "module",
"scripts": {
"dev:watch": "tsc-watch --preserveWatchOutput --onSuccess \"yarn dev\"",
"dev": "node ./dist/index.js",
"build": "tsc",
"dev": "tsc-watch --preserveWatchOutput --onSuccess \"node ./dist/index.js\"",
"build": "cross-env SKIP_ENV_VALIDATION=1 tsc",
"test": "cross-env SKIP_ENV_VALIDATION=1 vitest --config ./vitest.config.ts"
},
"devDependencies": {

View file

@ -5,6 +5,7 @@
"private": true,
"scripts": {
"build": "tsc",
"dev": "tsc --watch",
"postinstall": "yarn build"
},
"dependencies": {

View file

@ -5,6 +5,7 @@
"private": true,
"scripts": {
"build": "yarn prisma:generate && tsc",
"dev": "yarn prisma:generate && tsc --watch",
"postinstall": "yarn build",
"prisma:generate": "prisma generate",
"prisma:generate:watch": "prisma generate --watch",

View file

@ -5,7 +5,8 @@
"type": "module",
"private": true,
"scripts": {
"build": "tsc",
"build": "cross-env SKIP_ENV_VALIDATION=1 tsc",
"dev": "cross-env SKIP_ENV_VALIDATION=1 tsc --watch",
"postinstall": "yarn build"
},
"dependencies": {

View file

@ -6,8 +6,7 @@
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc",
"dev": "node ./dist/index.js",
"build:watch": "tsc-watch --preserveWatchOutput"
"dev": "tsc-watch --preserveWatchOutput"
},
"devDependencies": {
"@types/express": "^5.0.1",

View file

@ -4,8 +4,10 @@
"private": true,
"scripts": {
"build": "yarn generate && tsc",
"dev": "npm-run-all --parallel generate:watch tsc:watch",
"tsc:watch": "tsc --watch",
"generate": "tsx tools/generate.ts",
"watch": "nodemon --watch ../../schemas -e json -x 'yarn generate'",
"generate:watch": "nodemon --watch ../../schemas -e json -x 'yarn generate'",
"postinstall": "yarn build"
},
"devDependencies": {
@ -13,6 +15,7 @@
"glob": "^11.0.1",
"json-schema-to-typescript": "^15.0.4",
"nodemon": "^3.1.10",
"npm-run-all": "^4.1.5",
"tsx": "^4.19.2",
"typescript": "^5.7.3"
},

View file

@ -4,8 +4,9 @@
"type": "module",
"private": true,
"scripts": {
"build": "tsc",
"build": "cross-env SKIP_ENV_VALIDATION=1 tsc",
"build:watch": "tsc-watch --preserveWatchOutput",
"dev": "tsc-watch --preserveWatchOutput",
"postinstall": "yarn build"
},
"dependencies": {
@ -22,6 +23,7 @@
"devDependencies": {
"@types/micromatch": "^4.0.9",
"@types/node": "^22.7.5",
"cross-env": "^7.0.3",
"tsc-watch": "6.2.1",
"typescript": "^5.7.3"
},

1
packages/zoekt/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/bin

View file

@ -0,0 +1,8 @@
{
"private": true,
"name": "zoekt",
"scripts": {
"build": "mkdir -p $PROJECT_CWD/packages/zoekt/bin/ && go build -C $PROJECT_CWD/vendor/zoekt -o $PROJECT_CWD/packages/zoekt/bin/ ./cmd/...",
"zoekt:webserver": "yarn build && ./bin/zoekt-webserver -index $PROJECT_CWD/.sourcebot/index -rpc"
}
}

26
turbo.json Normal file
View file

@ -0,0 +1,26 @@
{
"$schema": "https://turborepo.com/schema.json",
"ui": "tui",
"tasks": {
"build": {
"dependsOn": [
"^build"
],
"outputs": [
".next/**",
"!.next/cache/**",
"dist/**",
"bin/**"
]
},
"zoekt:webserver": {
"persistent": true,
"cache": false
},
"dev": {
"persistent": true,
"cache": false
}
},
"envMode": "loose"
}

View file

@ -7680,6 +7680,7 @@ __metadata:
glob: "npm:^11.0.1"
json-schema-to-typescript: "npm:^15.0.4"
nodemon: "npm:^3.1.10"
npm-run-all: "npm:^4.1.5"
tsx: "npm:^4.19.2"
typescript: "npm:^5.7.3"
languageName: unknown
@ -7697,6 +7698,7 @@ __metadata:
"@types/micromatch": "npm:^4.0.9"
"@types/node": "npm:^22.7.5"
ajv: "npm:^8.17.1"
cross-env: "npm:^7.0.3"
micromatch: "npm:^4.0.8"
strip-json-comments: "npm:^5.0.1"
tsc-watch: "npm:6.2.1"
@ -17837,6 +17839,7 @@ __metadata:
cross-env: "npm:^7.0.3"
dotenv-cli: "npm:^8.0.0"
npm-run-all: "npm:^4.1.5"
turbo: "npm:^2.5.8"
languageName: unknown
linkType: soft
@ -19478,6 +19481,77 @@ __metadata:
languageName: node
linkType: hard
"turbo-darwin-64@npm:2.5.8":
version: 2.5.8
resolution: "turbo-darwin-64@npm:2.5.8"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard
"turbo-darwin-arm64@npm:2.5.8":
version: 2.5.8
resolution: "turbo-darwin-arm64@npm:2.5.8"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard
"turbo-linux-64@npm:2.5.8":
version: 2.5.8
resolution: "turbo-linux-64@npm:2.5.8"
conditions: os=linux & cpu=x64
languageName: node
linkType: hard
"turbo-linux-arm64@npm:2.5.8":
version: 2.5.8
resolution: "turbo-linux-arm64@npm:2.5.8"
conditions: os=linux & cpu=arm64
languageName: node
linkType: hard
"turbo-windows-64@npm:2.5.8":
version: 2.5.8
resolution: "turbo-windows-64@npm:2.5.8"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
"turbo-windows-arm64@npm:2.5.8":
version: 2.5.8
resolution: "turbo-windows-arm64@npm:2.5.8"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard
"turbo@npm:^2.5.8":
version: 2.5.8
resolution: "turbo@npm:2.5.8"
dependencies:
turbo-darwin-64: "npm:2.5.8"
turbo-darwin-arm64: "npm:2.5.8"
turbo-linux-64: "npm:2.5.8"
turbo-linux-arm64: "npm:2.5.8"
turbo-windows-64: "npm:2.5.8"
turbo-windows-arm64: "npm:2.5.8"
dependenciesMeta:
turbo-darwin-64:
optional: true
turbo-darwin-arm64:
optional: true
turbo-linux-64:
optional: true
turbo-linux-arm64:
optional: true
turbo-windows-64:
optional: true
turbo-windows-arm64:
optional: true
bin:
turbo: bin/turbo
checksum: 10c0/34e8dc87fc2c5d63c3cd5aede9068c1123509d88f9bb99283ffec1687de6ad6df7ebfb83a5d348580afb3fdac53af479456e36938a1b6ed80fc1c3416c6dc3f3
languageName: node
linkType: hard
"type-check@npm:^0.4.0, type-check@npm:~0.4.0":
version: 0.4.0
resolution: "type-check@npm:0.4.0"
@ -20537,6 +20611,12 @@ __metadata:
languageName: node
linkType: hard
"zoekt@workspace:packages/zoekt":
version: 0.0.0-use.local
resolution: "zoekt@workspace:packages/zoekt"
languageName: unknown
linkType: soft
"zwitch@npm:^2.0.0, zwitch@npm:^2.0.4":
version: 2.0.4
resolution: "zwitch@npm:2.0.4"