@prisma/client-generator-ts 7.2.0 → 7.3.0-integration-fix-6-19-0-cloudflare-accelerate-engine.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.
@@ -10,26 +10,26 @@ export declare class ArgsTypeBuilder {
10
10
  private addProperty;
11
11
  addSchemaArgs(args: readonly DMMF.SchemaArg[]): this;
12
12
  addSelectArg(selectTypeName?: string): this;
13
- addIncludeArgIfHasRelations(includeTypeName?: string, type?: DMMF.ReadonlyDeep<{
13
+ addIncludeArgIfHasRelations(includeTypeName?: string, type?: import("@prisma/dmmf/dist/util").ReadonlyDeep<{
14
14
  name: string;
15
- fields: DMMF.ReadonlyDeep<{
15
+ fields: import("@prisma/dmmf/dist/util").ReadonlyDeep<{
16
16
  name: string;
17
17
  isNullable?: boolean | undefined;
18
18
  outputType: DMMF.OutputTypeRef;
19
- args: DMMF.ReadonlyDeep<{
19
+ args: import("@prisma/dmmf/dist/util").ReadonlyDeep<{
20
20
  name: string;
21
21
  comment?: string | undefined;
22
22
  isNullable: boolean;
23
23
  isRequired: boolean;
24
24
  inputTypes: DMMF.InputTypeRef[];
25
25
  requiresOtherFields?: string[] | undefined;
26
- deprecation?: DMMF.ReadonlyDeep<{
26
+ deprecation?: import("@prisma/dmmf/dist/util").ReadonlyDeep<{
27
27
  sinceVersion: string;
28
28
  reason: string;
29
29
  plannedRemovalVersion?: string | undefined;
30
30
  }> | undefined;
31
31
  }>[];
32
- deprecation?: DMMF.ReadonlyDeep<{
32
+ deprecation?: import("@prisma/dmmf/dist/util").ReadonlyDeep<{
33
33
  sinceVersion: string;
34
34
  reason: string;
35
35
  plannedRemovalVersion?: string | undefined;
@@ -0,0 +1,6 @@
1
+ import { DataSource } from '@prisma/generator';
2
+ export declare class Datasources {
3
+ protected readonly internalDatasources: DataSource[];
4
+ constructor(internalDatasources: DataSource[]);
5
+ toTS(): string;
6
+ }
@@ -1,4 +1,4 @@
1
- import { ActiveConnectorType, GeneratorConfig } from '@prisma/generator';
1
+ import { GeneratorConfig } from '@prisma/generator';
2
2
  import { DMMFHelper } from '../dmmf';
3
3
  import { FileNameMapper } from '../file-extensions';
4
4
  import { GenericArgsInfo } from '../GenericsArgsInfo';
@@ -10,7 +10,6 @@ export interface GenerateContextOptions {
10
10
  outputFileName: FileNameMapper;
11
11
  importFileName: FileNameMapper;
12
12
  generator?: GeneratorConfig;
13
- provider: ActiveConnectorType;
14
13
  }
15
14
  export declare class GenerateContext implements GenerateContextOptions {
16
15
  dmmf: DMMFHelper;
@@ -20,8 +19,6 @@ export declare class GenerateContext implements GenerateContextOptions {
20
19
  outputFileName: FileNameMapper;
21
20
  importFileName: FileNameMapper;
22
21
  generator?: GeneratorConfig;
23
- provider: ActiveConnectorType;
24
- constructor({ dmmf, genericArgsInfo, runtimeBase, runtimeImport, outputFileName, importFileName, generator, provider, }: GenerateContextOptions);
22
+ constructor({ dmmf, genericArgsInfo, runtimeBase, runtimeImport, outputFileName, importFileName, generator, }: GenerateContextOptions);
25
23
  isPreviewFeatureOn(previewFeature: string): boolean;
26
- isSqlProvider(): boolean;
27
24
  }
@@ -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";
@@ -8,4 +8,5 @@ export declare class PrismaClientClass {
8
8
  constructor(context: GenerateContext, runtimeName: TSClientOptions['runtimeName']);
9
9
  private get jsDoc();
10
10
  toTS(): string;
11
+ private applyPendingMigrationsDefinition;
11
12
  }
@@ -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 = 'wasm-compiler-edge' | '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;
@@ -1,3 +1,3 @@
1
1
  import { GenerateContext } from '../GenerateContext';
2
2
  import { TSClientOptions } from '../TSClient';
3
- export declare function createBrowserFile(context: GenerateContext, _options: TSClientOptions): string;
3
+ export declare function createBrowserFile(context: GenerateContext, options: TSClientOptions): string;
@@ -0,0 +1,6 @@
1
+ export interface DatasourceOverwrite {
2
+ name: string;
3
+ url?: string;
4
+ env?: string;
5
+ }
6
+ export declare function extractSqliteSources(datamodel: string, cwd: string, outputDir: string, absolutePaths?: boolean): DatasourceOverwrite[];
@@ -0,0 +1 @@
1
+ export {};
@@ -2,6 +2,7 @@
2
2
  /// <reference types="node" />
3
3
  import type * as DMMF from '@prisma/dmmf';
4
4
  import type { ActiveConnectorType, BinaryPaths, DataSource, GeneratorConfig, SqlQueryOutput } from '@prisma/generator';
5
+ import { EnvPaths } from '@prisma/internals';
5
6
  import type { O } from 'ts-toolbelt';
6
7
  import { GeneratedFileExtension, ImportFileExtension } from './file-extensions';
7
8
  import { ModuleFormat } from './module-format';
@@ -22,6 +23,11 @@ export interface GenerateClientOptions {
22
23
  engineVersion: string;
23
24
  clientVersion: string;
24
25
  activeProvider: ActiveConnectorType;
26
+ envPaths?: EnvPaths;
27
+ /** When --postinstall is passed via CLI */
28
+ postinstall?: boolean;
29
+ /** False when --no-engine is passed via CLI */
30
+ copyEngine?: boolean;
25
31
  typedSql?: SqlQueryOutput[];
26
32
  target: RuntimeTargetInternal;
27
33
  generatedFileExtension: GeneratedFileExtension;
@@ -37,5 +43,5 @@ export interface BuildClientResult {
37
43
  fileMap: FileMap;
38
44
  prismaClientDmmf: DMMF.Document;
39
45
  }
40
- export declare function buildClient({ schemaPath, runtimeBase, datamodel, binaryPaths, outputDir, generator, dmmf, datasources, engineVersion, clientVersion, activeProvider, typedSql, target, generatedFileExtension, importFileExtension, moduleFormat, tsNoCheckPreamble, }: O.Required<GenerateClientOptions, 'runtimeBase'>): BuildClientResult;
46
+ export declare function buildClient({ schemaPath, runtimeBase, datamodel, binaryPaths, outputDir, generator, dmmf, datasources, engineVersion, clientVersion, activeProvider, postinstall, copyEngine, envPaths, typedSql, target, generatedFileExtension, importFileExtension, moduleFormat, tsNoCheckPreamble, }: O.Required<GenerateClientOptions, 'runtimeBase'>): BuildClientResult;
41
47
  export declare function generateClient(options: GenerateClientOptions): Promise<void>;
package/dist/index.d.mts CHANGED
@@ -4,6 +4,7 @@ import type { ActiveConnectorType } from '@prisma/generator';
4
4
  import type { BinaryPaths } from '@prisma/generator';
5
5
  import type { DataSource } from '@prisma/generator';
6
6
  import * as DMMF from '@prisma/dmmf';
7
+ import { EnvPaths } from '@prisma/internals';
7
8
  import { Generator as Generator_2 } from '@prisma/generator';
8
9
  import { GeneratorConfig } from '@prisma/generator';
9
10
  import { GeneratorManifest } from '@prisma/generator';
@@ -36,6 +37,11 @@ export declare interface GenerateClientOptions {
36
37
  engineVersion: string;
37
38
  clientVersion: string;
38
39
  activeProvider: ActiveConnectorType;
40
+ envPaths?: EnvPaths;
41
+ /** When --postinstall is passed via CLI */
42
+ postinstall?: boolean;
43
+ /** False when --no-engine is passed via CLI */
44
+ copyEngine?: boolean;
39
45
  typedSql?: SqlQueryOutput[];
40
46
  target: RuntimeTargetInternal;
41
47
  generatedFileExtension: GeneratedFileExtension;
@@ -66,6 +72,6 @@ export declare class PrismaClientTsGenerator implements Generator_2 {
66
72
  */
67
73
  declare type RuntimeTargetInternal = (typeof supportedInternalRuntimes)[number];
68
74
 
69
- declare const supportedInternalRuntimes: readonly ["nodejs", "workerd", "vercel-edge", "deno"];
75
+ declare const supportedInternalRuntimes: readonly ["nodejs", "workerd", "vercel-edge", "deno", "react-native"];
70
76
 
71
77
  export { }
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import type { ActiveConnectorType } from '@prisma/generator';
4
4
  import type { BinaryPaths } from '@prisma/generator';
5
5
  import type { DataSource } from '@prisma/generator';
6
6
  import * as DMMF from '@prisma/dmmf';
7
+ import { EnvPaths } from '@prisma/internals';
7
8
  import { Generator as Generator_2 } from '@prisma/generator';
8
9
  import { GeneratorConfig } from '@prisma/generator';
9
10
  import { GeneratorManifest } from '@prisma/generator';
@@ -36,6 +37,11 @@ export declare interface GenerateClientOptions {
36
37
  engineVersion: string;
37
38
  clientVersion: string;
38
39
  activeProvider: ActiveConnectorType;
40
+ envPaths?: EnvPaths;
41
+ /** When --postinstall is passed via CLI */
42
+ postinstall?: boolean;
43
+ /** False when --no-engine is passed via CLI */
44
+ copyEngine?: boolean;
39
45
  typedSql?: SqlQueryOutput[];
40
46
  target: RuntimeTargetInternal;
41
47
  generatedFileExtension: GeneratedFileExtension;
@@ -66,6 +72,6 @@ export declare class PrismaClientTsGenerator implements Generator_2 {
66
72
  */
67
73
  declare type RuntimeTargetInternal = (typeof supportedInternalRuntimes)[number];
68
74
 
69
- declare const supportedInternalRuntimes: readonly ["nodejs", "workerd", "vercel-edge", "deno"];
75
+ declare const supportedInternalRuntimes: readonly ["nodejs", "workerd", "vercel-edge", "deno", "react-native"];
70
76
 
71
77
  export { }