38575fb2d8
The whatsapp-rust-bridge package contains a top-level await on an inline WASM binary, which propagates through the ESM graph and causes ERR_REQUIRE_ASYNC_MODULE when CJS consumers try to require() this package. Replace all static imports from whatsapp-rust-bridge with a lazy-loading bridge module (wasm-bridge.ts) that uses import().then() instead of top-level await, keeping the dependency out of the static ESM graph. https://claude.ai/code/session_01XaA7GwNaB6azTHFYQ8WEpB
51 lines
1.3 KiB
TypeScript
51 lines
1.3 KiB
TypeScript
export * from './generics'
|
|
export * from './decode-wa-message'
|
|
export * from './messages'
|
|
export * from './messages-media'
|
|
export * from './validate-connection'
|
|
export * from './crypto'
|
|
export * from './signal'
|
|
export * from './noise-handler'
|
|
export * from './history'
|
|
export * from './chat-utils'
|
|
export * from './lt-hash'
|
|
export { wasmBridgeReady } from './wasm-bridge'
|
|
export * from './auth-utils'
|
|
export * from './use-multi-file-auth-state'
|
|
export * from './link-preview'
|
|
export * from './event-buffer'
|
|
export * from './process-message'
|
|
export * from './message-retry-manager'
|
|
export * from './browser-utils'
|
|
|
|
// === Identity and Session Management ===
|
|
export * from './identity-change-handler'
|
|
|
|
// === Observability and Resilience Utilities ===
|
|
|
|
// Structured logging
|
|
export * from './structured-logger'
|
|
export * from './logger-adapter'
|
|
export * from './baileys-logger'
|
|
|
|
// Observability and tracing
|
|
export * from './trace-context'
|
|
export * from './prometheus-metrics'
|
|
|
|
// Resilience and performance
|
|
export * from './cache-utils'
|
|
export * from './circuit-breaker'
|
|
export * from './retry-utils'
|
|
|
|
// Telemetry and detection mitigation
|
|
export * from './unified-session'
|
|
|
|
// Version management
|
|
export * from './version-cache'
|
|
|
|
// Health monitoring
|
|
export * from './health-status'
|
|
|
|
// Event streaming
|
|
export * from './baileys-event-stream'
|