@prisma/config 6.5.0-integration-fix-e2e-prisma-config-2.8 → 6.5.0-integration-fix-client-read-replicas.1
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 +119 -4
- package/dist/index.js +12 -0
- package/package.json +3 -3
- package/dist/PrismaConfig.d.ts +0 -61
- package/dist/PrismaConfig.js +0 -22551
- package/dist/defaultConfig.d.ts +0 -8
- package/dist/defaultConfig.js +0 -22371
- package/dist/defaultTestConfig.d.ts +0 -5
- package/dist/defaultTestConfig.js +0 -22371
- package/dist/defineConfig.d.ts +0 -6
- package/dist/defineConfig.js +0 -22387
- package/dist/loadConfigFromFile.d.ts +0 -43
- package/dist/loadConfigFromFile.js +0 -22673
- package/dist/utils.d.ts +0 -12
- package/dist/utils.js +0 -18
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,119 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export declare type ConfigFromFile = {
|
|
2
|
+
resolvedPath: string;
|
|
3
|
+
config: PrismaConfigInternal;
|
|
4
|
+
error?: never;
|
|
5
|
+
} | {
|
|
6
|
+
resolvedPath: string;
|
|
7
|
+
config?: never;
|
|
8
|
+
error: LoadConfigFromFileError;
|
|
9
|
+
} | {
|
|
10
|
+
resolvedPath: null;
|
|
11
|
+
config: PrismaConfigInternal;
|
|
12
|
+
error?: never;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* This default config can be used as basis for unit and integration tests.
|
|
17
|
+
*/
|
|
18
|
+
export declare function defaultTestConfig(): PrismaConfigInternal;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Define the configuration for the Prisma Development Kit.
|
|
22
|
+
*/
|
|
23
|
+
export declare function defineConfig(configInput: PrismaConfig): PrismaConfigInternal;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Load a Prisma config file from the given directory.
|
|
27
|
+
* This function may fail, but it will never throw.
|
|
28
|
+
* The possible error is returned in the result object, so the caller can handle it as needed.
|
|
29
|
+
*/
|
|
30
|
+
export declare function loadConfigFromFile({ configFile, configRoot, }: LoadConfigFromFileInput): Promise<ConfigFromFile>;
|
|
31
|
+
|
|
32
|
+
export declare type LoadConfigFromFileError = {
|
|
33
|
+
_tag: 'ConfigFileNotFound';
|
|
34
|
+
} | {
|
|
35
|
+
_tag: 'TypeScriptImportFailed';
|
|
36
|
+
error: Error;
|
|
37
|
+
} | {
|
|
38
|
+
_tag: 'ConfigFileParseError';
|
|
39
|
+
error: Error;
|
|
40
|
+
} | {
|
|
41
|
+
_tag: 'UnknownError';
|
|
42
|
+
error: Error;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
declare type LoadConfigFromFileInput = {
|
|
46
|
+
/**
|
|
47
|
+
* The path to the config file to load. If not provided, we will attempt to find a config file in the `configRoot` directory.
|
|
48
|
+
*/
|
|
49
|
+
configFile?: string;
|
|
50
|
+
/**
|
|
51
|
+
* The directory to search for the config file in. Defaults to the current working directory.
|
|
52
|
+
*/
|
|
53
|
+
configRoot?: string;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
declare const PRISMA_CONFIG_INTERNAL_BRAND: unique symbol;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The configuration for the Prisma Development Kit, before it is passed to the `defineConfig` function.
|
|
60
|
+
* Thanks to the branding, this type is opaque and cannot be constructed directly.
|
|
61
|
+
*/
|
|
62
|
+
export declare type PrismaConfig = {
|
|
63
|
+
/**
|
|
64
|
+
* Whether features with an unstable API are enabled.
|
|
65
|
+
*/
|
|
66
|
+
earlyAccess: true;
|
|
67
|
+
/**
|
|
68
|
+
* The configuration for the Prisma schema file(s).
|
|
69
|
+
*/
|
|
70
|
+
schema?: PrismaSchemaConfigShape;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The configuration for the Prisma Development Kit, after it has been parsed and processed
|
|
75
|
+
* by the `defineConfig` function.
|
|
76
|
+
* Thanks to the branding, this type is opaque and cannot be constructed directly.
|
|
77
|
+
*/
|
|
78
|
+
export declare type PrismaConfigInternal = _PrismaConfigInternal & {
|
|
79
|
+
__brand: typeof PRISMA_CONFIG_INTERNAL_BRAND;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
declare type _PrismaConfigInternal = {
|
|
83
|
+
/**
|
|
84
|
+
* Whether features with an unstable API are enabled.
|
|
85
|
+
*/
|
|
86
|
+
earlyAccess: true;
|
|
87
|
+
/**
|
|
88
|
+
* The configuration for the Prisma schema file(s).
|
|
89
|
+
*/
|
|
90
|
+
schema?: PrismaSchemaConfigShape;
|
|
91
|
+
/**
|
|
92
|
+
* The path from where the config was loaded.
|
|
93
|
+
* It's set to `null` if no config file was found and only default config is applied.
|
|
94
|
+
*/
|
|
95
|
+
loadedFromFile: string | null;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
declare type PrismaSchemaConfigShape = {
|
|
99
|
+
/**
|
|
100
|
+
* Tell Prisma to use a single `.prisma` schema file.
|
|
101
|
+
*/
|
|
102
|
+
kind: 'single';
|
|
103
|
+
/**
|
|
104
|
+
* The path to a single `.prisma` schema file.
|
|
105
|
+
*/
|
|
106
|
+
filePath: string;
|
|
107
|
+
} | {
|
|
108
|
+
/**
|
|
109
|
+
* Tell Prisma to use multiple `.prisma` schema files, via the `prismaSchemaFolder` preview feature.
|
|
110
|
+
*/
|
|
111
|
+
kind: 'multi';
|
|
112
|
+
/**
|
|
113
|
+
* The path to a folder containing multiple `.prisma` schema files.
|
|
114
|
+
* All of the files in this folder will be used.
|
|
115
|
+
*/
|
|
116
|
+
folderPath: string;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export { }
|
package/dist/index.js
CHANGED
|
@@ -22493,10 +22493,18 @@ var PrismaConfigSchemaMultiShape = Schema_exports.Struct({
|
|
|
22493
22493
|
folderPath: Schema_exports.String
|
|
22494
22494
|
});
|
|
22495
22495
|
var PrismaSchemaConfigShape = Schema_exports.Union(PrismaConfigSchemaSingleShape, PrismaConfigSchemaMultiShape);
|
|
22496
|
+
if (false) {
|
|
22497
|
+
__testPrismaConfigShapeValueA;
|
|
22498
|
+
__testPrismaConfigShapeValueB;
|
|
22499
|
+
}
|
|
22496
22500
|
var createPrismaConfigShape = () => Schema_exports.Struct({
|
|
22497
22501
|
earlyAccess: Schema_exports.Literal(true),
|
|
22498
22502
|
schema: Schema_exports.optional(PrismaSchemaConfigShape)
|
|
22499
22503
|
});
|
|
22504
|
+
if (false) {
|
|
22505
|
+
__testPrismaConfigValueA;
|
|
22506
|
+
__testPrismaConfigValueB;
|
|
22507
|
+
}
|
|
22500
22508
|
function parsePrismaConfigShape(input) {
|
|
22501
22509
|
return Schema_exports.decodeUnknownEither(createPrismaConfigShape(), {})(input, {
|
|
22502
22510
|
onExcessProperty: "error"
|
|
@@ -22508,6 +22516,10 @@ var createPrismaConfigInternalShape = () => Schema_exports.Struct({
|
|
|
22508
22516
|
schema: Schema_exports.optional(PrismaSchemaConfigShape),
|
|
22509
22517
|
loadedFromFile: Schema_exports.NullOr(Schema_exports.String)
|
|
22510
22518
|
});
|
|
22519
|
+
if (false) {
|
|
22520
|
+
__testPrismaConfigInternalValueA;
|
|
22521
|
+
__testPrismaConfigInternalValueB;
|
|
22522
|
+
}
|
|
22511
22523
|
function brandPrismaConfigInternal(config2) {
|
|
22512
22524
|
Object.defineProperty(config2, "__brand", {
|
|
22513
22525
|
value: PRISMA_CONFIG_INTERNAL_BRAND,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/config",
|
|
3
|
-
"version": "6.5.0-integration-fix-
|
|
3
|
+
"version": "6.5.0-integration-fix-client-read-replicas.1",
|
|
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",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"esbuild-register": "3.6.0",
|
|
23
23
|
"jest": "29.7.0",
|
|
24
24
|
"jest-junit": "16.0.0",
|
|
25
|
-
"@prisma/get-platform": "6.5.0-integration-fix-
|
|
26
|
-
"@prisma/driver-adapter-utils": "6.5.0-integration-fix-
|
|
25
|
+
"@prisma/get-platform": "6.5.0-integration-fix-client-read-replicas.1",
|
|
26
|
+
"@prisma/driver-adapter-utils": "6.5.0-integration-fix-client-read-replicas.1"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"dist"
|
package/dist/PrismaConfig.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
export type PrismaSchemaConfigShape = {
|
|
2
|
-
/**
|
|
3
|
-
* Tell Prisma to use a single `.prisma` schema file.
|
|
4
|
-
*/
|
|
5
|
-
kind: 'single';
|
|
6
|
-
/**
|
|
7
|
-
* The path to a single `.prisma` schema file.
|
|
8
|
-
*/
|
|
9
|
-
filePath: string;
|
|
10
|
-
} | {
|
|
11
|
-
/**
|
|
12
|
-
* Tell Prisma to use multiple `.prisma` schema files, via the `prismaSchemaFolder` preview feature.
|
|
13
|
-
*/
|
|
14
|
-
kind: 'multi';
|
|
15
|
-
/**
|
|
16
|
-
* The path to a folder containing multiple `.prisma` schema files.
|
|
17
|
-
* All of the files in this folder will be used.
|
|
18
|
-
*/
|
|
19
|
-
folderPath: string;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* The configuration for the Prisma Development Kit, before it is passed to the `defineConfig` function.
|
|
23
|
-
* Thanks to the branding, this type is opaque and cannot be constructed directly.
|
|
24
|
-
*/
|
|
25
|
-
export type PrismaConfig = {
|
|
26
|
-
/**
|
|
27
|
-
* Whether features with an unstable API are enabled.
|
|
28
|
-
*/
|
|
29
|
-
earlyAccess: true;
|
|
30
|
-
/**
|
|
31
|
-
* The configuration for the Prisma schema file(s).
|
|
32
|
-
*/
|
|
33
|
-
schema?: PrismaSchemaConfigShape;
|
|
34
|
-
};
|
|
35
|
-
declare const PRISMA_CONFIG_INTERNAL_BRAND: unique symbol;
|
|
36
|
-
type _PrismaConfigInternal = {
|
|
37
|
-
/**
|
|
38
|
-
* Whether features with an unstable API are enabled.
|
|
39
|
-
*/
|
|
40
|
-
earlyAccess: true;
|
|
41
|
-
/**
|
|
42
|
-
* The configuration for the Prisma schema file(s).
|
|
43
|
-
*/
|
|
44
|
-
schema?: PrismaSchemaConfigShape;
|
|
45
|
-
/**
|
|
46
|
-
* The path from where the config was loaded.
|
|
47
|
-
* It's set to `null` if no config file was found and only default config is applied.
|
|
48
|
-
*/
|
|
49
|
-
loadedFromFile: string | null;
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* The configuration for the Prisma Development Kit, after it has been parsed and processed
|
|
53
|
-
* by the `defineConfig` function.
|
|
54
|
-
* Thanks to the branding, this type is opaque and cannot be constructed directly.
|
|
55
|
-
*/
|
|
56
|
-
export type PrismaConfigInternal = _PrismaConfigInternal & {
|
|
57
|
-
__brand: typeof PRISMA_CONFIG_INTERNAL_BRAND;
|
|
58
|
-
};
|
|
59
|
-
export declare function makePrismaConfigInternal(makeArgs: _PrismaConfigInternal): PrismaConfigInternal;
|
|
60
|
-
export declare function parseDefaultExport(defaultExport: unknown): PrismaConfigInternal;
|
|
61
|
-
export {};
|