fix(api-prisma): initialize prisma client with pg adapter

This commit is contained in:
2026-04-05 01:07:05 +08:00
parent 3a9b5fb000
commit e84bef07b4
3 changed files with 209 additions and 0 deletions
+192
View File
@@ -55,6 +55,9 @@ importers:
"@otplib/preset-default":
specifier: ^12.0.1
version: 12.0.1
"@prisma/adapter-pg":
specifier: ^7.6.0
version: 7.6.0
"@prisma/client":
specifier: ^7.6.0
version: 7.6.0(prisma@7.6.0(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3))(typescript@5.9.3)
@@ -67,6 +70,9 @@ importers:
otplib:
specifier: ^13.4.0
version: 13.4.0
pg:
specifier: ^8.20.0
version: 8.20.0
reflect-metadata:
specifier: ^0.2.2
version: 0.2.2
@@ -1248,6 +1254,12 @@ packages:
}
engines: { node: ^12.20.0 || ^14.18.0 || >=16.0.0 }
"@prisma/adapter-pg@7.6.0":
resolution:
{
integrity: sha512-BjHNmJqqa42NqJSDPnXUfwUofWo8LJY7Ui2gqxN4DmAOb+H/gGKv+hln2Xq/1kSJXPW5AXMXuNiPDMpywvyIOw==
}
"@prisma/client-runtime-utils@7.6.0":
resolution:
{
@@ -1293,6 +1305,12 @@ packages:
integrity: sha512-ffHlQuKXZiaDt9Go0OnCTdJZrHxK0k7omJKNV86/VjpsXu5EIHZLK0T7JSWgvNlJwh56kW9JFu9v0qJciFzepg==
}
"@prisma/driver-adapter-utils@7.6.0":
resolution:
{
integrity: sha512-D8j3p0RnhLuufMaRLX6QqtGgPC5Ao3l5oFP6Q5AL0rTHi4vna+NzGEipwCsfvcSvaGFCbsH3lsTMbb4WvY+ovA==
}
"@prisma/engines-version@7.6.0-1.75cbdc1eb7150937890ad5465d861175c6624711":
resolution:
{
@@ -2087,6 +2105,12 @@ packages:
integrity: sha512-aciLyx+wDwT2t2/kJGJR2AEeBz0nJU4WuRX04Wu9Dqc5lSUtwu0WERPHYsLhF9PtseiAMPBGNUOtFjxZ56prsg==
}
"@types/pg@8.20.0":
resolution:
{
integrity: sha512-bEPFOaMAHTEP1EzpvHTbmwR8UsFyHSKsRisLIHVMXnpNefSbGA1bD6CVy+qKjGSqmZqNqBDV2azOBo8TgkcVow==
}
"@types/qs@6.15.0":
resolution:
{
@@ -4729,6 +4753,64 @@ packages:
integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==
}
pg-cloudflare@1.3.0:
resolution:
{
integrity: sha512-6lswVVSztmHiRtD6I8hw4qP/nDm1EJbKMRhf3HCYaqud7frGysPv7FYJ5noZQdhQtN2xJnimfMtvQq21pdbzyQ==
}
pg-connection-string@2.12.0:
resolution:
{
integrity: sha512-U7qg+bpswf3Cs5xLzRqbXbQl85ng0mfSV/J0nnA31MCLgvEaAo7CIhmeyrmJpOr7o+zm0rXK+hNnT5l9RHkCkQ==
}
pg-int8@1.0.1:
resolution:
{
integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==
}
engines: { node: ">=4.0.0" }
pg-pool@3.13.0:
resolution:
{
integrity: sha512-gB+R+Xud1gLFuRD/QgOIgGOBE2KCQPaPwkzBBGC9oG69pHTkhQeIuejVIk3/cnDyX39av2AxomQiyPT13WKHQA==
}
peerDependencies:
pg: ">=8.0"
pg-protocol@1.13.0:
resolution:
{
integrity: sha512-zzdvXfS6v89r6v7OcFCHfHlyG/wvry1ALxZo4LqgUoy7W9xhBDMaqOuMiF3qEV45VqsN6rdlcehHrfDtlCPc8w==
}
pg-types@2.2.0:
resolution:
{
integrity: sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==
}
engines: { node: ">=4" }
pg@8.20.0:
resolution:
{
integrity: sha512-ldhMxz2r8fl/6QkXnBD3CR9/xg694oT6DZQ2s6c/RI28OjtSOpxnPrUCGOBJ46RCUxcWdx3p6kw/xnDHjKvaRA==
}
engines: { node: ">= 16.0.0" }
peerDependencies:
pg-native: ">=3.0.1"
peerDependenciesMeta:
pg-native:
optional: true
pgpass@1.0.5:
resolution:
{
integrity: sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==
}
picocolors@1.1.1:
resolution:
{
@@ -4769,6 +4851,41 @@ packages:
integrity: sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig==
}
postgres-array@2.0.0:
resolution:
{
integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==
}
engines: { node: ">=4" }
postgres-array@3.0.4:
resolution:
{
integrity: sha512-nAUSGfSDGOaOAEGwqsRY27GPOea7CNipJPOA7lPbdEpx5Kg3qzdP0AaWC5MlhTWV9s4hFX39nomVZ+C4tnGOJQ==
}
engines: { node: ">=12" }
postgres-bytea@1.0.1:
resolution:
{
integrity: sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ==
}
engines: { node: ">=0.10.0" }
postgres-date@1.0.7:
resolution:
{
integrity: sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==
}
engines: { node: ">=0.10.0" }
postgres-interval@1.2.0:
resolution:
{
integrity: sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==
}
engines: { node: ">=0.10.0" }
postgres@3.4.7:
resolution:
{
@@ -5164,6 +5281,13 @@ packages:
}
engines: { node: ">=0.10.0" }
split2@4.2.0:
resolution:
{
integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==
}
engines: { node: ">= 10.x" }
sprintf-js@1.0.3:
resolution:
{
@@ -6869,6 +6993,15 @@ snapshots:
"@pkgr/core@0.2.9": {}
"@prisma/adapter-pg@7.6.0":
dependencies:
"@prisma/driver-adapter-utils": 7.6.0
"@types/pg": 8.20.0
pg: 8.20.0
postgres-array: 3.0.4
transitivePeerDependencies:
- pg-native
"@prisma/client-runtime-utils@7.6.0": {}
"@prisma/client@7.6.0(prisma@7.6.0(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.9.3))(typescript@5.9.3)":
@@ -6913,6 +7046,10 @@ snapshots:
transitivePeerDependencies:
- typescript
"@prisma/driver-adapter-utils@7.6.0":
dependencies:
"@prisma/debug": 7.6.0
"@prisma/engines-version@7.6.0-1.75cbdc1eb7150937890ad5465d861175c6624711": {}
"@prisma/engines@7.6.0":
@@ -7496,6 +7633,12 @@ snapshots:
dependencies:
"@types/express": 5.0.6
"@types/pg@8.20.0":
dependencies:
"@types/node": 25.5.2
pg-protocol: 1.13.0
pg-types: 2.2.0
"@types/qs@6.15.0": {}
"@types/range-parser@1.2.7": {}
@@ -9135,6 +9278,41 @@ snapshots:
perfect-debounce@1.0.0: {}
pg-cloudflare@1.3.0:
optional: true
pg-connection-string@2.12.0: {}
pg-int8@1.0.1: {}
pg-pool@3.13.0(pg@8.20.0):
dependencies:
pg: 8.20.0
pg-protocol@1.13.0: {}
pg-types@2.2.0:
dependencies:
pg-int8: 1.0.1
postgres-array: 2.0.0
postgres-bytea: 1.0.1
postgres-date: 1.0.7
postgres-interval: 1.2.0
pg@8.20.0:
dependencies:
pg-connection-string: 2.12.0
pg-pool: 3.13.0(pg@8.20.0)
pg-protocol: 1.13.0
pg-types: 2.2.0
pgpass: 1.0.5
optionalDependencies:
pg-cloudflare: 1.3.0
pgpass@1.0.5:
dependencies:
split2: 4.2.0
picocolors@1.1.1: {}
picomatch@2.3.2: {}
@@ -9153,6 +9331,18 @@ snapshots:
exsolve: 1.0.8
pathe: 2.0.3
postgres-array@2.0.0: {}
postgres-array@3.0.4: {}
postgres-bytea@1.0.1: {}
postgres-date@1.0.7: {}
postgres-interval@1.2.0:
dependencies:
xtend: 4.0.2
postgres@3.4.7: {}
prelude-ls@1.2.1: {}
@@ -9388,6 +9578,8 @@ snapshots:
source-map@0.6.1: {}
split2@4.2.0: {}
sprintf-js@1.0.3: {}
sqlstring@2.3.3: {}