{"version":3,"file":"request-context.mjs","sources":["../../src/services/request-context.ts"],"sourcesContent":["import { AsyncLocalStorage } from 'async_hooks';\nimport type { ParameterizedContext } from 'koa';\n\nconst storage = new AsyncLocalStorage<ParameterizedContext>();\n\nconst requestCtx = {\n  async run(store: ParameterizedContext, cb: () => Promise<void>) {\n    return storage.run(store, cb);\n  },\n\n  get() {\n    return storage.getStore();\n  },\n};\n\nexport default requestCtx;\n"],"names":["storage","AsyncLocalStorage","requestCtx","run","store","cb","get","getStore"],"mappings":";;AAGA,MAAMA,UAAU,IAAIC,iBAAAA,EAAAA;AAEpB,MAAMC,UAAAA,GAAa;IACjB,MAAMC,GAAAA,CAAAA,CAAIC,KAA2B,EAAEC,EAAuB,EAAA;QAC5D,OAAOL,OAAAA,CAAQG,GAAG,CAACC,KAAAA,EAAOC,EAAAA,CAAAA;AAC5B,IAAA,CAAA;AAEAC,IAAAA,GAAAA,CAAAA,GAAAA;AACE,QAAA,OAAON,QAAQO,QAAQ,EAAA;AACzB,IAAA;AACF;;;;"}