MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / checkValkeyPassword

Function checkValkeyPassword

apps/api/src/config/env/validate.ts:739–771  ·  view source on GitHub ↗
(env: Env)

Source from the content-addressed store, hash-verified

737};
738
739const checkValkeyPassword = (env: Env): string[] => {
740 if (env.NODE_ENV !== "production" || env.VALKEY_PASSWORD !== "") {
741 return [];
742 }
743
744 const errors: string[] = [];
745
746 if (env.QUEUES_ENABLED) {
747 errors.push(
748 "VALKEY_PASSWORD required in production when QUEUES_ENABLED=true"
749 );
750 }
751
752 if (env.CACHE_ENABLED && env.CACHE_PROVIDER === "valkey") {
753 errors.push(
754 "VALKEY_PASSWORD required in production when CACHE_PROVIDER=valkey"
755 );
756 }
757
758 if (env.NOTIFICATIONS_SSE_ENABLED) {
759 errors.push(
760 "VALKEY_PASSWORD required in production when NOTIFICATIONS_SSE_ENABLED=true"
761 );
762 }
763
764 if (hasOAuthProvider(env)) {
765 errors.push(
766 "VALKEY_PASSWORD required in production when OAuth providers are configured"
767 );
768 }
769
770 return errors;
771};
772
773const checkWebPushVapid = (env: Env): string[] => {
774 const values = [

Callers 1

checkInvariantsFunction · 0.85

Calls 1

hasOAuthProviderFunction · 0.70

Tested by

no test coverage detected