chore: scaffold tsup, biome, vitest, deps

This commit is contained in:
smartass
2026-06-11 23:02:08 +05:00
parent cf52ac9420
commit 80ba44f1ce
9 changed files with 6598 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
node_modules/
dist/
coverage/
*.tsbuildinfo
+25
View File
@@ -0,0 +1,25 @@
{
"$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
"files": {
"includes": ["src/**", "test/**"]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 4,
"lineWidth": 100
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "asNeeded",
"trailingCommas": "none"
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}
+6456
View File
File diff suppressed because it is too large Load Diff
+49
View File
@@ -0,0 +1,49 @@
{
"name": "dbmole-mcp",
"version": "0.1.0",
"description": "MCP server for PostgreSQL and MySQL with named connections and SSH tunnels",
"license": "MIT",
"type": "module",
"bin": {
"dbmole-mcp": "dist/index.js"
},
"files": [
"dist"
],
"engines": {
"node": ">=20"
},
"scripts": {
"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",
"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"
},
"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",
"tsx": "^4.22.4",
"typescript": "^5.9.3",
"vitest": "^3.2.6"
}
}
+1
View File
@@ -0,0 +1 @@
export const placeholder = true
+7
View File
@@ -0,0 +1,7 @@
import { describe, expect, it } from 'vitest'
describe('smoke', () => {
it('runs', () => {
expect(1 + 1).toBe(2)
})
})
+14
View File
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"strict": true,
"skipLibCheck": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"types": ["node"]
},
"include": ["src", "test"]
}
+11
View File
@@ -0,0 +1,11 @@
import { defineConfig } from 'tsup'
export default defineConfig({
entry: ['src/index.ts'],
format: 'esm',
target: 'node20',
clean: true,
banner: {
js: '#!/usr/bin/env node'
}
})
+31
View File
@@ -0,0 +1,31 @@
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
projects: [
{
test: {
name: 'unit',
include: ['test/unit/**/*.test.ts']
}
},
{
test: {
name: 'integration',
include: ['test/integration/**/*.test.ts'],
testTimeout: 120_000,
hookTimeout: 240_000
}
}
],
coverage: {
provider: 'v8',
include: ['src/**'],
exclude: ['src/index.ts'],
thresholds: {
lines: 90,
functions: 90
}
}
}
})