prisma-prefixed-ids 1.5.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -37,6 +37,11 @@ const prefixes: Partial<Record<ModelName, string>> = {
|
|
|
37
37
|
const extendedPrisma = extendPrismaClient(prisma, {
|
|
38
38
|
prefixes,
|
|
39
39
|
});
|
|
40
|
+
// NOTE: if typing is an issue, simply override the
|
|
41
|
+
// return type to be the original `PrismaClient`:
|
|
42
|
+
// const extendedPrisma = extendPrismaClient(prisma, {
|
|
43
|
+
// prefixes,
|
|
44
|
+
// }) as unknown as PrismaClient
|
|
40
45
|
|
|
41
46
|
// Use the extended client
|
|
42
47
|
const organization = await extendedPrisma.organization.create({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prisma-prefixed-ids",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "A Prisma extension that adds prefixed IDs to your models",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
"build:esm": "tsc -p tsconfig.json",
|
|
26
26
|
"build:cjs": "tsc -p tsconfig.cjs.json && mv dist/cjs/index.js dist/index.cjs && rm -rf dist/cjs",
|
|
27
27
|
"prepare": "npm run build",
|
|
28
|
-
"postinstall": "npm run clean:test-artifacts",
|
|
29
28
|
"clean:test-artifacts": "rm -rf test-client prisma/test.db prisma/test.db-journal",
|
|
30
29
|
"test": "npm run test:unit && npm run test:integration",
|
|
31
30
|
"test:unit": "jest --testPathIgnorePatterns=integration",
|