From f4b22ab1f78b8e5de6a9038da9a4f180fb98fbf3 Mon Sep 17 00:00:00 2001 From: Evgeny Gamov Date: Tue, 16 Jun 2026 19:21:36 +0500 Subject: [PATCH] chore: convert root to npm workspaces --- package.json | 59 +++++++++------------------------------------- tsconfig.base.json | 13 ++++++++++ 2 files changed, 24 insertions(+), 48 deletions(-) create mode 100644 tsconfig.base.json diff --git a/package.json b/package.json index 3a862b3..724b5da 100644 --- a/package.json +++ b/package.json @@ -1,61 +1,24 @@ { - "name": "dbmole-mcp", - "version": "0.1.0", - "description": "MCP server for PostgreSQL and MySQL with named connections and SSH tunnels", - "license": "MIT", - "author": "smartass", - "repository": { - "type": "git", - "url": "git+https://git.smartass.pw/admin/dbmole-mcp.git" - }, - "homepage": "https://git.smartass.pw/admin/dbmole-mcp", - "keywords": [ - "mcp", - "model-context-protocol", - "postgres", - "postgresql", - "mysql", - "ssh-tunnel", - "database", - "stdio" - ], + "name": "dbmole-monorepo", + "private": true, + "version": "0.0.0", "type": "module", - "bin": { - "dbmole-mcp": "dist/index.js" - }, - "files": [ - "dist" - ], - "engines": { - "node": ">=20" - }, + "workspaces": ["packages/*"], + "engines": { "node": ">=20" }, "scripts": { - "prepublishOnly": "npm run lint && npm run typecheck && npm run test:unit && npm run build", - "build": "tsup", - "dev": "tsx src/index.ts", - "lint": "biome check src test", - "lint:fix": "biome check --write src test", - "typecheck": "tsc --noEmit", - "test": "vitest run --project unit", + "lint": "biome check packages/*/src packages/*/test", + "lint:fix": "biome check --write packages/*/src packages/*/test", + "typecheck": "npm run typecheck --workspaces --if-present", + "build": "npm run build --workspaces --if-present", + "test": "npm run test:unit", "test:unit": "vitest run --project unit", "test:int": "vitest run --project integration", "test:all": "vitest run", - "coverage": "vitest run --project unit --coverage" - }, - "dependencies": { - "@modelcontextprotocol/sdk": "^1.29.0", - "mysql2": "^3.22.5", - "pg": "^8.21.0", - "ssh2": "^1.17.0", - "zod": "^3.25.76" + "coverage": "npm run coverage --workspaces --if-present" }, "devDependencies": { "@biomejs/biome": "^2.4.16", - "@testcontainers/mysql": "^11.14.0", - "@testcontainers/postgresql": "^11.14.0", "@types/node": "^22.19.21", - "@types/pg": "^8.20.0", - "@types/ssh2": "^1.15.5", "@vitest/coverage-v8": "^3.2.6", "testcontainers": "^11.14.0", "tsup": "^8.5.1", diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 0000000..43124cc --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "NodeNext", + "moduleResolution": "NodeNext", + "strict": true, + "skipLibCheck": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "types": ["node"] + } +}