@varius.io/framework 13.12.4 → 13.12.5
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/bin/vatom-vault-env.mjs +15 -1
- package/package.json +1 -1
package/bin/vatom-vault-env.mjs
CHANGED
|
@@ -87,6 +87,16 @@ export async function resolveEnv() {
|
|
|
87
87
|
for (const envVar of secretEnvVars) {
|
|
88
88
|
const secret = resolvedSecrets.get(envVar.secretPath);
|
|
89
89
|
const secretPropertyValue = secret.data[envVar.secretPropertyName];
|
|
90
|
+
|
|
91
|
+
if (secretPropertyValue === undefined) {
|
|
92
|
+
console.error(
|
|
93
|
+
"vatom-vault-env: no value in vault for requested secret property, secretPath=%j, propertyName=%j",
|
|
94
|
+
envVar.secretPath,
|
|
95
|
+
envVar.secretPropertyName
|
|
96
|
+
);
|
|
97
|
+
process.exit(1);
|
|
98
|
+
}
|
|
99
|
+
|
|
90
100
|
newEnv[envVar.envKey] = secretPropertyValue;
|
|
91
101
|
}
|
|
92
102
|
|
|
@@ -133,7 +143,11 @@ async function main() {
|
|
|
133
143
|
debug("resolved env vars, names=%j", Object.keys(resolvedEnv).join(" "));
|
|
134
144
|
|
|
135
145
|
// reset self-signed cert permission, for the child process
|
|
136
|
-
|
|
146
|
+
if (oldRejectUnauthorized === undefined) {
|
|
147
|
+
delete process.env.NODE_TLS_REJECT_UNAUTHORIZED;
|
|
148
|
+
} else {
|
|
149
|
+
process.env.NODE_TLS_REJECT_UNAUTHORIZED = oldRejectUnauthorized;
|
|
150
|
+
}
|
|
137
151
|
|
|
138
152
|
process.env = { ...process.env, ...resolvedEnv };
|
|
139
153
|
|