@prisma/client-engine-runtime 6.6.0-dev.26 → 6.6.0-dev.28

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 @@
1
+ export declare function randomUUID(): Promise<string>;
package/dist/index.js CHANGED
@@ -425,6 +425,15 @@ var IsolationLevel = /* @__PURE__ */ ((IsolationLevel2) => {
425
425
  // src/transactionManager/TransactionManager.ts
426
426
  var import_debug = __toESM(require("@prisma/debug"));
427
427
 
428
+ // src/crypto.ts
429
+ async function getCrypto() {
430
+ return globalThis.crypto ?? await import("node:crypto");
431
+ }
432
+ async function randomUUID() {
433
+ const crypto = await getCrypto();
434
+ return crypto.randomUUID();
435
+ }
436
+
428
437
  // src/utils.ts
429
438
  function assertNever(_, message) {
430
439
  throw new Error(message);
@@ -514,7 +523,7 @@ var TransactionManager = class {
514
523
  async startTransaction(options) {
515
524
  const validatedOptions = this.validateOptions(options);
516
525
  const transaction = {
517
- id: globalThis.crypto.randomUUID(),
526
+ id: await randomUUID(),
518
527
  status: "waiting",
519
528
  timer: void 0,
520
529
  timeout: validatedOptions.timeout,
package/dist/index.mjs CHANGED
@@ -385,6 +385,15 @@ var IsolationLevel = /* @__PURE__ */ ((IsolationLevel2) => {
385
385
  // src/transactionManager/TransactionManager.ts
386
386
  import Debug from "@prisma/debug";
387
387
 
388
+ // src/crypto.ts
389
+ async function getCrypto() {
390
+ return globalThis.crypto ?? await import("node:crypto");
391
+ }
392
+ async function randomUUID() {
393
+ const crypto = await getCrypto();
394
+ return crypto.randomUUID();
395
+ }
396
+
388
397
  // src/utils.ts
389
398
  function assertNever(_, message) {
390
399
  throw new Error(message);
@@ -474,7 +483,7 @@ var TransactionManager = class {
474
483
  async startTransaction(options) {
475
484
  const validatedOptions = this.validateOptions(options);
476
485
  const transaction = {
477
- id: globalThis.crypto.randomUUID(),
486
+ id: await randomUUID(),
478
487
  status: "waiting",
479
488
  timer: void 0,
480
489
  timeout: validatedOptions.timeout,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/client-engine-runtime",
3
- "version": "6.6.0-dev.26",
3
+ "version": "6.6.0-dev.28",
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,8 +24,8 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@prisma/debug": "6.6.0-dev.26",
28
- "@prisma/driver-adapter-utils": "6.6.0-dev.26"
27
+ "@prisma/debug": "6.6.0-dev.28",
28
+ "@prisma/driver-adapter-utils": "6.6.0-dev.28"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/jest": "29.5.14",