@truefoundry/trueforge 0.179.0 → 0.179.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/main.js
CHANGED
|
@@ -428,7 +428,8 @@ function optionalNonEmptyEnv(envKey) {
|
|
|
428
428
|
function buildRedisStandaloneUrl(parts) {
|
|
429
429
|
const bareHost = parts.host.startsWith("[") && parts.host.endsWith("]") ? parts.host.slice(1, -1) : parts.host;
|
|
430
430
|
const host2 = isIPv6(bareHost) ? `[${bareHost}]` : bareHost;
|
|
431
|
-
const
|
|
431
|
+
const protocol = parts.tls ? "rediss" : "redis";
|
|
432
|
+
const url = new URL(`${protocol}://${host2}:${String(parts.port)}/${String(parts.database)}`);
|
|
432
433
|
if (parts.username !== void 0) {
|
|
433
434
|
url.username = parts.username;
|
|
434
435
|
}
|
|
@@ -453,6 +454,11 @@ function resolveRedisConnection() {
|
|
|
453
454
|
const username = optionalNonEmptyEnv("REDIS_USERNAME");
|
|
454
455
|
const password = getEnv("REDIS_PASSWORD");
|
|
455
456
|
const passwordOrUndefined = password === void 0 || password === "" ? void 0 : password;
|
|
457
|
+
const tls = parseBoolean({
|
|
458
|
+
envKey: "REDIS_TLS_ENABLED",
|
|
459
|
+
raw: getEnv("REDIS_TLS_ENABLED"),
|
|
460
|
+
defaultValue: false
|
|
461
|
+
});
|
|
456
462
|
if (sentinelEnabled) {
|
|
457
463
|
const nodes = optionalNonEmptyEnv("REDIS_SENTINEL_NODES");
|
|
458
464
|
const masterName = optionalNonEmptyEnv("REDIS_SENTINEL_MASTER_NAME");
|
|
@@ -501,7 +507,8 @@ function resolveRedisConnection() {
|
|
|
501
507
|
port: port2,
|
|
502
508
|
database,
|
|
503
509
|
username,
|
|
504
|
-
password: passwordOrUndefined
|
|
510
|
+
password: passwordOrUndefined,
|
|
511
|
+
tls
|
|
505
512
|
})
|
|
506
513
|
};
|
|
507
514
|
}
|