@prisma/config 6.5.0-dev.3 → 6.5.0-dev.30
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/dist/index.d.ts +119 -6
- package/dist/index.js +289 -273
- package/package.json +3 -3
- package/dist/PrismaConfig.d.ts +0 -109
- package/dist/PrismaConfig.js +0 -22215
- package/dist/defaultConfig.d.ts +0 -8
- package/dist/defaultConfig.js +0 -22197
- package/dist/defaultTestConfig.d.ts +0 -6
- package/dist/defaultTestConfig.js +0 -22197
- package/dist/defineConfig.d.ts +0 -6
- package/dist/defineConfig.js +0 -22398
- package/dist/loadConfigFromFile.d.ts +0 -44
- package/dist/loadConfigFromFile.js +0 -22667
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,119 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export declare type ConfigFromFile = {
|
|
2
|
+
resolvedPath: string;
|
|
3
|
+
config: PrismaConfigInternal;
|
|
4
|
+
error?: never;
|
|
5
|
+
} | {
|
|
6
|
+
resolvedPath: string;
|
|
7
|
+
config?: never;
|
|
8
|
+
error: LoadConfigFromFileError;
|
|
9
|
+
} | {
|
|
10
|
+
resolvedPath: null;
|
|
11
|
+
config: PrismaConfigInternal;
|
|
12
|
+
error?: never;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* This default config can be used as basis for unit and integration tests.
|
|
17
|
+
*/
|
|
18
|
+
export declare function defaultTestConfig(): PrismaConfigInternal;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Define the configuration for the Prisma Development Kit.
|
|
22
|
+
*/
|
|
23
|
+
export declare function defineConfig(configInput: PrismaConfig): PrismaConfigInternal;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Load a Prisma config file from the given directory.
|
|
27
|
+
* This function may fail, but it will never throw.
|
|
28
|
+
* The possible error is returned in the result object, so the caller can handle it as needed.
|
|
29
|
+
*/
|
|
30
|
+
export declare function loadConfigFromFile({ configFile, configRoot, }: LoadConfigFromFileInput): Promise<ConfigFromFile>;
|
|
31
|
+
|
|
32
|
+
export declare type LoadConfigFromFileError = {
|
|
33
|
+
_tag: 'ConfigFileNotFound';
|
|
34
|
+
} | {
|
|
35
|
+
_tag: 'TypeScriptImportFailed';
|
|
36
|
+
error: Error;
|
|
37
|
+
} | {
|
|
38
|
+
_tag: 'ConfigFileParseError';
|
|
39
|
+
error: Error;
|
|
40
|
+
} | {
|
|
41
|
+
_tag: 'UnknownError';
|
|
42
|
+
error: Error;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
declare type LoadConfigFromFileInput = {
|
|
46
|
+
/**
|
|
47
|
+
* The path to the config file to load. If not provided, we will attempt to find a config file in the `configRoot` directory.
|
|
48
|
+
*/
|
|
49
|
+
configFile?: string;
|
|
50
|
+
/**
|
|
51
|
+
* The directory to search for the config file in. Defaults to the current working directory.
|
|
52
|
+
*/
|
|
53
|
+
configRoot?: string;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
declare const PRISMA_CONFIG_INTERNAL_BRAND: unique symbol;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The configuration for the Prisma Development Kit, before it is passed to the `defineConfig` function.
|
|
60
|
+
* Thanks to the branding, this type is opaque and cannot be constructed directly.
|
|
61
|
+
*/
|
|
62
|
+
export declare type PrismaConfig = {
|
|
63
|
+
/**
|
|
64
|
+
* Whether features with an unstable API are enabled.
|
|
65
|
+
*/
|
|
66
|
+
earlyAccess: true;
|
|
67
|
+
/**
|
|
68
|
+
* The configuration for the Prisma schema file(s).
|
|
69
|
+
*/
|
|
70
|
+
schema?: PrismaSchemaConfigShape;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The configuration for the Prisma Development Kit, after it has been parsed and processed
|
|
75
|
+
* by the `defineConfig` function.
|
|
76
|
+
* Thanks to the branding, this type is opaque and cannot be constructed directly.
|
|
77
|
+
*/
|
|
78
|
+
export declare type PrismaConfigInternal = _PrismaConfigInternal & {
|
|
79
|
+
__brand: typeof PRISMA_CONFIG_INTERNAL_BRAND;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
declare type _PrismaConfigInternal = {
|
|
83
|
+
/**
|
|
84
|
+
* Whether features with an unstable API are enabled.
|
|
85
|
+
*/
|
|
86
|
+
earlyAccess: true;
|
|
87
|
+
/**
|
|
88
|
+
* The configuration for the Prisma schema file(s).
|
|
89
|
+
*/
|
|
90
|
+
schema?: PrismaSchemaConfigShape;
|
|
91
|
+
/**
|
|
92
|
+
* The path from where the config was loaded.
|
|
93
|
+
* It's set to `null` if no config file was found and only default config is applied.
|
|
94
|
+
*/
|
|
95
|
+
loadedFromFile: string | null;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
declare type PrismaSchemaConfigShape = {
|
|
99
|
+
/**
|
|
100
|
+
* Tell Prisma to use a single `.prisma` schema file.
|
|
101
|
+
*/
|
|
102
|
+
kind: 'single';
|
|
103
|
+
/**
|
|
104
|
+
* The path to a single `.prisma` schema file.
|
|
105
|
+
*/
|
|
106
|
+
filePath: string;
|
|
107
|
+
} | {
|
|
108
|
+
/**
|
|
109
|
+
* Tell Prisma to use multiple `.prisma` schema files, via the `prismaSchemaFolder` preview feature.
|
|
110
|
+
*/
|
|
111
|
+
kind: 'multi';
|
|
112
|
+
/**
|
|
113
|
+
* The path to a folder containing multiple `.prisma` schema files.
|
|
114
|
+
* All of the files in this folder will be used.
|
|
115
|
+
*/
|
|
116
|
+
folderPath: string;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export { }
|