@prisma/client-generator-ts 6.18.0-integration-next.11 → 6.19.0-dev.1
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/TSClient/NullTypes.d.ts +1 -1
- package/dist/index.js +15 -26
- package/dist/index.mjs +15 -26
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const nullTypes = "\nexport const NullTypes = {\n DbNull: runtime.
|
|
1
|
+
export declare const nullTypes = "\nexport const NullTypes = {\n DbNull: runtime.objectEnumValues.classes.DbNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.DbNull),\n JsonNull: runtime.objectEnumValues.classes.JsonNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.JsonNull),\n AnyNull: runtime.objectEnumValues.classes.AnyNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.AnyNull),\n}\n/**\n * Helper for filtering JSON entries that have `null` on the database (empty on the db)\n *\n * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field\n */\nexport const DbNull = runtime.objectEnumValues.instances.DbNull\n/**\n * Helper for filtering JSON entries that have JSON `null` values (not empty on the db)\n *\n * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field\n */\nexport const JsonNull = runtime.objectEnumValues.instances.JsonNull\n/**\n * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`\n *\n * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field\n */\nexport const AnyNull = runtime.objectEnumValues.instances.AnyNull\n";
|
package/dist/index.js
CHANGED
|
@@ -2385,7 +2385,7 @@ var Enum = class {
|
|
|
2385
2385
|
toTS() {
|
|
2386
2386
|
const { type } = this;
|
|
2387
2387
|
const enumVariants = `{
|
|
2388
|
-
${(0, import_indent_string.default)(type.
|
|
2388
|
+
${(0, import_indent_string.default)(type.values.map((v) => `${v}: ${this.getValue(v)}`).join(",\n"), TAB_SIZE)}
|
|
2389
2389
|
} as const`;
|
|
2390
2390
|
const enumBody = this.isStrictEnum() ? `runtime.makeStrictEnum(${enumVariants})` : enumVariants;
|
|
2391
2391
|
return `export const ${type.name} = ${enumBody}
|
|
@@ -5153,36 +5153,33 @@ function createModelsFile(context, modelsNames) {
|
|
|
5153
5153
|
}
|
|
5154
5154
|
|
|
5155
5155
|
// src/TSClient/file-generators/PrismaNamespaceBrowserFile.ts
|
|
5156
|
-
var import_dmmf2 = require("@prisma/dmmf");
|
|
5157
5156
|
var ts16 = __toESM(require("@prisma/ts-builders"));
|
|
5158
5157
|
|
|
5159
5158
|
// src/TSClient/NullTypes.ts
|
|
5160
5159
|
var nullTypes = `
|
|
5161
5160
|
export const NullTypes = {
|
|
5162
|
-
DbNull: runtime.
|
|
5163
|
-
JsonNull: runtime.
|
|
5164
|
-
AnyNull: runtime.
|
|
5161
|
+
DbNull: runtime.objectEnumValues.classes.DbNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.DbNull),
|
|
5162
|
+
JsonNull: runtime.objectEnumValues.classes.JsonNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.JsonNull),
|
|
5163
|
+
AnyNull: runtime.objectEnumValues.classes.AnyNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.AnyNull),
|
|
5165
5164
|
}
|
|
5166
5165
|
/**
|
|
5167
5166
|
* Helper for filtering JSON entries that have \`null\` on the database (empty on the db)
|
|
5168
5167
|
*
|
|
5169
5168
|
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
|
5170
5169
|
*/
|
|
5171
|
-
export const DbNull = runtime.DbNull
|
|
5172
|
-
|
|
5170
|
+
export const DbNull = runtime.objectEnumValues.instances.DbNull
|
|
5173
5171
|
/**
|
|
5174
5172
|
* Helper for filtering JSON entries that have JSON \`null\` values (not empty on the db)
|
|
5175
5173
|
*
|
|
5176
5174
|
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
|
5177
5175
|
*/
|
|
5178
|
-
export const JsonNull = runtime.JsonNull
|
|
5179
|
-
|
|
5176
|
+
export const JsonNull = runtime.objectEnumValues.instances.JsonNull
|
|
5180
5177
|
/**
|
|
5181
5178
|
* Helper for filtering JSON entries that are \`Prisma.DbNull\` or \`Prisma.JsonNull\`
|
|
5182
5179
|
*
|
|
5183
5180
|
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
|
5184
5181
|
*/
|
|
5185
|
-
export const AnyNull = runtime.AnyNull
|
|
5182
|
+
export const AnyNull = runtime.objectEnumValues.instances.AnyNull
|
|
5186
5183
|
`;
|
|
5187
5184
|
|
|
5188
5185
|
// src/TSClient/file-generators/PrismaNamespaceBrowserFile.ts
|
|
@@ -5199,9 +5196,7 @@ var jsDocHeader7 = `/*
|
|
|
5199
5196
|
*/
|
|
5200
5197
|
`;
|
|
5201
5198
|
function createPrismaNamespaceBrowserFile(context) {
|
|
5202
|
-
const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map(
|
|
5203
|
-
(datamodelEnum) => new Enum((0, import_dmmf2.datamodelSchemaEnumToSchemaEnum)(datamodelEnum), false).toTS()
|
|
5204
|
-
);
|
|
5199
|
+
const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
|
|
5205
5200
|
return `${jsDocHeader7}
|
|
5206
5201
|
${ts16.stringify(ts16.moduleImport(`${context.runtimeBase}/index-browser`).asNamespace("runtime"))}
|
|
5207
5202
|
|
|
@@ -5215,10 +5210,7 @@ ${nullTypes}
|
|
|
5215
5210
|
${new Enum(
|
|
5216
5211
|
{
|
|
5217
5212
|
name: "ModelName",
|
|
5218
|
-
|
|
5219
|
-
key: m.model,
|
|
5220
|
-
value: m.model
|
|
5221
|
-
}))
|
|
5213
|
+
values: context.dmmf.mappings.modelOperations.map((m) => m.model)
|
|
5222
5214
|
},
|
|
5223
5215
|
true
|
|
5224
5216
|
).toTS()}
|
|
@@ -5231,7 +5223,6 @@ ${prismaEnums?.join("\n\n")}
|
|
|
5231
5223
|
}
|
|
5232
5224
|
|
|
5233
5225
|
// src/TSClient/file-generators/PrismaNamespaceFile.ts
|
|
5234
|
-
var import_dmmf3 = require("@prisma/dmmf");
|
|
5235
5226
|
var ts19 = __toESM(require("@prisma/ts-builders"));
|
|
5236
5227
|
|
|
5237
5228
|
// src/TSClient/common.ts
|
|
@@ -5771,9 +5762,7 @@ function createPrismaNamespaceFile(context, options) {
|
|
|
5771
5762
|
ts19.moduleImport(context.importFileName(`../models`)).asNamespace("Prisma").typeOnly(),
|
|
5772
5763
|
ts19.moduleImport(context.importFileName(`./class`)).named(ts19.namedImport("PrismaClient").typeOnly())
|
|
5773
5764
|
].map((i) => ts19.stringify(i));
|
|
5774
|
-
const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map(
|
|
5775
|
-
(type) => new Enum((0, import_dmmf3.datamodelSchemaEnumToSchemaEnum)(type), true).toTS()
|
|
5776
|
-
);
|
|
5765
|
+
const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
|
|
5777
5766
|
const fieldRefs = context.dmmf.schema.fieldRefTypes.prisma?.map((type) => new FieldRefInput(type).toTS()) ?? [];
|
|
5778
5767
|
return `${jsDocHeader8}
|
|
5779
5768
|
${imports.join("\n")}
|
|
@@ -5784,10 +5773,7 @@ ${commonCodeTS(options)}
|
|
|
5784
5773
|
${new Enum(
|
|
5785
5774
|
{
|
|
5786
5775
|
name: "ModelName",
|
|
5787
|
-
|
|
5788
|
-
key: m.model,
|
|
5789
|
-
value: m.model
|
|
5790
|
-
}))
|
|
5776
|
+
values: context.dmmf.mappings.modelOperations.map((m) => m.model)
|
|
5791
5777
|
},
|
|
5792
5778
|
true
|
|
5793
5779
|
).toTS()}
|
|
@@ -5897,6 +5883,8 @@ function clientExtensionsDefinitions() {
|
|
|
5897
5883
|
function buildClientOptions(context, options) {
|
|
5898
5884
|
const clientOptions = ts19.interfaceDeclaration("PrismaClientOptions").add(
|
|
5899
5885
|
ts19.property("datasources", ts19.namedType("Datasources")).optional().setDocComment(ts19.docComment("Overwrites the datasource url from your schema.prisma file"))
|
|
5886
|
+
).add(
|
|
5887
|
+
ts19.property("datasourceUrl", ts19.stringType).optional().setDocComment(ts19.docComment("Overwrites the datasource url from your schema.prisma file"))
|
|
5900
5888
|
).add(
|
|
5901
5889
|
ts19.property("errorFormat", ts19.namedType("ErrorFormat")).optional().setDocComment(ts19.docComment('@default "colorless"'))
|
|
5902
5890
|
).add(
|
|
@@ -6268,6 +6256,7 @@ function buildTypedSql({
|
|
|
6268
6256
|
var generatedCodePreamble = `
|
|
6269
6257
|
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
6270
6258
|
/* eslint-disable */
|
|
6259
|
+
// biome-ignore-all lint: generated file
|
|
6271
6260
|
`;
|
|
6272
6261
|
var tsNoCheckPreamble = `// @ts-nocheck
|
|
6273
6262
|
`;
|
|
@@ -6631,7 +6620,7 @@ var import_get_tsconfig = require("get-tsconfig");
|
|
|
6631
6620
|
var import_ts_pattern2 = require("ts-pattern");
|
|
6632
6621
|
|
|
6633
6622
|
// package.json
|
|
6634
|
-
var version = "6.
|
|
6623
|
+
var version = "6.19.0-dev.1";
|
|
6635
6624
|
|
|
6636
6625
|
// src/module-format.ts
|
|
6637
6626
|
function parseModuleFormat(format) {
|
package/dist/index.mjs
CHANGED
|
@@ -2381,7 +2381,7 @@ var Enum = class {
|
|
|
2381
2381
|
toTS() {
|
|
2382
2382
|
const { type } = this;
|
|
2383
2383
|
const enumVariants = `{
|
|
2384
|
-
${indent(type.
|
|
2384
|
+
${indent(type.values.map((v) => `${v}: ${this.getValue(v)}`).join(",\n"), TAB_SIZE)}
|
|
2385
2385
|
} as const`;
|
|
2386
2386
|
const enumBody = this.isStrictEnum() ? `runtime.makeStrictEnum(${enumVariants})` : enumVariants;
|
|
2387
2387
|
return `export const ${type.name} = ${enumBody}
|
|
@@ -5152,36 +5152,33 @@ function createModelsFile(context, modelsNames) {
|
|
|
5152
5152
|
}
|
|
5153
5153
|
|
|
5154
5154
|
// src/TSClient/file-generators/PrismaNamespaceBrowserFile.ts
|
|
5155
|
-
import { datamodelSchemaEnumToSchemaEnum } from "@prisma/dmmf";
|
|
5156
5155
|
import * as ts16 from "@prisma/ts-builders";
|
|
5157
5156
|
|
|
5158
5157
|
// src/TSClient/NullTypes.ts
|
|
5159
5158
|
var nullTypes = `
|
|
5160
5159
|
export const NullTypes = {
|
|
5161
|
-
DbNull: runtime.
|
|
5162
|
-
JsonNull: runtime.
|
|
5163
|
-
AnyNull: runtime.
|
|
5160
|
+
DbNull: runtime.objectEnumValues.classes.DbNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.DbNull),
|
|
5161
|
+
JsonNull: runtime.objectEnumValues.classes.JsonNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.JsonNull),
|
|
5162
|
+
AnyNull: runtime.objectEnumValues.classes.AnyNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.AnyNull),
|
|
5164
5163
|
}
|
|
5165
5164
|
/**
|
|
5166
5165
|
* Helper for filtering JSON entries that have \`null\` on the database (empty on the db)
|
|
5167
5166
|
*
|
|
5168
5167
|
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
|
5169
5168
|
*/
|
|
5170
|
-
export const DbNull = runtime.DbNull
|
|
5171
|
-
|
|
5169
|
+
export const DbNull = runtime.objectEnumValues.instances.DbNull
|
|
5172
5170
|
/**
|
|
5173
5171
|
* Helper for filtering JSON entries that have JSON \`null\` values (not empty on the db)
|
|
5174
5172
|
*
|
|
5175
5173
|
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
|
5176
5174
|
*/
|
|
5177
|
-
export const JsonNull = runtime.JsonNull
|
|
5178
|
-
|
|
5175
|
+
export const JsonNull = runtime.objectEnumValues.instances.JsonNull
|
|
5179
5176
|
/**
|
|
5180
5177
|
* Helper for filtering JSON entries that are \`Prisma.DbNull\` or \`Prisma.JsonNull\`
|
|
5181
5178
|
*
|
|
5182
5179
|
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
|
5183
5180
|
*/
|
|
5184
|
-
export const AnyNull = runtime.AnyNull
|
|
5181
|
+
export const AnyNull = runtime.objectEnumValues.instances.AnyNull
|
|
5185
5182
|
`;
|
|
5186
5183
|
|
|
5187
5184
|
// src/TSClient/file-generators/PrismaNamespaceBrowserFile.ts
|
|
@@ -5198,9 +5195,7 @@ var jsDocHeader7 = `/*
|
|
|
5198
5195
|
*/
|
|
5199
5196
|
`;
|
|
5200
5197
|
function createPrismaNamespaceBrowserFile(context) {
|
|
5201
|
-
const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map(
|
|
5202
|
-
(datamodelEnum) => new Enum(datamodelSchemaEnumToSchemaEnum(datamodelEnum), false).toTS()
|
|
5203
|
-
);
|
|
5198
|
+
const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
|
|
5204
5199
|
return `${jsDocHeader7}
|
|
5205
5200
|
${ts16.stringify(ts16.moduleImport(`${context.runtimeBase}/index-browser`).asNamespace("runtime"))}
|
|
5206
5201
|
|
|
@@ -5214,10 +5209,7 @@ ${nullTypes}
|
|
|
5214
5209
|
${new Enum(
|
|
5215
5210
|
{
|
|
5216
5211
|
name: "ModelName",
|
|
5217
|
-
|
|
5218
|
-
key: m.model,
|
|
5219
|
-
value: m.model
|
|
5220
|
-
}))
|
|
5212
|
+
values: context.dmmf.mappings.modelOperations.map((m) => m.model)
|
|
5221
5213
|
},
|
|
5222
5214
|
true
|
|
5223
5215
|
).toTS()}
|
|
@@ -5230,7 +5222,6 @@ ${prismaEnums?.join("\n\n")}
|
|
|
5230
5222
|
}
|
|
5231
5223
|
|
|
5232
5224
|
// src/TSClient/file-generators/PrismaNamespaceFile.ts
|
|
5233
|
-
import { datamodelSchemaEnumToSchemaEnum as datamodelSchemaEnumToSchemaEnum2 } from "@prisma/dmmf";
|
|
5234
5225
|
import * as ts19 from "@prisma/ts-builders";
|
|
5235
5226
|
|
|
5236
5227
|
// src/TSClient/common.ts
|
|
@@ -5770,9 +5761,7 @@ function createPrismaNamespaceFile(context, options) {
|
|
|
5770
5761
|
ts19.moduleImport(context.importFileName(`../models`)).asNamespace("Prisma").typeOnly(),
|
|
5771
5762
|
ts19.moduleImport(context.importFileName(`./class`)).named(ts19.namedImport("PrismaClient").typeOnly())
|
|
5772
5763
|
].map((i) => ts19.stringify(i));
|
|
5773
|
-
const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map(
|
|
5774
|
-
(type) => new Enum(datamodelSchemaEnumToSchemaEnum2(type), true).toTS()
|
|
5775
|
-
);
|
|
5764
|
+
const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
|
|
5776
5765
|
const fieldRefs = context.dmmf.schema.fieldRefTypes.prisma?.map((type) => new FieldRefInput(type).toTS()) ?? [];
|
|
5777
5766
|
return `${jsDocHeader8}
|
|
5778
5767
|
${imports.join("\n")}
|
|
@@ -5783,10 +5772,7 @@ ${commonCodeTS(options)}
|
|
|
5783
5772
|
${new Enum(
|
|
5784
5773
|
{
|
|
5785
5774
|
name: "ModelName",
|
|
5786
|
-
|
|
5787
|
-
key: m.model,
|
|
5788
|
-
value: m.model
|
|
5789
|
-
}))
|
|
5775
|
+
values: context.dmmf.mappings.modelOperations.map((m) => m.model)
|
|
5790
5776
|
},
|
|
5791
5777
|
true
|
|
5792
5778
|
).toTS()}
|
|
@@ -5896,6 +5882,8 @@ function clientExtensionsDefinitions() {
|
|
|
5896
5882
|
function buildClientOptions(context, options) {
|
|
5897
5883
|
const clientOptions = ts19.interfaceDeclaration("PrismaClientOptions").add(
|
|
5898
5884
|
ts19.property("datasources", ts19.namedType("Datasources")).optional().setDocComment(ts19.docComment("Overwrites the datasource url from your schema.prisma file"))
|
|
5885
|
+
).add(
|
|
5886
|
+
ts19.property("datasourceUrl", ts19.stringType).optional().setDocComment(ts19.docComment("Overwrites the datasource url from your schema.prisma file"))
|
|
5899
5887
|
).add(
|
|
5900
5888
|
ts19.property("errorFormat", ts19.namedType("ErrorFormat")).optional().setDocComment(ts19.docComment('@default "colorless"'))
|
|
5901
5889
|
).add(
|
|
@@ -6267,6 +6255,7 @@ function buildTypedSql({
|
|
|
6267
6255
|
var generatedCodePreamble = `
|
|
6268
6256
|
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
6269
6257
|
/* eslint-disable */
|
|
6258
|
+
// biome-ignore-all lint: generated file
|
|
6270
6259
|
`;
|
|
6271
6260
|
var tsNoCheckPreamble = `// @ts-nocheck
|
|
6272
6261
|
`;
|
|
@@ -6630,7 +6619,7 @@ import { getTsconfig } from "get-tsconfig";
|
|
|
6630
6619
|
import { match as match2 } from "ts-pattern";
|
|
6631
6620
|
|
|
6632
6621
|
// package.json
|
|
6633
|
-
var version = "6.
|
|
6622
|
+
var version = "6.19.0-dev.1";
|
|
6634
6623
|
|
|
6635
6624
|
// src/module-format.ts
|
|
6636
6625
|
function parseModuleFormat(format) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-generator-ts",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.19.0-dev.1",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"package-up": "5.0.0",
|
|
35
35
|
"pluralize": "8.0.0",
|
|
36
36
|
"ts-pattern": "5.6.2",
|
|
37
|
-
"@prisma/client-common": "6.
|
|
38
|
-
"@prisma/
|
|
39
|
-
"@prisma/
|
|
40
|
-
"@prisma/
|
|
41
|
-
"@prisma/
|
|
42
|
-
"@prisma/
|
|
43
|
-
"@prisma/internals": "6.
|
|
44
|
-
"@prisma/ts-builders": "6.
|
|
37
|
+
"@prisma/client-common": "6.19.0-dev.1",
|
|
38
|
+
"@prisma/fetch-engine": "6.19.0-dev.1",
|
|
39
|
+
"@prisma/debug": "6.19.0-dev.1",
|
|
40
|
+
"@prisma/dmmf": "6.19.0-dev.1",
|
|
41
|
+
"@prisma/generator": "6.19.0-dev.1",
|
|
42
|
+
"@prisma/get-platform": "6.19.0-dev.1",
|
|
43
|
+
"@prisma/internals": "6.19.0-dev.1",
|
|
44
|
+
"@prisma/ts-builders": "6.19.0-dev.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/pluralize": "0.0.33",
|