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.
42 lines
801 B
JSON
42 lines
801 B
JSON
{
|
|
"name": "@bytelyst/fastify-core",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"exports": {
|
|
".": {
|
|
"import": "./dist/index.js",
|
|
"types": "./dist/index.d.ts"
|
|
}
|
|
},
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"test": "vitest run"
|
|
},
|
|
"dependencies": {
|
|
"@bytelyst/errors": "workspace:*"
|
|
},
|
|
"peerDependencies": {
|
|
"@fastify/cors": ">=10.0.0",
|
|
"@fastify/swagger": ">=9.0.0",
|
|
"fastify": ">=5.0.0",
|
|
"fastify-metrics": ">=10.0.0"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"@fastify/swagger": {
|
|
"optional": true
|
|
},
|
|
"fastify-metrics": {
|
|
"optional": true
|
|
}
|
|
},
|
|
"devDependencies": {
|
|
"@fastify/swagger": "^9.7.0",
|
|
"fastify-metrics": "^10.6.0"
|
|
}
|
|
}
|