@prisma/client-engine-runtime 6.16.0-dev.30 → 6.16.0-dev.32

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 CHANGED
@@ -136,8 +136,8 @@ function safeJsonStringify(obj) {
136
136
  return JSON.stringify(obj, (_key, val) => {
137
137
  if (typeof val === "bigint") {
138
138
  return val.toString();
139
- } else if (val instanceof Uint8Array) {
140
- return Buffer.from(val).toString("base64");
139
+ } else if (ArrayBuffer.isView(val)) {
140
+ return Buffer.from(val.buffer, val.byteOffset, val.byteLength).toString("base64");
141
141
  }
142
142
  return val;
143
143
  });
@@ -155,6 +155,10 @@ function normalizeJsonProtocolValues(result) {
155
155
  if (isTaggedValue(result)) {
156
156
  return normalizeTaggedValue(result);
157
157
  }
158
+ if (ArrayBuffer.isView(result)) {
159
+ const buffer = Buffer.from(result.buffer, result.byteOffset, result.byteLength);
160
+ return buffer.toString("base64");
161
+ }
158
162
  if (result.constructor !== null && result.constructor.name !== "Object") {
159
163
  return result;
160
164
  }
package/dist/index.mjs CHANGED
@@ -86,8 +86,8 @@ function safeJsonStringify(obj) {
86
86
  return JSON.stringify(obj, (_key, val) => {
87
87
  if (typeof val === "bigint") {
88
88
  return val.toString();
89
- } else if (val instanceof Uint8Array) {
90
- return Buffer.from(val).toString("base64");
89
+ } else if (ArrayBuffer.isView(val)) {
90
+ return Buffer.from(val.buffer, val.byteOffset, val.byteLength).toString("base64");
91
91
  }
92
92
  return val;
93
93
  });
@@ -105,6 +105,10 @@ function normalizeJsonProtocolValues(result) {
105
105
  if (isTaggedValue(result)) {
106
106
  return normalizeTaggedValue(result);
107
107
  }
108
+ if (ArrayBuffer.isView(result)) {
109
+ const buffer = Buffer.from(result.buffer, result.byteOffset, result.byteLength);
110
+ return buffer.toString("base64");
111
+ }
108
112
  if (result.constructor !== null && result.constructor.name !== "Object") {
109
113
  return result;
110
114
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/client-engine-runtime",
3
- "version": "6.16.0-dev.30",
3
+ "version": "6.16.0-dev.32",
4
4
  "description": "This package is intended for Prisma's internal use",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -31,8 +31,8 @@
31
31
  "nanoid": "5.1.5",
32
32
  "ulid": "3.0.0",
33
33
  "uuid": "11.1.0",
34
- "@prisma/debug": "6.16.0-dev.30",
35
- "@prisma/driver-adapter-utils": "6.16.0-dev.30"
34
+ "@prisma/debug": "6.16.0-dev.32",
35
+ "@prisma/driver-adapter-utils": "6.16.0-dev.32"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/jest": "29.5.14",