@prisma/client-generator-js 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 +10 -21
- package/dist/index.mjs +11 -22
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -2597,7 +2597,7 @@ var Enum = class {
|
|
|
2597
2597
|
toJS() {
|
|
2598
2598
|
const { type } = this;
|
|
2599
2599
|
const enumVariants = `{
|
|
2600
|
-
${(0, import_indent_string.default)(type.
|
|
2600
|
+
${(0, import_indent_string.default)(type.values.map((v) => `${v}: ${this.getValueJS(v)}`).join(",\n"), TAB_SIZE)}
|
|
2601
2601
|
}`;
|
|
2602
2602
|
const enumBody = this.isStrictEnum() ? `makeStrictEnum(${enumVariants})` : enumVariants;
|
|
2603
2603
|
return this.useNamespace ? `exports.Prisma.${type.name} = ${enumBody};` : `exports.${type.name} = exports.$Enums.${type.name} = ${enumBody};`;
|
|
@@ -2608,7 +2608,7 @@ ${(0, import_indent_string.default)(type.data.map((v) => `${v.key}: ${this.getVa
|
|
|
2608
2608
|
toTS() {
|
|
2609
2609
|
const { type } = this;
|
|
2610
2610
|
return `export const ${type.name}: {
|
|
2611
|
-
${(0, import_indent_string.default)(type.
|
|
2611
|
+
${(0, import_indent_string.default)(type.values.map((v) => `${v}: ${this.getValueTS(v)}`).join(",\n"), TAB_SIZE)}
|
|
2612
2612
|
};
|
|
2613
2613
|
|
|
2614
2614
|
export type ${type.name} = (typeof ${type.name})[keyof typeof ${type.name}]
|
|
@@ -5821,16 +5821,13 @@ ${buildRequirePath(edge)}
|
|
|
5821
5821
|
/**
|
|
5822
5822
|
* Enums
|
|
5823
5823
|
*/
|
|
5824
|
-
${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(
|
|
5824
|
+
${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toJS()).join("\n\n")}
|
|
5825
5825
|
${this.dmmf.datamodel.enums.map((datamodelEnum) => new Enum((0, import_dmmf.datamodelEnumToSchemaEnum)(datamodelEnum), false).toJS()).join("\n\n")}
|
|
5826
5826
|
|
|
5827
5827
|
${new Enum(
|
|
5828
5828
|
{
|
|
5829
5829
|
name: "ModelName",
|
|
5830
|
-
|
|
5831
|
-
key: m.model,
|
|
5832
|
-
value: m.model
|
|
5833
|
-
}))
|
|
5830
|
+
values: this.dmmf.mappings.modelOperations.map((m) => m.model)
|
|
5834
5831
|
},
|
|
5835
5832
|
true
|
|
5836
5833
|
).toJS()}
|
|
@@ -5873,9 +5870,7 @@ Object.assign(exports, Prisma)
|
|
|
5873
5870
|
}
|
|
5874
5871
|
return acc;
|
|
5875
5872
|
}, []);
|
|
5876
|
-
const prismaEnums = this.dmmf.schema.enumTypes.prisma?.map(
|
|
5877
|
-
(type) => new Enum((0, import_dmmf.datamodelSchemaEnumToSchemaEnum)(type), true).toTS()
|
|
5878
|
-
);
|
|
5873
|
+
const prismaEnums = this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
|
|
5879
5874
|
const modelEnums = [];
|
|
5880
5875
|
const modelEnumsAliases = [];
|
|
5881
5876
|
for (const datamodelEnum of this.dmmf.datamodel.enums) {
|
|
@@ -5917,10 +5912,7 @@ ${(0, import_indent_string7.default)(
|
|
|
5917
5912
|
${new Enum(
|
|
5918
5913
|
{
|
|
5919
5914
|
name: "ModelName",
|
|
5920
|
-
|
|
5921
|
-
key: m.model,
|
|
5922
|
-
value: m.model
|
|
5923
|
-
}))
|
|
5915
|
+
values: this.dmmf.mappings.modelOperations.map((m) => m.model)
|
|
5924
5916
|
},
|
|
5925
5917
|
true
|
|
5926
5918
|
).toTS()}
|
|
@@ -6004,16 +5996,13 @@ export const dmmf: runtime.BaseDMMF
|
|
|
6004
5996
|
* Enums
|
|
6005
5997
|
*/
|
|
6006
5998
|
|
|
6007
|
-
${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(
|
|
6008
|
-
${this.dmmf.schema.enumTypes.model?.map((type) => new Enum(
|
|
5999
|
+
${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toJS()).join("\n\n")}
|
|
6000
|
+
${this.dmmf.schema.enumTypes.model?.map((type) => new Enum(type, false).toJS()).join("\n\n") ?? ""}
|
|
6009
6001
|
|
|
6010
6002
|
${new Enum(
|
|
6011
6003
|
{
|
|
6012
6004
|
name: "ModelName",
|
|
6013
|
-
|
|
6014
|
-
key: m.model,
|
|
6015
|
-
value: m.model
|
|
6016
|
-
}))
|
|
6005
|
+
values: this.dmmf.mappings.modelOperations.map((m) => m.model)
|
|
6017
6006
|
},
|
|
6018
6007
|
true
|
|
6019
6008
|
).toJS()}
|
|
@@ -6824,7 +6813,7 @@ var import_engines_version = require("@prisma/engines-version");
|
|
|
6824
6813
|
var import_internals9 = require("@prisma/internals");
|
|
6825
6814
|
|
|
6826
6815
|
// package.json
|
|
6827
|
-
var version = "7.3.0-dev.
|
|
6816
|
+
var version = "7.3.0-dev.8";
|
|
6828
6817
|
|
|
6829
6818
|
// src/resolvePrismaClient.ts
|
|
6830
6819
|
var import_promises2 = __toESM(require("node:fs/promises"));
|
package/dist/index.mjs
CHANGED
|
@@ -2586,7 +2586,7 @@ var Enum = class {
|
|
|
2586
2586
|
toJS() {
|
|
2587
2587
|
const { type } = this;
|
|
2588
2588
|
const enumVariants = `{
|
|
2589
|
-
${indent(type.
|
|
2589
|
+
${indent(type.values.map((v) => `${v}: ${this.getValueJS(v)}`).join(",\n"), TAB_SIZE)}
|
|
2590
2590
|
}`;
|
|
2591
2591
|
const enumBody = this.isStrictEnum() ? `makeStrictEnum(${enumVariants})` : enumVariants;
|
|
2592
2592
|
return this.useNamespace ? `exports.Prisma.${type.name} = ${enumBody};` : `exports.${type.name} = exports.$Enums.${type.name} = ${enumBody};`;
|
|
@@ -2597,7 +2597,7 @@ ${indent(type.data.map((v) => `${v.key}: ${this.getValueJS(v.value)}`).join(",\n
|
|
|
2597
2597
|
toTS() {
|
|
2598
2598
|
const { type } = this;
|
|
2599
2599
|
return `export const ${type.name}: {
|
|
2600
|
-
${indent(type.
|
|
2600
|
+
${indent(type.values.map((v) => `${v}: ${this.getValueTS(v)}`).join(",\n"), TAB_SIZE)}
|
|
2601
2601
|
};
|
|
2602
2602
|
|
|
2603
2603
|
export type ${type.name} = (typeof ${type.name})[keyof typeof ${type.name}]
|
|
@@ -4323,7 +4323,7 @@ function fluentWrapperName(modelName) {
|
|
|
4323
4323
|
}
|
|
4324
4324
|
|
|
4325
4325
|
// src/TSClient/TSClient.ts
|
|
4326
|
-
import { datamodelEnumToSchemaEnum
|
|
4326
|
+
import { datamodelEnumToSchemaEnum } from "@prisma/dmmf";
|
|
4327
4327
|
import * as ts12 from "@prisma/ts-builders";
|
|
4328
4328
|
import indent7 from "indent-string";
|
|
4329
4329
|
|
|
@@ -5813,16 +5813,13 @@ ${buildRequirePath(edge)}
|
|
|
5813
5813
|
/**
|
|
5814
5814
|
* Enums
|
|
5815
5815
|
*/
|
|
5816
|
-
${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(
|
|
5816
|
+
${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toJS()).join("\n\n")}
|
|
5817
5817
|
${this.dmmf.datamodel.enums.map((datamodelEnum) => new Enum(datamodelEnumToSchemaEnum(datamodelEnum), false).toJS()).join("\n\n")}
|
|
5818
5818
|
|
|
5819
5819
|
${new Enum(
|
|
5820
5820
|
{
|
|
5821
5821
|
name: "ModelName",
|
|
5822
|
-
|
|
5823
|
-
key: m.model,
|
|
5824
|
-
value: m.model
|
|
5825
|
-
}))
|
|
5822
|
+
values: this.dmmf.mappings.modelOperations.map((m) => m.model)
|
|
5826
5823
|
},
|
|
5827
5824
|
true
|
|
5828
5825
|
).toJS()}
|
|
@@ -5865,9 +5862,7 @@ Object.assign(exports, Prisma)
|
|
|
5865
5862
|
}
|
|
5866
5863
|
return acc;
|
|
5867
5864
|
}, []);
|
|
5868
|
-
const prismaEnums = this.dmmf.schema.enumTypes.prisma?.map(
|
|
5869
|
-
(type) => new Enum(datamodelSchemaEnumToSchemaEnum(type), true).toTS()
|
|
5870
|
-
);
|
|
5865
|
+
const prismaEnums = this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
|
|
5871
5866
|
const modelEnums = [];
|
|
5872
5867
|
const modelEnumsAliases = [];
|
|
5873
5868
|
for (const datamodelEnum of this.dmmf.datamodel.enums) {
|
|
@@ -5909,10 +5904,7 @@ ${indent7(
|
|
|
5909
5904
|
${new Enum(
|
|
5910
5905
|
{
|
|
5911
5906
|
name: "ModelName",
|
|
5912
|
-
|
|
5913
|
-
key: m.model,
|
|
5914
|
-
value: m.model
|
|
5915
|
-
}))
|
|
5907
|
+
values: this.dmmf.mappings.modelOperations.map((m) => m.model)
|
|
5916
5908
|
},
|
|
5917
5909
|
true
|
|
5918
5910
|
).toTS()}
|
|
@@ -5996,16 +5988,13 @@ export const dmmf: runtime.BaseDMMF
|
|
|
5996
5988
|
* Enums
|
|
5997
5989
|
*/
|
|
5998
5990
|
|
|
5999
|
-
${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(
|
|
6000
|
-
${this.dmmf.schema.enumTypes.model?.map((type) => new Enum(
|
|
5991
|
+
${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toJS()).join("\n\n")}
|
|
5992
|
+
${this.dmmf.schema.enumTypes.model?.map((type) => new Enum(type, false).toJS()).join("\n\n") ?? ""}
|
|
6001
5993
|
|
|
6002
5994
|
${new Enum(
|
|
6003
5995
|
{
|
|
6004
5996
|
name: "ModelName",
|
|
6005
|
-
|
|
6006
|
-
key: m.model,
|
|
6007
|
-
value: m.model
|
|
6008
|
-
}))
|
|
5997
|
+
values: this.dmmf.mappings.modelOperations.map((m) => m.model)
|
|
6009
5998
|
},
|
|
6010
5999
|
true
|
|
6011
6000
|
).toJS()}
|
|
@@ -6816,7 +6805,7 @@ import { enginesVersion } from "@prisma/engines-version";
|
|
|
6816
6805
|
import { parseEnvValue } from "@prisma/internals";
|
|
6817
6806
|
|
|
6818
6807
|
// package.json
|
|
6819
|
-
var version = "7.3.0-dev.
|
|
6808
|
+
var version = "7.3.0-dev.8";
|
|
6820
6809
|
|
|
6821
6810
|
// src/resolvePrismaClient.ts
|
|
6822
6811
|
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": "7.3.0-dev.
|
|
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",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"package-up": "5.0.0",
|
|
33
33
|
"pluralize": "8.0.0",
|
|
34
34
|
"ts-pattern": "5.6.2",
|
|
35
|
-
"@prisma/client-common": "7.3.0-dev.
|
|
36
|
-
"@prisma/
|
|
37
|
-
"@prisma/
|
|
38
|
-
"@prisma/
|
|
39
|
-
"@prisma/
|
|
40
|
-
"@prisma/generator": "7.3.0-dev.
|
|
41
|
-
"@prisma/
|
|
42
|
-
"@prisma/
|
|
35
|
+
"@prisma/client-common": "7.3.0-dev.8",
|
|
36
|
+
"@prisma/debug": "7.3.0-dev.8",
|
|
37
|
+
"@prisma/dmmf": "7.3.0-dev.8",
|
|
38
|
+
"@prisma/fetch-engine": "7.3.0-dev.8",
|
|
39
|
+
"@prisma/get-platform": "7.3.0-dev.8",
|
|
40
|
+
"@prisma/generator": "7.3.0-dev.8",
|
|
41
|
+
"@prisma/internals": "7.3.0-dev.8",
|
|
42
|
+
"@prisma/ts-builders": "7.3.0-dev.8"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/pluralize": "0.0.33",
|