chore(mcp): clean bridge build caches

This commit is contained in:
Guillaume ARM 2026-06-10 23:41:52 +02:00
parent ad869c7ecd
commit 39b71a8c20
4 changed files with 23 additions and 9 deletions

View File

@ -10,4 +10,9 @@ just install trapos-install && echo ok
This installs local Git hooks, checks required tools, generates `.env`, and verifies a full TrapOS install on a fresh CraftOS-PC state. This installs local Git hooks, checks required tools, generates `.env`, and verifies a full TrapOS install on a fresh CraftOS-PC state.
## Cleaning
- `just clean` — clears the `mcp-bridge` build caches (`node_modules/.cache/tsc`, `node_modules/.cache/eslint`). Safe to run anytime; `just reinstall` chains it with `just install`.
- `just clean-env` — deletes `.env`. Run only when you actually want to drop locally generated tokens.
See [`docs/README.md`](docs/README.md) for repository docs and [`docs/adrs/README.md`](docs/adrs/README.md) for architecture decisions. See [`docs/README.md`](docs/README.md) for repository docs and [`docs/adrs/README.md`](docs/adrs/README.md) for architecture decisions.

View File

@ -8,8 +8,12 @@ default:
# Install local development tooling. # Install local development tooling.
install: install-git-hooks check-install npm-install generate-env install: install-git-hooks check-install npm-install generate-env
# Remove generated local environment files. # Remove build caches (tsc / eslint) for the mcp-bridge tool.
clean: clean:
npm run clean --prefix tools/mcp-bridge
# Remove generated local environment files (e.g. .env with tokens).
clean-env:
rm -f .env rm -f .env
# Recreate local generated files and development tooling. # Recreate local generated files and development tooling.
@ -130,7 +134,7 @@ npm-test:
# Run Node-based tool integration tests. # Run Node-based tool integration tests.
npm-test-integration: npm-test-integration:
npm run test-integration --prefix tools/mcp-bridge npm run test:integration --prefix tools/mcp-bridge
# Run Node-based tool CI. # Run Node-based tool CI.
npm-ci: npm-ci:
@ -420,7 +424,7 @@ opencode-attach *args:
exec opencode attach "$target" "$@" exec opencode attach "$target" "$@"
# Local CI entry point used by Git hooks. Pass args through to CraftOS tests. # Local CI entry point used by Git hooks. Pass args through to CraftOS tests.
ci *args: check-craftos check check-packages npm-ci ci *args: check-craftos check check-packages npm-build npm-test
@just _craftos-test {{args}} @just _craftos-test {{args}}
@just test-integration @just test-integration

View File

@ -4,14 +4,17 @@
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
"build": "tsc --noEmit false", "build": "tsc",
"check": "eslint .", "build:check": "tsc --noEmit true",
"eslint": "eslint . --cache --cache-location node_modules/.cache/eslint/",
"clean": "rm -rf node_modules/.cache/tsc node_modules/.cache/eslint",
"check": "npm run build:check && npm run eslint",
"test:all": "npm run check && npm run build && npm run test", "test:all": "npm run check && npm run build && npm run test",
"test:ci": "npm run test:all && npm run test-integration", "test:ci": "npm run test:all && npm run test:integration",
"dev": "tsx src/index.ts", "dev": "tsx src/index.ts",
"start": "node dist/src/index.js", "start": "npm run build && node dist/src/index.js",
"test": "tsx --test test/*.test.ts", "test": "tsx --test test/*.test.ts",
"test-integration": "tsx --test --test-concurrency=1 test-integration/*.test.ts" "test:integration": "tsx --test --test-concurrency=1 test-integration/*.test.ts"
}, },
"dependencies": { "dependencies": {
"ws": "^8.17.1" "ws": "^8.17.1"

View File

@ -9,7 +9,9 @@
"skipLibCheck": true, "skipLibCheck": true,
"outDir": "dist", "outDir": "dist",
"rootDir": ".", "rootDir": ".",
"declaration": true "declaration": true,
"incremental": true,
"tsBuildInfoFile": "node_modules/.cache/tsc/tsconfig.tsbuildinfo"
}, },
"include": ["src/**/*.ts", "test/**/*.ts", "test-integration/**/*.ts"] "include": ["src/**/*.ts", "test/**/*.ts", "test-integration/**/*.ts"]
} }