@prisma/client-generator-ts 6.6.0-dev.63

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 (65) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +5 -0
  3. package/dist/GenericsArgsInfo.d.ts +18 -0
  4. package/dist/GenericsArgsInfo.test.d.ts +1 -0
  5. package/dist/TSClient/Args.d.ts +44 -0
  6. package/dist/TSClient/Count.d.ts +11 -0
  7. package/dist/TSClient/Datasources.d.ts +7 -0
  8. package/dist/TSClient/DefaultArgsAliases.d.ts +4 -0
  9. package/dist/TSClient/Enum.d.ts +13 -0
  10. package/dist/TSClient/FieldRefInput.d.ts +8 -0
  11. package/dist/TSClient/Generable.d.ts +9 -0
  12. package/dist/TSClient/GenerateContext.d.ts +15 -0
  13. package/dist/TSClient/Input.d.ts +21 -0
  14. package/dist/TSClient/Model.d.ts +47 -0
  15. package/dist/TSClient/ModelFieldRefs.d.ts +8 -0
  16. package/dist/TSClient/Output.d.ts +5 -0
  17. package/dist/TSClient/Payload.d.ts +4 -0
  18. package/dist/TSClient/PrismaClient.d.ts +16 -0
  19. package/dist/TSClient/SelectIncludeOmit.d.ts +25 -0
  20. package/dist/TSClient/TSClient.d.ts +37 -0
  21. package/dist/TSClient/common.d.ts +7 -0
  22. package/dist/TSClient/constants.d.ts +1 -0
  23. package/dist/TSClient/globalOmit.d.ts +3 -0
  24. package/dist/TSClient/helpers.d.ts +6 -0
  25. package/dist/TSClient/index.d.ts +5 -0
  26. package/dist/TSClient/jsdoc.d.ts +20 -0
  27. package/dist/TSClient/utils/getModelActions.d.ts +3 -0
  28. package/dist/dmmf.d.ts +40 -0
  29. package/dist/externalToInternalDmmf.d.ts +7 -0
  30. package/dist/extractSqliteSources.d.ts +6 -0
  31. package/dist/extractSqliteSources.test.d.ts +1 -0
  32. package/dist/generateClient.d.ts +40 -0
  33. package/dist/generator.d.ts +13 -0
  34. package/dist/getDMMF.d.ts +4 -0
  35. package/dist/index.d.mts +67 -0
  36. package/dist/index.d.ts +67 -0
  37. package/dist/index.js +7284 -0
  38. package/dist/index.mjs +7281 -0
  39. package/dist/resolveDatasources.d.ts +1 -0
  40. package/dist/resolveDatasources.test.d.ts +1 -0
  41. package/dist/resolvePrismaClient.d.ts +16 -0
  42. package/dist/serializeDatasources.d.ts +4 -0
  43. package/dist/serializeDatasources.test.d.ts +1 -0
  44. package/dist/typedSql/buildDbEnums.d.ts +17 -0
  45. package/dist/typedSql/buildIndex.d.ts +5 -0
  46. package/dist/typedSql/buildTypedQuery.d.ts +12 -0
  47. package/dist/typedSql/mapTypes.d.ts +5 -0
  48. package/dist/typedSql/typedSql.d.ts +12 -0
  49. package/dist/utils/buildDMMF.d.ts +16 -0
  50. package/dist/utils/buildDebugInitialization.d.ts +12 -0
  51. package/dist/utils/buildDirname.d.ts +7 -0
  52. package/dist/utils/buildGetQueryCompilerWasmModule.d.ts +6 -0
  53. package/dist/utils/buildGetQueryEngineWasmModule.d.ts +6 -0
  54. package/dist/utils/buildInjectableEdgeEnv.d.ts +20 -0
  55. package/dist/utils/buildNFTAnnotations.d.ts +11 -0
  56. package/dist/utils/buildNFTAnnotations.test.d.ts +1 -0
  57. package/dist/utils/buildRequirePath.d.ts +6 -0
  58. package/dist/utils/buildWarnEnvConflicts.d.ts +10 -0
  59. package/dist/utils/common.d.ts +29 -0
  60. package/dist/utils/runtimeImport.d.ts +11 -0
  61. package/dist/utils/types/buildComment.d.ts +6 -0
  62. package/dist/utils/types/dmmfToTypes.d.ts +6 -0
  63. package/dist/utils/types/dmmfToTypes.spec.d.ts +1 -0
  64. package/dist/utils.d.ts +36 -0
  65. package/package.json +59 -0
