adaptic-backend 1.0.212 → 1.0.214
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/package.json
CHANGED
package/prismaClient.cjs
CHANGED
@@ -1,41 +1,16 @@
|
|
1
1
|
"use strict";
|
2
|
-
// client with accelerate
|
3
|
-
// import { PrismaClient } from "@prisma/client/edge";
|
4
|
-
// import { withAccelerate } from '@prisma/extension-accelerate'
|
5
|
-
// import { withPulse } from '@prisma/extension-pulse'
|
6
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
7
|
-
//
|
8
|
-
// namespace NodeJS {
|
9
|
-
// interface Global {
|
10
|
-
// prisma: PrismaClient;
|
11
|
-
// }
|
12
|
-
// }
|
13
|
-
// }
|
14
|
-
// let prisma: PrismaClient;
|
15
|
-
// if (process.env.NODE_ENV === "production") {
|
16
|
-
// prisma = new PrismaClient().$extends(withAccelerate()).$extends(withPulse({
|
17
|
-
// apiKey: process.env['PULSE_API_KEY'] as string
|
18
|
-
// })) as unknown as PrismaClient;
|
19
|
-
// } else {
|
20
|
-
// const globalWithPrisma = global as typeof globalThis & { prisma?: PrismaClient };
|
21
|
-
// if (!globalWithPrisma.prisma) {
|
22
|
-
// globalWithPrisma.prisma = new PrismaClient().$extends(withAccelerate()).$extends(withPulse({
|
23
|
-
// apiKey: process.env['PULSE_API_KEY'] as string
|
24
|
-
// })) as unknown as PrismaClient;
|
25
|
-
// }
|
26
|
-
// prisma = globalWithPrisma.prisma;
|
27
|
-
// }
|
28
|
-
// export default prisma;
|
29
|
-
// Normal client
|
3
|
+
// client with accelerate
|
30
4
|
const client_1 = require("@prisma/client");
|
5
|
+
const extension_accelerate_1 = require("@prisma/extension-accelerate");
|
31
6
|
let prisma;
|
32
7
|
if (process.env.NODE_ENV === "production") {
|
33
|
-
prisma = new client_1.PrismaClient();
|
8
|
+
prisma = new client_1.PrismaClient().$extends((0, extension_accelerate_1.withAccelerate)());
|
34
9
|
}
|
35
10
|
else {
|
36
11
|
const globalWithPrisma = global;
|
37
12
|
if (!globalWithPrisma.prisma) {
|
38
|
-
globalWithPrisma.prisma = new client_1.PrismaClient();
|
13
|
+
globalWithPrisma.prisma = new client_1.PrismaClient().$extends((0, extension_accelerate_1.withAccelerate)());
|
39
14
|
}
|
40
15
|
prisma = globalWithPrisma.prisma;
|
41
16
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"prismaClient.d.ts","sourceRoot":"","sources":["../../src/prismaClient.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"prismaClient.d.ts","sourceRoot":"","sources":["../../src/prismaClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM,CAAC;QACf,UAAU,MAAM;YACd,MAAM,EAAE,YAAY,CAAC;SACtB;KACF;CACF;AAED,QAAA,IAAI,MAAM,EAAE,YAAY,CAAC;AAczB,eAAe,MAAM,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"prismaClient.js","sourceRoot":"","sources":["../../src/prismaClient.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,
|
1
|
+
{"version":3,"file":"prismaClient.js","sourceRoot":"","sources":["../../src/prismaClient.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAU7D,IAAI,MAAoB,CAAC;AAEzB,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;IAC1C,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC,QAAQ,CAAC,cAAc,EAAE,CAA4B,CAAC;AACpF,CAAC;KAAM,CAAC;IACN,MAAM,gBAAgB,GAAG,MAAuD,CAAC;IAEjF,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC;QAC7B,gBAAgB,CAAC,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC,QAAQ,CAAC,cAAc,EAAE,CAA4B,CAAC;IACrG,CAAC;IAED,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC;AACnC,CAAC;AAED,eAAe,MAAM,CAAC"}
|
package/server/prismaClient.mjs
CHANGED
@@ -1,39 +1,14 @@
|
|
1
1
|
// client with accelerate
|
2
|
-
// import { PrismaClient } from "@prisma/client/edge";
|
3
|
-
// import { withAccelerate } from '@prisma/extension-accelerate'
|
4
|
-
// import { withPulse } from '@prisma/extension-pulse'
|
5
|
-
// declare global {
|
6
|
-
// namespace NodeJS {
|
7
|
-
// interface Global {
|
8
|
-
// prisma: PrismaClient;
|
9
|
-
// }
|
10
|
-
// }
|
11
|
-
// }
|
12
|
-
// let prisma: PrismaClient;
|
13
|
-
// if (process.env.NODE_ENV === "production") {
|
14
|
-
// prisma = new PrismaClient().$extends(withAccelerate()).$extends(withPulse({
|
15
|
-
// apiKey: process.env['PULSE_API_KEY'] as string
|
16
|
-
// })) as unknown as PrismaClient;
|
17
|
-
// } else {
|
18
|
-
// const globalWithPrisma = global as typeof globalThis & { prisma?: PrismaClient };
|
19
|
-
// if (!globalWithPrisma.prisma) {
|
20
|
-
// globalWithPrisma.prisma = new PrismaClient().$extends(withAccelerate()).$extends(withPulse({
|
21
|
-
// apiKey: process.env['PULSE_API_KEY'] as string
|
22
|
-
// })) as unknown as PrismaClient;
|
23
|
-
// }
|
24
|
-
// prisma = globalWithPrisma.prisma;
|
25
|
-
// }
|
26
|
-
// export default prisma;
|
27
|
-
// Normal client
|
28
2
|
import { PrismaClient } from "@prisma/client";
|
3
|
+
import { withAccelerate } from '@prisma/extension-accelerate';
|
29
4
|
let prisma;
|
30
5
|
if (process.env.NODE_ENV === "production") {
|
31
|
-
prisma = new PrismaClient();
|
6
|
+
prisma = new PrismaClient().$extends(withAccelerate());
|
32
7
|
}
|
33
8
|
else {
|
34
9
|
const globalWithPrisma = global;
|
35
10
|
if (!globalWithPrisma.prisma) {
|
36
|
-
globalWithPrisma.prisma = new PrismaClient();
|
11
|
+
globalWithPrisma.prisma = new PrismaClient().$extends(withAccelerate());
|
37
12
|
}
|
38
13
|
prisma = globalWithPrisma.prisma;
|
39
14
|
}
|