@dotenvage/node 0.2.2 → 0.2.3
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/dotenvage-napi.darwin-arm64.node +0 -0
- package/dotenvage-napi.darwin-x64.node +0 -0
- package/dotenvage-napi.linux-arm64-gnu.node +0 -0
- package/dotenvage-napi.linux-x64-gnu.node +0 -0
- package/dotenvage-napi.win32-arm64-msvc.node +0 -0
- package/dotenvage-napi.win32-x64-msvc.node +0 -0
- package/nextjs/loader.mjs +7 -0
- package/nextjs/preinit.mjs +7 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/nextjs/loader.mjs
CHANGED
|
@@ -45,10 +45,17 @@ export function loadEnv() {
|
|
|
45
45
|
const variableNames = loader.getAllVariableNames();
|
|
46
46
|
const isProduction = process.env.NODE_ENV === "production";
|
|
47
47
|
|
|
48
|
+
// Get the list of loaded .env files for display
|
|
49
|
+
const envPaths = loader.resolveEnvPaths(process.cwd());
|
|
50
|
+
const envFiles = envPaths.map((p) => p.split("/").pop());
|
|
51
|
+
|
|
48
52
|
if (!isProduction || process.env.VERCEL) {
|
|
49
53
|
console.log(
|
|
50
54
|
`✓ Loaded ${variableNames.length} environment variables from dotenvage`
|
|
51
55
|
);
|
|
56
|
+
if (envFiles.length > 0) {
|
|
57
|
+
console.log(` - Decrypted: ${envFiles.join(", ")}`);
|
|
58
|
+
}
|
|
52
59
|
}
|
|
53
60
|
|
|
54
61
|
loaded = true;
|
package/nextjs/preinit.mjs
CHANGED
|
@@ -46,6 +46,10 @@ function loadEnvPreinit() {
|
|
|
46
46
|
const variableNames = loader.getAllVariableNames();
|
|
47
47
|
const isProduction = process.env.NODE_ENV === "production";
|
|
48
48
|
|
|
49
|
+
// Get the list of loaded .env files for display
|
|
50
|
+
const envPaths = loader.resolveEnvPaths(process.cwd());
|
|
51
|
+
const envFiles = envPaths.map((p) => p.split("/").pop());
|
|
52
|
+
|
|
49
53
|
// Check which variables we loaded that didn't exist before
|
|
50
54
|
const newlyLoadedVars = variableNames.filter(
|
|
51
55
|
(name) => !existingVars.has(name)
|
|
@@ -58,6 +62,9 @@ function loadEnvPreinit() {
|
|
|
58
62
|
console.log(
|
|
59
63
|
`✓ Pre-initialized ${variableNames.length} environment variables from dotenvage`
|
|
60
64
|
);
|
|
65
|
+
if (envFiles.length > 0) {
|
|
66
|
+
console.log(` - Decrypted: ${envFiles.join(", ")}`);
|
|
67
|
+
}
|
|
61
68
|
if (
|
|
62
69
|
overwrittenVars.length > 0 &&
|
|
63
70
|
process.env.NODE_ENV === "development"
|