@prisma/client-engine-runtime 6.9.0-dev.11 → 6.9.0-dev.13
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.
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export declare class UserFacingError extends Error {
|
|
2
2
|
name: string;
|
|
3
3
|
code: string;
|
|
4
|
-
meta: unknown
|
|
5
|
-
constructor(message: string, code: string, meta?: unknown);
|
|
4
|
+
meta: Record<string, unknown>;
|
|
5
|
+
constructor(message: string, code: string, meta?: Record<string, unknown>);
|
|
6
6
|
toQueryResponseErrorObject(): {
|
|
7
7
|
error: string;
|
|
8
8
|
user_facing_error: {
|
|
9
9
|
is_panic: boolean;
|
|
10
10
|
message: string;
|
|
11
|
-
meta: unknown
|
|
11
|
+
meta: Record<string, unknown>;
|
|
12
12
|
error_code: string;
|
|
13
13
|
};
|
|
14
14
|
};
|
package/dist/index.d.mts
CHANGED
|
@@ -307,10 +307,9 @@ export declare class TransactionManager {
|
|
|
307
307
|
private validateOptions;
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
-
export declare class TransactionManagerError extends
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
constructor(message: string, meta?: Record<string, unknown> | undefined);
|
|
310
|
+
export declare class TransactionManagerError extends UserFacingError {
|
|
311
|
+
name: string;
|
|
312
|
+
constructor(message: string, meta?: Record<string, unknown>);
|
|
314
313
|
}
|
|
315
314
|
|
|
316
315
|
export declare type TransactionOptions = {
|
|
@@ -322,14 +321,14 @@ export declare type TransactionOptions = {
|
|
|
322
321
|
export declare class UserFacingError extends Error {
|
|
323
322
|
name: string;
|
|
324
323
|
code: string;
|
|
325
|
-
meta: unknown
|
|
326
|
-
constructor(message: string, code: string, meta?: unknown);
|
|
324
|
+
meta: Record<string, unknown>;
|
|
325
|
+
constructor(message: string, code: string, meta?: Record<string, unknown>);
|
|
327
326
|
toQueryResponseErrorObject(): {
|
|
328
327
|
error: string;
|
|
329
328
|
user_facing_error: {
|
|
330
329
|
is_panic: boolean;
|
|
331
330
|
message: string;
|
|
332
|
-
meta: unknown
|
|
331
|
+
meta: Record<string, unknown>;
|
|
333
332
|
error_code: string;
|
|
334
333
|
};
|
|
335
334
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -307,10 +307,9 @@ export declare class TransactionManager {
|
|
|
307
307
|
private validateOptions;
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
-
export declare class TransactionManagerError extends
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
constructor(message: string, meta?: Record<string, unknown> | undefined);
|
|
310
|
+
export declare class TransactionManagerError extends UserFacingError {
|
|
311
|
+
name: string;
|
|
312
|
+
constructor(message: string, meta?: Record<string, unknown>);
|
|
314
313
|
}
|
|
315
314
|
|
|
316
315
|
export declare type TransactionOptions = {
|
|
@@ -322,14 +321,14 @@ export declare type TransactionOptions = {
|
|
|
322
321
|
export declare class UserFacingError extends Error {
|
|
323
322
|
name: string;
|
|
324
323
|
code: string;
|
|
325
|
-
meta: unknown
|
|
326
|
-
constructor(message: string, code: string, meta?: unknown);
|
|
324
|
+
meta: Record<string, unknown>;
|
|
325
|
+
constructor(message: string, code: string, meta?: Record<string, unknown>);
|
|
327
326
|
toQueryResponseErrorObject(): {
|
|
328
327
|
error: string;
|
|
329
328
|
user_facing_error: {
|
|
330
329
|
is_panic: boolean;
|
|
331
330
|
message: string;
|
|
332
|
-
meta: unknown
|
|
331
|
+
meta: Record<string, unknown>;
|
|
333
332
|
error_code: string;
|
|
334
333
|
};
|
|
335
334
|
};
|
package/dist/index.js
CHANGED
|
@@ -193,7 +193,7 @@ var UserFacingError = class extends Error {
|
|
|
193
193
|
constructor(message, code, meta) {
|
|
194
194
|
super(message);
|
|
195
195
|
this.code = code;
|
|
196
|
-
this.meta = meta;
|
|
196
|
+
this.meta = meta ?? {};
|
|
197
197
|
}
|
|
198
198
|
toQueryResponseErrorObject() {
|
|
199
199
|
return {
|
|
@@ -216,7 +216,7 @@ function rethrowAsUserFacing(error) {
|
|
|
216
216
|
if (!code || !message) {
|
|
217
217
|
throw error;
|
|
218
218
|
}
|
|
219
|
-
throw new UserFacingError(message, code, error);
|
|
219
|
+
throw new UserFacingError(message, code, { driverAdapterError: error });
|
|
220
220
|
}
|
|
221
221
|
function getErrorCode(err) {
|
|
222
222
|
switch (err.cause.kind) {
|
|
@@ -759,6 +759,9 @@ var QueryInterpreter = class _QueryInterpreter {
|
|
|
759
759
|
}
|
|
760
760
|
case "join": {
|
|
761
761
|
const parent = await this.interpretNode(node.args.parent, queryable, scope, generators);
|
|
762
|
+
if (parent === null) {
|
|
763
|
+
return null;
|
|
764
|
+
}
|
|
762
765
|
const children = await Promise.all(
|
|
763
766
|
node.args.children.map(async (joinExpr) => ({
|
|
764
767
|
joinExpr,
|
|
@@ -973,12 +976,11 @@ async function randomUUID() {
|
|
|
973
976
|
}
|
|
974
977
|
|
|
975
978
|
// src/transactionManager/TransactionManagerErrors.ts
|
|
976
|
-
var TransactionManagerError = class extends
|
|
979
|
+
var TransactionManagerError = class extends UserFacingError {
|
|
980
|
+
name = "TransactionManagerError";
|
|
977
981
|
constructor(message, meta) {
|
|
978
|
-
super("Transaction API error: " + message);
|
|
979
|
-
this.meta = meta;
|
|
982
|
+
super("Transaction API error: " + message, "P2028", meta);
|
|
980
983
|
}
|
|
981
|
-
code = "P2028";
|
|
982
984
|
};
|
|
983
985
|
var TransactionNotFoundError = class extends TransactionManagerError {
|
|
984
986
|
constructor() {
|
package/dist/index.mjs
CHANGED
|
@@ -148,7 +148,7 @@ var UserFacingError = class extends Error {
|
|
|
148
148
|
constructor(message, code, meta) {
|
|
149
149
|
super(message);
|
|
150
150
|
this.code = code;
|
|
151
|
-
this.meta = meta;
|
|
151
|
+
this.meta = meta ?? {};
|
|
152
152
|
}
|
|
153
153
|
toQueryResponseErrorObject() {
|
|
154
154
|
return {
|
|
@@ -171,7 +171,7 @@ function rethrowAsUserFacing(error) {
|
|
|
171
171
|
if (!code || !message) {
|
|
172
172
|
throw error;
|
|
173
173
|
}
|
|
174
|
-
throw new UserFacingError(message, code, error);
|
|
174
|
+
throw new UserFacingError(message, code, { driverAdapterError: error });
|
|
175
175
|
}
|
|
176
176
|
function getErrorCode(err) {
|
|
177
177
|
switch (err.cause.kind) {
|
|
@@ -714,6 +714,9 @@ var QueryInterpreter = class _QueryInterpreter {
|
|
|
714
714
|
}
|
|
715
715
|
case "join": {
|
|
716
716
|
const parent = await this.interpretNode(node.args.parent, queryable, scope, generators);
|
|
717
|
+
if (parent === null) {
|
|
718
|
+
return null;
|
|
719
|
+
}
|
|
717
720
|
const children = await Promise.all(
|
|
718
721
|
node.args.children.map(async (joinExpr) => ({
|
|
719
722
|
joinExpr,
|
|
@@ -928,12 +931,11 @@ async function randomUUID() {
|
|
|
928
931
|
}
|
|
929
932
|
|
|
930
933
|
// src/transactionManager/TransactionManagerErrors.ts
|
|
931
|
-
var TransactionManagerError = class extends
|
|
934
|
+
var TransactionManagerError = class extends UserFacingError {
|
|
935
|
+
name = "TransactionManagerError";
|
|
932
936
|
constructor(message, meta) {
|
|
933
|
-
super("Transaction API error: " + message);
|
|
934
|
-
this.meta = meta;
|
|
937
|
+
super("Transaction API error: " + message, "P2028", meta);
|
|
935
938
|
}
|
|
936
|
-
code = "P2028";
|
|
937
939
|
};
|
|
938
940
|
var TransactionNotFoundError = class extends TransactionManagerError {
|
|
939
941
|
constructor() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
constructor(message: string, meta?: Record<string, unknown>
|
|
1
|
+
import { UserFacingError } from '../UserFacingError';
|
|
2
|
+
export declare class TransactionManagerError extends UserFacingError {
|
|
3
|
+
name: string;
|
|
4
|
+
constructor(message: string, meta?: Record<string, unknown>);
|
|
5
5
|
}
|
|
6
6
|
export declare class TransactionNotFoundError extends TransactionManagerError {
|
|
7
7
|
constructor();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-engine-runtime",
|
|
3
|
-
"version": "6.9.0-dev.
|
|
3
|
+
"version": "6.9.0-dev.13",
|
|
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.9.0-dev.
|
|
35
|
-
"@prisma/driver-adapter-utils": "6.9.0-dev.
|
|
34
|
+
"@prisma/debug": "6.9.0-dev.13",
|
|
35
|
+
"@prisma/driver-adapter-utils": "6.9.0-dev.13"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/jest": "29.5.14",
|