@prisma/client-engine-runtime 6.5.0-dev.7 → 6.5.0-dev.70

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.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { DriverAdapter } from '@prisma/driver-adapter-utils';
2
- import { Queryable } from '@prisma/driver-adapter-utils';
3
- import { Transaction } from '@prisma/driver-adapter-utils';
1
+ import { ErrorCapturingSqlConnection } from '@prisma/driver-adapter-utils';
2
+ import { ErrorCapturingSqlQueryable } from '@prisma/driver-adapter-utils';
3
+ import { ErrorCapturingTransaction } from '@prisma/driver-adapter-utils';
4
4
 
5
5
  export declare const enum IsolationLevel {
6
6
  ReadUncommitted = "ReadUncommitted",
@@ -43,7 +43,7 @@ export declare class QueryInterpreter {
43
43
  }
44
44
 
45
45
  export declare type QueryInterpreterOptions = {
46
- queryable: Queryable;
46
+ queryable: ErrorCapturingSqlQueryable;
47
47
  placeholderValues: Record<string, unknown>;
48
48
  onQuery?: (event: QueryEvent) => void;
49
49
  };
@@ -121,12 +121,12 @@ export declare class TransactionManager {
121
121
  private closedTransactions;
122
122
  private readonly driverAdapter;
123
123
  constructor({ driverAdapter }: {
124
- driverAdapter: DriverAdapter;
124
+ driverAdapter: ErrorCapturingSqlConnection;
125
125
  });
126
126
  startTransaction(options: TransactionOptions): Promise<TransactionInfo>;
127
127
  commitTransaction(transactionId: string): Promise<void>;
128
128
  rollbackTransaction(transactionId: string): Promise<void>;
129
- getTransaction(txInfo: TransactionInfo, operation: string): Transaction;
129
+ getTransaction(txInfo: TransactionInfo, operation: string): ErrorCapturingTransaction;
130
130
  private getActiveTransaction;
131
131
  cancelAllTransactions(): Promise<void>;
132
132
  private startTransactionTimeout;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { DriverAdapter } from '@prisma/driver-adapter-utils';
2
- import { Queryable } from '@prisma/driver-adapter-utils';
3
- import { Transaction } from '@prisma/driver-adapter-utils';
1
+ import { ErrorCapturingSqlConnection } from '@prisma/driver-adapter-utils';
2
+ import { ErrorCapturingSqlQueryable } from '@prisma/driver-adapter-utils';
3
+ import { ErrorCapturingTransaction } from '@prisma/driver-adapter-utils';
4
4
 
5
5
  export declare const enum IsolationLevel {
6
6
  ReadUncommitted = "ReadUncommitted",
@@ -43,7 +43,7 @@ export declare class QueryInterpreter {
43
43
  }
44
44
 
45
45
  export declare type QueryInterpreterOptions = {
46
- queryable: Queryable;
46
+ queryable: ErrorCapturingSqlQueryable;
47
47
  placeholderValues: Record<string, unknown>;
48
48
  onQuery?: (event: QueryEvent) => void;
49
49
  };
@@ -121,12 +121,12 @@ export declare class TransactionManager {
121
121
  private closedTransactions;
122
122
  private readonly driverAdapter;
123
123
  constructor({ driverAdapter }: {
124
- driverAdapter: DriverAdapter;
124
+ driverAdapter: ErrorCapturingSqlConnection;
125
125
  });
126
126
  startTransaction(options: TransactionOptions): Promise<TransactionInfo>;
127
127
  commitTransaction(transactionId: string): Promise<void>;
128
128
  rollbackTransaction(transactionId: string): Promise<void>;
129
- getTransaction(txInfo: TransactionInfo, operation: string): Transaction;
129
+ getTransaction(txInfo: TransactionInfo, operation: string): ErrorCapturingTransaction;
130
130
  private getActiveTransaction;
131
131
  cancelAllTransactions(): Promise<void>;
132
132
  private startTransactionTimeout;
package/dist/index.js CHANGED
@@ -8,6 +8,7 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
8
  var __typeError = (msg) => {
9
9
  throw TypeError(msg);
10
10
  };
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
12
  var __export = (target, all) => {
12
13
  for (var name in all)
13
14
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -29,6 +30,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
30
  mod
30
31
  ));
31
32
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
33
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
32
34
  var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
33
35
  var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
34
36
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
@@ -438,7 +440,6 @@ var IsolationLevel = /* @__PURE__ */ ((IsolationLevel2) => {
438
440
  })(IsolationLevel || {});
439
441
 
440
442
  // src/transactionManager/TransactionManager.ts
441
- var import_node_crypto = __toESM(require("node:crypto"));
442
443
  var import_debug = __toESM(require("@prisma/debug"));
443
444
 
444
445
  // src/utils.ts
@@ -451,7 +452,7 @@ var TransactionManagerError = class extends Error {
451
452
  constructor(message, meta) {
452
453
  super("Transaction API error: " + message);
453
454
  this.meta = meta;
454
- this.code = "P2028";
455
+ __publicField(this, "code", "P2028");
455
456
  }
456
457
  };
457
458
  var TransactionDriverAdapterError = class extends TransactionManagerError {
@@ -520,16 +521,17 @@ var ISOLATION_LEVEL_QUERY = (isolationLevel) => ({
520
521
  var TransactionManager = class {
521
522
  constructor({ driverAdapter }) {
522
523
  // The map of active transactions.
523
- this.transactions = /* @__PURE__ */ new Map();
524
+ __publicField(this, "transactions", /* @__PURE__ */ new Map());
524
525
  // List of last closed transactions. Max MAX_CLOSED_TRANSACTIONS entries.
525
526
  // Used to provide better error messages than a generic "transaction not found".
526
- this.closedTransactions = [];
527
+ __publicField(this, "closedTransactions", []);
528
+ __publicField(this, "driverAdapter");
527
529
  this.driverAdapter = driverAdapter;
528
530
  }
529
531
  async startTransaction(options) {
530
532
  const validatedOptions = this.validateOptions(options);
531
533
  const transaction = {
532
- id: import_node_crypto.default.randomUUID(),
534
+ id: globalThis.crypto.randomUUID(),
533
535
  status: "waiting",
534
536
  timer: void 0,
535
537
  timeout: validatedOptions.timeout,
package/dist/index.mjs CHANGED
@@ -1,6 +1,9 @@
1
+ var __defProp = Object.defineProperty;
1
2
  var __typeError = (msg) => {
2
3
  throw TypeError(msg);
3
4
  };
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
7
  var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
5
8
  var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
6
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
@@ -399,7 +402,6 @@ var IsolationLevel = /* @__PURE__ */ ((IsolationLevel2) => {
399
402
  })(IsolationLevel || {});
400
403
 
401
404
  // src/transactionManager/TransactionManager.ts
402
- import crypto from "node:crypto";
403
405
  import Debug from "@prisma/debug";
404
406
 
405
407
  // src/utils.ts
@@ -412,7 +414,7 @@ var TransactionManagerError = class extends Error {
412
414
  constructor(message, meta) {
413
415
  super("Transaction API error: " + message);
414
416
  this.meta = meta;
415
- this.code = "P2028";
417
+ __publicField(this, "code", "P2028");
416
418
  }
417
419
  };
418
420
  var TransactionDriverAdapterError = class extends TransactionManagerError {
@@ -481,16 +483,17 @@ var ISOLATION_LEVEL_QUERY = (isolationLevel) => ({
481
483
  var TransactionManager = class {
482
484
  constructor({ driverAdapter }) {
483
485
  // The map of active transactions.
484
- this.transactions = /* @__PURE__ */ new Map();
486
+ __publicField(this, "transactions", /* @__PURE__ */ new Map());
485
487
  // List of last closed transactions. Max MAX_CLOSED_TRANSACTIONS entries.
486
488
  // Used to provide better error messages than a generic "transaction not found".
487
- this.closedTransactions = [];
489
+ __publicField(this, "closedTransactions", []);
490
+ __publicField(this, "driverAdapter");
488
491
  this.driverAdapter = driverAdapter;
489
492
  }
490
493
  async startTransaction(options) {
491
494
  const validatedOptions = this.validateOptions(options);
492
495
  const transaction = {
493
- id: crypto.randomUUID(),
496
+ id: globalThis.crypto.randomUUID(),
494
497
  status: "waiting",
495
498
  timer: void 0,
496
499
  timeout: validatedOptions.timeout,
@@ -1,8 +1,8 @@
1
- import { Queryable } from '@prisma/driver-adapter-utils';
1
+ import { ErrorCapturingSqlQueryable } from '@prisma/driver-adapter-utils';
2
2
  import { QueryEvent } from '../events';
3
3
  import { QueryPlanNode } from '../QueryPlan';
4
4
  export type QueryInterpreterOptions = {
5
- queryable: Queryable;
5
+ queryable: ErrorCapturingSqlQueryable;
6
6
  placeholderValues: Record<string, unknown>;
7
7
  onQuery?: (event: QueryEvent) => void;
8
8
  };
@@ -1,4 +1,4 @@
1
- import { Query } from '@prisma/driver-adapter-utils';
1
+ import { SqlQuery } from '@prisma/driver-adapter-utils';
2
2
  import { QueryPlanDbQuery } from '../QueryPlan';
3
3
  import { ScopeBindings } from './scope';
4
- export declare function renderQuery({ query, params }: QueryPlanDbQuery, scope: ScopeBindings): Query;
4
+ export declare function renderQuery({ query, params }: QueryPlanDbQuery, scope: ScopeBindings): SqlQuery;
@@ -1,2 +1,2 @@
1
- import type { ResultSet } from '@prisma/driver-adapter-utils';
2
- export declare function serialize(resultSet: ResultSet): Record<string, unknown>[];
1
+ import type { SqlResultSet } from '@prisma/driver-adapter-utils';
2
+ export declare function serialize(resultSet: SqlResultSet): Record<string, unknown>[];
@@ -1,16 +1,16 @@
1
- import { DriverAdapter, Transaction } from '@prisma/driver-adapter-utils';
1
+ import { ErrorCapturingSqlConnection, ErrorCapturingTransaction } from '@prisma/driver-adapter-utils';
2
2
  import { Options, TransactionInfo } from './Transaction';
3
3
  export declare class TransactionManager {
4
4
  private transactions;
5
5
  private closedTransactions;
6
6
  private readonly driverAdapter;
7
7
  constructor({ driverAdapter }: {
8
- driverAdapter: DriverAdapter;
8
+ driverAdapter: ErrorCapturingSqlConnection;
9
9
  });
10
10
  startTransaction(options: Options): Promise<TransactionInfo>;
11
11
  commitTransaction(transactionId: string): Promise<void>;
12
12
  rollbackTransaction(transactionId: string): Promise<void>;
13
- getTransaction(txInfo: TransactionInfo, operation: string): Transaction;
13
+ getTransaction(txInfo: TransactionInfo, operation: string): ErrorCapturingTransaction;
14
14
  private getActiveTransaction;
15
15
  cancelAllTransactions(): Promise<void>;
16
16
  private startTransactionTimeout;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/client-engine-runtime",
3
- "version": "6.5.0-dev.7",
3
+ "version": "6.5.0-dev.70",
4
4
  "description": "This package is intended for Prisma's internal use",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -24,12 +24,12 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@prisma/debug": "6.5.0-dev.7",
28
- "@prisma/driver-adapter-utils": "6.5.0-dev.7"
27
+ "@prisma/debug": "6.5.0-dev.70",
28
+ "@prisma/driver-adapter-utils": "6.5.0-dev.70"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/jest": "29.5.14",
32
- "@types/node": "18.19.31",
32
+ "@types/node": "18.19.76",
33
33
  "jest": "29.7.0",
34
34
  "jest-junit": "16.0.0"
35
35
  },