fix(retry): address PR #15 code review feedback

- Re-export RETRY_BACKOFF_DELAYS and RETRY_JITTER_FACTOR from Defaults
  for backwards compatibility with existing imports
- Add 'as const' to RETRY_JITTER_FACTOR for type consistency
- Improve documentation explaining why values are hardcoded in retryConfigs
  (ESM initialization order issues with indirect circular imports)
This commit is contained in:
Claude
2026-01-20 14:34:47 +00:00
parent 890a80da48
commit baf9123d0c
2 changed files with 14 additions and 10 deletions
+3 -4
View File
@@ -169,7 +169,6 @@ export const DEFAULT_CACHE_MAX_KEYS = {
LID_GLOBAL: 10_000
}
// NOTE: RETRY_BACKOFF_DELAYS and RETRY_JITTER_FACTOR are defined in retry-utils.ts
// to avoid circular dependency and initialization order issues.
// Import from '@whiskeysockets/baileys' Utils if needed:
// import { getRetryDelayWithJitter, getAllRetryDelaysWithJitter } from './Utils/retry-utils'
// Re-export retry constants for backwards compatibility
// Actual definitions are in retry-utils.ts to avoid ESM initialization order issues
export { RETRY_BACKOFF_DELAYS, RETRY_JITTER_FACTOR } from '../Utils/retry-utils'