Skip to content

Commit 9d323e2

Browse files
committed
fix: add powertools service name to router
fix #67
1 parent 4025fa7 commit 9d323e2

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/nx-plugin/src/trpc/backend/__snapshots__/generator.spec.ts.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ import {
6767
IMiddlewareContext,
6868
} from './middleware/index.js';
6969
70+
process.env.POWERTOOLS_SERVICE_NAME = 'TestApi';
71+
7072
export type Context = IMiddlewareContext;
7173
7274
export const t = initTRPC.context<Context>().create();

packages/nx-plugin/src/trpc/backend/files/backend/src/init.ts.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import {
77
IMiddlewareContext,
88
} from './middleware/index.js';
99

10+
process.env.POWERTOOLS_SERVICE_NAME = '<%= apiNameClassName %>';
11+
1012
export type Context = IMiddlewareContext;
1113

1214
export const t = initTRPC.context<Context>().create();

0 commit comments

Comments
 (0)