@openclaw/matrix 2026.8.1-beta.3 → 2026.8.2
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/dist/{account-config-BZWN9tGS.js → account-config-CRsKoMqJ.js} +1 -1
- package/dist/{account-selection-CWuhuFn1.js → account-selection-DA-jfx22.js} +74 -36
- package/dist/{accounts-BCzyubQt.js → accounts-DR1c4xF_.js} +4 -5
- package/dist/api.js +5 -5
- package/dist/{approval-handler.runtime-CSvueU9P.js → approval-handler.runtime-xcVrZw9o.js} +8 -6
- package/dist/{approval-ids-CEcf-EiM.js → approval-ids-hmvhDNBj.js} +1 -1
- package/dist/{approval-reaction-auth-CziKXatm.js → approval-reaction-auth-DziFGHSk.js} +2 -2
- package/dist/{approval-reactions-tXh9KYrW.js → approval-reactions-1fwEhoK9.js} +1 -1
- package/dist/{channel-CzQw5OZN.js → channel-D6-ajB_u.js} +70 -55
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-I9pBRQb3.js → channel.runtime-BMA0dG2k.js} +18 -14
- package/dist/{channel.setup-aNaa3Uyn.js → channel.setup-OIEzCzSs.js} +28 -21
- package/dist/{cli-iR6QJ5U0.js → cli-B6HF7Hmn.js} +43 -33
- package/dist/{cli-metadata-BmUYWjuM.js → cli-metadata-Mtzu5-AY.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{client-D8XghqmX.js → client-B0yMDho1.js} +2 -2
- package/dist/{client-BBQdBG7t.js → client-DFsRJEgB.js} +137 -75
- package/dist/{client-bootstrap-Co3RlItb.js → client-bootstrap-DjXCKEtg.js} +1 -1
- package/dist/{config-update-Bor_Pjsv.js → config-update-BnX26jCO.js} +48 -31
- package/dist/contract-api.js +2 -2
- package/dist/{credentials-BdAaWuiR.js → credentials-DJj2xs3q.js} +4 -8
- package/dist/{credentials-read-B37cQknZ.js → credentials-read-mexhw-Ur.js} +7 -5
- package/dist/{credentials-write.runtime-nAV2-5uR.js → credentials-write.runtime-DQt-kgJq.js} +1 -1
- package/dist/{crypto-runtime-Bnz3zEcS.js → crypto-runtime-QvlgyCkj.js} +6 -6
- package/dist/{deps-CcVJfvRM.js → deps-mtxF2mHI.js} +1 -1
- package/dist/{directory-live-DLQzel12.js → directory-live-Drh343TW.js} +8 -6
- package/dist/{doctor-EWf9CDso.js → doctor-CJE8wO6y.js} +1 -1
- package/dist/{doctor-contract-DEt4O4Zt.js → doctor-contract-HyWFZQVG.js} +5 -4
- package/dist/doctor-contract-api.js +7 -7
- package/dist/{draft-stream-DQ7QNC-l.js → draft-stream-DhGHVdO4.js} +1 -1
- package/dist/{encryption-guidance-DmLY8NiO.js → encryption-guidance-BNcZNQZI.js} +3 -2
- package/dist/event-helpers-XRfAbOIh.js +46 -0
- package/dist/helper-api.js +1 -1
- package/dist/{http-client-CycYxU9-.js → http-client-DOmFvKvB.js} +13 -54
- package/dist/{idb-persistence-BM0P27Zg.js → idb-persistence-D4NGNQxt.js} +3 -3
- package/dist/{idb-persistence-lock-DAJ49nZX.js → idb-persistence-lock-B3fZXyF_.js} +1 -1
- package/dist/{inbound-dedupe-RvSLqdsz.js → inbound-dedupe-Ch33GU06.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{messages-DEqg7HVy.js → messages-DlMQaC02.js} +161 -25
- package/dist/{monitor-FNrfkuWL.js → monitor-U2LcVtHt.js} +232 -203
- package/dist/plugin-entry.handlers.runtime.js +1 -1
- package/dist/probe.runtime-CNo-5_iz.js +2 -0
- package/dist/{profile-update-BQlE5s2J.js → profile-update-CsyKA9jI.js} +5 -4
- package/dist/{profile-D-Wubo0A.js → profile-vmjsmhh4.js} +1 -1
- package/dist/{reaction-events-BKOLlnCo.js → reaction-events-lwNc5I1X.js} +10 -8
- package/dist/{resolve-targets-e7AI0P75.js → resolve-targets-D3Eakgzs.js} +1 -1
- package/dist/{resolver.runtime-V8u0pHEb.js → resolver.runtime-DJQxR35r.js} +1 -1
- package/dist/{room-info-BXQA7y10.js → room-info-DIU67XLP.js} +55 -1
- package/dist/runtime-api.js +2 -2
- package/dist/{sdk-NxK3vzMa.js → sdk-Jl2CgAbJ.js} +573 -47
- package/dist/{send-ClHgDZLT.js → send-DfS5ciUL.js} +57 -34
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/{setup-bootstrap-BGPjbA5N.js → setup-bootstrap-CWoIWudw.js} +3 -3
- package/dist/{setup-core-DigrLebY.js → setup-core-CZM496H-.js} +8 -7
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-Dtn8sAWs.js → setup-surface-DSZtOsWK.js} +84 -79
- package/dist/{startup-verification-Cs08ca8u.js → startup-verification-1Ney1mmI.js} +2 -2
- package/dist/{storage-BsGuHngK.js → storage-BVf4uucD.js} +5 -4
- package/dist/{subagent-hooks-CMoZaARG.js → subagent-hooks-DeICLbU5.js} +5 -1
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/sync-cache-state-d-A_OhbU.js +234 -0
- package/dist/{thread-bindings-BYEGfw3h.js → thread-bindings-2HN2AyLu.js} +4 -4
- package/dist/{tool-actions.runtime-ck6IJyP0.js → tool-actions.runtime-CFZZPG5g.js} +267 -213
- package/dist/{verification-CabtBTtB.js → verification-CD7k5vE9.js} +2 -2
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/CHANGELOG.md +29 -3
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/README.md +23 -14
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/RELEASING.md +6 -2
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/download-lib.js +33 -14
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/index.d.ts +14 -0
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/package.json +41 -42
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/package.json +1 -1
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm.d.ts +16 -4
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.cjs +25 -9
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.js +23 -7
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm +0 -0
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm.d.ts +1 -0
- package/node_modules/markdown-it/README.md +18 -294
- package/node_modules/markdown-it/bin/markdown-it.mjs +2 -2
- package/node_modules/markdown-it/dist/browser/markdown-it.esm.min.mjs +2972 -0
- package/node_modules/markdown-it/dist/browser/markdown-it.esm.min.mjs.map +1 -0
- package/node_modules/markdown-it/dist/browser/markdown-it.umd.min.js +14 -0
- package/node_modules/markdown-it/dist/browser/markdown-it.umd.min.js.map +1 -0
- package/node_modules/markdown-it/dist/markdown-it.cjs.js +4412 -0
- package/node_modules/markdown-it/dist/markdown-it.cjs.js.map +1 -0
- package/node_modules/markdown-it/dist/markdown-it.d.cts +19 -0
- package/node_modules/markdown-it/dist/markdown-it.d.mts +979 -0
- package/node_modules/markdown-it/dist/{index.cjs.js → markdown-it.mjs} +1437 -1466
- package/node_modules/markdown-it/dist/markdown-it.mjs.map +1 -0
- package/node_modules/markdown-it/node_modules/argparse/README.md +46 -41
- package/node_modules/markdown-it/node_modules/argparse/lib/_colorize.js +72 -0
- package/node_modules/markdown-it/node_modules/argparse/lib/argparse.d.ts +292 -0
- package/node_modules/markdown-it/node_modules/argparse/{argparse.js → lib/argparse.js} +1124 -1027
- package/node_modules/markdown-it/node_modules/argparse/lib/difflib.js +190 -0
- package/node_modules/markdown-it/node_modules/argparse/lib/sub.js +4 -4
- package/node_modules/markdown-it/node_modules/argparse/lib/textwrap.js +28 -28
- package/node_modules/markdown-it/node_modules/argparse/package.json +17 -10
- package/node_modules/markdown-it/node_modules/entities/dist/decode-codepoint.d.ts +8 -0
- package/node_modules/markdown-it/node_modules/entities/dist/decode-codepoint.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/decode-codepoint.js +46 -0
- package/node_modules/markdown-it/node_modules/entities/dist/decode-codepoint.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/{lib/esm → dist}/decode.d.ts +28 -45
- package/node_modules/markdown-it/node_modules/entities/dist/decode.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/{lib/esm → dist}/decode.js +189 -141
- package/node_modules/markdown-it/node_modules/entities/dist/decode.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/{lib/esm → dist}/encode.d.ts +4 -2
- package/node_modules/markdown-it/node_modules/entities/dist/encode.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/encode.js +90 -0
- package/node_modules/markdown-it/node_modules/entities/dist/encode.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/{lib → dist}/escape.d.ts +15 -10
- package/node_modules/markdown-it/node_modules/entities/dist/escape.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/escape.js +132 -0
- package/node_modules/markdown-it/node_modules/entities/dist/escape.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-html.d.ts +3 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-html.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-html.js +5 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-html.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-xml.d.ts +3 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-xml.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-xml.js +5 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-xml.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/encode-html.d.ts +5 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/encode-html.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/encode-html.js +12 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/encode-html.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/{lib → dist}/index.d.ts +14 -21
- package/node_modules/markdown-it/node_modules/entities/dist/index.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/index.js +91 -0
- package/node_modules/markdown-it/node_modules/entities/dist/index.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/bin-trie-flags.d.ts +17 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/bin-trie-flags.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/bin-trie-flags.js +18 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/bin-trie-flags.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/decode-shared.d.ts +7 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/decode-shared.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/decode-shared.js +17 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/decode-shared.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/encode-shared.d.ts +33 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/encode-shared.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/encode-shared.js +93 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/encode-shared.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/package.json +63 -70
- package/node_modules/markdown-it/node_modules/entities/readme.md +54 -45
- package/node_modules/markdown-it/node_modules/entities/src/decode-codepoint.ts +50 -0
- package/node_modules/markdown-it/node_modules/entities/src/decode.ts +671 -0
- package/node_modules/markdown-it/node_modules/entities/src/encode.ts +95 -0
- package/node_modules/markdown-it/node_modules/entities/src/escape.ts +160 -0
- package/node_modules/markdown-it/node_modules/entities/src/generated/decode-data-html.ts +7 -0
- package/node_modules/markdown-it/node_modules/entities/src/generated/decode-data-xml.ts +7 -0
- package/node_modules/markdown-it/node_modules/entities/src/generated/encode-html.ts +18 -0
- package/node_modules/markdown-it/node_modules/entities/src/index.ts +162 -0
- package/node_modules/markdown-it/node_modules/entities/src/internal/bin-trie-flags.ts +16 -0
- package/node_modules/markdown-it/node_modules/entities/src/internal/decode-shared.ts +18 -0
- package/node_modules/markdown-it/node_modules/entities/src/internal/encode-shared.ts +123 -0
- package/node_modules/markdown-it/node_modules/linkify-it/README.md +49 -86
- package/node_modules/markdown-it/node_modules/linkify-it/build/index.cjs.js +636 -825
- package/node_modules/markdown-it/node_modules/linkify-it/build/index.cjs.js.map +1 -0
- package/node_modules/markdown-it/node_modules/linkify-it/build/index.d.ts +236 -0
- package/node_modules/markdown-it/node_modules/linkify-it/build/index.mjs +538 -0
- package/node_modules/markdown-it/node_modules/linkify-it/build/index.mjs.map +1 -0
- package/node_modules/markdown-it/node_modules/linkify-it/package.json +23 -20
- package/node_modules/markdown-it/node_modules/uc.micro/README.md +18 -1
- package/node_modules/markdown-it/node_modules/uc.micro/build/index.cjs.js +13 -18
- package/node_modules/markdown-it/node_modules/uc.micro/build/index.d.ts +6 -0
- package/node_modules/markdown-it/node_modules/uc.micro/build/index.mjs +8 -0
- package/node_modules/markdown-it/node_modules/uc.micro/package.json +12 -17
- package/node_modules/markdown-it/package.json +48 -30
- package/node_modules/matrix-js-sdk/CHANGELOG.md +33 -0
- package/node_modules/matrix-js-sdk/lib/@types/PushRules.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/PushRules.js +0 -5
- package/node_modules/matrix-js-sdk/lib/@types/PushRules.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/auth.d.ts +0 -5
- package/node_modules/matrix-js-sdk/lib/@types/auth.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/auth.js +0 -11
- package/node_modules/matrix-js-sdk/lib/@types/auth.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/beacon.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/beacon.js +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/beacon.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/crypto.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/crypto.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/event.d.ts +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/event.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/event.js +1 -0
- package/node_modules/matrix-js-sdk/lib/@types/event.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/extensible_events.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/extensible_events.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/matrix-sdk-crypto-wasm.d.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/media.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/partials.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/partials.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/requests.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/requests.js +0 -5
- package/node_modules/matrix-js-sdk/lib/@types/requests.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/search.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/search.js +0 -3
- package/node_modules/matrix-js-sdk/lib/@types/search.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/spaces.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/spaces.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/synapse.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/synapse.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/threepids.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/type-guards.d.ts +43 -0
- package/node_modules/matrix-js-sdk/lib/@types/type-guards.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/@types/type-guards.js +104 -0
- package/node_modules/matrix-js-sdk/lib/@types/type-guards.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/NamespacedValue.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/ReEmitter.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/ToDeviceMessageQueue.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/ToDeviceMessageQueue.js +0 -2
- package/node_modules/matrix-js-sdk/lib/ToDeviceMessageQueue.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/autodiscovery.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/autodiscovery.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/browser-index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/browser-index.js +3 -1
- package/node_modules/matrix-js-sdk/lib/browser-index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/capabilityPoller.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/client.d.ts +23 -21
- package/node_modules/matrix-js-sdk/lib/client.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/client.js +44 -96
- package/node_modules/matrix-js-sdk/lib/client.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/common-crypto/CryptoBackend.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/common-crypto/key-passphrase.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/common-crypto/key-passphrase.js +1 -4
- package/node_modules/matrix-js-sdk/lib/common-crypto/key-passphrase.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/content-helpers.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/base.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/base.js +0 -9
- package/node_modules/matrix-js-sdk/lib/crypto/store/base.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/indexeddb-crypto-store-backend.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/indexeddb-crypto-store-backend.js +2 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/indexeddb-crypto-store-backend.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/indexeddb-crypto-store.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/indexeddb-crypto-store.js +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/indexeddb-crypto-store.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/localStorage-crypto-store.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/localStorage-crypto-store.js +0 -2
- package/node_modules/matrix-js-sdk/lib/crypto/store/localStorage-crypto-store.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/memory-crypto-store.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/memory-crypto-store.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/index.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/keybackup.d.ts +13 -6
- package/node_modules/matrix-js-sdk/lib/crypto-api/keybackup.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/keybackup.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/verification.d.ts +23 -5
- package/node_modules/matrix-js-sdk/lib/crypto-api/verification.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/verification.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/embedded.d.ts +16 -0
- package/node_modules/matrix-js-sdk/lib/embedded.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/embedded.js +19 -11
- package/node_modules/matrix-js-sdk/lib/embedded.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/errors.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/ExtensibleEvent.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/InvalidEventError.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/MessageEvent.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollEndEvent.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollResponseEvent.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollStartEvent.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/feature.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/feature.js +0 -3
- package/node_modules/matrix-js-sdk/lib/feature.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/filter-component.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/filter-component.js +2 -5
- package/node_modules/matrix-js-sdk/lib/filter-component.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/filter.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/filter.js +0 -4
- package/node_modules/matrix-js-sdk/lib/filter.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/errors.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/fetch.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/fetch.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/fetch.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/index.d.ts +1 -7
- package/node_modules/matrix-js-sdk/lib/http-api/index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/index.js +0 -15
- package/node_modules/matrix-js-sdk/lib/http-api/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/interface.d.ts +0 -9
- package/node_modules/matrix-js-sdk/lib/http-api/interface.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/interface.js +0 -2
- package/node_modules/matrix-js-sdk/lib/http-api/interface.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/refresh.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/refresh.js +0 -3
- package/node_modules/matrix-js-sdk/lib/http-api/refresh.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/interactive-auth.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/interactive-auth.js +5 -6
- package/node_modules/matrix-js-sdk/lib/interactive-auth.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/logger.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/logger.js +0 -2
- package/node_modules/matrix-js-sdk/lib/logger.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrix.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/matrix.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrix.js +1 -1
- package/node_modules/matrix-js-sdk/lib/matrix.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.d.ts +3 -3
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.js +5 -5
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts +18 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js +56 -4
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSessionManager.d.ts +14 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSessionManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSessionManager.js +20 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSessionManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js +9 -6
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManagerActionScheduler.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManagerActionScheduler.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/ToDeviceKeyTransport.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/ToDeviceKeyTransport.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/index.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/index.js +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/common.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.d.ts +6 -3
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.js +7 -4
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.d.ts +19 -6
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.js +11 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/utils.d.ts +0 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/utils.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/utils.js +0 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/utils.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/MSC3089Branch.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/MSC3089TreeSpace.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/beacon.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/device.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event-context.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.js +3 -3
- package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event-timeline.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event.js +0 -6
- package/node_modules/matrix-js-sdk/lib/models/event.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/invites-ignorer.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/invites-ignorer.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/poll.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/poll.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/read-receipt.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/read-receipt.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/related-relations.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/relations-container.d.ts +10 -0
- package/node_modules/matrix-js-sdk/lib/models/relations-container.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/relations-container.js +39 -17
- package/node_modules/matrix-js-sdk/lib/models/relations-container.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/relations.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/relations.js +1 -1
- package/node_modules/matrix-js-sdk/lib/models/relations.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-member.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-receipts.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-retention.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-state.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-state.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-summary.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room.js +9 -9
- package/node_modules/matrix-js-sdk/lib/models/room.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/search-result.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/thread.d.ts +5 -2
- package/node_modules/matrix-js-sdk/lib/models/thread.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/thread.js +36 -3
- package/node_modules/matrix-js-sdk/lib/models/thread.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/typed-event-emitter.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/user.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/authorize.d.ts +133 -0
- package/node_modules/matrix-js-sdk/lib/oauth/authorize.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/oauth/authorize.js +193 -0
- package/node_modules/matrix-js-sdk/lib/oauth/authorize.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/oauth/discover.d.ts +58 -0
- package/node_modules/matrix-js-sdk/lib/oauth/discover.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/oauth/discover.js +35 -0
- package/node_modules/matrix-js-sdk/lib/oauth/discover.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/oauth/error.d.ts +19 -0
- package/node_modules/matrix-js-sdk/lib/oauth/error.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/oauth/error.js +36 -0
- package/node_modules/matrix-js-sdk/lib/oauth/error.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/oauth/index.d.ts +87 -0
- package/node_modules/matrix-js-sdk/lib/oauth/index.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/oauth/index.js +236 -0
- package/node_modules/matrix-js-sdk/lib/oauth/index.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/oauth/register.d.ts +136 -0
- package/node_modules/matrix-js-sdk/lib/oauth/register.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/oauth/register.js +73 -0
- package/node_modules/matrix-js-sdk/lib/oauth/register.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/oauth/tokenRefresher.d.ts +21 -0
- package/node_modules/matrix-js-sdk/lib/oauth/tokenRefresher.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/oauth/tokenRefresher.js +68 -0
- package/node_modules/matrix-js-sdk/lib/oauth/tokenRefresher.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/pollingCachedValue.d.ts +77 -0
- package/node_modules/matrix-js-sdk/lib/pollingCachedValue.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/pollingCachedValue.js +160 -0
- package/node_modules/matrix-js-sdk/lib/pollingCachedValue.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/pushprocessor.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/pushprocessor.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/realtime-callbacks.js +0 -1
- package/node_modules/matrix-js-sdk/lib/realtime-callbacks.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/receipt-accumulator.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/receipt-accumulator.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.d.ts +7 -7
- package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.js +13 -14
- package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousError.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/channels/MSC4108SecureChannel.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/transports/MSC4108RendezvousSession.js +0 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/transports/MSC4108RendezvousSession.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/retentionPolicy.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/room-hierarchy.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rtcTransportsCachedValue.d.ts +9 -0
- package/node_modules/matrix-js-sdk/lib/rtcTransportsCachedValue.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/rtcTransportsCachedValue.js +38 -0
- package/node_modules/matrix-js-sdk/lib/rtcTransportsCachedValue.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/rust-crypto/CrossSigningIdentity.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/DehydratedDeviceManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/DehydratedDeviceManager.js +11 -13
- package/node_modules/matrix-js-sdk/lib/rust-crypto/DehydratedDeviceManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/KeyClaimManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/OutgoingRequestProcessor.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/OutgoingRequestProcessor.js +0 -2
- package/node_modules/matrix-js-sdk/lib/rust-crypto/OutgoingRequestProcessor.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/OutgoingRequestsManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/PerSessionKeyBackupDownloader.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/RoomEncryptor.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.d.ts +23 -4
- package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.js +62 -21
- package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/device-converter.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/device-converter.js +1 -0
- package/node_modules/matrix-js-sdk/lib/rust-crypto/device-converter.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/index.d.ts +17 -4
- package/node_modules/matrix-js-sdk/lib/rust-crypto/index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/index.js +21 -4
- package/node_modules/matrix-js-sdk/lib/rust-crypto/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/libolm_migration.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/libolm_migration.js +0 -2
- package/node_modules/matrix-js-sdk/lib/rust-crypto/libolm_migration.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.js +0 -3
- package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/verification.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/scheduler.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/scheduler.js +0 -3
- package/node_modules/matrix-js-sdk/lib/scheduler.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/secret-storage.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/serverCapabilities.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.js +6 -0
- package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sliding-sync.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sliding-sync.js +3 -0
- package/node_modules/matrix-js-sdk/lib/sliding-sync.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-local-backend.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-local-backend.js +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-local-backend.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-remote-backend.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-store-worker.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-store-worker.js +1 -0
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-store-worker.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb.js +0 -2
- package/node_modules/matrix-js-sdk/lib/store/indexeddb.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/memory.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/memory.js +7 -9
- package/node_modules/matrix-js-sdk/lib/store/memory.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/stub.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sync-accumulator.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sync-accumulator.js +1 -5
- package/node_modules/matrix-js-sdk/lib/sync-accumulator.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sync.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sync.js +9 -9
- package/node_modules/matrix-js-sdk/lib/sync.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/testing.d.ts +2 -10
- package/node_modules/matrix-js-sdk/lib/testing.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/testing.js +4 -19
- package/node_modules/matrix-js-sdk/lib/testing.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/timeline-window.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/timeline-window.js +0 -1
- package/node_modules/matrix-js-sdk/lib/timeline-window.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/utils/internal/deriveKeys.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/utils/internal/deriveKeys.js +0 -1
- package/node_modules/matrix-js-sdk/lib/utils/internal/deriveKeys.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/utils.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/utils.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/utils.js +1 -0
- package/node_modules/matrix-js-sdk/lib/utils.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/call.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/call.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/callEventHandler.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/callEventTypes.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/callEventTypes.js +0 -5
- package/node_modules/matrix-js-sdk/lib/webrtc/callEventTypes.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/callFeed.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/groupCall.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/groupCall.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/groupCallEventHandler.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/mediaHandler.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/mediaHandler.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/callFeedStatsReporter.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/callStatsReportGatherer.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/callStatsReportGatherer.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/connectionStatsBuilder.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/connectionStatsReportBuilder.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/groupCallStats.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaSsrcHandler.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaTrackHandler.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaTrackStats.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaTrackStatsHandler.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/statsReportEmitter.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/summaryStatsReportGatherer.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/trackStatsBuilder.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/transportStatsBuilder.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/transportStatsBuilder.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/valueFormatter.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/wellKnownCachedValue.d.ts +8 -0
- package/node_modules/matrix-js-sdk/lib/wellKnownCachedValue.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/wellKnownCachedValue.js +34 -0
- package/node_modules/matrix-js-sdk/lib/wellKnownCachedValue.js.map +1 -0
- package/node_modules/matrix-js-sdk/node_modules/content-type/README.md +2 -0
- package/node_modules/matrix-js-sdk/node_modules/content-type/dist/index.d.ts +20 -0
- package/node_modules/matrix-js-sdk/node_modules/content-type/dist/index.js +20 -14
- package/node_modules/matrix-js-sdk/node_modules/content-type/dist/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/content-type/package.json +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/dist/api.js +227 -131
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/dist/api.min.js +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/ClientWidgetApi.d.ts +1 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/ClientWidgetApi.js +142 -97
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/ClientWidgetApi.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/WidgetApi.d.ts +15 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/WidgetApi.js +61 -19
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/WidgetApi.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/driver/WidgetDriver.d.ts +15 -11
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/driver/WidgetDriver.js +19 -13
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/driver/WidgetDriver.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/index.d.ts +1 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/ApiVersion.d.ts +2 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/ApiVersion.js +2 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/ApiVersion.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/Capabilities.d.ts +5 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/Capabilities.js +1 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/Capabilities.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/RtcTransportsAction.d.ts +24 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/RtcTransportsAction.js +6 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/RtcTransportsAction.js.map +1 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/SendEventAction.d.ts +1 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/SendEventAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/WidgetApiAction.d.ts +5 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/WidgetApiAction.js +1 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/WidgetApiAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/package.json +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/src/ClientWidgetApi.ts +37 -14
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/src/WidgetApi.ts +69 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/src/driver/WidgetDriver.ts +19 -12
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/src/index.ts +1 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/src/interfaces/ApiVersion.ts +2 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/src/interfaces/Capabilities.ts +4 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/src/interfaces/RtcTransportsAction.ts +44 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/src/interfaces/SendEventAction.ts +1 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/src/interfaces/WidgetApiAction.ts +5 -0
- package/node_modules/matrix-js-sdk/package.json +10 -12
- package/node_modules/matrix-js-sdk/src/@types/PushRules.ts +0 -5
- package/node_modules/matrix-js-sdk/src/@types/auth.ts +0 -12
- package/node_modules/matrix-js-sdk/src/@types/beacon.ts +1 -1
- package/node_modules/matrix-js-sdk/src/@types/crypto.ts +2 -6
- package/node_modules/matrix-js-sdk/src/@types/event.ts +3 -0
- package/node_modules/matrix-js-sdk/src/@types/extensible_events.ts +5 -6
- package/node_modules/matrix-js-sdk/src/@types/matrix-sdk-crypto-wasm.d.ts +0 -1
- package/node_modules/matrix-js-sdk/src/@types/media.ts +1 -1
- package/node_modules/matrix-js-sdk/src/@types/partials.ts +0 -2
- package/node_modules/matrix-js-sdk/src/@types/requests.ts +0 -5
- package/node_modules/matrix-js-sdk/src/@types/search.ts +0 -2
- package/node_modules/matrix-js-sdk/src/@types/spaces.ts +0 -2
- package/node_modules/matrix-js-sdk/src/@types/synapse.ts +0 -2
- package/node_modules/matrix-js-sdk/src/@types/threepids.ts +2 -2
- package/node_modules/matrix-js-sdk/src/@types/type-guards.ts +126 -0
- package/node_modules/matrix-js-sdk/src/ToDeviceMessageQueue.ts +0 -2
- package/node_modules/matrix-js-sdk/src/autodiscovery.ts +2 -2
- package/node_modules/matrix-js-sdk/src/browser-index.ts +4 -4
- package/node_modules/matrix-js-sdk/src/client.ts +86 -133
- package/node_modules/matrix-js-sdk/src/common-crypto/key-passphrase.ts +1 -2
- package/node_modules/matrix-js-sdk/src/crypto/store/base.ts +1 -8
- package/node_modules/matrix-js-sdk/src/crypto/store/indexeddb-crypto-store-backend.ts +3 -2
- package/node_modules/matrix-js-sdk/src/crypto/store/indexeddb-crypto-store.ts +1 -3
- package/node_modules/matrix-js-sdk/src/crypto/store/localStorage-crypto-store.ts +0 -1
- package/node_modules/matrix-js-sdk/src/crypto/store/memory-crypto-store.ts +1 -1
- package/node_modules/matrix-js-sdk/src/crypto-api/index.ts +1 -1
- package/node_modules/matrix-js-sdk/src/crypto-api/keybackup.ts +14 -7
- package/node_modules/matrix-js-sdk/src/crypto-api/verification.ts +23 -5
- package/node_modules/matrix-js-sdk/src/embedded.ts +34 -16
- package/node_modules/matrix-js-sdk/src/feature.ts +0 -3
- package/node_modules/matrix-js-sdk/src/filter-component.ts +1 -2
- package/node_modules/matrix-js-sdk/src/filter.ts +0 -3
- package/node_modules/matrix-js-sdk/src/http-api/fetch.ts +1 -1
- package/node_modules/matrix-js-sdk/src/http-api/index.ts +1 -23
- package/node_modules/matrix-js-sdk/src/http-api/interface.ts +0 -12
- package/node_modules/matrix-js-sdk/src/http-api/refresh.ts +0 -1
- package/node_modules/matrix-js-sdk/src/interactive-auth.ts +4 -4
- package/node_modules/matrix-js-sdk/src/logger.ts +0 -2
- package/node_modules/matrix-js-sdk/src/matrix.ts +1 -1
- package/node_modules/matrix-js-sdk/src/matrixrtc/CallMembership.ts +5 -5
- package/node_modules/matrix-js-sdk/src/matrixrtc/MatrixRTCSession.ts +73 -6
- package/node_modules/matrix-js-sdk/src/matrixrtc/MatrixRTCSessionManager.ts +21 -2
- package/node_modules/matrix-js-sdk/src/matrixrtc/MembershipManager.ts +9 -6
- package/node_modules/matrix-js-sdk/src/matrixrtc/MembershipManagerActionScheduler.ts +1 -1
- package/node_modules/matrix-js-sdk/src/matrixrtc/RTCEncryptionManager.ts +2 -2
- package/node_modules/matrix-js-sdk/src/matrixrtc/ToDeviceKeyTransport.ts +3 -3
- package/node_modules/matrix-js-sdk/src/matrixrtc/index.ts +1 -1
- package/node_modules/matrix-js-sdk/src/matrixrtc/membershipData/rtc.ts +19 -8
- package/node_modules/matrix-js-sdk/src/matrixrtc/types.ts +24 -7
- package/node_modules/matrix-js-sdk/src/matrixrtc/utils.ts +0 -2
- package/node_modules/matrix-js-sdk/src/models/event-timeline-set.ts +3 -3
- package/node_modules/matrix-js-sdk/src/models/event.ts +7 -13
- package/node_modules/matrix-js-sdk/src/models/invites-ignorer.ts +1 -1
- package/node_modules/matrix-js-sdk/src/models/poll.ts +1 -1
- package/node_modules/matrix-js-sdk/src/models/read-receipt.ts +1 -1
- package/node_modules/matrix-js-sdk/src/models/relations-container.ts +55 -19
- package/node_modules/matrix-js-sdk/src/models/relations.ts +1 -1
- package/node_modules/matrix-js-sdk/src/models/room-state.ts +0 -3
- package/node_modules/matrix-js-sdk/src/models/room.ts +15 -15
- package/node_modules/matrix-js-sdk/src/models/thread.ts +51 -6
- package/node_modules/matrix-js-sdk/src/oauth/authorize.ts +274 -0
- package/node_modules/matrix-js-sdk/src/oauth/discover.ts +102 -0
- package/node_modules/matrix-js-sdk/src/{oidc → oauth}/error.ts +8 -7
- package/node_modules/matrix-js-sdk/src/oauth/index.ts +297 -0
- package/node_modules/matrix-js-sdk/src/oauth/register.ts +166 -0
- package/node_modules/matrix-js-sdk/src/oauth/tokenRefresher.ts +77 -0
- package/node_modules/matrix-js-sdk/src/pollingCachedValue.ts +184 -0
- package/node_modules/matrix-js-sdk/src/pushprocessor.ts +3 -3
- package/node_modules/matrix-js-sdk/src/realtime-callbacks.ts +0 -1
- package/node_modules/matrix-js-sdk/src/receipt-accumulator.ts +1 -2
- package/node_modules/matrix-js-sdk/src/rendezvous/MSC4108SignInWithQR.ts +14 -16
- package/node_modules/matrix-js-sdk/src/rendezvous/index.ts +2 -2
- package/node_modules/matrix-js-sdk/src/rendezvous/transports/MSC4108RendezvousSession.ts +0 -1
- package/node_modules/matrix-js-sdk/src/rtcTransportsCachedValue.ts +40 -0
- package/node_modules/matrix-js-sdk/src/rust-crypto/DehydratedDeviceManager.ts +14 -13
- package/node_modules/matrix-js-sdk/src/rust-crypto/OutgoingRequestProcessor.ts +0 -1
- package/node_modules/matrix-js-sdk/src/rust-crypto/PerSessionKeyBackupDownloader.ts +1 -1
- package/node_modules/matrix-js-sdk/src/rust-crypto/backup.ts +67 -33
- package/node_modules/matrix-js-sdk/src/rust-crypto/device-converter.ts +1 -0
- package/node_modules/matrix-js-sdk/src/rust-crypto/index.ts +32 -23
- package/node_modules/matrix-js-sdk/src/rust-crypto/libolm_migration.ts +1 -3
- package/node_modules/matrix-js-sdk/src/rust-crypto/rust-crypto.ts +3 -6
- package/node_modules/matrix-js-sdk/src/scheduler.ts +0 -3
- package/node_modules/matrix-js-sdk/src/sliding-sync-sdk.ts +4 -1
- package/node_modules/matrix-js-sdk/src/sliding-sync.ts +3 -1
- package/node_modules/matrix-js-sdk/src/store/indexeddb-local-backend.ts +1 -1
- package/node_modules/matrix-js-sdk/src/store/indexeddb-store-worker.ts +1 -0
- package/node_modules/matrix-js-sdk/src/store/indexeddb.ts +0 -2
- package/node_modules/matrix-js-sdk/src/store/memory.ts +7 -9
- package/node_modules/matrix-js-sdk/src/sync-accumulator.ts +1 -3
- package/node_modules/matrix-js-sdk/src/sync.ts +13 -14
- package/node_modules/matrix-js-sdk/src/testing.ts +3 -22
- package/node_modules/matrix-js-sdk/src/timeline-window.ts +0 -1
- package/node_modules/matrix-js-sdk/src/utils/internal/deriveKeys.ts +0 -1
- package/node_modules/matrix-js-sdk/src/utils.ts +3 -2
- package/node_modules/matrix-js-sdk/src/webrtc/call.ts +6 -6
- package/node_modules/matrix-js-sdk/src/webrtc/callEventTypes.ts +0 -5
- package/node_modules/matrix-js-sdk/src/webrtc/groupCall.ts +7 -7
- package/node_modules/matrix-js-sdk/src/webrtc/mediaHandler.ts +1 -1
- package/node_modules/matrix-js-sdk/src/webrtc/stats/callStatsReportGatherer.ts +2 -2
- package/node_modules/matrix-js-sdk/src/webrtc/stats/transportStatsBuilder.ts +1 -1
- package/node_modules/matrix-js-sdk/src/wellKnownCachedValue.ts +34 -0
- package/node_modules/music-metadata/LICENSE.txt +9 -9
- package/node_modules/music-metadata/README.md +878 -878
- package/node_modules/music-metadata/lib/ParseError.d.ts +1 -1
- package/node_modules/music-metadata/lib/ParseError.js +1 -1
- package/node_modules/music-metadata/lib/asf/AsfObject.d.ts +1 -4
- package/node_modules/music-metadata/lib/asf/AsfObject.js +66 -30
- package/node_modules/music-metadata/lib/asf/AsfParser.d.ts +5 -1
- package/node_modules/music-metadata/lib/asf/AsfParser.js +94 -25
- package/node_modules/music-metadata/lib/dsf/DsfChunk.js +2 -2
- package/node_modules/music-metadata/lib/dsf/DsfParser.js +38 -13
- package/node_modules/music-metadata/lib/mp4/AtomToken.js +2 -1
- package/node_modules/music-metadata/lib/mp4/MP4Parser.js +34 -7
- package/node_modules/music-metadata/lib/ogg/speex/SpeexStream.d.ts +7 -0
- package/node_modules/music-metadata/lib/ogg/speex/SpeexStream.js +13 -0
- package/node_modules/music-metadata/lib/riff/RiffChunk.js +1 -1
- package/node_modules/music-metadata/node_modules/content-type/README.md +2 -0
- package/node_modules/music-metadata/node_modules/content-type/dist/index.d.ts +20 -0
- package/node_modules/music-metadata/node_modules/content-type/dist/index.js +20 -14
- package/node_modules/music-metadata/node_modules/content-type/dist/index.js.map +1 -1
- package/node_modules/music-metadata/node_modules/content-type/package.json +1 -1
- package/node_modules/music-metadata/node_modules/file-type/package.json +1 -1
- package/node_modules/music-metadata/node_modules/file-type/readme.md +3 -0
- package/node_modules/music-metadata/node_modules/file-type/source/detectors/zip.js +6 -1
- package/node_modules/music-metadata/node_modules/file-type/source/index.d.ts +3 -0
- package/node_modules/music-metadata/node_modules/file-type/source/index.js +25 -13
- package/node_modules/music-metadata/package.json +156 -156
- package/node_modules/typebox/build/format/date.d.mts +1 -1
- package/node_modules/typebox/build/format/date.mjs +1 -1
- package/node_modules/typebox/build/format/date_time.d.mts +2 -2
- package/node_modules/typebox/build/format/date_time.mjs +3 -3
- package/node_modules/typebox/build/format/email.d.mts +1 -1
- package/node_modules/typebox/build/format/email.mjs +2 -2
- package/node_modules/typebox/build/format/hostname.mjs +2 -10
- package/node_modules/typebox/build/format/idn_email.d.mts +1 -1
- package/node_modules/typebox/build/format/idn_email.mjs +3 -3
- package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
- package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
- package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
- package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +41 -0
- package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
- package/node_modules/typebox/build/format/idna/index.mjs +2 -0
- package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
- package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
- package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
- package/node_modules/typebox/build/format/ipv4.d.mts +0 -1
- package/node_modules/typebox/build/format/ipv4.mjs +2 -32
- package/node_modules/typebox/build/format/ipv6.mjs +2 -61
- package/node_modules/typebox/build/format/iri.d.mts +2 -2
- package/node_modules/typebox/build/format/iri.mjs +26 -8
- package/node_modules/typebox/build/format/iri_reference.d.mts +2 -2
- package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
- package/node_modules/typebox/build/format/regex.d.mts +1 -2
- package/node_modules/typebox/build/format/regex.mjs +2 -6
- package/node_modules/typebox/build/format/time.d.mts +2 -2
- package/node_modules/typebox/build/format/time.mjs +19 -14
- package/node_modules/typebox/build/format/uri.d.mts +1 -1
- package/node_modules/typebox/build/format/uri.mjs +3 -130
- package/node_modules/typebox/build/format/uri_reference.d.mts +1 -1
- package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
- package/node_modules/typebox/build/format/uri_template.d.mts +2 -3
- package/node_modules/typebox/build/format/uri_template.mjs +4 -5
- package/node_modules/typebox/build/format/url.d.mts +3 -3
- package/node_modules/typebox/build/format/url.mjs +4 -5
- package/node_modules/typebox/build/guard/emit.d.mts +3 -1
- package/node_modules/typebox/build/guard/emit.mjs +12 -5
- package/node_modules/typebox/build/guard/guard.d.mts +8 -2
- package/node_modules/typebox/build/guard/guard.mjs +25 -4
- package/node_modules/typebox/build/guard/string.d.mts +2 -2
- package/node_modules/typebox/build/guard/string.mjs +7 -7
- package/node_modules/typebox/build/schema/engine/_context.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -2
- package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
- package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
- package/node_modules/typebox/build/schema/engine/_stack.mjs +12 -13
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
- package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +7 -6
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/ref.mjs +1 -7
- package/node_modules/typebox/build/schema/engine/schema.mjs +13 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +4 -1
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +202 -1
- package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
- package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
- package/node_modules/typebox/build/schema/static/schema.d.mts +3 -0
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -2
- package/node_modules/typebox/build/schema/types/index.mjs +0 -2
- package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
- package/node_modules/typebox/build/system/memory/discard.mjs +6 -5
- package/node_modules/typebox/build/system/settings/settings.d.mts +9 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +6 -1
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +5 -5
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
- package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +6 -10
- package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +7 -4
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +4 -20
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
- package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
- package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +17 -2
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
- package/node_modules/typebox/build/type/script/mapping.d.mts +32 -29
- package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
- package/node_modules/typebox/build/type/script/parser.d.mts +19 -25
- package/node_modules/typebox/build/type/script/parser.mjs +27 -23
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
- package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
- package/node_modules/typebox/package.json +27 -27
- package/node_modules/typebox/readme.md +79 -82
- package/openclaw.plugin.json +16 -1
- package/package.json +10 -10
- package/dist/env-auth-MVS-Vv41.js +0 -64
- package/dist/file-sync-store-DjskBX2o.js +0 -436
- package/dist/media-text-Dh-DpTc3.js +0 -149
- package/dist/probe.runtime-NIJZYqc2.js +0 -2
- package/dist/recovery-key-store-CognuDys.js +0 -276
- package/dist/runtime-api-BGO16Fu8.js +0 -21
- package/dist/timeout-abort-signal-DMrgRFIy.js +0 -2
- package/node_modules/markdown-it/dist/index.cjs.js.map +0 -1
- package/node_modules/markdown-it/dist/markdown-it.js +0 -3975
- package/node_modules/markdown-it/dist/markdown-it.js.map +0 -1
- package/node_modules/markdown-it/dist/markdown-it.min.js +0 -3
- package/node_modules/markdown-it/dist/markdown-it.min.js.map +0 -1
- package/node_modules/markdown-it/index.mjs +0 -1
- package/node_modules/markdown-it/lib/common/html_blocks.mjs +0 -67
- package/node_modules/markdown-it/lib/common/html_re.mjs +0 -25
- package/node_modules/markdown-it/lib/common/utils.mjs +0 -324
- package/node_modules/markdown-it/lib/helpers/index.mjs +0 -11
- package/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs +0 -77
- package/node_modules/markdown-it/lib/helpers/parse_link_label.mjs +0 -49
- package/node_modules/markdown-it/lib/helpers/parse_link_title.mjs +0 -66
- package/node_modules/markdown-it/lib/index.mjs +0 -565
- package/node_modules/markdown-it/lib/parser_block.mjs +0 -134
- package/node_modules/markdown-it/lib/parser_core.mjs +0 -62
- package/node_modules/markdown-it/lib/parser_inline.mjs +0 -197
- package/node_modules/markdown-it/lib/presets/commonmark.mjs +0 -88
- package/node_modules/markdown-it/lib/presets/default.mjs +0 -47
- package/node_modules/markdown-it/lib/presets/zero.mjs +0 -70
- package/node_modules/markdown-it/lib/renderer.mjs +0 -322
- package/node_modules/markdown-it/lib/ruler.mjs +0 -340
- package/node_modules/markdown-it/lib/rules_block/blockquote.mjs +0 -209
- package/node_modules/markdown-it/lib/rules_block/code.mjs +0 -30
- package/node_modules/markdown-it/lib/rules_block/fence.mjs +0 -94
- package/node_modules/markdown-it/lib/rules_block/heading.mjs +0 -51
- package/node_modules/markdown-it/lib/rules_block/hr.mjs +0 -40
- package/node_modules/markdown-it/lib/rules_block/html_block.mjs +0 -80
- package/node_modules/markdown-it/lib/rules_block/lheading.mjs +0 -85
- package/node_modules/markdown-it/lib/rules_block/list.mjs +0 -331
- package/node_modules/markdown-it/lib/rules_block/paragraph.mjs +0 -48
- package/node_modules/markdown-it/lib/rules_block/reference.mjs +0 -212
- package/node_modules/markdown-it/lib/rules_block/state_block.mjs +0 -220
- package/node_modules/markdown-it/lib/rules_block/table.mjs +0 -228
- package/node_modules/markdown-it/lib/rules_core/block.mjs +0 -13
- package/node_modules/markdown-it/lib/rules_core/inline.mjs +0 -11
- package/node_modules/markdown-it/lib/rules_core/linkify.mjs +0 -134
- package/node_modules/markdown-it/lib/rules_core/normalize.mjs +0 -17
- package/node_modules/markdown-it/lib/rules_core/replacements.mjs +0 -101
- package/node_modules/markdown-it/lib/rules_core/smartquotes.mjs +0 -209
- package/node_modules/markdown-it/lib/rules_core/state_core.mjs +0 -17
- package/node_modules/markdown-it/lib/rules_core/text_join.mjs +0 -43
- package/node_modules/markdown-it/lib/rules_inline/autolink.mjs +0 -72
- package/node_modules/markdown-it/lib/rules_inline/backticks.mjs +0 -60
- package/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs +0 -124
- package/node_modules/markdown-it/lib/rules_inline/emphasis.mjs +0 -123
- package/node_modules/markdown-it/lib/rules_inline/entity.mjs +0 -51
- package/node_modules/markdown-it/lib/rules_inline/escape.mjs +0 -83
- package/node_modules/markdown-it/lib/rules_inline/fragments_join.mjs +0 -38
- package/node_modules/markdown-it/lib/rules_inline/html_inline.mjs +0 -50
- package/node_modules/markdown-it/lib/rules_inline/image.mjs +0 -138
- package/node_modules/markdown-it/lib/rules_inline/link.mjs +0 -139
- package/node_modules/markdown-it/lib/rules_inline/linkify.mjs +0 -63
- package/node_modules/markdown-it/lib/rules_inline/newline.mjs +0 -42
- package/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +0 -154
- package/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs +0 -127
- package/node_modules/markdown-it/lib/rules_inline/text.mjs +0 -86
- package/node_modules/markdown-it/lib/token.mjs +0 -191
- package/node_modules/markdown-it/node_modules/argparse/CHANGELOG.md +0 -216
- package/node_modules/markdown-it/node_modules/entities/lib/decode.d.ts +0 -211
- package/node_modules/markdown-it/node_modules/entities/lib/decode.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/decode.js +0 -536
- package/node_modules/markdown-it/node_modules/entities/lib/decode.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/decode_codepoint.d.ts +0 -19
- package/node_modules/markdown-it/node_modules/entities/lib/decode_codepoint.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/decode_codepoint.js +0 -76
- package/node_modules/markdown-it/node_modules/entities/lib/decode_codepoint.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/encode.d.ts +0 -22
- package/node_modules/markdown-it/node_modules/entities/lib/encode.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/encode.js +0 -77
- package/node_modules/markdown-it/node_modules/entities/lib/encode.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/escape.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/escape.js +0 -122
- package/node_modules/markdown-it/node_modules/entities/lib/escape.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/decode.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/decode.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/decode_codepoint.d.ts +0 -19
- package/node_modules/markdown-it/node_modules/entities/lib/esm/decode_codepoint.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/decode_codepoint.js +0 -71
- package/node_modules/markdown-it/node_modules/entities/lib/esm/decode_codepoint.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/encode.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/encode.js +0 -69
- package/node_modules/markdown-it/node_modules/entities/lib/esm/encode.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/escape.d.ts +0 -43
- package/node_modules/markdown-it/node_modules/entities/lib/esm/escape.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/escape.js +0 -116
- package/node_modules/markdown-it/node_modules/entities/lib/esm/escape.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +0 -3
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/decode-data-html.js +0 -7
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/decode-data-html.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +0 -3
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/decode-data-xml.js +0 -7
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/encode-html.d.ts +0 -8
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/encode-html.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/encode-html.js +0 -10
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/encode-html.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/index.d.ts +0 -96
- package/node_modules/markdown-it/node_modules/entities/lib/esm/index.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/index.js +0 -99
- package/node_modules/markdown-it/node_modules/entities/lib/esm/index.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/package.json +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/generated/decode-data-html.d.ts +0 -3
- package/node_modules/markdown-it/node_modules/entities/lib/generated/decode-data-html.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/generated/decode-data-html.js +0 -9
- package/node_modules/markdown-it/node_modules/entities/lib/generated/decode-data-html.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/generated/decode-data-xml.d.ts +0 -3
- package/node_modules/markdown-it/node_modules/entities/lib/generated/decode-data-xml.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/generated/decode-data-xml.js +0 -9
- package/node_modules/markdown-it/node_modules/entities/lib/generated/decode-data-xml.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/generated/encode-html.d.ts +0 -8
- package/node_modules/markdown-it/node_modules/entities/lib/generated/encode-html.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/generated/encode-html.js +0 -12
- package/node_modules/markdown-it/node_modules/entities/lib/generated/encode-html.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/index.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/index.js +0 -126
- package/node_modules/markdown-it/node_modules/entities/lib/index.js.map +0 -1
- package/node_modules/markdown-it/node_modules/linkify-it/index.mjs +0 -646
- package/node_modules/markdown-it/node_modules/linkify-it/lib/re.mjs +0 -193
- package/node_modules/markdown-it/node_modules/uc.micro/categories/Cc/regex.mjs +0 -1
- package/node_modules/markdown-it/node_modules/uc.micro/categories/Cf/regex.mjs +0 -1
- package/node_modules/markdown-it/node_modules/uc.micro/categories/P/regex.mjs +0 -1
- package/node_modules/markdown-it/node_modules/uc.micro/categories/S/regex.mjs +0 -1
- package/node_modules/markdown-it/node_modules/uc.micro/categories/Z/regex.mjs +0 -1
- package/node_modules/markdown-it/node_modules/uc.micro/index.mjs +0 -8
- package/node_modules/markdown-it/node_modules/uc.micro/properties/Any/regex.mjs +0 -1
- package/node_modules/matrix-js-sdk/lib/oidc/authorize.d.ts +0 -157
- package/node_modules/matrix-js-sdk/lib/oidc/authorize.d.ts.map +0 -1
- package/node_modules/matrix-js-sdk/lib/oidc/authorize.js +0 -365
- package/node_modules/matrix-js-sdk/lib/oidc/authorize.js.map +0 -1
- package/node_modules/matrix-js-sdk/lib/oidc/discovery.d.ts +0 -22
- package/node_modules/matrix-js-sdk/lib/oidc/discovery.d.ts.map +0 -1
- package/node_modules/matrix-js-sdk/lib/oidc/discovery.js +0 -65
- package/node_modules/matrix-js-sdk/lib/oidc/discovery.js.map +0 -1
- package/node_modules/matrix-js-sdk/lib/oidc/error.d.ts +0 -18
- package/node_modules/matrix-js-sdk/lib/oidc/error.d.ts.map +0 -1
- package/node_modules/matrix-js-sdk/lib/oidc/error.js +0 -35
- package/node_modules/matrix-js-sdk/lib/oidc/error.js.map +0 -1
- package/node_modules/matrix-js-sdk/lib/oidc/index.d.ts +0 -16
- package/node_modules/matrix-js-sdk/lib/oidc/index.d.ts.map +0 -1
- package/node_modules/matrix-js-sdk/lib/oidc/index.js +0 -30
- package/node_modules/matrix-js-sdk/lib/oidc/index.js.map +0 -1
- package/node_modules/matrix-js-sdk/lib/oidc/register.d.ts +0 -70
- package/node_modules/matrix-js-sdk/lib/oidc/register.d.ts.map +0 -1
- package/node_modules/matrix-js-sdk/lib/oidc/register.js +0 -134
- package/node_modules/matrix-js-sdk/lib/oidc/register.js.map +0 -1
- package/node_modules/matrix-js-sdk/lib/oidc/tokenRefresher.d.ts +0 -91
- package/node_modules/matrix-js-sdk/lib/oidc/tokenRefresher.d.ts.map +0 -1
- package/node_modules/matrix-js-sdk/lib/oidc/tokenRefresher.js +0 -173
- package/node_modules/matrix-js-sdk/lib/oidc/tokenRefresher.js.map +0 -1
- package/node_modules/matrix-js-sdk/lib/oidc/validate.d.ts +0 -78
- package/node_modules/matrix-js-sdk/lib/oidc/validate.d.ts.map +0 -1
- package/node_modules/matrix-js-sdk/lib/oidc/validate.js +0 -181
- package/node_modules/matrix-js-sdk/lib/oidc/validate.js.map +0 -1
- package/node_modules/matrix-js-sdk/node_modules/jwt-decode/LICENSE +0 -21
- package/node_modules/matrix-js-sdk/node_modules/jwt-decode/README.md +0 -134
- package/node_modules/matrix-js-sdk/node_modules/jwt-decode/build/cjs/index.d.ts +0 -23
- package/node_modules/matrix-js-sdk/node_modules/jwt-decode/build/cjs/index.js +0 -62
- package/node_modules/matrix-js-sdk/node_modules/jwt-decode/build/cjs/package.json +0 -1
- package/node_modules/matrix-js-sdk/node_modules/jwt-decode/build/esm/index.d.ts +0 -23
- package/node_modules/matrix-js-sdk/node_modules/jwt-decode/build/esm/index.js +0 -57
- package/node_modules/matrix-js-sdk/node_modules/jwt-decode/package.json +0 -81
- package/node_modules/matrix-js-sdk/node_modules/oidc-client-ts/LICENSE +0 -202
- package/node_modules/matrix-js-sdk/node_modules/oidc-client-ts/README.md +0 -87
- package/node_modules/matrix-js-sdk/node_modules/oidc-client-ts/dist/browser/oidc-client-ts.js +0 -3751
- package/node_modules/matrix-js-sdk/node_modules/oidc-client-ts/dist/browser/oidc-client-ts.js.map +0 -7
- package/node_modules/matrix-js-sdk/node_modules/oidc-client-ts/dist/browser/oidc-client-ts.min.js +0 -2
- package/node_modules/matrix-js-sdk/node_modules/oidc-client-ts/dist/browser/oidc-client-ts.min.js.map +0 -7
- package/node_modules/matrix-js-sdk/node_modules/oidc-client-ts/dist/esm/oidc-client-ts.js +0 -3671
- package/node_modules/matrix-js-sdk/node_modules/oidc-client-ts/dist/esm/oidc-client-ts.js.map +0 -7
- package/node_modules/matrix-js-sdk/node_modules/oidc-client-ts/dist/esm/package.json +0 -4
- package/node_modules/matrix-js-sdk/node_modules/oidc-client-ts/dist/types/oidc-client-ts.d.ts +0 -2003
- package/node_modules/matrix-js-sdk/node_modules/oidc-client-ts/dist/types/tsdoc-metadata.json +0 -11
- package/node_modules/matrix-js-sdk/node_modules/oidc-client-ts/dist/umd/oidc-client-ts.js +0 -3719
- package/node_modules/matrix-js-sdk/node_modules/oidc-client-ts/dist/umd/oidc-client-ts.js.map +0 -7
- package/node_modules/matrix-js-sdk/node_modules/oidc-client-ts/package.json +0 -75
- package/node_modules/matrix-js-sdk/src/oidc/authorize.ts +0 -431
- package/node_modules/matrix-js-sdk/src/oidc/discovery.ts +0 -67
- package/node_modules/matrix-js-sdk/src/oidc/index.ts +0 -33
- package/node_modules/matrix-js-sdk/src/oidc/register.ts +0 -168
- package/node_modules/matrix-js-sdk/src/oidc/tokenRefresher.ts +0 -184
- package/node_modules/matrix-js-sdk/src/oidc/validate.ts +0 -265
- package/node_modules/typebox/build/format/_idna.d.mts +0 -2
- package/node_modules/typebox/build/format/_idna.mjs +0 -246
- package/node_modules/typebox/build/format/_puny.d.mts +0 -1
- package/node_modules/typebox/build/format/_puny.mjs +0 -77
- package/node_modules/typebox/build/schema/resolve/ref.d.mts +0 -3
- package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
- package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
- package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexeddb.js","names":[],"sources":["../../src/store/indexeddb.ts"],"sourcesContent":["/*\nCopyright 2017 - 2021 Vector Creations Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n/* eslint-disable @babel/no-invalid-this */\n\nimport { MemoryStore, type IOpts as IBaseOpts } from \"./memory.ts\";\nimport { LocalIndexedDBStoreBackend } from \"./indexeddb-local-backend.ts\";\nimport { RemoteIndexedDBStoreBackend } from \"./indexeddb-remote-backend.ts\";\nimport { type IEvent, MatrixEvent } from \"../models/event.ts\";\nimport { logger } from \"../logger.ts\";\nimport { type ISavedSync } from \"./index.ts\";\nimport { type IIndexedDBBackend } from \"./indexeddb-backend.ts\";\nimport { type ISyncResponse } from \"../sync-accumulator.ts\";\nimport { type EventEmitterEvents, TypedEventEmitter } from \"../models/typed-event-emitter.ts\";\nimport { type IStateEventWithRoomId } from \"../@types/search.ts\";\nimport { type IndexedToDeviceBatch, type ToDeviceBatchWithTxnId } from \"../models/ToDeviceMessage.ts\";\nimport { type IStoredClientOpts } from \"../client.ts\";\nimport { type SyncUserProfile } from \"../models/user.ts\";\n\n/**\n * This is an internal module. See {@link IndexedDBStore} for the public class.\n */\n\n// If this value is too small we'll be writing very often which will cause\n// noticeable stop-the-world pauses. If this value is too big we'll be writing\n// so infrequently that the /sync size gets bigger on reload. Writing more\n// often does not affect the length of the pause since the entire /sync\n// response is persisted each time.\nconst WRITE_DELAY_MS = 1000 * 60 * 5; // once every 5 minutes\n\ninterface IOpts extends IBaseOpts {\n /** The Indexed DB interface e.g. `window.indexedDB` */\n indexedDB?: IDBFactory;\n /** Optional database name. The same name must be used to open the same database. */\n dbName?: string;\n /** Optional factory to spin up a Worker to execute the IDB transactions within. */\n workerFactory?: () => Worker;\n}\n\ntype EventHandlerMap = {\n // Fired when an IDB command fails on a degradable path, and the store falls back to MemoryStore\n // This signals the potential for data volatility.\n degraded: (e: Error) => void;\n // Fired when the IndexedDB gets closed unexpectedly, for example, if the underlying storage is removed or\n // if the user clears the database in the browser's history preferences.\n closed: () => void;\n};\n\nexport class IndexedDBStore extends MemoryStore {\n public static exists(indexedDB: IDBFactory, dbName: string): Promise<boolean> {\n return LocalIndexedDBStoreBackend.exists(indexedDB, dbName);\n }\n\n public _backend: IIndexedDBBackend;\n\n private startedUp = false;\n private syncTs = 0;\n // Records the last-modified-time of each user at the last point we saved\n // the database, such that we can derive the set if users that have been\n // modified since we last saved.\n private userModifiedMap: Record<string, number> = {}; // user_id : timestamp\n private emitter = new TypedEventEmitter<keyof EventHandlerMap, EventHandlerMap>();\n\n /**\n * Construct a new Indexed Database store, which extends MemoryStore.\n *\n * This store functions like a MemoryStore except it periodically persists\n * the contents of the store to an IndexedDB backend.\n *\n * All data is still kept in-memory but can be loaded from disk by calling\n * `startup()`. This can make startup times quicker as a complete\n * sync from the server is not required. This does not reduce memory usage as all\n * the data is eagerly fetched when `startup()` is called.\n * ```\n * let opts = { indexedDB: window.indexedDB, localStorage: window.localStorage };\n * let store = new IndexedDBStore(opts);\n * let client = sdk.createClient({\n * store: store,\n * });\n * await store.startup(); // load from indexed db, must be called after createClient\n * client.startClient();\n * client.on(\"sync\", function(state, prevState, data) {\n * if (state === \"PREPARED\") {\n * console.log(\"Started up, now with go faster stripes!\");\n * }\n * });\n * ```\n *\n * @param opts - Options object.\n */\n public constructor(private readonly opts: IOpts) {\n super(opts);\n\n if (!opts.indexedDB) {\n throw new Error(\"Missing required option: indexedDB\");\n }\n\n if (opts.workerFactory) {\n this._backend = new RemoteIndexedDBStoreBackend(opts.workerFactory, opts.dbName);\n } else {\n this._backend = new LocalIndexedDBStoreBackend(opts.indexedDB, opts.dbName);\n }\n }\n\n /**\n * The backend instance.\n * Call through to this API if you need to perform specific indexeddb actions like deleting the database.\n */\n public get backend(): IIndexedDBBackend {\n return this._backend;\n }\n\n /** Re-exports `TypedEventEmitter.on` */\n public on(event: EventEmitterEvents | \"degraded\" | \"closed\", handler: (...args: any[]) => void): void {\n this.emitter.on(event, handler);\n }\n\n /**\n * @returns Resolved when loaded from indexed db.\n */\n public startup(): Promise<void> {\n if (this.startedUp) {\n logger.log(`IndexedDBStore.startup: already started`);\n return Promise.resolve();\n }\n\n logger.log(`IndexedDBStore.startup: connecting to backend`);\n return this.backend\n .connect(this.onClose)\n .catch((e) => {\n if (this.opts.workerFactory) {\n logger.log(\"Falling back to local indexeddb backend\");\n this._backend = new LocalIndexedDBStoreBackend(this.opts.indexedDB!, this.opts.dbName);\n return this.backend.connect(this.onClose);\n }\n throw e;\n })\n .then(() => {\n logger.log(`IndexedDBStore.startup: loading presence events`);\n return this.backend.getUserPresenceEvents();\n })\n .then((userPresenceEvents) => {\n logger.log(`IndexedDBStore.startup: processing presence events`);\n userPresenceEvents.forEach(([userId, rawEvent]) => {\n if (!this.createUser) {\n throw new Error(\n \"`IndexedDBStore.startup` must be called after assigning it to the client, not before!\",\n );\n }\n const u = this.createUser(userId);\n if (rawEvent) {\n u.setPresenceEvent(new MatrixEvent(rawEvent));\n }\n this.userModifiedMap[u.userId] = u.getLastModifiedTime();\n this.storeUser(u);\n });\n this.startedUp = true;\n });\n }\n\n /*\n * Close the database and destroy any associated workers\n */\n public destroy(): Promise<void> {\n return this.backend.destroy();\n }\n\n private onClose = (): void => {\n this.emitter.emit(\"closed\");\n };\n\n /**\n * @returns Promise which resolves with a sync response to restore the\n * client state to where it was at the last save, or null if there\n * is no saved sync data.\n */\n public getSavedSync = this.degradable((): Promise<ISavedSync | null> => {\n return this.backend.getSavedSync();\n }, \"getSavedSync\");\n\n /** @returns whether or not the database was newly created in this session. */\n public isNewlyCreated = this.degradable((): Promise<boolean> => {\n return this.backend.isNewlyCreated();\n }, \"isNewlyCreated\");\n\n /**\n * @returns If there is a saved sync, the nextBatch token\n * for this sync, otherwise null.\n */\n public getSavedSyncToken = this.degradable((): Promise<string | null> => {\n return this.backend.getNextBatchToken();\n }, \"getSavedSyncToken\");\n\n /**\n * Delete all data from this store.\n * @returns Promise which resolves if the data was deleted from the database.\n */\n public deleteAllData = this.degradable((): Promise<void> => {\n super.deleteAllData();\n return this.backend.clearDatabase().then(\n () => {\n logger.log(\"Deleted indexeddb data.\");\n },\n (err) => {\n logger.error(`Failed to delete indexeddb data: ${err}`);\n throw err;\n },\n );\n }, null);\n\n /**\n * Whether this store would like to save its data\n * Note that obviously whether the store wants to save or\n * not could change between calling this function and calling\n * save().\n *\n * @returns True if calling save() will actually save\n * (at the time this function is called).\n */\n public wantsSave(): boolean {\n const now = Date.now();\n return now - this.syncTs > WRITE_DELAY_MS;\n }\n\n /**\n * Possibly write data to the database.\n *\n * @param force - True to force a save to happen\n * @returns Promise resolves after the write completes\n * (or immediately if no write is performed)\n */\n public save(force = false): Promise<void> {\n if (force || this.wantsSave()) {\n return this.reallySave();\n }\n return Promise.resolve();\n }\n\n private reallySave = this.degradable((): Promise<void> => {\n this.syncTs = Date.now(); // set now to guard against multi-writes\n\n // work out changed users (this doesn't handle deletions but you\n // can't 'delete' users as they are just presence events).\n const userTuples: [userId: string, presenceEvent: Partial<IEvent>][] = [];\n for (const u of this.getUsers()) {\n if (this.userModifiedMap[u.userId] === u.getLastModifiedTime()) continue;\n if (!u.events.presence) continue;\n\n userTuples.push([u.userId, u.events.presence.event]);\n\n // note that we've saved this version of the user\n this.userModifiedMap[u.userId] = u.getLastModifiedTime();\n }\n\n return this.backend.syncToDatabase(userTuples);\n }, null);\n\n public setSyncData = this.degradable((syncData: ISyncResponse): Promise<void> => {\n return this.backend.setSyncData(syncData);\n }, \"setSyncData\");\n\n /**\n * Returns the out-of-band membership events for this room that\n * were previously loaded.\n * @returns the events, potentially an empty array if OOB loading didn't yield any new members\n * @returns in case the members for this room haven't been stored yet\n */\n public getOutOfBandMembers = this.degradable((roomId: string): Promise<IStateEventWithRoomId[] | null> => {\n return this.backend.getOutOfBandMembers(roomId);\n }, \"getOutOfBandMembers\");\n\n /**\n * Stores the out-of-band membership events for this room. Note that\n * it still makes sense to store an empty array as the OOB status for the room is\n * marked as fetched, and getOutOfBandMembers will return an empty array instead of null\n * @param membershipEvents - the membership events to store\n * @returns when all members have been stored\n */\n public setOutOfBandMembers = this.degradable(\n (roomId: string, membershipEvents: IStateEventWithRoomId[]): Promise<void> => {\n super.setOutOfBandMembers(roomId, membershipEvents);\n return this.backend.setOutOfBandMembers(roomId, membershipEvents);\n },\n \"setOutOfBandMembers\",\n );\n\n public clearOutOfBandMembers = this.degradable((roomId: string) => {\n super.clearOutOfBandMembers(roomId);\n return this.backend.clearOutOfBandMembers(roomId);\n }, \"clearOutOfBandMembers\");\n\n public getClientOptions = this.degradable((): Promise<IStoredClientOpts | undefined> => {\n return this.backend.getClientOptions();\n }, \"getClientOptions\");\n\n public storeClientOptions = this.degradable((options: IStoredClientOpts): Promise<void> => {\n super.storeClientOptions(options);\n return this.backend.storeClientOptions(options);\n }, \"storeClientOptions\");\n\n /**\n * All member functions of `IndexedDBStore` that access the backend use this wrapper to\n * watch for failures after initial store startup, including `QuotaExceededError` as\n * free disk space changes, etc.\n *\n * When IndexedDB fails via any of these paths, we degrade this back to a `MemoryStore`\n * in place so that the current operation and all future ones are in-memory only.\n *\n * @param func - The degradable work to do.\n * @param fallback - The method name for fallback.\n * @returns A wrapped member function.\n */\n private degradable<A extends Array<any>, F extends keyof MemoryStore | null, R = void>(\n func: DegradableFn<A, R>,\n fallback: F,\n ): DegradableFn<A, F extends string ? R : void> {\n const fallbackFn = fallback ? (super[fallback] as (...args: A) => Promise<R>) : null;\n\n return (async (...args) => {\n try {\n return await func.call(this, ...args);\n } catch (e) {\n logger.error(\"IndexedDBStore failure, degrading to MemoryStore\", e);\n this.emitter.emit(\"degraded\", e as Error);\n try {\n // We try to delete IndexedDB after degrading since this store is only a\n // cache (the app will still function correctly without the data).\n // It's possible that deleting repair IndexedDB for the next app load,\n // potentially by making a little more space available.\n logger.log(\"IndexedDBStore trying to delete degraded data\");\n await this.backend.clearDatabase();\n logger.log(\"IndexedDBStore delete after degrading succeeded\");\n } catch (e) {\n logger.warn(\"IndexedDBStore delete after degrading failed\", e);\n }\n // Degrade the store from being an instance of `IndexedDBStore` to instead be\n // an instance of `MemoryStore` so that future API calls use the memory path\n // directly and skip IndexedDB entirely. This should be safe as\n // `IndexedDBStore` already extends from `MemoryStore`, so we are making the\n // store become its parent type in a way. The mutator methods of\n // `IndexedDBStore` also maintain the state that `MemoryStore` uses (many are\n // not overridden at all).\n if (fallbackFn) {\n return fallbackFn.call(this, ...args);\n }\n }\n }) as DegradableFn<A, F extends string ? R : void>;\n }\n\n // XXX: ideally these would be stored in indexeddb as part of the room but,\n // we don't store rooms as such and instead accumulate entire sync responses atm.\n public async getPendingEvents(roomId: string): Promise<Partial<IEvent>[]> {\n if (!this.localStorage) return super.getPendingEvents(roomId);\n\n const serialized = this.localStorage.getItem(pendingEventsKey(roomId));\n if (serialized) {\n try {\n return JSON.parse(serialized);\n } catch (e) {\n logger.error(\"Could not parse persisted pending events\", e);\n }\n }\n return [];\n }\n\n public async setPendingEvents(roomId: string, events: Partial<IEvent>[]): Promise<void> {\n if (!this.localStorage) return super.setPendingEvents(roomId, events);\n\n if (events.length > 0) {\n this.localStorage.setItem(pendingEventsKey(roomId), JSON.stringify(events));\n } else {\n this.localStorage.removeItem(pendingEventsKey(roomId));\n }\n }\n\n public saveToDeviceBatches(batches: ToDeviceBatchWithTxnId[]): Promise<void> {\n return this.backend.saveToDeviceBatches(batches);\n }\n\n public getOldestToDeviceBatch(): Promise<IndexedToDeviceBatch | null> {\n return this.backend.getOldestToDeviceBatch();\n }\n\n public removeToDeviceBatch(id: number): Promise<void> {\n return this.backend.removeToDeviceBatch(id);\n }\n\n public async getUserProfile(userId: string): Promise<SyncUserProfile | undefined> {\n return this.backend.getUserProfile(userId);\n }\n\n public async storeUserProfiles(userProfiles: Map<string, SyncUserProfile>): Promise<void> {\n return this.backend.storeUserProfiles(userProfiles);\n }\n\n public async removeUserProfiles(userIds: string[]): Promise<void> {\n return this.backend.removeUserProfiles(userIds);\n }\n}\n\n/**\n * @param roomId - ID of the current room\n * @returns Storage key to retrieve pending events\n */\nfunction pendingEventsKey(roomId: string): string {\n return `mx_pending_events_${roomId}`;\n}\n\ntype DegradableFn<A extends Array<any>, T> = (...args: A) => Promise<T>;\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,SAAS,WAAW,QAAiC,aAAa;AAClE,SAAS,0BAA0B,QAAQ,8BAA8B;AACzE,SAAS,2BAA2B,QAAQ,+BAA+B;AAC3E,SAAsB,WAAW,QAAQ,oBAAoB;AAC7D,SAAS,MAAM,QAAQ,cAAc;AAIrC,SAAkC,iBAAiB,QAAQ,kCAAkC;AAM7F;AACA;AAC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,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC/E,CAAC,MAAM;MACH,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC1D;EACJ;EAEO,mBAAmB,CAAC,OAAiC,EAAiB;IACzE,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,OAAO,CAAC;EACpD;EAEO,sBAAsB,GAAyC;IAClE,OAAO,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;EAChD;EAEO,mBAAmB,CAAC,EAAU,EAAiB;IAClD,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,CAAC;EAC/C;EAEA,MAAa,cAAc,CAAC,MAAc,EAAwC;IAC9E,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC;EAC9C;EAEA,MAAa,iBAAiB,CAAC,YAA0C,EAAiB;IACtF,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC;EACvD;EAEA,MAAa,kBAAkB,CAAC,OAAiB,EAAiB;IAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC;EACnD;AACJ;;AAEA;AACA;AACA;AACA;AACA,SAAS,gBAAgB,CAAC,MAAc,EAAU;EAC9C,OAAO,qBAAqB,MAAM,EAAE;AACxC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"indexeddb.js","names":[],"sources":["../../src/store/indexeddb.ts"],"sourcesContent":["/*\nCopyright 2017 - 2021 Vector Creations Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { MemoryStore, type IOpts as IBaseOpts } from \"./memory.ts\";\nimport { LocalIndexedDBStoreBackend } from \"./indexeddb-local-backend.ts\";\nimport { RemoteIndexedDBStoreBackend } from \"./indexeddb-remote-backend.ts\";\nimport { type IEvent, MatrixEvent } from \"../models/event.ts\";\nimport { logger } from \"../logger.ts\";\nimport { type ISavedSync } from \"./index.ts\";\nimport { type IIndexedDBBackend } from \"./indexeddb-backend.ts\";\nimport { type ISyncResponse } from \"../sync-accumulator.ts\";\nimport { type EventEmitterEvents, TypedEventEmitter } from \"../models/typed-event-emitter.ts\";\nimport { type IStateEventWithRoomId } from \"../@types/search.ts\";\nimport { type IndexedToDeviceBatch, type ToDeviceBatchWithTxnId } from \"../models/ToDeviceMessage.ts\";\nimport { type IStoredClientOpts } from \"../client.ts\";\nimport { type SyncUserProfile } from \"../models/user.ts\";\n\n/**\n * This is an internal module. See {@link IndexedDBStore} for the public class.\n */\n\n// If this value is too small we'll be writing very often which will cause\n// noticeable stop-the-world pauses. If this value is too big we'll be writing\n// so infrequently that the /sync size gets bigger on reload. Writing more\n// often does not affect the length of the pause since the entire /sync\n// response is persisted each time.\nconst WRITE_DELAY_MS = 1000 * 60 * 5; // once every 5 minutes\n\ninterface IOpts extends IBaseOpts {\n /** The Indexed DB interface e.g. `window.indexedDB` */\n indexedDB?: IDBFactory;\n /** Optional database name. The same name must be used to open the same database. */\n dbName?: string;\n /** Optional factory to spin up a Worker to execute the IDB transactions within. */\n workerFactory?: () => Worker;\n}\n\ntype EventHandlerMap = {\n // Fired when an IDB command fails on a degradable path, and the store falls back to MemoryStore\n // This signals the potential for data volatility.\n degraded: (e: Error) => void;\n // Fired when the IndexedDB gets closed unexpectedly, for example, if the underlying storage is removed or\n // if the user clears the database in the browser's history preferences.\n closed: () => void;\n};\n\nexport class IndexedDBStore extends MemoryStore {\n public static exists(indexedDB: IDBFactory, dbName: string): Promise<boolean> {\n return LocalIndexedDBStoreBackend.exists(indexedDB, dbName);\n }\n\n public _backend: IIndexedDBBackend;\n\n private startedUp = false;\n private syncTs = 0;\n // Records the last-modified-time of each user at the last point we saved\n // the database, such that we can derive the set if users that have been\n // modified since we last saved.\n private userModifiedMap: Record<string, number> = {}; // user_id : timestamp\n private emitter = new TypedEventEmitter<keyof EventHandlerMap, EventHandlerMap>();\n\n /**\n * Construct a new Indexed Database store, which extends MemoryStore.\n *\n * This store functions like a MemoryStore except it periodically persists\n * the contents of the store to an IndexedDB backend.\n *\n * All data is still kept in-memory but can be loaded from disk by calling\n * `startup()`. This can make startup times quicker as a complete\n * sync from the server is not required. This does not reduce memory usage as all\n * the data is eagerly fetched when `startup()` is called.\n * ```\n * let opts = { indexedDB: window.indexedDB, localStorage: window.localStorage };\n * let store = new IndexedDBStore(opts);\n * let client = sdk.createClient({\n * store: store,\n * });\n * await store.startup(); // load from indexed db, must be called after createClient\n * client.startClient();\n * client.on(\"sync\", function(state, prevState, data) {\n * if (state === \"PREPARED\") {\n * console.log(\"Started up, now with go faster stripes!\");\n * }\n * });\n * ```\n *\n * @param opts - Options object.\n */\n public constructor(private readonly opts: IOpts) {\n super(opts);\n\n if (!opts.indexedDB) {\n throw new Error(\"Missing required option: indexedDB\");\n }\n\n if (opts.workerFactory) {\n this._backend = new RemoteIndexedDBStoreBackend(opts.workerFactory, opts.dbName);\n } else {\n this._backend = new LocalIndexedDBStoreBackend(opts.indexedDB, opts.dbName);\n }\n }\n\n /**\n * The backend instance.\n * Call through to this API if you need to perform specific indexeddb actions like deleting the database.\n */\n public get backend(): IIndexedDBBackend {\n return this._backend;\n }\n\n /** Re-exports `TypedEventEmitter.on` */\n public on(event: EventEmitterEvents | \"degraded\" | \"closed\", handler: (...args: any[]) => void): void {\n this.emitter.on(event, handler);\n }\n\n /**\n * @returns Resolved when loaded from indexed db.\n */\n public startup(): Promise<void> {\n if (this.startedUp) {\n logger.log(`IndexedDBStore.startup: already started`);\n return Promise.resolve();\n }\n\n logger.log(`IndexedDBStore.startup: connecting to backend`);\n return this.backend\n .connect(this.onClose)\n .catch((e) => {\n if (this.opts.workerFactory) {\n logger.log(\"Falling back to local indexeddb backend\");\n this._backend = new LocalIndexedDBStoreBackend(this.opts.indexedDB!, this.opts.dbName);\n return this.backend.connect(this.onClose);\n }\n throw e;\n })\n .then(() => {\n logger.log(`IndexedDBStore.startup: loading presence events`);\n return this.backend.getUserPresenceEvents();\n })\n .then((userPresenceEvents) => {\n logger.log(`IndexedDBStore.startup: processing presence events`);\n userPresenceEvents.forEach(([userId, rawEvent]) => {\n if (!this.createUser) {\n throw new Error(\n \"`IndexedDBStore.startup` must be called after assigning it to the client, not before!\",\n );\n }\n const u = this.createUser(userId);\n if (rawEvent) {\n u.setPresenceEvent(new MatrixEvent(rawEvent));\n }\n this.userModifiedMap[u.userId] = u.getLastModifiedTime();\n this.storeUser(u);\n });\n this.startedUp = true;\n });\n }\n\n /*\n * Close the database and destroy any associated workers\n */\n public destroy(): Promise<void> {\n return this.backend.destroy();\n }\n\n private onClose = (): void => {\n this.emitter.emit(\"closed\");\n };\n\n /**\n * @returns Promise which resolves with a sync response to restore the\n * client state to where it was at the last save, or null if there\n * is no saved sync data.\n */\n public getSavedSync = this.degradable((): Promise<ISavedSync | null> => {\n return this.backend.getSavedSync();\n }, \"getSavedSync\");\n\n /** @returns whether or not the database was newly created in this session. */\n public isNewlyCreated = this.degradable((): Promise<boolean> => {\n return this.backend.isNewlyCreated();\n }, \"isNewlyCreated\");\n\n /**\n * @returns If there is a saved sync, the nextBatch token\n * for this sync, otherwise null.\n */\n public getSavedSyncToken = this.degradable((): Promise<string | null> => {\n return this.backend.getNextBatchToken();\n }, \"getSavedSyncToken\");\n\n /**\n * Delete all data from this store.\n * @returns Promise which resolves if the data was deleted from the database.\n */\n public deleteAllData = this.degradable((): Promise<void> => {\n super.deleteAllData();\n return this.backend.clearDatabase().then(\n () => {\n logger.log(\"Deleted indexeddb data.\");\n },\n (err) => {\n logger.error(`Failed to delete indexeddb data: ${err}`);\n throw err;\n },\n );\n }, null);\n\n /**\n * Whether this store would like to save its data\n * Note that obviously whether the store wants to save or\n * not could change between calling this function and calling\n * save().\n *\n * @returns True if calling save() will actually save\n * (at the time this function is called).\n */\n public wantsSave(): boolean {\n const now = Date.now();\n return now - this.syncTs > WRITE_DELAY_MS;\n }\n\n /**\n * Possibly write data to the database.\n *\n * @param force - True to force a save to happen\n * @returns Promise resolves after the write completes\n * (or immediately if no write is performed)\n */\n public save(force = false): Promise<void> {\n if (force || this.wantsSave()) {\n return this.reallySave();\n }\n return Promise.resolve();\n }\n\n private reallySave = this.degradable((): Promise<void> => {\n this.syncTs = Date.now(); // set now to guard against multi-writes\n\n // work out changed users (this doesn't handle deletions but you\n // can't 'delete' users as they are just presence events).\n const userTuples: [userId: string, presenceEvent: Partial<IEvent>][] = [];\n for (const u of this.getUsers()) {\n if (this.userModifiedMap[u.userId] === u.getLastModifiedTime()) continue;\n if (!u.events.presence) continue;\n\n userTuples.push([u.userId, u.events.presence.event]);\n\n // note that we've saved this version of the user\n this.userModifiedMap[u.userId] = u.getLastModifiedTime();\n }\n\n return this.backend.syncToDatabase(userTuples);\n }, null);\n\n public setSyncData = this.degradable((syncData: ISyncResponse): Promise<void> => {\n return this.backend.setSyncData(syncData);\n }, \"setSyncData\");\n\n /**\n * Returns the out-of-band membership events for this room that\n * were previously loaded.\n * @returns the events, potentially an empty array if OOB loading didn't yield any new members\n * @returns in case the members for this room haven't been stored yet\n */\n public getOutOfBandMembers = this.degradable((roomId: string): Promise<IStateEventWithRoomId[] | null> => {\n return this.backend.getOutOfBandMembers(roomId);\n }, \"getOutOfBandMembers\");\n\n /**\n * Stores the out-of-band membership events for this room. Note that\n * it still makes sense to store an empty array as the OOB status for the room is\n * marked as fetched, and getOutOfBandMembers will return an empty array instead of null\n * @param membershipEvents - the membership events to store\n * @returns when all members have been stored\n */\n public setOutOfBandMembers = this.degradable(\n (roomId: string, membershipEvents: IStateEventWithRoomId[]): Promise<void> => {\n super.setOutOfBandMembers(roomId, membershipEvents);\n return this.backend.setOutOfBandMembers(roomId, membershipEvents);\n },\n \"setOutOfBandMembers\",\n );\n\n public clearOutOfBandMembers = this.degradable((roomId: string) => {\n super.clearOutOfBandMembers(roomId);\n return this.backend.clearOutOfBandMembers(roomId);\n }, \"clearOutOfBandMembers\");\n\n public getClientOptions = this.degradable((): Promise<IStoredClientOpts | undefined> => {\n return this.backend.getClientOptions();\n }, \"getClientOptions\");\n\n public storeClientOptions = this.degradable((options: IStoredClientOpts): Promise<void> => {\n super.storeClientOptions(options);\n return this.backend.storeClientOptions(options);\n }, \"storeClientOptions\");\n\n /**\n * All member functions of `IndexedDBStore` that access the backend use this wrapper to\n * watch for failures after initial store startup, including `QuotaExceededError` as\n * free disk space changes, etc.\n *\n * When IndexedDB fails via any of these paths, we degrade this back to a `MemoryStore`\n * in place so that the current operation and all future ones are in-memory only.\n *\n * @param func - The degradable work to do.\n * @param fallback - The method name for fallback.\n * @returns A wrapped member function.\n */\n private degradable<A extends Array<any>, F extends keyof MemoryStore | null, R = void>(\n func: DegradableFn<A, R>,\n fallback: F,\n ): DegradableFn<A, F extends string ? R : void> {\n const fallbackFn = fallback ? (super[fallback] as (...args: A) => Promise<R>) : null;\n\n return (async (...args) => {\n try {\n return await func.call(this, ...args);\n } catch (e) {\n logger.error(\"IndexedDBStore failure, degrading to MemoryStore\", e);\n this.emitter.emit(\"degraded\", e as Error);\n try {\n // We try to delete IndexedDB after degrading since this store is only a\n // cache (the app will still function correctly without the data).\n // It's possible that deleting repair IndexedDB for the next app load,\n // potentially by making a little more space available.\n logger.log(\"IndexedDBStore trying to delete degraded data\");\n await this.backend.clearDatabase();\n logger.log(\"IndexedDBStore delete after degrading succeeded\");\n } catch (e) {\n logger.warn(\"IndexedDBStore delete after degrading failed\", e);\n }\n // Degrade the store from being an instance of `IndexedDBStore` to instead be\n // an instance of `MemoryStore` so that future API calls use the memory path\n // directly and skip IndexedDB entirely. This should be safe as\n // `IndexedDBStore` already extends from `MemoryStore`, so we are making the\n // store become its parent type in a way. The mutator methods of\n // `IndexedDBStore` also maintain the state that `MemoryStore` uses (many are\n // not overridden at all).\n if (fallbackFn) {\n return fallbackFn.call(this, ...args);\n }\n }\n }) as DegradableFn<A, F extends string ? R : void>;\n }\n\n // XXX: ideally these would be stored in indexeddb as part of the room but,\n // we don't store rooms as such and instead accumulate entire sync responses atm.\n public async getPendingEvents(roomId: string): Promise<Partial<IEvent>[]> {\n if (!this.localStorage) return super.getPendingEvents(roomId);\n\n const serialized = this.localStorage.getItem(pendingEventsKey(roomId));\n if (serialized) {\n try {\n return JSON.parse(serialized);\n } catch (e) {\n logger.error(\"Could not parse persisted pending events\", e);\n }\n }\n return [];\n }\n\n public async setPendingEvents(roomId: string, events: Partial<IEvent>[]): Promise<void> {\n if (!this.localStorage) return super.setPendingEvents(roomId, events);\n\n if (events.length > 0) {\n this.localStorage.setItem(pendingEventsKey(roomId), JSON.stringify(events));\n } else {\n this.localStorage.removeItem(pendingEventsKey(roomId));\n }\n }\n\n public saveToDeviceBatches(batches: ToDeviceBatchWithTxnId[]): Promise<void> {\n return this.backend.saveToDeviceBatches(batches);\n }\n\n public getOldestToDeviceBatch(): Promise<IndexedToDeviceBatch | null> {\n return this.backend.getOldestToDeviceBatch();\n }\n\n public removeToDeviceBatch(id: number): Promise<void> {\n return this.backend.removeToDeviceBatch(id);\n }\n\n public async getUserProfile(userId: string): Promise<SyncUserProfile | undefined> {\n return this.backend.getUserProfile(userId);\n }\n\n public async storeUserProfiles(userProfiles: Map<string, SyncUserProfile>): Promise<void> {\n return this.backend.storeUserProfiles(userProfiles);\n }\n\n public async removeUserProfiles(userIds: string[]): Promise<void> {\n return this.backend.removeUserProfiles(userIds);\n }\n}\n\n/**\n * @param roomId - ID of the current room\n * @returns Storage key to retrieve pending events\n */\nfunction pendingEventsKey(roomId: string): string {\n return `mx_pending_events_${roomId}`;\n}\n\ntype DegradableFn<A extends Array<any>, T> = (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GAAG,OAAO,CAAC,IAAI,CAAC,CAEhE;IAEY,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnF;IAEY,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAEpC;CACJ"}
|
|
@@ -237,7 +237,9 @@ export class MemoryStore {
|
|
|
237
237
|
if (isValidFilterId(value)) {
|
|
238
238
|
return value;
|
|
239
239
|
}
|
|
240
|
-
} catch {
|
|
240
|
+
} catch {
|
|
241
|
+
// Do nothing
|
|
242
|
+
}
|
|
241
243
|
return null;
|
|
242
244
|
}
|
|
243
245
|
|
|
@@ -255,7 +257,9 @@ export class MemoryStore {
|
|
|
255
257
|
} else {
|
|
256
258
|
this.localStorage.removeItem(key);
|
|
257
259
|
}
|
|
258
|
-
} catch {
|
|
260
|
+
} catch {
|
|
261
|
+
// Do nothing
|
|
262
|
+
}
|
|
259
263
|
}
|
|
260
264
|
|
|
261
265
|
/**
|
|
@@ -266,13 +270,7 @@ export class MemoryStore {
|
|
|
266
270
|
*/
|
|
267
271
|
storeAccountDataEvents(events) {
|
|
268
272
|
events.forEach(event => {
|
|
269
|
-
|
|
270
|
-
const isDeleted = !Object.keys(event.getContent()).length;
|
|
271
|
-
if (isDeleted) {
|
|
272
|
-
this.accountData.delete(event.getType());
|
|
273
|
-
} else {
|
|
274
|
-
this.accountData.set(event.getType(), event);
|
|
275
|
-
}
|
|
273
|
+
this.accountData.set(event.getType(), event);
|
|
276
274
|
});
|
|
277
275
|
}
|
|
278
276
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.js","names":[],"sources":["../../src/store/memory.ts"],"sourcesContent":["/*\nCopyright 2015 - 2021 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n/**\n * This is an internal module. See {@link MemoryStore} for the public class.\n */\n\nimport { type EventType } from \"../@types/event.ts\";\nimport { type Room } from \"../models/room.ts\";\nimport { type SyncUserProfile, type User } from \"../models/user.ts\";\nimport { type IEvent, type MatrixEvent } from \"../models/event.ts\";\nimport { type RoomState, RoomStateEvent } from \"../models/room-state.ts\";\nimport { type RoomMember } from \"../models/room-member.ts\";\nimport { type Filter } from \"../filter.ts\";\nimport { type ISavedSync, type IStore, type UserCreator } from \"./index.ts\";\nimport { type RoomSummary } from \"../models/room-summary.ts\";\nimport { type ISyncResponse } from \"../sync-accumulator.ts\";\nimport { type IStateEventWithRoomId } from \"../@types/search.ts\";\nimport { type IndexedToDeviceBatch, type ToDeviceBatchWithTxnId } from \"../models/ToDeviceMessage.ts\";\nimport { type IStoredClientOpts } from \"../client.ts\";\nimport { MapWithDefault } from \"../utils.ts\";\nimport { KnownMembership } from \"../@types/membership.ts\";\n\nfunction isValidFilterId(filterId?: string | number | null): boolean {\n const isValidStr =\n typeof filterId === \"string\" &&\n !!filterId &&\n filterId !== \"undefined\" && // exclude these as we've serialized undefined in localStorage before\n filterId !== \"null\";\n\n return isValidStr || typeof filterId === \"number\";\n}\n\nexport interface IOpts {\n /** The local storage instance to persist some forms of data such as tokens. Rooms will NOT be stored. */\n localStorage?: Storage;\n}\n\nexport class MemoryStore implements IStore {\n private rooms: Record<string, Room> = {}; // roomId: Room\n private users: Record<string, User> = {}; // userId: User\n private syncToken: string | null = null;\n // userId: {\n // filterId: Filter\n // }\n private filters: MapWithDefault<string, Map<string, Filter>> = new MapWithDefault(() => new Map());\n public accountData: Map<string, MatrixEvent> = new Map(); // type: content\n protected readonly localStorage?: Storage;\n private oobMembers: Map<string, IStateEventWithRoomId[]> = new Map(); // roomId: [member events]\n private pendingEvents: { [roomId: string]: Partial<IEvent>[] } = {};\n private clientOptions?: IStoredClientOpts;\n private pendingToDeviceBatches: IndexedToDeviceBatch[] = [];\n private nextToDeviceBatchId = 0;\n protected createUser?: UserCreator;\n public readonly userProfiles = new Map<string, SyncUserProfile>();\n\n /**\n * Construct a new in-memory data store for the Matrix Client.\n * @param opts - Config options\n */\n public constructor(opts: IOpts = {}) {\n this.localStorage = opts.localStorage;\n }\n\n /**\n * Retrieve the token to stream from.\n * @returns The token or null.\n */\n public getSyncToken(): string | null {\n return this.syncToken;\n }\n\n /** @returns whether or not the database was newly created in this session. */\n public isNewlyCreated(): Promise<boolean> {\n return Promise.resolve(true);\n }\n\n /**\n * Set the token to stream from.\n * @param token - The token to stream from.\n */\n public setSyncToken(token: string): void {\n this.syncToken = token;\n }\n\n /**\n * Store the given room.\n * @param room - The room to be stored. All properties must be stored.\n */\n public storeRoom(room: Room): void {\n this.rooms[room.roomId] = room;\n // add listeners for room member changes so we can keep the room member\n // map up-to-date.\n room.currentState.on(RoomStateEvent.Members, this.onRoomMember);\n // add existing members\n room.currentState.getMembers().forEach((m) => {\n this.onRoomMember(null, room.currentState, m);\n });\n }\n\n public setUserCreator(creator: UserCreator): void {\n this.createUser = creator;\n }\n\n /**\n * Called when a room member in a room being tracked by this store has been\n * updated.\n */\n private onRoomMember = (event: MatrixEvent | null, state: RoomState, member: RoomMember): void => {\n if (member.membership === KnownMembership.Invite) {\n // We do NOT add invited members because people love to typo user IDs\n // which would then show up in these lists (!)\n return;\n }\n\n const user = this.users[member.userId] || this.createUser?.(member.userId);\n if (member.name) {\n user.setDisplayName(member.name);\n if (member.events.member) {\n user.setRawDisplayName(member.events.member.getDirectionalContent().displayname);\n }\n }\n if (member.events.member && member.events.member.getContent().avatar_url) {\n user.setAvatarUrl(member.events.member.getContent().avatar_url);\n }\n this.users[user.userId] = user;\n };\n\n /**\n * Retrieve a room by its' room ID.\n * @param roomId - The room ID.\n * @returns The room or null.\n */\n public getRoom(roomId: string): Room | null {\n return this.rooms[roomId] || null;\n }\n\n /**\n * Retrieve all known rooms.\n * @returns A list of rooms, which may be empty.\n */\n public getRooms(): Room[] {\n return Object.values(this.rooms);\n }\n\n /**\n * Permanently delete a room.\n */\n public removeRoom(roomId: string): void {\n if (this.rooms[roomId]) {\n this.rooms[roomId].currentState.removeListener(RoomStateEvent.Members, this.onRoomMember);\n }\n delete this.rooms[roomId];\n }\n\n /**\n * Retrieve a summary of all the rooms.\n * @returns A summary of each room.\n */\n public getRoomSummaries(): RoomSummary[] {\n return Object.values(this.rooms).map(function (room) {\n return room.summary!;\n });\n }\n\n /**\n * Store a User.\n * @param user - The user to store.\n */\n public storeUser(user: User): void {\n this.users[user.userId] = user;\n }\n\n /**\n * Retrieve a User by its' user ID.\n * @param userId - The user ID.\n * @returns The user or null.\n */\n public getUser(userId: string): User | null {\n return this.users[userId] || null;\n }\n\n /**\n * Retrieve all known users.\n * @returns A list of users, which may be empty.\n */\n public getUsers(): User[] {\n return Object.values(this.users);\n }\n\n /**\n * Retrieve scrollback for this room.\n * @param room - The matrix room\n * @param limit - The max number of old events to retrieve.\n * @returns An array of objects which will be at most 'limit'\n * length and at least 0. The objects are the raw event JSON.\n */\n public scrollback(room: Room, limit: number): MatrixEvent[] {\n return [];\n }\n\n /**\n * Store events for a room. The events have already been added to the timeline\n * @param room - The room to store events for.\n * @param events - The events to store.\n * @param token - The token associated with these events.\n * @param toStart - True if these are paginated results.\n */\n public storeEvents(room: Room, events: MatrixEvent[], token: string | null, toStart: boolean): void {\n // no-op because they've already been added to the room instance.\n }\n\n /**\n * Store a filter.\n */\n public storeFilter(filter: Filter): void {\n if (!filter?.userId || !filter?.filterId) return;\n this.filters.getOrCreate(filter.userId).set(filter.filterId, filter);\n }\n\n /**\n * Retrieve a filter.\n * @returns A filter or null.\n */\n public getFilter(userId: string, filterId: string): Filter | null {\n return this.filters.get(userId)?.get(filterId) || null;\n }\n\n /**\n * Retrieve a filter ID with the given name.\n * @param filterName - The filter name.\n * @returns The filter ID or null.\n */\n public getFilterIdByName(filterName: string): string | null {\n if (!this.localStorage) {\n return null;\n }\n const key = \"mxjssdk_memory_filter_\" + filterName;\n // XXX Storage.getItem doesn't throw ...\n // or are we using something different\n // than window.localStorage in some cases\n // that does throw?\n // that would be very naughty\n try {\n const value = this.localStorage.getItem(key);\n if (isValidFilterId(value)) {\n return value;\n }\n } catch {}\n return null;\n }\n\n /**\n * Set a filter name to ID mapping.\n */\n public setFilterIdByName(filterName: string, filterId?: string): void {\n if (!this.localStorage) {\n return;\n }\n const key = \"mxjssdk_memory_filter_\" + filterName;\n try {\n if (isValidFilterId(filterId)) {\n this.localStorage.setItem(key, filterId!);\n } else {\n this.localStorage.removeItem(key);\n }\n } catch {}\n }\n\n /**\n * Store user-scoped account data events.\n * N.B. that account data only allows a single event per type, so multiple\n * events with the same type will replace each other.\n * @param events - The events to store.\n */\n public storeAccountDataEvents(events: MatrixEvent[]): void {\n events.forEach((event) => {\n // MSC3391: an event with content of {} should be interpreted as deleted\n const isDeleted = !Object.keys(event.getContent()).length;\n if (isDeleted) {\n this.accountData.delete(event.getType());\n } else {\n this.accountData.set(event.getType(), event);\n }\n });\n }\n\n /**\n * Get account data event by event type\n * @param eventType - The event type being queried\n * @returns the user account_data event of given type, if any\n */\n public getAccountData(eventType: EventType | string): MatrixEvent | undefined {\n return this.accountData.get(eventType);\n }\n\n /**\n * setSyncData does nothing as there is no backing data store.\n *\n * @param syncData - The sync data\n * @returns An immediately resolved promise.\n */\n public setSyncData(syncData: ISyncResponse): Promise<void> {\n return Promise.resolve();\n }\n\n /**\n * We never want to save becase we have nothing to save to.\n *\n * @returns If the store wants to save\n */\n public wantsSave(): boolean {\n return false;\n }\n\n /**\n * Save does nothing as there is no backing data store.\n * @param force - True to force a save (but the memory\n * store still can't save anything)\n */\n public save(force: boolean): Promise<void> {\n return Promise.resolve();\n }\n\n /**\n * Startup does nothing as this store doesn't require starting up.\n * @returns An immediately resolved promise.\n */\n public startup(): Promise<void> {\n return Promise.resolve();\n }\n\n /**\n * @returns Promise which resolves with a sync response to restore the\n * client state to where it was at the last save, or null if there\n * is no saved sync data.\n */\n public getSavedSync(): Promise<ISavedSync | null> {\n return Promise.resolve(null);\n }\n\n /**\n * @returns If there is a saved sync, the nextBatch token\n * for this sync, otherwise null.\n */\n public getSavedSyncToken(): Promise<string | null> {\n return Promise.resolve(null);\n }\n\n /**\n * Delete all data from this store.\n * @returns An immediately resolved promise.\n */\n public deleteAllData(): Promise<void> {\n this.rooms = {\n // roomId: Room\n };\n this.users = {\n // userId: User\n };\n this.syncToken = null;\n this.filters = new MapWithDefault(() => new Map());\n this.accountData = new Map(); // type : content\n return Promise.resolve();\n }\n\n /**\n * Returns the out-of-band membership events for this room that\n * were previously loaded.\n * @returns the events, potentially an empty array if OOB loading didn't yield any new members\n * @returns in case the members for this room haven't been stored yet\n */\n public getOutOfBandMembers(roomId: string): Promise<IStateEventWithRoomId[] | null> {\n return Promise.resolve(this.oobMembers.get(roomId) || null);\n }\n\n /**\n * Stores the out-of-band membership events for this room. Note that\n * it still makes sense to store an empty array as the OOB status for the room is\n * marked as fetched, and getOutOfBandMembers will return an empty array instead of null\n * @param membershipEvents - the membership events to store\n * @returns when all members have been stored\n */\n public setOutOfBandMembers(roomId: string, membershipEvents: IStateEventWithRoomId[]): Promise<void> {\n this.oobMembers.set(roomId, membershipEvents);\n return Promise.resolve();\n }\n\n public clearOutOfBandMembers(roomId: string): Promise<void> {\n this.oobMembers.delete(roomId);\n return Promise.resolve();\n }\n\n public getClientOptions(): Promise<IStoredClientOpts | undefined> {\n return Promise.resolve(this.clientOptions);\n }\n\n public storeClientOptions(options: IStoredClientOpts): Promise<void> {\n this.clientOptions = Object.assign({}, options);\n return Promise.resolve();\n }\n\n public async getPendingEvents(roomId: string): Promise<Partial<IEvent>[]> {\n return this.pendingEvents[roomId] ?? [];\n }\n\n public async setPendingEvents(roomId: string, events: Partial<IEvent>[]): Promise<void> {\n this.pendingEvents[roomId] = events;\n }\n\n public saveToDeviceBatches(batches: ToDeviceBatchWithTxnId[]): Promise<void> {\n for (const batch of batches) {\n this.pendingToDeviceBatches.push({\n id: this.nextToDeviceBatchId++,\n eventType: batch.eventType,\n txnId: batch.txnId,\n batch: batch.batch,\n });\n }\n return Promise.resolve();\n }\n\n public async getOldestToDeviceBatch(): Promise<IndexedToDeviceBatch | null> {\n if (this.pendingToDeviceBatches.length === 0) return null;\n return this.pendingToDeviceBatches[0];\n }\n\n public removeToDeviceBatch(id: number): Promise<void> {\n this.pendingToDeviceBatches = this.pendingToDeviceBatches.filter((batch) => batch.id !== id);\n return Promise.resolve();\n }\n\n public async getUserProfile(userId: string): Promise<SyncUserProfile | undefined> {\n return this.userProfiles.get(userId);\n }\n\n public async storeUserProfiles(userProfiles: Map<string, SyncUserProfile>): Promise<void> {\n userProfiles.forEach((profile, userId) => this.userProfiles.set(userId, profile));\n }\n\n public async removeUserProfiles(userIds: string[]): Promise<void> {\n userIds.forEach((userId) => this.userProfiles.delete(userId));\n }\n\n public async removeEventsFromRoom(roomId: string, eventIds: string[]): Promise<void> {\n // Can ignore as there is no backing store.\n }\n\n public async destroy(): Promise<void> {\n // Nothing to do\n }\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAMA,SAAyB,cAAc,QAAQ,yBAAyB;AASxE,SAAS,cAAc,QAAQ,aAAa;AAC5C,SAAS,eAAe,QAAQ,yBAAyB;AAEzD,SAAS,eAAe,CAAC,QAAiC,EAAW;EACjE,MAAM,UAAU,GACZ,OAAO,QAAQ,KAAK,QAAQ,IAC5B,CAAC,CAAC,QAAQ,IACV,QAAQ,KAAK,WAAW;EAAI;EAC5B,QAAQ,KAAK,MAAM;EAEvB,OAAO,UAAU,IAAI,OAAO,QAAQ,KAAK,QAAQ;AACrD;AAOA,OAAO,MAAM,WAAW,CAAmB;EAkBvC;AACJ;AACA;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;IACN;IACA,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC;EAC5B;EAEA,MAAa,sBAAsB,GAAyC;IACxE,IAAI,IAAI,CAAC,sBAAsB,CAAC,MAAM,KAAK,CAAC,EAAE,OAAO,IAAI;IACzD,OAAO,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC;EACzC;EAEO,mBAAmB,CAAC,EAAU,EAAiB;IAClD,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,sBAAsB,CAAC,MAAM,CAAE,KAAK,IAAK,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC;IAC5F,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC;EAC5B;EAEA,MAAa,cAAc,CAAC,MAAc,EAAwC;IAC9E,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC;EACxC;EAEA,MAAa,iBAAiB,CAAC,YAA0C,EAAiB;IACtF,YAAY,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;EACrF;EAEA,MAAa,kBAAkB,CAAC,OAAiB,EAAiB;IAC9D,OAAO,CAAC,OAAO,CAAE,MAAM,IAAK,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;EACjE;EAEA,MAAa,oBAAoB,CAAC,MAAc,EAAE,QAAkB,EAAiB;IACjF;EAAA;EAGJ,MAAa,OAAO,GAAkB;IAClC;EAAA;AAER","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"memory.js","names":[],"sources":["../../src/store/memory.ts"],"sourcesContent":["/*\nCopyright 2015 - 2021 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n/**\n * This is an internal module. See {@link MemoryStore} for the public class.\n */\n\nimport { type EventType } from \"../@types/event.ts\";\nimport { type Room } from \"../models/room.ts\";\nimport { type SyncUserProfile, type User } from \"../models/user.ts\";\nimport { type IEvent, type MatrixEvent } from \"../models/event.ts\";\nimport { type RoomState, RoomStateEvent } from \"../models/room-state.ts\";\nimport { type RoomMember } from \"../models/room-member.ts\";\nimport { type Filter } from \"../filter.ts\";\nimport { type ISavedSync, type IStore, type UserCreator } from \"./index.ts\";\nimport { type RoomSummary } from \"../models/room-summary.ts\";\nimport { type ISyncResponse } from \"../sync-accumulator.ts\";\nimport { type IStateEventWithRoomId } from \"../@types/search.ts\";\nimport { type IndexedToDeviceBatch, type ToDeviceBatchWithTxnId } from \"../models/ToDeviceMessage.ts\";\nimport { type IStoredClientOpts } from \"../client.ts\";\nimport { MapWithDefault } from \"../utils.ts\";\nimport { KnownMembership } from \"../@types/membership.ts\";\n\nfunction isValidFilterId(filterId?: string | number | null): boolean {\n const isValidStr =\n typeof filterId === \"string\" &&\n !!filterId &&\n filterId !== \"undefined\" && // exclude these as we've serialized undefined in localStorage before\n filterId !== \"null\";\n\n return isValidStr || typeof filterId === \"number\";\n}\n\nexport interface IOpts {\n /** The local storage instance to persist some forms of data such as tokens. Rooms will NOT be stored. */\n localStorage?: Storage;\n}\n\nexport class MemoryStore implements IStore {\n private rooms: Record<string, Room> = {}; // roomId: Room\n private users: Record<string, User> = {}; // userId: User\n private syncToken: string | null = null;\n // userId: {\n // filterId: Filter\n // }\n private filters: MapWithDefault<string, Map<string, Filter>> = new MapWithDefault(() => new Map());\n public accountData: Map<string, MatrixEvent> = new Map(); // type: content\n protected readonly localStorage?: Storage;\n private oobMembers: Map<string, IStateEventWithRoomId[]> = new Map(); // roomId: [member events]\n private pendingEvents: { [roomId: string]: Partial<IEvent>[] } = {};\n private clientOptions?: IStoredClientOpts;\n private pendingToDeviceBatches: IndexedToDeviceBatch[] = [];\n private nextToDeviceBatchId = 0;\n protected createUser?: UserCreator;\n public readonly userProfiles = new Map<string, SyncUserProfile>();\n\n /**\n * Construct a new in-memory data store for the Matrix Client.\n * @param opts - Config options\n */\n public constructor(opts: IOpts = {}) {\n this.localStorage = opts.localStorage;\n }\n\n /**\n * Retrieve the token to stream from.\n * @returns The token or null.\n */\n public getSyncToken(): string | null {\n return this.syncToken;\n }\n\n /** @returns whether or not the database was newly created in this session. */\n public isNewlyCreated(): Promise<boolean> {\n return Promise.resolve(true);\n }\n\n /**\n * Set the token to stream from.\n * @param token - The token to stream from.\n */\n public setSyncToken(token: string): void {\n this.syncToken = token;\n }\n\n /**\n * Store the given room.\n * @param room - The room to be stored. All properties must be stored.\n */\n public storeRoom(room: Room): void {\n this.rooms[room.roomId] = room;\n // add listeners for room member changes so we can keep the room member\n // map up-to-date.\n room.currentState.on(RoomStateEvent.Members, this.onRoomMember);\n // add existing members\n room.currentState.getMembers().forEach((m) => {\n this.onRoomMember(null, room.currentState, m);\n });\n }\n\n public setUserCreator(creator: UserCreator): void {\n this.createUser = creator;\n }\n\n /**\n * Called when a room member in a room being tracked by this store has been\n * updated.\n */\n private onRoomMember = (event: MatrixEvent | null, state: RoomState, member: RoomMember): void => {\n if (member.membership === KnownMembership.Invite) {\n // We do NOT add invited members because people love to typo user IDs\n // which would then show up in these lists (!)\n return;\n }\n\n const user = this.users[member.userId] || this.createUser?.(member.userId);\n if (member.name) {\n user.setDisplayName(member.name);\n if (member.events.member) {\n user.setRawDisplayName(member.events.member.getDirectionalContent().displayname);\n }\n }\n if (member.events.member && member.events.member.getContent().avatar_url) {\n user.setAvatarUrl(member.events.member.getContent().avatar_url);\n }\n this.users[user.userId] = user;\n };\n\n /**\n * Retrieve a room by its' room ID.\n * @param roomId - The room ID.\n * @returns The room or null.\n */\n public getRoom(roomId: string): Room | null {\n return this.rooms[roomId] || null;\n }\n\n /**\n * Retrieve all known rooms.\n * @returns A list of rooms, which may be empty.\n */\n public getRooms(): Room[] {\n return Object.values(this.rooms);\n }\n\n /**\n * Permanently delete a room.\n */\n public removeRoom(roomId: string): void {\n if (this.rooms[roomId]) {\n this.rooms[roomId].currentState.removeListener(RoomStateEvent.Members, this.onRoomMember);\n }\n delete this.rooms[roomId];\n }\n\n /**\n * Retrieve a summary of all the rooms.\n * @returns A summary of each room.\n */\n public getRoomSummaries(): RoomSummary[] {\n return Object.values(this.rooms).map(function (room) {\n return room.summary!;\n });\n }\n\n /**\n * Store a User.\n * @param user - The user to store.\n */\n public storeUser(user: User): void {\n this.users[user.userId] = user;\n }\n\n /**\n * Retrieve a User by its' user ID.\n * @param userId - The user ID.\n * @returns The user or null.\n */\n public getUser(userId: string): User | null {\n return this.users[userId] || null;\n }\n\n /**\n * Retrieve all known users.\n * @returns A list of users, which may be empty.\n */\n public getUsers(): User[] {\n return Object.values(this.users);\n }\n\n /**\n * Retrieve scrollback for this room.\n * @param room - The matrix room\n * @param limit - The max number of old events to retrieve.\n * @returns An array of objects which will be at most 'limit'\n * length and at least 0. The objects are the raw event JSON.\n */\n public scrollback(room: Room, limit: number): MatrixEvent[] {\n return [];\n }\n\n /**\n * Store events for a room. The events have already been added to the timeline\n * @param room - The room to store events for.\n * @param events - The events to store.\n * @param token - The token associated with these events.\n * @param toStart - True if these are paginated results.\n */\n public storeEvents(room: Room, events: MatrixEvent[], token: string | null, toStart: boolean): void {\n // no-op because they've already been added to the room instance.\n }\n\n /**\n * Store a filter.\n */\n public storeFilter(filter: Filter): void {\n if (!filter?.userId || !filter?.filterId) return;\n this.filters.getOrCreate(filter.userId).set(filter.filterId, filter);\n }\n\n /**\n * Retrieve a filter.\n * @returns A filter or null.\n */\n public getFilter(userId: string, filterId: string): Filter | null {\n return this.filters.get(userId)?.get(filterId) || null;\n }\n\n /**\n * Retrieve a filter ID with the given name.\n * @param filterName - The filter name.\n * @returns The filter ID or null.\n */\n public getFilterIdByName(filterName: string): string | null {\n if (!this.localStorage) {\n return null;\n }\n const key = \"mxjssdk_memory_filter_\" + filterName;\n // XXX Storage.getItem doesn't throw ...\n // or are we using something different\n // than window.localStorage in some cases\n // that does throw?\n // that would be very naughty\n try {\n const value = this.localStorage.getItem(key);\n if (isValidFilterId(value)) {\n return value;\n }\n } catch {\n // Do nothing\n }\n return null;\n }\n\n /**\n * Set a filter name to ID mapping.\n */\n public setFilterIdByName(filterName: string, filterId?: string): void {\n if (!this.localStorage) {\n return;\n }\n const key = \"mxjssdk_memory_filter_\" + filterName;\n try {\n if (isValidFilterId(filterId)) {\n this.localStorage.setItem(key, filterId!);\n } else {\n this.localStorage.removeItem(key);\n }\n } catch {\n // Do nothing\n }\n }\n\n /**\n * Store user-scoped account data events.\n * N.B. that account data only allows a single event per type, so multiple\n * events with the same type will replace each other.\n * @param events - The events to store.\n */\n public storeAccountDataEvents(events: MatrixEvent[]): void {\n events.forEach((event) => {\n this.accountData.set(event.getType(), event);\n });\n }\n\n /**\n * Get account data event by event type\n * @param eventType - The event type being queried\n * @returns the user account_data event of given type, if any\n */\n public getAccountData(eventType: EventType | string): MatrixEvent | undefined {\n return this.accountData.get(eventType);\n }\n\n /**\n * setSyncData does nothing as there is no backing data store.\n *\n * @param syncData - The sync data\n * @returns An immediately resolved promise.\n */\n public setSyncData(syncData: ISyncResponse): Promise<void> {\n return Promise.resolve();\n }\n\n /**\n * We never want to save becase we have nothing to save to.\n *\n * @returns If the store wants to save\n */\n public wantsSave(): boolean {\n return false;\n }\n\n /**\n * Save does nothing as there is no backing data store.\n * @param force - True to force a save (but the memory\n * store still can't save anything)\n */\n public save(force: boolean): Promise<void> {\n return Promise.resolve();\n }\n\n /**\n * Startup does nothing as this store doesn't require starting up.\n * @returns An immediately resolved promise.\n */\n public startup(): Promise<void> {\n return Promise.resolve();\n }\n\n /**\n * @returns Promise which resolves with a sync response to restore the\n * client state to where it was at the last save, or null if there\n * is no saved sync data.\n */\n public getSavedSync(): Promise<ISavedSync | null> {\n return Promise.resolve(null);\n }\n\n /**\n * @returns If there is a saved sync, the nextBatch token\n * for this sync, otherwise null.\n */\n public getSavedSyncToken(): Promise<string | null> {\n return Promise.resolve(null);\n }\n\n /**\n * Delete all data from this store.\n * @returns An immediately resolved promise.\n */\n public deleteAllData(): Promise<void> {\n this.rooms = {\n // roomId: Room\n };\n this.users = {\n // userId: User\n };\n this.syncToken = null;\n this.filters = new MapWithDefault(() => new Map());\n this.accountData = new Map(); // type : content\n return Promise.resolve();\n }\n\n /**\n * Returns the out-of-band membership events for this room that\n * were previously loaded.\n * @returns the events, potentially an empty array if OOB loading didn't yield any new members\n * @returns in case the members for this room haven't been stored yet\n */\n public getOutOfBandMembers(roomId: string): Promise<IStateEventWithRoomId[] | null> {\n return Promise.resolve(this.oobMembers.get(roomId) || null);\n }\n\n /**\n * Stores the out-of-band membership events for this room. Note that\n * it still makes sense to store an empty array as the OOB status for the room is\n * marked as fetched, and getOutOfBandMembers will return an empty array instead of null\n * @param membershipEvents - the membership events to store\n * @returns when all members have been stored\n */\n public setOutOfBandMembers(roomId: string, membershipEvents: IStateEventWithRoomId[]): Promise<void> {\n this.oobMembers.set(roomId, membershipEvents);\n return Promise.resolve();\n }\n\n public clearOutOfBandMembers(roomId: string): Promise<void> {\n this.oobMembers.delete(roomId);\n return Promise.resolve();\n }\n\n public getClientOptions(): Promise<IStoredClientOpts | undefined> {\n return Promise.resolve(this.clientOptions);\n }\n\n public storeClientOptions(options: IStoredClientOpts): Promise<void> {\n this.clientOptions = Object.assign({}, options);\n return Promise.resolve();\n }\n\n public async getPendingEvents(roomId: string): Promise<Partial<IEvent>[]> {\n return this.pendingEvents[roomId] ?? [];\n }\n\n public async setPendingEvents(roomId: string, events: Partial<IEvent>[]): Promise<void> {\n this.pendingEvents[roomId] = events;\n }\n\n public saveToDeviceBatches(batches: ToDeviceBatchWithTxnId[]): Promise<void> {\n for (const batch of batches) {\n this.pendingToDeviceBatches.push({\n id: this.nextToDeviceBatchId++,\n eventType: batch.eventType,\n txnId: batch.txnId,\n batch: batch.batch,\n });\n }\n return Promise.resolve();\n }\n\n public async getOldestToDeviceBatch(): Promise<IndexedToDeviceBatch | null> {\n if (this.pendingToDeviceBatches.length === 0) return null;\n return this.pendingToDeviceBatches[0];\n }\n\n public removeToDeviceBatch(id: number): Promise<void> {\n this.pendingToDeviceBatches = this.pendingToDeviceBatches.filter((batch) => batch.id !== id);\n return Promise.resolve();\n }\n\n public async getUserProfile(userId: string): Promise<SyncUserProfile | undefined> {\n return this.userProfiles.get(userId);\n }\n\n public async storeUserProfiles(userProfiles: Map<string, SyncUserProfile>): Promise<void> {\n userProfiles.forEach((profile, userId) => this.userProfiles.set(userId, profile));\n }\n\n public async removeUserProfiles(userIds: string[]): Promise<void> {\n userIds.forEach((userId) => this.userProfiles.delete(userId));\n }\n\n public async removeEventsFromRoom(roomId: string, eventIds: string[]): Promise<void> {\n // Can ignore as there is no backing store.\n }\n\n public async destroy(): Promise<void> {\n // Nothing to do\n }\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAMA,SAAyB,cAAc,QAAQ,yBAAyB;AASxE,SAAS,cAAc,QAAQ,aAAa;AAC5C,SAAS,eAAe,QAAQ,yBAAyB;AAEzD,SAAS,eAAe,CAAC,QAAiC,EAAW;EACjE,MAAM,UAAU,GACZ,OAAO,QAAQ,KAAK,QAAQ,IAC5B,CAAC,CAAC,QAAQ,IACV,QAAQ,KAAK,WAAW;EAAI;EAC5B,QAAQ,KAAK,MAAM;EAEvB,OAAO,UAAU,IAAI,OAAO,QAAQ,KAAK,QAAQ;AACrD;AAOA,OAAO,MAAM,WAAW,CAAmB;EAkBvC;AACJ;AACA;AACA;EACW,WAAW,CAAC,IAAW,GAAG,CAAC,CAAC,EAAE;IAAA,+BArBC,CAAC,CAAC;IAAE;IAAA,+BACJ,CAAC,CAAC;IAAE;IAAA,mCAC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,CAAoC;IACvD,OAAO,CAAC,UAAU,CAAoC;IACtD,OAAO,CAAC,SAAS,CAAmC;IAKpD,OAAO,CAAC,SAAS,CAAuB;IAExC,YAAoC,IAAI,GAAE,KAAU,EAEnD;IAEM,UAAU,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,UAAQ,GAAG,IAAI,CAIzE;IAED,OAAO,CAAC,qBAAqB;IAU7B;;;;OAIG;IACH,OAAO,CAAC,eAAe;IA0BvB,OAAO,CAAC,cAAc;IA8DtB,OAAO,CAAC,qBAAqB;IA8B7B,OAAO,CAAC,oBAAoB;IA+B5B,OAAO,CAAC,mBAAmB;IAuK3B;;;;;;;;;;;;;;OAcG;IACI,OAAO,CAAC,WAAW,UAAQ,GAAG,SAAS,CAmJ7C;IAEM,iBAAiB,IAAI,MAAM,CAEjC;IAEM,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAOpE;CACJ"}
|
|
@@ -25,8 +25,6 @@ import { MAX_STICKY_DURATION_MS } from "./models/event.js";
|
|
|
25
25
|
import { UNREAD_THREAD_NOTIFICATIONS } from "./@types/sync.js";
|
|
26
26
|
import { ReceiptAccumulator } from "./receipt-accumulator.js";
|
|
27
27
|
|
|
28
|
-
/* eslint-disable camelcase */
|
|
29
|
-
|
|
30
28
|
/** A to-device message as received from the sync. */
|
|
31
29
|
|
|
32
30
|
/**
|
|
@@ -42,8 +40,6 @@ import { ReceiptAccumulator } from "./receipt-accumulator.js";
|
|
|
42
40
|
* The "users" section of the sync update which contains extended profile updates.
|
|
43
41
|
*/
|
|
44
42
|
|
|
45
|
-
/* eslint-enable camelcase */
|
|
46
|
-
|
|
47
43
|
export let Category = /*#__PURE__*/function (Category) {
|
|
48
44
|
Category["Invite"] = "invite";
|
|
49
45
|
Category["Leave"] = "leave";
|
|
@@ -396,7 +392,7 @@ export class SyncAccumulator {
|
|
|
396
392
|
for (let i = startIndex; i < currentData._timeline.length; i++) {
|
|
397
393
|
if (currentData._timeline[i].token) {
|
|
398
394
|
// keep all events after this, including this one
|
|
399
|
-
currentData._timeline = currentData._timeline.slice(i
|
|
395
|
+
currentData._timeline = currentData._timeline.slice(i);
|
|
400
396
|
break;
|
|
401
397
|
}
|
|
402
398
|
}
|