@prisma/config 6.12.0-dev.24 → 6.12.0-dev.26
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 +37 -61
- package/dist/index.js +1238 -1575
- 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<any>;
|
|
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<any>;
|
|
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(): PrismaConfigInternal
|
|
77
|
+
export declare function defaultTestConfig<Env extends Record<string, string | undefined> = never>(): PrismaConfigInternal<Env>;
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* Define the configuration for the Prisma Development Kit.
|
|
81
81
|
*/
|
|
82
|
-
export declare function defineConfig(configInput: PrismaConfig): PrismaConfigInternal
|
|
82
|
+
export declare function defineConfig<Env extends Record<string, string | undefined> = never>(configInput: PrismaConfig<Env>): PrismaConfigInternal<Env>;
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* A generic driver adapter factory that allows the user to instantiate a
|
|
@@ -92,6 +92,8 @@ 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
|
+
|
|
95
97
|
declare type Error_2 = {
|
|
96
98
|
kind: 'GenericJs';
|
|
97
99
|
id: number;
|
|
@@ -244,13 +246,6 @@ declare type LoadConfigFromFileInput = {
|
|
|
244
246
|
configRoot?: string;
|
|
245
247
|
};
|
|
246
248
|
|
|
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
|
-
|
|
254
249
|
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"];
|
|
255
250
|
|
|
256
251
|
declare const PRISMA_CONFIG_INTERNAL_BRAND: unique symbol;
|
|
@@ -259,35 +254,23 @@ declare const PRISMA_CONFIG_INTERNAL_BRAND: unique symbol;
|
|
|
259
254
|
* The configuration for the Prisma Development Kit, before it is passed to the `defineConfig` function.
|
|
260
255
|
* Thanks to the branding, this type is opaque and cannot be constructed directly.
|
|
261
256
|
*/
|
|
262
|
-
export declare type PrismaConfig = {
|
|
257
|
+
export declare type PrismaConfig<Env extends EnvVars = never> = {
|
|
263
258
|
/**
|
|
264
259
|
* Whether features with an unstable API are enabled.
|
|
265
260
|
*/
|
|
266
261
|
earlyAccess: true;
|
|
267
262
|
/**
|
|
268
|
-
* The path to the schema file
|
|
263
|
+
* The path to the schema file or path to a folder that shall be recursively searched for .prisma files.
|
|
269
264
|
*/
|
|
270
265
|
schema?: string;
|
|
271
|
-
/**
|
|
272
|
-
* The Driver Adapter used for Prisma CLI.
|
|
273
|
-
*/
|
|
274
|
-
adapter?: () => Promise<SqlMigrationAwareDriverAdapterFactory>;
|
|
275
266
|
/**
|
|
276
267
|
* The configuration for Prisma Studio.
|
|
277
268
|
*/
|
|
278
|
-
studio?:
|
|
279
|
-
/**
|
|
280
|
-
* Configuration for Prisma migrations.
|
|
281
|
-
*/
|
|
282
|
-
migrations?: Simplify<MigrationsConfigShape>;
|
|
269
|
+
studio?: PrismaStudioConfigShape<Env>;
|
|
283
270
|
/**
|
|
284
|
-
*
|
|
271
|
+
* The configuration for Prisma Migrate + Introspect
|
|
285
272
|
*/
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* Configuration for the `typedSql` preview feature.
|
|
289
|
-
*/
|
|
290
|
-
typedSql?: Simplify<TypedSqlConfigShape>;
|
|
273
|
+
migrate?: PrismaMigrateConfigShape<Env>;
|
|
291
274
|
};
|
|
292
275
|
|
|
293
276
|
/**
|
|
@@ -295,15 +278,27 @@ export declare type PrismaConfig = {
|
|
|
295
278
|
* by the `defineConfig` function.
|
|
296
279
|
* Thanks to the branding, this type is opaque and cannot be constructed directly.
|
|
297
280
|
*/
|
|
298
|
-
export declare type PrismaConfigInternal = _PrismaConfigInternal & {
|
|
281
|
+
export declare type PrismaConfigInternal<Env extends EnvVars = never> = _PrismaConfigInternal<Env> & {
|
|
299
282
|
__brand: typeof PRISMA_CONFIG_INTERNAL_BRAND;
|
|
300
283
|
};
|
|
301
284
|
|
|
302
|
-
declare type _PrismaConfigInternal =
|
|
285
|
+
declare type _PrismaConfigInternal<Env extends EnvVars = never> = {
|
|
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;
|
|
303
294
|
/**
|
|
304
|
-
* The
|
|
295
|
+
* The configuration for Prisma Studio.
|
|
296
|
+
*/
|
|
297
|
+
studio?: PrismaStudioConfigShape<Env>;
|
|
298
|
+
/**
|
|
299
|
+
* The configuration for Prisma Migrate + Introspect
|
|
305
300
|
*/
|
|
306
|
-
|
|
301
|
+
migrate?: PrismaMigrateConfigInternalShape<Env>;
|
|
307
302
|
/**
|
|
308
303
|
* The path from where the config was loaded.
|
|
309
304
|
* It's set to `null` if no config file was found and only default config is applied.
|
|
@@ -311,8 +306,16 @@ declare type _PrismaConfigInternal = Omit<PrismaConfig, 'adapter'> & {
|
|
|
311
306
|
loadedFromFile: string | null;
|
|
312
307
|
};
|
|
313
308
|
|
|
314
|
-
declare type
|
|
315
|
-
adapter: () => Promise<
|
|
309
|
+
declare type PrismaMigrateConfigInternalShape<Env extends EnvVars = never> = {
|
|
310
|
+
adapter: (env: Env) => Promise<ErrorCapturingSqlMigrationAwareDriverAdapterFactory>;
|
|
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
319
|
};
|
|
317
320
|
|
|
318
321
|
declare type Provider = 'mysql' | 'postgres' | 'sqlite' | 'sqlserver';
|
|
@@ -339,19 +342,6 @@ declare type Result<T> = {
|
|
|
339
342
|
readonly error: Error_2;
|
|
340
343
|
});
|
|
341
344
|
|
|
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
|
-
|
|
355
345
|
declare interface SqlDriverAdapter extends SqlQueryable {
|
|
356
346
|
/**
|
|
357
347
|
* Execute multiple SQL statements separated by semicolon.
|
|
@@ -433,18 +423,4 @@ declare type TransactionOptions = {
|
|
|
433
423
|
usePhantomQuery: boolean;
|
|
434
424
|
};
|
|
435
425
|
|
|
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
|
-
|
|
450
426
|
export { }
|