@prisma/adapter-planetscale 7.3.0-integration-prisma6-fix-cloudflare-engine.3 → 7.3.0-integration-engines-7-3-0-10-fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521.1
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 +1 -8
- package/dist/index.mjs +1 -8
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -114,11 +114,7 @@ var cast = (field, value) => {
|
|
|
114
114
|
if (field.type === "JSON") {
|
|
115
115
|
return typeof value === "string" && value.length ? decodeUtf8(value) : value;
|
|
116
116
|
}
|
|
117
|
-
|
|
118
|
-
if (defaultValue instanceof Uint8Array) {
|
|
119
|
-
return Array.from(defaultValue);
|
|
120
|
-
}
|
|
121
|
-
return defaultValue;
|
|
117
|
+
return (0, import_database.cast)(field, value);
|
|
122
118
|
};
|
|
123
119
|
function mapArg(arg, argType) {
|
|
124
120
|
if (arg === null) {
|
|
@@ -145,9 +141,6 @@ function mapArg(arg, argType) {
|
|
|
145
141
|
if (typeof arg === "string" && argType.scalarType === "bytes") {
|
|
146
142
|
return Buffer.from(arg, "base64");
|
|
147
143
|
}
|
|
148
|
-
if (Array.isArray(arg) && argType.scalarType === "bytes") {
|
|
149
|
-
return Buffer.from(arg);
|
|
150
|
-
}
|
|
151
144
|
return arg;
|
|
152
145
|
}
|
|
153
146
|
function formatDateTime(date) {
|
package/dist/index.mjs
CHANGED
|
@@ -78,11 +78,7 @@ var cast = (field, value) => {
|
|
|
78
78
|
if (field.type === "JSON") {
|
|
79
79
|
return typeof value === "string" && value.length ? decodeUtf8(value) : value;
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
if (defaultValue instanceof Uint8Array) {
|
|
83
|
-
return Array.from(defaultValue);
|
|
84
|
-
}
|
|
85
|
-
return defaultValue;
|
|
81
|
+
return defaultCast(field, value);
|
|
86
82
|
};
|
|
87
83
|
function mapArg(arg, argType) {
|
|
88
84
|
if (arg === null) {
|
|
@@ -109,9 +105,6 @@ function mapArg(arg, argType) {
|
|
|
109
105
|
if (typeof arg === "string" && argType.scalarType === "bytes") {
|
|
110
106
|
return Buffer.from(arg, "base64");
|
|
111
107
|
}
|
|
112
|
-
if (Array.isArray(arg) && argType.scalarType === "bytes") {
|
|
113
|
-
return Buffer.from(arg);
|
|
114
|
-
}
|
|
115
108
|
return arg;
|
|
116
109
|
}
|
|
117
110
|
function formatDateTime(date) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/adapter-planetscale",
|
|
3
|
-
"version": "7.3.0-integration-
|
|
3
|
+
"version": "7.3.0-integration-engines-7-3-0-10-fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521.1",
|
|
4
4
|
"description": "Prisma's driver adapter for \"@planetscale/database\"",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"license": "Apache-2.0",
|
|
32
32
|
"sideEffects": false,
|
|
33
33
|
"dependencies": {
|
|
34
|
+
"@planetscale/database": "^1.19.0",
|
|
34
35
|
"async-mutex": "0.5.0",
|
|
35
|
-
"@
|
|
36
|
-
"@prisma/driver-adapter-utils": "7.3.0-integration-prisma6-fix-cloudflare-engine.3"
|
|
36
|
+
"@prisma/driver-adapter-utils": "7.3.0-integration-engines-7-3-0-10-fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"undici": "7.4.0"
|