@prisma/config 6.18.0-dev.21 → 6.18.0-dev.23
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 +6 -0
- package/dist/index.js +19 -0
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -117,6 +117,8 @@ declare type EnumsConfigShape = {
|
|
|
117
117
|
external?: string[];
|
|
118
118
|
};
|
|
119
119
|
|
|
120
|
+
export declare function env(name: string): string;
|
|
121
|
+
|
|
120
122
|
declare type Error_2 = MappedError & {
|
|
121
123
|
originalCode?: string;
|
|
122
124
|
originalMessage?: string;
|
|
@@ -352,6 +354,10 @@ declare const PRISMA_CONFIG_INTERNAL_BRAND: unique symbol;
|
|
|
352
354
|
*/
|
|
353
355
|
export declare type PrismaConfig = PrismaConfigUnconditional & SchemaEngineConfig;
|
|
354
356
|
|
|
357
|
+
export declare class PrismaConfigEnvError extends Error {
|
|
358
|
+
constructor(name: string);
|
|
359
|
+
}
|
|
360
|
+
|
|
355
361
|
/**
|
|
356
362
|
* The configuration for the Prisma Development Kit, after it has been parsed and processed
|
|
357
363
|
* by the `defineConfig` function.
|
package/dist/index.js
CHANGED
|
@@ -30,8 +30,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
+
PrismaConfigEnvError: () => PrismaConfigEnvError,
|
|
33
34
|
defaultTestConfig: () => defaultTestConfig,
|
|
34
35
|
defineConfig: () => defineConfig,
|
|
36
|
+
env: () => env,
|
|
35
37
|
loadConfigFromFile: () => loadConfigFromFile,
|
|
36
38
|
loadConfigFromPackageJson: () => loadConfigFromPackageJson
|
|
37
39
|
});
|
|
@@ -781,6 +783,21 @@ function defaultTestConfig() {
|
|
|
781
783
|
});
|
|
782
784
|
}
|
|
783
785
|
|
|
786
|
+
// src/env.ts
|
|
787
|
+
var PrismaConfigEnvError = class extends Error {
|
|
788
|
+
constructor(name) {
|
|
789
|
+
super(`Missing required environment variable: ${name}`);
|
|
790
|
+
this.name = "PrismaConfigEnvError";
|
|
791
|
+
}
|
|
792
|
+
};
|
|
793
|
+
function env(name) {
|
|
794
|
+
const value = process.env[name];
|
|
795
|
+
if (!value) {
|
|
796
|
+
throw new PrismaConfigEnvError(name);
|
|
797
|
+
}
|
|
798
|
+
return value;
|
|
799
|
+
}
|
|
800
|
+
|
|
784
801
|
// src/loadConfigFromFile.ts
|
|
785
802
|
var import_node_path = __toESM(require("node:path"));
|
|
786
803
|
var import_node_process2 = __toESM(require("node:process"));
|
|
@@ -974,8 +991,10 @@ function transformPathsInConfigToAbsolute(prismaConfig, resolvedPath) {
|
|
|
974
991
|
}
|
|
975
992
|
// Annotate the CommonJS export names for ESM import in node:
|
|
976
993
|
0 && (module.exports = {
|
|
994
|
+
PrismaConfigEnvError,
|
|
977
995
|
defaultTestConfig,
|
|
978
996
|
defineConfig,
|
|
997
|
+
env,
|
|
979
998
|
loadConfigFromFile,
|
|
980
999
|
loadConfigFromPackageJson
|
|
981
1000
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/config",
|
|
3
|
-
"version": "6.18.0-dev.
|
|
3
|
+
"version": "6.18.0-dev.23",
|
|
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",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"vitest": "3.2.4",
|
|
22
|
-
"@prisma/driver-adapter-utils": "6.18.0-dev.
|
|
23
|
-
"@prisma/get-platform": "6.18.0-dev.
|
|
22
|
+
"@prisma/driver-adapter-utils": "6.18.0-dev.23",
|
|
23
|
+
"@prisma/get-platform": "6.18.0-dev.23"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
"dist"
|