Skip to content

Commit 9c4ff08

Browse files
committed
fix: Default to using extensions in CI script
1 parent f1829ab commit 9c4ff08

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/tests/prismaClient.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@ const config: Configuration = {
1111
}
1212

1313
const useMiddleware = Boolean(process.env.USE_MIDDLEWARE)
14-
const useExtensions = Boolean(process.env.USE_EXTENSIONS)
1514

1615
const globalClient = new PrismaClient()
1716

18-
if (useMiddleware) {
19-
globalClient.$use(fieldEncryptionMiddleware(config))
20-
}
21-
2217
const extendedClient = globalClient.$extends(
2318
fieldEncryptionExtension(config)
2419
) as PrismaClient // <- Type annotation needed for internals only
2520

26-
export const client = useExtensions ? extendedClient : globalClient
21+
if (useMiddleware) {
22+
globalClient.$use(fieldEncryptionMiddleware(config))
23+
}
24+
25+
export const client = useMiddleware ? globalClient : extendedClient

0 commit comments

Comments
 (0)