@truefoundry/trueforge 0.179.0 → 0.179.2
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/controller-main.js
CHANGED
|
@@ -290,7 +290,8 @@ function optionalNonEmptyEnv(envKey) {
|
|
|
290
290
|
function buildRedisStandaloneUrl(parts) {
|
|
291
291
|
const bareHost = parts.host.startsWith("[") && parts.host.endsWith("]") ? parts.host.slice(1, -1) : parts.host;
|
|
292
292
|
const host2 = isIPv6(bareHost) ? `[${bareHost}]` : bareHost;
|
|
293
|
-
const
|
|
293
|
+
const protocol = parts.tls ? "rediss" : "redis";
|
|
294
|
+
const url = new URL(`${protocol}://${host2}:${String(parts.port)}/${String(parts.database)}`);
|
|
294
295
|
if (parts.username !== void 0) {
|
|
295
296
|
url.username = parts.username;
|
|
296
297
|
}
|
|
@@ -315,6 +316,11 @@ function resolveRedisConnection() {
|
|
|
315
316
|
const username = optionalNonEmptyEnv("REDIS_USERNAME");
|
|
316
317
|
const password = getEnv("REDIS_PASSWORD");
|
|
317
318
|
const passwordOrUndefined = password === void 0 || password === "" ? void 0 : password;
|
|
319
|
+
const tls = parseBoolean({
|
|
320
|
+
envKey: "REDIS_TLS_ENABLED",
|
|
321
|
+
raw: getEnv("REDIS_TLS_ENABLED"),
|
|
322
|
+
defaultValue: false
|
|
323
|
+
});
|
|
318
324
|
if (sentinelEnabled) {
|
|
319
325
|
const nodes = optionalNonEmptyEnv("REDIS_SENTINEL_NODES");
|
|
320
326
|
const masterName = optionalNonEmptyEnv("REDIS_SENTINEL_MASTER_NAME");
|
|
@@ -363,7 +369,8 @@ function resolveRedisConnection() {
|
|
|
363
369
|
port: port2,
|
|
364
370
|
database,
|
|
365
371
|
username,
|
|
366
|
-
password: passwordOrUndefined
|
|
372
|
+
password: passwordOrUndefined,
|
|
373
|
+
tls
|
|
367
374
|
})
|
|
368
375
|
};
|
|
369
376
|
}
|