Files
mcpctl/package.json
Michal a90dd091f0 fix(smoke): actually clean up smoke-test resources
341 of 356 projects on the shared mcpd were smoke-test leftovers, plus 11
never-expiring `smoke-*` mcptokens sitting on the real `mcpctl-development`
and `sre` projects. Enough to make the project picker unusable.

Two causes, both silent:

- `delete project X --force` — `--force` is valid on `create project` but NOT
  on `delete`, so every cleanup call exited non-zero and deleted nothing.
  project-llm-ref's afterAll looked correct and had never worked, which is why
  there were 84 each of smoke-proj-{ok,orphan,none}-*.
- mcptoken.smoke had no afterAll at all; its cleanup was an `it()` at the end
  of the file, so it was skipped whenever an earlier assertion failed.

Cleanup now lives in `afterAll` (runs on failure too) and is no longer gated
on the health probe: the project is created through mcpd, which can be up when
the gateway probe is not, and deleting a project that was never created is a
no-op.

Adds `pnpm smoke:clean` for the case afterAll cannot cover — a killed process
(CI timeout, Ctrl-C, OOM). Dry-run by default, `--yes` to apply. Only touches
`smoke-*` names and protects the shared `smoke-data` / `smoke-aws-docs`
fixture, which five suites depend on and which must survive a concurrent run.

Verified end to end: created a throwaway smoke project, confirmed the dry run
lists without deleting, then `--yes` removed it and left all 15 real projects
untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017BMXdb2qZbPSh8Q7XpTyjB
2026-08-08 18:49:42 +01:00

60 lines
2.3 KiB
JSON

{
"name": "mcpctl",
"version": "0.0.1",
"private": true,
"description": "kubectl-like CLI for managing MCP servers",
"type": "module",
"scripts": {
"build": "pnpm -r run build",
"test": "vitest",
"test:run": "vitest run",
"test:coverage": "vitest run --coverage",
"test:smoke": "pnpm --filter mcplocal run test:smoke",
"test:ui": "vitest --ui",
"lint": "eslint 'src/*/src/**/*.ts'",
"lint:fix": "eslint 'src/*/src/**/*.ts' --fix",
"clean": "pnpm -r run clean && rimraf node_modules",
"db:up": "docker compose -f deploy/docker-compose.yml up -d",
"db:down": "docker compose -f deploy/docker-compose.yml down",
"typecheck": "tsc --build && pnpm run typecheck:pi-ext",
"completions:generate": "tsx scripts/generate-completions.ts --write",
"completions:check": "tsx scripts/generate-completions.ts --check",
"rpm:build": "bash scripts/build-rpm.sh",
"rpm:build:amd64": "MCPCTL_TARGET_ARCH=amd64 bash scripts/build-rpm.sh",
"rpm:build:arm64": "MCPCTL_TARGET_ARCH=arm64 bash scripts/build-rpm.sh",
"rpm:publish": "bash scripts/publish-rpm.sh",
"deb:build": "bash scripts/build-deb.sh",
"deb:build:amd64": "MCPCTL_TARGET_ARCH=amd64 bash scripts/build-deb.sh",
"deb:build:arm64": "MCPCTL_TARGET_ARCH=arm64 bash scripts/build-deb.sh",
"deb:publish": "bash scripts/publish-deb.sh",
"release": "bash scripts/release.sh",
"release:both": "bash scripts/release.sh --both-arches",
"mcpd:build": "bash scripts/build-mcpd.sh",
"mcpd:deploy": "bash deploy.sh",
"mcpd:deploy-dry": "bash deploy.sh --dry-run",
"mcpd:logs": "bash logs.sh",
"typecheck:pi-ext": "tsc -p src/pi-ext/tsconfig.json",
"smoke:clean": "tsx scripts/clean-smoke-resources.ts"
},
"engines": {
"node": ">=20.0.0",
"pnpm": ">=9.0.0"
},
"packageManager": "pnpm@9.15.0",
"devDependencies": {
"@earendil-works/pi-ai": "^0.84.1",
"@earendil-works/pi-coding-agent": "0.84.1",
"@types/node": "^25.3.0",
"@typescript-eslint/eslint-plugin": "^8.56.0",
"@typescript-eslint/parser": "^8.56.0",
"@vitest/coverage-v8": "^4.0.18",
"eslint": "^10.0.1",
"eslint-config-prettier": "^10.1.8",
"rimraf": "^6.1.3",
"tsx": "^4.21.0",
"typebox": "1.3.11",
"typescript": "^5.9.3",
"vitest": "^4.0.18"
}
}