@prisma/client-engine-runtime 6.4.0-dev.48 → 6.4.0-dev.50

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.
@@ -0,0 +1,2 @@
1
+ import type { ResultSet } from '@prisma/driver-adapter-utils';
2
+ export declare function serialize(resultSet: ResultSet): Record<string, unknown>[];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
1
+ export declare const enum IsolationLevel {
2
+ ReadUncommitted = "ReadUncommitted",
3
+ ReadCommitted = "ReadCommitted",
4
+ RepeatableRead = "RepeatableRead",
5
+ Snapshot = "Snapshot",
6
+ Serializable = "Serializable"
7
+ }
8
+ export type Options = {
9
+ maxWait?: number;
10
+ timeout?: number;
11
+ isolationLevel?: IsolationLevel;
12
+ };
13
+ export type TransactionInfo = {
14
+ id: string;
15
+ };
@@ -0,0 +1,20 @@
1
+ import { DriverAdapter, Transaction } from '@prisma/driver-adapter-utils';
2
+ import { Options, TransactionInfo } from './Transaction';
3
+ export declare class TransactionManager {
4
+ private transactions;
5
+ private closedTransactions;
6
+ private readonly driverAdapter;
7
+ constructor({ driverAdapter }: {
8
+ driverAdapter: DriverAdapter;
9
+ });
10
+ startTransaction(options: Options): Promise<TransactionInfo>;
11
+ commitTransaction(transactionId: string): Promise<void>;
12
+ rollbackTransaction(transactionId: string): Promise<void>;
13
+ getTransaction(txInfo: TransactionInfo, operation: string): Transaction;
14
+ private getActiveTransaction;
15
+ cancelAllTransactions(): Promise<void>;
16
+ private startTransactionTimeout;
17
+ private closeTransaction;
18
+ private validateOptions;
19
+ private requiresSettingIsolationLevelFirst;
20
+ }
@@ -0,0 +1,35 @@
1
+ import { Error as DriverAdapterError } from '@prisma/driver-adapter-utils';
2
+ export declare class TransactionManagerError extends Error {
3
+ meta?: Record<string, unknown> | undefined;
4
+ code: string;
5
+ constructor(message: string, meta?: Record<string, unknown> | undefined);
6
+ }
7
+ export declare class TransactionDriverAdapterError extends TransactionManagerError {
8
+ constructor(message: string, errorParams: {
9
+ driverAdapterError: DriverAdapterError;
10
+ });
11
+ }
12
+ export declare class TransactionNotFoundError extends TransactionManagerError {
13
+ constructor();
14
+ }
15
+ export declare class TransactionClosedError extends TransactionManagerError {
16
+ constructor(operation: string);
17
+ }
18
+ export declare class TransactionRolledBackError extends TransactionManagerError {
19
+ constructor(operation: string);
20
+ }
21
+ export declare class TransactionStartTimoutError extends TransactionManagerError {
22
+ constructor();
23
+ }
24
+ export declare class TransactionExecutionTimeoutError extends TransactionManagerError {
25
+ constructor(operation: string, { timeout, timeTaken }: {
26
+ timeout: number;
27
+ timeTaken: number;
28
+ });
29
+ }
30
+ export declare class TransactionInternalConsistencyError extends TransactionManagerError {
31
+ constructor(message: string);
32
+ }
33
+ export declare class InvalidTransactionIsolationLevelError extends TransactionManagerError {
34
+ constructor(isolationLevel: string);
35
+ }
@@ -0,0 +1 @@
1
+ export declare function assertNever(_: never, message: string): never;
package/package.json CHANGED
@@ -1,23 +1,45 @@
1
1
  {
2
2
  "name": "@prisma/client-engine-runtime",
3
- "version": "6.4.0-dev.48",
3
+ "version": "6.4.0-dev.50",
4
4
  "description": "This package is intended for Prisma's internal use",
5
- "type": "module",
6
5
  "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "require": {
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/index.js"
13
+ },
14
+ "import": {
15
+ "types": "./dist/index.d.mts",
16
+ "default": "./dist/index.mjs"
17
+ }
18
+ }
19
+ },
8
20
  "repository": {
9
21
  "type": "git",
10
22
  "url": "https://github.com/prisma/prisma.git",
11
23
  "directory": "packages/accelerate-contract"
12
24
  },
13
25
  "license": "Apache-2.0",
14
- "dependencies": {},
26
+ "dependencies": {
27
+ "@prisma/debug": "6.4.0-dev.50",
28
+ "@prisma/driver-adapter-utils": "6.4.0-dev.50"
29
+ },
30
+ "devDependencies": {
31
+ "@types/jest": "29.5.14",
32
+ "@types/node": "18.19.31",
33
+ "jest": "29.7.0",
34
+ "jest-junit": "16.0.0"
35
+ },
15
36
  "files": [
16
37
  "dist"
17
38
  ],
18
39
  "sideEffects": false,
19
40
  "scripts": {
20
41
  "dev": "DEV=true tsx helpers/build.ts",
21
- "build": "tsx helpers/build.ts"
42
+ "build": "tsx helpers/build.ts",
43
+ "test": "jest"
22
44
  }
23
45
  }