@prisma/client-generator-ts 7.3.0-dev.6 → 7.3.0-dev.8

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.js CHANGED
@@ -2384,7 +2384,7 @@ var Enum = class {
2384
2384
  toTS() {
2385
2385
  const { type } = this;
2386
2386
  const enumVariants = `{
2387
- ${(0, import_indent_string.default)(type.data.map((v) => `${v.key}: ${this.getValue(v.value)}`).join(",\n"), TAB_SIZE)}
2387
+ ${(0, import_indent_string.default)(type.values.map((v) => `${v}: ${this.getValue(v)}`).join(",\n"), TAB_SIZE)}
2388
2388
  } as const`;
2389
2389
  const enumBody = this.isStrictEnum() ? `runtime.makeStrictEnum(${enumVariants})` : enumVariants;
2390
2390
  return `export const ${type.name} = ${enumBody}
@@ -4988,7 +4988,6 @@ function createModelsFile(context, modelsNames) {
4988
4988
  }
4989
4989
 
4990
4990
  // src/TSClient/file-generators/PrismaNamespaceBrowserFile.ts
4991
- var import_dmmf2 = require("@prisma/dmmf");
4992
4991
  var ts16 = __toESM(require("@prisma/ts-builders"));
4993
4992
 
4994
4993
  // src/TSClient/NullTypes.ts
@@ -5034,9 +5033,7 @@ var jsDocHeader7 = `/*
5034
5033
  */
5035
5034
  `;
5036
5035
  function createPrismaNamespaceBrowserFile(context) {
5037
- const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map(
5038
- (datamodelEnum) => new Enum((0, import_dmmf2.datamodelSchemaEnumToSchemaEnum)(datamodelEnum), false).toTS()
5039
- );
5036
+ const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
5040
5037
  return `${jsDocHeader7}
5041
5038
  ${ts16.stringify(ts16.moduleImport(`${context.runtimeBase}/index-browser`).asNamespace("runtime"))}
5042
5039
 
@@ -5050,10 +5047,7 @@ ${nullTypes}
5050
5047
  ${new Enum(
5051
5048
  {
5052
5049
  name: "ModelName",
5053
- data: context.dmmf.mappings.modelOperations.map((m) => ({
5054
- key: m.model,
5055
- value: m.model
5056
- }))
5050
+ values: context.dmmf.mappings.modelOperations.map((m) => m.model)
5057
5051
  },
5058
5052
  true
5059
5053
  ).toTS()}
@@ -5066,7 +5060,6 @@ ${prismaEnums?.join("\n\n")}
5066
5060
  }
5067
5061
 
5068
5062
  // src/TSClient/file-generators/PrismaNamespaceFile.ts
5069
- var import_dmmf3 = require("@prisma/dmmf");
5070
5063
  var ts19 = __toESM(require("@prisma/ts-builders"));
5071
5064
 
5072
5065
  // src/TSClient/common.ts
@@ -5579,9 +5572,7 @@ function createPrismaNamespaceFile(context, options) {
5579
5572
  ts19.moduleImport(context.importFileName(`../models`)).asNamespace("Prisma").typeOnly(),
5580
5573
  ts19.moduleImport(context.importFileName(`./class`)).named(ts19.namedImport("PrismaClient").typeOnly())
5581
5574
  ].map((i) => ts19.stringify(i));
5582
- const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map(
5583
- (type) => new Enum((0, import_dmmf3.datamodelSchemaEnumToSchemaEnum)(type), true).toTS()
5584
- );
5575
+ const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
5585
5576
  const fieldRefs = context.dmmf.schema.fieldRefTypes.prisma?.map((type) => new FieldRefInput(type).toTS()) ?? [];
5586
5577
  return `${jsDocHeader8}
5587
5578
  ${imports.join("\n")}
@@ -5592,10 +5583,7 @@ ${commonCodeTS(options)}
5592
5583
  ${new Enum(
5593
5584
  {
5594
5585
  name: "ModelName",
5595
- data: context.dmmf.mappings.modelOperations.map((m) => ({
5596
- key: m.model,
5597
- value: m.model
5598
- }))
5586
+ values: context.dmmf.mappings.modelOperations.map((m) => m.model)
5599
5587
  },
5600
5588
  true
5601
5589
  ).toTS()}
@@ -6424,7 +6412,7 @@ var import_internals7 = require("@prisma/internals");
6424
6412
  var import_get_tsconfig = require("get-tsconfig");
6425
6413
 
6426
6414
  // package.json
6427
- var version = "7.3.0-dev.6";
6415
+ var version = "7.3.0-dev.8";
6428
6416
 
6429
6417
  // src/module-format.ts
6430
6418
  function parseModuleFormat(format) {
package/dist/index.mjs CHANGED
@@ -2374,7 +2374,7 @@ var Enum = class {
2374
2374
  toTS() {
2375
2375
  const { type } = this;
2376
2376
  const enumVariants = `{
2377
- ${indent(type.data.map((v) => `${v.key}: ${this.getValue(v.value)}`).join(",\n"), TAB_SIZE)}
2377
+ ${indent(type.values.map((v) => `${v}: ${this.getValue(v)}`).join(",\n"), TAB_SIZE)}
2378
2378
  } as const`;
2379
2379
  const enumBody = this.isStrictEnum() ? `runtime.makeStrictEnum(${enumVariants})` : enumVariants;
2380
2380
  return `export const ${type.name} = ${enumBody}
@@ -4981,7 +4981,6 @@ function createModelsFile(context, modelsNames) {
4981
4981
  }
4982
4982
 
4983
4983
  // src/TSClient/file-generators/PrismaNamespaceBrowserFile.ts
4984
- import { datamodelSchemaEnumToSchemaEnum } from "@prisma/dmmf";
4985
4984
  import * as ts16 from "@prisma/ts-builders";
4986
4985
 
4987
4986
  // src/TSClient/NullTypes.ts
@@ -5027,9 +5026,7 @@ var jsDocHeader7 = `/*
5027
5026
  */
5028
5027
  `;
5029
5028
  function createPrismaNamespaceBrowserFile(context) {
5030
- const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map(
5031
- (datamodelEnum) => new Enum(datamodelSchemaEnumToSchemaEnum(datamodelEnum), false).toTS()
5032
- );
5029
+ const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
5033
5030
  return `${jsDocHeader7}
5034
5031
  ${ts16.stringify(ts16.moduleImport(`${context.runtimeBase}/index-browser`).asNamespace("runtime"))}
5035
5032
 
@@ -5043,10 +5040,7 @@ ${nullTypes}
5043
5040
  ${new Enum(
5044
5041
  {
5045
5042
  name: "ModelName",
5046
- data: context.dmmf.mappings.modelOperations.map((m) => ({
5047
- key: m.model,
5048
- value: m.model
5049
- }))
5043
+ values: context.dmmf.mappings.modelOperations.map((m) => m.model)
5050
5044
  },
5051
5045
  true
5052
5046
  ).toTS()}
@@ -5059,7 +5053,6 @@ ${prismaEnums?.join("\n\n")}
5059
5053
  }
5060
5054
 
5061
5055
  // src/TSClient/file-generators/PrismaNamespaceFile.ts
5062
- import { datamodelSchemaEnumToSchemaEnum as datamodelSchemaEnumToSchemaEnum2 } from "@prisma/dmmf";
5063
5056
  import * as ts19 from "@prisma/ts-builders";
5064
5057
 
5065
5058
  // src/TSClient/common.ts
@@ -5572,9 +5565,7 @@ function createPrismaNamespaceFile(context, options) {
5572
5565
  ts19.moduleImport(context.importFileName(`../models`)).asNamespace("Prisma").typeOnly(),
5573
5566
  ts19.moduleImport(context.importFileName(`./class`)).named(ts19.namedImport("PrismaClient").typeOnly())
5574
5567
  ].map((i) => ts19.stringify(i));
5575
- const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map(
5576
- (type) => new Enum(datamodelSchemaEnumToSchemaEnum2(type), true).toTS()
5577
- );
5568
+ const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
5578
5569
  const fieldRefs = context.dmmf.schema.fieldRefTypes.prisma?.map((type) => new FieldRefInput(type).toTS()) ?? [];
5579
5570
  return `${jsDocHeader8}
5580
5571
  ${imports.join("\n")}
@@ -5585,10 +5576,7 @@ ${commonCodeTS(options)}
5585
5576
  ${new Enum(
5586
5577
  {
5587
5578
  name: "ModelName",
5588
- data: context.dmmf.mappings.modelOperations.map((m) => ({
5589
- key: m.model,
5590
- value: m.model
5591
- }))
5579
+ values: context.dmmf.mappings.modelOperations.map((m) => m.model)
5592
5580
  },
5593
5581
  true
5594
5582
  ).toTS()}
@@ -6417,7 +6405,7 @@ import { parseEnvValue } from "@prisma/internals";
6417
6405
  import { getTsconfig } from "get-tsconfig";
6418
6406
 
6419
6407
  // package.json
6420
- var version = "7.3.0-dev.6";
6408
+ var version = "7.3.0-dev.8";
6421
6409
 
6422
6410
  // src/module-format.ts
6423
6411
  function parseModuleFormat(format) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/client-generator-ts",
3
- "version": "7.3.0-dev.6",
3
+ "version": "7.3.0-dev.8",
4
4
  "description": "This package is intended for Prisma's internal use",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -33,14 +33,14 @@
33
33
  "package-up": "5.0.0",
34
34
  "pluralize": "8.0.0",
35
35
  "ts-pattern": "5.6.2",
36
- "@prisma/client-common": "7.3.0-dev.6",
37
- "@prisma/debug": "7.3.0-dev.6",
38
- "@prisma/fetch-engine": "7.3.0-dev.6",
39
- "@prisma/generator": "7.3.0-dev.6",
40
- "@prisma/get-platform": "7.3.0-dev.6",
41
- "@prisma/dmmf": "7.3.0-dev.6",
42
- "@prisma/internals": "7.3.0-dev.6",
43
- "@prisma/ts-builders": "7.3.0-dev.6"
36
+ "@prisma/debug": "7.3.0-dev.8",
37
+ "@prisma/client-common": "7.3.0-dev.8",
38
+ "@prisma/dmmf": "7.3.0-dev.8",
39
+ "@prisma/fetch-engine": "7.3.0-dev.8",
40
+ "@prisma/get-platform": "7.3.0-dev.8",
41
+ "@prisma/generator": "7.3.0-dev.8",
42
+ "@prisma/internals": "7.3.0-dev.8",
43
+ "@prisma/ts-builders": "7.3.0-dev.8"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/pluralize": "0.0.33",