@prisma/adapter-neon 7.2.0-integration-fix-enums-mapped-types-v7.2 → 7.2.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/dist/index.js +3 -14
- package/dist/index.mjs +3 -14
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -316,18 +316,10 @@ function normalize_xml(xml) {
|
|
|
316
316
|
function toJson(json) {
|
|
317
317
|
return json;
|
|
318
318
|
}
|
|
319
|
-
function encodeBuffer(buffer) {
|
|
320
|
-
return Array.from(new Uint8Array(buffer));
|
|
321
|
-
}
|
|
322
319
|
var parsePgBytes = getTypeParser(ScalarColumnType.BYTEA);
|
|
323
|
-
var
|
|
324
|
-
function normalizeByteaArray(serializedBytesArray) {
|
|
325
|
-
const buffers = parseBytesArray(serializedBytesArray);
|
|
326
|
-
return buffers.map((buf) => buf ? encodeBuffer(buf) : null);
|
|
327
|
-
}
|
|
320
|
+
var normalizeByteaArray = getTypeParser(ArrayColumnType.BYTEA_ARRAY);
|
|
328
321
|
function convertBytes(serializedBytes) {
|
|
329
|
-
|
|
330
|
-
return encodeBuffer(buffer);
|
|
322
|
+
return parsePgBytes(serializedBytes);
|
|
331
323
|
}
|
|
332
324
|
function normalizeBit(bit) {
|
|
333
325
|
return bit;
|
|
@@ -380,11 +372,8 @@ function mapArg(arg, argType) {
|
|
|
380
372
|
if (typeof arg === "string" && argType.scalarType === "bytes") {
|
|
381
373
|
return Buffer.from(arg, "base64");
|
|
382
374
|
}
|
|
383
|
-
if (Array.isArray(arg) && argType.scalarType === "bytes") {
|
|
384
|
-
return Buffer.from(arg);
|
|
385
|
-
}
|
|
386
375
|
if (ArrayBuffer.isView(arg)) {
|
|
387
|
-
return
|
|
376
|
+
return new Uint8Array(arg.buffer, arg.byteOffset, arg.byteLength);
|
|
388
377
|
}
|
|
389
378
|
return arg;
|
|
390
379
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -279,18 +279,10 @@ function normalize_xml(xml) {
|
|
|
279
279
|
function toJson(json) {
|
|
280
280
|
return json;
|
|
281
281
|
}
|
|
282
|
-
function encodeBuffer(buffer) {
|
|
283
|
-
return Array.from(new Uint8Array(buffer));
|
|
284
|
-
}
|
|
285
282
|
var parsePgBytes = getTypeParser(ScalarColumnType.BYTEA);
|
|
286
|
-
var
|
|
287
|
-
function normalizeByteaArray(serializedBytesArray) {
|
|
288
|
-
const buffers = parseBytesArray(serializedBytesArray);
|
|
289
|
-
return buffers.map((buf) => buf ? encodeBuffer(buf) : null);
|
|
290
|
-
}
|
|
283
|
+
var normalizeByteaArray = getTypeParser(ArrayColumnType.BYTEA_ARRAY);
|
|
291
284
|
function convertBytes(serializedBytes) {
|
|
292
|
-
|
|
293
|
-
return encodeBuffer(buffer);
|
|
285
|
+
return parsePgBytes(serializedBytes);
|
|
294
286
|
}
|
|
295
287
|
function normalizeBit(bit) {
|
|
296
288
|
return bit;
|
|
@@ -343,11 +335,8 @@ function mapArg(arg, argType) {
|
|
|
343
335
|
if (typeof arg === "string" && argType.scalarType === "bytes") {
|
|
344
336
|
return Buffer.from(arg, "base64");
|
|
345
337
|
}
|
|
346
|
-
if (Array.isArray(arg) && argType.scalarType === "bytes") {
|
|
347
|
-
return Buffer.from(arg);
|
|
348
|
-
}
|
|
349
338
|
if (ArrayBuffer.isView(arg)) {
|
|
350
|
-
return
|
|
339
|
+
return new Uint8Array(arg.buffer, arg.byteOffset, arg.byteLength);
|
|
351
340
|
}
|
|
352
341
|
return arg;
|
|
353
342
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/adapter-neon",
|
|
3
|
-
"version": "7.2.0
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "Prisma's driver adapter for \"@neondatabase/serverless\"",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"postgres-array": "3.0.4",
|
|
35
35
|
"@neondatabase/serverless": ">0.6.0 <2",
|
|
36
|
-
"@prisma/driver-adapter-utils": "7.2.0
|
|
36
|
+
"@prisma/driver-adapter-utils": "7.2.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@prisma/debug": "7.2.0
|
|
39
|
+
"@prisma/debug": "7.2.0"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"dev": "DEV=true tsx helpers/build.ts",
|