telescope-prisma-client 0.0.8 → 0.0.9
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/index.ts +8 -7
- package/package.json +2 -2
package/index.ts
CHANGED
|
@@ -2,12 +2,13 @@ import { PrismaClient } from './generatedClient';
|
|
|
2
2
|
|
|
3
3
|
export * from './generatedClient/index';
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
const createPrismaClient = (dbUrl: string) =>
|
|
6
|
+
new PrismaClient({
|
|
7
|
+
datasources: {
|
|
8
|
+
db: {
|
|
9
|
+
url: dbUrl,
|
|
10
|
+
},
|
|
9
11
|
},
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
+
});
|
|
12
13
|
|
|
13
|
-
export {
|
|
14
|
+
export { createPrismaClient };
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "telescope-prisma-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"
|
|
8
|
+
"postinstall": "npx prisma generate",
|
|
9
9
|
"generate": "dotenv -- prisma generate",
|
|
10
10
|
"migrate:dev": "dotenv -- prisma migrate dev"
|
|
11
11
|
},
|