@prisma/config 6.6.0-dev.7 → 6.6.0-dev.70
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 +19 -33
- package/dist/index.js +743 -866
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -82,6 +82,8 @@ export declare function defineConfig<Env extends Record<string, string | undefin
|
|
|
82
82
|
|
|
83
83
|
declare type EnvVars = Record<string, string | undefined>;
|
|
84
84
|
|
|
85
|
+
declare type IsolationLevel = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABLE READ' | 'SNAPSHOT' | 'SERIALIZABLE';
|
|
86
|
+
|
|
85
87
|
/**
|
|
86
88
|
* Load a Prisma config file from the given directory.
|
|
87
89
|
* This function may fail, but it will never throw.
|
|
@@ -127,13 +129,17 @@ export declare type PrismaConfig<Env extends EnvVars = never> = {
|
|
|
127
129
|
*/
|
|
128
130
|
earlyAccess: true;
|
|
129
131
|
/**
|
|
130
|
-
* The
|
|
132
|
+
* The path to the schema file or path to a folder that shall be recursively searched for .prisma files.
|
|
131
133
|
*/
|
|
132
|
-
schema?:
|
|
134
|
+
schema?: string;
|
|
133
135
|
/**
|
|
134
136
|
* The configuration for Prisma Studio.
|
|
135
137
|
*/
|
|
136
138
|
studio?: PrismaStudioConfigShape<Env>;
|
|
139
|
+
/**
|
|
140
|
+
* The configuration for Prisma Migrate + Introspect
|
|
141
|
+
*/
|
|
142
|
+
migrate?: PrismaMigrateConfigShape<Env>;
|
|
137
143
|
};
|
|
138
144
|
|
|
139
145
|
/**
|
|
@@ -151,13 +157,17 @@ declare type _PrismaConfigInternal<Env extends EnvVars = never> = {
|
|
|
151
157
|
*/
|
|
152
158
|
earlyAccess: true;
|
|
153
159
|
/**
|
|
154
|
-
* The
|
|
160
|
+
* The path to the schema file or path to a folder that shall be recursively searched for .prisma files.
|
|
155
161
|
*/
|
|
156
|
-
schema?:
|
|
162
|
+
schema?: string;
|
|
157
163
|
/**
|
|
158
164
|
* The configuration for Prisma Studio.
|
|
159
165
|
*/
|
|
160
166
|
studio?: PrismaStudioConfigShape<Env>;
|
|
167
|
+
/**
|
|
168
|
+
* The configuration for Prisma Migrate + Introspect
|
|
169
|
+
*/
|
|
170
|
+
migrate?: PrismaMigrateConfigShape<Env>;
|
|
161
171
|
/**
|
|
162
172
|
* The path from where the config was loaded.
|
|
163
173
|
* It's set to `null` if no config file was found and only default config is applied.
|
|
@@ -165,29 +175,12 @@ declare type _PrismaConfigInternal<Env extends EnvVars = never> = {
|
|
|
165
175
|
loadedFromFile: string | null;
|
|
166
176
|
};
|
|
167
177
|
|
|
168
|
-
declare type
|
|
169
|
-
|
|
170
|
-
* Tell Prisma to use a single `.prisma` schema file.
|
|
171
|
-
*/
|
|
172
|
-
kind: 'single';
|
|
173
|
-
/**
|
|
174
|
-
* The path to a single `.prisma` schema file.
|
|
175
|
-
*/
|
|
176
|
-
filePath: string;
|
|
177
|
-
} | {
|
|
178
|
-
/**
|
|
179
|
-
* Tell Prisma to use multiple `.prisma` schema files, via the `prismaSchemaFolder` preview feature.
|
|
180
|
-
*/
|
|
181
|
-
kind: 'multi';
|
|
182
|
-
/**
|
|
183
|
-
* The path to a folder containing multiple `.prisma` schema files.
|
|
184
|
-
* All of the files in this folder will be used.
|
|
185
|
-
*/
|
|
186
|
-
folderPath: string;
|
|
178
|
+
declare type PrismaMigrateConfigShape<Env extends EnvVars = never> = {
|
|
179
|
+
adapter: (env: Env) => Promise<SqlDriverAdapter>;
|
|
187
180
|
};
|
|
188
181
|
|
|
189
182
|
declare type PrismaStudioConfigShape<Env extends EnvVars = never> = {
|
|
190
|
-
adapter: (env: Env) => Promise<
|
|
183
|
+
adapter: (env: Env) => Promise<SqlDriverAdapter>;
|
|
191
184
|
};
|
|
192
185
|
|
|
193
186
|
declare type Provider = 'mysql' | 'postgres' | 'sqlite';
|
|
@@ -203,7 +196,7 @@ declare interface Queryable<Query, Result> extends AdapterInfo {
|
|
|
203
196
|
executeRaw(params: Query): Promise<number>;
|
|
204
197
|
}
|
|
205
198
|
|
|
206
|
-
declare interface
|
|
199
|
+
declare interface SqlDriverAdapter extends SqlQueryable {
|
|
207
200
|
/**
|
|
208
201
|
* Execute multiple SQL statements separated by semicolon.
|
|
209
202
|
*/
|
|
@@ -211,7 +204,7 @@ declare interface SqlConnection extends SqlQueryable {
|
|
|
211
204
|
/**
|
|
212
205
|
* Start new transaction.
|
|
213
206
|
*/
|
|
214
|
-
|
|
207
|
+
startTransaction(isolationLevel?: IsolationLevel): Promise<Transaction>;
|
|
215
208
|
/**
|
|
216
209
|
* Optional method that returns extra connection info
|
|
217
210
|
*/
|
|
@@ -268,13 +261,6 @@ declare interface Transaction extends AdapterInfo, SqlQueryable {
|
|
|
268
261
|
rollback(): Promise<void>;
|
|
269
262
|
}
|
|
270
263
|
|
|
271
|
-
declare interface TransactionContext extends AdapterInfo, SqlQueryable {
|
|
272
|
-
/**
|
|
273
|
-
* Start new transaction.
|
|
274
|
-
*/
|
|
275
|
-
startTransaction(): Promise<Transaction>;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
264
|
declare type TransactionOptions = {
|
|
279
265
|
usePhantomQuery: boolean;
|
|
280
266
|
};
|