@@ -0,0 +1,40 @@
1
+ import type * as DMMF from '@prisma/dmmf';
2
+ import type { ActiveConnectorType, BinaryPaths, DataSource, GeneratorConfig, SqlQueryOutput } from '@prisma/generator';
3
+ import { EnvPaths } from '@prisma/internals';
4
+ import type { O } from 'ts-toolbelt';
5
+ export declare class DenylistError extends Error {
6
+ constructor(message: string);
7
+ }
8
+ export interface GenerateClientOptions {
9
+ datamodel: string;
10
+ schemaPath: string;
11
+ /** Runtime path used in runtime/type imports */
12
+ runtimeBase?: string;
13
+ outputDir: string;
14
+ generator: GeneratorConfig;
15
+ dmmf: DMMF.Document;
16
+ datasources: DataSource[];
17
+ binaryPaths: BinaryPaths;
18
+ testMode?: boolean;
19
+ copyRuntime?: boolean;
20
+ copyRuntimeSourceMaps?: boolean;
21
+ runtimeSourcePath: string;
22
+ engineVersion: string;
23
+ clientVersion: string;
24
+ activeProvider: ActiveConnectorType;
25
+ envPaths?: EnvPaths;
26
+ /** When --postinstall is passed via CLI */
27
+ postinstall?: boolean;
28
+ /** When --no-engine is passed via CLI */
29
+ copyEngine?: boolean;
30
+ typedSql?: SqlQueryOutput[];
31
+ }
32
+ export interface FileMap {
33
+ [name: string]: string | FileMap;
34
+ }
35
+ export interface BuildClientResult {
36
+ fileMap: FileMap;
37
+ prismaClientDmmf: DMMF.Document;
38
+ }
39
+ export declare function buildClient({ schemaPath, runtimeBase, runtimeSourcePath, datamodel, binaryPaths, outputDir, generator, dmmf, datasources, engineVersion, clientVersion, activeProvider, postinstall, copyEngine, envPaths, typedSql, }: O.Required<GenerateClientOptions, 'runtimeBase'>): Promise<BuildClientResult>;
40
+ export declare function generateClient(options: GenerateClientOptions): Promise<void>;
@@ -0,0 +1,13 @@
1
+ import { Generator, GeneratorConfig, GeneratorManifest, GeneratorOptions } from '@prisma/generator';
2
+ type PrismaClientTsGeneratorOptions = {
3
+ shouldResolvePrismaClient?: boolean;
4
+ runtimePath?: string;
5
+ };
6
+ export declare class PrismaClientTsGenerator implements Generator {
7
+ #private;
8
+ readonly name = "prisma-client-ts";
9
+ constructor({ shouldResolvePrismaClient, runtimePath }?: PrismaClientTsGeneratorOptions);
10
+ getManifest(config: GeneratorConfig): Promise<GeneratorManifest>;
11
+ generate(options: GeneratorOptions): Promise<void>;
12
+ }
13
+ export {};
@@ -0,0 +1,4 @@
1
+ import type * as DMMF from '@prisma/dmmf';
2
+ import type { GetDMMFOptions } from '@prisma/internals';
3
+ export declare function getPrismaClientDMMF(dmmf: DMMF.Document): DMMF.Document;
4
+ export declare function getDMMF(options: GetDMMFOptions): Promise<DMMF.Document>;
@@ -0,0 +1,67 @@
1
+ import type { ActiveConnectorType } from '@prisma/generator';
2
+ import type { BinaryPaths } from '@prisma/generator';
3
+ import type { DataSource } from '@prisma/generator';
4
+ import * as DMMF from '@prisma/dmmf';
5
+ import { EnvPaths } from '@prisma/internals';
6
+ import { Generator as Generator_2 } from '@prisma/generator';
7
+ import { GeneratorConfig } from '@prisma/generator';
8
+ import { GeneratorManifest } from '@prisma/generator';
9
+ import { GeneratorOptions } from '@prisma/generator';
10
+ import type { GetDMMFOptions } from '@prisma/internals';
11
+ import type { SqlQueryOutput } from '@prisma/generator';
12
+
13
+ /**
14
+ * @internal
15
+ * @remarks Used by, for example, the PDP to avoid child process calls to the CLI.
16
+ */
17
+ export declare function dmmfToTypes(dmmf: DMMF.Document): string;
18
+
19
+ /**
20
+ * Turns type: string into type: string[] for all args in order to support union input types
21
+ * @param document
22
+ */
23
+ export declare function externalToInternalDmmf(document: DMMF.Document): DMMF.Document;
24
+
25
+ export declare function generateClient(options: GenerateClientOptions): Promise<void>;
26
+
27
+ declare interface GenerateClientOptions {
28
+ datamodel: string;
29
+ schemaPath: string;
30
+ /** Runtime path used in runtime/type imports */
31
+ runtimeBase?: string;
32
+ outputDir: string;
33
+ generator: GeneratorConfig;
34
+ dmmf: DMMF.Document;
35
+ datasources: DataSource[];
36
+ binaryPaths: BinaryPaths;
37
+ testMode?: boolean;
38
+ copyRuntime?: boolean;
39
+ copyRuntimeSourceMaps?: boolean;
40
+ runtimeSourcePath: string;
41
+ engineVersion: string;
42
+ clientVersion: string;
43
+ activeProvider: ActiveConnectorType;
44
+ envPaths?: EnvPaths;
45
+ /** When --postinstall is passed via CLI */
46
+ postinstall?: boolean;
47
+ /** When --no-engine is passed via CLI */
48
+ copyEngine?: boolean;
49
+ typedSql?: SqlQueryOutput[];
50
+ }
51
+
52
+ export declare function getDMMF(options: GetDMMFOptions): Promise<DMMF.Document>;
53
+
54
+ export declare class PrismaClientTsGenerator implements Generator_2 {
55
+ #private;
56
+ readonly name = "prisma-client-ts";
57
+ constructor({ shouldResolvePrismaClient, runtimePath }?: PrismaClientTsGeneratorOptions);
58
+ getManifest(config: GeneratorConfig): Promise<GeneratorManifest>;
59
+ generate(options: GeneratorOptions): Promise<void>;
60
+ }
61
+
62
+ declare type PrismaClientTsGeneratorOptions = {
63
+ shouldResolvePrismaClient?: boolean;
64
+ runtimePath?: string;
65
+ };
66
+
67
+ export { }
@@ -0,0 +1,67 @@
1
+ import type { ActiveConnectorType } from '@prisma/generator';
2
+ import type { BinaryPaths } from '@prisma/generator';
3
+ import type { DataSource } from '@prisma/generator';
4
+ import * as DMMF from '@prisma/dmmf';
5
+ import { EnvPaths } from '@prisma/internals';
6
+ import { Generator as Generator_2 } from '@prisma/generator';
7
+ import { GeneratorConfig } from '@prisma/generator';
8
+ import { GeneratorManifest } from '@prisma/generator';
9
+ import { GeneratorOptions } from '@prisma/generator';
10
+ import type { GetDMMFOptions } from '@prisma/internals';
11
+ import type { SqlQueryOutput } from '@prisma/generator';
12
+
13
+ /**
14
+ * @internal
15
+ * @remarks Used by, for example, the PDP to avoid child process calls to the CLI.
16
+ */
17
+ export declare function dmmfToTypes(dmmf: DMMF.Document): string;
18
+
19
+ /**
20
+ * Turns type: string into type: string[] for all args in order to support union input types
21
+ * @param document
22
+ */
23
+ export declare function externalToInternalDmmf(document: DMMF.Document): DMMF.Document;
24
+
25
+ export declare function generateClient(options: GenerateClientOptions): Promise<void>;
26
+
27
+ declare interface GenerateClientOptions {
28
+ datamodel: string;
29
+ schemaPath: string;
30
+ /** Runtime path used in runtime/type imports */
31
+ runtimeBase?: string;
32
+ outputDir: string;
33
+ generator: GeneratorConfig;
34
+ dmmf: DMMF.Document;
35
+ datasources: DataSource[];
36
+ binaryPaths: BinaryPaths;
37
+ testMode?: boolean;
38
+ copyRuntime?: boolean;
39
+ copyRuntimeSourceMaps?: boolean;
40
+ runtimeSourcePath: string;
41
+ engineVersion: string;
42
+ clientVersion: string;
43
+ activeProvider: ActiveConnectorType;
44
+ envPaths?: EnvPaths;
45
+ /** When --postinstall is passed via CLI */
46
+ postinstall?: boolean;
47
+ /** When --no-engine is passed via CLI */
48
+ copyEngine?: boolean;
49
+ typedSql?: SqlQueryOutput[];
50
+ }
51
+
52
+ export declare function getDMMF(options: GetDMMFOptions): Promise<DMMF.Document>;
53
+
54
+ export declare class PrismaClientTsGenerator implements Generator_2 {
55
+ #private;
56
+ readonly name = "prisma-client-ts";
57
+ constructor({ shouldResolvePrismaClient, runtimePath }?: PrismaClientTsGeneratorOptions);
58
+ getManifest(config: GeneratorConfig): Promise<GeneratorManifest>;
59
+ generate(options: GeneratorOptions): Promise<void>;
60
+ }
61
+
62
+ declare type PrismaClientTsGeneratorOptions = {
63
+ shouldResolvePrismaClient?: boolean;
64
+ runtimePath?: string;
65
+ };
66
+
67
+ export { }