mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Dependency Inversion for Logger (#1153)
* feat: interface "ILogger" created feat: interface "ILogger" used instead of pino logger feat: "PinoLoggerAdapter" created to implement "ILogger" interface * feat: PinoLoggerAdapter removed feat: ILogger mapping the features we're using from pino * fix: sort imports --------- Co-authored-by: Mateus Franchini de Freitas <contato.mateusfr@outlook.com> Co-authored-by: Mateus Franchini de Freitas <mfranchini@domtec.com.br> Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
This commit is contained in:
committed by
GitHub
parent
447e648958
commit
21f8431e61
@@ -1,12 +1,12 @@
|
||||
import { Boom } from '@hapi/boom'
|
||||
import { AxiosRequestConfig } from 'axios'
|
||||
import type { Logger } from 'pino'
|
||||
import { proto } from '../../WAProto'
|
||||
import { BaileysEventEmitter, Chat, ChatModification, ChatMutation, ChatUpdate, Contact, InitialAppStateSyncOptions, LastMessageList, LTHashState, WAPatchCreate, WAPatchName } from '../Types'
|
||||
import { ChatLabelAssociation, LabelAssociationType, MessageLabelAssociation } from '../Types/LabelAssociation'
|
||||
import { BinaryNode, getBinaryNodeChild, getBinaryNodeChildren, isJidGroup, jidNormalizedUser } from '../WABinary'
|
||||
import { aesDecrypt, aesEncrypt, hkdf, hmacSign } from './crypto'
|
||||
import { toNumber } from './generics'
|
||||
import { ILogger } from './logger'
|
||||
import { LT_HASH_ANTI_TAMPERING } from './lt-hash'
|
||||
import { downloadContentFromMessage, } from './messages-media'
|
||||
|
||||
@@ -410,7 +410,7 @@ export const decodePatches = async(
|
||||
getAppStateSyncKey: FetchAppStateSyncKey,
|
||||
options: AxiosRequestConfig<{}>,
|
||||
minimumVersionNumber?: number,
|
||||
logger?: Logger,
|
||||
logger?: ILogger,
|
||||
validateMacs = true
|
||||
) => {
|
||||
const newState: LTHashState = {
|
||||
@@ -716,7 +716,7 @@ export const processSyncAction = (
|
||||
ev: BaileysEventEmitter,
|
||||
me: Contact,
|
||||
initialSyncOpts?: InitialAppStateSyncOptions,
|
||||
logger?: Logger,
|
||||
logger?: ILogger,
|
||||
) => {
|
||||
const isInitialSync = !!initialSyncOpts
|
||||
const accountSettings = initialSyncOpts?.accountSettings
|
||||
|
||||
Reference in New Issue
Block a user