refactor: restructure bastion as pnpm monorepo (@lab/shared, @lab/bastion, @lab/cli)

- Split into 3 workspace packages: shared (types/constants), bastion (server), cli
- CLI binary renamed from "bastion" to "lab"
- Cross-package imports via @lab/shared and @lab/bastion workspace references
- Extracted BastionConfig, BastionState, HardwareInfo types into @lab/shared
- Added APP_NAME/APP_VERSION constants
- tsconfig.base.json with project references for build ordering
- Root workspace scripts: build, test, typecheck, clean

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Michal
2026-03-17 11:05:41 +00:00
parent 937c01f5d9
commit 64533b2dcf
40 changed files with 344 additions and 143 deletions

View File

@@ -1,34 +1,22 @@
{
"name": "lab-bastion",
"name": "lab",
"version": "0.1.0",
"private": true,
"description": "PXE bastion server for discover-first bare-metal provisioning",
"type": "module",
"bin": {
"bastion": "./dist/cli/index.js"
},
"main": "./dist/server/main.js",
"scripts": {
"build": "tsc",
"dev": "tsx src/cli/index.ts",
"start": "node dist/cli/index.js",
"build": "pnpm -r run build",
"test": "vitest",
"test:run": "vitest run",
"lint": "tsc --noEmit",
"clean": "rimraf dist"
"typecheck": "tsc --build",
"clean": "pnpm -r run clean && rimraf node_modules",
"lint": "eslint 'src/*/src/**/*.ts'"
},
"engines": {
"node": ">=20.0.0",
"pnpm": ">=9.0.0"
},
"packageManager": "pnpm@9.15.0",
"dependencies": {
"@fastify/static": "^8.0.0",
"commander": "^13.0.0",
"execa": "^9.5.0",
"fastify": "^5.0.0",
"winston": "^3.17.0"
},
"devDependencies": {
"@types/node": "^22.10.0",
"rimraf": "^6.0.0",