@prisma/client-generator-ts 6.18.0-dev.9 → 6.18.0-integration-next.2

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
@@ -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.values.map((v) => `${v}: ${this.getValue(v)}`).join(",\n"), TAB_SIZE)}
2388
+ ${(0, import_indent_string.default)(type.data.map((v) => `${v.key}: ${this.getValue(v.value)}`).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,6 +5153,7 @@ function createModelsFile(context, modelsNames) {
5153
5153
  }
5154
5154
 
5155
5155
  // src/TSClient/file-generators/PrismaNamespaceBrowserFile.ts
5156
+ var import_dmmf2 = require("@prisma/dmmf");
5156
5157
  var ts16 = __toESM(require("@prisma/ts-builders"));
5157
5158
 
5158
5159
  // src/TSClient/NullTypes.ts
@@ -5196,7 +5197,9 @@ var jsDocHeader7 = `/*
5196
5197
  */
5197
5198
  `;
5198
5199
  function createPrismaNamespaceBrowserFile(context) {
5199
- const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
5200
+ const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map(
5201
+ (datamodelEnum) => new Enum((0, import_dmmf2.datamodelSchemaEnumToSchemaEnum)(datamodelEnum), false).toTS()
5202
+ );
5200
5203
  return `${jsDocHeader7}
5201
5204
  ${ts16.stringify(ts16.moduleImport(`${context.runtimeBase}/index-browser`).asNamespace("runtime"))}
5202
5205
 
@@ -5210,7 +5213,10 @@ ${nullTypes}
5210
5213
  ${new Enum(
5211
5214
  {
5212
5215
  name: "ModelName",
5213
- values: context.dmmf.mappings.modelOperations.map((m) => m.model)
5216
+ data: context.dmmf.mappings.modelOperations.map((m) => ({
5217
+ key: m.model,
5218
+ value: m.model
5219
+ }))
5214
5220
  },
5215
5221
  true
5216
5222
  ).toTS()}
@@ -5223,6 +5229,7 @@ ${prismaEnums?.join("\n\n")}
5223
5229
  }
5224
5230
 
5225
5231
  // src/TSClient/file-generators/PrismaNamespaceFile.ts
5232
+ var import_dmmf3 = require("@prisma/dmmf");
5226
5233
  var ts19 = __toESM(require("@prisma/ts-builders"));
5227
5234
 
5228
5235
  // src/TSClient/common.ts
@@ -5762,7 +5769,9 @@ function createPrismaNamespaceFile(context, options) {
5762
5769
  ts19.moduleImport(context.importFileName(`../models`)).asNamespace("Prisma").typeOnly(),
5763
5770
  ts19.moduleImport(context.importFileName(`./class`)).named(ts19.namedImport("PrismaClient").typeOnly())
5764
5771
  ].map((i) => ts19.stringify(i));
5765
- const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
5772
+ const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map(
5773
+ (type) => new Enum((0, import_dmmf3.datamodelSchemaEnumToSchemaEnum)(type), true).toTS()
5774
+ );
5766
5775
  const fieldRefs = context.dmmf.schema.fieldRefTypes.prisma?.map((type) => new FieldRefInput(type).toTS()) ?? [];
5767
5776
  return `${jsDocHeader8}
5768
5777
  ${imports.join("\n")}
@@ -5773,7 +5782,10 @@ ${commonCodeTS(options)}
5773
5782
  ${new Enum(
5774
5783
  {
5775
5784
  name: "ModelName",
5776
- values: context.dmmf.mappings.modelOperations.map((m) => m.model)
5785
+ data: context.dmmf.mappings.modelOperations.map((m) => ({
5786
+ key: m.model,
5787
+ value: m.model
5788
+ }))
5777
5789
  },
5778
5790
  true
5779
5791
  ).toTS()}
@@ -6619,7 +6631,7 @@ var import_get_tsconfig = require("get-tsconfig");
6619
6631
  var import_ts_pattern2 = require("ts-pattern");
6620
6632
 
6621
6633
  // package.json
6622
- var version = "6.18.0-dev.9";
6634
+ var version = "6.18.0-integration-next.2";
6623
6635
 
6624
6636
  // src/module-format.ts
6625
6637
  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.values.map((v) => `${v}: ${this.getValue(v)}`).join(",\n"), TAB_SIZE)}
2384
+ ${indent(type.data.map((v) => `${v.key}: ${this.getValue(v.value)}`).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,6 +5152,7 @@ function createModelsFile(context, modelsNames) {
5152
5152
  }
5153
5153
 
5154
5154
  // src/TSClient/file-generators/PrismaNamespaceBrowserFile.ts
5155
+ import { datamodelSchemaEnumToSchemaEnum } from "@prisma/dmmf";
5155
5156
  import * as ts16 from "@prisma/ts-builders";
5156
5157
 
5157
5158
  // src/TSClient/NullTypes.ts
@@ -5195,7 +5196,9 @@ var jsDocHeader7 = `/*
5195
5196
  */
5196
5197
  `;
5197
5198
  function createPrismaNamespaceBrowserFile(context) {
5198
- const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
5199
+ const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map(
5200
+ (datamodelEnum) => new Enum(datamodelSchemaEnumToSchemaEnum(datamodelEnum), false).toTS()
5201
+ );
5199
5202
  return `${jsDocHeader7}
5200
5203
  ${ts16.stringify(ts16.moduleImport(`${context.runtimeBase}/index-browser`).asNamespace("runtime"))}
5201
5204
 
@@ -5209,7 +5212,10 @@ ${nullTypes}
5209
5212
  ${new Enum(
5210
5213
  {
5211
5214
  name: "ModelName",
5212
- values: context.dmmf.mappings.modelOperations.map((m) => m.model)
5215
+ data: context.dmmf.mappings.modelOperations.map((m) => ({
5216
+ key: m.model,
5217
+ value: m.model
5218
+ }))
5213
5219
  },
5214
5220
  true
5215
5221
  ).toTS()}
@@ -5222,6 +5228,7 @@ ${prismaEnums?.join("\n\n")}
5222
5228
  }
5223
5229
 
5224
5230
  // src/TSClient/file-generators/PrismaNamespaceFile.ts
5231
+ import { datamodelSchemaEnumToSchemaEnum as datamodelSchemaEnumToSchemaEnum2 } from "@prisma/dmmf";
5225
5232
  import * as ts19 from "@prisma/ts-builders";
5226
5233
 
5227
5234
  // src/TSClient/common.ts
@@ -5761,7 +5768,9 @@ function createPrismaNamespaceFile(context, options) {
5761
5768
  ts19.moduleImport(context.importFileName(`../models`)).asNamespace("Prisma").typeOnly(),
5762
5769
  ts19.moduleImport(context.importFileName(`./class`)).named(ts19.namedImport("PrismaClient").typeOnly())
5763
5770
  ].map((i) => ts19.stringify(i));
5764
- const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
5771
+ const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map(
5772
+ (type) => new Enum(datamodelSchemaEnumToSchemaEnum2(type), true).toTS()
5773
+ );
5765
5774
  const fieldRefs = context.dmmf.schema.fieldRefTypes.prisma?.map((type) => new FieldRefInput(type).toTS()) ?? [];
5766
5775
  return `${jsDocHeader8}
5767
5776
  ${imports.join("\n")}
@@ -5772,7 +5781,10 @@ ${commonCodeTS(options)}
5772
5781
  ${new Enum(
5773
5782
  {
5774
5783
  name: "ModelName",
5775
- values: context.dmmf.mappings.modelOperations.map((m) => m.model)
5784
+ data: context.dmmf.mappings.modelOperations.map((m) => ({
5785
+ key: m.model,
5786
+ value: m.model
5787
+ }))
5776
5788
  },
5777
5789
  true
5778
5790
  ).toTS()}
@@ -6618,7 +6630,7 @@ import { getTsconfig } from "get-tsconfig";
6618
6630
  import { match as match2 } from "ts-pattern";
6619
6631
 
6620
6632
  // package.json
6621
- var version = "6.18.0-dev.9";
6633
+ var version = "6.18.0-integration-next.2";
6622
6634
 
6623
6635
  // src/module-format.ts
6624
6636
  function parseModuleFormat(format) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/client-generator-ts",
3
- "version": "6.18.0-dev.9",
3
+ "version": "6.18.0-integration-next.2",
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.18.0-dev.9",
38
- "@prisma/debug": "6.18.0-dev.9",
39
- "@prisma/fetch-engine": "6.18.0-dev.9",
40
- "@prisma/dmmf": "6.18.0-dev.9",
41
- "@prisma/generator": "6.18.0-dev.9",
42
- "@prisma/internals": "6.18.0-dev.9",
43
- "@prisma/ts-builders": "6.18.0-dev.9",
44
- "@prisma/get-platform": "6.18.0-dev.9"
37
+ "@prisma/client-common": "6.18.0-integration-next.2",
38
+ "@prisma/debug": "6.18.0-integration-next.2",
39
+ "@prisma/dmmf": "6.18.0-integration-next.2",
40
+ "@prisma/fetch-engine": "6.18.0-integration-next.2",
41
+ "@prisma/generator": "6.18.0-integration-next.2",
42
+ "@prisma/internals": "6.18.0-integration-next.2",
43
+ "@prisma/ts-builders": "6.18.0-integration-next.2",
44
+ "@prisma/get-platform": "6.18.0-integration-next.2"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/pluralize": "0.0.33",