@prisma/client-generator-js 7.9.0-dev.8 → 7.9.0

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.
Files changed (3) hide show
  1. package/dist/index.js +40 -20
  2. package/dist/index.mjs +40 -20
  3. package/package.json +11 -11
package/dist/index.js CHANGED
@@ -2336,11 +2336,6 @@ var package_default = {
2336
2336
  import: "./runtime/index-browser.mjs",
2337
2337
  default: "./runtime/index-browser.mjs"
2338
2338
  },
2339
- "./generator-build": {
2340
- require: "./generator-build/index.js",
2341
- import: "./generator-build/index.js",
2342
- default: "./generator-build/index.js"
2343
- },
2344
2339
  "./sql": {
2345
2340
  require: {
2346
2341
  types: "./sql.d.ts",
@@ -2385,7 +2380,6 @@ var package_default = {
2385
2380
  "README.md",
2386
2381
  "runtime",
2387
2382
  "scripts",
2388
- "generator-build",
2389
2383
  "edge.js",
2390
2384
  "edge.d.ts",
2391
2385
  "index.js",
@@ -2435,7 +2429,7 @@ var package_default = {
2435
2429
  "@prisma/dmmf": "workspace:*",
2436
2430
  "@prisma/driver-adapter-utils": "workspace:*",
2437
2431
  "@prisma/engines": "workspace:*",
2438
- "@prisma/engines-version": "7.8.0-6.3c6e192761c0362d496ed980de936e2f3cebcd3a",
2432
+ "@prisma/engines-version": "7.9.0-1.e922089b7d7502aff4249d5da3420f6fa55fc6ad",
2439
2433
  "@prisma/fetch-engine": "workspace:*",
2440
2434
  "@prisma/generator": "workspace:*",
2441
2435
  "@prisma/generator-helper": "workspace:*",
@@ -2447,7 +2441,7 @@ var package_default = {
2447
2441
  "@prisma/migrate": "workspace:*",
2448
2442
  "@prisma/param-graph": "workspace:*",
2449
2443
  "@prisma/param-graph-builder": "workspace:*",
2450
- "@prisma/query-compiler-wasm": "7.8.0-6.3c6e192761c0362d496ed980de936e2f3cebcd3a",
2444
+ "@prisma/query-compiler-wasm": "7.9.0-1.e922089b7d7502aff4249d5da3420f6fa55fc6ad",
2451
2445
  "@prisma/query-plan-executor": "workspace:*",
2452
2446
  "@prisma/sqlcommenter": "workspace:*",
2453
2447
  "@prisma/sqlcommenter-trace-context": "workspace:*",
@@ -4823,6 +4817,19 @@ export type Subset<T, U> = {
4823
4817
  [key in keyof T]: key extends keyof U ? T[key] : never;
4824
4818
  };
4825
4819
 
4820
+ /**
4821
+ * Resolved type of the argument passed to the \`PrismaClient\` constructor.
4822
+ *
4823
+ * When called without a narrower options type (the common case), this resolves
4824
+ * to \`PrismaClientOptions\` directly, which produces a clear TypeScript error
4825
+ * message (\`not assignable to parameter of type 'PrismaClientOptions'\`) when
4826
+ * the argument is missing or incomplete. When the user supplies a narrower
4827
+ * options type (e.g. via a literal), it falls back to \`Subset\` to keep
4828
+ * filtering out unknown properties.
4829
+ */
4830
+ export type PrismaClientConstructorArgs<Options extends PrismaClientOptions> =
4831
+ [PrismaClientOptions] extends [Options] ? PrismaClientOptions : Subset<Options, PrismaClientOptions>;
4832
+
4826
4833
  /**
4827
4834
  * SelectSubset
4828
4835
  * @desc From \`T\` pick properties that exist in \`U\`. Simple version of Intersection.
@@ -4855,7 +4862,7 @@ type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
4855
4862
  type XOR<T, U> =
4856
4863
  T extends object ?
4857
4864
  U extends object ?
4858
- (Without<T, U> & U) | (Without<U, T> & T)
4865
+ ((Without<T, U> & U) | (Without<U, T> & T)) & object
4859
4866
  : U : T
4860
4867
 
4861
4868
 
@@ -5540,7 +5547,7 @@ export class PrismaClient<
5540
5547
 
5541
5548
  ${(0, import_indent_string6.default)(this.jsDoc, TAB_SIZE)}
5542
5549
 
5543
- constructor(optionsArg ?: Prisma.Subset<ClientOptions, Prisma.PrismaClientOptions>);
5550
+ constructor(optionsArg ?: Prisma.PrismaClientConstructorArgs<ClientOptions>);
5544
5551
  $on<V extends U>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;
5545
5552
 
5546
5553
  /**
@@ -5703,17 +5710,30 @@ export type TransactionClient = Omit<Prisma.DefaultPrismaClient, ${transactionCl
5703
5710
  this.internalDatasources.some((d) => d.provider !== "mongodb")
5704
5711
  ) {
5705
5712
  clientOptions.add(
5706
- ts11.property("adapter", ts11.namedType("runtime.SqlDriverAdapterFactory")).optional().setDocComment(
5707
- ts11.docComment("Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`")
5708
- )
5713
+ ts11.property("adapter", ts11.namedType("runtime.SqlDriverAdapterFactory")).optional().setDocComment(ts11.docComment`
5714
+ A driver adapter that PrismaClient uses to connect to your database, such as the ones provided by \`@prisma/adapter-pg\`, \`@prisma/adapter-libsql\`, \`@prisma/adapter-planetscale\`, etc.
5715
+
5716
+ A driver adapter is **required** unless you connect to your database through Prisma Accelerate (in which case use \`accelerateUrl\` instead).
5717
+
5718
+ Learn more: https://pris.ly/d/driver-adapters
5719
+
5720
+ @example
5721
+ \`\`\`ts
5722
+ import { PrismaPg } from '@prisma/adapter-pg'
5723
+ import { PrismaClient } from './generated/prisma/client'
5724
+
5725
+ const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })
5726
+ const prisma = new PrismaClient({ adapter })
5727
+ \`\`\`
5728
+ `)
5709
5729
  );
5710
5730
  }
5711
5731
  clientOptions.add(
5712
- ts11.property("accelerateUrl", ts11.stringType).optional().setDocComment(
5713
- ts11.docComment(
5714
- "Prisma Accelerate URL allowing the client to connect through Accelerate instead of a direct database."
5715
- )
5716
- )
5732
+ ts11.property("accelerateUrl", ts11.stringType).optional().setDocComment(ts11.docComment`
5733
+ The Prisma Accelerate connection URL. Use this option to connect to your database through Prisma Accelerate instead of using a driver adapter to connect directly.
5734
+
5735
+ Learn more: https://pris.ly/d/accelerate
5736
+ `)
5717
5737
  );
5718
5738
  clientOptions.add(
5719
5739
  ts11.property("omit", ts11.namedType("Prisma.GlobalOmitConfig")).optional().setDocComment(ts11.docComment`
@@ -5917,7 +5937,7 @@ ${fieldRefs.join("\n\n")}` : ""}
5917
5937
  * Deep Input Types
5918
5938
  */
5919
5939
 
5920
- ${this.dmmf.inputObjectTypes.prisma?.reduce((acc, inputType) => {
5940
+ ${(this.dmmf.inputObjectTypes.prisma ?? []).reduce((acc, inputType) => {
5921
5941
  if (inputType.name.includes("Json") && inputType.name.includes("Filter")) {
5922
5942
  const needsGeneric = this.genericsInfo.typeNeedsGenericModelArg(inputType);
5923
5943
  const innerName = needsGeneric ? `${inputType.name}Base<$PrismaModel>` : `${inputType.name}Base`;
@@ -6782,7 +6802,7 @@ var import_engines_version = require("@prisma/engines-version");
6782
6802
  var import_internals9 = require("@prisma/internals");
6783
6803
 
6784
6804
  // package.json
6785
- var version = "7.9.0-dev.8";
6805
+ var version = "7.9.0";
6786
6806
 
6787
6807
  // src/resolvePrismaClient.ts
6788
6808
  var import_promises2 = __toESM(require("node:fs/promises"));
package/dist/index.mjs CHANGED
@@ -2326,11 +2326,6 @@ var package_default = {
2326
2326
  import: "./runtime/index-browser.mjs",
2327
2327
  default: "./runtime/index-browser.mjs"
2328
2328
  },
2329
- "./generator-build": {
2330
- require: "./generator-build/index.js",
2331
- import: "./generator-build/index.js",
2332
- default: "./generator-build/index.js"
2333
- },
2334
2329
  "./sql": {
2335
2330
  require: {
2336
2331
  types: "./sql.d.ts",
@@ -2375,7 +2370,6 @@ var package_default = {
2375
2370
  "README.md",
2376
2371
  "runtime",
2377
2372
  "scripts",
2378
- "generator-build",
2379
2373
  "edge.js",
2380
2374
  "edge.d.ts",
2381
2375
  "index.js",
@@ -2425,7 +2419,7 @@ var package_default = {
2425
2419
  "@prisma/dmmf": "workspace:*",
2426
2420
  "@prisma/driver-adapter-utils": "workspace:*",
2427
2421
  "@prisma/engines": "workspace:*",
2428
- "@prisma/engines-version": "7.8.0-6.3c6e192761c0362d496ed980de936e2f3cebcd3a",
2422
+ "@prisma/engines-version": "7.9.0-1.e922089b7d7502aff4249d5da3420f6fa55fc6ad",
2429
2423
  "@prisma/fetch-engine": "workspace:*",
2430
2424
  "@prisma/generator": "workspace:*",
2431
2425
  "@prisma/generator-helper": "workspace:*",
@@ -2437,7 +2431,7 @@ var package_default = {
2437
2431
  "@prisma/migrate": "workspace:*",
2438
2432
  "@prisma/param-graph": "workspace:*",
2439
2433
  "@prisma/param-graph-builder": "workspace:*",
2440
- "@prisma/query-compiler-wasm": "7.8.0-6.3c6e192761c0362d496ed980de936e2f3cebcd3a",
2434
+ "@prisma/query-compiler-wasm": "7.9.0-1.e922089b7d7502aff4249d5da3420f6fa55fc6ad",
2441
2435
  "@prisma/query-plan-executor": "workspace:*",
2442
2436
  "@prisma/sqlcommenter": "workspace:*",
2443
2437
  "@prisma/sqlcommenter-trace-context": "workspace:*",
@@ -4816,6 +4810,19 @@ export type Subset<T, U> = {
4816
4810
  [key in keyof T]: key extends keyof U ? T[key] : never;
4817
4811
  };
4818
4812
 
4813
+ /**
4814
+ * Resolved type of the argument passed to the \`PrismaClient\` constructor.
4815
+ *
4816
+ * When called without a narrower options type (the common case), this resolves
4817
+ * to \`PrismaClientOptions\` directly, which produces a clear TypeScript error
4818
+ * message (\`not assignable to parameter of type 'PrismaClientOptions'\`) when
4819
+ * the argument is missing or incomplete. When the user supplies a narrower
4820
+ * options type (e.g. via a literal), it falls back to \`Subset\` to keep
4821
+ * filtering out unknown properties.
4822
+ */
4823
+ export type PrismaClientConstructorArgs<Options extends PrismaClientOptions> =
4824
+ [PrismaClientOptions] extends [Options] ? PrismaClientOptions : Subset<Options, PrismaClientOptions>;
4825
+
4819
4826
  /**
4820
4827
  * SelectSubset
4821
4828
  * @desc From \`T\` pick properties that exist in \`U\`. Simple version of Intersection.
@@ -4848,7 +4855,7 @@ type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
4848
4855
  type XOR<T, U> =
4849
4856
  T extends object ?
4850
4857
  U extends object ?
4851
- (Without<T, U> & U) | (Without<U, T> & T)
4858
+ ((Without<T, U> & U) | (Without<U, T> & T)) & object
4852
4859
  : U : T
4853
4860
 
4854
4861
 
@@ -5533,7 +5540,7 @@ export class PrismaClient<
5533
5540
 
5534
5541
  ${indent6(this.jsDoc, TAB_SIZE)}
5535
5542
 
5536
- constructor(optionsArg ?: Prisma.Subset<ClientOptions, Prisma.PrismaClientOptions>);
5543
+ constructor(optionsArg ?: Prisma.PrismaClientConstructorArgs<ClientOptions>);
5537
5544
  $on<V extends U>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;
5538
5545
 
5539
5546
  /**
@@ -5696,17 +5703,30 @@ export type TransactionClient = Omit<Prisma.DefaultPrismaClient, ${transactionCl
5696
5703
  this.internalDatasources.some((d) => d.provider !== "mongodb")
5697
5704
  ) {
5698
5705
  clientOptions.add(
5699
- ts11.property("adapter", ts11.namedType("runtime.SqlDriverAdapterFactory")).optional().setDocComment(
5700
- ts11.docComment("Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`")
5701
- )
5706
+ ts11.property("adapter", ts11.namedType("runtime.SqlDriverAdapterFactory")).optional().setDocComment(ts11.docComment`
5707
+ A driver adapter that PrismaClient uses to connect to your database, such as the ones provided by \`@prisma/adapter-pg\`, \`@prisma/adapter-libsql\`, \`@prisma/adapter-planetscale\`, etc.
5708
+
5709
+ A driver adapter is **required** unless you connect to your database through Prisma Accelerate (in which case use \`accelerateUrl\` instead).
5710
+
5711
+ Learn more: https://pris.ly/d/driver-adapters
5712
+
5713
+ @example
5714
+ \`\`\`ts
5715
+ import { PrismaPg } from '@prisma/adapter-pg'
5716
+ import { PrismaClient } from './generated/prisma/client'
5717
+
5718
+ const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })
5719
+ const prisma = new PrismaClient({ adapter })
5720
+ \`\`\`
5721
+ `)
5702
5722
  );
5703
5723
  }
5704
5724
  clientOptions.add(
5705
- ts11.property("accelerateUrl", ts11.stringType).optional().setDocComment(
5706
- ts11.docComment(
5707
- "Prisma Accelerate URL allowing the client to connect through Accelerate instead of a direct database."
5708
- )
5709
- )
5725
+ ts11.property("accelerateUrl", ts11.stringType).optional().setDocComment(ts11.docComment`
5726
+ The Prisma Accelerate connection URL. Use this option to connect to your database through Prisma Accelerate instead of using a driver adapter to connect directly.
5727
+
5728
+ Learn more: https://pris.ly/d/accelerate
5729
+ `)
5710
5730
  );
5711
5731
  clientOptions.add(
5712
5732
  ts11.property("omit", ts11.namedType("Prisma.GlobalOmitConfig")).optional().setDocComment(ts11.docComment`
@@ -5910,7 +5930,7 @@ ${fieldRefs.join("\n\n")}` : ""}
5910
5930
  * Deep Input Types
5911
5931
  */
5912
5932
 
5913
- ${this.dmmf.inputObjectTypes.prisma?.reduce((acc, inputType) => {
5933
+ ${(this.dmmf.inputObjectTypes.prisma ?? []).reduce((acc, inputType) => {
5914
5934
  if (inputType.name.includes("Json") && inputType.name.includes("Filter")) {
5915
5935
  const needsGeneric = this.genericsInfo.typeNeedsGenericModelArg(inputType);
5916
5936
  const innerName = needsGeneric ? `${inputType.name}Base<$PrismaModel>` : `${inputType.name}Base`;
@@ -6775,7 +6795,7 @@ import { enginesVersion } from "@prisma/engines-version";
6775
6795
  import { BuiltInProvider, parseEnvValue } from "@prisma/internals";
6776
6796
 
6777
6797
  // package.json
6778
- var version = "7.9.0-dev.8";
6798
+ var version = "7.9.0";
6779
6799
 
6780
6800
  // src/resolvePrismaClient.ts
6781
6801
  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.9.0-dev.8",
3
+ "version": "7.9.0",
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,22 +25,22 @@
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
27
  "@antfu/ni": "0.21.12",
28
- "@prisma/engines-version": "7.8.0-6.3c6e192761c0362d496ed980de936e2f3cebcd3a",
28
+ "@prisma/engines-version": "7.9.0-1.e922089b7d7502aff4249d5da3420f6fa55fc6ad",
29
29
  "env-paths": "2.2.1",
30
30
  "indent-string": "4.0.0",
31
31
  "klona": "2.0.6",
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.9.0-dev.8",
36
- "@prisma/dmmf": "7.9.0-dev.8",
37
- "@prisma/generator": "7.9.0-dev.8",
38
- "@prisma/debug": "7.9.0-dev.8",
39
- "@prisma/fetch-engine": "7.9.0-dev.8",
40
- "@prisma/get-platform": "7.9.0-dev.8",
41
- "@prisma/param-graph-builder": "7.9.0-dev.8",
42
- "@prisma/internals": "7.9.0-dev.8",
43
- "@prisma/ts-builders": "7.9.0-dev.8"
35
+ "@prisma/client-common": "7.9.0",
36
+ "@prisma/dmmf": "7.9.0",
37
+ "@prisma/fetch-engine": "7.9.0",
38
+ "@prisma/generator": "7.9.0",
39
+ "@prisma/internals": "7.9.0",
40
+ "@prisma/get-platform": "7.9.0",
41
+ "@prisma/debug": "7.9.0",
42
+ "@prisma/param-graph-builder": "7.9.0",
43
+ "@prisma/ts-builders": "7.9.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/pluralize": "0.0.33"