@prisma/config 6.13.0-dev.16 → 6.13.0-dev.18
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 +17 -2
- package/dist/index.js +72 -6
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -211,6 +211,21 @@ declare interface ErrorRegistry {
|
|
|
211
211
|
consumeError(id: number): ErrorRecord | undefined;
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
+
declare type ExperimentalConfig = {
|
|
215
|
+
/**
|
|
216
|
+
* Enable experimental adapter support.
|
|
217
|
+
*/
|
|
218
|
+
adapter?: boolean;
|
|
219
|
+
/**
|
|
220
|
+
* Enable experimental Prisma Studio features.
|
|
221
|
+
*/
|
|
222
|
+
studio?: boolean;
|
|
223
|
+
/**
|
|
224
|
+
* Enable experimental external tables support.
|
|
225
|
+
*/
|
|
226
|
+
externalTables?: boolean;
|
|
227
|
+
};
|
|
228
|
+
|
|
214
229
|
declare type IsolationLevel = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABLE READ' | 'SNAPSHOT' | 'SERIALIZABLE';
|
|
215
230
|
|
|
216
231
|
/**
|
|
@@ -269,9 +284,9 @@ declare const PRISMA_CONFIG_INTERNAL_BRAND: unique symbol;
|
|
|
269
284
|
*/
|
|
270
285
|
export declare type PrismaConfig = {
|
|
271
286
|
/**
|
|
272
|
-
*
|
|
287
|
+
* Experimental feature gates. Each experimental feature must be explicitly enabled.
|
|
273
288
|
*/
|
|
274
|
-
|
|
289
|
+
experimental?: Simplify<ExperimentalConfig>;
|
|
275
290
|
/**
|
|
276
291
|
* The path to the schema file, or path to a folder that shall be recursively searched for *.prisma files.
|
|
277
292
|
*/
|
package/dist/index.js
CHANGED
|
@@ -22760,16 +22760,42 @@ var ArrayFormatterIssue = class extends (/* @__PURE__ */ Struct({
|
|
|
22760
22760
|
// src/defaultConfig.ts
|
|
22761
22761
|
function defaultConfig() {
|
|
22762
22762
|
return makePrismaConfigInternal({
|
|
22763
|
-
earlyAccess: true,
|
|
22764
22763
|
loadedFromFile: null
|
|
22765
22764
|
});
|
|
22766
22765
|
}
|
|
22767
22766
|
|
|
22768
22767
|
// src/defineConfig.ts
|
|
22768
|
+
function validateExperimentalFeatures(config2) {
|
|
22769
|
+
const experimental = config2.experimental || {};
|
|
22770
|
+
if (config2.adapter && !experimental.adapter) {
|
|
22771
|
+
return Either_exports.left(new Error("The `adapter` configuration requires `experimental.adapter` to be set to `true`."));
|
|
22772
|
+
}
|
|
22773
|
+
if (config2.studio && !experimental.studio) {
|
|
22774
|
+
return Either_exports.left(new Error("The `studio` configuration requires `experimental.studio` to be set to `true`."));
|
|
22775
|
+
}
|
|
22776
|
+
if (config2.tables?.external && !experimental.externalTables) {
|
|
22777
|
+
return Either_exports.left(
|
|
22778
|
+
new Error("The `tables.external` configuration requires `experimental.externalTables` to be set to `true`.")
|
|
22779
|
+
);
|
|
22780
|
+
}
|
|
22781
|
+
if (config2.migrations?.setupExternalTables && !experimental.externalTables) {
|
|
22782
|
+
return Either_exports.left(
|
|
22783
|
+
new Error(
|
|
22784
|
+
"The `migrations.setupExternalTables` configuration requires `experimental.externalTables` to be set to `true`."
|
|
22785
|
+
)
|
|
22786
|
+
);
|
|
22787
|
+
}
|
|
22788
|
+
return Either_exports.right(config2);
|
|
22789
|
+
}
|
|
22769
22790
|
var debug2 = Debug("prisma:config:defineConfig");
|
|
22770
22791
|
function defineConfig(configInput) {
|
|
22792
|
+
const validationResult = validateExperimentalFeatures(configInput);
|
|
22793
|
+
if (validationResult._tag === "Left") {
|
|
22794
|
+
throw validationResult.left;
|
|
22795
|
+
}
|
|
22771
22796
|
const config2 = defaultConfig();
|
|
22772
22797
|
debug2("[default]: %o", config2);
|
|
22798
|
+
defineExperimentalConfig(config2, configInput);
|
|
22773
22799
|
defineSchemaConfig(config2, configInput);
|
|
22774
22800
|
defineAdapterConfig(config2, configInput);
|
|
22775
22801
|
defineStudioConfig(config2, configInput);
|
|
@@ -22779,6 +22805,13 @@ function defineConfig(configInput) {
|
|
|
22779
22805
|
defineViewsConfig(config2, configInput);
|
|
22780
22806
|
return config2;
|
|
22781
22807
|
}
|
|
22808
|
+
function defineExperimentalConfig(config2, configInput) {
|
|
22809
|
+
if (!configInput.experimental) {
|
|
22810
|
+
return;
|
|
22811
|
+
}
|
|
22812
|
+
config2.experimental = configInput.experimental;
|
|
22813
|
+
debug2("[config.experimental]: %o", config2.experimental);
|
|
22814
|
+
}
|
|
22782
22815
|
function defineSchemaConfig(config2, configInput) {
|
|
22783
22816
|
if (!configInput.schema) {
|
|
22784
22817
|
return;
|
|
@@ -22863,6 +22896,15 @@ var ErrorCapturingSqlMigrationAwareDriverAdapterFactoryShape = Schema_exports.de
|
|
|
22863
22896
|
decode: identity
|
|
22864
22897
|
}
|
|
22865
22898
|
);
|
|
22899
|
+
var ExperimentalConfigShape = Schema_exports.Struct({
|
|
22900
|
+
adapter: Schema_exports.optional(Schema_exports.Boolean),
|
|
22901
|
+
studio: Schema_exports.optional(Schema_exports.Boolean),
|
|
22902
|
+
externalTables: Schema_exports.optional(Schema_exports.Boolean)
|
|
22903
|
+
});
|
|
22904
|
+
if (false) {
|
|
22905
|
+
__testExperimentalConfigShapeValueA;
|
|
22906
|
+
__testExperimentalConfigShapeValueB;
|
|
22907
|
+
}
|
|
22866
22908
|
var MigrationsConfigShape = Schema_exports.Struct({
|
|
22867
22909
|
path: Schema_exports.optional(Schema_exports.String),
|
|
22868
22910
|
setupExternalTables: Schema_exports.optional(Schema_exports.String)
|
|
@@ -22907,7 +22949,7 @@ if (false) {
|
|
|
22907
22949
|
__testPrismaConfigInternal;
|
|
22908
22950
|
}
|
|
22909
22951
|
var PrismaConfigShape = Schema_exports.Struct({
|
|
22910
|
-
|
|
22952
|
+
experimental: Schema_exports.optional(ExperimentalConfigShape),
|
|
22911
22953
|
schema: Schema_exports.optional(Schema_exports.String),
|
|
22912
22954
|
studio: Schema_exports.optional(PrismaStudioConfigShape),
|
|
22913
22955
|
adapter: Schema_exports.optional(SqlMigrationAwareDriverAdapterFactoryShape),
|
|
@@ -22920,10 +22962,35 @@ if (false) {
|
|
|
22920
22962
|
__testPrismaConfigValueA;
|
|
22921
22963
|
__testPrismaConfigValueB;
|
|
22922
22964
|
}
|
|
22965
|
+
function validateExperimentalFeatures2(config2) {
|
|
22966
|
+
const experimental = config2.experimental || {};
|
|
22967
|
+
if (config2.adapter && !experimental.adapter) {
|
|
22968
|
+
return Either_exports.left(new Error("The `adapter` configuration requires `experimental.adapter` to be set to `true`."));
|
|
22969
|
+
}
|
|
22970
|
+
if (config2.studio && !experimental.studio) {
|
|
22971
|
+
return Either_exports.left(new Error("The `studio` configuration requires `experimental.studio` to be set to `true`."));
|
|
22972
|
+
}
|
|
22973
|
+
if (config2.tables?.external && !experimental.externalTables) {
|
|
22974
|
+
return Either_exports.left(
|
|
22975
|
+
new Error("The `tables.external` configuration requires `experimental.externalTables` to be set to `true`.")
|
|
22976
|
+
);
|
|
22977
|
+
}
|
|
22978
|
+
if (config2.migrations?.setupExternalTables && !experimental.externalTables) {
|
|
22979
|
+
return Either_exports.left(
|
|
22980
|
+
new Error(
|
|
22981
|
+
"The `migrations.setupExternalTables` configuration requires `experimental.externalTables` to be set to `true`."
|
|
22982
|
+
)
|
|
22983
|
+
);
|
|
22984
|
+
}
|
|
22985
|
+
return Either_exports.right(config2);
|
|
22986
|
+
}
|
|
22923
22987
|
function parsePrismaConfigShape(input) {
|
|
22924
|
-
return
|
|
22925
|
-
|
|
22926
|
-
|
|
22988
|
+
return pipe(
|
|
22989
|
+
Schema_exports.decodeUnknownEither(PrismaConfigShape, {})(input, {
|
|
22990
|
+
onExcessProperty: "error"
|
|
22991
|
+
}),
|
|
22992
|
+
Either_exports.flatMap(validateExperimentalFeatures2)
|
|
22993
|
+
);
|
|
22927
22994
|
}
|
|
22928
22995
|
var PRISMA_CONFIG_INTERNAL_BRAND = Symbol.for("PrismaConfigInternal");
|
|
22929
22996
|
var PrismaConfigInternalShape = Schema_exports.Struct({
|
|
@@ -22986,7 +23053,6 @@ function parseDefaultExport(defaultExport) {
|
|
|
22986
23053
|
// src/defaultTestConfig.ts
|
|
22987
23054
|
function defaultTestConfig() {
|
|
22988
23055
|
return makePrismaConfigInternal({
|
|
22989
|
-
earlyAccess: true,
|
|
22990
23056
|
loadedFromFile: null
|
|
22991
23057
|
});
|
|
22992
23058
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/config",
|
|
3
|
-
"version": "6.13.0-dev.
|
|
3
|
+
"version": "6.13.0-dev.18",
|
|
4
4
|
"description": "Internal package used to define and read Prisma configuration files",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"effect": "3.16.12",
|
|
20
20
|
"vitest": "3.2.4",
|
|
21
|
-
"@prisma/driver-adapter-utils": "6.13.0-dev.
|
|
22
|
-
"@prisma/get-platform": "6.13.0-dev.
|
|
21
|
+
"@prisma/driver-adapter-utils": "6.13.0-dev.18",
|
|
22
|
+
"@prisma/get-platform": "6.13.0-dev.18"
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
25
25
|
"dist"
|