(req: FastifyRequest, res: FastifyReply)
| 38 | } |
| 39 | |
| 40 | private dependencyQueryMiddleware(req: FastifyRequest, res: FastifyReply): void { |
| 41 | res.header('access-control-allow-origin', '*'); |
| 42 | |
| 43 | const responseJson: Record<string, string> = {}; |
| 44 | |
| 45 | for (const pkg of this.packages) { |
| 46 | const pkgMajorVersion = pkg.version.split('.')[0]; |
| 47 | responseJson[`${pkg.name}@${pkgMajorVersion}`] = pkg.version; |
| 48 | } |
| 49 | |
| 50 | this.respondWith(res, responseJson); |
| 51 | } |
| 52 | |
| 53 | private moduleQueryMiddleware(req: FastifyRequest<{ Params: { query: string } }>, res: FastifyReply): void { |
| 54 | res.header('access-control-allow-origin', '*'); |
nothing calls this directly
no test coverage detected