mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-21 07:01:19 -04:00
revert @neondatabase/serverless
This commit is contained in:
@@ -5,14 +5,16 @@ import ws from "ws";
|
|||||||
|
|
||||||
// https://www.prisma.io/blog/serverless-database-drivers-KML1ehXORxZV#use-neon-with-neondatabaseserverless
|
// https://www.prisma.io/blog/serverless-database-drivers-KML1ehXORxZV#use-neon-with-neondatabaseserverless
|
||||||
neonConfig.webSocketConstructor = ws;
|
neonConfig.webSocketConstructor = ws;
|
||||||
const connectionString = `${process.env.DATABASE_URL}`;
|
|
||||||
|
|
||||||
// creating PrismaClient here prevents next.js from starting too many concurrent prisma instances and exhausting the
|
// creating PrismaClient here prevents next.js from starting too many concurrent prisma instances and exhausting the
|
||||||
// number of connection pools available (especially when hot reloading from `next dev`).
|
// number of connection pools available (especially when hot reloading from `next dev`).
|
||||||
// https://www.prisma.io/docs/guides/other/troubleshooting-orm/help-articles/nextjs-prisma-client-dev-practices
|
// https://www.prisma.io/docs/guides/other/troubleshooting-orm/help-articles/nextjs-prisma-client-dev-practices
|
||||||
|
|
||||||
const prismaClientSingleton = () => {
|
const prismaClientSingleton = () => {
|
||||||
const pool = new Pool({ connectionString });
|
const pool = new Pool({
|
||||||
|
connectionString: process.env.DATABASE_URL,
|
||||||
|
ssl: true,
|
||||||
|
});
|
||||||
const adapter = new PrismaNeon(pool);
|
const adapter = new PrismaNeon(pool);
|
||||||
return new PrismaClient({ adapter });
|
return new PrismaClient({ adapter });
|
||||||
};
|
};
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@giscus/react": "^2.4.0",
|
"@giscus/react": "^2.4.0",
|
||||||
"@hcaptcha/react-hcaptcha": "^1.9.2",
|
"@hcaptcha/react-hcaptcha": "^1.9.2",
|
||||||
"@neondatabase/serverless": "^0.7.0",
|
"@neondatabase/serverless": "^0.6.1",
|
||||||
"@novnc/novnc": "1.4.0",
|
"@novnc/novnc": "1.4.0",
|
||||||
"@octokit/graphql": "^7.0.2",
|
"@octokit/graphql": "^7.0.2",
|
||||||
"@octokit/graphql-schema": "^14.46.1",
|
"@octokit/graphql-schema": "^14.46.1",
|
||||||
|
14
pnpm-lock.yaml
generated
14
pnpm-lock.yaml
generated
@@ -12,8 +12,8 @@ dependencies:
|
|||||||
specifier: ^1.9.2
|
specifier: ^1.9.2
|
||||||
version: 1.9.2(react-dom@18.2.0)(react@18.2.0)
|
version: 1.9.2(react-dom@18.2.0)(react@18.2.0)
|
||||||
'@neondatabase/serverless':
|
'@neondatabase/serverless':
|
||||||
specifier: ^0.7.0
|
specifier: ^0.6.1
|
||||||
version: 0.7.0
|
version: 0.6.1
|
||||||
'@novnc/novnc':
|
'@novnc/novnc':
|
||||||
specifier: 1.4.0
|
specifier: 1.4.0
|
||||||
version: 1.4.0
|
version: 1.4.0
|
||||||
@@ -25,7 +25,7 @@ dependencies:
|
|||||||
version: 14.46.1
|
version: 14.46.1
|
||||||
'@prisma/adapter-neon':
|
'@prisma/adapter-neon':
|
||||||
specifier: ^5.7.1
|
specifier: ^5.7.1
|
||||||
version: 5.7.1(@neondatabase/serverless@0.7.0)
|
version: 5.7.1(@neondatabase/serverless@0.6.1)
|
||||||
'@prisma/client':
|
'@prisma/client':
|
||||||
specifier: ^5.7.1
|
specifier: ^5.7.1
|
||||||
version: 5.7.1(prisma@5.7.1)
|
version: 5.7.1(prisma@5.7.1)
|
||||||
@@ -623,8 +623,8 @@ packages:
|
|||||||
react: 18.2.0
|
react: 18.2.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@neondatabase/serverless@0.7.0:
|
/@neondatabase/serverless@0.6.1:
|
||||||
resolution: {integrity: sha512-93sBlhFVQWJM36WZVdwfeYnuov/fcjJzDnFJRcGeC8Ycn9YcP56sHcrdOO9SvKroJUCzxLjNGOgWbueylsBkrg==}
|
resolution: {integrity: sha512-rZIyWf27WxH4eW0ZRDQT2PxUJH3AphNVEnO4x1AGjBW6XrguH3ChLokup0gNGrX8cxDbP0UyduI7qdy4OLos+A==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/pg': 8.6.6
|
'@types/pg': 8.6.6
|
||||||
dev: false
|
dev: false
|
||||||
@@ -838,12 +838,12 @@ packages:
|
|||||||
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
|
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@prisma/adapter-neon@5.7.1(@neondatabase/serverless@0.7.0):
|
/@prisma/adapter-neon@5.7.1(@neondatabase/serverless@0.6.1):
|
||||||
resolution: {integrity: sha512-KbEv9olPVl/pVos6A4U0R4wwlIMhDPldZouptl+c2ZEkU9lYnEhfzA5oPN0/UYav4Mu9KS3Zt13JUbonR1hGbA==}
|
resolution: {integrity: sha512-KbEv9olPVl/pVos6A4U0R4wwlIMhDPldZouptl+c2ZEkU9lYnEhfzA5oPN0/UYav4Mu9KS3Zt13JUbonR1hGbA==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@neondatabase/serverless': ^0.6.0
|
'@neondatabase/serverless': ^0.6.0
|
||||||
dependencies:
|
dependencies:
|
||||||
'@neondatabase/serverless': 0.7.0
|
'@neondatabase/serverless': 0.6.1
|
||||||
'@prisma/driver-adapter-utils': 5.7.1
|
'@prisma/driver-adapter-utils': 5.7.1
|
||||||
postgres-array: 3.0.2
|
postgres-array: 3.0.2
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
|
Reference in New Issue
Block a user