@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
1 lines • 739 B
Source Map (JSON)
{"version":3,"file":"create-middleware.mjs","names":[],"sources":["../../../src/libs/http/create-middleware.ts"],"sourcesContent":["import type { MiddlewareHandler } from \"hono\";\nimport type { LucidHonoGeneric } from \"../../types/hono.js\";\nimport type { LucidMiddlewareHandler } from \"./types.js\";\nimport createServiceContext from \"./utils/create-service-context.js\";\n\nconst createMiddleware =\n\t(handler: LucidMiddlewareHandler): MiddlewareHandler<LucidHonoGeneric> =>\n\tasync (hono, next) =>\n\t\thandler({\n\t\t\thono,\n\t\t\tcontext: createServiceContext(hono),\n\t\t\tnext,\n\t\t});\n\nexport default createMiddleware;\n"],"mappings":"kDAKA,MAAM,EACJ,GACD,MAAO,EAAM,IACZ,EAAQ,CACP,OACA,QAAS,EAAqB,CAAI,EAClC,MACD,CAAC"}