@prisma/config 6.13.0-dev.3 → 6.13.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 +131 -4
- package/dist/index.js +391 -22576
- package/package.json +7 -5
package/dist/index.d.ts
CHANGED
|
@@ -51,18 +51,29 @@ declare const ColumnTypeEnum: {
|
|
|
51
51
|
readonly UnknownNumber: 128;
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
+
export declare type ConfigDiagnostic = {
|
|
55
|
+
_tag: 'log';
|
|
56
|
+
value: (formatters: InjectFormatters) => () => void;
|
|
57
|
+
} | {
|
|
58
|
+
_tag: 'warn';
|
|
59
|
+
value: (formatters: InjectFormatters) => () => void;
|
|
60
|
+
};
|
|
61
|
+
|
|
54
62
|
export declare type ConfigFromFile = {
|
|
55
63
|
resolvedPath: string;
|
|
56
64
|
config: PrismaConfigInternal;
|
|
57
65
|
error?: never;
|
|
66
|
+
diagnostics: ConfigDiagnostic[];
|
|
58
67
|
} | {
|
|
59
68
|
resolvedPath: string;
|
|
60
69
|
config?: never;
|
|
61
70
|
error: LoadConfigFromFileError;
|
|
71
|
+
diagnostics: ConfigDiagnostic[];
|
|
62
72
|
} | {
|
|
63
73
|
resolvedPath: null;
|
|
64
74
|
config: PrismaConfigInternal;
|
|
65
75
|
error?: never;
|
|
76
|
+
diagnostics: ConfigDiagnostic[];
|
|
66
77
|
};
|
|
67
78
|
|
|
68
79
|
declare type ConnectionInfo = {
|
|
@@ -92,6 +103,15 @@ declare interface DriverAdapterFactory<Query, Result> extends AdapterInfo {
|
|
|
92
103
|
connect(): Promise<Queryable<Query, Result>>;
|
|
93
104
|
}
|
|
94
105
|
|
|
106
|
+
declare type EnumsConfigShape = {
|
|
107
|
+
/**
|
|
108
|
+
* List of enums that are externally managed.
|
|
109
|
+
* Prisma will not modify the structure of these enums and not generate migrations for those enums.
|
|
110
|
+
* These enums will still be represented in schema.prisma file and be available in the client API.
|
|
111
|
+
*/
|
|
112
|
+
external?: string[];
|
|
113
|
+
};
|
|
114
|
+
|
|
95
115
|
declare type Error_2 = {
|
|
96
116
|
kind: 'GenericJs';
|
|
97
117
|
id: number;
|
|
@@ -131,6 +151,10 @@ declare type Error_2 = {
|
|
|
131
151
|
} | {
|
|
132
152
|
foreignKey: {};
|
|
133
153
|
};
|
|
154
|
+
} | {
|
|
155
|
+
kind: 'DatabaseNotReachable';
|
|
156
|
+
host?: string;
|
|
157
|
+
port?: number;
|
|
134
158
|
} | {
|
|
135
159
|
kind: 'DatabaseDoesNotExist';
|
|
136
160
|
db?: string;
|
|
@@ -140,6 +164,11 @@ declare type Error_2 = {
|
|
|
140
164
|
} | {
|
|
141
165
|
kind: 'DatabaseAccessDenied';
|
|
142
166
|
db?: string;
|
|
167
|
+
} | {
|
|
168
|
+
kind: 'ConnectionClosed';
|
|
169
|
+
} | {
|
|
170
|
+
kind: 'TlsConnectionError';
|
|
171
|
+
reason: string;
|
|
143
172
|
} | {
|
|
144
173
|
kind: 'AuthenticationFailed';
|
|
145
174
|
user?: string;
|
|
@@ -211,6 +240,28 @@ declare interface ErrorRegistry {
|
|
|
211
240
|
consumeError(id: number): ErrorRecord | undefined;
|
|
212
241
|
}
|
|
213
242
|
|
|
243
|
+
declare type ExperimentalConfig = {
|
|
244
|
+
/**
|
|
245
|
+
* Enable experimental adapter support.
|
|
246
|
+
*/
|
|
247
|
+
adapter?: boolean;
|
|
248
|
+
/**
|
|
249
|
+
* Enable experimental Prisma Studio features.
|
|
250
|
+
*/
|
|
251
|
+
studio?: boolean;
|
|
252
|
+
/**
|
|
253
|
+
* Enable experimental external tables support.
|
|
254
|
+
*/
|
|
255
|
+
externalTables?: boolean;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
export declare type InjectFormatters = {
|
|
259
|
+
dim: (data: string) => string;
|
|
260
|
+
log: (data: string) => void;
|
|
261
|
+
warn: (data: string) => void;
|
|
262
|
+
link: (data: string) => string;
|
|
263
|
+
};
|
|
264
|
+
|
|
214
265
|
declare type IsolationLevel = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABLE READ' | 'SNAPSHOT' | 'SERIALIZABLE';
|
|
215
266
|
|
|
216
267
|
/**
|
|
@@ -221,12 +272,15 @@ declare type IsolationLevel = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABL
|
|
|
221
272
|
export declare function loadConfigFromFile({ configFile, configRoot, }: LoadConfigFromFileInput): Promise<ConfigFromFile>;
|
|
222
273
|
|
|
223
274
|
export declare type LoadConfigFromFileError = {
|
|
275
|
+
/**
|
|
276
|
+
* The config file was not found at the specified path.
|
|
277
|
+
*/
|
|
224
278
|
_tag: 'ConfigFileNotFound';
|
|
225
279
|
} | {
|
|
226
|
-
_tag: '
|
|
280
|
+
_tag: 'ConfigLoadError';
|
|
227
281
|
error: Error;
|
|
228
282
|
} | {
|
|
229
|
-
_tag: '
|
|
283
|
+
_tag: 'ConfigFileSyntaxError';
|
|
230
284
|
error: Error;
|
|
231
285
|
} | {
|
|
232
286
|
_tag: 'UnknownError';
|
|
@@ -244,11 +298,34 @@ declare type LoadConfigFromFileInput = {
|
|
|
244
298
|
configRoot?: string;
|
|
245
299
|
};
|
|
246
300
|
|
|
301
|
+
/**
|
|
302
|
+
* User's Prisma configuration should live in `prisma.config.ts` instead of `package.json#prisma`.
|
|
303
|
+
* See: https://pris.ly/prisma-config.
|
|
304
|
+
*
|
|
305
|
+
* This function returns `null` if no `package.json` is found, or if the `prisma` property is not defined therein.
|
|
306
|
+
*
|
|
307
|
+
* TODO: remove in Prisma 7.
|
|
308
|
+
* @deprecated
|
|
309
|
+
*/
|
|
310
|
+
export declare function loadConfigFromPackageJson(cwd?: string): Promise<{
|
|
311
|
+
config: PrismaConfigPackageJson;
|
|
312
|
+
loadedFromFile: string;
|
|
313
|
+
} | null>;
|
|
314
|
+
|
|
247
315
|
declare type MigrationsConfigShape = {
|
|
248
316
|
/**
|
|
249
317
|
* The path to the directory where Prisma should store migration files, and look for them.
|
|
250
318
|
*/
|
|
251
319
|
path?: string;
|
|
320
|
+
/**
|
|
321
|
+
* Provide a SQL script that will be used to setup external tables and enums during migration diffing.
|
|
322
|
+
* Also see `tables.external` and `enums.external`.
|
|
323
|
+
*/
|
|
324
|
+
initShadowDb?: string;
|
|
325
|
+
/**
|
|
326
|
+
* The command to run to seed the database after schema migrations are applied.
|
|
327
|
+
*/
|
|
328
|
+
seed?: string;
|
|
252
329
|
};
|
|
253
330
|
|
|
254
331
|
declare const officialPrismaAdapters: readonly ["@prisma/adapter-planetscale", "@prisma/adapter-neon", "@prisma/adapter-libsql", "@prisma/adapter-better-sqlite3", "@prisma/adapter-d1", "@prisma/adapter-pg", "@prisma/adapter-mssql", "@prisma/adapter-mariadb"];
|
|
@@ -261,9 +338,9 @@ declare const PRISMA_CONFIG_INTERNAL_BRAND: unique symbol;
|
|
|
261
338
|
*/
|
|
262
339
|
export declare type PrismaConfig = {
|
|
263
340
|
/**
|
|
264
|
-
*
|
|
341
|
+
* Experimental feature gates. Each experimental feature must be explicitly enabled.
|
|
265
342
|
*/
|
|
266
|
-
|
|
343
|
+
experimental?: Simplify<ExperimentalConfig>;
|
|
267
344
|
/**
|
|
268
345
|
* The path to the schema file, or path to a folder that shall be recursively searched for *.prisma files.
|
|
269
346
|
*/
|
|
@@ -280,6 +357,14 @@ export declare type PrismaConfig = {
|
|
|
280
357
|
* Configuration for Prisma migrations.
|
|
281
358
|
*/
|
|
282
359
|
migrations?: Simplify<MigrationsConfigShape>;
|
|
360
|
+
/**
|
|
361
|
+
* Configuration for the database table entities.
|
|
362
|
+
*/
|
|
363
|
+
tables?: Simplify<TablesConfigShape>;
|
|
364
|
+
/**
|
|
365
|
+
* Configuration for the database enum entities.
|
|
366
|
+
*/
|
|
367
|
+
enums?: Simplify<EnumsConfigShape>;
|
|
283
368
|
/**
|
|
284
369
|
* Configuration for the database view entities.
|
|
285
370
|
*/
|
|
@@ -309,6 +394,39 @@ declare type _PrismaConfigInternal = Omit<PrismaConfig, 'adapter'> & {
|
|
|
309
394
|
* It's set to `null` if no config file was found and only default config is applied.
|
|
310
395
|
*/
|
|
311
396
|
loadedFromFile: string | null;
|
|
397
|
+
/**
|
|
398
|
+
* The deprecated Prisma configuration from `package.json#prisma`.
|
|
399
|
+
* This is set to `null` if no `package.json#prisma` config was found.
|
|
400
|
+
* The configuration read from the Prisma config file (e.g., `prisma.config.ts`) takes precedence over
|
|
401
|
+
* this `package.json#prisma` config.
|
|
402
|
+
* @deprecated
|
|
403
|
+
*/
|
|
404
|
+
deprecatedPackageJson: {
|
|
405
|
+
/**
|
|
406
|
+
* The Prisma configuration from `package.json#prisma`.
|
|
407
|
+
* @deprecated
|
|
408
|
+
*/
|
|
409
|
+
config: PrismaConfigPackageJson;
|
|
410
|
+
/**
|
|
411
|
+
* The path from where the `package.json` config was loaded.
|
|
412
|
+
* @deprecated
|
|
413
|
+
*/
|
|
414
|
+
loadedFromFile: string;
|
|
415
|
+
} | null;
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Example:
|
|
420
|
+
* ```json
|
|
421
|
+
* {
|
|
422
|
+
* "schema": "./prisma/schema.prisma",
|
|
423
|
+
* "seed": "tsx ./prisma/seed.ts"
|
|
424
|
+
* }
|
|
425
|
+
* ```
|
|
426
|
+
*/
|
|
427
|
+
declare type PrismaConfigPackageJson = {
|
|
428
|
+
schema?: string;
|
|
429
|
+
seed?: string;
|
|
312
430
|
};
|
|
313
431
|
|
|
314
432
|
declare type PrismaStudioConfigShape = {
|
|
@@ -414,6 +532,15 @@ declare interface SqlResultSet {
|
|
|
414
532
|
lastInsertId?: string;
|
|
415
533
|
}
|
|
416
534
|
|
|
535
|
+
declare type TablesConfigShape = {
|
|
536
|
+
/**
|
|
537
|
+
* List of tables that are externally managed.
|
|
538
|
+
* Prisma will not modify the structure of these tables and not generate migrations for those tables.
|
|
539
|
+
* These tables will still be represented in schema.prisma file and be available in the client API.
|
|
540
|
+
*/
|
|
541
|
+
external?: string[];
|
|
542
|
+
};
|
|
543
|
+
|
|
417
544
|
declare interface Transaction extends AdapterInfo, SqlQueryable {
|
|
418
545
|
/**
|
|
419
546
|
* Transaction options.
|