valley-baileys 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -0
- package/node_modules/@borewit/text-codec/LICENSE.txt +9 -0
- package/node_modules/@borewit/text-codec/README.md +87 -0
- package/node_modules/@borewit/text-codec/lib/index.d.ts +6 -0
- package/node_modules/@borewit/text-codec/lib/index.js +380 -0
- package/node_modules/@borewit/text-codec/package.json +70 -0
- package/node_modules/@cacheable/memory/LICENSE +19 -0
- package/node_modules/@cacheable/memory/README.md +340 -0
- package/node_modules/@cacheable/memory/dist/index.cjs +830 -0
- package/node_modules/@cacheable/memory/dist/index.d.cts +310 -0
- package/node_modules/@cacheable/memory/dist/index.d.ts +310 -0
- package/node_modules/@cacheable/memory/dist/index.js +807 -0
- package/node_modules/@cacheable/memory/package.json +65 -0
- package/node_modules/@cacheable/node-cache/LICENSE +19 -0
- package/node_modules/@cacheable/node-cache/README.md +352 -0
- package/node_modules/@cacheable/node-cache/dist/index.cjs +567 -0
- package/node_modules/@cacheable/node-cache/dist/index.d.cts +335 -0
- package/node_modules/@cacheable/node-cache/dist/index.d.ts +335 -0
- package/node_modules/@cacheable/node-cache/dist/index.js +540 -0
- package/node_modules/@cacheable/node-cache/package.json +69 -0
- package/node_modules/@cacheable/utils/LICENSE +19 -0
- package/node_modules/@cacheable/utils/README.md +520 -0
- package/node_modules/@cacheable/utils/dist/index.cjs +677 -0
- package/node_modules/@cacheable/utils/dist/index.d.cts +307 -0
- package/node_modules/@cacheable/utils/dist/index.d.ts +307 -0
- package/node_modules/@cacheable/utils/dist/index.js +630 -0
- package/node_modules/@cacheable/utils/package.json +56 -0
- package/node_modules/@hapi/boom/LICENSE.md +10 -0
- package/node_modules/@hapi/boom/README.md +17 -0
- package/node_modules/@hapi/boom/lib/index.d.ts +549 -0
- package/node_modules/@hapi/boom/lib/index.js +469 -0
- package/node_modules/@hapi/boom/package.json +28 -0
- package/node_modules/@hapi/hoek/LICENSE.md +12 -0
- package/node_modules/@hapi/hoek/README.md +19 -0
- package/node_modules/@hapi/hoek/lib/applyToDefaults.js +102 -0
- package/node_modules/@hapi/hoek/lib/assert.js +22 -0
- package/node_modules/@hapi/hoek/lib/bench.js +29 -0
- package/node_modules/@hapi/hoek/lib/block.js +12 -0
- package/node_modules/@hapi/hoek/lib/clone.js +176 -0
- package/node_modules/@hapi/hoek/lib/contain.js +307 -0
- package/node_modules/@hapi/hoek/lib/deepEqual.js +317 -0
- package/node_modules/@hapi/hoek/lib/error.js +26 -0
- package/node_modules/@hapi/hoek/lib/escapeHeaderAttribute.js +16 -0
- package/node_modules/@hapi/hoek/lib/escapeHtml.js +87 -0
- package/node_modules/@hapi/hoek/lib/escapeJson.js +28 -0
- package/node_modules/@hapi/hoek/lib/escapeRegex.js +11 -0
- package/node_modules/@hapi/hoek/lib/flatten.js +20 -0
- package/node_modules/@hapi/hoek/lib/ignore.js +6 -0
- package/node_modules/@hapi/hoek/lib/index.d.ts +471 -0
- package/node_modules/@hapi/hoek/lib/index.js +45 -0
- package/node_modules/@hapi/hoek/lib/intersect.js +41 -0
- package/node_modules/@hapi/hoek/lib/isPromise.js +9 -0
- package/node_modules/@hapi/hoek/lib/merge.js +78 -0
- package/node_modules/@hapi/hoek/lib/once.js +25 -0
- package/node_modules/@hapi/hoek/lib/reach.js +76 -0
- package/node_modules/@hapi/hoek/lib/reachTemplate.js +16 -0
- package/node_modules/@hapi/hoek/lib/stringify.js +14 -0
- package/node_modules/@hapi/hoek/lib/types.js +55 -0
- package/node_modules/@hapi/hoek/lib/utils.js +9 -0
- package/node_modules/@hapi/hoek/lib/wait.js +37 -0
- package/node_modules/@hapi/hoek/package.json +31 -0
- package/node_modules/@keyv/bigmap/LICENSE +21 -0
- package/node_modules/@keyv/bigmap/README.md +624 -0
- package/node_modules/@keyv/bigmap/dist/index.cjs +268 -0
- package/node_modules/@keyv/bigmap/dist/index.d.cts +157 -0
- package/node_modules/@keyv/bigmap/dist/index.d.ts +157 -0
- package/node_modules/@keyv/bigmap/dist/index.js +239 -0
- package/node_modules/@keyv/bigmap/package.json +73 -0
- package/node_modules/@keyv/serialize/LICENSE +22 -0
- package/node_modules/@keyv/serialize/README.md +15 -0
- package/node_modules/@keyv/serialize/dist/index.cjs +84 -0
- package/node_modules/@keyv/serialize/dist/index.d.cts +4 -0
- package/node_modules/@keyv/serialize/dist/index.d.ts +4 -0
- package/node_modules/@keyv/serialize/dist/index.js +58 -0
- package/node_modules/@keyv/serialize/package.json +55 -0
- package/node_modules/@pinojs/redact/.github/dependabot.yml +13 -0
- package/node_modules/@pinojs/redact/.github/workflows/ci.yml +48 -0
- package/node_modules/@pinojs/redact/.github/workflows/publish-release.yml +43 -0
- package/node_modules/@pinojs/redact/LICENSE +21 -0
- package/node_modules/@pinojs/redact/README.md +350 -0
- package/node_modules/@pinojs/redact/benchmarks/basic.js +184 -0
- package/node_modules/@pinojs/redact/eslint.config.js +1 -0
- package/node_modules/@pinojs/redact/index.d.ts +52 -0
- package/node_modules/@pinojs/redact/index.js +529 -0
- package/node_modules/@pinojs/redact/index.test-d.ts +22 -0
- package/node_modules/@pinojs/redact/package.json +37 -0
- package/node_modules/@pinojs/redact/scripts/sync-version.mjs +20 -0
- package/node_modules/@pinojs/redact/test/actual-redact-comparison.test.js +211 -0
- package/node_modules/@pinojs/redact/test/index.test.js +824 -0
- package/node_modules/@pinojs/redact/test/integration.test.js +390 -0
- package/node_modules/@pinojs/redact/test/multiple-wildcards.test.js +227 -0
- package/node_modules/@pinojs/redact/test/prototype-pollution.test.js +223 -0
- package/node_modules/@pinojs/redact/test/selective-clone.test.js +115 -0
- package/node_modules/@pinojs/redact/tsconfig.json +19 -0
- package/node_modules/@protobufjs/aspromise/LICENSE +26 -0
- package/node_modules/@protobufjs/aspromise/README.md +13 -0
- package/node_modules/@protobufjs/aspromise/index.d.ts +13 -0
- package/node_modules/@protobufjs/aspromise/index.js +52 -0
- package/node_modules/@protobufjs/aspromise/package.json +21 -0
- package/node_modules/@protobufjs/aspromise/tests/index.js +130 -0
- package/node_modules/@protobufjs/base64/LICENSE +26 -0
- package/node_modules/@protobufjs/base64/README.md +19 -0
- package/node_modules/@protobufjs/base64/index.d.ts +32 -0
- package/node_modules/@protobufjs/base64/index.js +139 -0
- package/node_modules/@protobufjs/base64/package.json +21 -0
- package/node_modules/@protobufjs/base64/tests/index.js +46 -0
- package/node_modules/@protobufjs/codegen/LICENSE +26 -0
- package/node_modules/@protobufjs/codegen/README.md +49 -0
- package/node_modules/@protobufjs/codegen/index.d.ts +31 -0
- package/node_modules/@protobufjs/codegen/index.js +112 -0
- package/node_modules/@protobufjs/codegen/package.json +13 -0
- package/node_modules/@protobufjs/codegen/tests/index.js +13 -0
- package/node_modules/@protobufjs/eventemitter/CHANGELOG.md +8 -0
- package/node_modules/@protobufjs/eventemitter/LICENSE +26 -0
- package/node_modules/@protobufjs/eventemitter/README.md +22 -0
- package/node_modules/@protobufjs/eventemitter/index.d.ts +45 -0
- package/node_modules/@protobufjs/eventemitter/index.js +86 -0
- package/node_modules/@protobufjs/eventemitter/package.json +21 -0
- package/node_modules/@protobufjs/eventemitter/tests/index.js +83 -0
- package/node_modules/@protobufjs/fetch/CHANGELOG.md +8 -0
- package/node_modules/@protobufjs/fetch/LICENSE +26 -0
- package/node_modules/@protobufjs/fetch/README.md +13 -0
- package/node_modules/@protobufjs/fetch/index.d.ts +56 -0
- package/node_modules/@protobufjs/fetch/index.js +112 -0
- package/node_modules/@protobufjs/fetch/package.json +27 -0
- package/node_modules/@protobufjs/fetch/tests/data/file.txt +1 -0
- package/node_modules/@protobufjs/fetch/tests/index.js +158 -0
- package/node_modules/@protobufjs/fetch/util/fs.js +11 -0
- package/node_modules/@protobufjs/float/LICENSE +26 -0
- package/node_modules/@protobufjs/float/README.md +102 -0
- package/node_modules/@protobufjs/float/bench/index.js +87 -0
- package/node_modules/@protobufjs/float/bench/suite.js +46 -0
- package/node_modules/@protobufjs/float/index.d.ts +83 -0
- package/node_modules/@protobufjs/float/index.js +335 -0
- package/node_modules/@protobufjs/float/package.json +26 -0
- package/node_modules/@protobufjs/float/tests/index.js +100 -0
- package/node_modules/@protobufjs/path/LICENSE +26 -0
- package/node_modules/@protobufjs/path/README.md +19 -0
- package/node_modules/@protobufjs/path/index.d.ts +22 -0
- package/node_modules/@protobufjs/path/index.js +65 -0
- package/node_modules/@protobufjs/path/package.json +21 -0
- package/node_modules/@protobufjs/path/tests/index.js +60 -0
- package/node_modules/@protobufjs/pool/.npmignore +3 -0
- package/node_modules/@protobufjs/pool/LICENSE +26 -0
- package/node_modules/@protobufjs/pool/README.md +13 -0
- package/node_modules/@protobufjs/pool/index.d.ts +32 -0
- package/node_modules/@protobufjs/pool/index.js +48 -0
- package/node_modules/@protobufjs/pool/package.json +21 -0
- package/node_modules/@protobufjs/pool/tests/index.js +33 -0
- package/node_modules/@protobufjs/utf8/LICENSE +26 -0
- package/node_modules/@protobufjs/utf8/README.md +20 -0
- package/node_modules/@protobufjs/utf8/index.d.ts +24 -0
- package/node_modules/@protobufjs/utf8/index.js +104 -0
- package/node_modules/@protobufjs/utf8/package.json +21 -0
- package/node_modules/@protobufjs/utf8/tests/data/surrogate_pair_bug.txt +207 -0
- package/node_modules/@protobufjs/utf8/tests/data/utf8.txt +216 -0
- package/node_modules/@protobufjs/utf8/tests/index.js +74 -0
- package/node_modules/@tokenizer/inflate/LICENSE +15 -0
- package/node_modules/@tokenizer/inflate/README.md +114 -0
- package/node_modules/@tokenizer/inflate/lib/GzipHandler.d.ts +6 -0
- package/node_modules/@tokenizer/inflate/lib/GzipHandler.js +19 -0
- package/node_modules/@tokenizer/inflate/lib/ZipHandler.d.ts +26 -0
- package/node_modules/@tokenizer/inflate/lib/ZipHandler.js +233 -0
- package/node_modules/@tokenizer/inflate/lib/ZipToken.d.ts +94 -0
- package/node_modules/@tokenizer/inflate/lib/ZipToken.js +117 -0
- package/node_modules/@tokenizer/inflate/lib/index.d.ts +3 -0
- package/node_modules/@tokenizer/inflate/lib/index.js +2 -0
- package/node_modules/@tokenizer/inflate/package.json +76 -0
- package/node_modules/@tokenizer/token/README.md +19 -0
- package/node_modules/@tokenizer/token/index.d.ts +30 -0
- package/node_modules/@tokenizer/token/package.json +33 -0
- package/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@types/node/README.md +15 -0
- package/node_modules/@types/node/assert/strict.d.ts +68 -0
- package/node_modules/@types/node/assert.d.ts +1077 -0
- package/node_modules/@types/node/async_hooks.d.ts +711 -0
- package/node_modules/@types/node/buffer.buffer.d.ts +466 -0
- package/node_modules/@types/node/buffer.d.ts +1760 -0
- package/node_modules/@types/node/child_process.d.ts +1362 -0
- package/node_modules/@types/node/cluster.d.ts +432 -0
- package/node_modules/@types/node/console.d.ts +93 -0
- package/node_modules/@types/node/constants.d.ts +14 -0
- package/node_modules/@types/node/crypto.d.ts +3941 -0
- package/node_modules/@types/node/dgram.d.ts +537 -0
- package/node_modules/@types/node/diagnostics_channel.d.ts +563 -0
- package/node_modules/@types/node/dns/promises.d.ts +497 -0
- package/node_modules/@types/node/dns.d.ts +876 -0
- package/node_modules/@types/node/domain.d.ts +150 -0
- package/node_modules/@types/node/events.d.ts +1008 -0
- package/node_modules/@types/node/fs/promises.d.ts +1468 -0
- package/node_modules/@types/node/fs.d.ts +4771 -0
- package/node_modules/@types/node/globals.d.ts +150 -0
- package/node_modules/@types/node/globals.typedarray.d.ts +101 -0
- package/node_modules/@types/node/http.d.ts +2147 -0
- package/node_modules/@types/node/http2.d.ts +2489 -0
- package/node_modules/@types/node/https.d.ts +400 -0
- package/node_modules/@types/node/index.d.ts +114 -0
- package/node_modules/@types/node/inspector/promises.d.ts +35 -0
- package/node_modules/@types/node/inspector.d.ts +264 -0
- package/node_modules/@types/node/inspector.generated.d.ts +4406 -0
- package/node_modules/@types/node/module.d.ts +726 -0
- package/node_modules/@types/node/net.d.ts +970 -0
- package/node_modules/@types/node/os.d.ts +498 -0
- package/node_modules/@types/node/package.json +155 -0
- package/node_modules/@types/node/path/posix.d.ts +8 -0
- package/node_modules/@types/node/path/win32.d.ts +8 -0
- package/node_modules/@types/node/path.d.ts +178 -0
- package/node_modules/@types/node/perf_hooks.d.ts +604 -0
- package/node_modules/@types/node/process.d.ts +2204 -0
- package/node_modules/@types/node/punycode.d.ts +89 -0
- package/node_modules/@types/node/querystring.d.ts +139 -0
- package/node_modules/@types/node/quic.d.ts +897 -0
- package/node_modules/@types/node/readline/promises.d.ts +158 -0
- package/node_modules/@types/node/readline.d.ts +508 -0
- package/node_modules/@types/node/repl.d.ts +420 -0
- package/node_modules/@types/node/sea.d.ts +47 -0
- package/node_modules/@types/node/sqlite.d.ts +1068 -0
- package/node_modules/@types/node/stream/consumers.d.ts +114 -0
- package/node_modules/@types/node/stream/iter.d.ts +301 -0
- package/node_modules/@types/node/stream/promises.d.ts +211 -0
- package/node_modules/@types/node/stream/web.d.ts +300 -0
- package/node_modules/@types/node/stream.d.ts +1774 -0
- package/node_modules/@types/node/string_decoder.d.ts +27 -0
- package/node_modules/@types/node/test/reporters.d.ts +59 -0
- package/node_modules/@types/node/test.d.ts +2279 -0
- package/node_modules/@types/node/timers/promises.d.ts +93 -0
- package/node_modules/@types/node/timers.d.ts +149 -0
- package/node_modules/@types/node/tls.d.ts +1193 -0
- package/node_modules/@types/node/trace_events.d.ts +103 -0
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +462 -0
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +116 -0
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +116 -0
- package/node_modules/@types/node/tty.d.ts +225 -0
- package/node_modules/@types/node/url.d.ts +556 -0
- package/node_modules/@types/node/util/types.d.ts +558 -0
- package/node_modules/@types/node/util.d.ts +1660 -0
- package/node_modules/@types/node/v8.d.ts +980 -0
- package/node_modules/@types/node/vm.d.ts +1136 -0
- package/node_modules/@types/node/wasi.d.ts +131 -0
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +59 -0
- package/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
- package/node_modules/@types/node/web-globals/domexception.d.ts +83 -0
- package/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/node_modules/@types/node/web-globals/events.d.ts +106 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +69 -0
- package/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- package/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/node_modules/@types/node/web-globals/streams.d.ts +115 -0
- package/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/node_modules/@types/node/worker_threads.d.ts +668 -0
- package/node_modules/@types/node/zlib/iter.d.ts +131 -0
- package/node_modules/@types/node/zlib.d.ts +589 -0
- package/node_modules/@whiskeysockets/baileys/LICENSE +21 -0
- package/node_modules/@whiskeysockets/baileys/README.md +1312 -0
- package/node_modules/@whiskeysockets/baileys/WAProto/GenerateStatics.sh +3 -0
- package/node_modules/@whiskeysockets/baileys/WAProto/WAProto.proto +5479 -0
- package/node_modules/@whiskeysockets/baileys/WAProto/fix-imports.js +85 -0
- package/node_modules/@whiskeysockets/baileys/WAProto/index.d.ts +14017 -0
- package/node_modules/@whiskeysockets/baileys/WAProto/index.js +97691 -0
- package/node_modules/@whiskeysockets/baileys/engine-requirements.js +10 -0
- package/node_modules/@whiskeysockets/baileys/lib/Defaults/index.d.ts +75 -0
- package/node_modules/@whiskeysockets/baileys/lib/Defaults/index.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Defaults/index.js +129 -0
- package/node_modules/@whiskeysockets/baileys/lib/Defaults/index.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/ciphertext-message.d.ts +10 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/ciphertext-message.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/ciphertext-message.js +12 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/ciphertext-message.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/group-session-builder.d.ts +15 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/group-session-builder.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/group-session-builder.js +30 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/group-session-builder.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/group_cipher.d.ts +17 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/group_cipher.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/group_cipher.js +82 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/group_cipher.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/index.d.ts +12 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/index.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/index.js +12 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/index.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/keyhelper.d.ts +11 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/keyhelper.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/keyhelper.js +18 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/keyhelper.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-chain-key.d.ts +14 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-chain-key.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-chain-key.js +26 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-chain-key.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-key-distribution-message.d.ts +17 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-key-distribution-message.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-key-distribution-message.js +63 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-key-distribution-message.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-key-message.d.ts +19 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-key-message.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-key-message.js +66 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-key-message.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-key-name.d.ts +18 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-key-name.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-key-name.js +48 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-key-name.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-key-record.d.ts +31 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-key-record.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-key-record.js +41 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-key-record.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-key-state.d.ts +39 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-key-state.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-key-state.js +84 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-key-state.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-message-key.d.ts +12 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-message-key.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-message-key.js +26 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/Group/sender-message-key.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/libsignal.d.ts +5 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/libsignal.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/libsignal.js +431 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/libsignal.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/lid-mapping.d.ts +23 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/lid-mapping.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/lid-mapping.js +277 -0
- package/node_modules/@whiskeysockets/baileys/lib/Signal/lid-mapping.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/Client/index.d.ts +3 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/Client/index.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/Client/index.js +3 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/Client/index.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/Client/types.d.ts +16 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/Client/types.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/Client/types.js +11 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/Client/types.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/Client/websocket.d.ts +13 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/Client/websocket.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/Client/websocket.js +54 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/Client/websocket.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/business.d.ts +217 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/business.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/business.js +379 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/business.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/chats.d.ts +124 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/chats.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/chats.js +1193 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/chats.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/communities.d.ts +273 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/communities.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/communities.js +431 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/communities.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/groups.d.ts +161 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/groups.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/groups.js +347 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/groups.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/index.d.ts +260 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/index.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/index.js +13 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/index.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/messages-recv.d.ts +203 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/messages-recv.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/messages-recv.js +1772 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/messages-recv.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.d.ts +199 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js +1145 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/mex.d.ts +3 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/mex.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/mex.js +42 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/mex.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/newsletter.d.ts +170 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/newsletter.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/newsletter.js +181 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/newsletter.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/socket.d.ts +59 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/socket.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js +967 -0
- package/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Auth.d.ts +117 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Auth.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Auth.js +2 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Auth.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Bussines.d.ts +25 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Bussines.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Bussines.js +2 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Bussines.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Call.d.ts +15 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Call.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Call.js +2 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Call.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Chat.d.ts +124 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Chat.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Chat.js +8 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Chat.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Contact.d.ts +26 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Contact.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Contact.js +2 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Contact.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Events.d.ts +256 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Events.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Events.js +2 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Events.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/GroupMetadata.d.ts +71 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/GroupMetadata.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/GroupMetadata.js +2 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/GroupMetadata.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Label.d.ts +47 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Label.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Label.js +25 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Label.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/LabelAssociation.d.ts +30 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/LabelAssociation.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/LabelAssociation.js +7 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/LabelAssociation.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Message.d.ts +320 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Message.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Message.js +11 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Message.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Mex.d.ts +141 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Mex.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Mex.js +37 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Mex.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Product.d.ts +79 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Product.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Product.js +2 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Product.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Signal.d.ts +87 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Signal.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Signal.js +2 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Signal.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Socket.d.ts +136 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Socket.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Socket.js +3 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/Socket.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/State.d.ts +97 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/State.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/State.js +56 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/State.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/USync.d.ts +26 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/USync.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/USync.js +2 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/USync.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/index.d.ts +65 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/index.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/index.js +26 -0
- package/node_modules/@whiskeysockets/baileys/lib/Types/index.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/auth-utils.d.ts +24 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/auth-utils.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/auth-utils.js +302 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/auth-utils.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/browser-utils.d.ts +4 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/browser-utils.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/browser-utils.js +28 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/browser-utils.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/business.d.ts +23 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/business.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/business.js +231 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/business.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/chat-utils.d.ts +100 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/chat-utils.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/chat-utils.js +872 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/chat-utils.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/companion-reg-client-utils.d.ts +17 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/companion-reg-client-utils.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/companion-reg-client-utils.js +35 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/companion-reg-client-utils.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/crypto.d.ts +37 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/crypto.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/crypto.js +118 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/crypto.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/decode-wa-message.d.ts +66 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/decode-wa-message.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/decode-wa-message.js +317 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/decode-wa-message.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/event-buffer.d.ts +36 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/event-buffer.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/event-buffer.js +622 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/event-buffer.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/generics.d.ts +91 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/generics.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/generics.js +393 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/generics.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/history.d.ts +24 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/history.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/history.js +134 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/history.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/identity-change-handler.d.ts +44 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/identity-change-handler.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/identity-change-handler.js +50 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/identity-change-handler.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/index.d.ts +22 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/index.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/index.js +22 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/index.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/link-preview.d.ts +21 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/link-preview.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/link-preview.js +85 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/link-preview.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/logger.d.ts +12 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/logger.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/logger.js +3 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/logger.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/lt-hash.d.ts +8 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/lt-hash.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/lt-hash.js +8 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/lt-hash.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/make-mutex.d.ts +9 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/make-mutex.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/make-mutex.js +33 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/make-mutex.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/message-retry-manager.d.ts +115 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/message-retry-manager.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/message-retry-manager.js +265 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/message-retry-manager.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/messages-media.d.ts +133 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/messages-media.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/messages-media.js +788 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/messages-media.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/messages.d.ts +91 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/messages.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/messages.js +893 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/messages.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/noise-handler.d.ts +20 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/noise-handler.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/noise-handler.js +201 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/noise-handler.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/offline-node-processor.d.ts +17 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/offline-node-processor.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/offline-node-processor.js +40 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/offline-node-processor.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/pre-key-manager.d.ts +28 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/pre-key-manager.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/pre-key-manager.js +106 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/pre-key-manager.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/process-message.d.ts +60 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/process-message.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/process-message.js +630 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/process-message.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/reporting-utils.d.ts +11 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/reporting-utils.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/reporting-utils.js +258 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/reporting-utils.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/signal.d.ts +47 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/signal.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/signal.js +201 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/signal.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/stanza-ack.d.ts +11 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/stanza-ack.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/stanza-ack.js +38 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/stanza-ack.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/sync-action-utils.d.ts +19 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/sync-action-utils.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/sync-action-utils.js +49 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/sync-action-utils.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/tc-token-utils.d.ts +37 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/tc-token-utils.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/tc-token-utils.js +163 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/tc-token-utils.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/use-multi-file-auth-state.d.ts +13 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/use-multi-file-auth-state.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/use-multi-file-auth-state.js +121 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/use-multi-file-auth-state.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/validate-connection.d.ts +11 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/validate-connection.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/validate-connection.js +203 -0
- package/node_modules/@whiskeysockets/baileys/lib/Utils/validate-connection.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/constants.d.ts +28 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/constants.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/constants.js +1301 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/constants.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/decode.d.ts +7 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/decode.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/decode.js +262 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/decode.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/encode.d.ts +3 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/encode.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/encode.js +220 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/encode.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/generic-utils.d.ts +15 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/generic-utils.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/generic-utils.js +113 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/generic-utils.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/index.d.ts +6 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/index.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/index.js +6 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/index.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/jid-utils.d.ts +48 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/jid-utils.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/jid-utils.js +96 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/jid-utils.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/types.d.ts +19 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/types.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/types.js +2 -0
- package/node_modules/@whiskeysockets/baileys/lib/WABinary/types.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAM/BinaryInfo.d.ts +9 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAM/BinaryInfo.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAM/BinaryInfo.js +10 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAM/BinaryInfo.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAM/constants.d.ts +40 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAM/constants.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAM/constants.js +22853 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAM/constants.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAM/encode.d.ts +3 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAM/encode.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAM/encode.js +150 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAM/encode.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAM/index.d.ts +4 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAM/index.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAM/index.js +4 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAM/index.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +10 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/USyncContactProtocol.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/USyncContactProtocol.js +52 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/USyncContactProtocol.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +23 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/USyncDeviceProtocol.js +54 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/USyncDeviceProtocol.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +13 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +27 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +13 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/USyncStatusProtocol.js +38 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/USyncStatusProtocol.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +10 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/USyncUsernameProtocol.js +25 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/USyncUsernameProtocol.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +26 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +51 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +10 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/UsyncLIDProtocol.js +29 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/UsyncLIDProtocol.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/index.d.ts +6 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/index.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/index.js +6 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/Protocols/index.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/USyncQuery.d.ts +30 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/USyncQuery.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/USyncQuery.js +98 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/USyncQuery.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/USyncUser.d.ts +17 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/USyncUser.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/USyncUser.js +31 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/USyncUser.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/index.d.ts +4 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/index.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/index.js +4 -0
- package/node_modules/@whiskeysockets/baileys/lib/WAUSync/index.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/index.d.ts +12 -0
- package/node_modules/@whiskeysockets/baileys/lib/index.d.ts.map +1 -0
- package/node_modules/@whiskeysockets/baileys/lib/index.js +11 -0
- package/node_modules/@whiskeysockets/baileys/lib/index.js.map +1 -0
- package/node_modules/@whiskeysockets/baileys/package.json +139 -0
- package/node_modules/async-mutex/LICENSE +21 -0
- package/node_modules/async-mutex/README.md +540 -0
- package/node_modules/async-mutex/es6/Mutex.js +41 -0
- package/node_modules/async-mutex/es6/MutexInterface.js +1 -0
- package/node_modules/async-mutex/es6/Semaphore.js +153 -0
- package/node_modules/async-mutex/es6/SemaphoreInterface.js +1 -0
- package/node_modules/async-mutex/es6/errors.js +3 -0
- package/node_modules/async-mutex/es6/index.js +5 -0
- package/node_modules/async-mutex/es6/tryAcquire.js +8 -0
- package/node_modules/async-mutex/es6/withTimeout.js +124 -0
- package/node_modules/async-mutex/index.mjs +291 -0
- package/node_modules/async-mutex/lib/Mutex.d.ts +12 -0
- package/node_modules/async-mutex/lib/Mutex.js +43 -0
- package/node_modules/async-mutex/lib/MutexInterface.d.ts +17 -0
- package/node_modules/async-mutex/lib/MutexInterface.js +2 -0
- package/node_modules/async-mutex/lib/Semaphore.d.ts +22 -0
- package/node_modules/async-mutex/lib/Semaphore.js +155 -0
- package/node_modules/async-mutex/lib/SemaphoreInterface.d.ts +19 -0
- package/node_modules/async-mutex/lib/SemaphoreInterface.js +2 -0
- package/node_modules/async-mutex/lib/errors.d.ts +3 -0
- package/node_modules/async-mutex/lib/errors.js +6 -0
- package/node_modules/async-mutex/lib/index.d.ts +7 -0
- package/node_modules/async-mutex/lib/index.js +13 -0
- package/node_modules/async-mutex/lib/tryAcquire.d.ts +4 -0
- package/node_modules/async-mutex/lib/tryAcquire.js +12 -0
- package/node_modules/async-mutex/lib/withTimeout.d.ts +4 -0
- package/node_modules/async-mutex/lib/withTimeout.js +128 -0
- package/node_modules/async-mutex/package.json +88 -0
- package/node_modules/atomic-sleep/.travis.yml +11 -0
- package/node_modules/atomic-sleep/LICENSE +22 -0
- package/node_modules/atomic-sleep/index.js +38 -0
- package/node_modules/atomic-sleep/package.json +37 -0
- package/node_modules/atomic-sleep/readme.md +58 -0
- package/node_modules/atomic-sleep/test.js +47 -0
- package/node_modules/cacheable/LICENSE +19 -0
- package/node_modules/cacheable/README.md +846 -0
- package/node_modules/cacheable/dist/index.cjs +1157 -0
- package/node_modules/cacheable/dist/index.d.cts +494 -0
- package/node_modules/cacheable/dist/index.d.ts +494 -0
- package/node_modules/cacheable/dist/index.js +1141 -0
- package/node_modules/cacheable/package.json +81 -0
- package/node_modules/content-type/LICENSE +22 -0
- package/node_modules/content-type/README.md +69 -0
- package/node_modules/content-type/dist/index.d.ts +26 -0
- package/node_modules/content-type/dist/index.js +170 -0
- package/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/content-type/package.json +52 -0
- package/node_modules/curve25519-js/.prettierrc +6 -0
- package/node_modules/curve25519-js/LICENSE +19 -0
- package/node_modules/curve25519-js/README.md +111 -0
- package/node_modules/curve25519-js/lib/index.d.ts +69 -0
- package/node_modules/curve25519-js/lib/index.js +1669 -0
- package/node_modules/curve25519-js/package.json +34 -0
- package/node_modules/curve25519-js/tsconfig.json +20 -0
- package/node_modules/curve25519-js/tslint.json +10 -0
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/README.md +481 -0
- package/node_modules/debug/package.json +64 -0
- package/node_modules/debug/src/browser.js +272 -0
- package/node_modules/debug/src/common.js +292 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/eventemitter3/LICENSE +21 -0
- package/node_modules/eventemitter3/README.md +85 -0
- package/node_modules/eventemitter3/dist/eventemitter3.esm.js +355 -0
- package/node_modules/eventemitter3/dist/eventemitter3.esm.min.js +1 -0
- package/node_modules/eventemitter3/dist/eventemitter3.esm.min.js.map +1 -0
- package/node_modules/eventemitter3/dist/eventemitter3.umd.js +363 -0
- package/node_modules/eventemitter3/dist/eventemitter3.umd.min.js +1 -0
- package/node_modules/eventemitter3/dist/eventemitter3.umd.min.js.map +1 -0
- package/node_modules/eventemitter3/index.d.ts +135 -0
- package/node_modules/eventemitter3/index.js +336 -0
- package/node_modules/eventemitter3/index.mjs +4 -0
- package/node_modules/eventemitter3/package.json +62 -0
- package/node_modules/file-type/core.d.ts +253 -0
- package/node_modules/file-type/core.js +2899 -0
- package/node_modules/file-type/index.d.ts +98 -0
- package/node_modules/file-type/index.js +163 -0
- package/node_modules/file-type/license +9 -0
- package/node_modules/file-type/package.json +290 -0
- package/node_modules/file-type/readme.md +667 -0
- package/node_modules/file-type/supported.js +360 -0
- package/node_modules/file-type/util.js +60 -0
- package/node_modules/hashery/LICENSE +21 -0
- package/node_modules/hashery/README.md +1373 -0
- package/node_modules/hashery/dist/browser/index.global.js +8 -0
- package/node_modules/hashery/dist/browser/index.global.js.map +1 -0
- package/node_modules/hashery/dist/browser/index.js +3 -0
- package/node_modules/hashery/dist/browser/index.js.map +1 -0
- package/node_modules/hashery/dist/node/index.cjs +989 -0
- package/node_modules/hashery/dist/node/index.d.cts +935 -0
- package/node_modules/hashery/dist/node/index.d.ts +935 -0
- package/node_modules/hashery/dist/node/index.js +957 -0
- package/node_modules/hashery/package.json +92 -0
- package/node_modules/hookified/LICENSE +19 -0
- package/node_modules/hookified/README.md +1424 -0
- package/node_modules/hookified/dist/browser/index.global.js +693 -0
- package/node_modules/hookified/dist/browser/index.global.js.map +1 -0
- package/node_modules/hookified/dist/browser/index.js +694 -0
- package/node_modules/hookified/dist/browser/index.js.map +1 -0
- package/node_modules/hookified/dist/node/index.cjs +717 -0
- package/node_modules/hookified/dist/node/index.d.cts +543 -0
- package/node_modules/hookified/dist/node/index.d.ts +543 -0
- package/node_modules/hookified/dist/node/index.js +689 -0
- package/node_modules/hookified/package.json +92 -0
- package/node_modules/ieee754/LICENSE +11 -0
- package/node_modules/ieee754/README.md +51 -0
- package/node_modules/ieee754/index.d.ts +10 -0
- package/node_modules/ieee754/index.js +85 -0
- package/node_modules/ieee754/package.json +52 -0
- package/node_modules/keyv/LICENSE +22 -0
- package/node_modules/keyv/README.md +828 -0
- package/node_modules/keyv/dist/index.cjs +990 -0
- package/node_modules/keyv/dist/index.d.cts +378 -0
- package/node_modules/keyv/dist/index.d.ts +378 -0
- package/node_modules/keyv/dist/index.js +964 -0
- package/node_modules/keyv/package.json +88 -0
- package/node_modules/libsignal/LICENSE +621 -0
- package/node_modules/libsignal/README.md +64 -0
- package/node_modules/libsignal/index.d.ts +55 -0
- package/node_modules/libsignal/index.js +10 -0
- package/node_modules/libsignal/package.json +34 -0
- package/node_modules/libsignal/src/.eslintrc.json +31 -0
- package/node_modules/libsignal/src/WhisperTextProtocol.js +933 -0
- package/node_modules/libsignal/src/base_key_type.js +7 -0
- package/node_modules/libsignal/src/chain_type.js +6 -0
- package/node_modules/libsignal/src/crypto.d.ts +19 -0
- package/node_modules/libsignal/src/crypto.js +98 -0
- package/node_modules/libsignal/src/curve.d.ts +22 -0
- package/node_modules/libsignal/src/curve.js +142 -0
- package/node_modules/libsignal/src/errors.js +33 -0
- package/node_modules/libsignal/src/keyhelper.js +45 -0
- package/node_modules/libsignal/src/numeric_fingerprint.js +72 -0
- package/node_modules/libsignal/src/protobufs.js +10 -0
- package/node_modules/libsignal/src/protocol_address.js +40 -0
- package/node_modules/libsignal/src/queue_job.js +69 -0
- package/node_modules/libsignal/src/session_builder.js +164 -0
- package/node_modules/libsignal/src/session_cipher.js +336 -0
- package/node_modules/libsignal/src/session_record.js +316 -0
- package/node_modules/long/LICENSE +202 -0
- package/node_modules/long/README.md +286 -0
- package/node_modules/long/index.d.ts +2 -0
- package/node_modules/long/index.js +1581 -0
- package/node_modules/long/package.json +58 -0
- package/node_modules/long/types.d.ts +474 -0
- package/node_modules/long/umd/index.d.ts +3 -0
- package/node_modules/long/umd/index.js +1622 -0
- package/node_modules/long/umd/package.json +3 -0
- package/node_modules/long/umd/types.d.ts +474 -0
- package/node_modules/lru-cache/LICENSE.md +55 -0
- package/node_modules/lru-cache/README.md +469 -0
- package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.js +7 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.js +1726 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.min.js +2 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +7 -0
- package/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/browser/perf.js +10 -0
- package/node_modules/lru-cache/dist/commonjs/browser/perf.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.cjs.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.d.cts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +7 -0
- package/node_modules/lru-cache/dist/commonjs/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/index.js +1726 -0
- package/node_modules/lru-cache/dist/commonjs/index.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
- package/node_modules/lru-cache/dist/commonjs/index.min.js.map +7 -0
- package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.js +9 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.js +1726 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.min.js +2 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +7 -0
- package/node_modules/lru-cache/dist/commonjs/node/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/commonjs/node/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/node/perf.js +10 -0
- package/node_modules/lru-cache/dist/commonjs/node/perf.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/package.json +3 -0
- package/node_modules/lru-cache/dist/commonjs/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/commonjs/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/perf.js +10 -0
- package/node_modules/lru-cache/dist/commonjs/perf.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.js +4 -0
- package/node_modules/lru-cache/dist/esm/browser/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/browser/index.js +1722 -0
- package/node_modules/lru-cache/dist/esm/browser/index.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/browser/index.min.js +2 -0
- package/node_modules/lru-cache/dist/esm/browser/index.min.js.map +7 -0
- package/node_modules/lru-cache/dist/esm/browser/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/esm/browser/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/browser/perf.js +7 -0
- package/node_modules/lru-cache/dist/esm/browser/perf.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.d.mts.map +1 -0
- package/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.mjs.map +1 -0
- package/node_modules/lru-cache/dist/esm/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/esm/diagnostics-channel.js +19 -0
- package/node_modules/lru-cache/dist/esm/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/index.js +1722 -0
- package/node_modules/lru-cache/dist/esm/index.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/index.min.js +2 -0
- package/node_modules/lru-cache/dist/esm/index.min.js.map +7 -0
- package/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/node/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +6 -0
- package/node_modules/lru-cache/dist/esm/node/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/esm/node/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/node/index.js +1722 -0
- package/node_modules/lru-cache/dist/esm/node/index.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/node/index.min.js +2 -0
- package/node_modules/lru-cache/dist/esm/node/index.min.js.map +7 -0
- package/node_modules/lru-cache/dist/esm/node/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/esm/node/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/node/perf.js +7 -0
- package/node_modules/lru-cache/dist/esm/node/perf.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/package.json +3 -0
- package/node_modules/lru-cache/dist/esm/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/esm/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/perf.js +7 -0
- package/node_modules/lru-cache/dist/esm/perf.js.map +1 -0
- package/node_modules/lru-cache/package.json +154 -0
- package/node_modules/media-typer/LICENSE +22 -0
- package/node_modules/media-typer/README.md +79 -0
- package/node_modules/media-typer/dist/index.d.ts +29 -0
- package/node_modules/media-typer/dist/index.js +64 -0
- package/node_modules/media-typer/dist/index.js.map +1 -0
- package/node_modules/media-typer/package.json +48 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/music-metadata/LICENSE.txt +9 -0
- package/node_modules/music-metadata/README.md +878 -0
- package/node_modules/music-metadata/lib/ParseError.d.ts +87 -0
- package/node_modules/music-metadata/lib/ParseError.js +38 -0
- package/node_modules/music-metadata/lib/ParserFactory.d.ts +44 -0
- package/node_modules/music-metadata/lib/ParserFactory.js +141 -0
- package/node_modules/music-metadata/lib/aiff/AiffLoader.d.ts +2 -0
- package/node_modules/music-metadata/lib/aiff/AiffLoader.js +8 -0
- package/node_modules/music-metadata/lib/aiff/AiffParser.d.ts +15 -0
- package/node_modules/music-metadata/lib/aiff/AiffParser.js +104 -0
- package/node_modules/music-metadata/lib/aiff/AiffTagMap.d.ts +4 -0
- package/node_modules/music-metadata/lib/aiff/AiffTagMap.js +15 -0
- package/node_modules/music-metadata/lib/aiff/AiffToken.d.ts +48 -0
- package/node_modules/music-metadata/lib/aiff/AiffToken.js +58 -0
- package/node_modules/music-metadata/lib/apev2/APEv2Parser.d.ts +46 -0
- package/node_modules/music-metadata/lib/apev2/APEv2Parser.js +176 -0
- package/node_modules/music-metadata/lib/apev2/APEv2TagMapper.d.ts +4 -0
- package/node_modules/music-metadata/lib/apev2/APEv2TagMapper.js +83 -0
- package/node_modules/music-metadata/lib/apev2/APEv2Token.d.ts +99 -0
- package/node_modules/music-metadata/lib/apev2/APEv2Token.js +116 -0
- package/node_modules/music-metadata/lib/apev2/Apev2Loader.d.ts +2 -0
- package/node_modules/music-metadata/lib/apev2/Apev2Loader.js +8 -0
- package/node_modules/music-metadata/lib/asf/AsfGuid.d.ts +83 -0
- package/node_modules/music-metadata/lib/asf/AsfGuid.js +109 -0
- package/node_modules/music-metadata/lib/asf/AsfLoader.d.ts +2 -0
- package/node_modules/music-metadata/lib/asf/AsfLoader.js +8 -0
- package/node_modules/music-metadata/lib/asf/AsfObject.d.ts +325 -0
- package/node_modules/music-metadata/lib/asf/AsfObject.js +347 -0
- package/node_modules/music-metadata/lib/asf/AsfParser.d.ts +17 -0
- package/node_modules/music-metadata/lib/asf/AsfParser.js +134 -0
- package/node_modules/music-metadata/lib/asf/AsfTagMapper.d.ts +7 -0
- package/node_modules/music-metadata/lib/asf/AsfTagMapper.js +92 -0
- package/node_modules/music-metadata/lib/asf/AsfUtil.d.ts +4 -0
- package/node_modules/music-metadata/lib/asf/AsfUtil.js +32 -0
- package/node_modules/music-metadata/lib/common/BasicParser.d.ts +17 -0
- package/node_modules/music-metadata/lib/common/BasicParser.js +13 -0
- package/node_modules/music-metadata/lib/common/CaseInsensitiveTagMap.d.ts +10 -0
- package/node_modules/music-metadata/lib/common/CaseInsensitiveTagMap.js +17 -0
- package/node_modules/music-metadata/lib/common/CombinedTagMapper.d.ts +19 -0
- package/node_modules/music-metadata/lib/common/CombinedTagMapper.js +50 -0
- package/node_modules/music-metadata/lib/common/FourCC.d.ts +6 -0
- package/node_modules/music-metadata/lib/common/FourCC.js +25 -0
- package/node_modules/music-metadata/lib/common/GenericTagMapper.d.ts +51 -0
- package/node_modules/music-metadata/lib/common/GenericTagMapper.js +51 -0
- package/node_modules/music-metadata/lib/common/GenericTagTypes.d.ts +34 -0
- package/node_modules/music-metadata/lib/common/GenericTagTypes.js +133 -0
- package/node_modules/music-metadata/lib/common/MetadataCollector.d.ts +86 -0
- package/node_modules/music-metadata/lib/common/MetadataCollector.js +307 -0
- package/node_modules/music-metadata/lib/common/Util.d.ts +56 -0
- package/node_modules/music-metadata/lib/common/Util.js +152 -0
- package/node_modules/music-metadata/lib/core.d.ts +75 -0
- package/node_modules/music-metadata/lib/core.js +126 -0
- package/node_modules/music-metadata/lib/dsdiff/DsdiffLoader.d.ts +2 -0
- package/node_modules/music-metadata/lib/dsdiff/DsdiffLoader.js +8 -0
- package/node_modules/music-metadata/lib/dsdiff/DsdiffParser.d.ts +29 -0
- package/node_modules/music-metadata/lib/dsdiff/DsdiffParser.js +154 -0
- package/node_modules/music-metadata/lib/dsdiff/DsdiffToken.d.ts +9 -0
- package/node_modules/music-metadata/lib/dsdiff/DsdiffToken.js +18 -0
- package/node_modules/music-metadata/lib/dsf/DsfChunk.d.ts +87 -0
- package/node_modules/music-metadata/lib/dsf/DsfChunk.js +50 -0
- package/node_modules/music-metadata/lib/dsf/DsfLoader.d.ts +2 -0
- package/node_modules/music-metadata/lib/dsf/DsfLoader.js +8 -0
- package/node_modules/music-metadata/lib/dsf/DsfParser.d.ts +24 -0
- package/node_modules/music-metadata/lib/dsf/DsfParser.js +57 -0
- package/node_modules/music-metadata/lib/ebml/EbmlIterator.d.ts +67 -0
- package/node_modules/music-metadata/lib/ebml/EbmlIterator.js +218 -0
- package/node_modules/music-metadata/lib/ebml/types.d.ts +37 -0
- package/node_modules/music-metadata/lib/ebml/types.js +8 -0
- package/node_modules/music-metadata/lib/flac/FlacLoader.d.ts +2 -0
- package/node_modules/music-metadata/lib/flac/FlacLoader.js +8 -0
- package/node_modules/music-metadata/lib/flac/FlacParser.d.ts +29 -0
- package/node_modules/music-metadata/lib/flac/FlacParser.js +125 -0
- package/node_modules/music-metadata/lib/flac/FlacToken.d.ts +45 -0
- package/node_modules/music-metadata/lib/flac/FlacToken.js +63 -0
- package/node_modules/music-metadata/lib/id3v1/ID3v1Parser.d.ts +17 -0
- package/node_modules/music-metadata/lib/id3v1/ID3v1Parser.js +137 -0
- package/node_modules/music-metadata/lib/id3v1/ID3v1TagMap.d.ts +4 -0
- package/node_modules/music-metadata/lib/id3v1/ID3v1TagMap.js +18 -0
- package/node_modules/music-metadata/lib/id3v2/AbstractID3Parser.d.ts +17 -0
- package/node_modules/music-metadata/lib/id3v2/AbstractID3Parser.js +56 -0
- package/node_modules/music-metadata/lib/id3v2/FrameHeader.d.ts +31 -0
- package/node_modules/music-metadata/lib/id3v2/FrameHeader.js +73 -0
- package/node_modules/music-metadata/lib/id3v2/FrameParser.d.ts +92 -0
- package/node_modules/music-metadata/lib/id3v2/FrameParser.js +470 -0
- package/node_modules/music-metadata/lib/id3v2/ID3v22TagMapper.d.ts +9 -0
- package/node_modules/music-metadata/lib/id3v2/ID3v22TagMapper.js +46 -0
- package/node_modules/music-metadata/lib/id3v2/ID3v24TagMapper.d.ts +14 -0
- package/node_modules/music-metadata/lib/id3v2/ID3v24TagMapper.js +195 -0
- package/node_modules/music-metadata/lib/id3v2/ID3v2ChapterToken.d.ts +11 -0
- package/node_modules/music-metadata/lib/id3v2/ID3v2ChapterToken.js +17 -0
- package/node_modules/music-metadata/lib/id3v2/ID3v2Parser.d.ts +33 -0
- package/node_modules/music-metadata/lib/id3v2/ID3v2Parser.js +169 -0
- package/node_modules/music-metadata/lib/id3v2/ID3v2Token.d.ts +111 -0
- package/node_modules/music-metadata/lib/id3v2/ID3v2Token.js +146 -0
- package/node_modules/music-metadata/lib/iff/index.d.ts +33 -0
- package/node_modules/music-metadata/lib/iff/index.js +16 -0
- package/node_modules/music-metadata/lib/index.d.ts +22 -0
- package/node_modules/music-metadata/lib/index.js +53 -0
- package/node_modules/music-metadata/lib/lrc/LyricsParser.d.ts +9 -0
- package/node_modules/music-metadata/lib/lrc/LyricsParser.js +45 -0
- package/node_modules/music-metadata/lib/lyrics3/Lyrics3.d.ts +3 -0
- package/node_modules/music-metadata/lib/lyrics3/Lyrics3.js +17 -0
- package/node_modules/music-metadata/lib/matroska/MatroskaDtd.d.ts +8 -0
- package/node_modules/music-metadata/lib/matroska/MatroskaDtd.js +283 -0
- package/node_modules/music-metadata/lib/matroska/MatroskaLoader.d.ts +2 -0
- package/node_modules/music-metadata/lib/matroska/MatroskaLoader.js +8 -0
- package/node_modules/music-metadata/lib/matroska/MatroskaParser.d.ts +19 -0
- package/node_modules/music-metadata/lib/matroska/MatroskaParser.js +143 -0
- package/node_modules/music-metadata/lib/matroska/MatroskaTagMapper.d.ts +4 -0
- package/node_modules/music-metadata/lib/matroska/MatroskaTagMapper.js +32 -0
- package/node_modules/music-metadata/lib/matroska/types.d.ts +142 -0
- package/node_modules/music-metadata/lib/matroska/types.js +27 -0
- package/node_modules/music-metadata/lib/mp4/Atom.d.ts +16 -0
- package/node_modules/music-metadata/lib/mp4/Atom.js +65 -0
- package/node_modules/music-metadata/lib/mp4/AtomToken.d.ts +487 -0
- package/node_modules/music-metadata/lib/mp4/AtomToken.js +576 -0
- package/node_modules/music-metadata/lib/mp4/MP4Parser.d.ts +32 -0
- package/node_modules/music-metadata/lib/mp4/MP4Parser.js +647 -0
- package/node_modules/music-metadata/lib/mp4/MP4TagMapper.d.ts +8 -0
- package/node_modules/music-metadata/lib/mp4/MP4TagMapper.js +123 -0
- package/node_modules/music-metadata/lib/mp4/Mp4Loader.d.ts +2 -0
- package/node_modules/music-metadata/lib/mp4/Mp4Loader.js +8 -0
- package/node_modules/music-metadata/lib/mpeg/ExtendedLameHeader.d.ts +27 -0
- package/node_modules/music-metadata/lib/mpeg/ExtendedLameHeader.js +28 -0
- package/node_modules/music-metadata/lib/mpeg/MpegLoader.d.ts +2 -0
- package/node_modules/music-metadata/lib/mpeg/MpegLoader.js +8 -0
- package/node_modules/music-metadata/lib/mpeg/MpegParser.d.ts +62 -0
- package/node_modules/music-metadata/lib/mpeg/MpegParser.js +569 -0
- package/node_modules/music-metadata/lib/mpeg/ReplayGainDataFormat.d.ts +57 -0
- package/node_modules/music-metadata/lib/mpeg/ReplayGainDataFormat.js +64 -0
- package/node_modules/music-metadata/lib/mpeg/XingTag.d.ts +44 -0
- package/node_modules/music-metadata/lib/mpeg/XingTag.js +65 -0
- package/node_modules/music-metadata/lib/musepack/MusepackConentError.d.ts +15 -0
- package/node_modules/music-metadata/lib/musepack/MusepackConentError.js +3 -0
- package/node_modules/music-metadata/lib/musepack/MusepackLoader.d.ts +2 -0
- package/node_modules/music-metadata/lib/musepack/MusepackLoader.js +8 -0
- package/node_modules/music-metadata/lib/musepack/MusepackParser.d.ts +4 -0
- package/node_modules/music-metadata/lib/musepack/MusepackParser.js +30 -0
- package/node_modules/music-metadata/lib/musepack/sv7/BitReader.d.ts +13 -0
- package/node_modules/music-metadata/lib/musepack/sv7/BitReader.js +46 -0
- package/node_modules/music-metadata/lib/musepack/sv7/MpcSv7Parser.d.ts +8 -0
- package/node_modules/music-metadata/lib/musepack/sv7/MpcSv7Parser.js +47 -0
- package/node_modules/music-metadata/lib/musepack/sv7/StreamVersion7.d.ts +28 -0
- package/node_modules/music-metadata/lib/musepack/sv7/StreamVersion7.js +39 -0
- package/node_modules/music-metadata/lib/musepack/sv8/MpcSv8Parser.d.ts +6 -0
- package/node_modules/music-metadata/lib/musepack/sv8/MpcSv8Parser.js +56 -0
- package/node_modules/music-metadata/lib/musepack/sv8/StreamVersion8.d.ts +42 -0
- package/node_modules/music-metadata/lib/musepack/sv8/StreamVersion8.js +82 -0
- package/node_modules/music-metadata/lib/ogg/OggLoader.d.ts +2 -0
- package/node_modules/music-metadata/lib/ogg/OggLoader.js +8 -0
- package/node_modules/music-metadata/lib/ogg/OggParser.d.ts +27 -0
- package/node_modules/music-metadata/lib/ogg/OggParser.js +125 -0
- package/node_modules/music-metadata/lib/ogg/OggToken.d.ts +83 -0
- package/node_modules/music-metadata/lib/ogg/OggToken.js +41 -0
- package/node_modules/music-metadata/lib/ogg/flac/FlacStream.d.ts +29 -0
- package/node_modules/music-metadata/lib/ogg/flac/FlacStream.js +74 -0
- package/node_modules/music-metadata/lib/ogg/opus/Opus.d.ts +63 -0
- package/node_modules/music-metadata/lib/ogg/opus/Opus.js +27 -0
- package/node_modules/music-metadata/lib/ogg/opus/OpusStream.d.ts +24 -0
- package/node_modules/music-metadata/lib/ogg/opus/OpusStream.js +56 -0
- package/node_modules/music-metadata/lib/ogg/speex/Speex.d.ts +36 -0
- package/node_modules/music-metadata/lib/ogg/speex/Speex.js +28 -0
- package/node_modules/music-metadata/lib/ogg/speex/SpeexStream.d.ts +20 -0
- package/node_modules/music-metadata/lib/ogg/speex/SpeexStream.js +31 -0
- package/node_modules/music-metadata/lib/ogg/theora/Theora.d.ts +20 -0
- package/node_modules/music-metadata/lib/ogg/theora/Theora.js +20 -0
- package/node_modules/music-metadata/lib/ogg/theora/TheoraStream.d.ts +25 -0
- package/node_modules/music-metadata/lib/ogg/theora/TheoraStream.js +39 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/Vorbis.d.ts +68 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/Vorbis.js +83 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.d.ts +12 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.js +29 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.d.ts +53 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.js +136 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisTagMapper.d.ts +7 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisTagMapper.js +133 -0
- package/node_modules/music-metadata/lib/riff/RiffChunk.d.ts +16 -0
- package/node_modules/music-metadata/lib/riff/RiffChunk.js +28 -0
- package/node_modules/music-metadata/lib/riff/RiffInfoTagMap.d.ts +10 -0
- package/node_modules/music-metadata/lib/riff/RiffInfoTagMap.js +34 -0
- package/node_modules/music-metadata/lib/type.d.ts +661 -0
- package/node_modules/music-metadata/lib/type.js +2 -0
- package/node_modules/music-metadata/lib/wav/BwfChunk.d.ts +17 -0
- package/node_modules/music-metadata/lib/wav/BwfChunk.js +26 -0
- package/node_modules/music-metadata/lib/wav/WaveChunk.d.ts +104 -0
- package/node_modules/music-metadata/lib/wav/WaveChunk.js +88 -0
- package/node_modules/music-metadata/lib/wav/WaveLoader.d.ts +2 -0
- package/node_modules/music-metadata/lib/wav/WaveLoader.js +8 -0
- package/node_modules/music-metadata/lib/wav/WaveParser.d.ts +25 -0
- package/node_modules/music-metadata/lib/wav/WaveParser.js +171 -0
- package/node_modules/music-metadata/lib/wavpack/WavPackLoader.d.ts +2 -0
- package/node_modules/music-metadata/lib/wavpack/WavPackLoader.js +8 -0
- package/node_modules/music-metadata/lib/wavpack/WavPackParser.d.ts +30 -0
- package/node_modules/music-metadata/lib/wavpack/WavPackParser.js +109 -0
- package/node_modules/music-metadata/lib/wavpack/WavPackToken.d.ts +60 -0
- package/node_modules/music-metadata/lib/wavpack/WavPackToken.js +70 -0
- package/node_modules/music-metadata/package.json +156 -0
- package/node_modules/on-exit-leak-free/.github/dependabot.yml +12 -0
- package/node_modules/on-exit-leak-free/.github/workflows/ci.yml +46 -0
- package/node_modules/on-exit-leak-free/LICENSE +21 -0
- package/node_modules/on-exit-leak-free/README.md +54 -0
- package/node_modules/on-exit-leak-free/index.js +108 -0
- package/node_modules/on-exit-leak-free/package.json +37 -0
- package/node_modules/on-exit-leak-free/test/base.test.js +30 -0
- package/node_modules/on-exit-leak-free/test/event-emitter-leak.test.js +23 -0
- package/node_modules/on-exit-leak-free/test/fixtures/beforeExit.js +33 -0
- package/node_modules/on-exit-leak-free/test/fixtures/close.js +21 -0
- package/node_modules/on-exit-leak-free/test/fixtures/gc-not-close.js +24 -0
- package/node_modules/on-exit-leak-free/test/fixtures/unregister.js +24 -0
- package/node_modules/p-queue/dist/index.d.ts +263 -0
- package/node_modules/p-queue/dist/index.js +796 -0
- package/node_modules/p-queue/dist/lower-bound.d.ts +1 -0
- package/node_modules/p-queue/dist/lower-bound.js +18 -0
- package/node_modules/p-queue/dist/options.d.ts +137 -0
- package/node_modules/p-queue/dist/options.js +1 -0
- package/node_modules/p-queue/dist/priority-queue.d.ts +15 -0
- package/node_modules/p-queue/dist/priority-queue.js +94 -0
- package/node_modules/p-queue/dist/queue.d.ts +9 -0
- package/node_modules/p-queue/dist/queue.js +1 -0
- package/node_modules/p-queue/license +9 -0
- package/node_modules/p-queue/package.json +81 -0
- package/node_modules/p-queue/readme.md +1079 -0
- package/node_modules/p-timeout/index.d.ts +149 -0
- package/node_modules/p-timeout/index.js +95 -0
- package/node_modules/p-timeout/license +9 -0
- package/node_modules/p-timeout/package.json +52 -0
- package/node_modules/p-timeout/readme.md +192 -0
- package/node_modules/pino/.eslintignore +2 -0
- package/node_modules/pino/.eslintrc +8 -0
- package/node_modules/pino/.github/dependabot.yml +13 -0
- package/node_modules/pino/.github/workflows/bench.yml +61 -0
- package/node_modules/pino/.github/workflows/ci.yml +90 -0
- package/node_modules/pino/.github/workflows/lock-threads.yml +30 -0
- package/node_modules/pino/.github/workflows/publish-release.yml +43 -0
- package/node_modules/pino/.github/workflows/target-main.yml +23 -0
- package/node_modules/pino/.nojekyll +0 -0
- package/node_modules/pino/.prettierignore +1 -0
- package/node_modules/pino/.taprc.yaml +8 -0
- package/node_modules/pino/CNAME +1 -0
- package/node_modules/pino/CONTRIBUTING.md +30 -0
- package/node_modules/pino/LICENSE +21 -0
- package/node_modules/pino/README.md +177 -0
- package/node_modules/pino/SECURITY.md +68 -0
- package/node_modules/pino/benchmarks/basic.bench.js +95 -0
- package/node_modules/pino/benchmarks/child-child.bench.js +52 -0
- package/node_modules/pino/benchmarks/child-creation.bench.js +73 -0
- package/node_modules/pino/benchmarks/child.bench.js +62 -0
- package/node_modules/pino/benchmarks/deep-object.bench.js +88 -0
- package/node_modules/pino/benchmarks/formatters.bench.js +50 -0
- package/node_modules/pino/benchmarks/internal/custom-levels.js +67 -0
- package/node_modules/pino/benchmarks/internal/just-pino-heavy.bench.js +76 -0
- package/node_modules/pino/benchmarks/internal/just-pino.bench.js +182 -0
- package/node_modules/pino/benchmarks/internal/parent-vs-child.bench.js +75 -0
- package/node_modules/pino/benchmarks/internal/redact.bench.js +86 -0
- package/node_modules/pino/benchmarks/long-string.bench.js +81 -0
- package/node_modules/pino/benchmarks/multi-arg.bench.js +193 -0
- package/node_modules/pino/benchmarks/multistream.js +98 -0
- package/node_modules/pino/benchmarks/object.bench.js +82 -0
- package/node_modules/pino/benchmarks/utils/generate-benchmark-doc.js +36 -0
- package/node_modules/pino/benchmarks/utils/runbench.js +138 -0
- package/node_modules/pino/benchmarks/utils/wrap-log-level.js +55 -0
- package/node_modules/pino/bin.js +6 -0
- package/node_modules/pino/browser.js +505 -0
- package/node_modules/pino/build/sync-version.js +25 -0
- package/node_modules/pino/docs/api.md +1588 -0
- package/node_modules/pino/docs/asynchronous.md +40 -0
- package/node_modules/pino/docs/benchmarks.md +55 -0
- package/node_modules/pino/docs/browser.md +242 -0
- package/node_modules/pino/docs/bundling.md +40 -0
- package/node_modules/pino/docs/child-loggers.md +95 -0
- package/node_modules/pino/docs/diagnostics.md +16 -0
- package/node_modules/pino/docs/ecosystem.md +86 -0
- package/node_modules/pino/docs/help.md +345 -0
- package/node_modules/pino/docs/lts.md +64 -0
- package/node_modules/pino/docs/pretty.md +35 -0
- package/node_modules/pino/docs/redaction.md +135 -0
- package/node_modules/pino/docs/transports.md +1263 -0
- package/node_modules/pino/docs/web.md +309 -0
- package/node_modules/pino/docsify/sidebar.md +26 -0
- package/node_modules/pino/examples/basic.js +43 -0
- package/node_modules/pino/examples/transport.js +68 -0
- package/node_modules/pino/favicon-16x16.png +0 -0
- package/node_modules/pino/favicon-32x32.png +0 -0
- package/node_modules/pino/favicon.ico +0 -0
- package/node_modules/pino/file.js +12 -0
- package/node_modules/pino/inc-version.sh +42 -0
- package/node_modules/pino/index.html +55 -0
- package/node_modules/pino/lib/caller.js +30 -0
- package/node_modules/pino/lib/constants.js +28 -0
- package/node_modules/pino/lib/deprecations.js +8 -0
- package/node_modules/pino/lib/levels.js +241 -0
- package/node_modules/pino/lib/meta.js +3 -0
- package/node_modules/pino/lib/multistream.js +203 -0
- package/node_modules/pino/lib/proto.js +260 -0
- package/node_modules/pino/lib/redaction.js +114 -0
- package/node_modules/pino/lib/symbols.js +74 -0
- package/node_modules/pino/lib/time.js +39 -0
- package/node_modules/pino/lib/tools.js +436 -0
- package/node_modules/pino/lib/transport-stream.js +56 -0
- package/node_modules/pino/lib/transport.js +167 -0
- package/node_modules/pino/lib/worker.js +194 -0
- package/node_modules/pino/package.json +122 -0
- package/node_modules/pino/pino-banner.png +0 -0
- package/node_modules/pino/pino-logo-hire.png +0 -0
- package/node_modules/pino/pino-tree.png +0 -0
- package/node_modules/pino/pino.d.ts +904 -0
- package/node_modules/pino/pino.js +234 -0
- package/node_modules/pino/pretty-demo.png +0 -0
- package/node_modules/pino/test/basic.test.js +876 -0
- package/node_modules/pino/test/broken-pipe.test.js +57 -0
- package/node_modules/pino/test/browser-child.test.js +132 -0
- package/node_modules/pino/test/browser-disabled.test.js +87 -0
- package/node_modules/pino/test/browser-early-console-freeze.test.js +12 -0
- package/node_modules/pino/test/browser-is-level-enabled.test.js +104 -0
- package/node_modules/pino/test/browser-levels.test.js +241 -0
- package/node_modules/pino/test/browser-serializers.test.js +352 -0
- package/node_modules/pino/test/browser-timestamp.test.js +88 -0
- package/node_modules/pino/test/browser-transmit.test.js +417 -0
- package/node_modules/pino/test/browser.test.js +679 -0
- package/node_modules/pino/test/complex-objects.test.js +34 -0
- package/node_modules/pino/test/crlf.test.js +32 -0
- package/node_modules/pino/test/custom-levels.test.js +253 -0
- package/node_modules/pino/test/diagnostics.test.js +107 -0
- package/node_modules/pino/test/error.test.js +398 -0
- package/node_modules/pino/test/errorKey.test.js +34 -0
- package/node_modules/pino/test/escaping.test.js +91 -0
- package/node_modules/pino/test/esm/esm.mjs +12 -0
- package/node_modules/pino/test/esm/index.test.js +34 -0
- package/node_modules/pino/test/esm/named-exports.mjs +27 -0
- package/node_modules/pino/test/exit.test.js +77 -0
- package/node_modules/pino/test/fixtures/broken-pipe/basic.js +9 -0
- package/node_modules/pino/test/fixtures/broken-pipe/destination.js +10 -0
- package/node_modules/pino/test/fixtures/broken-pipe/syncfalse.js +12 -0
- package/node_modules/pino/test/fixtures/console-transport.js +13 -0
- package/node_modules/pino/test/fixtures/crashing-transport.js +13 -0
- package/node_modules/pino/test/fixtures/default-exit.js +8 -0
- package/node_modules/pino/test/fixtures/destination-exit.js +8 -0
- package/node_modules/pino/test/fixtures/eval/index.js +13 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/14-files.js +3 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/2-files.js +3 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file1.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file10.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file11.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file12.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file13.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file14.js +11 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file2.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file3.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file4.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file5.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file6.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file7.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file8.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file9.js +5 -0
- package/node_modules/pino/test/fixtures/noop-transport.js +10 -0
- package/node_modules/pino/test/fixtures/pretty/null-prototype.js +8 -0
- package/node_modules/pino/test/fixtures/stdout-hack-protection.js +11 -0
- package/node_modules/pino/test/fixtures/syncfalse-child.js +6 -0
- package/node_modules/pino/test/fixtures/syncfalse-exit.js +9 -0
- package/node_modules/pino/test/fixtures/syncfalse-flush-exit.js +10 -0
- package/node_modules/pino/test/fixtures/syncfalse.js +6 -0
- package/node_modules/pino/test/fixtures/syntax-error-esm.mjs +2 -0
- package/node_modules/pino/test/fixtures/to-file-transport-with-transform.js +20 -0
- package/node_modules/pino/test/fixtures/to-file-transport.js +13 -0
- package/node_modules/pino/test/fixtures/to-file-transport.mjs +8 -0
- package/node_modules/pino/test/fixtures/transport/index.js +12 -0
- package/node_modules/pino/test/fixtures/transport/package.json +5 -0
- package/node_modules/pino/test/fixtures/transport-exit-immediately-with-async-dest.js +16 -0
- package/node_modules/pino/test/fixtures/transport-exit-immediately.js +11 -0
- package/node_modules/pino/test/fixtures/transport-exit-on-ready.js +12 -0
- package/node_modules/pino/test/fixtures/transport-main.js +9 -0
- package/node_modules/pino/test/fixtures/transport-many-lines.js +29 -0
- package/node_modules/pino/test/fixtures/transport-string-stdout.js +9 -0
- package/node_modules/pino/test/fixtures/transport-transform.js +21 -0
- package/node_modules/pino/test/fixtures/transport-uses-pino-config.js +33 -0
- package/node_modules/pino/test/fixtures/transport-with-on-exit.js +12 -0
- package/node_modules/pino/test/fixtures/transport-worker-data.js +19 -0
- package/node_modules/pino/test/fixtures/transport-worker.js +15 -0
- package/node_modules/pino/test/fixtures/transport-wrong-export-type.js +3 -0
- package/node_modules/pino/test/fixtures/ts/to-file-transport-with-transform.ts +18 -0
- package/node_modules/pino/test/fixtures/ts/to-file-transport.ts +11 -0
- package/node_modules/pino/test/fixtures/ts/transpile.cjs +36 -0
- package/node_modules/pino/test/fixtures/ts/transport-exit-immediately-with-async-dest.ts +15 -0
- package/node_modules/pino/test/fixtures/ts/transport-exit-immediately.ts +10 -0
- package/node_modules/pino/test/fixtures/ts/transport-exit-on-ready.ts +11 -0
- package/node_modules/pino/test/fixtures/ts/transport-main.ts +8 -0
- package/node_modules/pino/test/fixtures/ts/transport-string-stdout.ts +8 -0
- package/node_modules/pino/test/fixtures/ts/transport-worker.ts +14 -0
- package/node_modules/pino/test/formatters.test.js +355 -0
- package/node_modules/pino/test/helper.d.ts +4 -0
- package/node_modules/pino/test/helper.js +128 -0
- package/node_modules/pino/test/hooks.test.js +118 -0
- package/node_modules/pino/test/http.test.js +242 -0
- package/node_modules/pino/test/internals/version.test.js +15 -0
- package/node_modules/pino/test/is-level-enabled.test.js +185 -0
- package/node_modules/pino/test/jest/basic.spec.js +10 -0
- package/node_modules/pino/test/levels.test.js +772 -0
- package/node_modules/pino/test/metadata.test.js +106 -0
- package/node_modules/pino/test/mixin-merge-strategy.test.js +55 -0
- package/node_modules/pino/test/mixin.test.js +218 -0
- package/node_modules/pino/test/multistream.test.js +723 -0
- package/node_modules/pino/test/pkg/index.js +46 -0
- package/node_modules/pino/test/pkg/pkg.config.json +16 -0
- package/node_modules/pino/test/pkg/pkg.test.js +58 -0
- package/node_modules/pino/test/redact.test.js +847 -0
- package/node_modules/pino/test/serializers.test.js +253 -0
- package/node_modules/pino/test/sinon-child-logger.test.js +75 -0
- package/node_modules/pino/test/stdout-protection.test.js +39 -0
- package/node_modules/pino/test/syncfalse.test.js +188 -0
- package/node_modules/pino/test/timestamp-nano.test.js +35 -0
- package/node_modules/pino/test/timestamp.test.js +122 -0
- package/node_modules/pino/test/transport/big.test.js +43 -0
- package/node_modules/pino/test/transport/bundlers-support.test.js +97 -0
- package/node_modules/pino/test/transport/caller.test.js +23 -0
- package/node_modules/pino/test/transport/core.test.js +643 -0
- package/node_modules/pino/test/transport/core.test.ts +236 -0
- package/node_modules/pino/test/transport/core.transpiled.test.ts +112 -0
- package/node_modules/pino/test/transport/crash.test.js +34 -0
- package/node_modules/pino/test/transport/module-link.test.js +239 -0
- package/node_modules/pino/test/transport/pipeline.test.js +135 -0
- package/node_modules/pino/test/transport/repl.test.js +14 -0
- package/node_modules/pino/test/transport/syncTrue.test.js +55 -0
- package/node_modules/pino/test/transport/syncfalse.test.js +68 -0
- package/node_modules/pino/test/transport/targets.test.js +44 -0
- package/node_modules/pino/test/transport/uses-pino-config.test.js +167 -0
- package/node_modules/pino/test/transport-stream.test.js +26 -0
- package/node_modules/pino/test/types/pino-import.test-d.cts +29 -0
- package/node_modules/pino/test/types/pino-multistream.test-d.ts +28 -0
- package/node_modules/pino/test/types/pino-top-export.test-d.ts +36 -0
- package/node_modules/pino/test/types/pino-transport.test-d.ts +145 -0
- package/node_modules/pino/test/types/pino-type-only.test-d.ts +66 -0
- package/node_modules/pino/test/types/pino.test-d.ts +585 -0
- package/node_modules/pino/test/types/pino.ts +90 -0
- package/node_modules/pino/tsconfig.json +14 -0
- package/node_modules/pino-abstract-transport/.github/dependabot.yml +13 -0
- package/node_modules/pino-abstract-transport/.github/workflows/ci.yml +97 -0
- package/node_modules/pino-abstract-transport/.husky/pre-commit +4 -0
- package/node_modules/pino-abstract-transport/LICENSE +21 -0
- package/node_modules/pino-abstract-transport/README.md +172 -0
- package/node_modules/pino-abstract-transport/index.d.ts +122 -0
- package/node_modules/pino-abstract-transport/index.js +128 -0
- package/node_modules/pino-abstract-transport/package.json +40 -0
- package/node_modules/pino-abstract-transport/test/base.test.js +445 -0
- package/node_modules/pino-abstract-transport/test/fixtures/transport-async-iteration.js +22 -0
- package/node_modules/pino-abstract-transport/test/fixtures/transport-on-data.js +22 -0
- package/node_modules/pino-abstract-transport/test/fixtures/transport-transform.js +24 -0
- package/node_modules/pino-abstract-transport/test/fixtures/worker-pipeline.js +15 -0
- package/node_modules/pino-abstract-transport/test/types/index.test-d.ts +31 -0
- package/node_modules/pino-abstract-transport/test/worker.test.js +357 -0
- package/node_modules/pino-std-serializers/.editorconfig +13 -0
- package/node_modules/pino-std-serializers/.github/dependabot.yml +13 -0
- package/node_modules/pino-std-serializers/.github/workflows/ci.yml +81 -0
- package/node_modules/pino-std-serializers/LICENSE +7 -0
- package/node_modules/pino-std-serializers/Readme.md +182 -0
- package/node_modules/pino-std-serializers/eslint.config.js +7 -0
- package/node_modules/pino-std-serializers/index.d.ts +145 -0
- package/node_modules/pino-std-serializers/index.js +36 -0
- package/node_modules/pino-std-serializers/lib/err-helpers.js +118 -0
- package/node_modules/pino-std-serializers/lib/err-proto.js +48 -0
- package/node_modules/pino-std-serializers/lib/err-with-cause.js +48 -0
- package/node_modules/pino-std-serializers/lib/err.js +45 -0
- package/node_modules/pino-std-serializers/lib/req.js +100 -0
- package/node_modules/pino-std-serializers/lib/res.js +47 -0
- package/node_modules/pino-std-serializers/package.json +42 -0
- package/node_modules/pino-std-serializers/test/err-with-cause.test.js +187 -0
- package/node_modules/pino-std-serializers/test/err.test.js +200 -0
- package/node_modules/pino-std-serializers/test/req.test.js +477 -0
- package/node_modules/pino-std-serializers/test/res.test.js +120 -0
- package/node_modules/pino-std-serializers/test/types/index.test-d.ts +71 -0
- package/node_modules/pino-std-serializers/tsconfig.json +13 -0
- package/node_modules/process-warning/.gitattributes +2 -0
- package/node_modules/process-warning/.github/dependabot.yml +13 -0
- package/node_modules/process-warning/.github/workflows/ci.yml +22 -0
- package/node_modules/process-warning/LICENSE +21 -0
- package/node_modules/process-warning/README.md +118 -0
- package/node_modules/process-warning/benchmarks/warn.js +25 -0
- package/node_modules/process-warning/eslint.config.js +6 -0
- package/node_modules/process-warning/examples/example.js +11 -0
- package/node_modules/process-warning/index.js +124 -0
- package/node_modules/process-warning/package.json +73 -0
- package/node_modules/process-warning/test/emit-interpolated-string.test.js +34 -0
- package/node_modules/process-warning/test/emit-once-only.test.js +33 -0
- package/node_modules/process-warning/test/emit-reset.test.js +40 -0
- package/node_modules/process-warning/test/emit-set.test.js +35 -0
- package/node_modules/process-warning/test/emit-unlimited.test.js +42 -0
- package/node_modules/process-warning/test/index.test.js +99 -0
- package/node_modules/process-warning/test/issue-88.test.js +38 -0
- package/node_modules/process-warning/test/jest.test.js +24 -0
- package/node_modules/process-warning/test/no-warnings.test.js +80 -0
- package/node_modules/process-warning/test/promise.js +10 -0
- package/node_modules/process-warning/types/index.d.ts +37 -0
- package/node_modules/process-warning/types/index.test-d.ts +36 -0
- package/node_modules/protobufjs/LICENSE +39 -0
- package/node_modules/protobufjs/README.md +727 -0
- package/node_modules/protobufjs/dist/light/protobuf.js +8041 -0
- package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -0
- package/node_modules/protobufjs/dist/light/protobuf.min.js +8 -0
- package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -0
- package/node_modules/protobufjs/dist/minimal/protobuf.js +2791 -0
- package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -0
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +8 -0
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -0
- package/node_modules/protobufjs/dist/protobuf.js +9865 -0
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -0
- package/node_modules/protobufjs/dist/protobuf.min.js +8 -0
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -0
- package/node_modules/protobufjs/ext/debug/README.md +4 -0
- package/node_modules/protobufjs/ext/debug/index.js +71 -0
- package/node_modules/protobufjs/ext/descriptor/README.md +72 -0
- package/node_modules/protobufjs/ext/descriptor/index.d.ts +195 -0
- package/node_modules/protobufjs/ext/descriptor/index.js +1186 -0
- package/node_modules/protobufjs/ext/descriptor/test.js +54 -0
- package/node_modules/protobufjs/google/LICENSE +27 -0
- package/node_modules/protobufjs/google/README.md +1 -0
- package/node_modules/protobufjs/google/api/annotations.json +83 -0
- package/node_modules/protobufjs/google/api/annotations.proto +11 -0
- package/node_modules/protobufjs/google/api/http.json +86 -0
- package/node_modules/protobufjs/google/api/http.proto +31 -0
- package/node_modules/protobufjs/google/protobuf/api.json +118 -0
- package/node_modules/protobufjs/google/protobuf/api.proto +34 -0
- package/node_modules/protobufjs/google/protobuf/descriptor.json +1382 -0
- package/node_modules/protobufjs/google/protobuf/descriptor.proto +535 -0
- package/node_modules/protobufjs/google/protobuf/source_context.json +20 -0
- package/node_modules/protobufjs/google/protobuf/source_context.proto +7 -0
- package/node_modules/protobufjs/google/protobuf/type.json +202 -0
- package/node_modules/protobufjs/google/protobuf/type.proto +89 -0
- package/node_modules/protobufjs/index.d.ts +2832 -0
- package/node_modules/protobufjs/index.js +4 -0
- package/node_modules/protobufjs/light.d.ts +2 -0
- package/node_modules/protobufjs/light.js +4 -0
- package/node_modules/protobufjs/minimal.d.ts +2 -0
- package/node_modules/protobufjs/minimal.js +4 -0
- package/node_modules/protobufjs/package.json +119 -0
- package/node_modules/protobufjs/scripts/postinstall.js +32 -0
- package/node_modules/protobufjs/src/common.js +399 -0
- package/node_modules/protobufjs/src/converter.js +318 -0
- package/node_modules/protobufjs/src/decoder.js +135 -0
- package/node_modules/protobufjs/src/encoder.js +103 -0
- package/node_modules/protobufjs/src/enum.js +226 -0
- package/node_modules/protobufjs/src/field.js +453 -0
- package/node_modules/protobufjs/src/index-light.js +104 -0
- package/node_modules/protobufjs/src/index-minimal.js +36 -0
- package/node_modules/protobufjs/src/index.js +12 -0
- package/node_modules/protobufjs/src/mapfield.js +126 -0
- package/node_modules/protobufjs/src/message.js +143 -0
- package/node_modules/protobufjs/src/method.js +160 -0
- package/node_modules/protobufjs/src/namespace.js +558 -0
- package/node_modules/protobufjs/src/object.js +382 -0
- package/node_modules/protobufjs/src/oneof.js +222 -0
- package/node_modules/protobufjs/src/parse.js +989 -0
- package/node_modules/protobufjs/src/reader.js +426 -0
- package/node_modules/protobufjs/src/reader_buffer.js +51 -0
- package/node_modules/protobufjs/src/root.js +412 -0
- package/node_modules/protobufjs/src/roots.js +18 -0
- package/node_modules/protobufjs/src/rpc/service.js +142 -0
- package/node_modules/protobufjs/src/rpc.js +36 -0
- package/node_modules/protobufjs/src/service.js +193 -0
- package/node_modules/protobufjs/src/tokenize.js +416 -0
- package/node_modules/protobufjs/src/type.js +632 -0
- package/node_modules/protobufjs/src/types.js +196 -0
- package/node_modules/protobufjs/src/typescript.jsdoc +15 -0
- package/node_modules/protobufjs/src/util/fs.js +11 -0
- package/node_modules/protobufjs/src/util/longbits.js +200 -0
- package/node_modules/protobufjs/src/util/minimal.js +491 -0
- package/node_modules/protobufjs/src/util/patterns.js +7 -0
- package/node_modules/protobufjs/src/util.js +230 -0
- package/node_modules/protobufjs/src/verifier.js +180 -0
- package/node_modules/protobufjs/src/wrappers.js +107 -0
- package/node_modules/protobufjs/src/writer.js +467 -0
- package/node_modules/protobufjs/src/writer_buffer.js +85 -0
- package/node_modules/protobufjs/tsconfig.json +8 -0
- package/node_modules/qified/LICENSE +19 -0
- package/node_modules/qified/README.md +677 -0
- package/node_modules/qified/dist/index.cjs +662 -0
- package/node_modules/qified/dist/index.d.cts +626 -0
- package/node_modules/qified/dist/index.d.mts +626 -0
- package/node_modules/qified/dist/index.mjs +657 -0
- package/node_modules/qified/node_modules/hookified/LICENSE +19 -0
- package/node_modules/qified/node_modules/hookified/README.md +1792 -0
- package/node_modules/qified/node_modules/hookified/dist/browser/index.global.js +951 -0
- package/node_modules/qified/node_modules/hookified/dist/browser/index.global.js.map +1 -0
- package/node_modules/qified/node_modules/hookified/dist/browser/index.js +943 -0
- package/node_modules/qified/node_modules/hookified/dist/browser/index.js.map +1 -0
- package/node_modules/qified/node_modules/hookified/dist/node/index.cjs +908 -0
- package/node_modules/qified/node_modules/hookified/dist/node/index.d.cts +771 -0
- package/node_modules/qified/node_modules/hookified/dist/node/index.d.ts +771 -0
- package/node_modules/qified/node_modules/hookified/dist/node/index.js +903 -0
- package/node_modules/qified/node_modules/hookified/package.json +94 -0
- package/node_modules/qified/package.json +50 -0
- package/node_modules/quick-format-unescaped/.github/workflows/ci.yml +21 -0
- package/node_modules/quick-format-unescaped/LICENSE +21 -0
- package/node_modules/quick-format-unescaped/benchmark.js +24 -0
- package/node_modules/quick-format-unescaped/index.js +109 -0
- package/node_modules/quick-format-unescaped/package.json +29 -0
- package/node_modules/quick-format-unescaped/readme.md +66 -0
- package/node_modules/quick-format-unescaped/test/index.js +136 -0
- package/node_modules/real-require/LICENSE.md +21 -0
- package/node_modules/real-require/README.md +51 -0
- package/node_modules/real-require/package.json +49 -0
- package/node_modules/real-require/src/index.js +14 -0
- package/node_modules/safe-stable-stringify/LICENSE +21 -0
- package/node_modules/safe-stable-stringify/esm/package.json +4 -0
- package/node_modules/safe-stable-stringify/esm/wrapper.d.ts +4 -0
- package/node_modules/safe-stable-stringify/esm/wrapper.js +6 -0
- package/node_modules/safe-stable-stringify/index.d.ts +22 -0
- package/node_modules/safe-stable-stringify/index.js +625 -0
- package/node_modules/safe-stable-stringify/package.json +65 -0
- package/node_modules/safe-stable-stringify/readme.md +179 -0
- package/node_modules/sonic-boom/.eslintignore +2 -0
- package/node_modules/sonic-boom/.taprc +3 -0
- package/node_modules/sonic-boom/LICENSE +21 -0
- package/node_modules/sonic-boom/README.md +153 -0
- package/node_modules/sonic-boom/bench.js +98 -0
- package/node_modules/sonic-boom/check.js +18 -0
- package/node_modules/sonic-boom/example.js +8 -0
- package/node_modules/sonic-boom/fixtures/firehose.js +22 -0
- package/node_modules/sonic-boom/index.js +733 -0
- package/node_modules/sonic-boom/package.json +52 -0
- package/node_modules/sonic-boom/test/destroy.test.js +49 -0
- package/node_modules/sonic-boom/test/end.test.js +98 -0
- package/node_modules/sonic-boom/test/flush-sync.test.js +140 -0
- package/node_modules/sonic-boom/test/flush.test.js +419 -0
- package/node_modules/sonic-boom/test/fsync.test.js +63 -0
- package/node_modules/sonic-boom/test/helper.js +42 -0
- package/node_modules/sonic-boom/test/minlength.test.js +35 -0
- package/node_modules/sonic-boom/test/mode.test.js +116 -0
- package/node_modules/sonic-boom/test/periodicflush.test.js +61 -0
- package/node_modules/sonic-boom/test/reopen.test.js +239 -0
- package/node_modules/sonic-boom/test/retry.test.js +414 -0
- package/node_modules/sonic-boom/test/sync.test.js +261 -0
- package/node_modules/sonic-boom/test/write.test.js +515 -0
- package/node_modules/sonic-boom/types/index.d.ts +63 -0
- package/node_modules/sonic-boom/types/tests/test.ts +4 -0
- package/node_modules/split2/LICENSE +13 -0
- package/node_modules/split2/README.md +85 -0
- package/node_modules/split2/bench.js +27 -0
- package/node_modules/split2/index.js +141 -0
- package/node_modules/split2/package.json +39 -0
- package/node_modules/split2/test.js +409 -0
- package/node_modules/strtok3/LICENSE.txt +21 -0
- package/node_modules/strtok3/README.md +399 -0
- package/node_modules/strtok3/lib/AbstractTokenizer.d.ts +76 -0
- package/node_modules/strtok3/lib/AbstractTokenizer.js +111 -0
- package/node_modules/strtok3/lib/BlobTokenizer.d.ts +29 -0
- package/node_modules/strtok3/lib/BlobTokenizer.js +53 -0
- package/node_modules/strtok3/lib/BufferTokenizer.d.ts +29 -0
- package/node_modules/strtok3/lib/BufferTokenizer.js +52 -0
- package/node_modules/strtok3/lib/FileTokenizer.d.ts +37 -0
- package/node_modules/strtok3/lib/FileTokenizer.js +61 -0
- package/node_modules/strtok3/lib/ReadStreamTokenizer.d.ts +34 -0
- package/node_modules/strtok3/lib/ReadStreamTokenizer.js +107 -0
- package/node_modules/strtok3/lib/core.d.ts +40 -0
- package/node_modules/strtok3/lib/core.js +62 -0
- package/node_modules/strtok3/lib/index.d.ts +16 -0
- package/node_modules/strtok3/lib/index.js +22 -0
- package/node_modules/strtok3/lib/stream/AbstractStreamReader.d.ts +54 -0
- package/node_modules/strtok3/lib/stream/AbstractStreamReader.js +71 -0
- package/node_modules/strtok3/lib/stream/Deferred.d.ts +6 -0
- package/node_modules/strtok3/lib/stream/Deferred.js +10 -0
- package/node_modules/strtok3/lib/stream/Errors.d.ts +10 -0
- package/node_modules/strtok3/lib/stream/Errors.js +16 -0
- package/node_modules/strtok3/lib/stream/StreamReader.d.ts +29 -0
- package/node_modules/strtok3/lib/stream/StreamReader.js +83 -0
- package/node_modules/strtok3/lib/stream/WebStreamByobReader.d.ts +14 -0
- package/node_modules/strtok3/lib/stream/WebStreamByobReader.js +27 -0
- package/node_modules/strtok3/lib/stream/WebStreamDefaultReader.d.ts +19 -0
- package/node_modules/strtok3/lib/stream/WebStreamDefaultReader.js +62 -0
- package/node_modules/strtok3/lib/stream/WebStreamReader.d.ts +14 -0
- package/node_modules/strtok3/lib/stream/WebStreamReader.js +13 -0
- package/node_modules/strtok3/lib/stream/WebStreamReaderFactory.d.ts +5 -0
- package/node_modules/strtok3/lib/stream/WebStreamReaderFactory.js +19 -0
- package/node_modules/strtok3/lib/stream/index.d.ts +6 -0
- package/node_modules/strtok3/lib/stream/index.js +5 -0
- package/node_modules/strtok3/lib/types.d.ts +139 -0
- package/node_modules/strtok3/lib/types.js +1 -0
- package/node_modules/strtok3/package.json +94 -0
- package/node_modules/thread-stream/.claude/settings.local.json +15 -0
- package/node_modules/thread-stream/.github/dependabot.yml +13 -0
- package/node_modules/thread-stream/.github/workflows/ci.yml +94 -0
- package/node_modules/thread-stream/.husky/pre-commit +4 -0
- package/node_modules/thread-stream/.taprc +4 -0
- package/node_modules/thread-stream/CLAUDE.md +64 -0
- package/node_modules/thread-stream/LICENSE +21 -0
- package/node_modules/thread-stream/README.md +136 -0
- package/node_modules/thread-stream/bench.js +85 -0
- package/node_modules/thread-stream/index.d.ts +92 -0
- package/node_modules/thread-stream/index.js +565 -0
- package/node_modules/thread-stream/lib/indexes.js +11 -0
- package/node_modules/thread-stream/lib/wait.js +61 -0
- package/node_modules/thread-stream/lib/worker.js +186 -0
- package/node_modules/thread-stream/package.json +57 -0
- package/node_modules/thread-stream/test/base.test.js +258 -0
- package/node_modules/thread-stream/test/bench.test.js +38 -0
- package/node_modules/thread-stream/test/bundlers.test.js +60 -0
- package/node_modules/thread-stream/test/close-on-gc.js +37 -0
- package/node_modules/thread-stream/test/commonjs-fallback.test.js +80 -0
- package/node_modules/thread-stream/test/context.test.js +21 -0
- package/node_modules/thread-stream/test/create-and-exit.js +16 -0
- package/node_modules/thread-stream/test/custom-worker.js +9 -0
- package/node_modules/thread-stream/test/dir with spaces/test-package.zip +0 -0
- package/node_modules/thread-stream/test/emit-event.js +22 -0
- package/node_modules/thread-stream/test/end.test.js +61 -0
- package/node_modules/thread-stream/test/error.js +14 -0
- package/node_modules/thread-stream/test/esm.test.mjs +47 -0
- package/node_modules/thread-stream/test/event.test.js +23 -0
- package/node_modules/thread-stream/test/exit.js +14 -0
- package/node_modules/thread-stream/test/get-context.js +22 -0
- package/node_modules/thread-stream/test/helper.d.ts +1 -0
- package/node_modules/thread-stream/test/helper.js +35 -0
- package/node_modules/thread-stream/test/indexes.test.js +11 -0
- package/node_modules/thread-stream/test/message-without-code.js +19 -0
- package/node_modules/thread-stream/test/multibyte-chars.test.mjs +74 -0
- package/node_modules/thread-stream/test/never-drain.test.js +57 -0
- package/node_modules/thread-stream/test/on-message.js +18 -0
- package/node_modules/thread-stream/test/pkg/index.js +37 -0
- package/node_modules/thread-stream/test/pkg/pkg.config.json +15 -0
- package/node_modules/thread-stream/test/pkg/pkg.test.js +46 -0
- package/node_modules/thread-stream/test/port.js +16 -0
- package/node_modules/thread-stream/test/post-message.test.js +24 -0
- package/node_modules/thread-stream/test/string-limit-2.test.js +41 -0
- package/node_modules/thread-stream/test/string-limit.test.js +42 -0
- package/node_modules/thread-stream/test/syntax-error.mjs +2 -0
- package/node_modules/thread-stream/test/thread-management.test.js +121 -0
- package/node_modules/thread-stream/test/to-file-on-destroy.js +23 -0
- package/node_modules/thread-stream/test/to-file-on-final.js +24 -0
- package/node_modules/thread-stream/test/to-file.js +12 -0
- package/node_modules/thread-stream/test/to-file.mjs +8 -0
- package/node_modules/thread-stream/test/to-next.js +9 -0
- package/node_modules/thread-stream/test/transpiled.test.js +30 -0
- package/node_modules/thread-stream/test/ts/to-file.ts +10 -0
- package/node_modules/thread-stream/test/ts/transpile.sh +19 -0
- package/node_modules/thread-stream/test/ts-commonjs-default-export.zip +0 -0
- package/node_modules/thread-stream/test/ts.test.ts +33 -0
- package/node_modules/thread-stream/test/uncaughtException.js +21 -0
- package/node_modules/thread-stream/test/unhandledRejection.js +21 -0
- package/node_modules/thread-stream/test/watch-mode.test.js +28 -0
- package/node_modules/thread-stream/test/yarnrc.yml +7 -0
- package/node_modules/thread-stream/tsconfig.json +8 -0
- package/node_modules/token-types/LICENSE.txt +9 -0
- package/node_modules/token-types/README.md +120 -0
- package/node_modules/token-types/lib/index.d.ts +135 -0
- package/node_modules/token-types/lib/index.js +401 -0
- package/node_modules/token-types/package.json +81 -0
- package/node_modules/tslib/CopyrightNotice.txt +15 -0
- package/node_modules/tslib/LICENSE.txt +12 -0
- package/node_modules/tslib/README.md +164 -0
- package/node_modules/tslib/SECURITY.md +41 -0
- package/node_modules/tslib/modules/index.d.ts +38 -0
- package/node_modules/tslib/modules/index.js +70 -0
- package/node_modules/tslib/modules/package.json +3 -0
- package/node_modules/tslib/package.json +47 -0
- package/node_modules/tslib/tslib.d.ts +460 -0
- package/node_modules/tslib/tslib.es6.html +1 -0
- package/node_modules/tslib/tslib.es6.js +402 -0
- package/node_modules/tslib/tslib.es6.mjs +401 -0
- package/node_modules/tslib/tslib.html +1 -0
- package/node_modules/tslib/tslib.js +484 -0
- package/node_modules/uint8array-extras/index.d.ts +331 -0
- package/node_modules/uint8array-extras/index.js +318 -0
- package/node_modules/uint8array-extras/license +9 -0
- package/node_modules/uint8array-extras/package.json +54 -0
- package/node_modules/uint8array-extras/readme.md +318 -0
- package/node_modules/undici-types/LICENSE +21 -0
- package/node_modules/undici-types/README.md +6 -0
- package/node_modules/undici-types/agent.d.ts +30 -0
- package/node_modules/undici-types/api.d.ts +43 -0
- package/node_modules/undici-types/balanced-pool.d.ts +30 -0
- package/node_modules/undici-types/cache-interceptor.d.ts +179 -0
- package/node_modules/undici-types/cache.d.ts +36 -0
- package/node_modules/undici-types/client-stats.d.ts +15 -0
- package/node_modules/undici-types/client.d.ts +129 -0
- package/node_modules/undici-types/connector.d.ts +36 -0
- package/node_modules/undici-types/content-type.d.ts +21 -0
- package/node_modules/undici-types/cookies.d.ts +30 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
- package/node_modules/undici-types/dispatcher.d.ts +253 -0
- package/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
- package/node_modules/undici-types/errors.d.ts +177 -0
- package/node_modules/undici-types/eventsource.d.ts +66 -0
- package/node_modules/undici-types/fetch.d.ts +231 -0
- package/node_modules/undici-types/formdata.d.ts +108 -0
- package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/node_modules/undici-types/global-origin.d.ts +7 -0
- package/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/node_modules/undici-types/handlers.d.ts +14 -0
- package/node_modules/undici-types/header.d.ts +165 -0
- package/node_modules/undici-types/index.d.ts +93 -0
- package/node_modules/undici-types/interceptors.d.ts +80 -0
- package/node_modules/undici-types/mock-agent.d.ts +68 -0
- package/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/node_modules/undici-types/mock-client.d.ts +27 -0
- package/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/node_modules/undici-types/mock-interceptor.d.ts +94 -0
- package/node_modules/undici-types/mock-pool.d.ts +27 -0
- package/node_modules/undici-types/package.json +55 -0
- package/node_modules/undici-types/patch.d.ts +29 -0
- package/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/node_modules/undici-types/pool.d.ts +39 -0
- package/node_modules/undici-types/proxy-agent.d.ts +29 -0
- package/node_modules/undici-types/readable.d.ts +68 -0
- package/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/node_modules/undici-types/retry-handler.d.ts +125 -0
- package/node_modules/undici-types/round-robin-pool.d.ts +39 -0
- package/node_modules/undici-types/snapshot-agent.d.ts +113 -0
- package/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
- package/node_modules/undici-types/util.d.ts +18 -0
- package/node_modules/undici-types/utility.d.ts +7 -0
- package/node_modules/undici-types/webidl.d.ts +346 -0
- package/node_modules/undici-types/websocket.d.ts +188 -0
- package/node_modules/whatsapp-rust-bridge/README.md +19 -0
- package/node_modules/whatsapp-rust-bridge/dist/index.d.ts +2 -0
- package/node_modules/whatsapp-rust-bridge/dist/index.js +2015 -0
- package/node_modules/whatsapp-rust-bridge/package.json +45 -0
- package/node_modules/whatsapp-rust-bridge/pkg/whatsapp_rust_bridge.d.ts +446 -0
- package/node_modules/win-guid/LICENSE.txt +9 -0
- package/node_modules/win-guid/README.md +113 -0
- package/node_modules/win-guid/lib/guid.d.ts +20 -0
- package/node_modules/win-guid/lib/guid.js +107 -0
- package/node_modules/win-guid/package.json +55 -0
- package/node_modules/ws/LICENSE +20 -0
- package/node_modules/ws/README.md +548 -0
- package/node_modules/ws/browser.js +8 -0
- package/node_modules/ws/index.js +22 -0
- package/node_modules/ws/lib/buffer-util.js +131 -0
- package/node_modules/ws/lib/constants.js +19 -0
- package/node_modules/ws/lib/event-target.js +292 -0
- package/node_modules/ws/lib/extension.js +203 -0
- package/node_modules/ws/lib/limiter.js +55 -0
- package/node_modules/ws/lib/permessage-deflate.js +528 -0
- package/node_modules/ws/lib/receiver.js +760 -0
- package/node_modules/ws/lib/sender.js +607 -0
- package/node_modules/ws/lib/stream.js +161 -0
- package/node_modules/ws/lib/subprotocol.js +62 -0
- package/node_modules/ws/lib/validation.js +152 -0
- package/node_modules/ws/lib/websocket-server.js +562 -0
- package/node_modules/ws/lib/websocket.js +1571 -0
- package/node_modules/ws/package.json +70 -0
- package/node_modules/ws/wrapper.mjs +21 -0
- package/package.json +28 -0
|
@@ -0,0 +1,1193 @@
|
|
|
1
|
+
import NodeCache from '@cacheable/node-cache';
|
|
2
|
+
import { Boom } from '@hapi/boom';
|
|
3
|
+
import { proto } from '../../WAProto/index.js';
|
|
4
|
+
import { DEFAULT_CACHE_TTLS, HISTORY_SYNC_PAUSED_TIMEOUT_MS, PROCESSABLE_HISTORY_TYPES } from '../Defaults/index.js';
|
|
5
|
+
import { ALL_WA_PATCH_NAMES } from '../Types/index.js';
|
|
6
|
+
import { SyncState } from '../Types/State.js';
|
|
7
|
+
import { chatModificationToAppPatch, decodePatches, decodeSyncdSnapshot, encodeSyncdPatch, ensureLTHashStateVersion, extractSyncdPatches, generateProfilePicture, getHistoryMsg, isAppStateSyncIrrecoverable, isMissingKeyError, MAX_SYNC_ATTEMPTS, newLTHashState, processSyncAction } from '../Utils/index.js';
|
|
8
|
+
import { makeMutex } from '../Utils/make-mutex.js';
|
|
9
|
+
import processMessage from '../Utils/process-message.js';
|
|
10
|
+
import { buildTcTokenFromJid } from '../Utils/tc-token-utils.js';
|
|
11
|
+
import { getBinaryNodeChild, getBinaryNodeChildren, isHostedLidUser, isHostedPnUser, isLidUser, isPnUser, jidDecode, jidNormalizedUser, reduceBinaryNodeToDictionary, S_WHATSAPP_NET } from '../WABinary/index.js';
|
|
12
|
+
import { USyncQuery, USyncUser } from '../WAUSync/index.js';
|
|
13
|
+
import { makeSocket } from './socket.js';
|
|
14
|
+
export const makeChatsSocket = (config) => {
|
|
15
|
+
const { logger, markOnlineOnConnect, fireInitQueries, appStateMacVerification, shouldIgnoreJid, shouldSyncHistoryMessage, getMessage } = config;
|
|
16
|
+
const sock = makeSocket(config);
|
|
17
|
+
const { ev, ws, authState, generateMessageTag, sendNode, query, signalRepository, onUnexpectedError, sendUnifiedSession, registerSocketEndHandler } = sock;
|
|
18
|
+
const getLIDForPN = signalRepository.lidMapping.getLIDForPN.bind(signalRepository.lidMapping);
|
|
19
|
+
let privacySettings;
|
|
20
|
+
/** Server-assigned AB props for protocol behavior. */
|
|
21
|
+
const serverProps = {
|
|
22
|
+
/** AB prop 10518: gate tctoken on 1:1 messages. Default true (safe: avoids 463). */
|
|
23
|
+
privacyTokenOn1to1: true,
|
|
24
|
+
/** AB prop 9666: gate tctoken on profile picture IQs. WA Web default: true. */
|
|
25
|
+
profilePicPrivacyToken: true,
|
|
26
|
+
/** AB prop 14303: issue tctokens to LID instead of PN. WA Web default: false. */
|
|
27
|
+
lidTrustedTokenIssueToLid: false
|
|
28
|
+
};
|
|
29
|
+
let syncState = SyncState.Connecting;
|
|
30
|
+
/** this mutex ensures that messages are processed in order */
|
|
31
|
+
const messageMutex = makeMutex();
|
|
32
|
+
/** this mutex ensures that receipts are processed in order */
|
|
33
|
+
const receiptMutex = makeMutex();
|
|
34
|
+
/** this mutex ensures that app state patches are processed in order */
|
|
35
|
+
const appStatePatchMutex = makeMutex();
|
|
36
|
+
/** this mutex ensures that notifications are processed in order */
|
|
37
|
+
const notificationMutex = makeMutex();
|
|
38
|
+
// Timeout for AwaitingInitialSync state
|
|
39
|
+
let awaitingSyncTimeout;
|
|
40
|
+
// In-memory history sync completion tracking (resets on reconnection)
|
|
41
|
+
const historySyncStatus = {
|
|
42
|
+
initialBootstrapComplete: false,
|
|
43
|
+
recentSyncComplete: false
|
|
44
|
+
};
|
|
45
|
+
let historySyncPausedTimeout;
|
|
46
|
+
// Collections blocked on missing app state sync keys (mirrors WA Web's "Blocked" state).
|
|
47
|
+
// When a key arrives via APP_STATE_SYNC_KEY_SHARE, these are re-synced.
|
|
48
|
+
const blockedCollections = new Set();
|
|
49
|
+
const placeholderResendCache = config.placeholderResendCache ||
|
|
50
|
+
new NodeCache({
|
|
51
|
+
stdTTL: DEFAULT_CACHE_TTLS.MSG_RETRY, // 1 hour
|
|
52
|
+
useClones: false
|
|
53
|
+
});
|
|
54
|
+
/** helper function to fetch the given app state sync key */
|
|
55
|
+
const getAppStateSyncKey = async (keyId) => {
|
|
56
|
+
const { [keyId]: key } = await authState.keys.get('app-state-sync-key', [keyId]);
|
|
57
|
+
return key;
|
|
58
|
+
};
|
|
59
|
+
const fetchPrivacySettings = async (force = false) => {
|
|
60
|
+
if (!privacySettings || force) {
|
|
61
|
+
const { content } = await query({
|
|
62
|
+
tag: 'iq',
|
|
63
|
+
attrs: {
|
|
64
|
+
xmlns: 'privacy',
|
|
65
|
+
to: S_WHATSAPP_NET,
|
|
66
|
+
type: 'get'
|
|
67
|
+
},
|
|
68
|
+
content: [{ tag: 'privacy', attrs: {} }]
|
|
69
|
+
});
|
|
70
|
+
privacySettings = reduceBinaryNodeToDictionary(content?.[0], 'category');
|
|
71
|
+
}
|
|
72
|
+
return privacySettings;
|
|
73
|
+
};
|
|
74
|
+
/** helper function to run a privacy IQ query */
|
|
75
|
+
const privacyQuery = async (name, value) => {
|
|
76
|
+
await query({
|
|
77
|
+
tag: 'iq',
|
|
78
|
+
attrs: {
|
|
79
|
+
xmlns: 'privacy',
|
|
80
|
+
to: S_WHATSAPP_NET,
|
|
81
|
+
type: 'set'
|
|
82
|
+
},
|
|
83
|
+
content: [
|
|
84
|
+
{
|
|
85
|
+
tag: 'privacy',
|
|
86
|
+
attrs: {},
|
|
87
|
+
content: [
|
|
88
|
+
{
|
|
89
|
+
tag: 'category',
|
|
90
|
+
attrs: { name, value }
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
const updateMessagesPrivacy = async (value) => {
|
|
98
|
+
await privacyQuery('messages', value);
|
|
99
|
+
};
|
|
100
|
+
const updateCallPrivacy = async (value) => {
|
|
101
|
+
await privacyQuery('calladd', value);
|
|
102
|
+
};
|
|
103
|
+
const updateLastSeenPrivacy = async (value) => {
|
|
104
|
+
await privacyQuery('last', value);
|
|
105
|
+
};
|
|
106
|
+
const updateOnlinePrivacy = async (value) => {
|
|
107
|
+
await privacyQuery('online', value);
|
|
108
|
+
};
|
|
109
|
+
const updateProfilePicturePrivacy = async (value) => {
|
|
110
|
+
await privacyQuery('profile', value);
|
|
111
|
+
};
|
|
112
|
+
const updateStatusPrivacy = async (value) => {
|
|
113
|
+
await privacyQuery('status', value);
|
|
114
|
+
};
|
|
115
|
+
const updateReadReceiptsPrivacy = async (value) => {
|
|
116
|
+
await privacyQuery('readreceipts', value);
|
|
117
|
+
};
|
|
118
|
+
const updateGroupsAddPrivacy = async (value) => {
|
|
119
|
+
await privacyQuery('groupadd', value);
|
|
120
|
+
};
|
|
121
|
+
const updateDefaultDisappearingMode = async (duration) => {
|
|
122
|
+
await query({
|
|
123
|
+
tag: 'iq',
|
|
124
|
+
attrs: {
|
|
125
|
+
xmlns: 'disappearing_mode',
|
|
126
|
+
to: S_WHATSAPP_NET,
|
|
127
|
+
type: 'set'
|
|
128
|
+
},
|
|
129
|
+
content: [
|
|
130
|
+
{
|
|
131
|
+
tag: 'disappearing_mode',
|
|
132
|
+
attrs: {
|
|
133
|
+
duration: duration.toString()
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
const getBotListV2 = async () => {
|
|
140
|
+
const resp = await query({
|
|
141
|
+
tag: 'iq',
|
|
142
|
+
attrs: {
|
|
143
|
+
xmlns: 'bot',
|
|
144
|
+
to: S_WHATSAPP_NET,
|
|
145
|
+
type: 'get'
|
|
146
|
+
},
|
|
147
|
+
content: [
|
|
148
|
+
{
|
|
149
|
+
tag: 'bot',
|
|
150
|
+
attrs: {
|
|
151
|
+
v: '2'
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
});
|
|
156
|
+
const botNode = getBinaryNodeChild(resp, 'bot');
|
|
157
|
+
const botList = [];
|
|
158
|
+
for (const section of getBinaryNodeChildren(botNode, 'section')) {
|
|
159
|
+
if (section.attrs.type === 'all') {
|
|
160
|
+
for (const bot of getBinaryNodeChildren(section, 'bot')) {
|
|
161
|
+
botList.push({
|
|
162
|
+
jid: bot.attrs.jid,
|
|
163
|
+
personaId: bot.attrs['persona_id']
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return botList;
|
|
169
|
+
};
|
|
170
|
+
const fetchStatus = async (...jids) => {
|
|
171
|
+
const usyncQuery = new USyncQuery().withStatusProtocol();
|
|
172
|
+
for (const jid of jids) {
|
|
173
|
+
usyncQuery.withUser(new USyncUser().withId(jid));
|
|
174
|
+
}
|
|
175
|
+
const result = await sock.executeUSyncQuery(usyncQuery);
|
|
176
|
+
if (result) {
|
|
177
|
+
return result.list;
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
const fetchDisappearingDuration = async (...jids) => {
|
|
181
|
+
const usyncQuery = new USyncQuery().withDisappearingModeProtocol();
|
|
182
|
+
for (const jid of jids) {
|
|
183
|
+
usyncQuery.withUser(new USyncUser().withId(jid));
|
|
184
|
+
}
|
|
185
|
+
const result = await sock.executeUSyncQuery(usyncQuery);
|
|
186
|
+
if (result) {
|
|
187
|
+
return result.list;
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
/** update the profile picture for yourself or a group */
|
|
191
|
+
const updateProfilePicture = async (jid, content, dimensions) => {
|
|
192
|
+
let targetJid;
|
|
193
|
+
if (!jid) {
|
|
194
|
+
throw new Boom('Illegal no-jid profile update. Please specify either your ID or the ID of the chat you wish to update');
|
|
195
|
+
}
|
|
196
|
+
if (jidNormalizedUser(jid) !== jidNormalizedUser(authState.creds.me.id)) {
|
|
197
|
+
targetJid = jidNormalizedUser(jid); // in case it is someone other than us
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
targetJid = undefined;
|
|
201
|
+
}
|
|
202
|
+
const { img } = await generateProfilePicture(content, dimensions);
|
|
203
|
+
await query({
|
|
204
|
+
tag: 'iq',
|
|
205
|
+
attrs: {
|
|
206
|
+
to: S_WHATSAPP_NET,
|
|
207
|
+
type: 'set',
|
|
208
|
+
xmlns: 'w:profile:picture',
|
|
209
|
+
...(targetJid ? { target: targetJid } : {})
|
|
210
|
+
},
|
|
211
|
+
content: [
|
|
212
|
+
{
|
|
213
|
+
tag: 'picture',
|
|
214
|
+
attrs: { type: 'image' },
|
|
215
|
+
content: img
|
|
216
|
+
}
|
|
217
|
+
]
|
|
218
|
+
});
|
|
219
|
+
};
|
|
220
|
+
/** remove the profile picture for yourself or a group */
|
|
221
|
+
const removeProfilePicture = async (jid) => {
|
|
222
|
+
let targetJid;
|
|
223
|
+
if (!jid) {
|
|
224
|
+
throw new Boom('Illegal no-jid profile update. Please specify either your ID or the ID of the chat you wish to update');
|
|
225
|
+
}
|
|
226
|
+
if (jidNormalizedUser(jid) !== jidNormalizedUser(authState.creds.me.id)) {
|
|
227
|
+
targetJid = jidNormalizedUser(jid); // in case it is someone other than us
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
targetJid = undefined;
|
|
231
|
+
}
|
|
232
|
+
await query({
|
|
233
|
+
tag: 'iq',
|
|
234
|
+
attrs: {
|
|
235
|
+
to: S_WHATSAPP_NET,
|
|
236
|
+
type: 'set',
|
|
237
|
+
xmlns: 'w:profile:picture',
|
|
238
|
+
...(targetJid ? { target: targetJid } : {})
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
};
|
|
242
|
+
/** update the profile status for yourself */
|
|
243
|
+
const updateProfileStatus = async (status) => {
|
|
244
|
+
await query({
|
|
245
|
+
tag: 'iq',
|
|
246
|
+
attrs: {
|
|
247
|
+
to: S_WHATSAPP_NET,
|
|
248
|
+
type: 'set',
|
|
249
|
+
xmlns: 'status'
|
|
250
|
+
},
|
|
251
|
+
content: [
|
|
252
|
+
{
|
|
253
|
+
tag: 'status',
|
|
254
|
+
attrs: {},
|
|
255
|
+
content: Buffer.from(status, 'utf-8')
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
});
|
|
259
|
+
};
|
|
260
|
+
const updateProfileName = async (name) => {
|
|
261
|
+
await chatModify({ pushNameSetting: name }, '');
|
|
262
|
+
};
|
|
263
|
+
const fetchBlocklist = async () => {
|
|
264
|
+
const result = await query({
|
|
265
|
+
tag: 'iq',
|
|
266
|
+
attrs: {
|
|
267
|
+
xmlns: 'blocklist',
|
|
268
|
+
to: S_WHATSAPP_NET,
|
|
269
|
+
type: 'get'
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
const listNode = getBinaryNodeChild(result, 'list');
|
|
273
|
+
return getBinaryNodeChildren(listNode, 'item').map(n => n.attrs.jid);
|
|
274
|
+
};
|
|
275
|
+
const updateBlockStatus = async (jid, action) => {
|
|
276
|
+
const normalizedJid = jidNormalizedUser(jid);
|
|
277
|
+
let lid;
|
|
278
|
+
let pn_jid;
|
|
279
|
+
if (isLidUser(normalizedJid) || isHostedLidUser(normalizedJid)) {
|
|
280
|
+
lid = normalizedJid;
|
|
281
|
+
if (action === 'block') {
|
|
282
|
+
const pn = await signalRepository.lidMapping.getPNForLID(normalizedJid);
|
|
283
|
+
if (!pn) {
|
|
284
|
+
throw new Boom(`Unable to resolve PN JID for LID: ${jid}`, { statusCode: 400 });
|
|
285
|
+
}
|
|
286
|
+
pn_jid = jidNormalizedUser(pn);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
else if (isPnUser(normalizedJid) || isHostedPnUser(normalizedJid)) {
|
|
290
|
+
const mapped = await signalRepository.lidMapping.getLIDForPN(normalizedJid);
|
|
291
|
+
if (!mapped) {
|
|
292
|
+
throw new Boom(`Unable to resolve LID for PN JID: ${jid}`, { statusCode: 400 });
|
|
293
|
+
}
|
|
294
|
+
lid = mapped;
|
|
295
|
+
if (action === 'block') {
|
|
296
|
+
pn_jid = jidNormalizedUser(normalizedJid);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
throw new Boom(`Invalid jid: ${jid}`, { statusCode: 400 });
|
|
301
|
+
}
|
|
302
|
+
const itemAttrs = {
|
|
303
|
+
action,
|
|
304
|
+
jid: lid
|
|
305
|
+
};
|
|
306
|
+
if (action === 'block') {
|
|
307
|
+
if (!pn_jid) {
|
|
308
|
+
throw new Boom(`pn_jid required for block: ${jid}`, { statusCode: 400 });
|
|
309
|
+
}
|
|
310
|
+
itemAttrs.pn_jid = pn_jid;
|
|
311
|
+
}
|
|
312
|
+
await query({
|
|
313
|
+
tag: 'iq',
|
|
314
|
+
attrs: {
|
|
315
|
+
xmlns: 'blocklist',
|
|
316
|
+
to: S_WHATSAPP_NET,
|
|
317
|
+
type: 'set'
|
|
318
|
+
},
|
|
319
|
+
content: [
|
|
320
|
+
{
|
|
321
|
+
tag: 'item',
|
|
322
|
+
attrs: itemAttrs
|
|
323
|
+
}
|
|
324
|
+
]
|
|
325
|
+
});
|
|
326
|
+
};
|
|
327
|
+
const getBusinessProfile = async (jid) => {
|
|
328
|
+
const results = await query({
|
|
329
|
+
tag: 'iq',
|
|
330
|
+
attrs: {
|
|
331
|
+
to: 's.whatsapp.net',
|
|
332
|
+
xmlns: 'w:biz',
|
|
333
|
+
type: 'get'
|
|
334
|
+
},
|
|
335
|
+
content: [
|
|
336
|
+
{
|
|
337
|
+
tag: 'business_profile',
|
|
338
|
+
attrs: { v: '244' },
|
|
339
|
+
content: [
|
|
340
|
+
{
|
|
341
|
+
tag: 'profile',
|
|
342
|
+
attrs: { jid }
|
|
343
|
+
}
|
|
344
|
+
]
|
|
345
|
+
}
|
|
346
|
+
]
|
|
347
|
+
});
|
|
348
|
+
const profileNode = getBinaryNodeChild(results, 'business_profile');
|
|
349
|
+
const profiles = getBinaryNodeChild(profileNode, 'profile');
|
|
350
|
+
if (profiles) {
|
|
351
|
+
const address = getBinaryNodeChild(profiles, 'address');
|
|
352
|
+
const description = getBinaryNodeChild(profiles, 'description');
|
|
353
|
+
const website = getBinaryNodeChild(profiles, 'website');
|
|
354
|
+
const email = getBinaryNodeChild(profiles, 'email');
|
|
355
|
+
const category = getBinaryNodeChild(getBinaryNodeChild(profiles, 'categories'), 'category');
|
|
356
|
+
const businessHours = getBinaryNodeChild(profiles, 'business_hours');
|
|
357
|
+
const businessHoursConfig = businessHours
|
|
358
|
+
? getBinaryNodeChildren(businessHours, 'business_hours_config')
|
|
359
|
+
: undefined;
|
|
360
|
+
const websiteStr = website?.content?.toString();
|
|
361
|
+
return {
|
|
362
|
+
wid: profiles.attrs?.jid,
|
|
363
|
+
address: address?.content?.toString(),
|
|
364
|
+
description: description?.content?.toString() || '',
|
|
365
|
+
website: websiteStr ? [websiteStr] : [],
|
|
366
|
+
email: email?.content?.toString(),
|
|
367
|
+
category: category?.content?.toString(),
|
|
368
|
+
business_hours: {
|
|
369
|
+
timezone: businessHours?.attrs?.timezone,
|
|
370
|
+
business_config: businessHoursConfig?.map(({ attrs }) => attrs)
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
};
|
|
375
|
+
const cleanDirtyBits = async (type, fromTimestamp) => {
|
|
376
|
+
logger.info({ fromTimestamp }, 'clean dirty bits ' + type);
|
|
377
|
+
await sendNode({
|
|
378
|
+
tag: 'iq',
|
|
379
|
+
attrs: {
|
|
380
|
+
to: S_WHATSAPP_NET,
|
|
381
|
+
type: 'set',
|
|
382
|
+
xmlns: 'urn:xmpp:whatsapp:dirty',
|
|
383
|
+
id: generateMessageTag()
|
|
384
|
+
},
|
|
385
|
+
content: [
|
|
386
|
+
{
|
|
387
|
+
tag: 'clean',
|
|
388
|
+
attrs: {
|
|
389
|
+
type,
|
|
390
|
+
...(fromTimestamp ? { timestamp: fromTimestamp.toString() } : null)
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
]
|
|
394
|
+
});
|
|
395
|
+
};
|
|
396
|
+
const newAppStateChunkHandler = (isInitialSync) => {
|
|
397
|
+
return {
|
|
398
|
+
onMutation(mutation) {
|
|
399
|
+
processSyncAction(mutation, ev, authState.creds.me, isInitialSync ? { accountSettings: authState.creds.accountSettings } : undefined, logger);
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
};
|
|
403
|
+
const resyncAppState = ev.createBufferedFunction(async (collections, isInitialSync) => {
|
|
404
|
+
const appStateSyncKeyCache = new Map();
|
|
405
|
+
const getCachedAppStateSyncKey = async (keyId) => {
|
|
406
|
+
if (appStateSyncKeyCache.has(keyId)) {
|
|
407
|
+
return appStateSyncKeyCache.get(keyId) ?? undefined;
|
|
408
|
+
}
|
|
409
|
+
const key = await getAppStateSyncKey(keyId);
|
|
410
|
+
appStateSyncKeyCache.set(keyId, key ?? null);
|
|
411
|
+
return key;
|
|
412
|
+
};
|
|
413
|
+
// we use this to determine which events to fire
|
|
414
|
+
// otherwise when we resync from scratch -- all notifications will fire
|
|
415
|
+
const initialVersionMap = {};
|
|
416
|
+
const globalMutationMap = {};
|
|
417
|
+
await authState.keys.transaction(async () => {
|
|
418
|
+
const collectionsToHandle = new Set(collections);
|
|
419
|
+
// in case something goes wrong -- ensure we don't enter a loop that cannot be exited from
|
|
420
|
+
const attemptsMap = {};
|
|
421
|
+
// collections that failed and need a full snapshot on retry
|
|
422
|
+
// mirrors WA Web's ErrorFatal -> force snapshot behavior
|
|
423
|
+
const forceSnapshotCollections = new Set();
|
|
424
|
+
// keep executing till all collections are done
|
|
425
|
+
// sometimes a single patch request will not return all the patches (God knows why)
|
|
426
|
+
// so we fetch till they're all done (this is determined by the "has_more_patches" flag)
|
|
427
|
+
while (collectionsToHandle.size) {
|
|
428
|
+
const states = {};
|
|
429
|
+
const nodes = [];
|
|
430
|
+
for (const name of collectionsToHandle) {
|
|
431
|
+
const result = await authState.keys.get('app-state-sync-version', [name]);
|
|
432
|
+
let state = result[name];
|
|
433
|
+
if (state) {
|
|
434
|
+
state = ensureLTHashStateVersion(state);
|
|
435
|
+
if (typeof initialVersionMap[name] === 'undefined') {
|
|
436
|
+
initialVersionMap[name] = state.version;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
else {
|
|
440
|
+
state = newLTHashState();
|
|
441
|
+
}
|
|
442
|
+
states[name] = state;
|
|
443
|
+
const shouldForceSnapshot = forceSnapshotCollections.has(name);
|
|
444
|
+
if (shouldForceSnapshot) {
|
|
445
|
+
forceSnapshotCollections.delete(name);
|
|
446
|
+
}
|
|
447
|
+
logger.info(`resyncing ${name} from v${state.version}${shouldForceSnapshot ? ' (forcing snapshot)' : ''}`);
|
|
448
|
+
nodes.push({
|
|
449
|
+
tag: 'collection',
|
|
450
|
+
attrs: {
|
|
451
|
+
name,
|
|
452
|
+
version: state.version.toString(),
|
|
453
|
+
// return snapshot if syncing from scratch or forcing after a failed attempt
|
|
454
|
+
return_snapshot: (shouldForceSnapshot || !state.version).toString()
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
const result = await query({
|
|
459
|
+
tag: 'iq',
|
|
460
|
+
attrs: {
|
|
461
|
+
to: S_WHATSAPP_NET,
|
|
462
|
+
xmlns: 'w:sync:app:state',
|
|
463
|
+
type: 'set'
|
|
464
|
+
},
|
|
465
|
+
content: [
|
|
466
|
+
{
|
|
467
|
+
tag: 'sync',
|
|
468
|
+
attrs: {},
|
|
469
|
+
content: nodes
|
|
470
|
+
}
|
|
471
|
+
]
|
|
472
|
+
});
|
|
473
|
+
// extract from binary node
|
|
474
|
+
const decoded = await extractSyncdPatches(result, config?.options);
|
|
475
|
+
for (const key in decoded) {
|
|
476
|
+
const name = key;
|
|
477
|
+
const { patches, hasMorePatches, snapshot } = decoded[name];
|
|
478
|
+
try {
|
|
479
|
+
if (snapshot) {
|
|
480
|
+
const { state: newState, mutationMap } = await decodeSyncdSnapshot(name, snapshot, getCachedAppStateSyncKey, initialVersionMap[name], appStateMacVerification.snapshot, logger);
|
|
481
|
+
states[name] = newState;
|
|
482
|
+
Object.assign(globalMutationMap, mutationMap);
|
|
483
|
+
logger.info(`restored state of ${name} from snapshot to v${newState.version} with mutations`);
|
|
484
|
+
await authState.keys.set({ 'app-state-sync-version': { [name]: newState } });
|
|
485
|
+
}
|
|
486
|
+
// only process if there are syncd patches
|
|
487
|
+
if (patches.length) {
|
|
488
|
+
const { state: newState, mutationMap } = await decodePatches(name, patches, states[name], getCachedAppStateSyncKey, config.options, initialVersionMap[name], logger, appStateMacVerification.patch);
|
|
489
|
+
await authState.keys.set({ 'app-state-sync-version': { [name]: newState } });
|
|
490
|
+
logger.info(`synced ${name} to v${newState.version}`);
|
|
491
|
+
initialVersionMap[name] = newState.version;
|
|
492
|
+
Object.assign(globalMutationMap, mutationMap);
|
|
493
|
+
}
|
|
494
|
+
if (hasMorePatches) {
|
|
495
|
+
logger.info(`${name} has more patches...`);
|
|
496
|
+
}
|
|
497
|
+
else {
|
|
498
|
+
// collection is done with sync
|
|
499
|
+
collectionsToHandle.delete(name);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
catch (error) {
|
|
503
|
+
attemptsMap[name] = (attemptsMap[name] || 0) + 1;
|
|
504
|
+
const logData = {
|
|
505
|
+
name,
|
|
506
|
+
attempt: attemptsMap[name],
|
|
507
|
+
version: states[name].version,
|
|
508
|
+
statusCode: error.output?.statusCode,
|
|
509
|
+
errorType: error.name,
|
|
510
|
+
error: error.stack
|
|
511
|
+
};
|
|
512
|
+
if (isMissingKeyError(error) && attemptsMap[name] >= MAX_SYNC_ATTEMPTS) {
|
|
513
|
+
// WA Web treats missing keys as "Blocked" — park the collection
|
|
514
|
+
// until the key arrives via APP_STATE_SYNC_KEY_SHARE.
|
|
515
|
+
logger.warn(logData, `${name} blocked on missing key from v${states[name].version}, parking after ${attemptsMap[name]} attempts`);
|
|
516
|
+
blockedCollections.add(name);
|
|
517
|
+
collectionsToHandle.delete(name);
|
|
518
|
+
}
|
|
519
|
+
else if (isMissingKeyError(error)) {
|
|
520
|
+
// Retry with a snapshot which may use a different key.
|
|
521
|
+
logger.info(logData, `${name} blocked on missing key from v${states[name].version}, retrying with snapshot`);
|
|
522
|
+
forceSnapshotCollections.add(name);
|
|
523
|
+
}
|
|
524
|
+
else if (isAppStateSyncIrrecoverable(error, attemptsMap[name])) {
|
|
525
|
+
logger.warn(logData, `failed to sync ${name} from v${states[name].version}, giving up`);
|
|
526
|
+
collectionsToHandle.delete(name);
|
|
527
|
+
}
|
|
528
|
+
else {
|
|
529
|
+
logger.info(logData, `failed to sync ${name} from v${states[name].version}, forcing snapshot retry`);
|
|
530
|
+
// force a full snapshot on retry to recover from
|
|
531
|
+
// corrupted local state (e.g. LTHash MAC mismatch)
|
|
532
|
+
forceSnapshotCollections.add(name);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}, authState?.creds?.me?.id || 'resync-app-state');
|
|
538
|
+
const { onMutation } = newAppStateChunkHandler(isInitialSync);
|
|
539
|
+
for (const key in globalMutationMap) {
|
|
540
|
+
onMutation(globalMutationMap[key]);
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
/**
|
|
544
|
+
* fetch the profile picture of a user/group
|
|
545
|
+
* type = "preview" for a low res picture
|
|
546
|
+
* type = "image for the high res picture"
|
|
547
|
+
*/
|
|
548
|
+
const profilePictureUrl = async (jid, type = 'preview', timeoutMs) => {
|
|
549
|
+
const baseContent = [{ tag: 'picture', attrs: { type, query: 'url' } }];
|
|
550
|
+
// WA Web only includes tctoken for user JIDs (not groups/newsletters)
|
|
551
|
+
// and never for own profile pic (Chat model for self has no tcToken).
|
|
552
|
+
// Including tctoken for own JID causes the server to never respond.
|
|
553
|
+
const normalizedJid = jidNormalizedUser(jid);
|
|
554
|
+
const isUserJid = isPnUser(normalizedJid) || isLidUser(normalizedJid);
|
|
555
|
+
const me = authState.creds.me;
|
|
556
|
+
const isSelf = me && (normalizedJid === jidNormalizedUser(me.id) || (me.lid && normalizedJid === jidNormalizedUser(me.lid)));
|
|
557
|
+
let content = baseContent;
|
|
558
|
+
if (serverProps.profilePicPrivacyToken && isUserJid && !isSelf) {
|
|
559
|
+
content = await buildTcTokenFromJid({
|
|
560
|
+
authState,
|
|
561
|
+
jid: normalizedJid,
|
|
562
|
+
baseContent,
|
|
563
|
+
getLIDForPN
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
jid = jidNormalizedUser(jid);
|
|
567
|
+
const result = await query({
|
|
568
|
+
tag: 'iq',
|
|
569
|
+
attrs: {
|
|
570
|
+
target: jid,
|
|
571
|
+
to: S_WHATSAPP_NET,
|
|
572
|
+
type: 'get',
|
|
573
|
+
xmlns: 'w:profile:picture'
|
|
574
|
+
},
|
|
575
|
+
content
|
|
576
|
+
}, timeoutMs);
|
|
577
|
+
const child = getBinaryNodeChild(result, 'picture');
|
|
578
|
+
return child?.attrs?.url;
|
|
579
|
+
};
|
|
580
|
+
const createCallLink = async (type, event, timeoutMs) => {
|
|
581
|
+
const result = await query({
|
|
582
|
+
tag: 'call',
|
|
583
|
+
attrs: {
|
|
584
|
+
id: generateMessageTag(),
|
|
585
|
+
to: '@call'
|
|
586
|
+
},
|
|
587
|
+
content: [
|
|
588
|
+
{
|
|
589
|
+
tag: 'link_create',
|
|
590
|
+
attrs: { media: type },
|
|
591
|
+
content: event ? [{ tag: 'event', attrs: { start_time: String(event.startTime) } }] : undefined
|
|
592
|
+
}
|
|
593
|
+
]
|
|
594
|
+
}, timeoutMs);
|
|
595
|
+
const child = getBinaryNodeChild(result, 'link_create');
|
|
596
|
+
return child?.attrs?.token;
|
|
597
|
+
};
|
|
598
|
+
const sendPresenceUpdate = async (type, toJid) => {
|
|
599
|
+
const me = authState.creds.me;
|
|
600
|
+
const isAvailableType = type === 'available';
|
|
601
|
+
if (isAvailableType || type === 'unavailable') {
|
|
602
|
+
if (!me.name) {
|
|
603
|
+
logger.warn('no name present, ignoring presence update request...');
|
|
604
|
+
return;
|
|
605
|
+
}
|
|
606
|
+
ev.emit('connection.update', { isOnline: isAvailableType });
|
|
607
|
+
if (isAvailableType) {
|
|
608
|
+
void sendUnifiedSession();
|
|
609
|
+
}
|
|
610
|
+
await sendNode({
|
|
611
|
+
tag: 'presence',
|
|
612
|
+
attrs: {
|
|
613
|
+
name: me.name.replace(/@/g, ''),
|
|
614
|
+
type
|
|
615
|
+
}
|
|
616
|
+
});
|
|
617
|
+
}
|
|
618
|
+
else {
|
|
619
|
+
const { server } = jidDecode(toJid);
|
|
620
|
+
const isLid = server === 'lid';
|
|
621
|
+
await sendNode({
|
|
622
|
+
tag: 'chatstate',
|
|
623
|
+
attrs: {
|
|
624
|
+
from: isLid ? me.lid : me.id,
|
|
625
|
+
to: toJid
|
|
626
|
+
},
|
|
627
|
+
content: [
|
|
628
|
+
{
|
|
629
|
+
tag: type === 'recording' ? 'composing' : type,
|
|
630
|
+
attrs: type === 'recording' ? { media: 'audio' } : {}
|
|
631
|
+
}
|
|
632
|
+
]
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
};
|
|
636
|
+
/**
|
|
637
|
+
* @param toJid the jid to subscribe to
|
|
638
|
+
* @param tcToken token for subscription, use if present
|
|
639
|
+
*/
|
|
640
|
+
const presenceSubscribe = async (toJid) => {
|
|
641
|
+
// Only include tctoken for user JIDs — groups/newsletters don't use tctokens
|
|
642
|
+
const normalizedToJid = jidNormalizedUser(toJid);
|
|
643
|
+
const isUserJid = isPnUser(normalizedToJid) || isLidUser(normalizedToJid);
|
|
644
|
+
const tcTokenContent = isUserJid
|
|
645
|
+
? await buildTcTokenFromJid({ authState, jid: normalizedToJid, getLIDForPN })
|
|
646
|
+
: undefined;
|
|
647
|
+
return sendNode({
|
|
648
|
+
tag: 'presence',
|
|
649
|
+
attrs: {
|
|
650
|
+
to: toJid,
|
|
651
|
+
id: generateMessageTag(),
|
|
652
|
+
type: 'subscribe'
|
|
653
|
+
},
|
|
654
|
+
content: tcTokenContent
|
|
655
|
+
});
|
|
656
|
+
};
|
|
657
|
+
const handlePresenceUpdate = ({ tag, attrs, content }) => {
|
|
658
|
+
let presence;
|
|
659
|
+
const jid = attrs.from;
|
|
660
|
+
const participant = attrs.participant || attrs.from;
|
|
661
|
+
if (shouldIgnoreJid(jid) && jid !== S_WHATSAPP_NET) {
|
|
662
|
+
return;
|
|
663
|
+
}
|
|
664
|
+
if (tag === 'presence') {
|
|
665
|
+
presence = {
|
|
666
|
+
lastKnownPresence: attrs.type === 'unavailable' ? 'unavailable' : 'available',
|
|
667
|
+
lastSeen: attrs.last && attrs.last !== 'deny' ? +attrs.last : undefined,
|
|
668
|
+
groupOnlineCount: attrs.count ? +attrs.count : undefined
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
else if (Array.isArray(content)) {
|
|
672
|
+
const [firstChild] = content;
|
|
673
|
+
let type = firstChild.tag;
|
|
674
|
+
if (type === 'paused') {
|
|
675
|
+
type = 'available';
|
|
676
|
+
}
|
|
677
|
+
if (firstChild.attrs?.media === 'audio') {
|
|
678
|
+
type = 'recording';
|
|
679
|
+
}
|
|
680
|
+
presence = { lastKnownPresence: type };
|
|
681
|
+
}
|
|
682
|
+
else {
|
|
683
|
+
logger.error({ tag, attrs, content }, 'recv invalid presence node');
|
|
684
|
+
}
|
|
685
|
+
if (presence) {
|
|
686
|
+
ev.emit('presence.update', { id: jid, presences: { [participant]: presence } });
|
|
687
|
+
}
|
|
688
|
+
};
|
|
689
|
+
const appPatch = async (patchCreate) => {
|
|
690
|
+
const name = patchCreate.type;
|
|
691
|
+
const myAppStateKeyId = authState.creds.myAppStateKeyId;
|
|
692
|
+
if (!myAppStateKeyId) {
|
|
693
|
+
throw new Boom('App state key not present!', { statusCode: 400 });
|
|
694
|
+
}
|
|
695
|
+
let initial;
|
|
696
|
+
let encodeResult;
|
|
697
|
+
await appStatePatchMutex.mutex(async () => {
|
|
698
|
+
await authState.keys.transaction(async () => {
|
|
699
|
+
logger.debug({ patch: patchCreate }, 'applying app patch');
|
|
700
|
+
await resyncAppState([name], false);
|
|
701
|
+
const { [name]: currentSyncVersion } = await authState.keys.get('app-state-sync-version', [name]);
|
|
702
|
+
initial = currentSyncVersion ? ensureLTHashStateVersion(currentSyncVersion) : newLTHashState();
|
|
703
|
+
encodeResult = await encodeSyncdPatch(patchCreate, myAppStateKeyId, initial, getAppStateSyncKey);
|
|
704
|
+
const { patch, state } = encodeResult;
|
|
705
|
+
const node = {
|
|
706
|
+
tag: 'iq',
|
|
707
|
+
attrs: {
|
|
708
|
+
to: S_WHATSAPP_NET,
|
|
709
|
+
type: 'set',
|
|
710
|
+
xmlns: 'w:sync:app:state'
|
|
711
|
+
},
|
|
712
|
+
content: [
|
|
713
|
+
{
|
|
714
|
+
tag: 'sync',
|
|
715
|
+
attrs: {},
|
|
716
|
+
content: [
|
|
717
|
+
{
|
|
718
|
+
tag: 'collection',
|
|
719
|
+
attrs: {
|
|
720
|
+
name,
|
|
721
|
+
version: (state.version - 1).toString(),
|
|
722
|
+
return_snapshot: 'false'
|
|
723
|
+
},
|
|
724
|
+
content: [
|
|
725
|
+
{
|
|
726
|
+
tag: 'patch',
|
|
727
|
+
attrs: {},
|
|
728
|
+
content: proto.SyncdPatch.encode(patch).finish()
|
|
729
|
+
}
|
|
730
|
+
]
|
|
731
|
+
}
|
|
732
|
+
]
|
|
733
|
+
}
|
|
734
|
+
]
|
|
735
|
+
};
|
|
736
|
+
await query(node);
|
|
737
|
+
await authState.keys.set({ 'app-state-sync-version': { [name]: state } });
|
|
738
|
+
}, authState?.creds?.me?.id || 'app-patch');
|
|
739
|
+
});
|
|
740
|
+
if (config.emitOwnEvents) {
|
|
741
|
+
const { onMutation } = newAppStateChunkHandler(false);
|
|
742
|
+
const { mutationMap } = await decodePatches(name, [{ ...encodeResult.patch, version: { version: encodeResult.state.version } }], initial, getAppStateSyncKey, config.options, undefined, logger);
|
|
743
|
+
for (const key in mutationMap) {
|
|
744
|
+
onMutation(mutationMap[key]);
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
};
|
|
748
|
+
/** fetch AB props */
|
|
749
|
+
const fetchProps = async () => {
|
|
750
|
+
const resultNode = await query({
|
|
751
|
+
tag: 'iq',
|
|
752
|
+
attrs: {
|
|
753
|
+
to: S_WHATSAPP_NET,
|
|
754
|
+
xmlns: 'abt',
|
|
755
|
+
type: 'get'
|
|
756
|
+
},
|
|
757
|
+
content: [
|
|
758
|
+
{
|
|
759
|
+
tag: 'props',
|
|
760
|
+
attrs: {
|
|
761
|
+
protocol: '1',
|
|
762
|
+
...(authState?.creds?.lastPropHash ? { hash: authState.creds.lastPropHash } : {})
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
]
|
|
766
|
+
});
|
|
767
|
+
const propsNode = getBinaryNodeChild(resultNode, 'props');
|
|
768
|
+
let props = {};
|
|
769
|
+
if (propsNode) {
|
|
770
|
+
if (propsNode.attrs?.hash) {
|
|
771
|
+
// on some clients, the hash is returning as undefined
|
|
772
|
+
authState.creds.lastPropHash = propsNode?.attrs?.hash;
|
|
773
|
+
ev.emit('creds.update', authState.creds);
|
|
774
|
+
}
|
|
775
|
+
props = reduceBinaryNodeToDictionary(propsNode, 'prop');
|
|
776
|
+
}
|
|
777
|
+
// Extract protocol-relevant AB props (only the ones we need)
|
|
778
|
+
const privacyTokenProp = props['10518'] ?? props['privacy_token_sending_on_all_1_on_1_messages'];
|
|
779
|
+
if (privacyTokenProp !== undefined) {
|
|
780
|
+
serverProps.privacyTokenOn1to1 = privacyTokenProp === 'true' || privacyTokenProp === '1';
|
|
781
|
+
}
|
|
782
|
+
const profilePicProp = props['9666'] ?? props['profile_scraping_privacy_token_in_photo_iq'];
|
|
783
|
+
if (profilePicProp !== undefined) {
|
|
784
|
+
serverProps.profilePicPrivacyToken = profilePicProp === 'true' || profilePicProp === '1';
|
|
785
|
+
}
|
|
786
|
+
const lidIssueProp = props['14303'] ?? props['lid_trusted_token_issue_to_lid'];
|
|
787
|
+
if (lidIssueProp !== undefined) {
|
|
788
|
+
serverProps.lidTrustedTokenIssueToLid = lidIssueProp === 'true' || lidIssueProp === '1';
|
|
789
|
+
}
|
|
790
|
+
logger.debug({ serverProps }, 'fetched props');
|
|
791
|
+
return props;
|
|
792
|
+
};
|
|
793
|
+
/**
|
|
794
|
+
* modify a chat -- mark unread, read etc.
|
|
795
|
+
* lastMessages must be sorted in reverse chronologically
|
|
796
|
+
* requires the last messages till the last message received; required for archive & unread
|
|
797
|
+
*/
|
|
798
|
+
const chatModify = (mod, jid) => {
|
|
799
|
+
const patch = chatModificationToAppPatch(mod, jid);
|
|
800
|
+
return appPatch(patch);
|
|
801
|
+
};
|
|
802
|
+
/**
|
|
803
|
+
* Enable/Disable link preview privacy, not related to baileys link preview generation
|
|
804
|
+
*/
|
|
805
|
+
const updateDisableLinkPreviewsPrivacy = (isPreviewsDisabled) => {
|
|
806
|
+
return chatModify({
|
|
807
|
+
disableLinkPreviews: { isPreviewsDisabled }
|
|
808
|
+
}, '');
|
|
809
|
+
};
|
|
810
|
+
/**
|
|
811
|
+
* Star or Unstar a message
|
|
812
|
+
*/
|
|
813
|
+
const star = (jid, messages, star) => {
|
|
814
|
+
return chatModify({
|
|
815
|
+
star: {
|
|
816
|
+
messages,
|
|
817
|
+
star
|
|
818
|
+
}
|
|
819
|
+
}, jid);
|
|
820
|
+
};
|
|
821
|
+
/**
|
|
822
|
+
* Add or Edit Contact
|
|
823
|
+
*/
|
|
824
|
+
const addOrEditContact = (jid, contact) => {
|
|
825
|
+
return chatModify({
|
|
826
|
+
contact
|
|
827
|
+
}, jid);
|
|
828
|
+
};
|
|
829
|
+
/**
|
|
830
|
+
* Remove Contact
|
|
831
|
+
*/
|
|
832
|
+
const removeContact = (jid) => {
|
|
833
|
+
return chatModify({
|
|
834
|
+
contact: null
|
|
835
|
+
}, jid);
|
|
836
|
+
};
|
|
837
|
+
/**
|
|
838
|
+
* Adds label
|
|
839
|
+
*/
|
|
840
|
+
const addLabel = (jid, labels) => {
|
|
841
|
+
return chatModify({
|
|
842
|
+
addLabel: {
|
|
843
|
+
...labels
|
|
844
|
+
}
|
|
845
|
+
}, jid);
|
|
846
|
+
};
|
|
847
|
+
/**
|
|
848
|
+
* Adds label for the chats
|
|
849
|
+
*/
|
|
850
|
+
const addChatLabel = (jid, labelId) => {
|
|
851
|
+
return chatModify({
|
|
852
|
+
addChatLabel: {
|
|
853
|
+
labelId
|
|
854
|
+
}
|
|
855
|
+
}, jid);
|
|
856
|
+
};
|
|
857
|
+
/**
|
|
858
|
+
* Removes label for the chat
|
|
859
|
+
*/
|
|
860
|
+
const removeChatLabel = (jid, labelId) => {
|
|
861
|
+
return chatModify({
|
|
862
|
+
removeChatLabel: {
|
|
863
|
+
labelId
|
|
864
|
+
}
|
|
865
|
+
}, jid);
|
|
866
|
+
};
|
|
867
|
+
/**
|
|
868
|
+
* Adds label for the message
|
|
869
|
+
*/
|
|
870
|
+
const addMessageLabel = (jid, messageId, labelId) => {
|
|
871
|
+
return chatModify({
|
|
872
|
+
addMessageLabel: {
|
|
873
|
+
messageId,
|
|
874
|
+
labelId
|
|
875
|
+
}
|
|
876
|
+
}, jid);
|
|
877
|
+
};
|
|
878
|
+
/**
|
|
879
|
+
* Removes label for the message
|
|
880
|
+
*/
|
|
881
|
+
const removeMessageLabel = (jid, messageId, labelId) => {
|
|
882
|
+
return chatModify({
|
|
883
|
+
removeMessageLabel: {
|
|
884
|
+
messageId,
|
|
885
|
+
labelId
|
|
886
|
+
}
|
|
887
|
+
}, jid);
|
|
888
|
+
};
|
|
889
|
+
/**
|
|
890
|
+
* Add or Edit Quick Reply
|
|
891
|
+
*/
|
|
892
|
+
const addOrEditQuickReply = (quickReply) => {
|
|
893
|
+
return chatModify({
|
|
894
|
+
quickReply
|
|
895
|
+
}, '');
|
|
896
|
+
};
|
|
897
|
+
/**
|
|
898
|
+
* Remove Quick Reply
|
|
899
|
+
*/
|
|
900
|
+
const removeQuickReply = (timestamp) => {
|
|
901
|
+
return chatModify({
|
|
902
|
+
quickReply: { timestamp, deleted: true }
|
|
903
|
+
}, '');
|
|
904
|
+
};
|
|
905
|
+
/**
|
|
906
|
+
* queries need to be fired on connection open
|
|
907
|
+
* help ensure parity with WA Web
|
|
908
|
+
* */
|
|
909
|
+
const executeInitQueries = async () => {
|
|
910
|
+
await Promise.all([fetchProps(), fetchBlocklist(), fetchPrivacySettings()]);
|
|
911
|
+
};
|
|
912
|
+
const upsertMessage = ev.createBufferedFunction(async (msg, type) => {
|
|
913
|
+
ev.emit('messages.upsert', { messages: [msg], type });
|
|
914
|
+
if (!!msg.pushName) {
|
|
915
|
+
let jid = msg.key.fromMe ? authState.creds.me.id : msg.key.participant || msg.key.remoteJid;
|
|
916
|
+
jid = jidNormalizedUser(jid);
|
|
917
|
+
if (!msg.key.fromMe) {
|
|
918
|
+
ev.emit('contacts.update', [{ id: jid, notify: msg.pushName, verifiedName: msg.verifiedBizName }]);
|
|
919
|
+
}
|
|
920
|
+
// update our pushname too
|
|
921
|
+
if (msg.key.fromMe && msg.pushName && authState.creds.me?.name !== msg.pushName) {
|
|
922
|
+
ev.emit('creds.update', { me: { ...authState.creds.me, name: msg.pushName } });
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
const historyMsg = getHistoryMsg(msg.message);
|
|
926
|
+
const shouldProcessHistoryMsg = historyMsg
|
|
927
|
+
? shouldSyncHistoryMessage(historyMsg) &&
|
|
928
|
+
PROCESSABLE_HISTORY_TYPES.includes(historyMsg.syncType)
|
|
929
|
+
: false;
|
|
930
|
+
if (historyMsg && shouldProcessHistoryMsg) {
|
|
931
|
+
const syncType = historyMsg.syncType;
|
|
932
|
+
// INITIAL_BOOTSTRAP — fire immediately, no progress check (same as WA Web K function)
|
|
933
|
+
if (syncType === proto.HistorySync.HistorySyncType.INITIAL_BOOTSTRAP &&
|
|
934
|
+
!historySyncStatus.initialBootstrapComplete) {
|
|
935
|
+
historySyncStatus.initialBootstrapComplete = true;
|
|
936
|
+
ev.emit('messaging-history.status', {
|
|
937
|
+
syncType,
|
|
938
|
+
status: 'complete',
|
|
939
|
+
explicit: true
|
|
940
|
+
});
|
|
941
|
+
}
|
|
942
|
+
// RECENT with progress === 100 — explicit completion
|
|
943
|
+
if (syncType === proto.HistorySync.HistorySyncType.RECENT &&
|
|
944
|
+
historyMsg.progress === 100 &&
|
|
945
|
+
!historySyncStatus.recentSyncComplete) {
|
|
946
|
+
historySyncStatus.recentSyncComplete = true;
|
|
947
|
+
clearTimeout(historySyncPausedTimeout);
|
|
948
|
+
historySyncPausedTimeout = undefined;
|
|
949
|
+
ev.emit('messaging-history.status', {
|
|
950
|
+
syncType,
|
|
951
|
+
status: 'complete',
|
|
952
|
+
explicit: true
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
// Reset 120s paused timeout on any RECENT chunk (like WA Web's handleChunkProgress)
|
|
956
|
+
if (syncType === proto.HistorySync.HistorySyncType.RECENT && !historySyncStatus.recentSyncComplete) {
|
|
957
|
+
clearTimeout(historySyncPausedTimeout);
|
|
958
|
+
historySyncPausedTimeout = setTimeout(() => {
|
|
959
|
+
if (!historySyncStatus.recentSyncComplete) {
|
|
960
|
+
historySyncStatus.recentSyncComplete = true;
|
|
961
|
+
ev.emit('messaging-history.status', {
|
|
962
|
+
syncType: proto.HistorySync.HistorySyncType.RECENT,
|
|
963
|
+
status: 'paused',
|
|
964
|
+
explicit: false
|
|
965
|
+
});
|
|
966
|
+
}
|
|
967
|
+
historySyncPausedTimeout = undefined;
|
|
968
|
+
}, HISTORY_SYNC_PAUSED_TIMEOUT_MS);
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
// State machine: decide on sync and flush
|
|
972
|
+
if (historyMsg && syncState === SyncState.AwaitingInitialSync) {
|
|
973
|
+
if (awaitingSyncTimeout) {
|
|
974
|
+
clearTimeout(awaitingSyncTimeout);
|
|
975
|
+
awaitingSyncTimeout = undefined;
|
|
976
|
+
}
|
|
977
|
+
if (shouldProcessHistoryMsg) {
|
|
978
|
+
syncState = SyncState.Syncing;
|
|
979
|
+
logger.info('Transitioned to Syncing state');
|
|
980
|
+
// Let doAppStateSync handle the final flush after it's done
|
|
981
|
+
}
|
|
982
|
+
else {
|
|
983
|
+
syncState = SyncState.Online;
|
|
984
|
+
logger.info('History sync skipped, transitioning to Online state and flushing buffer');
|
|
985
|
+
ev.flush();
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
const doAppStateSync = async () => {
|
|
989
|
+
if (syncState === SyncState.Syncing) {
|
|
990
|
+
// All collections will be synced, so clear any blocked ones
|
|
991
|
+
blockedCollections.clear();
|
|
992
|
+
logger.info('Doing app state sync');
|
|
993
|
+
await resyncAppState(ALL_WA_PATCH_NAMES, true);
|
|
994
|
+
// Sync is complete, go online and flush everything
|
|
995
|
+
syncState = SyncState.Online;
|
|
996
|
+
logger.info('App state sync complete, transitioning to Online state and flushing buffer');
|
|
997
|
+
ev.flush();
|
|
998
|
+
const accountSyncCounter = (authState.creds.accountSyncCounter || 0) + 1;
|
|
999
|
+
ev.emit('creds.update', { accountSyncCounter });
|
|
1000
|
+
}
|
|
1001
|
+
};
|
|
1002
|
+
await Promise.all([
|
|
1003
|
+
(async () => {
|
|
1004
|
+
if (shouldProcessHistoryMsg) {
|
|
1005
|
+
await doAppStateSync();
|
|
1006
|
+
}
|
|
1007
|
+
})(),
|
|
1008
|
+
processMessage(msg, {
|
|
1009
|
+
signalRepository,
|
|
1010
|
+
shouldProcessHistoryMsg,
|
|
1011
|
+
placeholderResendCache,
|
|
1012
|
+
ev,
|
|
1013
|
+
creds: authState.creds,
|
|
1014
|
+
keyStore: authState.keys,
|
|
1015
|
+
logger,
|
|
1016
|
+
options: config.options,
|
|
1017
|
+
getMessage
|
|
1018
|
+
})
|
|
1019
|
+
]);
|
|
1020
|
+
// If the app state key arrives and we are waiting to sync, trigger the sync now.
|
|
1021
|
+
if (msg.message?.protocolMessage?.appStateSyncKeyShare && syncState === SyncState.Syncing) {
|
|
1022
|
+
logger.info('App state sync key arrived, triggering app state sync');
|
|
1023
|
+
await doAppStateSync();
|
|
1024
|
+
}
|
|
1025
|
+
});
|
|
1026
|
+
ws.on('CB:presence', handlePresenceUpdate);
|
|
1027
|
+
ws.on('CB:chatstate', handlePresenceUpdate);
|
|
1028
|
+
ws.on('CB:ib,,dirty', async (node) => {
|
|
1029
|
+
const { attrs } = getBinaryNodeChild(node, 'dirty');
|
|
1030
|
+
const type = attrs.type;
|
|
1031
|
+
switch (type) {
|
|
1032
|
+
case 'account_sync':
|
|
1033
|
+
if (attrs.timestamp) {
|
|
1034
|
+
let { lastAccountSyncTimestamp } = authState.creds;
|
|
1035
|
+
if (lastAccountSyncTimestamp) {
|
|
1036
|
+
await cleanDirtyBits('account_sync', lastAccountSyncTimestamp);
|
|
1037
|
+
}
|
|
1038
|
+
lastAccountSyncTimestamp = +attrs.timestamp;
|
|
1039
|
+
ev.emit('creds.update', { lastAccountSyncTimestamp });
|
|
1040
|
+
}
|
|
1041
|
+
break;
|
|
1042
|
+
case 'groups':
|
|
1043
|
+
// handled in groups.ts
|
|
1044
|
+
break;
|
|
1045
|
+
default:
|
|
1046
|
+
logger.info({ node }, 'received unknown sync');
|
|
1047
|
+
break;
|
|
1048
|
+
}
|
|
1049
|
+
});
|
|
1050
|
+
ev.on('connection.update', ({ connection, receivedPendingNotifications }) => {
|
|
1051
|
+
if (connection === 'close') {
|
|
1052
|
+
blockedCollections.clear();
|
|
1053
|
+
clearTimeout(historySyncPausedTimeout);
|
|
1054
|
+
historySyncPausedTimeout = undefined;
|
|
1055
|
+
}
|
|
1056
|
+
if (connection === 'open') {
|
|
1057
|
+
if (fireInitQueries) {
|
|
1058
|
+
executeInitQueries().catch(error => onUnexpectedError(error, 'init queries'));
|
|
1059
|
+
}
|
|
1060
|
+
sendPresenceUpdate(markOnlineOnConnect ? 'available' : 'unavailable').catch(error => onUnexpectedError(error, 'presence update requests'));
|
|
1061
|
+
}
|
|
1062
|
+
if (!receivedPendingNotifications || syncState !== SyncState.Connecting) {
|
|
1063
|
+
return;
|
|
1064
|
+
}
|
|
1065
|
+
historySyncStatus.initialBootstrapComplete = false;
|
|
1066
|
+
historySyncStatus.recentSyncComplete = false;
|
|
1067
|
+
clearTimeout(historySyncPausedTimeout);
|
|
1068
|
+
historySyncPausedTimeout = undefined;
|
|
1069
|
+
syncState = SyncState.AwaitingInitialSync;
|
|
1070
|
+
logger.info('Connection is now AwaitingInitialSync, buffering events');
|
|
1071
|
+
ev.buffer();
|
|
1072
|
+
const willSyncHistory = shouldSyncHistoryMessage(proto.Message.HistorySyncNotification.create({
|
|
1073
|
+
syncType: proto.HistorySync.HistorySyncType.RECENT
|
|
1074
|
+
}));
|
|
1075
|
+
if (!willSyncHistory) {
|
|
1076
|
+
logger.info('History sync is disabled by config, not waiting for notification. Transitioning to Online.');
|
|
1077
|
+
syncState = SyncState.Online;
|
|
1078
|
+
setTimeout(() => ev.flush(), 0);
|
|
1079
|
+
return;
|
|
1080
|
+
}
|
|
1081
|
+
// On reconnection (accountSyncCounter > 0), the server does not push
|
|
1082
|
+
// history sync notifications — the device already has its data.
|
|
1083
|
+
// Skip the 20s wait and go online immediately.
|
|
1084
|
+
if (authState.creds.accountSyncCounter > 0) {
|
|
1085
|
+
logger.info('Reconnection with existing sync data, skipping history sync wait. Transitioning to Online.');
|
|
1086
|
+
syncState = SyncState.Online;
|
|
1087
|
+
setTimeout(() => ev.flush(), 0);
|
|
1088
|
+
return;
|
|
1089
|
+
}
|
|
1090
|
+
logger.info('First connection, awaiting history sync notification with a 20s timeout.');
|
|
1091
|
+
if (awaitingSyncTimeout) {
|
|
1092
|
+
clearTimeout(awaitingSyncTimeout);
|
|
1093
|
+
}
|
|
1094
|
+
awaitingSyncTimeout = setTimeout(() => {
|
|
1095
|
+
if (syncState === SyncState.AwaitingInitialSync) {
|
|
1096
|
+
logger.warn('Timeout in AwaitingInitialSync, forcing state to Online and flushing buffer');
|
|
1097
|
+
syncState = SyncState.Online;
|
|
1098
|
+
ev.flush();
|
|
1099
|
+
// Increment so subsequent reconnections skip the 20s wait.
|
|
1100
|
+
// Late-arriving history is still processed via processMessage
|
|
1101
|
+
// regardless of the state machine phase.
|
|
1102
|
+
const accountSyncCounter = (authState.creds.accountSyncCounter || 0) + 1;
|
|
1103
|
+
ev.emit('creds.update', { accountSyncCounter });
|
|
1104
|
+
}
|
|
1105
|
+
}, 20000);
|
|
1106
|
+
});
|
|
1107
|
+
// When an app state sync key arrives (myAppStateKeyId is set) and there are
|
|
1108
|
+
// collections blocked on a missing key, trigger a re-sync for just those collections.
|
|
1109
|
+
// This mirrors WA Web's Blocked → retry-on-key-arrival behavior.
|
|
1110
|
+
ev.on('creds.update', ({ myAppStateKeyId }) => {
|
|
1111
|
+
if (!myAppStateKeyId || blockedCollections.size === 0) {
|
|
1112
|
+
return;
|
|
1113
|
+
}
|
|
1114
|
+
// If we're in the middle of a full sync, doAppStateSync handles all collections
|
|
1115
|
+
if (syncState === SyncState.Syncing) {
|
|
1116
|
+
blockedCollections.clear();
|
|
1117
|
+
return;
|
|
1118
|
+
}
|
|
1119
|
+
const collections = [...blockedCollections];
|
|
1120
|
+
blockedCollections.clear();
|
|
1121
|
+
logger.info({ collections }, 'app state sync key arrived, re-syncing blocked collections');
|
|
1122
|
+
resyncAppState(collections, false).catch(error => onUnexpectedError(error, 'blocked collections resync'));
|
|
1123
|
+
});
|
|
1124
|
+
ev.on('lid-mapping.update', async ({ lid, pn }) => {
|
|
1125
|
+
try {
|
|
1126
|
+
await signalRepository.lidMapping.storeLIDPNMappings([{ lid, pn }]);
|
|
1127
|
+
}
|
|
1128
|
+
catch (error) {
|
|
1129
|
+
logger.warn({ lid, pn, error }, 'Failed to store LID-PN mapping');
|
|
1130
|
+
}
|
|
1131
|
+
});
|
|
1132
|
+
registerSocketEndHandler(() => {
|
|
1133
|
+
if (awaitingSyncTimeout) {
|
|
1134
|
+
clearTimeout(awaitingSyncTimeout);
|
|
1135
|
+
awaitingSyncTimeout = undefined;
|
|
1136
|
+
}
|
|
1137
|
+
if (!config.placeholderResendCache && placeholderResendCache.close) {
|
|
1138
|
+
placeholderResendCache.close();
|
|
1139
|
+
}
|
|
1140
|
+
syncState = SyncState.Connecting;
|
|
1141
|
+
privacySettings = undefined;
|
|
1142
|
+
});
|
|
1143
|
+
return {
|
|
1144
|
+
...sock,
|
|
1145
|
+
serverProps,
|
|
1146
|
+
createCallLink,
|
|
1147
|
+
getBotListV2,
|
|
1148
|
+
messageMutex,
|
|
1149
|
+
receiptMutex,
|
|
1150
|
+
appStatePatchMutex,
|
|
1151
|
+
notificationMutex,
|
|
1152
|
+
fetchPrivacySettings,
|
|
1153
|
+
upsertMessage,
|
|
1154
|
+
appPatch,
|
|
1155
|
+
sendPresenceUpdate,
|
|
1156
|
+
presenceSubscribe,
|
|
1157
|
+
profilePictureUrl,
|
|
1158
|
+
fetchBlocklist,
|
|
1159
|
+
fetchStatus,
|
|
1160
|
+
fetchDisappearingDuration,
|
|
1161
|
+
updateProfilePicture,
|
|
1162
|
+
removeProfilePicture,
|
|
1163
|
+
updateProfileStatus,
|
|
1164
|
+
updateProfileName,
|
|
1165
|
+
updateBlockStatus,
|
|
1166
|
+
updateDisableLinkPreviewsPrivacy,
|
|
1167
|
+
updateCallPrivacy,
|
|
1168
|
+
updateMessagesPrivacy,
|
|
1169
|
+
updateLastSeenPrivacy,
|
|
1170
|
+
updateOnlinePrivacy,
|
|
1171
|
+
updateProfilePicturePrivacy,
|
|
1172
|
+
updateStatusPrivacy,
|
|
1173
|
+
updateReadReceiptsPrivacy,
|
|
1174
|
+
updateGroupsAddPrivacy,
|
|
1175
|
+
updateDefaultDisappearingMode,
|
|
1176
|
+
getBusinessProfile,
|
|
1177
|
+
resyncAppState,
|
|
1178
|
+
chatModify,
|
|
1179
|
+
cleanDirtyBits,
|
|
1180
|
+
addOrEditContact,
|
|
1181
|
+
removeContact,
|
|
1182
|
+
placeholderResendCache,
|
|
1183
|
+
addLabel,
|
|
1184
|
+
addChatLabel,
|
|
1185
|
+
removeChatLabel,
|
|
1186
|
+
addMessageLabel,
|
|
1187
|
+
removeMessageLabel,
|
|
1188
|
+
star,
|
|
1189
|
+
addOrEditQuickReply,
|
|
1190
|
+
removeQuickReply
|
|
1191
|
+
};
|
|
1192
|
+
};
|
|
1193
|
+
//# sourceMappingURL=chats.js.map
|