forked from oshinowo-stephen/loli-tagger
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9878de6
commit 97f105d
Showing
5 changed files
with
19 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
import { PrismaClient } from '@prisma/client' | ||
import type { PrismaClient as ImportedPrismaClient } from '@prisma/client' | ||
import { createRequire } from 'module' | ||
|
||
const require = createRequire(import.meta.url ?? __filename) | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-unsafe-assignment | ||
const { PrismaClient: RequiredPrismaClient } = require('@prisma/client') | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
const _PrismaClient: typeof ImportedPrismaClient = RequiredPrismaClient | ||
|
||
export class PrismaClient extends _PrismaClient {} | ||
|
||
export const prisma = new PrismaClient() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { createRequire as _createRequire } from 'module' | ||
export const createCursedRequire: ( | ||
path: string | URL, | ||
) => <TShape>(id: string) => TShape = _createRequire |