@prisma/config 6.4.0-dev.57 → 6.4.0-dev.58
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/PrismaConfig.d.ts +3 -13
- package/dist/PrismaConfig.js +0 -20
- package/dist/defaultConfig.d.ts +1 -1
- package/dist/defaultConfig.js +0 -20
- package/dist/defaultTestConfig.d.ts +1 -1
- package/dist/defaultTestConfig.js +0 -20
- package/dist/defineConfig.d.ts +2 -14
- package/dist/defineConfig.js +0 -30
- package/dist/index.js +0 -30
- package/dist/loadConfigFromFile.d.ts +1 -1
- package/dist/loadConfigFromFile.js +0 -20
- package/package.json +3 -3
package/dist/PrismaConfig.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { DriverAdapter as QueryableDriverAdapter } from '@prisma/driver-adapter-utils';
|
|
2
1
|
import { Schema as Shape } from 'effect';
|
|
3
2
|
import type { Either } from 'effect/Either';
|
|
4
3
|
import type { ParseError } from 'effect/ParseResult';
|
|
@@ -23,7 +22,7 @@ declare const PrismaSchemaConfigShape: Shape.Union<[Shape.Struct<{
|
|
|
23
22
|
folderPath: typeof Shape.String;
|
|
24
23
|
}>]>;
|
|
25
24
|
export type PrismaSchemaConfigShape = typeof PrismaSchemaConfigShape.Type;
|
|
26
|
-
export declare const createPrismaConfigInternalShape:
|
|
25
|
+
export declare const createPrismaConfigInternalShape: () => Shape.brand<Shape.Struct<{
|
|
27
26
|
/**
|
|
28
27
|
* Whether features with an unstable API are enabled.
|
|
29
28
|
*/
|
|
@@ -51,15 +50,6 @@ export declare const createPrismaConfigInternalShape: <Env = any>() => Shape.bra
|
|
|
51
50
|
*/
|
|
52
51
|
folderPath: typeof Shape.String;
|
|
53
52
|
}>]>>;
|
|
54
|
-
/**
|
|
55
|
-
* The configuration for Prisma Studio.
|
|
56
|
-
*/
|
|
57
|
-
studio: Shape.optional<Shape.Struct<{
|
|
58
|
-
/**
|
|
59
|
-
* Instantiates the Prisma driver adapter to use for Prisma Studio.
|
|
60
|
-
*/
|
|
61
|
-
adapter: Shape.SchemaClass<(env: Env) => Promise<QueryableDriverAdapter>, (env: Env) => Promise<QueryableDriverAdapter>, never>;
|
|
62
|
-
}>>;
|
|
63
53
|
/**
|
|
64
54
|
* The path from where the config was loaded.
|
|
65
55
|
* It's set to `null` if no config file was found and only default config is applied.
|
|
@@ -71,10 +61,10 @@ export declare const createPrismaConfigInternalShape: <Env = any>() => Shape.bra
|
|
|
71
61
|
* by the `defineConfig` function.
|
|
72
62
|
* Thanks to the branding, this type is opaque and cannot be constructed directly.
|
|
73
63
|
*/
|
|
74
|
-
export type PrismaConfigInternal
|
|
64
|
+
export type PrismaConfigInternal = ReturnType<typeof createPrismaConfigInternalShape>['Type'];
|
|
75
65
|
/**
|
|
76
66
|
* Parse a given input object to ensure it conforms to the `PrismaConfig` type Shape.
|
|
77
67
|
* This function may fail, but it will never throw.
|
|
78
68
|
*/
|
|
79
|
-
export declare function parsePrismaConfigInternalShape
|
|
69
|
+
export declare function parsePrismaConfigInternalShape(input: unknown): Either<PrismaConfigInternal, ParseError>;
|
|
80
70
|
export {};
|
package/dist/PrismaConfig.js
CHANGED
|
@@ -22144,22 +22144,6 @@ var ArrayFormatterIssue = class extends (/* @__PURE__ */ Struct({
|
|
|
22144
22144
|
};
|
|
22145
22145
|
|
|
22146
22146
|
// src/PrismaConfig.ts
|
|
22147
|
-
var adapterShape = () => Schema_exports.declare(
|
|
22148
|
-
(input) => {
|
|
22149
|
-
return input instanceof Function;
|
|
22150
|
-
},
|
|
22151
|
-
{
|
|
22152
|
-
identifier: "Adapter<Env>",
|
|
22153
|
-
encode: identity,
|
|
22154
|
-
decode: identity
|
|
22155
|
-
}
|
|
22156
|
-
);
|
|
22157
|
-
var createPrismaStudioConfigInternalShape = () => Schema_exports.Struct({
|
|
22158
|
-
/**
|
|
22159
|
-
* Instantiates the Prisma driver adapter to use for Prisma Studio.
|
|
22160
|
-
*/
|
|
22161
|
-
adapter: adapterShape()
|
|
22162
|
-
});
|
|
22163
22147
|
var PrismaConfigSchemaSingleShape = Schema_exports.Struct({
|
|
22164
22148
|
/**
|
|
22165
22149
|
* Tell Prisma to use a single `.prisma` schema file.
|
|
@@ -22192,10 +22176,6 @@ var createPrismaConfigInternalShape = () => pipe(
|
|
|
22192
22176
|
* The configuration for the Prisma schema file(s).
|
|
22193
22177
|
*/
|
|
22194
22178
|
schema: Schema_exports.optional(PrismaSchemaConfigShape),
|
|
22195
|
-
/**
|
|
22196
|
-
* The configuration for Prisma Studio.
|
|
22197
|
-
*/
|
|
22198
|
-
studio: Schema_exports.optional(createPrismaStudioConfigInternalShape()),
|
|
22199
22179
|
/**
|
|
22200
22180
|
* The path from where the config was loaded.
|
|
22201
22181
|
* It's set to `null` if no config file was found and only default config is applied.
|
package/dist/defaultConfig.d.ts
CHANGED
|
@@ -5,4 +5,4 @@ import { type PrismaConfigInternal } from './PrismaConfig';
|
|
|
5
5
|
* Modules should not have to deal with missing config values and determining a default themselves as far as possible.
|
|
6
6
|
* => Consistent defaults and centralized top-level control of configuration via the CLI.
|
|
7
7
|
*/
|
|
8
|
-
export declare function defaultConfig
|
|
8
|
+
export declare function defaultConfig(): DeepMutable<PrismaConfigInternal>;
|
package/dist/defaultConfig.js
CHANGED
|
@@ -22143,22 +22143,6 @@ var ArrayFormatterIssue = class extends (/* @__PURE__ */ Struct({
|
|
|
22143
22143
|
};
|
|
22144
22144
|
|
|
22145
22145
|
// src/PrismaConfig.ts
|
|
22146
|
-
var adapterShape = () => Schema_exports.declare(
|
|
22147
|
-
(input) => {
|
|
22148
|
-
return input instanceof Function;
|
|
22149
|
-
},
|
|
22150
|
-
{
|
|
22151
|
-
identifier: "Adapter<Env>",
|
|
22152
|
-
encode: identity,
|
|
22153
|
-
decode: identity
|
|
22154
|
-
}
|
|
22155
|
-
);
|
|
22156
|
-
var createPrismaStudioConfigInternalShape = () => Schema_exports.Struct({
|
|
22157
|
-
/**
|
|
22158
|
-
* Instantiates the Prisma driver adapter to use for Prisma Studio.
|
|
22159
|
-
*/
|
|
22160
|
-
adapter: adapterShape()
|
|
22161
|
-
});
|
|
22162
22146
|
var PrismaConfigSchemaSingleShape = Schema_exports.Struct({
|
|
22163
22147
|
/**
|
|
22164
22148
|
* Tell Prisma to use a single `.prisma` schema file.
|
|
@@ -22191,10 +22175,6 @@ var createPrismaConfigInternalShape = () => pipe(
|
|
|
22191
22175
|
* The configuration for the Prisma schema file(s).
|
|
22192
22176
|
*/
|
|
22193
22177
|
schema: Schema_exports.optional(PrismaSchemaConfigShape),
|
|
22194
|
-
/**
|
|
22195
|
-
* The configuration for Prisma Studio.
|
|
22196
|
-
*/
|
|
22197
|
-
studio: Schema_exports.optional(createPrismaStudioConfigInternalShape()),
|
|
22198
22178
|
/**
|
|
22199
22179
|
* The path from where the config was loaded.
|
|
22200
22180
|
* It's set to `null` if no config file was found and only default config is applied.
|
|
@@ -3,4 +3,4 @@ import { type PrismaConfigInternal } from './PrismaConfig';
|
|
|
3
3
|
/**
|
|
4
4
|
* This default config can be used as basis for unit and integration tests.
|
|
5
5
|
*/
|
|
6
|
-
export declare function defaultTestConfig
|
|
6
|
+
export declare function defaultTestConfig(): DeepMutable<PrismaConfigInternal>;
|
|
@@ -22143,22 +22143,6 @@ var ArrayFormatterIssue = class extends (/* @__PURE__ */ Struct({
|
|
|
22143
22143
|
};
|
|
22144
22144
|
|
|
22145
22145
|
// src/PrismaConfig.ts
|
|
22146
|
-
var adapterShape = () => Schema_exports.declare(
|
|
22147
|
-
(input) => {
|
|
22148
|
-
return input instanceof Function;
|
|
22149
|
-
},
|
|
22150
|
-
{
|
|
22151
|
-
identifier: "Adapter<Env>",
|
|
22152
|
-
encode: identity,
|
|
22153
|
-
decode: identity
|
|
22154
|
-
}
|
|
22155
|
-
);
|
|
22156
|
-
var createPrismaStudioConfigInternalShape = () => Schema_exports.Struct({
|
|
22157
|
-
/**
|
|
22158
|
-
* Instantiates the Prisma driver adapter to use for Prisma Studio.
|
|
22159
|
-
*/
|
|
22160
|
-
adapter: adapterShape()
|
|
22161
|
-
});
|
|
22162
22146
|
var PrismaConfigSchemaSingleShape = Schema_exports.Struct({
|
|
22163
22147
|
/**
|
|
22164
22148
|
* Tell Prisma to use a single `.prisma` schema file.
|
|
@@ -22191,10 +22175,6 @@ var createPrismaConfigInternalShape = () => pipe(
|
|
|
22191
22175
|
* The configuration for the Prisma schema file(s).
|
|
22192
22176
|
*/
|
|
22193
22177
|
schema: Schema_exports.optional(PrismaSchemaConfigShape),
|
|
22194
|
-
/**
|
|
22195
|
-
* The configuration for Prisma Studio.
|
|
22196
|
-
*/
|
|
22197
|
-
studio: Schema_exports.optional(createPrismaStudioConfigInternalShape()),
|
|
22198
22178
|
/**
|
|
22199
22179
|
* The path from where the config was loaded.
|
|
22200
22180
|
* It's set to `null` if no config file was found and only default config is applied.
|
package/dist/defineConfig.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type { DriverAdapter as QueryableDriverAdapter } from '@prisma/driver-adapter-utils';
|
|
2
1
|
import type { PrismaConfigInternal, PrismaSchemaConfigShape } from './PrismaConfig';
|
|
3
2
|
export type { PrismaConfigInternal };
|
|
4
3
|
/**
|
|
5
4
|
* Define the input configuration for the Prisma Development Kit.
|
|
6
5
|
*/
|
|
7
|
-
export type PrismaConfig
|
|
6
|
+
export type PrismaConfig = {
|
|
8
7
|
/**
|
|
9
8
|
* Whether to enable experimental features.
|
|
10
9
|
* Currently, every feature is considered experimental.
|
|
@@ -14,19 +13,8 @@ export type PrismaConfig<Env> = {
|
|
|
14
13
|
* The location of the Prisma schema file(s).
|
|
15
14
|
*/
|
|
16
15
|
schema?: PrismaSchemaConfigShape;
|
|
17
|
-
/**
|
|
18
|
-
* The configuration for the Prisma Studio.
|
|
19
|
-
*/
|
|
20
|
-
studio?: {
|
|
21
|
-
/**
|
|
22
|
-
* Istantiates the Prisma driver adapter to use for Prisma Studio.
|
|
23
|
-
* @param env Dictionary of environment variables.
|
|
24
|
-
* @returns The Prisma driver adapter to use for Prisma Studio.
|
|
25
|
-
*/
|
|
26
|
-
adapter: (env: Env) => Promise<QueryableDriverAdapter>;
|
|
27
|
-
};
|
|
28
16
|
};
|
|
29
17
|
/**
|
|
30
18
|
* Define the configuration for the Prisma Development Kit.
|
|
31
19
|
*/
|
|
32
|
-
export declare function defineConfig
|
|
20
|
+
export declare function defineConfig(configInput: PrismaConfig): PrismaConfigInternal;
|
package/dist/defineConfig.js
CHANGED
|
@@ -22329,22 +22329,6 @@ var ArrayFormatterIssue = class extends (/* @__PURE__ */ Struct({
|
|
|
22329
22329
|
};
|
|
22330
22330
|
|
|
22331
22331
|
// src/PrismaConfig.ts
|
|
22332
|
-
var adapterShape = () => Schema_exports.declare(
|
|
22333
|
-
(input) => {
|
|
22334
|
-
return input instanceof Function;
|
|
22335
|
-
},
|
|
22336
|
-
{
|
|
22337
|
-
identifier: "Adapter<Env>",
|
|
22338
|
-
encode: identity,
|
|
22339
|
-
decode: identity
|
|
22340
|
-
}
|
|
22341
|
-
);
|
|
22342
|
-
var createPrismaStudioConfigInternalShape = () => Schema_exports.Struct({
|
|
22343
|
-
/**
|
|
22344
|
-
* Instantiates the Prisma driver adapter to use for Prisma Studio.
|
|
22345
|
-
*/
|
|
22346
|
-
adapter: adapterShape()
|
|
22347
|
-
});
|
|
22348
22332
|
var PrismaConfigSchemaSingleShape = Schema_exports.Struct({
|
|
22349
22333
|
/**
|
|
22350
22334
|
* Tell Prisma to use a single `.prisma` schema file.
|
|
@@ -22377,10 +22361,6 @@ var createPrismaConfigInternalShape = () => pipe(
|
|
|
22377
22361
|
* The configuration for the Prisma schema file(s).
|
|
22378
22362
|
*/
|
|
22379
22363
|
schema: Schema_exports.optional(PrismaSchemaConfigShape),
|
|
22380
|
-
/**
|
|
22381
|
-
* The configuration for Prisma Studio.
|
|
22382
|
-
*/
|
|
22383
|
-
studio: Schema_exports.optional(createPrismaStudioConfigInternalShape()),
|
|
22384
22364
|
/**
|
|
22385
22365
|
* The path from where the config was loaded.
|
|
22386
22366
|
* It's set to `null` if no config file was found and only default config is applied.
|
|
@@ -22403,7 +22383,6 @@ var debug = Debug("prisma:config:defineConfig");
|
|
|
22403
22383
|
function defineConfig(configInput) {
|
|
22404
22384
|
const config2 = defaultConfig();
|
|
22405
22385
|
defineSchemaConfig(config2, configInput);
|
|
22406
|
-
defineStudioConfig(config2, configInput);
|
|
22407
22386
|
return config2;
|
|
22408
22387
|
}
|
|
22409
22388
|
function defineSchemaConfig(config2, configInput) {
|
|
@@ -22413,15 +22392,6 @@ function defineSchemaConfig(config2, configInput) {
|
|
|
22413
22392
|
config2.schema = configInput.schema;
|
|
22414
22393
|
debug("Prisma config [schema]: %o", config2.schema);
|
|
22415
22394
|
}
|
|
22416
|
-
function defineStudioConfig(config2, configInput) {
|
|
22417
|
-
if (!configInput.studio) {
|
|
22418
|
-
return;
|
|
22419
|
-
}
|
|
22420
|
-
config2.studio = {
|
|
22421
|
-
adapter: configInput.studio.adapter
|
|
22422
|
-
};
|
|
22423
|
-
debug("Prisma config [studio]: %o", config2.studio);
|
|
22424
|
-
}
|
|
22425
22395
|
// Annotate the CommonJS export names for ESM import in node:
|
|
22426
22396
|
0 && (module.exports = {
|
|
22427
22397
|
defineConfig
|
package/dist/index.js
CHANGED
|
@@ -22274,22 +22274,6 @@ var ArrayFormatterIssue = class extends (/* @__PURE__ */ Struct({
|
|
|
22274
22274
|
};
|
|
22275
22275
|
|
|
22276
22276
|
// src/PrismaConfig.ts
|
|
22277
|
-
var adapterShape = () => Schema_exports.declare(
|
|
22278
|
-
(input) => {
|
|
22279
|
-
return input instanceof Function;
|
|
22280
|
-
},
|
|
22281
|
-
{
|
|
22282
|
-
identifier: "Adapter<Env>",
|
|
22283
|
-
encode: identity,
|
|
22284
|
-
decode: identity
|
|
22285
|
-
}
|
|
22286
|
-
);
|
|
22287
|
-
var createPrismaStudioConfigInternalShape = () => Schema_exports.Struct({
|
|
22288
|
-
/**
|
|
22289
|
-
* Instantiates the Prisma driver adapter to use for Prisma Studio.
|
|
22290
|
-
*/
|
|
22291
|
-
adapter: adapterShape()
|
|
22292
|
-
});
|
|
22293
22277
|
var PrismaConfigSchemaSingleShape = Schema_exports.Struct({
|
|
22294
22278
|
/**
|
|
22295
22279
|
* Tell Prisma to use a single `.prisma` schema file.
|
|
@@ -22322,10 +22306,6 @@ var createPrismaConfigInternalShape = () => pipe(
|
|
|
22322
22306
|
* The configuration for the Prisma schema file(s).
|
|
22323
22307
|
*/
|
|
22324
22308
|
schema: Schema_exports.optional(PrismaSchemaConfigShape),
|
|
22325
|
-
/**
|
|
22326
|
-
* The configuration for Prisma Studio.
|
|
22327
|
-
*/
|
|
22328
|
-
studio: Schema_exports.optional(createPrismaStudioConfigInternalShape()),
|
|
22329
22309
|
/**
|
|
22330
22310
|
* The path from where the config was loaded.
|
|
22331
22311
|
* It's set to `null` if no config file was found and only default config is applied.
|
|
@@ -22547,7 +22527,6 @@ var debug = Debug2("prisma:config:defineConfig");
|
|
|
22547
22527
|
function defineConfig(configInput) {
|
|
22548
22528
|
const config2 = defaultConfig();
|
|
22549
22529
|
defineSchemaConfig(config2, configInput);
|
|
22550
|
-
defineStudioConfig(config2, configInput);
|
|
22551
22530
|
return config2;
|
|
22552
22531
|
}
|
|
22553
22532
|
function defineSchemaConfig(config2, configInput) {
|
|
@@ -22557,15 +22536,6 @@ function defineSchemaConfig(config2, configInput) {
|
|
|
22557
22536
|
config2.schema = configInput.schema;
|
|
22558
22537
|
debug("Prisma config [schema]: %o", config2.schema);
|
|
22559
22538
|
}
|
|
22560
|
-
function defineStudioConfig(config2, configInput) {
|
|
22561
|
-
if (!configInput.studio) {
|
|
22562
|
-
return;
|
|
22563
|
-
}
|
|
22564
|
-
config2.studio = {
|
|
22565
|
-
adapter: configInput.studio.adapter
|
|
22566
|
-
};
|
|
22567
|
-
debug("Prisma config [studio]: %o", config2.studio);
|
|
22568
|
-
}
|
|
22569
22539
|
|
|
22570
22540
|
// src/loadConfigFromFile.ts
|
|
22571
22541
|
var import_node_fs = __toESM(require("node:fs"));
|
|
@@ -22460,22 +22460,6 @@ var ArrayFormatterIssue = class extends (/* @__PURE__ */ Struct({
|
|
|
22460
22460
|
};
|
|
22461
22461
|
|
|
22462
22462
|
// src/PrismaConfig.ts
|
|
22463
|
-
var adapterShape = () => Schema_exports.declare(
|
|
22464
|
-
(input) => {
|
|
22465
|
-
return input instanceof Function;
|
|
22466
|
-
},
|
|
22467
|
-
{
|
|
22468
|
-
identifier: "Adapter<Env>",
|
|
22469
|
-
encode: identity,
|
|
22470
|
-
decode: identity
|
|
22471
|
-
}
|
|
22472
|
-
);
|
|
22473
|
-
var createPrismaStudioConfigInternalShape = () => Schema_exports.Struct({
|
|
22474
|
-
/**
|
|
22475
|
-
* Instantiates the Prisma driver adapter to use for Prisma Studio.
|
|
22476
|
-
*/
|
|
22477
|
-
adapter: adapterShape()
|
|
22478
|
-
});
|
|
22479
22463
|
var PrismaConfigSchemaSingleShape = Schema_exports.Struct({
|
|
22480
22464
|
/**
|
|
22481
22465
|
* Tell Prisma to use a single `.prisma` schema file.
|
|
@@ -22508,10 +22492,6 @@ var createPrismaConfigInternalShape = () => pipe(
|
|
|
22508
22492
|
* The configuration for the Prisma schema file(s).
|
|
22509
22493
|
*/
|
|
22510
22494
|
schema: Schema_exports.optional(PrismaSchemaConfigShape),
|
|
22511
|
-
/**
|
|
22512
|
-
* The configuration for Prisma Studio.
|
|
22513
|
-
*/
|
|
22514
|
-
studio: Schema_exports.optional(createPrismaStudioConfigInternalShape()),
|
|
22515
22495
|
/**
|
|
22516
22496
|
* The path from where the config was loaded.
|
|
22517
22497
|
* It's set to `null` if no config file was found and only default config is applied.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/config",
|
|
3
|
-
"version": "6.4.0-dev.
|
|
3
|
+
"version": "6.4.0-dev.58",
|
|
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
|
"esbuild-register": "3.6.0",
|
|
19
19
|
"jest": "29.7.0",
|
|
20
20
|
"jest-junit": "16.0.0",
|
|
21
|
-
"@prisma/get-platform": "6.4.0-dev.
|
|
22
|
-
"@prisma/driver-adapter-utils": "6.4.0-dev.
|
|
21
|
+
"@prisma/get-platform": "6.4.0-dev.58",
|
|
22
|
+
"@prisma/driver-adapter-utils": "6.4.0-dev.58"
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
25
25
|
"dist"
|