@prisma/client-generator-ts 6.19.0-integration-next.3 → 6.19.0-integration-engines-6-19-0-1-push-qtpkxwkvolmz-389b05cecb76e4e93db0ae07c19800226f238242.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.
@@ -1 +1 @@
1
- export declare const nullTypes = "\nexport const NullTypes = {\n DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull),\n JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull),\n AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.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.DbNull\n\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.JsonNull\n\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.AnyNull\n";
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";
@@ -3,7 +3,7 @@ import { DMMFHelper } from '../dmmf';
3
3
  import type { FileMap } from '../generateClient';
4
4
  import { GenerateClientOptions } from '../generateClient';
5
5
  import { GenericArgsInfo } from '../GenericsArgsInfo';
6
- export type RuntimeName = 'binary' | 'library' | 'wasm-compiler-edge' | 'react-native' | 'client' | (string & {});
6
+ export type RuntimeName = 'binary' | 'library' | 'wasm-engine-edge' | 'wasm-compiler-edge' | 'edge' | 'react-native' | 'client' | (string & {});
7
7
  export type TSClientOptions = O.Required<GenerateClientOptions, 'runtimeBase'> & {
8
8
  /** The name of the runtime bundle to use */
9
9
  runtimeName: RuntimeName;
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.data.map((v) => `${v.key}: ${this.getValue(v.value)}`).join(",\n"), TAB_SIZE)}
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}
@@ -2939,6 +2939,7 @@ ${modelExports(context).join("\n")}
2939
2939
  }
2940
2940
 
2941
2941
  // src/TSClient/file-generators/ClassFile.ts
2942
+ var import_node_crypto = __toESM(require("node:crypto"));
2942
2943
  var import_node_path2 = __toESM(require("node:path"));
2943
2944
  var import_internals4 = require("@prisma/internals");
2944
2945
  var ts6 = __toESM(require("@prisma/ts-builders"));
