@prisma/adapter-libsql 6.10.0-dev.1 → 6.10.0-dev.11
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-node.js +8 -4
- package/dist/index-node.mjs +8 -4
- package/dist/index-web.js +8 -4
- package/dist/index-web.mjs +8 -4
- package/package.json +2 -2
package/dist/index-node.js
CHANGED
|
@@ -181,16 +181,20 @@ function convertDriverError(error) {
|
|
|
181
181
|
const rawCode = error.rawCode ?? error.cause?.["rawCode"];
|
|
182
182
|
switch (rawCode) {
|
|
183
183
|
case 2067:
|
|
184
|
-
case 1555:
|
|
184
|
+
case 1555: {
|
|
185
|
+
const fields = error.message.split("constraint failed: ").at(1)?.split(", ").map((field) => field.split(".").pop());
|
|
185
186
|
return {
|
|
186
187
|
kind: "UniqueConstraintViolation",
|
|
187
|
-
|
|
188
|
+
constraint: fields !== void 0 ? { fields } : void 0
|
|
188
189
|
};
|
|
189
|
-
|
|
190
|
+
}
|
|
191
|
+
case 1299: {
|
|
192
|
+
const fields = error.message.split("constraint failed: ").at(1)?.split(", ").map((field) => field.split(".").pop());
|
|
190
193
|
return {
|
|
191
194
|
kind: "NullConstraintViolation",
|
|
192
|
-
|
|
195
|
+
constraint: fields !== void 0 ? { fields } : void 0
|
|
193
196
|
};
|
|
197
|
+
}
|
|
194
198
|
case 787:
|
|
195
199
|
case 1811:
|
|
196
200
|
return {
|
package/dist/index-node.mjs
CHANGED
|
@@ -155,16 +155,20 @@ function convertDriverError(error) {
|
|
|
155
155
|
const rawCode = error.rawCode ?? error.cause?.["rawCode"];
|
|
156
156
|
switch (rawCode) {
|
|
157
157
|
case 2067:
|
|
158
|
-
case 1555:
|
|
158
|
+
case 1555: {
|
|
159
|
+
const fields = error.message.split("constraint failed: ").at(1)?.split(", ").map((field) => field.split(".").pop());
|
|
159
160
|
return {
|
|
160
161
|
kind: "UniqueConstraintViolation",
|
|
161
|
-
|
|
162
|
+
constraint: fields !== void 0 ? { fields } : void 0
|
|
162
163
|
};
|
|
163
|
-
|
|
164
|
+
}
|
|
165
|
+
case 1299: {
|
|
166
|
+
const fields = error.message.split("constraint failed: ").at(1)?.split(", ").map((field) => field.split(".").pop());
|
|
164
167
|
return {
|
|
165
168
|
kind: "NullConstraintViolation",
|
|
166
|
-
|
|
169
|
+
constraint: fields !== void 0 ? { fields } : void 0
|
|
167
170
|
};
|
|
171
|
+
}
|
|
168
172
|
case 787:
|
|
169
173
|
case 1811:
|
|
170
174
|
return {
|
package/dist/index-web.js
CHANGED
|
@@ -181,16 +181,20 @@ function convertDriverError(error) {
|
|
|
181
181
|
const rawCode = error.rawCode ?? error.cause?.["rawCode"];
|
|
182
182
|
switch (rawCode) {
|
|
183
183
|
case 2067:
|
|
184
|
-
case 1555:
|
|
184
|
+
case 1555: {
|
|
185
|
+
const fields = error.message.split("constraint failed: ").at(1)?.split(", ").map((field) => field.split(".").pop());
|
|
185
186
|
return {
|
|
186
187
|
kind: "UniqueConstraintViolation",
|
|
187
|
-
|
|
188
|
+
constraint: fields !== void 0 ? { fields } : void 0
|
|
188
189
|
};
|
|
189
|
-
|
|
190
|
+
}
|
|
191
|
+
case 1299: {
|
|
192
|
+
const fields = error.message.split("constraint failed: ").at(1)?.split(", ").map((field) => field.split(".").pop());
|
|
190
193
|
return {
|
|
191
194
|
kind: "NullConstraintViolation",
|
|
192
|
-
|
|
195
|
+
constraint: fields !== void 0 ? { fields } : void 0
|
|
193
196
|
};
|
|
197
|
+
}
|
|
194
198
|
case 787:
|
|
195
199
|
case 1811:
|
|
196
200
|
return {
|
package/dist/index-web.mjs
CHANGED
|
@@ -155,16 +155,20 @@ function convertDriverError(error) {
|
|
|
155
155
|
const rawCode = error.rawCode ?? error.cause?.["rawCode"];
|
|
156
156
|
switch (rawCode) {
|
|
157
157
|
case 2067:
|
|
158
|
-
case 1555:
|
|
158
|
+
case 1555: {
|
|
159
|
+
const fields = error.message.split("constraint failed: ").at(1)?.split(", ").map((field) => field.split(".").pop());
|
|
159
160
|
return {
|
|
160
161
|
kind: "UniqueConstraintViolation",
|
|
161
|
-
|
|
162
|
+
constraint: fields !== void 0 ? { fields } : void 0
|
|
162
163
|
};
|
|
163
|
-
|
|
164
|
+
}
|
|
165
|
+
case 1299: {
|
|
166
|
+
const fields = error.message.split("constraint failed: ").at(1)?.split(", ").map((field) => field.split(".").pop());
|
|
164
167
|
return {
|
|
165
168
|
kind: "NullConstraintViolation",
|
|
166
|
-
|
|
169
|
+
constraint: fields !== void 0 ? { fields } : void 0
|
|
167
170
|
};
|
|
171
|
+
}
|
|
168
172
|
case 787:
|
|
169
173
|
case 1811:
|
|
170
174
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/adapter-libsql",
|
|
3
|
-
"version": "6.10.0-dev.
|
|
3
|
+
"version": "6.10.0-dev.11",
|
|
4
4
|
"description": "Prisma's driver adapter for libSQL and Turso",
|
|
5
5
|
"main": "dist/index-node.js",
|
|
6
6
|
"module": "dist/index-node.mjs",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@libsql/client": "^0.3.5 || ^0.4.0 || ^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0",
|
|
45
45
|
"async-mutex": "0.5.0",
|
|
46
|
-
"@prisma/driver-adapter-utils": "6.10.0-dev.
|
|
46
|
+
"@prisma/driver-adapter-utils": "6.10.0-dev.11"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"jest": "29.7.0",
|