@prisma/config 6.12.0-dev.22 → 6.12.0-dev.24
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 +61 -37
- package/dist/index.js +1600 -1263
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ declare const ColumnTypeEnum: {
|
|
|
53
53
|
|
|
54
54
|
export declare type ConfigFromFile = {
|
|
55
55
|
resolvedPath: string;
|
|
56
|
-
config: PrismaConfigInternal
|
|
56
|
+
config: PrismaConfigInternal;
|
|
57
57
|
error?: never;
|
|
58
58
|
} | {
|
|
59
59
|
resolvedPath: string;
|
|
@@ -61,7 +61,7 @@ export declare type ConfigFromFile = {
|
|
|
61
61
|
error: LoadConfigFromFileError;
|
|
62
62
|
} | {
|
|
63
63
|
resolvedPath: null;
|
|
64
|
-
config: PrismaConfigInternal
|
|
64
|
+
config: PrismaConfigInternal;
|
|
65
65
|
error?: never;
|
|
66
66
|
};
|
|
67
67
|
|
|
@@ -74,12 +74,12 @@ declare type ConnectionInfo = {
|
|
|
74
74
|
/**
|
|
75
75
|
* This default config can be used as basis for unit and integration tests.
|
|
76
76
|
*/
|
|
77
|
-
export declare function defaultTestConfig
|
|
77
|
+
export declare function defaultTestConfig(): PrismaConfigInternal;
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* Define the configuration for the Prisma Development Kit.
|
|
81
81
|
*/
|
|
82
|
-
export declare function defineConfig
|
|
82
|
+
export declare function defineConfig(configInput: PrismaConfig): PrismaConfigInternal;
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* A generic driver adapter factory that allows the user to instantiate a
|
|
@@ -92,8 +92,6 @@ declare interface DriverAdapterFactory<Query, Result> extends AdapterInfo {
|
|
|
92
92
|
connect(): Promise<Queryable<Query, Result>>;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
declare type EnvVars = Record<string, string | undefined>;
|
|
96
|
-
|
|
97
95
|
declare type Error_2 = {
|
|
98
96
|
kind: 'GenericJs';
|
|
99
97
|
id: number;
|
|
@@ -246,6 +244,13 @@ declare type LoadConfigFromFileInput = {
|
|
|
246
244
|
configRoot?: string;
|
|
247
245
|
};
|
|
248
246
|
|
|
247
|
+
declare type MigrationsConfigShape = {
|
|
248
|
+
/**
|
|
249
|
+
* The path to the directory where Prisma should store migration files, and look for them.
|
|
250
|
+
*/
|
|
251
|
+
path?: string;
|
|
252
|
+
};
|
|
253
|
+
|
|
249
254
|
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"];
|
|
250
255
|
|
|
251
256
|
declare const PRISMA_CONFIG_INTERNAL_BRAND: unique symbol;
|
|
@@ -254,23 +259,35 @@ declare const PRISMA_CONFIG_INTERNAL_BRAND: unique symbol;
|
|
|
254
259
|
* The configuration for the Prisma Development Kit, before it is passed to the `defineConfig` function.
|
|
255
260
|
* Thanks to the branding, this type is opaque and cannot be constructed directly.
|
|
256
261
|
*/
|
|
257
|
-
export declare type PrismaConfig
|
|
262
|
+
export declare type PrismaConfig = {
|
|
258
263
|
/**
|
|
259
264
|
* Whether features with an unstable API are enabled.
|
|
260
265
|
*/
|
|
261
266
|
earlyAccess: true;
|
|
262
267
|
/**
|
|
263
|
-
* The path to the schema file or path to a folder that shall be recursively searched for
|
|
268
|
+
* The path to the schema file, or path to a folder that shall be recursively searched for *.prisma files.
|
|
264
269
|
*/
|
|
265
270
|
schema?: string;
|
|
271
|
+
/**
|
|
272
|
+
* The Driver Adapter used for Prisma CLI.
|
|
273
|
+
*/
|
|
274
|
+
adapter?: () => Promise<SqlMigrationAwareDriverAdapterFactory>;
|
|
266
275
|
/**
|
|
267
276
|
* The configuration for Prisma Studio.
|
|
268
277
|
*/
|
|
269
|
-
studio?: PrismaStudioConfigShape
|
|
278
|
+
studio?: Simplify<PrismaStudioConfigShape>;
|
|
279
|
+
/**
|
|
280
|
+
* Configuration for Prisma migrations.
|
|
281
|
+
*/
|
|
282
|
+
migrations?: Simplify<MigrationsConfigShape>;
|
|
270
283
|
/**
|
|
271
|
-
*
|
|
284
|
+
* Configuration for the database view entities.
|
|
272
285
|
*/
|
|
273
|
-
|
|
286
|
+
views?: Simplify<ViewsConfigShape>;
|
|
287
|
+
/**
|
|
288
|
+
* Configuration for the `typedSql` preview feature.
|
|
289
|
+
*/
|
|
290
|
+
typedSql?: Simplify<TypedSqlConfigShape>;
|
|
274
291
|
};
|
|
275
292
|
|
|
276
293
|
/**
|
|
@@ -278,27 +295,15 @@ export declare type PrismaConfig<Env extends EnvVars = never> = {
|
|
|
278
295
|
* by the `defineConfig` function.
|
|
279
296
|
* Thanks to the branding, this type is opaque and cannot be constructed directly.
|
|
280
297
|
*/
|
|
281
|
-
export declare type PrismaConfigInternal
|
|
298
|
+
export declare type PrismaConfigInternal = _PrismaConfigInternal & {
|
|
282
299
|
__brand: typeof PRISMA_CONFIG_INTERNAL_BRAND;
|
|
283
300
|
};
|
|
284
301
|
|
|
285
|
-
declare type _PrismaConfigInternal
|
|
286
|
-
/**
|
|
287
|
-
* Whether features with an unstable API are enabled.
|
|
288
|
-
*/
|
|
289
|
-
earlyAccess: true;
|
|
290
|
-
/**
|
|
291
|
-
* The path to the schema file or path to a folder that shall be recursively searched for .prisma files.
|
|
292
|
-
*/
|
|
293
|
-
schema?: string;
|
|
302
|
+
declare type _PrismaConfigInternal = Omit<PrismaConfig, 'adapter'> & {
|
|
294
303
|
/**
|
|
295
|
-
* The
|
|
296
|
-
*/
|
|
297
|
-
studio?: PrismaStudioConfigShape<Env>;
|
|
298
|
-
/**
|
|
299
|
-
* The configuration for Prisma Migrate + Introspect
|
|
304
|
+
* The Driver Adapter used for Prisma CLI.
|
|
300
305
|
*/
|
|
301
|
-
|
|
306
|
+
adapter?: () => Promise<ErrorCapturingSqlMigrationAwareDriverAdapterFactory>;
|
|
302
307
|
/**
|
|
303
308
|
* The path from where the config was loaded.
|
|
304
309
|
* It's set to `null` if no config file was found and only default config is applied.
|
|
@@ -306,16 +311,8 @@ declare type _PrismaConfigInternal<Env extends EnvVars = never> = {
|
|
|
306
311
|
loadedFromFile: string | null;
|
|
307
312
|
};
|
|
308
313
|
|
|
309
|
-
declare type
|
|
310
|
-
adapter: (
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
declare type PrismaMigrateConfigShape<Env extends EnvVars = never> = {
|
|
314
|
-
adapter: (env: Env) => Promise<SqlMigrationAwareDriverAdapterFactory>;
|
|
315
|
-
};
|
|
316
|
-
|
|
317
|
-
declare type PrismaStudioConfigShape<Env extends EnvVars = never> = {
|
|
318
|
-
adapter: (env: Env) => Promise<SqlMigrationAwareDriverAdapterFactory>;
|
|
314
|
+
declare type PrismaStudioConfigShape = {
|
|
315
|
+
adapter: () => Promise<SqlMigrationAwareDriverAdapterFactory>;
|
|
319
316
|
};
|
|
320
317
|
|
|
321
318
|
declare type Provider = 'mysql' | 'postgres' | 'sqlite' | 'sqlserver';
|
|
@@ -342,6 +339,19 @@ declare type Result<T> = {
|
|
|
342
339
|
readonly error: Error_2;
|
|
343
340
|
});
|
|
344
341
|
|
|
342
|
+
/**
|
|
343
|
+
* Simplifies the type signature of a type.
|
|
344
|
+
* Re-exported from `effect/Types`.
|
|
345
|
+
*
|
|
346
|
+
* @example
|
|
347
|
+
* ```ts
|
|
348
|
+
* type Res = Simplify<{ a: number } & { b: number }> // { a: number; b: number; }
|
|
349
|
+
* ```
|
|
350
|
+
*/
|
|
351
|
+
declare type Simplify<A> = {
|
|
352
|
+
[K in keyof A]: A[K];
|
|
353
|
+
} extends infer B ? B : never;
|
|
354
|
+
|
|
345
355
|
declare interface SqlDriverAdapter extends SqlQueryable {
|
|
346
356
|
/**
|
|
347
357
|
* Execute multiple SQL statements separated by semicolon.
|
|
@@ -423,4 +433,18 @@ declare type TransactionOptions = {
|
|
|
423
433
|
usePhantomQuery: boolean;
|
|
424
434
|
};
|
|
425
435
|
|
|
436
|
+
declare type TypedSqlConfigShape = {
|
|
437
|
+
/**
|
|
438
|
+
* The path to the directory where Prisma should look for the `typedSql` queries, where *.sql files will be loaded.
|
|
439
|
+
*/
|
|
440
|
+
path?: string;
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
declare type ViewsConfigShape = {
|
|
444
|
+
/**
|
|
445
|
+
* The path to the directory where Prisma should look for the view definitions, where *.sql files will be loaded.
|
|
446
|
+
*/
|
|
447
|
+
path?: string;
|
|
448
|
+
};
|
|
449
|
+
|
|
426
450
|
export { }
|