mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 12:25:22 +00:00
feat
This commit is contained in:
parent
c10010eb99
commit
11553714fd
14 changed files with 153 additions and 20 deletions
10
.gitignore
vendored
10
.gitignore
vendored
|
|
@ -1,5 +1,5 @@
|
||||||
# Created by https://www.toptal.com/developers/gitignore/api/yarn,node
|
# Created by https://www.toptal.com/developers/gitignore/api/node,yarn,turbo
|
||||||
# Edit at https://www.toptal.com/developers/gitignore?templates=yarn,node
|
# Edit at https://www.toptal.com/developers/gitignore?templates=node,yarn,turbo
|
||||||
|
|
||||||
### Node ###
|
### Node ###
|
||||||
# Logs
|
# Logs
|
||||||
|
|
@ -141,6 +141,10 @@ dist
|
||||||
# SvelteKit build / generate output
|
# SvelteKit build / generate output
|
||||||
.svelte-kit
|
.svelte-kit
|
||||||
|
|
||||||
|
### Turbo ###
|
||||||
|
# Turborepo task cache
|
||||||
|
.turbo
|
||||||
|
|
||||||
### yarn ###
|
### yarn ###
|
||||||
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
|
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
|
||||||
|
|
||||||
|
|
@ -158,7 +162,7 @@ dist
|
||||||
# and uncomment the following lines
|
# and uncomment the following lines
|
||||||
.pnp.*
|
.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
|
.sourcebot
|
||||||
/bin
|
/bin
|
||||||
|
|
|
||||||
12
Makefile
12
Makefile
|
|
@ -20,22 +20,34 @@ clean:
|
||||||
rm -rf \
|
rm -rf \
|
||||||
bin \
|
bin \
|
||||||
node_modules \
|
node_modules \
|
||||||
|
.turbo \
|
||||||
|
packages/web/.turbo \
|
||||||
packages/web/node_modules \
|
packages/web/node_modules \
|
||||||
packages/web/.next \
|
packages/web/.next \
|
||||||
|
packages/backend/.turbo \
|
||||||
packages/backend/dist \
|
packages/backend/dist \
|
||||||
packages/backend/node_modules \
|
packages/backend/node_modules \
|
||||||
|
packages/db/.turbo \
|
||||||
packages/db/node_modules \
|
packages/db/node_modules \
|
||||||
packages/db/dist \
|
packages/db/dist \
|
||||||
|
packages/schemas/.turbo \
|
||||||
packages/schemas/node_modules \
|
packages/schemas/node_modules \
|
||||||
packages/schemas/dist \
|
packages/schemas/dist \
|
||||||
|
packages/crypto/.turbo \
|
||||||
packages/crypto/node_modules \
|
packages/crypto/node_modules \
|
||||||
packages/crypto/dist \
|
packages/crypto/dist \
|
||||||
packages/error/node_modules \
|
packages/error/node_modules \
|
||||||
packages/error/dist \
|
packages/error/dist \
|
||||||
|
packages/mcp/.turbo \
|
||||||
packages/mcp/node_modules \
|
packages/mcp/node_modules \
|
||||||
packages/mcp/dist \
|
packages/mcp/dist \
|
||||||
|
packages/shared/.turbo \
|
||||||
packages/shared/node_modules \
|
packages/shared/node_modules \
|
||||||
packages/shared/dist \
|
packages/shared/dist \
|
||||||
|
packages/zoekt/.turbo \
|
||||||
|
packages/zoekt/node_modules \
|
||||||
|
packages/zoekt/dist \
|
||||||
|
packages/zoekt/bin \
|
||||||
.sourcebot
|
.sourcebot
|
||||||
|
|
||||||
soft-reset:
|
soft-reset:
|
||||||
|
|
|
||||||
14
package.json
14
package.json
|
|
@ -4,15 +4,10 @@
|
||||||
"packages/*"
|
"packages/*"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "cross-env SKIP_ENV_VALIDATION=1 yarn workspaces foreach -A run build",
|
"build": "turbo build",
|
||||||
"test": "yarn workspaces foreach -A run test",
|
"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",
|
"dev": "yarn with-env turbo dev zoekt:webserver",
|
||||||
"with-env": "cross-env PATH=\"$PWD/bin:$PATH\" dotenv -e .env.development -c --",
|
"with-env": "cross-env PATH=\"$PROJECT_CWD/packages/zoekt/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:prisma:migrate:dev": "yarn with-env yarn workspace @sourcebot/db prisma:migrate:dev",
|
"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:generate": "yarn with-env yarn workspace @sourcebot/db prisma:generate",
|
||||||
"dev:prisma:studio": "yarn with-env yarn workspace @sourcebot/db prisma:studio",
|
"dev:prisma:studio": "yarn with-env yarn workspace @sourcebot/db prisma:studio",
|
||||||
|
|
@ -23,7 +18,8 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"dotenv-cli": "^8.0.0",
|
"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",
|
"packageManager": "yarn@4.7.0",
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,8 @@
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev:watch": "tsc-watch --preserveWatchOutput --onSuccess \"yarn dev\"",
|
"dev": "tsc-watch --preserveWatchOutput --onSuccess \"node ./dist/index.js\"",
|
||||||
"dev": "node ./dist/index.js",
|
"build": "cross-env SKIP_ENV_VALIDATION=1 tsc",
|
||||||
"build": "tsc",
|
|
||||||
"test": "cross-env SKIP_ENV_VALIDATION=1 vitest --config ./vitest.config.ts"
|
"test": "cross-env SKIP_ENV_VALIDATION=1 vitest --config ./vitest.config.ts"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
|
"dev": "tsc --watch",
|
||||||
"postinstall": "yarn build"
|
"postinstall": "yarn build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "yarn prisma:generate && tsc",
|
"build": "yarn prisma:generate && tsc",
|
||||||
|
"dev": "yarn prisma:generate && tsc --watch",
|
||||||
"postinstall": "yarn build",
|
"postinstall": "yarn build",
|
||||||
"prisma:generate": "prisma generate",
|
"prisma:generate": "prisma generate",
|
||||||
"prisma:generate:watch": "prisma generate --watch",
|
"prisma:generate:watch": "prisma generate --watch",
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "cross-env SKIP_ENV_VALIDATION=1 tsc",
|
||||||
|
"dev": "cross-env SKIP_ENV_VALIDATION=1 tsc --watch",
|
||||||
"postinstall": "yarn build"
|
"postinstall": "yarn build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,7 @@
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"dev": "node ./dist/index.js",
|
"dev": "tsc-watch --preserveWatchOutput"
|
||||||
"build:watch": "tsc-watch --preserveWatchOutput"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/express": "^5.0.1",
|
"@types/express": "^5.0.1",
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "yarn generate && tsc",
|
"build": "yarn generate && tsc",
|
||||||
|
"dev": "npm-run-all --parallel generate:watch tsc:watch",
|
||||||
|
"tsc:watch": "tsc --watch",
|
||||||
"generate": "tsx tools/generate.ts",
|
"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"
|
"postinstall": "yarn build"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
@ -13,6 +15,7 @@
|
||||||
"glob": "^11.0.1",
|
"glob": "^11.0.1",
|
||||||
"json-schema-to-typescript": "^15.0.4",
|
"json-schema-to-typescript": "^15.0.4",
|
||||||
"nodemon": "^3.1.10",
|
"nodemon": "^3.1.10",
|
||||||
|
"npm-run-all": "^4.1.5",
|
||||||
"tsx": "^4.19.2",
|
"tsx": "^4.19.2",
|
||||||
"typescript": "^5.7.3"
|
"typescript": "^5.7.3"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,9 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "cross-env SKIP_ENV_VALIDATION=1 tsc",
|
||||||
"build:watch": "tsc-watch --preserveWatchOutput",
|
"build:watch": "tsc-watch --preserveWatchOutput",
|
||||||
|
"dev": "tsc-watch --preserveWatchOutput",
|
||||||
"postinstall": "yarn build"
|
"postinstall": "yarn build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
@ -22,6 +23,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/micromatch": "^4.0.9",
|
"@types/micromatch": "^4.0.9",
|
||||||
"@types/node": "^22.7.5",
|
"@types/node": "^22.7.5",
|
||||||
|
"cross-env": "^7.0.3",
|
||||||
"tsc-watch": "6.2.1",
|
"tsc-watch": "6.2.1",
|
||||||
"typescript": "^5.7.3"
|
"typescript": "^5.7.3"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
1
packages/zoekt/.gitignore
vendored
Normal file
1
packages/zoekt/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
/bin
|
||||||
8
packages/zoekt/package.json
Normal file
8
packages/zoekt/package.json
Normal 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
26
turbo.json
Normal 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"
|
||||||
|
}
|
||||||
80
yarn.lock
80
yarn.lock
|
|
@ -7680,6 +7680,7 @@ __metadata:
|
||||||
glob: "npm:^11.0.1"
|
glob: "npm:^11.0.1"
|
||||||
json-schema-to-typescript: "npm:^15.0.4"
|
json-schema-to-typescript: "npm:^15.0.4"
|
||||||
nodemon: "npm:^3.1.10"
|
nodemon: "npm:^3.1.10"
|
||||||
|
npm-run-all: "npm:^4.1.5"
|
||||||
tsx: "npm:^4.19.2"
|
tsx: "npm:^4.19.2"
|
||||||
typescript: "npm:^5.7.3"
|
typescript: "npm:^5.7.3"
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
|
|
@ -7697,6 +7698,7 @@ __metadata:
|
||||||
"@types/micromatch": "npm:^4.0.9"
|
"@types/micromatch": "npm:^4.0.9"
|
||||||
"@types/node": "npm:^22.7.5"
|
"@types/node": "npm:^22.7.5"
|
||||||
ajv: "npm:^8.17.1"
|
ajv: "npm:^8.17.1"
|
||||||
|
cross-env: "npm:^7.0.3"
|
||||||
micromatch: "npm:^4.0.8"
|
micromatch: "npm:^4.0.8"
|
||||||
strip-json-comments: "npm:^5.0.1"
|
strip-json-comments: "npm:^5.0.1"
|
||||||
tsc-watch: "npm:6.2.1"
|
tsc-watch: "npm:6.2.1"
|
||||||
|
|
@ -17837,6 +17839,7 @@ __metadata:
|
||||||
cross-env: "npm:^7.0.3"
|
cross-env: "npm:^7.0.3"
|
||||||
dotenv-cli: "npm:^8.0.0"
|
dotenv-cli: "npm:^8.0.0"
|
||||||
npm-run-all: "npm:^4.1.5"
|
npm-run-all: "npm:^4.1.5"
|
||||||
|
turbo: "npm:^2.5.8"
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
|
|
@ -19478,6 +19481,77 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
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":
|
"type-check@npm:^0.4.0, type-check@npm:~0.4.0":
|
||||||
version: 0.4.0
|
version: 0.4.0
|
||||||
resolution: "type-check@npm:0.4.0"
|
resolution: "type-check@npm:0.4.0"
|
||||||
|
|
@ -20537,6 +20611,12 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
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":
|
"zwitch@npm:^2.0.0, zwitch@npm:^2.0.4":
|
||||||
version: 2.0.4
|
version: 2.0.4
|
||||||
resolution: "zwitch@npm:2.0.4"
|
resolution: "zwitch@npm:2.0.4"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue