@xrystal/core 3.48.1 → 3.48.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/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function resolveMongoConnectOptions(e){if(!((e?.trim()??"").includes("tls=true")||process.env.MONGODB_SSL==="true"))return{};
|
|
1
|
+
export function resolveMongoConnectOptions(e){if(!((e?.trim()??"").includes("tls=true")||process.env.MONGODB_SSL==="true"))return{};const t=process.env.MONGODB_SSL_CA||process.env.KAFKA_SSL_CA||"/etc/tls/infra/ca.crt",s=process.env.MONGODB_SSL_PEM||"/etc/tls/infra/mongodb.pem";return{tls:!0,tlsCAFile:t,tlsCertificateKeyFile:s,tlsAllowInvalidHostnames:!0}}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
/** node-redis v5: tls must be true; ca/rejectUnauthorized at socket level / node-redis v5 TLS */
|
|
1
2
|
export type RedisSocketOptions = {
|
|
2
3
|
connectTimeout?: number;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
rejectUnauthorized?: boolean;
|
|
7
|
-
};
|
|
4
|
+
tls?: true | false;
|
|
5
|
+
ca?: string | string[];
|
|
6
|
+
rejectUnauthorized?: boolean;
|
|
8
7
|
};
|
|
9
8
|
/** rediss:// + private CA from REDIS_SSL_CA / KAFKA_SSL_CA / infra-tls mount / ozel CA */
|
|
10
9
|
export declare function resolveRedisSocketOptions(redisUri?: string | null): RedisSocketOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import q from"node:fs";export function resolveRedisSocketOptions(w){const j={connectTimeout:1e4
|
|
1
|
+
import q from"node:fs";export function resolveRedisSocketOptions(w){const j={connectTimeout:1e4};if(!((w?.trim()??"").startsWith("rediss://")||process.env.REDIS_SSL==="true"))return j;const k=process.env.REDIS_SSL_CA||process.env.KAFKA_SSL_CA||"/etc/tls/infra/ca.crt";try{if(k&&q.existsSync(k))return{...j,tls:!0,ca:[q.readFileSync(k,"utf-8")],rejectUnauthorized:!1}}catch{}return{...j,tls:!0,rejectUnauthorized:!1}}
|