Replaced duplicated server setup code with createServiceApp() factory: - platform-service: 91 → 39 lines - billing-service: 105 → 51 lines (keeps service-specific internal key auth) - growth-service: 83 → 33 lines - tracker-service: 88 → 36 lines Enhanced fastify-core with optional Swagger + Prometheus metrics support. Total reduction: ~208 lines of duplicated boilerplate eliminated. All 246 tests pass.
35 lines
919 B
JSON
35 lines
919 B
JSON
{
|
|
"name": "@lysnrai/billing-service",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"description": "Billing & Entitlement Service — subscriptions, payments, usage, licenses, plans",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "tsx watch src/server.ts",
|
|
"build": "tsc",
|
|
"start": "node dist/server.js",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"lint": "eslint src/"
|
|
},
|
|
"dependencies": {
|
|
"@bytelyst/config": "workspace:*",
|
|
"@bytelyst/cosmos": "workspace:*",
|
|
"@bytelyst/errors": "workspace:*",
|
|
"@bytelyst/fastify-core": "workspace:*",
|
|
"@azure/cosmos": "^4.2.0",
|
|
"fastify": "^5.2.1",
|
|
"@fastify/cors": "^10.0.2",
|
|
"@fastify/swagger": "^9.4.2",
|
|
"fastify-metrics": "^10.3.0",
|
|
"stripe": "^17.5.0",
|
|
"zod": "^3.24.2"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^22.12.0",
|
|
"tsx": "^4.19.2",
|
|
"typescript": "^5.7.3",
|
|
"vitest": "^3.0.5"
|
|
}
|
|
}
|