prisma 6.6.0-dev.4 → 6.6.0-dev.41
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/build/index.js +1070 -1175
- package/build/prisma_schema_build_bg.wasm +0 -0
- package/package.json +16 -15
- package/preinstall/index.js +4 -4
- package/prisma-client/generator-build/index.js +140 -146
- package/prisma-client/package.json +8 -8
- package/prisma-client/runtime/binary.js +120 -120
- package/prisma-client/runtime/client.d.ts +41 -37
- package/prisma-client/runtime/client.js +38 -38
- package/prisma-client/runtime/edge-esm.js +18 -18
- package/prisma-client/runtime/edge.js +18 -18
- package/prisma-client/runtime/library.d.ts +41 -37
- package/prisma-client/runtime/library.js +56 -56
- package/prisma-client/runtime/query_engine_bg.mysql.js +2 -2
- package/prisma-client/runtime/query_engine_bg.postgresql.js +2 -2
- package/prisma-client/runtime/query_engine_bg.sqlite.js +2 -2
- package/prisma-client/runtime/react-native.d.ts +41 -37
- package/prisma-client/runtime/react-native.js +23 -23
- package/prisma-client/scripts/default-index.js +3 -3
@@ -5,7 +5,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
9
8
|
var __esm = (fn, res) => function __init() {
|
10
9
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
11
10
|
};
|
@@ -33,20 +32,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
33
32
|
mod
|
34
33
|
));
|
35
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
36
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
37
35
|
|
38
|
-
// ../../node_modules/.pnpm/@prisma+engines-version@6.
|
36
|
+
// ../../node_modules/.pnpm/@prisma+engines-version@6.6.0-25.0302bd9e49a13a657a302c060e529d54b08fad04/node_modules/@prisma/engines-version/package.json
|
39
37
|
var require_package = __commonJS({
|
40
|
-
"../../node_modules/.pnpm/@prisma+engines-version@6.
|
38
|
+
"../../node_modules/.pnpm/@prisma+engines-version@6.6.0-25.0302bd9e49a13a657a302c060e529d54b08fad04/node_modules/@prisma/engines-version/package.json"(exports2, module2) {
|
41
39
|
module2.exports = {
|
42
40
|
name: "@prisma/engines-version",
|
43
|
-
version: "6.
|
41
|
+
version: "6.6.0-25.0302bd9e49a13a657a302c060e529d54b08fad04",
|
44
42
|
main: "index.js",
|
45
43
|
types: "index.d.ts",
|
46
44
|
license: "Apache-2.0",
|
47
45
|
author: "Tim Suchanek <suchanek@prisma.io>",
|
48
46
|
prisma: {
|
49
|
-
enginesVersion: "
|
47
|
+
enginesVersion: "0302bd9e49a13a657a302c060e529d54b08fad04"
|
50
48
|
},
|
51
49
|
repository: {
|
52
50
|
type: "git",
|
@@ -68,9 +66,9 @@ var require_package = __commonJS({
|
|
68
66
|
}
|
69
67
|
});
|
70
68
|
|
71
|
-
// ../../node_modules/.pnpm/@prisma+engines-version@6.
|
69
|
+
// ../../node_modules/.pnpm/@prisma+engines-version@6.6.0-25.0302bd9e49a13a657a302c060e529d54b08fad04/node_modules/@prisma/engines-version/index.js
|
72
70
|
var require_engines_version = __commonJS({
|
73
|
-
"../../node_modules/.pnpm/@prisma+engines-version@6.
|
71
|
+
"../../node_modules/.pnpm/@prisma+engines-version@6.6.0-25.0302bd9e49a13a657a302c060e529d54b08fad04/node_modules/@prisma/engines-version/index.js"(exports2) {
|
74
72
|
"use strict";
|
75
73
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
76
74
|
exports2.enginesVersion = void 0;
|
@@ -3060,7 +3058,7 @@ var require_package2 = __commonJS({
|
|
3060
3058
|
"package.json"(exports2, module2) {
|
3061
3059
|
module2.exports = {
|
3062
3060
|
name: "@prisma/client",
|
3063
|
-
version: "6.6.0-dev.
|
3061
|
+
version: "6.6.0-dev.41",
|
3064
3062
|
description: "Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.",
|
3065
3063
|
keywords: [
|
3066
3064
|
"ORM",
|
@@ -3244,7 +3242,7 @@ var require_package2 = __commonJS({
|
|
3244
3242
|
devDependencies: {
|
3245
3243
|
"@cloudflare/workers-types": "4.20250214.0",
|
3246
3244
|
"@codspeed/benchmark.js-plugin": "4.0.0",
|
3247
|
-
"@faker-js/faker": "9.
|
3245
|
+
"@faker-js/faker": "9.6.0",
|
3248
3246
|
"@fast-check/jest": "2.0.3",
|
3249
3247
|
"@inquirer/prompts": "7.3.3",
|
3250
3248
|
"@jest/create-cache-key-function": "29.7.0",
|
@@ -3270,7 +3268,7 @@ var require_package2 = __commonJS({
|
|
3270
3268
|
"@prisma/debug": "workspace:*",
|
3271
3269
|
"@prisma/driver-adapter-utils": "workspace:*",
|
3272
3270
|
"@prisma/engines": "workspace:*",
|
3273
|
-
"@prisma/engines-version": "6.
|
3271
|
+
"@prisma/engines-version": "6.6.0-25.0302bd9e49a13a657a302c060e529d54b08fad04",
|
3274
3272
|
"@prisma/fetch-engine": "workspace:*",
|
3275
3273
|
"@prisma/generator-helper": "workspace:*",
|
3276
3274
|
"@prisma/get-platform": "workspace:*",
|
@@ -3279,8 +3277,8 @@ var require_package2 = __commonJS({
|
|
3279
3277
|
"@prisma/migrate": "workspace:*",
|
3280
3278
|
"@prisma/mini-proxy": "0.9.5",
|
3281
3279
|
"@prisma/pg-worker": "workspace:*",
|
3282
|
-
"@prisma/query-compiler-wasm": "6.
|
3283
|
-
"@prisma/query-engine-wasm": "6.
|
3280
|
+
"@prisma/query-compiler-wasm": "6.6.0-25.0302bd9e49a13a657a302c060e529d54b08fad04",
|
3281
|
+
"@prisma/query-engine-wasm": "6.6.0-25.0302bd9e49a13a657a302c060e529d54b08fad04",
|
3284
3282
|
"@snaplet/copycat": "6.0.0",
|
3285
3283
|
"@swc-node/register": "1.10.9",
|
3286
3284
|
"@swc/core": "1.11.5",
|
@@ -3295,7 +3293,7 @@ var require_package2 = __commonJS({
|
|
3295
3293
|
"@types/pg": "8.11.11",
|
3296
3294
|
arg: "5.0.2",
|
3297
3295
|
benchmark: "2.1.4",
|
3298
|
-
"ci-info": "4.
|
3296
|
+
"ci-info": "4.2.0",
|
3299
3297
|
"decimal.js": "10.5.0",
|
3300
3298
|
"env-paths": "2.2.1",
|
3301
3299
|
esbuild: "0.24.2",
|
@@ -3331,14 +3329,14 @@ var require_package2 = __commonJS({
|
|
3331
3329
|
"sql-template-tag": "5.2.1",
|
3332
3330
|
"stacktrace-parser": "0.1.11",
|
3333
3331
|
"strip-ansi": "6.0.1",
|
3334
|
-
"strip-indent": "
|
3332
|
+
"strip-indent": "4.0.0",
|
3335
3333
|
"ts-node": "10.9.2",
|
3336
3334
|
"ts-pattern": "5.6.2",
|
3337
3335
|
tsd: "0.31.2",
|
3338
3336
|
typescript: "5.4.5",
|
3339
3337
|
undici: "7.4.0",
|
3340
3338
|
wrangler: "3.111.0",
|
3341
|
-
zx: "
|
3339
|
+
zx: "8.4.1"
|
3342
3340
|
},
|
3343
3341
|
peerDependencies: {
|
3344
3342
|
prisma: "*",
|
@@ -3532,13 +3530,11 @@ var init_TypeBuilder = __esm({
|
|
3532
3530
|
"src/generation/ts-builders/TypeBuilder.ts"() {
|
3533
3531
|
"use strict";
|
3534
3532
|
TypeBuilder = class {
|
3535
|
-
|
3536
|
-
|
3537
|
-
|
3538
|
-
|
3539
|
-
|
3540
|
-
__publicField(this, "needsParenthesisInUnion", false);
|
3541
|
-
}
|
3533
|
+
// TODO(@SevInf): this should be replaced with precedence system that would
|
3534
|
+
// automatically add parenthesis where they are needed
|
3535
|
+
needsParenthesisWhenIndexed = false;
|
3536
|
+
needsParenthesisInKeyof = false;
|
3537
|
+
needsParenthesisInUnion = false;
|
3542
3538
|
subKey(key) {
|
3543
3539
|
const { KeyType: KeyType2 } = (init_KeyType(), __toCommonJS(KeyType_exports));
|
3544
3540
|
return new KeyType2(this, key);
|
@@ -3556,9 +3552,9 @@ var init_TypeBuilder = __esm({
|
|
3556
3552
|
}
|
3557
3553
|
});
|
3558
3554
|
|
3559
|
-
// ../../node_modules/.pnpm/ci-info@4.
|
3555
|
+
// ../../node_modules/.pnpm/ci-info@4.2.0/node_modules/ci-info/vendors.json
|
3560
3556
|
var require_vendors = __commonJS({
|
3561
|
-
"../../node_modules/.pnpm/ci-info@4.
|
3557
|
+
"../../node_modules/.pnpm/ci-info@4.2.0/node_modules/ci-info/vendors.json"(exports2, module2) {
|
3562
3558
|
module2.exports = [
|
3563
3559
|
{
|
3564
3560
|
name: "Agola CI",
|
@@ -3646,6 +3642,11 @@ var require_vendors = __commonJS({
|
|
3646
3642
|
env: "CIRRUS_CI",
|
3647
3643
|
pr: "CIRRUS_PR"
|
3648
3644
|
},
|
3645
|
+
{
|
3646
|
+
name: "Cloudflare Pages",
|
3647
|
+
constant: "CLOUDFLARE_PAGES",
|
3648
|
+
env: "CF_PAGES"
|
3649
|
+
},
|
3649
3650
|
{
|
3650
3651
|
name: "Codefresh",
|
3651
3652
|
constant: "CODEFRESH",
|
@@ -3910,9 +3911,9 @@ var require_vendors = __commonJS({
|
|
3910
3911
|
}
|
3911
3912
|
});
|
3912
3913
|
|
3913
|
-
// ../../node_modules/.pnpm/ci-info@4.
|
3914
|
+
// ../../node_modules/.pnpm/ci-info@4.2.0/node_modules/ci-info/index.js
|
3914
3915
|
var require_ci_info = __commonJS({
|
3915
|
-
"../../node_modules/.pnpm/ci-info@4.
|
3916
|
+
"../../node_modules/.pnpm/ci-info@4.2.0/node_modules/ci-info/index.js"(exports2) {
|
3916
3917
|
"use strict";
|
3917
3918
|
var vendors = require_vendors();
|
3918
3919
|
var env2 = process.env;
|
@@ -3940,7 +3941,7 @@ var require_ci_info = __commonJS({
|
|
3940
3941
|
exports2.isCI = !!(env2.CI !== "false" && // Bypass all checks if CI env is explicitly set to 'false'
|
3941
3942
|
(env2.BUILD_ID || // Jenkins, Cloudbees
|
3942
3943
|
env2.BUILD_NUMBER || // Jenkins, TeamCity
|
3943
|
-
env2.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari
|
3944
|
+
env2.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari, Cloudflare Pages
|
3944
3945
|
env2.CI_APP_ID || // Appflow
|
3945
3946
|
env2.CI_BUILD_ID || // Appflow
|
3946
3947
|
env2.CI_BUILD_NUMBER || // Appflow
|
@@ -4390,40 +4391,6 @@ function getNodeAPIName(binaryTarget, type) {
|
|
4390
4391
|
}
|
4391
4392
|
}
|
4392
4393
|
|
4393
|
-
// ../../node_modules/.pnpm/find-cache-dir@5.0.0/node_modules/find-cache-dir/index.js
|
4394
|
-
var import_node_process = __toESM(require("node:process"), 1);
|
4395
|
-
var import_common_path_prefix = __toESM(require_common_path_prefix(), 1);
|
4396
|
-
|
4397
|
-
// ../../node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.js
|
4398
|
-
var findUpStop = Symbol("findUpStop");
|
4399
|
-
|
4400
|
-
// ../../node_modules/.pnpm/find-cache-dir@5.0.0/node_modules/find-cache-dir/index.js
|
4401
|
-
var { env, cwd } = import_node_process.default;
|
4402
|
-
|
4403
|
-
// ../fetch-engine/src/utils.ts
|
4404
|
-
var import_fs = __toESM(require("fs"));
|
4405
|
-
var import_os = __toESM(require("os"));
|
4406
|
-
var debug = src_default("prisma:fetch-engine:cache-dir");
|
4407
|
-
async function overwriteFile(sourcePath, targetPath) {
|
4408
|
-
if (import_os.default.platform() === "darwin") {
|
4409
|
-
await removeFileIfExists(targetPath);
|
4410
|
-
await import_fs.default.promises.copyFile(sourcePath, targetPath);
|
4411
|
-
} else {
|
4412
|
-
const tempPath = `${targetPath}.tmp${process.pid}`;
|
4413
|
-
await import_fs.default.promises.copyFile(sourcePath, tempPath);
|
4414
|
-
await import_fs.default.promises.rename(tempPath, targetPath);
|
4415
|
-
}
|
4416
|
-
}
|
4417
|
-
async function removeFileIfExists(filePath) {
|
4418
|
-
try {
|
4419
|
-
await import_fs.default.promises.unlink(filePath);
|
4420
|
-
} catch (e) {
|
4421
|
-
if (e.code !== "ENOENT") {
|
4422
|
-
throw e;
|
4423
|
-
}
|
4424
|
-
}
|
4425
|
-
}
|
4426
|
-
|
4427
4394
|
// ../internals/src/client/getClientEngineType.ts
|
4428
4395
|
var DEFAULT_CLIENT_ENGINE_TYPE = "library" /* Library */;
|
4429
4396
|
function getClientEngineType(generatorConfig) {
|
@@ -4468,6 +4435,40 @@ function parseEnvValue(object) {
|
|
4468
4435
|
return object.value;
|
4469
4436
|
}
|
4470
4437
|
|
4438
|
+
// ../../node_modules/.pnpm/find-cache-dir@5.0.0/node_modules/find-cache-dir/index.js
|
4439
|
+
var import_node_process = __toESM(require("node:process"), 1);
|
4440
|
+
var import_common_path_prefix = __toESM(require_common_path_prefix(), 1);
|
4441
|
+
|
4442
|
+
// ../../node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.js
|
4443
|
+
var findUpStop = Symbol("findUpStop");
|
4444
|
+
|
4445
|
+
// ../../node_modules/.pnpm/find-cache-dir@5.0.0/node_modules/find-cache-dir/index.js
|
4446
|
+
var { env, cwd } = import_node_process.default;
|
4447
|
+
|
4448
|
+
// ../fetch-engine/src/utils.ts
|
4449
|
+
var import_fs = __toESM(require("fs"));
|
4450
|
+
var import_os = __toESM(require("os"));
|
4451
|
+
var debug = src_default("prisma:fetch-engine:cache-dir");
|
4452
|
+
async function overwriteFile(sourcePath, targetPath) {
|
4453
|
+
if (import_os.default.platform() === "darwin") {
|
4454
|
+
await removeFileIfExists(targetPath);
|
4455
|
+
await import_fs.default.promises.copyFile(sourcePath, targetPath);
|
4456
|
+
} else {
|
4457
|
+
const tempPath = `${targetPath}.tmp${process.pid}`;
|
4458
|
+
await import_fs.default.promises.copyFile(sourcePath, tempPath);
|
4459
|
+
await import_fs.default.promises.rename(tempPath, targetPath);
|
4460
|
+
}
|
4461
|
+
}
|
4462
|
+
async function removeFileIfExists(filePath) {
|
4463
|
+
try {
|
4464
|
+
await import_fs.default.promises.unlink(filePath);
|
4465
|
+
} catch (e) {
|
4466
|
+
if (e.code !== "ENOENT") {
|
4467
|
+
throw e;
|
4468
|
+
}
|
4469
|
+
}
|
4470
|
+
}
|
4471
|
+
|
4471
4472
|
// ../internals/src/utils/path.ts
|
4472
4473
|
var import_path = __toESM(require("path"));
|
4473
4474
|
function pathToPosix(filePath) {
|
@@ -4786,8 +4787,8 @@ var ConstDeclaration = class {
|
|
4786
4787
|
constructor(name, type) {
|
4787
4788
|
this.name = name;
|
4788
4789
|
this.type = type;
|
4789
|
-
__publicField(this, "docComment");
|
4790
4790
|
}
|
4791
|
+
docComment;
|
4791
4792
|
setDocComment(docComment2) {
|
4792
4793
|
this.docComment = docComment2;
|
4793
4794
|
return this;
|
@@ -4805,8 +4806,8 @@ function constDeclaration(name, type) {
|
|
4805
4806
|
|
4806
4807
|
// src/generation/ts-builders/DocComment.ts
|
4807
4808
|
var DocComment = class {
|
4809
|
+
lines = [];
|
4808
4810
|
constructor(startingText) {
|
4809
|
-
__publicField(this, "lines", []);
|
4810
4811
|
if (startingText) {
|
4811
4812
|
this.addText(startingText);
|
4812
4813
|
}
|
@@ -4881,8 +4882,8 @@ function getIndent(line) {
|
|
4881
4882
|
var Export = class {
|
4882
4883
|
constructor(declaration) {
|
4883
4884
|
this.declaration = declaration;
|
4884
|
-
__publicField(this, "docComment");
|
4885
4885
|
}
|
4886
|
+
docComment;
|
4886
4887
|
setDocComment(docComment2) {
|
4887
4888
|
this.docComment = docComment2;
|
4888
4889
|
return this;
|
@@ -4911,8 +4912,8 @@ var NamespaceExport = class {
|
|
4911
4912
|
var BindingsExport = class {
|
4912
4913
|
constructor(from) {
|
4913
4914
|
this.from = from;
|
4914
|
-
__publicField(this, "namedExports", []);
|
4915
4915
|
}
|
4916
|
+
namedExports = [];
|
4916
4917
|
named(namedExport) {
|
4917
4918
|
if (typeof namedExport === "string") {
|
4918
4919
|
namedExport = new NamedExport(namedExport);
|
@@ -4927,8 +4928,8 @@ var BindingsExport = class {
|
|
4927
4928
|
var NamedExport = class {
|
4928
4929
|
constructor(name) {
|
4929
4930
|
this.name = name;
|
4930
|
-
__publicField(this, "alias");
|
4931
4931
|
}
|
4932
|
+
alias;
|
4932
4933
|
as(alias) {
|
4933
4934
|
this.alias = alias;
|
4934
4935
|
return this;
|
@@ -4960,10 +4961,8 @@ function moduleExportFrom(from) {
|
|
4960
4961
|
|
4961
4962
|
// src/generation/ts-builders/File.ts
|
4962
4963
|
var File = class {
|
4963
|
-
|
4964
|
-
|
4965
|
-
__publicField(this, "declarations", []);
|
4966
|
-
}
|
4964
|
+
imports = [];
|
4965
|
+
declarations = [];
|
4967
4966
|
addImport(moduleImport2) {
|
4968
4967
|
this.imports.push(moduleImport2);
|
4969
4968
|
return this;
|
@@ -5016,15 +5015,12 @@ var neverType = new PrimitiveType("never");
|
|
5016
5015
|
// src/generation/ts-builders/FunctionType.ts
|
5017
5016
|
init_TypeBuilder();
|
5018
5017
|
var FunctionType = class extends TypeBuilder {
|
5019
|
-
|
5020
|
-
|
5021
|
-
|
5022
|
-
|
5023
|
-
|
5024
|
-
|
5025
|
-
__publicField(this, "parameters", []);
|
5026
|
-
__publicField(this, "genericParameters", []);
|
5027
|
-
}
|
5018
|
+
needsParenthesisWhenIndexed = true;
|
5019
|
+
needsParenthesisInKeyof = true;
|
5020
|
+
needsParenthesisInUnion = true;
|
5021
|
+
returnType = voidType;
|
5022
|
+
parameters = [];
|
5023
|
+
genericParameters = [];
|
5028
5024
|
setReturnType(returnType) {
|
5029
5025
|
this.returnType = returnType;
|
5030
5026
|
return this;
|
@@ -5054,8 +5050,8 @@ var NamedType = class extends TypeBuilder {
|
|
5054
5050
|
constructor(name) {
|
5055
5051
|
super();
|
5056
5052
|
this.name = name;
|
5057
|
-
__publicField(this, "genericArguments", []);
|
5058
5053
|
}
|
5054
|
+
genericArguments = [];
|
5059
5055
|
addGenericArgument(type) {
|
5060
5056
|
this.genericArguments.push(type);
|
5061
5057
|
return this;
|
@@ -5075,9 +5071,9 @@ function namedType(name) {
|
|
5075
5071
|
var GenericParameter = class {
|
5076
5072
|
constructor(name) {
|
5077
5073
|
this.name = name;
|
5078
|
-
__publicField(this, "extendedType");
|
5079
|
-
__publicField(this, "defaultType");
|
5080
5074
|
}
|
5075
|
+
extendedType;
|
5076
|
+
defaultType;
|
5081
5077
|
extends(type) {
|
5082
5078
|
this.extendedType = type;
|
5083
5079
|
return this;
|
@@ -5130,9 +5126,9 @@ var NamespaceImport = class {
|
|
5130
5126
|
var BindingsImport = class {
|
5131
5127
|
constructor(from) {
|
5132
5128
|
this.from = from;
|
5133
|
-
__publicField(this, "defaultImport");
|
5134
|
-
__publicField(this, "namedImports", []);
|
5135
5129
|
}
|
5130
|
+
defaultImport;
|
5131
|
+
namedImports = [];
|
5136
5132
|
default(name) {
|
5137
5133
|
this.defaultImport = name;
|
5138
5134
|
return this;
|
@@ -5164,8 +5160,8 @@ var BindingsImport = class {
|
|
5164
5160
|
var NamedImport = class {
|
5165
5161
|
constructor(name) {
|
5166
5162
|
this.name = name;
|
5167
|
-
__publicField(this, "alias");
|
5168
5163
|
}
|
5164
|
+
alias;
|
5169
5165
|
as(alias) {
|
5170
5166
|
this.alias = alias;
|
5171
5167
|
return this;
|
@@ -5204,11 +5200,11 @@ var InterfaceDeclaration = class extends TypeBuilder {
|
|
5204
5200
|
constructor(name) {
|
5205
5201
|
super();
|
5206
5202
|
this.name = name;
|
5207
|
-
__publicField(this, "needsParenthesisWhenIndexed", true);
|
5208
|
-
__publicField(this, "items", []);
|
5209
|
-
__publicField(this, "genericParameters", []);
|
5210
|
-
__publicField(this, "extendedTypes", []);
|
5211
5203
|
}
|
5204
|
+
needsParenthesisWhenIndexed = true;
|
5205
|
+
items = [];
|
5206
|
+
genericParameters = [];
|
5207
|
+
extendedTypes = [];
|
5212
5208
|
add(item) {
|
5213
5209
|
this.items.push(item);
|
5214
5210
|
return this;
|
@@ -5254,11 +5250,11 @@ function interfaceDeclaration(name) {
|
|
5254
5250
|
var Method = class {
|
5255
5251
|
constructor(name) {
|
5256
5252
|
this.name = name;
|
5257
|
-
__publicField(this, "docComment");
|
5258
|
-
__publicField(this, "returnType", voidType);
|
5259
|
-
__publicField(this, "parameters", []);
|
5260
|
-
__publicField(this, "genericParameters", []);
|
5261
5253
|
}
|
5254
|
+
docComment;
|
5255
|
+
returnType = voidType;
|
5256
|
+
parameters = [];
|
5257
|
+
genericParameters = [];
|
5262
5258
|
setDocComment(docComment2) {
|
5263
5259
|
this.docComment = docComment2;
|
5264
5260
|
return this;
|
@@ -5301,8 +5297,8 @@ function method(name) {
|
|
5301
5297
|
var NamespaceDeclaration = class {
|
5302
5298
|
constructor(name) {
|
5303
5299
|
this.name = name;
|
5304
|
-
__publicField(this, "items", []);
|
5305
5300
|
}
|
5301
|
+
items = [];
|
5306
5302
|
add(declaration) {
|
5307
5303
|
this.items.push(declaration);
|
5308
5304
|
}
|
@@ -5321,12 +5317,9 @@ function namespace(name) {
|
|
5321
5317
|
// src/generation/ts-builders/ObjectType.ts
|
5322
5318
|
init_TypeBuilder();
|
5323
5319
|
var ObjectType = class extends TypeBuilder {
|
5324
|
-
|
5325
|
-
|
5326
|
-
|
5327
|
-
__publicField(this, "items", []);
|
5328
|
-
__publicField(this, "inline", false);
|
5329
|
-
}
|
5320
|
+
needsParenthesisWhenIndexed = true;
|
5321
|
+
items = [];
|
5322
|
+
inline = false;
|
5330
5323
|
add(item) {
|
5331
5324
|
this.items.push(item);
|
5332
5325
|
return this;
|
@@ -5370,8 +5363,8 @@ var Parameter = class {
|
|
5370
5363
|
constructor(name, type) {
|
5371
5364
|
this.name = name;
|
5372
5365
|
this.type = type;
|
5373
|
-
__publicField(this, "isOptional", false);
|
5374
5366
|
}
|
5367
|
+
isOptional = false;
|
5375
5368
|
optional() {
|
5376
5369
|
this.isOptional = true;
|
5377
5370
|
return this;
|
@@ -5393,10 +5386,10 @@ var Property = class {
|
|
5393
5386
|
constructor(name, type) {
|
5394
5387
|
this.name = name;
|
5395
5388
|
this.type = type;
|
5396
|
-
__publicField(this, "isOptional", false);
|
5397
|
-
__publicField(this, "isReadonly", false);
|
5398
|
-
__publicField(this, "docComment");
|
5399
5389
|
}
|
5390
|
+
isOptional = false;
|
5391
|
+
isReadonly = false;
|
5392
|
+
docComment;
|
5400
5393
|
optional() {
|
5401
5394
|
this.isOptional = true;
|
5402
5395
|
return this;
|
@@ -5440,13 +5433,13 @@ var INDENT_SIZE = 2;
|
|
5440
5433
|
var Writer = class {
|
5441
5434
|
constructor(startingIndent = 0, context) {
|
5442
5435
|
this.context = context;
|
5443
|
-
__publicField(this, "lines", []);
|
5444
|
-
__publicField(this, "currentLine", "");
|
5445
|
-
__publicField(this, "currentIndent", 0);
|
5446
|
-
__publicField(this, "marginSymbol");
|
5447
|
-
__publicField(this, "afterNextNewLineCallback");
|
5448
5436
|
this.currentIndent = startingIndent;
|
5449
5437
|
}
|
5438
|
+
lines = [];
|
5439
|
+
currentLine = "";
|
5440
|
+
currentIndent = 0;
|
5441
|
+
marginSymbol;
|
5442
|
+
afterNextNewLineCallback;
|
5450
5443
|
/**
|
5451
5444
|
* Adds provided value to the current line. Does not end the line.
|
5452
5445
|
*
|
@@ -5620,8 +5613,8 @@ init_TypeBuilder();
|
|
5620
5613
|
var TupleItem = class {
|
5621
5614
|
constructor(type) {
|
5622
5615
|
this.type = type;
|
5623
|
-
__publicField(this, "name");
|
5624
5616
|
}
|
5617
|
+
name;
|
5625
5618
|
setName(name) {
|
5626
5619
|
this.name = name;
|
5627
5620
|
return this;
|
@@ -5634,10 +5627,7 @@ var TupleItem = class {
|
|
5634
5627
|
}
|
5635
5628
|
};
|
5636
5629
|
var TupleType = class extends TypeBuilder {
|
5637
|
-
|
5638
|
-
super(...arguments);
|
5639
|
-
__publicField(this, "items", []);
|
5640
|
-
}
|
5630
|
+
items = [];
|
5641
5631
|
add(item) {
|
5642
5632
|
if (item instanceof TypeBuilder) {
|
5643
5633
|
item = new TupleItem(item);
|
@@ -5661,9 +5651,9 @@ var TypeDeclaration = class {
|
|
5661
5651
|
constructor(name, type) {
|
5662
5652
|
this.name = name;
|
5663
5653
|
this.type = type;
|
5664
|
-
__publicField(this, "genericParameters", []);
|
5665
|
-
__publicField(this, "docComment");
|
5666
5654
|
}
|
5655
|
+
genericParameters = [];
|
5656
|
+
docComment;
|
5667
5657
|
addGenericParameter(param) {
|
5668
5658
|
this.genericParameters.push(param);
|
5669
5659
|
return this;
|
@@ -5694,11 +5684,11 @@ function typeDeclaration(name, type) {
|
|
5694
5684
|
// src/generation/ts-builders/UnionType.ts
|
5695
5685
|
init_TypeBuilder();
|
5696
5686
|
var UnionType = class extends TypeBuilder {
|
5687
|
+
needsParenthesisWhenIndexed = true;
|
5688
|
+
needsParenthesisInKeyof = true;
|
5689
|
+
variants;
|
5697
5690
|
constructor(firstType) {
|
5698
5691
|
super();
|
5699
|
-
__publicField(this, "needsParenthesisWhenIndexed", true);
|
5700
|
-
__publicField(this, "needsParenthesisInKeyof", true);
|
5701
|
-
__publicField(this, "variants");
|
5702
5692
|
this.variants = [firstType];
|
5703
5693
|
}
|
5704
5694
|
addVariant(variant) {
|
@@ -5983,9 +5973,9 @@ var InputType = class {
|
|
5983
5973
|
constructor(type, context) {
|
5984
5974
|
this.type = type;
|
5985
5975
|
this.context = context;
|
5986
|
-
__publicField(this, "generatedName");
|
5987
5976
|
this.generatedName = type.name;
|
5988
5977
|
}
|
5978
|
+
generatedName;
|
5989
5979
|
toTS() {
|
5990
5980
|
const { type } = this;
|
5991
5981
|
const source = type.meta?.source;
|
@@ -6557,12 +6547,12 @@ var ArgsTypeBuilder = class {
|
|
6557
6547
|
this.type = type;
|
6558
6548
|
this.context = context;
|
6559
6549
|
this.action = action;
|
6560
|
-
__publicField(this, "moduleExport");
|
6561
|
-
__publicField(this, "hasDefaultName", true);
|
6562
6550
|
this.moduleExport = moduleExport(
|
6563
6551
|
typeDeclaration(getModelArgName(type.name, action), objectType()).addGenericParameter(extArgsParam)
|
6564
6552
|
).setDocComment(docComment(`${type.name} ${action ?? "without action"}`));
|
6565
6553
|
}
|
6554
|
+
moduleExport;
|
6555
|
+
hasDefaultName = true;
|
6566
6556
|
addProperty(prop) {
|
6567
6557
|
this.moduleExport.declaration.type.add(prop);
|
6568
6558
|
}
|
@@ -6828,17 +6818,17 @@ var Model = class {
|
|
6828
6818
|
constructor(model, context) {
|
6829
6819
|
this.model = model;
|
6830
6820
|
this.context = context;
|
6831
|
-
__publicField(this, "type");
|
6832
|
-
__publicField(this, "createManyAndReturnType");
|
6833
|
-
__publicField(this, "updateManyAndReturnType");
|
6834
|
-
__publicField(this, "mapping");
|
6835
|
-
__publicField(this, "dmmf");
|
6836
6821
|
this.dmmf = context.dmmf;
|
6837
6822
|
this.type = this.context.dmmf.outputTypeMap.model[model.name];
|
6838
6823
|
this.createManyAndReturnType = this.context.dmmf.outputTypeMap.model[getCreateManyAndReturnOutputType(model.name)];
|
6839
6824
|
this.updateManyAndReturnType = this.context.dmmf.outputTypeMap.model[getUpdateManyAndReturnOutputType(model.name)];
|
6840
6825
|
this.mapping = this.context.dmmf.mappings.modelOperations.find((m) => m.model === model.name);
|
6841
6826
|
}
|
6827
|
+
type;
|
6828
|
+
createManyAndReturnType;
|
6829
|
+
updateManyAndReturnType;
|
6830
|
+
mapping;
|
6831
|
+
dmmf;
|
6842
6832
|
get argsTypes() {
|
6843
6833
|
const argsTypes = [];
|
6844
6834
|
for (const action of Object.keys(DMMF.ModelAction)) {
|
@@ -7439,13 +7429,13 @@ var import_path4 = __toESM(require("path"));
|
|
7439
7429
|
var DMMFHelper = class {
|
7440
7430
|
constructor(document) {
|
7441
7431
|
this.document = document;
|
7442
|
-
__publicField(this, "_compositeNames");
|
7443
|
-
__publicField(this, "_inputTypesByName");
|
7444
|
-
__publicField(this, "_typeAndModelMap");
|
7445
|
-
__publicField(this, "_mappingsMap");
|
7446
|
-
__publicField(this, "_outputTypeMap");
|
7447
|
-
__publicField(this, "_rootFieldMap");
|
7448
7432
|
}
|
7433
|
+
_compositeNames;
|
7434
|
+
_inputTypesByName;
|
7435
|
+
_typeAndModelMap;
|
7436
|
+
_mappingsMap;
|
7437
|
+
_outputTypeMap;
|
7438
|
+
_rootFieldMap;
|
7449
7439
|
get compositeNames() {
|
7450
7440
|
return this._compositeNames ??= new Set(this.datamodel.types.map((t) => t.name));
|
7451
7441
|
}
|
@@ -7553,9 +7543,7 @@ function fullyQualifiedName(typeName, namespace2) {
|
|
7553
7543
|
|
7554
7544
|
// src/generation/Cache.ts
|
7555
7545
|
var Cache = class {
|
7556
|
-
|
7557
|
-
__publicField(this, "_map", /* @__PURE__ */ new Map());
|
7558
|
-
}
|
7546
|
+
_map = /* @__PURE__ */ new Map();
|
7559
7547
|
get(key) {
|
7560
7548
|
return this._map.get(key)?.value;
|
7561
7549
|
}
|
@@ -7577,8 +7565,8 @@ var Cache = class {
|
|
7577
7565
|
var GenericArgsInfo = class {
|
7578
7566
|
constructor(_dmmf) {
|
7579
7567
|
this._dmmf = _dmmf;
|
7580
|
-
__publicField(this, "_cache", new Cache());
|
7581
7568
|
}
|
7569
|
+
_cache = new Cache();
|
7582
7570
|
/**
|
7583
7571
|
* Determines if arg types need generic <$PrismaModel> argument added.
|
7584
7572
|
* Essentially, performs breadth-first search for any fieldRefTypes that
|
@@ -8562,10 +8550,10 @@ export type ${this.type.name}<$PrismaModel> = FieldRefInputType<$PrismaModel, ${
|
|
8562
8550
|
|
8563
8551
|
// src/generation/TSClient/GenerateContext.ts
|
8564
8552
|
var GenerateContext = class {
|
8553
|
+
dmmf;
|
8554
|
+
genericArgsInfo;
|
8555
|
+
generator;
|
8565
8556
|
constructor({ dmmf, genericArgsInfo, generator }) {
|
8566
|
-
__publicField(this, "dmmf");
|
8567
|
-
__publicField(this, "genericArgsInfo");
|
8568
|
-
__publicField(this, "generator");
|
8569
8557
|
this.dmmf = dmmf;
|
8570
8558
|
this.genericArgsInfo = genericArgsInfo;
|
8571
8559
|
this.generator = generator;
|
@@ -9126,7 +9114,7 @@ export type TransactionClient = Omit<Prisma.DefaultPrismaClient, runtime.ITXClie
|
|
9126
9114
|
);
|
9127
9115
|
if (["library.js", "client.js"].includes(this.runtimeNameTs) && this.context.isPreviewFeatureOn("driverAdapters")) {
|
9128
9116
|
clientOptions.add(
|
9129
|
-
property("adapter", unionType([namedType("runtime.
|
9117
|
+
property("adapter", unionType([namedType("runtime.SqlDriverAdapterFactory"), namedType("null")])).optional().setDocComment(
|
9130
9118
|
docComment("Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`")
|
9131
9119
|
)
|
9132
9120
|
);
|
@@ -9155,11 +9143,11 @@ export type TransactionClient = Omit<Prisma.DefaultPrismaClient, runtime.ITXClie
|
|
9155
9143
|
var TSClient = class {
|
9156
9144
|
constructor(options) {
|
9157
9145
|
this.options = options;
|
9158
|
-
__publicField(this, "dmmf");
|
9159
|
-
__publicField(this, "genericsInfo");
|
9160
9146
|
this.dmmf = new DMMFHelper(options.dmmf);
|
9161
9147
|
this.genericsInfo = new GenericArgsInfo(this.dmmf);
|
9162
9148
|
}
|
9149
|
+
dmmf;
|
9150
|
+
genericsInfo;
|
9163
9151
|
toJS() {
|
9164
9152
|
const {
|
9165
9153
|
edge,
|
@@ -9439,8 +9427,8 @@ Object.assign(exports, Prisma)
|
|
9439
9427
|
|
9440
9428
|
// src/generation/typedSql/buildDbEnums.ts
|
9441
9429
|
var DbEnumsList = class {
|
9430
|
+
enums;
|
9442
9431
|
constructor(enums) {
|
9443
|
-
__publicField(this, "enums");
|
9444
9432
|
this.enums = enums.map((dmmfEnum) => ({
|
9445
9433
|
name: dmmfEnum.dbName ?? dmmfEnum.name,
|
9446
9434
|
values: dmmfEnum.values.map((dmmfValue) => dmmfValue.dbName ?? dmmfValue.name)
|
@@ -9799,10 +9787,14 @@ async function buildClient({
|
|
9799
9787
|
main: "index.js",
|
9800
9788
|
types: "index.d.ts",
|
9801
9789
|
browser: "index-browser.js",
|
9790
|
+
// The order of exports is important:
|
9791
|
+
// * `./client` before `...clientPkg.exports` allows it to have a higher priority than the `./*` export in `clientPkg.exports`
|
9792
|
+
// * `.` after `...clientPkg.exports` makes it override the `.` export in `clientPkgs.exports`
|
9802
9793
|
exports: {
|
9794
|
+
"./client": exportsMapDefault,
|
9803
9795
|
...import_package.default.exports,
|
9804
9796
|
// TODO: remove on DA ga
|
9805
|
-
|
9797
|
+
".": exportsMapDefault
|
9806
9798
|
},
|
9807
9799
|
version: clientVersion2,
|
9808
9800
|
sideEffects: false
|
@@ -9815,6 +9807,8 @@ async function buildClient({
|
|
9815
9807
|
fileMap["index-browser.js"] = BrowserJS(nodeClient);
|
9816
9808
|
fileMap["edge.js"] = JS(edgeClient);
|
9817
9809
|
fileMap["edge.d.ts"] = TS(edgeClient);
|
9810
|
+
fileMap["client.js"] = JS(defaultClient);
|
9811
|
+
fileMap["client.d.ts"] = TS(defaultClient);
|
9818
9812
|
if (generator.previewFeatures.includes("reactNative")) {
|
9819
9813
|
fileMap["react-native.js"] = JS(rnTsClient);
|
9820
9814
|
fileMap["react-native.d.ts"] = TS(rnTsClient);
|