@prisma/config 6.12.0-dev.22 → 6.12.0-dev.23
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 +50 -37
- package/dist/index.js +1600 -1263
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { Simplify } from 'effect/Types';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* An interface that exposes some basic information about the
|
|
3
5
|
* adapter like its name and provider type.
|
|
@@ -53,7 +55,7 @@ declare const ColumnTypeEnum: {
|
|
|
53
55
|
|
|
54
56
|
export declare type ConfigFromFile = {
|
|
55
57
|
resolvedPath: string;
|
|
56
|
-
config: PrismaConfigInternal
|
|
58
|
+
config: PrismaConfigInternal;
|
|
57
59
|
error?: never;
|
|
58
60
|
} | {
|
|
59
61
|
resolvedPath: string;
|
|
@@ -61,7 +63,7 @@ export declare type ConfigFromFile = {
|
|
|
61
63
|
error: LoadConfigFromFileError;
|
|
62
64
|
} | {
|
|
63
65
|
resolvedPath: null;
|
|
64
|
-
config: PrismaConfigInternal
|
|
66
|
+
config: PrismaConfigInternal;
|
|
65
67
|
error?: never;
|
|
66
68
|
};
|
|
67
69
|
|
|
@@ -74,12 +76,12 @@ declare type ConnectionInfo = {
|
|
|
74
76
|
/**
|
|
75
77
|
* This default config can be used as basis for unit and integration tests.
|
|
76
78
|
*/
|
|
77
|
-
export declare function defaultTestConfig
|
|
79
|
+
export declare function defaultTestConfig(): PrismaConfigInternal;
|
|
78
80
|
|
|
79
81
|
/**
|
|
80
82
|
* Define the configuration for the Prisma Development Kit.
|
|
81
83
|
*/
|
|
82
|
-
export declare function defineConfig
|
|
84
|
+
export declare function defineConfig(configInput: PrismaConfig): PrismaConfigInternal;
|
|
83
85
|
|
|
84
86
|
/**
|
|
85
87
|
* A generic driver adapter factory that allows the user to instantiate a
|
|
@@ -92,8 +94,6 @@ declare interface DriverAdapterFactory<Query, Result> extends AdapterInfo {
|
|
|
92
94
|
connect(): Promise<Queryable<Query, Result>>;
|
|
93
95
|
}
|
|
94
96
|
|
|
95
|
-
declare type EnvVars = Record<string, string | undefined>;
|
|
96
|
-
|
|
97
97
|
declare type Error_2 = {
|
|
98
98
|
kind: 'GenericJs';
|
|
99
99
|
id: number;
|
|
@@ -246,6 +246,13 @@ declare type LoadConfigFromFileInput = {
|
|
|
246
246
|
configRoot?: string;
|
|
247
247
|
};
|
|
248
248
|
|
|
249
|
+
declare type MigrationsConfigShape = {
|
|
250
|
+
/**
|
|
251
|
+
* The path to the directory where Prisma should store migration files, and look for them.
|
|
252
|
+
*/
|
|
253
|
+
path?: string;
|
|
254
|
+
};
|
|
255
|
+
|
|
249
256
|
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
257
|
|
|
251
258
|
declare const PRISMA_CONFIG_INTERNAL_BRAND: unique symbol;
|
|
@@ -254,23 +261,35 @@ declare const PRISMA_CONFIG_INTERNAL_BRAND: unique symbol;
|
|
|
254
261
|
* The configuration for the Prisma Development Kit, before it is passed to the `defineConfig` function.
|
|
255
262
|
* Thanks to the branding, this type is opaque and cannot be constructed directly.
|
|
256
263
|
*/
|
|
257
|
-
export declare type PrismaConfig
|
|
264
|
+
export declare type PrismaConfig = {
|
|
258
265
|
/**
|
|
259
266
|
* Whether features with an unstable API are enabled.
|
|
260
267
|
*/
|
|
261
268
|
earlyAccess: true;
|
|
262
269
|
/**
|
|
263
|
-
* The path to the schema file or path to a folder that shall be recursively searched for
|
|
270
|
+
* The path to the schema file, or path to a folder that shall be recursively searched for *.prisma files.
|
|
264
271
|
*/
|
|
265
272
|
schema?: string;
|
|
273
|
+
/**
|
|
274
|
+
* The Driver Adapter used for Prisma CLI.
|
|
275
|
+
*/
|
|
276
|
+
adapter?: () => Promise<SqlMigrationAwareDriverAdapterFactory>;
|
|
266
277
|
/**
|
|
267
278
|
* The configuration for Prisma Studio.
|
|
268
279
|
*/
|
|
269
|
-
studio?: PrismaStudioConfigShape
|
|
280
|
+
studio?: Simplify<PrismaStudioConfigShape>;
|
|
270
281
|
/**
|
|
271
|
-
*
|
|
282
|
+
* Configuration for Prisma migrations.
|
|
272
283
|
*/
|
|
273
|
-
|
|
284
|
+
migrations?: Simplify<MigrationsConfigShape>;
|
|
285
|
+
/**
|
|
286
|
+
* Configuration for the database view entities.
|
|
287
|
+
*/
|
|
288
|
+
views?: Simplify<ViewsConfigShape>;
|
|
289
|
+
/**
|
|
290
|
+
* Configuration for the `typedSql` preview feature.
|
|
291
|
+
*/
|
|
292
|
+
typedSql?: Simplify<TypedSqlConfigShape>;
|
|
274
293
|
};
|
|
275
294
|
|
|
276
295
|
/**
|
|
@@ -278,27 +297,15 @@ export declare type PrismaConfig<Env extends EnvVars = never> = {
|
|
|
278
297
|
* by the `defineConfig` function.
|
|
279
298
|
* Thanks to the branding, this type is opaque and cannot be constructed directly.
|
|
280
299
|
*/
|
|
281
|
-
export declare type PrismaConfigInternal
|
|
300
|
+
export declare type PrismaConfigInternal = _PrismaConfigInternal & {
|
|
282
301
|
__brand: typeof PRISMA_CONFIG_INTERNAL_BRAND;
|
|
283
302
|
};
|
|
284
303
|
|
|
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;
|
|
294
|
-
/**
|
|
295
|
-
* The configuration for Prisma Studio.
|
|
296
|
-
*/
|
|
297
|
-
studio?: PrismaStudioConfigShape<Env>;
|
|
304
|
+
declare type _PrismaConfigInternal = Omit<PrismaConfig, 'adapter'> & {
|
|
298
305
|
/**
|
|
299
|
-
* The
|
|
306
|
+
* The Driver Adapter used for Prisma CLI.
|
|
300
307
|
*/
|
|
301
|
-
|
|
308
|
+
adapter?: () => Promise<ErrorCapturingSqlMigrationAwareDriverAdapterFactory>;
|
|
302
309
|
/**
|
|
303
310
|
* The path from where the config was loaded.
|
|
304
311
|
* It's set to `null` if no config file was found and only default config is applied.
|
|
@@ -306,16 +313,8 @@ declare type _PrismaConfigInternal<Env extends EnvVars = never> = {
|
|
|
306
313
|
loadedFromFile: string | null;
|
|
307
314
|
};
|
|
308
315
|
|
|
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>;
|
|
316
|
+
declare type PrismaStudioConfigShape = {
|
|
317
|
+
adapter: () => Promise<SqlMigrationAwareDriverAdapterFactory>;
|
|
319
318
|
};
|
|
320
319
|
|
|
321
320
|
declare type Provider = 'mysql' | 'postgres' | 'sqlite' | 'sqlserver';
|
|
@@ -423,4 +422,18 @@ declare type TransactionOptions = {
|
|
|
423
422
|
usePhantomQuery: boolean;
|
|
424
423
|
};
|
|
425
424
|
|
|
425
|
+
declare type TypedSqlConfigShape = {
|
|
426
|
+
/**
|
|
427
|
+
* The path to the directory where Prisma should look for the `typedSql` queries, where *.sql files will be loaded.
|
|
428
|
+
*/
|
|
429
|
+
path?: string;
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
declare type ViewsConfigShape = {
|
|
433
|
+
/**
|
|
434
|
+
* The path to the directory where Prisma should look for the view definitions, where *.sql files will be loaded.
|
|
435
|
+
*/
|
|
436
|
+
path?: string;
|
|
437
|
+
};
|
|
438
|
+
|
|
426
439
|
export { }
|