From 4fbbfff2a3c625f8e6929e5a09e2cf7b739ffe11 Mon Sep 17 00:00:00 2001 From: David Luecke Date: Wed, 22 Feb 2023 09:02:04 -0800 Subject: [PATCH] fix(koa): Make Koa app inspectable (#3069) --- packages/koa/src/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/koa/src/index.ts b/packages/koa/src/index.ts index b6dc9bde84..e93712fddd 100644 --- a/packages/koa/src/index.ts +++ b/packages/koa/src/index.ts @@ -83,6 +83,13 @@ export function koa( koaQs(app as any) + Object.getOwnPropertySymbols(koaApp).forEach((symbol) => { + const target = app as any + const source = koaApp as any + + target[symbol] = source[symbol] + }) + // This reinitializes hooks app.setup = feathersApp.setup as any app.teardown = feathersApp.teardown as any