@prisma/client-generator-js 6.18.0-dev.4 → 6.18.0-integration-next.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/index.js CHANGED
@@ -3187,7 +3187,7 @@ var Enum = class {
3187
3187
  toJS() {
3188
3188
  const { type } = this;
3189
3189
  const enumVariants = `{
3190
- ${(0, import_indent_string.default)(type.values.map((v) => `${v}: ${this.getValueJS(v)}`).join(",\n"), TAB_SIZE)}
3190
+ ${(0, import_indent_string.default)(type.data.map((v) => `${v.key}: ${this.getValueJS(v.value)}`).join(",\n"), TAB_SIZE)}
3191
3191
  }`;
3192
3192
  const enumBody = this.isStrictEnum() ? `makeStrictEnum(${enumVariants})` : enumVariants;
3193
3193
  return this.useNamespace ? `exports.Prisma.${type.name} = ${enumBody};` : `exports.${type.name} = exports.$Enums.${type.name} = ${enumBody};`;
@@ -3198,7 +3198,7 @@ ${(0, import_indent_string.default)(type.values.map((v) => `${v}: ${this.getValu
3198
3198
  toTS() {
3199
3199
  const { type } = this;
3200
3200
  return `export const ${type.name}: {
3201
- ${(0, import_indent_string.default)(type.values.map((v) => `${v}: ${this.getValueTS(v)}`).join(",\n"), TAB_SIZE)}
3201
+ ${(0, import_indent_string.default)(type.data.map((v) => `${v.key}: ${this.getValueTS(v.value)}`).join(",\n"), TAB_SIZE)}
3202
3202
  };
3203
3203
 
3204
3204
  export type ${type.name} = (typeof ${type.name})[keyof typeof ${type.name}]
@@ -6631,13 +6631,16 @@ ${buildRequirePath(edge)}
6631
6631
  /**
6632
6632
  * Enums
6633
6633
  */
6634
- ${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toJS()).join("\n\n")}
6634
+ ${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum((0, import_dmmf.datamodelSchemaEnumToSchemaEnum)(type), true).toJS()).join("\n\n")}
6635
6635
  ${this.dmmf.datamodel.enums.map((datamodelEnum) => new Enum((0, import_dmmf.datamodelEnumToSchemaEnum)(datamodelEnum), false).toJS()).join("\n\n")}
6636
6636
 
6637
6637
  ${new Enum(
6638
6638
  {
6639
6639
  name: "ModelName",
6640
- values: this.dmmf.mappings.modelOperations.map((m) => m.model)
6640
+ data: this.dmmf.mappings.modelOperations.map((m) => ({
6641
+ key: m.model,
6642
+ value: m.model
6643
+ }))
6641
6644
  },
6642
6645
  true
6643
6646
  ).toJS()}
@@ -6684,7 +6687,9 @@ ${buildNFTAnnotations(edge || !copyEngine, clientEngineType, binaryTargets, rela
6684
6687
  }
6685
6688
  return acc;
6686
6689
  }, []);
6687
- const prismaEnums = this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
6690
+ const prismaEnums = this.dmmf.schema.enumTypes.prisma?.map(
6691
+ (type) => new Enum((0, import_dmmf.datamodelSchemaEnumToSchemaEnum)(type), true).toTS()
6692
+ );
6688
6693
  const modelEnums = [];
6689
6694
  const modelEnumsAliases = [];
6690
6695
  for (const datamodelEnum of this.dmmf.datamodel.enums) {
@@ -6726,7 +6731,10 @@ ${(0, import_indent_string8.default)(
6726
6731
  ${new Enum(
6727
6732
  {
6728
6733
  name: "ModelName",
6729
- values: this.dmmf.mappings.modelOperations.map((m) => m.model)
6734
+ data: this.dmmf.mappings.modelOperations.map((m) => ({
6735
+ key: m.model,
6736
+ value: m.model
6737
+ }))
6730
6738
  },
6731
6739
  true
6732
6740
  ).toTS()}
@@ -6810,13 +6818,16 @@ export const dmmf: runtime.BaseDMMF
6810
6818
  * Enums
6811
6819
  */
6812
6820
 
6813
- ${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toJS()).join("\n\n")}
6814
- ${this.dmmf.schema.enumTypes.model?.map((type) => new Enum(type, false).toJS()).join("\n\n") ?? ""}
6821
+ ${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum((0, import_dmmf.datamodelSchemaEnumToSchemaEnum)(type), true).toJS()).join("\n\n")}
6822
+ ${this.dmmf.schema.enumTypes.model?.map((type) => new Enum((0, import_dmmf.datamodelSchemaEnumToSchemaEnum)(type), false).toJS()).join("\n\n") ?? ""}
6815
6823
 
6816
6824
  ${new Enum(
6817
6825
  {
6818
6826
  name: "ModelName",
6819
- values: this.dmmf.mappings.modelOperations.map((m) => m.model)
6827
+ data: this.dmmf.mappings.modelOperations.map((m) => ({
6828
+ key: m.model,
6829
+ value: m.model
6830
+ }))
6820
6831
  },
6821
6832
  true
6822
6833
  ).toJS()}
@@ -7728,7 +7739,7 @@ var import_internals12 = require("@prisma/internals");
7728
7739
  var import_ts_pattern = require("ts-pattern");
7729
7740
 
7730
7741
  // package.json
7731
- var version = "6.18.0-dev.4";
7742
+ var version = "6.18.0-integration-next.1";
7732
7743
 
7733
7744
  // src/resolvePrismaClient.ts
7734
7745
  var import_promises3 = __toESM(require("node:fs/promises"));
package/dist/index.mjs CHANGED
@@ -3182,7 +3182,7 @@ var Enum = class {
3182
3182
  toJS() {
3183
3183
  const { type } = this;
3184
3184
  const enumVariants = `{
3185
- ${indent(type.values.map((v) => `${v}: ${this.getValueJS(v)}`).join(",\n"), TAB_SIZE)}
3185
+ ${indent(type.data.map((v) => `${v.key}: ${this.getValueJS(v.value)}`).join(",\n"), TAB_SIZE)}
3186
3186
  }`;
3187
3187
  const enumBody = this.isStrictEnum() ? `makeStrictEnum(${enumVariants})` : enumVariants;
3188
3188
  return this.useNamespace ? `exports.Prisma.${type.name} = ${enumBody};` : `exports.${type.name} = exports.$Enums.${type.name} = ${enumBody};`;
@@ -3193,7 +3193,7 @@ ${indent(type.values.map((v) => `${v}: ${this.getValueJS(v)}`).join(",\n"), TAB_
3193
3193
  toTS() {
3194
3194
  const { type } = this;
3195
3195
  return `export const ${type.name}: {
3196
- ${indent(type.values.map((v) => `${v}: ${this.getValueTS(v)}`).join(",\n"), TAB_SIZE)}
3196
+ ${indent(type.data.map((v) => `${v.key}: ${this.getValueTS(v.value)}`).join(",\n"), TAB_SIZE)}
3197
3197
  };
3198
3198
 
3199
3199
  export type ${type.name} = (typeof ${type.name})[keyof typeof ${type.name}]
@@ -4919,7 +4919,7 @@ function fluentWrapperName(modelName) {
4919
4919
  }
4920
4920
 
4921
4921
  // src/TSClient/TSClient.ts
4922
- import { datamodelEnumToSchemaEnum } from "@prisma/dmmf";
4922
+ import { datamodelEnumToSchemaEnum, datamodelSchemaEnumToSchemaEnum } from "@prisma/dmmf";
4923
4923
  import { ClientEngineType as ClientEngineType2, getClientEngineType, pathToPosix as pathToPosix3 } from "@prisma/internals";
4924
4924
  import * as ts12 from "@prisma/ts-builders";
4925
4925
  import ciInfo from "ci-info";
@@ -6629,13 +6629,16 @@ ${buildRequirePath(edge)}
6629
6629
  /**
6630
6630
  * Enums
6631
6631
  */
6632
- ${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toJS()).join("\n\n")}
6632
+ ${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(datamodelSchemaEnumToSchemaEnum(type), true).toJS()).join("\n\n")}
6633
6633
  ${this.dmmf.datamodel.enums.map((datamodelEnum) => new Enum(datamodelEnumToSchemaEnum(datamodelEnum), false).toJS()).join("\n\n")}
6634
6634
 
6635
6635
  ${new Enum(
6636
6636
  {
6637
6637
  name: "ModelName",
6638
- values: this.dmmf.mappings.modelOperations.map((m) => m.model)
6638
+ data: this.dmmf.mappings.modelOperations.map((m) => ({
6639
+ key: m.model,
6640
+ value: m.model
6641
+ }))
6639
6642
  },
6640
6643
  true
6641
6644
  ).toJS()}
@@ -6682,7 +6685,9 @@ ${buildNFTAnnotations(edge || !copyEngine, clientEngineType, binaryTargets, rela
6682
6685
  }
6683
6686
  return acc;
6684
6687
  }, []);
6685
- const prismaEnums = this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
6688
+ const prismaEnums = this.dmmf.schema.enumTypes.prisma?.map(
6689
+ (type) => new Enum(datamodelSchemaEnumToSchemaEnum(type), true).toTS()
6690
+ );
6686
6691
  const modelEnums = [];
6687
6692
  const modelEnumsAliases = [];
6688
6693
  for (const datamodelEnum of this.dmmf.datamodel.enums) {
@@ -6724,7 +6729,10 @@ ${indent8(
6724
6729
  ${new Enum(
6725
6730
  {
6726
6731
  name: "ModelName",
6727
- values: this.dmmf.mappings.modelOperations.map((m) => m.model)
6732
+ data: this.dmmf.mappings.modelOperations.map((m) => ({
6733
+ key: m.model,
6734
+ value: m.model
6735
+ }))
6728
6736
  },
6729
6737
  true
6730
6738
  ).toTS()}
@@ -6808,13 +6816,16 @@ export const dmmf: runtime.BaseDMMF
6808
6816
  * Enums
6809
6817
  */
6810
6818
 
6811
- ${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toJS()).join("\n\n")}
6812
- ${this.dmmf.schema.enumTypes.model?.map((type) => new Enum(type, false).toJS()).join("\n\n") ?? ""}
6819
+ ${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(datamodelSchemaEnumToSchemaEnum(type), true).toJS()).join("\n\n")}
6820
+ ${this.dmmf.schema.enumTypes.model?.map((type) => new Enum(datamodelSchemaEnumToSchemaEnum(type), false).toJS()).join("\n\n") ?? ""}
6813
6821
 
6814
6822
  ${new Enum(
6815
6823
  {
6816
6824
  name: "ModelName",
6817
- values: this.dmmf.mappings.modelOperations.map((m) => m.model)
6825
+ data: this.dmmf.mappings.modelOperations.map((m) => ({
6826
+ key: m.model,
6827
+ value: m.model
6828
+ }))
6818
6829
  },
6819
6830
  true
6820
6831
  ).toJS()}
@@ -7726,7 +7737,7 @@ import { ClientEngineType as ClientEngineType4, getClientEngineType as getClient
7726
7737
  import { match } from "ts-pattern";
7727
7738
 
7728
7739
  // package.json
7729
- var version = "6.18.0-dev.4";
7740
+ var version = "6.18.0-integration-next.1";
7730
7741
 
7731
7742
  // src/resolvePrismaClient.ts
7732
7743
  import fs2 from "node:fs/promises";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/client-generator-js",
3
- "version": "6.18.0-dev.4",
3
+ "version": "6.18.0-integration-next.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",
@@ -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": "6.18.0-dev.4",
37
- "@prisma/dmmf": "6.18.0-dev.4",
38
- "@prisma/fetch-engine": "6.18.0-dev.4",
39
- "@prisma/debug": "6.18.0-dev.4",
40
- "@prisma/generator": "6.18.0-dev.4",
41
- "@prisma/get-platform": "6.18.0-dev.4",
42
- "@prisma/internals": "6.18.0-dev.4",
43
- "@prisma/ts-builders": "6.18.0-dev.4"
36
+ "@prisma/client-common": "6.18.0-integration-next.1",
37
+ "@prisma/dmmf": "6.18.0-integration-next.1",
38
+ "@prisma/debug": "6.18.0-integration-next.1",
39
+ "@prisma/fetch-engine": "6.18.0-integration-next.1",
40
+ "@prisma/generator": "6.18.0-integration-next.1",
41
+ "@prisma/get-platform": "6.18.0-integration-next.1",
42
+ "@prisma/internals": "6.18.0-integration-next.1",
43
+ "@prisma/ts-builders": "6.18.0-integration-next.1"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/pluralize": "0.0.33",