@prisma/client-generator-js 7.9.0-dev.11 → 7.9.0-dev.13

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 +36 -16
  2. package/dist/index.mjs +36 -16
  3. package/package.json +10 -10
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",
@@ -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.
@@ -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`
@@ -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.11";
6805
+ var version = "7.9.0-dev.13";
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",
@@ -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.
@@ -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`
@@ -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.11";
6798
+ var version = "7.9.0-dev.13";
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.11",
3
+ "version": "7.9.0-dev.13",
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,15 +32,15 @@
32
32
  "package-up": "5.0.0",
33
33
  "pluralize": "8.0.0",
34
34
  "ts-pattern": "5.6.2",
35
- "@prisma/dmmf": "7.9.0-dev.11",
36
- "@prisma/debug": "7.9.0-dev.11",
37
- "@prisma/fetch-engine": "7.9.0-dev.11",
38
- "@prisma/client-common": "7.9.0-dev.11",
39
- "@prisma/generator": "7.9.0-dev.11",
40
- "@prisma/get-platform": "7.9.0-dev.11",
41
- "@prisma/internals": "7.9.0-dev.11",
42
- "@prisma/param-graph-builder": "7.9.0-dev.11",
43
- "@prisma/ts-builders": "7.9.0-dev.11"
35
+ "@prisma/client-common": "7.9.0-dev.13",
36
+ "@prisma/dmmf": "7.9.0-dev.13",
37
+ "@prisma/fetch-engine": "7.9.0-dev.13",
38
+ "@prisma/debug": "7.9.0-dev.13",
39
+ "@prisma/get-platform": "7.9.0-dev.13",
40
+ "@prisma/internals": "7.9.0-dev.13",
41
+ "@prisma/param-graph-builder": "7.9.0-dev.13",
42
+ "@prisma/generator": "7.9.0-dev.13",
43
+ "@prisma/ts-builders": "7.9.0-dev.13"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/pluralize": "0.0.33"