chore: format everything

This commit is contained in:
canove
2025-05-06 12:10:19 -03:00
parent 04afa20244
commit fa706d0b50
76 changed files with 8241 additions and 7142 deletions

View File

@@ -17,14 +17,12 @@ export const WA_DEFAULT_EPHEMERAL = 7 * 24 * 60 * 60
export const NOISE_MODE = 'Noise_XX_25519_AESGCM_SHA256\0\0\0\0'
export const DICT_VERSION = 2
export const KEY_BUNDLE_TYPE = Buffer.from([5])
export const NOISE_WA_HEADER = Buffer.from(
[ 87, 65, 6, DICT_VERSION ]
) // last is "DICT_VERSION"
export const NOISE_WA_HEADER = Buffer.from([87, 65, 6, DICT_VERSION]) // last is "DICT_VERSION"
/** from: https://stackoverflow.com/questions/3809401/what-is-a-good-regular-expression-to-match-a-url */
export const URL_REGEX = /https:\/\/(?![^:@\/\s]+:[^:@\/\s]+@)[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}(:\d+)?(\/[^\s]*)?/g
export const WA_CERT_DETAILS = {
SERIAL: 0,
SERIAL: 0
}
export const PROCESSABLE_HISTORY_TYPES = [
@@ -32,7 +30,7 @@ export const PROCESSABLE_HISTORY_TYPES = [
proto.Message.HistorySyncNotification.HistorySyncType.PUSH_NAME,
proto.Message.HistorySyncNotification.HistorySyncType.RECENT,
proto.Message.HistorySyncNotification.HistorySyncType.FULL,
proto.Message.HistorySyncNotification.HistorySyncType.ON_DEMAND,
proto.Message.HistorySyncNotification.HistorySyncType.ON_DEMAND
]
export const DEFAULT_CONNECTION_CONFIG: SocketConfig = {
@@ -57,14 +55,14 @@ export const DEFAULT_CONNECTION_CONFIG: SocketConfig = {
linkPreviewImageThumbnailWidth: 192,
transactionOpts: { maxCommitRetries: 10, delayBetweenTriesMs: 3000 },
generateHighQualityLinkPreview: false,
options: { },
options: {},
appStateMacVerification: {
patch: false,
snapshot: false,
snapshot: false
},
countryCode: 'US',
getMessage: async() => undefined,
cachedGroupMetadata: async() => undefined,
getMessage: async () => undefined,
cachedGroupMetadata: async () => undefined,
makeSignalRepository: makeLibSignalRepository
}
@@ -77,19 +75,19 @@ export const MEDIA_PATH_MAP: { [T in MediaType]?: string } = {
'thumbnail-link': '/mms/image',
'product-catalog-image': '/product/image',
'md-app-state': '',
'md-msg-hist': '/mms/md-app-state',
'md-msg-hist': '/mms/md-app-state'
}
export const MEDIA_HKDF_KEY_MAPPING = {
'audio': 'Audio',
'document': 'Document',
'gif': 'Video',
'image': 'Image',
'ppic': '',
'product': 'Image',
'ptt': 'Audio',
'sticker': 'Image',
'video': 'Video',
audio: 'Audio',
document: 'Document',
gif: 'Video',
image: 'Image',
ppic: '',
product: 'Image',
ptt: 'Audio',
sticker: 'Image',
video: 'Video',
'thumbnail-document': 'Document Thumbnail',
'thumbnail-image': 'Image Thumbnail',
'thumbnail-video': 'Video Thumbnail',
@@ -98,7 +96,7 @@ export const MEDIA_HKDF_KEY_MAPPING = {
'md-app-state': 'App State',
'product-catalog-image': '',
'payment-bg-image': 'Payment Background',
'ptv': 'Video'
ptv: 'Video'
}
export const MEDIA_KEYS = Object.keys(MEDIA_PATH_MAP) as MediaType[]
@@ -111,5 +109,5 @@ export const DEFAULT_CACHE_TTLS = {
SIGNAL_STORE: 5 * 60, // 5 minutes
MSG_RETRY: 60 * 60, // 1 hour
CALL_OFFER: 5 * 60, // 5 minutes
USER_DEVICES: 5 * 60, // 5 minutes
USER_DEVICES: 5 * 60 // 5 minutes
}