@prisma/client-generator-ts 6.6.0-dev.100
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.
- package/LICENSE +201 -0
- package/README.md +5 -0
- package/dist/GenericsArgsInfo.d.ts +18 -0
- package/dist/GenericsArgsInfo.test.d.ts +1 -0
- package/dist/TSClient/Args.d.ts +43 -0
- package/dist/TSClient/Count.d.ts +11 -0
- package/dist/TSClient/Datasources.d.ts +7 -0
- package/dist/TSClient/DefaultArgsAliases.d.ts +4 -0
- package/dist/TSClient/Enum.d.ts +11 -0
- package/dist/TSClient/FieldRefInput.d.ts +8 -0
- package/dist/TSClient/Generable.d.ts +3 -0
- package/dist/TSClient/GenerateContext.d.ts +15 -0
- package/dist/TSClient/Input.d.ts +21 -0
- package/dist/TSClient/Model.d.ts +47 -0
- package/dist/TSClient/ModelFieldRefs.d.ts +8 -0
- package/dist/TSClient/Output.d.ts +5 -0
- package/dist/TSClient/Payload.d.ts +4 -0
- package/dist/TSClient/PrismaClient.d.ts +15 -0
- package/dist/TSClient/SelectIncludeOmit.d.ts +25 -0
- package/dist/TSClient/TSClient.d.ts +19 -0
- package/dist/TSClient/common.d.ts +5 -0
- package/dist/TSClient/constants.d.ts +1 -0
- package/dist/TSClient/globalOmit.d.ts +3 -0
- package/dist/TSClient/helpers.d.ts +6 -0
- package/dist/TSClient/index.d.ts +4 -0
- package/dist/TSClient/jsdoc.d.ts +20 -0
- package/dist/TSClient/utils/getModelActions.d.ts +3 -0
- package/dist/TSClient/utils/type-builders.d.ts +4 -0
- package/dist/dmmf.d.ts +40 -0
- package/dist/externalToInternalDmmf.d.ts +7 -0
- package/dist/extractSqliteSources.d.ts +6 -0
- package/dist/extractSqliteSources.test.d.ts +1 -0
- package/dist/file-extensions.d.ts +16 -0
- package/dist/generateClient.d.ts +43 -0
- package/dist/generator.d.ts +6 -0
- package/dist/getDMMF.d.ts +4 -0
- package/dist/index.d.mts +70 -0
- package/dist/index.d.ts +70 -0
- package/dist/index.js +6442 -0
- package/dist/index.mjs +6440 -0
- package/dist/module-format.d.ts +13 -0
- package/dist/resolveDatasources.d.ts +1 -0
- package/dist/resolveDatasources.test.d.ts +1 -0
- package/dist/runtime-targets.d.ts +5 -0
- package/dist/serializeDatasources.d.ts +4 -0
- package/dist/serializeDatasources.test.d.ts +1 -0
- package/dist/typedSql/buildDbEnums.d.ts +17 -0
- package/dist/typedSql/buildIndex.d.ts +10 -0
- package/dist/typedSql/buildTypedQuery.d.ts +12 -0
- package/dist/typedSql/mapTypes.d.ts +5 -0
- package/dist/typedSql/typedSql.d.ts +15 -0
- package/dist/utils/buildDMMF.d.ts +7 -0
- package/dist/utils/buildDebugInitialization.d.ts +12 -0
- package/dist/utils/buildDirname.d.ts +4 -0
- package/dist/utils/buildGetWasmModule.d.ts +13 -0
- package/dist/utils/buildInjectableEdgeEnv.d.ts +20 -0
- package/dist/utils/buildNFTAnnotations.d.ts +11 -0
- package/dist/utils/buildNFTAnnotations.test.d.ts +1 -0
- package/dist/utils/common.d.ts +29 -0
- package/dist/utils/runtimeImport.d.ts +11 -0
- package/dist/utils/types/buildComment.d.ts +6 -0
- package/dist/utils.d.ts +36 -0
- package/package.json +60 -0
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
import { GeneratedFileExtension, ImportFileExtension } from './file-extensions';
|
|
6
|
+
import { ModuleFormat } from './module-format';
|
|
7
|
+
import { RuntimeTarget } from './runtime-targets';
|
|
8
|
+
export declare class DenylistError extends Error {
|
|
9
|
+
constructor(message: string);
|
|
10
|
+
}
|
|
11
|
+
export interface GenerateClientOptions {
|
|
12
|
+
datamodel: string;
|
|
13
|
+
schemaPath: string;
|
|
14
|
+
/** Runtime path used in runtime/type imports */
|
|
15
|
+
runtimeBase: string;
|
|
16
|
+
outputDir: string;
|
|
17
|
+
generator: GeneratorConfig;
|
|
18
|
+
dmmf: DMMF.Document;
|
|
19
|
+
datasources: DataSource[];
|
|
20
|
+
binaryPaths: BinaryPaths;
|
|
21
|
+
engineVersion: string;
|
|
22
|
+
clientVersion: string;
|
|
23
|
+
activeProvider: ActiveConnectorType;
|
|
24
|
+
envPaths?: EnvPaths;
|
|
25
|
+
/** When --postinstall is passed via CLI */
|
|
26
|
+
postinstall?: boolean;
|
|
27
|
+
/** False when --no-engine is passed via CLI */
|
|
28
|
+
copyEngine?: boolean;
|
|
29
|
+
typedSql?: SqlQueryOutput[];
|
|
30
|
+
target: RuntimeTarget;
|
|
31
|
+
generatedFileExtension: GeneratedFileExtension;
|
|
32
|
+
importFileExtension: ImportFileExtension;
|
|
33
|
+
moduleFormat: ModuleFormat;
|
|
34
|
+
}
|
|
35
|
+
export interface FileMap {
|
|
36
|
+
[name: string]: string | FileMap;
|
|
37
|
+
}
|
|
38
|
+
export interface BuildClientResult {
|
|
39
|
+
fileMap: FileMap;
|
|
40
|
+
prismaClientDmmf: DMMF.Document;
|
|
41
|
+
}
|
|
42
|
+
export declare function buildClient({ schemaPath, runtimeBase, datamodel, binaryPaths, outputDir, generator, dmmf, datasources, engineVersion, clientVersion, activeProvider, postinstall, copyEngine, envPaths, typedSql, target, generatedFileExtension, importFileExtension, moduleFormat, }: O.Required<GenerateClientOptions, 'runtimeBase'>): BuildClientResult;
|
|
43
|
+
export declare function generateClient(options: GenerateClientOptions): Promise<void>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Generator, GeneratorConfig, GeneratorManifest, GeneratorOptions } from '@prisma/generator';
|
|
2
|
+
export declare class PrismaClientTsGenerator implements Generator {
|
|
3
|
+
readonly name = "prisma-client-ts";
|
|
4
|
+
getManifest(config: GeneratorConfig): Promise<GeneratorManifest>;
|
|
5
|
+
generate(options: GeneratorOptions): Promise<void>;
|
|
6
|
+
}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
declare const expectedGeneratedFileExtensions: readonly ["ts", "mts", "cts"];
|
|
14
|
+
|
|
15
|
+
declare const expectedImportFileExtensions: readonly ["", "ts", "mts", "cts", "js", "mjs", "cjs"];
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Turns type: string into type: string[] for all args in order to support union input types
|
|
19
|
+
* @param document
|
|
20
|
+
*/
|
|
21
|
+
export declare function externalToInternalDmmf(document: DMMF.Document): DMMF.Document;
|
|
22
|
+
|
|
23
|
+
export declare function generateClient(options: GenerateClientOptions): Promise<void>;
|
|
24
|
+
|
|
25
|
+
export declare interface GenerateClientOptions {
|
|
26
|
+
datamodel: string;
|
|
27
|
+
schemaPath: string;
|
|
28
|
+
/** Runtime path used in runtime/type imports */
|
|
29
|
+
runtimeBase: string;
|
|
30
|
+
outputDir: string;
|
|
31
|
+
generator: GeneratorConfig;
|
|
32
|
+
dmmf: DMMF.Document;
|
|
33
|
+
datasources: DataSource[];
|
|
34
|
+
binaryPaths: BinaryPaths;
|
|
35
|
+
engineVersion: string;
|
|
36
|
+
clientVersion: string;
|
|
37
|
+
activeProvider: ActiveConnectorType;
|
|
38
|
+
envPaths?: EnvPaths;
|
|
39
|
+
/** When --postinstall is passed via CLI */
|
|
40
|
+
postinstall?: boolean;
|
|
41
|
+
/** False when --no-engine is passed via CLI */
|
|
42
|
+
copyEngine?: boolean;
|
|
43
|
+
typedSql?: SqlQueryOutput[];
|
|
44
|
+
target: RuntimeTarget;
|
|
45
|
+
generatedFileExtension: GeneratedFileExtension;
|
|
46
|
+
importFileExtension: ImportFileExtension;
|
|
47
|
+
moduleFormat: ModuleFormat;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
declare type GeneratedFileExtension = (typeof expectedGeneratedFileExtensions)[number] | (string & {});
|
|
51
|
+
|
|
52
|
+
export declare function getDMMF(options: GetDMMFOptions): Promise<DMMF.Document>;
|
|
53
|
+
|
|
54
|
+
declare type ImportFileExtension = (typeof expectedImportFileExtensions)[number] | (string & {});
|
|
55
|
+
|
|
56
|
+
declare type ModuleFormat = (typeof moduleFormats)[number];
|
|
57
|
+
|
|
58
|
+
declare const moduleFormats: readonly ["esm", "cjs"];
|
|
59
|
+
|
|
60
|
+
export declare class PrismaClientTsGenerator implements Generator_2 {
|
|
61
|
+
readonly name = "prisma-client-ts";
|
|
62
|
+
getManifest(config: GeneratorConfig): Promise<GeneratorManifest>;
|
|
63
|
+
generate(options: GeneratorOptions): Promise<void>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare type RuntimeTarget = (typeof supportedRuntimes)[number];
|
|
67
|
+
|
|
68
|
+
declare const supportedRuntimes: readonly ["nodejs", "deno", "deno-deploy", "bun", "workerd", "edge-light", "react-native"];
|
|
69
|
+
|
|
70
|
+
export { }
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
declare const expectedGeneratedFileExtensions: readonly ["ts", "mts", "cts"];
|
|
14
|
+
|
|
15
|
+
declare const expectedImportFileExtensions: readonly ["", "ts", "mts", "cts", "js", "mjs", "cjs"];
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Turns type: string into type: string[] for all args in order to support union input types
|
|
19
|
+
* @param document
|
|
20
|
+
*/
|
|
21
|
+
export declare function externalToInternalDmmf(document: DMMF.Document): DMMF.Document;
|
|
22
|
+
|
|
23
|
+
export declare function generateClient(options: GenerateClientOptions): Promise<void>;
|
|
24
|
+
|
|
25
|
+
export declare interface GenerateClientOptions {
|
|
26
|
+
datamodel: string;
|
|
27
|
+
schemaPath: string;
|
|
28
|
+
/** Runtime path used in runtime/type imports */
|
|
29
|
+
runtimeBase: string;
|
|
30
|
+
outputDir: string;
|
|
31
|
+
generator: GeneratorConfig;
|
|
32
|
+
dmmf: DMMF.Document;
|
|
33
|
+
datasources: DataSource[];
|
|
34
|
+
binaryPaths: BinaryPaths;
|
|
35
|
+
engineVersion: string;
|
|
36
|
+
clientVersion: string;
|
|
37
|
+
activeProvider: ActiveConnectorType;
|
|
38
|
+
envPaths?: EnvPaths;
|
|
39
|
+
/** When --postinstall is passed via CLI */
|
|
40
|
+
postinstall?: boolean;
|
|
41
|
+
/** False when --no-engine is passed via CLI */
|
|
42
|
+
copyEngine?: boolean;
|
|
43
|
+
typedSql?: SqlQueryOutput[];
|
|
44
|
+
target: RuntimeTarget;
|
|
45
|
+
generatedFileExtension: GeneratedFileExtension;
|
|
46
|
+
importFileExtension: ImportFileExtension;
|
|
47
|
+
moduleFormat: ModuleFormat;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
declare type GeneratedFileExtension = (typeof expectedGeneratedFileExtensions)[number] | (string & {});
|
|
51
|
+
|
|
52
|
+
export declare function getDMMF(options: GetDMMFOptions): Promise<DMMF.Document>;
|
|
53
|
+
|
|
54
|
+
declare type ImportFileExtension = (typeof expectedImportFileExtensions)[number] | (string & {});
|
|
55
|
+
|
|
56
|
+
declare type ModuleFormat = (typeof moduleFormats)[number];
|
|
57
|
+
|
|
58
|
+
declare const moduleFormats: readonly ["esm", "cjs"];
|
|
59
|
+
|
|
60
|
+
export declare class PrismaClientTsGenerator implements Generator_2 {
|
|
61
|
+
readonly name = "prisma-client-ts";
|
|
62
|
+
getManifest(config: GeneratorConfig): Promise<GeneratorManifest>;
|
|
63
|
+
generate(options: GeneratorOptions): Promise<void>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare type RuntimeTarget = (typeof supportedRuntimes)[number];
|
|
67
|
+
|
|
68
|
+
declare const supportedRuntimes: readonly ["nodejs", "deno", "deno-deploy", "bun", "workerd", "edge-light", "react-native"];
|
|
69
|
+
|
|
70
|
+
export { }
|