@@ -3455,7 +3456,7 @@ function escapeJson(str) {
3455
3456
  function buildRuntimeDataModel(datamodel, runtimeName) {
3456
3457
  const runtimeDataModel = (0, import_client_common10.dmmfToRuntimeDataModel)(datamodel);
3457
3458
  let prunedDataModel;
3458
- if (runtimeName === "wasm-compiler-edge" || runtimeName === "client") {
3459
+ if (runtimeName === "wasm-engine-edge" || runtimeName === "wasm-compiler-edge" || runtimeName === "client") {
3459
3460
  prunedDataModel = (0, import_client_common10.pruneRuntimeDataModel)(runtimeDataModel);
3460
3461
  } else {
3461
3462
  prunedDataModel = runtimeDataModel;
@@ -3487,7 +3488,7 @@ var import_debug = require("@prisma/debug");
3487
3488
  var import_ts_pattern = require("ts-pattern");
3488
3489
  var debug = (0, import_debug.Debug)("prisma:client-generator-ts:wasm");
3489
3490
  function usesEdgeWasmRuntime(component, runtimeName) {
3490
- return runtimeName === "wasm-compiler-edge" && component === "compiler";
3491
+ return runtimeName === "wasm-engine-edge" && component === "engine" || runtimeName === "wasm-compiler-edge" && component === "compiler";
3491
3492
  }
3492
3493
  function buildGetWasmModule({
3493
3494
  component,
@@ -3929,6 +3930,7 @@ function clientConfig(context, options) {
3929
3930
  } = options;
3930
3931
  const clientEngineType = (0, import_internals4.getClientEngineType)(generator);
3931
3932
  generator.config.engineType = clientEngineType;
3933
+ const inlineSchemaHash = import_node_crypto.default.createHash("sha256").update(Buffer.from(inlineSchema, "utf8").toString("base64")).digest("hex");
3932
3934
  const datasourceFilePath = datasources[0].sourceFilePath;
3933
3935
  const config = {
3934
3936
  generator,
@@ -3941,6 +3943,7 @@ function clientConfig(context, options) {
3941
3943
  ciName: import_ci_info.default.name ?? void 0,
3942
3944
  inlineDatasources: buildInlineDatasources(datasources),
3943
3945
  inlineSchema,
3946
+ inlineSchemaHash,
3944
3947
  copyEngine,
3945
3948
  runtimeDataModel: { models: {}, enums: {}, types: {} },
3946
3949
  dirname: ""
@@ -5150,36 +5153,33 @@ function createModelsFile(context, modelsNames) {
5150
5153
  }
5151
5154
 
5152
5155
  // src/TSClient/file-generators/PrismaNamespaceBrowserFile.ts
5153
- var import_dmmf2 = require("@prisma/dmmf");
5154
5156
  var ts16 = __toESM(require("@prisma/ts-builders"));
5155
5157
 
5156
5158
  // src/TSClient/NullTypes.ts
5157
5159
  var nullTypes = `
5158
5160
  export const NullTypes = {
5159
- DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull),
5160
- JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull),
5161
- AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull),
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),
5162
5164
  }
5163
5165
  /**
5164
5166
  * Helper for filtering JSON entries that have \`null\` on the database (empty on the db)
5165
5167
  *
5166
5168
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
5167
5169
  */
5168
- export const DbNull = runtime.DbNull
5169
-
5170
+ export const DbNull = runtime.objectEnumValues.instances.DbNull
5170
5171
  /**
5171
5172
  * Helper for filtering JSON entries that have JSON \`null\` values (not empty on the db)
5172
5173
  *
5173
5174
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
5174
5175
  */
5175
- export const JsonNull = runtime.JsonNull
5176
-
5176
+ export const JsonNull = runtime.objectEnumValues.instances.JsonNull
5177
5177
  /**
5178
5178
  * Helper for filtering JSON entries that are \`Prisma.DbNull\` or \`Prisma.JsonNull\`
5179
5179
  *
5180
5180
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
5181
5181
  */
5182
- export const AnyNull = runtime.AnyNull
5182
+ export const AnyNull = runtime.objectEnumValues.instances.AnyNull
5183
5183
  `;
5184
5184
 
5185
5185
  // src/TSClient/file-generators/PrismaNamespaceBrowserFile.ts
@@ -5196,9 +5196,7 @@ var jsDocHeader7 = `/*
5196
5196
  */
5197
5197
  `;
5198
5198
  function createPrismaNamespaceBrowserFile(context) {
5199
- const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map(
5200
- (datamodelEnum) => new Enum((0, import_dmmf2.datamodelSchemaEnumToSchemaEnum)(datamodelEnum), false).toTS()
5201
- );
5199
+ const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
5202
5200
  return `${jsDocHeader7}
5203
5201
  ${ts16.stringify(ts16.moduleImport(`${context.runtimeBase}/index-browser`).asNamespace("runtime"))}
5204
5202
 
@@ -5212,10 +5210,7 @@ ${nullTypes}
5212
5210
  ${new Enum(
5213
5211
  {
5214
5212
  name: "ModelName",
5215
- data: context.dmmf.mappings.modelOperations.map((m) => ({
5216
- key: m.model,
5217
- value: m.model
5218
- }))
5213
+ values: context.dmmf.mappings.modelOperations.map((m) => m.model)
5219
5214
  },
5220
5215
  true
5221
5216
  ).toTS()}
@@ -5228,7 +5223,6 @@ ${prismaEnums?.join("\n\n")}
5228
5223
  }
5229
5224
 
5230
5225
  // src/TSClient/file-generators/PrismaNamespaceFile.ts
5231
- var import_dmmf3 = require("@prisma/dmmf");
5232
5226
  var ts19 = __toESM(require("@prisma/ts-builders"));
5233
5227
 
5234
5228
  // src/TSClient/common.ts
@@ -5768,9 +5762,7 @@ function createPrismaNamespaceFile(context, options) {
5768
5762
  ts19.moduleImport(context.importFileName(`../models`)).asNamespace("Prisma").typeOnly(),
5769
5763
  ts19.moduleImport(context.importFileName(`./class`)).named(ts19.namedImport("PrismaClient").typeOnly())
5770
5764
  ].map((i) => ts19.stringify(i));
5771
- const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map(
5772
- (type) => new Enum((0, import_dmmf3.datamodelSchemaEnumToSchemaEnum)(type), true).toTS()
5773
- );
5765
+ const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
5774
5766
  const fieldRefs = context.dmmf.schema.fieldRefTypes.prisma?.map((type) => new FieldRefInput(type).toTS()) ?? [];
5775
5767
  return `${jsDocHeader8}
5776
5768
  ${imports.join("\n")}
@@ -5781,10 +5773,7 @@ ${commonCodeTS(options)}
5781
5773
  ${new Enum(
5782
5774
  {
5783
5775
  name: "ModelName",
5784
- data: context.dmmf.mappings.modelOperations.map((m) => ({
5785
- key: m.model,
5786
- value: m.model
5787
- }))
5776
+ values: context.dmmf.mappings.modelOperations.map((m) => m.model)
5788
5777
  },
5789
5778
  true
5790
5779
  ).toTS()}
@@ -5894,6 +5883,8 @@ function clientExtensionsDefinitions() {
5894
5883
  function buildClientOptions(context, options) {
5895
5884
  const clientOptions = ts19.interfaceDeclaration("PrismaClientOptions").add(
5896
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"))
5897
5888
  ).add(
5898
5889
  ts19.property("errorFormat", ts19.namedType("ErrorFormat")).optional().setDocComment(ts19.docComment('@default "colorless"'))
5899
5890
  ).add(
@@ -5933,7 +5924,7 @@ function buildClientOptions(context, options) {
5933
5924
  timeout ?= 5000
5934
5925
  `)
5935
5926
  );
5936
- if (["library", "client", "wasm-compiler-edge"].includes(options.runtimeName)) {
5927
+ if (["library", "client", "wasm-compiler-edge", "wasm-engine-edge"].includes(options.runtimeName)) {
5937
5928
  clientOptions.add(
5938
5929
  ts19.property("adapter", ts19.unionType([ts19.namedType("runtime.SqlDriverAdapterFactory"), ts19.namedType("null")])).optional().setDocComment(
5939
5930
  ts19.docComment("Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`")
@@ -6265,6 +6256,7 @@ function buildTypedSql({
6265
6256
  var generatedCodePreamble = `
6266
6257
  /* !!! This is code generated by Prisma. Do not edit directly. !!! */
6267
6258
  /* eslint-disable */
6259
+ // biome-ignore-all lint: generated file
6268
6260
  `;
6269
6261
  var tsNoCheckPreamble = `// @ts-nocheck
6270
6262
  `;
@@ -6328,7 +6320,7 @@ function buildClient({
6328
6320
  postinstall,
6329
6321
  copyEngine,
6330
6322
  datamodel,
6331
- edge: ["wasm-compiler-edge", "react-native"].includes(runtimeName),
6323
+ edge: ["edge", "wasm-engine-edge", "wasm-compiler-edge", "react-native"].includes(runtimeName),
6332
6324
  runtimeName,
6333
6325
  target,
6334
6326
  generatedFileExtension,
@@ -6568,7 +6560,7 @@ function getRuntimeNameForTarget(target, engineType) {
6568
6560
  return getNodeRuntimeName(engineType);
6569
6561
  case "workerd":
6570
6562
  case "vercel-edge":
6571
- return "wasm-compiler-edge";
6563
+ return engineType === import_internals10.ClientEngineType.Client ? "wasm-compiler-edge" : "wasm-engine-edge";
6572
6564
  case "react-native":
6573
6565
  return "react-native";
6574
6566
  default:
@@ -6628,7 +6620,7 @@ var import_get_tsconfig = require("get-tsconfig");
6628
6620
  var import_ts_pattern2 = require("ts-pattern");
6629
6621
 
6630
6622
  // package.json
6631
- var version = "6.19.0-integration-next.3";
6623
+ var version = "6.19.0-integration-engines-6-19-0-1-push-qtpkxwkvolmz-389b05cecb76e4e93db0ae07c19800226f238242.1";
6632
6624
 
6633
6625
  // src/module-format.ts
6634
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.data.map((v) => `${v.key}: ${this.getValue(v.value)}`).join(",\n"), TAB_SIZE)}
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}
@@ -2935,6 +2935,7 @@ ${modelExports(context).join("\n")}
2935
2935
  }
2936
2936
 
2937
2937
  // src/TSClient/file-generators/ClassFile.ts
2938
+ import crypto from "node:crypto";
2938
2939
  import path2 from "node:path";
2939
2940
  import { getClientEngineType as getClientEngineType2, pathToPosix } from "@prisma/internals";
2940
2941
  import * as ts6 from "@prisma/ts-builders";
@@ -3454,7 +3455,7 @@ function escapeJson(str) {
3454
3455
  function buildRuntimeDataModel(datamodel, runtimeName) {
3455
3456
  const runtimeDataModel = dmmfToRuntimeDataModel(datamodel);
3456
3457
  let prunedDataModel;
3457
- if (runtimeName === "wasm-compiler-edge" || runtimeName === "client") {
3458
+ if (runtimeName === "wasm-engine-edge" || runtimeName === "wasm-compiler-edge" || runtimeName === "client") {
3458
3459
  prunedDataModel = pruneRuntimeDataModel(runtimeDataModel);
3459
3460
  } else {
3460
3461
  prunedDataModel = runtimeDataModel;
@@ -3486,7 +3487,7 @@ import { Debug } from "@prisma/debug";
3486
3487
  import { match } from "ts-pattern";
3487
3488
  var debug = Debug("prisma:client-generator-ts:wasm");
3488
3489
  function usesEdgeWasmRuntime(component, runtimeName) {
3489
- return runtimeName === "wasm-compiler-edge" && component === "compiler";
3490
+ return runtimeName === "wasm-engine-edge" && component === "engine" || runtimeName === "wasm-compiler-edge" && component === "compiler";
3490
3491
  }
3491
3492
  function buildGetWasmModule({
3492
3493
  component,
@@ -3928,6 +3929,7 @@ function clientConfig(context, options) {
3928
3929
  } = options;
3929
3930
  const clientEngineType = getClientEngineType2(generator);
3930
3931
  generator.config.engineType = clientEngineType;
3932
+ const inlineSchemaHash = crypto.createHash("sha256").update(Buffer.from(inlineSchema, "utf8").toString("base64")).digest("hex");
3931
3933
  const datasourceFilePath = datasources[0].sourceFilePath;
3932
3934
  const config = {
3933
3935
  generator,
@@ -3940,6 +3942,7 @@ function clientConfig(context, options) {
3940
3942
  ciName: ciInfo.name ?? void 0,
3941
3943
  inlineDatasources: buildInlineDatasources(datasources),
3942
3944
  inlineSchema,
3945
+ inlineSchemaHash,
3943
3946
  copyEngine,
3944
3947
  runtimeDataModel: { models: {}, enums: {}, types: {} },
3945
3948
  dirname: ""
@@ -5149,36 +5152,33 @@ function createModelsFile(context, modelsNames) {
5149
5152
  }
5150
5153
 
5151
5154
  // src/TSClient/file-generators/PrismaNamespaceBrowserFile.ts
5152
- import { datamodelSchemaEnumToSchemaEnum } from "@prisma/dmmf";
5153
5155
  import * as ts16 from "@prisma/ts-builders";
5154
5156
 
5155
5157
  // src/TSClient/NullTypes.ts
5156
5158
  var nullTypes = `
5157
5159
  export const NullTypes = {
5158
- DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull),
5159
- JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull),
5160
- AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull),
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),
5161
5163
  }
5162
5164
  /**
5163
5165
  * Helper for filtering JSON entries that have \`null\` on the database (empty on the db)
5164
5166
  *
5165
5167
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
5166
5168
  */
5167
- export const DbNull = runtime.DbNull
5168
-
5169
+ export const DbNull = runtime.objectEnumValues.instances.DbNull
5169
5170
  /**
5170
5171
  * Helper for filtering JSON entries that have JSON \`null\` values (not empty on the db)
5171
5172
  *
5172
5173
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
5173
5174
  */
5174
- export const JsonNull = runtime.JsonNull
5175
-
5175
+ export const JsonNull = runtime.objectEnumValues.instances.JsonNull
5176
5176
  /**
5177
5177
  * Helper for filtering JSON entries that are \`Prisma.DbNull\` or \`Prisma.JsonNull\`
5178
5178
  *
5179
5179
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
5180
5180
  */
5181
- export const AnyNull = runtime.AnyNull
5181
+ export const AnyNull = runtime.objectEnumValues.instances.AnyNull
5182
5182
  `;
5183
5183
 
5184
5184
  // src/TSClient/file-generators/PrismaNamespaceBrowserFile.ts
@@ -5195,9 +5195,7 @@ var jsDocHeader7 = `/*
5195
5195
  */
5196
5196
  `;
5197
5197
  function createPrismaNamespaceBrowserFile(context) {
5198
- const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map(
5199
- (datamodelEnum) => new Enum(datamodelSchemaEnumToSchemaEnum(datamodelEnum), false).toTS()
5200
- );
5198
+ const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
5201
5199
  return `${jsDocHeader7}
5202
5200
  ${ts16.stringify(ts16.moduleImport(`${context.runtimeBase}/index-browser`).asNamespace("runtime"))}
5203
5201
 
@@ -5211,10 +5209,7 @@ ${nullTypes}
5211
5209
  ${new Enum(
5212
5210
  {
5213
5211
  name: "ModelName",
5214
- data: context.dmmf.mappings.modelOperations.map((m) => ({
5215
- key: m.model,
5216
- value: m.model
5217
- }))
5212
+ values: context.dmmf.mappings.modelOperations.map((m) => m.model)
5218
5213
  },
5219
5214
  true
5220
5215
  ).toTS()}
@@ -5227,7 +5222,6 @@ ${prismaEnums?.join("\n\n")}
5227
5222
  }
5228
5223
 
5229
5224
  // src/TSClient/file-generators/PrismaNamespaceFile.ts
5230
- import { datamodelSchemaEnumToSchemaEnum as datamodelSchemaEnumToSchemaEnum2 } from "@prisma/dmmf";
5231
5225
  import * as ts19 from "@prisma/ts-builders";
5232
5226
 
5233
5227
  // src/TSClient/common.ts
@@ -5767,9 +5761,7 @@ function createPrismaNamespaceFile(context, options) {
5767
5761
  ts19.moduleImport(context.importFileName(`../models`)).asNamespace("Prisma").typeOnly(),
5768
5762
  ts19.moduleImport(context.importFileName(`./class`)).named(ts19.namedImport("PrismaClient").typeOnly())
5769
5763
  ].map((i) => ts19.stringify(i));
5770
- const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map(
5771
- (type) => new Enum(datamodelSchemaEnumToSchemaEnum2(type), true).toTS()
5772
- );
5764
+ const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
5773
5765
  const fieldRefs = context.dmmf.schema.fieldRefTypes.prisma?.map((type) => new FieldRefInput(type).toTS()) ?? [];
5774
5766
  return `${jsDocHeader8}
5775
5767
  ${imports.join("\n")}
@@ -5780,10 +5772,7 @@ ${commonCodeTS(options)}
5780
5772
  ${new Enum(
5781
5773
  {
5782
5774
  name: "ModelName",
5783
- data: context.dmmf.mappings.modelOperations.map((m) => ({
5784
- key: m.model,
5785
- value: m.model
5786
- }))
5775
+ values: context.dmmf.mappings.modelOperations.map((m) => m.model)
5787
5776
  },
5788
5777
  true
5789
5778
  ).toTS()}
@@ -5893,6 +5882,8 @@ function clientExtensionsDefinitions() {
5893
5882
  function buildClientOptions(context, options) {
5894
5883
  const clientOptions = ts19.interfaceDeclaration("PrismaClientOptions").add(
5895
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"))
5896
5887
  ).add(
5897
5888
  ts19.property("errorFormat", ts19.namedType("ErrorFormat")).optional().setDocComment(ts19.docComment('@default "colorless"'))
5898
5889
  ).add(
@@ -5932,7 +5923,7 @@ function buildClientOptions(context, options) {
5932
5923
  timeout ?= 5000
5933
5924
  `)
5934
5925
  );
5935
- if (["library", "client", "wasm-compiler-edge"].includes(options.runtimeName)) {
5926
+ if (["library", "client", "wasm-compiler-edge", "wasm-engine-edge"].includes(options.runtimeName)) {
5936
5927
  clientOptions.add(
5937
5928
  ts19.property("adapter", ts19.unionType([ts19.namedType("runtime.SqlDriverAdapterFactory"), ts19.namedType("null")])).optional().setDocComment(
5938
5929
  ts19.docComment("Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`")
@@ -6264,6 +6255,7 @@ function buildTypedSql({
6264
6255
  var generatedCodePreamble = `
6265
6256
  /* !!! This is code generated by Prisma. Do not edit directly. !!! */
6266
6257
  /* eslint-disable */
6258
+ // biome-ignore-all lint: generated file
6267
6259
  `;
6268
6260
  var tsNoCheckPreamble = `// @ts-nocheck
6269
6261
  `;
@@ -6327,7 +6319,7 @@ function buildClient({
6327
6319
  postinstall,
6328
6320
  copyEngine,
6329
6321
  datamodel,
6330
- edge: ["wasm-compiler-edge", "react-native"].includes(runtimeName),
6322
+ edge: ["edge", "wasm-engine-edge", "wasm-compiler-edge", "react-native"].includes(runtimeName),
6331
6323
  runtimeName,
6332
6324
  target,
6333
6325
  generatedFileExtension,
@@ -6567,7 +6559,7 @@ function getRuntimeNameForTarget(target, engineType) {
6567
6559
  return getNodeRuntimeName(engineType);
6568
6560
  case "workerd":
6569
6561
  case "vercel-edge":
6570
- return "wasm-compiler-edge";
6562
+ return engineType === ClientEngineType3.Client ? "wasm-compiler-edge" : "wasm-engine-edge";
6571
6563
  case "react-native":
6572
6564
  return "react-native";
6573
6565
  default:
@@ -6627,7 +6619,7 @@ import { getTsconfig } from "get-tsconfig";
6627
6619
  import { match as match2 } from "ts-pattern";
6628
6620
 
6629
6621
  // package.json
6630
- var version = "6.19.0-integration-next.3";
6622
+ var version = "6.19.0-integration-engines-6-19-0-1-push-qtpkxwkvolmz-389b05cecb76e4e93db0ae07c19800226f238242.1";
6631
6623
 
6632
6624
  // src/module-format.ts
6633
6625
  function parseModuleFormat(format) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/client-generator-ts",
3
- "version": "6.19.0-integration-next.3",
3
+ "version": "6.19.0-integration-engines-6-19-0-1-push-qtpkxwkvolmz-389b05cecb76e4e93db0ae07c19800226f238242.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",
@@ -25,7 +25,7 @@
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
27
  "@antfu/ni": "0.21.12",
28
- "@prisma/engines-version": "6.18.0-8.34b5a692b7bd79939a9a2c3ef97d816e749cda2f",
28
+ "@prisma/engines-version": "6.19.0-1.push-qtpkxwkvolmz-389b05cecb76e4e93db0ae07c19800226f238242",
29
29
  "ci-info": "4.2.0",
30
30
  "fast-glob": "3.3.3",
31
31
  "get-tsconfig": "4.10.0",
@@ -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.19.0-integration-next.3",
38
- "@prisma/debug": "6.19.0-integration-next.3",
39
- "@prisma/dmmf": "6.19.0-integration-next.3",
40
- "@prisma/fetch-engine": "6.19.0-integration-next.3",
41
- "@prisma/get-platform": "6.19.0-integration-next.3",
42
- "@prisma/generator": "6.19.0-integration-next.3",
43
- "@prisma/internals": "6.19.0-integration-next.3",
44
- "@prisma/ts-builders": "6.19.0-integration-next.3"
37
+ "@prisma/client-common": "6.19.0-integration-engines-6-19-0-1-push-qtpkxwkvolmz-389b05cecb76e4e93db0ae07c19800226f238242.1",
38
+ "@prisma/dmmf": "6.19.0-integration-engines-6-19-0-1-push-qtpkxwkvolmz-389b05cecb76e4e93db0ae07c19800226f238242.1",
39
+ "@prisma/fetch-engine": "6.19.0-integration-engines-6-19-0-1-push-qtpkxwkvolmz-389b05cecb76e4e93db0ae07c19800226f238242.1",
40
+ "@prisma/debug": "6.19.0-integration-engines-6-19-0-1-push-qtpkxwkvolmz-389b05cecb76e4e93db0ae07c19800226f238242.1",
41
+ "@prisma/generator": "6.19.0-integration-engines-6-19-0-1-push-qtpkxwkvolmz-389b05cecb76e4e93db0ae07c19800226f238242.1",
42
+ "@prisma/get-platform": "6.19.0-integration-engines-6-19-0-1-push-qtpkxwkvolmz-389b05cecb76e4e93db0ae07c19800226f238242.1",
43
+ "@prisma/internals": "6.19.0-integration-engines-6-19-0-1-push-qtpkxwkvolmz-389b05cecb76e4e93db0ae07c19800226f238242.1",
44
+ "@prisma/ts-builders": "6.19.0-integration-engines-6-19-0-1-push-qtpkxwkvolmz-389b05cecb76e4e93db0ae07c19800226f238242.1"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/pluralize": "0.0.33",